]> git.sur5r.net Git - openldap/blob - configure
Added translucent overlay
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.566 2005/03/05 00:23:31 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2005 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58   --with-multiple-precision
59                           multiple precision support for statistics
60                           auto|bignum|gmp [auto]"
61 ac_help="$ac_help
62
63 SLAPD (Standalone LDAP Daemon) Options:"
64 ac_help="$ac_help
65   --enable-slapd          enable building slapd [yes]"
66 ac_help="$ac_help
67     --enable-aci          enable per-object ACIs (experimental) [no]"
68 ac_help="$ac_help
69     --enable-cleartext    enable cleartext passwords [yes]"
70 ac_help="$ac_help
71     --enable-crypt        enable crypt(3) passwords [no]"
72 ac_help="$ac_help
73     --enable-lmpasswd     enable LAN Manager passwords [no]"
74 ac_help="$ac_help
75     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
76 ac_help="$ac_help
77     --enable-modules      enable dynamic module support [no]"
78 ac_help="$ac_help
79     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
80 ac_help="$ac_help
81     --enable-rlookups     enable reverse lookups of client hostnames [no]"
82 ac_help="$ac_help
83     --enable-slapi        enable SLAPI support (experimental) [no]"
84 ac_help="$ac_help
85     --enable-slp          enable SLPv2 support [no]"
86 ac_help="$ac_help
87     --enable-wrappers     enable tcp wrapper support [no]"
88 ac_help="$ac_help
89
90 SLAPD Backend Options:"
91 ac_help="$ac_help
92     --enable-backends     enable all available backends no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend no|yes|mod [no]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
103 ac_help="$ac_help
104       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
107 ac_help="$ac_help
108     --enable-meta         enable metadirectory backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend no|yes|mod [yes]"
111 ac_help="$ac_help
112     --enable-null         enable null backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-passwd       enable passwd backend no|yes|mod [no]"
115 ac_help="$ac_help
116     --enable-perl         enable perl backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-relay        enable relay backend no|yes|mod [yes]"
119 ac_help="$ac_help
120     --enable-shell        enable shell backend no|yes|mod [no]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend no|yes|mod [no]"
123 ac_help="$ac_help
124
125 SLAPD Overlay Options:"
126 ac_help="$ac_help
127     --enable-overlays     enable all available overlays no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-glue         Backend Glue overlay no|yes|mod [yes]"
134 ac_help="$ac_help
135     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
136 ac_help="$ac_help
137     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
138 ac_help="$ac_help
139     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
140 ac_help="$ac_help
141     --enable-refint       Referential Integrity overlay no|yes|mod [no]"
142 ac_help="$ac_help
143     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
144 ac_help="$ac_help
145     --enable-syncprov             Syncrepl Provider overlay no|yes|mod [yes]"
146 ac_help="$ac_help
147     --enable-translucent          Translucent Proxy overlay no|yes|mod [no]"
148 ac_help="$ac_help
149     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]"
150 ac_help="$ac_help
151
152 SLURPD (Replication Daemon) Options:"
153 ac_help="$ac_help
154   --enable-slurpd         enable building slurpd [auto]"
155 ac_help="$ac_help
156
157 Library Generation & Linking Options"
158 ac_help="$ac_help
159   --enable-static[=PKGS]  build static libraries [default=yes]"
160 ac_help="$ac_help
161   --enable-shared[=PKGS]  build shared libraries [default=yes]"
162 ac_help="$ac_help
163   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
164 ac_help="$ac_help
165   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
166
167 # Find the correct PATH separator.  Usually this is `:', but
168 # DJGPP uses `;' like DOS.
169 if test "X${PATH_SEPARATOR+set}" != Xset; then
170   UNAME=${UNAME-`uname 2>/dev/null`}
171   case X$UNAME in
172     *-DOS) lt_cv_sys_path_separator=';' ;;
173     *)     lt_cv_sys_path_separator=':' ;;
174   esac
175   PATH_SEPARATOR=$lt_cv_sys_path_separator
176 fi
177
178
179 # Check that we are running under the correct shell.
180 SHELL=${CONFIG_SHELL-/bin/sh}
181
182 case X$ECHO in
183 X*--fallback-echo)
184   # Remove one level of quotation (which was required for Make).
185   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
186   ;;
187 esac
188
189 echo=${ECHO-echo}
190 if test "X$1" = X--no-reexec; then
191   # Discard the --no-reexec flag, and continue.
192   shift
193 elif test "X$1" = X--fallback-echo; then
194   # Avoid inline document here, it may be left over
195   :
196 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
197   # Yippee, $echo works!
198   :
199 else
200   # Restart under the correct shell.
201   exec $SHELL "$0" --no-reexec ${1+"$@"}
202 fi
203
204 if test "X$1" = X--fallback-echo; then
205   # used as fallback echo
206   shift
207   cat <<EOF
208
209 EOF
210   exit 0
211 fi
212
213 # The HP-UX ksh and POSIX shell print the target directory to stdout
214 # if CDPATH is set.
215 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
216
217 if test -z "$ECHO"; then
218 if test "X${echo_test_string+set}" != Xset; then
219 # find a string as large as possible, as long as the shell can cope with it
220   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
221     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
222     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
223        echo_test_string="`eval $cmd`" &&
224        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
225     then
226       break
227     fi
228   done
229 fi
230
231 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
232    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
233    test "X$echo_testing_string" = "X$echo_test_string"; then
234   :
235 else
236   # The Solaris, AIX, and Digital Unix default echo programs unquote
237   # backslashes.  This makes it impossible to quote backslashes using
238   #   echo "$something" | sed 's/\\/\\\\/g'
239   #
240   # So, first we look for a working echo in the user's PATH.
241
242   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
243   for dir in $PATH /usr/ucb; do
244     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
245        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
246        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
247        test "X$echo_testing_string" = "X$echo_test_string"; then
248       echo="$dir/echo"
249       break
250     fi
251   done
252   IFS="$save_ifs"
253
254   if test "X$echo" = Xecho; then
255     # We didn't find a better echo, so look for alternatives.
256     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
257        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
258        test "X$echo_testing_string" = "X$echo_test_string"; then
259       # This shell has a builtin print -r that does the trick.
260       echo='print -r'
261     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
262          test "X$CONFIG_SHELL" != X/bin/ksh; then
263       # If we have ksh, try running configure again with it.
264       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
265       export ORIGINAL_CONFIG_SHELL
266       CONFIG_SHELL=/bin/ksh
267       export CONFIG_SHELL
268       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
269     else
270       # Try using printf.
271       echo='printf %s\n'
272       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
273          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
274          test "X$echo_testing_string" = "X$echo_test_string"; then
275         # Cool, printf works
276         :
277       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
278            test "X$echo_testing_string" = 'X\t' &&
279            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
280            test "X$echo_testing_string" = "X$echo_test_string"; then
281         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
282         export CONFIG_SHELL
283         SHELL="$CONFIG_SHELL"
284         export SHELL
285         echo="$CONFIG_SHELL $0 --fallback-echo"
286       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
287            test "X$echo_testing_string" = 'X\t' &&
288            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
289            test "X$echo_testing_string" = "X$echo_test_string"; then
290         echo="$CONFIG_SHELL $0 --fallback-echo"
291       else
292         # maybe with a smaller string...
293         prev=:
294
295         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
296           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
297           then
298             break
299           fi
300           prev="$cmd"
301         done
302
303         if test "$prev" != 'sed 50q "$0"'; then
304           echo_test_string=`eval $prev`
305           export echo_test_string
306           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
307         else
308           # Oops.  We lost completely, so just stick with echo.
309           echo=echo
310         fi
311       fi
312     fi
313   fi
314 fi
315 fi
316
317 # Copy echo and quote the copy suitably for passing to libtool from
318 # the Makefile, instead of quoting the original, which is used later.
319 ECHO=$echo
320 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
321    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
322 fi
323
324
325 ac_help="$ac_help
326   --disable-libtool-lock  avoid locking (might break parallel builds)"
327 ac_help="$ac_help
328   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
329 ac_help="$ac_help
330
331 See INSTALL file for further details."
332
333 # Initialize some variables set by options.
334 # The variables have the same names as the options, with
335 # dashes changed to underlines.
336 build=NONE
337 cache_file=./config.cache
338 exec_prefix=NONE
339 host=NONE
340 no_create=
341 nonopt=NONE
342 no_recursion=
343 prefix=NONE
344 program_prefix=NONE
345 program_suffix=NONE
346 program_transform_name=s,x,x,
347 silent=
348 site=
349 srcdir=
350 target=NONE
351 verbose=
352 x_includes=NONE
353 x_libraries=NONE
354 bindir='${exec_prefix}/bin'
355 sbindir='${exec_prefix}/sbin'
356 libexecdir='${exec_prefix}/libexec'
357 datadir='${prefix}/share'
358 sysconfdir='${prefix}/etc'
359 sharedstatedir='${prefix}/com'
360 localstatedir='${prefix}/var'
361 libdir='${exec_prefix}/lib'
362 includedir='${prefix}/include'
363 oldincludedir='/usr/include'
364 infodir='${prefix}/info'
365 mandir='${prefix}/man'
366
367 # Initialize some other variables.
368 subdirs=
369 MFLAGS= MAKEFLAGS=
370 SHELL=${CONFIG_SHELL-/bin/sh}
371 # Maximum number of lines to put in a shell here document.
372 ac_max_here_lines=12
373
374 ac_prev=
375 for ac_option
376 do
377
378   # If the previous option needs an argument, assign it.
379   if test -n "$ac_prev"; then
380     eval "$ac_prev=\$ac_option"
381     ac_prev=
382     continue
383   fi
384
385   case "$ac_option" in
386   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
387   *) ac_optarg= ;;
388   esac
389
390   # Accept the important Cygnus configure options, so we can diagnose typos.
391
392   case "$ac_option" in
393
394   -bindir | --bindir | --bindi | --bind | --bin | --bi)
395     ac_prev=bindir ;;
396   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
397     bindir="$ac_optarg" ;;
398
399   -build | --build | --buil | --bui | --bu)
400     ac_prev=build ;;
401   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
402     build="$ac_optarg" ;;
403
404   -cache-file | --cache-file | --cache-fil | --cache-fi \
405   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
406     ac_prev=cache_file ;;
407   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
408   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
409     cache_file="$ac_optarg" ;;
410
411   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
412     ac_prev=datadir ;;
413   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
414   | --da=*)
415     datadir="$ac_optarg" ;;
416
417   -disable-* | --disable-*)
418     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
419     # Reject names that are not valid shell variable names.
420     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
421       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
422     fi
423     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
424     eval "enable_${ac_feature}=no" ;;
425
426   -enable-* | --enable-*)
427     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
428     # Reject names that are not valid shell variable names.
429     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
430       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
431     fi
432     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
433     case "$ac_option" in
434       *=*) ;;
435       *) ac_optarg=yes ;;
436     esac
437     eval "enable_${ac_feature}='$ac_optarg'" ;;
438
439   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
440   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
441   | --exec | --exe | --ex)
442     ac_prev=exec_prefix ;;
443   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
444   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
445   | --exec=* | --exe=* | --ex=*)
446     exec_prefix="$ac_optarg" ;;
447
448   -gas | --gas | --ga | --g)
449     # Obsolete; use --with-gas.
450     with_gas=yes ;;
451
452   -help | --help | --hel | --he)
453     # Omit some internal or obsolete options to make the list less imposing.
454     # This message is too long to be a string in the A/UX 3.1 sh.
455     cat << EOF
456 Usage: configure [options] [host]
457 Options: [defaults in brackets after descriptions]
458 Configuration:
459   --cache-file=FILE       cache test results in FILE
460   --help                  print this message
461   --no-create             do not create output files
462   --quiet, --silent       do not print \`checking...' messages
463   --version               print the version of autoconf that created configure
464 Directory and file names:
465   --prefix=PREFIX         install architecture-independent files in PREFIX
466                           [$ac_default_prefix]
467   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
468                           [same as prefix]
469   --bindir=DIR            user executables in DIR [EPREFIX/bin]
470   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
471   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
472   --datadir=DIR           read-only architecture-independent data in DIR
473                           [PREFIX/share]
474   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
475   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
476                           [PREFIX/com]
477   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
478   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
479   --includedir=DIR        C header files in DIR [PREFIX/include]
480   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
481   --infodir=DIR           info documentation in DIR [PREFIX/info]
482   --mandir=DIR            man documentation in DIR [PREFIX/man]
483   --srcdir=DIR            find the sources in DIR [configure dir or ..]
484   --program-prefix=PREFIX prepend PREFIX to installed program names
485   --program-suffix=SUFFIX append SUFFIX to installed program names
486   --program-transform-name=PROGRAM
487                           run sed PROGRAM on installed program names
488 EOF
489     cat << EOF
490 Host type:
491   --build=BUILD           configure for building on BUILD [BUILD=HOST]
492   --host=HOST             configure for HOST [guessed]
493   --target=TARGET         configure for TARGET [TARGET=HOST]
494 Features and packages:
495   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
496   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
497   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
498   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
499   --x-includes=DIR        X include files are in DIR
500   --x-libraries=DIR       X library files are in DIR
501 EOF
502     if test -n "$ac_help"; then
503       echo "--enable and --with options recognized:$ac_help"
504     fi
505     exit 0 ;;
506
507   -host | --host | --hos | --ho)
508     ac_prev=host ;;
509   -host=* | --host=* | --hos=* | --ho=*)
510     host="$ac_optarg" ;;
511
512   -includedir | --includedir | --includedi | --included | --include \
513   | --includ | --inclu | --incl | --inc)
514     ac_prev=includedir ;;
515   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
516   | --includ=* | --inclu=* | --incl=* | --inc=*)
517     includedir="$ac_optarg" ;;
518
519   -infodir | --infodir | --infodi | --infod | --info | --inf)
520     ac_prev=infodir ;;
521   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
522     infodir="$ac_optarg" ;;
523
524   -libdir | --libdir | --libdi | --libd)
525     ac_prev=libdir ;;
526   -libdir=* | --libdir=* | --libdi=* | --libd=*)
527     libdir="$ac_optarg" ;;
528
529   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
530   | --libexe | --libex | --libe)
531     ac_prev=libexecdir ;;
532   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
533   | --libexe=* | --libex=* | --libe=*)
534     libexecdir="$ac_optarg" ;;
535
536   -localstatedir | --localstatedir | --localstatedi | --localstated \
537   | --localstate | --localstat | --localsta | --localst \
538   | --locals | --local | --loca | --loc | --lo)
539     ac_prev=localstatedir ;;
540   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
541   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
542   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
543     localstatedir="$ac_optarg" ;;
544
545   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
546     ac_prev=mandir ;;
547   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
548     mandir="$ac_optarg" ;;
549
550   -nfp | --nfp | --nf)
551     # Obsolete; use --without-fp.
552     with_fp=no ;;
553
554   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
555   | --no-cr | --no-c)
556     no_create=yes ;;
557
558   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
559   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
560     no_recursion=yes ;;
561
562   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
563   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
564   | --oldin | --oldi | --old | --ol | --o)
565     ac_prev=oldincludedir ;;
566   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
567   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
568   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
569     oldincludedir="$ac_optarg" ;;
570
571   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
572     ac_prev=prefix ;;
573   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
574     prefix="$ac_optarg" ;;
575
576   -program-prefix | --program-prefix | --program-prefi | --program-pref \
577   | --program-pre | --program-pr | --program-p)
578     ac_prev=program_prefix ;;
579   -program-prefix=* | --program-prefix=* | --program-prefi=* \
580   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
581     program_prefix="$ac_optarg" ;;
582
583   -program-suffix | --program-suffix | --program-suffi | --program-suff \
584   | --program-suf | --program-su | --program-s)
585     ac_prev=program_suffix ;;
586   -program-suffix=* | --program-suffix=* | --program-suffi=* \
587   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
588     program_suffix="$ac_optarg" ;;
589
590   -program-transform-name | --program-transform-name \
591   | --program-transform-nam | --program-transform-na \
592   | --program-transform-n | --program-transform- \
593   | --program-transform | --program-transfor \
594   | --program-transfo | --program-transf \
595   | --program-trans | --program-tran \
596   | --progr-tra | --program-tr | --program-t)
597     ac_prev=program_transform_name ;;
598   -program-transform-name=* | --program-transform-name=* \
599   | --program-transform-nam=* | --program-transform-na=* \
600   | --program-transform-n=* | --program-transform-=* \
601   | --program-transform=* | --program-transfor=* \
602   | --program-transfo=* | --program-transf=* \
603   | --program-trans=* | --program-tran=* \
604   | --progr-tra=* | --program-tr=* | --program-t=*)
605     program_transform_name="$ac_optarg" ;;
606
607   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
608   | -silent | --silent | --silen | --sile | --sil)
609     silent=yes ;;
610
611   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
612     ac_prev=sbindir ;;
613   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
614   | --sbi=* | --sb=*)
615     sbindir="$ac_optarg" ;;
616
617   -sharedstatedir | --sharedstatedir | --sharedstatedi \
618   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
619   | --sharedst | --shareds | --shared | --share | --shar \
620   | --sha | --sh)
621     ac_prev=sharedstatedir ;;
622   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
623   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
624   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
625   | --sha=* | --sh=*)
626     sharedstatedir="$ac_optarg" ;;
627
628   -site | --site | --sit)
629     ac_prev=site ;;
630   -site=* | --site=* | --sit=*)
631     site="$ac_optarg" ;;
632
633   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
634     ac_prev=srcdir ;;
635   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
636     srcdir="$ac_optarg" ;;
637
638   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
639   | --syscon | --sysco | --sysc | --sys | --sy)
640     ac_prev=sysconfdir ;;
641   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
642   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
643     sysconfdir="$ac_optarg" ;;
644
645   -target | --target | --targe | --targ | --tar | --ta | --t)
646     ac_prev=target ;;
647   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
648     target="$ac_optarg" ;;
649
650   -v | -verbose | --verbose | --verbos | --verbo | --verb)
651     verbose=yes ;;
652
653   -version | --version | --versio | --versi | --vers)
654     echo "configure generated by autoconf version 2.13.1"
655     exit 0 ;;
656
657   -with-* | --with-*)
658     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
659     # Reject names that are not valid shell variable names.
660     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
661       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
662     fi
663     ac_package=`echo $ac_package| sed 's/-/_/g'`
664     case "$ac_option" in
665       *=*) ;;
666       *) ac_optarg=yes ;;
667     esac
668     eval "with_${ac_package}='$ac_optarg'" ;;
669
670   -without-* | --without-*)
671     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
672     # Reject names that are not valid shell variable names.
673     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
674       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
675     fi
676     ac_package=`echo $ac_package| sed 's/-/_/g'`
677     eval "with_${ac_package}=no" ;;
678
679   --x)
680     # Obsolete; use --with-x.
681     with_x=yes ;;
682
683   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
684   | --x-incl | --x-inc | --x-in | --x-i)
685     ac_prev=x_includes ;;
686   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
687   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
688     x_includes="$ac_optarg" ;;
689
690   -x-libraries | --x-libraries | --x-librarie | --x-librari \
691   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
692     ac_prev=x_libraries ;;
693   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
694   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
695     x_libraries="$ac_optarg" ;;
696
697   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
698     ;;
699
700   *)
701     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
702       echo "configure: warning: $ac_option: invalid host type" 1>&2
703     fi
704     if test "x$nonopt" != xNONE; then
705       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
706     fi
707     nonopt="$ac_option"
708     ;;
709
710   esac
711 done
712
713 if test -n "$ac_prev"; then
714   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
715 fi
716
717 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
718
719 # File descriptor usage:
720 # 0 standard input
721 # 1 file creation
722 # 2 errors and warnings
723 # 3 some systems may open it to /dev/tty
724 # 4 used on the Kubota Titan
725 # 6 checking for... messages and results
726 # 5 compiler messages saved in config.log
727 if test "$silent" = yes; then
728   exec 6>/dev/null
729 else
730   exec 6>&1
731 fi
732 exec 5>./config.log
733
734 echo "\
735 This file contains any messages produced by compilers while
736 running configure, to aid debugging if configure makes a mistake.
737 " 1>&5
738
739 # Strip out --no-create and --no-recursion so they do not pile up.
740 # Also quote any args containing shell metacharacters.
741 ac_configure_args=
742 for ac_arg
743 do
744   case "$ac_arg" in
745   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
746   | --no-cr | --no-c) ;;
747   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
748   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
749   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
750   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
751   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
752   esac
753 done
754
755 # NLS nuisances.
756 # Only set these to C if already set.  These must not be set unconditionally
757 # because not all systems understand e.g. LANG=C (notably SCO).
758 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
759 # Non-C LC_CTYPE values break the ctype check.
760 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
761 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
762 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
763 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
764
765 # confdefs.h avoids OS command line length limits that DEFS can exceed.
766 rm -rf conftest* confdefs.h
767 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
768 echo > confdefs.h
769
770 # A filename unique to this package, relative to the directory that
771 # configure is in, which we can look for to find out if srcdir is correct.
772 ac_unique_file=build/version.sh
773
774 # Find the source files, if location was not specified.
775 if test -z "$srcdir"; then
776   ac_srcdir_defaulted=yes
777   # Try the directory containing this script, then its parent.
778   ac_prog=$0
779   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
780   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
781   srcdir=$ac_confdir
782   if test ! -r $srcdir/$ac_unique_file; then
783     srcdir=..
784   fi
785 else
786   ac_srcdir_defaulted=no
787 fi
788 if test ! -r $srcdir/$ac_unique_file; then
789   if test "$ac_srcdir_defaulted" = yes; then
790     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
791   else
792     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
793   fi
794 fi
795 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
796
797 # Prefer explicitly selected file to automatically selected ones.
798 if test -z "$CONFIG_SITE"; then
799   if test "x$prefix" != xNONE; then
800     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
801   else
802     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
803   fi
804 fi
805 for ac_site_file in $CONFIG_SITE; do
806   if test -r "$ac_site_file"; then
807     echo "loading site script $ac_site_file"
808     . "$ac_site_file"
809   fi
810 done
811
812
813 ac_ext=c
814 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
815 ac_cpp='$CPP $CPPFLAGS'
816 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
817 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
818 cross_compiling=$ac_cv_prog_cc_cross
819
820 ac_exeext=
821 ac_objext=o
822 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
823   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
824   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
825     ac_n= ac_c='
826 ' ac_t='        '
827   else
828     ac_n=-n ac_c= ac_t=
829   fi
830 else
831   ac_n= ac_c='\c' ac_t=
832 fi
833
834
835 # set unset (borrowed from autoconf 2.49c)
836 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
837   ol_unset=unset
838 else
839   ol_unset=false
840 fi
841 # unset CDPATH
842 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
843
844 ac_aux_dir=
845 for ac_dir in build $srcdir/build; do
846   if test -f $ac_dir/install-sh; then
847     ac_aux_dir=$ac_dir
848     ac_install_sh="$ac_aux_dir/install-sh -c"
849     break
850   elif test -f $ac_dir/install.sh; then
851     ac_aux_dir=$ac_dir
852     ac_install_sh="$ac_aux_dir/install.sh -c"
853     break
854   elif test -f $ac_dir/shtool; then
855     ac_aux_dir=$ac_dir
856     ac_install_sh="$ac_aux_dir/shtool install -c"
857     break
858   fi
859 done
860 if test -z "$ac_aux_dir"; then
861   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
862 fi
863 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
864 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
865 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
866
867 eval `$ac_aux_dir/version.sh`
868 if test -z "$OL_STRING"; then
869         { echo "configure: error: could not determine version" 1>&2; exit 1; }
870 fi
871
872 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
873         ac_cv_shtool="$ac_aux_dir/shtool"
874 else
875         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
876 fi
877
878 SHTOOL="$ac_cv_shtool"
879
880 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
881 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
882
883 OPENLDAP_CVS=""
884 if test -d $ac_aux_dir/CVS; then
885         OPENLDAP_CVS="(from CVS sources) "
886 fi
887
888 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
889
890
891 echo $ac_n "checking host system type""... $ac_c" 1>&6
892 echo "configure:893: checking host system type" >&5
893 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
894
895 # Make sure we can run config.sub.
896   if $ac_config_sub sun4 >/dev/null 2>&1; then :
897     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
898   fi
899
900   ac_cv_host_alias=$host
901   case "$ac_cv_host_alias" in
902   NONE)
903     case $nonopt in
904     NONE)
905       if ac_cv_host_alias=`$ac_config_guess`; then :
906       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
907       fi ;;
908     *) ac_cv_host_alias=$nonopt ;;
909     esac ;;
910   esac
911
912   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
913   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
914   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
915   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
916 else
917   echo $ac_n "(cached) $ac_c" 1>&6
918 fi
919
920 echo "$ac_t""$ac_cv_host" 1>&6
921
922 host=$ac_cv_host
923 host_alias=$ac_cv_host_alias
924 host_cpu=$ac_cv_host_cpu
925 host_vendor=$ac_cv_host_vendor
926 host_os=$ac_cv_host_os
927
928
929
930
931
932 echo $ac_n "checking target system type""... $ac_c" 1>&6
933 echo "configure:934: checking target system type" >&5
934 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
935
936 # Make sure we can run config.sub.
937   if $ac_config_sub sun4 >/dev/null 2>&1; then :
938     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
939   fi
940
941   ac_cv_target_alias=$target
942   case "$ac_cv_target_alias" in
943   NONE)
944     case $nonopt in
945     NONE)
946       ac_cv_target_alias=$host_alias ;;
947
948     *) ac_cv_target_alias=$nonopt ;;
949     esac ;;
950   esac
951
952   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
953   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
954   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
955   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
956 else
957   echo $ac_n "(cached) $ac_c" 1>&6
958 fi
959
960 echo "$ac_t""$ac_cv_target" 1>&6
961
962 target=$ac_cv_target
963 target_alias=$ac_cv_target_alias
964 target_cpu=$ac_cv_target_cpu
965 target_vendor=$ac_cv_target_vendor
966 target_os=$ac_cv_target_os
967
968
969
970
971
972 echo $ac_n "checking build system type""... $ac_c" 1>&6
973 echo "configure:974: checking build system type" >&5
974 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
975
976 # Make sure we can run config.sub.
977   if $ac_config_sub sun4 >/dev/null 2>&1; then :
978     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
979   fi
980
981   ac_cv_build_alias=$build
982   case "$ac_cv_build_alias" in
983   NONE)
984     case $nonopt in
985     NONE)
986       ac_cv_build_alias=$host_alias ;;
987
988     *) ac_cv_build_alias=$nonopt ;;
989     esac ;;
990   esac
991
992   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
993   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
994   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
995   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
996 else
997   echo $ac_n "(cached) $ac_c" 1>&6
998 fi
999
1000 echo "$ac_t""$ac_cv_build" 1>&6
1001
1002 build=$ac_cv_build
1003 build_alias=$ac_cv_build_alias
1004 build_cpu=$ac_cv_build_cpu
1005 build_vendor=$ac_cv_build_vendor
1006 build_os=$ac_cv_build_os
1007
1008
1009
1010
1011
1012 # Do some error checking and defaulting for the host and target type.
1013 # The inputs are:
1014 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1015 #
1016 # The rules are:
1017 # 1. You are not allowed to specify --host, --target, and nonopt at the
1018 #    same time.
1019 # 2. Host defaults to nonopt.
1020 # 3. If nonopt is not specified, then host defaults to the current host,
1021 #    as determined by config.guess.
1022 # 4. Target and build default to nonopt.
1023 # 5. If nonopt is not specified, then target and build default to host.
1024
1025 # The aliases save the names the user supplied, while $host etc.
1026 # will get canonicalized.
1027 case $host---$target---$nonopt in
1028 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1029 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1030 esac
1031
1032 test "$host_alias" != "$target_alias" &&
1033   test "$program_prefix$program_suffix$program_transform_name" = \
1034     NONENONEs,x,x, &&
1035   program_prefix=${target_alias}-
1036
1037
1038 # Find a good install program.  We prefer a C program (faster),
1039 # so one script is as good as another.  But avoid the broken or
1040 # incompatible versions:
1041 # SysV /etc/install, /usr/sbin/install
1042 # SunOS /usr/etc/install
1043 # IRIX /sbin/install
1044 # AIX /bin/install
1045 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1046 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1047 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1048 # ./install, which can be erroneously created by make from ./install.sh.
1049 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1050 echo "configure:1051: checking for a BSD compatible install" >&5
1051 if test -z "$INSTALL"; then
1052 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1053   echo $ac_n "(cached) $ac_c" 1>&6
1054 else
1055     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1056   for ac_dir in $PATH; do
1057     # Account for people who put trailing slashes in PATH elements.
1058     case "$ac_dir/" in
1059     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1060     *)
1061       # OSF1 and SCO ODT 3.0 have their own names for install.
1062       # Don't use installbsd from OSF since it installs stuff as root
1063       # by default.
1064       for ac_prog in ginstall scoinst install; do
1065         if test -f $ac_dir/$ac_prog; then
1066           if test $ac_prog = install &&
1067             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1068             # AIX install.  It has an incompatible calling convention.
1069             :
1070           elif test $ac_prog = install &&
1071             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1072             # program-specific install script used by HP pwplus--don't use.
1073             :
1074           else
1075             ac_cv_path_install="$ac_dir/$ac_prog -c"
1076             break 2
1077           fi
1078         fi
1079       done
1080       ;;
1081     esac
1082   done
1083   IFS="$ac_save_IFS"
1084
1085 fi
1086   if test "${ac_cv_path_install+set}" = set; then
1087     INSTALL="$ac_cv_path_install"
1088   else
1089     # As a last resort, use the slow shell script.  We don't cache a
1090     # path for INSTALL within a source directory, because that will
1091     # break other packages using the cache if that directory is
1092     # removed, or if the path is relative.
1093     INSTALL="$ac_install_sh"
1094   fi
1095 fi
1096 echo "$ac_t""$INSTALL" 1>&6
1097
1098 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1099 # It thinks the first close brace ends the variable substitution.
1100 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1101
1102 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1103
1104 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1105
1106 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1107 echo "configure:1108: checking whether build environment is sane" >&5
1108 # Just in case
1109 sleep 1
1110 echo timestamp > conftestfile
1111 # Do `set' in a subshell so we don't clobber the current shell's
1112 # arguments.  Must try -L first in case configure is actually a
1113 # symlink; some systems play weird games with the mod time of symlinks
1114 # (eg FreeBSD returns the mod time of the symlink's containing
1115 # directory).
1116 if (
1117    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1118    if test "$*" = "X"; then
1119       # -L didn't work.
1120       set X `ls -t $srcdir/configure conftestfile`
1121    fi
1122    if test "$*" != "X $srcdir/configure conftestfile" \
1123       && test "$*" != "X conftestfile $srcdir/configure"; then
1124
1125       # If neither matched, then we have a broken ls.  This can happen
1126       # if, for instance, CONFIG_SHELL is bash and it inherits a
1127       # broken ls alias from the environment.  This has actually
1128       # happened.  Such a system could not be considered "sane".
1129       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1130 alias in your environment" 1>&2; exit 1; }
1131    fi
1132
1133    test "$2" = conftestfile
1134    )
1135 then
1136    # Ok.
1137    :
1138 else
1139    { echo "configure: error: newly created file is older than distributed files!
1140 Check your system clock" 1>&2; exit 1; }
1141 fi
1142 rm -f conftest*
1143 echo "$ac_t""yes" 1>&6
1144 if test "$program_transform_name" = s,x,x,; then
1145   program_transform_name=
1146 else
1147   # Double any \ or $.  echo might interpret backslashes.
1148   cat <<\EOF_SED > conftestsed
1149 s,\\,\\\\,g; s,\$,$$,g
1150 EOF_SED
1151   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1152   rm -f conftestsed
1153 fi
1154 test "$program_prefix" != NONE &&
1155   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1156 # Use a double $ so make ignores it.
1157 test "$program_suffix" != NONE &&
1158   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1159
1160 # sed with no file args requires a program.
1161 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1162
1163 for ac_prog in mawk gawk nawk awk
1164 do
1165 # Extract the first word of "$ac_prog", so it can be a program name with args.
1166 set dummy $ac_prog; ac_word=$2
1167 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1168 echo "configure:1169: checking for $ac_word" >&5
1169 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1170   echo $ac_n "(cached) $ac_c" 1>&6
1171 else
1172   if test -n "$AWK"; then
1173   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1174 else
1175   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1176   ac_dummy="$PATH"
1177   for ac_dir in $ac_dummy; do
1178     test -z "$ac_dir" && ac_dir=.
1179     if test -f $ac_dir/$ac_word; then
1180       ac_cv_prog_AWK="$ac_prog"
1181       break
1182     fi
1183   done
1184   IFS="$ac_save_ifs"
1185 fi
1186 fi
1187 AWK="$ac_cv_prog_AWK"
1188 if test -n "$AWK"; then
1189   echo "$ac_t""$AWK" 1>&6
1190 else
1191   echo "$ac_t""no" 1>&6
1192 fi
1193
1194 test -n "$AWK" && break
1195 done
1196
1197 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1198 echo "configure:1199: checking whether ${MAKE-make} sets \${MAKE}" >&5
1199 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1200 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1201   echo $ac_n "(cached) $ac_c" 1>&6
1202 else
1203   cat > conftestmake <<\EOF
1204 all:
1205         @echo 'ac_maketemp="${MAKE}"'
1206 EOF
1207 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1208 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1209 if test -n "$ac_maketemp"; then
1210   eval ac_cv_prog_make_${ac_make}_set=yes
1211 else
1212   eval ac_cv_prog_make_${ac_make}_set=no
1213 fi
1214 rm -f conftestmake
1215 fi
1216 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1217   echo "$ac_t""yes" 1>&6
1218   SET_MAKE=
1219 else
1220   echo "$ac_t""no" 1>&6
1221   SET_MAKE="MAKE=${MAKE-make}"
1222 fi
1223
1224
1225
1226 PACKAGE=$OL_PACKAGE
1227
1228 VERSION=$OL_VERSION
1229
1230 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1231   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1232 fi
1233
1234
1235
1236 missing_dir=`cd $ac_aux_dir && pwd`
1237 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1238 echo "configure:1239: checking for working aclocal" >&5
1239 # Run test in a subshell; some versions of sh will print an error if
1240 # an executable is not found, even if stderr is redirected.
1241 # Redirect stdin to placate older versions of autoconf.  Sigh.
1242 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1243    ACLOCAL=aclocal
1244    echo "$ac_t""found" 1>&6
1245 else
1246    ACLOCAL="$missing_dir/missing aclocal"
1247    echo "$ac_t""missing" 1>&6
1248 fi
1249
1250 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1251 echo "configure:1252: checking for working autoconf" >&5
1252 # Run test in a subshell; some versions of sh will print an error if
1253 # an executable is not found, even if stderr is redirected.
1254 # Redirect stdin to placate older versions of autoconf.  Sigh.
1255 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1256    AUTOCONF=autoconf
1257    echo "$ac_t""found" 1>&6
1258 else
1259    AUTOCONF="$missing_dir/missing autoconf"
1260    echo "$ac_t""missing" 1>&6
1261 fi
1262
1263 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1264 echo "configure:1265: checking for working automake" >&5
1265 # Run test in a subshell; some versions of sh will print an error if
1266 # an executable is not found, even if stderr is redirected.
1267 # Redirect stdin to placate older versions of autoconf.  Sigh.
1268 if (automake --version) < /dev/null > /dev/null 2>&1; then
1269    AUTOMAKE=automake
1270    echo "$ac_t""found" 1>&6
1271 else
1272    AUTOMAKE="$missing_dir/missing automake"
1273    echo "$ac_t""missing" 1>&6
1274 fi
1275
1276 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1277 echo "configure:1278: checking for working autoheader" >&5
1278 # Run test in a subshell; some versions of sh will print an error if
1279 # an executable is not found, even if stderr is redirected.
1280 # Redirect stdin to placate older versions of autoconf.  Sigh.
1281 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1282    AUTOHEADER=autoheader
1283    echo "$ac_t""found" 1>&6
1284 else
1285    AUTOHEADER="$missing_dir/missing autoheader"
1286    echo "$ac_t""missing" 1>&6
1287 fi
1288
1289 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1290 echo "configure:1291: checking for working makeinfo" >&5
1291 # Run test in a subshell; some versions of sh will print an error if
1292 # an executable is not found, even if stderr is redirected.
1293 # Redirect stdin to placate older versions of autoconf.  Sigh.
1294 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1295    MAKEINFO=makeinfo
1296    echo "$ac_t""found" 1>&6
1297 else
1298    MAKEINFO="$missing_dir/missing makeinfo"
1299    echo "$ac_t""missing" 1>&6
1300 fi
1301
1302 install_sh="$missing_dir/install-sh"
1303 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1304
1305 for ac_prog in gnutar gtar tar
1306 do
1307 # Extract the first word of "$ac_prog", so it can be a program name with args.
1308 set dummy $ac_prog; ac_word=$2
1309 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1310 echo "configure:1311: checking for $ac_word" >&5
1311 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1312   echo $ac_n "(cached) $ac_c" 1>&6
1313 else
1314   if test -n "$AMTAR"; then
1315   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1316 else
1317   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1318   ac_dummy="$PATH"
1319   for ac_dir in $ac_dummy; do
1320     test -z "$ac_dir" && ac_dir=.
1321     if test -f $ac_dir/$ac_word; then
1322       ac_cv_prog_AMTAR="$ac_prog"
1323       break
1324     fi
1325   done
1326   IFS="$ac_save_ifs"
1327 fi
1328 fi
1329 AMTAR="$ac_cv_prog_AMTAR"
1330 if test -n "$AMTAR"; then
1331   echo "$ac_t""$AMTAR" 1>&6
1332 else
1333   echo "$ac_t""no" 1>&6
1334 fi
1335
1336 test -n "$AMTAR" && break
1337 done
1338
1339
1340 AMTARFLAGS=
1341 if test -n "$AMTAR"; then
1342   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1343         AMTARFLAGS=o
1344   fi
1345 fi
1346
1347 cat >> confdefs.h <<EOF
1348 #define OPENLDAP_PACKAGE "$PACKAGE"
1349 EOF
1350
1351 cat >> confdefs.h <<EOF
1352 #define OPENLDAP_VERSION "$VERSION"
1353 EOF
1354
1355
1356 cat >> confdefs.h <<EOF
1357 #define LDAP_VENDOR_VERSION $OL_API_INC
1358 EOF
1359
1360 cat >> confdefs.h <<EOF
1361 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1362 EOF
1363
1364 cat >> confdefs.h <<EOF
1365 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1366 EOF
1367
1368 cat >> confdefs.h <<EOF
1369 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1370 EOF
1371
1372
1373 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1374
1375 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1376
1377 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1378
1379
1380
1381 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1382 echo "configure:1383: checking configure arguments" >&5
1383
1384
1385 top_builddir=`pwd`
1386
1387 ldap_subdir="/openldap"
1388
1389 # Check whether --with-subdir or --without-subdir was given.
1390 if test "${with_subdir+set}" = set; then
1391   withval="$with_subdir"
1392   case "$withval" in
1393         no) ldap_subdir=""
1394                 ;;
1395         yes)
1396                 ;;
1397         /*|\\*)
1398                 ldap_subdir="$withval"
1399                 ;;
1400         *)
1401                 ldap_subdir="/$withval"
1402                 ;;
1403 esac
1404
1405 fi
1406
1407
1408 # OpenLDAP --enable-debug
1409         # Check whether --enable-debug or --disable-debug was given.
1410 if test "${enable_debug+set}" = set; then
1411   enableval="$enable_debug"
1412   
1413         ol_arg=invalid
1414         for ol_val in auto yes no ; do
1415                 if test "$enableval" = "$ol_val" ; then
1416                         ol_arg="$ol_val"
1417                 fi
1418         done
1419         if test "$ol_arg" = "invalid" ; then
1420                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1421         fi
1422         ol_enable_debug="$ol_arg"
1423
1424 else
1425         ol_enable_debug="yes"
1426 fi
1427 # end --enable-debug
1428 # OpenLDAP --enable-dynamic
1429         # Check whether --enable-dynamic or --disable-dynamic was given.
1430 if test "${enable_dynamic+set}" = set; then
1431   enableval="$enable_dynamic"
1432   
1433         ol_arg=invalid
1434         for ol_val in auto yes no ; do
1435                 if test "$enableval" = "$ol_val" ; then
1436                         ol_arg="$ol_val"
1437                 fi
1438         done
1439         if test "$ol_arg" = "invalid" ; then
1440                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1441         fi
1442         ol_enable_dynamic="$ol_arg"
1443
1444 else
1445         ol_enable_dynamic="no"
1446 fi
1447 # end --enable-dynamic
1448 # OpenLDAP --enable-syslog
1449         # Check whether --enable-syslog or --disable-syslog was given.
1450 if test "${enable_syslog+set}" = set; then
1451   enableval="$enable_syslog"
1452   
1453         ol_arg=invalid
1454         for ol_val in auto yes no ; do
1455                 if test "$enableval" = "$ol_val" ; then
1456                         ol_arg="$ol_val"
1457                 fi
1458         done
1459         if test "$ol_arg" = "invalid" ; then
1460                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1461         fi
1462         ol_enable_syslog="$ol_arg"
1463
1464 else
1465         ol_enable_syslog="auto"
1466 fi
1467 # end --enable-syslog
1468 # OpenLDAP --enable-proctitle
1469         # Check whether --enable-proctitle or --disable-proctitle was given.
1470 if test "${enable_proctitle+set}" = set; then
1471   enableval="$enable_proctitle"
1472   
1473         ol_arg=invalid
1474         for ol_val in auto yes no ; do
1475                 if test "$enableval" = "$ol_val" ; then
1476                         ol_arg="$ol_val"
1477                 fi
1478         done
1479         if test "$ol_arg" = "invalid" ; then
1480                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1481         fi
1482         ol_enable_proctitle="$ol_arg"
1483
1484 else
1485         ol_enable_proctitle="yes"
1486 fi
1487 # end --enable-proctitle
1488 ol_enable_referrals=${ol_enable_referrals-no}
1489 ol_enable_kbind=${ol_enable_kbind-no}
1490 # OpenLDAP --enable-ipv6
1491         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1492 if test "${enable_ipv6+set}" = set; then
1493   enableval="$enable_ipv6"
1494   
1495         ol_arg=invalid
1496         for ol_val in auto yes no ; do
1497                 if test "$enableval" = "$ol_val" ; then
1498                         ol_arg="$ol_val"
1499                 fi
1500         done
1501         if test "$ol_arg" = "invalid" ; then
1502                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1503         fi
1504         ol_enable_ipv6="$ol_arg"
1505
1506 else
1507         ol_enable_ipv6="auto"
1508 fi
1509 # end --enable-ipv6
1510 # OpenLDAP --enable-local
1511         # Check whether --enable-local or --disable-local was given.
1512 if test "${enable_local+set}" = set; then
1513   enableval="$enable_local"
1514   
1515         ol_arg=invalid
1516         for ol_val in auto yes no ; do
1517                 if test "$enableval" = "$ol_val" ; then
1518                         ol_arg="$ol_val"
1519                 fi
1520         done
1521         if test "$ol_arg" = "invalid" ; then
1522                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1523         fi
1524         ol_enable_local="$ol_arg"
1525
1526 else
1527         ol_enable_local="auto"
1528 fi
1529 # end --enable-local
1530
1531
1532 # OpenLDAP --with-cyrus_sasl
1533         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1534 if test "${with_cyrus_sasl+set}" = set; then
1535   withval="$with_cyrus_sasl"
1536   
1537         ol_arg=invalid
1538         for ol_val in auto yes no  ; do
1539                 if test "$withval" = "$ol_val" ; then
1540                         ol_arg="$ol_val"
1541                 fi
1542         done
1543         if test "$ol_arg" = "invalid" ; then
1544                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1545         fi
1546         ol_with_cyrus_sasl="$ol_arg"
1547
1548 else
1549         ol_with_cyrus_sasl="auto"
1550 fi
1551 # end --with-cyrus_sasl
1552
1553 # OpenLDAP --with-fetch
1554         # Check whether --with-fetch or --without-fetch was given.
1555 if test "${with_fetch+set}" = set; then
1556   withval="$with_fetch"
1557   
1558         ol_arg=invalid
1559         for ol_val in auto yes no  ; do
1560                 if test "$withval" = "$ol_val" ; then
1561                         ol_arg="$ol_val"
1562                 fi
1563         done
1564         if test "$ol_arg" = "invalid" ; then
1565                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1566         fi
1567         ol_with_fetch="$ol_arg"
1568
1569 else
1570         ol_with_fetch="auto"
1571 fi
1572 # end --with-fetch
1573
1574 ol_with_kerberos=${ol_with_kerberos-auto}
1575 # OpenLDAP --with-threads
1576         # Check whether --with-threads or --without-threads was given.
1577 if test "${with_threads+set}" = set; then
1578   withval="$with_threads"
1579   
1580         ol_arg=invalid
1581         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1582                 if test "$withval" = "$ol_val" ; then
1583                         ol_arg="$ol_val"
1584                 fi
1585         done
1586         if test "$ol_arg" = "invalid" ; then
1587                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1588         fi
1589         ol_with_threads="$ol_arg"
1590
1591 else
1592         ol_with_threads="auto"
1593 fi
1594 # end --with-threads
1595
1596 # OpenLDAP --with-tls
1597         # Check whether --with-tls or --without-tls was given.
1598 if test "${with_tls+set}" = set; then
1599   withval="$with_tls"
1600   
1601         ol_arg=invalid
1602         for ol_val in auto ssleay openssl yes no  ; do
1603                 if test "$withval" = "$ol_val" ; then
1604                         ol_arg="$ol_val"
1605                 fi
1606         done
1607         if test "$ol_arg" = "invalid" ; then
1608                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1609         fi
1610         ol_with_tls="$ol_arg"
1611
1612 else
1613         ol_with_tls="auto"
1614 fi
1615 # end --with-tls
1616
1617 # OpenLDAP --with-yielding_select
1618         # Check whether --with-yielding_select or --without-yielding_select was given.
1619 if test "${with_yielding_select+set}" = set; then
1620   withval="$with_yielding_select"
1621   
1622         ol_arg=invalid
1623         for ol_val in auto yes no manual  ; do
1624                 if test "$withval" = "$ol_val" ; then
1625                         ol_arg="$ol_val"
1626                 fi
1627         done
1628         if test "$ol_arg" = "invalid" ; then
1629                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1630         fi
1631         ol_with_yielding_select="$ol_arg"
1632
1633 else
1634         ol_with_yielding_select="auto"
1635 fi
1636 # end --with-yielding_select
1637
1638 # OpenLDAP --with-multiple_precision
1639         # Check whether --with-multiple_precision or --without-multiple_precision was given.
1640 if test "${with_multiple_precision+set}" = set; then
1641   withval="$with_multiple_precision"
1642   
1643         ol_arg=invalid
1644         for ol_val in auto bignum gmp yes no  ; do
1645                 if test "$withval" = "$ol_val" ; then
1646                         ol_arg="$ol_val"
1647                 fi
1648         done
1649         if test "$ol_arg" = "invalid" ; then
1650                 { echo "configure: error: bad value $withval for --with-multiple_precision" 1>&2; exit 1; }
1651         fi
1652         ol_with_multiple_precision="$ol_arg"
1653
1654 else
1655         ol_with_multiple_precision="auto"
1656 fi
1657 # end --with-multiple_precision
1658
1659
1660
1661 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1662 if test "${with_xxslapdoptions+set}" = set; then
1663   withval="$with_xxslapdoptions"
1664   :
1665 fi
1666
1667 # OpenLDAP --enable-slapd
1668         # Check whether --enable-slapd or --disable-slapd was given.
1669 if test "${enable_slapd+set}" = set; then
1670   enableval="$enable_slapd"
1671   
1672         ol_arg=invalid
1673         for ol_val in auto yes no ; do
1674                 if test "$enableval" = "$ol_val" ; then
1675                         ol_arg="$ol_val"
1676                 fi
1677         done
1678         if test "$ol_arg" = "invalid" ; then
1679                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1680         fi
1681         ol_enable_slapd="$ol_arg"
1682
1683 else
1684         ol_enable_slapd="yes"
1685 fi
1686 # end --enable-slapd
1687 # OpenLDAP --enable-aci
1688         # Check whether --enable-aci or --disable-aci was given.
1689 if test "${enable_aci+set}" = set; then
1690   enableval="$enable_aci"
1691   
1692         ol_arg=invalid
1693         for ol_val in auto yes no ; do
1694                 if test "$enableval" = "$ol_val" ; then
1695                         ol_arg="$ol_val"
1696                 fi
1697         done
1698         if test "$ol_arg" = "invalid" ; then
1699                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1700         fi
1701         ol_enable_aci="$ol_arg"
1702
1703 else
1704         ol_enable_aci="no"
1705 fi
1706 # end --enable-aci
1707 # OpenLDAP --enable-cleartext
1708         # Check whether --enable-cleartext or --disable-cleartext was given.
1709 if test "${enable_cleartext+set}" = set; then
1710   enableval="$enable_cleartext"
1711   
1712         ol_arg=invalid
1713         for ol_val in auto yes no ; do
1714                 if test "$enableval" = "$ol_val" ; then
1715                         ol_arg="$ol_val"
1716                 fi
1717         done
1718         if test "$ol_arg" = "invalid" ; then
1719                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1720         fi
1721         ol_enable_cleartext="$ol_arg"
1722
1723 else
1724         ol_enable_cleartext="yes"
1725 fi
1726 # end --enable-cleartext
1727 # OpenLDAP --enable-crypt
1728         # Check whether --enable-crypt or --disable-crypt was given.
1729 if test "${enable_crypt+set}" = set; then
1730   enableval="$enable_crypt"
1731   
1732         ol_arg=invalid
1733         for ol_val in auto yes no ; do
1734                 if test "$enableval" = "$ol_val" ; then
1735                         ol_arg="$ol_val"
1736                 fi
1737         done
1738         if test "$ol_arg" = "invalid" ; then
1739                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1740         fi
1741         ol_enable_crypt="$ol_arg"
1742
1743 else
1744         ol_enable_crypt="no"
1745 fi
1746 # end --enable-crypt
1747 # OpenLDAP --enable-lmpasswd
1748         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1749 if test "${enable_lmpasswd+set}" = set; then
1750   enableval="$enable_lmpasswd"
1751   
1752         ol_arg=invalid
1753         for ol_val in auto yes no ; do
1754                 if test "$enableval" = "$ol_val" ; then
1755                         ol_arg="$ol_val"
1756                 fi
1757         done
1758         if test "$ol_arg" = "invalid" ; then
1759                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1760         fi
1761         ol_enable_lmpasswd="$ol_arg"
1762
1763 else
1764         ol_enable_lmpasswd="no"
1765 fi
1766 # end --enable-lmpasswd
1767 # OpenLDAP --enable-spasswd
1768         # Check whether --enable-spasswd or --disable-spasswd was given.
1769 if test "${enable_spasswd+set}" = set; then
1770   enableval="$enable_spasswd"
1771   
1772         ol_arg=invalid
1773         for ol_val in auto yes no ; do
1774                 if test "$enableval" = "$ol_val" ; then
1775                         ol_arg="$ol_val"
1776                 fi
1777         done
1778         if test "$ol_arg" = "invalid" ; then
1779                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1780         fi
1781         ol_enable_spasswd="$ol_arg"
1782
1783 else
1784         ol_enable_spasswd="no"
1785 fi
1786 # end --enable-spasswd
1787 # OpenLDAP --enable-modules
1788         # Check whether --enable-modules or --disable-modules was given.
1789 if test "${enable_modules+set}" = set; then
1790   enableval="$enable_modules"
1791   
1792         ol_arg=invalid
1793         for ol_val in auto yes no ; do
1794                 if test "$enableval" = "$ol_val" ; then
1795                         ol_arg="$ol_val"
1796                 fi
1797         done
1798         if test "$ol_arg" = "invalid" ; then
1799                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1800         fi
1801         ol_enable_modules="$ol_arg"
1802
1803 else
1804         ol_enable_modules="no"
1805 fi
1806 # end --enable-modules
1807 ol_enable_multimaster=${ol_enable_multimaster-no}
1808 # OpenLDAP --enable-rewrite
1809         # Check whether --enable-rewrite or --disable-rewrite was given.
1810 if test "${enable_rewrite+set}" = set; then
1811   enableval="$enable_rewrite"
1812   
1813         ol_arg=invalid
1814         for ol_val in auto yes no ; do
1815                 if test "$enableval" = "$ol_val" ; then
1816                         ol_arg="$ol_val"
1817                 fi
1818         done
1819         if test "$ol_arg" = "invalid" ; then
1820                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1821         fi
1822         ol_enable_rewrite="$ol_arg"
1823
1824 else
1825         ol_enable_rewrite="auto"
1826 fi
1827 # end --enable-rewrite
1828 # OpenLDAP --enable-rlookups
1829         # Check whether --enable-rlookups or --disable-rlookups was given.
1830 if test "${enable_rlookups+set}" = set; then
1831   enableval="$enable_rlookups"
1832   
1833         ol_arg=invalid
1834         for ol_val in auto yes no ; do
1835                 if test "$enableval" = "$ol_val" ; then
1836                         ol_arg="$ol_val"
1837                 fi
1838         done
1839         if test "$ol_arg" = "invalid" ; then
1840                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1841         fi
1842         ol_enable_rlookups="$ol_arg"
1843
1844 else
1845         ol_enable_rlookups="no"
1846 fi
1847 # end --enable-rlookups
1848 # OpenLDAP --enable-slapi
1849         # Check whether --enable-slapi or --disable-slapi was given.
1850 if test "${enable_slapi+set}" = set; then
1851   enableval="$enable_slapi"
1852   
1853         ol_arg=invalid
1854         for ol_val in auto yes no ; do
1855                 if test "$enableval" = "$ol_val" ; then
1856                         ol_arg="$ol_val"
1857                 fi
1858         done
1859         if test "$ol_arg" = "invalid" ; then
1860                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1861         fi
1862         ol_enable_slapi="$ol_arg"
1863
1864 else
1865         ol_enable_slapi="no"
1866 fi
1867 # end --enable-slapi
1868 # OpenLDAP --enable-slp
1869         # Check whether --enable-slp or --disable-slp was given.
1870 if test "${enable_slp+set}" = set; then
1871   enableval="$enable_slp"
1872   
1873         ol_arg=invalid
1874         for ol_val in auto yes no ; do
1875                 if test "$enableval" = "$ol_val" ; then
1876                         ol_arg="$ol_val"
1877                 fi
1878         done
1879         if test "$ol_arg" = "invalid" ; then
1880                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1881         fi
1882         ol_enable_slp="$ol_arg"
1883
1884 else
1885         ol_enable_slp="no"
1886 fi
1887 # end --enable-slp
1888 # OpenLDAP --enable-wrappers
1889         # Check whether --enable-wrappers or --disable-wrappers was given.
1890 if test "${enable_wrappers+set}" = set; then
1891   enableval="$enable_wrappers"
1892   
1893         ol_arg=invalid
1894         for ol_val in auto yes no ; do
1895                 if test "$enableval" = "$ol_val" ; then
1896                         ol_arg="$ol_val"
1897                 fi
1898         done
1899         if test "$ol_arg" = "invalid" ; then
1900                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1901         fi
1902         ol_enable_wrappers="$ol_arg"
1903
1904 else
1905         ol_enable_wrappers="no"
1906 fi
1907 # end --enable-wrappers
1908
1909 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1910         passwd perl relay shell sql"
1911
1912 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1913 if test "${with_xxslapbackends+set}" = set; then
1914   withval="$with_xxslapbackends"
1915   :
1916 fi
1917
1918
1919 # OpenLDAP --enable-backends
1920         # Check whether --enable-backends or --disable-backends was given.
1921 if test "${enable_backends+set}" = set; then
1922   enableval="$enable_backends"
1923   
1924         ol_arg=invalid
1925         for ol_val in no yes mod ; do
1926                 if test "$enableval" = "$ol_val" ; then
1927                         ol_arg="$ol_val"
1928                 fi
1929         done
1930         if test "$ol_arg" = "invalid" ; then
1931                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1932         fi
1933         ol_enable_backends="$ol_arg"
1934
1935 else
1936         ol_enable_backends="no"
1937 fi
1938 # end --enable-backends
1939 # OpenLDAP --enable-bdb
1940         # Check whether --enable-bdb or --disable-bdb was given.
1941 if test "${enable_bdb+set}" = set; then
1942   enableval="$enable_bdb"
1943   
1944         ol_arg=invalid
1945         for ol_val in no yes mod ; do
1946                 if test "$enableval" = "$ol_val" ; then
1947                         ol_arg="$ol_val"
1948                 fi
1949         done
1950         if test "$ol_arg" = "invalid" ; then
1951                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1952         fi
1953         ol_enable_bdb="$ol_arg"
1954
1955 else
1956         ol_enable_bdb="yes"
1957 fi
1958 # end --enable-bdb
1959 # OpenLDAP --enable-dnssrv
1960         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1961 if test "${enable_dnssrv+set}" = set; then
1962   enableval="$enable_dnssrv"
1963   
1964         ol_arg=invalid
1965         for ol_val in no yes mod ; do
1966                 if test "$enableval" = "$ol_val" ; then
1967                         ol_arg="$ol_val"
1968                 fi
1969         done
1970         if test "$ol_arg" = "invalid" ; then
1971                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1972         fi
1973         ol_enable_dnssrv="$ol_arg"
1974
1975 else
1976         ol_enable_dnssrv="no"
1977 fi
1978 # end --enable-dnssrv
1979 # OpenLDAP --enable-hdb
1980         # Check whether --enable-hdb or --disable-hdb was given.
1981 if test "${enable_hdb+set}" = set; then
1982   enableval="$enable_hdb"
1983   
1984         ol_arg=invalid
1985         for ol_val in no yes mod ; do
1986                 if test "$enableval" = "$ol_val" ; then
1987                         ol_arg="$ol_val"
1988                 fi
1989         done
1990         if test "$ol_arg" = "invalid" ; then
1991                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1992         fi
1993         ol_enable_hdb="$ol_arg"
1994
1995 else
1996         ol_enable_hdb="no"
1997 fi
1998 # end --enable-hdb
1999 # OpenLDAP --enable-ldap
2000         # Check whether --enable-ldap or --disable-ldap was given.
2001 if test "${enable_ldap+set}" = set; then
2002   enableval="$enable_ldap"
2003   
2004         ol_arg=invalid
2005         for ol_val in no yes mod ; do
2006                 if test "$enableval" = "$ol_val" ; then
2007                         ol_arg="$ol_val"
2008                 fi
2009         done
2010         if test "$ol_arg" = "invalid" ; then
2011                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2012         fi
2013         ol_enable_ldap="$ol_arg"
2014
2015 else
2016         ol_enable_ldap="no"
2017 fi
2018 # end --enable-ldap
2019 # OpenLDAP --enable-ldbm
2020         # Check whether --enable-ldbm or --disable-ldbm was given.
2021 if test "${enable_ldbm+set}" = set; then
2022   enableval="$enable_ldbm"
2023   
2024         ol_arg=invalid
2025         for ol_val in no yes mod ; do
2026                 if test "$enableval" = "$ol_val" ; then
2027                         ol_arg="$ol_val"
2028                 fi
2029         done
2030         if test "$ol_arg" = "invalid" ; then
2031                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2032         fi
2033         ol_enable_ldbm="$ol_arg"
2034
2035 else
2036         ol_enable_ldbm="no"
2037 fi
2038 # end --enable-ldbm
2039 # OpenLDAP --with-ldbm_api
2040         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2041 if test "${with_ldbm_api+set}" = set; then
2042   withval="$with_ldbm_api"
2043   
2044         ol_arg=invalid
2045         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2046                 if test "$withval" = "$ol_val" ; then
2047                         ol_arg="$ol_val"
2048                 fi
2049         done
2050         if test "$ol_arg" = "invalid" ; then
2051                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2052         fi
2053         ol_with_ldbm_api="$ol_arg"
2054
2055 else
2056         ol_with_ldbm_api="auto"
2057 fi
2058 # end --with-ldbm_api
2059
2060 # OpenLDAP --with-ldbm_type
2061         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2062 if test "${with_ldbm_type+set}" = set; then
2063   withval="$with_ldbm_type"
2064   
2065         ol_arg=invalid
2066         for ol_val in auto btree hash ; do
2067                 if test "$withval" = "$ol_val" ; then
2068                         ol_arg="$ol_val"
2069                 fi
2070         done
2071         if test "$ol_arg" = "invalid" ; then
2072                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2073         fi
2074         ol_with_ldbm_type="$ol_arg"
2075
2076 else
2077         ol_with_ldbm_type="auto"
2078 fi
2079 # end --with-ldbm_type
2080
2081 # OpenLDAP --enable-meta
2082         # Check whether --enable-meta or --disable-meta was given.
2083 if test "${enable_meta+set}" = set; then
2084   enableval="$enable_meta"
2085   
2086         ol_arg=invalid
2087         for ol_val in no yes mod ; do
2088                 if test "$enableval" = "$ol_val" ; then
2089                         ol_arg="$ol_val"
2090                 fi
2091         done
2092         if test "$ol_arg" = "invalid" ; then
2093                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2094         fi
2095         ol_enable_meta="$ol_arg"
2096
2097 else
2098         ol_enable_meta="no"
2099 fi
2100 # end --enable-meta
2101 # OpenLDAP --enable-monitor
2102         # Check whether --enable-monitor or --disable-monitor was given.
2103 if test "${enable_monitor+set}" = set; then
2104   enableval="$enable_monitor"
2105   
2106         ol_arg=invalid
2107         for ol_val in no yes mod ; do
2108                 if test "$enableval" = "$ol_val" ; then
2109                         ol_arg="$ol_val"
2110                 fi
2111         done
2112         if test "$ol_arg" = "invalid" ; then
2113                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2114         fi
2115         ol_enable_monitor="$ol_arg"
2116
2117 else
2118         ol_enable_monitor="yes"
2119 fi
2120 # end --enable-monitor
2121 # OpenLDAP --enable-null
2122         # Check whether --enable-null or --disable-null was given.
2123 if test "${enable_null+set}" = set; then
2124   enableval="$enable_null"
2125   
2126         ol_arg=invalid
2127         for ol_val in no yes mod ; do
2128                 if test "$enableval" = "$ol_val" ; then
2129                         ol_arg="$ol_val"
2130                 fi
2131         done
2132         if test "$ol_arg" = "invalid" ; then
2133                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2134         fi
2135         ol_enable_null="$ol_arg"
2136
2137 else
2138         ol_enable_null="no"
2139 fi
2140 # end --enable-null
2141 # OpenLDAP --enable-passwd
2142         # Check whether --enable-passwd or --disable-passwd was given.
2143 if test "${enable_passwd+set}" = set; then
2144   enableval="$enable_passwd"
2145   
2146         ol_arg=invalid
2147         for ol_val in no yes mod ; do
2148                 if test "$enableval" = "$ol_val" ; then
2149                         ol_arg="$ol_val"
2150                 fi
2151         done
2152         if test "$ol_arg" = "invalid" ; then
2153                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2154         fi
2155         ol_enable_passwd="$ol_arg"
2156
2157 else
2158         ol_enable_passwd="no"
2159 fi
2160 # end --enable-passwd
2161 # OpenLDAP --enable-perl
2162         # Check whether --enable-perl or --disable-perl was given.
2163 if test "${enable_perl+set}" = set; then
2164   enableval="$enable_perl"
2165   
2166         ol_arg=invalid
2167         for ol_val in no yes mod ; do
2168                 if test "$enableval" = "$ol_val" ; then
2169                         ol_arg="$ol_val"
2170                 fi
2171         done
2172         if test "$ol_arg" = "invalid" ; then
2173                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2174         fi
2175         ol_enable_perl="$ol_arg"
2176
2177 else
2178         ol_enable_perl="no"
2179 fi
2180 # end --enable-perl
2181 # OpenLDAP --enable-relay
2182         # Check whether --enable-relay or --disable-relay was given.
2183 if test "${enable_relay+set}" = set; then
2184   enableval="$enable_relay"
2185   
2186         ol_arg=invalid
2187         for ol_val in no yes mod ; do
2188                 if test "$enableval" = "$ol_val" ; then
2189                         ol_arg="$ol_val"
2190                 fi
2191         done
2192         if test "$ol_arg" = "invalid" ; then
2193                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2194         fi
2195         ol_enable_relay="$ol_arg"
2196
2197 else
2198         ol_enable_relay="yes"
2199 fi
2200 # end --enable-relay
2201 # OpenLDAP --enable-shell
2202         # Check whether --enable-shell or --disable-shell was given.
2203 if test "${enable_shell+set}" = set; then
2204   enableval="$enable_shell"
2205   
2206         ol_arg=invalid
2207         for ol_val in no yes mod ; do
2208                 if test "$enableval" = "$ol_val" ; then
2209                         ol_arg="$ol_val"
2210                 fi
2211         done
2212         if test "$ol_arg" = "invalid" ; then
2213                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2214         fi
2215         ol_enable_shell="$ol_arg"
2216
2217 else
2218         ol_enable_shell="no"
2219 fi
2220 # end --enable-shell
2221 # OpenLDAP --enable-sql
2222         # Check whether --enable-sql or --disable-sql was given.
2223 if test "${enable_sql+set}" = set; then
2224   enableval="$enable_sql"
2225   
2226         ol_arg=invalid
2227         for ol_val in no yes mod ; do
2228                 if test "$enableval" = "$ol_val" ; then
2229                         ol_arg="$ol_val"
2230                 fi
2231         done
2232         if test "$ol_arg" = "invalid" ; then
2233                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2234         fi
2235         ol_enable_sql="$ol_arg"
2236
2237 else
2238         ol_enable_sql="no"
2239 fi
2240 # end --enable-sql
2241
2242 Overlays="denyop dyngroup glue lastmod ppolicy proxycache rwm \
2243         refint syncprov translucent unique"
2244
2245 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2246 if test "${with_xxslapoverlays+set}" = set; then
2247   withval="$with_xxslapoverlays"
2248   :
2249 fi
2250
2251
2252 # OpenLDAP --enable-overlays
2253         # Check whether --enable-overlays or --disable-overlays was given.
2254 if test "${enable_overlays+set}" = set; then
2255   enableval="$enable_overlays"
2256   
2257         ol_arg=invalid
2258         for ol_val in no yes mod ; do
2259                 if test "$enableval" = "$ol_val" ; then
2260                         ol_arg="$ol_val"
2261                 fi
2262         done
2263         if test "$ol_arg" = "invalid" ; then
2264                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2265         fi
2266         ol_enable_overlays="$ol_arg"
2267
2268 else
2269         ol_enable_overlays="no"
2270 fi
2271 # end --enable-overlays
2272 # OpenLDAP --enable-denyop
2273         # Check whether --enable-denyop or --disable-denyop was given.
2274 if test "${enable_denyop+set}" = set; then
2275   enableval="$enable_denyop"
2276   
2277         ol_arg=invalid
2278         for ol_val in no yes mod ; do
2279                 if test "$enableval" = "$ol_val" ; then
2280                         ol_arg="$ol_val"
2281                 fi
2282         done
2283         if test "$ol_arg" = "invalid" ; then
2284                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2285         fi
2286         ol_enable_denyop="$ol_arg"
2287
2288 else
2289         ol_enable_denyop="no"
2290 fi
2291 # end --enable-denyop
2292
2293 # OpenLDAP --enable-dyngroup
2294         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2295 if test "${enable_dyngroup+set}" = set; then
2296   enableval="$enable_dyngroup"
2297   
2298         ol_arg=invalid
2299         for ol_val in no yes mod ; do
2300                 if test "$enableval" = "$ol_val" ; then
2301                         ol_arg="$ol_val"
2302                 fi
2303         done
2304         if test "$ol_arg" = "invalid" ; then
2305                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2306         fi
2307         ol_enable_dyngroup="$ol_arg"
2308
2309 else
2310         ol_enable_dyngroup="no"
2311 fi
2312 # end --enable-dyngroup
2313
2314 # OpenLDAP --enable-glue
2315         # Check whether --enable-glue or --disable-glue was given.
2316 if test "${enable_glue+set}" = set; then
2317   enableval="$enable_glue"
2318   
2319         ol_arg=invalid
2320         for ol_val in no yes mod ; do
2321                 if test "$enableval" = "$ol_val" ; then
2322                         ol_arg="$ol_val"
2323                 fi
2324         done
2325         if test "$ol_arg" = "invalid" ; then
2326                 { echo "configure: error: bad value $enableval for --enable-glue" 1>&2; exit 1; }
2327         fi
2328         ol_enable_glue="$ol_arg"
2329
2330 else
2331         ol_enable_glue="yes"
2332 fi
2333 # end --enable-glue
2334
2335 # OpenLDAP --enable-lastmod
2336         # Check whether --enable-lastmod or --disable-lastmod was given.
2337 if test "${enable_lastmod+set}" = set; then
2338   enableval="$enable_lastmod"
2339   
2340         ol_arg=invalid
2341         for ol_val in no yes mod ; do
2342                 if test "$enableval" = "$ol_val" ; then
2343                         ol_arg="$ol_val"
2344                 fi
2345         done
2346         if test "$ol_arg" = "invalid" ; then
2347                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2348         fi
2349         ol_enable_lastmod="$ol_arg"
2350
2351 else
2352         ol_enable_lastmod="no"
2353 fi
2354 # end --enable-lastmod
2355
2356 # OpenLDAP --enable-ppolicy
2357         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2358 if test "${enable_ppolicy+set}" = set; then
2359   enableval="$enable_ppolicy"
2360   
2361         ol_arg=invalid
2362         for ol_val in no yes mod ; do
2363                 if test "$enableval" = "$ol_val" ; then
2364                         ol_arg="$ol_val"
2365                 fi
2366         done
2367         if test "$ol_arg" = "invalid" ; then
2368                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2369         fi
2370         ol_enable_ppolicy="$ol_arg"
2371
2372 else
2373         ol_enable_ppolicy="no"
2374 fi
2375 # end --enable-ppolicy
2376
2377 # OpenLDAP --enable-proxycache
2378         # Check whether --enable-proxycache or --disable-proxycache was given.
2379 if test "${enable_proxycache+set}" = set; then
2380   enableval="$enable_proxycache"
2381   
2382         ol_arg=invalid
2383         for ol_val in no yes mod ; do
2384                 if test "$enableval" = "$ol_val" ; then
2385                         ol_arg="$ol_val"
2386                 fi
2387         done
2388         if test "$ol_arg" = "invalid" ; then
2389                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2390         fi
2391         ol_enable_proxycache="$ol_arg"
2392
2393 else
2394         ol_enable_proxycache="no"
2395 fi
2396 # end --enable-proxycache
2397
2398 # OpenLDAP --enable-refint
2399         # Check whether --enable-refint or --disable-refint was given.
2400 if test "${enable_refint+set}" = set; then
2401   enableval="$enable_refint"
2402   
2403         ol_arg=invalid
2404         for ol_val in no yes mod ; do
2405                 if test "$enableval" = "$ol_val" ; then
2406                         ol_arg="$ol_val"
2407                 fi
2408         done
2409         if test "$ol_arg" = "invalid" ; then
2410                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2411         fi
2412         ol_enable_refint="$ol_arg"
2413
2414 else
2415         ol_enable_refint="no"
2416 fi
2417 # end --enable-refint
2418
2419 # OpenLDAP --enable-rwm
2420         # Check whether --enable-rwm or --disable-rwm was given.
2421 if test "${enable_rwm+set}" = set; then
2422   enableval="$enable_rwm"
2423   
2424         ol_arg=invalid
2425         for ol_val in no yes mod ; do
2426                 if test "$enableval" = "$ol_val" ; then
2427                         ol_arg="$ol_val"
2428                 fi
2429         done
2430         if test "$ol_arg" = "invalid" ; then
2431                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2432         fi
2433         ol_enable_rwm="$ol_arg"
2434
2435 else
2436         ol_enable_rwm="no"
2437 fi
2438 # end --enable-rwm
2439
2440 # OpenLDAP --enable-syncprov
2441         # Check whether --enable-syncprov or --disable-syncprov was given.
2442 if test "${enable_syncprov+set}" = set; then
2443   enableval="$enable_syncprov"
2444   
2445         ol_arg=invalid
2446         for ol_val in no yes mod ; do
2447                 if test "$enableval" = "$ol_val" ; then
2448                         ol_arg="$ol_val"
2449                 fi
2450         done
2451         if test "$ol_arg" = "invalid" ; then
2452                 { echo "configure: error: bad value $enableval for --enable-syncprov" 1>&2; exit 1; }
2453         fi
2454         ol_enable_syncprov="$ol_arg"
2455
2456 else
2457         ol_enable_syncprov="yes"
2458 fi
2459 # end --enable-syncprov
2460
2461 # OpenLDAP --enable-translucent
2462         # Check whether --enable-translucent or --disable-translucent was given.
2463 if test "${enable_translucent+set}" = set; then
2464   enableval="$enable_translucent"
2465   
2466         ol_arg=invalid
2467         for ol_val in no yes mod ; do
2468                 if test "$enableval" = "$ol_val" ; then
2469                         ol_arg="$ol_val"
2470                 fi
2471         done
2472         if test "$ol_arg" = "invalid" ; then
2473                 { echo "configure: error: bad value $enableval for --enable-translucent" 1>&2; exit 1; }
2474         fi
2475         ol_enable_translucent="$ol_arg"
2476
2477 else
2478         ol_enable_translucent="no"
2479 fi
2480 # end --enable-translucent
2481
2482 # OpenLDAP --enable-unique
2483         # Check whether --enable-unique or --disable-unique was given.
2484 if test "${enable_unique+set}" = set; then
2485   enableval="$enable_unique"
2486   
2487         ol_arg=invalid
2488         for ol_val in no yes mod ; do
2489                 if test "$enableval" = "$ol_val" ; then
2490                         ol_arg="$ol_val"
2491                 fi
2492         done
2493         if test "$ol_arg" = "invalid" ; then
2494                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2495         fi
2496         ol_enable_unique="$ol_arg"
2497
2498 else
2499         ol_enable_unique="no"
2500 fi
2501 # end --enable-unique
2502
2503
2504
2505 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2506 if test "${with_xxslurpdoptions+set}" = set; then
2507   withval="$with_xxslurpdoptions"
2508   :
2509 fi
2510
2511 # OpenLDAP --enable-slurpd
2512         # Check whether --enable-slurpd or --disable-slurpd was given.
2513 if test "${enable_slurpd+set}" = set; then
2514   enableval="$enable_slurpd"
2515   
2516         ol_arg=invalid
2517         for ol_val in auto yes no ; do
2518                 if test "$enableval" = "$ol_val" ; then
2519                         ol_arg="$ol_val"
2520                 fi
2521         done
2522         if test "$ol_arg" = "invalid" ; then
2523                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2524         fi
2525         ol_enable_slurpd="$ol_arg"
2526
2527 else
2528         ol_enable_slurpd="auto"
2529 fi
2530 # end --enable-slurpd
2531
2532 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2533 if test "${with_xxliboptions+set}" = set; then
2534   withval="$with_xxliboptions"
2535   :
2536 fi
2537
2538 # Check whether --enable-static or --disable-static was given.
2539 if test "${enable_static+set}" = set; then
2540   enableval="$enable_static"
2541   p=${PACKAGE-default}
2542 case $enableval in
2543 yes) enable_static=yes ;;
2544 no) enable_static=no ;;
2545 *)
2546   enable_static=no
2547   # Look at the argument we got.  We use all the common list separators.
2548   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2549   for pkg in $enableval; do
2550     if test "X$pkg" = "X$p"; then
2551       enable_static=yes
2552     fi
2553   done
2554   IFS="$ac_save_ifs"
2555   ;;
2556 esac
2557 else
2558   enable_static=yes
2559 fi
2560
2561 # Check whether --enable-shared or --disable-shared was given.
2562 if test "${enable_shared+set}" = set; then
2563   enableval="$enable_shared"
2564   p=${PACKAGE-default}
2565 case $enableval in
2566 yes) enable_shared=yes ;;
2567 no) enable_shared=no ;;
2568 *)
2569   enable_shared=no
2570   # Look at the argument we got.  We use all the common list separators.
2571   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2572   for pkg in $enableval; do
2573     if test "X$pkg" = "X$p"; then
2574       enable_shared=yes
2575     fi
2576   done
2577   IFS="$ac_save_ifs"
2578   ;;
2579 esac
2580 else
2581   enable_shared=yes
2582 fi
2583
2584
2585
2586 # Activate any backends that were not explicitly enabled.
2587 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2588 if test $ol_enable_backends != no ; then
2589         for i in $Backends; do
2590                 eval "ol_tmp=\$ol_enable_$i"
2591                 if test $ol_tmp = no ; then
2592                         eval "ol_enable_$i=$ol_enable_backends"
2593                 fi
2594         done
2595 fi
2596 # Activate the overlays
2597 if test $ol_enable_overlays != no ; then
2598         for i in $Overlays; do
2599                 eval "ol_tmp=\$ol_enable_$i"
2600                 if test $ol_tmp = no ; then
2601                         eval "ol_enable_$i=$ol_enable_overlays"
2602                 fi
2603         done
2604 fi
2605
2606 # validate options
2607 if test $ol_enable_slapd = no ; then
2608                 if test $ol_enable_slapi = yes ; then
2609                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2610         fi
2611         if test $ol_enable_backends != no ; then
2612                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2613         fi
2614         for i in $Backends; do
2615                 eval "ol_tmp=\$ol_enable_$i"
2616                 if test $ol_tmp != no ; then
2617                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2618                         eval "ol_enable_$i=no"
2619                 fi
2620         done
2621         if test $ol_enable_modules = yes ; then
2622                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2623         fi
2624         if test $ol_enable_multimaster = yes ; then
2625                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2626         fi
2627         if test $ol_enable_wrappers = yes ; then
2628                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2629         fi
2630         if test $ol_enable_rlookups = yes ; then
2631                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2632         fi
2633         if test $ol_enable_aci = yes ; then
2634                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2635         fi
2636         if test $ol_with_ldbm_api != auto ; then
2637                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2638         fi
2639         if test $ol_with_ldbm_type != auto ; then
2640                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2641         fi
2642         if test $ol_enable_slurpd = yes ; then
2643                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2644         fi
2645         if test $ol_enable_rewrite = yes ; then
2646                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2647         fi
2648                 if test $ol_enable_overlays != no ; then
2649                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2650         fi
2651         for i in $Overlays; do
2652                 eval "ol_tmp=\$ol_enable_$i"
2653                 if test $ol_tmp != no ; then
2654                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2655                         eval "ol_enable_$i=no"
2656                 fi
2657         done
2658
2659         # force settings to no
2660         ol_enable_slapi=no
2661
2662         ol_enable_backends=no
2663         ol_enable_overlays=no
2664         ol_enable_modules=no
2665         ol_enable_multimaster=no
2666         ol_enable_rlookups=no
2667         ol_enable_aci=no
2668         ol_enable_wrappers=no
2669
2670         ol_with_ldbm_api=no
2671         ol_with_ldbm_type=no
2672
2673         ol_enable_slurpd=no
2674
2675         ol_enable_rewrite=no
2676
2677 elif test $ol_enable_ldbm = no ; then
2678         
2679         if test $ol_with_ldbm_api != auto ; then
2680                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2681         fi
2682
2683         if test $ol_with_ldbm_type != auto ; then
2684                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2685         fi
2686
2687         if test $ol_enable_modules != yes -a \
2688                 $ol_enable_bdb = no -a \
2689                 $ol_enable_dnssrv = no -a \
2690                 $ol_enable_hdb = no -a \
2691                 $ol_enable_ldap = no -a \
2692                 $ol_enable_meta = no -a \
2693                 $ol_enable_monitor = no -a \
2694                 $ol_enable_null = no -a \
2695                 $ol_enable_passwd = no -a \
2696                 $ol_enable_perl = no -a \
2697                 $ol_enable_relay = no -a \
2698                 $ol_enable_shell = no -a \
2699                 $ol_enable_sql = no ; then
2700
2701                 if test $ol_enable_slapd = yes ; then
2702                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2703                 else
2704                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2705                         ol_enable_slapd=no
2706                 fi
2707         fi
2708
2709         ol_with_ldbm_api=no
2710         ol_with_ldbm_type=no
2711
2712         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2713                 ol_with_ldbm_api=berkeley
2714         fi
2715
2716 else
2717                 if test $ol_with_ldbm_api = gdbm -a \
2718                 $ol_with_ldbm_type = btree ; then
2719                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2720         fi
2721         if test $ol_with_ldbm_api = mdbm -a \
2722                 $ol_with_ldbm_type = btree ; then
2723                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2724         fi
2725         if test $ol_with_ldbm_api = ndbm -a \
2726                 $ol_with_ldbm_type = btree ; then
2727                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2728         fi
2729
2730         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2731                 if test $ol_with_ldbm_api = auto ; then
2732                         ol_with_ldbm_api=berkeley
2733                 elif test $ol_with_ldbm_api != berkeley ; then
2734                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2735                 fi
2736         fi
2737 fi
2738
2739 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2740         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2741 fi
2742
2743 if test $ol_enable_slurpd = yes ; then
2744                 if test $ol_with_threads = no ; then
2745                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2746         fi
2747 fi
2748
2749 if test $ol_enable_lmpasswd = yes ; then
2750         if test $ol_with_tls = no ; then
2751                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2752         fi
2753 fi
2754
2755 if test $ol_enable_kbind = yes ; then
2756         if test $ol_with_kerberos = no ; then
2757                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2758         elif test $ol_with_kerberos = auto ; then
2759                 ol_with_kerberos=yes
2760         fi
2761
2762 elif test $ol_enable_kbind = no ; then
2763         if test $ol_with_kerberos = auto ; then
2764                 ol_with_kerberos=no
2765         elif test $ol_with_kerberos != no ; then
2766                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2767                 ol_with_kerberos=no
2768         fi
2769 fi
2770
2771 if test $ol_enable_spasswd = yes ; then
2772         if test $ol_with_cyrus_sasl = no ; then
2773                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2774         fi
2775         ol_with_cyrus_sasl=yes
2776 fi
2777
2778 echo "$ac_t""done" 1>&6
2779
2780 LDAP_LIBS=
2781 LDBM_LIBS=
2782 LTHREAD_LIBS=
2783 LUTIL_LIBS=
2784
2785 SLAPD_LIBS=
2786 SLURPD_LIBS=
2787
2788 BUILD_SLAPD=no
2789 BUILD_SLURPD=no
2790
2791 BUILD_THREAD=no
2792
2793 BUILD_SLAPI=no
2794 SLAPD_SLAPI_DEPEND=
2795
2796 BUILD_BDB=no
2797 BUILD_DNSSRV=no
2798 BUILD_HDB=no
2799 BUILD_LDAP=no
2800 BUILD_LDBM=no
2801 BUILD_META=no
2802 BUILD_MONITOR=no
2803 BUILD_NULL=no
2804 BUILD_PASSWD=no
2805 BUILD_PERL=no
2806 BUILD_RELAY=no
2807 BUILD_SHELL=no
2808 BUILD_SQL=no
2809
2810 BUILD_CHAIN=no
2811 BUILD_DENYOP=no
2812 BUILD_DYNGROUP=no
2813 BUILD_GLUE=no
2814 BUILD_LASTMOD=no
2815 BUILD_PPOLICY=no
2816 BUILD_PROXYCACHE=no
2817 BUILD_REFINT=no
2818 BUILD_RWM=no
2819 BUILD_SYNCPROV=no
2820 BUILD_UNIQUE=no
2821
2822 SLAPD_DYNAMIC_OVERLAYS=
2823
2824 SLAPD_MODULES_LDFLAGS=
2825 SLAPD_MODULES_CPPFLAGS=
2826
2827 SLAPD_STATIC_BACKENDS=
2828 SLAPD_DYNAMIC_BACKENDS=
2829
2830 SLAPD_PERL_LDFLAGS=
2831 MOD_PERL_LDFLAGS=
2832 PERL_CPPFLAGS=
2833
2834 SLAPD_SQL_LDFLAGS=
2835 SLAPD_SQL_LIBS=
2836 SLAPD_SQL_INCLUDES=
2837
2838 KRB4_LIBS=
2839 KRB5_LIBS=
2840 SASL_LIBS=
2841 TLS_LIBS=
2842 MODULES_LIBS=
2843 SLAPI_LIBS=
2844 LIBSLAPI=
2845 LIBSLAPITOOLS=
2846 AUTH_LIBS=
2847
2848 SLAPD_SLP_LIBS=
2849 SLAPD_GMP_LIBS=
2850
2851
2852 cat >> confdefs.h <<\EOF
2853 #define HAVE_MKVERSION 1
2854 EOF
2855
2856
2857
2858
2859 ol_aix_threads=no
2860 case "$target" in
2861 *-*-aix*)       if test -z "$CC" ; then
2862                 case "$ol_with_threads" in
2863                 auto | yes |  posix) ol_aix_threads=yes ;;
2864                 esac
2865         fi
2866 ;;
2867 esac
2868
2869 if test $ol_aix_threads = yes ; then
2870         if test -z "${CC}" ; then
2871                 for ac_prog in cc_r xlc_r cc
2872 do
2873 # Extract the first word of "$ac_prog", so it can be a program name with args.
2874 set dummy $ac_prog; ac_word=$2
2875 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2876 echo "configure:2877: checking for $ac_word" >&5
2877 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2878   echo $ac_n "(cached) $ac_c" 1>&6
2879 else
2880   if test -n "$CC"; then
2881   ac_cv_prog_CC="$CC" # Let the user override the test.
2882 else
2883   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2884   ac_dummy="$PATH"
2885   for ac_dir in $ac_dummy; do
2886     test -z "$ac_dir" && ac_dir=.
2887     if test -f $ac_dir/$ac_word; then
2888       ac_cv_prog_CC="$ac_prog"
2889       break
2890     fi
2891   done
2892   IFS="$ac_save_ifs"
2893 fi
2894 fi
2895 CC="$ac_cv_prog_CC"
2896 if test -n "$CC"; then
2897   echo "$ac_t""$CC" 1>&6
2898 else
2899   echo "$ac_t""no" 1>&6
2900 fi
2901
2902 test -n "$CC" && break
2903 done
2904
2905
2906                 if test "$CC" = cc ; then
2907                                                 if test $ol_with_threads != auto ; then
2908                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2909                         else
2910                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2911                         fi
2912                         ol_with_threads=no
2913                 fi
2914         fi
2915
2916         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2917                 ol_with_threads=posix
2918                 ol_cv_pthread_create=yes
2919         fi
2920 fi
2921
2922 if test -z "${CC}"; then
2923         for ac_prog in cc gcc
2924 do
2925 # Extract the first word of "$ac_prog", so it can be a program name with args.
2926 set dummy $ac_prog; ac_word=$2
2927 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2928 echo "configure:2929: checking for $ac_word" >&5
2929 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2930   echo $ac_n "(cached) $ac_c" 1>&6
2931 else
2932   if test -n "$CC"; then
2933   ac_cv_prog_CC="$CC" # Let the user override the test.
2934 else
2935   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2936   ac_dummy="$PATH"
2937   for ac_dir in $ac_dummy; do
2938     test -z "$ac_dir" && ac_dir=.
2939     if test -f $ac_dir/$ac_word; then
2940       ac_cv_prog_CC="$ac_prog"
2941       break
2942     fi
2943   done
2944   IFS="$ac_save_ifs"
2945 fi
2946 fi
2947 CC="$ac_cv_prog_CC"
2948 if test -n "$CC"; then
2949   echo "$ac_t""$CC" 1>&6
2950 else
2951   echo "$ac_t""no" 1>&6
2952 fi
2953
2954 test -n "$CC" && break
2955 done
2956 test -n "$CC" || CC="missing"
2957
2958
2959         if test "${CC}" = "missing" ; then
2960                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2961         fi
2962 fi
2963
2964 if test -z "${AR}"; then
2965         for ac_prog in ar gar
2966 do
2967 # Extract the first word of "$ac_prog", so it can be a program name with args.
2968 set dummy $ac_prog; ac_word=$2
2969 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2970 echo "configure:2971: checking for $ac_word" >&5
2971 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2972   echo $ac_n "(cached) $ac_c" 1>&6
2973 else
2974   if test -n "$AR"; then
2975   ac_cv_prog_AR="$AR" # Let the user override the test.
2976 else
2977   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2978   ac_dummy="$PATH"
2979   for ac_dir in $ac_dummy; do
2980     test -z "$ac_dir" && ac_dir=.
2981     if test -f $ac_dir/$ac_word; then
2982       ac_cv_prog_AR="$ac_prog"
2983       break
2984     fi
2985   done
2986   IFS="$ac_save_ifs"
2987 fi
2988 fi
2989 AR="$ac_cv_prog_AR"
2990 if test -n "$AR"; then
2991   echo "$ac_t""$AR" 1>&6
2992 else
2993   echo "$ac_t""no" 1>&6
2994 fi
2995
2996 test -n "$AR" && break
2997 done
2998 test -n "$AR" || AR="missing"
2999
3000
3001         if test "${AR}" = "missing" ; then
3002                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3003         fi
3004 fi
3005
3006
3007
3008 # Find the correct PATH separator.  Usually this is `:', but
3009 # DJGPP uses `;' like DOS.
3010 if test "X${PATH_SEPARATOR+set}" != Xset; then
3011   UNAME=${UNAME-`uname 2>/dev/null`}
3012   case X$UNAME in
3013     *-DOS) lt_cv_sys_path_separator=';' ;;
3014     *)     lt_cv_sys_path_separator=':' ;;
3015   esac
3016   PATH_SEPARATOR=$lt_cv_sys_path_separator
3017 fi
3018
3019 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3020 echo "configure:3021: checking for Cygwin environment" >&5
3021 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3022   echo $ac_n "(cached) $ac_c" 1>&6
3023 else
3024   cat > conftest.$ac_ext <<EOF
3025 #line 3026 "configure"
3026 #include "confdefs.h"
3027
3028 int main() {
3029
3030 #ifndef __CYGWIN__
3031 #define __CYGWIN__ __CYGWIN32__
3032 #endif
3033 return __CYGWIN__;
3034 ; return 0; }
3035 EOF
3036 if { (eval echo configure:3037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3037   rm -rf conftest*
3038   ac_cv_cygwin=yes
3039 else
3040   echo "configure: failed program was:" >&5
3041   cat conftest.$ac_ext >&5
3042   rm -rf conftest*
3043   ac_cv_cygwin=no
3044 fi
3045 rm -f conftest*
3046 fi
3047
3048 echo "$ac_t""$ac_cv_cygwin" 1>&6
3049 CYGWIN=
3050 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3051 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3052 echo "configure:3053: checking for mingw32 environment" >&5
3053 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3054   echo $ac_n "(cached) $ac_c" 1>&6
3055 else
3056   cat > conftest.$ac_ext <<EOF
3057 #line 3058 "configure"
3058 #include "confdefs.h"
3059
3060 int main() {
3061 return __MINGW32__;
3062 ; return 0; }
3063 EOF
3064 if { (eval echo configure:3065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3065   rm -rf conftest*
3066   ac_cv_mingw32=yes
3067 else
3068   echo "configure: failed program was:" >&5
3069   cat conftest.$ac_ext >&5
3070   rm -rf conftest*
3071   ac_cv_mingw32=no
3072 fi
3073 rm -f conftest*
3074 fi
3075
3076 echo "$ac_t""$ac_cv_mingw32" 1>&6
3077 MINGW32=
3078 test "$ac_cv_mingw32" = yes && MINGW32=yes
3079 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3080 echo "configure:3081: checking for EMX OS/2 environment" >&5
3081 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   cat > conftest.$ac_ext <<EOF
3085 #line 3086 "configure"
3086 #include "confdefs.h"
3087
3088 int main() {
3089 return __EMX__;
3090 ; return 0; }
3091 EOF
3092 if { (eval echo configure:3093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3093   rm -rf conftest*
3094   ac_cv_emxos2=yes
3095 else
3096   echo "configure: failed program was:" >&5
3097   cat conftest.$ac_ext >&5
3098   rm -rf conftest*
3099   ac_cv_emxos2=no
3100 fi
3101 rm -f conftest*
3102 fi
3103
3104 echo "$ac_t""$ac_cv_emxos2" 1>&6
3105 EMXOS2=
3106 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3107 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3108 echo "configure:3109: checking how to run the C preprocessor" >&5
3109 # On Suns, sometimes $CPP names a directory.
3110 if test -n "$CPP" && test -d "$CPP"; then
3111   CPP=
3112 fi
3113 if test -z "$CPP"; then
3114 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3115   echo $ac_n "(cached) $ac_c" 1>&6
3116 else
3117     # This must be in double quotes, not single quotes, because CPP may get
3118   # substituted into the Makefile and "${CC-cc}" will confuse make.
3119   CPP="${CC-cc} -E"
3120   # On the NeXT, cc -E runs the code through the compiler's parser,
3121   # not just through cpp.
3122   cat > conftest.$ac_ext <<EOF
3123 #line 3124 "configure"
3124 #include "confdefs.h"
3125 #include <assert.h>
3126 Syntax Error
3127 EOF
3128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3129 { (eval echo configure:3130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3131 if test -z "$ac_err"; then
3132   :
3133 else
3134   echo "$ac_err" >&5
3135   echo "configure: failed program was:" >&5
3136   cat conftest.$ac_ext >&5
3137   rm -rf conftest*
3138   CPP="${CC-cc} -E -traditional-cpp"
3139   cat > conftest.$ac_ext <<EOF
3140 #line 3141 "configure"
3141 #include "confdefs.h"
3142 #include <assert.h>
3143 Syntax Error
3144 EOF
3145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3146 { (eval echo configure:3147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3148 if test -z "$ac_err"; then
3149   :
3150 else
3151   echo "$ac_err" >&5
3152   echo "configure: failed program was:" >&5
3153   cat conftest.$ac_ext >&5
3154   rm -rf conftest*
3155   CPP="${CC-cc} -nologo -E"
3156   cat > conftest.$ac_ext <<EOF
3157 #line 3158 "configure"
3158 #include "confdefs.h"
3159 #include <assert.h>
3160 Syntax Error
3161 EOF
3162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3163 { (eval echo configure:3164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3165 if test -z "$ac_err"; then
3166   :
3167 else
3168   echo "$ac_err" >&5
3169   echo "configure: failed program was:" >&5
3170   cat conftest.$ac_ext >&5
3171   rm -rf conftest*
3172   CPP=/lib/cpp
3173 fi
3174 rm -f conftest*
3175 fi
3176 rm -f conftest*
3177 fi
3178 rm -f conftest*
3179   ac_cv_prog_CPP="$CPP"
3180 fi
3181   CPP="$ac_cv_prog_CPP"
3182 else
3183   ac_cv_prog_CPP="$CPP"
3184 fi
3185 echo "$ac_t""$CPP" 1>&6
3186
3187 # Check whether --enable-fast-install or --disable-fast-install was given.
3188 if test "${enable_fast_install+set}" = set; then
3189   enableval="$enable_fast_install"
3190   p=${PACKAGE-default}
3191 case $enableval in
3192 yes) enable_fast_install=yes ;;
3193 no) enable_fast_install=no ;;
3194 *)
3195   enable_fast_install=no
3196   # Look at the argument we got.  We use all the common list separators.
3197   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3198   for pkg in $enableval; do
3199     if test "X$pkg" = "X$p"; then
3200       enable_fast_install=yes
3201     fi
3202   done
3203   IFS="$ac_save_ifs"
3204   ;;
3205 esac
3206 else
3207   enable_fast_install=yes
3208 fi
3209
3210 # Extract the first word of "gcc", so it can be a program name with args.
3211 set dummy gcc; ac_word=$2
3212 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3213 echo "configure:3214: checking for $ac_word" >&5
3214 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3215   echo $ac_n "(cached) $ac_c" 1>&6
3216 else
3217   if test -n "$CC"; then
3218   ac_cv_prog_CC="$CC" # Let the user override the test.
3219 else
3220   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3221   ac_dummy="$PATH"
3222   for ac_dir in $ac_dummy; do
3223     test -z "$ac_dir" && ac_dir=.
3224     if test -f $ac_dir/$ac_word; then
3225       ac_cv_prog_CC="gcc"
3226       break
3227     fi
3228   done
3229   IFS="$ac_save_ifs"
3230 fi
3231 fi
3232 CC="$ac_cv_prog_CC"
3233 if test -n "$CC"; then
3234   echo "$ac_t""$CC" 1>&6
3235 else
3236   echo "$ac_t""no" 1>&6
3237 fi
3238
3239 if test -z "$CC"; then
3240   # Extract the first word of "cc", so it can be a program name with args.
3241 set dummy cc; ac_word=$2
3242 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3243 echo "configure:3244: checking for $ac_word" >&5
3244 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3245   echo $ac_n "(cached) $ac_c" 1>&6
3246 else
3247   if test -n "$CC"; then
3248   ac_cv_prog_CC="$CC" # Let the user override the test.
3249 else
3250   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3251   ac_prog_rejected=no
3252   ac_dummy="$PATH"
3253   for ac_dir in $ac_dummy; do
3254     test -z "$ac_dir" && ac_dir=.
3255     if test -f $ac_dir/$ac_word; then
3256       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3257         ac_prog_rejected=yes
3258         continue
3259       fi
3260       ac_cv_prog_CC="cc"
3261       break
3262     fi
3263   done
3264   IFS="$ac_save_ifs"
3265 if test $ac_prog_rejected = yes; then
3266   # We found a bogon in the path, so make sure we never use it.
3267   set dummy $ac_cv_prog_CC
3268   shift
3269   if test $# -gt 0; then
3270     # We chose a different compiler from the bogus one.
3271     # However, it has the same basename, so the bogon will be chosen
3272     # first if we set CC to just the basename; use the full file name.
3273     shift
3274     set dummy "$ac_dir/$ac_word" "$@"
3275     shift
3276     ac_cv_prog_CC="$@"
3277   fi
3278 fi
3279 fi
3280 fi
3281 CC="$ac_cv_prog_CC"
3282 if test -n "$CC"; then
3283   echo "$ac_t""$CC" 1>&6
3284 else
3285   echo "$ac_t""no" 1>&6
3286 fi
3287
3288   if test -z "$CC"; then
3289     case "`uname -s`" in
3290     *win32* | *WIN32* | *CYGWIN*)
3291       # Extract the first word of "cl", so it can be a program name with args.
3292 set dummy cl; ac_word=$2
3293 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3294 echo "configure:3295: checking for $ac_word" >&5
3295 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3296   echo $ac_n "(cached) $ac_c" 1>&6
3297 else
3298   if test -n "$CC"; then
3299   ac_cv_prog_CC="$CC" # Let the user override the test.
3300 else
3301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3302   ac_dummy="$PATH"
3303   for ac_dir in $ac_dummy; do
3304     test -z "$ac_dir" && ac_dir=.
3305     if test -f $ac_dir/$ac_word; then
3306       ac_cv_prog_CC="cl"
3307       break
3308     fi
3309   done
3310   IFS="$ac_save_ifs"
3311 fi
3312 fi
3313 CC="$ac_cv_prog_CC"
3314 if test -n "$CC"; then
3315   echo "$ac_t""$CC" 1>&6
3316 else
3317   echo "$ac_t""no" 1>&6
3318 fi
3319  ;;
3320     esac
3321   fi
3322   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3323 fi
3324
3325 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3326 echo "configure:3327: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3327
3328 ac_ext=c
3329 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3330 ac_cpp='$CPP $CPPFLAGS'
3331 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3332 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3333 cross_compiling=$ac_cv_prog_cc_cross
3334
3335 cat > conftest.$ac_ext << EOF
3336
3337 #line 3338 "configure"
3338 #include "confdefs.h"
3339
3340 main(){return(0);}
3341 EOF
3342 if { (eval echo configure:3343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3343   ac_cv_prog_cc_works=yes
3344   # If we can't run a trivial program, we are probably using a cross compiler.
3345   if (./conftest; exit) 2>/dev/null; then
3346     ac_cv_prog_cc_cross=no
3347   else
3348     ac_cv_prog_cc_cross=yes
3349   fi
3350 else
3351   echo "configure: failed program was:" >&5
3352   cat conftest.$ac_ext >&5
3353   ac_cv_prog_cc_works=no
3354 fi
3355 rm -fr conftest*
3356 ac_ext=c
3357 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3358 ac_cpp='$CPP $CPPFLAGS'
3359 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3360 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3361 cross_compiling=$ac_cv_prog_cc_cross
3362
3363 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3364 if test $ac_cv_prog_cc_works = no; then
3365   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3366 fi
3367 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3368 echo "configure:3369: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3369 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3370 cross_compiling=$ac_cv_prog_cc_cross
3371
3372 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3373 echo "configure:3374: checking whether we are using GNU C" >&5
3374 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3375   echo $ac_n "(cached) $ac_c" 1>&6
3376 else
3377   cat > conftest.c <<EOF
3378 #ifdef __GNUC__
3379   yes;
3380 #endif
3381 EOF
3382 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3383   ac_cv_prog_gcc=yes
3384 else
3385   ac_cv_prog_gcc=no
3386 fi
3387 fi
3388
3389 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3390
3391 if test $ac_cv_prog_gcc = yes; then
3392   GCC=yes
3393 else
3394   GCC=
3395 fi
3396
3397 ac_test_CFLAGS="${CFLAGS+set}"
3398 ac_save_CFLAGS="$CFLAGS"
3399 CFLAGS=
3400 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3401 echo "configure:3402: checking whether ${CC-cc} accepts -g" >&5
3402 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3403   echo $ac_n "(cached) $ac_c" 1>&6
3404 else
3405   echo 'void f(){}' > conftest.c
3406 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3407   ac_cv_prog_cc_g=yes
3408 else
3409   ac_cv_prog_cc_g=no
3410 fi
3411 rm -f conftest*
3412
3413 fi
3414
3415 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3416 if test "$ac_test_CFLAGS" = set; then
3417   CFLAGS="$ac_save_CFLAGS"
3418 elif test $ac_cv_prog_cc_g = yes; then
3419   if test "$GCC" = yes; then
3420     CFLAGS="-g -O2"
3421   else
3422     CFLAGS="-g"
3423   fi
3424 else
3425   if test "$GCC" = yes; then
3426     CFLAGS="-O2"
3427   else
3428     CFLAGS=
3429   fi
3430 fi
3431
3432 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3433 if test "${with_gnu_ld+set}" = set; then
3434   withval="$with_gnu_ld"
3435   test "$withval" = no || with_gnu_ld=yes
3436 else
3437   with_gnu_ld=no
3438 fi
3439
3440 ac_prog=ld
3441 if test "$GCC" = yes; then
3442   # Check if gcc -print-prog-name=ld gives a path.
3443   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3444 echo "configure:3445: checking for ld used by GCC" >&5
3445   case $host in
3446   *-*-mingw*)
3447     # gcc leaves a trailing carriage return which upsets mingw
3448     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3449   *)
3450     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3451   esac
3452   case $ac_prog in
3453     # Accept absolute paths.
3454     [\\/]* | [A-Za-z]:[\\/]*)
3455       re_direlt='/[^/][^/]*/\.\./'
3456       # Canonicalize the path of ld
3457       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3458       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3459         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3460       done
3461       test -z "$LD" && LD="$ac_prog"
3462       ;;
3463   "")
3464     # If it fails, then pretend we aren't using GCC.
3465     ac_prog=ld
3466     ;;
3467   *)
3468     # If it is relative, then search for the first ld in PATH.
3469     with_gnu_ld=unknown
3470     ;;
3471   esac
3472 elif test "$with_gnu_ld" = yes; then
3473   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3474 echo "configure:3475: checking for GNU ld" >&5
3475 else
3476   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3477 echo "configure:3478: checking for non-GNU ld" >&5
3478 fi
3479 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3480   echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482   if test -z "$LD"; then
3483   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3484   for ac_dir in $PATH; do
3485     test -z "$ac_dir" && ac_dir=.
3486     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3487       lt_cv_path_LD="$ac_dir/$ac_prog"
3488       # Check to see if the program is GNU ld.  I'd rather use --version,
3489       # but apparently some GNU ld's only accept -v.
3490       # Break only if it was the GNU/non-GNU ld that we prefer.
3491       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3492         test "$with_gnu_ld" != no && break
3493       else
3494         test "$with_gnu_ld" != yes && break
3495       fi
3496     fi
3497   done
3498   IFS="$ac_save_ifs"
3499 else
3500   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3501 fi
3502 fi
3503
3504 LD="$lt_cv_path_LD"
3505 if test -n "$LD"; then
3506   echo "$ac_t""$LD" 1>&6
3507 else
3508   echo "$ac_t""no" 1>&6
3509 fi
3510 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3511 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3512 echo "configure:3513: checking if the linker ($LD) is GNU ld" >&5
3513 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3514   echo $ac_n "(cached) $ac_c" 1>&6
3515 else
3516   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3517 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3518   lt_cv_prog_gnu_ld=yes
3519 else
3520   lt_cv_prog_gnu_ld=no
3521 fi
3522 fi
3523
3524 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3525 with_gnu_ld=$lt_cv_prog_gnu_ld
3526
3527
3528 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3529 echo "configure:3530: checking for $LD option to reload object files" >&5
3530 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3531   echo $ac_n "(cached) $ac_c" 1>&6
3532 else
3533   lt_cv_ld_reload_flag='-r'
3534 fi
3535
3536 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3537 reload_flag=$lt_cv_ld_reload_flag
3538 test -n "$reload_flag" && reload_flag=" $reload_flag"
3539
3540 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3541 echo "configure:3542: checking for BSD-compatible nm" >&5
3542 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3543   echo $ac_n "(cached) $ac_c" 1>&6
3544 else
3545   if test -n "$NM"; then
3546   # Let the user override the test.
3547   lt_cv_path_NM="$NM"
3548 else
3549   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3550   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3551     test -z "$ac_dir" && ac_dir=.
3552     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3553     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3554       # Check to see if the nm accepts a BSD-compat flag.
3555       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3556       #   nm: unknown option "B" ignored
3557       # Tru64's nm complains that /dev/null is an invalid object file
3558       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3559         lt_cv_path_NM="$tmp_nm -B"
3560         break
3561       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3562         lt_cv_path_NM="$tmp_nm -p"
3563         break
3564       else
3565         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3566         continue # so that we can try to find one that supports BSD flags
3567       fi
3568     fi
3569   done
3570   IFS="$ac_save_ifs"
3571   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3572 fi
3573 fi
3574
3575 NM="$lt_cv_path_NM"
3576 echo "$ac_t""$NM" 1>&6
3577
3578 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3579 echo "configure:3580: checking for a sed that does not truncate output" >&5
3580 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3581   echo $ac_n "(cached) $ac_c" 1>&6
3582 else
3583   # Loop through the user's path and test for sed and gsed.
3584 # Then use that list of sed's as ones to test for truncation.
3585 as_executable_p="test -f"
3586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3587 for as_dir in $PATH
3588 do
3589   IFS=$as_save_IFS
3590   test -z "$as_dir" && as_dir=.
3591   for ac_prog in sed gsed; do
3592     for ac_exec_ext in '' $ac_executable_extensions; do
3593       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3594         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3595       fi
3596     done
3597   done
3598 done
3599
3600   # Create a temporary directory, and hook for its removal unless debugging.
3601 $debug ||
3602 {
3603   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3604   trap '{ (exit 1); exit 1; }' 1 2 13 15
3605 }
3606
3607 # Create a (secure) tmp directory for tmp files.
3608 : ${TMPDIR=/tmp}
3609 {
3610   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3611   test -n "$tmp" && test -d "$tmp"
3612 }  ||
3613 {
3614   tmp=$TMPDIR/sed$$-$RANDOM
3615   (umask 077 && mkdir $tmp)
3616 } ||
3617 {
3618    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3619    { (exit 1); exit 1; }
3620 }
3621   _max=0
3622   _count=0
3623   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3624   # along with /bin/sed that truncates output.
3625   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3626     test ! -f ${_sed} && break
3627     cat /dev/null > "$tmp/sed.in"
3628     _count=0
3629     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3630     # Check for GNU sed and select it if it is found.
3631     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3632       lt_cv_path_SED=${_sed}
3633       break
3634     fi
3635     while true; do
3636       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3637       mv "$tmp/sed.tmp" "$tmp/sed.in"
3638       cp "$tmp/sed.in" "$tmp/sed.nl"
3639       echo >>"$tmp/sed.nl"
3640       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3641       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3642       # 40000 chars as input seems more than enough
3643       test $_count -gt 10 && break
3644       _count=`expr $_count + 1`
3645       if test $_count -gt $_max; then
3646         _max=$_count
3647         lt_cv_path_SED=$_sed
3648       fi
3649     done
3650   done
3651   rm -rf "$tmp"
3652
3653 fi
3654
3655 if test "X$SED" != "X"; then
3656   lt_cv_path_SED=$SED
3657 else
3658   SED=$lt_cv_path_SED
3659 fi
3660 echo "$ac_t""$SED" 1>&6
3661
3662 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3663 echo "configure:3664: checking whether ln -s works" >&5
3664 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3665   echo $ac_n "(cached) $ac_c" 1>&6
3666 else
3667   rm -f conftestdata
3668 if ln -s X conftestdata 2>/dev/null
3669 then
3670   rm -f conftestdata
3671   ac_cv_prog_LN_S="ln -s"
3672 else
3673   ac_cv_prog_LN_S=ln
3674 fi
3675 fi
3676 LN_S="$ac_cv_prog_LN_S"
3677 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3678   echo "$ac_t""yes" 1>&6
3679 else
3680   echo "$ac_t""no" 1>&6
3681 fi
3682
3683 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3684 echo "configure:3685: checking how to recognise dependent libraries" >&5
3685 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3686   echo $ac_n "(cached) $ac_c" 1>&6
3687 else
3688   lt_cv_file_magic_cmd='$MAGIC_CMD'
3689 lt_cv_file_magic_test_file=
3690 lt_cv_deplibs_check_method='unknown'
3691 # Need to set the preceding variable on all platforms that support
3692 # interlibrary dependencies.
3693 # 'none' -- dependencies not supported.
3694 # `unknown' -- same as none, but documents that we really don't know.
3695 # 'pass_all' -- all dependencies passed with no checks.
3696 # 'test_compile' -- check by making test program.
3697 # 'file_magic [[regex]]' -- check by looking for files in library path
3698 # which responds to the $file_magic_cmd with a given egrep regex.
3699 # If you have `file' or equivalent on your system and you're not sure
3700 # whether `pass_all' will *always* work, you probably want this one.
3701
3702 case $host_os in
3703 aix4* | aix5*)
3704   lt_cv_deplibs_check_method=pass_all
3705   ;;
3706
3707 beos*)
3708   lt_cv_deplibs_check_method=pass_all
3709   ;;
3710
3711 bsdi4*)
3712   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3713   lt_cv_file_magic_cmd='/usr/bin/file -L'
3714   lt_cv_file_magic_test_file=/shlib/libc.so
3715   ;;
3716
3717 cygwin* | mingw* | pw32*)
3718   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3719   lt_cv_file_magic_cmd='$OBJDUMP -f'
3720   ;;
3721
3722 darwin* | rhapsody*)
3723   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3724   lt_cv_file_magic_cmd='/usr/bin/file -L'
3725   case "$host_os" in
3726   rhapsody* | darwin1.[012])
3727     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3728     ;;
3729   *) # Darwin 1.3 on
3730     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3731     ;;
3732   esac
3733   ;;
3734
3735 freebsd*)
3736   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3737     case $host_cpu in
3738     i*86 )
3739       # Not sure whether the presence of OpenBSD here was a mistake.
3740       # Let's accept both of them until this is cleared up.
3741       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3742       lt_cv_file_magic_cmd=/usr/bin/file
3743       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3744       ;;
3745     esac
3746   else
3747     lt_cv_deplibs_check_method=pass_all
3748   fi
3749   ;;
3750
3751 gnu*)
3752   lt_cv_deplibs_check_method=pass_all
3753   ;;
3754
3755 hpux10.20*|hpux11*)
3756   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3757   lt_cv_file_magic_cmd=/usr/bin/file
3758   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3759   ;;
3760
3761 irix5* | irix6* | nonstopux*)
3762   case $host_os in
3763   irix5* | nonstopux*)
3764     # this will be overridden with pass_all, but let us keep it just in case
3765     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3766     ;;
3767   *)
3768     case $LD in
3769     *-32|*"-32 ") libmagic=32-bit;;
3770     *-n32|*"-n32 ") libmagic=N32;;
3771     *-64|*"-64 ") libmagic=64-bit;;
3772     *) libmagic=never-match;;
3773     esac
3774     # this will be overridden with pass_all, but let us keep it just in case
3775     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3776     ;;
3777   esac
3778   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3779   lt_cv_deplibs_check_method=pass_all
3780   ;;
3781
3782 # This must be Linux ELF.
3783 linux-gnu*)
3784   case $host_cpu in
3785   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3786     lt_cv_deplibs_check_method=pass_all ;;
3787   *)
3788     # glibc up to 2.1.1 does not perform some relocations on ARM
3789     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3790   esac
3791   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3792   ;;
3793
3794 netbsd*)
3795   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3796     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3797   else
3798     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3799   fi
3800   ;;
3801
3802 newos6*)
3803   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3804   lt_cv_file_magic_cmd=/usr/bin/file
3805   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3806   ;;
3807
3808 openbsd*)
3809   lt_cv_file_magic_cmd=/usr/bin/file
3810   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3811   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3812     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3813   else
3814     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3815   fi
3816   ;;
3817
3818 openedition*)
3819   lt_cv_deplibs_check_method=pass_all
3820   ;;
3821
3822 osf3* | osf4* | osf5*)
3823   # this will be overridden with pass_all, but let us keep it just in case
3824   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3825   lt_cv_file_magic_test_file=/shlib/libc.so
3826   lt_cv_deplibs_check_method=pass_all
3827   ;;
3828
3829 sco3.2v5*)
3830   lt_cv_deplibs_check_method=pass_all
3831   ;;
3832
3833 solaris*)
3834   lt_cv_deplibs_check_method=pass_all
3835   lt_cv_file_magic_test_file=/lib/libc.so
3836   ;;
3837
3838 sysv5uw[78]* | sysv4*uw2*)
3839   lt_cv_deplibs_check_method=pass_all
3840   ;;
3841
3842 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3843   case $host_vendor in
3844   motorola)
3845     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]'
3846     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3847     ;;
3848   ncr)
3849     lt_cv_deplibs_check_method=pass_all
3850     ;;
3851   sequent)
3852     lt_cv_file_magic_cmd='/bin/file'
3853     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3854     ;;
3855   sni)
3856     lt_cv_file_magic_cmd='/bin/file'
3857     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3858     lt_cv_file_magic_test_file=/lib/libc.so
3859     ;;
3860   siemens)
3861     lt_cv_deplibs_check_method=pass_all
3862     ;;
3863   esac
3864   ;;
3865 esac
3866
3867 fi
3868
3869 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3870 file_magic_cmd=$lt_cv_file_magic_cmd
3871 deplibs_check_method=$lt_cv_deplibs_check_method
3872
3873 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3874 echo "configure:3875: checking for object suffix" >&5
3875 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3876   echo $ac_n "(cached) $ac_c" 1>&6
3877 else
3878   rm -f conftest*
3879 echo 'int i = 1;' > conftest.$ac_ext
3880 if { (eval echo configure:3881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3881   for ac_file in conftest.*; do
3882     case $ac_file in
3883     *.c) ;;
3884     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3885     esac
3886   done
3887 else
3888   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3889 fi
3890 rm -f conftest*
3891 fi
3892
3893 echo "$ac_t""$ac_cv_objext" 1>&6
3894 OBJEXT=$ac_cv_objext
3895 ac_objext=$ac_cv_objext
3896
3897
3898
3899
3900 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3901 echo "configure:3902: checking for executable suffix" >&5
3902 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3903   echo $ac_n "(cached) $ac_c" 1>&6
3904 else
3905   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3906   ac_cv_exeext=.exe
3907 else
3908   rm -f conftest*
3909   echo 'int main () { return 0; }' > conftest.$ac_ext
3910   ac_cv_exeext=
3911   if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3912     for file in conftest.*; do
3913       case $file in
3914       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3915       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3916       esac
3917     done
3918   else
3919     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3920   fi
3921   rm -f conftest*
3922   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3923 fi
3924 fi
3925
3926 EXEEXT=""
3927 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3928 echo "$ac_t""${ac_cv_exeext}" 1>&6
3929 ac_exeext=$EXEEXT
3930
3931 if test $host != $build; then
3932   ac_tool_prefix=${host_alias}-
3933 else
3934   ac_tool_prefix=
3935 fi
3936
3937
3938
3939
3940 # Check for command to grab the raw symbol name followed by C symbol from nm.
3941 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3942 echo "configure:3943: checking command to parse $NM output" >&5
3943 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3944   echo $ac_n "(cached) $ac_c" 1>&6
3945 else
3946   
3947 # These are sane defaults that work on at least a few old systems.
3948 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3949
3950 # Character class describing NM global symbol codes.
3951 symcode='[BCDEGRST]'
3952
3953 # Regexp to match symbols that can be accessed directly from C.
3954 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3955
3956 # Transform the above into a raw symbol and a C symbol.
3957 symxfrm='\1 \2\3 \3'
3958
3959 # Transform an extracted symbol line into a proper C declaration
3960 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3961
3962 # Transform an extracted symbol line into symbol name and symbol address
3963 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'"
3964
3965 # Define system-specific variables.
3966 case $host_os in
3967 aix*)
3968   symcode='[BCDT]'
3969   ;;
3970 cygwin* | mingw* | pw32*)
3971   symcode='[ABCDGISTW]'
3972   ;;
3973 hpux*) # Its linker distinguishes data from code symbols
3974   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3975   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'"
3976   ;;
3977 irix* | nonstopux*)
3978   symcode='[BCDEGRST]'
3979   ;;
3980 osf*)
3981   symcode='[BCDEGQRST]'
3982   ;;
3983 solaris* | sysv5*)
3984   symcode='[BDT]'
3985   ;;
3986 sysv4)
3987   symcode='[DFNSTU]'
3988   ;;
3989 esac
3990
3991 # Handle CRLF in mingw tool chain
3992 opt_cr=
3993 case $host_os in
3994 mingw*)
3995   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3996   ;;
3997 esac
3998
3999 # If we're using GNU nm, then use its standard symbol codes.
4000 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4001   symcode='[ABCDGISTW]'
4002 fi
4003
4004 # Try without a prefix undercore, then with it.
4005 for ac_symprfx in "" "_"; do
4006
4007   # Write the raw and C identifiers.
4008 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4009
4010   # Check to see that the pipe works correctly.
4011   pipe_works=no
4012   rm -f conftest*
4013   cat > conftest.$ac_ext <<EOF
4014 #ifdef __cplusplus
4015 extern "C" {
4016 #endif
4017 char nm_test_var;
4018 void nm_test_func(){}
4019 #ifdef __cplusplus
4020 }
4021 #endif
4022 int main(){nm_test_var='a';nm_test_func();return(0);}
4023 EOF
4024
4025   if { (eval echo configure:4026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4026     # Now try to grab the symbols.
4027     nlist=conftest.nm
4028     if { (eval echo configure:4029: \"$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
4029       # Try sorting and uniquifying the output.
4030       if sort "$nlist" | uniq > "$nlist"T; then
4031         mv -f "$nlist"T "$nlist"
4032       else
4033         rm -f "$nlist"T
4034       fi
4035
4036       # Make sure that we snagged all the symbols we need.
4037       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4038         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4039           cat <<EOF > conftest.$ac_ext
4040 #ifdef __cplusplus
4041 extern "C" {
4042 #endif
4043
4044 EOF
4045           # Now generate the symbol file.
4046           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4047
4048           cat <<EOF >> conftest.$ac_ext
4049 #if defined (__STDC__) && __STDC__
4050 # define lt_ptr void *
4051 #else
4052 # define lt_ptr char *
4053 # define const
4054 #endif
4055
4056 /* The mapping between symbol names and symbols. */
4057 const struct {
4058   const char *name;
4059   lt_ptr address;
4060 }
4061 lt_preloaded_symbols[] =
4062 {
4063 EOF
4064           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4065           cat <<\EOF >> conftest.$ac_ext
4066   {0, (lt_ptr) 0}
4067 };
4068
4069 #ifdef __cplusplus
4070 }
4071 #endif
4072 EOF
4073           # Now try linking the two files.
4074           mv conftest.$ac_objext conftstm.$ac_objext
4075           save_LIBS="$LIBS"
4076           save_CFLAGS="$CFLAGS"
4077           LIBS="conftstm.$ac_objext"
4078           CFLAGS="$CFLAGS$no_builtin_flag"
4079           if { (eval echo configure:4080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4080             pipe_works=yes
4081           fi
4082           LIBS="$save_LIBS"
4083           CFLAGS="$save_CFLAGS"
4084         else
4085           echo "cannot find nm_test_func in $nlist" >&5
4086         fi
4087       else
4088         echo "cannot find nm_test_var in $nlist" >&5
4089       fi
4090     else
4091       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4092     fi
4093   else
4094     echo "$progname: failed program was:" >&5
4095     cat conftest.$ac_ext >&5
4096   fi
4097   rm -f conftest* conftst*
4098
4099   # Do not use the global_symbol_pipe unless it works.
4100   if test "$pipe_works" = yes; then
4101     break
4102   else
4103     lt_cv_sys_global_symbol_pipe=
4104   fi
4105 done
4106
4107 fi
4108
4109 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4110 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4111   global_symbol_to_cdecl=
4112   global_symbol_to_c_name_address=
4113 else
4114   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4115   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4116 fi
4117 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4118 then
4119   echo "$ac_t""failed" 1>&6
4120 else
4121   echo "$ac_t""ok" 1>&6
4122 fi
4123
4124 for ac_hdr in dlfcn.h
4125 do
4126 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4127 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4128 echo "configure:4129: checking for $ac_hdr" >&5
4129 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4130   echo $ac_n "(cached) $ac_c" 1>&6
4131 else
4132   cat > conftest.$ac_ext <<EOF
4133 #line 4134 "configure"
4134 #include "confdefs.h"
4135 #include <$ac_hdr>
4136 EOF
4137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4138 { (eval echo configure:4139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4140 if test -z "$ac_err"; then
4141   rm -rf conftest*
4142   eval "ac_cv_header_$ac_safe=yes"
4143 else
4144   echo "$ac_err" >&5
4145   echo "configure: failed program was:" >&5
4146   cat conftest.$ac_ext >&5
4147   rm -rf conftest*
4148   eval "ac_cv_header_$ac_safe=no"
4149 fi
4150 rm -f conftest*
4151 fi
4152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4153   echo "$ac_t""yes" 1>&6
4154     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4155   cat >> confdefs.h <<EOF
4156 #define $ac_tr_hdr 1
4157 EOF
4158  
4159 else
4160   echo "$ac_t""no" 1>&6
4161 fi
4162 done
4163
4164
4165
4166
4167
4168
4169 # Only perform the check for file, if the check method requires it
4170 case $deplibs_check_method in
4171 file_magic*)
4172   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4173     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4174 echo "configure:4175: checking for ${ac_tool_prefix}file" >&5
4175 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4176   echo $ac_n "(cached) $ac_c" 1>&6
4177 else
4178   case $MAGIC_CMD in
4179   /*)
4180   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4181   ;;
4182   ?:/*)
4183   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4184   ;;
4185   *)
4186   ac_save_MAGIC_CMD="$MAGIC_CMD"
4187   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4188   ac_dummy="/usr/bin:$PATH"
4189   for ac_dir in $ac_dummy; do
4190     test -z "$ac_dir" && ac_dir=.
4191     if test -f $ac_dir/${ac_tool_prefix}file; then
4192       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4193       if test -n "$file_magic_test_file"; then
4194         case $deplibs_check_method in
4195         "file_magic "*)
4196           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4197           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4198           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4199             egrep "$file_magic_regex" > /dev/null; then
4200             :
4201           else
4202             cat <<EOF 1>&2
4203
4204 *** Warning: the command libtool uses to detect shared libraries,
4205 *** $file_magic_cmd, produces output that libtool cannot recognize.
4206 *** The result is that libtool may fail to recognize shared libraries
4207 *** as such.  This will affect the creation of libtool libraries that
4208 *** depend on shared libraries, but programs linked with such libtool
4209 *** libraries will work regardless of this problem.  Nevertheless, you
4210 *** may want to report the problem to your system manager and/or to
4211 *** bug-libtool@gnu.org
4212
4213 EOF
4214           fi ;;
4215         esac
4216       fi
4217       break
4218     fi
4219   done
4220   IFS="$ac_save_ifs"
4221   MAGIC_CMD="$ac_save_MAGIC_CMD"
4222   ;;
4223 esac
4224 fi
4225
4226 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4227 if test -n "$MAGIC_CMD"; then
4228   echo "$ac_t""$MAGIC_CMD" 1>&6
4229 else
4230   echo "$ac_t""no" 1>&6
4231 fi
4232
4233 if test -z "$lt_cv_path_MAGIC_CMD"; then
4234   if test -n "$ac_tool_prefix"; then
4235     echo $ac_n "checking for file""... $ac_c" 1>&6
4236 echo "configure:4237: checking for file" >&5
4237 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4238   echo $ac_n "(cached) $ac_c" 1>&6
4239 else
4240   case $MAGIC_CMD in
4241   /*)
4242   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4243   ;;
4244   ?:/*)
4245   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4246   ;;
4247   *)
4248   ac_save_MAGIC_CMD="$MAGIC_CMD"
4249   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4250   ac_dummy="/usr/bin:$PATH"
4251   for ac_dir in $ac_dummy; do
4252     test -z "$ac_dir" && ac_dir=.
4253     if test -f $ac_dir/file; then
4254       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4255       if test -n "$file_magic_test_file"; then
4256         case $deplibs_check_method in
4257         "file_magic "*)
4258           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4259           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4260           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4261             egrep "$file_magic_regex" > /dev/null; then
4262             :
4263           else
4264             cat <<EOF 1>&2
4265
4266 *** Warning: the command libtool uses to detect shared libraries,
4267 *** $file_magic_cmd, produces output that libtool cannot recognize.
4268 *** The result is that libtool may fail to recognize shared libraries
4269 *** as such.  This will affect the creation of libtool libraries that
4270 *** depend on shared libraries, but programs linked with such libtool
4271 *** libraries will work regardless of this problem.  Nevertheless, you
4272 *** may want to report the problem to your system manager and/or to
4273 *** bug-libtool@gnu.org
4274
4275 EOF
4276           fi ;;
4277         esac
4278       fi
4279       break
4280     fi
4281   done
4282   IFS="$ac_save_ifs"
4283   MAGIC_CMD="$ac_save_MAGIC_CMD"
4284   ;;
4285 esac
4286 fi
4287
4288 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4289 if test -n "$MAGIC_CMD"; then
4290   echo "$ac_t""$MAGIC_CMD" 1>&6
4291 else
4292   echo "$ac_t""no" 1>&6
4293 fi
4294
4295   else
4296     MAGIC_CMD=:
4297   fi
4298 fi
4299
4300   fi
4301   ;;
4302 esac
4303
4304 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4305 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4306 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4307 echo "configure:4308: checking for $ac_word" >&5
4308 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4309   echo $ac_n "(cached) $ac_c" 1>&6
4310 else
4311   if test -n "$RANLIB"; then
4312   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4313 else
4314   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4315   ac_dummy="$PATH"
4316   for ac_dir in $ac_dummy; do
4317     test -z "$ac_dir" && ac_dir=.
4318     if test -f $ac_dir/$ac_word; then
4319       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4320       break
4321     fi
4322   done
4323   IFS="$ac_save_ifs"
4324 fi
4325 fi
4326 RANLIB="$ac_cv_prog_RANLIB"
4327 if test -n "$RANLIB"; then
4328   echo "$ac_t""$RANLIB" 1>&6
4329 else
4330   echo "$ac_t""no" 1>&6
4331 fi
4332
4333
4334 if test -z "$ac_cv_prog_RANLIB"; then
4335 if test -n "$ac_tool_prefix"; then
4336   # Extract the first word of "ranlib", so it can be a program name with args.
4337 set dummy ranlib; ac_word=$2
4338 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4339 echo "configure:4340: checking for $ac_word" >&5
4340 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4341   echo $ac_n "(cached) $ac_c" 1>&6
4342 else
4343   if test -n "$RANLIB"; then
4344   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4345 else
4346   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4347   ac_dummy="$PATH"
4348   for ac_dir in $ac_dummy; do
4349     test -z "$ac_dir" && ac_dir=.
4350     if test -f $ac_dir/$ac_word; then
4351       ac_cv_prog_RANLIB="ranlib"
4352       break
4353     fi
4354   done
4355   IFS="$ac_save_ifs"
4356   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4357 fi
4358 fi
4359 RANLIB="$ac_cv_prog_RANLIB"
4360 if test -n "$RANLIB"; then
4361   echo "$ac_t""$RANLIB" 1>&6
4362 else
4363   echo "$ac_t""no" 1>&6
4364 fi
4365
4366 else
4367   RANLIB=":"
4368 fi
4369 fi
4370
4371 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4372 set dummy ${ac_tool_prefix}strip; ac_word=$2
4373 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4374 echo "configure:4375: checking for $ac_word" >&5
4375 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4376   echo $ac_n "(cached) $ac_c" 1>&6
4377 else
4378   if test -n "$STRIP"; then
4379   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4380 else
4381   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4382   ac_dummy="$PATH"
4383   for ac_dir in $ac_dummy; do
4384     test -z "$ac_dir" && ac_dir=.
4385     if test -f $ac_dir/$ac_word; then
4386       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4387       break
4388     fi
4389   done
4390   IFS="$ac_save_ifs"
4391 fi
4392 fi
4393 STRIP="$ac_cv_prog_STRIP"
4394 if test -n "$STRIP"; then
4395   echo "$ac_t""$STRIP" 1>&6
4396 else
4397   echo "$ac_t""no" 1>&6
4398 fi
4399
4400
4401 if test -z "$ac_cv_prog_STRIP"; then
4402 if test -n "$ac_tool_prefix"; then
4403   # Extract the first word of "strip", so it can be a program name with args.
4404 set dummy strip; ac_word=$2
4405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4406 echo "configure:4407: checking for $ac_word" >&5
4407 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4408   echo $ac_n "(cached) $ac_c" 1>&6
4409 else
4410   if test -n "$STRIP"; then
4411   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4412 else
4413   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4414   ac_dummy="$PATH"
4415   for ac_dir in $ac_dummy; do
4416     test -z "$ac_dir" && ac_dir=.
4417     if test -f $ac_dir/$ac_word; then
4418       ac_cv_prog_STRIP="strip"
4419       break
4420     fi
4421   done
4422   IFS="$ac_save_ifs"
4423   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4424 fi
4425 fi
4426 STRIP="$ac_cv_prog_STRIP"
4427 if test -n "$STRIP"; then
4428   echo "$ac_t""$STRIP" 1>&6
4429 else
4430   echo "$ac_t""no" 1>&6
4431 fi
4432
4433 else
4434   STRIP=":"
4435 fi
4436 fi
4437
4438
4439 enable_dlopen=yes
4440 enable_win32_dll=yes
4441
4442 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4443 if test "${enable_libtool_lock+set}" = set; then
4444   enableval="$enable_libtool_lock"
4445   :
4446 fi
4447
4448 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4449
4450 # Some flags need to be propagated to the compiler or linker for good
4451 # libtool support.
4452 case $host in
4453 *-*-irix6*)
4454   # Find out which ABI we are using.
4455   echo '#line 4456 "configure"' > conftest.$ac_ext
4456   if { (eval echo configure:4457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4457     case `/usr/bin/file conftest.$ac_objext` in
4458     *32-bit*)
4459       LD="${LD-ld} -32"
4460       ;;
4461     *N32*)
4462       LD="${LD-ld} -n32"
4463       ;;
4464     *64-bit*)
4465       LD="${LD-ld} -64"
4466       ;;
4467     esac
4468   fi
4469   rm -rf conftest*
4470   ;;
4471
4472 *-*-sco3.2v5*)
4473   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4474   SAVE_CFLAGS="$CFLAGS"
4475   CFLAGS="$CFLAGS -belf"
4476   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4477 echo "configure:4478: checking whether the C compiler needs -belf" >&5
4478 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4479   echo $ac_n "(cached) $ac_c" 1>&6
4480 else
4481   
4482      ac_ext=c
4483 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4484 ac_cpp='$CPP $CPPFLAGS'
4485 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4486 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4487 cross_compiling=$ac_cv_prog_cc_cross
4488
4489      cat > conftest.$ac_ext <<EOF
4490 #line 4491 "configure"
4491 #include "confdefs.h"
4492
4493 int main() {
4494
4495 ; return 0; }
4496 EOF
4497 if { (eval echo configure:4498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4498   rm -rf conftest*
4499   lt_cv_cc_needs_belf=yes
4500 else
4501   echo "configure: failed program was:" >&5
4502   cat conftest.$ac_ext >&5
4503   rm -rf conftest*
4504   lt_cv_cc_needs_belf=no
4505 fi
4506 rm -f conftest*
4507      ac_ext=c
4508 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4509 ac_cpp='$CPP $CPPFLAGS'
4510 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4511 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4512 cross_compiling=$ac_cv_prog_cc_cross
4513
4514 fi
4515
4516 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4517   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4518     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4519     CFLAGS="$SAVE_CFLAGS"
4520   fi
4521   ;;
4522
4523 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4524   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4525 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4526 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4527 echo "configure:4528: checking for $ac_word" >&5
4528 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4529   echo $ac_n "(cached) $ac_c" 1>&6
4530 else
4531   if test -n "$DLLTOOL"; then
4532   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4533 else
4534   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4535   ac_dummy="$PATH"
4536   for ac_dir in $ac_dummy; do
4537     test -z "$ac_dir" && ac_dir=.
4538     if test -f $ac_dir/$ac_word; then
4539       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4540       break
4541     fi
4542   done
4543   IFS="$ac_save_ifs"
4544 fi
4545 fi
4546 DLLTOOL="$ac_cv_prog_DLLTOOL"
4547 if test -n "$DLLTOOL"; then
4548   echo "$ac_t""$DLLTOOL" 1>&6
4549 else
4550   echo "$ac_t""no" 1>&6
4551 fi
4552
4553
4554 if test -z "$ac_cv_prog_DLLTOOL"; then
4555 if test -n "$ac_tool_prefix"; then
4556   # Extract the first word of "dlltool", so it can be a program name with args.
4557 set dummy dlltool; ac_word=$2
4558 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4559 echo "configure:4560: checking for $ac_word" >&5
4560 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4561   echo $ac_n "(cached) $ac_c" 1>&6
4562 else
4563   if test -n "$DLLTOOL"; then
4564   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4565 else
4566   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4567   ac_dummy="$PATH"
4568   for ac_dir in $ac_dummy; do
4569     test -z "$ac_dir" && ac_dir=.
4570     if test -f $ac_dir/$ac_word; then
4571       ac_cv_prog_DLLTOOL="dlltool"
4572       break
4573     fi
4574   done
4575   IFS="$ac_save_ifs"
4576   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4577 fi
4578 fi
4579 DLLTOOL="$ac_cv_prog_DLLTOOL"
4580 if test -n "$DLLTOOL"; then
4581   echo "$ac_t""$DLLTOOL" 1>&6
4582 else
4583   echo "$ac_t""no" 1>&6
4584 fi
4585
4586 else
4587   DLLTOOL="false"
4588 fi
4589 fi
4590
4591   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4592 set dummy ${ac_tool_prefix}as; ac_word=$2
4593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4594 echo "configure:4595: checking for $ac_word" >&5
4595 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4596   echo $ac_n "(cached) $ac_c" 1>&6
4597 else
4598   if test -n "$AS"; then
4599   ac_cv_prog_AS="$AS" # Let the user override the test.
4600 else
4601   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4602   ac_dummy="$PATH"
4603   for ac_dir in $ac_dummy; do
4604     test -z "$ac_dir" && ac_dir=.
4605     if test -f $ac_dir/$ac_word; then
4606       ac_cv_prog_AS="${ac_tool_prefix}as"
4607       break
4608     fi
4609   done
4610   IFS="$ac_save_ifs"
4611 fi
4612 fi
4613 AS="$ac_cv_prog_AS"
4614 if test -n "$AS"; then
4615   echo "$ac_t""$AS" 1>&6
4616 else
4617   echo "$ac_t""no" 1>&6
4618 fi
4619
4620
4621 if test -z "$ac_cv_prog_AS"; then
4622 if test -n "$ac_tool_prefix"; then
4623   # Extract the first word of "as", so it can be a program name with args.
4624 set dummy as; ac_word=$2
4625 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4626 echo "configure:4627: checking for $ac_word" >&5
4627 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4628   echo $ac_n "(cached) $ac_c" 1>&6
4629 else
4630   if test -n "$AS"; then
4631   ac_cv_prog_AS="$AS" # Let the user override the test.
4632 else
4633   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4634   ac_dummy="$PATH"
4635   for ac_dir in $ac_dummy; do
4636     test -z "$ac_dir" && ac_dir=.
4637     if test -f $ac_dir/$ac_word; then
4638       ac_cv_prog_AS="as"
4639       break
4640     fi
4641   done
4642   IFS="$ac_save_ifs"
4643   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4644 fi
4645 fi
4646 AS="$ac_cv_prog_AS"
4647 if test -n "$AS"; then
4648   echo "$ac_t""$AS" 1>&6
4649 else
4650   echo "$ac_t""no" 1>&6
4651 fi
4652
4653 else
4654   AS="false"
4655 fi
4656 fi
4657
4658   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4659 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4660 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4661 echo "configure:4662: checking for $ac_word" >&5
4662 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4663   echo $ac_n "(cached) $ac_c" 1>&6
4664 else
4665   if test -n "$OBJDUMP"; then
4666   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4667 else
4668   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4669   ac_dummy="$PATH"
4670   for ac_dir in $ac_dummy; do
4671     test -z "$ac_dir" && ac_dir=.
4672     if test -f $ac_dir/$ac_word; then
4673       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4674       break
4675     fi
4676   done
4677   IFS="$ac_save_ifs"
4678 fi
4679 fi
4680 OBJDUMP="$ac_cv_prog_OBJDUMP"
4681 if test -n "$OBJDUMP"; then
4682   echo "$ac_t""$OBJDUMP" 1>&6
4683 else
4684   echo "$ac_t""no" 1>&6
4685 fi
4686
4687
4688 if test -z "$ac_cv_prog_OBJDUMP"; then
4689 if test -n "$ac_tool_prefix"; then
4690   # Extract the first word of "objdump", so it can be a program name with args.
4691 set dummy objdump; ac_word=$2
4692 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4693 echo "configure:4694: checking for $ac_word" >&5
4694 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4695   echo $ac_n "(cached) $ac_c" 1>&6
4696 else
4697   if test -n "$OBJDUMP"; then
4698   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4699 else
4700   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4701   ac_dummy="$PATH"
4702   for ac_dir in $ac_dummy; do
4703     test -z "$ac_dir" && ac_dir=.
4704     if test -f $ac_dir/$ac_word; then
4705       ac_cv_prog_OBJDUMP="objdump"
4706       break
4707     fi
4708   done
4709   IFS="$ac_save_ifs"
4710   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4711 fi
4712 fi
4713 OBJDUMP="$ac_cv_prog_OBJDUMP"
4714 if test -n "$OBJDUMP"; then
4715   echo "$ac_t""$OBJDUMP" 1>&6
4716 else
4717   echo "$ac_t""no" 1>&6
4718 fi
4719
4720 else
4721   OBJDUMP="false"
4722 fi
4723 fi
4724
4725
4726   # recent cygwin and mingw systems supply a stub DllMain which the user
4727   # can override, but on older systems we have to supply one
4728   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4729 echo "configure:4730: checking if libtool should supply DllMain function" >&5
4730 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4731   echo $ac_n "(cached) $ac_c" 1>&6
4732 else
4733   cat > conftest.$ac_ext <<EOF
4734 #line 4735 "configure"
4735 #include "confdefs.h"
4736
4737 int main() {
4738 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4739       DllMain (0, 0, 0);
4740 ; return 0; }
4741 EOF
4742 if { (eval echo configure:4743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4743   rm -rf conftest*
4744   lt_cv_need_dllmain=no
4745 else
4746   echo "configure: failed program was:" >&5
4747   cat conftest.$ac_ext >&5
4748   rm -rf conftest*
4749   lt_cv_need_dllmain=yes
4750 fi
4751 rm -f conftest*
4752 fi
4753
4754 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4755
4756   case $host/$CC in
4757   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4758     # old mingw systems require "-dll" to link a DLL, while more recent ones
4759     # require "-mdll"
4760     SAVE_CFLAGS="$CFLAGS"
4761     CFLAGS="$CFLAGS -mdll"
4762     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4763 echo "configure:4764: checking how to link DLLs" >&5
4764 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4765   echo $ac_n "(cached) $ac_c" 1>&6
4766 else
4767   cat > conftest.$ac_ext <<EOF
4768 #line 4769 "configure"
4769 #include "confdefs.h"
4770
4771 int main() {
4772
4773 ; return 0; }
4774 EOF
4775 if { (eval echo configure:4776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4776   rm -rf conftest*
4777   lt_cv_cc_dll_switch=-mdll
4778 else
4779   echo "configure: failed program was:" >&5
4780   cat conftest.$ac_ext >&5
4781   rm -rf conftest*
4782   lt_cv_cc_dll_switch=-dll
4783 fi
4784 rm -f conftest*
4785 fi
4786
4787 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4788     CFLAGS="$SAVE_CFLAGS" ;;
4789   *-*-cygwin* | *-*-pw32*)
4790     # cygwin systems need to pass --dll to the linker, and not link
4791     # crt.o which will require a WinMain@16 definition.
4792     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4793   esac
4794   ;;
4795   
4796 esac
4797
4798 # Sed substitution that helps us do robust quoting.  It backslashifies
4799 # metacharacters that are still active within double-quoted strings.
4800 Xsed='sed -e s/^X//'
4801 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4802
4803 # Same as above, but do not quote variable references.
4804 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4805
4806 # Sed substitution to delay expansion of an escaped shell variable in a
4807 # double_quote_subst'ed string.
4808 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4809
4810 # Constants:
4811 rm="rm -f"
4812
4813 # Global variables:
4814 default_ofile=libtool
4815 can_build_shared=yes
4816
4817 # All known linkers require a `.a' archive for static linking (except M$VC,
4818 # which needs '.lib').
4819 libext=a
4820 ltmain="$ac_aux_dir/ltmain.sh"
4821 ofile="$default_ofile"
4822 with_gnu_ld="$lt_cv_prog_gnu_ld"
4823 need_locks="$enable_libtool_lock"
4824
4825 old_CC="$CC"
4826 old_CFLAGS="$CFLAGS"
4827
4828 # Set sane defaults for various variables
4829 test -z "$AR" && AR=ar
4830 test -z "$AR_FLAGS" && AR_FLAGS=cru
4831 test -z "$AS" && AS=as
4832 test -z "$CC" && CC=cc
4833 test -z "$DLLTOOL" && DLLTOOL=dlltool
4834 test -z "$LD" && LD=ld
4835 test -z "$LN_S" && LN_S="ln -s"
4836 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4837 test -z "$NM" && NM=nm
4838 test -z "$OBJDUMP" && OBJDUMP=objdump
4839 test -z "$RANLIB" && RANLIB=:
4840 test -z "$STRIP" && STRIP=:
4841 test -z "$ac_objext" && ac_objext=o
4842
4843 if test x"$host" != x"$build"; then
4844   ac_tool_prefix=${host_alias}-
4845 else
4846   ac_tool_prefix=
4847 fi
4848
4849 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4850 case $host_os in
4851 linux-gnu*) ;;
4852 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4853 esac
4854
4855 case $host_os in
4856 aix3*)
4857   # AIX sometimes has problems with the GCC collect2 program.  For some
4858   # reason, if we set the COLLECT_NAMES environment variable, the problems
4859   # vanish in a puff of smoke.
4860   if test "X${COLLECT_NAMES+set}" != Xset; then
4861     COLLECT_NAMES=
4862     export COLLECT_NAMES
4863   fi
4864   ;;
4865 esac
4866
4867 # Determine commands to create old-style static archives.
4868 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4869 old_postinstall_cmds='chmod 644 $oldlib'
4870 old_postuninstall_cmds=
4871
4872 if test -n "$RANLIB"; then
4873   case $host_os in
4874   openbsd*)
4875     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4876     ;;
4877   *)
4878     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4879     ;;
4880   esac
4881   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4882 fi
4883
4884 # Allow CC to be a program name with arguments.
4885 set dummy $CC
4886 compiler="$2"
4887
4888 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4889 echo "configure:4890: checking for objdir" >&5
4890 rm -f .libs 2>/dev/null
4891 mkdir .libs 2>/dev/null
4892 if test -d .libs; then
4893   objdir=.libs
4894 else
4895   # MS-DOS does not allow filenames that begin with a dot.
4896   objdir=_libs
4897 fi
4898 rmdir .libs 2>/dev/null
4899 echo "$ac_t""$objdir" 1>&6
4900
4901
4902 # Check whether --with-pic or --without-pic was given.
4903 if test "${with_pic+set}" = set; then
4904   withval="$with_pic"
4905   pic_mode="$withval"
4906 else
4907   pic_mode=default
4908 fi
4909
4910 test -z "$pic_mode" && pic_mode=default
4911
4912 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4913 # in isolation, and that seeing it set (from the cache) indicates that
4914 # the associated values are set (in the cache) correctly too.
4915 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4916 echo "configure:4917: checking for $compiler option to produce PIC" >&5
4917 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4918   echo $ac_n "(cached) $ac_c" 1>&6
4919 else
4920    lt_cv_prog_cc_pic=
4921   lt_cv_prog_cc_shlib=
4922   lt_cv_prog_cc_wl=
4923   lt_cv_prog_cc_static=
4924   lt_cv_prog_cc_no_builtin=
4925   lt_cv_prog_cc_can_build_shared=$can_build_shared
4926
4927   if test "$GCC" = yes; then
4928     lt_cv_prog_cc_wl='-Wl,'
4929     lt_cv_prog_cc_static='-static'
4930
4931     case $host_os in
4932     aix*)
4933       # Below there is a dirty hack to force normal static linking with -ldl
4934       # The problem is because libdl dynamically linked with both libc and
4935       # libC (AIX C++ library), which obviously doesn't included in libraries
4936       # list by gcc. This cause undefined symbols with -static flags.
4937       # This hack allows C programs to be linked with "-static -ldl", but
4938       # not sure about C++ programs.
4939       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4940       ;;
4941     amigaos*)
4942       # FIXME: we need at least 68020 code to build shared libraries, but
4943       # adding the `-m68020' flag to GCC prevents building anything better,
4944       # like `-m68040'.
4945       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4946       ;;
4947     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4948       # PIC is the default for these OSes.
4949       ;;
4950     darwin* | rhapsody*)
4951       # PIC is the default on this platform
4952       # Common symbols not allowed in MH_DYLIB files
4953       lt_cv_prog_cc_pic='-fno-common'
4954       ;;
4955     cygwin* | mingw* | pw32* | os2*)
4956       # This hack is so that the source file can tell whether it is being
4957       # built for inclusion in a dll (and should export symbols for example).
4958       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4959       ;;
4960     sysv4*MP*)
4961       if test -d /usr/nec; then
4962          lt_cv_prog_cc_pic=-Kconform_pic
4963       fi
4964       ;;
4965     *)
4966       lt_cv_prog_cc_pic='-fPIC'
4967       ;;
4968     esac
4969   else
4970     # PORTME Check for PIC flags for the system compiler.
4971     case $host_os in
4972     aix3* | aix4* | aix5*)
4973       lt_cv_prog_cc_wl='-Wl,'
4974       # All AIX code is PIC.
4975       if test "$host_cpu" = ia64; then
4976         # AIX 5 now supports IA64 processor
4977         lt_cv_prog_cc_static='-Bstatic'
4978       else
4979         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4980       fi
4981       ;;
4982
4983     hpux9* | hpux10* | hpux11*)
4984       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4985       lt_cv_prog_cc_wl='-Wl,'
4986       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4987       lt_cv_prog_cc_pic='+Z'
4988       ;;
4989
4990     irix5* | irix6* | nonstopux*)
4991       lt_cv_prog_cc_wl='-Wl,'
4992       lt_cv_prog_cc_static='-non_shared'
4993       # PIC (with -KPIC) is the default.
4994       ;;
4995
4996     cygwin* | mingw* | pw32* | os2*)
4997       # This hack is so that the source file can tell whether it is being
4998       # built for inclusion in a dll (and should export symbols for example).
4999       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5000       ;;
5001
5002     newsos6)
5003       lt_cv_prog_cc_pic='-KPIC'
5004       lt_cv_prog_cc_static='-Bstatic'
5005       ;;
5006     
5007     openedition)
5008       # XPLINK code is PIC by default
5009       ;;
5010
5011     osf3* | osf4* | osf5*)
5012       # All OSF/1 code is PIC.
5013       lt_cv_prog_cc_wl='-Wl,'
5014       lt_cv_prog_cc_static='-non_shared'
5015       ;;
5016
5017     sco3.2v5*)
5018       lt_cv_prog_cc_pic='-Kpic'
5019       lt_cv_prog_cc_static='-dn'
5020       lt_cv_prog_cc_shlib='-belf'
5021       ;;
5022
5023     solaris*)
5024       lt_cv_prog_cc_pic='-KPIC'
5025       lt_cv_prog_cc_static='-Bstatic'
5026       lt_cv_prog_cc_wl='-Wl,'
5027       ;;
5028
5029     sunos4*)
5030       lt_cv_prog_cc_pic='-PIC'
5031       lt_cv_prog_cc_static='-Bstatic'
5032       lt_cv_prog_cc_wl='-Qoption ld '
5033       ;;
5034
5035     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5036       lt_cv_prog_cc_pic='-KPIC'
5037       lt_cv_prog_cc_static='-Bstatic'
5038       lt_cv_prog_cc_wl='-Wl,'
5039       ;;
5040
5041     uts4*)
5042       lt_cv_prog_cc_pic='-pic'
5043       lt_cv_prog_cc_static='-Bstatic'
5044       ;;
5045
5046     sysv4*MP*)
5047       if test -d /usr/nec ;then
5048         lt_cv_prog_cc_pic='-Kconform_pic'
5049         lt_cv_prog_cc_static='-Bstatic'
5050       fi
5051       ;;
5052
5053     *)
5054       lt_cv_prog_cc_can_build_shared=no
5055       ;;
5056     esac
5057   fi
5058
5059 fi
5060
5061 if test -z "$lt_cv_prog_cc_pic"; then
5062   echo "$ac_t""none" 1>&6
5063 else
5064   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5065
5066   # Check to make sure the pic_flag actually works.
5067   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5068 echo "configure:5069: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5069   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5070   echo $ac_n "(cached) $ac_c" 1>&6
5071 else
5072       save_CFLAGS="$CFLAGS"
5073     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5074     cat > conftest.$ac_ext <<EOF
5075 #line 5076 "configure"
5076 #include "confdefs.h"
5077
5078 int main() {
5079
5080 ; return 0; }
5081 EOF
5082 if { (eval echo configure:5083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5083   rm -rf conftest*
5084         case $host_os in
5085       hpux9* | hpux10* | hpux11*)
5086         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5087         # they create non-PIC objects.  So, if there were any warnings, we
5088         # assume that PIC is not supported.
5089         if test -s conftest.err; then
5090           lt_cv_prog_cc_pic_works=no
5091         else
5092           lt_cv_prog_cc_pic_works=yes
5093         fi
5094         ;;
5095       *)
5096         lt_cv_prog_cc_pic_works=yes
5097         ;;
5098       esac
5099     
5100 else
5101   echo "configure: failed program was:" >&5
5102   cat conftest.$ac_ext >&5
5103   rm -rf conftest*
5104         lt_cv_prog_cc_pic_works=no
5105     
5106 fi
5107 rm -f conftest*
5108     CFLAGS="$save_CFLAGS"
5109   
5110 fi
5111
5112
5113   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5114     lt_cv_prog_cc_pic=
5115     lt_cv_prog_cc_can_build_shared=no
5116   else
5117     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5118   fi
5119
5120   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5121 fi
5122
5123 # Check for any special shared library compilation flags.
5124 if test -n "$lt_cv_prog_cc_shlib"; then
5125   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5126   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5127   else
5128    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5129     lt_cv_prog_cc_can_build_shared=no
5130   fi
5131 fi
5132
5133 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5134 echo "configure:5135: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5135 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5136   echo $ac_n "(cached) $ac_c" 1>&6
5137 else
5138     lt_cv_prog_cc_static_works=no
5139   save_LDFLAGS="$LDFLAGS"
5140   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5141   cat > conftest.$ac_ext <<EOF
5142 #line 5143 "configure"
5143 #include "confdefs.h"
5144
5145 int main() {
5146
5147 ; return 0; }
5148 EOF
5149 if { (eval echo configure:5150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5150   rm -rf conftest*
5151   lt_cv_prog_cc_static_works=yes
5152 else
5153   echo "configure: failed program was:" >&5
5154   cat conftest.$ac_ext >&5
5155 fi
5156 rm -f conftest*
5157   LDFLAGS="$save_LDFLAGS"
5158
5159 fi
5160
5161
5162 # Belt *and* braces to stop my trousers falling down:
5163 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5164 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5165
5166 pic_flag="$lt_cv_prog_cc_pic"
5167 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5168 wl="$lt_cv_prog_cc_wl"
5169 link_static_flag="$lt_cv_prog_cc_static"
5170 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5171 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5172
5173
5174 # Check to see if options -o and -c are simultaneously supported by compiler
5175 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5176 echo "configure:5177: checking if $compiler supports -c -o file.$ac_objext" >&5
5177 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5178   echo $ac_n "(cached) $ac_c" 1>&6
5179 else
5180   
5181 $rm -r conftest 2>/dev/null
5182 mkdir conftest
5183 cd conftest
5184 echo "int some_variable = 0;" > conftest.$ac_ext
5185 mkdir out
5186 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5187 # that will create temporary files in the current directory regardless of
5188 # the output directory.  Thus, making CWD read-only will cause this test
5189 # to fail, enabling locking or at least warning the user not to do parallel
5190 # builds.
5191 chmod -w .
5192 save_CFLAGS="$CFLAGS"
5193 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5194 compiler_c_o=no
5195 if { (eval echo configure:5196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5196   # The compiler can only warn and ignore the option if not recognized
5197   # So say no if there are warnings
5198   if test -s out/conftest.err; then
5199     lt_cv_compiler_c_o=no
5200   else
5201     lt_cv_compiler_c_o=yes
5202   fi
5203 else
5204   # Append any errors to the config.log.
5205   cat out/conftest.err 1>&5
5206   lt_cv_compiler_c_o=no
5207 fi
5208 CFLAGS="$save_CFLAGS"
5209 chmod u+w .
5210 $rm conftest* out/*
5211 rmdir out
5212 cd ..
5213 rmdir conftest
5214 $rm -r conftest 2>/dev/null
5215
5216 fi
5217
5218 compiler_c_o=$lt_cv_compiler_c_o
5219 echo "$ac_t""$compiler_c_o" 1>&6
5220
5221 if test x"$compiler_c_o" = x"yes"; then
5222   # Check to see if we can write to a .lo
5223   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5224 echo "configure:5225: checking if $compiler supports -c -o file.lo" >&5
5225   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5226   echo $ac_n "(cached) $ac_c" 1>&6
5227 else
5228   
5229   lt_cv_compiler_o_lo=no
5230   save_CFLAGS="$CFLAGS"
5231   CFLAGS="$CFLAGS -c -o conftest.lo"
5232   save_objext="$ac_objext"
5233   ac_objext=lo
5234   cat > conftest.$ac_ext <<EOF
5235 #line 5236 "configure"
5236 #include "confdefs.h"
5237
5238 int main() {
5239 int some_variable = 0;
5240 ; return 0; }
5241 EOF
5242 if { (eval echo configure:5243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5243   rm -rf conftest*
5244       # The compiler can only warn and ignore the option if not recognized
5245     # So say no if there are warnings
5246     if test -s conftest.err; then
5247       lt_cv_compiler_o_lo=no
5248     else
5249       lt_cv_compiler_o_lo=yes
5250     fi
5251   
5252 else
5253   echo "configure: failed program was:" >&5
5254   cat conftest.$ac_ext >&5
5255 fi
5256 rm -f conftest*
5257   ac_objext="$save_objext"
5258   CFLAGS="$save_CFLAGS"
5259   
5260 fi
5261
5262   compiler_o_lo=$lt_cv_compiler_o_lo
5263   echo "$ac_t""$compiler_o_lo" 1>&6
5264 else
5265   compiler_o_lo=no
5266 fi
5267
5268 # Check to see if we can do hard links to lock some files if needed
5269 hard_links="nottested"
5270 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5271   # do not overwrite the value of need_locks provided by the user
5272   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5273 echo "configure:5274: checking if we can lock with hard links" >&5
5274   hard_links=yes
5275   $rm conftest*
5276   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5277   touch conftest.a
5278   ln conftest.a conftest.b 2>&5 || hard_links=no
5279   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5280   echo "$ac_t""$hard_links" 1>&6
5281   if test "$hard_links" = no; then
5282     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5283     need_locks=warn
5284   fi
5285 else
5286   need_locks=no
5287 fi
5288
5289 if test "$GCC" = yes; then
5290   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5291   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5292 echo "configure:5293: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5293   echo "int some_variable = 0;" > conftest.$ac_ext
5294   save_CFLAGS="$CFLAGS"
5295   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5296   compiler_rtti_exceptions=no
5297   cat > conftest.$ac_ext <<EOF
5298 #line 5299 "configure"
5299 #include "confdefs.h"
5300
5301 int main() {
5302 int some_variable = 0;
5303 ; return 0; }
5304 EOF
5305 if { (eval echo configure:5306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5306   rm -rf conftest*
5307       # The compiler can only warn and ignore the option if not recognized
5308     # So say no if there are warnings
5309     if test -s conftest.err; then
5310       compiler_rtti_exceptions=no
5311     else
5312       compiler_rtti_exceptions=yes
5313     fi
5314   
5315 else
5316   echo "configure: failed program was:" >&5
5317   cat conftest.$ac_ext >&5
5318 fi
5319 rm -f conftest*
5320   CFLAGS="$save_CFLAGS"
5321   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5322
5323   if test "$compiler_rtti_exceptions" = "yes"; then
5324     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5325   else
5326     no_builtin_flag=' -fno-builtin'
5327   fi
5328 fi
5329
5330 # See if the linker supports building shared libraries.
5331 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5332 echo "configure:5333: checking whether the linker ($LD) supports shared libraries" >&5
5333
5334 allow_undefined_flag=
5335 no_undefined_flag=
5336 need_lib_prefix=unknown
5337 need_version=unknown
5338 # when you set need_version to no, make sure it does not cause -set_version
5339 # flags to be left without arguments
5340 archive_cmds=
5341 archive_expsym_cmds=
5342 old_archive_from_new_cmds=
5343 old_archive_from_expsyms_cmds=
5344 export_dynamic_flag_spec=
5345 whole_archive_flag_spec=
5346 thread_safe_flag_spec=
5347 hardcode_into_libs=no
5348 hardcode_libdir_flag_spec=
5349 hardcode_libdir_separator=
5350 hardcode_direct=no
5351 hardcode_minus_L=no
5352 hardcode_shlibpath_var=unsupported
5353 runpath_var=
5354 link_all_deplibs=unknown
5355 always_export_symbols=no
5356 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5357 # include_expsyms should be a list of space-separated symbols to be *always*
5358 # included in the symbol list
5359 include_expsyms=
5360 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5361 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5362 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5363 # as well as any symbol that contains `d'.
5364 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5365 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5366 # platforms (ab)use it in PIC code, but their linkers get confused if
5367 # the symbol is explicitly referenced.  Since portable code cannot
5368 # rely on this symbol name, it's probably fine to never include it in
5369 # preloaded symbol tables.
5370 extract_expsyms_cmds=
5371
5372 case $host_os in
5373 cygwin* | mingw* | pw32*)
5374   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5375   # When not using gcc, we currently assume that we are using
5376   # Microsoft Visual C++.
5377   if test "$GCC" != yes; then
5378     with_gnu_ld=no
5379   fi
5380   ;;
5381 openbsd*)
5382   with_gnu_ld=no
5383   ;;
5384 esac
5385
5386 ld_shlibs=yes
5387 if test "$with_gnu_ld" = yes; then
5388   # If archive_cmds runs LD, not CC, wlarc should be empty
5389   wlarc='${wl}'
5390
5391   # See if GNU ld supports shared libraries.
5392   case $host_os in
5393   aix3* | aix4* | aix5*)
5394     # On AIX, the GNU linker is very broken
5395     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5396     ld_shlibs=no
5397     cat <<EOF 1>&2
5398
5399 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5400 *** to be unable to reliably create shared libraries on AIX.
5401 *** Therefore, libtool is disabling shared libraries support.  If you
5402 *** really care for shared libraries, you may want to modify your PATH
5403 *** so that a non-GNU linker is found, and then restart.
5404
5405 EOF
5406     ;;
5407
5408   amigaos*)
5409     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)'
5410     hardcode_libdir_flag_spec='-L$libdir'
5411     hardcode_minus_L=yes
5412
5413     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5414     # that the semantics of dynamic libraries on AmigaOS, at least up
5415     # to version 4, is to share data among multiple programs linked
5416     # with the same dynamic library.  Since this doesn't match the
5417     # behavior of shared libraries on other platforms, we can use
5418     # them.
5419     ld_shlibs=no
5420     ;;
5421
5422   beos*)
5423     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5424       allow_undefined_flag=unsupported
5425       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5426       # support --undefined.  This deserves some investigation.  FIXME
5427       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5428     else
5429       ld_shlibs=no
5430     fi
5431     ;;
5432
5433   cygwin* | mingw* | pw32*)
5434     # hardcode_libdir_flag_spec is actually meaningless, as there is
5435     # no search path for DLLs.
5436     hardcode_libdir_flag_spec='-L$libdir'
5437     allow_undefined_flag=unsupported
5438     always_export_symbols=yes
5439
5440     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5441       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5442       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5443       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5444       else $CC -o impgen impgen.c ; fi)~
5445       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5446
5447     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5448
5449     # cygwin and mingw dlls have different entry points and sets of symbols
5450     # to exclude.
5451     # FIXME: what about values for MSVC?
5452     dll_entry=__cygwin_dll_entry@12
5453     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5454     case $host_os in
5455     mingw*)
5456       # mingw values
5457       dll_entry=_DllMainCRTStartup@12
5458       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5459       ;;
5460     esac
5461
5462     # mingw and cygwin differ, and it's simplest to just exclude the union
5463     # of the two symbol sets.
5464     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5465
5466     # recent cygwin and mingw systems supply a stub DllMain which the user
5467     # can override, but on older systems we have to supply one (in ltdll.c)
5468     if test "x$lt_cv_need_dllmain" = "xyes"; then
5469       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5470       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~
5471         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5472     else
5473       ltdll_obj=
5474       ltdll_cmds=
5475     fi
5476
5477     # Extract the symbol export list from an `--export-all' def file,
5478     # then regenerate the def file from the symbol export list, so that
5479     # the compiled dll only exports the symbol export list.
5480     # Be careful not to strip the DATA tag left be newer dlltools.
5481     export_symbols_cmds="$ltdll_cmds"'
5482       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5483       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5484
5485     # If the export-symbols file already is a .def file (1st line
5486     # is EXPORTS), use it as is.
5487     # If DATA tags from a recent dlltool are present, honour them!
5488     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5489         cp $export_symbols $output_objdir/$soname-def;
5490       else
5491         echo EXPORTS > $output_objdir/$soname-def;
5492         _lt_hint=1;
5493         cat $export_symbols | while read symbol; do
5494          set dummy \$symbol;
5495          case \$# in
5496            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5497            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5498            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5499          esac;
5500          _lt_hint=`expr 1 + \$_lt_hint`;
5501         done;
5502       fi~
5503       '"$ltdll_cmds"'
5504       $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~
5505       $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~
5506       $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~
5507       $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~
5508       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5509     ;;
5510
5511   netbsd*)
5512     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5513       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5514       wlarc=
5515     else
5516       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5517       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5518     fi
5519     ;;
5520
5521   solaris* | sysv5*)
5522     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5523       ld_shlibs=no
5524       cat <<EOF 1>&2
5525
5526 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5527 *** create shared libraries on Solaris systems.  Therefore, libtool
5528 *** is disabling shared libraries support.  We urge you to upgrade GNU
5529 *** binutils to release 2.9.1 or newer.  Another option is to modify
5530 *** your PATH or compiler configuration so that the native linker is
5531 *** used, and then restart.
5532
5533 EOF
5534     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5535       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5536       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5537     else
5538       ld_shlibs=no
5539     fi
5540     ;;
5541
5542   sunos4*)
5543     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5544     wlarc=
5545     hardcode_direct=yes
5546     hardcode_shlibpath_var=no
5547     ;;
5548
5549   *)
5550     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5551       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5552       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5553     else
5554       ld_shlibs=no
5555     fi
5556     ;;
5557   esac
5558
5559   if test "$ld_shlibs" = yes; then
5560     runpath_var=LD_RUN_PATH
5561     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5562     export_dynamic_flag_spec='${wl}--export-dynamic'
5563     case $host_os in
5564     cygwin* | mingw* | pw32*)
5565       # dlltool doesn't understand --whole-archive et. al.
5566       whole_archive_flag_spec=
5567       ;;
5568     *)
5569       # ancient GNU ld didn't support --whole-archive et. al.
5570       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5571         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5572       else
5573         whole_archive_flag_spec=
5574       fi
5575       ;;
5576     esac
5577   fi
5578 else
5579   # PORTME fill in a description of your system's linker (not GNU ld)
5580   case $host_os in
5581   aix3*)
5582     allow_undefined_flag=unsupported
5583     always_export_symbols=yes
5584     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'
5585     # Note: this linker hardcodes the directories in LIBPATH if there
5586     # are no directories specified by -L.
5587     hardcode_minus_L=yes
5588     if test "$GCC" = yes && test -z "$link_static_flag"; then
5589       # Neither direct hardcoding nor static linking is supported with a
5590       # broken collect2.
5591       hardcode_direct=unsupported
5592     fi
5593     ;;
5594
5595   aix4* | aix5*)
5596     if test "$host_cpu" = ia64; then
5597       # On IA64, the linker does run time linking by default, so we don't
5598       # have to do anything special.
5599       aix_use_runtimelinking=no
5600       exp_sym_flag='-Bexport'
5601       no_entry_flag=""
5602     else
5603       aix_use_runtimelinking=no
5604
5605       # Test if we are trying to use run time linking or normal
5606       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5607       # need to do runtime linking.
5608       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5609         for ld_flag in $LDFLAGS; do
5610           case $ld_flag in
5611           *-brtl*)
5612             aix_use_runtimelinking=yes
5613             break
5614           ;;
5615           esac
5616         done
5617       esac
5618
5619       exp_sym_flag='-bexport'
5620       no_entry_flag='-bnoentry'
5621     fi
5622
5623     # When large executables or shared objects are built, AIX ld can
5624     # have problems creating the table of contents.  If linking a library
5625     # or program results in "error TOC overflow" add -mminimal-toc to
5626     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5627     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5628
5629     hardcode_direct=yes
5630     archive_cmds=''
5631     hardcode_libdir_separator=':'
5632     if test "$GCC" = yes; then
5633       case $host_os in aix4.[012]|aix4.[012].*)
5634         collect2name=`${CC} -print-prog-name=collect2`
5635         if test -f "$collect2name" && \
5636           strings "$collect2name" | grep resolve_lib_name >/dev/null
5637         then
5638           # We have reworked collect2
5639           hardcode_direct=yes
5640         else
5641           # We have old collect2
5642           hardcode_direct=unsupported
5643           # It fails to find uninstalled libraries when the uninstalled
5644           # path is not listed in the libpath.  Setting hardcode_minus_L
5645           # to unsupported forces relinking
5646           hardcode_minus_L=yes
5647           hardcode_libdir_flag_spec='-L$libdir'
5648           hardcode_libdir_separator=
5649         fi
5650       esac
5651
5652       shared_flag='-shared'
5653     else
5654       # not using gcc
5655       if test "$host_cpu" = ia64; then
5656         shared_flag='${wl}-G'
5657       else
5658         if test "$aix_use_runtimelinking" = yes; then
5659           shared_flag='${wl}-G'
5660         else
5661           shared_flag='${wl}-bM:SRE'
5662         fi
5663       fi
5664     fi
5665
5666     # It seems that -bexpall can do strange things, so it is better to
5667     # generate a list of symbols to export.
5668     always_export_symbols=yes
5669     if test "$aix_use_runtimelinking" = yes; then
5670       # Warning - without using the other runtime loading flags (-brtl),
5671       # -berok will link without error, but may produce a broken library.
5672       allow_undefined_flag='-berok'
5673       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5674       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"
5675     else
5676       if test "$host_cpu" = ia64; then
5677         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5678         allow_undefined_flag="-z nodefs"
5679         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"
5680       else
5681         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5682         # Warning - without using the other run time loading flags,
5683         # -berok will link without error, but may produce a broken library.
5684         allow_undefined_flag='${wl}-berok'
5685         # This is a bit strange, but is similar to how AIX traditionally builds
5686         # it's shared libraries.
5687         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'
5688       fi
5689     fi
5690     ;;
5691
5692   amigaos*)
5693     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)'
5694     hardcode_libdir_flag_spec='-L$libdir'
5695     hardcode_minus_L=yes
5696     # see comment about different semantics on the GNU ld section
5697     ld_shlibs=no
5698     ;;
5699
5700   cygwin* | mingw* | pw32*)
5701     # When not using gcc, we currently assume that we are using
5702     # Microsoft Visual C++.
5703     # hardcode_libdir_flag_spec is actually meaningless, as there is
5704     # no search path for DLLs.
5705     hardcode_libdir_flag_spec=' '
5706     allow_undefined_flag=unsupported
5707     # Tell ltmain to make .lib files, not .a files.
5708     libext=lib
5709     # FIXME: Setting linknames here is a bad hack.
5710     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5711     # The linker will automatically build a .lib file if we build a DLL.
5712     old_archive_from_new_cmds='true'
5713     # FIXME: Should let the user specify the lib program.
5714     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5715     fix_srcfile_path='`cygpath -w "$srcfile"`'
5716     ;;
5717
5718   darwin* | rhapsody*)
5719     case "$host_os" in
5720     rhapsody* | darwin1.[012])
5721       allow_undefined_flag='-undefined suppress'
5722       ;;
5723     *) # Darwin 1.3 on
5724       allow_undefined_flag='-flat_namespace -undefined suppress'
5725       ;;
5726     esac
5727     # FIXME: Relying on posixy $() will cause problems for
5728     #        cross-compilation, but unfortunately the echo tests do not
5729     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5730     #        `"' quotes if we put them in here... so don't!
5731     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)'
5732     # We need to add '_' to the symbols in $export_symbols first
5733     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5734     hardcode_direct=yes
5735     hardcode_shlibpath_var=no
5736     whole_archive_flag_spec='-all_load $convenience'
5737     ;;
5738
5739   freebsd1*)
5740     ld_shlibs=no
5741     ;;
5742
5743   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5744   # support.  Future versions do this automatically, but an explicit c++rt0.o
5745   # does not break anything, and helps significantly (at the cost of a little
5746   # extra space).
5747   freebsd2.2*)
5748     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5749     hardcode_libdir_flag_spec='-R$libdir'
5750     hardcode_direct=yes
5751     hardcode_shlibpath_var=no
5752     ;;
5753
5754   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5755   freebsd2*)
5756     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5757     hardcode_direct=yes
5758     hardcode_minus_L=yes
5759     hardcode_shlibpath_var=no
5760     ;;
5761
5762   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5763   freebsd*)
5764     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5765     hardcode_libdir_flag_spec='-R$libdir'
5766     hardcode_direct=yes
5767     hardcode_shlibpath_var=no
5768     ;;
5769
5770   hpux9* | hpux10* | hpux11*)
5771     case $host_os in
5772     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' ;;
5773     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5774     esac
5775     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5776     hardcode_libdir_separator=:
5777     hardcode_direct=yes
5778     hardcode_minus_L=yes # Not in the search PATH, but as the default
5779                          # location of the library.
5780     export_dynamic_flag_spec='${wl}-E'
5781     ;;
5782
5783   irix5* | irix6* | nonstopux*)
5784     if test "$GCC" = yes; then
5785       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'
5786       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5787     else
5788       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'
5789       hardcode_libdir_flag_spec='-rpath $libdir'
5790     fi
5791     hardcode_libdir_separator=:
5792     link_all_deplibs=yes
5793     ;;
5794
5795   netbsd*)
5796     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5797       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5798     else
5799       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5800     fi
5801     hardcode_libdir_flag_spec='-R$libdir'
5802     hardcode_direct=yes
5803     hardcode_shlibpath_var=no
5804     ;;
5805
5806   newsos6)
5807     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5808     hardcode_direct=yes
5809     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5810     hardcode_libdir_separator=:
5811     hardcode_shlibpath_var=no
5812     ;;
5813
5814   openbsd*)
5815     hardcode_direct=yes
5816     hardcode_shlibpath_var=no
5817     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5818       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5819       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5820       export_dynamic_flag_spec='${wl}-E'
5821     else
5822       case "$host_os" in
5823       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5824         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5825         hardcode_libdir_flag_spec='-R$libdir'
5826         ;;
5827       *)
5828         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5829         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5830         ;;
5831       esac
5832     fi
5833     ;;
5834
5835   openedition*)
5836     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5837         cp \$linknames \$output_objdir && linknames=''"
5838     export_dynamic_flag_spec="-Wl,DLL"
5839     ;;
5840
5841   os2*)
5842     hardcode_libdir_flag_spec='-L$libdir'
5843     hardcode_minus_L=yes
5844     allow_undefined_flag=unsupported
5845     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'
5846     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5847     ;;
5848
5849   osf3*)
5850     if test "$GCC" = yes; then
5851       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5852       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'
5853     else
5854       allow_undefined_flag=' -expect_unresolved \*'
5855       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'
5856     fi
5857     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5858     hardcode_libdir_separator=:
5859     ;;
5860
5861   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5862     if test "$GCC" = yes; then
5863       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5864       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'
5865       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5866     else
5867       allow_undefined_flag=' -expect_unresolved \*'
5868       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'
5869       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5870       $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'
5871
5872       #Both c and cxx compiler support -rpath directly
5873       hardcode_libdir_flag_spec='-rpath $libdir'
5874     fi
5875     hardcode_libdir_separator=:
5876     ;;
5877
5878   sco3.2v5*)
5879     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5880     hardcode_shlibpath_var=no
5881     runpath_var=LD_RUN_PATH
5882     hardcode_runpath_var=yes
5883     export_dynamic_flag_spec='${wl}-Bexport'
5884     ;;
5885
5886   solaris*)
5887     # gcc --version < 3.0 without binutils cannot create self contained
5888     # shared libraries reliably, requiring libgcc.a to resolve some of
5889     # the object symbols generated in some cases.  Libraries that use
5890     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5891     # a copy of libgcc.a into every shared library to guarantee resolving
5892     # such symbols causes other problems:  According to Tim Van Holder
5893     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5894     # (to the application) exception stack for one thing.
5895     no_undefined_flag=' -z defs'
5896     if test "$GCC" = yes; then
5897       case `$CC --version 2>/dev/null` in
5898       [12].*)
5899         cat <<EOF 1>&2
5900
5901 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5902 *** create self contained shared libraries on Solaris systems, without
5903 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5904 *** -no-undefined support, which will at least allow you to build shared
5905 *** libraries.  However, you may find that when you link such libraries
5906 *** into an application without using GCC, you have to manually add
5907 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5908 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5909 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5910
5911 EOF
5912         no_undefined_flag=
5913         ;;
5914       esac
5915     fi
5916     # $CC -shared without GNU ld will not create a library from C++
5917     # object files and a static libstdc++, better avoid it by now
5918     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5919     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5920                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5921     hardcode_libdir_flag_spec='-R$libdir'
5922     hardcode_shlibpath_var=no
5923     case $host_os in
5924     solaris2.[0-5] | solaris2.[0-5].*) ;;
5925     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5926       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5927     esac
5928     link_all_deplibs=yes
5929     ;;
5930
5931   sunos4*)
5932     if test "x$host_vendor" = xsequent; then
5933       # Use $CC to link under sequent, because it throws in some extra .o
5934       # files that make .init and .fini sections work.
5935       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5936     else
5937       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5938     fi
5939     hardcode_libdir_flag_spec='-L$libdir'
5940     hardcode_direct=yes
5941     hardcode_minus_L=yes
5942     hardcode_shlibpath_var=no
5943     ;;
5944
5945   sysv4)
5946     case $host_vendor in
5947       sni)
5948         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5949         hardcode_direct=yes # is this really true???
5950         ;;
5951       siemens)
5952         ## LD is ld it makes a PLAMLIB
5953         ## CC just makes a GrossModule.
5954         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5955         reload_cmds='$CC -r -o $output$reload_objs'
5956         hardcode_direct=no
5957         ;;
5958       motorola)
5959         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5960         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5961         ;;
5962     esac
5963     runpath_var='LD_RUN_PATH'
5964     hardcode_shlibpath_var=no
5965     ;;
5966
5967   sysv4.3*)
5968     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5969     hardcode_shlibpath_var=no
5970     export_dynamic_flag_spec='-Bexport'
5971     ;;
5972
5973   sysv5*)
5974     no_undefined_flag=' -z text'
5975     # $CC -shared without GNU ld will not create a library from C++
5976     # object files and a static libstdc++, better avoid it by now
5977     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5978     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5979                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5980     hardcode_libdir_flag_spec=
5981     hardcode_shlibpath_var=no
5982     runpath_var='LD_RUN_PATH'
5983     ;;
5984
5985   uts4*)
5986     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5987     hardcode_libdir_flag_spec='-L$libdir'
5988     hardcode_shlibpath_var=no
5989     ;;
5990
5991   dgux*)
5992     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5993     hardcode_libdir_flag_spec='-L$libdir'
5994     hardcode_shlibpath_var=no
5995     ;;
5996
5997   sysv4*MP*)
5998     if test -d /usr/nec; then
5999       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6000       hardcode_shlibpath_var=no
6001       runpath_var=LD_RUN_PATH
6002       hardcode_runpath_var=yes
6003       ld_shlibs=yes
6004     fi
6005     ;;
6006
6007   sysv4.2uw2*)
6008     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6009     hardcode_direct=yes
6010     hardcode_minus_L=no
6011     hardcode_shlibpath_var=no
6012     hardcode_runpath_var=yes
6013     runpath_var=LD_RUN_PATH
6014     ;;
6015
6016   sysv5uw7* | unixware7*)
6017     no_undefined_flag='${wl}-z ${wl}text'
6018     if test "$GCC" = yes; then
6019       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6020     else
6021       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6022     fi
6023     runpath_var='LD_RUN_PATH'
6024     hardcode_shlibpath_var=no
6025     ;;
6026
6027   *)
6028     ld_shlibs=no
6029     ;;
6030   esac
6031 fi
6032 echo "$ac_t""$ld_shlibs" 1>&6
6033 test "$ld_shlibs" = no && can_build_shared=no
6034
6035 # Check hardcoding attributes.
6036 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6037 echo "configure:6038: checking how to hardcode library paths into programs" >&5
6038 hardcode_action=
6039 if test -n "$hardcode_libdir_flag_spec" || \
6040    test -n "$runpath_var"; then
6041
6042   # We can hardcode non-existant directories.
6043   if test "$hardcode_direct" != no &&
6044      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6045      # have to relink, otherwise we might link with an installed library
6046      # when we should be linking with a yet-to-be-installed one
6047      ## test "$hardcode_shlibpath_var" != no &&
6048      test "$hardcode_minus_L" != no; then
6049     # Linking always hardcodes the temporary library directory.
6050     hardcode_action=relink
6051   else
6052     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6053     hardcode_action=immediate
6054   fi
6055 else
6056   # We cannot hardcode anything, or else we can only hardcode existing
6057   # directories.
6058   hardcode_action=unsupported
6059 fi
6060 echo "$ac_t""$hardcode_action" 1>&6
6061
6062 striplib=
6063 old_striplib=
6064 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6065 echo "configure:6066: checking whether stripping libraries is possible" >&5
6066 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6067   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6068   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6069   echo "$ac_t""yes" 1>&6
6070 else
6071   echo "$ac_t""no" 1>&6
6072 fi
6073
6074 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6075 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6076
6077 # PORTME Fill in your ld.so characteristics
6078 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6079 echo "configure:6080: checking dynamic linker characteristics" >&5
6080 library_names_spec=
6081 libname_spec='lib$name'
6082 soname_spec=
6083 postinstall_cmds=
6084 postuninstall_cmds=
6085 finish_cmds=
6086 finish_eval=
6087 shlibpath_var=
6088 shlibpath_overrides_runpath=unknown
6089 version_type=none
6090 dynamic_linker="$host_os ld.so"
6091 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6092 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6093
6094 case $host_os in
6095 aix3*)
6096   version_type=linux
6097   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6098   shlibpath_var=LIBPATH
6099
6100   # AIX has no versioning support, so we append a major version to the name.
6101   soname_spec='${libname}${release}.so$major'
6102   ;;
6103
6104 aix4* | aix5*)
6105   version_type=linux
6106   need_lib_prefix=no
6107   need_version=no
6108   hardcode_into_libs=yes
6109   if test "$host_cpu" = ia64; then
6110     # AIX 5 supports IA64
6111     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6112     shlibpath_var=LD_LIBRARY_PATH
6113   else
6114     # With GCC up to 2.95.x, collect2 would create an import file
6115     # for dependence libraries.  The import file would start with
6116     # the line `#! .'.  This would cause the generated library to
6117     # depend on `.', always an invalid library.  This was fixed in
6118     # development snapshots of GCC prior to 3.0.
6119     case $host_os in
6120       aix4 | aix4.[01] | aix4.[01].*)
6121         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6122              echo ' yes '
6123              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6124           :
6125         else
6126           can_build_shared=no
6127         fi
6128         ;;
6129     esac
6130     # AIX (on Power*) has no versioning support, so currently we can
6131     # not hardcode correct soname into executable. Probably we can
6132     # add versioning support to collect2, so additional links can
6133     # be useful in future.
6134     if test "$aix_use_runtimelinking" = yes; then
6135       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6136       # instead of lib<name>.a to let people know that these are not
6137       # typical AIX shared libraries.
6138       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6139     else
6140       # We preserve .a as extension for shared libraries through AIX4.2
6141       # and later when we are not doing run time linking.
6142       library_names_spec='${libname}${release}.a $libname.a'
6143       soname_spec='${libname}${release}.so$major'
6144     fi
6145     shlibpath_var=LIBPATH
6146   fi
6147   hardcode_into_libs=yes
6148   ;;
6149
6150 amigaos*)
6151   library_names_spec='$libname.ixlibrary $libname.a'
6152   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6153   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'
6154   ;;
6155
6156 beos*)
6157   library_names_spec='${libname}.so'
6158   dynamic_linker="$host_os ld.so"
6159   shlibpath_var=LIBRARY_PATH
6160   ;;
6161
6162 bsdi4*)
6163   version_type=linux
6164   need_version=no
6165   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6166   soname_spec='${libname}${release}.so$major'
6167   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6168   shlibpath_var=LD_LIBRARY_PATH
6169   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6170   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6171   export_dynamic_flag_spec=-rdynamic
6172   # the default ld.so.conf also contains /usr/contrib/lib and
6173   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6174   # libtool to hard-code these into programs
6175   ;;
6176
6177 cygwin* | mingw* | pw32*)
6178   version_type=windows
6179   need_version=no
6180   need_lib_prefix=no
6181   case $GCC,$host_os in
6182   yes,cygwin*)
6183     library_names_spec='$libname.dll.a'
6184     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6185     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6186       dldir=$destdir/`dirname \$dlpath`~
6187       test -d \$dldir || mkdir -p \$dldir~
6188       $install_prog .libs/$dlname \$dldir/$dlname'
6189     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6190       dlpath=$dir/\$dldll~
6191        $rm \$dlpath'
6192     ;;
6193   yes,mingw*)
6194     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6195     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6196     ;;
6197   yes,pw32*)
6198     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6199     ;;
6200   *)
6201     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6202     ;;
6203   esac
6204   dynamic_linker='Win32 ld.exe'
6205   # FIXME: first we should search . and the directory the executable is in
6206   shlibpath_var=PATH
6207   ;;
6208
6209 darwin* | rhapsody*)
6210   dynamic_linker="$host_os dyld"
6211   version_type=darwin
6212   need_lib_prefix=no
6213   need_version=no
6214   # FIXME: Relying on posixy $() will cause problems for
6215   #        cross-compilation, but unfortunately the echo tests do not
6216   #        yet detect zsh echo's removal of \ escapes.
6217   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)'
6218   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6219   shlibpath_overrides_runpath=yes
6220   shlibpath_var=DYLD_LIBRARY_PATH
6221   ;;
6222
6223 freebsd1*)
6224   dynamic_linker=no
6225   ;;
6226
6227 freebsd*)
6228   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6229   version_type=freebsd-$objformat
6230   case $version_type in
6231     freebsd-elf*)
6232       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6233       need_version=no
6234       need_lib_prefix=no
6235       ;;
6236     freebsd-*)
6237       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6238       need_version=yes
6239       ;;
6240   esac
6241   shlibpath_var=LD_LIBRARY_PATH
6242   case $host_os in
6243   freebsd2*)
6244     shlibpath_overrides_runpath=yes
6245     ;;
6246   *)
6247     shlibpath_overrides_runpath=no
6248     hardcode_into_libs=yes
6249     ;;
6250   esac
6251   ;;
6252
6253 gnu*)
6254   version_type=linux
6255   need_lib_prefix=no
6256   need_version=no
6257   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6258   soname_spec='${libname}${release}.so$major'
6259   shlibpath_var=LD_LIBRARY_PATH
6260   hardcode_into_libs=yes
6261   ;;
6262
6263 hpux9* | hpux10* | hpux11*)
6264   # Give a soname corresponding to the major version so that dld.sl refuses to
6265   # link against other versions.
6266   dynamic_linker="$host_os dld.sl"
6267   version_type=sunos
6268   need_lib_prefix=no
6269   need_version=no
6270   shlibpath_var=SHLIB_PATH
6271   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6272   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6273   soname_spec='${libname}${release}.sl$major'
6274   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6275   postinstall_cmds='chmod 555 $lib'
6276   ;;
6277
6278 irix5* | irix6* | nonstopux*)
6279   case $host_os in
6280     nonstopux*) version_type=nonstopux ;;
6281     *)          version_type=irix ;;
6282   esac
6283   need_lib_prefix=no
6284   need_version=no
6285   soname_spec='${libname}${release}.so$major'
6286   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6287   case $host_os in
6288   irix5* | nonstopux*)
6289     libsuff= shlibsuff=
6290     ;;
6291   *)
6292     case $LD in # libtool.m4 will add one of these switches to LD
6293     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6294     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6295     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6296     *) libsuff= shlibsuff= libmagic=never-match;;
6297     esac
6298     ;;
6299   esac
6300   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6301   shlibpath_overrides_runpath=no
6302   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6303   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6304   ;;
6305
6306 # No shared lib support for Linux oldld, aout, or coff.
6307 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6308   dynamic_linker=no
6309   ;;
6310
6311 # This must be Linux ELF.
6312 linux-gnu*)
6313   version_type=linux
6314   need_lib_prefix=no
6315   need_version=no
6316   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6317   soname_spec='${libname}${release}.so$major'
6318   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6319   shlibpath_var=LD_LIBRARY_PATH
6320   shlibpath_overrides_runpath=no
6321   # This implies no fast_install, which is unacceptable.
6322   # Some rework will be needed to allow for fast_install
6323   # before this can be enabled.
6324   hardcode_into_libs=yes
6325
6326   # We used to test for /lib/ld.so.1 and disable shared libraries on
6327   # powerpc, because MkLinux only supported shared libraries with the
6328   # GNU dynamic linker.  Since this was broken with cross compilers,
6329   # most powerpc-linux boxes support dynamic linking these days and
6330   # people can always --disable-shared, the test was removed, and we
6331   # assume the GNU/Linux dynamic linker is in use.
6332   dynamic_linker='GNU/Linux ld.so'
6333   ;;
6334
6335 netbsd*)
6336   version_type=sunos
6337   need_lib_prefix=no
6338   need_version=no
6339   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6340     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6341     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6342     dynamic_linker='NetBSD (a.out) ld.so'
6343   else
6344     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6345     soname_spec='${libname}${release}.so$major'
6346     dynamic_linker='NetBSD ld.elf_so'
6347   fi
6348   shlibpath_var=LD_LIBRARY_PATH
6349   shlibpath_overrides_runpath=yes
6350   hardcode_into_libs=yes
6351   ;;
6352
6353 newsos6)
6354   version_type=linux
6355   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6356   shlibpath_var=LD_LIBRARY_PATH
6357   shlibpath_overrides_runpath=yes
6358   ;;
6359
6360 openbsd*)
6361   version_type=sunos
6362   need_lib_prefix=no
6363   need_version=no
6364   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6365     case "$host_os" in
6366     openbsd2.[89] | openbsd2.[89].*)
6367       shlibpath_overrides_runpath=no
6368       ;;
6369     *)
6370       shlibpath_overrides_runpath=yes
6371       ;;
6372     esac
6373   else
6374     shlibpath_overrides_runpath=yes
6375   fi
6376   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6377   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6378   shlibpath_var=LD_LIBRARY_PATH
6379   ;;
6380
6381 openedition*)
6382   need_lib_prefix=no
6383   need_version=no
6384   shlibpath_overrides_runpath=yes
6385   shlibpath_var=LIBPATH
6386   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6387   # the library's exports are in libname.x; this is the file that must
6388   # actually be linked with to use a DLL.
6389   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6390   ;;
6391
6392 os2*)
6393   libname_spec='$name'
6394   need_lib_prefix=no
6395   library_names_spec='$libname.dll $libname.a'
6396   dynamic_linker='OS/2 ld.exe'
6397   shlibpath_var=LIBPATH
6398   ;;
6399
6400 osf3* | osf4* | osf5*)
6401   version_type=osf
6402   need_version=no
6403   soname_spec='${libname}${release}.so$major'
6404   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6405   shlibpath_var=LD_LIBRARY_PATH
6406   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6407   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6408   hardcode_into_libs=yes
6409   ;;
6410
6411 sco3.2v5*)
6412   version_type=osf
6413   soname_spec='${libname}${release}.so$major'
6414   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6415   shlibpath_var=LD_LIBRARY_PATH
6416   ;;
6417
6418 solaris*)
6419   version_type=linux
6420   need_lib_prefix=no
6421   need_version=no
6422   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6423   soname_spec='${libname}${release}.so$major'
6424   shlibpath_var=LD_LIBRARY_PATH
6425   shlibpath_overrides_runpath=yes
6426   hardcode_into_libs=yes
6427   # ldd complains unless libraries are executable
6428   postinstall_cmds='chmod +x $lib'
6429   ;;
6430
6431 sunos4*)
6432   version_type=sunos
6433   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6434   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6435   shlibpath_var=LD_LIBRARY_PATH
6436   shlibpath_overrides_runpath=yes
6437   if test "$with_gnu_ld" = yes; then
6438     need_lib_prefix=no
6439   fi
6440   need_version=yes
6441   ;;
6442
6443 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6444   version_type=linux
6445   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6446   soname_spec='${libname}${release}.so$major'
6447   shlibpath_var=LD_LIBRARY_PATH
6448   case $host_vendor in
6449     sni)
6450       shlibpath_overrides_runpath=no
6451       need_lib_prefix=no
6452       export_dynamic_flag_spec='${wl}-Blargedynsym'
6453       runpath_var=LD_RUN_PATH
6454       ;;
6455     siemens)
6456       need_lib_prefix=no
6457       ;;
6458     motorola)
6459       need_lib_prefix=no
6460       need_version=no
6461       shlibpath_overrides_runpath=no
6462       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6463       ;;
6464   esac
6465   ;;
6466
6467 uts4*)
6468   version_type=linux
6469   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6470   soname_spec='${libname}${release}.so$major'
6471   shlibpath_var=LD_LIBRARY_PATH
6472   ;;
6473
6474 dgux*)
6475   version_type=linux
6476   need_lib_prefix=no
6477   need_version=no
6478   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6479   soname_spec='${libname}${release}.so$major'
6480   shlibpath_var=LD_LIBRARY_PATH
6481   ;;
6482
6483 sysv4*MP*)
6484   if test -d /usr/nec ;then
6485     version_type=linux
6486     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6487     soname_spec='$libname.so.$major'
6488     shlibpath_var=LD_LIBRARY_PATH
6489   fi
6490   ;;
6491
6492 *)
6493   dynamic_linker=no
6494   ;;
6495 esac
6496 echo "$ac_t""$dynamic_linker" 1>&6
6497 test "$dynamic_linker" = no && can_build_shared=no
6498
6499 # Report the final consequences.
6500 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6501 echo "configure:6502: checking if libtool supports shared libraries" >&5
6502 echo "$ac_t""$can_build_shared" 1>&6
6503
6504 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6505 echo "configure:6506: checking whether to build shared libraries" >&5
6506 test "$can_build_shared" = "no" && enable_shared=no
6507
6508 # On AIX, shared libraries and static libraries use the same namespace, and
6509 # are all built from PIC.
6510 case "$host_os" in
6511 aix3*)
6512   test "$enable_shared" = yes && enable_static=no
6513   if test -n "$RANLIB"; then
6514     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6515     postinstall_cmds='$RANLIB $lib'
6516   fi
6517   ;;
6518
6519 aix4*)
6520   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6521     test "$enable_shared" = yes && enable_static=no
6522   fi
6523   ;;
6524 esac
6525 echo "$ac_t""$enable_shared" 1>&6
6526
6527 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6528 echo "configure:6529: checking whether to build static libraries" >&5
6529 # Make sure either enable_shared or enable_static is yes.
6530 test "$enable_shared" = yes || enable_static=yes
6531 echo "$ac_t""$enable_static" 1>&6
6532
6533 if test "$hardcode_action" = relink; then
6534   # Fast installation is not supported
6535   enable_fast_install=no
6536 elif test "$shlibpath_overrides_runpath" = yes ||
6537      test "$enable_shared" = no; then
6538   # Fast installation is not necessary
6539   enable_fast_install=needless
6540 fi
6541
6542 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6543 if test "$GCC" = yes; then
6544   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6545 fi
6546
6547 if test "x$enable_dlopen" != xyes; then
6548   enable_dlopen=unknown
6549   enable_dlopen_self=unknown
6550   enable_dlopen_self_static=unknown
6551 else
6552   lt_cv_dlopen=no
6553   lt_cv_dlopen_libs=
6554
6555   case $host_os in
6556   beos*)
6557     lt_cv_dlopen="load_add_on"
6558     lt_cv_dlopen_libs=
6559     lt_cv_dlopen_self=yes
6560     ;;
6561
6562   cygwin* | mingw* | pw32*)
6563     lt_cv_dlopen="LoadLibrary"
6564     lt_cv_dlopen_libs=
6565    ;;
6566
6567   *)
6568     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6569 echo "configure:6570: checking for dllload" >&5
6570 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6571   echo $ac_n "(cached) $ac_c" 1>&6
6572 else
6573   cat > conftest.$ac_ext <<EOF
6574 #line 6575 "configure"
6575 #include "confdefs.h"
6576 /* System header to define __stub macros and hopefully few prototypes,
6577     which can conflict with char dllload(); below.  */
6578 #include <assert.h>
6579 /* Override any gcc2 internal prototype to avoid an error.  */
6580 /* We use char because int might match the return type of a gcc2
6581     builtin and then its argument prototype would still apply.  */
6582 char dllload();
6583 char (*f)();
6584
6585 int main() {
6586
6587 /* The GNU C library defines this for functions which it implements
6588     to always fail with ENOSYS.  Some functions are actually named
6589     something starting with __ and the normal name is an alias.  */
6590 #if defined (__stub_dllload) || defined (__stub___dllload)
6591 choke me
6592 #else
6593 f = dllload;
6594 #endif
6595
6596 ; return 0; }
6597 EOF
6598 if { (eval echo configure:6599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6599   rm -rf conftest*
6600   eval "ac_cv_func_dllload=yes"
6601 else
6602   echo "configure: failed program was:" >&5
6603   cat conftest.$ac_ext >&5
6604   rm -rf conftest*
6605   eval "ac_cv_func_dllload=no"
6606 fi
6607 rm -f conftest*
6608 fi
6609
6610 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6611   echo "$ac_t""yes" 1>&6
6612   lt_cv_dlopen="dllload"
6613 else
6614   echo "$ac_t""no" 1>&6
6615 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6616 echo "configure:6617: checking for shl_load" >&5
6617 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6618   echo $ac_n "(cached) $ac_c" 1>&6
6619 else
6620   cat > conftest.$ac_ext <<EOF
6621 #line 6622 "configure"
6622 #include "confdefs.h"
6623 /* System header to define __stub macros and hopefully few prototypes,
6624     which can conflict with char shl_load(); below.  */
6625 #include <assert.h>
6626 /* Override any gcc2 internal prototype to avoid an error.  */
6627 /* We use char because int might match the return type of a gcc2
6628     builtin and then its argument prototype would still apply.  */
6629 char shl_load();
6630 char (*f)();
6631
6632 int main() {
6633
6634 /* The GNU C library defines this for functions which it implements
6635     to always fail with ENOSYS.  Some functions are actually named
6636     something starting with __ and the normal name is an alias.  */
6637 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6638 choke me
6639 #else
6640 f = shl_load;
6641 #endif
6642
6643 ; return 0; }
6644 EOF
6645 if { (eval echo configure:6646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6646   rm -rf conftest*
6647   eval "ac_cv_func_shl_load=yes"
6648 else
6649   echo "configure: failed program was:" >&5
6650   cat conftest.$ac_ext >&5
6651   rm -rf conftest*
6652   eval "ac_cv_func_shl_load=no"
6653 fi
6654 rm -f conftest*
6655 fi
6656
6657 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6658   echo "$ac_t""yes" 1>&6
6659   lt_cv_dlopen="shl_load"
6660 else
6661   echo "$ac_t""no" 1>&6
6662 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6663 echo "configure:6664: checking for shl_load in -ldld" >&5
6664 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6665 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6666   echo $ac_n "(cached) $ac_c" 1>&6
6667 else
6668   ac_save_LIBS="$LIBS"
6669 LIBS="-ldld  $LIBS"
6670 cat > conftest.$ac_ext <<EOF
6671 #line 6672 "configure"
6672 #include "confdefs.h"
6673 /* Override any gcc2 internal prototype to avoid an error.  */
6674 /* We use char because int might match the return type of a gcc2
6675     builtin and then its argument prototype would still apply.  */
6676 char shl_load();
6677
6678 int main() {
6679 shl_load()
6680 ; return 0; }
6681 EOF
6682 if { (eval echo configure:6683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6683   rm -rf conftest*
6684   eval "ac_cv_lib_$ac_lib_var=yes"
6685 else
6686   echo "configure: failed program was:" >&5
6687   cat conftest.$ac_ext >&5
6688   rm -rf conftest*
6689   eval "ac_cv_lib_$ac_lib_var=no"
6690 fi
6691 rm -f conftest*
6692 LIBS="$ac_save_LIBS"
6693
6694 fi
6695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6696   echo "$ac_t""yes" 1>&6
6697   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6698 else
6699   echo "$ac_t""no" 1>&6
6700 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6701 echo "configure:6702: checking for dlopen" >&5
6702 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6703   echo $ac_n "(cached) $ac_c" 1>&6
6704 else
6705   cat > conftest.$ac_ext <<EOF
6706 #line 6707 "configure"
6707 #include "confdefs.h"
6708 /* System header to define __stub macros and hopefully few prototypes,
6709     which can conflict with char dlopen(); below.  */
6710 #include <assert.h>
6711 /* Override any gcc2 internal prototype to avoid an error.  */
6712 /* We use char because int might match the return type of a gcc2
6713     builtin and then its argument prototype would still apply.  */
6714 char dlopen();
6715 char (*f)();
6716
6717 int main() {
6718
6719 /* The GNU C library defines this for functions which it implements
6720     to always fail with ENOSYS.  Some functions are actually named
6721     something starting with __ and the normal name is an alias.  */
6722 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6723 choke me
6724 #else
6725 f = dlopen;
6726 #endif
6727
6728 ; return 0; }
6729 EOF
6730 if { (eval echo configure:6731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6731   rm -rf conftest*
6732   eval "ac_cv_func_dlopen=yes"
6733 else
6734   echo "configure: failed program was:" >&5
6735   cat conftest.$ac_ext >&5
6736   rm -rf conftest*
6737   eval "ac_cv_func_dlopen=no"
6738 fi
6739 rm -f conftest*
6740 fi
6741
6742 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6743   echo "$ac_t""yes" 1>&6
6744   lt_cv_dlopen="dlopen"
6745 else
6746   echo "$ac_t""no" 1>&6
6747 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6748 echo "configure:6749: checking for dlopen in -ldl" >&5
6749 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6750 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6751   echo $ac_n "(cached) $ac_c" 1>&6
6752 else
6753   ac_save_LIBS="$LIBS"
6754 LIBS="-ldl  $LIBS"
6755 cat > conftest.$ac_ext <<EOF
6756 #line 6757 "configure"
6757 #include "confdefs.h"
6758 /* Override any gcc2 internal prototype to avoid an error.  */
6759 /* We use char because int might match the return type of a gcc2
6760     builtin and then its argument prototype would still apply.  */
6761 char dlopen();
6762
6763 int main() {
6764 dlopen()
6765 ; return 0; }
6766 EOF
6767 if { (eval echo configure:6768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6768   rm -rf conftest*
6769   eval "ac_cv_lib_$ac_lib_var=yes"
6770 else
6771   echo "configure: failed program was:" >&5
6772   cat conftest.$ac_ext >&5
6773   rm -rf conftest*
6774   eval "ac_cv_lib_$ac_lib_var=no"
6775 fi
6776 rm -f conftest*
6777 LIBS="$ac_save_LIBS"
6778
6779 fi
6780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6781   echo "$ac_t""yes" 1>&6
6782   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6783 else
6784   echo "$ac_t""no" 1>&6
6785 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6786 echo "configure:6787: checking for dlopen in -lsvld" >&5
6787 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6788 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6789   echo $ac_n "(cached) $ac_c" 1>&6
6790 else
6791   ac_save_LIBS="$LIBS"
6792 LIBS="-lsvld  $LIBS"
6793 cat > conftest.$ac_ext <<EOF
6794 #line 6795 "configure"
6795 #include "confdefs.h"
6796 /* Override any gcc2 internal prototype to avoid an error.  */
6797 /* We use char because int might match the return type of a gcc2
6798     builtin and then its argument prototype would still apply.  */
6799 char dlopen();
6800
6801 int main() {
6802 dlopen()
6803 ; return 0; }
6804 EOF
6805 if { (eval echo configure:6806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6806   rm -rf conftest*
6807   eval "ac_cv_lib_$ac_lib_var=yes"
6808 else
6809   echo "configure: failed program was:" >&5
6810   cat conftest.$ac_ext >&5
6811   rm -rf conftest*
6812   eval "ac_cv_lib_$ac_lib_var=no"
6813 fi
6814 rm -f conftest*
6815 LIBS="$ac_save_LIBS"
6816
6817 fi
6818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6819   echo "$ac_t""yes" 1>&6
6820   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6821 else
6822   echo "$ac_t""no" 1>&6
6823 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6824 echo "configure:6825: checking for dld_link in -ldld" >&5
6825 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6826 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6827   echo $ac_n "(cached) $ac_c" 1>&6
6828 else
6829   ac_save_LIBS="$LIBS"
6830 LIBS="-ldld  $LIBS"
6831 cat > conftest.$ac_ext <<EOF
6832 #line 6833 "configure"
6833 #include "confdefs.h"
6834 /* Override any gcc2 internal prototype to avoid an error.  */
6835 /* We use char because int might match the return type of a gcc2
6836     builtin and then its argument prototype would still apply.  */
6837 char dld_link();
6838
6839 int main() {
6840 dld_link()
6841 ; return 0; }
6842 EOF
6843 if { (eval echo configure:6844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6844   rm -rf conftest*
6845   eval "ac_cv_lib_$ac_lib_var=yes"
6846 else
6847   echo "configure: failed program was:" >&5
6848   cat conftest.$ac_ext >&5
6849   rm -rf conftest*
6850   eval "ac_cv_lib_$ac_lib_var=no"
6851 fi
6852 rm -f conftest*
6853 LIBS="$ac_save_LIBS"
6854
6855 fi
6856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6857   echo "$ac_t""yes" 1>&6
6858   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6859 else
6860   echo "$ac_t""no" 1>&6
6861 fi
6862
6863               
6864 fi
6865
6866             
6867 fi
6868
6869           
6870 fi
6871
6872         
6873 fi
6874
6875       
6876 fi
6877
6878     
6879 fi
6880
6881     ;;
6882   esac
6883
6884   if test "x$lt_cv_dlopen" != xno; then
6885     enable_dlopen=yes
6886   else
6887     enable_dlopen=no
6888   fi
6889
6890   case $lt_cv_dlopen in
6891   dlopen)
6892     save_CPPFLAGS="$CPPFLAGS"
6893         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6894
6895     save_LDFLAGS="$LDFLAGS"
6896     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6897
6898     save_LIBS="$LIBS"
6899     LIBS="$lt_cv_dlopen_libs $LIBS"
6900
6901     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6902 echo "configure:6903: checking whether a program can dlopen itself" >&5
6903 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6904   echo $ac_n "(cached) $ac_c" 1>&6
6905 else
6906           if test "$cross_compiling" = yes; then :
6907   lt_cv_dlopen_self=cross
6908 else
6909     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6910   lt_status=$lt_dlunknown
6911   cat > conftest.$ac_ext <<EOF
6912 #line 6913 "configure"
6913 #include "confdefs.h"
6914
6915 #if HAVE_DLFCN_H
6916 #include <dlfcn.h>
6917 #endif
6918
6919 #include <stdio.h>
6920
6921 #ifdef RTLD_GLOBAL
6922 #  define LT_DLGLOBAL           RTLD_GLOBAL
6923 #else
6924 #  ifdef DL_GLOBAL
6925 #    define LT_DLGLOBAL         DL_GLOBAL
6926 #  else
6927 #    define LT_DLGLOBAL         0
6928 #  endif
6929 #endif
6930
6931 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6932    find out it does not work in some platform. */
6933 #ifndef LT_DLLAZY_OR_NOW
6934 #  ifdef RTLD_LAZY
6935 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6936 #  else
6937 #    ifdef DL_LAZY
6938 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6939 #    else
6940 #      ifdef RTLD_NOW
6941 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6942 #      else
6943 #        ifdef DL_NOW
6944 #          define LT_DLLAZY_OR_NOW      DL_NOW
6945 #        else
6946 #          define LT_DLLAZY_OR_NOW      0
6947 #        endif
6948 #      endif
6949 #    endif
6950 #  endif
6951 #endif
6952
6953 #ifdef __cplusplus
6954 extern "C" void exit (int);
6955 #endif
6956
6957 void fnord() { int i=42;}
6958 int main ()
6959 {
6960   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6961   int status = $lt_dlunknown;
6962
6963   if (self)
6964     {
6965       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6966       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6967       /* dlclose (self); */
6968     }
6969
6970     exit (status);
6971 }
6972 EOF
6973   if { (eval echo configure:6974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6974     (./conftest; exit; ) 2>/dev/null
6975     lt_status=$?
6976     case x$lt_status in
6977       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6978       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6979       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6980     esac
6981   else :
6982     # compilation failed
6983     lt_cv_dlopen_self=no
6984   fi
6985 fi
6986 rm -fr conftest*
6987
6988     
6989 fi
6990
6991 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6992
6993     if test "x$lt_cv_dlopen_self" = xyes; then
6994       LDFLAGS="$LDFLAGS $link_static_flag"
6995       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6996 echo "configure:6997: checking whether a statically linked program can dlopen itself" >&5
6997 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6998   echo $ac_n "(cached) $ac_c" 1>&6
6999 else
7000           if test "$cross_compiling" = yes; then :
7001   lt_cv_dlopen_self_static=cross
7002 else
7003     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7004   lt_status=$lt_dlunknown
7005   cat > conftest.$ac_ext <<EOF
7006 #line 7007 "configure"
7007 #include "confdefs.h"
7008
7009 #if HAVE_DLFCN_H
7010 #include <dlfcn.h>
7011 #endif
7012
7013 #include <stdio.h>
7014
7015 #ifdef RTLD_GLOBAL
7016 #  define LT_DLGLOBAL           RTLD_GLOBAL
7017 #else
7018 #  ifdef DL_GLOBAL
7019 #    define LT_DLGLOBAL         DL_GLOBAL
7020 #  else
7021 #    define LT_DLGLOBAL         0
7022 #  endif
7023 #endif
7024
7025 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7026    find out it does not work in some platform. */
7027 #ifndef LT_DLLAZY_OR_NOW
7028 #  ifdef RTLD_LAZY
7029 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7030 #  else
7031 #    ifdef DL_LAZY
7032 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7033 #    else
7034 #      ifdef RTLD_NOW
7035 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7036 #      else
7037 #        ifdef DL_NOW
7038 #          define LT_DLLAZY_OR_NOW      DL_NOW
7039 #        else
7040 #          define LT_DLLAZY_OR_NOW      0
7041 #        endif
7042 #      endif
7043 #    endif
7044 #  endif
7045 #endif
7046
7047 #ifdef __cplusplus
7048 extern "C" void exit (int);
7049 #endif
7050
7051 void fnord() { int i=42;}
7052 int main ()
7053 {
7054   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7055   int status = $lt_dlunknown;
7056
7057   if (self)
7058     {
7059       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7060       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7061       /* dlclose (self); */
7062     }
7063
7064     exit (status);
7065 }
7066 EOF
7067   if { (eval echo configure:7068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7068     (./conftest; exit; ) 2>/dev/null
7069     lt_status=$?
7070     case x$lt_status in
7071       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7072       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7073       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7074     esac
7075   else :
7076     # compilation failed
7077     lt_cv_dlopen_self_static=no
7078   fi
7079 fi
7080 rm -fr conftest*
7081
7082       
7083 fi
7084
7085 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7086     fi
7087
7088     CPPFLAGS="$save_CPPFLAGS"
7089     LDFLAGS="$save_LDFLAGS"
7090     LIBS="$save_LIBS"
7091     ;;
7092   esac
7093
7094   case $lt_cv_dlopen_self in
7095   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7096   *) enable_dlopen_self=unknown ;;
7097   esac
7098
7099   case $lt_cv_dlopen_self_static in
7100   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7101   *) enable_dlopen_self_static=unknown ;;
7102   esac
7103 fi
7104
7105
7106 if test "$enable_shared" = yes && test "$GCC" = yes; then
7107   case $archive_cmds in
7108   *'~'*)
7109     # FIXME: we may have to deal with multi-command sequences.
7110     ;;
7111   '$CC '*)
7112     # Test whether the compiler implicitly links with -lc since on some
7113     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7114     # to ld, don't add -lc before -lgcc.
7115     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7116 echo "configure:7117: checking whether -lc should be explicitly linked in" >&5
7117     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7118   echo $ac_n "(cached) $ac_c" 1>&6
7119 else
7120   $rm conftest*
7121     echo 'static int dummy;' > conftest.$ac_ext
7122
7123     if { (eval echo configure:7124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7124       soname=conftest
7125       lib=conftest
7126       libobjs=conftest.$ac_objext
7127       deplibs=
7128       wl=$lt_cv_prog_cc_wl
7129       compiler_flags=-v
7130       linker_flags=-v
7131       verstring=
7132       output_objdir=.
7133       libname=conftest
7134       save_allow_undefined_flag=$allow_undefined_flag
7135       allow_undefined_flag=
7136       if { (eval echo configure:7137: \"$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; }
7137       then
7138         lt_cv_archive_cmds_need_lc=no
7139       else
7140         lt_cv_archive_cmds_need_lc=yes
7141       fi
7142       allow_undefined_flag=$save_allow_undefined_flag
7143     else
7144       cat conftest.err 1>&5
7145     fi
7146 fi
7147
7148     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7149     ;;
7150   esac
7151 fi
7152 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7153
7154 # The second clause should only fire when bootstrapping the
7155 # libtool distribution, otherwise you forgot to ship ltmain.sh
7156 # with your package, and you will get complaints that there are
7157 # no rules to generate ltmain.sh.
7158 if test -f "$ltmain"; then
7159   :
7160 else
7161   # If there is no Makefile yet, we rely on a make rule to execute
7162   # `config.status --recheck' to rerun these tests and create the
7163   # libtool script then.
7164   test -f Makefile && make "$ltmain"
7165 fi
7166
7167 if test -f "$ltmain"; then
7168   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7169   $rm -f "${ofile}T"
7170
7171   echo creating $ofile
7172
7173   # Now quote all the things that may contain metacharacters while being
7174   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7175   # variables and quote the copies for generation of the libtool script.
7176   for var in echo old_CC old_CFLAGS SED \
7177     AR AR_FLAGS CC LD LN_S NM SHELL \
7178     reload_flag reload_cmds wl \
7179     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7180     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7181     library_names_spec soname_spec \
7182     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7183     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7184     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7185     old_striplib striplib file_magic_cmd export_symbols_cmds \
7186     deplibs_check_method allow_undefined_flag no_undefined_flag \
7187     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7188     global_symbol_to_c_name_address \
7189     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7190     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7191     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7192
7193     case $var in
7194     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7195     old_postinstall_cmds | old_postuninstall_cmds | \
7196     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7197     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7198     postinstall_cmds | postuninstall_cmds | \
7199     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7200       # Double-quote double-evaled strings.
7201       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7202       ;;
7203     *)
7204       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7205       ;;
7206     esac
7207   done
7208
7209   cat <<__EOF__ > "${ofile}T"
7210 #! $SHELL
7211
7212 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7213 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7214 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7215 #
7216 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7217 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7218 #
7219 # This program is free software; you can redistribute it and/or modify
7220 # it under the terms of the GNU General Public License as published by
7221 # the Free Software Foundation; either version 2 of the License, or
7222 # (at your option) any later version.
7223 #
7224 # This program is distributed in the hope that it will be useful, but
7225 # WITHOUT ANY WARRANTY; without even the implied warranty of
7226 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7227 # General Public License for more details.
7228 #
7229 # You should have received a copy of the GNU General Public License
7230 # along with this program; if not, write to the Free Software
7231 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7232 #
7233 # As a special exception to the GNU General Public License, if you
7234 # distribute this file as part of a program that contains a
7235 # configuration script generated by Autoconf, you may include it under
7236 # the same distribution terms that you use for the rest of that program.
7237
7238 # A sed that does not truncate output.
7239 SED=$lt_SED
7240
7241 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7242 Xsed="${SED} -e s/^X//"
7243
7244 # The HP-UX ksh and POSIX shell print the target directory to stdout
7245 # if CDPATH is set.
7246 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7247
7248 # ### BEGIN LIBTOOL CONFIG
7249
7250 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7251
7252 # Shell to use when invoking shell scripts.
7253 SHELL=$lt_SHELL
7254
7255 # Whether or not to build shared libraries.
7256 build_libtool_libs=$enable_shared
7257
7258 # Whether or not to build static libraries.
7259 build_old_libs=$enable_static
7260
7261 # Whether or not to add -lc for building shared libraries.
7262 build_libtool_need_lc=$need_lc
7263
7264 # Whether or not to optimize for fast installation.
7265 fast_install=$enable_fast_install
7266
7267 # The host system.
7268 host_alias=$host_alias
7269 host=$host
7270
7271 # An echo program that does not interpret backslashes.
7272 echo=$lt_echo
7273
7274 # The archiver.
7275 AR=$lt_AR
7276 AR_FLAGS=$lt_AR_FLAGS
7277
7278 # The default C compiler.
7279 CC=$lt_CC
7280
7281 # Is the compiler the GNU C compiler?
7282 with_gcc=$GCC
7283
7284 # The linker used to build libraries.
7285 LD=$lt_LD
7286
7287 # Whether we need hard or soft links.
7288 LN_S=$lt_LN_S
7289
7290 # A BSD-compatible nm program.
7291 NM=$lt_NM
7292
7293 # A symbol stripping program
7294 STRIP=$STRIP
7295
7296 # Used to examine libraries when file_magic_cmd begins "file"
7297 MAGIC_CMD=$MAGIC_CMD
7298
7299 # Used on cygwin: DLL creation program.
7300 DLLTOOL="$DLLTOOL"
7301
7302 # Used on cygwin: object dumper.
7303 OBJDUMP="$OBJDUMP"
7304
7305 # Used on cygwin: assembler.
7306 AS="$AS"
7307
7308 # The name of the directory that contains temporary libtool files.
7309 objdir=$objdir
7310
7311 # How to create reloadable object files.
7312 reload_flag=$lt_reload_flag
7313 reload_cmds=$lt_reload_cmds
7314
7315 # How to pass a linker flag through the compiler.
7316 wl=$lt_wl
7317
7318 # Object file suffix (normally "o").
7319 objext="$ac_objext"
7320
7321 # Old archive suffix (normally "a").
7322 libext="$libext"
7323
7324 # Executable file suffix (normally "").
7325 exeext="$exeext"
7326
7327 # Additional compiler flags for building library objects.
7328 pic_flag=$lt_pic_flag
7329 pic_mode=$pic_mode
7330
7331 # Does compiler simultaneously support -c and -o options?
7332 compiler_c_o=$lt_compiler_c_o
7333
7334 # Can we write directly to a .lo ?
7335 compiler_o_lo=$lt_compiler_o_lo
7336
7337 # Must we lock files when doing compilation ?
7338 need_locks=$lt_need_locks
7339
7340 # Do we need the lib prefix for modules?
7341 need_lib_prefix=$need_lib_prefix
7342
7343 # Do we need a version for libraries?
7344 need_version=$need_version
7345
7346 # Whether dlopen is supported.
7347 dlopen_support=$enable_dlopen
7348
7349 # Whether dlopen of programs is supported.
7350 dlopen_self=$enable_dlopen_self
7351
7352 # Whether dlopen of statically linked programs is supported.
7353 dlopen_self_static=$enable_dlopen_self_static
7354
7355 # Compiler flag to prevent dynamic linking.
7356 link_static_flag=$lt_link_static_flag
7357
7358 # Compiler flag to turn off builtin functions.
7359 no_builtin_flag=$lt_no_builtin_flag
7360
7361 # Compiler flag to allow reflexive dlopens.
7362 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7363
7364 # Compiler flag to generate shared objects directly from archives.
7365 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7366
7367 # Compiler flag to generate thread-safe objects.
7368 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7369
7370 # Library versioning type.
7371 version_type=$version_type
7372
7373 # Format of library name prefix.
7374 libname_spec=$lt_libname_spec
7375
7376 # List of archive names.  First name is the real one, the rest are links.
7377 # The last name is the one that the linker finds with -lNAME.
7378 library_names_spec=$lt_library_names_spec
7379
7380 # The coded name of the library, if different from the real name.
7381 soname_spec=$lt_soname_spec
7382
7383 # Commands used to build and install an old-style archive.
7384 RANLIB=$lt_RANLIB
7385 old_archive_cmds=$lt_old_archive_cmds
7386 old_postinstall_cmds=$lt_old_postinstall_cmds
7387 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7388
7389 # Create an old-style archive from a shared archive.
7390 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7391
7392 # Create a temporary old-style archive to link instead of a shared archive.
7393 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7394
7395 # Commands used to build and install a shared archive.
7396 archive_cmds=$lt_archive_cmds
7397 archive_expsym_cmds=$lt_archive_expsym_cmds
7398 postinstall_cmds=$lt_postinstall_cmds
7399 postuninstall_cmds=$lt_postuninstall_cmds
7400
7401 # Commands to strip libraries.
7402 old_striplib=$lt_old_striplib
7403 striplib=$lt_striplib
7404
7405 # Method to check whether dependent libraries are shared objects.
7406 deplibs_check_method=$lt_deplibs_check_method
7407
7408 # Command to use when deplibs_check_method == file_magic.
7409 file_magic_cmd=$lt_file_magic_cmd
7410
7411 # Flag that allows shared libraries with undefined symbols to be built.
7412 allow_undefined_flag=$lt_allow_undefined_flag
7413
7414 # Flag that forces no undefined symbols.
7415 no_undefined_flag=$lt_no_undefined_flag
7416
7417 # Commands used to finish a libtool library installation in a directory.
7418 finish_cmds=$lt_finish_cmds
7419
7420 # Same as above, but a single script fragment to be evaled but not shown.
7421 finish_eval=$lt_finish_eval
7422
7423 # Take the output of nm and produce a listing of raw symbols and C names.
7424 global_symbol_pipe=$lt_global_symbol_pipe
7425
7426 # Transform the output of nm in a proper C declaration
7427 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7428
7429 # Transform the output of nm in a C name address pair
7430 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7431
7432 # This is the shared library runtime path variable.
7433 runpath_var=$runpath_var
7434
7435 # This is the shared library path variable.
7436 shlibpath_var=$shlibpath_var
7437
7438 # Is shlibpath searched before the hard-coded library search path?
7439 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7440
7441 # How to hardcode a shared library path into an executable.
7442 hardcode_action=$hardcode_action
7443
7444 # Whether we should hardcode library paths into libraries.
7445 hardcode_into_libs=$hardcode_into_libs
7446
7447 # Flag to hardcode \$libdir into a binary during linking.
7448 # This must work even if \$libdir does not exist.
7449 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7450
7451 # Whether we need a single -rpath flag with a separated argument.
7452 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7453
7454 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7455 # resulting binary.
7456 hardcode_direct=$hardcode_direct
7457
7458 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7459 # resulting binary.
7460 hardcode_minus_L=$hardcode_minus_L
7461
7462 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7463 # the resulting binary.
7464 hardcode_shlibpath_var=$hardcode_shlibpath_var
7465
7466 # Variables whose values should be saved in libtool wrapper scripts and
7467 # restored at relink time.
7468 variables_saved_for_relink="$variables_saved_for_relink"
7469
7470 # Whether libtool must link a program against all its dependency libraries.
7471 link_all_deplibs=$link_all_deplibs
7472
7473 # Compile-time system search path for libraries
7474 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7475
7476 # Run-time system search path for libraries
7477 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7478
7479 # Fix the shell variable \$srcfile for the compiler.
7480 fix_srcfile_path="$fix_srcfile_path"
7481
7482 # Set to yes if exported symbols are required.
7483 always_export_symbols=$always_export_symbols
7484
7485 # The commands to list exported symbols.
7486 export_symbols_cmds=$lt_export_symbols_cmds
7487
7488 # The commands to extract the exported symbol list from a shared archive.
7489 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7490
7491 # Symbols that should not be listed in the preloaded symbols.
7492 exclude_expsyms=$lt_exclude_expsyms
7493
7494 # Symbols that must always be exported.
7495 include_expsyms=$lt_include_expsyms
7496
7497 # ### END LIBTOOL CONFIG
7498
7499 __EOF__
7500
7501   case $host_os in
7502   aix3*)
7503     cat <<\EOF >> "${ofile}T"
7504
7505 # AIX sometimes has problems with the GCC collect2 program.  For some
7506 # reason, if we set the COLLECT_NAMES environment variable, the problems
7507 # vanish in a puff of smoke.
7508 if test "X${COLLECT_NAMES+set}" != Xset; then
7509   COLLECT_NAMES=
7510   export COLLECT_NAMES
7511 fi
7512 EOF
7513     ;;
7514   esac
7515
7516   case $host_os in
7517   cygwin* | mingw* | pw32* | os2*)
7518     cat <<'EOF' >> "${ofile}T"
7519       # This is a source program that is used to create dlls on Windows
7520       # Don't remove nor modify the starting and closing comments
7521 # /* ltdll.c starts here */
7522 # #define WIN32_LEAN_AND_MEAN
7523 # #include <windows.h>
7524 # #undef WIN32_LEAN_AND_MEAN
7525 # #include <stdio.h>
7526 #
7527 # #ifndef __CYGWIN__
7528 # #  ifdef __CYGWIN32__
7529 # #    define __CYGWIN__ __CYGWIN32__
7530 # #  endif
7531 # #endif
7532 #
7533 # #ifdef __cplusplus
7534 # extern "C" {
7535 # #endif
7536 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7537 # #ifdef __cplusplus
7538 # }
7539 # #endif
7540 #
7541 # #ifdef __CYGWIN__
7542 # #include <cygwin/cygwin_dll.h>
7543 # DECLARE_CYGWIN_DLL( DllMain );
7544 # #endif
7545 # HINSTANCE __hDllInstance_base;
7546 #
7547 # BOOL APIENTRY
7548 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7549 # {
7550 #   __hDllInstance_base = hInst;
7551 #   return TRUE;
7552 # }
7553 # /* ltdll.c ends here */
7554         # This is a source program that is used to create import libraries
7555         # on Windows for dlls which lack them. Don't remove nor modify the
7556         # starting and closing comments
7557 # /* impgen.c starts here */
7558 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7559 #
7560 #  This file is part of GNU libtool.
7561 #
7562 #  This program is free software; you can redistribute it and/or modify
7563 #  it under the terms of the GNU General Public License as published by
7564 #  the Free Software Foundation; either version 2 of the License, or
7565 #  (at your option) any later version.
7566 #
7567 #  This program is distributed in the hope that it will be useful,
7568 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7569 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7570 #  GNU General Public License for more details.
7571 #
7572 #  You should have received a copy of the GNU General Public License
7573 #  along with this program; if not, write to the Free Software
7574 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7575 #  */
7576 #
7577 # #include <stdio.h>            /* for printf() */
7578 # #include <unistd.h>           /* for open(), lseek(), read() */
7579 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7580 # #include <string.h>           /* for strdup() */
7581 #
7582 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7583 # #ifndef O_BINARY
7584 # #define O_BINARY 0
7585 # #endif
7586 #
7587 # static unsigned int
7588 # pe_get16 (fd, offset)
7589 #      int fd;
7590 #      int offset;
7591 # {
7592 #   unsigned char b[2];
7593 #   lseek (fd, offset, SEEK_SET);
7594 #   read (fd, b, 2);
7595 #   return b[0] + (b[1]<<8);
7596 # }
7597 #
7598 # static unsigned int
7599 # pe_get32 (fd, offset)
7600 #     int fd;
7601 #     int offset;
7602 # {
7603 #   unsigned char b[4];
7604 #   lseek (fd, offset, SEEK_SET);
7605 #   read (fd, b, 4);
7606 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7607 # }
7608 #
7609 # static unsigned int
7610 # pe_as32 (ptr)
7611 #      void *ptr;
7612 # {
7613 #   unsigned char *b = ptr;
7614 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7615 # }
7616 #
7617 # int
7618 # main (argc, argv)
7619 #     int argc;
7620 #     char *argv[];
7621 # {
7622 #     int dll;
7623 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7624 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7625 #     unsigned long name_rvas, nexp;
7626 #     unsigned char *expdata, *erva;
7627 #     char *filename, *dll_name;
7628 #
7629 #     filename = argv[1];
7630 #
7631 #     dll = open(filename, O_RDONLY|O_BINARY);
7632 #     if (dll < 1)
7633 #       return 1;
7634 #
7635 #     dll_name = filename;
7636 #
7637 #     for (i=0; filename[i]; i++)
7638 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7639 #           dll_name = filename + i +1;
7640 #
7641 #     pe_header_offset = pe_get32 (dll, 0x3c);
7642 #     opthdr_ofs = pe_header_offset + 4 + 20;
7643 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7644 #
7645 #     if (num_entries < 1) /* no exports */
7646 #       return 1;
7647 #
7648 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7649 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7650 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7651 #     secptr = (pe_header_offset + 4 + 20 +
7652 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7653 #
7654 #     expptr = 0;
7655 #     for (i = 0; i < nsections; i++)
7656 #     {
7657 #       char sname[8];
7658 #       unsigned long secptr1 = secptr + 40 * i;
7659 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7660 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7661 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7662 #       lseek(dll, secptr1, SEEK_SET);
7663 #       read(dll, sname, 8);
7664 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7665 #       {
7666 #           expptr = fptr + (export_rva - vaddr);
7667 #           if (export_rva + export_size > vaddr + vsize)
7668 #               export_size = vsize - (export_rva - vaddr);
7669 #           break;
7670 #       }
7671 #     }
7672 #
7673 #     expdata = (unsigned char*)malloc(export_size);
7674 #     lseek (dll, expptr, SEEK_SET);
7675 #     read (dll, expdata, export_size);
7676 #     erva = expdata - export_rva;
7677 #
7678 #     nexp = pe_as32 (expdata+24);
7679 #     name_rvas = pe_as32 (expdata+32);
7680 #
7681 #     printf ("EXPORTS\n");
7682 #     for (i = 0; i<nexp; i++)
7683 #     {
7684 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7685 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7686 #     }
7687 #
7688 #     return 0;
7689 # }
7690 # /* impgen.c ends here */
7691
7692 EOF
7693     ;;
7694   esac
7695
7696   # We use sed instead of cat because bash on DJGPP gets confused if
7697   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7698   # text mode, it properly converts lines to CR/LF.  This bash problem
7699   # is reportedly fixed, but why not run on old versions too?
7700   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7701
7702   mv -f "${ofile}T" "$ofile" || \
7703     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7704   chmod +x "$ofile"
7705 fi
7706
7707
7708
7709
7710
7711 # This can be used to rebuild libtool when needed
7712 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7713
7714 # Always use our own libtool.
7715 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7716
7717 # Prevent multiple expansion
7718
7719
7720
7721 ol_link_perl=no
7722 if test $ol_enable_perl != no ; then
7723         # Extract the first word of "perl", so it can be a program name with args.
7724 set dummy perl; ac_word=$2
7725 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7726 echo "configure:7727: checking for $ac_word" >&5
7727 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7728   echo $ac_n "(cached) $ac_c" 1>&6
7729 else
7730   case "$PERLBIN" in
7731   /*)
7732   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7733   ;;
7734   ?:/*)
7735   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7736   ;;
7737   *)
7738   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7739   ac_dummy="$PATH"
7740   for ac_dir in $ac_dummy; do 
7741     test -z "$ac_dir" && ac_dir=.
7742     if test -f $ac_dir/$ac_word; then
7743       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7744       break
7745     fi
7746   done
7747   IFS="$ac_save_ifs"
7748   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7749   ;;
7750 esac
7751 fi
7752 PERLBIN="$ac_cv_path_PERLBIN"
7753 if test -n "$PERLBIN"; then
7754   echo "$ac_t""$PERLBIN" 1>&6
7755 else
7756   echo "$ac_t""no" 1>&6
7757 fi
7758
7759
7760         if test "no$PERLBIN" = "no" ; then
7761                 if test $ol_enable_perl = yes ; then
7762                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7763                 fi
7764
7765         else
7766                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7767                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7768
7769                 if test x"$ol_enable_perl" = "xyes" ; then
7770                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7771                 else
7772                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7773                 fi
7774                                 ol_link_perl=yes
7775         fi
7776 fi
7777
7778 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7779 echo "configure:7780: checking how to run the C preprocessor" >&5
7780 # On Suns, sometimes $CPP names a directory.
7781 if test -n "$CPP" && test -d "$CPP"; then
7782   CPP=
7783 fi
7784 if test -z "$CPP"; then
7785 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7786   echo $ac_n "(cached) $ac_c" 1>&6
7787 else
7788     # This must be in double quotes, not single quotes, because CPP may get
7789   # substituted into the Makefile and "${CC-cc}" will confuse make.
7790   CPP="${CC-cc} -E"
7791   # On the NeXT, cc -E runs the code through the compiler's parser,
7792   # not just through cpp.
7793   cat > conftest.$ac_ext <<EOF
7794 #line 7795 "configure"
7795 #include "confdefs.h"
7796 #include <assert.h>
7797 Syntax Error
7798 EOF
7799 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7800 { (eval echo configure:7801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7801 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7802 if test -z "$ac_err"; then
7803   :
7804 else
7805   echo "$ac_err" >&5
7806   echo "configure: failed program was:" >&5
7807   cat conftest.$ac_ext >&5
7808   rm -rf conftest*
7809   CPP="${CC-cc} -E -traditional-cpp"
7810   cat > conftest.$ac_ext <<EOF
7811 #line 7812 "configure"
7812 #include "confdefs.h"
7813 #include <assert.h>
7814 Syntax Error
7815 EOF
7816 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7817 { (eval echo configure:7818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7818 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7819 if test -z "$ac_err"; then
7820   :
7821 else
7822   echo "$ac_err" >&5
7823   echo "configure: failed program was:" >&5
7824   cat conftest.$ac_ext >&5
7825   rm -rf conftest*
7826   CPP="${CC-cc} -nologo -E"
7827   cat > conftest.$ac_ext <<EOF
7828 #line 7829 "configure"
7829 #include "confdefs.h"
7830 #include <assert.h>
7831 Syntax Error
7832 EOF
7833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7834 { (eval echo configure:7835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7836 if test -z "$ac_err"; then
7837   :
7838 else
7839   echo "$ac_err" >&5
7840   echo "configure: failed program was:" >&5
7841   cat conftest.$ac_ext >&5
7842   rm -rf conftest*
7843   CPP=/lib/cpp
7844 fi
7845 rm -f conftest*
7846 fi
7847 rm -f conftest*
7848 fi
7849 rm -f conftest*
7850   ac_cv_prog_CPP="$CPP"
7851 fi
7852   CPP="$ac_cv_prog_CPP"
7853 else
7854   ac_cv_prog_CPP="$CPP"
7855 fi
7856 echo "$ac_t""$CPP" 1>&6
7857
7858
7859
7860 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7861 echo "configure:7862: checking for Cygwin environment" >&5
7862 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7863   echo $ac_n "(cached) $ac_c" 1>&6
7864 else
7865   cat > conftest.$ac_ext <<EOF
7866 #line 7867 "configure"
7867 #include "confdefs.h"
7868
7869 int main() {
7870
7871 #ifndef __CYGWIN__
7872 #define __CYGWIN__ __CYGWIN32__
7873 #endif
7874 return __CYGWIN__;
7875 ; return 0; }
7876 EOF
7877 if { (eval echo configure:7878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7878   rm -rf conftest*
7879   ac_cv_cygwin=yes
7880 else
7881   echo "configure: failed program was:" >&5
7882   cat conftest.$ac_ext >&5
7883   rm -rf conftest*
7884   ac_cv_cygwin=no
7885 fi
7886 rm -f conftest*
7887 fi
7888
7889 echo "$ac_t""$ac_cv_cygwin" 1>&6
7890 CYGWIN=
7891 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7892 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7893 echo "configure:7894: checking for mingw32 environment" >&5
7894 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7895   echo $ac_n "(cached) $ac_c" 1>&6
7896 else
7897   cat > conftest.$ac_ext <<EOF
7898 #line 7899 "configure"
7899 #include "confdefs.h"
7900
7901 int main() {
7902 return __MINGW32__;
7903 ; return 0; }
7904 EOF
7905 if { (eval echo configure:7906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7906   rm -rf conftest*
7907   ac_cv_mingw32=yes
7908 else
7909   echo "configure: failed program was:" >&5
7910   cat conftest.$ac_ext >&5
7911   rm -rf conftest*
7912   ac_cv_mingw32=no
7913 fi
7914 rm -f conftest*
7915 fi
7916
7917 echo "$ac_t""$ac_cv_mingw32" 1>&6
7918 MINGW32=
7919 test "$ac_cv_mingw32" = yes && MINGW32=yes
7920
7921
7922
7923 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7924 echo "configure:7925: checking for executable suffix" >&5
7925 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7926   echo $ac_n "(cached) $ac_c" 1>&6
7927 else
7928   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7929   ac_cv_exeext=.exe
7930 else
7931   rm -f conftest*
7932   echo 'int main () { return 0; }' > conftest.$ac_ext
7933   ac_cv_exeext=
7934   if { (eval echo configure:7935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7935     for file in conftest.*; do
7936       case $file in
7937       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7938       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7939       esac
7940     done
7941   else
7942     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7943   fi
7944   rm -f conftest*
7945   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7946 fi
7947 fi
7948
7949 EXEEXT=""
7950 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7951 echo "$ac_t""${ac_cv_exeext}" 1>&6
7952 ac_exeext=$EXEEXT
7953
7954 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7955 echo "configure:7956: checking for object suffix" >&5
7956 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7957   echo $ac_n "(cached) $ac_c" 1>&6
7958 else
7959   rm -f conftest*
7960 echo 'int i = 1;' > conftest.$ac_ext
7961 if { (eval echo configure:7962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7962   for ac_file in conftest.*; do
7963     case $ac_file in
7964     *.c) ;;
7965     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7966     esac
7967   done
7968 else
7969   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7970 fi
7971 rm -f conftest*
7972 fi
7973
7974 echo "$ac_t""$ac_cv_objext" 1>&6
7975 OBJEXT=$ac_cv_objext
7976 ac_objext=$ac_cv_objext
7977
7978
7979 cat >> confdefs.h <<EOF
7980 #define EXEEXT "${EXEEXT}"
7981 EOF
7982
7983
7984 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7985 echo "configure:7986: checking for be_app in -lbe" >&5
7986 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7987 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7988   echo $ac_n "(cached) $ac_c" 1>&6
7989 else
7990   ac_save_LIBS="$LIBS"
7991 LIBS="-lbe -lroot -lnet $LIBS"
7992 cat > conftest.$ac_ext <<EOF
7993 #line 7994 "configure"
7994 #include "confdefs.h"
7995 /* Override any gcc2 internal prototype to avoid an error.  */
7996 /* We use char because int might match the return type of a gcc2
7997     builtin and then its argument prototype would still apply.  */
7998 char be_app();
7999
8000 int main() {
8001 be_app()
8002 ; return 0; }
8003 EOF
8004 if { (eval echo configure:8005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8005   rm -rf conftest*
8006   eval "ac_cv_lib_$ac_lib_var=yes"
8007 else
8008   echo "configure: failed program was:" >&5
8009   cat conftest.$ac_ext >&5
8010   rm -rf conftest*
8011   eval "ac_cv_lib_$ac_lib_var=no"
8012 fi
8013 rm -f conftest*
8014 LIBS="$ac_save_LIBS"
8015
8016 fi
8017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8018   echo "$ac_t""yes" 1>&6
8019   LIBS="$LIBS -lbe -lroot -lnet"
8020 else
8021   echo "$ac_t""no" 1>&6
8022 :
8023 fi
8024
8025
8026
8027
8028
8029 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8030 echo "configure:8031: checking for ${CC-cc} option to accept ANSI C" >&5
8031 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8032   echo $ac_n "(cached) $ac_c" 1>&6
8033 else
8034   am_cv_prog_cc_stdc=no
8035 ac_save_CC="$CC"
8036 # Don't try gcc -ansi; that turns off useful extensions and
8037 # breaks some systems' header files.
8038 # AIX                   -qlanglvl=ansi
8039 # Ultrix and OSF/1      -std1
8040 # HP-UX 10.20 and later -Ae
8041 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8042 # SVR4                  -Xc -D__EXTENSIONS__
8043 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8044 do
8045   CC="$ac_save_CC $ac_arg"
8046   cat > conftest.$ac_ext <<EOF
8047 #line 8048 "configure"
8048 #include "confdefs.h"
8049 #include <stdarg.h>
8050 #include <stdio.h>
8051 #include <sys/types.h>
8052 #include <sys/stat.h>
8053 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8054 struct buf { int x; };
8055 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8056 static char *e (p, i)
8057      char **p;
8058      int i;
8059 {
8060   return p[i];
8061 }
8062 static char *f (char * (*g) (char **, int), char **p, ...)
8063 {
8064   char *s;
8065   va_list v;
8066   va_start (v,p);
8067   s = g (p, va_arg (v,int));
8068   va_end (v);
8069   return s;
8070 }
8071 int test (int i, double x);
8072 struct s1 {int (*f) (int a);};
8073 struct s2 {int (*f) (double a);};
8074 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8075 int argc;
8076 char **argv;
8077
8078 int main() {
8079
8080 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8081
8082 ; return 0; }
8083 EOF
8084 if { (eval echo configure:8085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8085   rm -rf conftest*
8086   am_cv_prog_cc_stdc="$ac_arg"; break
8087 else
8088   echo "configure: failed program was:" >&5
8089   cat conftest.$ac_ext >&5
8090 fi
8091 rm -f conftest*
8092 done
8093 CC="$ac_save_CC"
8094
8095 fi
8096
8097 if test -z "$am_cv_prog_cc_stdc"; then
8098   echo "$ac_t""none needed" 1>&6
8099 else
8100   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8101 fi
8102 case "x$am_cv_prog_cc_stdc" in
8103   x|xno) ;;
8104   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8105 esac
8106
8107 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8108         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8109 fi
8110
8111 # test for make depend flag
8112 OL_MKDEP=
8113 OL_MKDEP_FLAGS=
8114 if test -z "${MKDEP}"; then
8115         OL_MKDEP="${CC-cc}"
8116         if test -z "${MKDEP_FLAGS}"; then
8117                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8118 echo "configure:8119: checking for ${OL_MKDEP} depend flag" >&5
8119 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8120   echo $ac_n "(cached) $ac_c" 1>&6
8121 else
8122   
8123                         ol_cv_mkdep=no
8124                         for flag in "-M" "-xM"; do
8125                                 cat > conftest.c <<EOF
8126  noCode;
8127 EOF
8128                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8129                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8130                                 then
8131                                         if test ! -f conftest."${ac_object}" ; then
8132                                                 ol_cv_mkdep=$flag
8133                                                 OL_MKDEP_FLAGS="$flag"
8134                                                 break
8135                                         fi
8136                                 fi
8137                         done
8138                         rm -f conftest*
8139                 
8140 fi
8141
8142 echo "$ac_t""$ol_cv_mkdep" 1>&6
8143         else
8144                 cc_cv_mkdep=yes
8145                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8146         fi
8147 else
8148         cc_cv_mkdep=yes
8149         OL_MKDEP="${MKDEP}"
8150         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8151 fi
8152
8153
8154
8155 if test "${ol_cv_mkdep}" = no ; then
8156         # this will soon become an error
8157         echo "configure: warning: do not know how to generate dependencies" 1>&2
8158 fi
8159
8160 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8161 echo "configure:8162: checking for afopen in -ls" >&5
8162 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8164   echo $ac_n "(cached) $ac_c" 1>&6
8165 else
8166   ac_save_LIBS="$LIBS"
8167 LIBS="-ls  $LIBS"
8168 cat > conftest.$ac_ext <<EOF
8169 #line 8170 "configure"
8170 #include "confdefs.h"
8171 /* Override any gcc2 internal prototype to avoid an error.  */
8172 /* We use char because int might match the return type of a gcc2
8173     builtin and then its argument prototype would still apply.  */
8174 char afopen();
8175
8176 int main() {
8177 afopen()
8178 ; return 0; }
8179 EOF
8180 if { (eval echo configure:8181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8181   rm -rf conftest*
8182   eval "ac_cv_lib_$ac_lib_var=yes"
8183 else
8184   echo "configure: failed program was:" >&5
8185   cat conftest.$ac_ext >&5
8186   rm -rf conftest*
8187   eval "ac_cv_lib_$ac_lib_var=no"
8188 fi
8189 rm -f conftest*
8190 LIBS="$ac_save_LIBS"
8191
8192 fi
8193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8194   echo "$ac_t""yes" 1>&6
8195   
8196         AUTH_LIBS=-ls
8197         cat >> confdefs.h <<\EOF
8198 #define HAVE_AIX_SECURITY 1
8199 EOF
8200
8201
8202 else
8203   echo "$ac_t""no" 1>&6
8204 fi
8205
8206
8207 case "$target" in
8208 *-ibm-openedition)
8209         ac_cv_func_getopt=no
8210         cat >> confdefs.h <<\EOF
8211 #define BOTH_STRINGS_H 1
8212 EOF
8213
8214         ;;
8215 esac
8216
8217 ol_link_modules=no
8218 WITH_MODULES_ENABLED=no
8219 if test $ol_enable_modules != no ; then
8220         for ac_hdr in ltdl.h
8221 do
8222 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8223 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8224 echo "configure:8225: checking for $ac_hdr" >&5
8225 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8226   echo $ac_n "(cached) $ac_c" 1>&6
8227 else
8228   cat > conftest.$ac_ext <<EOF
8229 #line 8230 "configure"
8230 #include "confdefs.h"
8231 #include <$ac_hdr>
8232 EOF
8233 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8234 { (eval echo configure:8235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8235 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8236 if test -z "$ac_err"; then
8237   rm -rf conftest*
8238   eval "ac_cv_header_$ac_safe=yes"
8239 else
8240   echo "$ac_err" >&5
8241   echo "configure: failed program was:" >&5
8242   cat conftest.$ac_ext >&5
8243   rm -rf conftest*
8244   eval "ac_cv_header_$ac_safe=no"
8245 fi
8246 rm -f conftest*
8247 fi
8248 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8249   echo "$ac_t""yes" 1>&6
8250     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8251   cat >> confdefs.h <<EOF
8252 #define $ac_tr_hdr 1
8253 EOF
8254  
8255 else
8256   echo "$ac_t""no" 1>&6
8257 fi
8258 done
8259
8260
8261         if test $ac_cv_header_ltdl_h = no ; then
8262                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8263         fi
8264
8265         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8266 echo "configure:8267: checking for lt_dlinit in -lltdl" >&5
8267 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8268 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8269   echo $ac_n "(cached) $ac_c" 1>&6
8270 else
8271   ac_save_LIBS="$LIBS"
8272 LIBS="-lltdl  $LIBS"
8273 cat > conftest.$ac_ext <<EOF
8274 #line 8275 "configure"
8275 #include "confdefs.h"
8276 /* Override any gcc2 internal prototype to avoid an error.  */
8277 /* We use char because int might match the return type of a gcc2
8278     builtin and then its argument prototype would still apply.  */
8279 char lt_dlinit();
8280
8281 int main() {
8282 lt_dlinit()
8283 ; return 0; }
8284 EOF
8285 if { (eval echo configure:8286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8286   rm -rf conftest*
8287   eval "ac_cv_lib_$ac_lib_var=yes"
8288 else
8289   echo "configure: failed program was:" >&5
8290   cat conftest.$ac_ext >&5
8291   rm -rf conftest*
8292   eval "ac_cv_lib_$ac_lib_var=no"
8293 fi
8294 rm -f conftest*
8295 LIBS="$ac_save_LIBS"
8296
8297 fi
8298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8299   echo "$ac_t""yes" 1>&6
8300   
8301                 MODULES_LIBS=-lltdl
8302                 cat >> confdefs.h <<\EOF
8303 #define HAVE_LIBLTDL 1
8304 EOF
8305
8306         
8307 else
8308   echo "$ac_t""no" 1>&6
8309 fi
8310
8311
8312         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8313                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8314         fi
8315         ol_link_modules=yes
8316         WITH_MODULES_ENABLED=yes
8317
8318 else
8319         for i in $Backends; do
8320                 eval "ol_tmp=\$ol_enable_$i"
8321                 if test $ol_tmp = mod ; then
8322                         echo "configure: warning: building static $i backend" 1>&2
8323                         eval "ol_enable_$i=yes"
8324                 fi
8325         done
8326         for i in $Overlays; do
8327                 eval "ol_tmp=\$ol_enable_$i"
8328                 if test $ol_tmp = mod ; then
8329                         echo "configure: warning: building static $i overlay" 1>&2
8330                         eval "ol_enable_$i=yes"
8331                 fi
8332         done
8333 fi
8334
8335 # test for EBCDIC
8336 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8337 echo "configure:8338: checking for EBCDIC" >&5
8338 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8339   echo $ac_n "(cached) $ac_c" 1>&6
8340 else
8341   
8342         cat > conftest.$ac_ext <<EOF
8343 #line 8344 "configure"
8344 #include "confdefs.h"
8345
8346 #if !('M' == 0xd4)
8347 #include <__ASCII__/generate_error.h>
8348 #endif
8349
8350 EOF
8351 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8352 { (eval echo configure:8353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8353 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8354 if test -z "$ac_err"; then
8355   rm -rf conftest*
8356   ol_cv_cpp_ebcdic=yes
8357 else
8358   echo "$ac_err" >&5
8359   echo "configure: failed program was:" >&5
8360   cat conftest.$ac_ext >&5
8361   rm -rf conftest*
8362   ol_cv_cpp_ebcdic=no
8363 fi
8364 rm -f conftest*
8365 fi
8366
8367 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8368 if test $ol_cv_cpp_ebcdic = yes ; then
8369         cat >> confdefs.h <<\EOF
8370 #define HAVE_EBCDIC 1
8371 EOF
8372
8373 fi
8374
8375 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8376 echo "configure:8377: checking for ANSI C header files" >&5
8377 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8378   echo $ac_n "(cached) $ac_c" 1>&6
8379 else
8380   cat > conftest.$ac_ext <<EOF
8381 #line 8382 "configure"
8382 #include "confdefs.h"
8383 #include <stdlib.h>
8384 #include <stdarg.h>
8385 #include <string.h>
8386 #include <float.h>
8387 EOF
8388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8389 { (eval echo configure:8390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8391 if test -z "$ac_err"; then
8392   rm -rf conftest*
8393   ol_cv_header_stdc=yes
8394 else
8395   echo "$ac_err" >&5
8396   echo "configure: failed program was:" >&5
8397   cat conftest.$ac_ext >&5
8398   rm -rf conftest*
8399   ol_cv_header_stdc=no
8400 fi
8401 rm -f conftest*
8402
8403 if test $ol_cv_header_stdc = yes; then
8404   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8405 cat > conftest.$ac_ext <<EOF
8406 #line 8407 "configure"
8407 #include "confdefs.h"
8408 #include <string.h>
8409 EOF
8410 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8411   egrep "memchr" >/dev/null 2>&1; then
8412   :
8413 else
8414   rm -rf conftest*
8415   ol_cv_header_stdc=no
8416 fi
8417 rm -f conftest*
8418
8419 fi
8420
8421 if test $ol_cv_header_stdc = yes; then
8422   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8423 cat > conftest.$ac_ext <<EOF
8424 #line 8425 "configure"
8425 #include "confdefs.h"
8426 #include <stdlib.h>
8427 EOF
8428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8429   egrep "free" >/dev/null 2>&1; then
8430   :
8431 else
8432   rm -rf conftest*
8433   ol_cv_header_stdc=no
8434 fi
8435 rm -f conftest*
8436
8437 fi
8438
8439 if test $ol_cv_header_stdc = yes; then
8440   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8441 if test "$cross_compiling" = yes; then
8442   :
8443 else
8444   cat > conftest.$ac_ext <<EOF
8445 #line 8446 "configure"
8446 #include "confdefs.h"
8447 #include <ctype.h>
8448 #ifndef HAVE_EBCDIC
8449 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8450 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8451 #else
8452 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8453                 || ('j' <= (c) && (c) <= 'r') \
8454                 || ('s' <= (c) && (c) <= 'z'))
8455 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8456 #endif
8457 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8458 int main () { int i; for (i = 0; i < 256; i++)
8459 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8460 exit (0); }
8461
8462 EOF
8463 if { (eval echo configure:8464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
8464 then
8465   :
8466 else
8467   echo "configure: failed program was:" >&5
8468   cat conftest.$ac_ext >&5
8469   rm -fr conftest*
8470   ol_cv_header_stdc=no
8471 fi
8472 rm -fr conftest*
8473 fi
8474
8475 fi
8476 fi
8477
8478 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8479 if test $ol_cv_header_stdc = yes; then
8480   cat >> confdefs.h <<\EOF
8481 #define STDC_HEADERS 1
8482 EOF
8483
8484 fi
8485 ac_cv_header_stdc=disable
8486
8487
8488 if test $ol_cv_header_stdc != yes; then
8489         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8490 fi
8491
8492 ac_header_dirent=no
8493 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8494 do
8495 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8496 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8497 echo "configure:8498: checking for $ac_hdr that defines DIR" >&5
8498 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8499   echo $ac_n "(cached) $ac_c" 1>&6
8500 else
8501   cat > conftest.$ac_ext <<EOF
8502 #line 8503 "configure"
8503 #include "confdefs.h"
8504 #include <sys/types.h>
8505 #include <$ac_hdr>
8506 int main() {
8507 DIR *dirp = 0;
8508 ; return 0; }
8509 EOF
8510 if { (eval echo configure:8511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8511   rm -rf conftest*
8512   eval "ac_cv_header_dirent_$ac_safe=yes"
8513 else
8514   echo "configure: failed program was:" >&5
8515   cat conftest.$ac_ext >&5
8516   rm -rf conftest*
8517   eval "ac_cv_header_dirent_$ac_safe=no"
8518 fi
8519 rm -f conftest*
8520 fi
8521 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8522   echo "$ac_t""yes" 1>&6
8523     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8524   cat >> confdefs.h <<EOF
8525 #define $ac_tr_hdr 1
8526 EOF
8527  ac_header_dirent=$ac_hdr; break
8528 else
8529   echo "$ac_t""no" 1>&6
8530 fi
8531 done
8532 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8533 if test $ac_header_dirent = dirent.h; then
8534 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8535 echo "configure:8536: checking for opendir in -ldir" >&5
8536 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8537 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8538   echo $ac_n "(cached) $ac_c" 1>&6
8539 else
8540   ac_save_LIBS="$LIBS"
8541 LIBS="-ldir  $LIBS"
8542 cat > conftest.$ac_ext <<EOF
8543 #line 8544 "configure"
8544 #include "confdefs.h"
8545 /* Override any gcc2 internal prototype to avoid an error.  */
8546 /* We use char because int might match the return type of a gcc2
8547     builtin and then its argument prototype would still apply.  */
8548 char opendir();
8549
8550 int main() {
8551 opendir()
8552 ; return 0; }
8553 EOF
8554 if { (eval echo configure:8555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8555   rm -rf conftest*
8556   eval "ac_cv_lib_$ac_lib_var=yes"
8557 else
8558   echo "configure: failed program was:" >&5
8559   cat conftest.$ac_ext >&5
8560   rm -rf conftest*
8561   eval "ac_cv_lib_$ac_lib_var=no"
8562 fi
8563 rm -f conftest*
8564 LIBS="$ac_save_LIBS"
8565
8566 fi
8567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8568   echo "$ac_t""yes" 1>&6
8569   LIBS="$LIBS -ldir"
8570 else
8571   echo "$ac_t""no" 1>&6
8572 fi
8573
8574 else
8575 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8576 echo "configure:8577: checking for opendir in -lx" >&5
8577 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8578 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8579   echo $ac_n "(cached) $ac_c" 1>&6
8580 else
8581   ac_save_LIBS="$LIBS"
8582 LIBS="-lx  $LIBS"
8583 cat > conftest.$ac_ext <<EOF
8584 #line 8585 "configure"
8585 #include "confdefs.h"
8586 /* Override any gcc2 internal prototype to avoid an error.  */
8587 /* We use char because int might match the return type of a gcc2
8588     builtin and then its argument prototype would still apply.  */
8589 char opendir();
8590
8591 int main() {
8592 opendir()
8593 ; return 0; }
8594 EOF
8595 if { (eval echo configure:8596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8596   rm -rf conftest*
8597   eval "ac_cv_lib_$ac_lib_var=yes"
8598 else
8599   echo "configure: failed program was:" >&5
8600   cat conftest.$ac_ext >&5
8601   rm -rf conftest*
8602   eval "ac_cv_lib_$ac_lib_var=no"
8603 fi
8604 rm -f conftest*
8605 LIBS="$ac_save_LIBS"
8606
8607 fi
8608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8609   echo "$ac_t""yes" 1>&6
8610   LIBS="$LIBS -lx"
8611 else
8612   echo "$ac_t""no" 1>&6
8613 fi
8614
8615 fi
8616
8617 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8618 echo "configure:8619: checking for sys/wait.h that is POSIX.1 compatible" >&5
8619 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8620   echo $ac_n "(cached) $ac_c" 1>&6
8621 else
8622   cat > conftest.$ac_ext <<EOF
8623 #line 8624 "configure"
8624 #include "confdefs.h"
8625 #include <sys/types.h>
8626 #include <sys/wait.h>
8627 #ifndef WEXITSTATUS
8628 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8629 #endif
8630 #ifndef WIFEXITED
8631 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8632 #endif
8633 int main() {
8634 int s;
8635 wait (&s);
8636 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8637 ; return 0; }
8638 EOF
8639 if { (eval echo configure:8640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8640   rm -rf conftest*
8641   ac_cv_header_sys_wait_h=yes
8642 else
8643   echo "configure: failed program was:" >&5
8644   cat conftest.$ac_ext >&5
8645   rm -rf conftest*
8646   ac_cv_header_sys_wait_h=no
8647 fi
8648 rm -f conftest*
8649 fi
8650
8651 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8652 if test $ac_cv_header_sys_wait_h = yes; then
8653   cat >> confdefs.h <<\EOF
8654 #define HAVE_SYS_WAIT_H 1
8655 EOF
8656
8657 fi
8658
8659 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8660 echo "configure:8661: checking POSIX termios" >&5
8661 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8662   echo $ac_n "(cached) $ac_c" 1>&6
8663 else
8664   cat > conftest.$ac_ext <<EOF
8665 #line 8666 "configure"
8666 #include "confdefs.h"
8667 #include <sys/types.h>
8668 #include <unistd.h>
8669 #include <termios.h>
8670 int main() {
8671 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8672    tcgetattr(0, 0);
8673 ; return 0; }
8674 EOF
8675 if { (eval echo configure:8676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8676   rm -rf conftest*
8677   am_cv_sys_posix_termios=yes
8678 else
8679   echo "configure: failed program was:" >&5
8680   cat conftest.$ac_ext >&5
8681   rm -rf conftest*
8682   am_cv_sys_posix_termios=no
8683 fi
8684 rm -f conftest*
8685 fi
8686
8687 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8688
8689
8690  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8691 echo "configure:8692: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8692 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8693   echo $ac_n "(cached) $ac_c" 1>&6
8694 else
8695   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8696
8697   gwinsz_in_termios_h=no
8698   if test $am_cv_sys_posix_termios = yes; then
8699     cat > conftest.$ac_ext <<EOF
8700 #line 8701 "configure"
8701 #include "confdefs.h"
8702 #include <sys/types.h>
8703 #     include <termios.h>
8704 #     ifdef TIOCGWINSZ
8705         yes
8706 #     endif
8707     
8708 EOF
8709 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8710   egrep "yes" >/dev/null 2>&1; then
8711   rm -rf conftest*
8712   gwinsz_in_termios_h=yes
8713 fi
8714 rm -f conftest*
8715
8716   fi
8717
8718   if test $gwinsz_in_termios_h = no; then
8719     cat > conftest.$ac_ext <<EOF
8720 #line 8721 "configure"
8721 #include "confdefs.h"
8722 #include <sys/types.h>
8723 #     include <sys/ioctl.h>
8724 #     ifdef TIOCGWINSZ
8725         yes
8726 #     endif
8727     
8728 EOF
8729 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8730   egrep "yes" >/dev/null 2>&1; then
8731   rm -rf conftest*
8732   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8733 fi
8734 rm -f conftest*
8735
8736   fi
8737   
8738 fi
8739
8740 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8741   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8742     cat >> confdefs.h <<\EOF
8743 #define GWINSZ_IN_SYS_IOCTL 1
8744 EOF
8745
8746   fi
8747
8748 if test $am_cv_sys_posix_termios = yes ; then
8749         cat >> confdefs.h <<\EOF
8750 #define HAVE_POSIX_TERMIOS 1
8751 EOF
8752
8753 fi
8754
8755 for ac_hdr in \
8756         arpa/inet.h             \
8757         arpa/nameser.h  \
8758         assert.h                \
8759         bits/types.h    \
8760         conio.h                 \
8761         crypt.h                 \
8762         direct.h                \
8763         errno.h                 \
8764         fcntl.h                 \
8765         filio.h                 \
8766         getopt.h                \
8767         grp.h                   \
8768         io.h                    \
8769         libutil.h               \
8770         limits.h                \
8771         locale.h                \
8772         netinet/tcp.h   \
8773         malloc.h                \
8774         memory.h                \
8775         psap.h                  \
8776         pwd.h                   \
8777         process.h               \
8778         resolv.h                \
8779         sgtty.h                 \
8780         shadow.h                \
8781         stddef.h                \
8782         string.h                \
8783         strings.h               \
8784         sysexits.h              \
8785         sys/file.h              \
8786         sys/filio.h             \
8787         sys/errno.h             \
8788         sys/ioctl.h             \
8789         sys/param.h             \
8790         sys/resource.h  \
8791         sys/select.h    \
8792         sys/socket.h    \
8793         sys/stat.h              \
8794         sys/syslog.h    \
8795         sys/time.h              \
8796         sys/types.h             \
8797         sys/ucred.h             \
8798         sys/uio.h               \
8799         syslog.h                \
8800         termios.h               \
8801         unistd.h                \
8802         winsock.h               \
8803         winsock2.h              \
8804
8805 do
8806 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8807 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8808 echo "configure:8809: checking for $ac_hdr" >&5
8809 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8810   echo $ac_n "(cached) $ac_c" 1>&6
8811 else
8812   cat > conftest.$ac_ext <<EOF
8813 #line 8814 "configure"
8814 #include "confdefs.h"
8815 #include <$ac_hdr>
8816 EOF
8817 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8818 { (eval echo configure:8819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8819 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8820 if test -z "$ac_err"; then
8821   rm -rf conftest*
8822   eval "ac_cv_header_$ac_safe=yes"
8823 else
8824   echo "$ac_err" >&5
8825   echo "configure: failed program was:" >&5
8826   cat conftest.$ac_ext >&5
8827   rm -rf conftest*
8828   eval "ac_cv_header_$ac_safe=no"
8829 fi
8830 rm -f conftest*
8831 fi
8832 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8833   echo "$ac_t""yes" 1>&6
8834     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8835   cat >> confdefs.h <<EOF
8836 #define $ac_tr_hdr 1
8837 EOF
8838  
8839 else
8840   echo "$ac_t""no" 1>&6
8841 fi
8842 done
8843
8844
8845
8846 for ac_func in sigaction sigset 
8847 do
8848 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8849 echo "configure:8850: checking for $ac_func" >&5
8850 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8851   echo $ac_n "(cached) $ac_c" 1>&6
8852 else
8853   cat > conftest.$ac_ext <<EOF
8854 #line 8855 "configure"
8855 #include "confdefs.h"
8856 /* System header to define __stub macros and hopefully few prototypes,
8857     which can conflict with char $ac_func(); below.  */
8858 #include <assert.h>
8859 /* Override any gcc2 internal prototype to avoid an error.  */
8860 /* We use char because int might match the return type of a gcc2
8861     builtin and then its argument prototype would still apply.  */
8862 char $ac_func();
8863 char (*f)();
8864
8865 int main() {
8866
8867 /* The GNU C library defines this for functions which it implements
8868     to always fail with ENOSYS.  Some functions are actually named
8869     something starting with __ and the normal name is an alias.  */
8870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8871 choke me
8872 #else
8873 f = $ac_func;
8874 #endif
8875
8876 ; return 0; }
8877 EOF
8878 if { (eval echo configure:8879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8879   rm -rf conftest*
8880   eval "ac_cv_func_$ac_func=yes"
8881 else
8882   echo "configure: failed program was:" >&5
8883   cat conftest.$ac_ext >&5
8884   rm -rf conftest*
8885   eval "ac_cv_func_$ac_func=no"
8886 fi
8887 rm -f conftest*
8888 fi
8889
8890 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8891   echo "$ac_t""yes" 1>&6
8892     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8893   cat >> confdefs.h <<EOF
8894 #define $ac_tr_func 1
8895 EOF
8896  
8897 else
8898   echo "$ac_t""no" 1>&6
8899 fi
8900 done
8901
8902
8903 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
8904         echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8905 echo "configure:8906: checking for sigset in -lV3" >&5
8906 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8907 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8908   echo $ac_n "(cached) $ac_c" 1>&6
8909 else
8910   ac_save_LIBS="$LIBS"
8911 LIBS="-lV3  $LIBS"
8912 cat > conftest.$ac_ext <<EOF
8913 #line 8914 "configure"
8914 #include "confdefs.h"
8915 /* Override any gcc2 internal prototype to avoid an error.  */
8916 /* We use char because int might match the return type of a gcc2
8917     builtin and then its argument prototype would still apply.  */
8918 char sigset();
8919
8920 int main() {
8921 sigset()
8922 ; return 0; }
8923 EOF
8924 if { (eval echo configure:8925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8925   rm -rf conftest*
8926   eval "ac_cv_lib_$ac_lib_var=yes"
8927 else
8928   echo "configure: failed program was:" >&5
8929   cat conftest.$ac_ext >&5
8930   rm -rf conftest*
8931   eval "ac_cv_lib_$ac_lib_var=no"
8932 fi
8933 rm -f conftest*
8934 LIBS="$ac_save_LIBS"
8935
8936 fi
8937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8938   echo "$ac_t""yes" 1>&6
8939     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8940     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8941   cat >> confdefs.h <<EOF
8942 #define $ac_tr_lib 1
8943 EOF
8944
8945   LIBS="-lV3 $LIBS"
8946
8947 else
8948   echo "$ac_t""no" 1>&6
8949 fi
8950
8951 fi
8952
8953 if test "$ac_cv_header_winsock_h" = yes; then
8954 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8955 echo "configure:8956: checking for winsock" >&5
8956 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8957   echo $ac_n "(cached) $ac_c" 1>&6
8958 else
8959   save_LIBS="$LIBS"
8960 for curlib in ws2_32 wsock32; do
8961         LIBS="$LIBS -l$curlib"
8962         cat > conftest.$ac_ext <<EOF
8963 #line 8964 "configure"
8964 #include "confdefs.h"
8965 #include <winsock.h>
8966                         
8967 int main() {
8968
8969                         socket(0,0,0);
8970                         select(0,NULL,NULL,NULL,NULL);
8971                         closesocket(0);
8972                         gethostname(NULL,0);
8973                         
8974 ; return 0; }
8975 EOF
8976 if { (eval echo configure:8977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8977   rm -rf conftest*
8978   ol_cv_winsock=yes
8979 else
8980   echo "configure: failed program was:" >&5
8981   cat conftest.$ac_ext >&5
8982   rm -rf conftest*
8983   ol_cv_winsock=no
8984 fi
8985 rm -f conftest*
8986
8987         if test $ol_cv_winsock = yes; then
8988                 cat >> confdefs.h <<\EOF
8989 #define HAVE_WINSOCK 1
8990 EOF
8991
8992                 ac_cv_func_socket=yes
8993                 ac_cv_func_select=yes
8994                 ac_cv_func_closesocket=yes
8995                 ac_cv_func_gethostname=yes
8996                 if test $curlib = ws2_32; then
8997                         ol_cv_winsock=winsock2
8998                         cat >> confdefs.h <<\EOF
8999 #define HAVE_WINSOCK2 1
9000 EOF
9001
9002                 fi
9003                 break
9004         fi
9005         LIBS="$save_LIBS"
9006 done
9007 fi
9008
9009 echo "$ac_t""$ol_cv_winsock" 1>&6
9010 fi
9011
9012
9013 echo $ac_n "checking for socket""... $ac_c" 1>&6
9014 echo "configure:9015: checking for socket" >&5
9015 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9016   echo $ac_n "(cached) $ac_c" 1>&6
9017 else
9018   cat > conftest.$ac_ext <<EOF
9019 #line 9020 "configure"
9020 #include "confdefs.h"
9021 /* System header to define __stub macros and hopefully few prototypes,
9022     which can conflict with char socket(); below.  */
9023 #include <assert.h>
9024 /* Override any gcc2 internal prototype to avoid an error.  */
9025 /* We use char because int might match the return type of a gcc2
9026     builtin and then its argument prototype would still apply.  */
9027 char socket();
9028 char (*f)();
9029
9030 int main() {
9031
9032 /* The GNU C library defines this for functions which it implements
9033     to always fail with ENOSYS.  Some functions are actually named
9034     something starting with __ and the normal name is an alias.  */
9035 #if defined (__stub_socket) || defined (__stub___socket)
9036 choke me
9037 #else
9038 f = socket;
9039 #endif
9040
9041 ; return 0; }
9042 EOF
9043 if { (eval echo configure:9044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9044   rm -rf conftest*
9045   eval "ac_cv_func_socket=yes"
9046 else
9047   echo "configure: failed program was:" >&5
9048   cat conftest.$ac_ext >&5
9049   rm -rf conftest*
9050   eval "ac_cv_func_socket=no"
9051 fi
9052 rm -f conftest*
9053 fi
9054
9055 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9056   echo "$ac_t""yes" 1>&6
9057   :
9058 else
9059   echo "$ac_t""no" 1>&6
9060         
9061         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9062 echo "configure:9063: checking for main in -lsocket" >&5
9063 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9065   echo $ac_n "(cached) $ac_c" 1>&6
9066 else
9067   ac_save_LIBS="$LIBS"
9068 LIBS="-lsocket  $LIBS"
9069 cat > conftest.$ac_ext <<EOF
9070 #line 9071 "configure"
9071 #include "confdefs.h"
9072
9073 int main() {
9074 main()
9075 ; return 0; }
9076 EOF
9077 if { (eval echo configure:9078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9078   rm -rf conftest*
9079   eval "ac_cv_lib_$ac_lib_var=yes"
9080 else
9081   echo "configure: failed program was:" >&5
9082   cat conftest.$ac_ext >&5
9083   rm -rf conftest*
9084   eval "ac_cv_lib_$ac_lib_var=no"
9085 fi
9086 rm -f conftest*
9087 LIBS="$ac_save_LIBS"
9088
9089 fi
9090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9091   echo "$ac_t""yes" 1>&6
9092     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9093     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9094   cat >> confdefs.h <<EOF
9095 #define $ac_tr_lib 1
9096 EOF
9097
9098   LIBS="-lsocket $LIBS"
9099
9100 else
9101   echo "$ac_t""no" 1>&6
9102 fi
9103
9104         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9105 echo "configure:9106: checking for main in -lnet" >&5
9106 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9107 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9108   echo $ac_n "(cached) $ac_c" 1>&6
9109 else
9110   ac_save_LIBS="$LIBS"
9111 LIBS="-lnet  $LIBS"
9112 cat > conftest.$ac_ext <<EOF
9113 #line 9114 "configure"
9114 #include "confdefs.h"
9115
9116 int main() {
9117 main()
9118 ; return 0; }
9119 EOF
9120 if { (eval echo configure:9121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9121   rm -rf conftest*
9122   eval "ac_cv_lib_$ac_lib_var=yes"
9123 else
9124   echo "configure: failed program was:" >&5
9125   cat conftest.$ac_ext >&5
9126   rm -rf conftest*
9127   eval "ac_cv_lib_$ac_lib_var=no"
9128 fi
9129 rm -f conftest*
9130 LIBS="$ac_save_LIBS"
9131
9132 fi
9133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9134   echo "$ac_t""yes" 1>&6
9135     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9136     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9137   cat >> confdefs.h <<EOF
9138 #define $ac_tr_lib 1
9139 EOF
9140
9141   LIBS="-lnet $LIBS"
9142
9143 else
9144   echo "$ac_t""no" 1>&6
9145 fi
9146
9147         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9148 echo "configure:9149: checking for main in -lnsl_s" >&5
9149 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9151   echo $ac_n "(cached) $ac_c" 1>&6
9152 else
9153   ac_save_LIBS="$LIBS"
9154 LIBS="-lnsl_s  $LIBS"
9155 cat > conftest.$ac_ext <<EOF
9156 #line 9157 "configure"
9157 #include "confdefs.h"
9158
9159 int main() {
9160 main()
9161 ; return 0; }
9162 EOF
9163 if { (eval echo configure:9164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9164   rm -rf conftest*
9165   eval "ac_cv_lib_$ac_lib_var=yes"
9166 else
9167   echo "configure: failed program was:" >&5
9168   cat conftest.$ac_ext >&5
9169   rm -rf conftest*
9170   eval "ac_cv_lib_$ac_lib_var=no"
9171 fi
9172 rm -f conftest*
9173 LIBS="$ac_save_LIBS"
9174
9175 fi
9176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9177   echo "$ac_t""yes" 1>&6
9178     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9179     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9180   cat >> confdefs.h <<EOF
9181 #define $ac_tr_lib 1
9182 EOF
9183
9184   LIBS="-lnsl_s $LIBS"
9185
9186 else
9187   echo "$ac_t""no" 1>&6
9188 fi
9189
9190         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9191 echo "configure:9192: checking for main in -lnsl" >&5
9192 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9193 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9194   echo $ac_n "(cached) $ac_c" 1>&6
9195 else
9196   ac_save_LIBS="$LIBS"
9197 LIBS="-lnsl  $LIBS"
9198 cat > conftest.$ac_ext <<EOF
9199 #line 9200 "configure"
9200 #include "confdefs.h"
9201
9202 int main() {
9203 main()
9204 ; return 0; }
9205 EOF
9206 if { (eval echo configure:9207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9207   rm -rf conftest*
9208   eval "ac_cv_lib_$ac_lib_var=yes"
9209 else
9210   echo "configure: failed program was:" >&5
9211   cat conftest.$ac_ext >&5
9212   rm -rf conftest*
9213   eval "ac_cv_lib_$ac_lib_var=no"
9214 fi
9215 rm -f conftest*
9216 LIBS="$ac_save_LIBS"
9217
9218 fi
9219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9220   echo "$ac_t""yes" 1>&6
9221     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9222     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9223   cat >> confdefs.h <<EOF
9224 #define $ac_tr_lib 1
9225 EOF
9226
9227   LIBS="-lnsl $LIBS"
9228
9229 else
9230   echo "$ac_t""no" 1>&6
9231 fi
9232
9233         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9234 echo "configure:9235: checking for socket in -linet" >&5
9235 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9236 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9237   echo $ac_n "(cached) $ac_c" 1>&6
9238 else
9239   ac_save_LIBS="$LIBS"
9240 LIBS="-linet  $LIBS"
9241 cat > conftest.$ac_ext <<EOF
9242 #line 9243 "configure"
9243 #include "confdefs.h"
9244 /* Override any gcc2 internal prototype to avoid an error.  */
9245 /* We use char because int might match the return type of a gcc2
9246     builtin and then its argument prototype would still apply.  */
9247 char socket();
9248
9249 int main() {
9250 socket()
9251 ; return 0; }
9252 EOF
9253 if { (eval echo configure:9254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9254   rm -rf conftest*
9255   eval "ac_cv_lib_$ac_lib_var=yes"
9256 else
9257   echo "configure: failed program was:" >&5
9258   cat conftest.$ac_ext >&5
9259   rm -rf conftest*
9260   eval "ac_cv_lib_$ac_lib_var=no"
9261 fi
9262 rm -f conftest*
9263 LIBS="$ac_save_LIBS"
9264
9265 fi
9266 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9267   echo "$ac_t""yes" 1>&6
9268     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9269     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9270   cat >> confdefs.h <<EOF
9271 #define $ac_tr_lib 1
9272 EOF
9273
9274   LIBS="-linet $LIBS"
9275
9276 else
9277   echo "$ac_t""no" 1>&6
9278 fi
9279
9280         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9281 echo "configure:9282: checking for main in -lgen" >&5
9282 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9283 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9284   echo $ac_n "(cached) $ac_c" 1>&6
9285 else
9286   ac_save_LIBS="$LIBS"
9287 LIBS="-lgen  $LIBS"
9288 cat > conftest.$ac_ext <<EOF
9289 #line 9290 "configure"
9290 #include "confdefs.h"
9291
9292 int main() {
9293 main()
9294 ; return 0; }
9295 EOF
9296 if { (eval echo configure:9297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9297   rm -rf conftest*
9298   eval "ac_cv_lib_$ac_lib_var=yes"
9299 else
9300   echo "configure: failed program was:" >&5
9301   cat conftest.$ac_ext >&5
9302   rm -rf conftest*
9303   eval "ac_cv_lib_$ac_lib_var=no"
9304 fi
9305 rm -f conftest*
9306 LIBS="$ac_save_LIBS"
9307
9308 fi
9309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9310   echo "$ac_t""yes" 1>&6
9311     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9312     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9313   cat >> confdefs.h <<EOF
9314 #define $ac_tr_lib 1
9315 EOF
9316
9317   LIBS="-lgen $LIBS"
9318
9319 else
9320   echo "$ac_t""no" 1>&6
9321 fi
9322
9323
9324 fi
9325
9326
9327 echo $ac_n "checking for select""... $ac_c" 1>&6
9328 echo "configure:9329: checking for select" >&5
9329 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9330   echo $ac_n "(cached) $ac_c" 1>&6
9331 else
9332   cat > conftest.$ac_ext <<EOF
9333 #line 9334 "configure"
9334 #include "confdefs.h"
9335 /* System header to define __stub macros and hopefully few prototypes,
9336     which can conflict with char select(); below.  */
9337 #include <assert.h>
9338 /* Override any gcc2 internal prototype to avoid an error.  */
9339 /* We use char because int might match the return type of a gcc2
9340     builtin and then its argument prototype would still apply.  */
9341 char select();
9342 char (*f)();
9343
9344 int main() {
9345
9346 /* The GNU C library defines this for functions which it implements
9347     to always fail with ENOSYS.  Some functions are actually named
9348     something starting with __ and the normal name is an alias.  */
9349 #if defined (__stub_select) || defined (__stub___select)
9350 choke me
9351 #else
9352 f = select;
9353 #endif
9354
9355 ; return 0; }
9356 EOF
9357 if { (eval echo configure:9358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9358   rm -rf conftest*
9359   eval "ac_cv_func_select=yes"
9360 else
9361   echo "configure: failed program was:" >&5
9362   cat conftest.$ac_ext >&5
9363   rm -rf conftest*
9364   eval "ac_cv_func_select=no"
9365 fi
9366 rm -f conftest*
9367 fi
9368
9369 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9370   echo "$ac_t""yes" 1>&6
9371   :
9372 else
9373   echo "$ac_t""no" 1>&6
9374 { echo "configure: error: select() required." 1>&2; exit 1; }
9375 fi
9376
9377
9378 if test "${ac_cv_header_winsock_h}" != yes; then
9379                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9380 echo "configure:9381: checking types of arguments for select()" >&5
9381  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9382   echo $ac_n "(cached) $ac_c" 1>&6
9383 else
9384    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9385   echo $ac_n "(cached) $ac_c" 1>&6
9386 else
9387     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9388   echo $ac_n "(cached) $ac_c" 1>&6
9389 else
9390      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9391      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9392       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9393        cat > conftest.$ac_ext <<EOF
9394 #line 9395 "configure"
9395 #include "confdefs.h"
9396 #ifdef HAVE_SYS_TYPES_H
9397 #include <sys/types.h>
9398 #endif
9399 #ifdef HAVE_SYS_TIME_H
9400 #include <sys/time.h>
9401 #endif
9402 #ifdef HAVE_SYS_SELECT_H
9403 #include <sys/select.h>
9404 #endif
9405 #ifdef HAVE_SYS_SOCKET_H
9406 #include <sys/socket.h>
9407 #endif
9408 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);
9409 int main() {
9410
9411 ; return 0; }
9412 EOF
9413 if { (eval echo configure:9414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9414   rm -rf conftest*
9415           ac_not_found=no ; break 3
9416 else
9417   echo "configure: failed program was:" >&5
9418   cat conftest.$ac_ext >&5
9419   rm -rf conftest*
9420   ac_not_found=yes
9421 fi
9422 rm -f conftest*
9423       done
9424      done
9425     done
9426    
9427 fi
9428   
9429 fi
9430  
9431 fi
9432  if test "$ac_not_found" = yes; then
9433   ac_cv_func_select_arg1=int 
9434   ac_cv_func_select_arg234='int *' 
9435   ac_cv_func_select_arg5='struct timeval *'
9436  fi
9437  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9438  cat >> confdefs.h <<EOF
9439 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9440 EOF
9441
9442  cat >> confdefs.h <<EOF
9443 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9444 EOF
9445
9446  cat >> confdefs.h <<EOF
9447 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9448 EOF
9449
9450
9451 fi
9452
9453
9454 for ac_func in poll 
9455 do
9456 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9457 echo "configure:9458: checking for $ac_func" >&5
9458 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9459   echo $ac_n "(cached) $ac_c" 1>&6
9460 else
9461   cat > conftest.$ac_ext <<EOF
9462 #line 9463 "configure"
9463 #include "confdefs.h"
9464 /* System header to define __stub macros and hopefully few prototypes,
9465     which can conflict with char $ac_func(); below.  */
9466 #include <assert.h>
9467 /* Override any gcc2 internal prototype to avoid an error.  */
9468 /* We use char because int might match the return type of a gcc2
9469     builtin and then its argument prototype would still apply.  */
9470 char $ac_func();
9471 char (*f)();
9472
9473 int main() {
9474
9475 /* The GNU C library defines this for functions which it implements
9476     to always fail with ENOSYS.  Some functions are actually named
9477     something starting with __ and the normal name is an alias.  */
9478 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9479 choke me
9480 #else
9481 f = $ac_func;
9482 #endif
9483
9484 ; return 0; }
9485 EOF
9486 if { (eval echo configure:9487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9487   rm -rf conftest*
9488   eval "ac_cv_func_$ac_func=yes"
9489 else
9490   echo "configure: failed program was:" >&5
9491   cat conftest.$ac_ext >&5
9492   rm -rf conftest*
9493   eval "ac_cv_func_$ac_func=no"
9494 fi
9495 rm -f conftest*
9496 fi
9497
9498 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9499   echo "$ac_t""yes" 1>&6
9500     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9501   cat >> confdefs.h <<EOF
9502 #define $ac_tr_func 1
9503 EOF
9504  
9505 else
9506   echo "$ac_t""no" 1>&6
9507 fi
9508 done
9509
9510 for ac_hdr in poll.h 
9511 do
9512 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9513 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9514 echo "configure:9515: checking for $ac_hdr" >&5
9515 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9516   echo $ac_n "(cached) $ac_c" 1>&6
9517 else
9518   cat > conftest.$ac_ext <<EOF
9519 #line 9520 "configure"
9520 #include "confdefs.h"
9521 #include <$ac_hdr>
9522 EOF
9523 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9524 { (eval echo configure:9525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9525 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9526 if test -z "$ac_err"; then
9527   rm -rf conftest*
9528   eval "ac_cv_header_$ac_safe=yes"
9529 else
9530   echo "$ac_err" >&5
9531   echo "configure: failed program was:" >&5
9532   cat conftest.$ac_ext >&5
9533   rm -rf conftest*
9534   eval "ac_cv_header_$ac_safe=no"
9535 fi
9536 rm -f conftest*
9537 fi
9538 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9539   echo "$ac_t""yes" 1>&6
9540     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9541   cat >> confdefs.h <<EOF
9542 #define $ac_tr_hdr 1
9543 EOF
9544  
9545 else
9546   echo "$ac_t""no" 1>&6
9547 fi
9548 done
9549
9550
9551 for ac_hdr in sys/epoll.h 
9552 do
9553 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9554 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9555 echo "configure:9556: checking for $ac_hdr" >&5
9556 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9557   echo $ac_n "(cached) $ac_c" 1>&6
9558 else
9559   cat > conftest.$ac_ext <<EOF
9560 #line 9561 "configure"
9561 #include "confdefs.h"
9562 #include <$ac_hdr>
9563 EOF
9564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9565 { (eval echo configure:9566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9567 if test -z "$ac_err"; then
9568   rm -rf conftest*
9569   eval "ac_cv_header_$ac_safe=yes"
9570 else
9571   echo "$ac_err" >&5
9572   echo "configure: failed program was:" >&5
9573   cat conftest.$ac_ext >&5
9574   rm -rf conftest*
9575   eval "ac_cv_header_$ac_safe=no"
9576 fi
9577 rm -f conftest*
9578 fi
9579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9580   echo "$ac_t""yes" 1>&6
9581     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9582   cat >> confdefs.h <<EOF
9583 #define $ac_tr_hdr 1
9584 EOF
9585  
9586 else
9587   echo "$ac_t""no" 1>&6
9588 fi
9589 done
9590
9591 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9592 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9593 echo "configure:9594: checking for epoll system call" >&5
9594 if test "$cross_compiling" = yes; then
9595   echo "$ac_t""no" 1>&6
9596 else
9597   cat > conftest.$ac_ext <<EOF
9598 #line 9599 "configure"
9599 #include "confdefs.h"
9600 int main(int argc, char *argv)
9601 {
9602         int epfd = epoll_create(256);
9603         exit (epfd == -1 ? 1 : 0);
9604 }
9605 EOF
9606 if { (eval echo configure:9607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9607 then
9608   echo "$ac_t""yes" 1>&6
9609 cat >> confdefs.h <<\EOF
9610 #define HAVE_EPOLL 1
9611 EOF
9612
9613 else
9614   echo "configure: failed program was:" >&5
9615   cat conftest.$ac_ext >&5
9616   rm -fr conftest*
9617   echo "$ac_t""no" 1>&6
9618 fi
9619 rm -fr conftest*
9620 fi
9621
9622 fi
9623
9624 # strerror checks
9625 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9626 echo "configure:9627: checking declaration of sys_errlist" >&5
9627 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9628   echo $ac_n "(cached) $ac_c" 1>&6
9629 else
9630   
9631         cat > conftest.$ac_ext <<EOF
9632 #line 9633 "configure"
9633 #include "confdefs.h"
9634
9635 #include <stdio.h>
9636 #include <sys/types.h>
9637 #include <errno.h>
9638 #ifdef WINNT
9639 #include <stdlib.h>
9640 #endif 
9641 int main() {
9642 char *c = (char *) *sys_errlist
9643 ; return 0; }
9644 EOF
9645 if { (eval echo configure:9646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9646   rm -rf conftest*
9647   ol_cv_dcl_sys_errlist=yes
9648         ol_cv_have_sys_errlist=yes
9649 else
9650   echo "configure: failed program was:" >&5
9651   cat conftest.$ac_ext >&5
9652   rm -rf conftest*
9653   ol_cv_dcl_sys_errlist=no
9654 fi
9655 rm -f conftest*
9656 fi
9657
9658 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9659 #
9660 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9661 if test $ol_cv_dcl_sys_errlist = no ; then
9662         cat >> confdefs.h <<\EOF
9663 #define DECL_SYS_ERRLIST 1
9664 EOF
9665
9666
9667         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9668 echo "configure:9669: checking existence of sys_errlist" >&5
9669 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9670   echo $ac_n "(cached) $ac_c" 1>&6
9671 else
9672   
9673                 cat > conftest.$ac_ext <<EOF
9674 #line 9675 "configure"
9675 #include "confdefs.h"
9676 #include <errno.h>
9677 int main() {
9678 char *c = (char *) *sys_errlist
9679 ; return 0; }
9680 EOF
9681 if { (eval echo configure:9682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9682   rm -rf conftest*
9683   ol_cv_have_sys_errlist=yes
9684 else
9685   echo "configure: failed program was:" >&5
9686   cat conftest.$ac_ext >&5
9687   rm -rf conftest*
9688   ol_cv_have_sys_errlist=no
9689 fi
9690 rm -f conftest*
9691 fi
9692
9693 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9694 fi
9695 if test $ol_cv_have_sys_errlist = yes ; then
9696         cat >> confdefs.h <<\EOF
9697 #define HAVE_SYS_ERRLIST 1
9698 EOF
9699
9700 fi
9701  for ac_func in strerror strerror_r
9702 do
9703 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9704 echo "configure:9705: checking for $ac_func" >&5
9705 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9706   echo $ac_n "(cached) $ac_c" 1>&6
9707 else
9708   cat > conftest.$ac_ext <<EOF
9709 #line 9710 "configure"
9710 #include "confdefs.h"
9711 /* System header to define __stub macros and hopefully few prototypes,
9712     which can conflict with char $ac_func(); below.  */
9713 #include <assert.h>
9714 /* Override any gcc2 internal prototype to avoid an error.  */
9715 /* We use char because int might match the return type of a gcc2
9716     builtin and then its argument prototype would still apply.  */
9717 char $ac_func();
9718 char (*f)();
9719
9720 int main() {
9721
9722 /* The GNU C library defines this for functions which it implements
9723     to always fail with ENOSYS.  Some functions are actually named
9724     something starting with __ and the normal name is an alias.  */
9725 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9726 choke me
9727 #else
9728 f = $ac_func;
9729 #endif
9730
9731 ; return 0; }
9732 EOF
9733 if { (eval echo configure:9734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9734   rm -rf conftest*
9735   eval "ac_cv_func_$ac_func=yes"
9736 else
9737   echo "configure: failed program was:" >&5
9738   cat conftest.$ac_ext >&5
9739   rm -rf conftest*
9740   eval "ac_cv_func_$ac_func=no"
9741 fi
9742 rm -f conftest*
9743 fi
9744
9745 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9746   echo "$ac_t""yes" 1>&6
9747     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9748   cat >> confdefs.h <<EOF
9749 #define $ac_tr_func 1
9750 EOF
9751  
9752 else
9753   echo "$ac_t""no" 1>&6
9754 fi
9755 done
9756
9757 ol_cv_func_strerror_r=no
9758 if test "${ac_cv_func_strerror_r}" = yes ; then
9759         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9760 echo "configure:9761: checking non-posix strerror_r" >&5
9761 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9762   echo $ac_n "(cached) $ac_c" 1>&6
9763 else
9764   
9765         cat > conftest.$ac_ext <<EOF
9766 #line 9767 "configure"
9767 #include "confdefs.h"
9768 #include <string.h>
9769 EOF
9770 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9771   egrep "strerror_r" >/dev/null 2>&1; then
9772   rm -rf conftest*
9773   ol_decl_strerror_r=yes
9774 else
9775   rm -rf conftest*
9776   ol_decl_strerror_r=no
9777 fi
9778 rm -f conftest*
9779
9780         if test $ol_decl_strerror_r = yes ; then
9781                 cat > conftest.$ac_ext <<EOF
9782 #line 9783 "configure"
9783 #include "confdefs.h"
9784 #include <string.h>
9785 int main() {
9786    /* from autoconf 2.59 */
9787                                 char buf[100];
9788                                 char x = *strerror_r (0, buf, sizeof buf);
9789                                 char *p = strerror_r (0, buf, sizeof buf);
9790                         
9791 ; return 0; }
9792 EOF
9793 if { (eval echo configure:9794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9794   rm -rf conftest*
9795   ol_cv_nonposix_strerror_r=yes
9796 else
9797   echo "configure: failed program was:" >&5
9798   cat conftest.$ac_ext >&5
9799   rm -rf conftest*
9800   ol_cv_nonposix_strerror_r=no
9801 fi
9802 rm -f conftest*
9803         else
9804                 if test "$cross_compiling" = yes; then
9805   ol_cv_nonposix_strerror=no
9806 else
9807   cat > conftest.$ac_ext <<EOF
9808 #line 9809 "configure"
9809 #include "confdefs.h"
9810
9811                         main() {
9812                                 char buf[100];
9813                                 buf[0] = 0;
9814                                 strerror_r( 1, buf, sizeof buf );
9815                                 exit( buf[0] == 0 );
9816                         }
9817                         
9818 EOF
9819 if { (eval echo configure:9820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9820 then
9821   ol_cv_nonposix_strerror_r=yes
9822 else
9823   echo "configure: failed program was:" >&5
9824   cat conftest.$ac_ext >&5
9825   rm -fr conftest*
9826   ol_cv_nonposix_strerror=no
9827 fi
9828 rm -fr conftest*
9829 fi
9830
9831         fi
9832         
9833 fi
9834
9835 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9836 if test $ol_cv_nonposix_strerror_r = yes ; then
9837         cat >> confdefs.h <<\EOF
9838 #define HAVE_NONPOSIX_STRERROR_R 1
9839 EOF
9840
9841 fi
9842
9843 elif test "${ac_cv_func_strerror}" = no ; then
9844         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9845 echo "configure:9846: checking declaration of sys_errlist" >&5
9846 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9847   echo $ac_n "(cached) $ac_c" 1>&6
9848 else
9849   
9850         cat > conftest.$ac_ext <<EOF
9851 #line 9852 "configure"
9852 #include "confdefs.h"
9853
9854 #include <stdio.h>
9855 #include <sys/types.h>
9856 #include <errno.h>
9857 #ifdef WINNT
9858 #include <stdlib.h>
9859 #endif 
9860 int main() {
9861 char *c = (char *) *sys_errlist
9862 ; return 0; }
9863 EOF
9864 if { (eval echo configure:9865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9865   rm -rf conftest*
9866   ol_cv_dcl_sys_errlist=yes
9867         ol_cv_have_sys_errlist=yes
9868 else
9869   echo "configure: failed program was:" >&5
9870   cat conftest.$ac_ext >&5
9871   rm -rf conftest*
9872   ol_cv_dcl_sys_errlist=no
9873 fi
9874 rm -f conftest*
9875 fi
9876
9877 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9878 #
9879 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9880 if test $ol_cv_dcl_sys_errlist = no ; then
9881         cat >> confdefs.h <<\EOF
9882 #define DECL_SYS_ERRLIST 1
9883 EOF
9884
9885
9886         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9887 echo "configure:9888: checking existence of sys_errlist" >&5
9888 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9889   echo $ac_n "(cached) $ac_c" 1>&6
9890 else
9891   
9892                 cat > conftest.$ac_ext <<EOF
9893 #line 9894 "configure"
9894 #include "confdefs.h"
9895 #include <errno.h>
9896 int main() {
9897 char *c = (char *) *sys_errlist
9898 ; return 0; }
9899 EOF
9900 if { (eval echo configure:9901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9901   rm -rf conftest*
9902   ol_cv_have_sys_errlist=yes
9903 else
9904   echo "configure: failed program was:" >&5
9905   cat conftest.$ac_ext >&5
9906   rm -rf conftest*
9907   ol_cv_have_sys_errlist=no
9908 fi
9909 rm -f conftest*
9910 fi
9911
9912 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9913 fi
9914 if test $ol_cv_have_sys_errlist = yes ; then
9915         cat >> confdefs.h <<\EOF
9916 #define HAVE_SYS_ERRLIST 1
9917 EOF
9918
9919 fi
9920
9921 fi
9922
9923
9924 for ac_hdr in regex.h 
9925 do
9926 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9927 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9928 echo "configure:9929: checking for $ac_hdr" >&5
9929 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9930   echo $ac_n "(cached) $ac_c" 1>&6
9931 else
9932   cat > conftest.$ac_ext <<EOF
9933 #line 9934 "configure"
9934 #include "confdefs.h"
9935 #include <$ac_hdr>
9936 EOF
9937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9938 { (eval echo configure:9939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9939 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9940 if test -z "$ac_err"; then
9941   rm -rf conftest*
9942   eval "ac_cv_header_$ac_safe=yes"
9943 else
9944   echo "$ac_err" >&5
9945   echo "configure: failed program was:" >&5
9946   cat conftest.$ac_ext >&5
9947   rm -rf conftest*
9948   eval "ac_cv_header_$ac_safe=no"
9949 fi
9950 rm -f conftest*
9951 fi
9952 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9953   echo "$ac_t""yes" 1>&6
9954     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9955   cat >> confdefs.h <<EOF
9956 #define $ac_tr_hdr 1
9957 EOF
9958  
9959 else
9960   echo "$ac_t""no" 1>&6
9961 fi
9962 done
9963
9964 if test "$ac_cv_header_regex_h" != yes ; then
9965         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9966 fi
9967
9968 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9969 echo "configure:9970: checking for library containing regfree" >&5
9970 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9971   echo $ac_n "(cached) $ac_c" 1>&6
9972 else
9973   ac_func_search_save_LIBS="$LIBS"
9974 ac_cv_search_regfree="no"
9975 cat > conftest.$ac_ext <<EOF
9976 #line 9977 "configure"
9977 #include "confdefs.h"
9978 /* Override any gcc2 internal prototype to avoid an error.  */
9979 /* We use char because int might match the return type of a gcc2
9980     builtin and then its argument prototype would still apply.  */
9981 char regfree();
9982
9983 int main() {
9984 regfree()
9985 ; return 0; }
9986 EOF
9987 if { (eval echo configure:9988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9988   rm -rf conftest*
9989   ac_cv_search_regfree="none required"
9990 else
9991   echo "configure: failed program was:" >&5
9992   cat conftest.$ac_ext >&5
9993 fi
9994 rm -f conftest*
9995 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9996 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9997 cat > conftest.$ac_ext <<EOF
9998 #line 9999 "configure"
9999 #include "confdefs.h"
10000 /* Override any gcc2 internal prototype to avoid an error.  */
10001 /* We use char because int might match the return type of a gcc2
10002     builtin and then its argument prototype would still apply.  */
10003 char regfree();
10004
10005 int main() {
10006 regfree()
10007 ; return 0; }
10008 EOF
10009 if { (eval echo configure:10010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10010   rm -rf conftest*
10011   ac_cv_search_regfree="-l$ac_lib"
10012 break
10013 else
10014   echo "configure: failed program was:" >&5
10015   cat conftest.$ac_ext >&5
10016 fi
10017 rm -f conftest*
10018 done
10019 LIBS="$ac_func_search_save_LIBS"
10020 fi
10021
10022 echo "$ac_t""$ac_cv_search_regfree" 1>&6
10023 if test "$ac_cv_search_regfree" != "no"; then
10024   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
10025   :
10026 else :
10027   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
10028 fi
10029
10030
10031 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
10032 echo "configure:10033: checking for compatible POSIX regex" >&5
10033 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
10034   echo $ac_n "(cached) $ac_c" 1>&6
10035 else
10036   
10037         if test "$cross_compiling" = yes; then
10038   ol_cv_c_posix_regex=cross
10039 else
10040   cat > conftest.$ac_ext <<EOF
10041 #line 10042 "configure"
10042 #include "confdefs.h"
10043
10044 #include <sys/types.h>
10045 #include <regex.h>
10046 static char *pattern, *string;
10047 main()
10048 {
10049         int rc;
10050         regex_t re;
10051
10052         pattern = "^A";
10053
10054         if(regcomp(&re, pattern, 0)) {
10055                 return -1;
10056         }
10057         
10058         string = "ALL MATCH";
10059         
10060         rc = regexec(&re, string, 0, (void*)0, 0);
10061
10062         regfree(&re);
10063
10064         return rc;
10065 }
10066 EOF
10067 if { (eval echo configure:10068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
10068 then
10069   ol_cv_c_posix_regex=yes
10070 else
10071   echo "configure: failed program was:" >&5
10072   cat conftest.$ac_ext >&5
10073   rm -fr conftest*
10074   ol_cv_c_posix_regex=no
10075 fi
10076 rm -fr conftest*
10077 fi
10078
10079 fi
10080
10081 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
10082
10083 if test "$ol_cv_c_posix_regex" = no ; then
10084         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
10085 fi
10086
10087
10088 have_uuid=no
10089 for ac_hdr in sys/uuid.h
10090 do
10091 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10092 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10093 echo "configure:10094: checking for $ac_hdr" >&5
10094 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10095   echo $ac_n "(cached) $ac_c" 1>&6
10096 else
10097   cat > conftest.$ac_ext <<EOF
10098 #line 10099 "configure"
10099 #include "confdefs.h"
10100 #include <$ac_hdr>
10101 EOF
10102 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10103 { (eval echo configure:10104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10104 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10105 if test -z "$ac_err"; then
10106   rm -rf conftest*
10107   eval "ac_cv_header_$ac_safe=yes"
10108 else
10109   echo "$ac_err" >&5
10110   echo "configure: failed program was:" >&5
10111   cat conftest.$ac_ext >&5
10112   rm -rf conftest*
10113   eval "ac_cv_header_$ac_safe=no"
10114 fi
10115 rm -f conftest*
10116 fi
10117 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10118   echo "$ac_t""yes" 1>&6
10119     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10120   cat >> confdefs.h <<EOF
10121 #define $ac_tr_hdr 1
10122 EOF
10123  
10124 else
10125   echo "$ac_t""no" 1>&6
10126 fi
10127 done
10128
10129 if test $ac_cv_header_sys_uuid_h = yes ; then
10130         save_LIBS="$LIBS"
10131         
10132 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10133 echo "configure:10134: checking for library containing uuid_to_str" >&5
10134 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10135   echo $ac_n "(cached) $ac_c" 1>&6
10136 else
10137   ac_func_search_save_LIBS="$LIBS"
10138 ac_cv_search_uuid_to_str="no"
10139 cat > conftest.$ac_ext <<EOF
10140 #line 10141 "configure"
10141 #include "confdefs.h"
10142 /* Override any gcc2 internal prototype to avoid an error.  */
10143 /* We use char because int might match the return type of a gcc2
10144     builtin and then its argument prototype would still apply.  */
10145 char uuid_to_str();
10146
10147 int main() {
10148 uuid_to_str()
10149 ; return 0; }
10150 EOF
10151 if { (eval echo configure:10152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10152   rm -rf conftest*
10153   ac_cv_search_uuid_to_str="none required"
10154 else
10155   echo "configure: failed program was:" >&5
10156   cat conftest.$ac_ext >&5
10157 fi
10158 rm -f conftest*
10159 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10160 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10161 cat > conftest.$ac_ext <<EOF
10162 #line 10163 "configure"
10163 #include "confdefs.h"
10164 /* Override any gcc2 internal prototype to avoid an error.  */
10165 /* We use char because int might match the return type of a gcc2
10166     builtin and then its argument prototype would still apply.  */
10167 char uuid_to_str();
10168
10169 int main() {
10170 uuid_to_str()
10171 ; return 0; }
10172 EOF
10173 if { (eval echo configure:10174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10174   rm -rf conftest*
10175   ac_cv_search_uuid_to_str="-l$ac_lib"
10176 break
10177 else
10178   echo "configure: failed program was:" >&5
10179   cat conftest.$ac_ext >&5
10180 fi
10181 rm -f conftest*
10182 done
10183 LIBS="$ac_func_search_save_LIBS"
10184 fi
10185
10186 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10187 if test "$ac_cv_search_uuid_to_str" != "no"; then
10188   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10189   have_uuid=yes
10190 else :
10191   :
10192 fi
10193         LIBS="$save_LIBS"
10194
10195         if test have_uuid = yes ; then
10196                 cat >> confdefs.h <<\EOF
10197 #define HAVE_UUID_TO_STR 1
10198 EOF
10199
10200
10201                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10202                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10203         fi
10204 fi
10205
10206 if test $have_uuid = no ; then
10207         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10208 echo "configure:10209: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10209         save_LIBS="$LIBS"
10210         LIBS="$LIBS -lrpcrt4"
10211         cat > conftest.$ac_ext <<EOF
10212 #line 10213 "configure"
10213 #include "confdefs.h"
10214
10215                 int __stdcall UuidCreate(void *);
10216                 int __stdcall UuidToStringA(void *,void **);
10217                 
10218 int main() {
10219
10220                 UuidCreate(0);
10221                 UuidToStringA(0,0);
10222                 
10223 ; return 0; }
10224 EOF
10225 if { (eval echo configure:10226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10226   rm -rf conftest*
10227   need_rpcrt=yes
10228 else
10229   echo "configure: failed program was:" >&5
10230   cat conftest.$ac_ext >&5
10231   rm -rf conftest*
10232   need_rpcrt=no
10233 fi
10234 rm -f conftest*
10235         if test $need_rpcrt = yes; then
10236                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10237         fi
10238         LIBS="$save_LIBS"
10239         echo "$ac_t""$need_rpcrt" 1>&6
10240 fi
10241
10242 ol_link_dnssrv=no
10243 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10244 echo "configure:10245: checking for res_query" >&5
10245 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10246   echo $ac_n "(cached) $ac_c" 1>&6
10247 else
10248   cat > conftest.$ac_ext <<EOF
10249 #line 10250 "configure"
10250 #include "confdefs.h"
10251 /* System header to define __stub macros and hopefully few prototypes,
10252     which can conflict with char res_query(); below.  */
10253 #include <assert.h>
10254 /* Override any gcc2 internal prototype to avoid an error.  */
10255 /* We use char because int might match the return type of a gcc2
10256     builtin and then its argument prototype would still apply.  */
10257 char res_query();
10258 char (*f)();
10259
10260 int main() {
10261
10262 /* The GNU C library defines this for functions which it implements
10263     to always fail with ENOSYS.  Some functions are actually named
10264     something starting with __ and the normal name is an alias.  */
10265 #if defined (__stub_res_query) || defined (__stub___res_query)
10266 choke me
10267 #else
10268 f = res_query;
10269 #endif
10270
10271 ; return 0; }
10272 EOF
10273 if { (eval echo configure:10274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10274   rm -rf conftest*
10275   eval "ac_cv_func_res_query=yes"
10276 else
10277   echo "configure: failed program was:" >&5
10278   cat conftest.$ac_ext >&5
10279   rm -rf conftest*
10280   eval "ac_cv_func_res_query=no"
10281 fi
10282 rm -f conftest*
10283 fi
10284
10285 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10286   echo "$ac_t""yes" 1>&6
10287   :
10288 else
10289   echo "$ac_t""no" 1>&6
10290 fi
10291
10292 if test $ac_cv_func_res_query = no ; then 
10293         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10294 echo "configure:10295: checking for __res_query" >&5
10295 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10296   echo $ac_n "(cached) $ac_c" 1>&6
10297 else
10298   cat > conftest.$ac_ext <<EOF
10299 #line 10300 "configure"
10300 #include "confdefs.h"
10301 /* System header to define __stub macros and hopefully few prototypes,
10302     which can conflict with char __res_query(); below.  */
10303 #include <assert.h>
10304 /* Override any gcc2 internal prototype to avoid an error.  */
10305 /* We use char because int might match the return type of a gcc2
10306     builtin and then its argument prototype would still apply.  */
10307 char __res_query();
10308 char (*f)();
10309
10310 int main() {
10311
10312 /* The GNU C library defines this for functions which it implements
10313     to always fail with ENOSYS.  Some functions are actually named
10314     something starting with __ and the normal name is an alias.  */
10315 #if defined (__stub___res_query) || defined (__stub_____res_query)
10316 choke me
10317 #else
10318 f = __res_query;
10319 #endif
10320
10321 ; return 0; }
10322 EOF
10323 if { (eval echo configure:10324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10324   rm -rf conftest*
10325   eval "ac_cv_func___res_query=yes"
10326 else
10327   echo "configure: failed program was:" >&5
10328   cat conftest.$ac_ext >&5
10329   rm -rf conftest*
10330   eval "ac_cv_func___res_query=no"
10331 fi
10332 rm -f conftest*
10333 fi
10334
10335 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10336   echo "$ac_t""yes" 1>&6
10337   :
10338 else
10339   echo "$ac_t""no" 1>&6
10340 fi
10341
10342         ac_cv_func_res_query=$ac_cv_func___res_query
10343 fi
10344
10345 if test $ac_cv_func_res_query = no ; then 
10346         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10347 echo "configure:10348: checking for res_query in -lbind" >&5
10348 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10349 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10350   echo $ac_n "(cached) $ac_c" 1>&6
10351 else
10352   ac_save_LIBS="$LIBS"
10353 LIBS="-lbind  $LIBS"
10354 cat > conftest.$ac_ext <<EOF
10355 #line 10356 "configure"
10356 #include "confdefs.h"
10357 /* Override any gcc2 internal prototype to avoid an error.  */
10358 /* We use char because int might match the return type of a gcc2
10359     builtin and then its argument prototype would still apply.  */
10360 char res_query();
10361
10362 int main() {
10363 res_query()
10364 ; return 0; }
10365 EOF
10366 if { (eval echo configure:10367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10367   rm -rf conftest*
10368   eval "ac_cv_lib_$ac_lib_var=yes"
10369 else
10370   echo "configure: failed program was:" >&5
10371   cat conftest.$ac_ext >&5
10372   rm -rf conftest*
10373   eval "ac_cv_lib_$ac_lib_var=no"
10374 fi
10375 rm -f conftest*
10376 LIBS="$ac_save_LIBS"
10377
10378 fi
10379 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10380   echo "$ac_t""yes" 1>&6
10381     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10382     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10383   cat >> confdefs.h <<EOF
10384 #define $ac_tr_lib 1
10385 EOF
10386
10387   LIBS="-lbind $LIBS"
10388
10389 else
10390   echo "$ac_t""no" 1>&6
10391 fi
10392
10393         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10394 fi
10395
10396 if test $ac_cv_func_res_query = no ; then 
10397         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10398 echo "configure:10399: checking for __res_query in -lbind" >&5
10399 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10400 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10401   echo $ac_n "(cached) $ac_c" 1>&6
10402 else
10403   ac_save_LIBS="$LIBS"
10404 LIBS="-lbind  $LIBS"
10405 cat > conftest.$ac_ext <<EOF
10406 #line 10407 "configure"
10407 #include "confdefs.h"
10408 /* Override any gcc2 internal prototype to avoid an error.  */
10409 /* We use char because int might match the return type of a gcc2
10410     builtin and then its argument prototype would still apply.  */
10411 char __res_query();
10412
10413 int main() {
10414 __res_query()
10415 ; return 0; }
10416 EOF
10417 if { (eval echo configure:10418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10418   rm -rf conftest*
10419   eval "ac_cv_lib_$ac_lib_var=yes"
10420 else
10421   echo "configure: failed program was:" >&5
10422   cat conftest.$ac_ext >&5
10423   rm -rf conftest*
10424   eval "ac_cv_lib_$ac_lib_var=no"
10425 fi
10426 rm -f conftest*
10427 LIBS="$ac_save_LIBS"
10428
10429 fi
10430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10431   echo "$ac_t""yes" 1>&6
10432     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10433     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10434   cat >> confdefs.h <<EOF
10435 #define $ac_tr_lib 1
10436 EOF
10437
10438   LIBS="-lbind $LIBS"
10439
10440 else
10441   echo "$ac_t""no" 1>&6
10442 fi
10443
10444         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10445 fi
10446
10447 if test $ac_cv_func_res_query = no ; then 
10448         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10449 echo "configure:10450: checking for res_query in -lresolv" >&5
10450 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10451 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10452   echo $ac_n "(cached) $ac_c" 1>&6
10453 else
10454   ac_save_LIBS="$LIBS"
10455 LIBS="-lresolv  $LIBS"
10456 cat > conftest.$ac_ext <<EOF
10457 #line 10458 "configure"
10458 #include "confdefs.h"
10459 /* Override any gcc2 internal prototype to avoid an error.  */
10460 /* We use char because int might match the return type of a gcc2
10461     builtin and then its argument prototype would still apply.  */
10462 char res_query();
10463
10464 int main() {
10465 res_query()
10466 ; return 0; }
10467 EOF
10468 if { (eval echo configure:10469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10469   rm -rf conftest*
10470   eval "ac_cv_lib_$ac_lib_var=yes"
10471 else
10472   echo "configure: failed program was:" >&5
10473   cat conftest.$ac_ext >&5
10474   rm -rf conftest*
10475   eval "ac_cv_lib_$ac_lib_var=no"
10476 fi
10477 rm -f conftest*
10478 LIBS="$ac_save_LIBS"
10479
10480 fi
10481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10482   echo "$ac_t""yes" 1>&6
10483     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10484     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10485   cat >> confdefs.h <<EOF
10486 #define $ac_tr_lib 1
10487 EOF
10488
10489   LIBS="-lresolv $LIBS"
10490
10491 else
10492   echo "$ac_t""no" 1>&6
10493 fi
10494
10495         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10496 fi
10497
10498 if test $ac_cv_func_res_query = no ; then 
10499         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10500 echo "configure:10501: checking for __res_query in -lresolv" >&5
10501 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10502 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10503   echo $ac_n "(cached) $ac_c" 1>&6
10504 else
10505   ac_save_LIBS="$LIBS"
10506 LIBS="-lresolv  $LIBS"
10507 cat > conftest.$ac_ext <<EOF
10508 #line 10509 "configure"
10509 #include "confdefs.h"
10510 /* Override any gcc2 internal prototype to avoid an error.  */
10511 /* We use char because int might match the return type of a gcc2
10512     builtin and then its argument prototype would still apply.  */
10513 char __res_query();
10514
10515 int main() {
10516 __res_query()
10517 ; return 0; }
10518 EOF
10519 if { (eval echo configure:10520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10520   rm -rf conftest*
10521   eval "ac_cv_lib_$ac_lib_var=yes"
10522 else
10523   echo "configure: failed program was:" >&5
10524   cat conftest.$ac_ext >&5
10525   rm -rf conftest*
10526   eval "ac_cv_lib_$ac_lib_var=no"
10527 fi
10528 rm -f conftest*
10529 LIBS="$ac_save_LIBS"
10530
10531 fi
10532 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10533   echo "$ac_t""yes" 1>&6
10534     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10535     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10536   cat >> confdefs.h <<EOF
10537 #define $ac_tr_lib 1
10538 EOF
10539
10540   LIBS="-lresolv $LIBS"
10541
10542 else
10543   echo "$ac_t""no" 1>&6
10544 fi
10545
10546         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10547 fi
10548
10549 if test $ac_cv_func_res_query = no ; then 
10550         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
10551 echo "configure:10552: checking for _res_9_query in -lresolv" >&5
10552 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
10553 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10554   echo $ac_n "(cached) $ac_c" 1>&6
10555 else
10556   ac_save_LIBS="$LIBS"
10557 LIBS="-lresolv  $LIBS"
10558 cat > conftest.$ac_ext <<EOF
10559 #line 10560 "configure"
10560 #include "confdefs.h"
10561 /* Override any gcc2 internal prototype to avoid an error.  */
10562 /* We use char because int might match the return type of a gcc2
10563     builtin and then its argument prototype would still apply.  */
10564 char _res_9_query();
10565
10566 int main() {
10567 _res_9_query()
10568 ; return 0; }
10569 EOF
10570 if { (eval echo configure:10571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10571   rm -rf conftest*
10572   eval "ac_cv_lib_$ac_lib_var=yes"
10573 else
10574   echo "configure: failed program was:" >&5
10575   cat conftest.$ac_ext >&5
10576   rm -rf conftest*
10577   eval "ac_cv_lib_$ac_lib_var=no"
10578 fi
10579 rm -f conftest*
10580 LIBS="$ac_save_LIBS"
10581
10582 fi
10583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10584   echo "$ac_t""yes" 1>&6
10585     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10586     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10587   cat >> confdefs.h <<EOF
10588 #define $ac_tr_lib 1
10589 EOF
10590
10591   LIBS="-lresolv $LIBS"
10592
10593 else
10594   echo "$ac_t""no" 1>&6
10595 fi
10596
10597         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
10598 fi
10599
10600 if test "$ac_cv_func_res_query" = yes ; then
10601         cat >> confdefs.h <<\EOF
10602 #define HAVE_RES_QUERY 1
10603 EOF
10604
10605
10606         if test $ol_enable_dnssrv != no ; then
10607                 ol_link_dnssrv=yes
10608         fi
10609 fi
10610
10611 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10612         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10613 fi
10614
10615 for ac_func in hstrerror 
10616 do
10617 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10618 echo "configure:10619: checking for $ac_func" >&5
10619 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10620   echo $ac_n "(cached) $ac_c" 1>&6
10621 else
10622   cat > conftest.$ac_ext <<EOF
10623 #line 10624 "configure"
10624 #include "confdefs.h"
10625 /* System header to define __stub macros and hopefully few prototypes,
10626     which can conflict with char $ac_func(); below.  */
10627 #include <assert.h>
10628 /* Override any gcc2 internal prototype to avoid an error.  */
10629 /* We use char because int might match the return type of a gcc2
10630     builtin and then its argument prototype would still apply.  */
10631 char $ac_func();
10632 char (*f)();
10633
10634 int main() {
10635
10636 /* The GNU C library defines this for functions which it implements
10637     to always fail with ENOSYS.  Some functions are actually named
10638     something starting with __ and the normal name is an alias.  */
10639 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10640 choke me
10641 #else
10642 f = $ac_func;
10643 #endif
10644
10645 ; return 0; }
10646 EOF
10647 if { (eval echo configure:10648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10648   rm -rf conftest*
10649   eval "ac_cv_func_$ac_func=yes"
10650 else
10651   echo "configure: failed program was:" >&5
10652   cat conftest.$ac_ext >&5
10653   rm -rf conftest*
10654   eval "ac_cv_func_$ac_func=no"
10655 fi
10656 rm -f conftest*
10657 fi
10658
10659 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10660   echo "$ac_t""yes" 1>&6
10661     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10662   cat >> confdefs.h <<EOF
10663 #define $ac_tr_func 1
10664 EOF
10665  
10666 else
10667   echo "$ac_t""no" 1>&6
10668 fi
10669 done
10670
10671
10672 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10673 do
10674 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10675 echo "configure:10676: checking for $ac_func" >&5
10676 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10677   echo $ac_n "(cached) $ac_c" 1>&6
10678 else
10679   cat > conftest.$ac_ext <<EOF
10680 #line 10681 "configure"
10681 #include "confdefs.h"
10682 /* System header to define __stub macros and hopefully few prototypes,
10683     which can conflict with char $ac_func(); below.  */
10684 #include <assert.h>
10685 /* Override any gcc2 internal prototype to avoid an error.  */
10686 /* We use char because int might match the return type of a gcc2
10687     builtin and then its argument prototype would still apply.  */
10688 char $ac_func();
10689 char (*f)();
10690
10691 int main() {
10692
10693 /* The GNU C library defines this for functions which it implements
10694     to always fail with ENOSYS.  Some functions are actually named
10695     something starting with __ and the normal name is an alias.  */
10696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10697 choke me
10698 #else
10699 f = $ac_func;
10700 #endif
10701
10702 ; return 0; }
10703 EOF
10704 if { (eval echo configure:10705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10705   rm -rf conftest*
10706   eval "ac_cv_func_$ac_func=yes"
10707 else
10708   echo "configure: failed program was:" >&5
10709   cat conftest.$ac_ext >&5
10710   rm -rf conftest*
10711   eval "ac_cv_func_$ac_func=no"
10712 fi
10713 rm -f conftest*
10714 fi
10715
10716 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10717   echo "$ac_t""yes" 1>&6
10718     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10719   cat >> confdefs.h <<EOF
10720 #define $ac_tr_func 1
10721 EOF
10722  
10723 else
10724   echo "$ac_t""no" 1>&6
10725 fi
10726 done
10727
10728
10729 ol_link_ipv6=no
10730 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10731         if test $ol_enable_ipv6 = yes ; then
10732                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10733         fi
10734 elif test $ol_enable_ipv6 != no ; then
10735         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10736 echo "configure:10737: checking INET6_ADDRSTRLEN" >&5
10737 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10738   echo $ac_n "(cached) $ac_c" 1>&6
10739 else
10740   
10741                 cat > conftest.$ac_ext <<EOF
10742 #line 10743 "configure"
10743 #include "confdefs.h"
10744
10745 #                       include <netinet/in.h>
10746 #                       ifdef INET6_ADDRSTRLEN
10747                                 __has_inet6_addrstrlen__;
10748 #                       endif
10749                 
10750 EOF
10751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10752   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10753   rm -rf conftest*
10754   ol_cv_inet6_addrstrlen=yes
10755 else
10756   rm -rf conftest*
10757   ol_cv_inet6_addrstrlen=no
10758 fi
10759 rm -f conftest*
10760
10761 fi
10762
10763 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10764
10765
10766         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10767 echo "configure:10768: checking struct sockaddr_storage" >&5
10768 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10769   echo $ac_n "(cached) $ac_c" 1>&6
10770 else
10771   
10772                 cat > conftest.$ac_ext <<EOF
10773 #line 10774 "configure"
10774 #include "confdefs.h"
10775
10776 #include <sys/types.h>
10777 #include <sys/socket.h>
10778
10779 int main() {
10780
10781                         struct sockaddr_storage ss;
10782
10783 ; return 0; }
10784 EOF
10785 if { (eval echo configure:10786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10786   rm -rf conftest*
10787   ol_cv_struct_sockaddr_storage=yes
10788 else
10789   echo "configure: failed program was:" >&5
10790   cat conftest.$ac_ext >&5
10791   rm -rf conftest*
10792   ol_cv_struct_sockaddr_storage=no
10793 fi
10794 rm -f conftest*
10795 fi
10796
10797 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10798
10799         if test $ol_cv_inet6_addrstrlen = yes \
10800                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10801                 ol_link_ipv6=yes
10802         elif test $ol_enable_ipv6 = yes \
10803                         -a $ol_cv_inet6_addrstrlen = no ; then
10804                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10805         elif test $ol_enable_ipv6 = yes \
10806                         -a $ol_cv_struct_sockaddr_storage = no ; then
10807                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10808         fi
10809 fi
10810
10811 if test $ol_enable_local != no ; then
10812         for ac_hdr in sys/un.h 
10813 do
10814 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10815 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10816 echo "configure:10817: checking for $ac_hdr" >&5
10817 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10818   echo $ac_n "(cached) $ac_c" 1>&6
10819 else
10820   cat > conftest.$ac_ext <<EOF
10821 #line 10822 "configure"
10822 #include "confdefs.h"
10823 #include <$ac_hdr>
10824 EOF
10825 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10826 { (eval echo configure:10827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10827 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10828 if test -z "$ac_err"; then
10829   rm -rf conftest*
10830   eval "ac_cv_header_$ac_safe=yes"
10831 else
10832   echo "$ac_err" >&5
10833   echo "configure: failed program was:" >&5
10834   cat conftest.$ac_ext >&5
10835   rm -rf conftest*
10836   eval "ac_cv_header_$ac_safe=no"
10837 fi
10838 rm -f conftest*
10839 fi
10840 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10841   echo "$ac_t""yes" 1>&6
10842     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10843   cat >> confdefs.h <<EOF
10844 #define $ac_tr_hdr 1
10845 EOF
10846  
10847 else
10848   echo "$ac_t""no" 1>&6
10849 fi
10850 done
10851
10852
10853         if test $ol_enable_local = auto ; then
10854                 ol_enable_local=$ac_cv_header_sys_un_h
10855         elif test $ac_cv_header_sys_un_h = no ; then
10856                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10857         fi
10858 fi
10859
10860 ol_link_kbind=no
10861 ol_link_krb5=no
10862 ol_link_krb4=no
10863
10864 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10865         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10866         -o $ol_with_kerberos = k425 ; then
10867
10868         for ac_hdr in krb5.h
10869 do
10870 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10871 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10872 echo "configure:10873: checking for $ac_hdr" >&5
10873 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10874   echo $ac_n "(cached) $ac_c" 1>&6
10875 else
10876   cat > conftest.$ac_ext <<EOF
10877 #line 10878 "configure"
10878 #include "confdefs.h"
10879 #include <$ac_hdr>
10880 EOF
10881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10882 { (eval echo configure:10883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10884 if test -z "$ac_err"; then
10885   rm -rf conftest*
10886   eval "ac_cv_header_$ac_safe=yes"
10887 else
10888   echo "$ac_err" >&5
10889   echo "configure: failed program was:" >&5
10890   cat conftest.$ac_ext >&5
10891   rm -rf conftest*
10892   eval "ac_cv_header_$ac_safe=no"
10893 fi
10894 rm -f conftest*
10895 fi
10896 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10897   echo "$ac_t""yes" 1>&6
10898     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10899   cat >> confdefs.h <<EOF
10900 #define $ac_tr_hdr 1
10901 EOF
10902  
10903 else
10904   echo "$ac_t""no" 1>&6
10905 fi
10906 done
10907
10908
10909         if test $ac_cv_header_krb5_h = yes ; then
10910                                 for ac_hdr in heim_err.h
10911 do
10912 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10913 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10914 echo "configure:10915: checking for $ac_hdr" >&5
10915 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10916   echo $ac_n "(cached) $ac_c" 1>&6
10917 else
10918   cat > conftest.$ac_ext <<EOF
10919 #line 10920 "configure"
10920 #include "confdefs.h"
10921 #include <$ac_hdr>
10922 EOF
10923 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10924 { (eval echo configure:10925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10925 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10926 if test -z "$ac_err"; then
10927   rm -rf conftest*
10928   eval "ac_cv_header_$ac_safe=yes"
10929 else
10930   echo "$ac_err" >&5
10931   echo "configure: failed program was:" >&5
10932   cat conftest.$ac_ext >&5
10933   rm -rf conftest*
10934   eval "ac_cv_header_$ac_safe=no"
10935 fi
10936 rm -f conftest*
10937 fi
10938 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10939   echo "$ac_t""yes" 1>&6
10940     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10941   cat >> confdefs.h <<EOF
10942 #define $ac_tr_hdr 1
10943 EOF
10944  
10945 else
10946   echo "$ac_t""no" 1>&6
10947 fi
10948 done
10949
10950                 if test $ac_cv_header_heim_err_h = yes ; then
10951                         krb5_impl=heimdal
10952                 else
10953                         krb5_impl=mit
10954                 fi
10955
10956                 if test $krb5_impl = mit; then
10957                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10958 echo "configure:10959: checking for main in -lk5crypto" >&5
10959 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10961   echo $ac_n "(cached) $ac_c" 1>&6
10962 else
10963   ac_save_LIBS="$LIBS"
10964 LIBS="-lk5crypto  $LIBS"
10965 cat > conftest.$ac_ext <<EOF
10966 #line 10967 "configure"
10967 #include "confdefs.h"
10968
10969 int main() {
10970 main()
10971 ; return 0; }
10972 EOF
10973 if { (eval echo configure:10974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10974   rm -rf conftest*
10975   eval "ac_cv_lib_$ac_lib_var=yes"
10976 else
10977   echo "configure: failed program was:" >&5
10978   cat conftest.$ac_ext >&5
10979   rm -rf conftest*
10980   eval "ac_cv_lib_$ac_lib_var=no"
10981 fi
10982 rm -f conftest*
10983 LIBS="$ac_save_LIBS"
10984
10985 fi
10986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10987   echo "$ac_t""yes" 1>&6
10988   krb5crypto=k5crypto
10989 else
10990   echo "$ac_t""no" 1>&6
10991 krb5crypto=crypto
10992 fi
10993
10994
10995                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10996 echo "configure:10997: checking for main in -lkrb5" >&5
10997 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10998 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10999   echo $ac_n "(cached) $ac_c" 1>&6
11000 else
11001   ac_save_LIBS="$LIBS"
11002 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
11003 cat > conftest.$ac_ext <<EOF
11004 #line 11005 "configure"
11005 #include "confdefs.h"
11006
11007 int main() {
11008 main()
11009 ; return 0; }
11010 EOF
11011 if { (eval echo configure:11012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11012   rm -rf conftest*
11013   eval "ac_cv_lib_$ac_lib_var=yes"
11014 else
11015   echo "configure: failed program was:" >&5
11016   cat conftest.$ac_ext >&5
11017   rm -rf conftest*
11018   eval "ac_cv_lib_$ac_lib_var=no"
11019 fi
11020 rm -f conftest*
11021 LIBS="$ac_save_LIBS"
11022
11023 fi
11024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11025   echo "$ac_t""yes" 1>&6
11026   have_krb5=yes
11027                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
11028 else
11029   echo "$ac_t""no" 1>&6
11030 have_krb5=no
11031 fi
11032
11033
11034                 elif test $krb5_impl = heimdal; then
11035                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
11036 echo "configure:11037: checking for main in -ldes" >&5
11037 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
11038 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11039   echo $ac_n "(cached) $ac_c" 1>&6
11040 else
11041   ac_save_LIBS="$LIBS"
11042 LIBS="-ldes  $LIBS"
11043 cat > conftest.$ac_ext <<EOF
11044 #line 11045 "configure"
11045 #include "confdefs.h"
11046
11047 int main() {
11048 main()
11049 ; return 0; }
11050 EOF
11051 if { (eval echo configure:11052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11052   rm -rf conftest*
11053   eval "ac_cv_lib_$ac_lib_var=yes"
11054 else
11055   echo "configure: failed program was:" >&5
11056   cat conftest.$ac_ext >&5
11057   rm -rf conftest*
11058   eval "ac_cv_lib_$ac_lib_var=no"
11059 fi
11060 rm -f conftest*
11061 LIBS="$ac_save_LIBS"
11062
11063 fi
11064 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11065   echo "$ac_t""yes" 1>&6
11066   krb5crypto=des
11067 else
11068   echo "$ac_t""no" 1>&6
11069 krb5crypto=crypto
11070 fi
11071
11072
11073                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
11074 echo "configure:11075: checking for main in -lkrb5" >&5
11075 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
11076 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11077   echo $ac_n "(cached) $ac_c" 1>&6
11078 else
11079   ac_save_LIBS="$LIBS"
11080 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11081 cat > conftest.$ac_ext <<EOF
11082 #line 11083 "configure"
11083 #include "confdefs.h"
11084
11085 int main() {
11086 main()
11087 ; return 0; }
11088 EOF
11089 if { (eval echo configure:11090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11090   rm -rf conftest*
11091   eval "ac_cv_lib_$ac_lib_var=yes"
11092 else
11093   echo "configure: failed program was:" >&5
11094   cat conftest.$ac_ext >&5
11095   rm -rf conftest*
11096   eval "ac_cv_lib_$ac_lib_var=no"
11097 fi
11098 rm -f conftest*
11099 LIBS="$ac_save_LIBS"
11100
11101 fi
11102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11103   echo "$ac_t""yes" 1>&6
11104   have_krb5=yes
11105                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11106 else
11107   echo "$ac_t""no" 1>&6
11108 have_krb5=no
11109 fi
11110
11111
11112                         cat >> confdefs.h <<\EOF
11113 #define HAVE_HEIMDAL_KERBEROS 1
11114 EOF
11115
11116
11117                 else
11118                         have_krb5=no
11119                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11120                 fi
11121
11122                 if test $have_krb5 = yes ; then
11123                         ol_link_krb5=yes
11124
11125                         cat >> confdefs.h <<\EOF
11126 #define HAVE_KRB5 1
11127 EOF
11128
11129
11130                         if test $ol_with_kerberos = k5only ; then
11131                                 ol_with_kerberos=found
11132                         fi
11133
11134                 elif test $ol_with_kerberos != auto ; then
11135                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11136                 fi
11137
11138         fi
11139 fi
11140
11141 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11142         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11143
11144         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11145 do
11146 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11147 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11148 echo "configure:11149: checking for $ac_hdr" >&5
11149 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11150   echo $ac_n "(cached) $ac_c" 1>&6
11151 else
11152   cat > conftest.$ac_ext <<EOF
11153 #line 11154 "configure"
11154 #include "confdefs.h"
11155 #include <$ac_hdr>
11156 EOF
11157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11158 { (eval echo configure:11159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11160 if test -z "$ac_err"; then
11161   rm -rf conftest*
11162   eval "ac_cv_header_$ac_safe=yes"
11163 else
11164   echo "$ac_err" >&5
11165   echo "configure: failed program was:" >&5
11166   cat conftest.$ac_ext >&5
11167   rm -rf conftest*
11168   eval "ac_cv_header_$ac_safe=no"
11169 fi
11170 rm -f conftest*
11171 fi
11172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11173   echo "$ac_t""yes" 1>&6
11174     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11175   cat >> confdefs.h <<EOF
11176 #define $ac_tr_hdr 1
11177 EOF
11178  
11179 else
11180   echo "$ac_t""no" 1>&6
11181 fi
11182 done
11183
11184
11185         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11186                 if test $krb5_impl = mit; then
11187                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11188 echo "configure:11189: checking for main in -lkrb4" >&5
11189 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11190 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11191   echo $ac_n "(cached) $ac_c" 1>&6
11192 else
11193   ac_save_LIBS="$LIBS"
11194 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11195 cat > conftest.$ac_ext <<EOF
11196 #line 11197 "configure"
11197 #include "confdefs.h"
11198
11199 int main() {
11200 main()
11201 ; return 0; }
11202 EOF
11203 if { (eval echo configure:11204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11204   rm -rf conftest*
11205   eval "ac_cv_lib_$ac_lib_var=yes"
11206 else
11207   echo "configure: failed program was:" >&5
11208   cat conftest.$ac_ext >&5
11209   rm -rf conftest*
11210   eval "ac_cv_lib_$ac_lib_var=no"
11211 fi
11212 rm -f conftest*
11213 LIBS="$ac_save_LIBS"
11214
11215 fi
11216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11217   echo "$ac_t""yes" 1>&6
11218   have_k425=yes
11219                                 KRB4_LIBS="-lkrb4 -ldes425"
11220 else
11221   echo "$ac_t""no" 1>&6
11222 have_k425=no
11223 fi
11224
11225
11226                 elif test $krb5_impl = heimdal; then
11227                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11228 echo "configure:11229: checking for main in -lkrb4" >&5
11229 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11230 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11231   echo $ac_n "(cached) $ac_c" 1>&6
11232 else
11233   ac_save_LIBS="$LIBS"
11234 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11235 cat > conftest.$ac_ext <<EOF
11236 #line 11237 "configure"
11237 #include "confdefs.h"
11238
11239 int main() {
11240 main()
11241 ; return 0; }
11242 EOF
11243 if { (eval echo configure:11244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11244   rm -rf conftest*
11245   eval "ac_cv_lib_$ac_lib_var=yes"
11246 else
11247   echo "configure: failed program was:" >&5
11248   cat conftest.$ac_ext >&5
11249   rm -rf conftest*
11250   eval "ac_cv_lib_$ac_lib_var=no"
11251 fi
11252 rm -f conftest*
11253 LIBS="$ac_save_LIBS"
11254
11255 fi
11256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11257   echo "$ac_t""yes" 1>&6
11258   have_k425=yes
11259                                 KRB4_LIBS="-lkrb4"
11260 else
11261   echo "$ac_t""no" 1>&6
11262 have_k425=no
11263 fi
11264
11265
11266                 else
11267                         have_425=no
11268                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11269                 fi
11270
11271                 if test $have_k425 = yes ; then
11272                         ol_with_kerberos=found
11273                         ol_link_krb4=yes
11274
11275                         cat >> confdefs.h <<\EOF
11276 #define HAVE_KRB425 1
11277 EOF
11278
11279                         cat >> confdefs.h <<\EOF
11280 #define HAVE_KRB4 1
11281 EOF
11282
11283
11284                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11285 echo "configure:11286: checking for des_debug in Kerberos libraries" >&5
11286 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11287   echo $ac_n "(cached) $ac_c" 1>&6
11288 else
11289   
11290                                                                 save_LIBS="$LIBS"
11291                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11292                                 cat > conftest.$ac_ext <<EOF
11293 #line 11294 "configure"
11294 #include "confdefs.h"
11295
11296 #include <kerberosIV/krb.h>
11297 #include <kerberosIV/des.h>
11298 extern int des_debug;
11299
11300 int main() {
11301
11302 des_debug = 1;
11303
11304 ; return 0; }
11305 EOF
11306 if { (eval echo configure:11307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11307   rm -rf conftest*
11308   ol_cv_var_des_debug=yes
11309 else
11310   echo "configure: failed program was:" >&5
11311   cat conftest.$ac_ext >&5
11312   rm -rf conftest*
11313   ol_cv_var_des_debug=no
11314 fi
11315 rm -f conftest*
11316                                                                 LIBS="$save_LIBS"
11317                         
11318 fi
11319
11320 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11321
11322                         if test $ol_cv_var_des_debug = yes ; then
11323                                 cat >> confdefs.h <<\EOF
11324 #define HAVE_DES_DEBUG 1
11325 EOF
11326
11327                         fi
11328
11329                         LIBS="$save_LIBS"
11330                 fi
11331         fi
11332 fi
11333
11334 if test $ol_link_krb5 = yes ; then
11335         ol_with_kerberos=found
11336 fi
11337
11338 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11339         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11340
11341         for ac_hdr in krb.h des.h krb-archaeology.h 
11342 do
11343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11345 echo "configure:11346: checking for $ac_hdr" >&5
11346 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11347   echo $ac_n "(cached) $ac_c" 1>&6
11348 else
11349   cat > conftest.$ac_ext <<EOF
11350 #line 11351 "configure"
11351 #include "confdefs.h"
11352 #include <$ac_hdr>
11353 EOF
11354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11355 { (eval echo configure:11356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11357 if test -z "$ac_err"; then
11358   rm -rf conftest*
11359   eval "ac_cv_header_$ac_safe=yes"
11360 else
11361   echo "$ac_err" >&5
11362   echo "configure: failed program was:" >&5
11363   cat conftest.$ac_ext >&5
11364   rm -rf conftest*
11365   eval "ac_cv_header_$ac_safe=no"
11366 fi
11367 rm -f conftest*
11368 fi
11369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11370   echo "$ac_t""yes" 1>&6
11371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11372   cat >> confdefs.h <<EOF
11373 #define $ac_tr_hdr 1
11374 EOF
11375  
11376 else
11377   echo "$ac_t""no" 1>&6
11378 fi
11379 done
11380
11381
11382         if test $ac_cv_header_krb_h = yes ; then
11383                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11384 echo "configure:11385: checking for main in -lkrb" >&5
11385 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11386 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11387   echo $ac_n "(cached) $ac_c" 1>&6
11388 else
11389   ac_save_LIBS="$LIBS"
11390 LIBS="-lkrb -ldes $LIBS"
11391 cat > conftest.$ac_ext <<EOF
11392 #line 11393 "configure"
11393 #include "confdefs.h"
11394
11395 int main() {
11396 main()
11397 ; return 0; }
11398 EOF
11399 if { (eval echo configure:11400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11400   rm -rf conftest*
11401   eval "ac_cv_lib_$ac_lib_var=yes"
11402 else
11403   echo "configure: failed program was:" >&5
11404   cat conftest.$ac_ext >&5
11405   rm -rf conftest*
11406   eval "ac_cv_lib_$ac_lib_var=no"
11407 fi
11408 rm -f conftest*
11409 LIBS="$ac_save_LIBS"
11410
11411 fi
11412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11413   echo "$ac_t""yes" 1>&6
11414   have_k4=yes
11415 else
11416   echo "$ac_t""no" 1>&6
11417 have_k4=no
11418 fi
11419
11420
11421                 if test $have_k4 = yes ; then
11422                         ol_with_kerberos=found
11423                         ol_link_krb4=yes
11424
11425                         cat >> confdefs.h <<\EOF
11426 #define HAVE_KRB4 1
11427 EOF
11428
11429
11430                         KRB4_LIBS="-lkrb -ldes"
11431
11432                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11433                                 cat >> confdefs.h <<\EOF
11434 #define HAVE_KTH_KERBEROS 1
11435 EOF
11436
11437                         fi
11438                 fi
11439         fi
11440 fi
11441
11442 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11443         ol_link_kbind=yes
11444
11445 elif test $ol_enable_kbind = yes ; then
11446         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11447 fi
11448
11449 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11450         cat >> confdefs.h <<\EOF
11451 #define HAVE_KERBEROS 1
11452 EOF
11453
11454
11455 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11456         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11457 fi
11458
11459         
11460 ol_link_tls=no
11461 if test $ol_with_tls != no ; then
11462         for ac_hdr in openssl/ssl.h ssl.h
11463 do
11464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11466 echo "configure:11467: checking for $ac_hdr" >&5
11467 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11468   echo $ac_n "(cached) $ac_c" 1>&6
11469 else
11470   cat > conftest.$ac_ext <<EOF
11471 #line 11472 "configure"
11472 #include "confdefs.h"
11473 #include <$ac_hdr>
11474 EOF
11475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11476 { (eval echo configure:11477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11478 if test -z "$ac_err"; then
11479   rm -rf conftest*
11480   eval "ac_cv_header_$ac_safe=yes"
11481 else
11482   echo "$ac_err" >&5
11483   echo "configure: failed program was:" >&5
11484   cat conftest.$ac_ext >&5
11485   rm -rf conftest*
11486   eval "ac_cv_header_$ac_safe=no"
11487 fi
11488 rm -f conftest*
11489 fi
11490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11491   echo "$ac_t""yes" 1>&6
11492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11493   cat >> confdefs.h <<EOF
11494 #define $ac_tr_hdr 1
11495 EOF
11496  
11497 else
11498   echo "$ac_t""no" 1>&6
11499 fi
11500 done
11501
11502
11503         if test $ac_cv_header_openssl_ssl_h = yes \
11504                 -o $ac_cv_header_ssl_h = yes ; then
11505                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11506 echo "configure:11507: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11507 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11508 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11509   echo $ac_n "(cached) $ac_c" 1>&6
11510 else
11511   ac_save_LIBS="$LIBS"
11512 LIBS="-lssl -lcrypto $LIBS"
11513 cat > conftest.$ac_ext <<EOF
11514 #line 11515 "configure"
11515 #include "confdefs.h"
11516 /* Override any gcc2 internal prototype to avoid an error.  */
11517 /* We use char because int might match the return type of a gcc2
11518     builtin and then its argument prototype would still apply.  */
11519 char SSLeay_add_ssl_algorithms();
11520
11521 int main() {
11522 SSLeay_add_ssl_algorithms()
11523 ; return 0; }
11524 EOF
11525 if { (eval echo configure:11526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11526   rm -rf conftest*
11527   eval "ac_cv_lib_$ac_lib_var=yes"
11528 else
11529   echo "configure: failed program was:" >&5
11530   cat conftest.$ac_ext >&5
11531   rm -rf conftest*
11532   eval "ac_cv_lib_$ac_lib_var=no"
11533 fi
11534 rm -f conftest*
11535 LIBS="$ac_save_LIBS"
11536
11537 fi
11538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11539   echo "$ac_t""yes" 1>&6
11540   have_ssleay=yes
11541                         need_rsaref=no
11542 else
11543   echo "$ac_t""no" 1>&6
11544 have_ssleay=no
11545 fi
11546
11547                         
11548                 if test $have_ssleay = no ; then
11549                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11550 echo "configure:11551: checking for SSL_library_init in -lssl" >&5
11551 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11552 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11553   echo $ac_n "(cached) $ac_c" 1>&6
11554 else
11555   ac_save_LIBS="$LIBS"
11556 LIBS="-lssl -lcrypto $LIBS"
11557 cat > conftest.$ac_ext <<EOF
11558 #line 11559 "configure"
11559 #include "confdefs.h"
11560 /* Override any gcc2 internal prototype to avoid an error.  */
11561 /* We use char because int might match the return type of a gcc2
11562     builtin and then its argument prototype would still apply.  */
11563 char SSL_library_init();
11564
11565 int main() {
11566 SSL_library_init()
11567 ; return 0; }
11568 EOF
11569 if { (eval echo configure:11570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11570   rm -rf conftest*
11571   eval "ac_cv_lib_$ac_lib_var=yes"
11572 else
11573   echo "configure: failed program was:" >&5
11574   cat conftest.$ac_ext >&5
11575   rm -rf conftest*
11576   eval "ac_cv_lib_$ac_lib_var=no"
11577 fi
11578 rm -f conftest*
11579 LIBS="$ac_save_LIBS"
11580
11581 fi
11582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11583   echo "$ac_t""yes" 1>&6
11584   have_ssleay=yes
11585                                 need_rsaref=no
11586 else
11587   echo "$ac_t""no" 1>&6
11588 have_ssleay=no
11589 fi
11590
11591                 fi
11592
11593                 if test $have_ssleay = no ; then
11594                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11595 echo "configure:11596: checking for ssl3_accept in -lssl" >&5
11596 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11597 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11598   echo $ac_n "(cached) $ac_c" 1>&6
11599 else
11600   ac_save_LIBS="$LIBS"
11601 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11602 cat > conftest.$ac_ext <<EOF
11603 #line 11604 "configure"
11604 #include "confdefs.h"
11605 /* Override any gcc2 internal prototype to avoid an error.  */
11606 /* We use char because int might match the return type of a gcc2
11607     builtin and then its argument prototype would still apply.  */
11608 char ssl3_accept();
11609
11610 int main() {
11611 ssl3_accept()
11612 ; return 0; }
11613 EOF
11614 if { (eval echo configure:11615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11615   rm -rf conftest*
11616   eval "ac_cv_lib_$ac_lib_var=yes"
11617 else
11618   echo "configure: failed program was:" >&5
11619   cat conftest.$ac_ext >&5
11620   rm -rf conftest*
11621   eval "ac_cv_lib_$ac_lib_var=no"
11622 fi
11623 rm -f conftest*
11624 LIBS="$ac_save_LIBS"
11625
11626 fi
11627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11628   echo "$ac_t""yes" 1>&6
11629   have_ssleay=yes
11630                                 need_rsaref=yes
11631 else
11632   echo "$ac_t""no" 1>&6
11633 have_ssleay=no
11634 fi
11635
11636                 fi
11637
11638                 if test $have_ssleay = yes ; then
11639                         ol_with_tls=found
11640                         ol_link_tls=yes
11641
11642                         cat >> confdefs.h <<\EOF
11643 #define HAVE_SSLEAY 1
11644 EOF
11645
11646
11647                         if test $need_rsaref = yes; then
11648                                 cat >> confdefs.h <<\EOF
11649 #define HAVE_RSAREF 1
11650 EOF
11651
11652
11653                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11654                         else
11655                                 TLS_LIBS="-lssl -lcrypto"
11656                         fi
11657                 fi
11658                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11659 echo "configure:11660: checking OpenSSL library version (CRL checking capability)" >&5
11660 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11661   echo $ac_n "(cached) $ac_c" 1>&6
11662 else
11663   
11664         cat > conftest.$ac_ext <<EOF
11665 #line 11666 "configure"
11666 #include "confdefs.h"
11667
11668 #ifdef HAVE_OPENSSL_SSL_H
11669 #include <openssl/ssl.h>
11670 #else
11671 #include <ssl.h>
11672 #endif
11673
11674 /* Require 0.9.7d+ */
11675 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11676         char *__ssl_compat = "0.9.7d";
11677 #endif
11678         
11679 EOF
11680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11681   egrep "__ssl_compat" >/dev/null 2>&1; then
11682   rm -rf conftest*
11683   ol_cv_ssl_crl_compat=yes
11684 else
11685   rm -rf conftest*
11686   ol_cv_ssl_crl_compat=no
11687 fi
11688 rm -f conftest*
11689
11690 fi
11691
11692 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11693
11694                 if test $ol_cv_ssl_crl_compat = no ; then
11695                         ol_link_ssl=no
11696                 else 
11697                         cat >> confdefs.h <<\EOF
11698 #define HAVE_OPENSSL_CRL 1
11699 EOF
11700
11701                 fi
11702         fi
11703
11704 else
11705         echo "configure: warning: TLS data protection not supported!" 1>&2
11706 fi
11707
11708 WITH_TLS=no
11709 if test $ol_link_tls = yes ; then
11710         cat >> confdefs.h <<\EOF
11711 #define HAVE_TLS 1
11712 EOF
11713
11714         WITH_TLS=yes
11715
11716 elif test $ol_with_tls = auto ; then
11717         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11718         echo "configure: warning: TLS data protection not supported!" 1>&2
11719
11720 elif test $ol_with_tls != no ; then
11721         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11722 fi
11723
11724 if test $ol_enable_lmpasswd != no; then
11725         if test $ol_link_tls != yes ; then
11726                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11727         fi
11728
11729         cat >> confdefs.h <<\EOF
11730 #define SLAPD_LMHASH 1
11731 EOF
11732
11733 fi
11734
11735 ol_link_threads=no
11736
11737 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11738         -o $ol_with_threads = nt ; then
11739
11740         
11741         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11742 echo "configure:11743: checking for _beginthread" >&5
11743 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11744   echo $ac_n "(cached) $ac_c" 1>&6
11745 else
11746   cat > conftest.$ac_ext <<EOF
11747 #line 11748 "configure"
11748 #include "confdefs.h"
11749 /* System header to define __stub macros and hopefully few prototypes,
11750     which can conflict with char _beginthread(); below.  */
11751 #include <assert.h>
11752 /* Override any gcc2 internal prototype to avoid an error.  */
11753 /* We use char because int might match the return type of a gcc2
11754     builtin and then its argument prototype would still apply.  */
11755 char _beginthread();
11756 char (*f)();
11757
11758 int main() {
11759
11760 /* The GNU C library defines this for functions which it implements
11761     to always fail with ENOSYS.  Some functions are actually named
11762     something starting with __ and the normal name is an alias.  */
11763 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11764 choke me
11765 #else
11766 f = _beginthread;
11767 #endif
11768
11769 ; return 0; }
11770 EOF
11771 if { (eval echo configure:11772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11772   rm -rf conftest*
11773   eval "ac_cv_func__beginthread=yes"
11774 else
11775   echo "configure: failed program was:" >&5
11776   cat conftest.$ac_ext >&5
11777   rm -rf conftest*
11778   eval "ac_cv_func__beginthread=no"
11779 fi
11780 rm -f conftest*
11781 fi
11782
11783 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11784   echo "$ac_t""yes" 1>&6
11785   :
11786 else
11787   echo "$ac_t""no" 1>&6
11788 fi
11789
11790
11791         if test $ac_cv_func__beginthread = yes ; then
11792                 cat >> confdefs.h <<\EOF
11793 #define HAVE_NT_THREADS 1
11794 EOF
11795
11796                 ol_cv_nt_threads=yes
11797         fi
11798
11799
11800         if test "$ol_cv_nt_threads" = yes ; then
11801                 ol_link_threads=nt
11802                 ol_with_threads=found
11803                 ol_with_yielding_select=yes
11804
11805                 cat >> confdefs.h <<\EOF
11806 #define HAVE_NT_SERVICE_MANAGER 1
11807 EOF
11808
11809                 cat >> confdefs.h <<\EOF
11810 #define HAVE_NT_EVENT_LOG 1
11811 EOF
11812
11813         fi
11814
11815         if test $ol_with_threads = nt ; then
11816                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11817         fi
11818 fi
11819
11820 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11821         -o $ol_with_threads = posix ; then
11822
11823         for ac_hdr in pthread.h
11824 do
11825 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11826 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11827 echo "configure:11828: checking for $ac_hdr" >&5
11828 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11829   echo $ac_n "(cached) $ac_c" 1>&6
11830 else
11831   cat > conftest.$ac_ext <<EOF
11832 #line 11833 "configure"
11833 #include "confdefs.h"
11834 #include <$ac_hdr>
11835 EOF
11836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11837 { (eval echo configure:11838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11838 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11839 if test -z "$ac_err"; then
11840   rm -rf conftest*
11841   eval "ac_cv_header_$ac_safe=yes"
11842 else
11843   echo "$ac_err" >&5
11844   echo "configure: failed program was:" >&5
11845   cat conftest.$ac_ext >&5
11846   rm -rf conftest*
11847   eval "ac_cv_header_$ac_safe=no"
11848 fi
11849 rm -f conftest*
11850 fi
11851 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11852   echo "$ac_t""yes" 1>&6
11853     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11854   cat >> confdefs.h <<EOF
11855 #define $ac_tr_hdr 1
11856 EOF
11857  
11858 else
11859   echo "$ac_t""no" 1>&6
11860 fi
11861 done
11862
11863
11864         if test $ac_cv_header_pthread_h = yes ; then
11865                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11866 echo "configure:11867: checking POSIX thread version" >&5
11867 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11868   echo $ac_n "(cached) $ac_c" 1>&6
11869 else
11870   
11871         cat > conftest.$ac_ext <<EOF
11872 #line 11873 "configure"
11873 #include "confdefs.h"
11874
11875 #               include <pthread.h>
11876         
11877 int main() {
11878
11879                 int i = PTHREAD_CREATE_JOINABLE;
11880         
11881 ; return 0; }
11882 EOF
11883 if { (eval echo configure:11884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11884   rm -rf conftest*
11885   
11886         cat > conftest.$ac_ext <<EOF
11887 #line 11888 "configure"
11888 #include "confdefs.h"
11889 #include <pthread.h>
11890 EOF
11891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11892   egrep "pthread_detach" >/dev/null 2>&1; then
11893   rm -rf conftest*
11894   ol_cv_pthread_version=10
11895 else
11896   rm -rf conftest*
11897   ol_cv_pthread_version=8
11898 fi
11899 rm -f conftest*
11900
11901 else
11902   echo "configure: failed program was:" >&5
11903   cat conftest.$ac_ext >&5
11904   rm -rf conftest*
11905   
11906         cat > conftest.$ac_ext <<EOF
11907 #line 11908 "configure"
11908 #include "confdefs.h"
11909
11910 #               include <pthread.h>
11911 #               ifdef PTHREAD_CREATE_UNDETACHED
11912                 draft7
11913 #               endif
11914         
11915 EOF
11916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11917   egrep "draft7" >/dev/null 2>&1; then
11918   rm -rf conftest*
11919   ol_cv_pthread_version=7
11920 else
11921   rm -rf conftest*
11922   
11923         cat > conftest.$ac_ext <<EOF
11924 #line 11925 "configure"
11925 #include "confdefs.h"
11926 #include <pthread.h>
11927 EOF
11928 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11929   egrep "pthread_attr_init" >/dev/null 2>&1; then
11930   rm -rf conftest*
11931   ol_cv_pthread_version=6
11932 else
11933   rm -rf conftest*
11934   
11935         cat > conftest.$ac_ext <<EOF
11936 #line 11937 "configure"
11937 #include "confdefs.h"
11938
11939 #               include <pthread.h>
11940 #ifdef          PTHREAD_MUTEX_INITIALIZER
11941                 draft5
11942 #endif
11943         
11944 EOF
11945 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11946   egrep "draft5" >/dev/null 2>&1; then
11947   rm -rf conftest*
11948   ol_cv_pthread_version=5
11949 else
11950   rm -rf conftest*
11951   ol_cv_pthread_version=4
11952 fi
11953 rm -f conftest*
11954  
11955 fi
11956 rm -f conftest*
11957  
11958 fi
11959 rm -f conftest*
11960  
11961 fi
11962 rm -f conftest*
11963
11964 fi
11965
11966 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11967
11968
11969                 if test $ol_cv_pthread_version != 0 ; then
11970                         cat >> confdefs.h <<EOF
11971 #define HAVE_PTHREADS $ol_cv_pthread_version
11972 EOF
11973
11974                 else
11975                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11976                 fi
11977
11978                 # consider threads found
11979                 ol_with_threads=found
11980
11981                 
11982         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11983 echo "configure:11984: checking for LinuxThreads pthread.h" >&5
11984 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11985   echo $ac_n "(cached) $ac_c" 1>&6
11986 else
11987   cat > conftest.$ac_ext <<EOF
11988 #line 11989 "configure"
11989 #include "confdefs.h"
11990 #include <pthread.h>
11991 EOF
11992 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11993   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11994   rm -rf conftest*
11995   ol_cv_header_linux_threads=yes
11996 else
11997   rm -rf conftest*
11998   ol_cv_header_linux_threads=no
11999 fi
12000 rm -f conftest*
12001
12002                 
12003 fi
12004
12005 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
12006         if test $ol_cv_header_linux_threads = yes; then
12007                 cat >> confdefs.h <<\EOF
12008 #define HAVE_LINUX_THREADS 1
12009 EOF
12010
12011         fi
12012
12013                 
12014         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
12015 echo "configure:12016: checking for GNU Pth pthread.h" >&5
12016 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
12017   echo $ac_n "(cached) $ac_c" 1>&6
12018 else
12019   cat > conftest.$ac_ext <<EOF
12020 #line 12021 "configure"
12021 #include "confdefs.h"
12022 #include <pthread.h>
12023 #ifdef _POSIX_THREAD_IS_GNU_PTH
12024         __gnu_pth__;
12025 #endif
12026
12027 EOF
12028 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12029   egrep "__gnu_pth__" >/dev/null 2>&1; then
12030   rm -rf conftest*
12031   ol_cv_header_gnu_pth_pthread_h=yes
12032 else
12033   rm -rf conftest*
12034   ol_cv_header_gnu_pth_pthread_h=no
12035 fi
12036 rm -f conftest*
12037
12038                 
12039 fi
12040
12041 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
12042
12043
12044                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
12045                         for ac_hdr in sched.h
12046 do
12047 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12048 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12049 echo "configure:12050: checking for $ac_hdr" >&5
12050 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12051   echo $ac_n "(cached) $ac_c" 1>&6
12052 else
12053   cat > conftest.$ac_ext <<EOF
12054 #line 12055 "configure"
12055 #include "confdefs.h"
12056 #include <$ac_hdr>
12057 EOF
12058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12059 { (eval echo configure:12060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12061 if test -z "$ac_err"; then
12062   rm -rf conftest*
12063   eval "ac_cv_header_$ac_safe=yes"
12064 else
12065   echo "$ac_err" >&5
12066   echo "configure: failed program was:" >&5
12067   cat conftest.$ac_ext >&5
12068   rm -rf conftest*
12069   eval "ac_cv_header_$ac_safe=no"
12070 fi
12071 rm -f conftest*
12072 fi
12073 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12074   echo "$ac_t""yes" 1>&6
12075     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12076   cat >> confdefs.h <<EOF
12077 #define $ac_tr_hdr 1
12078 EOF
12079  
12080 else
12081   echo "$ac_t""no" 1>&6
12082 fi
12083 done
12084
12085                 fi
12086
12087                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
12088                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
12089 echo "configure:12090: checking for pthread_create in default libraries" >&5
12090 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
12091   echo $ac_n "(cached) $ac_c" 1>&6
12092 else
12093   
12094                 if test "$cross_compiling" = yes; then
12095   cat > conftest.$ac_ext <<EOF
12096 #line 12097 "configure"
12097 #include "confdefs.h"
12098 /* pthread test headers */
12099 #include <pthread.h>
12100 #if HAVE_PTHREADS < 7
12101 #include <errno.h>
12102 #endif
12103 #ifndef NULL
12104 #define NULL (void*)0
12105 #endif
12106
12107 static void *task(p)
12108         void *p;
12109 {
12110         return (void *) (p == NULL);
12111 }
12112
12113 int main() {
12114
12115         /* pthread test function */
12116 #ifndef PTHREAD_CREATE_DETACHED
12117 #define PTHREAD_CREATE_DETACHED 1
12118 #endif
12119         pthread_t t;
12120         int status;
12121         int detach = PTHREAD_CREATE_DETACHED;
12122
12123 #if HAVE_PTHREADS > 4
12124         /* Final pthreads */
12125         pthread_attr_t attr;
12126
12127         status = pthread_attr_init(&attr);
12128         if( status ) return status;
12129
12130 #if HAVE_PTHREADS < 7
12131         status = pthread_attr_setdetachstate(&attr, &detach);
12132         if( status < 0 ) status = errno;
12133 #else
12134         status = pthread_attr_setdetachstate(&attr, detach);
12135 #endif
12136         if( status ) return status;
12137         status = pthread_create( &t, &attr, task, NULL );
12138 #if HAVE_PTHREADS < 7
12139         if( status < 0 ) status = errno;
12140 #endif
12141         if( status ) return status;
12142 #else
12143         /* Draft 4 pthreads */
12144         status = pthread_create( &t, pthread_attr_default, task, NULL );
12145         if( status ) return errno;
12146
12147         /* give thread a chance to complete */
12148         /* it should remain joinable and hence detachable */
12149         sleep( 1 );
12150
12151         status = pthread_detach( &t );
12152         if( status ) return errno;
12153 #endif
12154
12155 #ifdef HAVE_LINUX_THREADS
12156         pthread_kill_other_threads_np();
12157 #endif
12158
12159         return 0;
12160
12161 ; return 0; }
12162 EOF
12163 if { (eval echo configure:12164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12164   rm -rf conftest*
12165   ol_cv_pthread_create=yes
12166 else
12167   echo "configure: failed program was:" >&5
12168   cat conftest.$ac_ext >&5
12169   rm -rf conftest*
12170   ol_cv_pthread_create=no
12171 fi
12172 rm -f conftest*
12173 else
12174   cat > conftest.$ac_ext <<EOF
12175 #line 12176 "configure"
12176 #include "confdefs.h"
12177 /* pthread test headers */
12178 #include <pthread.h>
12179 #if HAVE_PTHREADS < 7
12180 #include <errno.h>
12181 #endif
12182 #ifndef NULL
12183 #define NULL (void*)0
12184 #endif
12185
12186 static void *task(p)
12187         void *p;
12188 {
12189         return (void *) (p == NULL);
12190 }
12191
12192
12193 int main(argc, argv)
12194         int argc;
12195         char **argv;
12196 {
12197
12198         /* pthread test function */
12199 #ifndef PTHREAD_CREATE_DETACHED
12200 #define PTHREAD_CREATE_DETACHED 1
12201 #endif
12202         pthread_t t;
12203         int status;
12204         int detach = PTHREAD_CREATE_DETACHED;
12205
12206 #if HAVE_PTHREADS > 4
12207         /* Final pthreads */
12208         pthread_attr_t attr;
12209
12210         status = pthread_attr_init(&attr);
12211         if( status ) return status;
12212
12213 #if HAVE_PTHREADS < 7
12214         status = pthread_attr_setdetachstate(&attr, &detach);
12215         if( status < 0 ) status = errno;
12216 #else
12217         status = pthread_attr_setdetachstate(&attr, detach);
12218 #endif
12219         if( status ) return status;
12220         status = pthread_create( &t, &attr, task, NULL );
12221 #if HAVE_PTHREADS < 7
12222         if( status < 0 ) status = errno;
12223 #endif
12224         if( status ) return status;
12225 #else
12226         /* Draft 4 pthreads */
12227         status = pthread_create( &t, pthread_attr_default, task, NULL );
12228         if( status ) return errno;
12229
12230         /* give thread a chance to complete */
12231         /* it should remain joinable and hence detachable */
12232         sleep( 1 );
12233
12234         status = pthread_detach( &t );
12235         if( status ) return errno;
12236 #endif
12237
12238 #ifdef HAVE_LINUX_THREADS
12239         pthread_kill_other_threads_np();
12240 #endif
12241
12242         return 0;
12243
12244 }
12245
12246 EOF
12247 if { (eval echo configure:12248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12248 then
12249   ol_cv_pthread_create=yes
12250 else
12251   echo "configure: failed program was:" >&5
12252   cat conftest.$ac_ext >&5
12253   rm -fr conftest*
12254   ol_cv_pthread_create=no
12255 fi
12256 rm -fr conftest*
12257 fi
12258
12259 fi
12260
12261 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12262
12263                 if test $ol_cv_pthread_create != no ; then
12264                         ol_link_threads=posix
12265                         ol_link_pthreads=""
12266                 fi
12267                 
12268                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12269 if test "$ol_link_threads" = no ; then
12270         # try -kthread
12271         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12272 echo "configure:12273: checking for pthread link with -kthread" >&5
12273 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12274   echo $ac_n "(cached) $ac_c" 1>&6
12275 else
12276   
12277                 # save the flags
12278                 ol_LIBS="$LIBS"
12279                 LIBS="-kthread $LIBS"
12280
12281                 if test "$cross_compiling" = yes; then
12282   cat > conftest.$ac_ext <<EOF
12283 #line 12284 "configure"
12284 #include "confdefs.h"
12285 /* pthread test headers */
12286 #include <pthread.h>
12287 #if HAVE_PTHREADS < 7
12288 #include <errno.h>
12289 #endif
12290 #ifndef NULL
12291 #define NULL (void*)0
12292 #endif
12293
12294 static void *task(p)
12295         void *p;
12296 {
12297         return (void *) (p == NULL);
12298 }
12299
12300 int main() {
12301
12302         /* pthread test function */
12303 #ifndef PTHREAD_CREATE_DETACHED
12304 #define PTHREAD_CREATE_DETACHED 1
12305 #endif
12306         pthread_t t;
12307         int status;
12308         int detach = PTHREAD_CREATE_DETACHED;
12309
12310 #if HAVE_PTHREADS > 4
12311         /* Final pthreads */
12312         pthread_attr_t attr;
12313
12314         status = pthread_attr_init(&attr);
12315         if( status ) return status;
12316
12317 #if HAVE_PTHREADS < 7
12318         status = pthread_attr_setdetachstate(&attr, &detach);
12319         if( status < 0 ) status = errno;
12320 #else
12321         status = pthread_attr_setdetachstate(&attr, detach);
12322 #endif
12323         if( status ) return status;
12324         status = pthread_create( &t, &attr, task, NULL );
12325 #if HAVE_PTHREADS < 7
12326         if( status < 0 ) status = errno;
12327 #endif
12328         if( status ) return status;
12329 #else
12330         /* Draft 4 pthreads */
12331         status = pthread_create( &t, pthread_attr_default, task, NULL );
12332         if( status ) return errno;
12333
12334         /* give thread a chance to complete */
12335         /* it should remain joinable and hence detachable */
12336         sleep( 1 );
12337
12338         status = pthread_detach( &t );
12339         if( status ) return errno;
12340 #endif
12341
12342 #ifdef HAVE_LINUX_THREADS
12343         pthread_kill_other_threads_np();
12344 #endif
12345
12346         return 0;
12347
12348 ; return 0; }
12349 EOF
12350 if { (eval echo configure:12351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12351   rm -rf conftest*
12352   ol_cv_pthread_kthread=yes
12353 else
12354   echo "configure: failed program was:" >&5
12355   cat conftest.$ac_ext >&5
12356   rm -rf conftest*
12357   ol_cv_pthread_kthread=no
12358 fi
12359 rm -f conftest*
12360 else
12361   cat > conftest.$ac_ext <<EOF
12362 #line 12363 "configure"
12363 #include "confdefs.h"
12364 /* pthread test headers */
12365 #include <pthread.h>
12366 #if HAVE_PTHREADS < 7
12367 #include <errno.h>
12368 #endif
12369 #ifndef NULL
12370 #define NULL (void*)0
12371 #endif
12372
12373 static void *task(p)
12374         void *p;
12375 {
12376         return (void *) (p == NULL);
12377 }
12378
12379
12380 int main(argc, argv)
12381         int argc;
12382         char **argv;
12383 {
12384
12385         /* pthread test function */
12386 #ifndef PTHREAD_CREATE_DETACHED
12387 #define PTHREAD_CREATE_DETACHED 1
12388 #endif
12389         pthread_t t;
12390         int status;
12391         int detach = PTHREAD_CREATE_DETACHED;
12392
12393 #if HAVE_PTHREADS > 4
12394         /* Final pthreads */
12395         pthread_attr_t attr;
12396
12397         status = pthread_attr_init(&attr);
12398         if( status ) return status;
12399
12400 #if HAVE_PTHREADS < 7
12401         status = pthread_attr_setdetachstate(&attr, &detach);
12402         if( status < 0 ) status = errno;
12403 #else
12404         status = pthread_attr_setdetachstate(&attr, detach);
12405 #endif
12406         if( status ) return status;
12407         status = pthread_create( &t, &attr, task, NULL );
12408 #if HAVE_PTHREADS < 7
12409         if( status < 0 ) status = errno;
12410 #endif
12411         if( status ) return status;
12412 #else
12413         /* Draft 4 pthreads */
12414         status = pthread_create( &t, pthread_attr_default, task, NULL );
12415         if( status ) return errno;
12416
12417         /* give thread a chance to complete */
12418         /* it should remain joinable and hence detachable */
12419         sleep( 1 );
12420
12421         status = pthread_detach( &t );
12422         if( status ) return errno;
12423 #endif
12424
12425 #ifdef HAVE_LINUX_THREADS
12426         pthread_kill_other_threads_np();
12427 #endif
12428
12429         return 0;
12430
12431 }
12432
12433 EOF
12434 if { (eval echo configure:12435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12435 then
12436   ol_cv_pthread_kthread=yes
12437 else
12438   echo "configure: failed program was:" >&5
12439   cat conftest.$ac_ext >&5
12440   rm -fr conftest*
12441   ol_cv_pthread_kthread=no
12442 fi
12443 rm -fr conftest*
12444 fi
12445
12446
12447                 # restore the LIBS
12448                 LIBS="$ol_LIBS"
12449         
12450 fi
12451
12452 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12453
12454         if test $ol_cv_pthread_kthread = yes ; then
12455                 ol_link_pthreads="-kthread"
12456                 ol_link_threads=posix
12457         fi
12458 fi
12459
12460                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12461 if test "$ol_link_threads" = no ; then
12462         # try -pthread
12463         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12464 echo "configure:12465: checking for pthread link with -pthread" >&5
12465 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12466   echo $ac_n "(cached) $ac_c" 1>&6
12467 else
12468   
12469                 # save the flags
12470                 ol_LIBS="$LIBS"
12471                 LIBS="-pthread $LIBS"
12472
12473                 if test "$cross_compiling" = yes; then
12474   cat > conftest.$ac_ext <<EOF
12475 #line 12476 "configure"
12476 #include "confdefs.h"
12477 /* pthread test headers */
12478 #include <pthread.h>
12479 #if HAVE_PTHREADS < 7
12480 #include <errno.h>
12481 #endif
12482 #ifndef NULL
12483 #define NULL (void*)0
12484 #endif
12485
12486 static void *task(p)
12487         void *p;
12488 {
12489         return (void *) (p == NULL);
12490 }
12491
12492 int main() {
12493
12494         /* pthread test function */
12495 #ifndef PTHREAD_CREATE_DETACHED
12496 #define PTHREAD_CREATE_DETACHED 1
12497 #endif
12498         pthread_t t;
12499         int status;
12500         int detach = PTHREAD_CREATE_DETACHED;
12501
12502 #if HAVE_PTHREADS > 4
12503         /* Final pthreads */
12504         pthread_attr_t attr;
12505
12506         status = pthread_attr_init(&attr);
12507         if( status ) return status;
12508
12509 #if HAVE_PTHREADS < 7
12510         status = pthread_attr_setdetachstate(&attr, &detach);
12511         if( status < 0 ) status = errno;
12512 #else
12513         status = pthread_attr_setdetachstate(&attr, detach);
12514 #endif
12515         if( status ) return status;
12516         status = pthread_create( &t, &attr, task, NULL );
12517 #if HAVE_PTHREADS < 7
12518         if( status < 0 ) status = errno;
12519 #endif
12520         if( status ) return status;
12521 #else
12522         /* Draft 4 pthreads */
12523         status = pthread_create( &t, pthread_attr_default, task, NULL );
12524         if( status ) return errno;
12525
12526         /* give thread a chance to complete */
12527         /* it should remain joinable and hence detachable */
12528         sleep( 1 );
12529
12530         status = pthread_detach( &t );
12531         if( status ) return errno;
12532 #endif
12533
12534 #ifdef HAVE_LINUX_THREADS
12535         pthread_kill_other_threads_np();
12536 #endif
12537
12538         return 0;
12539
12540 ; return 0; }
12541 EOF
12542 if { (eval echo configure:12543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12543   rm -rf conftest*
12544   ol_cv_pthread_pthread=yes
12545 else
12546   echo "configure: failed program was:" >&5
12547   cat conftest.$ac_ext >&5
12548   rm -rf conftest*
12549   ol_cv_pthread_pthread=no
12550 fi
12551 rm -f conftest*
12552 else
12553   cat > conftest.$ac_ext <<EOF
12554 #line 12555 "configure"
12555 #include "confdefs.h"
12556 /* pthread test headers */
12557 #include <pthread.h>
12558 #if HAVE_PTHREADS < 7
12559 #include <errno.h>
12560 #endif
12561 #ifndef NULL
12562 #define NULL (void*)0
12563 #endif
12564
12565 static void *task(p)
12566         void *p;
12567 {
12568         return (void *) (p == NULL);
12569 }
12570
12571
12572 int main(argc, argv)
12573         int argc;
12574         char **argv;
12575 {
12576
12577         /* pthread test function */
12578 #ifndef PTHREAD_CREATE_DETACHED
12579 #define PTHREAD_CREATE_DETACHED 1
12580 #endif
12581         pthread_t t;
12582         int status;
12583         int detach = PTHREAD_CREATE_DETACHED;
12584
12585 #if HAVE_PTHREADS > 4
12586         /* Final pthreads */
12587         pthread_attr_t attr;
12588
12589         status = pthread_attr_init(&attr);
12590         if( status ) return status;
12591
12592 #if HAVE_PTHREADS < 7
12593         status = pthread_attr_setdetachstate(&attr, &detach);
12594         if( status < 0 ) status = errno;
12595 #else
12596         status = pthread_attr_setdetachstate(&attr, detach);
12597 #endif
12598         if( status ) return status;
12599         status = pthread_create( &t, &attr, task, NULL );
12600 #if HAVE_PTHREADS < 7
12601         if( status < 0 ) status = errno;
12602 #endif
12603         if( status ) return status;
12604 #else
12605         /* Draft 4 pthreads */
12606         status = pthread_create( &t, pthread_attr_default, task, NULL );
12607         if( status ) return errno;
12608
12609         /* give thread a chance to complete */
12610         /* it should remain joinable and hence detachable */
12611         sleep( 1 );
12612
12613         status = pthread_detach( &t );
12614         if( status ) return errno;
12615 #endif
12616
12617 #ifdef HAVE_LINUX_THREADS
12618         pthread_kill_other_threads_np();
12619 #endif
12620
12621         return 0;
12622
12623 }
12624
12625 EOF
12626 if { (eval echo configure:12627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12627 then
12628   ol_cv_pthread_pthread=yes
12629 else
12630   echo "configure: failed program was:" >&5
12631   cat conftest.$ac_ext >&5
12632   rm -fr conftest*
12633   ol_cv_pthread_pthread=no
12634 fi
12635 rm -fr conftest*
12636 fi
12637
12638
12639                 # restore the LIBS
12640                 LIBS="$ol_LIBS"
12641         
12642 fi
12643
12644 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12645
12646         if test $ol_cv_pthread_pthread = yes ; then
12647                 ol_link_pthreads="-pthread"
12648                 ol_link_threads=posix
12649         fi
12650 fi
12651
12652                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12653 if test "$ol_link_threads" = no ; then
12654         # try -pthreads
12655         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12656 echo "configure:12657: checking for pthread link with -pthreads" >&5
12657 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12658   echo $ac_n "(cached) $ac_c" 1>&6
12659 else
12660   
12661                 # save the flags
12662                 ol_LIBS="$LIBS"
12663                 LIBS="-pthreads $LIBS"
12664
12665                 if test "$cross_compiling" = yes; then
12666   cat > conftest.$ac_ext <<EOF
12667 #line 12668 "configure"
12668 #include "confdefs.h"
12669 /* pthread test headers */
12670 #include <pthread.h>
12671 #if HAVE_PTHREADS < 7
12672 #include <errno.h>
12673 #endif
12674 #ifndef NULL
12675 #define NULL (void*)0
12676 #endif
12677
12678 static void *task(p)
12679         void *p;
12680 {
12681         return (void *) (p == NULL);
12682 }
12683
12684 int main() {
12685
12686         /* pthread test function */
12687 #ifndef PTHREAD_CREATE_DETACHED
12688 #define PTHREAD_CREATE_DETACHED 1
12689 #endif
12690         pthread_t t;
12691         int status;
12692         int detach = PTHREAD_CREATE_DETACHED;
12693
12694 #if HAVE_PTHREADS > 4
12695         /* Final pthreads */
12696         pthread_attr_t attr;
12697
12698         status = pthread_attr_init(&attr);
12699         if( status ) return status;
12700
12701 #if HAVE_PTHREADS < 7
12702         status = pthread_attr_setdetachstate(&attr, &detach);
12703         if( status < 0 ) status = errno;
12704 #else
12705         status = pthread_attr_setdetachstate(&attr, detach);
12706 #endif
12707         if( status ) return status;
12708         status = pthread_create( &t, &attr, task, NULL );
12709 #if HAVE_PTHREADS < 7
12710         if( status < 0 ) status = errno;
12711 #endif
12712         if( status ) return status;
12713 #else
12714         /* Draft 4 pthreads */
12715         status = pthread_create( &t, pthread_attr_default, task, NULL );
12716         if( status ) return errno;
12717
12718         /* give thread a chance to complete */
12719         /* it should remain joinable and hence detachable */
12720         sleep( 1 );
12721
12722         status = pthread_detach( &t );
12723         if( status ) return errno;
12724 #endif
12725
12726 #ifdef HAVE_LINUX_THREADS
12727         pthread_kill_other_threads_np();
12728 #endif
12729
12730         return 0;
12731
12732 ; return 0; }
12733 EOF
12734 if { (eval echo configure:12735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12735   rm -rf conftest*
12736   ol_cv_pthread_pthreads=yes
12737 else
12738   echo "configure: failed program was:" >&5
12739   cat conftest.$ac_ext >&5
12740   rm -rf conftest*
12741   ol_cv_pthread_pthreads=no
12742 fi
12743 rm -f conftest*
12744 else
12745   cat > conftest.$ac_ext <<EOF
12746 #line 12747 "configure"
12747 #include "confdefs.h"
12748 /* pthread test headers */
12749 #include <pthread.h>
12750 #if HAVE_PTHREADS < 7
12751 #include <errno.h>
12752 #endif
12753 #ifndef NULL
12754 #define NULL (void*)0
12755 #endif
12756
12757 static void *task(p)
12758         void *p;
12759 {
12760         return (void *) (p == NULL);
12761 }
12762
12763
12764 int main(argc, argv)
12765         int argc;
12766         char **argv;
12767 {
12768
12769         /* pthread test function */
12770 #ifndef PTHREAD_CREATE_DETACHED
12771 #define PTHREAD_CREATE_DETACHED 1
12772 #endif
12773         pthread_t t;
12774         int status;
12775         int detach = PTHREAD_CREATE_DETACHED;
12776
12777 #if HAVE_PTHREADS > 4
12778         /* Final pthreads */
12779         pthread_attr_t attr;
12780
12781         status = pthread_attr_init(&attr);
12782         if( status ) return status;
12783
12784 #if HAVE_PTHREADS < 7
12785         status = pthread_attr_setdetachstate(&attr, &detach);
12786         if( status < 0 ) status = errno;
12787 #else
12788         status = pthread_attr_setdetachstate(&attr, detach);
12789 #endif
12790         if( status ) return status;
12791         status = pthread_create( &t, &attr, task, NULL );
12792 #if HAVE_PTHREADS < 7
12793         if( status < 0 ) status = errno;
12794 #endif
12795         if( status ) return status;
12796 #else
12797         /* Draft 4 pthreads */
12798         status = pthread_create( &t, pthread_attr_default, task, NULL );
12799         if( status ) return errno;
12800
12801         /* give thread a chance to complete */
12802         /* it should remain joinable and hence detachable */
12803         sleep( 1 );
12804
12805         status = pthread_detach( &t );
12806         if( status ) return errno;
12807 #endif
12808
12809 #ifdef HAVE_LINUX_THREADS
12810         pthread_kill_other_threads_np();
12811 #endif
12812
12813         return 0;
12814
12815 }
12816
12817 EOF
12818 if { (eval echo configure:12819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12819 then
12820   ol_cv_pthread_pthreads=yes
12821 else
12822   echo "configure: failed program was:" >&5
12823   cat conftest.$ac_ext >&5
12824   rm -fr conftest*
12825   ol_cv_pthread_pthreads=no
12826 fi
12827 rm -fr conftest*
12828 fi
12829
12830
12831                 # restore the LIBS
12832                 LIBS="$ol_LIBS"
12833         
12834 fi
12835
12836 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12837
12838         if test $ol_cv_pthread_pthreads = yes ; then
12839                 ol_link_pthreads="-pthreads"
12840                 ol_link_threads=posix
12841         fi
12842 fi
12843
12844                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12845 if test "$ol_link_threads" = no ; then
12846         # try -mthreads
12847         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12848 echo "configure:12849: checking for pthread link with -mthreads" >&5
12849 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12850   echo $ac_n "(cached) $ac_c" 1>&6
12851 else
12852   
12853                 # save the flags
12854                 ol_LIBS="$LIBS"
12855                 LIBS="-mthreads $LIBS"
12856
12857                 if test "$cross_compiling" = yes; then
12858   cat > conftest.$ac_ext <<EOF
12859 #line 12860 "configure"
12860 #include "confdefs.h"
12861 /* pthread test headers */
12862 #include <pthread.h>
12863 #if HAVE_PTHREADS < 7
12864 #include <errno.h>
12865 #endif
12866 #ifndef NULL
12867 #define NULL (void*)0
12868 #endif
12869
12870 static void *task(p)
12871         void *p;
12872 {
12873         return (void *) (p == NULL);
12874 }
12875
12876 int main() {
12877
12878         /* pthread test function */
12879 #ifndef PTHREAD_CREATE_DETACHED
12880 #define PTHREAD_CREATE_DETACHED 1
12881 #endif
12882         pthread_t t;
12883         int status;
12884         int detach = PTHREAD_CREATE_DETACHED;
12885
12886 #if HAVE_PTHREADS > 4
12887         /* Final pthreads */
12888         pthread_attr_t attr;
12889
12890         status = pthread_attr_init(&attr);
12891         if( status ) return status;
12892
12893 #if HAVE_PTHREADS < 7
12894         status = pthread_attr_setdetachstate(&attr, &detach);
12895         if( status < 0 ) status = errno;
12896 #else
12897         status = pthread_attr_setdetachstate(&attr, detach);
12898 #endif
12899         if( status ) return status;
12900         status = pthread_create( &t, &attr, task, NULL );
12901 #if HAVE_PTHREADS < 7
12902         if( status < 0 ) status = errno;
12903 #endif
12904         if( status ) return status;
12905 #else
12906         /* Draft 4 pthreads */
12907         status = pthread_create( &t, pthread_attr_default, task, NULL );
12908         if( status ) return errno;
12909
12910         /* give thread a chance to complete */
12911         /* it should remain joinable and hence detachable */
12912         sleep( 1 );
12913
12914         status = pthread_detach( &t );
12915         if( status ) return errno;
12916 #endif
12917
12918 #ifdef HAVE_LINUX_THREADS
12919         pthread_kill_other_threads_np();
12920 #endif
12921
12922         return 0;
12923
12924 ; return 0; }
12925 EOF
12926 if { (eval echo configure:12927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12927   rm -rf conftest*
12928   ol_cv_pthread_mthreads=yes
12929 else
12930   echo "configure: failed program was:" >&5
12931   cat conftest.$ac_ext >&5
12932   rm -rf conftest*
12933   ol_cv_pthread_mthreads=no
12934 fi
12935 rm -f conftest*
12936 else
12937   cat > conftest.$ac_ext <<EOF
12938 #line 12939 "configure"
12939 #include "confdefs.h"
12940 /* pthread test headers */
12941 #include <pthread.h>
12942 #if HAVE_PTHREADS < 7
12943 #include <errno.h>
12944 #endif
12945 #ifndef NULL
12946 #define NULL (void*)0
12947 #endif
12948
12949 static void *task(p)
12950         void *p;
12951 {
12952         return (void *) (p == NULL);
12953 }
12954
12955
12956 int main(argc, argv)
12957         int argc;
12958         char **argv;
12959 {
12960
12961         /* pthread test function */
12962 #ifndef PTHREAD_CREATE_DETACHED
12963 #define PTHREAD_CREATE_DETACHED 1
12964 #endif
12965         pthread_t t;
12966         int status;
12967         int detach = PTHREAD_CREATE_DETACHED;
12968
12969 #if HAVE_PTHREADS > 4
12970         /* Final pthreads */
12971         pthread_attr_t attr;
12972
12973         status = pthread_attr_init(&attr);
12974         if( status ) return status;
12975
12976 #if HAVE_PTHREADS < 7
12977         status = pthread_attr_setdetachstate(&attr, &detach);
12978         if( status < 0 ) status = errno;
12979 #else
12980         status = pthread_attr_setdetachstate(&attr, detach);
12981 #endif
12982         if( status ) return status;
12983         status = pthread_create( &t, &attr, task, NULL );
12984 #if HAVE_PTHREADS < 7
12985         if( status < 0 ) status = errno;
12986 #endif
12987         if( status ) return status;
12988 #else
12989         /* Draft 4 pthreads */
12990         status = pthread_create( &t, pthread_attr_default, task, NULL );
12991         if( status ) return errno;
12992
12993         /* give thread a chance to complete */
12994         /* it should remain joinable and hence detachable */
12995         sleep( 1 );
12996
12997         status = pthread_detach( &t );
12998         if( status ) return errno;
12999 #endif
13000
13001 #ifdef HAVE_LINUX_THREADS
13002         pthread_kill_other_threads_np();
13003 #endif
13004
13005         return 0;
13006
13007 }
13008
13009 EOF
13010 if { (eval echo configure:13011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13011 then
13012   ol_cv_pthread_mthreads=yes
13013 else
13014   echo "configure: failed program was:" >&5
13015   cat conftest.$ac_ext >&5
13016   rm -fr conftest*
13017   ol_cv_pthread_mthreads=no
13018 fi
13019 rm -fr conftest*
13020 fi
13021
13022
13023                 # restore the LIBS
13024                 LIBS="$ol_LIBS"
13025         
13026 fi
13027
13028 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
13029
13030         if test $ol_cv_pthread_mthreads = yes ; then
13031                 ol_link_pthreads="-mthreads"
13032                 ol_link_threads=posix
13033         fi
13034 fi
13035
13036                 # Pthread try link: -thread (ol_cv_pthread_thread)
13037 if test "$ol_link_threads" = no ; then
13038         # try -thread
13039         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
13040 echo "configure:13041: checking for pthread link with -thread" >&5
13041 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
13042   echo $ac_n "(cached) $ac_c" 1>&6
13043 else
13044   
13045                 # save the flags
13046                 ol_LIBS="$LIBS"
13047                 LIBS="-thread $LIBS"
13048
13049                 if test "$cross_compiling" = yes; then
13050   cat > conftest.$ac_ext <<EOF
13051 #line 13052 "configure"
13052 #include "confdefs.h"
13053 /* pthread test headers */
13054 #include <pthread.h>
13055 #if HAVE_PTHREADS < 7
13056 #include <errno.h>
13057 #endif
13058 #ifndef NULL
13059 #define NULL (void*)0
13060 #endif
13061
13062 static void *task(p)
13063         void *p;
13064 {
13065         return (void *) (p == NULL);
13066 }
13067
13068 int main() {
13069
13070         /* pthread test function */
13071 #ifndef PTHREAD_CREATE_DETACHED
13072 #define PTHREAD_CREATE_DETACHED 1
13073 #endif
13074         pthread_t t;
13075         int status;
13076         int detach = PTHREAD_CREATE_DETACHED;
13077
13078 #if HAVE_PTHREADS > 4
13079         /* Final pthreads */
13080         pthread_attr_t attr;
13081
13082         status = pthread_attr_init(&attr);
13083         if( status ) return status;
13084
13085 #if HAVE_PTHREADS < 7
13086         status = pthread_attr_setdetachstate(&attr, &detach);
13087         if( status < 0 ) status = errno;
13088 #else
13089         status = pthread_attr_setdetachstate(&attr, detach);
13090 #endif
13091         if( status ) return status;
13092         status = pthread_create( &t, &attr, task, NULL );
13093 #if HAVE_PTHREADS < 7
13094         if( status < 0 ) status = errno;
13095 #endif
13096         if( status ) return status;
13097 #else
13098         /* Draft 4 pthreads */
13099         status = pthread_create( &t, pthread_attr_default, task, NULL );
13100         if( status ) return errno;
13101
13102         /* give thread a chance to complete */
13103         /* it should remain joinable and hence detachable */
13104         sleep( 1 );
13105
13106         status = pthread_detach( &t );
13107         if( status ) return errno;
13108 #endif
13109
13110 #ifdef HAVE_LINUX_THREADS
13111         pthread_kill_other_threads_np();
13112 #endif
13113
13114         return 0;
13115
13116 ; return 0; }
13117 EOF
13118 if { (eval echo configure:13119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13119   rm -rf conftest*
13120   ol_cv_pthread_thread=yes
13121 else
13122   echo "configure: failed program was:" >&5
13123   cat conftest.$ac_ext >&5
13124   rm -rf conftest*
13125   ol_cv_pthread_thread=no
13126 fi
13127 rm -f conftest*
13128 else
13129   cat > conftest.$ac_ext <<EOF
13130 #line 13131 "configure"
13131 #include "confdefs.h"
13132 /* pthread test headers */
13133 #include <pthread.h>
13134 #if HAVE_PTHREADS < 7
13135 #include <errno.h>
13136 #endif
13137 #ifndef NULL
13138 #define NULL (void*)0
13139 #endif
13140
13141 static void *task(p)
13142         void *p;
13143 {
13144         return (void *) (p == NULL);
13145 }
13146
13147
13148 int main(argc, argv)
13149         int argc;
13150         char **argv;
13151 {
13152
13153         /* pthread test function */
13154 #ifndef PTHREAD_CREATE_DETACHED
13155 #define PTHREAD_CREATE_DETACHED 1
13156 #endif
13157         pthread_t t;
13158         int status;
13159         int detach = PTHREAD_CREATE_DETACHED;
13160
13161 #if HAVE_PTHREADS > 4
13162         /* Final pthreads */
13163         pthread_attr_t attr;
13164
13165         status = pthread_attr_init(&attr);
13166         if( status ) return status;
13167
13168 #if HAVE_PTHREADS < 7
13169         status = pthread_attr_setdetachstate(&attr, &detach);
13170         if( status < 0 ) status = errno;
13171 #else
13172         status = pthread_attr_setdetachstate(&attr, detach);
13173 #endif
13174         if( status ) return status;
13175         status = pthread_create( &t, &attr, task, NULL );
13176 #if HAVE_PTHREADS < 7
13177         if( status < 0 ) status = errno;
13178 #endif
13179         if( status ) return status;
13180 #else
13181         /* Draft 4 pthreads */
13182         status = pthread_create( &t, pthread_attr_default, task, NULL );
13183         if( status ) return errno;
13184
13185         /* give thread a chance to complete */
13186         /* it should remain joinable and hence detachable */
13187         sleep( 1 );
13188
13189         status = pthread_detach( &t );
13190         if( status ) return errno;
13191 #endif
13192
13193 #ifdef HAVE_LINUX_THREADS
13194         pthread_kill_other_threads_np();
13195 #endif
13196
13197         return 0;
13198
13199 }
13200
13201 EOF
13202 if { (eval echo configure:13203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13203 then
13204   ol_cv_pthread_thread=yes
13205 else
13206   echo "configure: failed program was:" >&5
13207   cat conftest.$ac_ext >&5
13208   rm -fr conftest*
13209   ol_cv_pthread_thread=no
13210 fi
13211 rm -fr conftest*
13212 fi
13213
13214
13215                 # restore the LIBS
13216                 LIBS="$ol_LIBS"
13217         
13218 fi
13219
13220 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13221
13222         if test $ol_cv_pthread_thread = yes ; then
13223                 ol_link_pthreads="-thread"
13224                 ol_link_threads=posix
13225         fi
13226 fi
13227
13228
13229                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13230 if test "$ol_link_threads" = no ; then
13231         # try -lpthread -lmach -lexc -lc_r
13232         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13233 echo "configure:13234: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13234 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13235   echo $ac_n "(cached) $ac_c" 1>&6
13236 else
13237   
13238                 # save the flags
13239                 ol_LIBS="$LIBS"
13240                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13241
13242                 if test "$cross_compiling" = yes; then
13243   cat > conftest.$ac_ext <<EOF
13244 #line 13245 "configure"
13245 #include "confdefs.h"
13246 /* pthread test headers */
13247 #include <pthread.h>
13248 #if HAVE_PTHREADS < 7
13249 #include <errno.h>
13250 #endif
13251 #ifndef NULL
13252 #define NULL (void*)0
13253 #endif
13254
13255 static void *task(p)
13256         void *p;
13257 {
13258         return (void *) (p == NULL);
13259 }
13260
13261 int main() {
13262
13263         /* pthread test function */
13264 #ifndef PTHREAD_CREATE_DETACHED
13265 #define PTHREAD_CREATE_DETACHED 1
13266 #endif
13267         pthread_t t;
13268         int status;
13269         int detach = PTHREAD_CREATE_DETACHED;
13270
13271 #if HAVE_PTHREADS > 4
13272         /* Final pthreads */
13273         pthread_attr_t attr;
13274
13275         status = pthread_attr_init(&attr);
13276         if( status ) return status;
13277
13278 #if HAVE_PTHREADS < 7
13279         status = pthread_attr_setdetachstate(&attr, &detach);
13280         if( status < 0 ) status = errno;
13281 #else
13282         status = pthread_attr_setdetachstate(&attr, detach);
13283 #endif
13284         if( status ) return status;
13285         status = pthread_create( &t, &attr, task, NULL );
13286 #if HAVE_PTHREADS < 7
13287         if( status < 0 ) status = errno;
13288 #endif
13289         if( status ) return status;
13290 #else
13291         /* Draft 4 pthreads */
13292         status = pthread_create( &t, pthread_attr_default, task, NULL );
13293         if( status ) return errno;
13294
13295         /* give thread a chance to complete */
13296         /* it should remain joinable and hence detachable */
13297         sleep( 1 );
13298
13299         status = pthread_detach( &t );
13300         if( status ) return errno;
13301 #endif
13302
13303 #ifdef HAVE_LINUX_THREADS
13304         pthread_kill_other_threads_np();
13305 #endif
13306
13307         return 0;
13308
13309 ; return 0; }
13310 EOF
13311 if { (eval echo configure:13312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13312   rm -rf conftest*
13313   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13314 else
13315   echo "configure: failed program was:" >&5
13316   cat conftest.$ac_ext >&5
13317   rm -rf conftest*
13318   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13319 fi
13320 rm -f conftest*
13321 else
13322   cat > conftest.$ac_ext <<EOF
13323 #line 13324 "configure"
13324 #include "confdefs.h"
13325 /* pthread test headers */
13326 #include <pthread.h>
13327 #if HAVE_PTHREADS < 7
13328 #include <errno.h>
13329 #endif
13330 #ifndef NULL
13331 #define NULL (void*)0
13332 #endif
13333
13334 static void *task(p)
13335         void *p;
13336 {
13337         return (void *) (p == NULL);
13338 }
13339
13340
13341 int main(argc, argv)
13342         int argc;
13343         char **argv;
13344 {
13345
13346         /* pthread test function */
13347 #ifndef PTHREAD_CREATE_DETACHED
13348 #define PTHREAD_CREATE_DETACHED 1
13349 #endif
13350         pthread_t t;
13351         int status;
13352         int detach = PTHREAD_CREATE_DETACHED;
13353
13354 #if HAVE_PTHREADS > 4
13355         /* Final pthreads */
13356         pthread_attr_t attr;
13357
13358         status = pthread_attr_init(&attr);
13359         if( status ) return status;
13360
13361 #if HAVE_PTHREADS < 7
13362         status = pthread_attr_setdetachstate(&attr, &detach);
13363         if( status < 0 ) status = errno;
13364 #else
13365         status = pthread_attr_setdetachstate(&attr, detach);
13366 #endif
13367         if( status ) return status;
13368         status = pthread_create( &t, &attr, task, NULL );
13369 #if HAVE_PTHREADS < 7
13370         if( status < 0 ) status = errno;
13371 #endif
13372         if( status ) return status;
13373 #else
13374         /* Draft 4 pthreads */
13375         status = pthread_create( &t, pthread_attr_default, task, NULL );
13376         if( status ) return errno;
13377
13378         /* give thread a chance to complete */
13379         /* it should remain joinable and hence detachable */
13380         sleep( 1 );
13381
13382         status = pthread_detach( &t );
13383         if( status ) return errno;
13384 #endif
13385
13386 #ifdef HAVE_LINUX_THREADS
13387         pthread_kill_other_threads_np();
13388 #endif
13389
13390         return 0;
13391
13392 }
13393
13394 EOF
13395 if { (eval echo configure:13396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13396 then
13397   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13398 else
13399   echo "configure: failed program was:" >&5
13400   cat conftest.$ac_ext >&5
13401   rm -fr conftest*
13402   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13403 fi
13404 rm -fr conftest*
13405 fi
13406
13407
13408                 # restore the LIBS
13409                 LIBS="$ol_LIBS"
13410         
13411 fi
13412
13413 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13414
13415         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13416                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13417                 ol_link_threads=posix
13418         fi
13419 fi
13420
13421                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13422 if test "$ol_link_threads" = no ; then
13423         # try -lpthread -lmach -lexc
13424         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13425 echo "configure:13426: checking for pthread link with -lpthread -lmach -lexc" >&5
13426 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13427   echo $ac_n "(cached) $ac_c" 1>&6
13428 else
13429   
13430                 # save the flags
13431                 ol_LIBS="$LIBS"
13432                 LIBS="-lpthread -lmach -lexc $LIBS"
13433
13434                 if test "$cross_compiling" = yes; then
13435   cat > conftest.$ac_ext <<EOF
13436 #line 13437 "configure"
13437 #include "confdefs.h"
13438 /* pthread test headers */
13439 #include <pthread.h>
13440 #if HAVE_PTHREADS < 7
13441 #include <errno.h>
13442 #endif
13443 #ifndef NULL
13444 #define NULL (void*)0
13445 #endif
13446
13447 static void *task(p)
13448         void *p;
13449 {
13450         return (void *) (p == NULL);
13451 }
13452
13453 int main() {
13454
13455         /* pthread test function */
13456 #ifndef PTHREAD_CREATE_DETACHED
13457 #define PTHREAD_CREATE_DETACHED 1
13458 #endif
13459         pthread_t t;
13460         int status;
13461         int detach = PTHREAD_CREATE_DETACHED;
13462
13463 #if HAVE_PTHREADS > 4
13464         /* Final pthreads */
13465         pthread_attr_t attr;
13466
13467         status = pthread_attr_init(&attr);
13468         if( status ) return status;
13469
13470 #if HAVE_PTHREADS < 7
13471         status = pthread_attr_setdetachstate(&attr, &detach);
13472         if( status < 0 ) status = errno;
13473 #else
13474         status = pthread_attr_setdetachstate(&attr, detach);
13475 #endif
13476         if( status ) return status;
13477         status = pthread_create( &t, &attr, task, NULL );
13478 #if HAVE_PTHREADS < 7
13479         if( status < 0 ) status = errno;
13480 #endif
13481         if( status ) return status;
13482 #else
13483         /* Draft 4 pthreads */
13484         status = pthread_create( &t, pthread_attr_default, task, NULL );
13485         if( status ) return errno;
13486
13487         /* give thread a chance to complete */
13488         /* it should remain joinable and hence detachable */
13489         sleep( 1 );
13490
13491         status = pthread_detach( &t );
13492         if( status ) return errno;
13493 #endif
13494
13495 #ifdef HAVE_LINUX_THREADS
13496         pthread_kill_other_threads_np();
13497 #endif
13498
13499         return 0;
13500
13501 ; return 0; }
13502 EOF
13503 if { (eval echo configure:13504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13504   rm -rf conftest*
13505   ol_cv_pthread_lpthread_lmach_lexc=yes
13506 else
13507   echo "configure: failed program was:" >&5
13508   cat conftest.$ac_ext >&5
13509   rm -rf conftest*
13510   ol_cv_pthread_lpthread_lmach_lexc=no
13511 fi
13512 rm -f conftest*
13513 else
13514   cat > conftest.$ac_ext <<EOF
13515 #line 13516 "configure"
13516 #include "confdefs.h"
13517 /* pthread test headers */
13518 #include <pthread.h>
13519 #if HAVE_PTHREADS < 7
13520 #include <errno.h>
13521 #endif
13522 #ifndef NULL
13523 #define NULL (void*)0
13524 #endif
13525
13526 static void *task(p)
13527         void *p;
13528 {
13529         return (void *) (p == NULL);
13530 }
13531
13532
13533 int main(argc, argv)
13534         int argc;
13535         char **argv;
13536 {
13537
13538         /* pthread test function */
13539 #ifndef PTHREAD_CREATE_DETACHED
13540 #define PTHREAD_CREATE_DETACHED 1
13541 #endif
13542         pthread_t t;
13543         int status;
13544         int detach = PTHREAD_CREATE_DETACHED;
13545
13546 #if HAVE_PTHREADS > 4
13547         /* Final pthreads */
13548         pthread_attr_t attr;
13549
13550         status = pthread_attr_init(&attr);
13551         if( status ) return status;
13552
13553 #if HAVE_PTHREADS < 7
13554         status = pthread_attr_setdetachstate(&attr, &detach);
13555         if( status < 0 ) status = errno;
13556 #else
13557         status = pthread_attr_setdetachstate(&attr, detach);
13558 #endif
13559         if( status ) return status;
13560         status = pthread_create( &t, &attr, task, NULL );
13561 #if HAVE_PTHREADS < 7
13562         if( status < 0 ) status = errno;
13563 #endif
13564         if( status ) return status;
13565 #else
13566         /* Draft 4 pthreads */
13567         status = pthread_create( &t, pthread_attr_default, task, NULL );
13568         if( status ) return errno;
13569
13570         /* give thread a chance to complete */
13571         /* it should remain joinable and hence detachable */
13572         sleep( 1 );
13573
13574         status = pthread_detach( &t );
13575         if( status ) return errno;
13576 #endif
13577
13578 #ifdef HAVE_LINUX_THREADS
13579         pthread_kill_other_threads_np();
13580 #endif
13581
13582         return 0;
13583
13584 }
13585
13586 EOF
13587 if { (eval echo configure:13588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13588 then
13589   ol_cv_pthread_lpthread_lmach_lexc=yes
13590 else
13591   echo "configure: failed program was:" >&5
13592   cat conftest.$ac_ext >&5
13593   rm -fr conftest*
13594   ol_cv_pthread_lpthread_lmach_lexc=no
13595 fi
13596 rm -fr conftest*
13597 fi
13598
13599
13600                 # restore the LIBS
13601                 LIBS="$ol_LIBS"
13602         
13603 fi
13604
13605 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13606
13607         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13608                 ol_link_pthreads="-lpthread -lmach -lexc"
13609                 ol_link_threads=posix
13610         fi
13611 fi
13612
13613
13614                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13615 if test "$ol_link_threads" = no ; then
13616         # try -lpthread -Wl,-woff,85
13617         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13618 echo "configure:13619: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13619 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13620   echo $ac_n "(cached) $ac_c" 1>&6
13621 else
13622   
13623                 # save the flags
13624                 ol_LIBS="$LIBS"
13625                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13626
13627                 if test "$cross_compiling" = yes; then
13628   cat > conftest.$ac_ext <<EOF
13629 #line 13630 "configure"
13630 #include "confdefs.h"
13631 /* pthread test headers */
13632 #include <pthread.h>
13633 #if HAVE_PTHREADS < 7
13634 #include <errno.h>
13635 #endif
13636 #ifndef NULL
13637 #define NULL (void*)0
13638 #endif
13639
13640 static void *task(p)
13641         void *p;
13642 {
13643         return (void *) (p == NULL);
13644 }
13645
13646 int main() {
13647
13648         /* pthread test function */
13649 #ifndef PTHREAD_CREATE_DETACHED
13650 #define PTHREAD_CREATE_DETACHED 1
13651 #endif
13652         pthread_t t;
13653         int status;
13654         int detach = PTHREAD_CREATE_DETACHED;
13655
13656 #if HAVE_PTHREADS > 4
13657         /* Final pthreads */
13658         pthread_attr_t attr;
13659
13660         status = pthread_attr_init(&attr);
13661         if( status ) return status;
13662
13663 #if HAVE_PTHREADS < 7
13664         status = pthread_attr_setdetachstate(&attr, &detach);
13665         if( status < 0 ) status = errno;
13666 #else
13667         status = pthread_attr_setdetachstate(&attr, detach);
13668 #endif
13669         if( status ) return status;
13670         status = pthread_create( &t, &attr, task, NULL );
13671 #if HAVE_PTHREADS < 7
13672         if( status < 0 ) status = errno;
13673 #endif
13674         if( status ) return status;
13675 #else
13676         /* Draft 4 pthreads */
13677         status = pthread_create( &t, pthread_attr_default, task, NULL );
13678         if( status ) return errno;
13679
13680         /* give thread a chance to complete */
13681         /* it should remain joinable and hence detachable */
13682         sleep( 1 );
13683
13684         status = pthread_detach( &t );
13685         if( status ) return errno;
13686 #endif
13687
13688 #ifdef HAVE_LINUX_THREADS
13689         pthread_kill_other_threads_np();
13690 #endif
13691
13692         return 0;
13693
13694 ; return 0; }
13695 EOF
13696 if { (eval echo configure:13697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13697   rm -rf conftest*
13698   ol_cv_pthread_lib_lpthread_woff=yes
13699 else
13700   echo "configure: failed program was:" >&5
13701   cat conftest.$ac_ext >&5
13702   rm -rf conftest*
13703   ol_cv_pthread_lib_lpthread_woff=no
13704 fi
13705 rm -f conftest*
13706 else
13707   cat > conftest.$ac_ext <<EOF
13708 #line 13709 "configure"
13709 #include "confdefs.h"
13710 /* pthread test headers */
13711 #include <pthread.h>
13712 #if HAVE_PTHREADS < 7
13713 #include <errno.h>
13714 #endif
13715 #ifndef NULL
13716 #define NULL (void*)0
13717 #endif
13718
13719 static void *task(p)
13720         void *p;
13721 {
13722         return (void *) (p == NULL);
13723 }
13724
13725
13726 int main(argc, argv)
13727         int argc;
13728         char **argv;
13729 {
13730
13731         /* pthread test function */
13732 #ifndef PTHREAD_CREATE_DETACHED
13733 #define PTHREAD_CREATE_DETACHED 1
13734 #endif
13735         pthread_t t;
13736         int status;
13737         int detach = PTHREAD_CREATE_DETACHED;
13738
13739 #if HAVE_PTHREADS > 4
13740         /* Final pthreads */
13741         pthread_attr_t attr;
13742
13743         status = pthread_attr_init(&attr);
13744         if( status ) return status;
13745
13746 #if HAVE_PTHREADS < 7
13747         status = pthread_attr_setdetachstate(&attr, &detach);
13748         if( status < 0 ) status = errno;
13749 #else
13750         status = pthread_attr_setdetachstate(&attr, detach);
13751 #endif
13752         if( status ) return status;
13753         status = pthread_create( &t, &attr, task, NULL );
13754 #if HAVE_PTHREADS < 7
13755         if( status < 0 ) status = errno;
13756 #endif
13757         if( status ) return status;
13758 #else
13759         /* Draft 4 pthreads */
13760         status = pthread_create( &t, pthread_attr_default, task, NULL );
13761         if( status ) return errno;
13762
13763         /* give thread a chance to complete */
13764         /* it should remain joinable and hence detachable */
13765         sleep( 1 );
13766
13767         status = pthread_detach( &t );
13768         if( status ) return errno;
13769 #endif
13770
13771 #ifdef HAVE_LINUX_THREADS
13772         pthread_kill_other_threads_np();
13773 #endif
13774
13775         return 0;
13776
13777 }
13778
13779 EOF
13780 if { (eval echo configure:13781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13781 then
13782   ol_cv_pthread_lib_lpthread_woff=yes
13783 else
13784   echo "configure: failed program was:" >&5
13785   cat conftest.$ac_ext >&5
13786   rm -fr conftest*
13787   ol_cv_pthread_lib_lpthread_woff=no
13788 fi
13789 rm -fr conftest*
13790 fi
13791
13792
13793                 # restore the LIBS
13794                 LIBS="$ol_LIBS"
13795         
13796 fi
13797
13798 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13799
13800         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13801                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13802                 ol_link_threads=posix
13803         fi
13804 fi
13805
13806
13807                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13808 if test "$ol_link_threads" = no ; then
13809         # try -lpthread
13810         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13811 echo "configure:13812: checking for pthread link with -lpthread" >&5
13812 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13813   echo $ac_n "(cached) $ac_c" 1>&6
13814 else
13815   
13816                 # save the flags
13817                 ol_LIBS="$LIBS"
13818                 LIBS="-lpthread $LIBS"
13819
13820                 if test "$cross_compiling" = yes; then
13821   cat > conftest.$ac_ext <<EOF
13822 #line 13823 "configure"
13823 #include "confdefs.h"
13824 /* pthread test headers */
13825 #include <pthread.h>
13826 #if HAVE_PTHREADS < 7
13827 #include <errno.h>
13828 #endif
13829 #ifndef NULL
13830 #define NULL (void*)0
13831 #endif
13832
13833 static void *task(p)
13834         void *p;
13835 {
13836         return (void *) (p == NULL);
13837 }
13838
13839 int main() {
13840
13841         /* pthread test function */
13842 #ifndef PTHREAD_CREATE_DETACHED
13843 #define PTHREAD_CREATE_DETACHED 1
13844 #endif
13845         pthread_t t;
13846         int status;
13847         int detach = PTHREAD_CREATE_DETACHED;
13848
13849 #if HAVE_PTHREADS > 4
13850         /* Final pthreads */
13851         pthread_attr_t attr;
13852
13853         status = pthread_attr_init(&attr);
13854         if( status ) return status;
13855
13856 #if HAVE_PTHREADS < 7
13857         status = pthread_attr_setdetachstate(&attr, &detach);
13858         if( status < 0 ) status = errno;
13859 #else
13860         status = pthread_attr_setdetachstate(&attr, detach);
13861 #endif
13862         if( status ) return status;
13863         status = pthread_create( &t, &attr, task, NULL );
13864 #if HAVE_PTHREADS < 7
13865         if( status < 0 ) status = errno;
13866 #endif
13867         if( status ) return status;
13868 #else
13869         /* Draft 4 pthreads */
13870         status = pthread_create( &t, pthread_attr_default, task, NULL );
13871         if( status ) return errno;
13872
13873         /* give thread a chance to complete */
13874         /* it should remain joinable and hence detachable */
13875         sleep( 1 );
13876
13877         status = pthread_detach( &t );
13878         if( status ) return errno;
13879 #endif
13880
13881 #ifdef HAVE_LINUX_THREADS
13882         pthread_kill_other_threads_np();
13883 #endif
13884
13885         return 0;
13886
13887 ; return 0; }
13888 EOF
13889 if { (eval echo configure:13890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13890   rm -rf conftest*
13891   ol_cv_pthread_lpthread=yes
13892 else
13893   echo "configure: failed program was:" >&5
13894   cat conftest.$ac_ext >&5
13895   rm -rf conftest*
13896   ol_cv_pthread_lpthread=no
13897 fi
13898 rm -f conftest*
13899 else
13900   cat > conftest.$ac_ext <<EOF
13901 #line 13902 "configure"
13902 #include "confdefs.h"
13903 /* pthread test headers */
13904 #include <pthread.h>
13905 #if HAVE_PTHREADS < 7
13906 #include <errno.h>
13907 #endif
13908 #ifndef NULL
13909 #define NULL (void*)0
13910 #endif
13911
13912 static void *task(p)
13913         void *p;
13914 {
13915         return (void *) (p == NULL);
13916 }
13917
13918
13919 int main(argc, argv)
13920         int argc;
13921         char **argv;
13922 {
13923
13924         /* pthread test function */
13925 #ifndef PTHREAD_CREATE_DETACHED
13926 #define PTHREAD_CREATE_DETACHED 1
13927 #endif
13928         pthread_t t;
13929         int status;
13930         int detach = PTHREAD_CREATE_DETACHED;
13931
13932 #if HAVE_PTHREADS > 4
13933         /* Final pthreads */
13934         pthread_attr_t attr;
13935
13936         status = pthread_attr_init(&attr);
13937         if( status ) return status;
13938
13939 #if HAVE_PTHREADS < 7
13940         status = pthread_attr_setdetachstate(&attr, &detach);
13941         if( status < 0 ) status = errno;
13942 #else
13943         status = pthread_attr_setdetachstate(&attr, detach);
13944 #endif
13945         if( status ) return status;
13946         status = pthread_create( &t, &attr, task, NULL );
13947 #if HAVE_PTHREADS < 7
13948         if( status < 0 ) status = errno;
13949 #endif
13950         if( status ) return status;
13951 #else
13952         /* Draft 4 pthreads */
13953         status = pthread_create( &t, pthread_attr_default, task, NULL );
13954         if( status ) return errno;
13955
13956         /* give thread a chance to complete */
13957         /* it should remain joinable and hence detachable */
13958         sleep( 1 );
13959
13960         status = pthread_detach( &t );
13961         if( status ) return errno;
13962 #endif
13963
13964 #ifdef HAVE_LINUX_THREADS
13965         pthread_kill_other_threads_np();
13966 #endif
13967
13968         return 0;
13969
13970 }
13971
13972 EOF
13973 if { (eval echo configure:13974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13974 then
13975   ol_cv_pthread_lpthread=yes
13976 else
13977   echo "configure: failed program was:" >&5
13978   cat conftest.$ac_ext >&5
13979   rm -fr conftest*
13980   ol_cv_pthread_lpthread=no
13981 fi
13982 rm -fr conftest*
13983 fi
13984
13985
13986                 # restore the LIBS
13987                 LIBS="$ol_LIBS"
13988         
13989 fi
13990
13991 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13992
13993         if test $ol_cv_pthread_lpthread = yes ; then
13994                 ol_link_pthreads="-lpthread"
13995                 ol_link_threads=posix
13996         fi
13997 fi
13998
13999                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14000 if test "$ol_link_threads" = no ; then
14001         # try -lc_r
14002         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14003 echo "configure:14004: checking for pthread link with -lc_r" >&5
14004 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14005   echo $ac_n "(cached) $ac_c" 1>&6
14006 else
14007   
14008                 # save the flags
14009                 ol_LIBS="$LIBS"
14010                 LIBS="-lc_r $LIBS"
14011
14012                 if test "$cross_compiling" = yes; then
14013   cat > conftest.$ac_ext <<EOF
14014 #line 14015 "configure"
14015 #include "confdefs.h"
14016 /* pthread test headers */
14017 #include <pthread.h>
14018 #if HAVE_PTHREADS < 7
14019 #include <errno.h>
14020 #endif
14021 #ifndef NULL
14022 #define NULL (void*)0
14023 #endif
14024
14025 static void *task(p)
14026         void *p;
14027 {
14028         return (void *) (p == NULL);
14029 }
14030
14031 int main() {
14032
14033         /* pthread test function */
14034 #ifndef PTHREAD_CREATE_DETACHED
14035 #define PTHREAD_CREATE_DETACHED 1
14036 #endif
14037         pthread_t t;
14038         int status;
14039         int detach = PTHREAD_CREATE_DETACHED;
14040
14041 #if HAVE_PTHREADS > 4
14042         /* Final pthreads */
14043         pthread_attr_t attr;
14044
14045         status = pthread_attr_init(&attr);
14046         if( status ) return status;
14047
14048 #if HAVE_PTHREADS < 7
14049         status = pthread_attr_setdetachstate(&attr, &detach);
14050         if( status < 0 ) status = errno;
14051 #else
14052         status = pthread_attr_setdetachstate(&attr, detach);
14053 #endif
14054         if( status ) return status;
14055         status = pthread_create( &t, &attr, task, NULL );
14056 #if HAVE_PTHREADS < 7
14057         if( status < 0 ) status = errno;
14058 #endif
14059         if( status ) return status;
14060 #else
14061         /* Draft 4 pthreads */
14062         status = pthread_create( &t, pthread_attr_default, task, NULL );
14063         if( status ) return errno;
14064
14065         /* give thread a chance to complete */
14066         /* it should remain joinable and hence detachable */
14067         sleep( 1 );
14068
14069         status = pthread_detach( &t );
14070         if( status ) return errno;
14071 #endif
14072
14073 #ifdef HAVE_LINUX_THREADS
14074         pthread_kill_other_threads_np();
14075 #endif
14076
14077         return 0;
14078
14079 ; return 0; }
14080 EOF
14081 if { (eval echo configure:14082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14082   rm -rf conftest*
14083   ol_cv_pthread_lc_r=yes
14084 else
14085   echo "configure: failed program was:" >&5
14086   cat conftest.$ac_ext >&5
14087   rm -rf conftest*
14088   ol_cv_pthread_lc_r=no
14089 fi
14090 rm -f conftest*
14091 else
14092   cat > conftest.$ac_ext <<EOF
14093 #line 14094 "configure"
14094 #include "confdefs.h"
14095 /* pthread test headers */
14096 #include <pthread.h>
14097 #if HAVE_PTHREADS < 7
14098 #include <errno.h>
14099 #endif
14100 #ifndef NULL
14101 #define NULL (void*)0
14102 #endif
14103
14104 static void *task(p)
14105         void *p;
14106 {
14107         return (void *) (p == NULL);
14108 }
14109
14110
14111 int main(argc, argv)
14112         int argc;
14113         char **argv;
14114 {
14115
14116         /* pthread test function */
14117 #ifndef PTHREAD_CREATE_DETACHED
14118 #define PTHREAD_CREATE_DETACHED 1
14119 #endif
14120         pthread_t t;
14121         int status;
14122         int detach = PTHREAD_CREATE_DETACHED;
14123
14124 #if HAVE_PTHREADS > 4
14125         /* Final pthreads */
14126         pthread_attr_t attr;
14127
14128         status = pthread_attr_init(&attr);
14129         if( status ) return status;
14130
14131 #if HAVE_PTHREADS < 7
14132         status = pthread_attr_setdetachstate(&attr, &detach);
14133         if( status < 0 ) status = errno;
14134 #else
14135         status = pthread_attr_setdetachstate(&attr, detach);
14136 #endif
14137         if( status ) return status;
14138         status = pthread_create( &t, &attr, task, NULL );
14139 #if HAVE_PTHREADS < 7
14140         if( status < 0 ) status = errno;
14141 #endif
14142         if( status ) return status;
14143 #else
14144         /* Draft 4 pthreads */
14145         status = pthread_create( &t, pthread_attr_default, task, NULL );
14146         if( status ) return errno;
14147
14148         /* give thread a chance to complete */
14149         /* it should remain joinable and hence detachable */
14150         sleep( 1 );
14151
14152         status = pthread_detach( &t );
14153         if( status ) return errno;
14154 #endif
14155
14156 #ifdef HAVE_LINUX_THREADS
14157         pthread_kill_other_threads_np();
14158 #endif
14159
14160         return 0;
14161
14162 }
14163
14164 EOF
14165 if { (eval echo configure:14166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14166 then
14167   ol_cv_pthread_lc_r=yes
14168 else
14169   echo "configure: failed program was:" >&5
14170   cat conftest.$ac_ext >&5
14171   rm -fr conftest*
14172   ol_cv_pthread_lc_r=no
14173 fi
14174 rm -fr conftest*
14175 fi
14176
14177
14178                 # restore the LIBS
14179                 LIBS="$ol_LIBS"
14180         
14181 fi
14182
14183 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14184
14185         if test $ol_cv_pthread_lc_r = yes ; then
14186                 ol_link_pthreads="-lc_r"
14187                 ol_link_threads=posix
14188         fi
14189 fi
14190
14191
14192                 # Pthread try link: -threads (ol_cv_pthread_threads)
14193 if test "$ol_link_threads" = no ; then
14194         # try -threads
14195         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14196 echo "configure:14197: checking for pthread link with -threads" >&5
14197 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14198   echo $ac_n "(cached) $ac_c" 1>&6
14199 else
14200   
14201                 # save the flags
14202                 ol_LIBS="$LIBS"
14203                 LIBS="-threads $LIBS"
14204
14205                 if test "$cross_compiling" = yes; then
14206   cat > conftest.$ac_ext <<EOF
14207 #line 14208 "configure"
14208 #include "confdefs.h"
14209 /* pthread test headers */
14210 #include <pthread.h>
14211 #if HAVE_PTHREADS < 7
14212 #include <errno.h>
14213 #endif
14214 #ifndef NULL
14215 #define NULL (void*)0
14216 #endif
14217
14218 static void *task(p)
14219         void *p;
14220 {
14221         return (void *) (p == NULL);
14222 }
14223
14224 int main() {
14225
14226         /* pthread test function */
14227 #ifndef PTHREAD_CREATE_DETACHED
14228 #define PTHREAD_CREATE_DETACHED 1
14229 #endif
14230         pthread_t t;
14231         int status;
14232         int detach = PTHREAD_CREATE_DETACHED;
14233
14234 #if HAVE_PTHREADS > 4
14235         /* Final pthreads */
14236         pthread_attr_t attr;
14237
14238         status = pthread_attr_init(&attr);
14239         if( status ) return status;
14240
14241 #if HAVE_PTHREADS < 7
14242         status = pthread_attr_setdetachstate(&attr, &detach);
14243         if( status < 0 ) status = errno;
14244 #else
14245         status = pthread_attr_setdetachstate(&attr, detach);
14246 #endif
14247         if( status ) return status;
14248         status = pthread_create( &t, &attr, task, NULL );
14249 #if HAVE_PTHREADS < 7
14250         if( status < 0 ) status = errno;
14251 #endif
14252         if( status ) return status;
14253 #else
14254         /* Draft 4 pthreads */
14255         status = pthread_create( &t, pthread_attr_default, task, NULL );
14256         if( status ) return errno;
14257
14258         /* give thread a chance to complete */
14259         /* it should remain joinable and hence detachable */
14260         sleep( 1 );
14261
14262         status = pthread_detach( &t );
14263         if( status ) return errno;
14264 #endif
14265
14266 #ifdef HAVE_LINUX_THREADS
14267         pthread_kill_other_threads_np();
14268 #endif
14269
14270         return 0;
14271
14272 ; return 0; }
14273 EOF
14274 if { (eval echo configure:14275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14275   rm -rf conftest*
14276   ol_cv_pthread_threads=yes
14277 else
14278   echo "configure: failed program was:" >&5
14279   cat conftest.$ac_ext >&5
14280   rm -rf conftest*
14281   ol_cv_pthread_threads=no
14282 fi
14283 rm -f conftest*
14284 else
14285   cat > conftest.$ac_ext <<EOF
14286 #line 14287 "configure"
14287 #include "confdefs.h"
14288 /* pthread test headers */
14289 #include <pthread.h>
14290 #if HAVE_PTHREADS < 7
14291 #include <errno.h>
14292 #endif
14293 #ifndef NULL
14294 #define NULL (void*)0
14295 #endif
14296
14297 static void *task(p)
14298         void *p;
14299 {
14300         return (void *) (p == NULL);
14301 }
14302
14303
14304 int main(argc, argv)
14305         int argc;
14306         char **argv;
14307 {
14308
14309         /* pthread test function */
14310 #ifndef PTHREAD_CREATE_DETACHED
14311 #define PTHREAD_CREATE_DETACHED 1
14312 #endif
14313         pthread_t t;
14314         int status;
14315         int detach = PTHREAD_CREATE_DETACHED;
14316
14317 #if HAVE_PTHREADS > 4
14318         /* Final pthreads */
14319         pthread_attr_t attr;
14320
14321         status = pthread_attr_init(&attr);
14322         if( status ) return status;
14323
14324 #if HAVE_PTHREADS < 7
14325         status = pthread_attr_setdetachstate(&attr, &detach);
14326         if( status < 0 ) status = errno;
14327 #else
14328         status = pthread_attr_setdetachstate(&attr, detach);
14329 #endif
14330         if( status ) return status;
14331         status = pthread_create( &t, &attr, task, NULL );
14332 #if HAVE_PTHREADS < 7
14333         if( status < 0 ) status = errno;
14334 #endif
14335         if( status ) return status;
14336 #else
14337         /* Draft 4 pthreads */
14338         status = pthread_create( &t, pthread_attr_default, task, NULL );
14339         if( status ) return errno;
14340
14341         /* give thread a chance to complete */
14342         /* it should remain joinable and hence detachable */
14343         sleep( 1 );
14344
14345         status = pthread_detach( &t );
14346         if( status ) return errno;
14347 #endif
14348
14349 #ifdef HAVE_LINUX_THREADS
14350         pthread_kill_other_threads_np();
14351 #endif
14352
14353         return 0;
14354
14355 }
14356
14357 EOF
14358 if { (eval echo configure:14359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14359 then
14360   ol_cv_pthread_threads=yes
14361 else
14362   echo "configure: failed program was:" >&5
14363   cat conftest.$ac_ext >&5
14364   rm -fr conftest*
14365   ol_cv_pthread_threads=no
14366 fi
14367 rm -fr conftest*
14368 fi
14369
14370
14371                 # restore the LIBS
14372                 LIBS="$ol_LIBS"
14373         
14374 fi
14375
14376 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14377
14378         if test $ol_cv_pthread_threads = yes ; then
14379                 ol_link_pthreads="-threads"
14380                 ol_link_threads=posix
14381         fi
14382 fi
14383
14384
14385                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14386 if test "$ol_link_threads" = no ; then
14387         # try -lpthreads -lmach -lexc -lc_r
14388         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14389 echo "configure:14390: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14390 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14391   echo $ac_n "(cached) $ac_c" 1>&6
14392 else
14393   
14394                 # save the flags
14395                 ol_LIBS="$LIBS"
14396                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14397
14398                 if test "$cross_compiling" = yes; then
14399   cat > conftest.$ac_ext <<EOF
14400 #line 14401 "configure"
14401 #include "confdefs.h"
14402 /* pthread test headers */
14403 #include <pthread.h>
14404 #if HAVE_PTHREADS < 7
14405 #include <errno.h>
14406 #endif
14407 #ifndef NULL
14408 #define NULL (void*)0
14409 #endif
14410
14411 static void *task(p)
14412         void *p;
14413 {
14414         return (void *) (p == NULL);
14415 }
14416
14417 int main() {
14418
14419         /* pthread test function */
14420 #ifndef PTHREAD_CREATE_DETACHED
14421 #define PTHREAD_CREATE_DETACHED 1
14422 #endif
14423         pthread_t t;
14424         int status;
14425         int detach = PTHREAD_CREATE_DETACHED;
14426
14427 #if HAVE_PTHREADS > 4
14428         /* Final pthreads */
14429         pthread_attr_t attr;
14430
14431         status = pthread_attr_init(&attr);
14432         if( status ) return status;
14433
14434 #if HAVE_PTHREADS < 7
14435         status = pthread_attr_setdetachstate(&attr, &detach);
14436         if( status < 0 ) status = errno;
14437 #else
14438         status = pthread_attr_setdetachstate(&attr, detach);
14439 #endif
14440         if( status ) return status;
14441         status = pthread_create( &t, &attr, task, NULL );
14442 #if HAVE_PTHREADS < 7
14443         if( status < 0 ) status = errno;
14444 #endif
14445         if( status ) return status;
14446 #else
14447         /* Draft 4 pthreads */
14448         status = pthread_create( &t, pthread_attr_default, task, NULL );
14449         if( status ) return errno;
14450
14451         /* give thread a chance to complete */
14452         /* it should remain joinable and hence detachable */
14453         sleep( 1 );
14454
14455         status = pthread_detach( &t );
14456         if( status ) return errno;
14457 #endif
14458
14459 #ifdef HAVE_LINUX_THREADS
14460         pthread_kill_other_threads_np();
14461 #endif
14462
14463         return 0;
14464
14465 ; return 0; }
14466 EOF
14467 if { (eval echo configure:14468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14468   rm -rf conftest*
14469   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14470 else
14471   echo "configure: failed program was:" >&5
14472   cat conftest.$ac_ext >&5
14473   rm -rf conftest*
14474   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14475 fi
14476 rm -f conftest*
14477 else
14478   cat > conftest.$ac_ext <<EOF
14479 #line 14480 "configure"
14480 #include "confdefs.h"
14481 /* pthread test headers */
14482 #include <pthread.h>
14483 #if HAVE_PTHREADS < 7
14484 #include <errno.h>
14485 #endif
14486 #ifndef NULL
14487 #define NULL (void*)0
14488 #endif
14489
14490 static void *task(p)
14491         void *p;
14492 {
14493         return (void *) (p == NULL);
14494 }
14495
14496
14497 int main(argc, argv)
14498         int argc;
14499         char **argv;
14500 {
14501
14502         /* pthread test function */
14503 #ifndef PTHREAD_CREATE_DETACHED
14504 #define PTHREAD_CREATE_DETACHED 1
14505 #endif
14506         pthread_t t;
14507         int status;
14508         int detach = PTHREAD_CREATE_DETACHED;
14509
14510 #if HAVE_PTHREADS > 4
14511         /* Final pthreads */
14512         pthread_attr_t attr;
14513
14514         status = pthread_attr_init(&attr);
14515         if( status ) return status;
14516
14517 #if HAVE_PTHREADS < 7
14518         status = pthread_attr_setdetachstate(&attr, &detach);
14519         if( status < 0 ) status = errno;
14520 #else
14521         status = pthread_attr_setdetachstate(&attr, detach);
14522 #endif
14523         if( status ) return status;
14524         status = pthread_create( &t, &attr, task, NULL );
14525 #if HAVE_PTHREADS < 7
14526         if( status < 0 ) status = errno;
14527 #endif
14528         if( status ) return status;
14529 #else
14530         /* Draft 4 pthreads */
14531         status = pthread_create( &t, pthread_attr_default, task, NULL );
14532         if( status ) return errno;
14533
14534         /* give thread a chance to complete */
14535         /* it should remain joinable and hence detachable */
14536         sleep( 1 );
14537
14538         status = pthread_detach( &t );
14539         if( status ) return errno;
14540 #endif
14541
14542 #ifdef HAVE_LINUX_THREADS
14543         pthread_kill_other_threads_np();
14544 #endif
14545
14546         return 0;
14547
14548 }
14549
14550 EOF
14551 if { (eval echo configure:14552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14552 then
14553   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14554 else
14555   echo "configure: failed program was:" >&5
14556   cat conftest.$ac_ext >&5
14557   rm -fr conftest*
14558   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14559 fi
14560 rm -fr conftest*
14561 fi
14562
14563
14564                 # restore the LIBS
14565                 LIBS="$ol_LIBS"
14566         
14567 fi
14568
14569 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14570
14571         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14572                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14573                 ol_link_threads=posix
14574         fi
14575 fi
14576
14577                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14578 if test "$ol_link_threads" = no ; then
14579         # try -lpthreads -lmach -lexc
14580         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14581 echo "configure:14582: checking for pthread link with -lpthreads -lmach -lexc" >&5
14582 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14583   echo $ac_n "(cached) $ac_c" 1>&6
14584 else
14585   
14586                 # save the flags
14587                 ol_LIBS="$LIBS"
14588                 LIBS="-lpthreads -lmach -lexc $LIBS"
14589
14590                 if test "$cross_compiling" = yes; then
14591   cat > conftest.$ac_ext <<EOF
14592 #line 14593 "configure"
14593 #include "confdefs.h"
14594 /* pthread test headers */
14595 #include <pthread.h>
14596 #if HAVE_PTHREADS < 7
14597 #include <errno.h>
14598 #endif
14599 #ifndef NULL
14600 #define NULL (void*)0
14601 #endif
14602
14603 static void *task(p)
14604         void *p;
14605 {
14606         return (void *) (p == NULL);
14607 }
14608
14609 int main() {
14610
14611         /* pthread test function */
14612 #ifndef PTHREAD_CREATE_DETACHED
14613 #define PTHREAD_CREATE_DETACHED 1
14614 #endif
14615         pthread_t t;
14616         int status;
14617         int detach = PTHREAD_CREATE_DETACHED;
14618
14619 #if HAVE_PTHREADS > 4
14620         /* Final pthreads */
14621         pthread_attr_t attr;
14622
14623         status = pthread_attr_init(&attr);
14624         if( status ) return status;
14625
14626 #if HAVE_PTHREADS < 7
14627         status = pthread_attr_setdetachstate(&attr, &detach);
14628         if( status < 0 ) status = errno;
14629 #else
14630         status = pthread_attr_setdetachstate(&attr, detach);
14631 #endif
14632         if( status ) return status;
14633         status = pthread_create( &t, &attr, task, NULL );
14634 #if HAVE_PTHREADS < 7
14635         if( status < 0 ) status = errno;
14636 #endif
14637         if( status ) return status;
14638 #else
14639         /* Draft 4 pthreads */
14640         status = pthread_create( &t, pthread_attr_default, task, NULL );
14641         if( status ) return errno;
14642
14643         /* give thread a chance to complete */
14644         /* it should remain joinable and hence detachable */
14645         sleep( 1 );
14646
14647         status = pthread_detach( &t );
14648         if( status ) return errno;
14649 #endif
14650
14651 #ifdef HAVE_LINUX_THREADS
14652         pthread_kill_other_threads_np();
14653 #endif
14654
14655         return 0;
14656
14657 ; return 0; }
14658 EOF
14659 if { (eval echo configure:14660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14660   rm -rf conftest*
14661   ol_cv_pthread_lpthreads_lmach_lexc=yes
14662 else
14663   echo "configure: failed program was:" >&5
14664   cat conftest.$ac_ext >&5
14665   rm -rf conftest*
14666   ol_cv_pthread_lpthreads_lmach_lexc=no
14667 fi
14668 rm -f conftest*
14669 else
14670   cat > conftest.$ac_ext <<EOF
14671 #line 14672 "configure"
14672 #include "confdefs.h"
14673 /* pthread test headers */
14674 #include <pthread.h>
14675 #if HAVE_PTHREADS < 7
14676 #include <errno.h>
14677 #endif
14678 #ifndef NULL
14679 #define NULL (void*)0
14680 #endif
14681
14682 static void *task(p)
14683         void *p;
14684 {
14685         return (void *) (p == NULL);
14686 }
14687
14688
14689 int main(argc, argv)
14690         int argc;
14691         char **argv;
14692 {
14693
14694         /* pthread test function */
14695 #ifndef PTHREAD_CREATE_DETACHED
14696 #define PTHREAD_CREATE_DETACHED 1
14697 #endif
14698         pthread_t t;
14699         int status;
14700         int detach = PTHREAD_CREATE_DETACHED;
14701
14702 #if HAVE_PTHREADS > 4
14703         /* Final pthreads */
14704         pthread_attr_t attr;
14705
14706         status = pthread_attr_init(&attr);
14707         if( status ) return status;
14708
14709 #if HAVE_PTHREADS < 7
14710         status = pthread_attr_setdetachstate(&attr, &detach);
14711         if( status < 0 ) status = errno;
14712 #else
14713         status = pthread_attr_setdetachstate(&attr, detach);
14714 #endif
14715         if( status ) return status;
14716         status = pthread_create( &t, &attr, task, NULL );
14717 #if HAVE_PTHREADS < 7
14718         if( status < 0 ) status = errno;
14719 #endif
14720         if( status ) return status;
14721 #else
14722         /* Draft 4 pthreads */
14723         status = pthread_create( &t, pthread_attr_default, task, NULL );
14724         if( status ) return errno;
14725
14726         /* give thread a chance to complete */
14727         /* it should remain joinable and hence detachable */
14728         sleep( 1 );
14729
14730         status = pthread_detach( &t );
14731         if( status ) return errno;
14732 #endif
14733
14734 #ifdef HAVE_LINUX_THREADS
14735         pthread_kill_other_threads_np();
14736 #endif
14737
14738         return 0;
14739
14740 }
14741
14742 EOF
14743 if { (eval echo configure:14744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14744 then
14745   ol_cv_pthread_lpthreads_lmach_lexc=yes
14746 else
14747   echo "configure: failed program was:" >&5
14748   cat conftest.$ac_ext >&5
14749   rm -fr conftest*
14750   ol_cv_pthread_lpthreads_lmach_lexc=no
14751 fi
14752 rm -fr conftest*
14753 fi
14754
14755
14756                 # restore the LIBS
14757                 LIBS="$ol_LIBS"
14758         
14759 fi
14760
14761 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14762
14763         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14764                 ol_link_pthreads="-lpthreads -lmach -lexc"
14765                 ol_link_threads=posix
14766         fi
14767 fi
14768
14769                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14770 if test "$ol_link_threads" = no ; then
14771         # try -lpthreads -lexc
14772         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14773 echo "configure:14774: checking for pthread link with -lpthreads -lexc" >&5
14774 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14775   echo $ac_n "(cached) $ac_c" 1>&6
14776 else
14777   
14778                 # save the flags
14779                 ol_LIBS="$LIBS"
14780                 LIBS="-lpthreads -lexc $LIBS"
14781
14782                 if test "$cross_compiling" = yes; then
14783   cat > conftest.$ac_ext <<EOF
14784 #line 14785 "configure"
14785 #include "confdefs.h"
14786 /* pthread test headers */
14787 #include <pthread.h>
14788 #if HAVE_PTHREADS < 7
14789 #include <errno.h>
14790 #endif
14791 #ifndef NULL
14792 #define NULL (void*)0
14793 #endif
14794
14795 static void *task(p)
14796         void *p;
14797 {
14798         return (void *) (p == NULL);
14799 }
14800
14801 int main() {
14802
14803         /* pthread test function */
14804 #ifndef PTHREAD_CREATE_DETACHED
14805 #define PTHREAD_CREATE_DETACHED 1
14806 #endif
14807         pthread_t t;
14808         int status;
14809         int detach = PTHREAD_CREATE_DETACHED;
14810
14811 #if HAVE_PTHREADS > 4
14812         /* Final pthreads */
14813         pthread_attr_t attr;
14814
14815         status = pthread_attr_init(&attr);
14816         if( status ) return status;
14817
14818 #if HAVE_PTHREADS < 7
14819         status = pthread_attr_setdetachstate(&attr, &detach);
14820         if( status < 0 ) status = errno;
14821 #else
14822         status = pthread_attr_setdetachstate(&attr, detach);
14823 #endif
14824         if( status ) return status;
14825         status = pthread_create( &t, &attr, task, NULL );
14826 #if HAVE_PTHREADS < 7
14827         if( status < 0 ) status = errno;
14828 #endif
14829         if( status ) return status;
14830 #else
14831         /* Draft 4 pthreads */
14832         status = pthread_create( &t, pthread_attr_default, task, NULL );
14833         if( status ) return errno;
14834
14835         /* give thread a chance to complete */
14836         /* it should remain joinable and hence detachable */
14837         sleep( 1 );
14838
14839         status = pthread_detach( &t );
14840         if( status ) return errno;
14841 #endif
14842
14843 #ifdef HAVE_LINUX_THREADS
14844         pthread_kill_other_threads_np();
14845 #endif
14846
14847         return 0;
14848
14849 ; return 0; }
14850 EOF
14851 if { (eval echo configure:14852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14852   rm -rf conftest*
14853   ol_cv_pthread_lpthreads_lexc=yes
14854 else
14855   echo "configure: failed program was:" >&5
14856   cat conftest.$ac_ext >&5
14857   rm -rf conftest*
14858   ol_cv_pthread_lpthreads_lexc=no
14859 fi
14860 rm -f conftest*
14861 else
14862   cat > conftest.$ac_ext <<EOF
14863 #line 14864 "configure"
14864 #include "confdefs.h"
14865 /* pthread test headers */
14866 #include <pthread.h>
14867 #if HAVE_PTHREADS < 7
14868 #include <errno.h>
14869 #endif
14870 #ifndef NULL
14871 #define NULL (void*)0
14872 #endif
14873
14874 static void *task(p)
14875         void *p;
14876 {
14877         return (void *) (p == NULL);
14878 }
14879
14880
14881 int main(argc, argv)
14882         int argc;
14883         char **argv;
14884 {
14885
14886         /* pthread test function */
14887 #ifndef PTHREAD_CREATE_DETACHED
14888 #define PTHREAD_CREATE_DETACHED 1
14889 #endif
14890         pthread_t t;
14891         int status;
14892         int detach = PTHREAD_CREATE_DETACHED;
14893
14894 #if HAVE_PTHREADS > 4
14895         /* Final pthreads */
14896         pthread_attr_t attr;
14897
14898         status = pthread_attr_init(&attr);
14899         if( status ) return status;
14900
14901 #if HAVE_PTHREADS < 7
14902         status = pthread_attr_setdetachstate(&attr, &detach);
14903         if( status < 0 ) status = errno;
14904 #else
14905         status = pthread_attr_setdetachstate(&attr, detach);
14906 #endif
14907         if( status ) return status;
14908         status = pthread_create( &t, &attr, task, NULL );
14909 #if HAVE_PTHREADS < 7
14910         if( status < 0 ) status = errno;
14911 #endif
14912         if( status ) return status;
14913 #else
14914         /* Draft 4 pthreads */
14915         status = pthread_create( &t, pthread_attr_default, task, NULL );
14916         if( status ) return errno;
14917
14918         /* give thread a chance to complete */
14919         /* it should remain joinable and hence detachable */
14920         sleep( 1 );
14921
14922         status = pthread_detach( &t );
14923         if( status ) return errno;
14924 #endif
14925
14926 #ifdef HAVE_LINUX_THREADS
14927         pthread_kill_other_threads_np();
14928 #endif
14929
14930         return 0;
14931
14932 }
14933
14934 EOF
14935 if { (eval echo configure:14936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14936 then
14937   ol_cv_pthread_lpthreads_lexc=yes
14938 else
14939   echo "configure: failed program was:" >&5
14940   cat conftest.$ac_ext >&5
14941   rm -fr conftest*
14942   ol_cv_pthread_lpthreads_lexc=no
14943 fi
14944 rm -fr conftest*
14945 fi
14946
14947
14948                 # restore the LIBS
14949                 LIBS="$ol_LIBS"
14950         
14951 fi
14952
14953 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14954
14955         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14956                 ol_link_pthreads="-lpthreads -lexc"
14957                 ol_link_threads=posix
14958         fi
14959 fi
14960
14961
14962                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14963 if test "$ol_link_threads" = no ; then
14964         # try -lpthreads
14965         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14966 echo "configure:14967: checking for pthread link with -lpthreads" >&5
14967 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14968   echo $ac_n "(cached) $ac_c" 1>&6
14969 else
14970   
14971                 # save the flags
14972                 ol_LIBS="$LIBS"
14973                 LIBS="-lpthreads $LIBS"
14974
14975                 if test "$cross_compiling" = yes; then
14976   cat > conftest.$ac_ext <<EOF
14977 #line 14978 "configure"
14978 #include "confdefs.h"
14979 /* pthread test headers */
14980 #include <pthread.h>
14981 #if HAVE_PTHREADS < 7
14982 #include <errno.h>
14983 #endif
14984 #ifndef NULL
14985 #define NULL (void*)0
14986 #endif
14987
14988 static void *task(p)
14989         void *p;
14990 {
14991         return (void *) (p == NULL);
14992 }
14993
14994 int main() {
14995
14996         /* pthread test function */
14997 #ifndef PTHREAD_CREATE_DETACHED
14998 #define PTHREAD_CREATE_DETACHED 1
14999 #endif
15000         pthread_t t;
15001         int status;
15002         int detach = PTHREAD_CREATE_DETACHED;
15003
15004 #if HAVE_PTHREADS > 4
15005         /* Final pthreads */
15006         pthread_attr_t attr;
15007
15008         status = pthread_attr_init(&attr);
15009         if( status ) return status;
15010
15011 #if HAVE_PTHREADS < 7
15012         status = pthread_attr_setdetachstate(&attr, &detach);
15013         if( status < 0 ) status = errno;
15014 #else
15015         status = pthread_attr_setdetachstate(&attr, detach);
15016 #endif
15017         if( status ) return status;
15018         status = pthread_create( &t, &attr, task, NULL );
15019 #if HAVE_PTHREADS < 7
15020         if( status < 0 ) status = errno;
15021 #endif
15022         if( status ) return status;
15023 #else
15024         /* Draft 4 pthreads */
15025         status = pthread_create( &t, pthread_attr_default, task, NULL );
15026         if( status ) return errno;
15027
15028         /* give thread a chance to complete */
15029         /* it should remain joinable and hence detachable */
15030         sleep( 1 );
15031
15032         status = pthread_detach( &t );
15033         if( status ) return errno;
15034 #endif
15035
15036 #ifdef HAVE_LINUX_THREADS
15037         pthread_kill_other_threads_np();
15038 #endif
15039
15040         return 0;
15041
15042 ; return 0; }
15043 EOF
15044 if { (eval echo configure:15045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15045   rm -rf conftest*
15046   ol_cv_pthread_lib_lpthreads=yes
15047 else
15048   echo "configure: failed program was:" >&5
15049   cat conftest.$ac_ext >&5
15050   rm -rf conftest*
15051   ol_cv_pthread_lib_lpthreads=no
15052 fi
15053 rm -f conftest*
15054 else
15055   cat > conftest.$ac_ext <<EOF
15056 #line 15057 "configure"
15057 #include "confdefs.h"
15058 /* pthread test headers */
15059 #include <pthread.h>
15060 #if HAVE_PTHREADS < 7
15061 #include <errno.h>
15062 #endif
15063 #ifndef NULL
15064 #define NULL (void*)0
15065 #endif
15066
15067 static void *task(p)
15068         void *p;
15069 {
15070         return (void *) (p == NULL);
15071 }
15072
15073
15074 int main(argc, argv)
15075         int argc;
15076         char **argv;
15077 {
15078
15079         /* pthread test function */
15080 #ifndef PTHREAD_CREATE_DETACHED
15081 #define PTHREAD_CREATE_DETACHED 1
15082 #endif
15083         pthread_t t;
15084         int status;
15085         int detach = PTHREAD_CREATE_DETACHED;
15086
15087 #if HAVE_PTHREADS > 4
15088         /* Final pthreads */
15089         pthread_attr_t attr;
15090
15091         status = pthread_attr_init(&attr);
15092         if( status ) return status;
15093
15094 #if HAVE_PTHREADS < 7
15095         status = pthread_attr_setdetachstate(&attr, &detach);
15096         if( status < 0 ) status = errno;
15097 #else
15098         status = pthread_attr_setdetachstate(&attr, detach);
15099 #endif
15100         if( status ) return status;
15101         status = pthread_create( &t, &attr, task, NULL );
15102 #if HAVE_PTHREADS < 7
15103         if( status < 0 ) status = errno;
15104 #endif
15105         if( status ) return status;
15106 #else
15107         /* Draft 4 pthreads */
15108         status = pthread_create( &t, pthread_attr_default, task, NULL );
15109         if( status ) return errno;
15110
15111         /* give thread a chance to complete */
15112         /* it should remain joinable and hence detachable */
15113         sleep( 1 );
15114
15115         status = pthread_detach( &t );
15116         if( status ) return errno;
15117 #endif
15118
15119 #ifdef HAVE_LINUX_THREADS
15120         pthread_kill_other_threads_np();
15121 #endif
15122
15123         return 0;
15124
15125 }
15126
15127 EOF
15128 if { (eval echo configure:15129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15129 then
15130   ol_cv_pthread_lib_lpthreads=yes
15131 else
15132   echo "configure: failed program was:" >&5
15133   cat conftest.$ac_ext >&5
15134   rm -fr conftest*
15135   ol_cv_pthread_lib_lpthreads=no
15136 fi
15137 rm -fr conftest*
15138 fi
15139
15140
15141                 # restore the LIBS
15142                 LIBS="$ol_LIBS"
15143         
15144 fi
15145
15146 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15147
15148         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15149                 ol_link_pthreads="-lpthreads"
15150                 ol_link_threads=posix
15151         fi
15152 fi
15153
15154
15155                 if test $ol_link_threads != no ; then
15156                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15157
15158                                                 save_CPPFLAGS="$CPPFLAGS"
15159                         save_LIBS="$LIBS"
15160                         LIBS="$LTHREAD_LIBS $LIBS"
15161
15162                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15163 do
15164 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15165 echo "configure:15166: checking for $ac_func" >&5
15166 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15167   echo $ac_n "(cached) $ac_c" 1>&6
15168 else
15169   cat > conftest.$ac_ext <<EOF
15170 #line 15171 "configure"
15171 #include "confdefs.h"
15172 /* System header to define __stub macros and hopefully few prototypes,
15173     which can conflict with char $ac_func(); below.  */
15174 #include <assert.h>
15175 /* Override any gcc2 internal prototype to avoid an error.  */
15176 /* We use char because int might match the return type of a gcc2
15177     builtin and then its argument prototype would still apply.  */
15178 char $ac_func();
15179 char (*f)();
15180
15181 int main() {
15182
15183 /* The GNU C library defines this for functions which it implements
15184     to always fail with ENOSYS.  Some functions are actually named
15185     something starting with __ and the normal name is an alias.  */
15186 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15187 choke me
15188 #else
15189 f = $ac_func;
15190 #endif
15191
15192 ; return 0; }
15193 EOF
15194 if { (eval echo configure:15195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15195   rm -rf conftest*
15196   eval "ac_cv_func_$ac_func=yes"
15197 else
15198   echo "configure: failed program was:" >&5
15199   cat conftest.$ac_ext >&5
15200   rm -rf conftest*
15201   eval "ac_cv_func_$ac_func=no"
15202 fi
15203 rm -f conftest*
15204 fi
15205
15206 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15207   echo "$ac_t""yes" 1>&6
15208     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15209   cat >> confdefs.h <<EOF
15210 #define $ac_tr_func 1
15211 EOF
15212  
15213 else
15214   echo "$ac_t""no" 1>&6
15215 fi
15216 done
15217
15218
15219                         if test $ac_cv_func_sched_yield = no -a \
15220                                 $ac_cv_func_pthread_yield = no -a \
15221                                 $ac_cv_func_thr_yield = no ; then
15222                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15223 echo "configure:15224: checking for sched_yield in -lrt" >&5
15224 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15225 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15226   echo $ac_n "(cached) $ac_c" 1>&6
15227 else
15228   ac_save_LIBS="$LIBS"
15229 LIBS="-lrt  $LIBS"
15230 cat > conftest.$ac_ext <<EOF
15231 #line 15232 "configure"
15232 #include "confdefs.h"
15233 /* Override any gcc2 internal prototype to avoid an error.  */
15234 /* We use char because int might match the return type of a gcc2
15235     builtin and then its argument prototype would still apply.  */
15236 char sched_yield();
15237
15238 int main() {
15239 sched_yield()
15240 ; return 0; }
15241 EOF
15242 if { (eval echo configure:15243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15243   rm -rf conftest*
15244   eval "ac_cv_lib_$ac_lib_var=yes"
15245 else
15246   echo "configure: failed program was:" >&5
15247   cat conftest.$ac_ext >&5
15248   rm -rf conftest*
15249   eval "ac_cv_lib_$ac_lib_var=no"
15250 fi
15251 rm -f conftest*
15252 LIBS="$ac_save_LIBS"
15253
15254 fi
15255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15256   echo "$ac_t""yes" 1>&6
15257   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15258                                         cat >> confdefs.h <<\EOF
15259 #define HAVE_SCHED_YIELD 1
15260 EOF
15261
15262                                         ac_cv_func_sched_yield=yes
15263 else
15264   echo "$ac_t""no" 1>&6
15265 ac_cv_func_sched_yield=no
15266 fi
15267
15268                         fi
15269                         if test $ac_cv_func_sched_yield = no -a \
15270                                 $ac_cv_func_pthread_yield = no -a \
15271                                 "$ac_cv_func_thr_yield" = no ; then
15272                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15273                         fi
15274
15275                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15276 do
15277 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15278 echo "configure:15279: checking for $ac_func" >&5
15279 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15280   echo $ac_n "(cached) $ac_c" 1>&6
15281 else
15282   cat > conftest.$ac_ext <<EOF
15283 #line 15284 "configure"
15284 #include "confdefs.h"
15285 /* System header to define __stub macros and hopefully few prototypes,
15286     which can conflict with char $ac_func(); below.  */
15287 #include <assert.h>
15288 /* Override any gcc2 internal prototype to avoid an error.  */
15289 /* We use char because int might match the return type of a gcc2
15290     builtin and then its argument prototype would still apply.  */
15291 char $ac_func();
15292 char (*f)();
15293
15294 int main() {
15295
15296 /* The GNU C library defines this for functions which it implements
15297     to always fail with ENOSYS.  Some functions are actually named
15298     something starting with __ and the normal name is an alias.  */
15299 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15300 choke me
15301 #else
15302 f = $ac_func;
15303 #endif
15304
15305 ; return 0; }
15306 EOF
15307 if { (eval echo configure:15308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15308   rm -rf conftest*
15309   eval "ac_cv_func_$ac_func=yes"
15310 else
15311   echo "configure: failed program was:" >&5
15312   cat conftest.$ac_ext >&5
15313   rm -rf conftest*
15314   eval "ac_cv_func_$ac_func=no"
15315 fi
15316 rm -f conftest*
15317 fi
15318
15319 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15320   echo "$ac_t""yes" 1>&6
15321     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15322   cat >> confdefs.h <<EOF
15323 #define $ac_tr_func 1
15324 EOF
15325  
15326 else
15327   echo "$ac_t""no" 1>&6
15328 fi
15329 done
15330
15331
15332                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15333 echo "configure:15334: checking for pthread_detach with <pthread.h>" >&5
15334 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15335   echo $ac_n "(cached) $ac_c" 1>&6
15336 else
15337   
15338                                                                 cat > conftest.$ac_ext <<EOF
15339 #line 15340 "configure"
15340 #include "confdefs.h"
15341
15342 #include <pthread.h>
15343 #ifndef NULL
15344 #define NULL (void*)0
15345 #endif
15346
15347 int main() {
15348 pthread_detach(NULL);
15349 ; return 0; }
15350 EOF
15351 if { (eval echo configure:15352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15352   rm -rf conftest*
15353   ol_cv_func_pthread_detach=yes
15354 else
15355   echo "configure: failed program was:" >&5
15356   cat conftest.$ac_ext >&5
15357   rm -rf conftest*
15358   ol_cv_func_pthread_detach=no
15359 fi
15360 rm -f conftest*
15361                         
15362 fi
15363
15364 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15365
15366                         if test $ol_cv_func_pthread_detach = no ; then
15367                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15368                         fi
15369
15370                         cat >> confdefs.h <<\EOF
15371 #define HAVE_PTHREAD_DETACH 1
15372 EOF
15373
15374
15375                                                 for ac_func in \
15376                                 pthread_setconcurrency \
15377                                 pthread_getconcurrency \
15378                                 thr_setconcurrency \
15379                                 thr_getconcurrency \
15380                         
15381 do
15382 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15383 echo "configure:15384: checking for $ac_func" >&5
15384 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15385   echo $ac_n "(cached) $ac_c" 1>&6
15386 else
15387   cat > conftest.$ac_ext <<EOF
15388 #line 15389 "configure"
15389 #include "confdefs.h"
15390 /* System header to define __stub macros and hopefully few prototypes,
15391     which can conflict with char $ac_func(); below.  */
15392 #include <assert.h>
15393 /* Override any gcc2 internal prototype to avoid an error.  */
15394 /* We use char because int might match the return type of a gcc2
15395     builtin and then its argument prototype would still apply.  */
15396 char $ac_func();
15397 char (*f)();
15398
15399 int main() {
15400
15401 /* The GNU C library defines this for functions which it implements
15402     to always fail with ENOSYS.  Some functions are actually named
15403     something starting with __ and the normal name is an alias.  */
15404 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15405 choke me
15406 #else
15407 f = $ac_func;
15408 #endif
15409
15410 ; return 0; }
15411 EOF
15412 if { (eval echo configure:15413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15413   rm -rf conftest*
15414   eval "ac_cv_func_$ac_func=yes"
15415 else
15416   echo "configure: failed program was:" >&5
15417   cat conftest.$ac_ext >&5
15418   rm -rf conftest*
15419   eval "ac_cv_func_$ac_func=no"
15420 fi
15421 rm -f conftest*
15422 fi
15423
15424 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15425   echo "$ac_t""yes" 1>&6
15426     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15427   cat >> confdefs.h <<EOF
15428 #define $ac_tr_func 1
15429 EOF
15430  
15431 else
15432   echo "$ac_t""no" 1>&6
15433 fi
15434 done
15435
15436
15437                         
15438         for ac_func in pthread_kill_other_threads_np
15439 do
15440 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15441 echo "configure:15442: checking for $ac_func" >&5
15442 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15443   echo $ac_n "(cached) $ac_c" 1>&6
15444 else
15445   cat > conftest.$ac_ext <<EOF
15446 #line 15447 "configure"
15447 #include "confdefs.h"
15448 /* System header to define __stub macros and hopefully few prototypes,
15449     which can conflict with char $ac_func(); below.  */
15450 #include <assert.h>
15451 /* Override any gcc2 internal prototype to avoid an error.  */
15452 /* We use char because int might match the return type of a gcc2
15453     builtin and then its argument prototype would still apply.  */
15454 char $ac_func();
15455 char (*f)();
15456
15457 int main() {
15458
15459 /* The GNU C library defines this for functions which it implements
15460     to always fail with ENOSYS.  Some functions are actually named
15461     something starting with __ and the normal name is an alias.  */
15462 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15463 choke me
15464 #else
15465 f = $ac_func;
15466 #endif
15467
15468 ; return 0; }
15469 EOF
15470 if { (eval echo configure:15471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15471   rm -rf conftest*
15472   eval "ac_cv_func_$ac_func=yes"
15473 else
15474   echo "configure: failed program was:" >&5
15475   cat conftest.$ac_ext >&5
15476   rm -rf conftest*
15477   eval "ac_cv_func_$ac_func=no"
15478 fi
15479 rm -f conftest*
15480 fi
15481
15482 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15483   echo "$ac_t""yes" 1>&6
15484     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15485   cat >> confdefs.h <<EOF
15486 #define $ac_tr_func 1
15487 EOF
15488  
15489 else
15490   echo "$ac_t""no" 1>&6
15491 fi
15492 done
15493
15494         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15495 echo "configure:15496: checking for LinuxThreads implementation" >&5
15496 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15497   echo $ac_n "(cached) $ac_c" 1>&6
15498 else
15499   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15500 fi
15501
15502 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15503
15504                         
15505         
15506         
15507         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15508 echo "configure:15509: checking for LinuxThreads consistency" >&5
15509 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15510   echo $ac_n "(cached) $ac_c" 1>&6
15511 else
15512   
15513                 if test $ol_cv_header_linux_threads = yes -a \
15514                         $ol_cv_sys_linux_threads = yes; then
15515                         ol_cv_linux_threads=yes
15516                 elif test $ol_cv_header_linux_threads = no -a \
15517                         $ol_cv_sys_linux_threads = no; then
15518                         ol_cv_linux_threads=no
15519                 else
15520                         ol_cv_linux_threads=error
15521                 fi
15522         
15523 fi
15524
15525 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15526
15527
15528                         if test $ol_cv_linux_threads = error; then
15529                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15530                         fi
15531
15532                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15533 echo "configure:15534: checking if pthread_create() works" >&5
15534 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15535   echo $ac_n "(cached) $ac_c" 1>&6
15536 else
15537   
15538                         if test "$cross_compiling" = yes; then
15539                                 ol_cv_pthread_create_works=yes
15540 else
15541   cat > conftest.$ac_ext <<EOF
15542 #line 15543 "configure"
15543 #include "confdefs.h"
15544 /* pthread test headers */
15545 #include <pthread.h>
15546 #if HAVE_PTHREADS < 7
15547 #include <errno.h>
15548 #endif
15549 #ifndef NULL
15550 #define NULL (void*)0
15551 #endif
15552
15553 static void *task(p)
15554         void *p;
15555 {
15556         return (void *) (p == NULL);
15557 }
15558
15559
15560 int main(argc, argv)
15561         int argc;
15562         char **argv;
15563 {
15564
15565         /* pthread test function */
15566 #ifndef PTHREAD_CREATE_DETACHED
15567 #define PTHREAD_CREATE_DETACHED 1
15568 #endif
15569         pthread_t t;
15570         int status;
15571         int detach = PTHREAD_CREATE_DETACHED;
15572
15573 #if HAVE_PTHREADS > 4
15574         /* Final pthreads */
15575         pthread_attr_t attr;
15576
15577         status = pthread_attr_init(&attr);
15578         if( status ) return status;
15579
15580 #if HAVE_PTHREADS < 7
15581         status = pthread_attr_setdetachstate(&attr, &detach);
15582         if( status < 0 ) status = errno;
15583 #else
15584         status = pthread_attr_setdetachstate(&attr, detach);
15585 #endif
15586         if( status ) return status;
15587         status = pthread_create( &t, &attr, task, NULL );
15588 #if HAVE_PTHREADS < 7
15589         if( status < 0 ) status = errno;
15590 #endif
15591         if( status ) return status;
15592 #else
15593         /* Draft 4 pthreads */
15594         status = pthread_create( &t, pthread_attr_default, task, NULL );
15595         if( status ) return errno;
15596
15597         /* give thread a chance to complete */
15598         /* it should remain joinable and hence detachable */
15599         sleep( 1 );
15600
15601         status = pthread_detach( &t );
15602         if( status ) return errno;
15603 #endif
15604
15605 #ifdef HAVE_LINUX_THREADS
15606         pthread_kill_other_threads_np();
15607 #endif
15608
15609         return 0;
15610
15611 }
15612
15613 EOF
15614 if { (eval echo configure:15615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15615 then
15616   ol_cv_pthread_create_works=yes
15617 else
15618   echo "configure: failed program was:" >&5
15619   cat conftest.$ac_ext >&5
15620   rm -fr conftest*
15621   ol_cv_pthread_create_works=no
15622 fi
15623 rm -fr conftest*
15624 fi
15625
15626 fi
15627
15628 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15629
15630                         if test $ol_cv_pthread_create_works = no ; then
15631                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15632                         fi
15633
15634                                                 if test $ol_with_yielding_select = auto ; then
15635                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15636 echo "configure:15637: checking if select yields when using pthreads" >&5
15637 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15638   echo $ac_n "(cached) $ac_c" 1>&6
15639 else
15640   
15641                                 if test "$cross_compiling" = yes; then
15642   ol_cv_pthread_select_yields=cross
15643 else
15644   cat > conftest.$ac_ext <<EOF
15645 #line 15646 "configure"
15646 #include "confdefs.h"
15647
15648 #include <sys/types.h>
15649 #include <sys/time.h>
15650 #include <unistd.h>
15651 #include <pthread.h>
15652 #ifndef NULL
15653 #define NULL (void*) 0
15654 #endif
15655
15656 static int fildes[2];
15657
15658 static void *task(p)
15659         void *p;
15660 {
15661         int i;
15662         struct timeval tv;
15663
15664         fd_set rfds;
15665
15666         tv.tv_sec=10;
15667         tv.tv_usec=0;
15668
15669         FD_ZERO(&rfds);
15670         FD_SET(fildes[0], &rfds);
15671
15672         /* we're not interested in any fds */
15673         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15674
15675         if(i < 0) {
15676                 perror("select");
15677                 exit(10);
15678         }
15679
15680         exit(0); /* if we exit here, the select blocked the whole process */
15681 }
15682
15683 int main(argc, argv)
15684         int argc;
15685         char **argv;
15686 {
15687         pthread_t t;
15688
15689         /* create a pipe to select */
15690         if(pipe(&fildes[0])) {
15691                 perror("select");
15692                 exit(1);
15693         }
15694
15695 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15696         (void) pthread_setconcurrency(2);
15697 #else
15698 #ifdef HAVE_THR_SETCONCURRENCY
15699         /* Set Solaris LWP concurrency to 2 */
15700         thr_setconcurrency(2);
15701 #endif
15702 #endif
15703
15704 #if HAVE_PTHREADS < 6
15705         pthread_create(&t, pthread_attr_default, task, NULL);
15706 #else
15707         pthread_create(&t, NULL, task, NULL);
15708 #endif
15709
15710         /* make sure task runs first */
15711 #if HAVE_THR_YIELD
15712         thr_yield();
15713 #elif defined( HAVE_SCHED_YIELD )
15714         sched_yield();
15715 #elif defined( HAVE_PTHREAD_YIELD )
15716         pthread_yield();
15717 #endif
15718
15719         exit(2);
15720 }
15721 EOF
15722 if { (eval echo configure:15723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15723 then
15724   ol_cv_pthread_select_yields=no
15725 else
15726   echo "configure: failed program was:" >&5
15727   cat conftest.$ac_ext >&5
15728   rm -fr conftest*
15729   ol_cv_pthread_select_yields=yes
15730 fi
15731 rm -fr conftest*
15732 fi
15733
15734 fi
15735
15736 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15737
15738                                 if test $ol_cv_pthread_select_yields = cross ; then
15739                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15740                                 fi
15741
15742                                 if test $ol_cv_pthread_select_yields = yes ; then
15743                                         ol_with_yielding_select=yes
15744                                 fi
15745                         fi
15746
15747                                                 CPPFLAGS="$save_CPPFLAGS"
15748                         LIBS="$save_LIBS"
15749                 else
15750                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15751                 fi
15752         fi
15753
15754         if test $ol_with_threads = posix ; then
15755                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15756         fi
15757 fi
15758
15759 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15760         -o $ol_with_threads = mach ; then
15761
15762                 for ac_hdr in mach/cthreads.h cthreads.h
15763 do
15764 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15765 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15766 echo "configure:15767: checking for $ac_hdr" >&5
15767 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15768   echo $ac_n "(cached) $ac_c" 1>&6
15769 else
15770   cat > conftest.$ac_ext <<EOF
15771 #line 15772 "configure"
15772 #include "confdefs.h"
15773 #include <$ac_hdr>
15774 EOF
15775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15776 { (eval echo configure:15777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15778 if test -z "$ac_err"; then
15779   rm -rf conftest*
15780   eval "ac_cv_header_$ac_safe=yes"
15781 else
15782   echo "$ac_err" >&5
15783   echo "configure: failed program was:" >&5
15784   cat conftest.$ac_ext >&5
15785   rm -rf conftest*
15786   eval "ac_cv_header_$ac_safe=no"
15787 fi
15788 rm -f conftest*
15789 fi
15790 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15791   echo "$ac_t""yes" 1>&6
15792     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15793   cat >> confdefs.h <<EOF
15794 #define $ac_tr_hdr 1
15795 EOF
15796  
15797 else
15798   echo "$ac_t""no" 1>&6
15799 fi
15800 done
15801
15802         if test $ac_cv_header_mach_cthreads_h = yes ; then
15803                 ol_with_threads=found
15804
15805                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15806 echo "configure:15807: checking for cthread_fork" >&5
15807 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15808   echo $ac_n "(cached) $ac_c" 1>&6
15809 else
15810   cat > conftest.$ac_ext <<EOF
15811 #line 15812 "configure"
15812 #include "confdefs.h"
15813 /* System header to define __stub macros and hopefully few prototypes,
15814     which can conflict with char cthread_fork(); below.  */
15815 #include <assert.h>
15816 /* Override any gcc2 internal prototype to avoid an error.  */
15817 /* We use char because int might match the return type of a gcc2
15818     builtin and then its argument prototype would still apply.  */
15819 char cthread_fork();
15820 char (*f)();
15821
15822 int main() {
15823
15824 /* The GNU C library defines this for functions which it implements
15825     to always fail with ENOSYS.  Some functions are actually named
15826     something starting with __ and the normal name is an alias.  */
15827 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15828 choke me
15829 #else
15830 f = cthread_fork;
15831 #endif
15832
15833 ; return 0; }
15834 EOF
15835 if { (eval echo configure:15836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15836   rm -rf conftest*
15837   eval "ac_cv_func_cthread_fork=yes"
15838 else
15839   echo "configure: failed program was:" >&5
15840   cat conftest.$ac_ext >&5
15841   rm -rf conftest*
15842   eval "ac_cv_func_cthread_fork=no"
15843 fi
15844 rm -f conftest*
15845 fi
15846
15847 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15848   echo "$ac_t""yes" 1>&6
15849   ol_link_threads=yes
15850 else
15851   echo "$ac_t""no" 1>&6
15852 fi
15853
15854
15855                 if test $ol_link_threads = no ; then
15856                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15857 echo "configure:15858: checking for cthread_fork with -all_load" >&5
15858 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15859   echo $ac_n "(cached) $ac_c" 1>&6
15860 else
15861   
15862                                                                 save_LIBS="$LIBS"
15863                                 LIBS="-all_load $LIBS"
15864                                 cat > conftest.$ac_ext <<EOF
15865 #line 15866 "configure"
15866 #include "confdefs.h"
15867 #include <mach/cthreads.h>
15868 int main() {
15869
15870                                         cthread_fork((void *)0, (void *)0);
15871                                         
15872 ; return 0; }
15873 EOF
15874 if { (eval echo configure:15875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15875   rm -rf conftest*
15876   ol_cv_cthread_all_load=yes
15877 else
15878   echo "configure: failed program was:" >&5
15879   cat conftest.$ac_ext >&5
15880   rm -rf conftest*
15881   ol_cv_cthread_all_load=no
15882 fi
15883 rm -f conftest*
15884                                                                 LIBS="$save_LIBS"
15885                         
15886 fi
15887
15888 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15889
15890                         if test $ol_cv_cthread_all_load = yes ; then
15891                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15892                                 ol_link_threads=mach
15893                                 ol_with_threads=found
15894                         fi
15895                 fi
15896
15897         elif test $ac_cv_header_cthreads_h = yes ; then
15898                                 
15899                 ol_with_threads=found
15900  
15901                                 save_LIBS="$LIBS"
15902                 LIBS="$LIBS -lthreads"
15903                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15904 echo "configure:15905: checking for cthread_fork" >&5
15905 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15906   echo $ac_n "(cached) $ac_c" 1>&6
15907 else
15908   cat > conftest.$ac_ext <<EOF
15909 #line 15910 "configure"
15910 #include "confdefs.h"
15911 /* System header to define __stub macros and hopefully few prototypes,
15912     which can conflict with char cthread_fork(); below.  */
15913 #include <assert.h>
15914 /* Override any gcc2 internal prototype to avoid an error.  */
15915 /* We use char because int might match the return type of a gcc2
15916     builtin and then its argument prototype would still apply.  */
15917 char cthread_fork();
15918 char (*f)();
15919
15920 int main() {
15921
15922 /* The GNU C library defines this for functions which it implements
15923     to always fail with ENOSYS.  Some functions are actually named
15924     something starting with __ and the normal name is an alias.  */
15925 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15926 choke me
15927 #else
15928 f = cthread_fork;
15929 #endif
15930
15931 ; return 0; }
15932 EOF
15933 if { (eval echo configure:15934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15934   rm -rf conftest*
15935   eval "ac_cv_func_cthread_fork=yes"
15936 else
15937   echo "configure: failed program was:" >&5
15938   cat conftest.$ac_ext >&5
15939   rm -rf conftest*
15940   eval "ac_cv_func_cthread_fork=no"
15941 fi
15942 rm -f conftest*
15943 fi
15944
15945 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15946   echo "$ac_t""yes" 1>&6
15947   ol_link_threads=yes
15948 else
15949   echo "$ac_t""no" 1>&6
15950 fi
15951
15952                 LIBS="$save_LIBS"
15953
15954                 if test $ol_link_threads = yes ; then
15955                         LTHREAD_LIBS="-lthreads"
15956                         ol_link_threads=mach
15957                         ol_with_threads=found
15958                 else
15959                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15960                 fi
15961
15962         elif test $ol_with_threads = mach ; then
15963                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15964         fi
15965
15966         if test $ol_link_threads = mach ; then
15967                 cat >> confdefs.h <<\EOF
15968 #define HAVE_MACH_CTHREADS 1
15969 EOF
15970
15971         elif test $ol_with_threads = found ; then
15972                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15973         fi
15974 fi
15975
15976 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15977         -o $ol_with_threads = pth ; then
15978
15979         for ac_hdr in pth.h
15980 do
15981 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15982 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15983 echo "configure:15984: checking for $ac_hdr" >&5
15984 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15985   echo $ac_n "(cached) $ac_c" 1>&6
15986 else
15987   cat > conftest.$ac_ext <<EOF
15988 #line 15989 "configure"
15989 #include "confdefs.h"
15990 #include <$ac_hdr>
15991 EOF
15992 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15993 { (eval echo configure:15994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15994 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15995 if test -z "$ac_err"; then
15996   rm -rf conftest*
15997   eval "ac_cv_header_$ac_safe=yes"
15998 else
15999   echo "$ac_err" >&5
16000   echo "configure: failed program was:" >&5
16001   cat conftest.$ac_ext >&5
16002   rm -rf conftest*
16003   eval "ac_cv_header_$ac_safe=no"
16004 fi
16005 rm -f conftest*
16006 fi
16007 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16008   echo "$ac_t""yes" 1>&6
16009     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16010   cat >> confdefs.h <<EOF
16011 #define $ac_tr_hdr 1
16012 EOF
16013  
16014 else
16015   echo "$ac_t""no" 1>&6
16016 fi
16017 done
16018
16019
16020         if test $ac_cv_header_pth_h = yes ; then
16021                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16022 echo "configure:16023: checking for pth_version in -lpth" >&5
16023 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16024 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16025   echo $ac_n "(cached) $ac_c" 1>&6
16026 else
16027   ac_save_LIBS="$LIBS"
16028 LIBS="-lpth  $LIBS"
16029 cat > conftest.$ac_ext <<EOF
16030 #line 16031 "configure"
16031 #include "confdefs.h"
16032 /* Override any gcc2 internal prototype to avoid an error.  */
16033 /* We use char because int might match the return type of a gcc2
16034     builtin and then its argument prototype would still apply.  */
16035 char pth_version();
16036
16037 int main() {
16038 pth_version()
16039 ; return 0; }
16040 EOF
16041 if { (eval echo configure:16042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16042   rm -rf conftest*
16043   eval "ac_cv_lib_$ac_lib_var=yes"
16044 else
16045   echo "configure: failed program was:" >&5
16046   cat conftest.$ac_ext >&5
16047   rm -rf conftest*
16048   eval "ac_cv_lib_$ac_lib_var=no"
16049 fi
16050 rm -f conftest*
16051 LIBS="$ac_save_LIBS"
16052
16053 fi
16054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16055   echo "$ac_t""yes" 1>&6
16056   have_pth=yes
16057 else
16058   echo "$ac_t""no" 1>&6
16059 have_pth=no
16060 fi
16061
16062
16063                 if test $have_pth = yes ; then
16064                         cat >> confdefs.h <<\EOF
16065 #define HAVE_GNU_PTH 1
16066 EOF
16067
16068                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16069                         ol_link_threads=pth
16070                         ol_with_threads=found
16071
16072                         if test $ol_with_yielding_select = auto ; then
16073                                 ol_with_yielding_select=yes
16074                         fi
16075                 fi
16076         fi
16077 fi
16078
16079 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16080         -o $ol_with_threads = lwp ; then
16081
16082                 for ac_hdr in thread.h synch.h
16083 do
16084 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16085 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16086 echo "configure:16087: checking for $ac_hdr" >&5
16087 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16088   echo $ac_n "(cached) $ac_c" 1>&6
16089 else
16090   cat > conftest.$ac_ext <<EOF
16091 #line 16092 "configure"
16092 #include "confdefs.h"
16093 #include <$ac_hdr>
16094 EOF
16095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16096 { (eval echo configure:16097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16098 if test -z "$ac_err"; then
16099   rm -rf conftest*
16100   eval "ac_cv_header_$ac_safe=yes"
16101 else
16102   echo "$ac_err" >&5
16103   echo "configure: failed program was:" >&5
16104   cat conftest.$ac_ext >&5
16105   rm -rf conftest*
16106   eval "ac_cv_header_$ac_safe=no"
16107 fi
16108 rm -f conftest*
16109 fi
16110 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16111   echo "$ac_t""yes" 1>&6
16112     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16113   cat >> confdefs.h <<EOF
16114 #define $ac_tr_hdr 1
16115 EOF
16116  
16117 else
16118   echo "$ac_t""no" 1>&6
16119 fi
16120 done
16121
16122         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16123                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16124 echo "configure:16125: checking for thr_create in -lthread" >&5
16125 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16126 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16127   echo $ac_n "(cached) $ac_c" 1>&6
16128 else
16129   ac_save_LIBS="$LIBS"
16130 LIBS="-lthread  $LIBS"
16131 cat > conftest.$ac_ext <<EOF
16132 #line 16133 "configure"
16133 #include "confdefs.h"
16134 /* Override any gcc2 internal prototype to avoid an error.  */
16135 /* We use char because int might match the return type of a gcc2
16136     builtin and then its argument prototype would still apply.  */
16137 char thr_create();
16138
16139 int main() {
16140 thr_create()
16141 ; return 0; }
16142 EOF
16143 if { (eval echo configure:16144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16144   rm -rf conftest*
16145   eval "ac_cv_lib_$ac_lib_var=yes"
16146 else
16147   echo "configure: failed program was:" >&5
16148   cat conftest.$ac_ext >&5
16149   rm -rf conftest*
16150   eval "ac_cv_lib_$ac_lib_var=no"
16151 fi
16152 rm -f conftest*
16153 LIBS="$ac_save_LIBS"
16154
16155 fi
16156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16157   echo "$ac_t""yes" 1>&6
16158   have_thr=yes
16159 else
16160   echo "$ac_t""no" 1>&6
16161 have_thr=no
16162 fi
16163
16164
16165                 if test $have_thr = yes ; then
16166                         cat >> confdefs.h <<\EOF
16167 #define HAVE_THR 1
16168 EOF
16169
16170                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16171                         ol_link_threads=thr
16172
16173                         if test $ol_with_yielding_select = auto ; then
16174                                 ol_with_yielding_select=yes
16175                         fi
16176
16177                                                 for ac_func in \
16178                                 thr_setconcurrency \
16179                                 thr_getconcurrency \
16180                         
16181 do
16182 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16183 echo "configure:16184: checking for $ac_func" >&5
16184 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16185   echo $ac_n "(cached) $ac_c" 1>&6
16186 else
16187   cat > conftest.$ac_ext <<EOF
16188 #line 16189 "configure"
16189 #include "confdefs.h"
16190 /* System header to define __stub macros and hopefully few prototypes,
16191     which can conflict with char $ac_func(); below.  */
16192 #include <assert.h>
16193 /* Override any gcc2 internal prototype to avoid an error.  */
16194 /* We use char because int might match the return type of a gcc2
16195     builtin and then its argument prototype would still apply.  */
16196 char $ac_func();
16197 char (*f)();
16198
16199 int main() {
16200
16201 /* The GNU C library defines this for functions which it implements
16202     to always fail with ENOSYS.  Some functions are actually named
16203     something starting with __ and the normal name is an alias.  */
16204 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16205 choke me
16206 #else
16207 f = $ac_func;
16208 #endif
16209
16210 ; return 0; }
16211 EOF
16212 if { (eval echo configure:16213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16213   rm -rf conftest*
16214   eval "ac_cv_func_$ac_func=yes"
16215 else
16216   echo "configure: failed program was:" >&5
16217   cat conftest.$ac_ext >&5
16218   rm -rf conftest*
16219   eval "ac_cv_func_$ac_func=no"
16220 fi
16221 rm -f conftest*
16222 fi
16223
16224 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16225   echo "$ac_t""yes" 1>&6
16226     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16227   cat >> confdefs.h <<EOF
16228 #define $ac_tr_func 1
16229 EOF
16230  
16231 else
16232   echo "$ac_t""no" 1>&6
16233 fi
16234 done
16235
16236                 fi
16237         fi
16238
16239                 for ac_hdr in lwp/lwp.h
16240 do
16241 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16242 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16243 echo "configure:16244: checking for $ac_hdr" >&5
16244 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16245   echo $ac_n "(cached) $ac_c" 1>&6
16246 else
16247   cat > conftest.$ac_ext <<EOF
16248 #line 16249 "configure"
16249 #include "confdefs.h"
16250 #include <$ac_hdr>
16251 EOF
16252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16253 { (eval echo configure:16254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16255 if test -z "$ac_err"; then
16256   rm -rf conftest*
16257   eval "ac_cv_header_$ac_safe=yes"
16258 else
16259   echo "$ac_err" >&5
16260   echo "configure: failed program was:" >&5
16261   cat conftest.$ac_ext >&5
16262   rm -rf conftest*
16263   eval "ac_cv_header_$ac_safe=no"
16264 fi
16265 rm -f conftest*
16266 fi
16267 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16268   echo "$ac_t""yes" 1>&6
16269     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16270   cat >> confdefs.h <<EOF
16271 #define $ac_tr_hdr 1
16272 EOF
16273  
16274 else
16275   echo "$ac_t""no" 1>&6
16276 fi
16277 done
16278
16279         if test $ac_cv_header_lwp_lwp_h = yes ; then
16280                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16281 echo "configure:16282: checking for lwp_create in -llwp" >&5
16282 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16283 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16284   echo $ac_n "(cached) $ac_c" 1>&6
16285 else
16286   ac_save_LIBS="$LIBS"
16287 LIBS="-llwp  $LIBS"
16288 cat > conftest.$ac_ext <<EOF
16289 #line 16290 "configure"
16290 #include "confdefs.h"
16291 /* Override any gcc2 internal prototype to avoid an error.  */
16292 /* We use char because int might match the return type of a gcc2
16293     builtin and then its argument prototype would still apply.  */
16294 char lwp_create();
16295
16296 int main() {
16297 lwp_create()
16298 ; return 0; }
16299 EOF
16300 if { (eval echo configure:16301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16301   rm -rf conftest*
16302   eval "ac_cv_lib_$ac_lib_var=yes"
16303 else
16304   echo "configure: failed program was:" >&5
16305   cat conftest.$ac_ext >&5
16306   rm -rf conftest*
16307   eval "ac_cv_lib_$ac_lib_var=no"
16308 fi
16309 rm -f conftest*
16310 LIBS="$ac_save_LIBS"
16311
16312 fi
16313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16314   echo "$ac_t""yes" 1>&6
16315   have_lwp=yes
16316 else
16317   echo "$ac_t""no" 1>&6
16318 have_lwp=no
16319 fi
16320
16321
16322                 if test $have_lwp = yes ; then
16323                         cat >> confdefs.h <<\EOF
16324 #define HAVE_LWP 1
16325 EOF
16326
16327                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16328                         ol_link_threads=lwp
16329
16330                         if test $ol_with_yielding_select = auto ; then
16331                                 ol_with_yielding_select=no
16332                         fi
16333                 fi
16334         fi
16335 fi
16336
16337 if test $ol_with_yielding_select = yes ; then
16338         cat >> confdefs.h <<\EOF
16339 #define HAVE_YIELDING_SELECT 1
16340 EOF
16341
16342 fi
16343
16344 if test $ol_with_threads = manual ; then
16345                 ol_link_threads=yes
16346
16347         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16348
16349         for ac_hdr in pthread.h sched.h
16350 do
16351 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16352 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16353 echo "configure:16354: checking for $ac_hdr" >&5
16354 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16355   echo $ac_n "(cached) $ac_c" 1>&6
16356 else
16357   cat > conftest.$ac_ext <<EOF
16358 #line 16359 "configure"
16359 #include "confdefs.h"
16360 #include <$ac_hdr>
16361 EOF
16362 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16363 { (eval echo configure:16364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16364 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16365 if test -z "$ac_err"; then
16366   rm -rf conftest*
16367   eval "ac_cv_header_$ac_safe=yes"
16368 else
16369   echo "$ac_err" >&5
16370   echo "configure: failed program was:" >&5
16371   cat conftest.$ac_ext >&5
16372   rm -rf conftest*
16373   eval "ac_cv_header_$ac_safe=no"
16374 fi
16375 rm -f conftest*
16376 fi
16377 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16378   echo "$ac_t""yes" 1>&6
16379     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16380   cat >> confdefs.h <<EOF
16381 #define $ac_tr_hdr 1
16382 EOF
16383  
16384 else
16385   echo "$ac_t""no" 1>&6
16386 fi
16387 done
16388
16389         for ac_func in sched_yield pthread_yield
16390 do
16391 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16392 echo "configure:16393: checking for $ac_func" >&5
16393 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16394   echo $ac_n "(cached) $ac_c" 1>&6
16395 else
16396   cat > conftest.$ac_ext <<EOF
16397 #line 16398 "configure"
16398 #include "confdefs.h"
16399 /* System header to define __stub macros and hopefully few prototypes,
16400     which can conflict with char $ac_func(); below.  */
16401 #include <assert.h>
16402 /* Override any gcc2 internal prototype to avoid an error.  */
16403 /* We use char because int might match the return type of a gcc2
16404     builtin and then its argument prototype would still apply.  */
16405 char $ac_func();
16406 char (*f)();
16407
16408 int main() {
16409
16410 /* The GNU C library defines this for functions which it implements
16411     to always fail with ENOSYS.  Some functions are actually named
16412     something starting with __ and the normal name is an alias.  */
16413 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16414 choke me
16415 #else
16416 f = $ac_func;
16417 #endif
16418
16419 ; return 0; }
16420 EOF
16421 if { (eval echo configure:16422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16422   rm -rf conftest*
16423   eval "ac_cv_func_$ac_func=yes"
16424 else
16425   echo "configure: failed program was:" >&5
16426   cat conftest.$ac_ext >&5
16427   rm -rf conftest*
16428   eval "ac_cv_func_$ac_func=no"
16429 fi
16430 rm -f conftest*
16431 fi
16432
16433 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16434   echo "$ac_t""yes" 1>&6
16435     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16436   cat >> confdefs.h <<EOF
16437 #define $ac_tr_func 1
16438 EOF
16439  
16440 else
16441   echo "$ac_t""no" 1>&6
16442 fi
16443 done
16444
16445         
16446         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16447 echo "configure:16448: checking for LinuxThreads pthread.h" >&5
16448 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16449   echo $ac_n "(cached) $ac_c" 1>&6
16450 else
16451   cat > conftest.$ac_ext <<EOF
16452 #line 16453 "configure"
16453 #include "confdefs.h"
16454 #include <pthread.h>
16455 EOF
16456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16457   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16458   rm -rf conftest*
16459   ol_cv_header_linux_threads=yes
16460 else
16461   rm -rf conftest*
16462   ol_cv_header_linux_threads=no
16463 fi
16464 rm -f conftest*
16465
16466                 
16467 fi
16468
16469 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16470         if test $ol_cv_header_linux_threads = yes; then
16471                 cat >> confdefs.h <<\EOF
16472 #define HAVE_LINUX_THREADS 1
16473 EOF
16474
16475         fi
16476
16477
16478         for ac_hdr in mach/cthreads.h
16479 do
16480 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16481 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16482 echo "configure:16483: checking for $ac_hdr" >&5
16483 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16484   echo $ac_n "(cached) $ac_c" 1>&6
16485 else
16486   cat > conftest.$ac_ext <<EOF
16487 #line 16488 "configure"
16488 #include "confdefs.h"
16489 #include <$ac_hdr>
16490 EOF
16491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16492 { (eval echo configure:16493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16494 if test -z "$ac_err"; then
16495   rm -rf conftest*
16496   eval "ac_cv_header_$ac_safe=yes"
16497 else
16498   echo "$ac_err" >&5
16499   echo "configure: failed program was:" >&5
16500   cat conftest.$ac_ext >&5
16501   rm -rf conftest*
16502   eval "ac_cv_header_$ac_safe=no"
16503 fi
16504 rm -f conftest*
16505 fi
16506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16507   echo "$ac_t""yes" 1>&6
16508     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16509   cat >> confdefs.h <<EOF
16510 #define $ac_tr_hdr 1
16511 EOF
16512  
16513 else
16514   echo "$ac_t""no" 1>&6
16515 fi
16516 done
16517
16518         for ac_hdr in lwp/lwp.h
16519 do
16520 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16521 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16522 echo "configure:16523: checking for $ac_hdr" >&5
16523 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16524   echo $ac_n "(cached) $ac_c" 1>&6
16525 else
16526   cat > conftest.$ac_ext <<EOF
16527 #line 16528 "configure"
16528 #include "confdefs.h"
16529 #include <$ac_hdr>
16530 EOF
16531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16532 { (eval echo configure:16533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16534 if test -z "$ac_err"; then
16535   rm -rf conftest*
16536   eval "ac_cv_header_$ac_safe=yes"
16537 else
16538   echo "$ac_err" >&5
16539   echo "configure: failed program was:" >&5
16540   cat conftest.$ac_ext >&5
16541   rm -rf conftest*
16542   eval "ac_cv_header_$ac_safe=no"
16543 fi
16544 rm -f conftest*
16545 fi
16546 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16547   echo "$ac_t""yes" 1>&6
16548     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16549   cat >> confdefs.h <<EOF
16550 #define $ac_tr_hdr 1
16551 EOF
16552  
16553 else
16554   echo "$ac_t""no" 1>&6
16555 fi
16556 done
16557
16558         for ac_hdr in thread.h synch.h
16559 do
16560 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16561 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16562 echo "configure:16563: checking for $ac_hdr" >&5
16563 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16564   echo $ac_n "(cached) $ac_c" 1>&6
16565 else
16566   cat > conftest.$ac_ext <<EOF
16567 #line 16568 "configure"
16568 #include "confdefs.h"
16569 #include <$ac_hdr>
16570 EOF
16571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16572 { (eval echo configure:16573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16574 if test -z "$ac_err"; then
16575   rm -rf conftest*
16576   eval "ac_cv_header_$ac_safe=yes"
16577 else
16578   echo "$ac_err" >&5
16579   echo "configure: failed program was:" >&5
16580   cat conftest.$ac_ext >&5
16581   rm -rf conftest*
16582   eval "ac_cv_header_$ac_safe=no"
16583 fi
16584 rm -f conftest*
16585 fi
16586 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16587   echo "$ac_t""yes" 1>&6
16588     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16589   cat >> confdefs.h <<EOF
16590 #define $ac_tr_hdr 1
16591 EOF
16592  
16593 else
16594   echo "$ac_t""no" 1>&6
16595 fi
16596 done
16597
16598 fi
16599
16600 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16601                         cat >> confdefs.h <<\EOF
16602 #define REENTRANT 1
16603 EOF
16604
16605         cat >> confdefs.h <<\EOF
16606 #define _REENTRANT 1
16607 EOF
16608
16609         cat >> confdefs.h <<\EOF
16610 #define THREAD_SAFE 1
16611 EOF
16612
16613         cat >> confdefs.h <<\EOF
16614 #define _THREAD_SAFE 1
16615 EOF
16616
16617         cat >> confdefs.h <<\EOF
16618 #define THREADSAFE 1
16619 EOF
16620
16621         cat >> confdefs.h <<\EOF
16622 #define _THREADSAFE 1
16623 EOF
16624
16625         cat >> confdefs.h <<\EOF
16626 #define _SGI_MP_SOURCE 1
16627 EOF
16628
16629
16630                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16631 echo "configure:16632: checking for thread specific errno" >&5
16632 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16633   echo $ac_n "(cached) $ac_c" 1>&6
16634 else
16635   
16636                 cat > conftest.$ac_ext <<EOF
16637 #line 16638 "configure"
16638 #include "confdefs.h"
16639 #include <errno.h>
16640 int main() {
16641 errno = 0;
16642 ; return 0; }
16643 EOF
16644 if { (eval echo configure:16645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16645   rm -rf conftest*
16646   ol_cv_errno_thread_specific=yes
16647 else
16648   echo "configure: failed program was:" >&5
16649   cat conftest.$ac_ext >&5
16650   rm -rf conftest*
16651   ol_cv_errno_thread_specific=no
16652 fi
16653 rm -f conftest*
16654         
16655 fi
16656
16657 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16658
16659                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16660 echo "configure:16661: checking for thread specific h_errno" >&5
16661 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16662   echo $ac_n "(cached) $ac_c" 1>&6
16663 else
16664   
16665                 cat > conftest.$ac_ext <<EOF
16666 #line 16667 "configure"
16667 #include "confdefs.h"
16668 #include <netdb.h>
16669 int main() {
16670 h_errno = 0;
16671 ; return 0; }
16672 EOF
16673 if { (eval echo configure:16674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16674   rm -rf conftest*
16675   ol_cv_h_errno_thread_specific=yes
16676 else
16677   echo "configure: failed program was:" >&5
16678   cat conftest.$ac_ext >&5
16679   rm -rf conftest*
16680   ol_cv_h_errno_thread_specific=no
16681 fi
16682 rm -f conftest*
16683         
16684 fi
16685
16686 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16687
16688         if test $ol_cv_errno_thread_specific != yes \
16689                 -o $ol_cv_h_errno_thread_specific != yes ; then
16690                 LIBS="$LTHREAD_LIBS $LIBS"
16691                 LTHREAD_LIBS=""
16692         fi
16693
16694 fi  
16695
16696 if test $ol_link_threads = no ; then
16697         if test $ol_with_threads = yes ; then
16698                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16699         fi
16700
16701         if test $ol_with_threads = auto ; then
16702                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16703                 ol_with_threads=no
16704         fi
16705
16706         cat >> confdefs.h <<\EOF
16707 #define NO_THREADS 1
16708 EOF
16709
16710         LTHREAD_LIBS=""
16711 fi
16712
16713 if test $ol_link_threads != no ; then
16714         cat >> confdefs.h <<\EOF
16715 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16716 EOF
16717
16718 fi
16719
16720 for ac_func in \
16721         ctime_r                 \
16722         gethostbyname_r gethostbyaddr_r \
16723
16724 do
16725 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16726 echo "configure:16727: checking for $ac_func" >&5
16727 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16728   echo $ac_n "(cached) $ac_c" 1>&6
16729 else
16730   cat > conftest.$ac_ext <<EOF
16731 #line 16732 "configure"
16732 #include "confdefs.h"
16733 /* System header to define __stub macros and hopefully few prototypes,
16734     which can conflict with char $ac_func(); below.  */
16735 #include <assert.h>
16736 /* Override any gcc2 internal prototype to avoid an error.  */
16737 /* We use char because int might match the return type of a gcc2
16738     builtin and then its argument prototype would still apply.  */
16739 char $ac_func();
16740 char (*f)();
16741
16742 int main() {
16743
16744 /* The GNU C library defines this for functions which it implements
16745     to always fail with ENOSYS.  Some functions are actually named
16746     something starting with __ and the normal name is an alias.  */
16747 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16748 choke me
16749 #else
16750 f = $ac_func;
16751 #endif
16752
16753 ; return 0; }
16754 EOF
16755 if { (eval echo configure:16756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16756   rm -rf conftest*
16757   eval "ac_cv_func_$ac_func=yes"
16758 else
16759   echo "configure: failed program was:" >&5
16760   cat conftest.$ac_ext >&5
16761   rm -rf conftest*
16762   eval "ac_cv_func_$ac_func=no"
16763 fi
16764 rm -f conftest*
16765 fi
16766
16767 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16768   echo "$ac_t""yes" 1>&6
16769     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16770   cat >> confdefs.h <<EOF
16771 #define $ac_tr_func 1
16772 EOF
16773  
16774 else
16775   echo "$ac_t""no" 1>&6
16776 fi
16777 done
16778
16779
16780 if test "$ac_cv_func_ctime_r" = no ; then
16781         ol_cv_func_ctime_r_nargs=0
16782 else
16783         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16784 echo "configure:16785: checking number of arguments of ctime_r" >&5
16785 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16786   echo $ac_n "(cached) $ac_c" 1>&6
16787 else
16788   cat > conftest.$ac_ext <<EOF
16789 #line 16790 "configure"
16790 #include "confdefs.h"
16791 #include <time.h>
16792 int main() {
16793 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16794 ; return 0; }
16795 EOF
16796 if { (eval echo configure:16797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16797   rm -rf conftest*
16798   ol_cv_func_ctime_r_nargs3=yes
16799 else
16800   echo "configure: failed program was:" >&5
16801   cat conftest.$ac_ext >&5
16802   rm -rf conftest*
16803   ol_cv_func_ctime_r_nargs3=no
16804 fi
16805 rm -f conftest*
16806
16807         cat > conftest.$ac_ext <<EOF
16808 #line 16809 "configure"
16809 #include "confdefs.h"
16810 #include <time.h>
16811 int main() {
16812 time_t ti; char *buffer; ctime_r(&ti,buffer);
16813 ; return 0; }
16814 EOF
16815 if { (eval echo configure:16816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16816   rm -rf conftest*
16817   ol_cv_func_ctime_r_nargs2=yes
16818 else
16819   echo "configure: failed program was:" >&5
16820   cat conftest.$ac_ext >&5
16821   rm -rf conftest*
16822   ol_cv_func_ctime_r_nargs2=no
16823 fi
16824 rm -f conftest*
16825
16826         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16827                 $ol_cv_func_ctime_r_nargs2 = no ; then
16828
16829                 ol_cv_func_ctime_r_nargs=3
16830
16831         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16832                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16833
16834                 ol_cv_func_ctime_r_nargs=2
16835
16836         else
16837                 ol_cv_func_ctime_r_nargs=0
16838         fi
16839   
16840 fi
16841
16842 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16843
16844   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16845         cat >> confdefs.h <<EOF
16846 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16847 EOF
16848
16849   fi
16850
16851 fi
16852
16853 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16854         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16855 echo "configure:16856: checking number of arguments of gethostbyname_r" >&5
16856 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16857   echo $ac_n "(cached) $ac_c" 1>&6
16858 else
16859   cat > conftest.$ac_ext <<EOF
16860 #line 16861 "configure"
16861 #include "confdefs.h"
16862 #include <sys/types.h>
16863 #include <sys/socket.h>
16864 #include <netinet/in.h>
16865 #include <netdb.h>
16866 #define BUFSIZE (sizeof(struct hostent)+10)
16867 int main() {
16868 struct hostent hent; char buffer[BUFSIZE];
16869                 int bufsize=BUFSIZE;int h_errno;
16870                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16871                         buffer, bufsize, &h_errno);
16872 ; return 0; }
16873 EOF
16874 if { (eval echo configure:16875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16875   rm -rf conftest*
16876   ol_cv_func_gethostbyname_r_nargs5=yes
16877 else
16878   echo "configure: failed program was:" >&5
16879   cat conftest.$ac_ext >&5
16880   rm -rf conftest*
16881   ol_cv_func_gethostbyname_r_nargs5=no
16882 fi
16883 rm -f conftest*
16884
16885         cat > conftest.$ac_ext <<EOF
16886 #line 16887 "configure"
16887 #include "confdefs.h"
16888 #include <sys/types.h>
16889 #include <sys/socket.h>
16890 #include <netinet/in.h>
16891 #include <netdb.h>
16892 #define BUFSIZE (sizeof(struct hostent)+10)
16893 int main() {
16894 struct hostent hent;struct hostent *rhent;
16895                 char buffer[BUFSIZE];
16896                 int bufsize=BUFSIZE;int h_errno;
16897                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16898                         &rhent, &h_errno);
16899 ; return 0; }
16900 EOF
16901 if { (eval echo configure:16902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16902   rm -rf conftest*
16903   ol_cv_func_gethostbyname_r_nargs6=yes
16904 else
16905   echo "configure: failed program was:" >&5
16906   cat conftest.$ac_ext >&5
16907   rm -rf conftest*
16908   ol_cv_func_gethostbyname_r_nargs6=no
16909 fi
16910 rm -f conftest*
16911
16912         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16913                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16914
16915                 ol_cv_func_gethostbyname_r_nargs=5
16916
16917         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16918                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16919
16920                 ol_cv_func_gethostbyname_r_nargs=6
16921
16922         else
16923                 ol_cv_func_gethostbyname_r_nargs=0
16924         fi
16925   
16926 fi
16927
16928 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16929   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16930         cat >> confdefs.h <<EOF
16931 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16932 EOF
16933
16934   fi
16935
16936 else
16937         ol_cv_func_gethostbyname_r_nargs=0
16938 fi
16939  
16940 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16941         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16942 echo "configure:16943: checking number of arguments of gethostbyaddr_r" >&5
16943 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16944   echo $ac_n "(cached) $ac_c" 1>&6
16945 else
16946   cat > conftest.$ac_ext <<EOF
16947 #line 16948 "configure"
16948 #include "confdefs.h"
16949 #include <sys/types.h>
16950 #include <sys/socket.h>
16951 #include <netinet/in.h>
16952 #include <netdb.h>
16953 #define BUFSIZE (sizeof(struct hostent)+10)
16954 int main() {
16955 struct hostent hent; char buffer[BUFSIZE]; 
16956             struct in_addr add;
16957             size_t alen=sizeof(struct in_addr);
16958             int bufsize=BUFSIZE;int h_errno;
16959                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16960                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16961 ; return 0; }
16962 EOF
16963 if { (eval echo configure:16964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16964   rm -rf conftest*
16965   ol_cv_func_gethostbyaddr_r_nargs7=yes
16966 else
16967   echo "configure: failed program was:" >&5
16968   cat conftest.$ac_ext >&5
16969   rm -rf conftest*
16970   ol_cv_func_gethostbyaddr_r_nargs7=no
16971 fi
16972 rm -f conftest*
16973
16974         cat > conftest.$ac_ext <<EOF
16975 #line 16976 "configure"
16976 #include "confdefs.h"
16977 #include <sys/types.h>
16978 #include <sys/socket.h>
16979 #include <netinet/in.h>
16980 #include <netdb.h>
16981 #define BUFSIZE (sizeof(struct hostent)+10)
16982 int main() {
16983 struct hostent hent;
16984                 struct hostent *rhent; char buffer[BUFSIZE]; 
16985                 struct in_addr add;
16986                 size_t alen=sizeof(struct in_addr);
16987                 int bufsize=BUFSIZE;int h_errno;
16988                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16989                         alen, AF_INET, &hent, buffer, bufsize, 
16990                         &rhent, &h_errno);
16991 ; return 0; }
16992 EOF
16993 if { (eval echo configure:16994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16994   rm -rf conftest*
16995   ol_cv_func_gethostbyaddr_r_nargs8=yes
16996 else
16997   echo "configure: failed program was:" >&5
16998   cat conftest.$ac_ext >&5
16999   rm -rf conftest*
17000   ol_cv_func_gethostbyaddr_r_nargs8=no
17001 fi
17002 rm -f conftest*
17003
17004         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
17005                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
17006
17007                 ol_cv_func_gethostbyaddr_r_nargs=7
17008
17009         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
17010                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
17011
17012                 ol_cv_func_gethostbyaddr_r_nargs=8
17013
17014         else
17015                 ol_cv_func_gethostbyaddr_r_nargs=0
17016         fi
17017   
17018 fi
17019
17020 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
17021   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
17022     cat >> confdefs.h <<EOF
17023 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
17024 EOF
17025
17026   fi
17027
17028 else
17029         ol_cv_func_gethostbyaddr_r_nargs=0
17030 fi
17031
17032 ol_link_ldbm=no 
17033
17034 if test $ol_with_ldbm_api = auto \
17035         -o $ol_with_ldbm_api = berkeley \
17036         -o $ol_with_ldbm_api = bcompat ; then
17037
17038         if test $ol_with_ldbm_api = bcompat; then \
17039                 for ac_hdr in db_185.h db.h
17040 do
17041 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17042 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17043 echo "configure:17044: checking for $ac_hdr" >&5
17044 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17045   echo $ac_n "(cached) $ac_c" 1>&6
17046 else
17047   cat > conftest.$ac_ext <<EOF
17048 #line 17049 "configure"
17049 #include "confdefs.h"
17050 #include <$ac_hdr>
17051 EOF
17052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17053 { (eval echo configure:17054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17054 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17055 if test -z "$ac_err"; then
17056   rm -rf conftest*
17057   eval "ac_cv_header_$ac_safe=yes"
17058 else
17059   echo "$ac_err" >&5
17060   echo "configure: failed program was:" >&5
17061   cat conftest.$ac_ext >&5
17062   rm -rf conftest*
17063   eval "ac_cv_header_$ac_safe=no"
17064 fi
17065 rm -f conftest*
17066 fi
17067 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17068   echo "$ac_t""yes" 1>&6
17069     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17070   cat >> confdefs.h <<EOF
17071 #define $ac_tr_hdr 1
17072 EOF
17073  
17074 else
17075   echo "$ac_t""no" 1>&6
17076 fi
17077 done
17078
17079 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17080         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17081 echo "configure:17082: checking if Berkeley DB header compatibility" >&5
17082 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17083   echo $ac_n "(cached) $ac_c" 1>&6
17084 else
17085   
17086                 cat > conftest.$ac_ext <<EOF
17087 #line 17088 "configure"
17088 #include "confdefs.h"
17089
17090 #if HAVE_DB_185_H
17091 #       include <db_185.h>
17092 #else
17093 #       include <db.h>
17094 #endif
17095
17096  /* this check could be improved */
17097 #ifndef DB_VERSION_MAJOR
17098 #       define DB_VERSION_MAJOR 1
17099 #endif
17100
17101 #if DB_VERSION_MAJOR == 1 
17102         __db_version_1
17103 #endif
17104
17105 EOF
17106 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17107   egrep "__db_version_1" >/dev/null 2>&1; then
17108   rm -rf conftest*
17109   ol_cv_header_db1=yes
17110 else
17111   rm -rf conftest*
17112   ol_cv_header_db1=no
17113 fi
17114 rm -f conftest*
17115
17116 fi
17117
17118 echo "$ac_t""$ol_cv_header_db1" 1>&6
17119
17120         if test $ol_cv_header_db1 = yes ; then
17121                 ol_cv_lib_db=no
17122 if test $ol_cv_lib_db = no ; then
17123         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17124 echo "configure:17125: checking for Berkeley DB link (default)" >&5
17125 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17126   echo $ac_n "(cached) $ac_c" 1>&6
17127 else
17128   
17129         ol_DB_LIB=
17130         ol_LIBS=$LIBS
17131         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17132
17133         cat > conftest.$ac_ext <<EOF
17134 #line 17135 "configure"
17135 #include "confdefs.h"
17136
17137 #ifdef HAVE_DB_185_H
17138 # include <db_185.h>
17139 #else
17140 # include <db.h>
17141 #endif
17142
17143 #ifndef DB_VERSION_MAJOR
17144 # define DB_VERSION_MAJOR 1
17145 #endif
17146
17147 #ifndef NULL
17148 #define NULL ((void*)0)
17149 #endif
17150
17151 int main() {
17152
17153 #if DB_VERSION_MAJOR > 1
17154         {
17155                 char *version;
17156                 int major, minor, patch;
17157
17158                 version = db_version( &major, &minor, &patch );
17159
17160                 if( major != DB_VERSION_MAJOR ||
17161                         minor < DB_VERSION_MINOR )
17162                 {
17163                         printf("Berkeley DB version mismatch\n"
17164                                 "\theader: %s\n\tlibrary: %s\n",
17165                                 DB_VERSION_STRING, version);
17166                         return 1;
17167                 }
17168         }
17169 #endif
17170
17171 #if DB_VERSION_MAJOR > 2
17172         db_env_create( NULL, 0 );
17173 #elif DB_VERSION_MAJOR > 1
17174         db_appexit( NULL );
17175 #else
17176         (void) dbopen( NULL, 0, 0, 0, NULL);
17177 #endif
17178
17179 ; return 0; }
17180 EOF
17181 if { (eval echo configure:17182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17182   rm -rf conftest*
17183   ol_cv_db_none=yes
17184 else
17185   echo "configure: failed program was:" >&5
17186   cat conftest.$ac_ext >&5
17187   rm -rf conftest*
17188   ol_cv_db_none=no
17189 fi
17190 rm -f conftest*
17191
17192         LIBS="$ol_LIBS"
17193
17194 fi
17195
17196 echo "$ac_t""$ol_cv_db_none" 1>&6
17197
17198         if test $ol_cv_db_none = yes ; then
17199                 ol_cv_lib_db=yes
17200         fi
17201 fi
17202
17203 if test $ol_cv_lib_db = no ; then
17204         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17205 echo "configure:17206: checking for Berkeley DB link (-ldb43)" >&5
17206 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17207   echo $ac_n "(cached) $ac_c" 1>&6
17208 else
17209   
17210         ol_DB_LIB=-ldb43
17211         ol_LIBS=$LIBS
17212         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17213
17214         cat > conftest.$ac_ext <<EOF
17215 #line 17216 "configure"
17216 #include "confdefs.h"
17217
17218 #ifdef HAVE_DB_185_H
17219 # include <db_185.h>
17220 #else
17221 # include <db.h>
17222 #endif
17223
17224 #ifndef DB_VERSION_MAJOR
17225 # define DB_VERSION_MAJOR 1
17226 #endif
17227
17228 #ifndef NULL
17229 #define NULL ((void*)0)
17230 #endif
17231
17232 int main() {
17233
17234 #if DB_VERSION_MAJOR > 1
17235         {
17236                 char *version;
17237                 int major, minor, patch;
17238
17239                 version = db_version( &major, &minor, &patch );
17240
17241                 if( major != DB_VERSION_MAJOR ||
17242                         minor < DB_VERSION_MINOR )
17243                 {
17244                         printf("Berkeley DB version mismatch\n"
17245                                 "\theader: %s\n\tlibrary: %s\n",
17246                                 DB_VERSION_STRING, version);
17247                         return 1;
17248                 }
17249         }
17250 #endif
17251
17252 #if DB_VERSION_MAJOR > 2
17253         db_env_create( NULL, 0 );
17254 #elif DB_VERSION_MAJOR > 1
17255         db_appexit( NULL );
17256 #else
17257         (void) dbopen( NULL, 0, 0, 0, NULL);
17258 #endif
17259
17260 ; return 0; }
17261 EOF
17262 if { (eval echo configure:17263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17263   rm -rf conftest*
17264   ol_cv_db_db43=yes
17265 else
17266   echo "configure: failed program was:" >&5
17267   cat conftest.$ac_ext >&5
17268   rm -rf conftest*
17269   ol_cv_db_db43=no
17270 fi
17271 rm -f conftest*
17272
17273         LIBS="$ol_LIBS"
17274
17275 fi
17276
17277 echo "$ac_t""$ol_cv_db_db43" 1>&6
17278
17279         if test $ol_cv_db_db43 = yes ; then
17280                 ol_cv_lib_db=-ldb43
17281         fi
17282 fi
17283
17284 if test $ol_cv_lib_db = no ; then
17285         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17286 echo "configure:17287: checking for Berkeley DB link (-ldb-43)" >&5
17287 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17288   echo $ac_n "(cached) $ac_c" 1>&6
17289 else
17290   
17291         ol_DB_LIB=-ldb-43
17292         ol_LIBS=$LIBS
17293         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17294
17295         cat > conftest.$ac_ext <<EOF
17296 #line 17297 "configure"
17297 #include "confdefs.h"
17298
17299 #ifdef HAVE_DB_185_H
17300 # include <db_185.h>
17301 #else
17302 # include <db.h>
17303 #endif
17304
17305 #ifndef DB_VERSION_MAJOR
17306 # define DB_VERSION_MAJOR 1
17307 #endif
17308
17309 #ifndef NULL
17310 #define NULL ((void*)0)
17311 #endif
17312
17313 int main() {
17314
17315 #if DB_VERSION_MAJOR > 1
17316         {
17317                 char *version;
17318                 int major, minor, patch;
17319
17320                 version = db_version( &major, &minor, &patch );
17321
17322                 if( major != DB_VERSION_MAJOR ||
17323                         minor < DB_VERSION_MINOR )
17324                 {
17325                         printf("Berkeley DB version mismatch\n"
17326                                 "\theader: %s\n\tlibrary: %s\n",
17327                                 DB_VERSION_STRING, version);
17328                         return 1;
17329                 }
17330         }
17331 #endif
17332
17333 #if DB_VERSION_MAJOR > 2
17334         db_env_create( NULL, 0 );
17335 #elif DB_VERSION_MAJOR > 1
17336         db_appexit( NULL );
17337 #else
17338         (void) dbopen( NULL, 0, 0, 0, NULL);
17339 #endif
17340
17341 ; return 0; }
17342 EOF
17343 if { (eval echo configure:17344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17344   rm -rf conftest*
17345   ol_cv_db_db_43=yes
17346 else
17347   echo "configure: failed program was:" >&5
17348   cat conftest.$ac_ext >&5
17349   rm -rf conftest*
17350   ol_cv_db_db_43=no
17351 fi
17352 rm -f conftest*
17353
17354         LIBS="$ol_LIBS"
17355
17356 fi
17357
17358 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17359
17360         if test $ol_cv_db_db_43 = yes ; then
17361                 ol_cv_lib_db=-ldb-43
17362         fi
17363 fi
17364
17365 if test $ol_cv_lib_db = no ; then
17366         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17367 echo "configure:17368: checking for Berkeley DB link (-ldb-4.3)" >&5
17368 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17369   echo $ac_n "(cached) $ac_c" 1>&6
17370 else
17371   
17372         ol_DB_LIB=-ldb-4.3
17373         ol_LIBS=$LIBS
17374         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17375
17376         cat > conftest.$ac_ext <<EOF
17377 #line 17378 "configure"
17378 #include "confdefs.h"
17379
17380 #ifdef HAVE_DB_185_H
17381 # include <db_185.h>
17382 #else
17383 # include <db.h>
17384 #endif
17385
17386 #ifndef DB_VERSION_MAJOR
17387 # define DB_VERSION_MAJOR 1
17388 #endif
17389
17390 #ifndef NULL
17391 #define NULL ((void*)0)
17392 #endif
17393
17394 int main() {
17395
17396 #if DB_VERSION_MAJOR > 1
17397         {
17398                 char *version;
17399                 int major, minor, patch;
17400
17401                 version = db_version( &major, &minor, &patch );
17402
17403                 if( major != DB_VERSION_MAJOR ||
17404                         minor < DB_VERSION_MINOR )
17405                 {
17406                         printf("Berkeley DB version mismatch\n"
17407                                 "\theader: %s\n\tlibrary: %s\n",
17408                                 DB_VERSION_STRING, version);
17409                         return 1;
17410                 }
17411         }
17412 #endif
17413
17414 #if DB_VERSION_MAJOR > 2
17415         db_env_create( NULL, 0 );
17416 #elif DB_VERSION_MAJOR > 1
17417         db_appexit( NULL );
17418 #else
17419         (void) dbopen( NULL, 0, 0, 0, NULL);
17420 #endif
17421
17422 ; return 0; }
17423 EOF
17424 if { (eval echo configure:17425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17425   rm -rf conftest*
17426   ol_cv_db_db_4_dot_3=yes
17427 else
17428   echo "configure: failed program was:" >&5
17429   cat conftest.$ac_ext >&5
17430   rm -rf conftest*
17431   ol_cv_db_db_4_dot_3=no
17432 fi
17433 rm -f conftest*
17434
17435         LIBS="$ol_LIBS"
17436
17437 fi
17438
17439 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17440
17441         if test $ol_cv_db_db_4_dot_3 = yes ; then
17442                 ol_cv_lib_db=-ldb-4.3
17443         fi
17444 fi
17445
17446 if test $ol_cv_lib_db = no ; then
17447         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17448 echo "configure:17449: checking for Berkeley DB link (-ldb-4-3)" >&5
17449 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17450   echo $ac_n "(cached) $ac_c" 1>&6
17451 else
17452   
17453         ol_DB_LIB=-ldb-4-3
17454         ol_LIBS=$LIBS
17455         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17456
17457         cat > conftest.$ac_ext <<EOF
17458 #line 17459 "configure"
17459 #include "confdefs.h"
17460
17461 #ifdef HAVE_DB_185_H
17462 # include <db_185.h>
17463 #else
17464 # include <db.h>
17465 #endif
17466
17467 #ifndef DB_VERSION_MAJOR
17468 # define DB_VERSION_MAJOR 1
17469 #endif
17470
17471 #ifndef NULL
17472 #define NULL ((void*)0)
17473 #endif
17474
17475 int main() {
17476
17477 #if DB_VERSION_MAJOR > 1
17478         {
17479                 char *version;
17480                 int major, minor, patch;
17481
17482                 version = db_version( &major, &minor, &patch );
17483
17484                 if( major != DB_VERSION_MAJOR ||
17485                         minor < DB_VERSION_MINOR )
17486                 {
17487                         printf("Berkeley DB version mismatch\n"
17488                                 "\theader: %s\n\tlibrary: %s\n",
17489                                 DB_VERSION_STRING, version);
17490                         return 1;
17491                 }
17492         }
17493 #endif
17494
17495 #if DB_VERSION_MAJOR > 2
17496         db_env_create( NULL, 0 );
17497 #elif DB_VERSION_MAJOR > 1
17498         db_appexit( NULL );
17499 #else
17500         (void) dbopen( NULL, 0, 0, 0, NULL);
17501 #endif
17502
17503 ; return 0; }
17504 EOF
17505 if { (eval echo configure:17506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17506   rm -rf conftest*
17507   ol_cv_db_db_4_3=yes
17508 else
17509   echo "configure: failed program was:" >&5
17510   cat conftest.$ac_ext >&5
17511   rm -rf conftest*
17512   ol_cv_db_db_4_3=no
17513 fi
17514 rm -f conftest*
17515
17516         LIBS="$ol_LIBS"
17517
17518 fi
17519
17520 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17521
17522         if test $ol_cv_db_db_4_3 = yes ; then
17523                 ol_cv_lib_db=-ldb-4-3
17524         fi
17525 fi
17526
17527 if test $ol_cv_lib_db = no ; then
17528         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17529 echo "configure:17530: checking for Berkeley DB link (-ldb42)" >&5
17530 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17531   echo $ac_n "(cached) $ac_c" 1>&6
17532 else
17533   
17534         ol_DB_LIB=-ldb42
17535         ol_LIBS=$LIBS
17536         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17537
17538         cat > conftest.$ac_ext <<EOF
17539 #line 17540 "configure"
17540 #include "confdefs.h"
17541
17542 #ifdef HAVE_DB_185_H
17543 # include <db_185.h>
17544 #else
17545 # include <db.h>
17546 #endif
17547
17548 #ifndef DB_VERSION_MAJOR
17549 # define DB_VERSION_MAJOR 1
17550 #endif
17551
17552 #ifndef NULL
17553 #define NULL ((void*)0)
17554 #endif
17555
17556 int main() {
17557
17558 #if DB_VERSION_MAJOR > 1
17559         {
17560                 char *version;
17561                 int major, minor, patch;
17562
17563                 version = db_version( &major, &minor, &patch );
17564
17565                 if( major != DB_VERSION_MAJOR ||
17566                         minor < DB_VERSION_MINOR )
17567                 {
17568                         printf("Berkeley DB version mismatch\n"
17569                                 "\theader: %s\n\tlibrary: %s\n",
17570                                 DB_VERSION_STRING, version);
17571                         return 1;
17572                 }
17573         }
17574 #endif
17575
17576 #if DB_VERSION_MAJOR > 2
17577         db_env_create( NULL, 0 );
17578 #elif DB_VERSION_MAJOR > 1
17579         db_appexit( NULL );
17580 #else
17581         (void) dbopen( NULL, 0, 0, 0, NULL);
17582 #endif
17583
17584 ; return 0; }
17585 EOF
17586 if { (eval echo configure:17587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17587   rm -rf conftest*
17588   ol_cv_db_db42=yes
17589 else
17590   echo "configure: failed program was:" >&5
17591   cat conftest.$ac_ext >&5
17592   rm -rf conftest*
17593   ol_cv_db_db42=no
17594 fi
17595 rm -f conftest*
17596
17597         LIBS="$ol_LIBS"
17598
17599 fi
17600
17601 echo "$ac_t""$ol_cv_db_db42" 1>&6
17602
17603         if test $ol_cv_db_db42 = yes ; then
17604                 ol_cv_lib_db=-ldb42
17605         fi
17606 fi
17607
17608 if test $ol_cv_lib_db = no ; then
17609         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17610 echo "configure:17611: checking for Berkeley DB link (-ldb-42)" >&5
17611 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17612   echo $ac_n "(cached) $ac_c" 1>&6
17613 else
17614   
17615         ol_DB_LIB=-ldb-42
17616         ol_LIBS=$LIBS
17617         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17618
17619         cat > conftest.$ac_ext <<EOF
17620 #line 17621 "configure"
17621 #include "confdefs.h"
17622
17623 #ifdef HAVE_DB_185_H
17624 # include <db_185.h>
17625 #else
17626 # include <db.h>
17627 #endif
17628
17629 #ifndef DB_VERSION_MAJOR
17630 # define DB_VERSION_MAJOR 1
17631 #endif
17632
17633 #ifndef NULL
17634 #define NULL ((void*)0)
17635 #endif
17636
17637 int main() {
17638
17639 #if DB_VERSION_MAJOR > 1
17640         {
17641                 char *version;
17642                 int major, minor, patch;
17643
17644                 version = db_version( &major, &minor, &patch );
17645
17646                 if( major != DB_VERSION_MAJOR ||
17647                         minor < DB_VERSION_MINOR )
17648                 {
17649                         printf("Berkeley DB version mismatch\n"
17650                                 "\theader: %s\n\tlibrary: %s\n",
17651                                 DB_VERSION_STRING, version);
17652                         return 1;
17653                 }
17654         }
17655 #endif
17656
17657 #if DB_VERSION_MAJOR > 2
17658         db_env_create( NULL, 0 );
17659 #elif DB_VERSION_MAJOR > 1
17660         db_appexit( NULL );
17661 #else
17662         (void) dbopen( NULL, 0, 0, 0, NULL);
17663 #endif
17664
17665 ; return 0; }
17666 EOF
17667 if { (eval echo configure:17668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17668   rm -rf conftest*
17669   ol_cv_db_db_42=yes
17670 else
17671   echo "configure: failed program was:" >&5
17672   cat conftest.$ac_ext >&5
17673   rm -rf conftest*
17674   ol_cv_db_db_42=no
17675 fi
17676 rm -f conftest*
17677
17678         LIBS="$ol_LIBS"
17679
17680 fi
17681
17682 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17683
17684         if test $ol_cv_db_db_42 = yes ; then
17685                 ol_cv_lib_db=-ldb-42
17686         fi
17687 fi
17688
17689 if test $ol_cv_lib_db = no ; then
17690         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17691 echo "configure:17692: checking for Berkeley DB link (-ldb-4.2)" >&5
17692 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17693   echo $ac_n "(cached) $ac_c" 1>&6
17694 else
17695   
17696         ol_DB_LIB=-ldb-4.2
17697         ol_LIBS=$LIBS
17698         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17699
17700         cat > conftest.$ac_ext <<EOF
17701 #line 17702 "configure"
17702 #include "confdefs.h"
17703
17704 #ifdef HAVE_DB_185_H
17705 # include <db_185.h>
17706 #else
17707 # include <db.h>
17708 #endif
17709
17710 #ifndef DB_VERSION_MAJOR
17711 # define DB_VERSION_MAJOR 1
17712 #endif
17713
17714 #ifndef NULL
17715 #define NULL ((void*)0)
17716 #endif
17717
17718 int main() {
17719
17720 #if DB_VERSION_MAJOR > 1
17721         {
17722                 char *version;
17723                 int major, minor, patch;
17724
17725                 version = db_version( &major, &minor, &patch );
17726
17727                 if( major != DB_VERSION_MAJOR ||
17728                         minor < DB_VERSION_MINOR )
17729                 {
17730                         printf("Berkeley DB version mismatch\n"
17731                                 "\theader: %s\n\tlibrary: %s\n",
17732                                 DB_VERSION_STRING, version);
17733                         return 1;
17734                 }
17735         }
17736 #endif
17737
17738 #if DB_VERSION_MAJOR > 2
17739         db_env_create( NULL, 0 );
17740 #elif DB_VERSION_MAJOR > 1
17741         db_appexit( NULL );
17742 #else
17743         (void) dbopen( NULL, 0, 0, 0, NULL);
17744 #endif
17745
17746 ; return 0; }
17747 EOF
17748 if { (eval echo configure:17749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17749   rm -rf conftest*
17750   ol_cv_db_db_4_dot_2=yes
17751 else
17752   echo "configure: failed program was:" >&5
17753   cat conftest.$ac_ext >&5
17754   rm -rf conftest*
17755   ol_cv_db_db_4_dot_2=no
17756 fi
17757 rm -f conftest*
17758
17759         LIBS="$ol_LIBS"
17760
17761 fi
17762
17763 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17764
17765         if test $ol_cv_db_db_4_dot_2 = yes ; then
17766                 ol_cv_lib_db=-ldb-4.2
17767         fi
17768 fi
17769
17770 if test $ol_cv_lib_db = no ; then
17771         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17772 echo "configure:17773: checking for Berkeley DB link (-ldb-4-2)" >&5
17773 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17774   echo $ac_n "(cached) $ac_c" 1>&6
17775 else
17776   
17777         ol_DB_LIB=-ldb-4-2
17778         ol_LIBS=$LIBS
17779         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17780
17781         cat > conftest.$ac_ext <<EOF
17782 #line 17783 "configure"
17783 #include "confdefs.h"
17784
17785 #ifdef HAVE_DB_185_H
17786 # include <db_185.h>
17787 #else
17788 # include <db.h>
17789 #endif
17790
17791 #ifndef DB_VERSION_MAJOR
17792 # define DB_VERSION_MAJOR 1
17793 #endif
17794
17795 #ifndef NULL
17796 #define NULL ((void*)0)
17797 #endif
17798
17799 int main() {
17800
17801 #if DB_VERSION_MAJOR > 1
17802         {
17803                 char *version;
17804                 int major, minor, patch;
17805
17806                 version = db_version( &major, &minor, &patch );
17807
17808                 if( major != DB_VERSION_MAJOR ||
17809                         minor < DB_VERSION_MINOR )
17810                 {
17811                         printf("Berkeley DB version mismatch\n"
17812                                 "\theader: %s\n\tlibrary: %s\n",
17813                                 DB_VERSION_STRING, version);
17814                         return 1;
17815                 }
17816         }
17817 #endif
17818
17819 #if DB_VERSION_MAJOR > 2
17820         db_env_create( NULL, 0 );
17821 #elif DB_VERSION_MAJOR > 1
17822         db_appexit( NULL );
17823 #else
17824         (void) dbopen( NULL, 0, 0, 0, NULL);
17825 #endif
17826
17827 ; return 0; }
17828 EOF
17829 if { (eval echo configure:17830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17830   rm -rf conftest*
17831   ol_cv_db_db_4_2=yes
17832 else
17833   echo "configure: failed program was:" >&5
17834   cat conftest.$ac_ext >&5
17835   rm -rf conftest*
17836   ol_cv_db_db_4_2=no
17837 fi
17838 rm -f conftest*
17839
17840         LIBS="$ol_LIBS"
17841
17842 fi
17843
17844 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17845
17846         if test $ol_cv_db_db_4_2 = yes ; then
17847                 ol_cv_lib_db=-ldb-4-2
17848         fi
17849 fi
17850
17851 if test $ol_cv_lib_db = no ; then
17852         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17853 echo "configure:17854: checking for Berkeley DB link (-ldb-4)" >&5
17854 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17855   echo $ac_n "(cached) $ac_c" 1>&6
17856 else
17857   
17858         ol_DB_LIB=-ldb-4
17859         ol_LIBS=$LIBS
17860         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17861
17862         cat > conftest.$ac_ext <<EOF
17863 #line 17864 "configure"
17864 #include "confdefs.h"
17865
17866 #ifdef HAVE_DB_185_H
17867 # include <db_185.h>
17868 #else
17869 # include <db.h>
17870 #endif
17871
17872 #ifndef DB_VERSION_MAJOR
17873 # define DB_VERSION_MAJOR 1
17874 #endif
17875
17876 #ifndef NULL
17877 #define NULL ((void*)0)
17878 #endif
17879
17880 int main() {
17881
17882 #if DB_VERSION_MAJOR > 1
17883         {
17884                 char *version;
17885                 int major, minor, patch;
17886
17887                 version = db_version( &major, &minor, &patch );
17888
17889                 if( major != DB_VERSION_MAJOR ||
17890                         minor < DB_VERSION_MINOR )
17891                 {
17892                         printf("Berkeley DB version mismatch\n"
17893                                 "\theader: %s\n\tlibrary: %s\n",
17894                                 DB_VERSION_STRING, version);
17895                         return 1;
17896                 }
17897         }
17898 #endif
17899
17900 #if DB_VERSION_MAJOR > 2
17901         db_env_create( NULL, 0 );
17902 #elif DB_VERSION_MAJOR > 1
17903         db_appexit( NULL );
17904 #else
17905         (void) dbopen( NULL, 0, 0, 0, NULL);
17906 #endif
17907
17908 ; return 0; }
17909 EOF
17910 if { (eval echo configure:17911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17911   rm -rf conftest*
17912   ol_cv_db_db_4=yes
17913 else
17914   echo "configure: failed program was:" >&5
17915   cat conftest.$ac_ext >&5
17916   rm -rf conftest*
17917   ol_cv_db_db_4=no
17918 fi
17919 rm -f conftest*
17920
17921         LIBS="$ol_LIBS"
17922
17923 fi
17924
17925 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17926
17927         if test $ol_cv_db_db_4 = yes ; then
17928                 ol_cv_lib_db=-ldb-4
17929         fi
17930 fi
17931
17932 if test $ol_cv_lib_db = no ; then
17933         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17934 echo "configure:17935: checking for Berkeley DB link (-ldb4)" >&5
17935 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17936   echo $ac_n "(cached) $ac_c" 1>&6
17937 else
17938   
17939         ol_DB_LIB=-ldb4
17940         ol_LIBS=$LIBS
17941         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17942
17943         cat > conftest.$ac_ext <<EOF
17944 #line 17945 "configure"
17945 #include "confdefs.h"
17946
17947 #ifdef HAVE_DB_185_H
17948 # include <db_185.h>
17949 #else
17950 # include <db.h>
17951 #endif
17952
17953 #ifndef DB_VERSION_MAJOR
17954 # define DB_VERSION_MAJOR 1
17955 #endif
17956
17957 #ifndef NULL
17958 #define NULL ((void*)0)
17959 #endif
17960
17961 int main() {
17962
17963 #if DB_VERSION_MAJOR > 1
17964         {
17965                 char *version;
17966                 int major, minor, patch;
17967
17968                 version = db_version( &major, &minor, &patch );
17969
17970                 if( major != DB_VERSION_MAJOR ||
17971                         minor < DB_VERSION_MINOR )
17972                 {
17973                         printf("Berkeley DB version mismatch\n"
17974                                 "\theader: %s\n\tlibrary: %s\n",
17975                                 DB_VERSION_STRING, version);
17976                         return 1;
17977                 }
17978         }
17979 #endif
17980
17981 #if DB_VERSION_MAJOR > 2
17982         db_env_create( NULL, 0 );
17983 #elif DB_VERSION_MAJOR > 1
17984         db_appexit( NULL );
17985 #else
17986         (void) dbopen( NULL, 0, 0, 0, NULL);
17987 #endif
17988
17989 ; return 0; }
17990 EOF
17991 if { (eval echo configure:17992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17992   rm -rf conftest*
17993   ol_cv_db_db4=yes
17994 else
17995   echo "configure: failed program was:" >&5
17996   cat conftest.$ac_ext >&5
17997   rm -rf conftest*
17998   ol_cv_db_db4=no
17999 fi
18000 rm -f conftest*
18001
18002         LIBS="$ol_LIBS"
18003
18004 fi
18005
18006 echo "$ac_t""$ol_cv_db_db4" 1>&6
18007
18008         if test $ol_cv_db_db4 = yes ; then
18009                 ol_cv_lib_db=-ldb4
18010         fi
18011 fi
18012
18013 if test $ol_cv_lib_db = no ; then
18014         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18015 echo "configure:18016: checking for Berkeley DB link (-ldb)" >&5
18016 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18017   echo $ac_n "(cached) $ac_c" 1>&6
18018 else
18019   
18020         ol_DB_LIB=-ldb
18021         ol_LIBS=$LIBS
18022         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18023
18024         cat > conftest.$ac_ext <<EOF
18025 #line 18026 "configure"
18026 #include "confdefs.h"
18027
18028 #ifdef HAVE_DB_185_H
18029 # include <db_185.h>
18030 #else
18031 # include <db.h>
18032 #endif
18033
18034 #ifndef DB_VERSION_MAJOR
18035 # define DB_VERSION_MAJOR 1
18036 #endif
18037
18038 #ifndef NULL
18039 #define NULL ((void*)0)
18040 #endif
18041
18042 int main() {
18043
18044 #if DB_VERSION_MAJOR > 1
18045         {
18046                 char *version;
18047                 int major, minor, patch;
18048
18049                 version = db_version( &major, &minor, &patch );
18050
18051                 if( major != DB_VERSION_MAJOR ||
18052                         minor < DB_VERSION_MINOR )
18053                 {
18054                         printf("Berkeley DB version mismatch\n"
18055                                 "\theader: %s\n\tlibrary: %s\n",
18056                                 DB_VERSION_STRING, version);
18057                         return 1;
18058                 }
18059         }
18060 #endif
18061
18062 #if DB_VERSION_MAJOR > 2
18063         db_env_create( NULL, 0 );
18064 #elif DB_VERSION_MAJOR > 1
18065         db_appexit( NULL );
18066 #else
18067         (void) dbopen( NULL, 0, 0, 0, NULL);
18068 #endif
18069
18070 ; return 0; }
18071 EOF
18072 if { (eval echo configure:18073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18073   rm -rf conftest*
18074   ol_cv_db_db=yes
18075 else
18076   echo "configure: failed program was:" >&5
18077   cat conftest.$ac_ext >&5
18078   rm -rf conftest*
18079   ol_cv_db_db=no
18080 fi
18081 rm -f conftest*
18082
18083         LIBS="$ol_LIBS"
18084
18085 fi
18086
18087 echo "$ac_t""$ol_cv_db_db" 1>&6
18088
18089         if test $ol_cv_db_db = yes ; then
18090                 ol_cv_lib_db=-ldb
18091         fi
18092 fi
18093
18094 if test $ol_cv_lib_db = no ; then
18095         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18096 echo "configure:18097: checking for Berkeley DB link (-ldb41)" >&5
18097 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18098   echo $ac_n "(cached) $ac_c" 1>&6
18099 else
18100   
18101         ol_DB_LIB=-ldb41
18102         ol_LIBS=$LIBS
18103         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18104
18105         cat > conftest.$ac_ext <<EOF
18106 #line 18107 "configure"
18107 #include "confdefs.h"
18108
18109 #ifdef HAVE_DB_185_H
18110 # include <db_185.h>
18111 #else
18112 # include <db.h>
18113 #endif
18114
18115 #ifndef DB_VERSION_MAJOR
18116 # define DB_VERSION_MAJOR 1
18117 #endif
18118
18119 #ifndef NULL
18120 #define NULL ((void*)0)
18121 #endif
18122
18123 int main() {
18124
18125 #if DB_VERSION_MAJOR > 1
18126         {
18127                 char *version;
18128                 int major, minor, patch;
18129
18130                 version = db_version( &major, &minor, &patch );
18131
18132                 if( major != DB_VERSION_MAJOR ||
18133                         minor < DB_VERSION_MINOR )
18134                 {
18135                         printf("Berkeley DB version mismatch\n"
18136                                 "\theader: %s\n\tlibrary: %s\n",
18137                                 DB_VERSION_STRING, version);
18138                         return 1;
18139                 }
18140         }
18141 #endif
18142
18143 #if DB_VERSION_MAJOR > 2
18144         db_env_create( NULL, 0 );
18145 #elif DB_VERSION_MAJOR > 1
18146         db_appexit( NULL );
18147 #else
18148         (void) dbopen( NULL, 0, 0, 0, NULL);
18149 #endif
18150
18151 ; return 0; }
18152 EOF
18153 if { (eval echo configure:18154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18154   rm -rf conftest*
18155   ol_cv_db_db41=yes
18156 else
18157   echo "configure: failed program was:" >&5
18158   cat conftest.$ac_ext >&5
18159   rm -rf conftest*
18160   ol_cv_db_db41=no
18161 fi
18162 rm -f conftest*
18163
18164         LIBS="$ol_LIBS"
18165
18166 fi
18167
18168 echo "$ac_t""$ol_cv_db_db41" 1>&6
18169
18170         if test $ol_cv_db_db41 = yes ; then
18171                 ol_cv_lib_db=-ldb41
18172         fi
18173 fi
18174
18175 if test $ol_cv_lib_db = no ; then
18176         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18177 echo "configure:18178: checking for Berkeley DB link (-ldb-41)" >&5
18178 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18179   echo $ac_n "(cached) $ac_c" 1>&6
18180 else
18181   
18182         ol_DB_LIB=-ldb-41
18183         ol_LIBS=$LIBS
18184         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18185
18186         cat > conftest.$ac_ext <<EOF
18187 #line 18188 "configure"
18188 #include "confdefs.h"
18189
18190 #ifdef HAVE_DB_185_H
18191 # include <db_185.h>
18192 #else
18193 # include <db.h>
18194 #endif
18195
18196 #ifndef DB_VERSION_MAJOR
18197 # define DB_VERSION_MAJOR 1
18198 #endif
18199
18200 #ifndef NULL
18201 #define NULL ((void*)0)
18202 #endif
18203
18204 int main() {
18205
18206 #if DB_VERSION_MAJOR > 1
18207         {
18208                 char *version;
18209                 int major, minor, patch;
18210
18211                 version = db_version( &major, &minor, &patch );
18212
18213                 if( major != DB_VERSION_MAJOR ||
18214                         minor < DB_VERSION_MINOR )
18215                 {
18216                         printf("Berkeley DB version mismatch\n"
18217                                 "\theader: %s\n\tlibrary: %s\n",
18218                                 DB_VERSION_STRING, version);
18219                         return 1;
18220                 }
18221         }
18222 #endif
18223
18224 #if DB_VERSION_MAJOR > 2
18225         db_env_create( NULL, 0 );
18226 #elif DB_VERSION_MAJOR > 1
18227         db_appexit( NULL );
18228 #else
18229         (void) dbopen( NULL, 0, 0, 0, NULL);
18230 #endif
18231
18232 ; return 0; }
18233 EOF
18234 if { (eval echo configure:18235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18235   rm -rf conftest*
18236   ol_cv_db_db_41=yes
18237 else
18238   echo "configure: failed program was:" >&5
18239   cat conftest.$ac_ext >&5
18240   rm -rf conftest*
18241   ol_cv_db_db_41=no
18242 fi
18243 rm -f conftest*
18244
18245         LIBS="$ol_LIBS"
18246
18247 fi
18248
18249 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18250
18251         if test $ol_cv_db_db_41 = yes ; then
18252                 ol_cv_lib_db=-ldb-41
18253         fi
18254 fi
18255
18256 if test $ol_cv_lib_db = no ; then
18257         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18258 echo "configure:18259: checking for Berkeley DB link (-ldb-4.1)" >&5
18259 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18260   echo $ac_n "(cached) $ac_c" 1>&6
18261 else
18262   
18263         ol_DB_LIB=-ldb-4.1
18264         ol_LIBS=$LIBS
18265         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18266
18267         cat > conftest.$ac_ext <<EOF
18268 #line 18269 "configure"
18269 #include "confdefs.h"
18270
18271 #ifdef HAVE_DB_185_H
18272 # include <db_185.h>
18273 #else
18274 # include <db.h>
18275 #endif
18276
18277 #ifndef DB_VERSION_MAJOR
18278 # define DB_VERSION_MAJOR 1
18279 #endif
18280
18281 #ifndef NULL
18282 #define NULL ((void*)0)
18283 #endif
18284
18285 int main() {
18286
18287 #if DB_VERSION_MAJOR > 1
18288         {
18289                 char *version;
18290                 int major, minor, patch;
18291
18292                 version = db_version( &major, &minor, &patch );
18293
18294                 if( major != DB_VERSION_MAJOR ||
18295                         minor < DB_VERSION_MINOR )
18296                 {
18297                         printf("Berkeley DB version mismatch\n"
18298                                 "\theader: %s\n\tlibrary: %s\n",
18299                                 DB_VERSION_STRING, version);
18300                         return 1;
18301                 }
18302         }
18303 #endif
18304
18305 #if DB_VERSION_MAJOR > 2
18306         db_env_create( NULL, 0 );
18307 #elif DB_VERSION_MAJOR > 1
18308         db_appexit( NULL );
18309 #else
18310         (void) dbopen( NULL, 0, 0, 0, NULL);
18311 #endif
18312
18313 ; return 0; }
18314 EOF
18315 if { (eval echo configure:18316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18316   rm -rf conftest*
18317   ol_cv_db_db_4_dot_1=yes
18318 else
18319   echo "configure: failed program was:" >&5
18320   cat conftest.$ac_ext >&5
18321   rm -rf conftest*
18322   ol_cv_db_db_4_dot_1=no
18323 fi
18324 rm -f conftest*
18325
18326         LIBS="$ol_LIBS"
18327
18328 fi
18329
18330 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18331
18332         if test $ol_cv_db_db_4_dot_1 = yes ; then
18333                 ol_cv_lib_db=-ldb-4.1
18334         fi
18335 fi
18336
18337 if test $ol_cv_lib_db = no ; then
18338         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18339 echo "configure:18340: checking for Berkeley DB link (-ldb-4-1)" >&5
18340 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18341   echo $ac_n "(cached) $ac_c" 1>&6
18342 else
18343   
18344         ol_DB_LIB=-ldb-4-1
18345         ol_LIBS=$LIBS
18346         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18347
18348         cat > conftest.$ac_ext <<EOF
18349 #line 18350 "configure"
18350 #include "confdefs.h"
18351
18352 #ifdef HAVE_DB_185_H
18353 # include <db_185.h>
18354 #else
18355 # include <db.h>
18356 #endif
18357
18358 #ifndef DB_VERSION_MAJOR
18359 # define DB_VERSION_MAJOR 1
18360 #endif
18361
18362 #ifndef NULL
18363 #define NULL ((void*)0)
18364 #endif
18365
18366 int main() {
18367
18368 #if DB_VERSION_MAJOR > 1
18369         {
18370                 char *version;
18371                 int major, minor, patch;
18372
18373                 version = db_version( &major, &minor, &patch );
18374
18375                 if( major != DB_VERSION_MAJOR ||
18376                         minor < DB_VERSION_MINOR )
18377                 {
18378                         printf("Berkeley DB version mismatch\n"
18379                                 "\theader: %s\n\tlibrary: %s\n",
18380                                 DB_VERSION_STRING, version);
18381                         return 1;
18382                 }
18383         }
18384 #endif
18385
18386 #if DB_VERSION_MAJOR > 2
18387         db_env_create( NULL, 0 );
18388 #elif DB_VERSION_MAJOR > 1
18389         db_appexit( NULL );
18390 #else
18391         (void) dbopen( NULL, 0, 0, 0, NULL);
18392 #endif
18393
18394 ; return 0; }
18395 EOF
18396 if { (eval echo configure:18397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18397   rm -rf conftest*
18398   ol_cv_db_db_4_1=yes
18399 else
18400   echo "configure: failed program was:" >&5
18401   cat conftest.$ac_ext >&5
18402   rm -rf conftest*
18403   ol_cv_db_db_4_1=no
18404 fi
18405 rm -f conftest*
18406
18407         LIBS="$ol_LIBS"
18408
18409 fi
18410
18411 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18412
18413         if test $ol_cv_db_db_4_1 = yes ; then
18414                 ol_cv_lib_db=-ldb-4-1
18415         fi
18416 fi
18417
18418 if test $ol_cv_lib_db = no ; then
18419         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18420 echo "configure:18421: checking for Berkeley DB link (-ldb3)" >&5
18421 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18422   echo $ac_n "(cached) $ac_c" 1>&6
18423 else
18424   
18425         ol_DB_LIB=-ldb3
18426         ol_LIBS=$LIBS
18427         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18428
18429         cat > conftest.$ac_ext <<EOF
18430 #line 18431 "configure"
18431 #include "confdefs.h"
18432
18433 #ifdef HAVE_DB_185_H
18434 # include <db_185.h>
18435 #else
18436 # include <db.h>
18437 #endif
18438
18439 #ifndef DB_VERSION_MAJOR
18440 # define DB_VERSION_MAJOR 1
18441 #endif
18442
18443 #ifndef NULL
18444 #define NULL ((void*)0)
18445 #endif
18446
18447 int main() {
18448
18449 #if DB_VERSION_MAJOR > 1
18450         {
18451                 char *version;
18452                 int major, minor, patch;
18453
18454                 version = db_version( &major, &minor, &patch );
18455
18456                 if( major != DB_VERSION_MAJOR ||
18457                         minor < DB_VERSION_MINOR )
18458                 {
18459                         printf("Berkeley DB version mismatch\n"
18460                                 "\theader: %s\n\tlibrary: %s\n",
18461                                 DB_VERSION_STRING, version);
18462                         return 1;
18463                 }
18464         }
18465 #endif
18466
18467 #if DB_VERSION_MAJOR > 2
18468         db_env_create( NULL, 0 );
18469 #elif DB_VERSION_MAJOR > 1
18470         db_appexit( NULL );
18471 #else
18472         (void) dbopen( NULL, 0, 0, 0, NULL);
18473 #endif
18474
18475 ; return 0; }
18476 EOF
18477 if { (eval echo configure:18478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18478   rm -rf conftest*
18479   ol_cv_db_db3=yes
18480 else
18481   echo "configure: failed program was:" >&5
18482   cat conftest.$ac_ext >&5
18483   rm -rf conftest*
18484   ol_cv_db_db3=no
18485 fi
18486 rm -f conftest*
18487
18488         LIBS="$ol_LIBS"
18489
18490 fi
18491
18492 echo "$ac_t""$ol_cv_db_db3" 1>&6
18493
18494         if test $ol_cv_db_db3 = yes ; then
18495                 ol_cv_lib_db=-ldb3
18496         fi
18497 fi
18498
18499 if test $ol_cv_lib_db = no ; then
18500         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18501 echo "configure:18502: checking for Berkeley DB link (-ldb-3)" >&5
18502 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18503   echo $ac_n "(cached) $ac_c" 1>&6
18504 else
18505   
18506         ol_DB_LIB=-ldb-3
18507         ol_LIBS=$LIBS
18508         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18509
18510         cat > conftest.$ac_ext <<EOF
18511 #line 18512 "configure"
18512 #include "confdefs.h"
18513
18514 #ifdef HAVE_DB_185_H
18515 # include <db_185.h>
18516 #else
18517 # include <db.h>
18518 #endif
18519
18520 #ifndef DB_VERSION_MAJOR
18521 # define DB_VERSION_MAJOR 1
18522 #endif
18523
18524 #ifndef NULL
18525 #define NULL ((void*)0)
18526 #endif
18527
18528 int main() {
18529
18530 #if DB_VERSION_MAJOR > 1
18531         {
18532                 char *version;
18533                 int major, minor, patch;
18534
18535                 version = db_version( &major, &minor, &patch );
18536
18537                 if( major != DB_VERSION_MAJOR ||
18538                         minor < DB_VERSION_MINOR )
18539                 {
18540                         printf("Berkeley DB version mismatch\n"
18541                                 "\theader: %s\n\tlibrary: %s\n",
18542                                 DB_VERSION_STRING, version);
18543                         return 1;
18544                 }
18545         }
18546 #endif
18547
18548 #if DB_VERSION_MAJOR > 2
18549         db_env_create( NULL, 0 );
18550 #elif DB_VERSION_MAJOR > 1
18551         db_appexit( NULL );
18552 #else
18553         (void) dbopen( NULL, 0, 0, 0, NULL);
18554 #endif
18555
18556 ; return 0; }
18557 EOF
18558 if { (eval echo configure:18559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18559   rm -rf conftest*
18560   ol_cv_db_db_3=yes
18561 else
18562   echo "configure: failed program was:" >&5
18563   cat conftest.$ac_ext >&5
18564   rm -rf conftest*
18565   ol_cv_db_db_3=no
18566 fi
18567 rm -f conftest*
18568
18569         LIBS="$ol_LIBS"
18570
18571 fi
18572
18573 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18574
18575         if test $ol_cv_db_db_3 = yes ; then
18576                 ol_cv_lib_db=-ldb-3
18577         fi
18578 fi
18579
18580 if test $ol_cv_lib_db = no ; then
18581         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18582 echo "configure:18583: checking for Berkeley DB link (-ldb2)" >&5
18583 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18584   echo $ac_n "(cached) $ac_c" 1>&6
18585 else
18586   
18587         ol_DB_LIB=-ldb2
18588         ol_LIBS=$LIBS
18589         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18590
18591         cat > conftest.$ac_ext <<EOF
18592 #line 18593 "configure"
18593 #include "confdefs.h"
18594
18595 #ifdef HAVE_DB_185_H
18596 # include <db_185.h>
18597 #else
18598 # include <db.h>
18599 #endif
18600
18601 #ifndef DB_VERSION_MAJOR
18602 # define DB_VERSION_MAJOR 1
18603 #endif
18604
18605 #ifndef NULL
18606 #define NULL ((void*)0)
18607 #endif
18608
18609 int main() {
18610
18611 #if DB_VERSION_MAJOR > 1
18612         {
18613                 char *version;
18614                 int major, minor, patch;
18615
18616                 version = db_version( &major, &minor, &patch );
18617
18618                 if( major != DB_VERSION_MAJOR ||
18619                         minor < DB_VERSION_MINOR )
18620                 {
18621                         printf("Berkeley DB version mismatch\n"
18622                                 "\theader: %s\n\tlibrary: %s\n",
18623                                 DB_VERSION_STRING, version);
18624                         return 1;
18625                 }
18626         }
18627 #endif
18628
18629 #if DB_VERSION_MAJOR > 2
18630         db_env_create( NULL, 0 );
18631 #elif DB_VERSION_MAJOR > 1
18632         db_appexit( NULL );
18633 #else
18634         (void) dbopen( NULL, 0, 0, 0, NULL);
18635 #endif
18636
18637 ; return 0; }
18638 EOF
18639 if { (eval echo configure:18640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18640   rm -rf conftest*
18641   ol_cv_db_db2=yes
18642 else
18643   echo "configure: failed program was:" >&5
18644   cat conftest.$ac_ext >&5
18645   rm -rf conftest*
18646   ol_cv_db_db2=no
18647 fi
18648 rm -f conftest*
18649
18650         LIBS="$ol_LIBS"
18651
18652 fi
18653
18654 echo "$ac_t""$ol_cv_db_db2" 1>&6
18655
18656         if test $ol_cv_db_db2 = yes ; then
18657                 ol_cv_lib_db=-ldb2
18658         fi
18659 fi
18660
18661 if test $ol_cv_lib_db = no ; then
18662         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18663 echo "configure:18664: checking for Berkeley DB link (-ldb-2)" >&5
18664 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18665   echo $ac_n "(cached) $ac_c" 1>&6
18666 else
18667   
18668         ol_DB_LIB=-ldb-2
18669         ol_LIBS=$LIBS
18670         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18671
18672         cat > conftest.$ac_ext <<EOF
18673 #line 18674 "configure"
18674 #include "confdefs.h"
18675
18676 #ifdef HAVE_DB_185_H
18677 # include <db_185.h>
18678 #else
18679 # include <db.h>
18680 #endif
18681
18682 #ifndef DB_VERSION_MAJOR
18683 # define DB_VERSION_MAJOR 1
18684 #endif
18685
18686 #ifndef NULL
18687 #define NULL ((void*)0)
18688 #endif
18689
18690 int main() {
18691
18692 #if DB_VERSION_MAJOR > 1
18693         {
18694                 char *version;
18695                 int major, minor, patch;
18696
18697                 version = db_version( &major, &minor, &patch );
18698
18699                 if( major != DB_VERSION_MAJOR ||
18700                         minor < DB_VERSION_MINOR )
18701                 {
18702                         printf("Berkeley DB version mismatch\n"
18703                                 "\theader: %s\n\tlibrary: %s\n",
18704                                 DB_VERSION_STRING, version);
18705                         return 1;
18706                 }
18707         }
18708 #endif
18709
18710 #if DB_VERSION_MAJOR > 2
18711         db_env_create( NULL, 0 );
18712 #elif DB_VERSION_MAJOR > 1
18713         db_appexit( NULL );
18714 #else
18715         (void) dbopen( NULL, 0, 0, 0, NULL);
18716 #endif
18717
18718 ; return 0; }
18719 EOF
18720 if { (eval echo configure:18721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18721   rm -rf conftest*
18722   ol_cv_db_db_2=yes
18723 else
18724   echo "configure: failed program was:" >&5
18725   cat conftest.$ac_ext >&5
18726   rm -rf conftest*
18727   ol_cv_db_db_2=no
18728 fi
18729 rm -f conftest*
18730
18731         LIBS="$ol_LIBS"
18732
18733 fi
18734
18735 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18736
18737         if test $ol_cv_db_db_2 = yes ; then
18738                 ol_cv_lib_db=-ldb-2
18739         fi
18740 fi
18741
18742 if test $ol_cv_lib_db = no ; then
18743         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18744 echo "configure:18745: checking for Berkeley DB link (-ldb1)" >&5
18745 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18746   echo $ac_n "(cached) $ac_c" 1>&6
18747 else
18748   
18749         ol_DB_LIB=-ldb1
18750         ol_LIBS=$LIBS
18751         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18752
18753         cat > conftest.$ac_ext <<EOF
18754 #line 18755 "configure"
18755 #include "confdefs.h"
18756
18757 #ifdef HAVE_DB_185_H
18758 # include <db_185.h>
18759 #else
18760 # include <db.h>
18761 #endif
18762
18763 #ifndef DB_VERSION_MAJOR
18764 # define DB_VERSION_MAJOR 1
18765 #endif
18766
18767 #ifndef NULL
18768 #define NULL ((void*)0)
18769 #endif
18770
18771 int main() {
18772
18773 #if DB_VERSION_MAJOR > 1
18774         {
18775                 char *version;
18776                 int major, minor, patch;
18777
18778                 version = db_version( &major, &minor, &patch );
18779
18780                 if( major != DB_VERSION_MAJOR ||
18781                         minor < DB_VERSION_MINOR )
18782                 {
18783                         printf("Berkeley DB version mismatch\n"
18784                                 "\theader: %s\n\tlibrary: %s\n",
18785                                 DB_VERSION_STRING, version);
18786                         return 1;
18787                 }
18788         }
18789 #endif
18790
18791 #if DB_VERSION_MAJOR > 2
18792         db_env_create( NULL, 0 );
18793 #elif DB_VERSION_MAJOR > 1
18794         db_appexit( NULL );
18795 #else
18796         (void) dbopen( NULL, 0, 0, 0, NULL);
18797 #endif
18798
18799 ; return 0; }
18800 EOF
18801 if { (eval echo configure:18802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18802   rm -rf conftest*
18803   ol_cv_db_db1=yes
18804 else
18805   echo "configure: failed program was:" >&5
18806   cat conftest.$ac_ext >&5
18807   rm -rf conftest*
18808   ol_cv_db_db1=no
18809 fi
18810 rm -f conftest*
18811
18812         LIBS="$ol_LIBS"
18813
18814 fi
18815
18816 echo "$ac_t""$ol_cv_db_db1" 1>&6
18817
18818         if test $ol_cv_db_db1 = yes ; then
18819                 ol_cv_lib_db=-ldb1
18820         fi
18821 fi
18822
18823 if test $ol_cv_lib_db = no ; then
18824         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18825 echo "configure:18826: checking for Berkeley DB link (-ldb-1)" >&5
18826 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18827   echo $ac_n "(cached) $ac_c" 1>&6
18828 else
18829   
18830         ol_DB_LIB=-ldb-1
18831         ol_LIBS=$LIBS
18832         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18833
18834         cat > conftest.$ac_ext <<EOF
18835 #line 18836 "configure"
18836 #include "confdefs.h"
18837
18838 #ifdef HAVE_DB_185_H
18839 # include <db_185.h>
18840 #else
18841 # include <db.h>
18842 #endif
18843
18844 #ifndef DB_VERSION_MAJOR
18845 # define DB_VERSION_MAJOR 1
18846 #endif
18847
18848 #ifndef NULL
18849 #define NULL ((void*)0)
18850 #endif
18851
18852 int main() {
18853
18854 #if DB_VERSION_MAJOR > 1
18855         {
18856                 char *version;
18857                 int major, minor, patch;
18858
18859                 version = db_version( &major, &minor, &patch );
18860
18861                 if( major != DB_VERSION_MAJOR ||
18862                         minor < DB_VERSION_MINOR )
18863                 {
18864                         printf("Berkeley DB version mismatch\n"
18865                                 "\theader: %s\n\tlibrary: %s\n",
18866                                 DB_VERSION_STRING, version);
18867                         return 1;
18868                 }
18869         }
18870 #endif
18871
18872 #if DB_VERSION_MAJOR > 2
18873         db_env_create( NULL, 0 );
18874 #elif DB_VERSION_MAJOR > 1
18875         db_appexit( NULL );
18876 #else
18877         (void) dbopen( NULL, 0, 0, 0, NULL);
18878 #endif
18879
18880 ; return 0; }
18881 EOF
18882 if { (eval echo configure:18883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18883   rm -rf conftest*
18884   ol_cv_db_db_1=yes
18885 else
18886   echo "configure: failed program was:" >&5
18887   cat conftest.$ac_ext >&5
18888   rm -rf conftest*
18889   ol_cv_db_db_1=no
18890 fi
18891 rm -f conftest*
18892
18893         LIBS="$ol_LIBS"
18894
18895 fi
18896
18897 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18898
18899         if test $ol_cv_db_db_1 = yes ; then
18900                 ol_cv_lib_db=-ldb-1
18901         fi
18902 fi
18903
18904
18905                 if test "$ol_cv_lib_db" != no ; then
18906                         ol_cv_berkeley_db=yes
18907                 fi
18908         fi
18909 fi
18910
18911         else
18912                 ol_cv_berkeley_db=no
18913 for ac_hdr in db.h
18914 do
18915 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18916 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18917 echo "configure:18918: checking for $ac_hdr" >&5
18918 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18919   echo $ac_n "(cached) $ac_c" 1>&6
18920 else
18921   cat > conftest.$ac_ext <<EOF
18922 #line 18923 "configure"
18923 #include "confdefs.h"
18924 #include <$ac_hdr>
18925 EOF
18926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18927 { (eval echo configure:18928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18929 if test -z "$ac_err"; then
18930   rm -rf conftest*
18931   eval "ac_cv_header_$ac_safe=yes"
18932 else
18933   echo "$ac_err" >&5
18934   echo "configure: failed program was:" >&5
18935   cat conftest.$ac_ext >&5
18936   rm -rf conftest*
18937   eval "ac_cv_header_$ac_safe=no"
18938 fi
18939 rm -f conftest*
18940 fi
18941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18942   echo "$ac_t""yes" 1>&6
18943     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18944   cat >> confdefs.h <<EOF
18945 #define $ac_tr_hdr 1
18946 EOF
18947  
18948 else
18949   echo "$ac_t""no" 1>&6
18950 fi
18951 done
18952
18953 if test $ac_cv_header_db_h = yes; then
18954         ol_cv_lib_db=no
18955 if test $ol_cv_lib_db = no ; then
18956         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18957 echo "configure:18958: checking for Berkeley DB link (default)" >&5
18958 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18959   echo $ac_n "(cached) $ac_c" 1>&6
18960 else
18961   
18962         ol_DB_LIB=
18963         ol_LIBS=$LIBS
18964         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18965
18966         cat > conftest.$ac_ext <<EOF
18967 #line 18968 "configure"
18968 #include "confdefs.h"
18969
18970 #ifdef HAVE_DB_185_H
18971 # include <db_185.h>
18972 #else
18973 # include <db.h>
18974 #endif
18975
18976 #ifndef DB_VERSION_MAJOR
18977 # define DB_VERSION_MAJOR 1
18978 #endif
18979
18980 #ifndef NULL
18981 #define NULL ((void*)0)
18982 #endif
18983
18984 int main() {
18985
18986 #if DB_VERSION_MAJOR > 1
18987         {
18988                 char *version;
18989                 int major, minor, patch;
18990
18991                 version = db_version( &major, &minor, &patch );
18992
18993                 if( major != DB_VERSION_MAJOR ||
18994                         minor < DB_VERSION_MINOR )
18995                 {
18996                         printf("Berkeley DB version mismatch\n"
18997                                 "\theader: %s\n\tlibrary: %s\n",
18998                                 DB_VERSION_STRING, version);
18999                         return 1;
19000                 }
19001         }
19002 #endif
19003
19004 #if DB_VERSION_MAJOR > 2
19005         db_env_create( NULL, 0 );
19006 #elif DB_VERSION_MAJOR > 1
19007         db_appexit( NULL );
19008 #else
19009         (void) dbopen( NULL, 0, 0, 0, NULL);
19010 #endif
19011
19012 ; return 0; }
19013 EOF
19014 if { (eval echo configure:19015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19015   rm -rf conftest*
19016   ol_cv_db_none=yes
19017 else
19018   echo "configure: failed program was:" >&5
19019   cat conftest.$ac_ext >&5
19020   rm -rf conftest*
19021   ol_cv_db_none=no
19022 fi
19023 rm -f conftest*
19024
19025         LIBS="$ol_LIBS"
19026
19027 fi
19028
19029 echo "$ac_t""$ol_cv_db_none" 1>&6
19030
19031         if test $ol_cv_db_none = yes ; then
19032                 ol_cv_lib_db=yes
19033         fi
19034 fi
19035
19036 if test $ol_cv_lib_db = no ; then
19037         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
19038 echo "configure:19039: checking for Berkeley DB link (-ldb43)" >&5
19039 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
19040   echo $ac_n "(cached) $ac_c" 1>&6
19041 else
19042   
19043         ol_DB_LIB=-ldb43
19044         ol_LIBS=$LIBS
19045         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19046
19047         cat > conftest.$ac_ext <<EOF
19048 #line 19049 "configure"
19049 #include "confdefs.h"
19050
19051 #ifdef HAVE_DB_185_H
19052 # include <db_185.h>
19053 #else
19054 # include <db.h>
19055 #endif
19056
19057 #ifndef DB_VERSION_MAJOR
19058 # define DB_VERSION_MAJOR 1
19059 #endif
19060
19061 #ifndef NULL
19062 #define NULL ((void*)0)
19063 #endif
19064
19065 int main() {
19066
19067 #if DB_VERSION_MAJOR > 1
19068         {
19069                 char *version;
19070                 int major, minor, patch;
19071
19072                 version = db_version( &major, &minor, &patch );
19073
19074                 if( major != DB_VERSION_MAJOR ||
19075                         minor < DB_VERSION_MINOR )
19076                 {
19077                         printf("Berkeley DB version mismatch\n"
19078                                 "\theader: %s\n\tlibrary: %s\n",
19079                                 DB_VERSION_STRING, version);
19080                         return 1;
19081                 }
19082         }
19083 #endif
19084
19085 #if DB_VERSION_MAJOR > 2
19086         db_env_create( NULL, 0 );
19087 #elif DB_VERSION_MAJOR > 1
19088         db_appexit( NULL );
19089 #else
19090         (void) dbopen( NULL, 0, 0, 0, NULL);
19091 #endif
19092
19093 ; return 0; }
19094 EOF
19095 if { (eval echo configure:19096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19096   rm -rf conftest*
19097   ol_cv_db_db43=yes
19098 else
19099   echo "configure: failed program was:" >&5
19100   cat conftest.$ac_ext >&5
19101   rm -rf conftest*
19102   ol_cv_db_db43=no
19103 fi
19104 rm -f conftest*
19105
19106         LIBS="$ol_LIBS"
19107
19108 fi
19109
19110 echo "$ac_t""$ol_cv_db_db43" 1>&6
19111
19112         if test $ol_cv_db_db43 = yes ; then
19113                 ol_cv_lib_db=-ldb43
19114         fi
19115 fi
19116
19117 if test $ol_cv_lib_db = no ; then
19118         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19119 echo "configure:19120: checking for Berkeley DB link (-ldb-43)" >&5
19120 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19121   echo $ac_n "(cached) $ac_c" 1>&6
19122 else
19123   
19124         ol_DB_LIB=-ldb-43
19125         ol_LIBS=$LIBS
19126         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19127
19128         cat > conftest.$ac_ext <<EOF
19129 #line 19130 "configure"
19130 #include "confdefs.h"
19131
19132 #ifdef HAVE_DB_185_H
19133 # include <db_185.h>
19134 #else
19135 # include <db.h>
19136 #endif
19137
19138 #ifndef DB_VERSION_MAJOR
19139 # define DB_VERSION_MAJOR 1
19140 #endif
19141
19142 #ifndef NULL
19143 #define NULL ((void*)0)
19144 #endif
19145
19146 int main() {
19147
19148 #if DB_VERSION_MAJOR > 1
19149         {
19150                 char *version;
19151                 int major, minor, patch;
19152
19153                 version = db_version( &major, &minor, &patch );
19154
19155                 if( major != DB_VERSION_MAJOR ||
19156                         minor < DB_VERSION_MINOR )
19157                 {
19158                         printf("Berkeley DB version mismatch\n"
19159                                 "\theader: %s\n\tlibrary: %s\n",
19160                                 DB_VERSION_STRING, version);
19161                         return 1;
19162                 }
19163         }
19164 #endif
19165
19166 #if DB_VERSION_MAJOR > 2
19167         db_env_create( NULL, 0 );
19168 #elif DB_VERSION_MAJOR > 1
19169         db_appexit( NULL );
19170 #else
19171         (void) dbopen( NULL, 0, 0, 0, NULL);
19172 #endif
19173
19174 ; return 0; }
19175 EOF
19176 if { (eval echo configure:19177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19177   rm -rf conftest*
19178   ol_cv_db_db_43=yes
19179 else
19180   echo "configure: failed program was:" >&5
19181   cat conftest.$ac_ext >&5
19182   rm -rf conftest*
19183   ol_cv_db_db_43=no
19184 fi
19185 rm -f conftest*
19186
19187         LIBS="$ol_LIBS"
19188
19189 fi
19190
19191 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19192
19193         if test $ol_cv_db_db_43 = yes ; then
19194                 ol_cv_lib_db=-ldb-43
19195         fi
19196 fi
19197
19198 if test $ol_cv_lib_db = no ; then
19199         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19200 echo "configure:19201: checking for Berkeley DB link (-ldb-4.3)" >&5
19201 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19202   echo $ac_n "(cached) $ac_c" 1>&6
19203 else
19204   
19205         ol_DB_LIB=-ldb-4.3
19206         ol_LIBS=$LIBS
19207         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19208
19209         cat > conftest.$ac_ext <<EOF
19210 #line 19211 "configure"
19211 #include "confdefs.h"
19212
19213 #ifdef HAVE_DB_185_H
19214 # include <db_185.h>
19215 #else
19216 # include <db.h>
19217 #endif
19218
19219 #ifndef DB_VERSION_MAJOR
19220 # define DB_VERSION_MAJOR 1
19221 #endif
19222
19223 #ifndef NULL
19224 #define NULL ((void*)0)
19225 #endif
19226
19227 int main() {
19228
19229 #if DB_VERSION_MAJOR > 1
19230         {
19231                 char *version;
19232                 int major, minor, patch;
19233
19234                 version = db_version( &major, &minor, &patch );
19235
19236                 if( major != DB_VERSION_MAJOR ||
19237                         minor < DB_VERSION_MINOR )
19238                 {
19239                         printf("Berkeley DB version mismatch\n"
19240                                 "\theader: %s\n\tlibrary: %s\n",
19241                                 DB_VERSION_STRING, version);
19242                         return 1;
19243                 }
19244         }
19245 #endif
19246
19247 #if DB_VERSION_MAJOR > 2
19248         db_env_create( NULL, 0 );
19249 #elif DB_VERSION_MAJOR > 1
19250         db_appexit( NULL );
19251 #else
19252         (void) dbopen( NULL, 0, 0, 0, NULL);
19253 #endif
19254
19255 ; return 0; }
19256 EOF
19257 if { (eval echo configure:19258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19258   rm -rf conftest*
19259   ol_cv_db_db_4_dot_3=yes
19260 else
19261   echo "configure: failed program was:" >&5
19262   cat conftest.$ac_ext >&5
19263   rm -rf conftest*
19264   ol_cv_db_db_4_dot_3=no
19265 fi
19266 rm -f conftest*
19267
19268         LIBS="$ol_LIBS"
19269
19270 fi
19271
19272 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19273
19274         if test $ol_cv_db_db_4_dot_3 = yes ; then
19275                 ol_cv_lib_db=-ldb-4.3
19276         fi
19277 fi
19278
19279 if test $ol_cv_lib_db = no ; then
19280         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19281 echo "configure:19282: checking for Berkeley DB link (-ldb-4-3)" >&5
19282 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19283   echo $ac_n "(cached) $ac_c" 1>&6
19284 else
19285   
19286         ol_DB_LIB=-ldb-4-3
19287         ol_LIBS=$LIBS
19288         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19289
19290         cat > conftest.$ac_ext <<EOF
19291 #line 19292 "configure"
19292 #include "confdefs.h"
19293
19294 #ifdef HAVE_DB_185_H
19295 # include <db_185.h>
19296 #else
19297 # include <db.h>
19298 #endif
19299
19300 #ifndef DB_VERSION_MAJOR
19301 # define DB_VERSION_MAJOR 1
19302 #endif
19303
19304 #ifndef NULL
19305 #define NULL ((void*)0)
19306 #endif
19307
19308 int main() {
19309
19310 #if DB_VERSION_MAJOR > 1
19311         {
19312                 char *version;
19313                 int major, minor, patch;
19314
19315                 version = db_version( &major, &minor, &patch );
19316
19317                 if( major != DB_VERSION_MAJOR ||
19318                         minor < DB_VERSION_MINOR )
19319                 {
19320                         printf("Berkeley DB version mismatch\n"
19321                                 "\theader: %s\n\tlibrary: %s\n",
19322                                 DB_VERSION_STRING, version);
19323                         return 1;
19324                 }
19325         }
19326 #endif
19327
19328 #if DB_VERSION_MAJOR > 2
19329         db_env_create( NULL, 0 );
19330 #elif DB_VERSION_MAJOR > 1
19331         db_appexit( NULL );
19332 #else
19333         (void) dbopen( NULL, 0, 0, 0, NULL);
19334 #endif
19335
19336 ; return 0; }
19337 EOF
19338 if { (eval echo configure:19339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19339   rm -rf conftest*
19340   ol_cv_db_db_4_3=yes
19341 else
19342   echo "configure: failed program was:" >&5
19343   cat conftest.$ac_ext >&5
19344   rm -rf conftest*
19345   ol_cv_db_db_4_3=no
19346 fi
19347 rm -f conftest*
19348
19349         LIBS="$ol_LIBS"
19350
19351 fi
19352
19353 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19354
19355         if test $ol_cv_db_db_4_3 = yes ; then
19356                 ol_cv_lib_db=-ldb-4-3
19357         fi
19358 fi
19359
19360 if test $ol_cv_lib_db = no ; then
19361         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19362 echo "configure:19363: checking for Berkeley DB link (-ldb42)" >&5
19363 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19364   echo $ac_n "(cached) $ac_c" 1>&6
19365 else
19366   
19367         ol_DB_LIB=-ldb42
19368         ol_LIBS=$LIBS
19369         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19370
19371         cat > conftest.$ac_ext <<EOF
19372 #line 19373 "configure"
19373 #include "confdefs.h"
19374
19375 #ifdef HAVE_DB_185_H
19376 # include <db_185.h>
19377 #else
19378 # include <db.h>
19379 #endif
19380
19381 #ifndef DB_VERSION_MAJOR
19382 # define DB_VERSION_MAJOR 1
19383 #endif
19384
19385 #ifndef NULL
19386 #define NULL ((void*)0)
19387 #endif
19388
19389 int main() {
19390
19391 #if DB_VERSION_MAJOR > 1
19392         {
19393                 char *version;
19394                 int major, minor, patch;
19395
19396                 version = db_version( &major, &minor, &patch );
19397
19398                 if( major != DB_VERSION_MAJOR ||
19399                         minor < DB_VERSION_MINOR )
19400                 {
19401                         printf("Berkeley DB version mismatch\n"
19402                                 "\theader: %s\n\tlibrary: %s\n",
19403                                 DB_VERSION_STRING, version);
19404                         return 1;
19405                 }
19406         }
19407 #endif
19408
19409 #if DB_VERSION_MAJOR > 2
19410         db_env_create( NULL, 0 );
19411 #elif DB_VERSION_MAJOR > 1
19412         db_appexit( NULL );
19413 #else
19414         (void) dbopen( NULL, 0, 0, 0, NULL);
19415 #endif
19416
19417 ; return 0; }
19418 EOF
19419 if { (eval echo configure:19420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19420   rm -rf conftest*
19421   ol_cv_db_db42=yes
19422 else
19423   echo "configure: failed program was:" >&5
19424   cat conftest.$ac_ext >&5
19425   rm -rf conftest*
19426   ol_cv_db_db42=no
19427 fi
19428 rm -f conftest*
19429
19430         LIBS="$ol_LIBS"
19431
19432 fi
19433
19434 echo "$ac_t""$ol_cv_db_db42" 1>&6
19435
19436         if test $ol_cv_db_db42 = yes ; then
19437                 ol_cv_lib_db=-ldb42
19438         fi
19439 fi
19440
19441 if test $ol_cv_lib_db = no ; then
19442         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19443 echo "configure:19444: checking for Berkeley DB link (-ldb-42)" >&5
19444 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19445   echo $ac_n "(cached) $ac_c" 1>&6
19446 else
19447   
19448         ol_DB_LIB=-ldb-42
19449         ol_LIBS=$LIBS
19450         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19451
19452         cat > conftest.$ac_ext <<EOF
19453 #line 19454 "configure"
19454 #include "confdefs.h"
19455
19456 #ifdef HAVE_DB_185_H
19457 # include <db_185.h>
19458 #else
19459 # include <db.h>
19460 #endif
19461
19462 #ifndef DB_VERSION_MAJOR
19463 # define DB_VERSION_MAJOR 1
19464 #endif
19465
19466 #ifndef NULL
19467 #define NULL ((void*)0)
19468 #endif
19469
19470 int main() {
19471
19472 #if DB_VERSION_MAJOR > 1
19473         {
19474                 char *version;
19475                 int major, minor, patch;
19476
19477                 version = db_version( &major, &minor, &patch );
19478
19479                 if( major != DB_VERSION_MAJOR ||
19480                         minor < DB_VERSION_MINOR )
19481                 {
19482                         printf("Berkeley DB version mismatch\n"
19483                                 "\theader: %s\n\tlibrary: %s\n",
19484                                 DB_VERSION_STRING, version);
19485                         return 1;
19486                 }
19487         }
19488 #endif
19489
19490 #if DB_VERSION_MAJOR > 2
19491         db_env_create( NULL, 0 );
19492 #elif DB_VERSION_MAJOR > 1
19493         db_appexit( NULL );
19494 #else
19495         (void) dbopen( NULL, 0, 0, 0, NULL);
19496 #endif
19497
19498 ; return 0; }
19499 EOF
19500 if { (eval echo configure:19501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19501   rm -rf conftest*
19502   ol_cv_db_db_42=yes
19503 else
19504   echo "configure: failed program was:" >&5
19505   cat conftest.$ac_ext >&5
19506   rm -rf conftest*
19507   ol_cv_db_db_42=no
19508 fi
19509 rm -f conftest*
19510
19511         LIBS="$ol_LIBS"
19512
19513 fi
19514
19515 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19516
19517         if test $ol_cv_db_db_42 = yes ; then
19518                 ol_cv_lib_db=-ldb-42
19519         fi
19520 fi
19521
19522 if test $ol_cv_lib_db = no ; then
19523         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19524 echo "configure:19525: checking for Berkeley DB link (-ldb-4.2)" >&5
19525 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19526   echo $ac_n "(cached) $ac_c" 1>&6
19527 else
19528   
19529         ol_DB_LIB=-ldb-4.2
19530         ol_LIBS=$LIBS
19531         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19532
19533         cat > conftest.$ac_ext <<EOF
19534 #line 19535 "configure"
19535 #include "confdefs.h"
19536
19537 #ifdef HAVE_DB_185_H
19538 # include <db_185.h>
19539 #else
19540 # include <db.h>
19541 #endif
19542
19543 #ifndef DB_VERSION_MAJOR
19544 # define DB_VERSION_MAJOR 1
19545 #endif
19546
19547 #ifndef NULL
19548 #define NULL ((void*)0)
19549 #endif
19550
19551 int main() {
19552
19553 #if DB_VERSION_MAJOR > 1
19554         {
19555                 char *version;
19556                 int major, minor, patch;
19557
19558                 version = db_version( &major, &minor, &patch );
19559
19560                 if( major != DB_VERSION_MAJOR ||
19561                         minor < DB_VERSION_MINOR )
19562                 {
19563                         printf("Berkeley DB version mismatch\n"
19564                                 "\theader: %s\n\tlibrary: %s\n",
19565                                 DB_VERSION_STRING, version);
19566                         return 1;
19567                 }
19568         }
19569 #endif
19570
19571 #if DB_VERSION_MAJOR > 2
19572         db_env_create( NULL, 0 );
19573 #elif DB_VERSION_MAJOR > 1
19574         db_appexit( NULL );
19575 #else
19576         (void) dbopen( NULL, 0, 0, 0, NULL);
19577 #endif
19578
19579 ; return 0; }
19580 EOF
19581 if { (eval echo configure:19582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19582   rm -rf conftest*
19583   ol_cv_db_db_4_dot_2=yes
19584 else
19585   echo "configure: failed program was:" >&5
19586   cat conftest.$ac_ext >&5
19587   rm -rf conftest*
19588   ol_cv_db_db_4_dot_2=no
19589 fi
19590 rm -f conftest*
19591
19592         LIBS="$ol_LIBS"
19593
19594 fi
19595
19596 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19597
19598         if test $ol_cv_db_db_4_dot_2 = yes ; then
19599                 ol_cv_lib_db=-ldb-4.2
19600         fi
19601 fi
19602
19603 if test $ol_cv_lib_db = no ; then
19604         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19605 echo "configure:19606: checking for Berkeley DB link (-ldb-4-2)" >&5
19606 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19607   echo $ac_n "(cached) $ac_c" 1>&6
19608 else
19609   
19610         ol_DB_LIB=-ldb-4-2
19611         ol_LIBS=$LIBS
19612         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19613
19614         cat > conftest.$ac_ext <<EOF
19615 #line 19616 "configure"
19616 #include "confdefs.h"
19617
19618 #ifdef HAVE_DB_185_H
19619 # include <db_185.h>
19620 #else
19621 # include <db.h>
19622 #endif
19623
19624 #ifndef DB_VERSION_MAJOR
19625 # define DB_VERSION_MAJOR 1
19626 #endif
19627
19628 #ifndef NULL
19629 #define NULL ((void*)0)
19630 #endif
19631
19632 int main() {
19633
19634 #if DB_VERSION_MAJOR > 1
19635         {
19636                 char *version;
19637                 int major, minor, patch;
19638
19639                 version = db_version( &major, &minor, &patch );
19640
19641                 if( major != DB_VERSION_MAJOR ||
19642                         minor < DB_VERSION_MINOR )
19643                 {
19644                         printf("Berkeley DB version mismatch\n"
19645                                 "\theader: %s\n\tlibrary: %s\n",
19646                                 DB_VERSION_STRING, version);
19647                         return 1;
19648                 }
19649         }
19650 #endif
19651
19652 #if DB_VERSION_MAJOR > 2
19653         db_env_create( NULL, 0 );
19654 #elif DB_VERSION_MAJOR > 1
19655         db_appexit( NULL );
19656 #else
19657         (void) dbopen( NULL, 0, 0, 0, NULL);
19658 #endif
19659
19660 ; return 0; }
19661 EOF
19662 if { (eval echo configure:19663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19663   rm -rf conftest*
19664   ol_cv_db_db_4_2=yes
19665 else
19666   echo "configure: failed program was:" >&5
19667   cat conftest.$ac_ext >&5
19668   rm -rf conftest*
19669   ol_cv_db_db_4_2=no
19670 fi
19671 rm -f conftest*
19672
19673         LIBS="$ol_LIBS"
19674
19675 fi
19676
19677 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19678
19679         if test $ol_cv_db_db_4_2 = yes ; then
19680                 ol_cv_lib_db=-ldb-4-2
19681         fi
19682 fi
19683
19684 if test $ol_cv_lib_db = no ; then
19685         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19686 echo "configure:19687: checking for Berkeley DB link (-ldb-4)" >&5
19687 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19688   echo $ac_n "(cached) $ac_c" 1>&6
19689 else
19690   
19691         ol_DB_LIB=-ldb-4
19692         ol_LIBS=$LIBS
19693         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19694
19695         cat > conftest.$ac_ext <<EOF
19696 #line 19697 "configure"
19697 #include "confdefs.h"
19698
19699 #ifdef HAVE_DB_185_H
19700 # include <db_185.h>
19701 #else
19702 # include <db.h>
19703 #endif
19704
19705 #ifndef DB_VERSION_MAJOR
19706 # define DB_VERSION_MAJOR 1
19707 #endif
19708
19709 #ifndef NULL
19710 #define NULL ((void*)0)
19711 #endif
19712
19713 int main() {
19714
19715 #if DB_VERSION_MAJOR > 1
19716         {
19717                 char *version;
19718                 int major, minor, patch;
19719
19720                 version = db_version( &major, &minor, &patch );
19721
19722                 if( major != DB_VERSION_MAJOR ||
19723                         minor < DB_VERSION_MINOR )
19724                 {
19725                         printf("Berkeley DB version mismatch\n"
19726                                 "\theader: %s\n\tlibrary: %s\n",
19727                                 DB_VERSION_STRING, version);
19728                         return 1;
19729                 }
19730         }
19731 #endif
19732
19733 #if DB_VERSION_MAJOR > 2
19734         db_env_create( NULL, 0 );
19735 #elif DB_VERSION_MAJOR > 1
19736         db_appexit( NULL );
19737 #else
19738         (void) dbopen( NULL, 0, 0, 0, NULL);
19739 #endif
19740
19741 ; return 0; }
19742 EOF
19743 if { (eval echo configure:19744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19744   rm -rf conftest*
19745   ol_cv_db_db_4=yes
19746 else
19747   echo "configure: failed program was:" >&5
19748   cat conftest.$ac_ext >&5
19749   rm -rf conftest*
19750   ol_cv_db_db_4=no
19751 fi
19752 rm -f conftest*
19753
19754         LIBS="$ol_LIBS"
19755
19756 fi
19757
19758 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19759
19760         if test $ol_cv_db_db_4 = yes ; then
19761                 ol_cv_lib_db=-ldb-4
19762         fi
19763 fi
19764
19765 if test $ol_cv_lib_db = no ; then
19766         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19767 echo "configure:19768: checking for Berkeley DB link (-ldb4)" >&5
19768 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19769   echo $ac_n "(cached) $ac_c" 1>&6
19770 else
19771   
19772         ol_DB_LIB=-ldb4
19773         ol_LIBS=$LIBS
19774         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19775
19776         cat > conftest.$ac_ext <<EOF
19777 #line 19778 "configure"
19778 #include "confdefs.h"
19779
19780 #ifdef HAVE_DB_185_H
19781 # include <db_185.h>
19782 #else
19783 # include <db.h>
19784 #endif
19785
19786 #ifndef DB_VERSION_MAJOR
19787 # define DB_VERSION_MAJOR 1
19788 #endif
19789
19790 #ifndef NULL
19791 #define NULL ((void*)0)
19792 #endif
19793
19794 int main() {
19795
19796 #if DB_VERSION_MAJOR > 1
19797         {
19798                 char *version;
19799                 int major, minor, patch;
19800
19801                 version = db_version( &major, &minor, &patch );
19802
19803                 if( major != DB_VERSION_MAJOR ||
19804                         minor < DB_VERSION_MINOR )
19805                 {
19806                         printf("Berkeley DB version mismatch\n"
19807                                 "\theader: %s\n\tlibrary: %s\n",
19808                                 DB_VERSION_STRING, version);
19809                         return 1;
19810                 }
19811         }
19812 #endif
19813
19814 #if DB_VERSION_MAJOR > 2
19815         db_env_create( NULL, 0 );
19816 #elif DB_VERSION_MAJOR > 1
19817         db_appexit( NULL );
19818 #else
19819         (void) dbopen( NULL, 0, 0, 0, NULL);
19820 #endif
19821
19822 ; return 0; }
19823 EOF
19824 if { (eval echo configure:19825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19825   rm -rf conftest*
19826   ol_cv_db_db4=yes
19827 else
19828   echo "configure: failed program was:" >&5
19829   cat conftest.$ac_ext >&5
19830   rm -rf conftest*
19831   ol_cv_db_db4=no
19832 fi
19833 rm -f conftest*
19834
19835         LIBS="$ol_LIBS"
19836
19837 fi
19838
19839 echo "$ac_t""$ol_cv_db_db4" 1>&6
19840
19841         if test $ol_cv_db_db4 = yes ; then
19842                 ol_cv_lib_db=-ldb4
19843         fi
19844 fi
19845
19846 if test $ol_cv_lib_db = no ; then
19847         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19848 echo "configure:19849: checking for Berkeley DB link (-ldb)" >&5
19849 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19850   echo $ac_n "(cached) $ac_c" 1>&6
19851 else
19852   
19853         ol_DB_LIB=-ldb
19854         ol_LIBS=$LIBS
19855         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19856
19857         cat > conftest.$ac_ext <<EOF
19858 #line 19859 "configure"
19859 #include "confdefs.h"
19860
19861 #ifdef HAVE_DB_185_H
19862 # include <db_185.h>
19863 #else
19864 # include <db.h>
19865 #endif
19866
19867 #ifndef DB_VERSION_MAJOR
19868 # define DB_VERSION_MAJOR 1
19869 #endif
19870
19871 #ifndef NULL
19872 #define NULL ((void*)0)
19873 #endif
19874
19875 int main() {
19876
19877 #if DB_VERSION_MAJOR > 1
19878         {
19879                 char *version;
19880                 int major, minor, patch;
19881
19882                 version = db_version( &major, &minor, &patch );
19883
19884                 if( major != DB_VERSION_MAJOR ||
19885                         minor < DB_VERSION_MINOR )
19886                 {
19887                         printf("Berkeley DB version mismatch\n"
19888                                 "\theader: %s\n\tlibrary: %s\n",
19889                                 DB_VERSION_STRING, version);
19890                         return 1;
19891                 }
19892         }
19893 #endif
19894
19895 #if DB_VERSION_MAJOR > 2
19896         db_env_create( NULL, 0 );
19897 #elif DB_VERSION_MAJOR > 1
19898         db_appexit( NULL );
19899 #else
19900         (void) dbopen( NULL, 0, 0, 0, NULL);
19901 #endif
19902
19903 ; return 0; }
19904 EOF
19905 if { (eval echo configure:19906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19906   rm -rf conftest*
19907   ol_cv_db_db=yes
19908 else
19909   echo "configure: failed program was:" >&5
19910   cat conftest.$ac_ext >&5
19911   rm -rf conftest*
19912   ol_cv_db_db=no
19913 fi
19914 rm -f conftest*
19915
19916         LIBS="$ol_LIBS"
19917
19918 fi
19919
19920 echo "$ac_t""$ol_cv_db_db" 1>&6
19921
19922         if test $ol_cv_db_db = yes ; then
19923                 ol_cv_lib_db=-ldb
19924         fi
19925 fi
19926
19927 if test $ol_cv_lib_db = no ; then
19928         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19929 echo "configure:19930: checking for Berkeley DB link (-ldb41)" >&5
19930 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19931   echo $ac_n "(cached) $ac_c" 1>&6
19932 else
19933   
19934         ol_DB_LIB=-ldb41
19935         ol_LIBS=$LIBS
19936         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19937
19938         cat > conftest.$ac_ext <<EOF
19939 #line 19940 "configure"
19940 #include "confdefs.h"
19941
19942 #ifdef HAVE_DB_185_H
19943 # include <db_185.h>
19944 #else
19945 # include <db.h>
19946 #endif
19947
19948 #ifndef DB_VERSION_MAJOR
19949 # define DB_VERSION_MAJOR 1
19950 #endif
19951
19952 #ifndef NULL
19953 #define NULL ((void*)0)
19954 #endif
19955
19956 int main() {
19957
19958 #if DB_VERSION_MAJOR > 1
19959         {
19960                 char *version;
19961                 int major, minor, patch;
19962
19963                 version = db_version( &major, &minor, &patch );
19964
19965                 if( major != DB_VERSION_MAJOR ||
19966                         minor < DB_VERSION_MINOR )
19967                 {
19968                         printf("Berkeley DB version mismatch\n"
19969                                 "\theader: %s\n\tlibrary: %s\n",
19970                                 DB_VERSION_STRING, version);
19971                         return 1;
19972                 }
19973         }
19974 #endif
19975
19976 #if DB_VERSION_MAJOR > 2
19977         db_env_create( NULL, 0 );
19978 #elif DB_VERSION_MAJOR > 1
19979         db_appexit( NULL );
19980 #else
19981         (void) dbopen( NULL, 0, 0, 0, NULL);
19982 #endif
19983
19984 ; return 0; }
19985 EOF
19986 if { (eval echo configure:19987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19987   rm -rf conftest*
19988   ol_cv_db_db41=yes
19989 else
19990   echo "configure: failed program was:" >&5
19991   cat conftest.$ac_ext >&5
19992   rm -rf conftest*
19993   ol_cv_db_db41=no
19994 fi
19995 rm -f conftest*
19996
19997         LIBS="$ol_LIBS"
19998
19999 fi
20000
20001 echo "$ac_t""$ol_cv_db_db41" 1>&6
20002
20003         if test $ol_cv_db_db41 = yes ; then
20004                 ol_cv_lib_db=-ldb41
20005         fi
20006 fi
20007
20008 if test $ol_cv_lib_db = no ; then
20009         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
20010 echo "configure:20011: checking for Berkeley DB link (-ldb-41)" >&5
20011 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
20012   echo $ac_n "(cached) $ac_c" 1>&6
20013 else
20014   
20015         ol_DB_LIB=-ldb-41
20016         ol_LIBS=$LIBS
20017         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20018
20019         cat > conftest.$ac_ext <<EOF
20020 #line 20021 "configure"
20021 #include "confdefs.h"
20022
20023 #ifdef HAVE_DB_185_H
20024 # include <db_185.h>
20025 #else
20026 # include <db.h>
20027 #endif
20028
20029 #ifndef DB_VERSION_MAJOR
20030 # define DB_VERSION_MAJOR 1
20031 #endif
20032
20033 #ifndef NULL
20034 #define NULL ((void*)0)
20035 #endif
20036
20037 int main() {
20038
20039 #if DB_VERSION_MAJOR > 1
20040         {
20041                 char *version;
20042                 int major, minor, patch;
20043
20044                 version = db_version( &major, &minor, &patch );
20045
20046                 if( major != DB_VERSION_MAJOR ||
20047                         minor < DB_VERSION_MINOR )
20048                 {
20049                         printf("Berkeley DB version mismatch\n"
20050                                 "\theader: %s\n\tlibrary: %s\n",
20051                                 DB_VERSION_STRING, version);
20052                         return 1;
20053                 }
20054         }
20055 #endif
20056
20057 #if DB_VERSION_MAJOR > 2
20058         db_env_create( NULL, 0 );
20059 #elif DB_VERSION_MAJOR > 1
20060         db_appexit( NULL );
20061 #else
20062         (void) dbopen( NULL, 0, 0, 0, NULL);
20063 #endif
20064
20065 ; return 0; }
20066 EOF
20067 if { (eval echo configure:20068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20068   rm -rf conftest*
20069   ol_cv_db_db_41=yes
20070 else
20071   echo "configure: failed program was:" >&5
20072   cat conftest.$ac_ext >&5
20073   rm -rf conftest*
20074   ol_cv_db_db_41=no
20075 fi
20076 rm -f conftest*
20077
20078         LIBS="$ol_LIBS"
20079
20080 fi
20081
20082 echo "$ac_t""$ol_cv_db_db_41" 1>&6
20083
20084         if test $ol_cv_db_db_41 = yes ; then
20085                 ol_cv_lib_db=-ldb-41
20086         fi
20087 fi
20088
20089 if test $ol_cv_lib_db = no ; then
20090         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
20091 echo "configure:20092: checking for Berkeley DB link (-ldb-4.1)" >&5
20092 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
20093   echo $ac_n "(cached) $ac_c" 1>&6
20094 else
20095   
20096         ol_DB_LIB=-ldb-4.1
20097         ol_LIBS=$LIBS
20098         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20099
20100         cat > conftest.$ac_ext <<EOF
20101 #line 20102 "configure"
20102 #include "confdefs.h"
20103
20104 #ifdef HAVE_DB_185_H
20105 # include <db_185.h>
20106 #else
20107 # include <db.h>
20108 #endif
20109
20110 #ifndef DB_VERSION_MAJOR
20111 # define DB_VERSION_MAJOR 1
20112 #endif
20113
20114 #ifndef NULL
20115 #define NULL ((void*)0)
20116 #endif
20117
20118 int main() {
20119
20120 #if DB_VERSION_MAJOR > 1
20121         {
20122                 char *version;
20123                 int major, minor, patch;
20124
20125                 version = db_version( &major, &minor, &patch );
20126
20127                 if( major != DB_VERSION_MAJOR ||
20128                         minor < DB_VERSION_MINOR )
20129                 {
20130                         printf("Berkeley DB version mismatch\n"
20131                                 "\theader: %s\n\tlibrary: %s\n",
20132                                 DB_VERSION_STRING, version);
20133                         return 1;
20134                 }
20135         }
20136 #endif
20137
20138 #if DB_VERSION_MAJOR > 2
20139         db_env_create( NULL, 0 );
20140 #elif DB_VERSION_MAJOR > 1
20141         db_appexit( NULL );
20142 #else
20143         (void) dbopen( NULL, 0, 0, 0, NULL);
20144 #endif
20145
20146 ; return 0; }
20147 EOF
20148 if { (eval echo configure:20149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20149   rm -rf conftest*
20150   ol_cv_db_db_4_dot_1=yes
20151 else
20152   echo "configure: failed program was:" >&5
20153   cat conftest.$ac_ext >&5
20154   rm -rf conftest*
20155   ol_cv_db_db_4_dot_1=no
20156 fi
20157 rm -f conftest*
20158
20159         LIBS="$ol_LIBS"
20160
20161 fi
20162
20163 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20164
20165         if test $ol_cv_db_db_4_dot_1 = yes ; then
20166                 ol_cv_lib_db=-ldb-4.1
20167         fi
20168 fi
20169
20170 if test $ol_cv_lib_db = no ; then
20171         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20172 echo "configure:20173: checking for Berkeley DB link (-ldb-4-1)" >&5
20173 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20174   echo $ac_n "(cached) $ac_c" 1>&6
20175 else
20176   
20177         ol_DB_LIB=-ldb-4-1
20178         ol_LIBS=$LIBS
20179         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20180
20181         cat > conftest.$ac_ext <<EOF
20182 #line 20183 "configure"
20183 #include "confdefs.h"
20184
20185 #ifdef HAVE_DB_185_H
20186 # include <db_185.h>
20187 #else
20188 # include <db.h>
20189 #endif
20190
20191 #ifndef DB_VERSION_MAJOR
20192 # define DB_VERSION_MAJOR 1
20193 #endif
20194
20195 #ifndef NULL
20196 #define NULL ((void*)0)
20197 #endif
20198
20199 int main() {
20200
20201 #if DB_VERSION_MAJOR > 1
20202         {
20203                 char *version;
20204                 int major, minor, patch;
20205
20206                 version = db_version( &major, &minor, &patch );
20207
20208                 if( major != DB_VERSION_MAJOR ||
20209                         minor < DB_VERSION_MINOR )
20210                 {
20211                         printf("Berkeley DB version mismatch\n"
20212                                 "\theader: %s\n\tlibrary: %s\n",
20213                                 DB_VERSION_STRING, version);
20214                         return 1;
20215                 }
20216         }
20217 #endif
20218
20219 #if DB_VERSION_MAJOR > 2
20220         db_env_create( NULL, 0 );
20221 #elif DB_VERSION_MAJOR > 1
20222         db_appexit( NULL );
20223 #else
20224         (void) dbopen( NULL, 0, 0, 0, NULL);
20225 #endif
20226
20227 ; return 0; }
20228 EOF
20229 if { (eval echo configure:20230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20230   rm -rf conftest*
20231   ol_cv_db_db_4_1=yes
20232 else
20233   echo "configure: failed program was:" >&5
20234   cat conftest.$ac_ext >&5
20235   rm -rf conftest*
20236   ol_cv_db_db_4_1=no
20237 fi
20238 rm -f conftest*
20239
20240         LIBS="$ol_LIBS"
20241
20242 fi
20243
20244 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20245
20246         if test $ol_cv_db_db_4_1 = yes ; then
20247                 ol_cv_lib_db=-ldb-4-1
20248         fi
20249 fi
20250
20251 if test $ol_cv_lib_db = no ; then
20252         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20253 echo "configure:20254: checking for Berkeley DB link (-ldb3)" >&5
20254 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20255   echo $ac_n "(cached) $ac_c" 1>&6
20256 else
20257   
20258         ol_DB_LIB=-ldb3
20259         ol_LIBS=$LIBS
20260         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20261
20262         cat > conftest.$ac_ext <<EOF
20263 #line 20264 "configure"
20264 #include "confdefs.h"
20265
20266 #ifdef HAVE_DB_185_H
20267 # include <db_185.h>
20268 #else
20269 # include <db.h>
20270 #endif
20271
20272 #ifndef DB_VERSION_MAJOR
20273 # define DB_VERSION_MAJOR 1
20274 #endif
20275
20276 #ifndef NULL
20277 #define NULL ((void*)0)
20278 #endif
20279
20280 int main() {
20281
20282 #if DB_VERSION_MAJOR > 1
20283         {
20284                 char *version;
20285                 int major, minor, patch;
20286
20287                 version = db_version( &major, &minor, &patch );
20288
20289                 if( major != DB_VERSION_MAJOR ||
20290                         minor < DB_VERSION_MINOR )
20291                 {
20292                         printf("Berkeley DB version mismatch\n"
20293                                 "\theader: %s\n\tlibrary: %s\n",
20294                                 DB_VERSION_STRING, version);
20295                         return 1;
20296                 }
20297         }
20298 #endif
20299
20300 #if DB_VERSION_MAJOR > 2
20301         db_env_create( NULL, 0 );
20302 #elif DB_VERSION_MAJOR > 1
20303         db_appexit( NULL );
20304 #else
20305         (void) dbopen( NULL, 0, 0, 0, NULL);
20306 #endif
20307
20308 ; return 0; }
20309 EOF
20310 if { (eval echo configure:20311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20311   rm -rf conftest*
20312   ol_cv_db_db3=yes
20313 else
20314   echo "configure: failed program was:" >&5
20315   cat conftest.$ac_ext >&5
20316   rm -rf conftest*
20317   ol_cv_db_db3=no
20318 fi
20319 rm -f conftest*
20320
20321         LIBS="$ol_LIBS"
20322
20323 fi
20324
20325 echo "$ac_t""$ol_cv_db_db3" 1>&6
20326
20327         if test $ol_cv_db_db3 = yes ; then
20328                 ol_cv_lib_db=-ldb3
20329         fi
20330 fi
20331
20332 if test $ol_cv_lib_db = no ; then
20333         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20334 echo "configure:20335: checking for Berkeley DB link (-ldb-3)" >&5
20335 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20336   echo $ac_n "(cached) $ac_c" 1>&6
20337 else
20338   
20339         ol_DB_LIB=-ldb-3
20340         ol_LIBS=$LIBS
20341         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20342
20343         cat > conftest.$ac_ext <<EOF
20344 #line 20345 "configure"
20345 #include "confdefs.h"
20346
20347 #ifdef HAVE_DB_185_H
20348 # include <db_185.h>
20349 #else
20350 # include <db.h>
20351 #endif
20352
20353 #ifndef DB_VERSION_MAJOR
20354 # define DB_VERSION_MAJOR 1
20355 #endif
20356
20357 #ifndef NULL
20358 #define NULL ((void*)0)
20359 #endif
20360
20361 int main() {
20362
20363 #if DB_VERSION_MAJOR > 1
20364         {
20365                 char *version;
20366                 int major, minor, patch;
20367
20368                 version = db_version( &major, &minor, &patch );
20369
20370                 if( major != DB_VERSION_MAJOR ||
20371                         minor < DB_VERSION_MINOR )
20372                 {
20373                         printf("Berkeley DB version mismatch\n"
20374                                 "\theader: %s\n\tlibrary: %s\n",
20375                                 DB_VERSION_STRING, version);
20376                         return 1;
20377                 }
20378         }
20379 #endif
20380
20381 #if DB_VERSION_MAJOR > 2
20382         db_env_create( NULL, 0 );
20383 #elif DB_VERSION_MAJOR > 1
20384         db_appexit( NULL );
20385 #else
20386         (void) dbopen( NULL, 0, 0, 0, NULL);
20387 #endif
20388
20389 ; return 0; }
20390 EOF
20391 if { (eval echo configure:20392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20392   rm -rf conftest*
20393   ol_cv_db_db_3=yes
20394 else
20395   echo "configure: failed program was:" >&5
20396   cat conftest.$ac_ext >&5
20397   rm -rf conftest*
20398   ol_cv_db_db_3=no
20399 fi
20400 rm -f conftest*
20401
20402         LIBS="$ol_LIBS"
20403
20404 fi
20405
20406 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20407
20408         if test $ol_cv_db_db_3 = yes ; then
20409                 ol_cv_lib_db=-ldb-3
20410         fi
20411 fi
20412
20413 if test $ol_cv_lib_db = no ; then
20414         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20415 echo "configure:20416: checking for Berkeley DB link (-ldb2)" >&5
20416 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20417   echo $ac_n "(cached) $ac_c" 1>&6
20418 else
20419   
20420         ol_DB_LIB=-ldb2
20421         ol_LIBS=$LIBS
20422         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20423
20424         cat > conftest.$ac_ext <<EOF
20425 #line 20426 "configure"
20426 #include "confdefs.h"
20427
20428 #ifdef HAVE_DB_185_H
20429 # include <db_185.h>
20430 #else
20431 # include <db.h>
20432 #endif
20433
20434 #ifndef DB_VERSION_MAJOR
20435 # define DB_VERSION_MAJOR 1
20436 #endif
20437
20438 #ifndef NULL
20439 #define NULL ((void*)0)
20440 #endif
20441
20442 int main() {
20443
20444 #if DB_VERSION_MAJOR > 1
20445         {
20446                 char *version;
20447                 int major, minor, patch;
20448
20449                 version = db_version( &major, &minor, &patch );
20450
20451                 if( major != DB_VERSION_MAJOR ||
20452                         minor < DB_VERSION_MINOR )
20453                 {
20454                         printf("Berkeley DB version mismatch\n"
20455                                 "\theader: %s\n\tlibrary: %s\n",
20456                                 DB_VERSION_STRING, version);
20457                         return 1;
20458                 }
20459         }
20460 #endif
20461
20462 #if DB_VERSION_MAJOR > 2
20463         db_env_create( NULL, 0 );
20464 #elif DB_VERSION_MAJOR > 1
20465         db_appexit( NULL );
20466 #else
20467         (void) dbopen( NULL, 0, 0, 0, NULL);
20468 #endif
20469
20470 ; return 0; }
20471 EOF
20472 if { (eval echo configure:20473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20473   rm -rf conftest*
20474   ol_cv_db_db2=yes
20475 else
20476   echo "configure: failed program was:" >&5
20477   cat conftest.$ac_ext >&5
20478   rm -rf conftest*
20479   ol_cv_db_db2=no
20480 fi
20481 rm -f conftest*
20482
20483         LIBS="$ol_LIBS"
20484
20485 fi
20486
20487 echo "$ac_t""$ol_cv_db_db2" 1>&6
20488
20489         if test $ol_cv_db_db2 = yes ; then
20490                 ol_cv_lib_db=-ldb2
20491         fi
20492 fi
20493
20494 if test $ol_cv_lib_db = no ; then
20495         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20496 echo "configure:20497: checking for Berkeley DB link (-ldb-2)" >&5
20497 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20498   echo $ac_n "(cached) $ac_c" 1>&6
20499 else
20500   
20501         ol_DB_LIB=-ldb-2
20502         ol_LIBS=$LIBS
20503         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20504
20505         cat > conftest.$ac_ext <<EOF
20506 #line 20507 "configure"
20507 #include "confdefs.h"
20508
20509 #ifdef HAVE_DB_185_H
20510 # include <db_185.h>
20511 #else
20512 # include <db.h>
20513 #endif
20514
20515 #ifndef DB_VERSION_MAJOR
20516 # define DB_VERSION_MAJOR 1
20517 #endif
20518
20519 #ifndef NULL
20520 #define NULL ((void*)0)
20521 #endif
20522
20523 int main() {
20524
20525 #if DB_VERSION_MAJOR > 1
20526         {
20527                 char *version;
20528                 int major, minor, patch;
20529
20530                 version = db_version( &major, &minor, &patch );
20531
20532                 if( major != DB_VERSION_MAJOR ||
20533                         minor < DB_VERSION_MINOR )
20534                 {
20535                         printf("Berkeley DB version mismatch\n"
20536                                 "\theader: %s\n\tlibrary: %s\n",
20537                                 DB_VERSION_STRING, version);
20538                         return 1;
20539                 }
20540         }
20541 #endif
20542
20543 #if DB_VERSION_MAJOR > 2
20544         db_env_create( NULL, 0 );
20545 #elif DB_VERSION_MAJOR > 1
20546         db_appexit( NULL );
20547 #else
20548         (void) dbopen( NULL, 0, 0, 0, NULL);
20549 #endif
20550
20551 ; return 0; }
20552 EOF
20553 if { (eval echo configure:20554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20554   rm -rf conftest*
20555   ol_cv_db_db_2=yes
20556 else
20557   echo "configure: failed program was:" >&5
20558   cat conftest.$ac_ext >&5
20559   rm -rf conftest*
20560   ol_cv_db_db_2=no
20561 fi
20562 rm -f conftest*
20563
20564         LIBS="$ol_LIBS"
20565
20566 fi
20567
20568 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20569
20570         if test $ol_cv_db_db_2 = yes ; then
20571                 ol_cv_lib_db=-ldb-2
20572         fi
20573 fi
20574
20575 if test $ol_cv_lib_db = no ; then
20576         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20577 echo "configure:20578: checking for Berkeley DB link (-ldb1)" >&5
20578 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20579   echo $ac_n "(cached) $ac_c" 1>&6
20580 else
20581   
20582         ol_DB_LIB=-ldb1
20583         ol_LIBS=$LIBS
20584         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20585
20586         cat > conftest.$ac_ext <<EOF
20587 #line 20588 "configure"
20588 #include "confdefs.h"
20589
20590 #ifdef HAVE_DB_185_H
20591 # include <db_185.h>
20592 #else
20593 # include <db.h>
20594 #endif
20595
20596 #ifndef DB_VERSION_MAJOR
20597 # define DB_VERSION_MAJOR 1
20598 #endif
20599
20600 #ifndef NULL
20601 #define NULL ((void*)0)
20602 #endif
20603
20604 int main() {
20605
20606 #if DB_VERSION_MAJOR > 1
20607         {
20608                 char *version;
20609                 int major, minor, patch;
20610
20611                 version = db_version( &major, &minor, &patch );
20612
20613                 if( major != DB_VERSION_MAJOR ||
20614                         minor < DB_VERSION_MINOR )
20615                 {
20616                         printf("Berkeley DB version mismatch\n"
20617                                 "\theader: %s\n\tlibrary: %s\n",
20618                                 DB_VERSION_STRING, version);
20619                         return 1;
20620                 }
20621         }
20622 #endif
20623
20624 #if DB_VERSION_MAJOR > 2
20625         db_env_create( NULL, 0 );
20626 #elif DB_VERSION_MAJOR > 1
20627         db_appexit( NULL );
20628 #else
20629         (void) dbopen( NULL, 0, 0, 0, NULL);
20630 #endif
20631
20632 ; return 0; }
20633 EOF
20634 if { (eval echo configure:20635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20635   rm -rf conftest*
20636   ol_cv_db_db1=yes
20637 else
20638   echo "configure: failed program was:" >&5
20639   cat conftest.$ac_ext >&5
20640   rm -rf conftest*
20641   ol_cv_db_db1=no
20642 fi
20643 rm -f conftest*
20644
20645         LIBS="$ol_LIBS"
20646
20647 fi
20648
20649 echo "$ac_t""$ol_cv_db_db1" 1>&6
20650
20651         if test $ol_cv_db_db1 = yes ; then
20652                 ol_cv_lib_db=-ldb1
20653         fi
20654 fi
20655
20656 if test $ol_cv_lib_db = no ; then
20657         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20658 echo "configure:20659: checking for Berkeley DB link (-ldb-1)" >&5
20659 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20660   echo $ac_n "(cached) $ac_c" 1>&6
20661 else
20662   
20663         ol_DB_LIB=-ldb-1
20664         ol_LIBS=$LIBS
20665         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20666
20667         cat > conftest.$ac_ext <<EOF
20668 #line 20669 "configure"
20669 #include "confdefs.h"
20670
20671 #ifdef HAVE_DB_185_H
20672 # include <db_185.h>
20673 #else
20674 # include <db.h>
20675 #endif
20676
20677 #ifndef DB_VERSION_MAJOR
20678 # define DB_VERSION_MAJOR 1
20679 #endif
20680
20681 #ifndef NULL
20682 #define NULL ((void*)0)
20683 #endif
20684
20685 int main() {
20686
20687 #if DB_VERSION_MAJOR > 1
20688         {
20689                 char *version;
20690                 int major, minor, patch;
20691
20692                 version = db_version( &major, &minor, &patch );
20693
20694                 if( major != DB_VERSION_MAJOR ||
20695                         minor < DB_VERSION_MINOR )
20696                 {
20697                         printf("Berkeley DB version mismatch\n"
20698                                 "\theader: %s\n\tlibrary: %s\n",
20699                                 DB_VERSION_STRING, version);
20700                         return 1;
20701                 }
20702         }
20703 #endif
20704
20705 #if DB_VERSION_MAJOR > 2
20706         db_env_create( NULL, 0 );
20707 #elif DB_VERSION_MAJOR > 1
20708         db_appexit( NULL );
20709 #else
20710         (void) dbopen( NULL, 0, 0, 0, NULL);
20711 #endif
20712
20713 ; return 0; }
20714 EOF
20715 if { (eval echo configure:20716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20716   rm -rf conftest*
20717   ol_cv_db_db_1=yes
20718 else
20719   echo "configure: failed program was:" >&5
20720   cat conftest.$ac_ext >&5
20721   rm -rf conftest*
20722   ol_cv_db_db_1=no
20723 fi
20724 rm -f conftest*
20725
20726         LIBS="$ol_LIBS"
20727
20728 fi
20729
20730 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20731
20732         if test $ol_cv_db_db_1 = yes ; then
20733                 ol_cv_lib_db=-ldb-1
20734         fi
20735 fi
20736
20737
20738         if test "$ol_cv_lib_db" != no ; then
20739                 ol_cv_berkeley_db=yes
20740                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20741 echo "configure:20742: checking for Berkeley DB version match" >&5
20742 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20743   echo $ac_n "(cached) $ac_c" 1>&6
20744 else
20745   
20746         ol_LIBS="$LIBS"
20747         LIBS="$LTHREAD_LIBS $LIBS"
20748         if test $ol_cv_lib_db != yes ; then
20749                 LIBS="$ol_cv_lib_db $LIBS"
20750         fi
20751
20752         if test "$cross_compiling" = yes; then
20753   ol_cv_berkeley_db_version=cross
20754 else
20755   cat > conftest.$ac_ext <<EOF
20756 #line 20757 "configure"
20757 #include "confdefs.h"
20758
20759 #ifdef HAVE_DB_185_H
20760         choke me;
20761 #else
20762 #include <db.h>
20763 #endif
20764 #ifndef DB_VERSION_MAJOR
20765 # define DB_VERSION_MAJOR 1
20766 #endif
20767 #ifndef NULL
20768 #define NULL ((void *)0)
20769 #endif
20770 main()
20771 {
20772 #if DB_VERSION_MAJOR > 1
20773         char *version;
20774         int major, minor, patch;
20775
20776         version = db_version( &major, &minor, &patch );
20777
20778         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
20779                 printf("Berkeley DB version mismatch\n"
20780                         "\theader: %s\n\tlibrary: %s\n",
20781                         DB_VERSION_STRING, version);
20782                 return 1;
20783         }
20784 #endif
20785
20786         return 0;
20787 }
20788 EOF
20789 if { (eval echo configure:20790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20790 then
20791   ol_cv_berkeley_db_version=yes
20792 else
20793   echo "configure: failed program was:" >&5
20794   cat conftest.$ac_ext >&5
20795   rm -fr conftest*
20796   ol_cv_berkeley_db_version=no
20797 fi
20798 rm -fr conftest*
20799 fi
20800
20801
20802         LIBS="$ol_LIBS"
20803
20804 fi
20805
20806 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20807
20808         if test $ol_cv_berkeley_db_version = no ; then
20809                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20810         fi
20811
20812                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20813 echo "configure:20814: checking for Berkeley DB thread support" >&5
20814 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20815   echo $ac_n "(cached) $ac_c" 1>&6
20816 else
20817   
20818         ol_LIBS="$LIBS"
20819         LIBS="$LTHREAD_LIBS $LIBS"
20820         if test $ol_cv_lib_db != yes ; then
20821                 LIBS="$ol_cv_lib_db $LIBS"
20822         fi
20823
20824         if test "$cross_compiling" = yes; then
20825   ol_cv_berkeley_db_thread=cross
20826 else
20827   cat > conftest.$ac_ext <<EOF
20828 #line 20829 "configure"
20829 #include "confdefs.h"
20830
20831 #ifdef HAVE_DB_185_H
20832         choke me;
20833 #else
20834 #include <db.h>
20835 #endif
20836 #ifndef NULL
20837 #define NULL ((void *)0)
20838 #endif
20839 main()
20840 {
20841         int rc;
20842         u_int32_t flags = DB_CREATE |
20843 #ifdef DB_PRIVATE
20844                 DB_PRIVATE |
20845 #endif
20846                 DB_THREAD;
20847
20848 #if DB_VERSION_MAJOR > 2
20849         DB_ENV *env = NULL;
20850
20851         rc = db_env_create( &env, 0 );
20852
20853         flags |= DB_INIT_MPOOL;
20854 #ifdef DB_MPOOL_PRIVATE
20855         flags |= DB_MPOOL_PRIVATE;
20856 #endif
20857
20858         if( rc ) {
20859                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20860                 return rc;
20861         }
20862
20863 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20864         rc = env->open( env, NULL, flags, 0 );
20865 #else
20866         rc = env->open( env, NULL, NULL, flags, 0 );
20867 #endif
20868
20869         if ( rc == 0 ) {
20870                 rc = env->close( env, 0 );
20871         }
20872
20873         if( rc ) {
20874                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20875                 return rc;
20876         }
20877
20878 #else
20879         DB_ENV env;
20880         memset( &env, '\0', sizeof(env) );
20881
20882         rc = db_appinit( NULL, NULL, &env, flags );
20883
20884         if( rc == 0 ) {
20885                 db_appexit( &env );
20886         }
20887
20888         unlink("__db_mpool.share");
20889         unlink("__db_lock.share");
20890 #endif
20891
20892         return rc;
20893 }
20894 EOF
20895 if { (eval echo configure:20896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20896 then
20897   ol_cv_berkeley_db_thread=yes
20898 else
20899   echo "configure: failed program was:" >&5
20900   cat conftest.$ac_ext >&5
20901   rm -fr conftest*
20902   ol_cv_berkeley_db_thread=no
20903 fi
20904 rm -fr conftest*
20905 fi
20906
20907
20908         LIBS="$ol_LIBS"
20909
20910 fi
20911
20912 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20913
20914         if test $ol_cv_berkeley_db_thread != no ; then
20915                 cat >> confdefs.h <<\EOF
20916 #define HAVE_BERKELEY_DB_THREAD 1
20917 EOF
20918
20919         fi
20920
20921         fi
20922 fi
20923
20924         fi
20925
20926         if test $ol_cv_berkeley_db != no ; then
20927                 cat >> confdefs.h <<\EOF
20928 #define HAVE_BERKELEY_DB 1
20929 EOF
20930
20931
20932                 ol_link_ldbm=berkeley
20933                 ol_with_ldbm_api=berkeley
20934
20935                 if test $ol_with_ldbm_type = hash ; then
20936                         cat >> confdefs.h <<\EOF
20937 #define LDBM_USE_DBHASH 1
20938 EOF
20939
20940                 else
20941                         cat >> confdefs.h <<\EOF
20942 #define LDBM_USE_DBBTREE 1
20943 EOF
20944
20945                 fi
20946
20947                                                 if test $ol_cv_lib_db != yes ; then
20948                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20949                 fi
20950         fi
20951 fi
20952
20953 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20954         if test $ol_link_ldbm != berkeley ; then
20955                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20956         else
20957                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20958 echo "configure:20959: checking Berkeley DB version for BDB backend" >&5
20959 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20960   echo $ac_n "(cached) $ac_c" 1>&6
20961 else
20962   
20963         cat > conftest.$ac_ext <<EOF
20964 #line 20965 "configure"
20965 #include "confdefs.h"
20966
20967 #include <db.h>
20968
20969  /* this check could be improved */
20970 #ifndef DB_VERSION_MAJOR
20971 #       define DB_VERSION_MAJOR 1
20972 #endif
20973 #ifndef DB_VERSION_MINOR
20974 #       define DB_VERSION_MINOR 0
20975 #endif
20976
20977 /* require 4.2 or later */
20978 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20979         __db_version_compat
20980 #endif
20981         
20982 EOF
20983 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20984   egrep "__db_version_compat" >/dev/null 2>&1; then
20985   rm -rf conftest*
20986   ol_cv_bdb_compat=yes
20987 else
20988   rm -rf conftest*
20989   ol_cv_bdb_compat=no
20990 fi
20991 rm -f conftest*
20992
20993 fi
20994
20995 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20996
20997
20998                 if test $ol_cv_bdb_compat != yes ; then
20999                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
21000                 fi
21001         fi
21002 fi
21003
21004 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
21005         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
21006         ol_with_ldbm_api=none
21007 fi
21008
21009 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
21010         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
21011 echo "configure:21012: checking for MDBM library" >&5
21012 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
21013   echo $ac_n "(cached) $ac_c" 1>&6
21014 else
21015         ol_LIBS="$LIBS"
21016         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
21017 echo "configure:21018: checking for mdbm_set_chain" >&5
21018 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
21019   echo $ac_n "(cached) $ac_c" 1>&6
21020 else
21021   cat > conftest.$ac_ext <<EOF
21022 #line 21023 "configure"
21023 #include "confdefs.h"
21024 /* System header to define __stub macros and hopefully few prototypes,
21025     which can conflict with char mdbm_set_chain(); below.  */
21026 #include <assert.h>
21027 /* Override any gcc2 internal prototype to avoid an error.  */
21028 /* We use char because int might match the return type of a gcc2
21029     builtin and then its argument prototype would still apply.  */
21030 char mdbm_set_chain();
21031 char (*f)();
21032
21033 int main() {
21034
21035 /* The GNU C library defines this for functions which it implements
21036     to always fail with ENOSYS.  Some functions are actually named
21037     something starting with __ and the normal name is an alias.  */
21038 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
21039 choke me
21040 #else
21041 f = mdbm_set_chain;
21042 #endif
21043
21044 ; return 0; }
21045 EOF
21046 if { (eval echo configure:21047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21047   rm -rf conftest*
21048   eval "ac_cv_func_mdbm_set_chain=yes"
21049 else
21050   echo "configure: failed program was:" >&5
21051   cat conftest.$ac_ext >&5
21052   rm -rf conftest*
21053   eval "ac_cv_func_mdbm_set_chain=no"
21054 fi
21055 rm -f conftest*
21056 fi
21057
21058 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
21059   echo "$ac_t""yes" 1>&6
21060   ol_cv_lib_mdbm=yes
21061 else
21062   echo "$ac_t""no" 1>&6
21063
21064                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
21065 echo "configure:21066: checking for mdbm_set_chain in -lmdbm" >&5
21066 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
21067 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21068   echo $ac_n "(cached) $ac_c" 1>&6
21069 else
21070   ac_save_LIBS="$LIBS"
21071 LIBS="-lmdbm  $LIBS"
21072 cat > conftest.$ac_ext <<EOF
21073 #line 21074 "configure"
21074 #include "confdefs.h"
21075 /* Override any gcc2 internal prototype to avoid an error.  */
21076 /* We use char because int might match the return type of a gcc2
21077     builtin and then its argument prototype would still apply.  */
21078 char mdbm_set_chain();
21079
21080 int main() {
21081 mdbm_set_chain()
21082 ; return 0; }
21083 EOF
21084 if { (eval echo configure:21085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21085   rm -rf conftest*
21086   eval "ac_cv_lib_$ac_lib_var=yes"
21087 else
21088   echo "configure: failed program was:" >&5
21089   cat conftest.$ac_ext >&5
21090   rm -rf conftest*
21091   eval "ac_cv_lib_$ac_lib_var=no"
21092 fi
21093 rm -f conftest*
21094 LIBS="$ac_save_LIBS"
21095
21096 fi
21097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21098   echo "$ac_t""yes" 1>&6
21099   ol_cv_lib_mdbm=-lmdbm
21100 else
21101   echo "$ac_t""no" 1>&6
21102 ol_cv_lib_mdbm=no
21103 fi
21104
21105         
21106 fi
21107
21108         LIBS="$ol_LIBS"
21109
21110 fi
21111
21112 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
21113
21114
21115  for ac_hdr in mdbm.h
21116 do
21117 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21118 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21119 echo "configure:21120: checking for $ac_hdr" >&5
21120 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21121   echo $ac_n "(cached) $ac_c" 1>&6
21122 else
21123   cat > conftest.$ac_ext <<EOF
21124 #line 21125 "configure"
21125 #include "confdefs.h"
21126 #include <$ac_hdr>
21127 EOF
21128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21129 { (eval echo configure:21130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21131 if test -z "$ac_err"; then
21132   rm -rf conftest*
21133   eval "ac_cv_header_$ac_safe=yes"
21134 else
21135   echo "$ac_err" >&5
21136   echo "configure: failed program was:" >&5
21137   cat conftest.$ac_ext >&5
21138   rm -rf conftest*
21139   eval "ac_cv_header_$ac_safe=no"
21140 fi
21141 rm -f conftest*
21142 fi
21143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21144   echo "$ac_t""yes" 1>&6
21145     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21146   cat >> confdefs.h <<EOF
21147 #define $ac_tr_hdr 1
21148 EOF
21149  
21150 else
21151   echo "$ac_t""no" 1>&6
21152 fi
21153 done
21154
21155  echo $ac_n "checking for db""... $ac_c" 1>&6
21156 echo "configure:21157: checking for db" >&5
21157 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21158   echo $ac_n "(cached) $ac_c" 1>&6
21159 else
21160   
21161         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21162                 ol_cv_mdbm=no
21163         else
21164                 ol_cv_mdbm=yes
21165         fi
21166
21167 fi
21168
21169 echo "$ac_t""$ol_cv_mdbm" 1>&6
21170  if test $ol_cv_mdbm = yes ; then
21171         cat >> confdefs.h <<\EOF
21172 #define HAVE_MDBM 1
21173 EOF
21174
21175  fi
21176
21177
21178         if test $ol_cv_mdbm = yes ; then
21179                 ol_link_ldbm=mdbm
21180                 ol_with_ldbm_api=mdbm
21181                 if test $ol_cv_lib_mdbm != yes ; then
21182                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21183                 fi
21184         fi
21185 fi
21186
21187 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21188         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21189 echo "configure:21190: checking for GDBM library" >&5
21190 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21191   echo $ac_n "(cached) $ac_c" 1>&6
21192 else
21193         ol_LIBS="$LIBS"
21194         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21195 echo "configure:21196: checking for gdbm_open" >&5
21196 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21197   echo $ac_n "(cached) $ac_c" 1>&6
21198 else
21199   cat > conftest.$ac_ext <<EOF
21200 #line 21201 "configure"
21201 #include "confdefs.h"
21202 /* System header to define __stub macros and hopefully few prototypes,
21203     which can conflict with char gdbm_open(); below.  */
21204 #include <assert.h>
21205 /* Override any gcc2 internal prototype to avoid an error.  */
21206 /* We use char because int might match the return type of a gcc2
21207     builtin and then its argument prototype would still apply.  */
21208 char gdbm_open();
21209 char (*f)();
21210
21211 int main() {
21212
21213 /* The GNU C library defines this for functions which it implements
21214     to always fail with ENOSYS.  Some functions are actually named
21215     something starting with __ and the normal name is an alias.  */
21216 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21217 choke me
21218 #else
21219 f = gdbm_open;
21220 #endif
21221
21222 ; return 0; }
21223 EOF
21224 if { (eval echo configure:21225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21225   rm -rf conftest*
21226   eval "ac_cv_func_gdbm_open=yes"
21227 else
21228   echo "configure: failed program was:" >&5
21229   cat conftest.$ac_ext >&5
21230   rm -rf conftest*
21231   eval "ac_cv_func_gdbm_open=no"
21232 fi
21233 rm -f conftest*
21234 fi
21235
21236 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21237   echo "$ac_t""yes" 1>&6
21238   ol_cv_lib_gdbm=yes
21239 else
21240   echo "$ac_t""no" 1>&6
21241
21242                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21243 echo "configure:21244: checking for gdbm_open in -lgdbm" >&5
21244 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21245 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21246   echo $ac_n "(cached) $ac_c" 1>&6
21247 else
21248   ac_save_LIBS="$LIBS"
21249 LIBS="-lgdbm  $LIBS"
21250 cat > conftest.$ac_ext <<EOF
21251 #line 21252 "configure"
21252 #include "confdefs.h"
21253 /* Override any gcc2 internal prototype to avoid an error.  */
21254 /* We use char because int might match the return type of a gcc2
21255     builtin and then its argument prototype would still apply.  */
21256 char gdbm_open();
21257
21258 int main() {
21259 gdbm_open()
21260 ; return 0; }
21261 EOF
21262 if { (eval echo configure:21263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21263   rm -rf conftest*
21264   eval "ac_cv_lib_$ac_lib_var=yes"
21265 else
21266   echo "configure: failed program was:" >&5
21267   cat conftest.$ac_ext >&5
21268   rm -rf conftest*
21269   eval "ac_cv_lib_$ac_lib_var=no"
21270 fi
21271 rm -f conftest*
21272 LIBS="$ac_save_LIBS"
21273
21274 fi
21275 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21276   echo "$ac_t""yes" 1>&6
21277   ol_cv_lib_gdbm=-lgdbm
21278 else
21279   echo "$ac_t""no" 1>&6
21280 ol_cv_lib_gdbm=no
21281 fi
21282
21283         
21284 fi
21285
21286         LIBS="$ol_LIBS"
21287
21288 fi
21289
21290 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21291
21292
21293  for ac_hdr in gdbm.h
21294 do
21295 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21296 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21297 echo "configure:21298: checking for $ac_hdr" >&5
21298 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21299   echo $ac_n "(cached) $ac_c" 1>&6
21300 else
21301   cat > conftest.$ac_ext <<EOF
21302 #line 21303 "configure"
21303 #include "confdefs.h"
21304 #include <$ac_hdr>
21305 EOF
21306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21307 { (eval echo configure:21308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21309 if test -z "$ac_err"; then
21310   rm -rf conftest*
21311   eval "ac_cv_header_$ac_safe=yes"
21312 else
21313   echo "$ac_err" >&5
21314   echo "configure: failed program was:" >&5
21315   cat conftest.$ac_ext >&5
21316   rm -rf conftest*
21317   eval "ac_cv_header_$ac_safe=no"
21318 fi
21319 rm -f conftest*
21320 fi
21321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21322   echo "$ac_t""yes" 1>&6
21323     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21324   cat >> confdefs.h <<EOF
21325 #define $ac_tr_hdr 1
21326 EOF
21327  
21328 else
21329   echo "$ac_t""no" 1>&6
21330 fi
21331 done
21332
21333  echo $ac_n "checking for db""... $ac_c" 1>&6
21334 echo "configure:21335: checking for db" >&5
21335 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21336   echo $ac_n "(cached) $ac_c" 1>&6
21337 else
21338   
21339         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21340                 ol_cv_gdbm=no
21341         else
21342                 ol_cv_gdbm=yes
21343         fi
21344
21345 fi
21346
21347 echo "$ac_t""$ol_cv_gdbm" 1>&6
21348  if test $ol_cv_gdbm = yes ; then
21349         cat >> confdefs.h <<\EOF
21350 #define HAVE_GDBM 1
21351 EOF
21352
21353  fi
21354
21355
21356         if test $ol_cv_gdbm = yes ; then
21357                 ol_link_ldbm=gdbm
21358                 ol_with_ldbm_api=gdbm
21359
21360                 if test $ol_cv_lib_gdbm != yes ; then
21361                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21362                 fi
21363         fi
21364 fi
21365
21366 if test $ol_with_ldbm_api = ndbm ; then
21367         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21368 echo "configure:21369: checking for NDBM library" >&5
21369 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21370   echo $ac_n "(cached) $ac_c" 1>&6
21371 else
21372         ol_LIBS="$LIBS"
21373         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21374 echo "configure:21375: checking for dbm_open" >&5
21375 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21376   echo $ac_n "(cached) $ac_c" 1>&6
21377 else
21378   cat > conftest.$ac_ext <<EOF
21379 #line 21380 "configure"
21380 #include "confdefs.h"
21381 /* System header to define __stub macros and hopefully few prototypes,
21382     which can conflict with char dbm_open(); below.  */
21383 #include <assert.h>
21384 /* Override any gcc2 internal prototype to avoid an error.  */
21385 /* We use char because int might match the return type of a gcc2
21386     builtin and then its argument prototype would still apply.  */
21387 char dbm_open();
21388 char (*f)();
21389
21390 int main() {
21391
21392 /* The GNU C library defines this for functions which it implements
21393     to always fail with ENOSYS.  Some functions are actually named
21394     something starting with __ and the normal name is an alias.  */
21395 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21396 choke me
21397 #else
21398 f = dbm_open;
21399 #endif
21400
21401 ; return 0; }
21402 EOF
21403 if { (eval echo configure:21404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21404   rm -rf conftest*
21405   eval "ac_cv_func_dbm_open=yes"
21406 else
21407   echo "configure: failed program was:" >&5
21408   cat conftest.$ac_ext >&5
21409   rm -rf conftest*
21410   eval "ac_cv_func_dbm_open=no"
21411 fi
21412 rm -f conftest*
21413 fi
21414
21415 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21416   echo "$ac_t""yes" 1>&6
21417   ol_cv_lib_ndbm=yes
21418 else
21419   echo "$ac_t""no" 1>&6
21420
21421                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21422 echo "configure:21423: checking for dbm_open in -lndbm" >&5
21423 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21424 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21425   echo $ac_n "(cached) $ac_c" 1>&6
21426 else
21427   ac_save_LIBS="$LIBS"
21428 LIBS="-lndbm  $LIBS"
21429 cat > conftest.$ac_ext <<EOF
21430 #line 21431 "configure"
21431 #include "confdefs.h"
21432 /* Override any gcc2 internal prototype to avoid an error.  */
21433 /* We use char because int might match the return type of a gcc2
21434     builtin and then its argument prototype would still apply.  */
21435 char dbm_open();
21436
21437 int main() {
21438 dbm_open()
21439 ; return 0; }
21440 EOF
21441 if { (eval echo configure:21442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21442   rm -rf conftest*
21443   eval "ac_cv_lib_$ac_lib_var=yes"
21444 else
21445   echo "configure: failed program was:" >&5
21446   cat conftest.$ac_ext >&5
21447   rm -rf conftest*
21448   eval "ac_cv_lib_$ac_lib_var=no"
21449 fi
21450 rm -f conftest*
21451 LIBS="$ac_save_LIBS"
21452
21453 fi
21454 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21455   echo "$ac_t""yes" 1>&6
21456   ol_cv_lib_ndbm=-lndbm
21457 else
21458   echo "$ac_t""no" 1>&6
21459
21460                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21461 echo "configure:21462: checking for dbm_open in -ldbm" >&5
21462 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21463 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21464   echo $ac_n "(cached) $ac_c" 1>&6
21465 else
21466   ac_save_LIBS="$LIBS"
21467 LIBS="-ldbm  $LIBS"
21468 cat > conftest.$ac_ext <<EOF
21469 #line 21470 "configure"
21470 #include "confdefs.h"
21471 /* Override any gcc2 internal prototype to avoid an error.  */
21472 /* We use char because int might match the return type of a gcc2
21473     builtin and then its argument prototype would still apply.  */
21474 char dbm_open();
21475
21476 int main() {
21477 dbm_open()
21478 ; return 0; }
21479 EOF
21480 if { (eval echo configure:21481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21481   rm -rf conftest*
21482   eval "ac_cv_lib_$ac_lib_var=yes"
21483 else
21484   echo "configure: failed program was:" >&5
21485   cat conftest.$ac_ext >&5
21486   rm -rf conftest*
21487   eval "ac_cv_lib_$ac_lib_var=no"
21488 fi
21489 rm -f conftest*
21490 LIBS="$ac_save_LIBS"
21491
21492 fi
21493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21494   echo "$ac_t""yes" 1>&6
21495   ol_cv_lib_ndbm=-ldbm
21496 else
21497   echo "$ac_t""no" 1>&6
21498 ol_cv_lib_ndbm=no
21499 fi
21500                 
21501 fi
21502
21503         
21504 fi
21505
21506         LIBS="$ol_LIBS"
21507
21508 fi
21509
21510 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21511
21512
21513  for ac_hdr in ndbm.h
21514 do
21515 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21516 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21517 echo "configure:21518: checking for $ac_hdr" >&5
21518 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21519   echo $ac_n "(cached) $ac_c" 1>&6
21520 else
21521   cat > conftest.$ac_ext <<EOF
21522 #line 21523 "configure"
21523 #include "confdefs.h"
21524 #include <$ac_hdr>
21525 EOF
21526 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21527 { (eval echo configure:21528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21528 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21529 if test -z "$ac_err"; then
21530   rm -rf conftest*
21531   eval "ac_cv_header_$ac_safe=yes"
21532 else
21533   echo "$ac_err" >&5
21534   echo "configure: failed program was:" >&5
21535   cat conftest.$ac_ext >&5
21536   rm -rf conftest*
21537   eval "ac_cv_header_$ac_safe=no"
21538 fi
21539 rm -f conftest*
21540 fi
21541 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21542   echo "$ac_t""yes" 1>&6
21543     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21544   cat >> confdefs.h <<EOF
21545 #define $ac_tr_hdr 1
21546 EOF
21547  
21548 else
21549   echo "$ac_t""no" 1>&6
21550 fi
21551 done
21552
21553  echo $ac_n "checking for db""... $ac_c" 1>&6
21554 echo "configure:21555: checking for db" >&5
21555 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21556   echo $ac_n "(cached) $ac_c" 1>&6
21557 else
21558   
21559         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21560                 ol_cv_ndbm=no
21561         else
21562                 ol_cv_ndbm=yes
21563         fi
21564
21565 fi
21566
21567 echo "$ac_t""$ol_cv_ndbm" 1>&6
21568  if test $ol_cv_ndbm = yes ; then
21569         cat >> confdefs.h <<\EOF
21570 #define HAVE_NDBM 1
21571 EOF
21572
21573  fi
21574
21575
21576         if test $ol_cv_ndbm = yes ; then
21577                 ol_link_ldbm=ndbm
21578                 ol_with_ldbm_api=ndbm
21579
21580                 if test $ol_cv_lib_ndbm != yes ; then
21581                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21582                 fi
21583         fi
21584 fi
21585
21586 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21587         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21588 fi
21589
21590 if test $ol_enable_bdb = yes -o \
21591         $ol_enable_hdb = yes -o \
21592         $ol_enable_ldbm = yes ; then
21593         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21594 fi
21595
21596
21597 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21598         BUILD_LIBS_DYNAMIC=shared
21599         cat >> confdefs.h <<\EOF
21600 #define LDAP_LIBS_DYNAMIC 1
21601 EOF
21602
21603         LTSTATIC=""
21604 else
21605         BUILD_LIBS_DYNAMIC=static
21606         LTSTATIC="-static"
21607 fi
21608
21609 if test $ol_enable_wrappers != no ; then
21610         for ac_hdr in tcpd.h
21611 do
21612 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21613 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21614 echo "configure:21615: checking for $ac_hdr" >&5
21615 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21616   echo $ac_n "(cached) $ac_c" 1>&6
21617 else
21618   cat > conftest.$ac_ext <<EOF
21619 #line 21620 "configure"
21620 #include "confdefs.h"
21621 #include <$ac_hdr>
21622 EOF
21623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21624 { (eval echo configure:21625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21626 if test -z "$ac_err"; then
21627   rm -rf conftest*
21628   eval "ac_cv_header_$ac_safe=yes"
21629 else
21630   echo "$ac_err" >&5
21631   echo "configure: failed program was:" >&5
21632   cat conftest.$ac_ext >&5
21633   rm -rf conftest*
21634   eval "ac_cv_header_$ac_safe=no"
21635 fi
21636 rm -f conftest*
21637 fi
21638 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21639   echo "$ac_t""yes" 1>&6
21640     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21641   cat >> confdefs.h <<EOF
21642 #define $ac_tr_hdr 1
21643 EOF
21644  
21645                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21646 echo "configure:21647: checking for TCP wrappers library" >&5
21647                 save_LIBS="$LIBS"
21648                 LIBS="$LIBS -lwrap"
21649                 cat > conftest.$ac_ext <<EOF
21650 #line 21651 "configure"
21651 #include "confdefs.h"
21652
21653 #include <tcpd.h>
21654 int allow_severity = 0;
21655 int deny_severity  = 0;
21656
21657 struct request_info *req;
21658                 
21659 int main() {
21660
21661 hosts_access(req)
21662                 
21663 ; return 0; }
21664 EOF
21665 if { (eval echo configure:21666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21666   rm -rf conftest*
21667   echo "$ac_t""-lwrap" 1>&6
21668                 have_wrappers=yes
21669                 LIBS="$save_LIBS"
21670 else
21671   echo "configure: failed program was:" >&5
21672   cat conftest.$ac_ext >&5
21673   rm -rf conftest*
21674   
21675                                 LIBS="$LIBS -lnsl"
21676                 cat > conftest.$ac_ext <<EOF
21677 #line 21678 "configure"
21678 #include "confdefs.h"
21679
21680 #include <tcpd.h>
21681 int allow_severity = 0;
21682 int deny_severity  = 0;
21683
21684 struct request_info *req;
21685                 
21686 int main() {
21687
21688 hosts_access(req)
21689                 
21690 ; return 0; }
21691 EOF
21692 if { (eval echo configure:21693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21693   rm -rf conftest*
21694   echo "$ac_t""-lwrap -lnsl" 1>&6
21695                 have_wrappers=yes
21696                 LIBS="$save_LIBS -lnsl"
21697 else
21698   echo "configure: failed program was:" >&5
21699   cat conftest.$ac_ext >&5
21700   rm -rf conftest*
21701   
21702                 echo "$ac_t""no" 1>&6
21703                 have_wrappers=no
21704                 LIBS=$save_LIBS
21705 fi
21706 rm -f conftest*
21707 fi
21708 rm -f conftest*
21709 else
21710   echo "$ac_t""no" 1>&6
21711 have_wrappers=no
21712 fi
21713 done
21714
21715
21716         if test $have_wrappers = yes ; then
21717                 cat >> confdefs.h <<\EOF
21718 #define HAVE_TCPD 1
21719 EOF
21720
21721                 WRAP_LIBS="-lwrap"
21722         elif test $ol_enable_wrappers = yes ; then
21723                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21724         else
21725                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21726                 WRAP_LIBS=""
21727         fi
21728 fi
21729
21730 if test $ol_enable_syslog != no ; then
21731         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21732 echo "configure:21733: checking for openlog" >&5
21733 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21734   echo $ac_n "(cached) $ac_c" 1>&6
21735 else
21736   cat > conftest.$ac_ext <<EOF
21737 #line 21738 "configure"
21738 #include "confdefs.h"
21739 /* System header to define __stub macros and hopefully few prototypes,
21740     which can conflict with char openlog(); below.  */
21741 #include <assert.h>
21742 /* Override any gcc2 internal prototype to avoid an error.  */
21743 /* We use char because int might match the return type of a gcc2
21744     builtin and then its argument prototype would still apply.  */
21745 char openlog();
21746 char (*f)();
21747
21748 int main() {
21749
21750 /* The GNU C library defines this for functions which it implements
21751     to always fail with ENOSYS.  Some functions are actually named
21752     something starting with __ and the normal name is an alias.  */
21753 #if defined (__stub_openlog) || defined (__stub___openlog)
21754 choke me
21755 #else
21756 f = openlog;
21757 #endif
21758
21759 ; return 0; }
21760 EOF
21761 if { (eval echo configure:21762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21762   rm -rf conftest*
21763   eval "ac_cv_func_openlog=yes"
21764 else
21765   echo "configure: failed program was:" >&5
21766   cat conftest.$ac_ext >&5
21767   rm -rf conftest*
21768   eval "ac_cv_func_openlog=no"
21769 fi
21770 rm -f conftest*
21771 fi
21772
21773 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21774   echo "$ac_t""yes" 1>&6
21775   :
21776 else
21777   echo "$ac_t""no" 1>&6
21778 fi
21779
21780         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21781                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21782         fi
21783         ol_enable_syslog=$ac_cv_func_openlog
21784 fi
21785
21786
21787 ol_link_sql=no
21788 if test $ol_enable_sql != no ; then
21789         for ac_hdr in sql.h sqlext.h
21790 do
21791 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21792 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21793 echo "configure:21794: checking for $ac_hdr" >&5
21794 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21795   echo $ac_n "(cached) $ac_c" 1>&6
21796 else
21797   cat > conftest.$ac_ext <<EOF
21798 #line 21799 "configure"
21799 #include "confdefs.h"
21800 #include <$ac_hdr>
21801 EOF
21802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21803 { (eval echo configure:21804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21805 if test -z "$ac_err"; then
21806   rm -rf conftest*
21807   eval "ac_cv_header_$ac_safe=yes"
21808 else
21809   echo "$ac_err" >&5
21810   echo "configure: failed program was:" >&5
21811   cat conftest.$ac_ext >&5
21812   rm -rf conftest*
21813   eval "ac_cv_header_$ac_safe=no"
21814 fi
21815 rm -f conftest*
21816 fi
21817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21818   echo "$ac_t""yes" 1>&6
21819     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21820   cat >> confdefs.h <<EOF
21821 #define $ac_tr_hdr 1
21822 EOF
21823  
21824 else
21825   echo "$ac_t""no" 1>&6
21826 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21827         
21828 fi
21829 done
21830
21831
21832         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21833 echo "configure:21834: checking for SQLDriverConnect in -liodbc" >&5
21834 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21835 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21836   echo $ac_n "(cached) $ac_c" 1>&6
21837 else
21838   ac_save_LIBS="$LIBS"
21839 LIBS="-liodbc  $LIBS"
21840 cat > conftest.$ac_ext <<EOF
21841 #line 21842 "configure"
21842 #include "confdefs.h"
21843 /* Override any gcc2 internal prototype to avoid an error.  */
21844 /* We use char because int might match the return type of a gcc2
21845     builtin and then its argument prototype would still apply.  */
21846 char SQLDriverConnect();
21847
21848 int main() {
21849 SQLDriverConnect()
21850 ; return 0; }
21851 EOF
21852 if { (eval echo configure:21853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21853   rm -rf conftest*
21854   eval "ac_cv_lib_$ac_lib_var=yes"
21855 else
21856   echo "configure: failed program was:" >&5
21857   cat conftest.$ac_ext >&5
21858   rm -rf conftest*
21859   eval "ac_cv_lib_$ac_lib_var=no"
21860 fi
21861 rm -f conftest*
21862 LIBS="$ac_save_LIBS"
21863
21864 fi
21865 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21866   echo "$ac_t""yes" 1>&6
21867   have_iodbc=yes
21868 else
21869   echo "$ac_t""no" 1>&6
21870 have_iodbc=no
21871 fi
21872
21873         if test $have_iodbc = yes ; then
21874                 ol_link_sql="-liodbc"
21875         else
21876                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21877 echo "configure:21878: checking for SQLDriverConnect in -lodbc" >&5
21878 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21879 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21880   echo $ac_n "(cached) $ac_c" 1>&6
21881 else
21882   ac_save_LIBS="$LIBS"
21883 LIBS="-lodbc  $LIBS"
21884 cat > conftest.$ac_ext <<EOF
21885 #line 21886 "configure"
21886 #include "confdefs.h"
21887 /* Override any gcc2 internal prototype to avoid an error.  */
21888 /* We use char because int might match the return type of a gcc2
21889     builtin and then its argument prototype would still apply.  */
21890 char SQLDriverConnect();
21891
21892 int main() {
21893 SQLDriverConnect()
21894 ; return 0; }
21895 EOF
21896 if { (eval echo configure:21897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21897   rm -rf conftest*
21898   eval "ac_cv_lib_$ac_lib_var=yes"
21899 else
21900   echo "configure: failed program was:" >&5
21901   cat conftest.$ac_ext >&5
21902   rm -rf conftest*
21903   eval "ac_cv_lib_$ac_lib_var=no"
21904 fi
21905 rm -f conftest*
21906 LIBS="$ac_save_LIBS"
21907
21908 fi
21909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21910   echo "$ac_t""yes" 1>&6
21911   have_odbc=yes
21912 else
21913   echo "$ac_t""no" 1>&6
21914 have_odbc=no
21915 fi
21916
21917                 if test $have_odbc = yes ; then
21918                         ol_link_sql="-lodbc"
21919                 fi
21920         fi
21921
21922         if test $ol_link_sql != no ; then
21923                 SLAPD_SQL_LIBS="$ol_link_sql"
21924
21925         elif test $ol_enable_sql != auto ; then
21926                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21927         fi
21928 fi
21929
21930 WITH_SASL=no
21931 ol_link_sasl=no
21932 ol_link_spasswd=no
21933 if test $ol_with_cyrus_sasl != no ; then
21934         for ac_hdr in sasl/sasl.h sasl.h
21935 do
21936 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21937 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21938 echo "configure:21939: checking for $ac_hdr" >&5
21939 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21940   echo $ac_n "(cached) $ac_c" 1>&6
21941 else
21942   cat > conftest.$ac_ext <<EOF
21943 #line 21944 "configure"
21944 #include "confdefs.h"
21945 #include <$ac_hdr>
21946 EOF
21947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21948 { (eval echo configure:21949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21950 if test -z "$ac_err"; then
21951   rm -rf conftest*
21952   eval "ac_cv_header_$ac_safe=yes"
21953 else
21954   echo "$ac_err" >&5
21955   echo "configure: failed program was:" >&5
21956   cat conftest.$ac_ext >&5
21957   rm -rf conftest*
21958   eval "ac_cv_header_$ac_safe=no"
21959 fi
21960 rm -f conftest*
21961 fi
21962 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21963   echo "$ac_t""yes" 1>&6
21964     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21965   cat >> confdefs.h <<EOF
21966 #define $ac_tr_hdr 1
21967 EOF
21968  
21969 else
21970   echo "$ac_t""no" 1>&6
21971 fi
21972 done
21973
21974
21975         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21976                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21977 echo "configure:21978: checking for sasl_client_init in -lsasl2" >&5
21978 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21979 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21980   echo $ac_n "(cached) $ac_c" 1>&6
21981 else
21982   ac_save_LIBS="$LIBS"
21983 LIBS="-lsasl2  $LIBS"
21984 cat > conftest.$ac_ext <<EOF
21985 #line 21986 "configure"
21986 #include "confdefs.h"
21987 /* Override any gcc2 internal prototype to avoid an error.  */
21988 /* We use char because int might match the return type of a gcc2
21989     builtin and then its argument prototype would still apply.  */
21990 char sasl_client_init();
21991
21992 int main() {
21993 sasl_client_init()
21994 ; return 0; }
21995 EOF
21996 if { (eval echo configure:21997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21997   rm -rf conftest*
21998   eval "ac_cv_lib_$ac_lib_var=yes"
21999 else
22000   echo "configure: failed program was:" >&5
22001   cat conftest.$ac_ext >&5
22002   rm -rf conftest*
22003   eval "ac_cv_lib_$ac_lib_var=no"
22004 fi
22005 rm -f conftest*
22006 LIBS="$ac_save_LIBS"
22007
22008 fi
22009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22010   echo "$ac_t""yes" 1>&6
22011   ol_link_sasl="-lsasl2"
22012 else
22013   echo "$ac_t""no" 1>&6
22014 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
22015 echo "configure:22016: checking for sasl_client_init in -lsasl" >&5
22016 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
22017 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22018   echo $ac_n "(cached) $ac_c" 1>&6
22019 else
22020   ac_save_LIBS="$LIBS"
22021 LIBS="-lsasl  $LIBS"
22022 cat > conftest.$ac_ext <<EOF
22023 #line 22024 "configure"
22024 #include "confdefs.h"
22025 /* Override any gcc2 internal prototype to avoid an error.  */
22026 /* We use char because int might match the return type of a gcc2
22027     builtin and then its argument prototype would still apply.  */
22028 char sasl_client_init();
22029
22030 int main() {
22031 sasl_client_init()
22032 ; return 0; }
22033 EOF
22034 if { (eval echo configure:22035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22035   rm -rf conftest*
22036   eval "ac_cv_lib_$ac_lib_var=yes"
22037 else
22038   echo "configure: failed program was:" >&5
22039   cat conftest.$ac_ext >&5
22040   rm -rf conftest*
22041   eval "ac_cv_lib_$ac_lib_var=no"
22042 fi
22043 rm -f conftest*
22044 LIBS="$ac_save_LIBS"
22045
22046 fi
22047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22048   echo "$ac_t""yes" 1>&6
22049   ol_link_sasl="-lsasl"
22050 else
22051   echo "$ac_t""no" 1>&6
22052 fi
22053
22054 fi
22055
22056         fi
22057
22058         if test $ol_link_sasl = no ; then
22059                 if test $ol_with_cyrus_sasl != auto ; then
22060                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
22061                 else
22062                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
22063                         echo "configure: warning: SASL authentication not supported!" 1>&2
22064                         if test $ol_link_tls = no ; then
22065                                 echo "configure: warning: Strong authentication not supported!" 1>&2
22066                         fi
22067                 fi
22068         else
22069                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
22070 echo "configure:22071: checking Cyrus SASL library version" >&5
22071 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
22072   echo $ac_n "(cached) $ac_c" 1>&6
22073 else
22074   
22075         cat > conftest.$ac_ext <<EOF
22076 #line 22077 "configure"
22077 #include "confdefs.h"
22078
22079 #ifdef HAVE_SASL_SASL_H
22080 #include <sasl/sasl.h>
22081 #else
22082 #include <sasl.h>
22083 #endif
22084
22085 /* Require 2.1.15+ */
22086 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22087         char *__sasl_compat = "2.2+ or better okay (we guess)";
22088 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22089         && SASL_VERSION_STEP >=15
22090         char *__sasl_compat = "2.1.15+ or better okay";
22091 #endif
22092         
22093 EOF
22094 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22095   egrep "__sasl_compat" >/dev/null 2>&1; then
22096   rm -rf conftest*
22097   ol_cv_sasl_compat=yes
22098 else
22099   rm -rf conftest*
22100   ol_cv_sasl_compat=no
22101 fi
22102 rm -f conftest*
22103
22104 fi
22105
22106 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
22107
22108                 if test $ol_cv_sasl_compat = no ; then
22109                         ol_link_sasl=no
22110                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
22111                 fi
22112
22113                 cat >> confdefs.h <<\EOF
22114 #define HAVE_CYRUS_SASL 1
22115 EOF
22116
22117                 SASL_LIBS="$ol_link_sasl"
22118                 if test $ol_enable_spasswd != no ; then
22119                         ol_link_spasswd=yes
22120                 fi
22121
22122                 ac_save_LIBS="$LIBS"
22123                 LIBS="$LIBS $ol_link_sasl"
22124                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22125 echo "configure:22126: checking for sasl_version" >&5
22126 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22127   echo $ac_n "(cached) $ac_c" 1>&6
22128 else
22129   cat > conftest.$ac_ext <<EOF
22130 #line 22131 "configure"
22131 #include "confdefs.h"
22132 /* System header to define __stub macros and hopefully few prototypes,
22133     which can conflict with char sasl_version(); below.  */
22134 #include <assert.h>
22135 /* Override any gcc2 internal prototype to avoid an error.  */
22136 /* We use char because int might match the return type of a gcc2
22137     builtin and then its argument prototype would still apply.  */
22138 char sasl_version();
22139 char (*f)();
22140
22141 int main() {
22142
22143 /* The GNU C library defines this for functions which it implements
22144     to always fail with ENOSYS.  Some functions are actually named
22145     something starting with __ and the normal name is an alias.  */
22146 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22147 choke me
22148 #else
22149 f = sasl_version;
22150 #endif
22151
22152 ; return 0; }
22153 EOF
22154 if { (eval echo configure:22155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22155   rm -rf conftest*
22156   eval "ac_cv_func_sasl_version=yes"
22157 else
22158   echo "configure: failed program was:" >&5
22159   cat conftest.$ac_ext >&5
22160   rm -rf conftest*
22161   eval "ac_cv_func_sasl_version=no"
22162 fi
22163 rm -f conftest*
22164 fi
22165
22166 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22167   echo "$ac_t""yes" 1>&6
22168   cat >> confdefs.h <<\EOF
22169 #define HAVE_SASL_VERSION 1
22170 EOF
22171
22172 else
22173   echo "$ac_t""no" 1>&6
22174 fi
22175
22176                 LIBS="$ac_save_LIBS"
22177
22178                 WITH_SASL=yes
22179         fi
22180
22181 else
22182         echo "configure: warning: SASL authentication not supported!" 1>&2
22183         if test $ol_link_tls = no ; then
22184                 echo "configure: warning: Strong authentication not supported!" 1>&2
22185         fi
22186 fi
22187
22188 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22189         dev=no
22190         if test -r /dev/urandom ; then
22191                 dev="/dev/urandom";
22192         elif test -r /idev/urandom ; then
22193                 dev="/idev/urandom";
22194         elif test -r /dev/srandom ; then
22195                 dev="/dev/srandom";
22196         elif test -r /dev/random ; then
22197                 dev="/dev/random";
22198         elif test -r /idev/random ; then
22199                 dev="/idev/random";
22200         fi
22201
22202         if test $dev != no ; then
22203                 cat >> confdefs.h <<EOF
22204 #define URANDOM_DEVICE "$dev"
22205 EOF
22206
22207         fi
22208 fi
22209
22210 ol_link_fetch=no
22211 if test $ol_with_fetch != no ; then
22212         ol_LIBS=$LIBS
22213 LIBS="-lfetch -lcom_err $LIBS"
22214 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22215 echo "configure:22216: checking fetch(3) library" >&5
22216 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22217   echo $ac_n "(cached) $ac_c" 1>&6
22218 else
22219   
22220         cat > conftest.$ac_ext <<EOF
22221 #line 22222 "configure"
22222 #include "confdefs.h"
22223
22224 #include <sys/param.h>
22225 #include <stdio.h>
22226 #include <fetch.h>
22227 int main() {
22228 struct url *u = fetchParseURL("file:///"); 
22229 ; return 0; }
22230 EOF
22231 if { (eval echo configure:22232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22232   rm -rf conftest*
22233   ol_cv_lib_fetch=yes
22234 else
22235   echo "configure: failed program was:" >&5
22236   cat conftest.$ac_ext >&5
22237   rm -rf conftest*
22238   ol_cv_lib_fetch=no
22239 fi
22240 rm -f conftest*
22241 fi
22242
22243 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22244 LIBS=$ol_LIBS
22245 if test $ol_cv_lib_fetch != no ; then
22246         ol_link_fetch="-lfetch -lcom_err"
22247         cat >> confdefs.h <<\EOF
22248 #define HAVE_FETCH 1
22249 EOF
22250
22251 fi
22252
22253
22254         if test $ol_cv_lib_fetch != no ; then
22255                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22256                 ol_link_fetch=freebsd
22257
22258         elif test $ol_with_fetch != auto ; then
22259                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22260         fi 
22261 fi
22262
22263 if test $ol_enable_crypt != no ; then
22264         save_LIBS="$LIBS"
22265         LIBS="$TLS_LIBS $LIBS"
22266
22267         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22268 echo "configure:22269: checking for crypt" >&5
22269 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22270   echo $ac_n "(cached) $ac_c" 1>&6
22271 else
22272   cat > conftest.$ac_ext <<EOF
22273 #line 22274 "configure"
22274 #include "confdefs.h"
22275 /* System header to define __stub macros and hopefully few prototypes,
22276     which can conflict with char crypt(); below.  */
22277 #include <assert.h>
22278 /* Override any gcc2 internal prototype to avoid an error.  */
22279 /* We use char because int might match the return type of a gcc2
22280     builtin and then its argument prototype would still apply.  */
22281 char crypt();
22282 char (*f)();
22283
22284 int main() {
22285
22286 /* The GNU C library defines this for functions which it implements
22287     to always fail with ENOSYS.  Some functions are actually named
22288     something starting with __ and the normal name is an alias.  */
22289 #if defined (__stub_crypt) || defined (__stub___crypt)
22290 choke me
22291 #else
22292 f = crypt;
22293 #endif
22294
22295 ; return 0; }
22296 EOF
22297 if { (eval echo configure:22298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22298   rm -rf conftest*
22299   eval "ac_cv_func_crypt=yes"
22300 else
22301   echo "configure: failed program was:" >&5
22302   cat conftest.$ac_ext >&5
22303   rm -rf conftest*
22304   eval "ac_cv_func_crypt=no"
22305 fi
22306 rm -f conftest*
22307 fi
22308
22309 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22310   echo "$ac_t""yes" 1>&6
22311   have_crypt=yes
22312 else
22313   echo "$ac_t""no" 1>&6
22314
22315                 LIBS="$save_LIBS"
22316                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22317 echo "configure:22318: checking for crypt in -lcrypt" >&5
22318 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22319 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22320   echo $ac_n "(cached) $ac_c" 1>&6
22321 else
22322   ac_save_LIBS="$LIBS"
22323 LIBS="-lcrypt  $LIBS"
22324 cat > conftest.$ac_ext <<EOF
22325 #line 22326 "configure"
22326 #include "confdefs.h"
22327 /* Override any gcc2 internal prototype to avoid an error.  */
22328 /* We use char because int might match the return type of a gcc2
22329     builtin and then its argument prototype would still apply.  */
22330 char crypt();
22331
22332 int main() {
22333 crypt()
22334 ; return 0; }
22335 EOF
22336 if { (eval echo configure:22337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22337   rm -rf conftest*
22338   eval "ac_cv_lib_$ac_lib_var=yes"
22339 else
22340   echo "configure: failed program was:" >&5
22341   cat conftest.$ac_ext >&5
22342   rm -rf conftest*
22343   eval "ac_cv_lib_$ac_lib_var=no"
22344 fi
22345 rm -f conftest*
22346 LIBS="$ac_save_LIBS"
22347
22348 fi
22349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22350   echo "$ac_t""yes" 1>&6
22351   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22352                         have_crypt=yes
22353 else
22354   echo "$ac_t""no" 1>&6
22355 have_crypt=no
22356 fi
22357
22358 fi
22359
22360
22361         LIBS="$save_LIBS"
22362
22363         if test $have_crypt = yes ; then
22364                 cat >> confdefs.h <<\EOF
22365 #define HAVE_CRYPT 1
22366 EOF
22367
22368         else
22369                 echo "configure: warning: could not find crypt" 1>&2
22370                 if test $ol_enable_crypt = yes ; then
22371                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22372                 fi
22373
22374                 echo "configure: warning: disabling crypt support" 1>&2
22375                 ol_enable_crypt=no
22376         fi
22377 fi
22378
22379 if test $ol_enable_proctitle != no ; then
22380         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22381 echo "configure:22382: checking for setproctitle" >&5
22382 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22383   echo $ac_n "(cached) $ac_c" 1>&6
22384 else
22385   cat > conftest.$ac_ext <<EOF
22386 #line 22387 "configure"
22387 #include "confdefs.h"
22388 /* System header to define __stub macros and hopefully few prototypes,
22389     which can conflict with char setproctitle(); below.  */
22390 #include <assert.h>
22391 /* Override any gcc2 internal prototype to avoid an error.  */
22392 /* We use char because int might match the return type of a gcc2
22393     builtin and then its argument prototype would still apply.  */
22394 char setproctitle();
22395 char (*f)();
22396
22397 int main() {
22398
22399 /* The GNU C library defines this for functions which it implements
22400     to always fail with ENOSYS.  Some functions are actually named
22401     something starting with __ and the normal name is an alias.  */
22402 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22403 choke me
22404 #else
22405 f = setproctitle;
22406 #endif
22407
22408 ; return 0; }
22409 EOF
22410 if { (eval echo configure:22411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22411   rm -rf conftest*
22412   eval "ac_cv_func_setproctitle=yes"
22413 else
22414   echo "configure: failed program was:" >&5
22415   cat conftest.$ac_ext >&5
22416   rm -rf conftest*
22417   eval "ac_cv_func_setproctitle=no"
22418 fi
22419 rm -f conftest*
22420 fi
22421
22422 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22423   echo "$ac_t""yes" 1>&6
22424   have_setproctitle=yes
22425 else
22426   echo "$ac_t""no" 1>&6
22427
22428                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22429 echo "configure:22430: checking for setproctitle in -lutil" >&5
22430 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22431 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22432   echo $ac_n "(cached) $ac_c" 1>&6
22433 else
22434   ac_save_LIBS="$LIBS"
22435 LIBS="-lutil  $LIBS"
22436 cat > conftest.$ac_ext <<EOF
22437 #line 22438 "configure"
22438 #include "confdefs.h"
22439 /* Override any gcc2 internal prototype to avoid an error.  */
22440 /* We use char because int might match the return type of a gcc2
22441     builtin and then its argument prototype would still apply.  */
22442 char setproctitle();
22443
22444 int main() {
22445 setproctitle()
22446 ; return 0; }
22447 EOF
22448 if { (eval echo configure:22449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22449   rm -rf conftest*
22450   eval "ac_cv_lib_$ac_lib_var=yes"
22451 else
22452   echo "configure: failed program was:" >&5
22453   cat conftest.$ac_ext >&5
22454   rm -rf conftest*
22455   eval "ac_cv_lib_$ac_lib_var=no"
22456 fi
22457 rm -f conftest*
22458 LIBS="$ac_save_LIBS"
22459
22460 fi
22461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22462   echo "$ac_t""yes" 1>&6
22463   have_setproctitle=yes
22464                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22465 else
22466   echo "$ac_t""no" 1>&6
22467 have_setproctitle=no
22468                         LIBOBJS="$LIBOBJS setproctitle.o"
22469                         LIBSRCS="$LIBSRCS setproctitle.c"
22470 fi
22471
22472 fi
22473
22474
22475         if test $have_setproctitle = yes ; then
22476                 cat >> confdefs.h <<\EOF
22477 #define HAVE_SETPROCTITLE 1
22478 EOF
22479
22480         fi
22481 fi
22482
22483 if test $ol_enable_slp != no ; then
22484         for ac_hdr in slp.h 
22485 do
22486 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22487 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22488 echo "configure:22489: checking for $ac_hdr" >&5
22489 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22490   echo $ac_n "(cached) $ac_c" 1>&6
22491 else
22492   cat > conftest.$ac_ext <<EOF
22493 #line 22494 "configure"
22494 #include "confdefs.h"
22495 #include <$ac_hdr>
22496 EOF
22497 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22498 { (eval echo configure:22499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22499 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22500 if test -z "$ac_err"; then
22501   rm -rf conftest*
22502   eval "ac_cv_header_$ac_safe=yes"
22503 else
22504   echo "$ac_err" >&5
22505   echo "configure: failed program was:" >&5
22506   cat conftest.$ac_ext >&5
22507   rm -rf conftest*
22508   eval "ac_cv_header_$ac_safe=no"
22509 fi
22510 rm -f conftest*
22511 fi
22512 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22513   echo "$ac_t""yes" 1>&6
22514     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22515   cat >> confdefs.h <<EOF
22516 #define $ac_tr_hdr 1
22517 EOF
22518  
22519 else
22520   echo "$ac_t""no" 1>&6
22521 fi
22522 done
22523
22524
22525         if test $ac_cv_header_slp_h = yes ; then
22526                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22527 echo "configure:22528: checking for SLPOpen in -lslp" >&5
22528 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22529 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22530   echo $ac_n "(cached) $ac_c" 1>&6
22531 else
22532   ac_save_LIBS="$LIBS"
22533 LIBS="-lslp  $LIBS"
22534 cat > conftest.$ac_ext <<EOF
22535 #line 22536 "configure"
22536 #include "confdefs.h"
22537 /* Override any gcc2 internal prototype to avoid an error.  */
22538 /* We use char because int might match the return type of a gcc2
22539     builtin and then its argument prototype would still apply.  */
22540 char SLPOpen();
22541
22542 int main() {
22543 SLPOpen()
22544 ; return 0; }
22545 EOF
22546 if { (eval echo configure:22547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22547   rm -rf conftest*
22548   eval "ac_cv_lib_$ac_lib_var=yes"
22549 else
22550   echo "configure: failed program was:" >&5
22551   cat conftest.$ac_ext >&5
22552   rm -rf conftest*
22553   eval "ac_cv_lib_$ac_lib_var=no"
22554 fi
22555 rm -f conftest*
22556 LIBS="$ac_save_LIBS"
22557
22558 fi
22559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22560   echo "$ac_t""yes" 1>&6
22561   have_slp=yes
22562 else
22563   echo "$ac_t""no" 1>&6
22564 have_slp=no
22565 fi
22566
22567                 if test $have_slp = yes ; then
22568                         cat >> confdefs.h <<\EOF
22569 #define HAVE_SLP 1
22570 EOF
22571
22572                         SLAPD_SLP_LIBS=-lslp
22573                 fi
22574
22575         elif test $ol_enable_slp = yes ; then
22576                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22577         fi
22578 fi
22579
22580 if test "$ol_with_multiple_precision" != "no" ; then
22581         ol_have_bignum=no
22582         ol_have_gmp=no
22583
22584         for ac_hdr in openssl/bn.h bn.h
22585 do
22586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22587 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22588 echo "configure:22589: checking for $ac_hdr" >&5
22589 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22590   echo $ac_n "(cached) $ac_c" 1>&6
22591 else
22592   cat > conftest.$ac_ext <<EOF
22593 #line 22594 "configure"
22594 #include "confdefs.h"
22595 #include <$ac_hdr>
22596 EOF
22597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22598 { (eval echo configure:22599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22600 if test -z "$ac_err"; then
22601   rm -rf conftest*
22602   eval "ac_cv_header_$ac_safe=yes"
22603 else
22604   echo "$ac_err" >&5
22605   echo "configure: failed program was:" >&5
22606   cat conftest.$ac_ext >&5
22607   rm -rf conftest*
22608   eval "ac_cv_header_$ac_safe=no"
22609 fi
22610 rm -f conftest*
22611 fi
22612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22613   echo "$ac_t""yes" 1>&6
22614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22615   cat >> confdefs.h <<EOF
22616 #define $ac_tr_hdr 1
22617 EOF
22618  
22619 else
22620   echo "$ac_t""no" 1>&6
22621 fi
22622 done
22623
22624         for ac_hdr in openssl/crypto.h crypto.h
22625 do
22626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22628 echo "configure:22629: checking for $ac_hdr" >&5
22629 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22630   echo $ac_n "(cached) $ac_c" 1>&6
22631 else
22632   cat > conftest.$ac_ext <<EOF
22633 #line 22634 "configure"
22634 #include "confdefs.h"
22635 #include <$ac_hdr>
22636 EOF
22637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22638 { (eval echo configure:22639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22640 if test -z "$ac_err"; then
22641   rm -rf conftest*
22642   eval "ac_cv_header_$ac_safe=yes"
22643 else
22644   echo "$ac_err" >&5
22645   echo "configure: failed program was:" >&5
22646   cat conftest.$ac_ext >&5
22647   rm -rf conftest*
22648   eval "ac_cv_header_$ac_safe=no"
22649 fi
22650 rm -f conftest*
22651 fi
22652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22653   echo "$ac_t""yes" 1>&6
22654     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22655   cat >> confdefs.h <<EOF
22656 #define $ac_tr_hdr 1
22657 EOF
22658  
22659 else
22660   echo "$ac_t""no" 1>&6
22661 fi
22662 done
22663
22664         for ac_hdr in gmp.h 
22665 do
22666 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22667 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22668 echo "configure:22669: checking for $ac_hdr" >&5
22669 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22670   echo $ac_n "(cached) $ac_c" 1>&6
22671 else
22672   cat > conftest.$ac_ext <<EOF
22673 #line 22674 "configure"
22674 #include "confdefs.h"
22675 #include <$ac_hdr>
22676 EOF
22677 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22678 { (eval echo configure:22679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22679 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22680 if test -z "$ac_err"; then
22681   rm -rf conftest*
22682   eval "ac_cv_header_$ac_safe=yes"
22683 else
22684   echo "$ac_err" >&5
22685   echo "configure: failed program was:" >&5
22686   cat conftest.$ac_ext >&5
22687   rm -rf conftest*
22688   eval "ac_cv_header_$ac_safe=no"
22689 fi
22690 rm -f conftest*
22691 fi
22692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22693   echo "$ac_t""yes" 1>&6
22694     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22695   cat >> confdefs.h <<EOF
22696 #define $ac_tr_hdr 1
22697 EOF
22698  
22699 else
22700   echo "$ac_t""no" 1>&6
22701 fi
22702 done
22703
22704
22705         if test "$ol_with_tls" = "found" ; then
22706                 ol_have_bn_h=no
22707                 ol_have_crypto_h=no
22708
22709                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22710                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22711                         ol_have_bn_h=yes
22712                 fi
22713
22714                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22715                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22716                         ol_have_crypto_h=yes
22717                 fi
22718
22719                 if test "$ol_have_bn_h" = "yes" \
22720                                 -a "$ol_have_crypto_h" = "yes" ; then
22721                         ol_have_bignum=yes
22722                 fi
22723         fi
22724
22725         if test $ac_cv_header_gmp_h = yes ; then
22726                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22727 echo "configure:22728: checking for __gmpz_add_ui in -lgmp" >&5
22728 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22729 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22730   echo $ac_n "(cached) $ac_c" 1>&6
22731 else
22732   ac_save_LIBS="$LIBS"
22733 LIBS="-lgmp  $LIBS"
22734 cat > conftest.$ac_ext <<EOF
22735 #line 22736 "configure"
22736 #include "confdefs.h"
22737 /* Override any gcc2 internal prototype to avoid an error.  */
22738 /* We use char because int might match the return type of a gcc2
22739     builtin and then its argument prototype would still apply.  */
22740 char __gmpz_add_ui();
22741
22742 int main() {
22743 __gmpz_add_ui()
22744 ; return 0; }
22745 EOF
22746 if { (eval echo configure:22747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22747   rm -rf conftest*
22748   eval "ac_cv_lib_$ac_lib_var=yes"
22749 else
22750   echo "configure: failed program was:" >&5
22751   cat conftest.$ac_ext >&5
22752   rm -rf conftest*
22753   eval "ac_cv_lib_$ac_lib_var=no"
22754 fi
22755 rm -f conftest*
22756 LIBS="$ac_save_LIBS"
22757
22758 fi
22759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22760   echo "$ac_t""yes" 1>&6
22761   have_gmp=yes
22762 else
22763   echo "$ac_t""no" 1>&6
22764 have_gmp=no
22765 fi
22766
22767                 if test $have_gmp = yes ; then
22768                         ol_have_gmp=yes
22769                 fi
22770         fi
22771
22772         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22773 echo "configure:22774: checking for multiple precision support" >&5
22774
22775         ol_mp_support="none"
22776         case "$ol_with_multiple_precision" in
22777         auto)
22778                                                                                 if test "$ol_have_bignum" = "yes" ; then
22779                         ol_mp_support="bignum"
22780                 else
22781                         if test "$ol_have_gmp" = "yes" ; then
22782                                 ol_mp_support="gmp"
22783                         fi
22784                 fi
22785                 ;;
22786         bignum)
22787                 if test "$ol_have_bignum" != "yes" ; then
22788                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22789                 fi
22790                 ol_mp_support="bignum"
22791                 ;;
22792         gmp)
22793                 if test "$ol_have_gmp" != "yes" ; then
22794                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22795                 fi
22796                 ol_mp_support="gmp"
22797                 ;;
22798         yes)
22799                 if test "$ol_have_bignum" = "yes" ; then
22800                         ol_mp_support="bignum"
22801                 elif test "$ol_have_gmp" = "yes" ; then
22802                         ol_mp_support="gmp"
22803                 else
22804                         { echo "configure: error: not available" 1>&2; exit 1; }
22805                 fi
22806                 ;;
22807         esac
22808
22809         case "$ol_mp_support" in
22810         bignum)
22811                 cat >> confdefs.h <<\EOF
22812 #define HAVE_BIGNUM 1
22813 EOF
22814
22815                 ;;
22816         gmp)
22817                 cat >> confdefs.h <<\EOF
22818 #define HAVE_GMP 1
22819 EOF
22820
22821                 SLAPD_GMP_LIBS=-lgmp
22822                 ;;
22823         none)
22824                 ;;
22825         esac
22826
22827         echo "$ac_t""$ol_mp_support" 1>&6
22828 fi
22829
22830
22831 echo $ac_n "checking long long""... $ac_c" 1>&6
22832 echo "configure:22833: checking long long" >&5
22833 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22834   echo $ac_n "(cached) $ac_c" 1>&6
22835 else
22836   
22837         cat > conftest.$ac_ext <<EOF
22838 #line 22839 "configure"
22839 #include "confdefs.h"
22840
22841 int main() {
22842 long long x;
22843 ; return 0; }
22844 EOF
22845 if { (eval echo configure:22846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22846   rm -rf conftest*
22847   ol_cv_type_long_long=yes
22848 else
22849   echo "configure: failed program was:" >&5
22850   cat conftest.$ac_ext >&5
22851   rm -rf conftest*
22852   ol_cv_type_long_long=no
22853 fi
22854 rm -f conftest*
22855 fi
22856
22857 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22858 if test $ol_cv_type_long_long = yes; then
22859         cat >> confdefs.h <<\EOF
22860 #define HAVE_LONG_LONG 1
22861 EOF
22862
22863 fi
22864
22865 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22866 echo "configure:22867: checking for ANSI C header files" >&5
22867 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22868   echo $ac_n "(cached) $ac_c" 1>&6
22869 else
22870   cat > conftest.$ac_ext <<EOF
22871 #line 22872 "configure"
22872 #include "confdefs.h"
22873 #include <stdlib.h>
22874 #include <stdarg.h>
22875 #include <string.h>
22876 #include <float.h>
22877 EOF
22878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22879 { (eval echo configure:22880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22881 if test -z "$ac_err"; then
22882   rm -rf conftest*
22883   ac_cv_header_stdc=yes
22884 else
22885   echo "$ac_err" >&5
22886   echo "configure: failed program was:" >&5
22887   cat conftest.$ac_ext >&5
22888   rm -rf conftest*
22889   ac_cv_header_stdc=no
22890 fi
22891 rm -f conftest*
22892
22893 if test $ac_cv_header_stdc = yes; then
22894   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22895 cat > conftest.$ac_ext <<EOF
22896 #line 22897 "configure"
22897 #include "confdefs.h"
22898 #include <string.h>
22899 EOF
22900 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22901   egrep "memchr" >/dev/null 2>&1; then
22902   :
22903 else
22904   rm -rf conftest*
22905   ac_cv_header_stdc=no
22906 fi
22907 rm -f conftest*
22908
22909 fi
22910
22911 if test $ac_cv_header_stdc = yes; then
22912   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22913 cat > conftest.$ac_ext <<EOF
22914 #line 22915 "configure"
22915 #include "confdefs.h"
22916 #include <stdlib.h>
22917 EOF
22918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22919   egrep "free" >/dev/null 2>&1; then
22920   :
22921 else
22922   rm -rf conftest*
22923   ac_cv_header_stdc=no
22924 fi
22925 rm -f conftest*
22926
22927 fi
22928
22929 if test $ac_cv_header_stdc = yes; then
22930   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22931 if test "$cross_compiling" = yes; then
22932   :
22933 else
22934   cat > conftest.$ac_ext <<EOF
22935 #line 22936 "configure"
22936 #include "confdefs.h"
22937 #include <ctype.h>
22938 #if ((' ' & 0x0FF) == 0x020)
22939 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22940 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22941 #else
22942 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22943  || ('j' <= (c) && (c) <= 'r') \
22944  || ('s' <= (c) && (c) <= 'z'))
22945 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22946 #endif
22947 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22948 int main () { int i; for (i = 0; i < 256; i++)
22949 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22950 exit (0); }
22951
22952 EOF
22953 if { (eval echo configure:22954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22954 then
22955   :
22956 else
22957   echo "configure: failed program was:" >&5
22958   cat conftest.$ac_ext >&5
22959   rm -fr conftest*
22960   ac_cv_header_stdc=no
22961 fi
22962 rm -fr conftest*
22963 fi
22964
22965 fi
22966 fi
22967
22968 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22969 if test $ac_cv_header_stdc = yes; then
22970   cat >> confdefs.h <<\EOF
22971 #define STDC_HEADERS 1
22972 EOF
22973
22974 fi
22975
22976 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22977 echo "configure:22978: checking for mode_t" >&5
22978 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22979   echo $ac_n "(cached) $ac_c" 1>&6
22980 else
22981   cat > conftest.$ac_ext <<EOF
22982 #line 22983 "configure"
22983 #include "confdefs.h"
22984 #include <sys/types.h>
22985 #if STDC_HEADERS
22986 #include <stdlib.h>
22987 #include <stddef.h>
22988 #endif
22989
22990 EOF
22991 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22992   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22993   rm -rf conftest*
22994   eval "ac_cv_type_mode_t=yes"
22995 else
22996   rm -rf conftest*
22997   eval "ac_cv_type_mode_t=no"
22998 fi
22999 rm -f conftest*
23000
23001 fi
23002 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
23003   echo "$ac_t""yes" 1>&6
23004 else
23005   echo "$ac_t""no" 1>&6
23006   cat >> confdefs.h <<EOF
23007 #define mode_t int
23008 EOF
23009
23010 fi
23011
23012 echo $ac_n "checking for off_t""... $ac_c" 1>&6
23013 echo "configure:23014: checking for off_t" >&5
23014 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
23015   echo $ac_n "(cached) $ac_c" 1>&6
23016 else
23017   cat > conftest.$ac_ext <<EOF
23018 #line 23019 "configure"
23019 #include "confdefs.h"
23020 #include <sys/types.h>
23021 #if STDC_HEADERS
23022 #include <stdlib.h>
23023 #include <stddef.h>
23024 #endif
23025
23026 EOF
23027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23028   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23029   rm -rf conftest*
23030   eval "ac_cv_type_off_t=yes"
23031 else
23032   rm -rf conftest*
23033   eval "ac_cv_type_off_t=no"
23034 fi
23035 rm -f conftest*
23036
23037 fi
23038 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
23039   echo "$ac_t""yes" 1>&6
23040 else
23041   echo "$ac_t""no" 1>&6
23042   cat >> confdefs.h <<EOF
23043 #define off_t long
23044 EOF
23045
23046 fi
23047
23048 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
23049 echo "configure:23050: checking for pid_t" >&5
23050 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
23051   echo $ac_n "(cached) $ac_c" 1>&6
23052 else
23053   cat > conftest.$ac_ext <<EOF
23054 #line 23055 "configure"
23055 #include "confdefs.h"
23056 #include <sys/types.h>
23057 #if STDC_HEADERS
23058 #include <stdlib.h>
23059 #include <stddef.h>
23060 #endif
23061
23062 EOF
23063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23064   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23065   rm -rf conftest*
23066   eval "ac_cv_type_pid_t=yes"
23067 else
23068   rm -rf conftest*
23069   eval "ac_cv_type_pid_t=no"
23070 fi
23071 rm -f conftest*
23072
23073 fi
23074 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
23075   echo "$ac_t""yes" 1>&6
23076 else
23077   echo "$ac_t""no" 1>&6
23078   cat >> confdefs.h <<EOF
23079 #define pid_t int
23080 EOF
23081
23082 fi
23083
23084 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
23085 echo "configure:23086: checking for ptrdiff_t" >&5
23086 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
23087   echo $ac_n "(cached) $ac_c" 1>&6
23088 else
23089   cat > conftest.$ac_ext <<EOF
23090 #line 23091 "configure"
23091 #include "confdefs.h"
23092 #include <stddef.h>
23093 int main() {
23094 ptrdiff_t p
23095 ; return 0; }
23096 EOF
23097 if { (eval echo configure:23098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23098   rm -rf conftest*
23099   am_cv_type_ptrdiff_t=yes
23100 else
23101   echo "configure: failed program was:" >&5
23102   cat conftest.$ac_ext >&5
23103   rm -rf conftest*
23104   am_cv_type_ptrdiff_t=no
23105 fi
23106 rm -f conftest*
23107 fi
23108
23109 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
23110    if test $am_cv_type_ptrdiff_t = yes; then
23111      cat >> confdefs.h <<\EOF
23112 #define HAVE_PTRDIFF_T 1
23113 EOF
23114
23115    fi
23116
23117 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23118 echo "configure:23119: checking return type of signal handlers" >&5
23119 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23120   echo $ac_n "(cached) $ac_c" 1>&6
23121 else
23122   cat > conftest.$ac_ext <<EOF
23123 #line 23124 "configure"
23124 #include "confdefs.h"
23125 #include <sys/types.h>
23126 #include <signal.h>
23127 #ifdef signal
23128 #undef signal
23129 #endif
23130 #ifdef __cplusplus
23131 extern "C" void (*signal (int, void (*)(int)))(int);
23132 #else
23133 void (*signal ()) ();
23134 #endif
23135
23136 int main() {
23137 int i;
23138 ; return 0; }
23139 EOF
23140 if { (eval echo configure:23141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23141   rm -rf conftest*
23142   ac_cv_type_signal=void
23143 else
23144   echo "configure: failed program was:" >&5
23145   cat conftest.$ac_ext >&5
23146   rm -rf conftest*
23147   ac_cv_type_signal=int
23148 fi
23149 rm -f conftest*
23150 fi
23151
23152 echo "$ac_t""$ac_cv_type_signal" 1>&6
23153 cat >> confdefs.h <<EOF
23154 #define RETSIGTYPE $ac_cv_type_signal
23155 EOF
23156
23157
23158 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23159 echo "configure:23160: checking for size_t" >&5
23160 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23161   echo $ac_n "(cached) $ac_c" 1>&6
23162 else
23163   cat > conftest.$ac_ext <<EOF
23164 #line 23165 "configure"
23165 #include "confdefs.h"
23166 #include <sys/types.h>
23167 #if STDC_HEADERS
23168 #include <stdlib.h>
23169 #include <stddef.h>
23170 #endif
23171
23172 EOF
23173 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23174   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23175   rm -rf conftest*
23176   eval "ac_cv_type_size_t=yes"
23177 else
23178   rm -rf conftest*
23179   eval "ac_cv_type_size_t=no"
23180 fi
23181 rm -f conftest*
23182
23183 fi
23184 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23185   echo "$ac_t""yes" 1>&6
23186 else
23187   echo "$ac_t""no" 1>&6
23188   cat >> confdefs.h <<EOF
23189 #define size_t unsigned
23190 EOF
23191
23192 fi
23193
23194
23195 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23196 echo "configure:23197: checking for ssize_t" >&5
23197 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23198   echo $ac_n "(cached) $ac_c" 1>&6
23199 else
23200   cat > conftest.$ac_ext <<EOF
23201 #line 23202 "configure"
23202 #include "confdefs.h"
23203 #include <sys/types.h>
23204 #if STDC_HEADERS
23205 #include <stdlib.h>
23206 #include <stddef.h>
23207 #endif
23208
23209 EOF
23210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23211   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23212   rm -rf conftest*
23213   eval "ac_cv_type_ssize_t=yes"
23214 else
23215   rm -rf conftest*
23216   eval "ac_cv_type_ssize_t=no"
23217 fi
23218 rm -f conftest*
23219
23220 fi
23221 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23222   echo "$ac_t""yes" 1>&6
23223 else
23224   echo "$ac_t""no" 1>&6
23225   cat >> confdefs.h <<EOF
23226 #define ssize_t signed int
23227 EOF
23228
23229 fi
23230
23231 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23232 echo "configure:23233: checking for caddr_t" >&5
23233 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23234   echo $ac_n "(cached) $ac_c" 1>&6
23235 else
23236   cat > conftest.$ac_ext <<EOF
23237 #line 23238 "configure"
23238 #include "confdefs.h"
23239 #include <sys/types.h>
23240 #if STDC_HEADERS
23241 #include <stdlib.h>
23242 #include <stddef.h>
23243 #endif
23244
23245 EOF
23246 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23247   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23248   rm -rf conftest*
23249   eval "ac_cv_type_caddr_t=yes"
23250 else
23251   rm -rf conftest*
23252   eval "ac_cv_type_caddr_t=no"
23253 fi
23254 rm -f conftest*
23255
23256 fi
23257 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23258   echo "$ac_t""yes" 1>&6
23259 else
23260   echo "$ac_t""no" 1>&6
23261   cat >> confdefs.h <<EOF
23262 #define caddr_t char *
23263 EOF
23264
23265 fi
23266
23267
23268 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23269 echo "configure:23270: checking for socklen_t" >&5
23270 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23271   echo $ac_n "(cached) $ac_c" 1>&6
23272 else
23273   cat > conftest.$ac_ext <<EOF
23274 #line 23275 "configure"
23275 #include "confdefs.h"
23276
23277 #ifdef HAVE_SYS_TYPES_H
23278 #include <sys/types.h>
23279 #endif
23280 #ifdef HAVE_SYS_SOCKET_H
23281 #include <sys/socket.h>
23282 #endif
23283
23284 int main() {
23285 socklen_t len;
23286 ; return 0; }
23287 EOF
23288 if { (eval echo configure:23289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23289   rm -rf conftest*
23290   ol_cv_type_socklen_t=yes
23291 else
23292   echo "configure: failed program was:" >&5
23293   cat conftest.$ac_ext >&5
23294   rm -rf conftest*
23295   ol_cv_type_socklen_t=no
23296 fi
23297 rm -f conftest*
23298 fi
23299
23300 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23301   if test $ol_cv_type_socklen_t = no; then
23302     cat >> confdefs.h <<\EOF
23303 #define socklen_t int
23304 EOF
23305
23306   fi
23307  
23308 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23309 echo "configure:23310: checking for member st_blksize in aggregate type struct stat" >&5
23310 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
23311   echo $ac_n "(cached) $ac_c" 1>&6
23312 else
23313   cat > conftest.$ac_ext <<EOF
23314 #line 23315 "configure"
23315 #include "confdefs.h"
23316 #include <sys/types.h>
23317 #include <sys/stat.h>
23318 int main() {
23319 struct stat foo; foo.st_blksize;
23320 ; return 0; }
23321 EOF
23322 if { (eval echo configure:23323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23323   rm -rf conftest*
23324   ac_cv_c_struct_member_st_blksize=yes
23325 else
23326   echo "configure: failed program was:" >&5
23327   cat conftest.$ac_ext >&5
23328   rm -rf conftest*
23329   ac_cv_c_struct_member_st_blksize=no
23330 fi
23331 rm -f conftest*
23332 fi
23333
23334 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23335 st_blksize="$ac_cv_c_struct_member_st_blksize"
23336 if test $ac_cv_c_struct_member_st_blksize = yes; then
23337   cat >> confdefs.h <<\EOF
23338 #define HAVE_ST_BLKSIZE 1
23339 EOF
23340
23341 fi
23342
23343 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23344 echo "configure:23345: checking whether time.h and sys/time.h may both be included" >&5
23345 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
23346   echo $ac_n "(cached) $ac_c" 1>&6
23347 else
23348   cat > conftest.$ac_ext <<EOF
23349 #line 23350 "configure"
23350 #include "confdefs.h"
23351 #include <sys/types.h>
23352 #include <sys/time.h>
23353 #include <time.h>
23354 int main() {
23355 struct tm *tp;
23356 ; return 0; }
23357 EOF
23358 if { (eval echo configure:23359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23359   rm -rf conftest*
23360   ac_cv_header_time=yes
23361 else
23362   echo "configure: failed program was:" >&5
23363   cat conftest.$ac_ext >&5
23364   rm -rf conftest*
23365   ac_cv_header_time=no
23366 fi
23367 rm -f conftest*
23368 fi
23369
23370 echo "$ac_t""$ac_cv_header_time" 1>&6
23371 if test $ac_cv_header_time = yes; then
23372   cat >> confdefs.h <<\EOF
23373 #define TIME_WITH_SYS_TIME 1
23374 EOF
23375
23376 fi
23377
23378 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23379 echo "configure:23380: checking whether struct tm is in sys/time.h or time.h" >&5
23380 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23381   echo $ac_n "(cached) $ac_c" 1>&6
23382 else
23383   cat > conftest.$ac_ext <<EOF
23384 #line 23385 "configure"
23385 #include "confdefs.h"
23386 #include <sys/types.h>
23387 #include <time.h>
23388 int main() {
23389 struct tm *tp; tp->tm_sec;
23390 ; return 0; }
23391 EOF
23392 if { (eval echo configure:23393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23393   rm -rf conftest*
23394   ac_cv_struct_tm=time.h
23395 else
23396   echo "configure: failed program was:" >&5
23397   cat conftest.$ac_ext >&5
23398   rm -rf conftest*
23399   ac_cv_struct_tm=sys/time.h
23400 fi
23401 rm -f conftest*
23402 fi
23403
23404 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23405 if test $ac_cv_struct_tm = sys/time.h; then
23406   cat >> confdefs.h <<\EOF
23407 #define TM_IN_SYS_TIME 1
23408 EOF
23409
23410 fi
23411
23412 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23413 echo "configure:23414: checking for uid_t in sys/types.h" >&5
23414 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23415   echo $ac_n "(cached) $ac_c" 1>&6
23416 else
23417   cat > conftest.$ac_ext <<EOF
23418 #line 23419 "configure"
23419 #include "confdefs.h"
23420 #include <sys/types.h>
23421 EOF
23422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23423   egrep "uid_t" >/dev/null 2>&1; then
23424   rm -rf conftest*
23425   ac_cv_type_uid_t=yes
23426 else
23427   rm -rf conftest*
23428   ac_cv_type_uid_t=no
23429 fi
23430 rm -f conftest*
23431
23432 fi
23433
23434 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23435 if test $ac_cv_type_uid_t = no; then
23436   cat >> confdefs.h <<\EOF
23437 #define uid_t int
23438 EOF
23439
23440   cat >> confdefs.h <<\EOF
23441 #define gid_t int
23442 EOF
23443
23444 fi
23445
23446 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23447 echo "configure:23448: checking for sig_atomic_t" >&5
23448 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23449   echo $ac_n "(cached) $ac_c" 1>&6
23450 else
23451   cat > conftest.$ac_ext <<EOF
23452 #line 23453 "configure"
23453 #include "confdefs.h"
23454 #include <signal.h>
23455 int main() {
23456 sig_atomic_t atomic;
23457 ; return 0; }
23458 EOF
23459 if { (eval echo configure:23460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23460   rm -rf conftest*
23461   ol_cv_type_sig_atomic_t=yes
23462 else
23463   echo "configure: failed program was:" >&5
23464   cat conftest.$ac_ext >&5
23465   rm -rf conftest*
23466   ol_cv_type_sig_atomic_t=no
23467 fi
23468 rm -f conftest*
23469 fi
23470
23471 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23472   if test $ol_cv_type_sig_atomic_t = no; then
23473     cat >> confdefs.h <<\EOF
23474 #define sig_atomic_t int
23475 EOF
23476
23477   fi
23478  
23479
23480
23481 # test for pw_gecos in struct passwd
23482 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23483 echo "configure:23484: checking struct passwd for pw_gecos" >&5
23484 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
23485   echo $ac_n "(cached) $ac_c" 1>&6
23486 else
23487   
23488         cat > conftest.$ac_ext <<EOF
23489 #line 23490 "configure"
23490 #include "confdefs.h"
23491 #include <pwd.h>
23492 int main() {
23493
23494         struct passwd pwd;
23495         pwd.pw_gecos = pwd.pw_name;
23496
23497 ; return 0; }
23498 EOF
23499 if { (eval echo configure:23500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23500   rm -rf conftest*
23501   ol_cv_struct_passwd_pw_gecos=yes
23502 else
23503   echo "configure: failed program was:" >&5
23504   cat conftest.$ac_ext >&5
23505   rm -rf conftest*
23506   ol_cv_struct_passwd_pw_gecos=no
23507 fi
23508 rm -f conftest*
23509 fi
23510
23511 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23512 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23513         cat >> confdefs.h <<\EOF
23514 #define HAVE_PW_GECOS 1
23515 EOF
23516
23517 fi
23518
23519 # test for pw_passwd in struct passwd
23520 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23521 echo "configure:23522: checking struct passwd for pw_passwd" >&5
23522 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23523   echo $ac_n "(cached) $ac_c" 1>&6
23524 else
23525   
23526         cat > conftest.$ac_ext <<EOF
23527 #line 23528 "configure"
23528 #include "confdefs.h"
23529 #include <pwd.h>
23530 int main() {
23531
23532         struct passwd pwd;
23533         pwd.pw_passwd = pwd.pw_name;
23534
23535 ; return 0; }
23536 EOF
23537 if { (eval echo configure:23538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23538   rm -rf conftest*
23539   ol_cv_struct_passwd_pw_passwd=yes
23540 else
23541   echo "configure: failed program was:" >&5
23542   cat conftest.$ac_ext >&5
23543   rm -rf conftest*
23544   ol_cv_struct_passwd_pw_passwd=no
23545 fi
23546 rm -f conftest*
23547 fi
23548
23549 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23550 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23551         cat >> confdefs.h <<\EOF
23552 #define HAVE_PW_PASSWD 1
23553 EOF
23554
23555 fi
23556
23557
23558 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23559 echo "configure:23560: checking if toupper() requires islower()" >&5
23560 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23561   echo $ac_n "(cached) $ac_c" 1>&6
23562 else
23563   
23564         if test "$cross_compiling" = yes; then
23565   ol_cv_c_upper_lower=safe
23566 else
23567   cat > conftest.$ac_ext <<EOF
23568 #line 23569 "configure"
23569 #include "confdefs.h"
23570
23571 #include <ctype.h>
23572 main()
23573 {
23574         if ('C' == toupper('C'))
23575                 exit(0);
23576         else
23577                 exit(1);
23578 }
23579 EOF
23580 if { (eval echo configure:23581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23581 then
23582   ol_cv_c_upper_lower=no
23583 else
23584   echo "configure: failed program was:" >&5
23585   cat conftest.$ac_ext >&5
23586   rm -fr conftest*
23587   ol_cv_c_upper_lower=yes
23588 fi
23589 rm -fr conftest*
23590 fi
23591
23592 fi
23593
23594 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23595 if test $ol_cv_c_upper_lower != no ; then
23596         cat >> confdefs.h <<\EOF
23597 #define C_UPPER_LOWER 1
23598 EOF
23599
23600 fi
23601
23602 echo $ac_n "checking for working const""... $ac_c" 1>&6
23603 echo "configure:23604: checking for working const" >&5
23604 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23605   echo $ac_n "(cached) $ac_c" 1>&6
23606 else
23607   cat > conftest.$ac_ext <<EOF
23608 #line 23609 "configure"
23609 #include "confdefs.h"
23610
23611 int main() {
23612
23613 /* Ultrix mips cc rejects this.  */
23614 typedef int charset[2]; const charset x;
23615 /* SunOS 4.1.1 cc rejects this.  */
23616 char const *const *ccp;
23617 char **p;
23618 /* NEC SVR4.0.2 mips cc rejects this.  */
23619 struct point {int x, y;};
23620 static struct point const zero = {0,0};
23621 /* AIX XL C 1.02.0.0 rejects this.
23622    It does not let you subtract one const X* pointer from another in an arm
23623    of an if-expression whose if-part is not a constant expression */
23624 const char *g = "string";
23625 ccp = &g + (g ? g-g : 0);
23626 /* HPUX 7.0 cc rejects these. */
23627 ++ccp;
23628 p = (char**) ccp;
23629 ccp = (char const *const *) p;
23630 { /* SCO 3.2v4 cc rejects this.  */
23631   char *t;
23632   char const *s = 0 ? (char *) 0 : (char const *) 0;
23633
23634   *t++ = 0;
23635 }
23636 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23637   int x[] = {25, 17};
23638   const int *foo = &x[0];
23639   ++foo;
23640 }
23641 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23642   typedef const int *iptr;
23643   iptr p = 0;
23644   ++p;
23645 }
23646 { /* AIX XL C 1.02.0.0 rejects this saying
23647      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23648   struct s { int j; const int *ap[3]; };
23649   struct s *b; b->j = 5;
23650 }
23651 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23652   const int foo = 10;
23653 }
23654
23655 ; return 0; }
23656 EOF
23657 if { (eval echo configure:23658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23658   rm -rf conftest*
23659   ac_cv_c_const=yes
23660 else
23661   echo "configure: failed program was:" >&5
23662   cat conftest.$ac_ext >&5
23663   rm -rf conftest*
23664   ac_cv_c_const=no
23665 fi
23666 rm -f conftest*
23667 fi
23668
23669 echo "$ac_t""$ac_cv_c_const" 1>&6
23670 if test $ac_cv_c_const = no; then
23671   cat >> confdefs.h <<\EOF
23672 #define const 
23673 EOF
23674
23675 fi
23676
23677 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23678 echo "configure:23679: checking if compiler understands volatile" >&5
23679 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23680   echo $ac_n "(cached) $ac_c" 1>&6
23681 else
23682   cat > conftest.$ac_ext <<EOF
23683 #line 23684 "configure"
23684 #include "confdefs.h"
23685 int x, y, z;
23686 int main() {
23687 volatile int a; int * volatile b = x ? &y : &z;
23688       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23689       *b = 0;
23690 ; return 0; }
23691 EOF
23692 if { (eval echo configure:23693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23693   rm -rf conftest*
23694   ol_cv_c_volatile=yes
23695 else
23696   echo "configure: failed program was:" >&5
23697   cat conftest.$ac_ext >&5
23698   rm -rf conftest*
23699   ol_cv_c_volatile=no
23700 fi
23701 rm -f conftest*
23702 fi
23703
23704 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23705   if test $ol_cv_c_volatile = yes; then
23706     : 
23707   else
23708     cat >> confdefs.h <<\EOF
23709 #define volatile 
23710 EOF
23711
23712   fi
23713  
23714
23715 if test $cross_compiling = yes ; then
23716         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23717         cat >> confdefs.h <<\EOF
23718 #define CROSS_COMPILING 1
23719 EOF
23720
23721 else
23722         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23723 echo "configure:23724: checking whether byte ordering is bigendian" >&5
23724 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23725   echo $ac_n "(cached) $ac_c" 1>&6
23726 else
23727   ac_cv_c_bigendian=unknown
23728 # See if sys/param.h defines the BYTE_ORDER macro.
23729 cat > conftest.$ac_ext <<EOF
23730 #line 23731 "configure"
23731 #include "confdefs.h"
23732 #include <sys/types.h>
23733 #include <sys/param.h>
23734 int main() {
23735
23736 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23737  bogus endian macros
23738 #endif
23739 ; return 0; }
23740 EOF
23741 if { (eval echo configure:23742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23742   rm -rf conftest*
23743   # It does; now see whether it defined to BIG_ENDIAN or not.
23744 cat > conftest.$ac_ext <<EOF
23745 #line 23746 "configure"
23746 #include "confdefs.h"
23747 #include <sys/types.h>
23748 #include <sys/param.h>
23749 int main() {
23750
23751 #if BYTE_ORDER != BIG_ENDIAN
23752  not big endian
23753 #endif
23754 ; return 0; }
23755 EOF
23756 if { (eval echo configure:23757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23757   rm -rf conftest*
23758   ac_cv_c_bigendian=yes
23759 else
23760   echo "configure: failed program was:" >&5
23761   cat conftest.$ac_ext >&5
23762   rm -rf conftest*
23763   ac_cv_c_bigendian=no
23764 fi
23765 rm -f conftest*
23766 else
23767   echo "configure: failed program was:" >&5
23768   cat conftest.$ac_ext >&5
23769 fi
23770 rm -f conftest*
23771 if test $ac_cv_c_bigendian = unknown; then
23772 if test "$cross_compiling" = yes; then
23773     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23774 else
23775   cat > conftest.$ac_ext <<EOF
23776 #line 23777 "configure"
23777 #include "confdefs.h"
23778 main () {
23779   /* Are we little or big endian?  From Harbison&Steele.  */
23780   union
23781   {
23782     long l;
23783     char c[sizeof (long)];
23784   } u;
23785   u.l = 1;
23786   exit (u.c[sizeof (long) - 1] == 1);
23787 }
23788 EOF
23789 if { (eval echo configure:23790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23790 then
23791   ac_cv_c_bigendian=no
23792 else
23793   echo "configure: failed program was:" >&5
23794   cat conftest.$ac_ext >&5
23795   rm -fr conftest*
23796   ac_cv_c_bigendian=yes
23797 fi
23798 rm -fr conftest*
23799 fi
23800
23801 fi
23802 fi
23803
23804 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23805 if test $ac_cv_c_bigendian = yes; then
23806   cat >> confdefs.h <<\EOF
23807 #define WORDS_BIGENDIAN 1
23808 EOF
23809
23810 fi
23811
23812 fi
23813
23814 echo $ac_n "checking size of short""... $ac_c" 1>&6
23815 echo "configure:23816: checking size of short" >&5 
23816 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23817   echo $ac_n "(cached) $ac_c" 1>&6
23818 else
23819   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23820   cat > conftest.$ac_ext <<EOF
23821 #line 23822 "configure"
23822 #include "confdefs.h"
23823 #include "confdefs.h" 
23824 #include <stdlib.h>
23825 #include <sys/types.h> 
23826  
23827
23828 int main() {
23829 switch (0) case 0: case (sizeof (short) == $ac_size):;
23830 ; return 0; }
23831 EOF
23832 if { (eval echo configure:23833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23833   rm -rf conftest*
23834   ac_cv_sizeof_short=$ac_size
23835 else
23836   echo "configure: failed program was:" >&5
23837   cat conftest.$ac_ext >&5
23838 fi
23839 rm -f conftest* 
23840   if test x$ac_cv_sizeof_short != x ; then break; fi 
23841 done 
23842
23843 fi
23844  
23845 if test x$ac_cv_sizeof_short = x ; then 
23846   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23847 fi 
23848 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23849 cat >> confdefs.h <<EOF
23850 #define SIZEOF_SHORT $ac_cv_sizeof_short
23851 EOF
23852  
23853  
23854 echo $ac_n "checking size of int""... $ac_c" 1>&6
23855 echo "configure:23856: checking size of int" >&5 
23856 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23857   echo $ac_n "(cached) $ac_c" 1>&6
23858 else
23859   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23860   cat > conftest.$ac_ext <<EOF
23861 #line 23862 "configure"
23862 #include "confdefs.h"
23863 #include "confdefs.h" 
23864 #include <stdlib.h>
23865 #include <sys/types.h> 
23866  
23867
23868 int main() {
23869 switch (0) case 0: case (sizeof (int) == $ac_size):;
23870 ; return 0; }
23871 EOF
23872 if { (eval echo configure:23873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23873   rm -rf conftest*
23874   ac_cv_sizeof_int=$ac_size
23875 else
23876   echo "configure: failed program was:" >&5
23877   cat conftest.$ac_ext >&5
23878 fi
23879 rm -f conftest* 
23880   if test x$ac_cv_sizeof_int != x ; then break; fi 
23881 done 
23882
23883 fi
23884  
23885 if test x$ac_cv_sizeof_int = x ; then 
23886   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23887 fi 
23888 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23889 cat >> confdefs.h <<EOF
23890 #define SIZEOF_INT $ac_cv_sizeof_int
23891 EOF
23892  
23893  
23894 echo $ac_n "checking size of long""... $ac_c" 1>&6
23895 echo "configure:23896: checking size of long" >&5 
23896 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23897   echo $ac_n "(cached) $ac_c" 1>&6
23898 else
23899   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23900   cat > conftest.$ac_ext <<EOF
23901 #line 23902 "configure"
23902 #include "confdefs.h"
23903 #include "confdefs.h" 
23904 #include <stdlib.h>
23905 #include <sys/types.h> 
23906  
23907
23908 int main() {
23909 switch (0) case 0: case (sizeof (long) == $ac_size):;
23910 ; return 0; }
23911 EOF
23912 if { (eval echo configure:23913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23913   rm -rf conftest*
23914   ac_cv_sizeof_long=$ac_size
23915 else
23916   echo "configure: failed program was:" >&5
23917   cat conftest.$ac_ext >&5
23918 fi
23919 rm -f conftest* 
23920   if test x$ac_cv_sizeof_long != x ; then break; fi 
23921 done 
23922
23923 fi
23924  
23925 if test x$ac_cv_sizeof_long = x ; then 
23926   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23927 fi 
23928 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23929 cat >> confdefs.h <<EOF
23930 #define SIZEOF_LONG $ac_cv_sizeof_long
23931 EOF
23932  
23933
23934 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23935 echo "configure:23936: checking size of wchar_t" >&5 
23936 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23937   echo $ac_n "(cached) $ac_c" 1>&6
23938 else
23939   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23940   cat > conftest.$ac_ext <<EOF
23941 #line 23942 "configure"
23942 #include "confdefs.h"
23943 #include "confdefs.h" 
23944 #include <stdlib.h>
23945 #include <sys/types.h> 
23946  
23947
23948 int main() {
23949 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23950 ; return 0; }
23951 EOF
23952 if { (eval echo configure:23953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23953   rm -rf conftest*
23954   ac_cv_sizeof_wchar_t=$ac_size
23955 else
23956   echo "configure: failed program was:" >&5
23957   cat conftest.$ac_ext >&5
23958 fi
23959 rm -f conftest* 
23960   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23961 done 
23962
23963 fi
23964  
23965 if test x$ac_cv_sizeof_wchar_t = x ; then 
23966   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23967 fi 
23968 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23969 cat >> confdefs.h <<EOF
23970 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23971 EOF
23972  
23973
23974
23975 if test "$ac_cv_sizeof_int" -lt 4 ; then
23976         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23977
23978         cat >> confdefs.h <<\EOF
23979 #define LBER_INT_T long
23980 EOF
23981
23982 else
23983         cat >> confdefs.h <<\EOF
23984 #define LBER_INT_T int
23985 EOF
23986
23987 fi
23988
23989 cat >> confdefs.h <<\EOF
23990 #define LBER_LEN_T long
23991 EOF
23992
23993 cat >> confdefs.h <<\EOF
23994 #define LBER_SOCKET_T int
23995 EOF
23996
23997 cat >> confdefs.h <<\EOF
23998 #define LBER_TAG_T long
23999 EOF
24000
24001
24002 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
24003 echo "configure:24004: checking for 8-bit clean memcmp" >&5
24004 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
24005   echo $ac_n "(cached) $ac_c" 1>&6
24006 else
24007   if test "$cross_compiling" = yes; then
24008   ac_cv_func_memcmp_clean=no
24009 else
24010   cat > conftest.$ac_ext <<EOF
24011 #line 24012 "configure"
24012 #include "confdefs.h"
24013
24014 main()
24015 {
24016   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
24017   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
24018 }
24019
24020 EOF
24021 if { (eval echo configure:24022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
24022 then
24023   ac_cv_func_memcmp_clean=yes
24024 else
24025   echo "configure: failed program was:" >&5
24026   cat conftest.$ac_ext >&5
24027   rm -fr conftest*
24028   ac_cv_func_memcmp_clean=no
24029 fi
24030 rm -fr conftest*
24031 fi
24032
24033 fi
24034
24035 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
24036 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
24037
24038
24039 if test $ac_cv_func_memcmp_clean = no ; then
24040         cat >> confdefs.h <<\EOF
24041 #define NEED_MEMCMP_REPLACEMENT 1
24042 EOF
24043
24044 fi
24045
24046 echo $ac_n "checking for strftime""... $ac_c" 1>&6
24047 echo "configure:24048: checking for strftime" >&5
24048 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
24049   echo $ac_n "(cached) $ac_c" 1>&6
24050 else
24051   cat > conftest.$ac_ext <<EOF
24052 #line 24053 "configure"
24053 #include "confdefs.h"
24054 /* System header to define __stub macros and hopefully few prototypes,
24055     which can conflict with char strftime(); below.  */
24056 #include <assert.h>
24057 /* Override any gcc2 internal prototype to avoid an error.  */
24058 /* We use char because int might match the return type of a gcc2
24059     builtin and then its argument prototype would still apply.  */
24060 char strftime();
24061 char (*f)();
24062
24063 int main() {
24064
24065 /* The GNU C library defines this for functions which it implements
24066     to always fail with ENOSYS.  Some functions are actually named
24067     something starting with __ and the normal name is an alias.  */
24068 #if defined (__stub_strftime) || defined (__stub___strftime)
24069 choke me
24070 #else
24071 f = strftime;
24072 #endif
24073
24074 ; return 0; }
24075 EOF
24076 if { (eval echo configure:24077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24077   rm -rf conftest*
24078   eval "ac_cv_func_strftime=yes"
24079 else
24080   echo "configure: failed program was:" >&5
24081   cat conftest.$ac_ext >&5
24082   rm -rf conftest*
24083   eval "ac_cv_func_strftime=no"
24084 fi
24085 rm -f conftest*
24086 fi
24087
24088 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
24089   echo "$ac_t""yes" 1>&6
24090   cat >> confdefs.h <<\EOF
24091 #define HAVE_STRFTIME 1
24092 EOF
24093
24094 else
24095   echo "$ac_t""no" 1>&6
24096 # strftime is in -lintl on SCO UNIX.
24097 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
24098 echo "configure:24099: checking for strftime in -lintl" >&5
24099 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
24100 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24101   echo $ac_n "(cached) $ac_c" 1>&6
24102 else
24103   ac_save_LIBS="$LIBS"
24104 LIBS="-lintl  $LIBS"
24105 cat > conftest.$ac_ext <<EOF
24106 #line 24107 "configure"
24107 #include "confdefs.h"
24108 /* Override any gcc2 internal prototype to avoid an error.  */
24109 /* We use char because int might match the return type of a gcc2
24110     builtin and then its argument prototype would still apply.  */
24111 char strftime();
24112
24113 int main() {
24114 strftime()
24115 ; return 0; }
24116 EOF
24117 if { (eval echo configure:24118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24118   rm -rf conftest*
24119   eval "ac_cv_lib_$ac_lib_var=yes"
24120 else
24121   echo "configure: failed program was:" >&5
24122   cat conftest.$ac_ext >&5
24123   rm -rf conftest*
24124   eval "ac_cv_lib_$ac_lib_var=no"
24125 fi
24126 rm -f conftest*
24127 LIBS="$ac_save_LIBS"
24128
24129 fi
24130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24131   echo "$ac_t""yes" 1>&6
24132   cat >> confdefs.h <<\EOF
24133 #define HAVE_STRFTIME 1
24134 EOF
24135
24136 LIBS="-lintl $LIBS"
24137 else
24138   echo "$ac_t""no" 1>&6
24139 fi
24140
24141 fi
24142
24143
24144 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24145 echo "configure:24146: checking for inet_aton()" >&5
24146 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24147   echo $ac_n "(cached) $ac_c" 1>&6
24148 else
24149   cat > conftest.$ac_ext <<EOF
24150 #line 24151 "configure"
24151 #include "confdefs.h"
24152
24153 #ifdef HAVE_SYS_TYPES_H
24154 #       include <sys/types.h>
24155 #endif
24156 #ifdef HAVE_SYS_SOCKET_H
24157 #       include <sys/socket.h>
24158 #       ifdef HAVE_SYS_SELECT_H
24159 #               include <sys/select.h>
24160 #       endif
24161 #       include <netinet/in.h>
24162 #       ifdef HAVE_ARPA_INET_H
24163 #               include <arpa/inet.h>
24164 #       endif
24165 #endif
24166
24167 int main() {
24168 struct in_addr in;
24169 int rc = inet_aton( "255.255.255.255", &in );
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   ol_cv_func_inet_aton=yes
24175 else
24176   echo "configure: failed program was:" >&5
24177   cat conftest.$ac_ext >&5
24178   rm -rf conftest*
24179   ol_cv_func_inet_aton=no
24180 fi
24181 rm -f conftest*
24182 fi
24183
24184 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24185   if test $ol_cv_func_inet_aton != no; then
24186     cat >> confdefs.h <<\EOF
24187 #define HAVE_INET_ATON 1
24188 EOF
24189
24190   fi
24191  
24192
24193 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24194 echo "configure:24195: checking for _spawnlp" >&5
24195 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24196   echo $ac_n "(cached) $ac_c" 1>&6
24197 else
24198   cat > conftest.$ac_ext <<EOF
24199 #line 24200 "configure"
24200 #include "confdefs.h"
24201 /* System header to define __stub macros and hopefully few prototypes,
24202     which can conflict with char _spawnlp(); below.  */
24203 #include <assert.h>
24204 /* Override any gcc2 internal prototype to avoid an error.  */
24205 /* We use char because int might match the return type of a gcc2
24206     builtin and then its argument prototype would still apply.  */
24207 char _spawnlp();
24208 char (*f)();
24209
24210 int main() {
24211
24212 /* The GNU C library defines this for functions which it implements
24213     to always fail with ENOSYS.  Some functions are actually named
24214     something starting with __ and the normal name is an alias.  */
24215 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24216 choke me
24217 #else
24218 f = _spawnlp;
24219 #endif
24220
24221 ; return 0; }
24222 EOF
24223 if { (eval echo configure:24224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24224   rm -rf conftest*
24225   eval "ac_cv_func__spawnlp=yes"
24226 else
24227   echo "configure: failed program was:" >&5
24228   cat conftest.$ac_ext >&5
24229   rm -rf conftest*
24230   eval "ac_cv_func__spawnlp=no"
24231 fi
24232 rm -f conftest*
24233 fi
24234
24235 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24236   echo "$ac_t""yes" 1>&6
24237   cat >> confdefs.h <<\EOF
24238 #define HAVE_SPAWNLP 1
24239 EOF
24240
24241 else
24242   echo "$ac_t""no" 1>&6
24243 fi
24244
24245
24246 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24247 echo "configure:24248: checking for _snprintf" >&5
24248 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24249   echo $ac_n "(cached) $ac_c" 1>&6
24250 else
24251   cat > conftest.$ac_ext <<EOF
24252 #line 24253 "configure"
24253 #include "confdefs.h"
24254 /* System header to define __stub macros and hopefully few prototypes,
24255     which can conflict with char _snprintf(); below.  */
24256 #include <assert.h>
24257 /* Override any gcc2 internal prototype to avoid an error.  */
24258 /* We use char because int might match the return type of a gcc2
24259     builtin and then its argument prototype would still apply.  */
24260 char _snprintf();
24261 char (*f)();
24262
24263 int main() {
24264
24265 /* The GNU C library defines this for functions which it implements
24266     to always fail with ENOSYS.  Some functions are actually named
24267     something starting with __ and the normal name is an alias.  */
24268 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24269 choke me
24270 #else
24271 f = _snprintf;
24272 #endif
24273
24274 ; return 0; }
24275 EOF
24276 if { (eval echo configure:24277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24277   rm -rf conftest*
24278   eval "ac_cv_func__snprintf=yes"
24279 else
24280   echo "configure: failed program was:" >&5
24281   cat conftest.$ac_ext >&5
24282   rm -rf conftest*
24283   eval "ac_cv_func__snprintf=no"
24284 fi
24285 rm -f conftest*
24286 fi
24287
24288 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24289   echo "$ac_t""yes" 1>&6
24290   ac_cv_func_snprintf=yes
24291         cat >> confdefs.h <<\EOF
24292 #define snprintf _snprintf
24293 EOF
24294
24295
24296 else
24297   echo "$ac_t""no" 1>&6
24298 fi
24299
24300
24301 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24302 echo "configure:24303: checking for _vsnprintf" >&5
24303 if eval "test \"\${ac_cv_func__vsnprintf+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 _vsnprintf(); 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 _vsnprintf();
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__vsnprintf) || defined (__stub____vsnprintf)
24324 choke me
24325 #else
24326 f = _vsnprintf;
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__vsnprintf=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__vsnprintf=no"
24339 fi
24340 rm -f conftest*
24341 fi
24342
24343 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24344   echo "$ac_t""yes" 1>&6
24345   ac_cv_func_vsnprintf=yes
24346         cat >> confdefs.h <<\EOF
24347 #define vsnprintf _vsnprintf
24348 EOF
24349
24350
24351 else
24352   echo "$ac_t""no" 1>&6
24353 fi
24354
24355
24356 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24357 echo "configure:24358: checking for vprintf" >&5
24358 if eval "test \"\${ac_cv_func_vprintf+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 vprintf(); 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 vprintf();
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_vprintf) || defined (__stub___vprintf)
24379 choke me
24380 #else
24381 f = vprintf;
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_vprintf=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_vprintf=no"
24394 fi
24395 rm -f conftest*
24396 fi
24397
24398 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24399   echo "$ac_t""yes" 1>&6
24400   cat >> confdefs.h <<\EOF
24401 #define HAVE_VPRINTF 1
24402 EOF
24403
24404 else
24405   echo "$ac_t""no" 1>&6
24406 fi
24407
24408 if test "$ac_cv_func_vprintf" != yes; then
24409 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24410 echo "configure:24411: checking for _doprnt" >&5
24411 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24412   echo $ac_n "(cached) $ac_c" 1>&6
24413 else
24414   cat > conftest.$ac_ext <<EOF
24415 #line 24416 "configure"
24416 #include "confdefs.h"
24417 /* System header to define __stub macros and hopefully few prototypes,
24418     which can conflict with char _doprnt(); below.  */
24419 #include <assert.h>
24420 /* Override any gcc2 internal prototype to avoid an error.  */
24421 /* We use char because int might match the return type of a gcc2
24422     builtin and then its argument prototype would still apply.  */
24423 char _doprnt();
24424 char (*f)();
24425
24426 int main() {
24427
24428 /* The GNU C library defines this for functions which it implements
24429     to always fail with ENOSYS.  Some functions are actually named
24430     something starting with __ and the normal name is an alias.  */
24431 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24432 choke me
24433 #else
24434 f = _doprnt;
24435 #endif
24436
24437 ; return 0; }
24438 EOF
24439 if { (eval echo configure:24440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24440   rm -rf conftest*
24441   eval "ac_cv_func__doprnt=yes"
24442 else
24443   echo "configure: failed program was:" >&5
24444   cat conftest.$ac_ext >&5
24445   rm -rf conftest*
24446   eval "ac_cv_func__doprnt=no"
24447 fi
24448 rm -f conftest*
24449 fi
24450
24451 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24452   echo "$ac_t""yes" 1>&6
24453   cat >> confdefs.h <<\EOF
24454 #define HAVE_DOPRNT 1
24455 EOF
24456
24457 else
24458   echo "$ac_t""no" 1>&6
24459 fi
24460
24461 fi
24462
24463
24464 if test $ac_cv_func_vprintf = yes ; then
24465                 for ac_func in snprintf vsnprintf
24466 do
24467 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24468 echo "configure:24469: checking for $ac_func" >&5
24469 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24470   echo $ac_n "(cached) $ac_c" 1>&6
24471 else
24472   cat > conftest.$ac_ext <<EOF
24473 #line 24474 "configure"
24474 #include "confdefs.h"
24475 /* System header to define __stub macros and hopefully few prototypes,
24476     which can conflict with char $ac_func(); below.  */
24477 #include <assert.h>
24478 /* Override any gcc2 internal prototype to avoid an error.  */
24479 /* We use char because int might match the return type of a gcc2
24480     builtin and then its argument prototype would still apply.  */
24481 char $ac_func();
24482 char (*f)();
24483
24484 int main() {
24485
24486 /* The GNU C library defines this for functions which it implements
24487     to always fail with ENOSYS.  Some functions are actually named
24488     something starting with __ and the normal name is an alias.  */
24489 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24490 choke me
24491 #else
24492 f = $ac_func;
24493 #endif
24494
24495 ; return 0; }
24496 EOF
24497 if { (eval echo configure:24498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24498   rm -rf conftest*
24499   eval "ac_cv_func_$ac_func=yes"
24500 else
24501   echo "configure: failed program was:" >&5
24502   cat conftest.$ac_ext >&5
24503   rm -rf conftest*
24504   eval "ac_cv_func_$ac_func=no"
24505 fi
24506 rm -f conftest*
24507 fi
24508
24509 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24510   echo "$ac_t""yes" 1>&6
24511     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24512   cat >> confdefs.h <<EOF
24513 #define $ac_tr_func 1
24514 EOF
24515  
24516 else
24517   echo "$ac_t""no" 1>&6
24518 fi
24519 done
24520
24521 fi
24522
24523 for ac_func in \
24524         bcopy                   \
24525         closesocket             \
24526         chroot                  \
24527         endgrent                \
24528         endpwent                \
24529         fcntl                   \
24530         flock                   \
24531         fstat                   \
24532         getdtablesize   \
24533         getgrgid                \
24534         gethostname             \
24535         getpass                 \
24536         getpassphrase   \
24537         getpwuid                \
24538         getpwnam                \
24539         getspnam                \
24540         gettimeofday    \
24541         initgroups              \
24542         lockf                   \
24543         memcpy                  \
24544         memmove                 \
24545         mkstemp                 \
24546         mktemp                  \
24547         pipe                    \
24548         read                    \
24549         recv                    \
24550         recvfrom                \
24551         setpwfile               \
24552         setgid                  \
24553         setegid                 \
24554         setsid                  \
24555         setuid                  \
24556         seteuid                 \
24557         signal                  \
24558         strdup                  \
24559         strpbrk                 \
24560         strrchr                 \
24561         strsep                  \
24562         strstr                  \
24563         strtol                  \
24564         strtoul                 \
24565         strtoq                  \
24566         strtouq                 \
24567         strtoll                 \
24568         strspn                  \
24569         sysconf                 \
24570         usleep                  \
24571         waitpid                 \
24572         wait4                   \
24573         write                   \
24574         send                    \
24575         sendmsg                 \
24576         sendto                  \
24577
24578 do
24579 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24580 echo "configure:24581: checking for $ac_func" >&5
24581 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24582   echo $ac_n "(cached) $ac_c" 1>&6
24583 else
24584   cat > conftest.$ac_ext <<EOF
24585 #line 24586 "configure"
24586 #include "confdefs.h"
24587 /* System header to define __stub macros and hopefully few prototypes,
24588     which can conflict with char $ac_func(); below.  */
24589 #include <assert.h>
24590 /* Override any gcc2 internal prototype to avoid an error.  */
24591 /* We use char because int might match the return type of a gcc2
24592     builtin and then its argument prototype would still apply.  */
24593 char $ac_func();
24594 char (*f)();
24595
24596 int main() {
24597
24598 /* The GNU C library defines this for functions which it implements
24599     to always fail with ENOSYS.  Some functions are actually named
24600     something starting with __ and the normal name is an alias.  */
24601 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24602 choke me
24603 #else
24604 f = $ac_func;
24605 #endif
24606
24607 ; return 0; }
24608 EOF
24609 if { (eval echo configure:24610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24610   rm -rf conftest*
24611   eval "ac_cv_func_$ac_func=yes"
24612 else
24613   echo "configure: failed program was:" >&5
24614   cat conftest.$ac_ext >&5
24615   rm -rf conftest*
24616   eval "ac_cv_func_$ac_func=no"
24617 fi
24618 rm -f conftest*
24619 fi
24620
24621 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24622   echo "$ac_t""yes" 1>&6
24623     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24624   cat >> confdefs.h <<EOF
24625 #define $ac_tr_func 1
24626 EOF
24627  
24628 else
24629   echo "$ac_t""no" 1>&6
24630 fi
24631 done
24632
24633
24634 for ac_func in getopt getpeereid
24635 do
24636 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24637 echo "configure:24638: checking for $ac_func" >&5
24638 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24639   echo $ac_n "(cached) $ac_c" 1>&6
24640 else
24641   cat > conftest.$ac_ext <<EOF
24642 #line 24643 "configure"
24643 #include "confdefs.h"
24644 /* System header to define __stub macros and hopefully few prototypes,
24645     which can conflict with char $ac_func(); below.  */
24646 #include <assert.h>
24647 /* Override any gcc2 internal prototype to avoid an error.  */
24648 /* We use char because int might match the return type of a gcc2
24649     builtin and then its argument prototype would still apply.  */
24650 char $ac_func();
24651 char (*f)();
24652
24653 int main() {
24654
24655 /* The GNU C library defines this for functions which it implements
24656     to always fail with ENOSYS.  Some functions are actually named
24657     something starting with __ and the normal name is an alias.  */
24658 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24659 choke me
24660 #else
24661 f = $ac_func;
24662 #endif
24663
24664 ; return 0; }
24665 EOF
24666 if { (eval echo configure:24667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24667   rm -rf conftest*
24668   eval "ac_cv_func_$ac_func=yes"
24669 else
24670   echo "configure: failed program was:" >&5
24671   cat conftest.$ac_ext >&5
24672   rm -rf conftest*
24673   eval "ac_cv_func_$ac_func=no"
24674 fi
24675 rm -f conftest*
24676 fi
24677
24678 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24679   echo "$ac_t""yes" 1>&6
24680     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24681   cat >> confdefs.h <<EOF
24682 #define $ac_tr_func 1
24683 EOF
24684  
24685 else
24686   echo "$ac_t""no" 1>&6
24687 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24688 fi
24689 done
24690
24691
24692
24693 if test "$ac_cv_func_getopt" != yes; then
24694         LIBSRCS="$LIBSRCS getopt.c"
24695 fi
24696 if test "$ac_cv_func_getpeereid" != yes; then
24697         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24698 echo "configure:24699: checking for msg_accrights in msghdr" >&5
24699 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24700   echo $ac_n "(cached) $ac_c" 1>&6
24701 else
24702   cat > conftest.$ac_ext <<EOF
24703 #line 24704 "configure"
24704 #include "confdefs.h"
24705 #include <sys/socket.h>
24706 int main() {
24707 struct msghdr m; m.msg_accrightslen=0
24708 ; return 0; }
24709 EOF
24710 if { (eval echo configure:24711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24711   rm -rf conftest*
24712   ol_cv_msghdr_msg_accrights=yes
24713 else
24714   echo "configure: failed program was:" >&5
24715   cat conftest.$ac_ext >&5
24716   rm -rf conftest*
24717   ol_cv_msghdr_msg_accrights=no
24718 fi
24719 rm -f conftest*
24720         
24721 fi
24722
24723 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24724   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24725         cat >> confdefs.h <<\EOF
24726 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24727 EOF
24728
24729   fi
24730
24731         LIBSRCS="$LIBSRCS getpeereid.c"
24732 fi
24733 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24734         if test "$ac_cv_func_snprintf" != yes; then
24735                 cat >> confdefs.h <<\EOF
24736 #define snprintf ber_pvt_snprintf
24737 EOF
24738
24739         fi
24740         if test "$ac_cv_func_vsnprintf" != yes; then
24741                 cat >> confdefs.h <<\EOF
24742 #define vsnprintf ber_pvt_vsnprintf
24743 EOF
24744
24745         fi
24746 fi
24747
24748
24749 if test "$ol_enable_slapi" != no ; then
24750                         for ac_hdr in ltdl.h
24751 do
24752 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24753 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24754 echo "configure:24755: checking for $ac_hdr" >&5
24755 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24756   echo $ac_n "(cached) $ac_c" 1>&6
24757 else
24758   cat > conftest.$ac_ext <<EOF
24759 #line 24760 "configure"
24760 #include "confdefs.h"
24761 #include <$ac_hdr>
24762 EOF
24763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24764 { (eval echo configure:24765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24766 if test -z "$ac_err"; then
24767   rm -rf conftest*
24768   eval "ac_cv_header_$ac_safe=yes"
24769 else
24770   echo "$ac_err" >&5
24771   echo "configure: failed program was:" >&5
24772   cat conftest.$ac_ext >&5
24773   rm -rf conftest*
24774   eval "ac_cv_header_$ac_safe=no"
24775 fi
24776 rm -f conftest*
24777 fi
24778 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24779   echo "$ac_t""yes" 1>&6
24780     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24781   cat >> confdefs.h <<EOF
24782 #define $ac_tr_hdr 1
24783 EOF
24784  
24785 else
24786   echo "$ac_t""no" 1>&6
24787 fi
24788 done
24789
24790
24791         if test $ac_cv_header_ltdl_h != yes ; then
24792                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24793         fi
24794         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24795 echo "configure:24796: checking for lt_dlinit in -lltdl" >&5
24796 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24797 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24798   echo $ac_n "(cached) $ac_c" 1>&6
24799 else
24800   ac_save_LIBS="$LIBS"
24801 LIBS="-lltdl  $LIBS"
24802 cat > conftest.$ac_ext <<EOF
24803 #line 24804 "configure"
24804 #include "confdefs.h"
24805 /* Override any gcc2 internal prototype to avoid an error.  */
24806 /* We use char because int might match the return type of a gcc2
24807     builtin and then its argument prototype would still apply.  */
24808 char lt_dlinit();
24809
24810 int main() {
24811 lt_dlinit()
24812 ; return 0; }
24813 EOF
24814 if { (eval echo configure:24815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24815   rm -rf conftest*
24816   eval "ac_cv_lib_$ac_lib_var=yes"
24817 else
24818   echo "configure: failed program was:" >&5
24819   cat conftest.$ac_ext >&5
24820   rm -rf conftest*
24821   eval "ac_cv_lib_$ac_lib_var=no"
24822 fi
24823 rm -f conftest*
24824 LIBS="$ac_save_LIBS"
24825
24826 fi
24827 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24828   echo "$ac_t""yes" 1>&6
24829   
24830                 SLAPI_LIBS=-lltdl
24831                 LIBSLAPI=libslapi.a
24832                 LIBSLAPITOOLS=../libslapi.a
24833                 cat >> confdefs.h <<\EOF
24834 #define HAVE_LIBLTDL 1
24835 EOF
24836
24837         
24838 else
24839   echo "$ac_t""no" 1>&6
24840 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24841 fi
24842
24843
24844         cat >> confdefs.h <<\EOF
24845 #define LDAP_SLAPI 1
24846 EOF
24847
24848 fi
24849
24850 if test "$ol_enable_debug" != no ; then
24851         cat >> confdefs.h <<\EOF
24852 #define LDAP_DEBUG 1
24853 EOF
24854
24855 fi
24856 if test "$ol_enable_syslog" = yes ; then
24857         cat >> confdefs.h <<\EOF
24858 #define LDAP_SYSLOG 1
24859 EOF
24860
24861 fi
24862 if test "$ol_link_kbind" != no ; then
24863         cat >> confdefs.h <<\EOF
24864 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24865 EOF
24866
24867 fi
24868 if test "$ol_enable_proctitle" != no ; then
24869         cat >> confdefs.h <<\EOF
24870 #define LDAP_PROCTITLE 1
24871 EOF
24872
24873 fi
24874 if test "$ol_enable_referrals" != no ; then
24875         cat >> confdefs.h <<\EOF
24876 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24877 EOF
24878
24879 fi
24880 if test "$ol_enable_local" != no; then
24881         cat >> confdefs.h <<\EOF
24882 #define LDAP_PF_LOCAL 1
24883 EOF
24884
24885 fi
24886 if test "$ol_link_ipv6" != no; then
24887         cat >> confdefs.h <<\EOF
24888 #define LDAP_PF_INET6 1
24889 EOF
24890
24891 fi
24892 if test "$ol_enable_cleartext" != no ; then
24893         cat >> confdefs.h <<\EOF
24894 #define SLAPD_CLEARTEXT 1
24895 EOF
24896
24897 fi
24898 if test "$ol_enable_crypt" != no ; then
24899         cat >> confdefs.h <<\EOF
24900 #define SLAPD_CRYPT 1
24901 EOF
24902
24903 fi
24904 if test "$ol_link_spasswd" != no ; then
24905         cat >> confdefs.h <<\EOF
24906 #define SLAPD_SPASSWD 1
24907 EOF
24908
24909 fi
24910 if test "$ol_enable_multimaster" != no ; then
24911         cat >> confdefs.h <<\EOF
24912 #define SLAPD_MULTIMASTER 1
24913 EOF
24914
24915 fi
24916 if test "$ol_enable_rlookups" != no ; then
24917         cat >> confdefs.h <<\EOF
24918 #define SLAPD_RLOOKUPS 1
24919 EOF
24920
24921 fi
24922 if test "$ol_enable_aci" != no ; then
24923         cat >> confdefs.h <<\EOF
24924 #define SLAPD_ACI_ENABLED 1
24925 EOF
24926
24927 fi
24928
24929 if test "$ol_link_modules" != no ; then
24930         cat >> confdefs.h <<\EOF
24931 #define SLAPD_MODULES 1
24932 EOF
24933
24934         BUILD_SLAPD=yes
24935         SLAPD_MODULES_LDFLAGS="-dlopen self"
24936 fi
24937
24938 cat >> confdefs.h <<\EOF
24939 #define SLAPD_MOD_STATIC 1
24940 EOF
24941
24942 cat >> confdefs.h <<\EOF
24943 #define SLAPD_MOD_DYNAMIC 2
24944 EOF
24945
24946
24947 if test "$ol_enable_bdb" != no ; then
24948         BUILD_SLAPD=yes
24949         BUILD_BDB=$ol_enable_bdb
24950         if test "$ol_enable_bdb" = mod ; then
24951                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24952                 MFLAG=SLAPD_MOD_DYNAMIC
24953         else
24954                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24955                 MFLAG=SLAPD_MOD_STATIC
24956         fi
24957         cat >> confdefs.h <<EOF
24958 #define SLAPD_BDB $MFLAG
24959 EOF
24960
24961 fi
24962
24963 if test "$ol_enable_dnssrv" != no ; then
24964         BUILD_SLAPD=yes
24965         BUILD_DNSSRV=$ol_enable_dnssrv
24966         if test "$ol_enable_dnssrv" = mod ; then
24967                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24968                 MFLAG=SLAPD_MOD_DYNAMIC
24969         else
24970                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24971                 MFLAG=SLAPD_MOD_STATIC
24972         fi
24973         cat >> confdefs.h <<EOF
24974 #define SLAPD_DNSSRV $MFLAG
24975 EOF
24976
24977 fi
24978
24979 if test "$ol_enable_hdb" != no ; then
24980         BUILD_SLAPD=yes
24981         BUILD_HDB=$ol_enable_hdb
24982         if test "$ol_enable_hdb" = mod ; then
24983                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24984                 MFLAG=SLAPD_MOD_DYNAMIC
24985         else
24986                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24987                 MFLAG=SLAPD_MOD_STATIC
24988         fi
24989         cat >> confdefs.h <<EOF
24990 #define SLAPD_HDB $MFLAG
24991 EOF
24992
24993 fi
24994
24995 if test "$ol_enable_ldap" != no ; then
24996         BUILD_SLAPD=yes
24997         BUILD_LDAP=$ol_enable_ldap
24998         if test "$ol_enable_ldap" = mod ; then
24999                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
25000                 MFLAG=SLAPD_MOD_DYNAMIC
25001         else
25002                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
25003                 MFLAG=SLAPD_MOD_STATIC
25004         fi
25005         cat >> confdefs.h <<EOF
25006 #define SLAPD_LDAP $MFLAG
25007 EOF
25008
25009 fi
25010
25011 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
25012         BUILD_SLAPD=yes
25013         BUILD_LDBM=$ol_enable_ldbm
25014         if test "$ol_enable_ldbm" = mod ; then
25015                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
25016                 MFLAG=SLAPD_MOD_DYNAMIC
25017         else
25018                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
25019                 MFLAG=SLAPD_MOD_STATIC
25020         fi
25021         cat >> confdefs.h <<EOF
25022 #define SLAPD_LDBM $MFLAG
25023 EOF
25024
25025 fi
25026
25027 if test "$ol_enable_meta" != no ; then
25028         BUILD_SLAPD=yes
25029         BUILD_META=$ol_enable_meta
25030         BUILD_REWRITE=yes
25031         if test "$ol_enable_meta" = mod ; then
25032                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
25033                 MFLAG=SLAPD_MOD_DYNAMIC
25034         else
25035                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
25036                 MFLAG=SLAPD_MOD_STATIC
25037         fi
25038         cat >> confdefs.h <<EOF
25039 #define SLAPD_META $MFLAG
25040 EOF
25041
25042 fi
25043
25044 if test "$ol_enable_monitor" != no ; then
25045         BUILD_SLAPD=yes
25046         BUILD_MONITOR=$ol_enable_monitor
25047         if test "$ol_enable_monitor" = mod ; then
25048                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
25049                 MFLAG=SLAPD_MOD_DYNAMIC
25050         else
25051                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
25052                 MFLAG=SLAPD_MOD_STATIC
25053         fi
25054         cat >> confdefs.h <<EOF
25055 #define SLAPD_MONITOR $MFLAG
25056 EOF
25057
25058 fi
25059
25060 if test "$ol_enable_null" != no ; then
25061         BUILD_SLAPD=yes
25062         BUILD_NULL=$ol_enable_null
25063         if test "$ol_enable_null" = mod ; then
25064                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
25065                 MFLAG=SLAPD_MOD_DYNAMIC
25066         else
25067                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
25068                 MFLAG=SLAPD_MOD_STATIC
25069         fi
25070         cat >> confdefs.h <<EOF
25071 #define SLAPD_NULL $MFLAG
25072 EOF
25073
25074 fi
25075
25076 if test "$ol_enable_passwd" != no ; then
25077         BUILD_SLAPD=yes
25078         BUILD_PASSWD=$ol_enable_passwd
25079         if test "$ol_enable_passwd" = mod ; then
25080                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
25081                 MFLAG=SLAPD_MOD_DYNAMIC
25082         else
25083                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
25084                 MFLAG=SLAPD_MOD_STATIC
25085         fi
25086         cat >> confdefs.h <<EOF
25087 #define SLAPD_PASSWD $MFLAG
25088 EOF
25089
25090 fi
25091
25092 if test "$ol_link_perl" != no ; then
25093         BUILD_SLAPD=yes
25094         BUILD_PERL=$ol_enable_perl
25095         if test "$ol_enable_perl" = mod ; then
25096                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25097                 MFLAG=SLAPD_MOD_DYNAMIC
25098         else
25099                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25100                 MFLAG=SLAPD_MOD_STATIC
25101         fi
25102         cat >> confdefs.h <<EOF
25103 #define SLAPD_PERL $MFLAG
25104 EOF
25105
25106 fi
25107
25108 if test "$ol_enable_relay" != no ; then
25109         BUILD_SLAPD=yes
25110         BUILD_RELAY=$ol_enable_relay
25111         if test "$ol_enable_relay" = mod ; then
25112                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25113                 MFLAG=SLAPD_MOD_DYNAMIC
25114         else
25115                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25116                 MFLAG=SLAPD_MOD_STATIC
25117         fi
25118         cat >> confdefs.h <<EOF
25119 #define SLAPD_RELAY $MFLAG
25120 EOF
25121
25122 fi
25123
25124 if test "$ol_enable_shell" != no ; then
25125         if test "$ol_link_thread" != no ; then
25126                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25127         fi
25128         BUILD_SLAPD=yes
25129         BUILD_SHELL=$ol_enable_shell
25130         if test "$ol_enable_shell" = mod ; then
25131                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25132                 MFLAG=SLAPD_MOD_DYNAMIC
25133         else
25134                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25135                 MFLAG=SLAPD_MOD_STATIC
25136         fi
25137         cat >> confdefs.h <<EOF
25138 #define SLAPD_SHELL $MFLAG
25139 EOF
25140
25141 fi
25142
25143 if test "$ol_link_sql" != no ; then
25144         BUILD_SLAPD=yes
25145         BUILD_SQL=$ol_enable_sql
25146         if test "$ol_enable_sql" = mod; then
25147                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25148                 MFLAG=SLAPD_MOD_DYNAMIC
25149         else
25150                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25151                 MFLAG=SLAPD_MOD_STATIC
25152         fi
25153         cat >> confdefs.h <<EOF
25154 #define SLAPD_SQL $MFLAG
25155 EOF
25156
25157 fi
25158
25159 if test "$ol_enable_denyop" != no ; then
25160         BUILD_DENYOP=$ol_enable_denyop
25161         if test "$ol_enable_denyop" = mod ; then
25162                 MFLAG=SLAPD_MOD_DYNAMIC
25163                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25164         else
25165                 MFLAG=SLAPD_MOD_STATIC
25166         fi
25167         cat >> confdefs.h <<EOF
25168 #define SLAPD_OVER_DENYOP $MFLAG
25169 EOF
25170
25171 fi
25172
25173 if test "$ol_enable_dyngroup" != no ; then
25174         BUILD_DYNGROUP=$ol_enable_dyngroup
25175         if test "$ol_enable_dyngroup" = mod ; then
25176                 MFLAG=SLAPD_MOD_DYNAMIC
25177                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25178         else
25179                 MFLAG=SLAPD_MOD_STATIC
25180         fi
25181         cat >> confdefs.h <<EOF
25182 #define SLAPD_OVER_DYNGROUP $MFLAG
25183 EOF
25184
25185 fi
25186
25187 if test "$ol_enable_glue" != no ; then
25188         BUILD_GLUE=$ol_enable_glue
25189         if test "$ol_enable_glue" = mod ; then
25190                 MFLAG=SLAPD_MOD_DYNAMIC
25191                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la"
25192         else
25193                 MFLAG=SLAPD_MOD_STATIC
25194         fi
25195         cat >> confdefs.h <<EOF
25196 #define SLAPD_OVER_GLUE $MFLAG
25197 EOF
25198
25199 fi
25200
25201 if test "$ol_enable_lastmod" != no ; then
25202         BUILD_LASTMOD=$ol_enable_lastmod
25203         if test "$ol_enable_lastmod" = mod ; then
25204                 MFLAG=SLAPD_MOD_DYNAMIC
25205                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25206         else
25207                 MFLAG=SLAPD_MOD_STATIC
25208         fi
25209         cat >> confdefs.h <<EOF
25210 #define SLAPD_OVER_LASTMOD $MFLAG
25211 EOF
25212
25213 fi
25214
25215 if test "$ol_enable_ppolicy" != no ; then
25216         BUILD_PPOLICY=$ol_enable_ppolicy
25217         if test "$ol_enable_ppolicy" = mod ; then
25218                 MFLAG=SLAPD_MOD_DYNAMIC
25219                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25220         else
25221                 MFLAG=SLAPD_MOD_STATIC
25222         fi
25223         cat >> confdefs.h <<EOF
25224 #define SLAPD_OVER_PPOLICY $MFLAG
25225 EOF
25226
25227 fi
25228
25229 if test "$ol_enable_proxycache" != no ; then
25230         BUILD_PROXYCACHE=$ol_enable_proxycache
25231         if test "$ol_enable_proxycache" = mod ; then
25232                 MFLAG=SLAPD_MOD_DYNAMIC
25233                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25234         else
25235                 MFLAG=SLAPD_MOD_STATIC
25236         fi
25237         cat >> confdefs.h <<EOF
25238 #define SLAPD_OVER_PROXYCACHE $MFLAG
25239 EOF
25240
25241 fi
25242
25243 if test "$ol_enable_refint" != no ; then
25244         BUILD_REFINT=$ol_enable_refint
25245         if test "$ol_enable_refint" = mod ; then
25246                 MFLAG=SLAPD_MOD_DYNAMIC
25247                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25248         else
25249                 MFLAG=SLAPD_MOD_STATIC
25250         fi
25251         cat >> confdefs.h <<EOF
25252 #define SLAPD_OVER_REFINT $MFLAG
25253 EOF
25254
25255 fi
25256
25257 if test "$ol_enable_rwm" != no ; then
25258         BUILD_REWRITE=yes
25259         BUILD_RWM=$ol_enable_rwm
25260         if test "$ol_enable_rwm" = mod ; then
25261                 MFLAG=SLAPD_MOD_DYNAMIC
25262                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25263         else
25264                 MFLAG=SLAPD_MOD_STATIC
25265         fi
25266         cat >> confdefs.h <<EOF
25267 #define SLAPD_OVER_RWM $MFLAG
25268 EOF
25269
25270 fi
25271
25272 if test "$ol_enable_syncprov" != no ; then
25273         BUILD_SYNCPROV=$ol_enable_syncprov
25274         if test "$ol_enable_syncprov" = mod ; then
25275                 MFLAG=SLAPD_MOD_DYNAMIC
25276                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25277         else
25278                 MFLAG=SLAPD_MOD_STATIC
25279         fi
25280         cat >> confdefs.h <<EOF
25281 #define SLAPD_OVER_SYNCPROV $MFLAG
25282 EOF
25283
25284 fi
25285
25286 if test "$ol_enable_unique" != no ; then
25287         BUILD_UNIQUE=$ol_enable_unique
25288         if test "$ol_enable_unique" = mod ; then
25289                 MFLAG=SLAPD_MOD_DYNAMIC
25290                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25291         else
25292                 MFLAG=SLAPD_MOD_STATIC
25293         fi
25294         cat >> confdefs.h <<EOF
25295 #define SLAPD_OVER_UNIQUE $MFLAG
25296 EOF
25297
25298 fi
25299
25300 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25301         $BUILD_SLAPD = yes ; then
25302         BUILD_SLURPD=yes
25303 fi
25304
25305 if test "$ol_enable_rewrite" != no ; then
25306         cat >> confdefs.h <<\EOF
25307 #define ENABLE_REWRITE 1
25308 EOF
25309
25310         BUILD_REWRITE=yes
25311 fi
25312
25313 if test "$ol_enable_slapi" != no ; then
25314         cat >> confdefs.h <<\EOF
25315 #define ENABLE_SLAPI 1
25316 EOF
25317
25318         BUILD_SLAPI=yes
25319         SLAPD_SLAPI_DEPEND=libslapi.a
25320 fi
25321
25322
25323
25324 if test "$ac_cv_mingw32" = yes ; then
25325         PLAT=NT
25326         SLAPD_MODULES_LDFLAGS=
25327 else
25328         PLAT=UNIX
25329 fi
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339   
25340   
25341   
25342   
25343   
25344   
25345   
25346   
25347   
25348   
25349   
25350   
25351   
25352   
25353   
25354   
25355   
25356   
25357   
25358   
25359   
25360   
25361   
25362   
25363   
25364   
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404 # Check whether --with-xxinstall or --without-xxinstall was given.
25405 if test "${with_xxinstall+set}" = set; then
25406   withval="$with_xxinstall"
25407   :
25408 fi
25409
25410
25411
25412 trap '' 1 2 15
25413
25414 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25415
25416 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25417 # Let make expand exec_prefix.
25418 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25419
25420 # Any assignment to VPATH causes Sun make to only execute
25421 # the first set of double-colon rules, so remove it if not needed.
25422 # If there is a colon in the path, we need to keep it.
25423 if test "x$srcdir" = x.; then
25424   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25425 fi
25426
25427 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25428
25429 DEFS=-DHAVE_CONFIG_H
25430
25431 # Without the "./", some shells look in PATH for config.status.
25432 : ${CONFIG_STATUS=./config.status}
25433
25434 echo creating $CONFIG_STATUS
25435 rm -f $CONFIG_STATUS
25436 cat > $CONFIG_STATUS <<EOF
25437 #! /bin/sh
25438 # Generated automatically by configure.
25439 # Run this file to recreate the current configuration.
25440 # This directory was configured as follows,
25441 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25442 #
25443 # $0 $ac_configure_args
25444 #
25445 # Compiler output produced by configure, useful for debugging
25446 # configure, is in ./config.log if it exists.
25447
25448 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25449 for ac_option
25450 do
25451   case "\$ac_option" in
25452   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25453     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25454     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25455   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25456     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25457     exit 0 ;;
25458   -help | --help | --hel | --he | --h)
25459     echo "\$ac_cs_usage"; exit 0 ;;
25460   *) echo "\$ac_cs_usage"; exit 1 ;;
25461   esac
25462 done
25463
25464 ac_given_srcdir=$srcdir
25465 ac_given_INSTALL="$INSTALL"
25466
25467 trap 'rm -fr `echo "\
25468 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25469 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25470 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25471 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25472 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25473 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25474 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25475 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25476 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25477 include/Makefile:build/top.mk:include/Makefile.in \
25478 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25479 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25480 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25481 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25482 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25483 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25484 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25485 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25486 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25487 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25488 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25489 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25490 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25491 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25492 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25493 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25494 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25495 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25496 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25497 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25498 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25499 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25500 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25501 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25502 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25503 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25504 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25505 tests/run \
25506 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25507  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25508 EOF
25509 cat >> $CONFIG_STATUS <<EOF
25510
25511 # Protect against being on the right side of a sed subst in config.status.
25512 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25513  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25514 $ac_vpsub
25515 $extrasub
25516 s%@SHELL@%$SHELL%g
25517 s%@CFLAGS@%$CFLAGS%g
25518 s%@CPPFLAGS@%$CPPFLAGS%g
25519 s%@CXXFLAGS@%$CXXFLAGS%g
25520 s%@FFLAGS@%$FFLAGS%g
25521 s%@DEFS@%$DEFS%g
25522 s%@LDFLAGS@%$LDFLAGS%g
25523 s%@LIBS@%$LIBS%g
25524 s%@exec_prefix@%$exec_prefix%g
25525 s%@prefix@%$prefix%g
25526 s%@program_transform_name@%$program_transform_name%g
25527 s%@bindir@%$bindir%g
25528 s%@sbindir@%$sbindir%g
25529 s%@libexecdir@%$libexecdir%g
25530 s%@datadir@%$datadir%g
25531 s%@sysconfdir@%$sysconfdir%g
25532 s%@sharedstatedir@%$sharedstatedir%g
25533 s%@localstatedir@%$localstatedir%g
25534 s%@libdir@%$libdir%g
25535 s%@includedir@%$includedir%g
25536 s%@oldincludedir@%$oldincludedir%g
25537 s%@infodir@%$infodir%g
25538 s%@mandir@%$mandir%g
25539 s%@host@%$host%g
25540 s%@host_alias@%$host_alias%g
25541 s%@host_cpu@%$host_cpu%g
25542 s%@host_vendor@%$host_vendor%g
25543 s%@host_os@%$host_os%g
25544 s%@target@%$target%g
25545 s%@target_alias@%$target_alias%g
25546 s%@target_cpu@%$target_cpu%g
25547 s%@target_vendor@%$target_vendor%g
25548 s%@target_os@%$target_os%g
25549 s%@build@%$build%g
25550 s%@build_alias@%$build_alias%g
25551 s%@build_cpu@%$build_cpu%g
25552 s%@build_vendor@%$build_vendor%g
25553 s%@build_os@%$build_os%g
25554 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25555 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25556 s%@INSTALL_DATA@%$INSTALL_DATA%g
25557 s%@PACKAGE@%$PACKAGE%g
25558 s%@VERSION@%$VERSION%g
25559 s%@ACLOCAL@%$ACLOCAL%g
25560 s%@AUTOCONF@%$AUTOCONF%g
25561 s%@AUTOMAKE@%$AUTOMAKE%g
25562 s%@AUTOHEADER@%$AUTOHEADER%g
25563 s%@MAKEINFO@%$MAKEINFO%g
25564 s%@install_sh@%$install_sh%g
25565 s%@AMTAR@%$AMTAR%g
25566 s%@AWK@%$AWK%g
25567 s%@AMTARFLAGS@%$AMTARFLAGS%g
25568 s%@SET_MAKE@%$SET_MAKE%g
25569 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25570 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25571 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25572 s%@top_builddir@%$top_builddir%g
25573 s%@ldap_subdir@%$ldap_subdir%g
25574 s%@CC@%$CC%g
25575 s%@AR@%$AR%g
25576 s%@LN_S@%$LN_S%g
25577 s%@OBJEXT@%$OBJEXT%g
25578 s%@EXEEXT@%$EXEEXT%g
25579 s%@ECHO@%$ECHO%g
25580 s%@RANLIB@%$RANLIB%g
25581 s%@STRIP@%$STRIP%g
25582 s%@DLLTOOL@%$DLLTOOL%g
25583 s%@AS@%$AS%g
25584 s%@OBJDUMP@%$OBJDUMP%g
25585 s%@CPP@%$CPP%g
25586 s%@LIBTOOL@%$LIBTOOL%g
25587 s%@PERLBIN@%$PERLBIN%g
25588 s%@OL_MKDEP@%$OL_MKDEP%g
25589 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25590 s%@LTSTATIC@%$LTSTATIC%g
25591 s%@LIBOBJS@%$LIBOBJS%g
25592 s%@LIBSRCS@%$LIBSRCS%g
25593 s%@PLAT@%$PLAT%g
25594 s%@WITH_SASL@%$WITH_SASL%g
25595 s%@WITH_TLS@%$WITH_TLS%g
25596 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25597 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25598 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25599 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25600 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25601 s%@BUILD_BDB@%$BUILD_BDB%g
25602 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25603 s%@BUILD_HDB@%$BUILD_HDB%g
25604 s%@BUILD_LDAP@%$BUILD_LDAP%g
25605 s%@BUILD_LDBM@%$BUILD_LDBM%g
25606 s%@BUILD_META@%$BUILD_META%g
25607 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25608 s%@BUILD_NULL@%$BUILD_NULL%g
25609 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25610 s%@BUILD_RELAY@%$BUILD_RELAY%g
25611 s%@BUILD_PERL@%$BUILD_PERL%g
25612 s%@BUILD_SHELL@%$BUILD_SHELL%g
25613 s%@BUILD_SQL@%$BUILD_SQL%g
25614 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
25615 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25616 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25617 s%@BUILD_GLUE@%$BUILD_GLUE%g
25618 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25619 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25620 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25621 s%@BUILD_REFINT@%$BUILD_REFINT%g
25622 s%@BUILD_RWM@%$BUILD_RWM%g
25623 s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
25624 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25625 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25626 s%@LDAP_LIBS@%$LDAP_LIBS%g
25627 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25628 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25629 s%@LDBM_LIBS@%$LDBM_LIBS%g
25630 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25631 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25632 s%@WRAP_LIBS@%$WRAP_LIBS%g
25633 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25634 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25635 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25636 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25637 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25638 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25639 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25640 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25641 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25642 s%@KRB4_LIBS@%$KRB4_LIBS%g
25643 s%@KRB5_LIBS@%$KRB5_LIBS%g
25644 s%@SASL_LIBS@%$SASL_LIBS%g
25645 s%@TLS_LIBS@%$TLS_LIBS%g
25646 s%@MODULES_LIBS@%$MODULES_LIBS%g
25647 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25648 s%@LIBSLAPI@%$LIBSLAPI%g
25649 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25650 s%@AUTH_LIBS@%$AUTH_LIBS%g
25651 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25652 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25653 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25654 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25655 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25656
25657 CEOF
25658 EOF
25659
25660 cat >> $CONFIG_STATUS <<\EOF
25661
25662 # Split the substitutions into bite-sized pieces for seds with
25663 # small command number limits, like on Digital OSF/1 and HP-UX.
25664 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25665 ac_file=1 # Number of current file.
25666 ac_beg=1 # First line for current file.
25667 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25668 ac_more_lines=:
25669 ac_sed_cmds=""
25670 while $ac_more_lines; do
25671   if test $ac_beg -gt 1; then
25672     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25673   else
25674     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25675   fi
25676   if test ! -s conftest.s$ac_file; then
25677     ac_more_lines=false
25678     rm -f conftest.s$ac_file
25679   else
25680     if test -z "$ac_sed_cmds"; then
25681       ac_sed_cmds="sed -f conftest.s$ac_file"
25682     else
25683       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25684     fi
25685     ac_file=`expr $ac_file + 1`
25686     ac_beg=$ac_end
25687     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25688   fi
25689 done
25690 if test -z "$ac_sed_cmds"; then
25691   ac_sed_cmds=cat
25692 fi
25693 EOF
25694
25695 cat >> $CONFIG_STATUS <<EOF
25696
25697 CONFIG_FILES=\${CONFIG_FILES-"\
25698 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25699 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25700 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25701 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25702 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25703 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25704 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25705 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25706 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25707 include/Makefile:build/top.mk:include/Makefile.in \
25708 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25709 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25710 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25711 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25712 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25713 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25714 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
25715 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25716 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25717 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25718 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25719 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25720 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25721 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25722 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25723 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25724 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25725 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25726 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25727 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25728 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25729 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25730 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25731 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25732 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25733 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25734 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25735 tests/run \
25736 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25737 "}
25738 EOF
25739 cat >> $CONFIG_STATUS <<\EOF
25740 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25741   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25742   case "$ac_file" in
25743   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25744        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25745   *) ac_file_in="${ac_file}.in" ;;
25746   esac
25747
25748   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25749
25750   # Remove last slash and all that follows it.  Not all systems have dirname.
25751   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25752   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25753     # The file is in a subdirectory.
25754     test ! -d "$ac_dir" && mkdir "$ac_dir"
25755     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25756     # A "../" for each directory in $ac_dir_suffix.
25757     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25758   else
25759     ac_dir_suffix= ac_dots=
25760   fi
25761
25762   case "$ac_given_srcdir" in
25763   .)  srcdir=.
25764       if test -z "$ac_dots"; then top_srcdir=.
25765       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25766   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25767   *) # Relative path.
25768     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25769     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25770   esac
25771
25772   case "$ac_given_INSTALL" in
25773   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25774   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25775   esac
25776
25777   echo creating "$ac_file"
25778   rm -f "$ac_file"
25779   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25780   case "$ac_file" in
25781   *[Mm]akefile*) ac_comsub="1i\\
25782 # $configure_input" ;;
25783   *) ac_comsub= ;;
25784   esac
25785
25786   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25787   sed -e "$ac_comsub
25788 s%@configure_input@%$configure_input%g
25789 s%@srcdir@%$srcdir%g
25790 s%@top_srcdir@%$top_srcdir%g
25791 s%@INSTALL@%$INSTALL%g
25792 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25793 fi; done
25794 rm -f conftest.s*
25795
25796 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25797 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25798 #
25799 # ac_d sets the value in "#define NAME VALUE" lines.
25800 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25801 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25802 ac_dC='\3'
25803 ac_dD='%g'
25804 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25805 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25806 ac_uB='\([      ]\)%\1#\2define\3'
25807 ac_uC=' '
25808 ac_uD='\4%g'
25809 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25810 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25811 ac_eB='$%\1#\2define\3'
25812 ac_eC=' '
25813 ac_eD='%g'
25814
25815 if test "${CONFIG_HEADERS+set}" != set; then
25816 EOF
25817 cat >> $CONFIG_STATUS <<EOF
25818   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25819 EOF
25820 cat >> $CONFIG_STATUS <<\EOF
25821 fi
25822 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25823   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25824   case "$ac_file" in
25825   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25826        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25827   *) ac_file_in="${ac_file}.in" ;;
25828   esac
25829
25830   echo creating $ac_file
25831
25832   rm -f conftest.frag conftest.in conftest.out
25833   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25834   cat $ac_file_inputs > conftest.in
25835
25836 EOF
25837
25838 # Transform confdefs.h into a sed script conftest.vals that substitutes
25839 # the proper values into config.h.in to produce config.h.  And first:
25840 # Protect against being on the right side of a sed subst in config.status.
25841 # Protect against being in an unquoted here document in config.status.
25842 rm -f conftest.vals
25843 cat > conftest.hdr <<\EOF
25844 s/[\\&%]/\\&/g
25845 s%[\\$`]%\\&%g
25846 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25847 s%ac_d%ac_u%gp
25848 s%ac_u%ac_e%gp
25849 EOF
25850 sed -n -f conftest.hdr confdefs.h > conftest.vals
25851 rm -f conftest.hdr
25852
25853 # This sed command replaces #undef with comments.  This is necessary, for
25854 # example, in the case of _POSIX_SOURCE, which is predefined and required
25855 # on some systems where configure will not decide to define it.
25856 cat >> conftest.vals <<\EOF
25857 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25858 EOF
25859
25860 # Break up conftest.vals because some shells have a limit on
25861 # the size of here documents, and old seds have small limits too.
25862
25863 rm -f conftest.tail
25864 while :
25865 do
25866   ac_lines=`grep -c . conftest.vals`
25867   # grep -c gives empty output for an empty file on some AIX systems.
25868   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25869   # Write a limited-size here document to conftest.frag.
25870   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25871   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25872   echo 'CEOF
25873   sed -f conftest.frag conftest.in > conftest.out
25874   rm -f conftest.in
25875   mv conftest.out conftest.in
25876 ' >> $CONFIG_STATUS
25877   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25878   rm -f conftest.vals
25879   mv conftest.tail conftest.vals
25880 done
25881 rm -f conftest.vals
25882
25883 cat >> $CONFIG_STATUS <<\EOF
25884   rm -f conftest.frag conftest.h
25885   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25886   cat conftest.in >> conftest.h
25887   rm -f conftest.in
25888   if cmp -s $ac_file conftest.h 2>/dev/null; then
25889     echo "$ac_file is unchanged"
25890     rm -f conftest.h
25891   else
25892     # Remove last slash and all that follows it.  Not all systems have dirname.
25893       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25894       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25895       # The file is in a subdirectory.
25896       test ! -d "$ac_dir" && mkdir "$ac_dir"
25897     fi
25898     rm -f $ac_file
25899     mv conftest.h $ac_file
25900   fi
25901 fi; done
25902
25903 EOF
25904 cat >> $CONFIG_STATUS <<EOF
25905 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25906 EOF
25907 cat >> $CONFIG_STATUS <<\EOF
25908
25909 chmod +x tests/run
25910 date > stamp-h
25911 BACKENDSC="servers/slapd/backends.c"
25912 echo "Making $BACKENDSC"
25913 rm -f $BACKENDSC
25914 cat > $BACKENDSC << ENDX
25915 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25916  *
25917  * Copyright 1998-2005 The OpenLDAP Foundation.
25918  * All rights reserved.
25919  *
25920  * Redistribution and use in source and binary forms, with or without
25921  * modification, are permitted only as authorized by the OpenLDAP
25922  * Public License.
25923  *
25924  * A copy of this license is available in the file LICENSE in the
25925  * top-level directory of the distribution or, alternatively, at
25926  * <http://www.OpenLDAP.org/license.html>.
25927  */
25928 /* This file is automatically generated by configure; please do not edit. */
25929
25930 #include "portable.h"
25931 #include "slap.h"
25932
25933 ENDX
25934 if test "${STATIC_BACKENDS}"; then
25935         for b in config ${STATIC_BACKENDS}; do
25936                 bb=`echo "${b}" | sed -e 's/back-//'`
25937                 cat >> $BACKENDSC << ENDX
25938 extern BI_init ${bb}_back_initialize;
25939 ENDX
25940         done
25941
25942         cat >> $BACKENDSC << ENDX
25943
25944 BackendInfo slap_binfo[] = {
25945 ENDX
25946
25947         for b in config ${STATIC_BACKENDS}; do
25948                 bb=`echo "${b}" | sed -e 's/back-//'`
25949                 echo "    Add ${bb} ..."
25950                 cat >> $BACKENDSC << ENDX
25951         { "${bb}", ${bb}_back_initialize },
25952 ENDX
25953         done
25954
25955         cat >> $BACKENDSC << ENDX
25956         { NULL, NULL },
25957 };
25958
25959 /* end of generated file */
25960 ENDX
25961 fi
25962
25963 echo Please run \"make depend\" to build dependencies
25964
25965 exit 0
25966 EOF
25967 chmod +x $CONFIG_STATUS
25968 rm -fr confdefs* $ac_clean_files
25969 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
25970