]> git.sur5r.net Git - openldap/blob - configure
patch for ITS#3379
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.549 2004/10/18 16:18:53 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 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-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58   --with-multiple-precision
59                           multiple precision support for statistics
60                           auto|bignum|gmp [auto]"
61 ac_help="$ac_help
62
63 SLAPD (Standalone LDAP Daemon) Options:"
64 ac_help="$ac_help
65   --enable-slapd          enable building slapd [yes]"
66 ac_help="$ac_help
67     --enable-aci          enable per-object ACIs (experimental) [no]"
68 ac_help="$ac_help
69     --enable-cleartext    enable cleartext passwords [yes]"
70 ac_help="$ac_help
71     --enable-crypt        enable crypt(3) passwords [no]"
72 ac_help="$ac_help
73     --enable-lmpasswd     enable LAN Manager passwords [no]"
74 ac_help="$ac_help
75     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
76 ac_help="$ac_help
77     --enable-modules      enable dynamic module support [no]"
78 ac_help="$ac_help
79     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
80 ac_help="$ac_help
81     --enable-rlookups     enable reverse lookups of client hostnames [no]"
82 ac_help="$ac_help
83     --enable-slapi        enable SLAPI support (experimental) [no]"
84 ac_help="$ac_help
85     --enable-slp          enable SLPv2 support [no]"
86 ac_help="$ac_help
87     --enable-wrappers     enable tcp wrapper support [no]"
88 ac_help="$ac_help
89
90 SLAPD Backend Options:"
91 ac_help="$ac_help
92     --enable-backends     enable all available backends no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend no|yes|mod [no]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
103 ac_help="$ac_help
104       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
107 ac_help="$ac_help
108     --enable-meta         enable metadirectory backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend no|yes|mod [yes]"
111 ac_help="$ac_help
112     --enable-null         enable null backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-passwd       enable passwd backend no|yes|mod [no]"
115 ac_help="$ac_help
116     --enable-perl         enable perl backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-relay        enable relay backend no|yes|mod [yes]"
119 ac_help="$ac_help
120     --enable-shell        enable shell backend no|yes|mod [no]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend no|yes|mod [no]"
123 ac_help="$ac_help
124
125 SLAPD Overlay Options:"
126 ac_help="$ac_help
127     --enable-overlays     enable all available overlays no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-chain        LDAP Chain Response no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
134 ac_help="$ac_help
135     --enable-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-unique       Attribute Uniqueness overlay no|yes|mod [no]"
146 ac_help="$ac_help
147
148 SLURPD (Replication Daemon) Options:"
149 ac_help="$ac_help
150   --enable-slurpd         enable building slurpd [auto]"
151 ac_help="$ac_help
152
153 Library Generation & Linking Options"
154 ac_help="$ac_help
155   --enable-static[=PKGS]  build static libraries [default=yes]"
156 ac_help="$ac_help
157   --enable-shared[=PKGS]  build shared libraries [default=yes]"
158 ac_help="$ac_help
159   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
160 ac_help="$ac_help
161   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
162
163 # Find the correct PATH separator.  Usually this is `:', but
164 # DJGPP uses `;' like DOS.
165 if test "X${PATH_SEPARATOR+set}" != Xset; then
166   UNAME=${UNAME-`uname 2>/dev/null`}
167   case X$UNAME in
168     *-DOS) lt_cv_sys_path_separator=';' ;;
169     *)     lt_cv_sys_path_separator=':' ;;
170   esac
171   PATH_SEPARATOR=$lt_cv_sys_path_separator
172 fi
173
174
175 # Check that we are running under the correct shell.
176 SHELL=${CONFIG_SHELL-/bin/sh}
177
178 case X$ECHO in
179 X*--fallback-echo)
180   # Remove one level of quotation (which was required for Make).
181   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
182   ;;
183 esac
184
185 echo=${ECHO-echo}
186 if test "X$1" = X--no-reexec; then
187   # Discard the --no-reexec flag, and continue.
188   shift
189 elif test "X$1" = X--fallback-echo; then
190   # Avoid inline document here, it may be left over
191   :
192 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
193   # Yippee, $echo works!
194   :
195 else
196   # Restart under the correct shell.
197   exec $SHELL "$0" --no-reexec ${1+"$@"}
198 fi
199
200 if test "X$1" = X--fallback-echo; then
201   # used as fallback echo
202   shift
203   cat <<EOF
204
205 EOF
206   exit 0
207 fi
208
209 # The HP-UX ksh and POSIX shell print the target directory to stdout
210 # if CDPATH is set.
211 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
212
213 if test -z "$ECHO"; then
214 if test "X${echo_test_string+set}" != Xset; then
215 # find a string as large as possible, as long as the shell can cope with it
216   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
217     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
218     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
219        echo_test_string="`eval $cmd`" &&
220        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
221     then
222       break
223     fi
224   done
225 fi
226
227 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
228    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
229    test "X$echo_testing_string" = "X$echo_test_string"; then
230   :
231 else
232   # The Solaris, AIX, and Digital Unix default echo programs unquote
233   # backslashes.  This makes it impossible to quote backslashes using
234   #   echo "$something" | sed 's/\\/\\\\/g'
235   #
236   # So, first we look for a working echo in the user's PATH.
237
238   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
239   for dir in $PATH /usr/ucb; do
240     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
241        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
242        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
243        test "X$echo_testing_string" = "X$echo_test_string"; then
244       echo="$dir/echo"
245       break
246     fi
247   done
248   IFS="$save_ifs"
249
250   if test "X$echo" = Xecho; then
251     # We didn't find a better echo, so look for alternatives.
252     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
253        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
254        test "X$echo_testing_string" = "X$echo_test_string"; then
255       # This shell has a builtin print -r that does the trick.
256       echo='print -r'
257     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
258          test "X$CONFIG_SHELL" != X/bin/ksh; then
259       # If we have ksh, try running configure again with it.
260       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
261       export ORIGINAL_CONFIG_SHELL
262       CONFIG_SHELL=/bin/ksh
263       export CONFIG_SHELL
264       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
265     else
266       # Try using printf.
267       echo='printf %s\n'
268       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
269          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
270          test "X$echo_testing_string" = "X$echo_test_string"; then
271         # Cool, printf works
272         :
273       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
274            test "X$echo_testing_string" = 'X\t' &&
275            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
276            test "X$echo_testing_string" = "X$echo_test_string"; then
277         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
278         export CONFIG_SHELL
279         SHELL="$CONFIG_SHELL"
280         export SHELL
281         echo="$CONFIG_SHELL $0 --fallback-echo"
282       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
283            test "X$echo_testing_string" = 'X\t' &&
284            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
285            test "X$echo_testing_string" = "X$echo_test_string"; then
286         echo="$CONFIG_SHELL $0 --fallback-echo"
287       else
288         # maybe with a smaller string...
289         prev=:
290
291         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
292           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
293           then
294             break
295           fi
296           prev="$cmd"
297         done
298
299         if test "$prev" != 'sed 50q "$0"'; then
300           echo_test_string=`eval $prev`
301           export echo_test_string
302           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
303         else
304           # Oops.  We lost completely, so just stick with echo.
305           echo=echo
306         fi
307       fi
308     fi
309   fi
310 fi
311 fi
312
313 # Copy echo and quote the copy suitably for passing to libtool from
314 # the Makefile, instead of quoting the original, which is used later.
315 ECHO=$echo
316 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
317    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
318 fi
319
320
321 ac_help="$ac_help
322   --disable-libtool-lock  avoid locking (might break parallel builds)"
323 ac_help="$ac_help
324   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
325 ac_help="$ac_help
326
327 See INSTALL file for further details."
328
329 # Initialize some variables set by options.
330 # The variables have the same names as the options, with
331 # dashes changed to underlines.
332 build=NONE
333 cache_file=./config.cache
334 exec_prefix=NONE
335 host=NONE
336 no_create=
337 nonopt=NONE
338 no_recursion=
339 prefix=NONE
340 program_prefix=NONE
341 program_suffix=NONE
342 program_transform_name=s,x,x,
343 silent=
344 site=
345 srcdir=
346 target=NONE
347 verbose=
348 x_includes=NONE
349 x_libraries=NONE
350 bindir='${exec_prefix}/bin'
351 sbindir='${exec_prefix}/sbin'
352 libexecdir='${exec_prefix}/libexec'
353 datadir='${prefix}/share'
354 sysconfdir='${prefix}/etc'
355 sharedstatedir='${prefix}/com'
356 localstatedir='${prefix}/var'
357 libdir='${exec_prefix}/lib'
358 includedir='${prefix}/include'
359 oldincludedir='/usr/include'
360 infodir='${prefix}/info'
361 mandir='${prefix}/man'
362
363 # Initialize some other variables.
364 subdirs=
365 MFLAGS= MAKEFLAGS=
366 SHELL=${CONFIG_SHELL-/bin/sh}
367 # Maximum number of lines to put in a shell here document.
368 ac_max_here_lines=12
369
370 ac_prev=
371 for ac_option
372 do
373
374   # If the previous option needs an argument, assign it.
375   if test -n "$ac_prev"; then
376     eval "$ac_prev=\$ac_option"
377     ac_prev=
378     continue
379   fi
380
381   case "$ac_option" in
382   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
383   *) ac_optarg= ;;
384   esac
385
386   # Accept the important Cygnus configure options, so we can diagnose typos.
387
388   case "$ac_option" in
389
390   -bindir | --bindir | --bindi | --bind | --bin | --bi)
391     ac_prev=bindir ;;
392   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
393     bindir="$ac_optarg" ;;
394
395   -build | --build | --buil | --bui | --bu)
396     ac_prev=build ;;
397   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
398     build="$ac_optarg" ;;
399
400   -cache-file | --cache-file | --cache-fil | --cache-fi \
401   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
402     ac_prev=cache_file ;;
403   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
404   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
405     cache_file="$ac_optarg" ;;
406
407   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
408     ac_prev=datadir ;;
409   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
410   | --da=*)
411     datadir="$ac_optarg" ;;
412
413   -disable-* | --disable-*)
414     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
415     # Reject names that are not valid shell variable names.
416     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
417       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
418     fi
419     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
420     eval "enable_${ac_feature}=no" ;;
421
422   -enable-* | --enable-*)
423     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
424     # Reject names that are not valid shell variable names.
425     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
426       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
427     fi
428     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
429     case "$ac_option" in
430       *=*) ;;
431       *) ac_optarg=yes ;;
432     esac
433     eval "enable_${ac_feature}='$ac_optarg'" ;;
434
435   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
436   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
437   | --exec | --exe | --ex)
438     ac_prev=exec_prefix ;;
439   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
440   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
441   | --exec=* | --exe=* | --ex=*)
442     exec_prefix="$ac_optarg" ;;
443
444   -gas | --gas | --ga | --g)
445     # Obsolete; use --with-gas.
446     with_gas=yes ;;
447
448   -help | --help | --hel | --he)
449     # Omit some internal or obsolete options to make the list less imposing.
450     # This message is too long to be a string in the A/UX 3.1 sh.
451     cat << EOF
452 Usage: configure [options] [host]
453 Options: [defaults in brackets after descriptions]
454 Configuration:
455   --cache-file=FILE       cache test results in FILE
456   --help                  print this message
457   --no-create             do not create output files
458   --quiet, --silent       do not print \`checking...' messages
459   --version               print the version of autoconf that created configure
460 Directory and file names:
461   --prefix=PREFIX         install architecture-independent files in PREFIX
462                           [$ac_default_prefix]
463   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
464                           [same as prefix]
465   --bindir=DIR            user executables in DIR [EPREFIX/bin]
466   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
467   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
468   --datadir=DIR           read-only architecture-independent data in DIR
469                           [PREFIX/share]
470   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
471   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
472                           [PREFIX/com]
473   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
474   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
475   --includedir=DIR        C header files in DIR [PREFIX/include]
476   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
477   --infodir=DIR           info documentation in DIR [PREFIX/info]
478   --mandir=DIR            man documentation in DIR [PREFIX/man]
479   --srcdir=DIR            find the sources in DIR [configure dir or ..]
480   --program-prefix=PREFIX prepend PREFIX to installed program names
481   --program-suffix=SUFFIX append SUFFIX to installed program names
482   --program-transform-name=PROGRAM
483                           run sed PROGRAM on installed program names
484 EOF
485     cat << EOF
486 Host type:
487   --build=BUILD           configure for building on BUILD [BUILD=HOST]
488   --host=HOST             configure for HOST [guessed]
489   --target=TARGET         configure for TARGET [TARGET=HOST]
490 Features and packages:
491   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
492   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
493   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
494   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
495   --x-includes=DIR        X include files are in DIR
496   --x-libraries=DIR       X library files are in DIR
497 EOF
498     if test -n "$ac_help"; then
499       echo "--enable and --with options recognized:$ac_help"
500     fi
501     exit 0 ;;
502
503   -host | --host | --hos | --ho)
504     ac_prev=host ;;
505   -host=* | --host=* | --hos=* | --ho=*)
506     host="$ac_optarg" ;;
507
508   -includedir | --includedir | --includedi | --included | --include \
509   | --includ | --inclu | --incl | --inc)
510     ac_prev=includedir ;;
511   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
512   | --includ=* | --inclu=* | --incl=* | --inc=*)
513     includedir="$ac_optarg" ;;
514
515   -infodir | --infodir | --infodi | --infod | --info | --inf)
516     ac_prev=infodir ;;
517   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
518     infodir="$ac_optarg" ;;
519
520   -libdir | --libdir | --libdi | --libd)
521     ac_prev=libdir ;;
522   -libdir=* | --libdir=* | --libdi=* | --libd=*)
523     libdir="$ac_optarg" ;;
524
525   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
526   | --libexe | --libex | --libe)
527     ac_prev=libexecdir ;;
528   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
529   | --libexe=* | --libex=* | --libe=*)
530     libexecdir="$ac_optarg" ;;
531
532   -localstatedir | --localstatedir | --localstatedi | --localstated \
533   | --localstate | --localstat | --localsta | --localst \
534   | --locals | --local | --loca | --loc | --lo)
535     ac_prev=localstatedir ;;
536   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
537   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
538   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
539     localstatedir="$ac_optarg" ;;
540
541   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
542     ac_prev=mandir ;;
543   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
544     mandir="$ac_optarg" ;;
545
546   -nfp | --nfp | --nf)
547     # Obsolete; use --without-fp.
548     with_fp=no ;;
549
550   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
551   | --no-cr | --no-c)
552     no_create=yes ;;
553
554   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
555   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
556     no_recursion=yes ;;
557
558   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
559   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
560   | --oldin | --oldi | --old | --ol | --o)
561     ac_prev=oldincludedir ;;
562   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
563   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
564   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
565     oldincludedir="$ac_optarg" ;;
566
567   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
568     ac_prev=prefix ;;
569   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
570     prefix="$ac_optarg" ;;
571
572   -program-prefix | --program-prefix | --program-prefi | --program-pref \
573   | --program-pre | --program-pr | --program-p)
574     ac_prev=program_prefix ;;
575   -program-prefix=* | --program-prefix=* | --program-prefi=* \
576   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
577     program_prefix="$ac_optarg" ;;
578
579   -program-suffix | --program-suffix | --program-suffi | --program-suff \
580   | --program-suf | --program-su | --program-s)
581     ac_prev=program_suffix ;;
582   -program-suffix=* | --program-suffix=* | --program-suffi=* \
583   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
584     program_suffix="$ac_optarg" ;;
585
586   -program-transform-name | --program-transform-name \
587   | --program-transform-nam | --program-transform-na \
588   | --program-transform-n | --program-transform- \
589   | --program-transform | --program-transfor \
590   | --program-transfo | --program-transf \
591   | --program-trans | --program-tran \
592   | --progr-tra | --program-tr | --program-t)
593     ac_prev=program_transform_name ;;
594   -program-transform-name=* | --program-transform-name=* \
595   | --program-transform-nam=* | --program-transform-na=* \
596   | --program-transform-n=* | --program-transform-=* \
597   | --program-transform=* | --program-transfor=* \
598   | --program-transfo=* | --program-transf=* \
599   | --program-trans=* | --program-tran=* \
600   | --progr-tra=* | --program-tr=* | --program-t=*)
601     program_transform_name="$ac_optarg" ;;
602
603   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
604   | -silent | --silent | --silen | --sile | --sil)
605     silent=yes ;;
606
607   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
608     ac_prev=sbindir ;;
609   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
610   | --sbi=* | --sb=*)
611     sbindir="$ac_optarg" ;;
612
613   -sharedstatedir | --sharedstatedir | --sharedstatedi \
614   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
615   | --sharedst | --shareds | --shared | --share | --shar \
616   | --sha | --sh)
617     ac_prev=sharedstatedir ;;
618   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
619   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
620   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
621   | --sha=* | --sh=*)
622     sharedstatedir="$ac_optarg" ;;
623
624   -site | --site | --sit)
625     ac_prev=site ;;
626   -site=* | --site=* | --sit=*)
627     site="$ac_optarg" ;;
628
629   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
630     ac_prev=srcdir ;;
631   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
632     srcdir="$ac_optarg" ;;
633
634   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
635   | --syscon | --sysco | --sysc | --sys | --sy)
636     ac_prev=sysconfdir ;;
637   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
638   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
639     sysconfdir="$ac_optarg" ;;
640
641   -target | --target | --targe | --targ | --tar | --ta | --t)
642     ac_prev=target ;;
643   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
644     target="$ac_optarg" ;;
645
646   -v | -verbose | --verbose | --verbos | --verbo | --verb)
647     verbose=yes ;;
648
649   -version | --version | --versio | --versi | --vers)
650     echo "configure generated by autoconf version 2.13.1"
651     exit 0 ;;
652
653   -with-* | --with-*)
654     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
655     # Reject names that are not valid shell variable names.
656     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
657       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
658     fi
659     ac_package=`echo $ac_package| sed 's/-/_/g'`
660     case "$ac_option" in
661       *=*) ;;
662       *) ac_optarg=yes ;;
663     esac
664     eval "with_${ac_package}='$ac_optarg'" ;;
665
666   -without-* | --without-*)
667     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
668     # Reject names that are not valid shell variable names.
669     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
670       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
671     fi
672     ac_package=`echo $ac_package| sed 's/-/_/g'`
673     eval "with_${ac_package}=no" ;;
674
675   --x)
676     # Obsolete; use --with-x.
677     with_x=yes ;;
678
679   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
680   | --x-incl | --x-inc | --x-in | --x-i)
681     ac_prev=x_includes ;;
682   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
683   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
684     x_includes="$ac_optarg" ;;
685
686   -x-libraries | --x-libraries | --x-librarie | --x-librari \
687   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
688     ac_prev=x_libraries ;;
689   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
690   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
691     x_libraries="$ac_optarg" ;;
692
693   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
694     ;;
695
696   *)
697     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
698       echo "configure: warning: $ac_option: invalid host type" 1>&2
699     fi
700     if test "x$nonopt" != xNONE; then
701       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
702     fi
703     nonopt="$ac_option"
704     ;;
705
706   esac
707 done
708
709 if test -n "$ac_prev"; then
710   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
711 fi
712
713 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
714
715 # File descriptor usage:
716 # 0 standard input
717 # 1 file creation
718 # 2 errors and warnings
719 # 3 some systems may open it to /dev/tty
720 # 4 used on the Kubota Titan
721 # 6 checking for... messages and results
722 # 5 compiler messages saved in config.log
723 if test "$silent" = yes; then
724   exec 6>/dev/null
725 else
726   exec 6>&1
727 fi
728 exec 5>./config.log
729
730 echo "\
731 This file contains any messages produced by compilers while
732 running configure, to aid debugging if configure makes a mistake.
733 " 1>&5
734
735 # Strip out --no-create and --no-recursion so they do not pile up.
736 # Also quote any args containing shell metacharacters.
737 ac_configure_args=
738 for ac_arg
739 do
740   case "$ac_arg" in
741   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
742   | --no-cr | --no-c) ;;
743   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
744   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
745   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
746   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
747   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
748   esac
749 done
750
751 # NLS nuisances.
752 # Only set these to C if already set.  These must not be set unconditionally
753 # because not all systems understand e.g. LANG=C (notably SCO).
754 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
755 # Non-C LC_CTYPE values break the ctype check.
756 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
757 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
758 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
759 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
760
761 # confdefs.h avoids OS command line length limits that DEFS can exceed.
762 rm -rf conftest* confdefs.h
763 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
764 echo > confdefs.h
765
766 # A filename unique to this package, relative to the directory that
767 # configure is in, which we can look for to find out if srcdir is correct.
768 ac_unique_file=build/version.sh
769
770 # Find the source files, if location was not specified.
771 if test -z "$srcdir"; then
772   ac_srcdir_defaulted=yes
773   # Try the directory containing this script, then its parent.
774   ac_prog=$0
775   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
776   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
777   srcdir=$ac_confdir
778   if test ! -r $srcdir/$ac_unique_file; then
779     srcdir=..
780   fi
781 else
782   ac_srcdir_defaulted=no
783 fi
784 if test ! -r $srcdir/$ac_unique_file; then
785   if test "$ac_srcdir_defaulted" = yes; then
786     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
787   else
788     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
789   fi
790 fi
791 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
792
793 # Prefer explicitly selected file to automatically selected ones.
794 if test -z "$CONFIG_SITE"; then
795   if test "x$prefix" != xNONE; then
796     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
797   else
798     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
799   fi
800 fi
801 for ac_site_file in $CONFIG_SITE; do
802   if test -r "$ac_site_file"; then
803     echo "loading site script $ac_site_file"
804     . "$ac_site_file"
805   fi
806 done
807
808
809 ac_ext=c
810 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
811 ac_cpp='$CPP $CPPFLAGS'
812 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
813 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
814 cross_compiling=$ac_cv_prog_cc_cross
815
816 ac_exeext=
817 ac_objext=o
818 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
819   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
820   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
821     ac_n= ac_c='
822 ' ac_t='        '
823   else
824     ac_n=-n ac_c= ac_t=
825   fi
826 else
827   ac_n= ac_c='\c' ac_t=
828 fi
829
830
831 # set unset (borrowed from autoconf 2.49c)
832 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
833   ol_unset=unset
834 else
835   ol_unset=false
836 fi
837 # unset CDPATH
838 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
839
840 ac_aux_dir=
841 for ac_dir in build $srcdir/build; do
842   if test -f $ac_dir/install-sh; then
843     ac_aux_dir=$ac_dir
844     ac_install_sh="$ac_aux_dir/install-sh -c"
845     break
846   elif 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/shtool; then
851     ac_aux_dir=$ac_dir
852     ac_install_sh="$ac_aux_dir/shtool install -c"
853     break
854   fi
855 done
856 if test -z "$ac_aux_dir"; then
857   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
858 fi
859 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
860 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
861 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
862
863 eval `$ac_aux_dir/version.sh`
864 if test -z "$OL_STRING"; then
865         { echo "configure: error: could not determine version" 1>&2; exit 1; }
866 fi
867
868 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
869         ac_cv_shtool="$ac_aux_dir/shtool"
870 else
871         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
872 fi
873
874 SHTOOL="$ac_cv_shtool"
875
876 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
877 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
878
879 OPENLDAP_CVS=""
880 if test -d $ac_aux_dir/CVS; then
881         OPENLDAP_CVS="(from CVS sources) "
882 fi
883
884 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
885
886
887 echo $ac_n "checking host system type""... $ac_c" 1>&6
888 echo "configure:889: checking host system type" >&5
889 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
890
891 # Make sure we can run config.sub.
892   if $ac_config_sub sun4 >/dev/null 2>&1; then :
893     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
894   fi
895
896   ac_cv_host_alias=$host
897   case "$ac_cv_host_alias" in
898   NONE)
899     case $nonopt in
900     NONE)
901       if ac_cv_host_alias=`$ac_config_guess`; then :
902       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
903       fi ;;
904     *) ac_cv_host_alias=$nonopt ;;
905     esac ;;
906   esac
907
908   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
909   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
910   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
911   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
912 else
913   echo $ac_n "(cached) $ac_c" 1>&6
914 fi
915
916 echo "$ac_t""$ac_cv_host" 1>&6
917
918 host=$ac_cv_host
919 host_alias=$ac_cv_host_alias
920 host_cpu=$ac_cv_host_cpu
921 host_vendor=$ac_cv_host_vendor
922 host_os=$ac_cv_host_os
923
924
925
926
927
928 echo $ac_n "checking target system type""... $ac_c" 1>&6
929 echo "configure:930: checking target system type" >&5
930 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
931
932 # Make sure we can run config.sub.
933   if $ac_config_sub sun4 >/dev/null 2>&1; then :
934     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
935   fi
936
937   ac_cv_target_alias=$target
938   case "$ac_cv_target_alias" in
939   NONE)
940     case $nonopt in
941     NONE)
942       ac_cv_target_alias=$host_alias ;;
943
944     *) ac_cv_target_alias=$nonopt ;;
945     esac ;;
946   esac
947
948   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
949   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
950   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
951   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
952 else
953   echo $ac_n "(cached) $ac_c" 1>&6
954 fi
955
956 echo "$ac_t""$ac_cv_target" 1>&6
957
958 target=$ac_cv_target
959 target_alias=$ac_cv_target_alias
960 target_cpu=$ac_cv_target_cpu
961 target_vendor=$ac_cv_target_vendor
962 target_os=$ac_cv_target_os
963
964
965
966
967
968 echo $ac_n "checking build system type""... $ac_c" 1>&6
969 echo "configure:970: checking build system type" >&5
970 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
971
972 # Make sure we can run config.sub.
973   if $ac_config_sub sun4 >/dev/null 2>&1; then :
974     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
975   fi
976
977   ac_cv_build_alias=$build
978   case "$ac_cv_build_alias" in
979   NONE)
980     case $nonopt in
981     NONE)
982       ac_cv_build_alias=$host_alias ;;
983
984     *) ac_cv_build_alias=$nonopt ;;
985     esac ;;
986   esac
987
988   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
989   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
990   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
991   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
992 else
993   echo $ac_n "(cached) $ac_c" 1>&6
994 fi
995
996 echo "$ac_t""$ac_cv_build" 1>&6
997
998 build=$ac_cv_build
999 build_alias=$ac_cv_build_alias
1000 build_cpu=$ac_cv_build_cpu
1001 build_vendor=$ac_cv_build_vendor
1002 build_os=$ac_cv_build_os
1003
1004
1005
1006
1007
1008 # Do some error checking and defaulting for the host and target type.
1009 # The inputs are:
1010 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1011 #
1012 # The rules are:
1013 # 1. You are not allowed to specify --host, --target, and nonopt at the
1014 #    same time.
1015 # 2. Host defaults to nonopt.
1016 # 3. If nonopt is not specified, then host defaults to the current host,
1017 #    as determined by config.guess.
1018 # 4. Target and build default to nonopt.
1019 # 5. If nonopt is not specified, then target and build default to host.
1020
1021 # The aliases save the names the user supplied, while $host etc.
1022 # will get canonicalized.
1023 case $host---$target---$nonopt in
1024 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1025 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1026 esac
1027
1028 test "$host_alias" != "$target_alias" &&
1029   test "$program_prefix$program_suffix$program_transform_name" = \
1030     NONENONEs,x,x, &&
1031   program_prefix=${target_alias}-
1032
1033
1034 # Find a good install program.  We prefer a C program (faster),
1035 # so one script is as good as another.  But avoid the broken or
1036 # incompatible versions:
1037 # SysV /etc/install, /usr/sbin/install
1038 # SunOS /usr/etc/install
1039 # IRIX /sbin/install
1040 # AIX /bin/install
1041 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1042 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1043 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1044 # ./install, which can be erroneously created by make from ./install.sh.
1045 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1046 echo "configure:1047: checking for a BSD compatible install" >&5
1047 if test -z "$INSTALL"; then
1048 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1049   echo $ac_n "(cached) $ac_c" 1>&6
1050 else
1051     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1052   for ac_dir in $PATH; do
1053     # Account for people who put trailing slashes in PATH elements.
1054     case "$ac_dir/" in
1055     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1056     *)
1057       # OSF1 and SCO ODT 3.0 have their own names for install.
1058       # Don't use installbsd from OSF since it installs stuff as root
1059       # by default.
1060       for ac_prog in ginstall scoinst install; do
1061         if test -f $ac_dir/$ac_prog; then
1062           if test $ac_prog = install &&
1063             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1064             # AIX install.  It has an incompatible calling convention.
1065             :
1066           elif test $ac_prog = install &&
1067             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1068             # program-specific install script used by HP pwplus--don't use.
1069             :
1070           else
1071             ac_cv_path_install="$ac_dir/$ac_prog -c"
1072             break 2
1073           fi
1074         fi
1075       done
1076       ;;
1077     esac
1078   done
1079   IFS="$ac_save_IFS"
1080
1081 fi
1082   if test "${ac_cv_path_install+set}" = set; then
1083     INSTALL="$ac_cv_path_install"
1084   else
1085     # As a last resort, use the slow shell script.  We don't cache a
1086     # path for INSTALL within a source directory, because that will
1087     # break other packages using the cache if that directory is
1088     # removed, or if the path is relative.
1089     INSTALL="$ac_install_sh"
1090   fi
1091 fi
1092 echo "$ac_t""$INSTALL" 1>&6
1093
1094 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1095 # It thinks the first close brace ends the variable substitution.
1096 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1097
1098 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1099
1100 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1101
1102 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1103 echo "configure:1104: checking whether build environment is sane" >&5
1104 # Just in case
1105 sleep 1
1106 echo timestamp > conftestfile
1107 # Do `set' in a subshell so we don't clobber the current shell's
1108 # arguments.  Must try -L first in case configure is actually a
1109 # symlink; some systems play weird games with the mod time of symlinks
1110 # (eg FreeBSD returns the mod time of the symlink's containing
1111 # directory).
1112 if (
1113    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1114    if test "$*" = "X"; then
1115       # -L didn't work.
1116       set X `ls -t $srcdir/configure conftestfile`
1117    fi
1118    if test "$*" != "X $srcdir/configure conftestfile" \
1119       && test "$*" != "X conftestfile $srcdir/configure"; then
1120
1121       # If neither matched, then we have a broken ls.  This can happen
1122       # if, for instance, CONFIG_SHELL is bash and it inherits a
1123       # broken ls alias from the environment.  This has actually
1124       # happened.  Such a system could not be considered "sane".
1125       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1126 alias in your environment" 1>&2; exit 1; }
1127    fi
1128
1129    test "$2" = conftestfile
1130    )
1131 then
1132    # Ok.
1133    :
1134 else
1135    { echo "configure: error: newly created file is older than distributed files!
1136 Check your system clock" 1>&2; exit 1; }
1137 fi
1138 rm -f conftest*
1139 echo "$ac_t""yes" 1>&6
1140 if test "$program_transform_name" = s,x,x,; then
1141   program_transform_name=
1142 else
1143   # Double any \ or $.  echo might interpret backslashes.
1144   cat <<\EOF_SED > conftestsed
1145 s,\\,\\\\,g; s,\$,$$,g
1146 EOF_SED
1147   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1148   rm -f conftestsed
1149 fi
1150 test "$program_prefix" != NONE &&
1151   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1152 # Use a double $ so make ignores it.
1153 test "$program_suffix" != NONE &&
1154   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1155
1156 # sed with no file args requires a program.
1157 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1158
1159 for ac_prog in mawk gawk nawk awk
1160 do
1161 # Extract the first word of "$ac_prog", so it can be a program name with args.
1162 set dummy $ac_prog; ac_word=$2
1163 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1164 echo "configure:1165: checking for $ac_word" >&5
1165 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1166   echo $ac_n "(cached) $ac_c" 1>&6
1167 else
1168   if test -n "$AWK"; then
1169   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1170 else
1171   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1172   ac_dummy="$PATH"
1173   for ac_dir in $ac_dummy; do
1174     test -z "$ac_dir" && ac_dir=.
1175     if test -f $ac_dir/$ac_word; then
1176       ac_cv_prog_AWK="$ac_prog"
1177       break
1178     fi
1179   done
1180   IFS="$ac_save_ifs"
1181 fi
1182 fi
1183 AWK="$ac_cv_prog_AWK"
1184 if test -n "$AWK"; then
1185   echo "$ac_t""$AWK" 1>&6
1186 else
1187   echo "$ac_t""no" 1>&6
1188 fi
1189
1190 test -n "$AWK" && break
1191 done
1192
1193 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1194 echo "configure:1195: checking whether ${MAKE-make} sets \${MAKE}" >&5
1195 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1196 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1197   echo $ac_n "(cached) $ac_c" 1>&6
1198 else
1199   cat > conftestmake <<\EOF
1200 all:
1201         @echo 'ac_maketemp="${MAKE}"'
1202 EOF
1203 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1204 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1205 if test -n "$ac_maketemp"; then
1206   eval ac_cv_prog_make_${ac_make}_set=yes
1207 else
1208   eval ac_cv_prog_make_${ac_make}_set=no
1209 fi
1210 rm -f conftestmake
1211 fi
1212 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1213   echo "$ac_t""yes" 1>&6
1214   SET_MAKE=
1215 else
1216   echo "$ac_t""no" 1>&6
1217   SET_MAKE="MAKE=${MAKE-make}"
1218 fi
1219
1220
1221
1222 PACKAGE=$OL_PACKAGE
1223
1224 VERSION=$OL_VERSION
1225
1226 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1227   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1228 fi
1229
1230
1231
1232 missing_dir=`cd $ac_aux_dir && pwd`
1233 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1234 echo "configure:1235: checking for working aclocal" >&5
1235 # Run test in a subshell; some versions of sh will print an error if
1236 # an executable is not found, even if stderr is redirected.
1237 # Redirect stdin to placate older versions of autoconf.  Sigh.
1238 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1239    ACLOCAL=aclocal
1240    echo "$ac_t""found" 1>&6
1241 else
1242    ACLOCAL="$missing_dir/missing aclocal"
1243    echo "$ac_t""missing" 1>&6
1244 fi
1245
1246 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1247 echo "configure:1248: checking for working autoconf" >&5
1248 # Run test in a subshell; some versions of sh will print an error if
1249 # an executable is not found, even if stderr is redirected.
1250 # Redirect stdin to placate older versions of autoconf.  Sigh.
1251 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1252    AUTOCONF=autoconf
1253    echo "$ac_t""found" 1>&6
1254 else
1255    AUTOCONF="$missing_dir/missing autoconf"
1256    echo "$ac_t""missing" 1>&6
1257 fi
1258
1259 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1260 echo "configure:1261: checking for working automake" >&5
1261 # Run test in a subshell; some versions of sh will print an error if
1262 # an executable is not found, even if stderr is redirected.
1263 # Redirect stdin to placate older versions of autoconf.  Sigh.
1264 if (automake --version) < /dev/null > /dev/null 2>&1; then
1265    AUTOMAKE=automake
1266    echo "$ac_t""found" 1>&6
1267 else
1268    AUTOMAKE="$missing_dir/missing automake"
1269    echo "$ac_t""missing" 1>&6
1270 fi
1271
1272 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1273 echo "configure:1274: checking for working autoheader" >&5
1274 # Run test in a subshell; some versions of sh will print an error if
1275 # an executable is not found, even if stderr is redirected.
1276 # Redirect stdin to placate older versions of autoconf.  Sigh.
1277 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1278    AUTOHEADER=autoheader
1279    echo "$ac_t""found" 1>&6
1280 else
1281    AUTOHEADER="$missing_dir/missing autoheader"
1282    echo "$ac_t""missing" 1>&6
1283 fi
1284
1285 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1286 echo "configure:1287: checking for working makeinfo" >&5
1287 # Run test in a subshell; some versions of sh will print an error if
1288 # an executable is not found, even if stderr is redirected.
1289 # Redirect stdin to placate older versions of autoconf.  Sigh.
1290 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1291    MAKEINFO=makeinfo
1292    echo "$ac_t""found" 1>&6
1293 else
1294    MAKEINFO="$missing_dir/missing makeinfo"
1295    echo "$ac_t""missing" 1>&6
1296 fi
1297
1298 install_sh="$missing_dir/install-sh"
1299 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1300
1301 for ac_prog in gnutar gtar tar
1302 do
1303 # Extract the first word of "$ac_prog", so it can be a program name with args.
1304 set dummy $ac_prog; ac_word=$2
1305 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1306 echo "configure:1307: checking for $ac_word" >&5
1307 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1308   echo $ac_n "(cached) $ac_c" 1>&6
1309 else
1310   if test -n "$AMTAR"; then
1311   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1312 else
1313   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1314   ac_dummy="$PATH"
1315   for ac_dir in $ac_dummy; do
1316     test -z "$ac_dir" && ac_dir=.
1317     if test -f $ac_dir/$ac_word; then
1318       ac_cv_prog_AMTAR="$ac_prog"
1319       break
1320     fi
1321   done
1322   IFS="$ac_save_ifs"
1323 fi
1324 fi
1325 AMTAR="$ac_cv_prog_AMTAR"
1326 if test -n "$AMTAR"; then
1327   echo "$ac_t""$AMTAR" 1>&6
1328 else
1329   echo "$ac_t""no" 1>&6
1330 fi
1331
1332 test -n "$AMTAR" && break
1333 done
1334
1335
1336 AMTARFLAGS=
1337 if test -n "$AMTAR"; then
1338   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1339         AMTARFLAGS=o
1340   fi
1341 fi
1342
1343 cat >> confdefs.h <<EOF
1344 #define OPENLDAP_PACKAGE "$PACKAGE"
1345 EOF
1346
1347 cat >> confdefs.h <<EOF
1348 #define OPENLDAP_VERSION "$VERSION"
1349 EOF
1350
1351
1352 cat >> confdefs.h <<EOF
1353 #define LDAP_VENDOR_VERSION $OL_API_INC
1354 EOF
1355
1356 cat >> confdefs.h <<EOF
1357 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1358 EOF
1359
1360 cat >> confdefs.h <<EOF
1361 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1362 EOF
1363
1364 cat >> confdefs.h <<EOF
1365 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1366 EOF
1367
1368
1369 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1370
1371 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1372
1373 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1374
1375
1376
1377 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1378 echo "configure:1379: checking configure arguments" >&5
1379
1380
1381 top_builddir=`pwd`
1382
1383 ldap_subdir="/openldap"
1384
1385 # Check whether --with-subdir or --without-subdir was given.
1386 if test "${with_subdir+set}" = set; then
1387   withval="$with_subdir"
1388   case "$withval" in
1389         no) ldap_subdir=""
1390                 ;;
1391         yes)
1392                 ;;
1393         /*|\\*)
1394                 ldap_subdir="$withval"
1395                 ;;
1396         *)
1397                 ldap_subdir="/$withval"
1398                 ;;
1399 esac
1400
1401 fi
1402
1403
1404 # OpenLDAP --enable-debug
1405         # Check whether --enable-debug or --disable-debug was given.
1406 if test "${enable_debug+set}" = set; then
1407   enableval="$enable_debug"
1408   
1409         ol_arg=invalid
1410         for ol_val in auto yes no ; do
1411                 if test "$enableval" = "$ol_val" ; then
1412                         ol_arg="$ol_val"
1413                 fi
1414         done
1415         if test "$ol_arg" = "invalid" ; then
1416                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1417         fi
1418         ol_enable_debug="$ol_arg"
1419
1420 else
1421         ol_enable_debug="yes"
1422 fi
1423 # end --enable-debug
1424 # OpenLDAP --enable-dynamic
1425         # Check whether --enable-dynamic or --disable-dynamic was given.
1426 if test "${enable_dynamic+set}" = set; then
1427   enableval="$enable_dynamic"
1428   
1429         ol_arg=invalid
1430         for ol_val in auto yes no ; do
1431                 if test "$enableval" = "$ol_val" ; then
1432                         ol_arg="$ol_val"
1433                 fi
1434         done
1435         if test "$ol_arg" = "invalid" ; then
1436                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1437         fi
1438         ol_enable_dynamic="$ol_arg"
1439
1440 else
1441         ol_enable_dynamic="no"
1442 fi
1443 # end --enable-dynamic
1444 # OpenLDAP --enable-syslog
1445         # Check whether --enable-syslog or --disable-syslog was given.
1446 if test "${enable_syslog+set}" = set; then
1447   enableval="$enable_syslog"
1448   
1449         ol_arg=invalid
1450         for ol_val in auto yes no ; do
1451                 if test "$enableval" = "$ol_val" ; then
1452                         ol_arg="$ol_val"
1453                 fi
1454         done
1455         if test "$ol_arg" = "invalid" ; then
1456                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1457         fi
1458         ol_enable_syslog="$ol_arg"
1459
1460 else
1461         ol_enable_syslog="auto"
1462 fi
1463 # end --enable-syslog
1464 # OpenLDAP --enable-proctitle
1465         # Check whether --enable-proctitle or --disable-proctitle was given.
1466 if test "${enable_proctitle+set}" = set; then
1467   enableval="$enable_proctitle"
1468   
1469         ol_arg=invalid
1470         for ol_val in auto yes no ; do
1471                 if test "$enableval" = "$ol_val" ; then
1472                         ol_arg="$ol_val"
1473                 fi
1474         done
1475         if test "$ol_arg" = "invalid" ; then
1476                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1477         fi
1478         ol_enable_proctitle="$ol_arg"
1479
1480 else
1481         ol_enable_proctitle="yes"
1482 fi
1483 # end --enable-proctitle
1484 ol_enable_referrals=${ol_enable_referrals-no}
1485 ol_enable_kbind=${ol_enable_kbind-no}
1486 # OpenLDAP --enable-ipv6
1487         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1488 if test "${enable_ipv6+set}" = set; then
1489   enableval="$enable_ipv6"
1490   
1491         ol_arg=invalid
1492         for ol_val in auto yes no ; do
1493                 if test "$enableval" = "$ol_val" ; then
1494                         ol_arg="$ol_val"
1495                 fi
1496         done
1497         if test "$ol_arg" = "invalid" ; then
1498                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1499         fi
1500         ol_enable_ipv6="$ol_arg"
1501
1502 else
1503         ol_enable_ipv6="auto"
1504 fi
1505 # end --enable-ipv6
1506 # OpenLDAP --enable-local
1507         # Check whether --enable-local or --disable-local was given.
1508 if test "${enable_local+set}" = set; then
1509   enableval="$enable_local"
1510   
1511         ol_arg=invalid
1512         for ol_val in auto yes no ; do
1513                 if test "$enableval" = "$ol_val" ; then
1514                         ol_arg="$ol_val"
1515                 fi
1516         done
1517         if test "$ol_arg" = "invalid" ; then
1518                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1519         fi
1520         ol_enable_local="$ol_arg"
1521
1522 else
1523         ol_enable_local="auto"
1524 fi
1525 # end --enable-local
1526
1527
1528 # OpenLDAP --with-cyrus_sasl
1529         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1530 if test "${with_cyrus_sasl+set}" = set; then
1531   withval="$with_cyrus_sasl"
1532   
1533         ol_arg=invalid
1534         for ol_val in auto yes no  ; do
1535                 if test "$withval" = "$ol_val" ; then
1536                         ol_arg="$ol_val"
1537                 fi
1538         done
1539         if test "$ol_arg" = "invalid" ; then
1540                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1541         fi
1542         ol_with_cyrus_sasl="$ol_arg"
1543
1544 else
1545         ol_with_cyrus_sasl="auto"
1546 fi
1547 # end --with-cyrus_sasl
1548
1549 # OpenLDAP --with-fetch
1550         # Check whether --with-fetch or --without-fetch was given.
1551 if test "${with_fetch+set}" = set; then
1552   withval="$with_fetch"
1553   
1554         ol_arg=invalid
1555         for ol_val in auto yes no  ; do
1556                 if test "$withval" = "$ol_val" ; then
1557                         ol_arg="$ol_val"
1558                 fi
1559         done
1560         if test "$ol_arg" = "invalid" ; then
1561                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1562         fi
1563         ol_with_fetch="$ol_arg"
1564
1565 else
1566         ol_with_fetch="auto"
1567 fi
1568 # end --with-fetch
1569
1570 ol_with_kerberos=${ol_with_kerberos-auto}
1571 # OpenLDAP --with-threads
1572         # Check whether --with-threads or --without-threads was given.
1573 if test "${with_threads+set}" = set; then
1574   withval="$with_threads"
1575   
1576         ol_arg=invalid
1577         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1578                 if test "$withval" = "$ol_val" ; then
1579                         ol_arg="$ol_val"
1580                 fi
1581         done
1582         if test "$ol_arg" = "invalid" ; then
1583                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1584         fi
1585         ol_with_threads="$ol_arg"
1586
1587 else
1588         ol_with_threads="auto"
1589 fi
1590 # end --with-threads
1591
1592 # OpenLDAP --with-tls
1593         # Check whether --with-tls or --without-tls was given.
1594 if test "${with_tls+set}" = set; then
1595   withval="$with_tls"
1596   
1597         ol_arg=invalid
1598         for ol_val in auto ssleay openssl yes no  ; do
1599                 if test "$withval" = "$ol_val" ; then
1600                         ol_arg="$ol_val"
1601                 fi
1602         done
1603         if test "$ol_arg" = "invalid" ; then
1604                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1605         fi
1606         ol_with_tls="$ol_arg"
1607
1608 else
1609         ol_with_tls="auto"
1610 fi
1611 # end --with-tls
1612
1613 # OpenLDAP --with-yielding_select
1614         # Check whether --with-yielding_select or --without-yielding_select was given.
1615 if test "${with_yielding_select+set}" = set; then
1616   withval="$with_yielding_select"
1617   
1618         ol_arg=invalid
1619         for ol_val in auto yes no manual  ; do
1620                 if test "$withval" = "$ol_val" ; then
1621                         ol_arg="$ol_val"
1622                 fi
1623         done
1624         if test "$ol_arg" = "invalid" ; then
1625                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1626         fi
1627         ol_with_yielding_select="$ol_arg"
1628
1629 else
1630         ol_with_yielding_select="auto"
1631 fi
1632 # end --with-yielding_select
1633
1634 # OpenLDAP --with-multiple_precision
1635         # Check whether --with-multiple_precision or --without-multiple_precision was given.
1636 if test "${with_multiple_precision+set}" = set; then
1637   withval="$with_multiple_precision"
1638   
1639         ol_arg=invalid
1640         for ol_val in auto bignum gmp yes no  ; do
1641                 if test "$withval" = "$ol_val" ; then
1642                         ol_arg="$ol_val"
1643                 fi
1644         done
1645         if test "$ol_arg" = "invalid" ; then
1646                 { echo "configure: error: bad value $withval for --with-multiple_precision" 1>&2; exit 1; }
1647         fi
1648         ol_with_multiple_precision="$ol_arg"
1649
1650 else
1651         ol_with_multiple_precision="auto"
1652 fi
1653 # end --with-multiple_precision
1654
1655
1656
1657 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1658 if test "${with_xxslapdoptions+set}" = set; then
1659   withval="$with_xxslapdoptions"
1660   :
1661 fi
1662
1663 # OpenLDAP --enable-slapd
1664         # Check whether --enable-slapd or --disable-slapd was given.
1665 if test "${enable_slapd+set}" = set; then
1666   enableval="$enable_slapd"
1667   
1668         ol_arg=invalid
1669         for ol_val in auto yes no ; do
1670                 if test "$enableval" = "$ol_val" ; then
1671                         ol_arg="$ol_val"
1672                 fi
1673         done
1674         if test "$ol_arg" = "invalid" ; then
1675                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1676         fi
1677         ol_enable_slapd="$ol_arg"
1678
1679 else
1680         ol_enable_slapd="yes"
1681 fi
1682 # end --enable-slapd
1683 # OpenLDAP --enable-aci
1684         # Check whether --enable-aci or --disable-aci was given.
1685 if test "${enable_aci+set}" = set; then
1686   enableval="$enable_aci"
1687   
1688         ol_arg=invalid
1689         for ol_val in auto yes no ; do
1690                 if test "$enableval" = "$ol_val" ; then
1691                         ol_arg="$ol_val"
1692                 fi
1693         done
1694         if test "$ol_arg" = "invalid" ; then
1695                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1696         fi
1697         ol_enable_aci="$ol_arg"
1698
1699 else
1700         ol_enable_aci="no"
1701 fi
1702 # end --enable-aci
1703 # OpenLDAP --enable-cleartext
1704         # Check whether --enable-cleartext or --disable-cleartext was given.
1705 if test "${enable_cleartext+set}" = set; then
1706   enableval="$enable_cleartext"
1707   
1708         ol_arg=invalid
1709         for ol_val in auto yes no ; do
1710                 if test "$enableval" = "$ol_val" ; then
1711                         ol_arg="$ol_val"
1712                 fi
1713         done
1714         if test "$ol_arg" = "invalid" ; then
1715                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1716         fi
1717         ol_enable_cleartext="$ol_arg"
1718
1719 else
1720         ol_enable_cleartext="yes"
1721 fi
1722 # end --enable-cleartext
1723 # OpenLDAP --enable-crypt
1724         # Check whether --enable-crypt or --disable-crypt was given.
1725 if test "${enable_crypt+set}" = set; then
1726   enableval="$enable_crypt"
1727   
1728         ol_arg=invalid
1729         for ol_val in auto yes no ; do
1730                 if test "$enableval" = "$ol_val" ; then
1731                         ol_arg="$ol_val"
1732                 fi
1733         done
1734         if test "$ol_arg" = "invalid" ; then
1735                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1736         fi
1737         ol_enable_crypt="$ol_arg"
1738
1739 else
1740         ol_enable_crypt="no"
1741 fi
1742 # end --enable-crypt
1743 # OpenLDAP --enable-lmpasswd
1744         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1745 if test "${enable_lmpasswd+set}" = set; then
1746   enableval="$enable_lmpasswd"
1747   
1748         ol_arg=invalid
1749         for ol_val in auto yes no ; do
1750                 if test "$enableval" = "$ol_val" ; then
1751                         ol_arg="$ol_val"
1752                 fi
1753         done
1754         if test "$ol_arg" = "invalid" ; then
1755                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1756         fi
1757         ol_enable_lmpasswd="$ol_arg"
1758
1759 else
1760         ol_enable_lmpasswd="no"
1761 fi
1762 # end --enable-lmpasswd
1763 # OpenLDAP --enable-spasswd
1764         # Check whether --enable-spasswd or --disable-spasswd was given.
1765 if test "${enable_spasswd+set}" = set; then
1766   enableval="$enable_spasswd"
1767   
1768         ol_arg=invalid
1769         for ol_val in auto yes no ; do
1770                 if test "$enableval" = "$ol_val" ; then
1771                         ol_arg="$ol_val"
1772                 fi
1773         done
1774         if test "$ol_arg" = "invalid" ; then
1775                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1776         fi
1777         ol_enable_spasswd="$ol_arg"
1778
1779 else
1780         ol_enable_spasswd="no"
1781 fi
1782 # end --enable-spasswd
1783 # OpenLDAP --enable-modules
1784         # Check whether --enable-modules or --disable-modules was given.
1785 if test "${enable_modules+set}" = set; then
1786   enableval="$enable_modules"
1787   
1788         ol_arg=invalid
1789         for ol_val in auto yes no ; do
1790                 if test "$enableval" = "$ol_val" ; then
1791                         ol_arg="$ol_val"
1792                 fi
1793         done
1794         if test "$ol_arg" = "invalid" ; then
1795                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1796         fi
1797         ol_enable_modules="$ol_arg"
1798         WITH_MODULES_ENABLED=yes
1799
1800 else
1801         ol_enable_modules="no"
1802         WITH_MODULES_ENABLED=no
1803 fi
1804 # end --enable-modules
1805 ol_enable_multimaster=${ol_enable_multimaster-no}
1806 # OpenLDAP --enable-rewrite
1807         # Check whether --enable-rewrite or --disable-rewrite was given.
1808 if test "${enable_rewrite+set}" = set; then
1809   enableval="$enable_rewrite"
1810   
1811         ol_arg=invalid
1812         for ol_val in auto yes no ; do
1813                 if test "$enableval" = "$ol_val" ; then
1814                         ol_arg="$ol_val"
1815                 fi
1816         done
1817         if test "$ol_arg" = "invalid" ; then
1818                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1819         fi
1820         ol_enable_rewrite="$ol_arg"
1821
1822 else
1823         ol_enable_rewrite="auto"
1824 fi
1825 # end --enable-rewrite
1826 # OpenLDAP --enable-rlookups
1827         # Check whether --enable-rlookups or --disable-rlookups was given.
1828 if test "${enable_rlookups+set}" = set; then
1829   enableval="$enable_rlookups"
1830   
1831         ol_arg=invalid
1832         for ol_val in auto yes no ; do
1833                 if test "$enableval" = "$ol_val" ; then
1834                         ol_arg="$ol_val"
1835                 fi
1836         done
1837         if test "$ol_arg" = "invalid" ; then
1838                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1839         fi
1840         ol_enable_rlookups="$ol_arg"
1841
1842 else
1843         ol_enable_rlookups="no"
1844 fi
1845 # end --enable-rlookups
1846 # OpenLDAP --enable-slapi
1847         # Check whether --enable-slapi or --disable-slapi was given.
1848 if test "${enable_slapi+set}" = set; then
1849   enableval="$enable_slapi"
1850   
1851         ol_arg=invalid
1852         for ol_val in auto yes no ; do
1853                 if test "$enableval" = "$ol_val" ; then
1854                         ol_arg="$ol_val"
1855                 fi
1856         done
1857         if test "$ol_arg" = "invalid" ; then
1858                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1859         fi
1860         ol_enable_slapi="$ol_arg"
1861
1862 else
1863         ol_enable_slapi="no"
1864 fi
1865 # end --enable-slapi
1866 # OpenLDAP --enable-slp
1867         # Check whether --enable-slp or --disable-slp was given.
1868 if test "${enable_slp+set}" = set; then
1869   enableval="$enable_slp"
1870   
1871         ol_arg=invalid
1872         for ol_val in auto yes no ; do
1873                 if test "$enableval" = "$ol_val" ; then
1874                         ol_arg="$ol_val"
1875                 fi
1876         done
1877         if test "$ol_arg" = "invalid" ; then
1878                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1879         fi
1880         ol_enable_slp="$ol_arg"
1881
1882 else
1883         ol_enable_slp="no"
1884 fi
1885 # end --enable-slp
1886 # OpenLDAP --enable-wrappers
1887         # Check whether --enable-wrappers or --disable-wrappers was given.
1888 if test "${enable_wrappers+set}" = set; then
1889   enableval="$enable_wrappers"
1890   
1891         ol_arg=invalid
1892         for ol_val in auto yes no ; do
1893                 if test "$enableval" = "$ol_val" ; then
1894                         ol_arg="$ol_val"
1895                 fi
1896         done
1897         if test "$ol_arg" = "invalid" ; then
1898                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1899         fi
1900         ol_enable_wrappers="$ol_arg"
1901
1902 else
1903         ol_enable_wrappers="no"
1904 fi
1905 # end --enable-wrappers
1906
1907 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1908         passwd perl relay shell sql"
1909
1910 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1911 if test "${with_xxslapbackends+set}" = set; then
1912   withval="$with_xxslapbackends"
1913   :
1914 fi
1915
1916
1917 # OpenLDAP --enable-backends
1918         # Check whether --enable-backends or --disable-backends was given.
1919 if test "${enable_backends+set}" = set; then
1920   enableval="$enable_backends"
1921   
1922         ol_arg=invalid
1923         for ol_val in no yes mod ; do
1924                 if test "$enableval" = "$ol_val" ; then
1925                         ol_arg="$ol_val"
1926                 fi
1927         done
1928         if test "$ol_arg" = "invalid" ; then
1929                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1930         fi
1931         ol_enable_backends="$ol_arg"
1932
1933 else
1934         ol_enable_backends="no"
1935 fi
1936 # end --enable-backends
1937 # OpenLDAP --enable-bdb
1938         # Check whether --enable-bdb or --disable-bdb was given.
1939 if test "${enable_bdb+set}" = set; then
1940   enableval="$enable_bdb"
1941   
1942         ol_arg=invalid
1943         for ol_val in no yes mod ; do
1944                 if test "$enableval" = "$ol_val" ; then
1945                         ol_arg="$ol_val"
1946                 fi
1947         done
1948         if test "$ol_arg" = "invalid" ; then
1949                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1950         fi
1951         ol_enable_bdb="$ol_arg"
1952
1953 else
1954         ol_enable_bdb="yes"
1955 fi
1956 # end --enable-bdb
1957 # OpenLDAP --enable-dnssrv
1958         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1959 if test "${enable_dnssrv+set}" = set; then
1960   enableval="$enable_dnssrv"
1961   
1962         ol_arg=invalid
1963         for ol_val in no yes mod ; do
1964                 if test "$enableval" = "$ol_val" ; then
1965                         ol_arg="$ol_val"
1966                 fi
1967         done
1968         if test "$ol_arg" = "invalid" ; then
1969                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1970         fi
1971         ol_enable_dnssrv="$ol_arg"
1972
1973 else
1974         ol_enable_dnssrv="no"
1975 fi
1976 # end --enable-dnssrv
1977 # OpenLDAP --enable-hdb
1978         # Check whether --enable-hdb or --disable-hdb was given.
1979 if test "${enable_hdb+set}" = set; then
1980   enableval="$enable_hdb"
1981   
1982         ol_arg=invalid
1983         for ol_val in no yes mod ; do
1984                 if test "$enableval" = "$ol_val" ; then
1985                         ol_arg="$ol_val"
1986                 fi
1987         done
1988         if test "$ol_arg" = "invalid" ; then
1989                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1990         fi
1991         ol_enable_hdb="$ol_arg"
1992
1993 else
1994         ol_enable_hdb="no"
1995 fi
1996 # end --enable-hdb
1997 # OpenLDAP --enable-ldap
1998         # Check whether --enable-ldap or --disable-ldap was given.
1999 if test "${enable_ldap+set}" = set; then
2000   enableval="$enable_ldap"
2001   
2002         ol_arg=invalid
2003         for ol_val in no yes mod ; do
2004                 if test "$enableval" = "$ol_val" ; then
2005                         ol_arg="$ol_val"
2006                 fi
2007         done
2008         if test "$ol_arg" = "invalid" ; then
2009                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2010         fi
2011         ol_enable_ldap="$ol_arg"
2012
2013 else
2014         ol_enable_ldap="no"
2015 fi
2016 # end --enable-ldap
2017 # OpenLDAP --enable-ldbm
2018         # Check whether --enable-ldbm or --disable-ldbm was given.
2019 if test "${enable_ldbm+set}" = set; then
2020   enableval="$enable_ldbm"
2021   
2022         ol_arg=invalid
2023         for ol_val in no yes mod ; do
2024                 if test "$enableval" = "$ol_val" ; then
2025                         ol_arg="$ol_val"
2026                 fi
2027         done
2028         if test "$ol_arg" = "invalid" ; then
2029                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2030         fi
2031         ol_enable_ldbm="$ol_arg"
2032
2033 else
2034         ol_enable_ldbm="no"
2035 fi
2036 # end --enable-ldbm
2037 # OpenLDAP --with-ldbm_api
2038         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2039 if test "${with_ldbm_api+set}" = set; then
2040   withval="$with_ldbm_api"
2041   
2042         ol_arg=invalid
2043         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2044                 if test "$withval" = "$ol_val" ; then
2045                         ol_arg="$ol_val"
2046                 fi
2047         done
2048         if test "$ol_arg" = "invalid" ; then
2049                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2050         fi
2051         ol_with_ldbm_api="$ol_arg"
2052
2053 else
2054         ol_with_ldbm_api="auto"
2055 fi
2056 # end --with-ldbm_api
2057
2058 # OpenLDAP --with-ldbm_type
2059         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2060 if test "${with_ldbm_type+set}" = set; then
2061   withval="$with_ldbm_type"
2062   
2063         ol_arg=invalid
2064         for ol_val in auto btree hash ; do
2065                 if test "$withval" = "$ol_val" ; then
2066                         ol_arg="$ol_val"
2067                 fi
2068         done
2069         if test "$ol_arg" = "invalid" ; then
2070                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2071         fi
2072         ol_with_ldbm_type="$ol_arg"
2073
2074 else
2075         ol_with_ldbm_type="auto"
2076 fi
2077 # end --with-ldbm_type
2078
2079 # OpenLDAP --enable-meta
2080         # Check whether --enable-meta or --disable-meta was given.
2081 if test "${enable_meta+set}" = set; then
2082   enableval="$enable_meta"
2083   
2084         ol_arg=invalid
2085         for ol_val in no yes mod ; do
2086                 if test "$enableval" = "$ol_val" ; then
2087                         ol_arg="$ol_val"
2088                 fi
2089         done
2090         if test "$ol_arg" = "invalid" ; then
2091                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2092         fi
2093         ol_enable_meta="$ol_arg"
2094
2095 else
2096         ol_enable_meta="no"
2097 fi
2098 # end --enable-meta
2099 # OpenLDAP --enable-monitor
2100         # Check whether --enable-monitor or --disable-monitor was given.
2101 if test "${enable_monitor+set}" = set; then
2102   enableval="$enable_monitor"
2103   
2104         ol_arg=invalid
2105         for ol_val in no yes mod ; do
2106                 if test "$enableval" = "$ol_val" ; then
2107                         ol_arg="$ol_val"
2108                 fi
2109         done
2110         if test "$ol_arg" = "invalid" ; then
2111                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2112         fi
2113         ol_enable_monitor="$ol_arg"
2114
2115 else
2116         ol_enable_monitor="yes"
2117 fi
2118 # end --enable-monitor
2119 # OpenLDAP --enable-null
2120         # Check whether --enable-null or --disable-null was given.
2121 if test "${enable_null+set}" = set; then
2122   enableval="$enable_null"
2123   
2124         ol_arg=invalid
2125         for ol_val in no yes mod ; do
2126                 if test "$enableval" = "$ol_val" ; then
2127                         ol_arg="$ol_val"
2128                 fi
2129         done
2130         if test "$ol_arg" = "invalid" ; then
2131                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2132         fi
2133         ol_enable_null="$ol_arg"
2134
2135 else
2136         ol_enable_null="no"
2137 fi
2138 # end --enable-null
2139 # OpenLDAP --enable-passwd
2140         # Check whether --enable-passwd or --disable-passwd was given.
2141 if test "${enable_passwd+set}" = set; then
2142   enableval="$enable_passwd"
2143   
2144         ol_arg=invalid
2145         for ol_val in no yes mod ; do
2146                 if test "$enableval" = "$ol_val" ; then
2147                         ol_arg="$ol_val"
2148                 fi
2149         done
2150         if test "$ol_arg" = "invalid" ; then
2151                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2152         fi
2153         ol_enable_passwd="$ol_arg"
2154
2155 else
2156         ol_enable_passwd="no"
2157 fi
2158 # end --enable-passwd
2159 # OpenLDAP --enable-perl
2160         # Check whether --enable-perl or --disable-perl was given.
2161 if test "${enable_perl+set}" = set; then
2162   enableval="$enable_perl"
2163   
2164         ol_arg=invalid
2165         for ol_val in no yes mod ; do
2166                 if test "$enableval" = "$ol_val" ; then
2167                         ol_arg="$ol_val"
2168                 fi
2169         done
2170         if test "$ol_arg" = "invalid" ; then
2171                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2172         fi
2173         ol_enable_perl="$ol_arg"
2174
2175 else
2176         ol_enable_perl="no"
2177 fi
2178 # end --enable-perl
2179 # OpenLDAP --enable-relay
2180         # Check whether --enable-relay or --disable-relay was given.
2181 if test "${enable_relay+set}" = set; then
2182   enableval="$enable_relay"
2183   
2184         ol_arg=invalid
2185         for ol_val in no yes mod ; do
2186                 if test "$enableval" = "$ol_val" ; then
2187                         ol_arg="$ol_val"
2188                 fi
2189         done
2190         if test "$ol_arg" = "invalid" ; then
2191                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2192         fi
2193         ol_enable_relay="$ol_arg"
2194
2195 else
2196         ol_enable_relay="yes"
2197 fi
2198 # end --enable-relay
2199 # OpenLDAP --enable-shell
2200         # Check whether --enable-shell or --disable-shell was given.
2201 if test "${enable_shell+set}" = set; then
2202   enableval="$enable_shell"
2203   
2204         ol_arg=invalid
2205         for ol_val in no yes mod ; do
2206                 if test "$enableval" = "$ol_val" ; then
2207                         ol_arg="$ol_val"
2208                 fi
2209         done
2210         if test "$ol_arg" = "invalid" ; then
2211                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2212         fi
2213         ol_enable_shell="$ol_arg"
2214
2215 else
2216         ol_enable_shell="no"
2217 fi
2218 # end --enable-shell
2219 # OpenLDAP --enable-sql
2220         # Check whether --enable-sql or --disable-sql was given.
2221 if test "${enable_sql+set}" = set; then
2222   enableval="$enable_sql"
2223   
2224         ol_arg=invalid
2225         for ol_val in no yes mod ; do
2226                 if test "$enableval" = "$ol_val" ; then
2227                         ol_arg="$ol_val"
2228                 fi
2229         done
2230         if test "$ol_arg" = "invalid" ; then
2231                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2232         fi
2233         ol_enable_sql="$ol_arg"
2234
2235 else
2236         ol_enable_sql="no"
2237 fi
2238 # end --enable-sql
2239
2240 Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm \
2241         refint unique"
2242
2243 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2244 if test "${with_xxslapoverlays+set}" = set; then
2245   withval="$with_xxslapoverlays"
2246   :
2247 fi
2248
2249
2250 # OpenLDAP --enable-overlays
2251         # Check whether --enable-overlays or --disable-overlays was given.
2252 if test "${enable_overlays+set}" = set; then
2253   enableval="$enable_overlays"
2254   
2255         ol_arg=invalid
2256         for ol_val in no yes mod ; do
2257                 if test "$enableval" = "$ol_val" ; then
2258                         ol_arg="$ol_val"
2259                 fi
2260         done
2261         if test "$ol_arg" = "invalid" ; then
2262                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2263         fi
2264         ol_enable_overlays="$ol_arg"
2265
2266 else
2267         ol_enable_overlays="no"
2268 fi
2269 # end --enable-overlays
2270 # OpenLDAP --enable-chain
2271         # Check whether --enable-chain or --disable-chain was given.
2272 if test "${enable_chain+set}" = set; then
2273   enableval="$enable_chain"
2274   
2275         ol_arg=invalid
2276         for ol_val in no yes mod ; do
2277                 if test "$enableval" = "$ol_val" ; then
2278                         ol_arg="$ol_val"
2279                 fi
2280         done
2281         if test "$ol_arg" = "invalid" ; then
2282                 { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; }
2283         fi
2284         ol_enable_chain="$ol_arg"
2285
2286 else
2287         ol_enable_chain="no"
2288 fi
2289 # end --enable-chain
2290
2291 # OpenLDAP --enable-denyop
2292         # Check whether --enable-denyop or --disable-denyop was given.
2293 if test "${enable_denyop+set}" = set; then
2294   enableval="$enable_denyop"
2295   
2296         ol_arg=invalid
2297         for ol_val in no yes mod ; do
2298                 if test "$enableval" = "$ol_val" ; then
2299                         ol_arg="$ol_val"
2300                 fi
2301         done
2302         if test "$ol_arg" = "invalid" ; then
2303                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2304         fi
2305         ol_enable_denyop="$ol_arg"
2306
2307 else
2308         ol_enable_denyop="no"
2309 fi
2310 # end --enable-denyop
2311
2312 # OpenLDAP --enable-dyngroup
2313         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2314 if test "${enable_dyngroup+set}" = set; then
2315   enableval="$enable_dyngroup"
2316   
2317         ol_arg=invalid
2318         for ol_val in no yes mod ; do
2319                 if test "$enableval" = "$ol_val" ; then
2320                         ol_arg="$ol_val"
2321                 fi
2322         done
2323         if test "$ol_arg" = "invalid" ; then
2324                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2325         fi
2326         ol_enable_dyngroup="$ol_arg"
2327
2328 else
2329         ol_enable_dyngroup="no"
2330 fi
2331 # end --enable-dyngroup
2332
2333 # OpenLDAP --enable-lastmod
2334         # Check whether --enable-lastmod or --disable-lastmod was given.
2335 if test "${enable_lastmod+set}" = set; then
2336   enableval="$enable_lastmod"
2337   
2338         ol_arg=invalid
2339         for ol_val in no yes mod ; do
2340                 if test "$enableval" = "$ol_val" ; then
2341                         ol_arg="$ol_val"
2342                 fi
2343         done
2344         if test "$ol_arg" = "invalid" ; then
2345                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2346         fi
2347         ol_enable_lastmod="$ol_arg"
2348
2349 else
2350         ol_enable_lastmod="no"
2351 fi
2352 # end --enable-lastmod
2353
2354 # OpenLDAP --enable-ppolicy
2355         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2356 if test "${enable_ppolicy+set}" = set; then
2357   enableval="$enable_ppolicy"
2358   
2359         ol_arg=invalid
2360         for ol_val in no yes mod ; do
2361                 if test "$enableval" = "$ol_val" ; then
2362                         ol_arg="$ol_val"
2363                 fi
2364         done
2365         if test "$ol_arg" = "invalid" ; then
2366                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2367         fi
2368         ol_enable_ppolicy="$ol_arg"
2369
2370 else
2371         ol_enable_ppolicy="no"
2372 fi
2373 # end --enable-ppolicy
2374
2375 # OpenLDAP --enable-proxycache
2376         # Check whether --enable-proxycache or --disable-proxycache was given.
2377 if test "${enable_proxycache+set}" = set; then
2378   enableval="$enable_proxycache"
2379   
2380         ol_arg=invalid
2381         for ol_val in no yes mod ; do
2382                 if test "$enableval" = "$ol_val" ; then
2383                         ol_arg="$ol_val"
2384                 fi
2385         done
2386         if test "$ol_arg" = "invalid" ; then
2387                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2388         fi
2389         ol_enable_proxycache="$ol_arg"
2390
2391 else
2392         ol_enable_proxycache="no"
2393 fi
2394 # end --enable-proxycache
2395
2396 # OpenLDAP --enable-refint
2397         # Check whether --enable-refint or --disable-refint was given.
2398 if test "${enable_refint+set}" = set; then
2399   enableval="$enable_refint"
2400   
2401         ol_arg=invalid
2402         for ol_val in no yes mod ; do
2403                 if test "$enableval" = "$ol_val" ; then
2404                         ol_arg="$ol_val"
2405                 fi
2406         done
2407         if test "$ol_arg" = "invalid" ; then
2408                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2409         fi
2410         ol_enable_refint="$ol_arg"
2411
2412 else
2413         ol_enable_refint="no"
2414 fi
2415 # end --enable-refint
2416
2417 # OpenLDAP --enable-rwm
2418         # Check whether --enable-rwm or --disable-rwm was given.
2419 if test "${enable_rwm+set}" = set; then
2420   enableval="$enable_rwm"
2421   
2422         ol_arg=invalid
2423         for ol_val in no yes mod ; do
2424                 if test "$enableval" = "$ol_val" ; then
2425                         ol_arg="$ol_val"
2426                 fi
2427         done
2428         if test "$ol_arg" = "invalid" ; then
2429                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2430         fi
2431         ol_enable_rwm="$ol_arg"
2432
2433 else
2434         ol_enable_rwm="no"
2435 fi
2436 # end --enable-rwm
2437
2438 # OpenLDAP --enable-unique
2439         # Check whether --enable-unique or --disable-unique was given.
2440 if test "${enable_unique+set}" = set; then
2441   enableval="$enable_unique"
2442   
2443         ol_arg=invalid
2444         for ol_val in no yes mod ; do
2445                 if test "$enableval" = "$ol_val" ; then
2446                         ol_arg="$ol_val"
2447                 fi
2448         done
2449         if test "$ol_arg" = "invalid" ; then
2450                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2451         fi
2452         ol_enable_unique="$ol_arg"
2453
2454 else
2455         ol_enable_unique="no"
2456 fi
2457 # end --enable-unique
2458
2459
2460
2461 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2462 if test "${with_xxslurpdoptions+set}" = set; then
2463   withval="$with_xxslurpdoptions"
2464   :
2465 fi
2466
2467 # OpenLDAP --enable-slurpd
2468         # Check whether --enable-slurpd or --disable-slurpd was given.
2469 if test "${enable_slurpd+set}" = set; then
2470   enableval="$enable_slurpd"
2471   
2472         ol_arg=invalid
2473         for ol_val in auto yes no ; do
2474                 if test "$enableval" = "$ol_val" ; then
2475                         ol_arg="$ol_val"
2476                 fi
2477         done
2478         if test "$ol_arg" = "invalid" ; then
2479                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2480         fi
2481         ol_enable_slurpd="$ol_arg"
2482
2483 else
2484         ol_enable_slurpd="auto"
2485 fi
2486 # end --enable-slurpd
2487
2488 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2489 if test "${with_xxliboptions+set}" = set; then
2490   withval="$with_xxliboptions"
2491   :
2492 fi
2493
2494 # Check whether --enable-static or --disable-static was given.
2495 if test "${enable_static+set}" = set; then
2496   enableval="$enable_static"
2497   p=${PACKAGE-default}
2498 case $enableval in
2499 yes) enable_static=yes ;;
2500 no) enable_static=no ;;
2501 *)
2502   enable_static=no
2503   # Look at the argument we got.  We use all the common list separators.
2504   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2505   for pkg in $enableval; do
2506     if test "X$pkg" = "X$p"; then
2507       enable_static=yes
2508     fi
2509   done
2510   IFS="$ac_save_ifs"
2511   ;;
2512 esac
2513 else
2514   enable_static=yes
2515 fi
2516
2517 # Check whether --enable-shared or --disable-shared was given.
2518 if test "${enable_shared+set}" = set; then
2519   enableval="$enable_shared"
2520   p=${PACKAGE-default}
2521 case $enableval in
2522 yes) enable_shared=yes ;;
2523 no) enable_shared=no ;;
2524 *)
2525   enable_shared=no
2526   # Look at the argument we got.  We use all the common list separators.
2527   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2528   for pkg in $enableval; do
2529     if test "X$pkg" = "X$p"; then
2530       enable_shared=yes
2531     fi
2532   done
2533   IFS="$ac_save_ifs"
2534   ;;
2535 esac
2536 else
2537   enable_shared=yes
2538 fi
2539
2540
2541
2542 # Activate any backends that were not explicitly enabled.
2543 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2544 if test $ol_enable_backends != no ; then
2545         for i in $Backends; do
2546                 eval "ol_tmp=\$ol_enable_$i"
2547                 if test $ol_tmp = no ; then
2548                         eval "ol_enable_$i=$ol_enable_backends"
2549                 fi
2550         done
2551 fi
2552 # Activate the overlays
2553 if test $ol_enable_overlays != no ; then
2554         for i in $Overlays; do
2555                 eval "ol_tmp=\$ol_enable_$i"
2556                 if test $ol_tmp = no ; then
2557                         eval "ol_enable_$i=$ol_enable_overlays"
2558                 fi
2559         done
2560 fi
2561
2562 # validate options
2563 if test $ol_enable_slapd = no ; then
2564                 if test $ol_enable_slapi = yes ; then
2565                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2566         fi
2567         if test $ol_enable_backends != no ; then
2568                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2569         fi
2570         for i in $Backends; do
2571                 eval "ol_tmp=\$ol_enable_$i"
2572                 if test $ol_tmp != no ; then
2573                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2574                         eval "ol_enable_$i=no"
2575                 fi
2576         done
2577         if test $ol_enable_modules = yes ; then
2578                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2579         fi
2580         if test $ol_enable_multimaster = yes ; then
2581                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2582         fi
2583         if test $ol_enable_wrappers = yes ; then
2584                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2585         fi
2586         if test $ol_enable_rlookups = yes ; then
2587                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2588         fi
2589         if test $ol_enable_aci = yes ; then
2590                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2591         fi
2592         if test $ol_with_ldbm_api != auto ; then
2593                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2594         fi
2595         if test $ol_with_ldbm_type != auto ; then
2596                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2597         fi
2598         if test $ol_enable_slurpd = yes ; then
2599                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2600         fi
2601         if test $ol_enable_rewrite = yes ; then
2602                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2603         fi
2604                 if test $ol_enable_overlays != no ; then
2605                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2606         fi
2607         for i in $Overlays; do
2608                 eval "ol_tmp=\$ol_enable_$i"
2609                 if test $ol_tmp != no ; then
2610                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2611                         eval "ol_enable_$i=no"
2612                 fi
2613         done
2614
2615         # force settings to no
2616         ol_enable_slapi=no
2617
2618         ol_enable_backends=no
2619         ol_enable_overlays=no
2620         ol_enable_modules=no
2621         ol_enable_multimaster=no
2622         ol_enable_rlookups=no
2623         ol_enable_aci=no
2624         ol_enable_wrappers=no
2625
2626         ol_with_ldbm_api=no
2627         ol_with_ldbm_type=no
2628
2629         ol_enable_slurpd=no
2630
2631         ol_enable_rewrite=no
2632
2633 elif test $ol_enable_ldbm = no ; then
2634         
2635         if test $ol_with_ldbm_api != auto ; then
2636                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2637         fi
2638
2639         if test $ol_with_ldbm_type != auto ; then
2640                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2641         fi
2642
2643         if test $ol_enable_modules != yes -a \
2644                 $ol_enable_bdb = no -a \
2645                 $ol_enable_dnssrv = no -a \
2646                 $ol_enable_hdb = no -a \
2647                 $ol_enable_ldap = no -a \
2648                 $ol_enable_meta = no -a \
2649                 $ol_enable_monitor = no -a \
2650                 $ol_enable_null = no -a \
2651                 $ol_enable_passwd = no -a \
2652                 $ol_enable_perl = no -a \
2653                 $ol_enable_relay = no -a \
2654                 $ol_enable_shell = no -a \
2655                 $ol_enable_sql = no ; then
2656
2657                 if test $ol_enable_slapd = yes ; then
2658                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2659                 else
2660                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2661                         ol_enable_slapd=no
2662                 fi
2663         fi
2664
2665         ol_with_ldbm_api=no
2666         ol_with_ldbm_type=no
2667
2668         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2669                 ol_with_ldbm_api=berkeley
2670         fi
2671
2672 else
2673                 if test $ol_with_ldbm_api = gdbm -a \
2674                 $ol_with_ldbm_type = btree ; then
2675                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2676         fi
2677         if test $ol_with_ldbm_api = mdbm -a \
2678                 $ol_with_ldbm_type = btree ; then
2679                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2680         fi
2681         if test $ol_with_ldbm_api = ndbm -a \
2682                 $ol_with_ldbm_type = btree ; then
2683                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2684         fi
2685
2686         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2687                 if test $ol_with_ldbm_api = auto ; then
2688                         ol_with_ldbm_api=berkeley
2689                 elif test $ol_with_ldbm_api != berkeley ; then
2690                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2691                 fi
2692         fi
2693 fi
2694
2695 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2696         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2697 fi
2698
2699 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2700         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2701 fi
2702
2703 if test $ol_enable_slurpd = yes ; then
2704                 if test $ol_with_threads = no ; then
2705                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2706         fi
2707 fi
2708
2709 if test $ol_enable_lmpasswd = yes ; then
2710         if test $ol_with_tls = no ; then
2711                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2712         fi
2713 fi
2714
2715 if test $ol_enable_kbind = yes ; then
2716         if test $ol_with_kerberos = no ; then
2717                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2718         elif test $ol_with_kerberos = auto ; then
2719                 ol_with_kerberos=yes
2720         fi
2721
2722 elif test $ol_enable_kbind = no ; then
2723         if test $ol_with_kerberos = auto ; then
2724                 ol_with_kerberos=no
2725         elif test $ol_with_kerberos != no ; then
2726                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2727                 ol_with_kerberos=no
2728         fi
2729 fi
2730
2731 if test $ol_enable_spasswd = yes ; then
2732         if test $ol_with_cyrus_sasl = no ; then
2733                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2734         fi
2735         ol_with_cyrus_sasl=yes
2736 fi
2737
2738 echo "$ac_t""done" 1>&6
2739
2740 LDAP_LIBS=
2741 LDBM_LIBS=
2742 LTHREAD_LIBS=
2743 LUTIL_LIBS=
2744
2745 SLAPD_LIBS=
2746 SLURPD_LIBS=
2747
2748 BUILD_SLAPD=no
2749 BUILD_SLURPD=no
2750
2751 BUILD_THREAD=no
2752
2753 BUILD_SLAPI=no
2754 SLAPD_SLAPI_DEPEND=
2755
2756 BUILD_BDB=no
2757 BUILD_DNSSRV=no
2758 BUILD_HDB=no
2759 BUILD_LDAP=no
2760 BUILD_LDBM=no
2761 BUILD_META=no
2762 BUILD_MONITOR=no
2763 BUILD_NULL=no
2764 BUILD_PASSWD=no
2765 BUILD_PERL=no
2766 BUILD_RELAY=no
2767 BUILD_SHELL=no
2768 BUILD_SQL=no
2769
2770 BUILD_CHAIN=no
2771 BUILD_DENYOP=no
2772 BUILD_DYNGROUP=no
2773 BUILD_LASTMOD=no
2774 BUILD_PPOLICY=no
2775 BUILD_PROXYCACHE=no
2776 BUILD_REFINT=no
2777 BUILD_RWM=no
2778 BUILD_UNIQUE=no
2779
2780 SLAPD_DYNAMIC_OVERLAYS=
2781
2782 SLAPD_MODULES_LDFLAGS=
2783 SLAPD_MODULES_CPPFLAGS=
2784
2785 SLAPD_STATIC_BACKENDS=
2786 SLAPD_DYNAMIC_BACKENDS=
2787
2788 SLAPD_PERL_LDFLAGS=
2789 MOD_PERL_LDFLAGS=
2790 PERL_CPPFLAGS=
2791
2792 SLAPD_SQL_LDFLAGS=
2793 SLAPD_SQL_LIBS=
2794 SLAPD_SQL_INCLUDES=
2795
2796 KRB4_LIBS=
2797 KRB5_LIBS=
2798 SASL_LIBS=
2799 TLS_LIBS=
2800 MODULES_LIBS=
2801 SLAPI_LIBS=
2802 LIBSLAPI=
2803 LIBSLAPITOOLS=
2804 AUTH_LIBS=
2805
2806 SLAPD_SLP_LIBS=
2807 SLAPD_GMP_LIBS=
2808
2809
2810 cat >> confdefs.h <<\EOF
2811 #define HAVE_MKVERSION 1
2812 EOF
2813
2814
2815
2816
2817 ol_aix_threads=no
2818 case "$target" in
2819 *-*-aix*)       if test -z "$CC" ; then
2820                 case "$ol_with_threads" in
2821                 auto | yes |  posix) ol_aix_threads=yes ;;
2822                 esac
2823         fi
2824 ;;
2825 esac
2826
2827 if test $ol_aix_threads = yes ; then
2828         if test -z "${CC}" ; then
2829                 for ac_prog in cc_r xlc_r cc
2830 do
2831 # Extract the first word of "$ac_prog", so it can be a program name with args.
2832 set dummy $ac_prog; ac_word=$2
2833 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2834 echo "configure:2833: checking for $ac_word" >&5
2835 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2836   echo $ac_n "(cached) $ac_c" 1>&6
2837 else
2838   if test -n "$CC"; then
2839   ac_cv_prog_CC="$CC" # Let the user override the test.
2840 else
2841   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2842   ac_dummy="$PATH"
2843   for ac_dir in $ac_dummy; do
2844     test -z "$ac_dir" && ac_dir=.
2845     if test -f $ac_dir/$ac_word; then
2846       ac_cv_prog_CC="$ac_prog"
2847       break
2848     fi
2849   done
2850   IFS="$ac_save_ifs"
2851 fi
2852 fi
2853 CC="$ac_cv_prog_CC"
2854 if test -n "$CC"; then
2855   echo "$ac_t""$CC" 1>&6
2856 else
2857   echo "$ac_t""no" 1>&6
2858 fi
2859
2860 test -n "$CC" && break
2861 done
2862
2863
2864                 if test "$CC" = cc ; then
2865                                                 if test $ol_with_threads != auto ; then
2866                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2867                         else
2868                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2869                         fi
2870                         ol_with_threads=no
2871                 fi
2872         fi
2873
2874         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2875                 ol_with_threads=posix
2876                 ol_cv_pthread_create=yes
2877         fi
2878 fi
2879
2880 if test -z "${CC}"; then
2881         for ac_prog in cc gcc
2882 do
2883 # Extract the first word of "$ac_prog", so it can be a program name with args.
2884 set dummy $ac_prog; ac_word=$2
2885 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2886 echo "configure:2885: checking for $ac_word" >&5
2887 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2888   echo $ac_n "(cached) $ac_c" 1>&6
2889 else
2890   if test -n "$CC"; then
2891   ac_cv_prog_CC="$CC" # Let the user override the test.
2892 else
2893   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2894   ac_dummy="$PATH"
2895   for ac_dir in $ac_dummy; do
2896     test -z "$ac_dir" && ac_dir=.
2897     if test -f $ac_dir/$ac_word; then
2898       ac_cv_prog_CC="$ac_prog"
2899       break
2900     fi
2901   done
2902   IFS="$ac_save_ifs"
2903 fi
2904 fi
2905 CC="$ac_cv_prog_CC"
2906 if test -n "$CC"; then
2907   echo "$ac_t""$CC" 1>&6
2908 else
2909   echo "$ac_t""no" 1>&6
2910 fi
2911
2912 test -n "$CC" && break
2913 done
2914 test -n "$CC" || CC="missing"
2915
2916
2917         if test "${CC}" = "missing" ; then
2918                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2919         fi
2920 fi
2921
2922 if test -z "${AR}"; then
2923         for ac_prog in ar gar
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:2927: checking for $ac_word" >&5
2929 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2930   echo $ac_n "(cached) $ac_c" 1>&6
2931 else
2932   if test -n "$AR"; then
2933   ac_cv_prog_AR="$AR" # 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_AR="$ac_prog"
2941       break
2942     fi
2943   done
2944   IFS="$ac_save_ifs"
2945 fi
2946 fi
2947 AR="$ac_cv_prog_AR"
2948 if test -n "$AR"; then
2949   echo "$ac_t""$AR" 1>&6
2950 else
2951   echo "$ac_t""no" 1>&6
2952 fi
2953
2954 test -n "$AR" && break
2955 done
2956 test -n "$AR" || AR="missing"
2957
2958
2959         if test "${AR}" = "missing" ; then
2960                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2961         fi
2962 fi
2963
2964
2965
2966 # Find the correct PATH separator.  Usually this is `:', but
2967 # DJGPP uses `;' like DOS.
2968 if test "X${PATH_SEPARATOR+set}" != Xset; then
2969   UNAME=${UNAME-`uname 2>/dev/null`}
2970   case X$UNAME in
2971     *-DOS) lt_cv_sys_path_separator=';' ;;
2972     *)     lt_cv_sys_path_separator=':' ;;
2973   esac
2974   PATH_SEPARATOR=$lt_cv_sys_path_separator
2975 fi
2976
2977 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2978 echo "configure:2977: checking for Cygwin environment" >&5
2979 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
2980   echo $ac_n "(cached) $ac_c" 1>&6
2981 else
2982   cat > conftest.$ac_ext <<EOF
2983 #line 2982 "configure"
2984 #include "confdefs.h"
2985
2986 int main() {
2987
2988 #ifndef __CYGWIN__
2989 #define __CYGWIN__ __CYGWIN32__
2990 #endif
2991 return __CYGWIN__;
2992 ; return 0; }
2993 EOF
2994 if { (eval echo configure:2993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2995   rm -rf conftest*
2996   ac_cv_cygwin=yes
2997 else
2998   echo "configure: failed program was:" >&5
2999   cat conftest.$ac_ext >&5
3000   rm -rf conftest*
3001   ac_cv_cygwin=no
3002 fi
3003 rm -f conftest*
3004 fi
3005
3006 echo "$ac_t""$ac_cv_cygwin" 1>&6
3007 CYGWIN=
3008 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3009 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3010 echo "configure:3009: checking for mingw32 environment" >&5
3011 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3012   echo $ac_n "(cached) $ac_c" 1>&6
3013 else
3014   cat > conftest.$ac_ext <<EOF
3015 #line 3014 "configure"
3016 #include "confdefs.h"
3017
3018 int main() {
3019 return __MINGW32__;
3020 ; return 0; }
3021 EOF
3022 if { (eval echo configure:3021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3023   rm -rf conftest*
3024   ac_cv_mingw32=yes
3025 else
3026   echo "configure: failed program was:" >&5
3027   cat conftest.$ac_ext >&5
3028   rm -rf conftest*
3029   ac_cv_mingw32=no
3030 fi
3031 rm -f conftest*
3032 fi
3033
3034 echo "$ac_t""$ac_cv_mingw32" 1>&6
3035 MINGW32=
3036 test "$ac_cv_mingw32" = yes && MINGW32=yes
3037 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3038 echo "configure:3037: checking for EMX OS/2 environment" >&5
3039 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3040   echo $ac_n "(cached) $ac_c" 1>&6
3041 else
3042   cat > conftest.$ac_ext <<EOF
3043 #line 3042 "configure"
3044 #include "confdefs.h"
3045
3046 int main() {
3047 return __EMX__;
3048 ; return 0; }
3049 EOF
3050 if { (eval echo configure:3049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3051   rm -rf conftest*
3052   ac_cv_emxos2=yes
3053 else
3054   echo "configure: failed program was:" >&5
3055   cat conftest.$ac_ext >&5
3056   rm -rf conftest*
3057   ac_cv_emxos2=no
3058 fi
3059 rm -f conftest*
3060 fi
3061
3062 echo "$ac_t""$ac_cv_emxos2" 1>&6
3063 EMXOS2=
3064 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3065 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3066 echo "configure:3065: checking how to run the C preprocessor" >&5
3067 # On Suns, sometimes $CPP names a directory.
3068 if test -n "$CPP" && test -d "$CPP"; then
3069   CPP=
3070 fi
3071 if test -z "$CPP"; then
3072 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3073   echo $ac_n "(cached) $ac_c" 1>&6
3074 else
3075     # This must be in double quotes, not single quotes, because CPP may get
3076   # substituted into the Makefile and "${CC-cc}" will confuse make.
3077   CPP="${CC-cc} -E"
3078   # On the NeXT, cc -E runs the code through the compiler's parser,
3079   # not just through cpp.
3080   cat > conftest.$ac_ext <<EOF
3081 #line 3080 "configure"
3082 #include "confdefs.h"
3083 #include <assert.h>
3084 Syntax Error
3085 EOF
3086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3087 { (eval echo configure:3086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3089 if test -z "$ac_err"; then
3090   :
3091 else
3092   echo "$ac_err" >&5
3093   echo "configure: failed program was:" >&5
3094   cat conftest.$ac_ext >&5
3095   rm -rf conftest*
3096   CPP="${CC-cc} -E -traditional-cpp"
3097   cat > conftest.$ac_ext <<EOF
3098 #line 3097 "configure"
3099 #include "confdefs.h"
3100 #include <assert.h>
3101 Syntax Error
3102 EOF
3103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3104 { (eval echo configure:3103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3106 if test -z "$ac_err"; then
3107   :
3108 else
3109   echo "$ac_err" >&5
3110   echo "configure: failed program was:" >&5
3111   cat conftest.$ac_ext >&5
3112   rm -rf conftest*
3113   CPP="${CC-cc} -nologo -E"
3114   cat > conftest.$ac_ext <<EOF
3115 #line 3114 "configure"
3116 #include "confdefs.h"
3117 #include <assert.h>
3118 Syntax Error
3119 EOF
3120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3121 { (eval echo configure:3120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3123 if test -z "$ac_err"; then
3124   :
3125 else
3126   echo "$ac_err" >&5
3127   echo "configure: failed program was:" >&5
3128   cat conftest.$ac_ext >&5
3129   rm -rf conftest*
3130   CPP=/lib/cpp
3131 fi
3132 rm -f conftest*
3133 fi
3134 rm -f conftest*
3135 fi
3136 rm -f conftest*
3137   ac_cv_prog_CPP="$CPP"
3138 fi
3139   CPP="$ac_cv_prog_CPP"
3140 else
3141   ac_cv_prog_CPP="$CPP"
3142 fi
3143 echo "$ac_t""$CPP" 1>&6
3144
3145 # Check whether --enable-fast-install or --disable-fast-install was given.
3146 if test "${enable_fast_install+set}" = set; then
3147   enableval="$enable_fast_install"
3148   p=${PACKAGE-default}
3149 case $enableval in
3150 yes) enable_fast_install=yes ;;
3151 no) enable_fast_install=no ;;
3152 *)
3153   enable_fast_install=no
3154   # Look at the argument we got.  We use all the common list separators.
3155   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3156   for pkg in $enableval; do
3157     if test "X$pkg" = "X$p"; then
3158       enable_fast_install=yes
3159     fi
3160   done
3161   IFS="$ac_save_ifs"
3162   ;;
3163 esac
3164 else
3165   enable_fast_install=yes
3166 fi
3167
3168 # Extract the first word of "gcc", so it can be a program name with args.
3169 set dummy gcc; ac_word=$2
3170 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3171 echo "configure:3170: checking for $ac_word" >&5
3172 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3173   echo $ac_n "(cached) $ac_c" 1>&6
3174 else
3175   if test -n "$CC"; then
3176   ac_cv_prog_CC="$CC" # Let the user override the test.
3177 else
3178   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3179   ac_dummy="$PATH"
3180   for ac_dir in $ac_dummy; do
3181     test -z "$ac_dir" && ac_dir=.
3182     if test -f $ac_dir/$ac_word; then
3183       ac_cv_prog_CC="gcc"
3184       break
3185     fi
3186   done
3187   IFS="$ac_save_ifs"
3188 fi
3189 fi
3190 CC="$ac_cv_prog_CC"
3191 if test -n "$CC"; then
3192   echo "$ac_t""$CC" 1>&6
3193 else
3194   echo "$ac_t""no" 1>&6
3195 fi
3196
3197 if test -z "$CC"; then
3198   # Extract the first word of "cc", so it can be a program name with args.
3199 set dummy cc; ac_word=$2
3200 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3201 echo "configure:3200: checking for $ac_word" >&5
3202 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3203   echo $ac_n "(cached) $ac_c" 1>&6
3204 else
3205   if test -n "$CC"; then
3206   ac_cv_prog_CC="$CC" # Let the user override the test.
3207 else
3208   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3209   ac_prog_rejected=no
3210   ac_dummy="$PATH"
3211   for ac_dir in $ac_dummy; do
3212     test -z "$ac_dir" && ac_dir=.
3213     if test -f $ac_dir/$ac_word; then
3214       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3215         ac_prog_rejected=yes
3216         continue
3217       fi
3218       ac_cv_prog_CC="cc"
3219       break
3220     fi
3221   done
3222   IFS="$ac_save_ifs"
3223 if test $ac_prog_rejected = yes; then
3224   # We found a bogon in the path, so make sure we never use it.
3225   set dummy $ac_cv_prog_CC
3226   shift
3227   if test $# -gt 0; then
3228     # We chose a different compiler from the bogus one.
3229     # However, it has the same basename, so the bogon will be chosen
3230     # first if we set CC to just the basename; use the full file name.
3231     shift
3232     set dummy "$ac_dir/$ac_word" "$@"
3233     shift
3234     ac_cv_prog_CC="$@"
3235   fi
3236 fi
3237 fi
3238 fi
3239 CC="$ac_cv_prog_CC"
3240 if test -n "$CC"; then
3241   echo "$ac_t""$CC" 1>&6
3242 else
3243   echo "$ac_t""no" 1>&6
3244 fi
3245
3246   if test -z "$CC"; then
3247     case "`uname -s`" in
3248     *win32* | *WIN32* | *CYGWIN*)
3249       # Extract the first word of "cl", so it can be a program name with args.
3250 set dummy cl; ac_word=$2
3251 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3252 echo "configure:3251: checking for $ac_word" >&5
3253 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3254   echo $ac_n "(cached) $ac_c" 1>&6
3255 else
3256   if test -n "$CC"; then
3257   ac_cv_prog_CC="$CC" # Let the user override the test.
3258 else
3259   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3260   ac_dummy="$PATH"
3261   for ac_dir in $ac_dummy; do
3262     test -z "$ac_dir" && ac_dir=.
3263     if test -f $ac_dir/$ac_word; then
3264       ac_cv_prog_CC="cl"
3265       break
3266     fi
3267   done
3268   IFS="$ac_save_ifs"
3269 fi
3270 fi
3271 CC="$ac_cv_prog_CC"
3272 if test -n "$CC"; then
3273   echo "$ac_t""$CC" 1>&6
3274 else
3275   echo "$ac_t""no" 1>&6
3276 fi
3277  ;;
3278     esac
3279   fi
3280   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3281 fi
3282
3283 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3284 echo "configure:3283: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3285
3286 ac_ext=c
3287 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3288 ac_cpp='$CPP $CPPFLAGS'
3289 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3290 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3291 cross_compiling=$ac_cv_prog_cc_cross
3292
3293 cat > conftest.$ac_ext << EOF
3294
3295 #line 3294 "configure"
3296 #include "confdefs.h"
3297
3298 main(){return(0);}
3299 EOF
3300 if { (eval echo configure:3299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3301   ac_cv_prog_cc_works=yes
3302   # If we can't run a trivial program, we are probably using a cross compiler.
3303   if (./conftest; exit) 2>/dev/null; then
3304     ac_cv_prog_cc_cross=no
3305   else
3306     ac_cv_prog_cc_cross=yes
3307   fi
3308 else
3309   echo "configure: failed program was:" >&5
3310   cat conftest.$ac_ext >&5
3311   ac_cv_prog_cc_works=no
3312 fi
3313 rm -fr conftest*
3314 ac_ext=c
3315 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3316 ac_cpp='$CPP $CPPFLAGS'
3317 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3318 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3319 cross_compiling=$ac_cv_prog_cc_cross
3320
3321 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3322 if test $ac_cv_prog_cc_works = no; then
3323   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3324 fi
3325 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3326 echo "configure:3325: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3327 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3328 cross_compiling=$ac_cv_prog_cc_cross
3329
3330 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3331 echo "configure:3330: checking whether we are using GNU C" >&5
3332 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3333   echo $ac_n "(cached) $ac_c" 1>&6
3334 else
3335   cat > conftest.c <<EOF
3336 #ifdef __GNUC__
3337   yes;
3338 #endif
3339 EOF
3340 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3341   ac_cv_prog_gcc=yes
3342 else
3343   ac_cv_prog_gcc=no
3344 fi
3345 fi
3346
3347 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3348
3349 if test $ac_cv_prog_gcc = yes; then
3350   GCC=yes
3351 else
3352   GCC=
3353 fi
3354
3355 ac_test_CFLAGS="${CFLAGS+set}"
3356 ac_save_CFLAGS="$CFLAGS"
3357 CFLAGS=
3358 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3359 echo "configure:3358: checking whether ${CC-cc} accepts -g" >&5
3360 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3361   echo $ac_n "(cached) $ac_c" 1>&6
3362 else
3363   echo 'void f(){}' > conftest.c
3364 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3365   ac_cv_prog_cc_g=yes
3366 else
3367   ac_cv_prog_cc_g=no
3368 fi
3369 rm -f conftest*
3370
3371 fi
3372
3373 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3374 if test "$ac_test_CFLAGS" = set; then
3375   CFLAGS="$ac_save_CFLAGS"
3376 elif test $ac_cv_prog_cc_g = yes; then
3377   if test "$GCC" = yes; then
3378     CFLAGS="-g -O2"
3379   else
3380     CFLAGS="-g"
3381   fi
3382 else
3383   if test "$GCC" = yes; then
3384     CFLAGS="-O2"
3385   else
3386     CFLAGS=
3387   fi
3388 fi
3389
3390 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3391 if test "${with_gnu_ld+set}" = set; then
3392   withval="$with_gnu_ld"
3393   test "$withval" = no || with_gnu_ld=yes
3394 else
3395   with_gnu_ld=no
3396 fi
3397
3398 ac_prog=ld
3399 if test "$GCC" = yes; then
3400   # Check if gcc -print-prog-name=ld gives a path.
3401   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3402 echo "configure:3401: checking for ld used by GCC" >&5
3403   case $host in
3404   *-*-mingw*)
3405     # gcc leaves a trailing carriage return which upsets mingw
3406     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3407   *)
3408     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3409   esac
3410   case $ac_prog in
3411     # Accept absolute paths.
3412     [\\/]* | [A-Za-z]:[\\/]*)
3413       re_direlt='/[^/][^/]*/\.\./'
3414       # Canonicalize the path of ld
3415       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3416       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3417         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3418       done
3419       test -z "$LD" && LD="$ac_prog"
3420       ;;
3421   "")
3422     # If it fails, then pretend we aren't using GCC.
3423     ac_prog=ld
3424     ;;
3425   *)
3426     # If it is relative, then search for the first ld in PATH.
3427     with_gnu_ld=unknown
3428     ;;
3429   esac
3430 elif test "$with_gnu_ld" = yes; then
3431   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3432 echo "configure:3431: checking for GNU ld" >&5
3433 else
3434   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3435 echo "configure:3434: checking for non-GNU ld" >&5
3436 fi
3437 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3438   echo $ac_n "(cached) $ac_c" 1>&6
3439 else
3440   if test -z "$LD"; then
3441   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3442   for ac_dir in $PATH; do
3443     test -z "$ac_dir" && ac_dir=.
3444     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3445       lt_cv_path_LD="$ac_dir/$ac_prog"
3446       # Check to see if the program is GNU ld.  I'd rather use --version,
3447       # but apparently some GNU ld's only accept -v.
3448       # Break only if it was the GNU/non-GNU ld that we prefer.
3449       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3450         test "$with_gnu_ld" != no && break
3451       else
3452         test "$with_gnu_ld" != yes && break
3453       fi
3454     fi
3455   done
3456   IFS="$ac_save_ifs"
3457 else
3458   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3459 fi
3460 fi
3461
3462 LD="$lt_cv_path_LD"
3463 if test -n "$LD"; then
3464   echo "$ac_t""$LD" 1>&6
3465 else
3466   echo "$ac_t""no" 1>&6
3467 fi
3468 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3469 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3470 echo "configure:3469: checking if the linker ($LD) is GNU ld" >&5
3471 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3472   echo $ac_n "(cached) $ac_c" 1>&6
3473 else
3474   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3475 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3476   lt_cv_prog_gnu_ld=yes
3477 else
3478   lt_cv_prog_gnu_ld=no
3479 fi
3480 fi
3481
3482 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3483 with_gnu_ld=$lt_cv_prog_gnu_ld
3484
3485
3486 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3487 echo "configure:3486: checking for $LD option to reload object files" >&5
3488 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3489   echo $ac_n "(cached) $ac_c" 1>&6
3490 else
3491   lt_cv_ld_reload_flag='-r'
3492 fi
3493
3494 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3495 reload_flag=$lt_cv_ld_reload_flag
3496 test -n "$reload_flag" && reload_flag=" $reload_flag"
3497
3498 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3499 echo "configure:3498: checking for BSD-compatible nm" >&5
3500 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3501   echo $ac_n "(cached) $ac_c" 1>&6
3502 else
3503   if test -n "$NM"; then
3504   # Let the user override the test.
3505   lt_cv_path_NM="$NM"
3506 else
3507   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3508   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3509     test -z "$ac_dir" && ac_dir=.
3510     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3511     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3512       # Check to see if the nm accepts a BSD-compat flag.
3513       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3514       #   nm: unknown option "B" ignored
3515       # Tru64's nm complains that /dev/null is an invalid object file
3516       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3517         lt_cv_path_NM="$tmp_nm -B"
3518         break
3519       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3520         lt_cv_path_NM="$tmp_nm -p"
3521         break
3522       else
3523         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3524         continue # so that we can try to find one that supports BSD flags
3525       fi
3526     fi
3527   done
3528   IFS="$ac_save_ifs"
3529   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3530 fi
3531 fi
3532
3533 NM="$lt_cv_path_NM"
3534 echo "$ac_t""$NM" 1>&6
3535
3536 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3537 echo "configure:3536: checking for a sed that does not truncate output" >&5
3538 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3539   echo $ac_n "(cached) $ac_c" 1>&6
3540 else
3541   # Loop through the user's path and test for sed and gsed.
3542 # Then use that list of sed's as ones to test for truncation.
3543 as_executable_p="test -f"
3544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3545 for as_dir in $PATH
3546 do
3547   IFS=$as_save_IFS
3548   test -z "$as_dir" && as_dir=.
3549   for ac_prog in sed gsed; do
3550     for ac_exec_ext in '' $ac_executable_extensions; do
3551       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3552         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3553       fi
3554     done
3555   done
3556 done
3557
3558   # Create a temporary directory, and hook for its removal unless debugging.
3559 $debug ||
3560 {
3561   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3562   trap '{ (exit 1); exit 1; }' 1 2 13 15
3563 }
3564
3565 # Create a (secure) tmp directory for tmp files.
3566 : ${TMPDIR=/tmp}
3567 {
3568   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3569   test -n "$tmp" && test -d "$tmp"
3570 }  ||
3571 {
3572   tmp=$TMPDIR/sed$$-$RANDOM
3573   (umask 077 && mkdir $tmp)
3574 } ||
3575 {
3576    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3577    { (exit 1); exit 1; }
3578 }
3579   _max=0
3580   _count=0
3581   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3582   # along with /bin/sed that truncates output.
3583   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3584     test ! -f ${_sed} && break
3585     cat /dev/null > "$tmp/sed.in"
3586     _count=0
3587     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3588     # Check for GNU sed and select it if it is found.
3589     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3590       lt_cv_path_SED=${_sed}
3591       break
3592     fi
3593     while true; do
3594       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3595       mv "$tmp/sed.tmp" "$tmp/sed.in"
3596       cp "$tmp/sed.in" "$tmp/sed.nl"
3597       echo >>"$tmp/sed.nl"
3598       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3599       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3600       # 40000 chars as input seems more than enough
3601       test $_count -gt 10 && break
3602       _count=`expr $_count + 1`
3603       if test $_count -gt $_max; then
3604         _max=$_count
3605         lt_cv_path_SED=$_sed
3606       fi
3607     done
3608   done
3609   rm -rf "$tmp"
3610
3611 fi
3612
3613 if test "X$SED" != "X"; then
3614   lt_cv_path_SED=$SED
3615 else
3616   SED=$lt_cv_path_SED
3617 fi
3618 echo "$ac_t""$SED" 1>&6
3619
3620 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3621 echo "configure:3620: checking whether ln -s works" >&5
3622 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3623   echo $ac_n "(cached) $ac_c" 1>&6
3624 else
3625   rm -f conftestdata
3626 if ln -s X conftestdata 2>/dev/null
3627 then
3628   rm -f conftestdata
3629   ac_cv_prog_LN_S="ln -s"
3630 else
3631   ac_cv_prog_LN_S=ln
3632 fi
3633 fi
3634 LN_S="$ac_cv_prog_LN_S"
3635 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3636   echo "$ac_t""yes" 1>&6
3637 else
3638   echo "$ac_t""no" 1>&6
3639 fi
3640
3641 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3642 echo "configure:3641: checking how to recognise dependent libraries" >&5
3643 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3644   echo $ac_n "(cached) $ac_c" 1>&6
3645 else
3646   lt_cv_file_magic_cmd='$MAGIC_CMD'
3647 lt_cv_file_magic_test_file=
3648 lt_cv_deplibs_check_method='unknown'
3649 # Need to set the preceding variable on all platforms that support
3650 # interlibrary dependencies.
3651 # 'none' -- dependencies not supported.
3652 # `unknown' -- same as none, but documents that we really don't know.
3653 # 'pass_all' -- all dependencies passed with no checks.
3654 # 'test_compile' -- check by making test program.
3655 # 'file_magic [[regex]]' -- check by looking for files in library path
3656 # which responds to the $file_magic_cmd with a given egrep regex.
3657 # If you have `file' or equivalent on your system and you're not sure
3658 # whether `pass_all' will *always* work, you probably want this one.
3659
3660 case $host_os in
3661 aix4* | aix5*)
3662   lt_cv_deplibs_check_method=pass_all
3663   ;;
3664
3665 beos*)
3666   lt_cv_deplibs_check_method=pass_all
3667   ;;
3668
3669 bsdi4*)
3670   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3671   lt_cv_file_magic_cmd='/usr/bin/file -L'
3672   lt_cv_file_magic_test_file=/shlib/libc.so
3673   ;;
3674
3675 cygwin* | mingw* | pw32*)
3676   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3677   lt_cv_file_magic_cmd='$OBJDUMP -f'
3678   ;;
3679
3680 darwin* | rhapsody*)
3681   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3682   lt_cv_file_magic_cmd='/usr/bin/file -L'
3683   case "$host_os" in
3684   rhapsody* | darwin1.[012])
3685     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3686     ;;
3687   *) # Darwin 1.3 on
3688     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3689     ;;
3690   esac
3691   ;;
3692
3693 freebsd*)
3694   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3695     case $host_cpu in
3696     i*86 )
3697       # Not sure whether the presence of OpenBSD here was a mistake.
3698       # Let's accept both of them until this is cleared up.
3699       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3700       lt_cv_file_magic_cmd=/usr/bin/file
3701       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3702       ;;
3703     esac
3704   else
3705     lt_cv_deplibs_check_method=pass_all
3706   fi
3707   ;;
3708
3709 gnu*)
3710   lt_cv_deplibs_check_method=pass_all
3711   ;;
3712
3713 hpux10.20*|hpux11*)
3714   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3715   lt_cv_file_magic_cmd=/usr/bin/file
3716   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3717   ;;
3718
3719 irix5* | irix6* | nonstopux*)
3720   case $host_os in
3721   irix5* | nonstopux*)
3722     # this will be overridden with pass_all, but let us keep it just in case
3723     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3724     ;;
3725   *)
3726     case $LD in
3727     *-32|*"-32 ") libmagic=32-bit;;
3728     *-n32|*"-n32 ") libmagic=N32;;
3729     *-64|*"-64 ") libmagic=64-bit;;
3730     *) libmagic=never-match;;
3731     esac
3732     # this will be overridden with pass_all, but let us keep it just in case
3733     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3734     ;;
3735   esac
3736   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3737   lt_cv_deplibs_check_method=pass_all
3738   ;;
3739
3740 # This must be Linux ELF.
3741 linux-gnu*)
3742   case $host_cpu in
3743   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3744     lt_cv_deplibs_check_method=pass_all ;;
3745   *)
3746     # glibc up to 2.1.1 does not perform some relocations on ARM
3747     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3748   esac
3749   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3750   ;;
3751
3752 netbsd*)
3753   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3754     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3755   else
3756     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3757   fi
3758   ;;
3759
3760 newos6*)
3761   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3762   lt_cv_file_magic_cmd=/usr/bin/file
3763   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3764   ;;
3765
3766 openbsd*)
3767   lt_cv_file_magic_cmd=/usr/bin/file
3768   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3769   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3770     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3771   else
3772     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3773   fi
3774   ;;
3775
3776 openedition*)
3777   lt_cv_deplibs_check_method=pass_all
3778   ;;
3779
3780 osf3* | osf4* | osf5*)
3781   # this will be overridden with pass_all, but let us keep it just in case
3782   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3783   lt_cv_file_magic_test_file=/shlib/libc.so
3784   lt_cv_deplibs_check_method=pass_all
3785   ;;
3786
3787 sco3.2v5*)
3788   lt_cv_deplibs_check_method=pass_all
3789   ;;
3790
3791 solaris*)
3792   lt_cv_deplibs_check_method=pass_all
3793   lt_cv_file_magic_test_file=/lib/libc.so
3794   ;;
3795
3796 sysv5uw[78]* | sysv4*uw2*)
3797   lt_cv_deplibs_check_method=pass_all
3798   ;;
3799
3800 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3801   case $host_vendor in
3802   motorola)
3803     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]'
3804     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3805     ;;
3806   ncr)
3807     lt_cv_deplibs_check_method=pass_all
3808     ;;
3809   sequent)
3810     lt_cv_file_magic_cmd='/bin/file'
3811     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3812     ;;
3813   sni)
3814     lt_cv_file_magic_cmd='/bin/file'
3815     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3816     lt_cv_file_magic_test_file=/lib/libc.so
3817     ;;
3818   siemens)
3819     lt_cv_deplibs_check_method=pass_all
3820     ;;
3821   esac
3822   ;;
3823 esac
3824
3825 fi
3826
3827 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3828 file_magic_cmd=$lt_cv_file_magic_cmd
3829 deplibs_check_method=$lt_cv_deplibs_check_method
3830
3831 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3832 echo "configure:3831: checking for object suffix" >&5
3833 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3834   echo $ac_n "(cached) $ac_c" 1>&6
3835 else
3836   rm -f conftest*
3837 echo 'int i = 1;' > conftest.$ac_ext
3838 if { (eval echo configure:3837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3839   for ac_file in conftest.*; do
3840     case $ac_file in
3841     *.c) ;;
3842     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3843     esac
3844   done
3845 else
3846   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3847 fi
3848 rm -f conftest*
3849 fi
3850
3851 echo "$ac_t""$ac_cv_objext" 1>&6
3852 OBJEXT=$ac_cv_objext
3853 ac_objext=$ac_cv_objext
3854
3855
3856
3857
3858 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3859 echo "configure:3858: checking for executable suffix" >&5
3860 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3861   echo $ac_n "(cached) $ac_c" 1>&6
3862 else
3863   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3864   ac_cv_exeext=.exe
3865 else
3866   rm -f conftest*
3867   echo 'int main () { return 0; }' > conftest.$ac_ext
3868   ac_cv_exeext=
3869   if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3870     for file in conftest.*; do
3871       case $file in
3872       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3873       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3874       esac
3875     done
3876   else
3877     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3878   fi
3879   rm -f conftest*
3880   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3881 fi
3882 fi
3883
3884 EXEEXT=""
3885 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3886 echo "$ac_t""${ac_cv_exeext}" 1>&6
3887 ac_exeext=$EXEEXT
3888
3889 if test $host != $build; then
3890   ac_tool_prefix=${host_alias}-
3891 else
3892   ac_tool_prefix=
3893 fi
3894
3895
3896
3897
3898 # Check for command to grab the raw symbol name followed by C symbol from nm.
3899 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3900 echo "configure:3899: checking command to parse $NM output" >&5
3901 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3902   echo $ac_n "(cached) $ac_c" 1>&6
3903 else
3904   
3905 # These are sane defaults that work on at least a few old systems.
3906 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3907
3908 # Character class describing NM global symbol codes.
3909 symcode='[BCDEGRST]'
3910
3911 # Regexp to match symbols that can be accessed directly from C.
3912 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3913
3914 # Transform the above into a raw symbol and a C symbol.
3915 symxfrm='\1 \2\3 \3'
3916
3917 # Transform an extracted symbol line into a proper C declaration
3918 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3919
3920 # Transform an extracted symbol line into symbol name and symbol address
3921 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'"
3922
3923 # Define system-specific variables.
3924 case $host_os in
3925 aix*)
3926   symcode='[BCDT]'
3927   ;;
3928 cygwin* | mingw* | pw32*)
3929   symcode='[ABCDGISTW]'
3930   ;;
3931 hpux*) # Its linker distinguishes data from code symbols
3932   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3933   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'"
3934   ;;
3935 irix* | nonstopux*)
3936   symcode='[BCDEGRST]'
3937   ;;
3938 osf*)
3939   symcode='[BCDEGQRST]'
3940   ;;
3941 solaris* | sysv5*)
3942   symcode='[BDT]'
3943   ;;
3944 sysv4)
3945   symcode='[DFNSTU]'
3946   ;;
3947 esac
3948
3949 # Handle CRLF in mingw tool chain
3950 opt_cr=
3951 case $host_os in
3952 mingw*)
3953   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3954   ;;
3955 esac
3956
3957 # If we're using GNU nm, then use its standard symbol codes.
3958 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3959   symcode='[ABCDGISTW]'
3960 fi
3961
3962 # Try without a prefix undercore, then with it.
3963 for ac_symprfx in "" "_"; do
3964
3965   # Write the raw and C identifiers.
3966 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3967
3968   # Check to see that the pipe works correctly.
3969   pipe_works=no
3970   rm -f conftest*
3971   cat > conftest.$ac_ext <<EOF
3972 #ifdef __cplusplus
3973 extern "C" {
3974 #endif
3975 char nm_test_var;
3976 void nm_test_func(){}
3977 #ifdef __cplusplus
3978 }
3979 #endif
3980 int main(){nm_test_var='a';nm_test_func();return(0);}
3981 EOF
3982
3983   if { (eval echo configure:3982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3984     # Now try to grab the symbols.
3985     nlist=conftest.nm
3986     if { (eval echo configure:3985: \"$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
3987       # Try sorting and uniquifying the output.
3988       if sort "$nlist" | uniq > "$nlist"T; then
3989         mv -f "$nlist"T "$nlist"
3990       else
3991         rm -f "$nlist"T
3992       fi
3993
3994       # Make sure that we snagged all the symbols we need.
3995       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3996         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3997           cat <<EOF > conftest.$ac_ext
3998 #ifdef __cplusplus
3999 extern "C" {
4000 #endif
4001
4002 EOF
4003           # Now generate the symbol file.
4004           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4005
4006           cat <<EOF >> conftest.$ac_ext
4007 #if defined (__STDC__) && __STDC__
4008 # define lt_ptr void *
4009 #else
4010 # define lt_ptr char *
4011 # define const
4012 #endif
4013
4014 /* The mapping between symbol names and symbols. */
4015 const struct {
4016   const char *name;
4017   lt_ptr address;
4018 }
4019 lt_preloaded_symbols[] =
4020 {
4021 EOF
4022           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4023           cat <<\EOF >> conftest.$ac_ext
4024   {0, (lt_ptr) 0}
4025 };
4026
4027 #ifdef __cplusplus
4028 }
4029 #endif
4030 EOF
4031           # Now try linking the two files.
4032           mv conftest.$ac_objext conftstm.$ac_objext
4033           save_LIBS="$LIBS"
4034           save_CFLAGS="$CFLAGS"
4035           LIBS="conftstm.$ac_objext"
4036           CFLAGS="$CFLAGS$no_builtin_flag"
4037           if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4038             pipe_works=yes
4039           fi
4040           LIBS="$save_LIBS"
4041           CFLAGS="$save_CFLAGS"
4042         else
4043           echo "cannot find nm_test_func in $nlist" >&5
4044         fi
4045       else
4046         echo "cannot find nm_test_var in $nlist" >&5
4047       fi
4048     else
4049       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4050     fi
4051   else
4052     echo "$progname: failed program was:" >&5
4053     cat conftest.$ac_ext >&5
4054   fi
4055   rm -f conftest* conftst*
4056
4057   # Do not use the global_symbol_pipe unless it works.
4058   if test "$pipe_works" = yes; then
4059     break
4060   else
4061     lt_cv_sys_global_symbol_pipe=
4062   fi
4063 done
4064
4065 fi
4066
4067 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4068 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4069   global_symbol_to_cdecl=
4070   global_symbol_to_c_name_address=
4071 else
4072   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4073   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4074 fi
4075 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4076 then
4077   echo "$ac_t""failed" 1>&6
4078 else
4079   echo "$ac_t""ok" 1>&6
4080 fi
4081
4082 for ac_hdr in dlfcn.h
4083 do
4084 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4085 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4086 echo "configure:4085: checking for $ac_hdr" >&5
4087 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4088   echo $ac_n "(cached) $ac_c" 1>&6
4089 else
4090   cat > conftest.$ac_ext <<EOF
4091 #line 4090 "configure"
4092 #include "confdefs.h"
4093 #include <$ac_hdr>
4094 EOF
4095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4096 { (eval echo configure:4095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4098 if test -z "$ac_err"; then
4099   rm -rf conftest*
4100   eval "ac_cv_header_$ac_safe=yes"
4101 else
4102   echo "$ac_err" >&5
4103   echo "configure: failed program was:" >&5
4104   cat conftest.$ac_ext >&5
4105   rm -rf conftest*
4106   eval "ac_cv_header_$ac_safe=no"
4107 fi
4108 rm -f conftest*
4109 fi
4110 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4111   echo "$ac_t""yes" 1>&6
4112     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4113   cat >> confdefs.h <<EOF
4114 #define $ac_tr_hdr 1
4115 EOF
4116  
4117 else
4118   echo "$ac_t""no" 1>&6
4119 fi
4120 done
4121
4122
4123
4124
4125
4126
4127 # Only perform the check for file, if the check method requires it
4128 case $deplibs_check_method in
4129 file_magic*)
4130   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4131     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4132 echo "configure:4131: checking for ${ac_tool_prefix}file" >&5
4133 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4134   echo $ac_n "(cached) $ac_c" 1>&6
4135 else
4136   case $MAGIC_CMD in
4137   /*)
4138   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4139   ;;
4140   ?:/*)
4141   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4142   ;;
4143   *)
4144   ac_save_MAGIC_CMD="$MAGIC_CMD"
4145   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4146   ac_dummy="/usr/bin:$PATH"
4147   for ac_dir in $ac_dummy; do
4148     test -z "$ac_dir" && ac_dir=.
4149     if test -f $ac_dir/${ac_tool_prefix}file; then
4150       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4151       if test -n "$file_magic_test_file"; then
4152         case $deplibs_check_method in
4153         "file_magic "*)
4154           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4155           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4156           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4157             egrep "$file_magic_regex" > /dev/null; then
4158             :
4159           else
4160             cat <<EOF 1>&2
4161
4162 *** Warning: the command libtool uses to detect shared libraries,
4163 *** $file_magic_cmd, produces output that libtool cannot recognize.
4164 *** The result is that libtool may fail to recognize shared libraries
4165 *** as such.  This will affect the creation of libtool libraries that
4166 *** depend on shared libraries, but programs linked with such libtool
4167 *** libraries will work regardless of this problem.  Nevertheless, you
4168 *** may want to report the problem to your system manager and/or to
4169 *** bug-libtool@gnu.org
4170
4171 EOF
4172           fi ;;
4173         esac
4174       fi
4175       break
4176     fi
4177   done
4178   IFS="$ac_save_ifs"
4179   MAGIC_CMD="$ac_save_MAGIC_CMD"
4180   ;;
4181 esac
4182 fi
4183
4184 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4185 if test -n "$MAGIC_CMD"; then
4186   echo "$ac_t""$MAGIC_CMD" 1>&6
4187 else
4188   echo "$ac_t""no" 1>&6
4189 fi
4190
4191 if test -z "$lt_cv_path_MAGIC_CMD"; then
4192   if test -n "$ac_tool_prefix"; then
4193     echo $ac_n "checking for file""... $ac_c" 1>&6
4194 echo "configure:4193: checking for file" >&5
4195 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4196   echo $ac_n "(cached) $ac_c" 1>&6
4197 else
4198   case $MAGIC_CMD in
4199   /*)
4200   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4201   ;;
4202   ?:/*)
4203   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4204   ;;
4205   *)
4206   ac_save_MAGIC_CMD="$MAGIC_CMD"
4207   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4208   ac_dummy="/usr/bin:$PATH"
4209   for ac_dir in $ac_dummy; do
4210     test -z "$ac_dir" && ac_dir=.
4211     if test -f $ac_dir/file; then
4212       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4213       if test -n "$file_magic_test_file"; then
4214         case $deplibs_check_method in
4215         "file_magic "*)
4216           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4217           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4218           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4219             egrep "$file_magic_regex" > /dev/null; then
4220             :
4221           else
4222             cat <<EOF 1>&2
4223
4224 *** Warning: the command libtool uses to detect shared libraries,
4225 *** $file_magic_cmd, produces output that libtool cannot recognize.
4226 *** The result is that libtool may fail to recognize shared libraries
4227 *** as such.  This will affect the creation of libtool libraries that
4228 *** depend on shared libraries, but programs linked with such libtool
4229 *** libraries will work regardless of this problem.  Nevertheless, you
4230 *** may want to report the problem to your system manager and/or to
4231 *** bug-libtool@gnu.org
4232
4233 EOF
4234           fi ;;
4235         esac
4236       fi
4237       break
4238     fi
4239   done
4240   IFS="$ac_save_ifs"
4241   MAGIC_CMD="$ac_save_MAGIC_CMD"
4242   ;;
4243 esac
4244 fi
4245
4246 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4247 if test -n "$MAGIC_CMD"; then
4248   echo "$ac_t""$MAGIC_CMD" 1>&6
4249 else
4250   echo "$ac_t""no" 1>&6
4251 fi
4252
4253   else
4254     MAGIC_CMD=:
4255   fi
4256 fi
4257
4258   fi
4259   ;;
4260 esac
4261
4262 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4263 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4264 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4265 echo "configure:4264: checking for $ac_word" >&5
4266 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4267   echo $ac_n "(cached) $ac_c" 1>&6
4268 else
4269   if test -n "$RANLIB"; then
4270   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4271 else
4272   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4273   ac_dummy="$PATH"
4274   for ac_dir in $ac_dummy; do
4275     test -z "$ac_dir" && ac_dir=.
4276     if test -f $ac_dir/$ac_word; then
4277       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4278       break
4279     fi
4280   done
4281   IFS="$ac_save_ifs"
4282 fi
4283 fi
4284 RANLIB="$ac_cv_prog_RANLIB"
4285 if test -n "$RANLIB"; then
4286   echo "$ac_t""$RANLIB" 1>&6
4287 else
4288   echo "$ac_t""no" 1>&6
4289 fi
4290
4291
4292 if test -z "$ac_cv_prog_RANLIB"; then
4293 if test -n "$ac_tool_prefix"; then
4294   # Extract the first word of "ranlib", so it can be a program name with args.
4295 set dummy ranlib; ac_word=$2
4296 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4297 echo "configure:4296: checking for $ac_word" >&5
4298 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4299   echo $ac_n "(cached) $ac_c" 1>&6
4300 else
4301   if test -n "$RANLIB"; then
4302   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4303 else
4304   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4305   ac_dummy="$PATH"
4306   for ac_dir in $ac_dummy; do
4307     test -z "$ac_dir" && ac_dir=.
4308     if test -f $ac_dir/$ac_word; then
4309       ac_cv_prog_RANLIB="ranlib"
4310       break
4311     fi
4312   done
4313   IFS="$ac_save_ifs"
4314   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4315 fi
4316 fi
4317 RANLIB="$ac_cv_prog_RANLIB"
4318 if test -n "$RANLIB"; then
4319   echo "$ac_t""$RANLIB" 1>&6
4320 else
4321   echo "$ac_t""no" 1>&6
4322 fi
4323
4324 else
4325   RANLIB=":"
4326 fi
4327 fi
4328
4329 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4330 set dummy ${ac_tool_prefix}strip; ac_word=$2
4331 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4332 echo "configure:4331: checking for $ac_word" >&5
4333 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4334   echo $ac_n "(cached) $ac_c" 1>&6
4335 else
4336   if test -n "$STRIP"; then
4337   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4338 else
4339   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4340   ac_dummy="$PATH"
4341   for ac_dir in $ac_dummy; do
4342     test -z "$ac_dir" && ac_dir=.
4343     if test -f $ac_dir/$ac_word; then
4344       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4345       break
4346     fi
4347   done
4348   IFS="$ac_save_ifs"
4349 fi
4350 fi
4351 STRIP="$ac_cv_prog_STRIP"
4352 if test -n "$STRIP"; then
4353   echo "$ac_t""$STRIP" 1>&6
4354 else
4355   echo "$ac_t""no" 1>&6
4356 fi
4357
4358
4359 if test -z "$ac_cv_prog_STRIP"; then
4360 if test -n "$ac_tool_prefix"; then
4361   # Extract the first word of "strip", so it can be a program name with args.
4362 set dummy strip; ac_word=$2
4363 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4364 echo "configure:4363: checking for $ac_word" >&5
4365 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4366   echo $ac_n "(cached) $ac_c" 1>&6
4367 else
4368   if test -n "$STRIP"; then
4369   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4370 else
4371   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4372   ac_dummy="$PATH"
4373   for ac_dir in $ac_dummy; do
4374     test -z "$ac_dir" && ac_dir=.
4375     if test -f $ac_dir/$ac_word; then
4376       ac_cv_prog_STRIP="strip"
4377       break
4378     fi
4379   done
4380   IFS="$ac_save_ifs"
4381   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4382 fi
4383 fi
4384 STRIP="$ac_cv_prog_STRIP"
4385 if test -n "$STRIP"; then
4386   echo "$ac_t""$STRIP" 1>&6
4387 else
4388   echo "$ac_t""no" 1>&6
4389 fi
4390
4391 else
4392   STRIP=":"
4393 fi
4394 fi
4395
4396
4397 enable_dlopen=yes
4398 enable_win32_dll=yes
4399
4400 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4401 if test "${enable_libtool_lock+set}" = set; then
4402   enableval="$enable_libtool_lock"
4403   :
4404 fi
4405
4406 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4407
4408 # Some flags need to be propagated to the compiler or linker for good
4409 # libtool support.
4410 case $host in
4411 *-*-irix6*)
4412   # Find out which ABI we are using.
4413   echo '#line 4412 "configure"' > conftest.$ac_ext
4414   if { (eval echo configure:4413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4415     case `/usr/bin/file conftest.$ac_objext` in
4416     *32-bit*)
4417       LD="${LD-ld} -32"
4418       ;;
4419     *N32*)
4420       LD="${LD-ld} -n32"
4421       ;;
4422     *64-bit*)
4423       LD="${LD-ld} -64"
4424       ;;
4425     esac
4426   fi
4427   rm -rf conftest*
4428   ;;
4429
4430 *-*-sco3.2v5*)
4431   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4432   SAVE_CFLAGS="$CFLAGS"
4433   CFLAGS="$CFLAGS -belf"
4434   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4435 echo "configure:4434: checking whether the C compiler needs -belf" >&5
4436 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4437   echo $ac_n "(cached) $ac_c" 1>&6
4438 else
4439   
4440      ac_ext=c
4441 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4442 ac_cpp='$CPP $CPPFLAGS'
4443 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4444 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4445 cross_compiling=$ac_cv_prog_cc_cross
4446
4447      cat > conftest.$ac_ext <<EOF
4448 #line 4447 "configure"
4449 #include "confdefs.h"
4450
4451 int main() {
4452
4453 ; return 0; }
4454 EOF
4455 if { (eval echo configure:4454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4456   rm -rf conftest*
4457   lt_cv_cc_needs_belf=yes
4458 else
4459   echo "configure: failed program was:" >&5
4460   cat conftest.$ac_ext >&5
4461   rm -rf conftest*
4462   lt_cv_cc_needs_belf=no
4463 fi
4464 rm -f conftest*
4465      ac_ext=c
4466 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4467 ac_cpp='$CPP $CPPFLAGS'
4468 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4469 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4470 cross_compiling=$ac_cv_prog_cc_cross
4471
4472 fi
4473
4474 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4475   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4476     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4477     CFLAGS="$SAVE_CFLAGS"
4478   fi
4479   ;;
4480
4481 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4482   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4483 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4484 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4485 echo "configure:4484: checking for $ac_word" >&5
4486 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4487   echo $ac_n "(cached) $ac_c" 1>&6
4488 else
4489   if test -n "$DLLTOOL"; then
4490   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4491 else
4492   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4493   ac_dummy="$PATH"
4494   for ac_dir in $ac_dummy; do
4495     test -z "$ac_dir" && ac_dir=.
4496     if test -f $ac_dir/$ac_word; then
4497       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4498       break
4499     fi
4500   done
4501   IFS="$ac_save_ifs"
4502 fi
4503 fi
4504 DLLTOOL="$ac_cv_prog_DLLTOOL"
4505 if test -n "$DLLTOOL"; then
4506   echo "$ac_t""$DLLTOOL" 1>&6
4507 else
4508   echo "$ac_t""no" 1>&6
4509 fi
4510
4511
4512 if test -z "$ac_cv_prog_DLLTOOL"; then
4513 if test -n "$ac_tool_prefix"; then
4514   # Extract the first word of "dlltool", so it can be a program name with args.
4515 set dummy dlltool; ac_word=$2
4516 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4517 echo "configure:4516: checking for $ac_word" >&5
4518 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4519   echo $ac_n "(cached) $ac_c" 1>&6
4520 else
4521   if test -n "$DLLTOOL"; then
4522   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4523 else
4524   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4525   ac_dummy="$PATH"
4526   for ac_dir in $ac_dummy; do
4527     test -z "$ac_dir" && ac_dir=.
4528     if test -f $ac_dir/$ac_word; then
4529       ac_cv_prog_DLLTOOL="dlltool"
4530       break
4531     fi
4532   done
4533   IFS="$ac_save_ifs"
4534   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4535 fi
4536 fi
4537 DLLTOOL="$ac_cv_prog_DLLTOOL"
4538 if test -n "$DLLTOOL"; then
4539   echo "$ac_t""$DLLTOOL" 1>&6
4540 else
4541   echo "$ac_t""no" 1>&6
4542 fi
4543
4544 else
4545   DLLTOOL="false"
4546 fi
4547 fi
4548
4549   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4550 set dummy ${ac_tool_prefix}as; ac_word=$2
4551 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4552 echo "configure:4551: checking for $ac_word" >&5
4553 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4554   echo $ac_n "(cached) $ac_c" 1>&6
4555 else
4556   if test -n "$AS"; then
4557   ac_cv_prog_AS="$AS" # Let the user override the test.
4558 else
4559   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4560   ac_dummy="$PATH"
4561   for ac_dir in $ac_dummy; do
4562     test -z "$ac_dir" && ac_dir=.
4563     if test -f $ac_dir/$ac_word; then
4564       ac_cv_prog_AS="${ac_tool_prefix}as"
4565       break
4566     fi
4567   done
4568   IFS="$ac_save_ifs"
4569 fi
4570 fi
4571 AS="$ac_cv_prog_AS"
4572 if test -n "$AS"; then
4573   echo "$ac_t""$AS" 1>&6
4574 else
4575   echo "$ac_t""no" 1>&6
4576 fi
4577
4578
4579 if test -z "$ac_cv_prog_AS"; then
4580 if test -n "$ac_tool_prefix"; then
4581   # Extract the first word of "as", so it can be a program name with args.
4582 set dummy as; ac_word=$2
4583 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4584 echo "configure:4583: checking for $ac_word" >&5
4585 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4586   echo $ac_n "(cached) $ac_c" 1>&6
4587 else
4588   if test -n "$AS"; then
4589   ac_cv_prog_AS="$AS" # Let the user override the test.
4590 else
4591   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4592   ac_dummy="$PATH"
4593   for ac_dir in $ac_dummy; do
4594     test -z "$ac_dir" && ac_dir=.
4595     if test -f $ac_dir/$ac_word; then
4596       ac_cv_prog_AS="as"
4597       break
4598     fi
4599   done
4600   IFS="$ac_save_ifs"
4601   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4602 fi
4603 fi
4604 AS="$ac_cv_prog_AS"
4605 if test -n "$AS"; then
4606   echo "$ac_t""$AS" 1>&6
4607 else
4608   echo "$ac_t""no" 1>&6
4609 fi
4610
4611 else
4612   AS="false"
4613 fi
4614 fi
4615
4616   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4617 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4618 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4619 echo "configure:4618: checking for $ac_word" >&5
4620 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4621   echo $ac_n "(cached) $ac_c" 1>&6
4622 else
4623   if test -n "$OBJDUMP"; then
4624   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4625 else
4626   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4627   ac_dummy="$PATH"
4628   for ac_dir in $ac_dummy; do
4629     test -z "$ac_dir" && ac_dir=.
4630     if test -f $ac_dir/$ac_word; then
4631       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4632       break
4633     fi
4634   done
4635   IFS="$ac_save_ifs"
4636 fi
4637 fi
4638 OBJDUMP="$ac_cv_prog_OBJDUMP"
4639 if test -n "$OBJDUMP"; then
4640   echo "$ac_t""$OBJDUMP" 1>&6
4641 else
4642   echo "$ac_t""no" 1>&6
4643 fi
4644
4645
4646 if test -z "$ac_cv_prog_OBJDUMP"; then
4647 if test -n "$ac_tool_prefix"; then
4648   # Extract the first word of "objdump", so it can be a program name with args.
4649 set dummy objdump; ac_word=$2
4650 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4651 echo "configure:4650: checking for $ac_word" >&5
4652 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4653   echo $ac_n "(cached) $ac_c" 1>&6
4654 else
4655   if test -n "$OBJDUMP"; then
4656   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4657 else
4658   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4659   ac_dummy="$PATH"
4660   for ac_dir in $ac_dummy; do
4661     test -z "$ac_dir" && ac_dir=.
4662     if test -f $ac_dir/$ac_word; then
4663       ac_cv_prog_OBJDUMP="objdump"
4664       break
4665     fi
4666   done
4667   IFS="$ac_save_ifs"
4668   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4669 fi
4670 fi
4671 OBJDUMP="$ac_cv_prog_OBJDUMP"
4672 if test -n "$OBJDUMP"; then
4673   echo "$ac_t""$OBJDUMP" 1>&6
4674 else
4675   echo "$ac_t""no" 1>&6
4676 fi
4677
4678 else
4679   OBJDUMP="false"
4680 fi
4681 fi
4682
4683
4684   # recent cygwin and mingw systems supply a stub DllMain which the user
4685   # can override, but on older systems we have to supply one
4686   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4687 echo "configure:4686: checking if libtool should supply DllMain function" >&5
4688 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4689   echo $ac_n "(cached) $ac_c" 1>&6
4690 else
4691   cat > conftest.$ac_ext <<EOF
4692 #line 4691 "configure"
4693 #include "confdefs.h"
4694
4695 int main() {
4696 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4697       DllMain (0, 0, 0);
4698 ; return 0; }
4699 EOF
4700 if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4701   rm -rf conftest*
4702   lt_cv_need_dllmain=no
4703 else
4704   echo "configure: failed program was:" >&5
4705   cat conftest.$ac_ext >&5
4706   rm -rf conftest*
4707   lt_cv_need_dllmain=yes
4708 fi
4709 rm -f conftest*
4710 fi
4711
4712 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4713
4714   case $host/$CC in
4715   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4716     # old mingw systems require "-dll" to link a DLL, while more recent ones
4717     # require "-mdll"
4718     SAVE_CFLAGS="$CFLAGS"
4719     CFLAGS="$CFLAGS -mdll"
4720     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4721 echo "configure:4720: checking how to link DLLs" >&5
4722 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4723   echo $ac_n "(cached) $ac_c" 1>&6
4724 else
4725   cat > conftest.$ac_ext <<EOF
4726 #line 4725 "configure"
4727 #include "confdefs.h"
4728
4729 int main() {
4730
4731 ; return 0; }
4732 EOF
4733 if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4734   rm -rf conftest*
4735   lt_cv_cc_dll_switch=-mdll
4736 else
4737   echo "configure: failed program was:" >&5
4738   cat conftest.$ac_ext >&5
4739   rm -rf conftest*
4740   lt_cv_cc_dll_switch=-dll
4741 fi
4742 rm -f conftest*
4743 fi
4744
4745 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4746     CFLAGS="$SAVE_CFLAGS" ;;
4747   *-*-cygwin* | *-*-pw32*)
4748     # cygwin systems need to pass --dll to the linker, and not link
4749     # crt.o which will require a WinMain@16 definition.
4750     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4751   esac
4752   ;;
4753   
4754 esac
4755
4756 # Sed substitution that helps us do robust quoting.  It backslashifies
4757 # metacharacters that are still active within double-quoted strings.
4758 Xsed='sed -e s/^X//'
4759 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4760
4761 # Same as above, but do not quote variable references.
4762 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4763
4764 # Sed substitution to delay expansion of an escaped shell variable in a
4765 # double_quote_subst'ed string.
4766 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4767
4768 # Constants:
4769 rm="rm -f"
4770
4771 # Global variables:
4772 default_ofile=libtool
4773 can_build_shared=yes
4774
4775 # All known linkers require a `.a' archive for static linking (except M$VC,
4776 # which needs '.lib').
4777 libext=a
4778 ltmain="$ac_aux_dir/ltmain.sh"
4779 ofile="$default_ofile"
4780 with_gnu_ld="$lt_cv_prog_gnu_ld"
4781 need_locks="$enable_libtool_lock"
4782
4783 old_CC="$CC"
4784 old_CFLAGS="$CFLAGS"
4785
4786 # Set sane defaults for various variables
4787 test -z "$AR" && AR=ar
4788 test -z "$AR_FLAGS" && AR_FLAGS=cru
4789 test -z "$AS" && AS=as
4790 test -z "$CC" && CC=cc
4791 test -z "$DLLTOOL" && DLLTOOL=dlltool
4792 test -z "$LD" && LD=ld
4793 test -z "$LN_S" && LN_S="ln -s"
4794 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4795 test -z "$NM" && NM=nm
4796 test -z "$OBJDUMP" && OBJDUMP=objdump
4797 test -z "$RANLIB" && RANLIB=:
4798 test -z "$STRIP" && STRIP=:
4799 test -z "$ac_objext" && ac_objext=o
4800
4801 if test x"$host" != x"$build"; then
4802   ac_tool_prefix=${host_alias}-
4803 else
4804   ac_tool_prefix=
4805 fi
4806
4807 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4808 case $host_os in
4809 linux-gnu*) ;;
4810 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4811 esac
4812
4813 case $host_os in
4814 aix3*)
4815   # AIX sometimes has problems with the GCC collect2 program.  For some
4816   # reason, if we set the COLLECT_NAMES environment variable, the problems
4817   # vanish in a puff of smoke.
4818   if test "X${COLLECT_NAMES+set}" != Xset; then
4819     COLLECT_NAMES=
4820     export COLLECT_NAMES
4821   fi
4822   ;;
4823 esac
4824
4825 # Determine commands to create old-style static archives.
4826 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4827 old_postinstall_cmds='chmod 644 $oldlib'
4828 old_postuninstall_cmds=
4829
4830 if test -n "$RANLIB"; then
4831   case $host_os in
4832   openbsd*)
4833     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4834     ;;
4835   *)
4836     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4837     ;;
4838   esac
4839   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4840 fi
4841
4842 # Allow CC to be a program name with arguments.
4843 set dummy $CC
4844 compiler="$2"
4845
4846 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4847 echo "configure:4846: checking for objdir" >&5
4848 rm -f .libs 2>/dev/null
4849 mkdir .libs 2>/dev/null
4850 if test -d .libs; then
4851   objdir=.libs
4852 else
4853   # MS-DOS does not allow filenames that begin with a dot.
4854   objdir=_libs
4855 fi
4856 rmdir .libs 2>/dev/null
4857 echo "$ac_t""$objdir" 1>&6
4858
4859
4860 # Check whether --with-pic or --without-pic was given.
4861 if test "${with_pic+set}" = set; then
4862   withval="$with_pic"
4863   pic_mode="$withval"
4864 else
4865   pic_mode=default
4866 fi
4867
4868 test -z "$pic_mode" && pic_mode=default
4869
4870 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4871 # in isolation, and that seeing it set (from the cache) indicates that
4872 # the associated values are set (in the cache) correctly too.
4873 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4874 echo "configure:4873: checking for $compiler option to produce PIC" >&5
4875 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4876   echo $ac_n "(cached) $ac_c" 1>&6
4877 else
4878    lt_cv_prog_cc_pic=
4879   lt_cv_prog_cc_shlib=
4880   lt_cv_prog_cc_wl=
4881   lt_cv_prog_cc_static=
4882   lt_cv_prog_cc_no_builtin=
4883   lt_cv_prog_cc_can_build_shared=$can_build_shared
4884
4885   if test "$GCC" = yes; then
4886     lt_cv_prog_cc_wl='-Wl,'
4887     lt_cv_prog_cc_static='-static'
4888
4889     case $host_os in
4890     aix*)
4891       # Below there is a dirty hack to force normal static linking with -ldl
4892       # The problem is because libdl dynamically linked with both libc and
4893       # libC (AIX C++ library), which obviously doesn't included in libraries
4894       # list by gcc. This cause undefined symbols with -static flags.
4895       # This hack allows C programs to be linked with "-static -ldl", but
4896       # not sure about C++ programs.
4897       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4898       ;;
4899     amigaos*)
4900       # FIXME: we need at least 68020 code to build shared libraries, but
4901       # adding the `-m68020' flag to GCC prevents building anything better,
4902       # like `-m68040'.
4903       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4904       ;;
4905     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4906       # PIC is the default for these OSes.
4907       ;;
4908     darwin* | rhapsody*)
4909       # PIC is the default on this platform
4910       # Common symbols not allowed in MH_DYLIB files
4911       lt_cv_prog_cc_pic='-fno-common'
4912       ;;
4913     cygwin* | mingw* | pw32* | os2*)
4914       # This hack is so that the source file can tell whether it is being
4915       # built for inclusion in a dll (and should export symbols for example).
4916       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4917       ;;
4918     sysv4*MP*)
4919       if test -d /usr/nec; then
4920          lt_cv_prog_cc_pic=-Kconform_pic
4921       fi
4922       ;;
4923     *)
4924       lt_cv_prog_cc_pic='-fPIC'
4925       ;;
4926     esac
4927   else
4928     # PORTME Check for PIC flags for the system compiler.
4929     case $host_os in
4930     aix3* | aix4* | aix5*)
4931       lt_cv_prog_cc_wl='-Wl,'
4932       # All AIX code is PIC.
4933       if test "$host_cpu" = ia64; then
4934         # AIX 5 now supports IA64 processor
4935         lt_cv_prog_cc_static='-Bstatic'
4936       else
4937         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4938       fi
4939       ;;
4940
4941     hpux9* | hpux10* | hpux11*)
4942       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4943       lt_cv_prog_cc_wl='-Wl,'
4944       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4945       lt_cv_prog_cc_pic='+Z'
4946       ;;
4947
4948     irix5* | irix6* | nonstopux*)
4949       lt_cv_prog_cc_wl='-Wl,'
4950       lt_cv_prog_cc_static='-non_shared'
4951       # PIC (with -KPIC) is the default.
4952       ;;
4953
4954     cygwin* | mingw* | pw32* | os2*)
4955       # This hack is so that the source file can tell whether it is being
4956       # built for inclusion in a dll (and should export symbols for example).
4957       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4958       ;;
4959
4960     newsos6)
4961       lt_cv_prog_cc_pic='-KPIC'
4962       lt_cv_prog_cc_static='-Bstatic'
4963       ;;
4964     
4965     openedition)
4966       # XPLINK code is PIC by default
4967       ;;
4968
4969     osf3* | osf4* | osf5*)
4970       # All OSF/1 code is PIC.
4971       lt_cv_prog_cc_wl='-Wl,'
4972       lt_cv_prog_cc_static='-non_shared'
4973       ;;
4974
4975     sco3.2v5*)
4976       lt_cv_prog_cc_pic='-Kpic'
4977       lt_cv_prog_cc_static='-dn'
4978       lt_cv_prog_cc_shlib='-belf'
4979       ;;
4980
4981     solaris*)
4982       lt_cv_prog_cc_pic='-KPIC'
4983       lt_cv_prog_cc_static='-Bstatic'
4984       lt_cv_prog_cc_wl='-Wl,'
4985       ;;
4986
4987     sunos4*)
4988       lt_cv_prog_cc_pic='-PIC'
4989       lt_cv_prog_cc_static='-Bstatic'
4990       lt_cv_prog_cc_wl='-Qoption ld '
4991       ;;
4992
4993     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4994       lt_cv_prog_cc_pic='-KPIC'
4995       lt_cv_prog_cc_static='-Bstatic'
4996       lt_cv_prog_cc_wl='-Wl,'
4997       ;;
4998
4999     uts4*)
5000       lt_cv_prog_cc_pic='-pic'
5001       lt_cv_prog_cc_static='-Bstatic'
5002       ;;
5003
5004     sysv4*MP*)
5005       if test -d /usr/nec ;then
5006         lt_cv_prog_cc_pic='-Kconform_pic'
5007         lt_cv_prog_cc_static='-Bstatic'
5008       fi
5009       ;;
5010
5011     *)
5012       lt_cv_prog_cc_can_build_shared=no
5013       ;;
5014     esac
5015   fi
5016
5017 fi
5018
5019 if test -z "$lt_cv_prog_cc_pic"; then
5020   echo "$ac_t""none" 1>&6
5021 else
5022   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5023
5024   # Check to make sure the pic_flag actually works.
5025   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5026 echo "configure:5025: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5027   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5028   echo $ac_n "(cached) $ac_c" 1>&6
5029 else
5030       save_CFLAGS="$CFLAGS"
5031     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5032     cat > conftest.$ac_ext <<EOF
5033 #line 5032 "configure"
5034 #include "confdefs.h"
5035
5036 int main() {
5037
5038 ; return 0; }
5039 EOF
5040 if { (eval echo configure:5039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5041   rm -rf conftest*
5042         case $host_os in
5043       hpux9* | hpux10* | hpux11*)
5044         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5045         # they create non-PIC objects.  So, if there were any warnings, we
5046         # assume that PIC is not supported.
5047         if test -s conftest.err; then
5048           lt_cv_prog_cc_pic_works=no
5049         else
5050           lt_cv_prog_cc_pic_works=yes
5051         fi
5052         ;;
5053       *)
5054         lt_cv_prog_cc_pic_works=yes
5055         ;;
5056       esac
5057     
5058 else
5059   echo "configure: failed program was:" >&5
5060   cat conftest.$ac_ext >&5
5061   rm -rf conftest*
5062         lt_cv_prog_cc_pic_works=no
5063     
5064 fi
5065 rm -f conftest*
5066     CFLAGS="$save_CFLAGS"
5067   
5068 fi
5069
5070
5071   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5072     lt_cv_prog_cc_pic=
5073     lt_cv_prog_cc_can_build_shared=no
5074   else
5075     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5076   fi
5077
5078   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5079 fi
5080
5081 # Check for any special shared library compilation flags.
5082 if test -n "$lt_cv_prog_cc_shlib"; then
5083   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5084   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5085   else
5086    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5087     lt_cv_prog_cc_can_build_shared=no
5088   fi
5089 fi
5090
5091 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5092 echo "configure:5091: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5093 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5094   echo $ac_n "(cached) $ac_c" 1>&6
5095 else
5096     lt_cv_prog_cc_static_works=no
5097   save_LDFLAGS="$LDFLAGS"
5098   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5099   cat > conftest.$ac_ext <<EOF
5100 #line 5099 "configure"
5101 #include "confdefs.h"
5102
5103 int main() {
5104
5105 ; return 0; }
5106 EOF
5107 if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5108   rm -rf conftest*
5109   lt_cv_prog_cc_static_works=yes
5110 else
5111   echo "configure: failed program was:" >&5
5112   cat conftest.$ac_ext >&5
5113 fi
5114 rm -f conftest*
5115   LDFLAGS="$save_LDFLAGS"
5116
5117 fi
5118
5119
5120 # Belt *and* braces to stop my trousers falling down:
5121 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5122 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5123
5124 pic_flag="$lt_cv_prog_cc_pic"
5125 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5126 wl="$lt_cv_prog_cc_wl"
5127 link_static_flag="$lt_cv_prog_cc_static"
5128 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5129 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5130
5131
5132 # Check to see if options -o and -c are simultaneously supported by compiler
5133 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5134 echo "configure:5133: checking if $compiler supports -c -o file.$ac_objext" >&5
5135 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5136   echo $ac_n "(cached) $ac_c" 1>&6
5137 else
5138   
5139 $rm -r conftest 2>/dev/null
5140 mkdir conftest
5141 cd conftest
5142 echo "int some_variable = 0;" > conftest.$ac_ext
5143 mkdir out
5144 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5145 # that will create temporary files in the current directory regardless of
5146 # the output directory.  Thus, making CWD read-only will cause this test
5147 # to fail, enabling locking or at least warning the user not to do parallel
5148 # builds.
5149 chmod -w .
5150 save_CFLAGS="$CFLAGS"
5151 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5152 compiler_c_o=no
5153 if { (eval echo configure:5152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5154   # The compiler can only warn and ignore the option if not recognized
5155   # So say no if there are warnings
5156   if test -s out/conftest.err; then
5157     lt_cv_compiler_c_o=no
5158   else
5159     lt_cv_compiler_c_o=yes
5160   fi
5161 else
5162   # Append any errors to the config.log.
5163   cat out/conftest.err 1>&5
5164   lt_cv_compiler_c_o=no
5165 fi
5166 CFLAGS="$save_CFLAGS"
5167 chmod u+w .
5168 $rm conftest* out/*
5169 rmdir out
5170 cd ..
5171 rmdir conftest
5172 $rm -r conftest 2>/dev/null
5173
5174 fi
5175
5176 compiler_c_o=$lt_cv_compiler_c_o
5177 echo "$ac_t""$compiler_c_o" 1>&6
5178
5179 if test x"$compiler_c_o" = x"yes"; then
5180   # Check to see if we can write to a .lo
5181   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5182 echo "configure:5181: checking if $compiler supports -c -o file.lo" >&5
5183   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5184   echo $ac_n "(cached) $ac_c" 1>&6
5185 else
5186   
5187   lt_cv_compiler_o_lo=no
5188   save_CFLAGS="$CFLAGS"
5189   CFLAGS="$CFLAGS -c -o conftest.lo"
5190   save_objext="$ac_objext"
5191   ac_objext=lo
5192   cat > conftest.$ac_ext <<EOF
5193 #line 5192 "configure"
5194 #include "confdefs.h"
5195
5196 int main() {
5197 int some_variable = 0;
5198 ; return 0; }
5199 EOF
5200 if { (eval echo configure:5199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5201   rm -rf conftest*
5202       # The compiler can only warn and ignore the option if not recognized
5203     # So say no if there are warnings
5204     if test -s conftest.err; then
5205       lt_cv_compiler_o_lo=no
5206     else
5207       lt_cv_compiler_o_lo=yes
5208     fi
5209   
5210 else
5211   echo "configure: failed program was:" >&5
5212   cat conftest.$ac_ext >&5
5213 fi
5214 rm -f conftest*
5215   ac_objext="$save_objext"
5216   CFLAGS="$save_CFLAGS"
5217   
5218 fi
5219
5220   compiler_o_lo=$lt_cv_compiler_o_lo
5221   echo "$ac_t""$compiler_o_lo" 1>&6
5222 else
5223   compiler_o_lo=no
5224 fi
5225
5226 # Check to see if we can do hard links to lock some files if needed
5227 hard_links="nottested"
5228 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5229   # do not overwrite the value of need_locks provided by the user
5230   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5231 echo "configure:5230: checking if we can lock with hard links" >&5
5232   hard_links=yes
5233   $rm conftest*
5234   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5235   touch conftest.a
5236   ln conftest.a conftest.b 2>&5 || hard_links=no
5237   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5238   echo "$ac_t""$hard_links" 1>&6
5239   if test "$hard_links" = no; then
5240     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5241     need_locks=warn
5242   fi
5243 else
5244   need_locks=no
5245 fi
5246
5247 if test "$GCC" = yes; then
5248   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5249   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5250 echo "configure:5249: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5251   echo "int some_variable = 0;" > conftest.$ac_ext
5252   save_CFLAGS="$CFLAGS"
5253   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5254   compiler_rtti_exceptions=no
5255   cat > conftest.$ac_ext <<EOF
5256 #line 5255 "configure"
5257 #include "confdefs.h"
5258
5259 int main() {
5260 int some_variable = 0;
5261 ; return 0; }
5262 EOF
5263 if { (eval echo configure:5262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5264   rm -rf conftest*
5265       # The compiler can only warn and ignore the option if not recognized
5266     # So say no if there are warnings
5267     if test -s conftest.err; then
5268       compiler_rtti_exceptions=no
5269     else
5270       compiler_rtti_exceptions=yes
5271     fi
5272   
5273 else
5274   echo "configure: failed program was:" >&5
5275   cat conftest.$ac_ext >&5
5276 fi
5277 rm -f conftest*
5278   CFLAGS="$save_CFLAGS"
5279   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5280
5281   if test "$compiler_rtti_exceptions" = "yes"; then
5282     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5283   else
5284     no_builtin_flag=' -fno-builtin'
5285   fi
5286 fi
5287
5288 # See if the linker supports building shared libraries.
5289 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5290 echo "configure:5289: checking whether the linker ($LD) supports shared libraries" >&5
5291
5292 allow_undefined_flag=
5293 no_undefined_flag=
5294 need_lib_prefix=unknown
5295 need_version=unknown
5296 # when you set need_version to no, make sure it does not cause -set_version
5297 # flags to be left without arguments
5298 archive_cmds=
5299 archive_expsym_cmds=
5300 old_archive_from_new_cmds=
5301 old_archive_from_expsyms_cmds=
5302 export_dynamic_flag_spec=
5303 whole_archive_flag_spec=
5304 thread_safe_flag_spec=
5305 hardcode_into_libs=no
5306 hardcode_libdir_flag_spec=
5307 hardcode_libdir_separator=
5308 hardcode_direct=no
5309 hardcode_minus_L=no
5310 hardcode_shlibpath_var=unsupported
5311 runpath_var=
5312 link_all_deplibs=unknown
5313 always_export_symbols=no
5314 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5315 # include_expsyms should be a list of space-separated symbols to be *always*
5316 # included in the symbol list
5317 include_expsyms=
5318 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5319 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5320 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5321 # as well as any symbol that contains `d'.
5322 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5323 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5324 # platforms (ab)use it in PIC code, but their linkers get confused if
5325 # the symbol is explicitly referenced.  Since portable code cannot
5326 # rely on this symbol name, it's probably fine to never include it in
5327 # preloaded symbol tables.
5328 extract_expsyms_cmds=
5329
5330 case $host_os in
5331 cygwin* | mingw* | pw32*)
5332   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5333   # When not using gcc, we currently assume that we are using
5334   # Microsoft Visual C++.
5335   if test "$GCC" != yes; then
5336     with_gnu_ld=no
5337   fi
5338   ;;
5339 openbsd*)
5340   with_gnu_ld=no
5341   ;;
5342 esac
5343
5344 ld_shlibs=yes
5345 if test "$with_gnu_ld" = yes; then
5346   # If archive_cmds runs LD, not CC, wlarc should be empty
5347   wlarc='${wl}'
5348
5349   # See if GNU ld supports shared libraries.
5350   case $host_os in
5351   aix3* | aix4* | aix5*)
5352     # On AIX, the GNU linker is very broken
5353     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5354     ld_shlibs=no
5355     cat <<EOF 1>&2
5356
5357 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5358 *** to be unable to reliably create shared libraries on AIX.
5359 *** Therefore, libtool is disabling shared libraries support.  If you
5360 *** really care for shared libraries, you may want to modify your PATH
5361 *** so that a non-GNU linker is found, and then restart.
5362
5363 EOF
5364     ;;
5365
5366   amigaos*)
5367     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)'
5368     hardcode_libdir_flag_spec='-L$libdir'
5369     hardcode_minus_L=yes
5370
5371     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5372     # that the semantics of dynamic libraries on AmigaOS, at least up
5373     # to version 4, is to share data among multiple programs linked
5374     # with the same dynamic library.  Since this doesn't match the
5375     # behavior of shared libraries on other platforms, we can use
5376     # them.
5377     ld_shlibs=no
5378     ;;
5379
5380   beos*)
5381     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5382       allow_undefined_flag=unsupported
5383       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5384       # support --undefined.  This deserves some investigation.  FIXME
5385       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5386     else
5387       ld_shlibs=no
5388     fi
5389     ;;
5390
5391   cygwin* | mingw* | pw32*)
5392     # hardcode_libdir_flag_spec is actually meaningless, as there is
5393     # no search path for DLLs.
5394     hardcode_libdir_flag_spec='-L$libdir'
5395     allow_undefined_flag=unsupported
5396     always_export_symbols=yes
5397
5398     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5399       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5400       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5401       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5402       else $CC -o impgen impgen.c ; fi)~
5403       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5404
5405     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5406
5407     # cygwin and mingw dlls have different entry points and sets of symbols
5408     # to exclude.
5409     # FIXME: what about values for MSVC?
5410     dll_entry=__cygwin_dll_entry@12
5411     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5412     case $host_os in
5413     mingw*)
5414       # mingw values
5415       dll_entry=_DllMainCRTStartup@12
5416       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5417       ;;
5418     esac
5419
5420     # mingw and cygwin differ, and it's simplest to just exclude the union
5421     # of the two symbol sets.
5422     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5423
5424     # recent cygwin and mingw systems supply a stub DllMain which the user
5425     # can override, but on older systems we have to supply one (in ltdll.c)
5426     if test "x$lt_cv_need_dllmain" = "xyes"; then
5427       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5428       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~
5429         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5430     else
5431       ltdll_obj=
5432       ltdll_cmds=
5433     fi
5434
5435     # Extract the symbol export list from an `--export-all' def file,
5436     # then regenerate the def file from the symbol export list, so that
5437     # the compiled dll only exports the symbol export list.
5438     # Be careful not to strip the DATA tag left be newer dlltools.
5439     export_symbols_cmds="$ltdll_cmds"'
5440       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5441       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5442
5443     # If the export-symbols file already is a .def file (1st line
5444     # is EXPORTS), use it as is.
5445     # If DATA tags from a recent dlltool are present, honour them!
5446     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5447         cp $export_symbols $output_objdir/$soname-def;
5448       else
5449         echo EXPORTS > $output_objdir/$soname-def;
5450         _lt_hint=1;
5451         cat $export_symbols | while read symbol; do
5452          set dummy \$symbol;
5453          case \$# in
5454            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5455            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5456            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5457          esac;
5458          _lt_hint=`expr 1 + \$_lt_hint`;
5459         done;
5460       fi~
5461       '"$ltdll_cmds"'
5462       $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~
5463       $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~
5464       $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~
5465       $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~
5466       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5467     ;;
5468
5469   netbsd*)
5470     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5471       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5472       wlarc=
5473     else
5474       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5475       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5476     fi
5477     ;;
5478
5479   solaris* | sysv5*)
5480     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5481       ld_shlibs=no
5482       cat <<EOF 1>&2
5483
5484 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5485 *** create shared libraries on Solaris systems.  Therefore, libtool
5486 *** is disabling shared libraries support.  We urge you to upgrade GNU
5487 *** binutils to release 2.9.1 or newer.  Another option is to modify
5488 *** your PATH or compiler configuration so that the native linker is
5489 *** used, and then restart.
5490
5491 EOF
5492     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5493       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5494       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5495     else
5496       ld_shlibs=no
5497     fi
5498     ;;
5499
5500   sunos4*)
5501     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5502     wlarc=
5503     hardcode_direct=yes
5504     hardcode_shlibpath_var=no
5505     ;;
5506
5507   *)
5508     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5509       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5510       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5511     else
5512       ld_shlibs=no
5513     fi
5514     ;;
5515   esac
5516
5517   if test "$ld_shlibs" = yes; then
5518     runpath_var=LD_RUN_PATH
5519     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5520     export_dynamic_flag_spec='${wl}--export-dynamic'
5521     case $host_os in
5522     cygwin* | mingw* | pw32*)
5523       # dlltool doesn't understand --whole-archive et. al.
5524       whole_archive_flag_spec=
5525       ;;
5526     *)
5527       # ancient GNU ld didn't support --whole-archive et. al.
5528       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5529         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5530       else
5531         whole_archive_flag_spec=
5532       fi
5533       ;;
5534     esac
5535   fi
5536 else
5537   # PORTME fill in a description of your system's linker (not GNU ld)
5538   case $host_os in
5539   aix3*)
5540     allow_undefined_flag=unsupported
5541     always_export_symbols=yes
5542     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'
5543     # Note: this linker hardcodes the directories in LIBPATH if there
5544     # are no directories specified by -L.
5545     hardcode_minus_L=yes
5546     if test "$GCC" = yes && test -z "$link_static_flag"; then
5547       # Neither direct hardcoding nor static linking is supported with a
5548       # broken collect2.
5549       hardcode_direct=unsupported
5550     fi
5551     ;;
5552
5553   aix4* | aix5*)
5554     if test "$host_cpu" = ia64; then
5555       # On IA64, the linker does run time linking by default, so we don't
5556       # have to do anything special.
5557       aix_use_runtimelinking=no
5558       exp_sym_flag='-Bexport'
5559       no_entry_flag=""
5560     else
5561       aix_use_runtimelinking=no
5562
5563       # Test if we are trying to use run time linking or normal
5564       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5565       # need to do runtime linking.
5566       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5567         for ld_flag in $LDFLAGS; do
5568           case $ld_flag in
5569           *-brtl*)
5570             aix_use_runtimelinking=yes
5571             break
5572           ;;
5573           esac
5574         done
5575       esac
5576
5577       exp_sym_flag='-bexport'
5578       no_entry_flag='-bnoentry'
5579     fi
5580
5581     # When large executables or shared objects are built, AIX ld can
5582     # have problems creating the table of contents.  If linking a library
5583     # or program results in "error TOC overflow" add -mminimal-toc to
5584     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5585     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5586
5587     hardcode_direct=yes
5588     archive_cmds=''
5589     hardcode_libdir_separator=':'
5590     if test "$GCC" = yes; then
5591       case $host_os in aix4.[012]|aix4.[012].*)
5592         collect2name=`${CC} -print-prog-name=collect2`
5593         if test -f "$collect2name" && \
5594           strings "$collect2name" | grep resolve_lib_name >/dev/null
5595         then
5596           # We have reworked collect2
5597           hardcode_direct=yes
5598         else
5599           # We have old collect2
5600           hardcode_direct=unsupported
5601           # It fails to find uninstalled libraries when the uninstalled
5602           # path is not listed in the libpath.  Setting hardcode_minus_L
5603           # to unsupported forces relinking
5604           hardcode_minus_L=yes
5605           hardcode_libdir_flag_spec='-L$libdir'
5606           hardcode_libdir_separator=
5607         fi
5608       esac
5609
5610       shared_flag='-shared'
5611     else
5612       # not using gcc
5613       if test "$host_cpu" = ia64; then
5614         shared_flag='${wl}-G'
5615       else
5616         if test "$aix_use_runtimelinking" = yes; then
5617           shared_flag='${wl}-G'
5618         else
5619           shared_flag='${wl}-bM:SRE'
5620         fi
5621       fi
5622     fi
5623
5624     # It seems that -bexpall can do strange things, so it is better to
5625     # generate a list of symbols to export.
5626     always_export_symbols=yes
5627     if test "$aix_use_runtimelinking" = yes; then
5628       # Warning - without using the other runtime loading flags (-brtl),
5629       # -berok will link without error, but may produce a broken library.
5630       allow_undefined_flag='-berok'
5631       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5632       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"
5633     else
5634       if test "$host_cpu" = ia64; then
5635         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5636         allow_undefined_flag="-z nodefs"
5637         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"
5638       else
5639         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5640         # Warning - without using the other run time loading flags,
5641         # -berok will link without error, but may produce a broken library.
5642         allow_undefined_flag='${wl}-berok'
5643         # This is a bit strange, but is similar to how AIX traditionally builds
5644         # it's shared libraries.
5645         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'
5646       fi
5647     fi
5648     ;;
5649
5650   amigaos*)
5651     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)'
5652     hardcode_libdir_flag_spec='-L$libdir'
5653     hardcode_minus_L=yes
5654     # see comment about different semantics on the GNU ld section
5655     ld_shlibs=no
5656     ;;
5657
5658   cygwin* | mingw* | pw32*)
5659     # When not using gcc, we currently assume that we are using
5660     # Microsoft Visual C++.
5661     # hardcode_libdir_flag_spec is actually meaningless, as there is
5662     # no search path for DLLs.
5663     hardcode_libdir_flag_spec=' '
5664     allow_undefined_flag=unsupported
5665     # Tell ltmain to make .lib files, not .a files.
5666     libext=lib
5667     # FIXME: Setting linknames here is a bad hack.
5668     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5669     # The linker will automatically build a .lib file if we build a DLL.
5670     old_archive_from_new_cmds='true'
5671     # FIXME: Should let the user specify the lib program.
5672     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5673     fix_srcfile_path='`cygpath -w "$srcfile"`'
5674     ;;
5675
5676   darwin* | rhapsody*)
5677     case "$host_os" in
5678     rhapsody* | darwin1.[012])
5679       allow_undefined_flag='-undefined suppress'
5680       ;;
5681     *) # Darwin 1.3 on
5682       allow_undefined_flag='-flat_namespace -undefined suppress'
5683       ;;
5684     esac
5685     # FIXME: Relying on posixy $() will cause problems for
5686     #        cross-compilation, but unfortunately the echo tests do not
5687     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5688     #        `"' quotes if we put them in here... so don't!
5689     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)'
5690     # We need to add '_' to the symbols in $export_symbols first
5691     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5692     hardcode_direct=yes
5693     hardcode_shlibpath_var=no
5694     whole_archive_flag_spec='-all_load $convenience'
5695     ;;
5696
5697   freebsd1*)
5698     ld_shlibs=no
5699     ;;
5700
5701   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5702   # support.  Future versions do this automatically, but an explicit c++rt0.o
5703   # does not break anything, and helps significantly (at the cost of a little
5704   # extra space).
5705   freebsd2.2*)
5706     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5707     hardcode_libdir_flag_spec='-R$libdir'
5708     hardcode_direct=yes
5709     hardcode_shlibpath_var=no
5710     ;;
5711
5712   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5713   freebsd2*)
5714     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5715     hardcode_direct=yes
5716     hardcode_minus_L=yes
5717     hardcode_shlibpath_var=no
5718     ;;
5719
5720   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5721   freebsd*)
5722     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5723     hardcode_libdir_flag_spec='-R$libdir'
5724     hardcode_direct=yes
5725     hardcode_shlibpath_var=no
5726     ;;
5727
5728   hpux9* | hpux10* | hpux11*)
5729     case $host_os in
5730     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' ;;
5731     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5732     esac
5733     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5734     hardcode_libdir_separator=:
5735     hardcode_direct=yes
5736     hardcode_minus_L=yes # Not in the search PATH, but as the default
5737                          # location of the library.
5738     export_dynamic_flag_spec='${wl}-E'
5739     ;;
5740
5741   irix5* | irix6* | nonstopux*)
5742     if test "$GCC" = yes; then
5743       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'
5744       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5745     else
5746       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'
5747       hardcode_libdir_flag_spec='-rpath $libdir'
5748     fi
5749     hardcode_libdir_separator=:
5750     link_all_deplibs=yes
5751     ;;
5752
5753   netbsd*)
5754     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5755       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5756     else
5757       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5758     fi
5759     hardcode_libdir_flag_spec='-R$libdir'
5760     hardcode_direct=yes
5761     hardcode_shlibpath_var=no
5762     ;;
5763
5764   newsos6)
5765     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5766     hardcode_direct=yes
5767     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5768     hardcode_libdir_separator=:
5769     hardcode_shlibpath_var=no
5770     ;;
5771
5772   openbsd*)
5773     hardcode_direct=yes
5774     hardcode_shlibpath_var=no
5775     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5776       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5777       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5778       export_dynamic_flag_spec='${wl}-E'
5779     else
5780       case "$host_os" in
5781       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5782         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5783         hardcode_libdir_flag_spec='-R$libdir'
5784         ;;
5785       *)
5786         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5787         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5788         ;;
5789       esac
5790     fi
5791     ;;
5792
5793   openedition*)
5794     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5795         cp \$linknames \$output_objdir && linknames=''"
5796     export_dynamic_flag_spec="-Wl,DLL"
5797     ;;
5798
5799   os2*)
5800     hardcode_libdir_flag_spec='-L$libdir'
5801     hardcode_minus_L=yes
5802     allow_undefined_flag=unsupported
5803     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'
5804     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5805     ;;
5806
5807   osf3*)
5808     if test "$GCC" = yes; then
5809       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5810       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'
5811     else
5812       allow_undefined_flag=' -expect_unresolved \*'
5813       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'
5814     fi
5815     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5816     hardcode_libdir_separator=:
5817     ;;
5818
5819   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5820     if test "$GCC" = yes; then
5821       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5822       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'
5823       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5824     else
5825       allow_undefined_flag=' -expect_unresolved \*'
5826       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'
5827       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5828       $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'
5829
5830       #Both c and cxx compiler support -rpath directly
5831       hardcode_libdir_flag_spec='-rpath $libdir'
5832     fi
5833     hardcode_libdir_separator=:
5834     ;;
5835
5836   sco3.2v5*)
5837     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5838     hardcode_shlibpath_var=no
5839     runpath_var=LD_RUN_PATH
5840     hardcode_runpath_var=yes
5841     export_dynamic_flag_spec='${wl}-Bexport'
5842     ;;
5843
5844   solaris*)
5845     # gcc --version < 3.0 without binutils cannot create self contained
5846     # shared libraries reliably, requiring libgcc.a to resolve some of
5847     # the object symbols generated in some cases.  Libraries that use
5848     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5849     # a copy of libgcc.a into every shared library to guarantee resolving
5850     # such symbols causes other problems:  According to Tim Van Holder
5851     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5852     # (to the application) exception stack for one thing.
5853     no_undefined_flag=' -z defs'
5854     if test "$GCC" = yes; then
5855       case `$CC --version 2>/dev/null` in
5856       [12].*)
5857         cat <<EOF 1>&2
5858
5859 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5860 *** create self contained shared libraries on Solaris systems, without
5861 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5862 *** -no-undefined support, which will at least allow you to build shared
5863 *** libraries.  However, you may find that when you link such libraries
5864 *** into an application without using GCC, you have to manually add
5865 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5866 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5867 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5868
5869 EOF
5870         no_undefined_flag=
5871         ;;
5872       esac
5873     fi
5874     # $CC -shared without GNU ld will not create a library from C++
5875     # object files and a static libstdc++, better avoid it by now
5876     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5877     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5878                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5879     hardcode_libdir_flag_spec='-R$libdir'
5880     hardcode_shlibpath_var=no
5881     case $host_os in
5882     solaris2.[0-5] | solaris2.[0-5].*) ;;
5883     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5884       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5885     esac
5886     link_all_deplibs=yes
5887     ;;
5888
5889   sunos4*)
5890     if test "x$host_vendor" = xsequent; then
5891       # Use $CC to link under sequent, because it throws in some extra .o
5892       # files that make .init and .fini sections work.
5893       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5894     else
5895       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5896     fi
5897     hardcode_libdir_flag_spec='-L$libdir'
5898     hardcode_direct=yes
5899     hardcode_minus_L=yes
5900     hardcode_shlibpath_var=no
5901     ;;
5902
5903   sysv4)
5904     case $host_vendor in
5905       sni)
5906         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5907         hardcode_direct=yes # is this really true???
5908         ;;
5909       siemens)
5910         ## LD is ld it makes a PLAMLIB
5911         ## CC just makes a GrossModule.
5912         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5913         reload_cmds='$CC -r -o $output$reload_objs'
5914         hardcode_direct=no
5915         ;;
5916       motorola)
5917         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5918         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5919         ;;
5920     esac
5921     runpath_var='LD_RUN_PATH'
5922     hardcode_shlibpath_var=no
5923     ;;
5924
5925   sysv4.3*)
5926     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5927     hardcode_shlibpath_var=no
5928     export_dynamic_flag_spec='-Bexport'
5929     ;;
5930
5931   sysv5*)
5932     no_undefined_flag=' -z text'
5933     # $CC -shared without GNU ld will not create a library from C++
5934     # object files and a static libstdc++, better avoid it by now
5935     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5936     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5937                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5938     hardcode_libdir_flag_spec=
5939     hardcode_shlibpath_var=no
5940     runpath_var='LD_RUN_PATH'
5941     ;;
5942
5943   uts4*)
5944     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5945     hardcode_libdir_flag_spec='-L$libdir'
5946     hardcode_shlibpath_var=no
5947     ;;
5948
5949   dgux*)
5950     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5951     hardcode_libdir_flag_spec='-L$libdir'
5952     hardcode_shlibpath_var=no
5953     ;;
5954
5955   sysv4*MP*)
5956     if test -d /usr/nec; then
5957       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5958       hardcode_shlibpath_var=no
5959       runpath_var=LD_RUN_PATH
5960       hardcode_runpath_var=yes
5961       ld_shlibs=yes
5962     fi
5963     ;;
5964
5965   sysv4.2uw2*)
5966     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5967     hardcode_direct=yes
5968     hardcode_minus_L=no
5969     hardcode_shlibpath_var=no
5970     hardcode_runpath_var=yes
5971     runpath_var=LD_RUN_PATH
5972     ;;
5973
5974   sysv5uw7* | unixware7*)
5975     no_undefined_flag='${wl}-z ${wl}text'
5976     if test "$GCC" = yes; then
5977       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5978     else
5979       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5980     fi
5981     runpath_var='LD_RUN_PATH'
5982     hardcode_shlibpath_var=no
5983     ;;
5984
5985   *)
5986     ld_shlibs=no
5987     ;;
5988   esac
5989 fi
5990 echo "$ac_t""$ld_shlibs" 1>&6
5991 test "$ld_shlibs" = no && can_build_shared=no
5992
5993 # Check hardcoding attributes.
5994 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
5995 echo "configure:5994: checking how to hardcode library paths into programs" >&5
5996 hardcode_action=
5997 if test -n "$hardcode_libdir_flag_spec" || \
5998    test -n "$runpath_var"; then
5999
6000   # We can hardcode non-existant directories.
6001   if test "$hardcode_direct" != no &&
6002      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6003      # have to relink, otherwise we might link with an installed library
6004      # when we should be linking with a yet-to-be-installed one
6005      ## test "$hardcode_shlibpath_var" != no &&
6006      test "$hardcode_minus_L" != no; then
6007     # Linking always hardcodes the temporary library directory.
6008     hardcode_action=relink
6009   else
6010     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6011     hardcode_action=immediate
6012   fi
6013 else
6014   # We cannot hardcode anything, or else we can only hardcode existing
6015   # directories.
6016   hardcode_action=unsupported
6017 fi
6018 echo "$ac_t""$hardcode_action" 1>&6
6019
6020 striplib=
6021 old_striplib=
6022 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6023 echo "configure:6022: checking whether stripping libraries is possible" >&5
6024 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6025   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6026   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6027   echo "$ac_t""yes" 1>&6
6028 else
6029   echo "$ac_t""no" 1>&6
6030 fi
6031
6032 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6033 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6034
6035 # PORTME Fill in your ld.so characteristics
6036 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6037 echo "configure:6036: checking dynamic linker characteristics" >&5
6038 library_names_spec=
6039 libname_spec='lib$name'
6040 soname_spec=
6041 postinstall_cmds=
6042 postuninstall_cmds=
6043 finish_cmds=
6044 finish_eval=
6045 shlibpath_var=
6046 shlibpath_overrides_runpath=unknown
6047 version_type=none
6048 dynamic_linker="$host_os ld.so"
6049 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6050 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6051
6052 case $host_os in
6053 aix3*)
6054   version_type=linux
6055   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6056   shlibpath_var=LIBPATH
6057
6058   # AIX has no versioning support, so we append a major version to the name.
6059   soname_spec='${libname}${release}.so$major'
6060   ;;
6061
6062 aix4* | aix5*)
6063   version_type=linux
6064   need_lib_prefix=no
6065   need_version=no
6066   hardcode_into_libs=yes
6067   if test "$host_cpu" = ia64; then
6068     # AIX 5 supports IA64
6069     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6070     shlibpath_var=LD_LIBRARY_PATH
6071   else
6072     # With GCC up to 2.95.x, collect2 would create an import file
6073     # for dependence libraries.  The import file would start with
6074     # the line `#! .'.  This would cause the generated library to
6075     # depend on `.', always an invalid library.  This was fixed in
6076     # development snapshots of GCC prior to 3.0.
6077     case $host_os in
6078       aix4 | aix4.[01] | aix4.[01].*)
6079         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6080              echo ' yes '
6081              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6082           :
6083         else
6084           can_build_shared=no
6085         fi
6086         ;;
6087     esac
6088     # AIX (on Power*) has no versioning support, so currently we can
6089     # not hardcode correct soname into executable. Probably we can
6090     # add versioning support to collect2, so additional links can
6091     # be useful in future.
6092     if test "$aix_use_runtimelinking" = yes; then
6093       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6094       # instead of lib<name>.a to let people know that these are not
6095       # typical AIX shared libraries.
6096       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6097     else
6098       # We preserve .a as extension for shared libraries through AIX4.2
6099       # and later when we are not doing run time linking.
6100       library_names_spec='${libname}${release}.a $libname.a'
6101       soname_spec='${libname}${release}.so$major'
6102     fi
6103     shlibpath_var=LIBPATH
6104   fi
6105   hardcode_into_libs=yes
6106   ;;
6107
6108 amigaos*)
6109   library_names_spec='$libname.ixlibrary $libname.a'
6110   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6111   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'
6112   ;;
6113
6114 beos*)
6115   library_names_spec='${libname}.so'
6116   dynamic_linker="$host_os ld.so"
6117   shlibpath_var=LIBRARY_PATH
6118   ;;
6119
6120 bsdi4*)
6121   version_type=linux
6122   need_version=no
6123   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6124   soname_spec='${libname}${release}.so$major'
6125   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6126   shlibpath_var=LD_LIBRARY_PATH
6127   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6128   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6129   export_dynamic_flag_spec=-rdynamic
6130   # the default ld.so.conf also contains /usr/contrib/lib and
6131   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6132   # libtool to hard-code these into programs
6133   ;;
6134
6135 cygwin* | mingw* | pw32*)
6136   version_type=windows
6137   need_version=no
6138   need_lib_prefix=no
6139   case $GCC,$host_os in
6140   yes,cygwin*)
6141     library_names_spec='$libname.dll.a'
6142     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6143     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6144       dldir=$destdir/`dirname \$dlpath`~
6145       test -d \$dldir || mkdir -p \$dldir~
6146       $install_prog .libs/$dlname \$dldir/$dlname'
6147     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6148       dlpath=$dir/\$dldll~
6149        $rm \$dlpath'
6150     ;;
6151   yes,mingw*)
6152     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6153     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6154     ;;
6155   yes,pw32*)
6156     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6157     ;;
6158   *)
6159     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6160     ;;
6161   esac
6162   dynamic_linker='Win32 ld.exe'
6163   # FIXME: first we should search . and the directory the executable is in
6164   shlibpath_var=PATH
6165   ;;
6166
6167 darwin* | rhapsody*)
6168   dynamic_linker="$host_os dyld"
6169   version_type=darwin
6170   need_lib_prefix=no
6171   need_version=no
6172   # FIXME: Relying on posixy $() will cause problems for
6173   #        cross-compilation, but unfortunately the echo tests do not
6174   #        yet detect zsh echo's removal of \ escapes.
6175   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)'
6176   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6177   shlibpath_overrides_runpath=yes
6178   shlibpath_var=DYLD_LIBRARY_PATH
6179   ;;
6180
6181 freebsd1*)
6182   dynamic_linker=no
6183   ;;
6184
6185 freebsd*)
6186   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6187   version_type=freebsd-$objformat
6188   case $version_type in
6189     freebsd-elf*)
6190       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6191       need_version=no
6192       need_lib_prefix=no
6193       ;;
6194     freebsd-*)
6195       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6196       need_version=yes
6197       ;;
6198   esac
6199   shlibpath_var=LD_LIBRARY_PATH
6200   case $host_os in
6201   freebsd2*)
6202     shlibpath_overrides_runpath=yes
6203     ;;
6204   *)
6205     shlibpath_overrides_runpath=no
6206     hardcode_into_libs=yes
6207     ;;
6208   esac
6209   ;;
6210
6211 gnu*)
6212   version_type=linux
6213   need_lib_prefix=no
6214   need_version=no
6215   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6216   soname_spec='${libname}${release}.so$major'
6217   shlibpath_var=LD_LIBRARY_PATH
6218   hardcode_into_libs=yes
6219   ;;
6220
6221 hpux9* | hpux10* | hpux11*)
6222   # Give a soname corresponding to the major version so that dld.sl refuses to
6223   # link against other versions.
6224   dynamic_linker="$host_os dld.sl"
6225   version_type=sunos
6226   need_lib_prefix=no
6227   need_version=no
6228   shlibpath_var=SHLIB_PATH
6229   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6230   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6231   soname_spec='${libname}${release}.sl$major'
6232   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6233   postinstall_cmds='chmod 555 $lib'
6234   ;;
6235
6236 irix5* | irix6* | nonstopux*)
6237   case $host_os in
6238     nonstopux*) version_type=nonstopux ;;
6239     *)          version_type=irix ;;
6240   esac
6241   need_lib_prefix=no
6242   need_version=no
6243   soname_spec='${libname}${release}.so$major'
6244   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6245   case $host_os in
6246   irix5* | nonstopux*)
6247     libsuff= shlibsuff=
6248     ;;
6249   *)
6250     case $LD in # libtool.m4 will add one of these switches to LD
6251     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6252     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6253     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6254     *) libsuff= shlibsuff= libmagic=never-match;;
6255     esac
6256     ;;
6257   esac
6258   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6259   shlibpath_overrides_runpath=no
6260   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6261   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6262   ;;
6263
6264 # No shared lib support for Linux oldld, aout, or coff.
6265 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6266   dynamic_linker=no
6267   ;;
6268
6269 # This must be Linux ELF.
6270 linux-gnu*)
6271   version_type=linux
6272   need_lib_prefix=no
6273   need_version=no
6274   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6275   soname_spec='${libname}${release}.so$major'
6276   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6277   shlibpath_var=LD_LIBRARY_PATH
6278   shlibpath_overrides_runpath=no
6279   # This implies no fast_install, which is unacceptable.
6280   # Some rework will be needed to allow for fast_install
6281   # before this can be enabled.
6282   hardcode_into_libs=yes
6283
6284   # We used to test for /lib/ld.so.1 and disable shared libraries on
6285   # powerpc, because MkLinux only supported shared libraries with the
6286   # GNU dynamic linker.  Since this was broken with cross compilers,
6287   # most powerpc-linux boxes support dynamic linking these days and
6288   # people can always --disable-shared, the test was removed, and we
6289   # assume the GNU/Linux dynamic linker is in use.
6290   dynamic_linker='GNU/Linux ld.so'
6291   ;;
6292
6293 netbsd*)
6294   version_type=sunos
6295   need_lib_prefix=no
6296   need_version=no
6297   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6298     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6299     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6300     dynamic_linker='NetBSD (a.out) ld.so'
6301   else
6302     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6303     soname_spec='${libname}${release}.so$major'
6304     dynamic_linker='NetBSD ld.elf_so'
6305   fi
6306   shlibpath_var=LD_LIBRARY_PATH
6307   shlibpath_overrides_runpath=yes
6308   hardcode_into_libs=yes
6309   ;;
6310
6311 newsos6)
6312   version_type=linux
6313   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6314   shlibpath_var=LD_LIBRARY_PATH
6315   shlibpath_overrides_runpath=yes
6316   ;;
6317
6318 openbsd*)
6319   version_type=sunos
6320   need_lib_prefix=no
6321   need_version=no
6322   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6323     case "$host_os" in
6324     openbsd2.[89] | openbsd2.[89].*)
6325       shlibpath_overrides_runpath=no
6326       ;;
6327     *)
6328       shlibpath_overrides_runpath=yes
6329       ;;
6330     esac
6331   else
6332     shlibpath_overrides_runpath=yes
6333   fi
6334   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6335   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6336   shlibpath_var=LD_LIBRARY_PATH
6337   ;;
6338
6339 openedition*)
6340   need_lib_prefix=no
6341   need_version=no
6342   shlibpath_overrides_runpath=yes
6343   shlibpath_var=LIBPATH
6344   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6345   # the library's exports are in libname.x; this is the file that must
6346   # actually be linked with to use a DLL.
6347   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6348   ;;
6349
6350 os2*)
6351   libname_spec='$name'
6352   need_lib_prefix=no
6353   library_names_spec='$libname.dll $libname.a'
6354   dynamic_linker='OS/2 ld.exe'
6355   shlibpath_var=LIBPATH
6356   ;;
6357
6358 osf3* | osf4* | osf5*)
6359   version_type=osf
6360   need_version=no
6361   soname_spec='${libname}${release}.so$major'
6362   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6363   shlibpath_var=LD_LIBRARY_PATH
6364   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6365   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6366   hardcode_into_libs=yes
6367   ;;
6368
6369 sco3.2v5*)
6370   version_type=osf
6371   soname_spec='${libname}${release}.so$major'
6372   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6373   shlibpath_var=LD_LIBRARY_PATH
6374   ;;
6375
6376 solaris*)
6377   version_type=linux
6378   need_lib_prefix=no
6379   need_version=no
6380   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6381   soname_spec='${libname}${release}.so$major'
6382   shlibpath_var=LD_LIBRARY_PATH
6383   shlibpath_overrides_runpath=yes
6384   hardcode_into_libs=yes
6385   # ldd complains unless libraries are executable
6386   postinstall_cmds='chmod +x $lib'
6387   ;;
6388
6389 sunos4*)
6390   version_type=sunos
6391   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6392   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6393   shlibpath_var=LD_LIBRARY_PATH
6394   shlibpath_overrides_runpath=yes
6395   if test "$with_gnu_ld" = yes; then
6396     need_lib_prefix=no
6397   fi
6398   need_version=yes
6399   ;;
6400
6401 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6402   version_type=linux
6403   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6404   soname_spec='${libname}${release}.so$major'
6405   shlibpath_var=LD_LIBRARY_PATH
6406   case $host_vendor in
6407     sni)
6408       shlibpath_overrides_runpath=no
6409       need_lib_prefix=no
6410       export_dynamic_flag_spec='${wl}-Blargedynsym'
6411       runpath_var=LD_RUN_PATH
6412       ;;
6413     siemens)
6414       need_lib_prefix=no
6415       ;;
6416     motorola)
6417       need_lib_prefix=no
6418       need_version=no
6419       shlibpath_overrides_runpath=no
6420       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6421       ;;
6422   esac
6423   ;;
6424
6425 uts4*)
6426   version_type=linux
6427   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6428   soname_spec='${libname}${release}.so$major'
6429   shlibpath_var=LD_LIBRARY_PATH
6430   ;;
6431
6432 dgux*)
6433   version_type=linux
6434   need_lib_prefix=no
6435   need_version=no
6436   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6437   soname_spec='${libname}${release}.so$major'
6438   shlibpath_var=LD_LIBRARY_PATH
6439   ;;
6440
6441 sysv4*MP*)
6442   if test -d /usr/nec ;then
6443     version_type=linux
6444     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6445     soname_spec='$libname.so.$major'
6446     shlibpath_var=LD_LIBRARY_PATH
6447   fi
6448   ;;
6449
6450 *)
6451   dynamic_linker=no
6452   ;;
6453 esac
6454 echo "$ac_t""$dynamic_linker" 1>&6
6455 test "$dynamic_linker" = no && can_build_shared=no
6456
6457 # Report the final consequences.
6458 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6459 echo "configure:6458: checking if libtool supports shared libraries" >&5
6460 echo "$ac_t""$can_build_shared" 1>&6
6461
6462 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6463 echo "configure:6462: checking whether to build shared libraries" >&5
6464 test "$can_build_shared" = "no" && enable_shared=no
6465
6466 # On AIX, shared libraries and static libraries use the same namespace, and
6467 # are all built from PIC.
6468 case "$host_os" in
6469 aix3*)
6470   test "$enable_shared" = yes && enable_static=no
6471   if test -n "$RANLIB"; then
6472     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6473     postinstall_cmds='$RANLIB $lib'
6474   fi
6475   ;;
6476
6477 aix4*)
6478   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6479     test "$enable_shared" = yes && enable_static=no
6480   fi
6481   ;;
6482 esac
6483 echo "$ac_t""$enable_shared" 1>&6
6484
6485 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6486 echo "configure:6485: checking whether to build static libraries" >&5
6487 # Make sure either enable_shared or enable_static is yes.
6488 test "$enable_shared" = yes || enable_static=yes
6489 echo "$ac_t""$enable_static" 1>&6
6490
6491 if test "$hardcode_action" = relink; then
6492   # Fast installation is not supported
6493   enable_fast_install=no
6494 elif test "$shlibpath_overrides_runpath" = yes ||
6495      test "$enable_shared" = no; then
6496   # Fast installation is not necessary
6497   enable_fast_install=needless
6498 fi
6499
6500 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6501 if test "$GCC" = yes; then
6502   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6503 fi
6504
6505 if test "x$enable_dlopen" != xyes; then
6506   enable_dlopen=unknown
6507   enable_dlopen_self=unknown
6508   enable_dlopen_self_static=unknown
6509 else
6510   lt_cv_dlopen=no
6511   lt_cv_dlopen_libs=
6512
6513   case $host_os in
6514   beos*)
6515     lt_cv_dlopen="load_add_on"
6516     lt_cv_dlopen_libs=
6517     lt_cv_dlopen_self=yes
6518     ;;
6519
6520   cygwin* | mingw* | pw32*)
6521     lt_cv_dlopen="LoadLibrary"
6522     lt_cv_dlopen_libs=
6523    ;;
6524
6525   *)
6526     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6527 echo "configure:6526: checking for dllload" >&5
6528 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6529   echo $ac_n "(cached) $ac_c" 1>&6
6530 else
6531   cat > conftest.$ac_ext <<EOF
6532 #line 6531 "configure"
6533 #include "confdefs.h"
6534 /* System header to define __stub macros and hopefully few prototypes,
6535     which can conflict with char dllload(); below.  */
6536 #include <assert.h>
6537 /* Override any gcc2 internal prototype to avoid an error.  */
6538 /* We use char because int might match the return type of a gcc2
6539     builtin and then its argument prototype would still apply.  */
6540 char dllload();
6541 char (*f)();
6542
6543 int main() {
6544
6545 /* The GNU C library defines this for functions which it implements
6546     to always fail with ENOSYS.  Some functions are actually named
6547     something starting with __ and the normal name is an alias.  */
6548 #if defined (__stub_dllload) || defined (__stub___dllload)
6549 choke me
6550 #else
6551 f = dllload;
6552 #endif
6553
6554 ; return 0; }
6555 EOF
6556 if { (eval echo configure:6555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6557   rm -rf conftest*
6558   eval "ac_cv_func_dllload=yes"
6559 else
6560   echo "configure: failed program was:" >&5
6561   cat conftest.$ac_ext >&5
6562   rm -rf conftest*
6563   eval "ac_cv_func_dllload=no"
6564 fi
6565 rm -f conftest*
6566 fi
6567
6568 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6569   echo "$ac_t""yes" 1>&6
6570   lt_cv_dlopen="dllload"
6571 else
6572   echo "$ac_t""no" 1>&6
6573 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6574 echo "configure:6573: checking for shl_load" >&5
6575 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6576   echo $ac_n "(cached) $ac_c" 1>&6
6577 else
6578   cat > conftest.$ac_ext <<EOF
6579 #line 6578 "configure"
6580 #include "confdefs.h"
6581 /* System header to define __stub macros and hopefully few prototypes,
6582     which can conflict with char shl_load(); below.  */
6583 #include <assert.h>
6584 /* Override any gcc2 internal prototype to avoid an error.  */
6585 /* We use char because int might match the return type of a gcc2
6586     builtin and then its argument prototype would still apply.  */
6587 char shl_load();
6588 char (*f)();
6589
6590 int main() {
6591
6592 /* The GNU C library defines this for functions which it implements
6593     to always fail with ENOSYS.  Some functions are actually named
6594     something starting with __ and the normal name is an alias.  */
6595 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6596 choke me
6597 #else
6598 f = shl_load;
6599 #endif
6600
6601 ; return 0; }
6602 EOF
6603 if { (eval echo configure:6602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6604   rm -rf conftest*
6605   eval "ac_cv_func_shl_load=yes"
6606 else
6607   echo "configure: failed program was:" >&5
6608   cat conftest.$ac_ext >&5
6609   rm -rf conftest*
6610   eval "ac_cv_func_shl_load=no"
6611 fi
6612 rm -f conftest*
6613 fi
6614
6615 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6616   echo "$ac_t""yes" 1>&6
6617   lt_cv_dlopen="shl_load"
6618 else
6619   echo "$ac_t""no" 1>&6
6620 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6621 echo "configure:6620: checking for shl_load in -ldld" >&5
6622 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6623 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6624   echo $ac_n "(cached) $ac_c" 1>&6
6625 else
6626   ac_save_LIBS="$LIBS"
6627 LIBS="-ldld  $LIBS"
6628 cat > conftest.$ac_ext <<EOF
6629 #line 6628 "configure"
6630 #include "confdefs.h"
6631 /* Override any gcc2 internal prototype to avoid an error.  */
6632 /* We use char because int might match the return type of a gcc2
6633     builtin and then its argument prototype would still apply.  */
6634 char shl_load();
6635
6636 int main() {
6637 shl_load()
6638 ; return 0; }
6639 EOF
6640 if { (eval echo configure:6639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6641   rm -rf conftest*
6642   eval "ac_cv_lib_$ac_lib_var=yes"
6643 else
6644   echo "configure: failed program was:" >&5
6645   cat conftest.$ac_ext >&5
6646   rm -rf conftest*
6647   eval "ac_cv_lib_$ac_lib_var=no"
6648 fi
6649 rm -f conftest*
6650 LIBS="$ac_save_LIBS"
6651
6652 fi
6653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6654   echo "$ac_t""yes" 1>&6
6655   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6656 else
6657   echo "$ac_t""no" 1>&6
6658 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6659 echo "configure:6658: checking for dlopen" >&5
6660 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6661   echo $ac_n "(cached) $ac_c" 1>&6
6662 else
6663   cat > conftest.$ac_ext <<EOF
6664 #line 6663 "configure"
6665 #include "confdefs.h"
6666 /* System header to define __stub macros and hopefully few prototypes,
6667     which can conflict with char dlopen(); below.  */
6668 #include <assert.h>
6669 /* Override any gcc2 internal prototype to avoid an error.  */
6670 /* We use char because int might match the return type of a gcc2
6671     builtin and then its argument prototype would still apply.  */
6672 char dlopen();
6673 char (*f)();
6674
6675 int main() {
6676
6677 /* The GNU C library defines this for functions which it implements
6678     to always fail with ENOSYS.  Some functions are actually named
6679     something starting with __ and the normal name is an alias.  */
6680 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6681 choke me
6682 #else
6683 f = dlopen;
6684 #endif
6685
6686 ; return 0; }
6687 EOF
6688 if { (eval echo configure:6687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6689   rm -rf conftest*
6690   eval "ac_cv_func_dlopen=yes"
6691 else
6692   echo "configure: failed program was:" >&5
6693   cat conftest.$ac_ext >&5
6694   rm -rf conftest*
6695   eval "ac_cv_func_dlopen=no"
6696 fi
6697 rm -f conftest*
6698 fi
6699
6700 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6701   echo "$ac_t""yes" 1>&6
6702   lt_cv_dlopen="dlopen"
6703 else
6704   echo "$ac_t""no" 1>&6
6705 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6706 echo "configure:6705: checking for dlopen in -ldl" >&5
6707 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6708 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6709   echo $ac_n "(cached) $ac_c" 1>&6
6710 else
6711   ac_save_LIBS="$LIBS"
6712 LIBS="-ldl  $LIBS"
6713 cat > conftest.$ac_ext <<EOF
6714 #line 6713 "configure"
6715 #include "confdefs.h"
6716 /* Override any gcc2 internal prototype to avoid an error.  */
6717 /* We use char because int might match the return type of a gcc2
6718     builtin and then its argument prototype would still apply.  */
6719 char dlopen();
6720
6721 int main() {
6722 dlopen()
6723 ; return 0; }
6724 EOF
6725 if { (eval echo configure:6724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6726   rm -rf conftest*
6727   eval "ac_cv_lib_$ac_lib_var=yes"
6728 else
6729   echo "configure: failed program was:" >&5
6730   cat conftest.$ac_ext >&5
6731   rm -rf conftest*
6732   eval "ac_cv_lib_$ac_lib_var=no"
6733 fi
6734 rm -f conftest*
6735 LIBS="$ac_save_LIBS"
6736
6737 fi
6738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6739   echo "$ac_t""yes" 1>&6
6740   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6741 else
6742   echo "$ac_t""no" 1>&6
6743 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6744 echo "configure:6743: checking for dlopen in -lsvld" >&5
6745 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6746 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6747   echo $ac_n "(cached) $ac_c" 1>&6
6748 else
6749   ac_save_LIBS="$LIBS"
6750 LIBS="-lsvld  $LIBS"
6751 cat > conftest.$ac_ext <<EOF
6752 #line 6751 "configure"
6753 #include "confdefs.h"
6754 /* Override any gcc2 internal prototype to avoid an error.  */
6755 /* We use char because int might match the return type of a gcc2
6756     builtin and then its argument prototype would still apply.  */
6757 char dlopen();
6758
6759 int main() {
6760 dlopen()
6761 ; return 0; }
6762 EOF
6763 if { (eval echo configure:6762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6764   rm -rf conftest*
6765   eval "ac_cv_lib_$ac_lib_var=yes"
6766 else
6767   echo "configure: failed program was:" >&5
6768   cat conftest.$ac_ext >&5
6769   rm -rf conftest*
6770   eval "ac_cv_lib_$ac_lib_var=no"
6771 fi
6772 rm -f conftest*
6773 LIBS="$ac_save_LIBS"
6774
6775 fi
6776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6777   echo "$ac_t""yes" 1>&6
6778   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6779 else
6780   echo "$ac_t""no" 1>&6
6781 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6782 echo "configure:6781: checking for dld_link in -ldld" >&5
6783 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6784 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6785   echo $ac_n "(cached) $ac_c" 1>&6
6786 else
6787   ac_save_LIBS="$LIBS"
6788 LIBS="-ldld  $LIBS"
6789 cat > conftest.$ac_ext <<EOF
6790 #line 6789 "configure"
6791 #include "confdefs.h"
6792 /* Override any gcc2 internal prototype to avoid an error.  */
6793 /* We use char because int might match the return type of a gcc2
6794     builtin and then its argument prototype would still apply.  */
6795 char dld_link();
6796
6797 int main() {
6798 dld_link()
6799 ; return 0; }
6800 EOF
6801 if { (eval echo configure:6800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6802   rm -rf conftest*
6803   eval "ac_cv_lib_$ac_lib_var=yes"
6804 else
6805   echo "configure: failed program was:" >&5
6806   cat conftest.$ac_ext >&5
6807   rm -rf conftest*
6808   eval "ac_cv_lib_$ac_lib_var=no"
6809 fi
6810 rm -f conftest*
6811 LIBS="$ac_save_LIBS"
6812
6813 fi
6814 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6815   echo "$ac_t""yes" 1>&6
6816   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6817 else
6818   echo "$ac_t""no" 1>&6
6819 fi
6820
6821               
6822 fi
6823
6824             
6825 fi
6826
6827           
6828 fi
6829
6830         
6831 fi
6832
6833       
6834 fi
6835
6836     
6837 fi
6838
6839     ;;
6840   esac
6841
6842   if test "x$lt_cv_dlopen" != xno; then
6843     enable_dlopen=yes
6844   else
6845     enable_dlopen=no
6846   fi
6847
6848   case $lt_cv_dlopen in
6849   dlopen)
6850     save_CPPFLAGS="$CPPFLAGS"
6851         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6852
6853     save_LDFLAGS="$LDFLAGS"
6854     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6855
6856     save_LIBS="$LIBS"
6857     LIBS="$lt_cv_dlopen_libs $LIBS"
6858
6859     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6860 echo "configure:6859: checking whether a program can dlopen itself" >&5
6861 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6862   echo $ac_n "(cached) $ac_c" 1>&6
6863 else
6864           if test "$cross_compiling" = yes; then :
6865   lt_cv_dlopen_self=cross
6866 else
6867     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6868   lt_status=$lt_dlunknown
6869   cat > conftest.$ac_ext <<EOF
6870 #line 6869 "configure"
6871 #include "confdefs.h"
6872
6873 #if HAVE_DLFCN_H
6874 #include <dlfcn.h>
6875 #endif
6876
6877 #include <stdio.h>
6878
6879 #ifdef RTLD_GLOBAL
6880 #  define LT_DLGLOBAL           RTLD_GLOBAL
6881 #else
6882 #  ifdef DL_GLOBAL
6883 #    define LT_DLGLOBAL         DL_GLOBAL
6884 #  else
6885 #    define LT_DLGLOBAL         0
6886 #  endif
6887 #endif
6888
6889 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6890    find out it does not work in some platform. */
6891 #ifndef LT_DLLAZY_OR_NOW
6892 #  ifdef RTLD_LAZY
6893 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6894 #  else
6895 #    ifdef DL_LAZY
6896 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6897 #    else
6898 #      ifdef RTLD_NOW
6899 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6900 #      else
6901 #        ifdef DL_NOW
6902 #          define LT_DLLAZY_OR_NOW      DL_NOW
6903 #        else
6904 #          define LT_DLLAZY_OR_NOW      0
6905 #        endif
6906 #      endif
6907 #    endif
6908 #  endif
6909 #endif
6910
6911 #ifdef __cplusplus
6912 extern "C" void exit (int);
6913 #endif
6914
6915 void fnord() { int i=42;}
6916 int main ()
6917 {
6918   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6919   int status = $lt_dlunknown;
6920
6921   if (self)
6922     {
6923       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6924       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6925       /* dlclose (self); */
6926     }
6927
6928     exit (status);
6929 }
6930 EOF
6931   if { (eval echo configure:6930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6932     (./conftest; exit; ) 2>/dev/null
6933     lt_status=$?
6934     case x$lt_status in
6935       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6936       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6937       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6938     esac
6939   else :
6940     # compilation failed
6941     lt_cv_dlopen_self=no
6942   fi
6943 fi
6944 rm -fr conftest*
6945
6946     
6947 fi
6948
6949 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6950
6951     if test "x$lt_cv_dlopen_self" = xyes; then
6952       LDFLAGS="$LDFLAGS $link_static_flag"
6953       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6954 echo "configure:6953: checking whether a statically linked program can dlopen itself" >&5
6955 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6956   echo $ac_n "(cached) $ac_c" 1>&6
6957 else
6958           if test "$cross_compiling" = yes; then :
6959   lt_cv_dlopen_self_static=cross
6960 else
6961     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6962   lt_status=$lt_dlunknown
6963   cat > conftest.$ac_ext <<EOF
6964 #line 6963 "configure"
6965 #include "confdefs.h"
6966
6967 #if HAVE_DLFCN_H
6968 #include <dlfcn.h>
6969 #endif
6970
6971 #include <stdio.h>
6972
6973 #ifdef RTLD_GLOBAL
6974 #  define LT_DLGLOBAL           RTLD_GLOBAL
6975 #else
6976 #  ifdef DL_GLOBAL
6977 #    define LT_DLGLOBAL         DL_GLOBAL
6978 #  else
6979 #    define LT_DLGLOBAL         0
6980 #  endif
6981 #endif
6982
6983 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6984    find out it does not work in some platform. */
6985 #ifndef LT_DLLAZY_OR_NOW
6986 #  ifdef RTLD_LAZY
6987 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6988 #  else
6989 #    ifdef DL_LAZY
6990 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6991 #    else
6992 #      ifdef RTLD_NOW
6993 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6994 #      else
6995 #        ifdef DL_NOW
6996 #          define LT_DLLAZY_OR_NOW      DL_NOW
6997 #        else
6998 #          define LT_DLLAZY_OR_NOW      0
6999 #        endif
7000 #      endif
7001 #    endif
7002 #  endif
7003 #endif
7004
7005 #ifdef __cplusplus
7006 extern "C" void exit (int);
7007 #endif
7008
7009 void fnord() { int i=42;}
7010 int main ()
7011 {
7012   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7013   int status = $lt_dlunknown;
7014
7015   if (self)
7016     {
7017       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7018       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7019       /* dlclose (self); */
7020     }
7021
7022     exit (status);
7023 }
7024 EOF
7025   if { (eval echo configure:7024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7026     (./conftest; exit; ) 2>/dev/null
7027     lt_status=$?
7028     case x$lt_status in
7029       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7030       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7031       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7032     esac
7033   else :
7034     # compilation failed
7035     lt_cv_dlopen_self_static=no
7036   fi
7037 fi
7038 rm -fr conftest*
7039
7040       
7041 fi
7042
7043 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7044     fi
7045
7046     CPPFLAGS="$save_CPPFLAGS"
7047     LDFLAGS="$save_LDFLAGS"
7048     LIBS="$save_LIBS"
7049     ;;
7050   esac
7051
7052   case $lt_cv_dlopen_self in
7053   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7054   *) enable_dlopen_self=unknown ;;
7055   esac
7056
7057   case $lt_cv_dlopen_self_static in
7058   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7059   *) enable_dlopen_self_static=unknown ;;
7060   esac
7061 fi
7062
7063
7064 if test "$enable_shared" = yes && test "$GCC" = yes; then
7065   case $archive_cmds in
7066   *'~'*)
7067     # FIXME: we may have to deal with multi-command sequences.
7068     ;;
7069   '$CC '*)
7070     # Test whether the compiler implicitly links with -lc since on some
7071     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7072     # to ld, don't add -lc before -lgcc.
7073     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7074 echo "configure:7073: checking whether -lc should be explicitly linked in" >&5
7075     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7076   echo $ac_n "(cached) $ac_c" 1>&6
7077 else
7078   $rm conftest*
7079     echo 'static int dummy;' > conftest.$ac_ext
7080
7081     if { (eval echo configure:7080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7082       soname=conftest
7083       lib=conftest
7084       libobjs=conftest.$ac_objext
7085       deplibs=
7086       wl=$lt_cv_prog_cc_wl
7087       compiler_flags=-v
7088       linker_flags=-v
7089       verstring=
7090       output_objdir=.
7091       libname=conftest
7092       save_allow_undefined_flag=$allow_undefined_flag
7093       allow_undefined_flag=
7094       if { (eval echo configure:7093: \"$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; }
7095       then
7096         lt_cv_archive_cmds_need_lc=no
7097       else
7098         lt_cv_archive_cmds_need_lc=yes
7099       fi
7100       allow_undefined_flag=$save_allow_undefined_flag
7101     else
7102       cat conftest.err 1>&5
7103     fi
7104 fi
7105
7106     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7107     ;;
7108   esac
7109 fi
7110 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7111
7112 # The second clause should only fire when bootstrapping the
7113 # libtool distribution, otherwise you forgot to ship ltmain.sh
7114 # with your package, and you will get complaints that there are
7115 # no rules to generate ltmain.sh.
7116 if test -f "$ltmain"; then
7117   :
7118 else
7119   # If there is no Makefile yet, we rely on a make rule to execute
7120   # `config.status --recheck' to rerun these tests and create the
7121   # libtool script then.
7122   test -f Makefile && make "$ltmain"
7123 fi
7124
7125 if test -f "$ltmain"; then
7126   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7127   $rm -f "${ofile}T"
7128
7129   echo creating $ofile
7130
7131   # Now quote all the things that may contain metacharacters while being
7132   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7133   # variables and quote the copies for generation of the libtool script.
7134   for var in echo old_CC old_CFLAGS SED \
7135     AR AR_FLAGS CC LD LN_S NM SHELL \
7136     reload_flag reload_cmds wl \
7137     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7138     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7139     library_names_spec soname_spec \
7140     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7141     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7142     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7143     old_striplib striplib file_magic_cmd export_symbols_cmds \
7144     deplibs_check_method allow_undefined_flag no_undefined_flag \
7145     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7146     global_symbol_to_c_name_address \
7147     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7148     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7149     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7150
7151     case $var in
7152     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7153     old_postinstall_cmds | old_postuninstall_cmds | \
7154     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7155     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7156     postinstall_cmds | postuninstall_cmds | \
7157     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7158       # Double-quote double-evaled strings.
7159       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7160       ;;
7161     *)
7162       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7163       ;;
7164     esac
7165   done
7166
7167   cat <<__EOF__ > "${ofile}T"
7168 #! $SHELL
7169
7170 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7171 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7172 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7173 #
7174 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7175 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7176 #
7177 # This program is free software; you can redistribute it and/or modify
7178 # it under the terms of the GNU General Public License as published by
7179 # the Free Software Foundation; either version 2 of the License, or
7180 # (at your option) any later version.
7181 #
7182 # This program is distributed in the hope that it will be useful, but
7183 # WITHOUT ANY WARRANTY; without even the implied warranty of
7184 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7185 # General Public License for more details.
7186 #
7187 # You should have received a copy of the GNU General Public License
7188 # along with this program; if not, write to the Free Software
7189 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7190 #
7191 # As a special exception to the GNU General Public License, if you
7192 # distribute this file as part of a program that contains a
7193 # configuration script generated by Autoconf, you may include it under
7194 # the same distribution terms that you use for the rest of that program.
7195
7196 # A sed that does not truncate output.
7197 SED=$lt_SED
7198
7199 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7200 Xsed="${SED} -e s/^X//"
7201
7202 # The HP-UX ksh and POSIX shell print the target directory to stdout
7203 # if CDPATH is set.
7204 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7205
7206 # ### BEGIN LIBTOOL CONFIG
7207
7208 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7209
7210 # Shell to use when invoking shell scripts.
7211 SHELL=$lt_SHELL
7212
7213 # Whether or not to build shared libraries.
7214 build_libtool_libs=$enable_shared
7215
7216 # Whether or not to build static libraries.
7217 build_old_libs=$enable_static
7218
7219 # Whether or not to add -lc for building shared libraries.
7220 build_libtool_need_lc=$need_lc
7221
7222 # Whether or not to optimize for fast installation.
7223 fast_install=$enable_fast_install
7224
7225 # The host system.
7226 host_alias=$host_alias
7227 host=$host
7228
7229 # An echo program that does not interpret backslashes.
7230 echo=$lt_echo
7231
7232 # The archiver.
7233 AR=$lt_AR
7234 AR_FLAGS=$lt_AR_FLAGS
7235
7236 # The default C compiler.
7237 CC=$lt_CC
7238
7239 # Is the compiler the GNU C compiler?
7240 with_gcc=$GCC
7241
7242 # The linker used to build libraries.
7243 LD=$lt_LD
7244
7245 # Whether we need hard or soft links.
7246 LN_S=$lt_LN_S
7247
7248 # A BSD-compatible nm program.
7249 NM=$lt_NM
7250
7251 # A symbol stripping program
7252 STRIP=$STRIP
7253
7254 # Used to examine libraries when file_magic_cmd begins "file"
7255 MAGIC_CMD=$MAGIC_CMD
7256
7257 # Used on cygwin: DLL creation program.
7258 DLLTOOL="$DLLTOOL"
7259
7260 # Used on cygwin: object dumper.
7261 OBJDUMP="$OBJDUMP"
7262
7263 # Used on cygwin: assembler.
7264 AS="$AS"
7265
7266 # The name of the directory that contains temporary libtool files.
7267 objdir=$objdir
7268
7269 # How to create reloadable object files.
7270 reload_flag=$lt_reload_flag
7271 reload_cmds=$lt_reload_cmds
7272
7273 # How to pass a linker flag through the compiler.
7274 wl=$lt_wl
7275
7276 # Object file suffix (normally "o").
7277 objext="$ac_objext"
7278
7279 # Old archive suffix (normally "a").
7280 libext="$libext"
7281
7282 # Executable file suffix (normally "").
7283 exeext="$exeext"
7284
7285 # Additional compiler flags for building library objects.
7286 pic_flag=$lt_pic_flag
7287 pic_mode=$pic_mode
7288
7289 # Does compiler simultaneously support -c and -o options?
7290 compiler_c_o=$lt_compiler_c_o
7291
7292 # Can we write directly to a .lo ?
7293 compiler_o_lo=$lt_compiler_o_lo
7294
7295 # Must we lock files when doing compilation ?
7296 need_locks=$lt_need_locks
7297
7298 # Do we need the lib prefix for modules?
7299 need_lib_prefix=$need_lib_prefix
7300
7301 # Do we need a version for libraries?
7302 need_version=$need_version
7303
7304 # Whether dlopen is supported.
7305 dlopen_support=$enable_dlopen
7306
7307 # Whether dlopen of programs is supported.
7308 dlopen_self=$enable_dlopen_self
7309
7310 # Whether dlopen of statically linked programs is supported.
7311 dlopen_self_static=$enable_dlopen_self_static
7312
7313 # Compiler flag to prevent dynamic linking.
7314 link_static_flag=$lt_link_static_flag
7315
7316 # Compiler flag to turn off builtin functions.
7317 no_builtin_flag=$lt_no_builtin_flag
7318
7319 # Compiler flag to allow reflexive dlopens.
7320 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7321
7322 # Compiler flag to generate shared objects directly from archives.
7323 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7324
7325 # Compiler flag to generate thread-safe objects.
7326 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7327
7328 # Library versioning type.
7329 version_type=$version_type
7330
7331 # Format of library name prefix.
7332 libname_spec=$lt_libname_spec
7333
7334 # List of archive names.  First name is the real one, the rest are links.
7335 # The last name is the one that the linker finds with -lNAME.
7336 library_names_spec=$lt_library_names_spec
7337
7338 # The coded name of the library, if different from the real name.
7339 soname_spec=$lt_soname_spec
7340
7341 # Commands used to build and install an old-style archive.
7342 RANLIB=$lt_RANLIB
7343 old_archive_cmds=$lt_old_archive_cmds
7344 old_postinstall_cmds=$lt_old_postinstall_cmds
7345 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7346
7347 # Create an old-style archive from a shared archive.
7348 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7349
7350 # Create a temporary old-style archive to link instead of a shared archive.
7351 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7352
7353 # Commands used to build and install a shared archive.
7354 archive_cmds=$lt_archive_cmds
7355 archive_expsym_cmds=$lt_archive_expsym_cmds
7356 postinstall_cmds=$lt_postinstall_cmds
7357 postuninstall_cmds=$lt_postuninstall_cmds
7358
7359 # Commands to strip libraries.
7360 old_striplib=$lt_old_striplib
7361 striplib=$lt_striplib
7362
7363 # Method to check whether dependent libraries are shared objects.
7364 deplibs_check_method=$lt_deplibs_check_method
7365
7366 # Command to use when deplibs_check_method == file_magic.
7367 file_magic_cmd=$lt_file_magic_cmd
7368
7369 # Flag that allows shared libraries with undefined symbols to be built.
7370 allow_undefined_flag=$lt_allow_undefined_flag
7371
7372 # Flag that forces no undefined symbols.
7373 no_undefined_flag=$lt_no_undefined_flag
7374
7375 # Commands used to finish a libtool library installation in a directory.
7376 finish_cmds=$lt_finish_cmds
7377
7378 # Same as above, but a single script fragment to be evaled but not shown.
7379 finish_eval=$lt_finish_eval
7380
7381 # Take the output of nm and produce a listing of raw symbols and C names.
7382 global_symbol_pipe=$lt_global_symbol_pipe
7383
7384 # Transform the output of nm in a proper C declaration
7385 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7386
7387 # Transform the output of nm in a C name address pair
7388 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7389
7390 # This is the shared library runtime path variable.
7391 runpath_var=$runpath_var
7392
7393 # This is the shared library path variable.
7394 shlibpath_var=$shlibpath_var
7395
7396 # Is shlibpath searched before the hard-coded library search path?
7397 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7398
7399 # How to hardcode a shared library path into an executable.
7400 hardcode_action=$hardcode_action
7401
7402 # Whether we should hardcode library paths into libraries.
7403 hardcode_into_libs=$hardcode_into_libs
7404
7405 # Flag to hardcode \$libdir into a binary during linking.
7406 # This must work even if \$libdir does not exist.
7407 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7408
7409 # Whether we need a single -rpath flag with a separated argument.
7410 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7411
7412 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7413 # resulting binary.
7414 hardcode_direct=$hardcode_direct
7415
7416 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7417 # resulting binary.
7418 hardcode_minus_L=$hardcode_minus_L
7419
7420 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7421 # the resulting binary.
7422 hardcode_shlibpath_var=$hardcode_shlibpath_var
7423
7424 # Variables whose values should be saved in libtool wrapper scripts and
7425 # restored at relink time.
7426 variables_saved_for_relink="$variables_saved_for_relink"
7427
7428 # Whether libtool must link a program against all its dependency libraries.
7429 link_all_deplibs=$link_all_deplibs
7430
7431 # Compile-time system search path for libraries
7432 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7433
7434 # Run-time system search path for libraries
7435 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7436
7437 # Fix the shell variable \$srcfile for the compiler.
7438 fix_srcfile_path="$fix_srcfile_path"
7439
7440 # Set to yes if exported symbols are required.
7441 always_export_symbols=$always_export_symbols
7442
7443 # The commands to list exported symbols.
7444 export_symbols_cmds=$lt_export_symbols_cmds
7445
7446 # The commands to extract the exported symbol list from a shared archive.
7447 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7448
7449 # Symbols that should not be listed in the preloaded symbols.
7450 exclude_expsyms=$lt_exclude_expsyms
7451
7452 # Symbols that must always be exported.
7453 include_expsyms=$lt_include_expsyms
7454
7455 # ### END LIBTOOL CONFIG
7456
7457 __EOF__
7458
7459   case $host_os in
7460   aix3*)
7461     cat <<\EOF >> "${ofile}T"
7462
7463 # AIX sometimes has problems with the GCC collect2 program.  For some
7464 # reason, if we set the COLLECT_NAMES environment variable, the problems
7465 # vanish in a puff of smoke.
7466 if test "X${COLLECT_NAMES+set}" != Xset; then
7467   COLLECT_NAMES=
7468   export COLLECT_NAMES
7469 fi
7470 EOF
7471     ;;
7472   esac
7473
7474   case $host_os in
7475   cygwin* | mingw* | pw32* | os2*)
7476     cat <<'EOF' >> "${ofile}T"
7477       # This is a source program that is used to create dlls on Windows
7478       # Don't remove nor modify the starting and closing comments
7479 # /* ltdll.c starts here */
7480 # #define WIN32_LEAN_AND_MEAN
7481 # #include <windows.h>
7482 # #undef WIN32_LEAN_AND_MEAN
7483 # #include <stdio.h>
7484 #
7485 # #ifndef __CYGWIN__
7486 # #  ifdef __CYGWIN32__
7487 # #    define __CYGWIN__ __CYGWIN32__
7488 # #  endif
7489 # #endif
7490 #
7491 # #ifdef __cplusplus
7492 # extern "C" {
7493 # #endif
7494 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7495 # #ifdef __cplusplus
7496 # }
7497 # #endif
7498 #
7499 # #ifdef __CYGWIN__
7500 # #include <cygwin/cygwin_dll.h>
7501 # DECLARE_CYGWIN_DLL( DllMain );
7502 # #endif
7503 # HINSTANCE __hDllInstance_base;
7504 #
7505 # BOOL APIENTRY
7506 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7507 # {
7508 #   __hDllInstance_base = hInst;
7509 #   return TRUE;
7510 # }
7511 # /* ltdll.c ends here */
7512         # This is a source program that is used to create import libraries
7513         # on Windows for dlls which lack them. Don't remove nor modify the
7514         # starting and closing comments
7515 # /* impgen.c starts here */
7516 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7517 #
7518 #  This file is part of GNU libtool.
7519 #
7520 #  This program is free software; you can redistribute it and/or modify
7521 #  it under the terms of the GNU General Public License as published by
7522 #  the Free Software Foundation; either version 2 of the License, or
7523 #  (at your option) any later version.
7524 #
7525 #  This program is distributed in the hope that it will be useful,
7526 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7527 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7528 #  GNU General Public License for more details.
7529 #
7530 #  You should have received a copy of the GNU General Public License
7531 #  along with this program; if not, write to the Free Software
7532 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7533 #  */
7534 #
7535 # #include <stdio.h>            /* for printf() */
7536 # #include <unistd.h>           /* for open(), lseek(), read() */
7537 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7538 # #include <string.h>           /* for strdup() */
7539 #
7540 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7541 # #ifndef O_BINARY
7542 # #define O_BINARY 0
7543 # #endif
7544 #
7545 # static unsigned int
7546 # pe_get16 (fd, offset)
7547 #      int fd;
7548 #      int offset;
7549 # {
7550 #   unsigned char b[2];
7551 #   lseek (fd, offset, SEEK_SET);
7552 #   read (fd, b, 2);
7553 #   return b[0] + (b[1]<<8);
7554 # }
7555 #
7556 # static unsigned int
7557 # pe_get32 (fd, offset)
7558 #     int fd;
7559 #     int offset;
7560 # {
7561 #   unsigned char b[4];
7562 #   lseek (fd, offset, SEEK_SET);
7563 #   read (fd, b, 4);
7564 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7565 # }
7566 #
7567 # static unsigned int
7568 # pe_as32 (ptr)
7569 #      void *ptr;
7570 # {
7571 #   unsigned char *b = ptr;
7572 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7573 # }
7574 #
7575 # int
7576 # main (argc, argv)
7577 #     int argc;
7578 #     char *argv[];
7579 # {
7580 #     int dll;
7581 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7582 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7583 #     unsigned long name_rvas, nexp;
7584 #     unsigned char *expdata, *erva;
7585 #     char *filename, *dll_name;
7586 #
7587 #     filename = argv[1];
7588 #
7589 #     dll = open(filename, O_RDONLY|O_BINARY);
7590 #     if (dll < 1)
7591 #       return 1;
7592 #
7593 #     dll_name = filename;
7594 #
7595 #     for (i=0; filename[i]; i++)
7596 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7597 #           dll_name = filename + i +1;
7598 #
7599 #     pe_header_offset = pe_get32 (dll, 0x3c);
7600 #     opthdr_ofs = pe_header_offset + 4 + 20;
7601 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7602 #
7603 #     if (num_entries < 1) /* no exports */
7604 #       return 1;
7605 #
7606 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7607 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7608 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7609 #     secptr = (pe_header_offset + 4 + 20 +
7610 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7611 #
7612 #     expptr = 0;
7613 #     for (i = 0; i < nsections; i++)
7614 #     {
7615 #       char sname[8];
7616 #       unsigned long secptr1 = secptr + 40 * i;
7617 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7618 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7619 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7620 #       lseek(dll, secptr1, SEEK_SET);
7621 #       read(dll, sname, 8);
7622 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7623 #       {
7624 #           expptr = fptr + (export_rva - vaddr);
7625 #           if (export_rva + export_size > vaddr + vsize)
7626 #               export_size = vsize - (export_rva - vaddr);
7627 #           break;
7628 #       }
7629 #     }
7630 #
7631 #     expdata = (unsigned char*)malloc(export_size);
7632 #     lseek (dll, expptr, SEEK_SET);
7633 #     read (dll, expdata, export_size);
7634 #     erva = expdata - export_rva;
7635 #
7636 #     nexp = pe_as32 (expdata+24);
7637 #     name_rvas = pe_as32 (expdata+32);
7638 #
7639 #     printf ("EXPORTS\n");
7640 #     for (i = 0; i<nexp; i++)
7641 #     {
7642 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7643 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7644 #     }
7645 #
7646 #     return 0;
7647 # }
7648 # /* impgen.c ends here */
7649
7650 EOF
7651     ;;
7652   esac
7653
7654   # We use sed instead of cat because bash on DJGPP gets confused if
7655   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7656   # text mode, it properly converts lines to CR/LF.  This bash problem
7657   # is reportedly fixed, but why not run on old versions too?
7658   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7659
7660   mv -f "${ofile}T" "$ofile" || \
7661     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7662   chmod +x "$ofile"
7663 fi
7664
7665
7666
7667
7668
7669 # This can be used to rebuild libtool when needed
7670 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7671
7672 # Always use our own libtool.
7673 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7674
7675 # Prevent multiple expansion
7676
7677
7678
7679 ol_link_perl=no
7680 if test $ol_enable_perl != no ; then
7681         # Extract the first word of "perl", so it can be a program name with args.
7682 set dummy perl; ac_word=$2
7683 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7684 echo "configure:7683: checking for $ac_word" >&5
7685 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7686   echo $ac_n "(cached) $ac_c" 1>&6
7687 else
7688   case "$PERLBIN" in
7689   /*)
7690   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7691   ;;
7692   ?:/*)
7693   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7694   ;;
7695   *)
7696   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7697   ac_dummy="$PATH"
7698   for ac_dir in $ac_dummy; do 
7699     test -z "$ac_dir" && ac_dir=.
7700     if test -f $ac_dir/$ac_word; then
7701       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7702       break
7703     fi
7704   done
7705   IFS="$ac_save_ifs"
7706   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7707   ;;
7708 esac
7709 fi
7710 PERLBIN="$ac_cv_path_PERLBIN"
7711 if test -n "$PERLBIN"; then
7712   echo "$ac_t""$PERLBIN" 1>&6
7713 else
7714   echo "$ac_t""no" 1>&6
7715 fi
7716
7717
7718         if test "no$PERLBIN" = "no" ; then
7719                 if test $ol_enable_perl = yes ; then
7720                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7721                 fi
7722
7723         else
7724                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7725                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7726
7727                 if test x"$ol_enable_perl" = "xyes" ; then
7728                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7729                 else
7730                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7731                 fi
7732                                 ol_link_perl=yes
7733         fi
7734 fi
7735
7736 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7737 echo "configure:7736: checking how to run the C preprocessor" >&5
7738 # On Suns, sometimes $CPP names a directory.
7739 if test -n "$CPP" && test -d "$CPP"; then
7740   CPP=
7741 fi
7742 if test -z "$CPP"; then
7743 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7744   echo $ac_n "(cached) $ac_c" 1>&6
7745 else
7746     # This must be in double quotes, not single quotes, because CPP may get
7747   # substituted into the Makefile and "${CC-cc}" will confuse make.
7748   CPP="${CC-cc} -E"
7749   # On the NeXT, cc -E runs the code through the compiler's parser,
7750   # not just through cpp.
7751   cat > conftest.$ac_ext <<EOF
7752 #line 7751 "configure"
7753 #include "confdefs.h"
7754 #include <assert.h>
7755 Syntax Error
7756 EOF
7757 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7758 { (eval echo configure:7757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7759 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7760 if test -z "$ac_err"; then
7761   :
7762 else
7763   echo "$ac_err" >&5
7764   echo "configure: failed program was:" >&5
7765   cat conftest.$ac_ext >&5
7766   rm -rf conftest*
7767   CPP="${CC-cc} -E -traditional-cpp"
7768   cat > conftest.$ac_ext <<EOF
7769 #line 7768 "configure"
7770 #include "confdefs.h"
7771 #include <assert.h>
7772 Syntax Error
7773 EOF
7774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7775 { (eval echo configure:7774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7777 if test -z "$ac_err"; then
7778   :
7779 else
7780   echo "$ac_err" >&5
7781   echo "configure: failed program was:" >&5
7782   cat conftest.$ac_ext >&5
7783   rm -rf conftest*
7784   CPP="${CC-cc} -nologo -E"
7785   cat > conftest.$ac_ext <<EOF
7786 #line 7785 "configure"
7787 #include "confdefs.h"
7788 #include <assert.h>
7789 Syntax Error
7790 EOF
7791 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7792 { (eval echo configure:7791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7793 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7794 if test -z "$ac_err"; then
7795   :
7796 else
7797   echo "$ac_err" >&5
7798   echo "configure: failed program was:" >&5
7799   cat conftest.$ac_ext >&5
7800   rm -rf conftest*
7801   CPP=/lib/cpp
7802 fi
7803 rm -f conftest*
7804 fi
7805 rm -f conftest*
7806 fi
7807 rm -f conftest*
7808   ac_cv_prog_CPP="$CPP"
7809 fi
7810   CPP="$ac_cv_prog_CPP"
7811 else
7812   ac_cv_prog_CPP="$CPP"
7813 fi
7814 echo "$ac_t""$CPP" 1>&6
7815
7816
7817
7818 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7819 echo "configure:7818: checking for Cygwin environment" >&5
7820 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7821   echo $ac_n "(cached) $ac_c" 1>&6
7822 else
7823   cat > conftest.$ac_ext <<EOF
7824 #line 7823 "configure"
7825 #include "confdefs.h"
7826
7827 int main() {
7828
7829 #ifndef __CYGWIN__
7830 #define __CYGWIN__ __CYGWIN32__
7831 #endif
7832 return __CYGWIN__;
7833 ; return 0; }
7834 EOF
7835 if { (eval echo configure:7834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7836   rm -rf conftest*
7837   ac_cv_cygwin=yes
7838 else
7839   echo "configure: failed program was:" >&5
7840   cat conftest.$ac_ext >&5
7841   rm -rf conftest*
7842   ac_cv_cygwin=no
7843 fi
7844 rm -f conftest*
7845 fi
7846
7847 echo "$ac_t""$ac_cv_cygwin" 1>&6
7848 CYGWIN=
7849 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7850 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7851 echo "configure:7850: checking for mingw32 environment" >&5
7852 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7853   echo $ac_n "(cached) $ac_c" 1>&6
7854 else
7855   cat > conftest.$ac_ext <<EOF
7856 #line 7855 "configure"
7857 #include "confdefs.h"
7858
7859 int main() {
7860 return __MINGW32__;
7861 ; return 0; }
7862 EOF
7863 if { (eval echo configure:7862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7864   rm -rf conftest*
7865   ac_cv_mingw32=yes
7866 else
7867   echo "configure: failed program was:" >&5
7868   cat conftest.$ac_ext >&5
7869   rm -rf conftest*
7870   ac_cv_mingw32=no
7871 fi
7872 rm -f conftest*
7873 fi
7874
7875 echo "$ac_t""$ac_cv_mingw32" 1>&6
7876 MINGW32=
7877 test "$ac_cv_mingw32" = yes && MINGW32=yes
7878
7879
7880
7881 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7882 echo "configure:7881: checking for executable suffix" >&5
7883 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7884   echo $ac_n "(cached) $ac_c" 1>&6
7885 else
7886   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7887   ac_cv_exeext=.exe
7888 else
7889   rm -f conftest*
7890   echo 'int main () { return 0; }' > conftest.$ac_ext
7891   ac_cv_exeext=
7892   if { (eval echo configure:7891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7893     for file in conftest.*; do
7894       case $file in
7895       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7896       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7897       esac
7898     done
7899   else
7900     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7901   fi
7902   rm -f conftest*
7903   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7904 fi
7905 fi
7906
7907 EXEEXT=""
7908 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7909 echo "$ac_t""${ac_cv_exeext}" 1>&6
7910 ac_exeext=$EXEEXT
7911
7912 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7913 echo "configure:7912: checking for object suffix" >&5
7914 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7915   echo $ac_n "(cached) $ac_c" 1>&6
7916 else
7917   rm -f conftest*
7918 echo 'int i = 1;' > conftest.$ac_ext
7919 if { (eval echo configure:7918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7920   for ac_file in conftest.*; do
7921     case $ac_file in
7922     *.c) ;;
7923     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7924     esac
7925   done
7926 else
7927   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7928 fi
7929 rm -f conftest*
7930 fi
7931
7932 echo "$ac_t""$ac_cv_objext" 1>&6
7933 OBJEXT=$ac_cv_objext
7934 ac_objext=$ac_cv_objext
7935
7936
7937 cat >> confdefs.h <<EOF
7938 #define EXEEXT "${EXEEXT}"
7939 EOF
7940
7941
7942 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7943 echo "configure:7942: checking for be_app in -lbe" >&5
7944 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7945 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7946   echo $ac_n "(cached) $ac_c" 1>&6
7947 else
7948   ac_save_LIBS="$LIBS"
7949 LIBS="-lbe -lroot -lnet $LIBS"
7950 cat > conftest.$ac_ext <<EOF
7951 #line 7950 "configure"
7952 #include "confdefs.h"
7953 /* Override any gcc2 internal prototype to avoid an error.  */
7954 /* We use char because int might match the return type of a gcc2
7955     builtin and then its argument prototype would still apply.  */
7956 char be_app();
7957
7958 int main() {
7959 be_app()
7960 ; return 0; }
7961 EOF
7962 if { (eval echo configure:7961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7963   rm -rf conftest*
7964   eval "ac_cv_lib_$ac_lib_var=yes"
7965 else
7966   echo "configure: failed program was:" >&5
7967   cat conftest.$ac_ext >&5
7968   rm -rf conftest*
7969   eval "ac_cv_lib_$ac_lib_var=no"
7970 fi
7971 rm -f conftest*
7972 LIBS="$ac_save_LIBS"
7973
7974 fi
7975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7976   echo "$ac_t""yes" 1>&6
7977   LIBS="$LIBS -lbe -lroot -lnet"
7978 else
7979   echo "$ac_t""no" 1>&6
7980 :
7981 fi
7982
7983
7984
7985
7986
7987 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
7988 echo "configure:7987: checking for ${CC-cc} option to accept ANSI C" >&5
7989 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
7990   echo $ac_n "(cached) $ac_c" 1>&6
7991 else
7992   am_cv_prog_cc_stdc=no
7993 ac_save_CC="$CC"
7994 # Don't try gcc -ansi; that turns off useful extensions and
7995 # breaks some systems' header files.
7996 # AIX                   -qlanglvl=ansi
7997 # Ultrix and OSF/1      -std1
7998 # HP-UX 10.20 and later -Ae
7999 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8000 # SVR4                  -Xc -D__EXTENSIONS__
8001 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8002 do
8003   CC="$ac_save_CC $ac_arg"
8004   cat > conftest.$ac_ext <<EOF
8005 #line 8004 "configure"
8006 #include "confdefs.h"
8007 #include <stdarg.h>
8008 #include <stdio.h>
8009 #include <sys/types.h>
8010 #include <sys/stat.h>
8011 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8012 struct buf { int x; };
8013 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8014 static char *e (p, i)
8015      char **p;
8016      int i;
8017 {
8018   return p[i];
8019 }
8020 static char *f (char * (*g) (char **, int), char **p, ...)
8021 {
8022   char *s;
8023   va_list v;
8024   va_start (v,p);
8025   s = g (p, va_arg (v,int));
8026   va_end (v);
8027   return s;
8028 }
8029 int test (int i, double x);
8030 struct s1 {int (*f) (int a);};
8031 struct s2 {int (*f) (double a);};
8032 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8033 int argc;
8034 char **argv;
8035
8036 int main() {
8037
8038 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8039
8040 ; return 0; }
8041 EOF
8042 if { (eval echo configure:8041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8043   rm -rf conftest*
8044   am_cv_prog_cc_stdc="$ac_arg"; break
8045 else
8046   echo "configure: failed program was:" >&5
8047   cat conftest.$ac_ext >&5
8048 fi
8049 rm -f conftest*
8050 done
8051 CC="$ac_save_CC"
8052
8053 fi
8054
8055 if test -z "$am_cv_prog_cc_stdc"; then
8056   echo "$ac_t""none needed" 1>&6
8057 else
8058   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8059 fi
8060 case "x$am_cv_prog_cc_stdc" in
8061   x|xno) ;;
8062   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8063 esac
8064
8065 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8066         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8067 fi
8068
8069 # test for make depend flag
8070 OL_MKDEP=
8071 OL_MKDEP_FLAGS=
8072 if test -z "${MKDEP}"; then
8073         OL_MKDEP="${CC-cc}"
8074         if test -z "${MKDEP_FLAGS}"; then
8075                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8076 echo "configure:8075: checking for ${OL_MKDEP} depend flag" >&5
8077 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8078   echo $ac_n "(cached) $ac_c" 1>&6
8079 else
8080   
8081                         ol_cv_mkdep=no
8082                         for flag in "-M" "-xM"; do
8083                                 cat > conftest.c <<EOF
8084  noCode;
8085 EOF
8086                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8087                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8088                                 then
8089                                         if test ! -f conftest."${ac_object}" ; then
8090                                                 ol_cv_mkdep=$flag
8091                                                 OL_MKDEP_FLAGS="$flag"
8092                                                 break
8093                                         fi
8094                                 fi
8095                         done
8096                         rm -f conftest*
8097                 
8098 fi
8099
8100 echo "$ac_t""$ol_cv_mkdep" 1>&6
8101         else
8102                 cc_cv_mkdep=yes
8103                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8104         fi
8105 else
8106         cc_cv_mkdep=yes
8107         OL_MKDEP="${MKDEP}"
8108         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8109 fi
8110
8111
8112
8113 if test "${ol_cv_mkdep}" = no ; then
8114         # this will soon become an error
8115         echo "configure: warning: do not know how to generate dependencies" 1>&2
8116 fi
8117
8118 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8119 echo "configure:8118: checking for afopen in -ls" >&5
8120 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8121 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8122   echo $ac_n "(cached) $ac_c" 1>&6
8123 else
8124   ac_save_LIBS="$LIBS"
8125 LIBS="-ls  $LIBS"
8126 cat > conftest.$ac_ext <<EOF
8127 #line 8126 "configure"
8128 #include "confdefs.h"
8129 /* Override any gcc2 internal prototype to avoid an error.  */
8130 /* We use char because int might match the return type of a gcc2
8131     builtin and then its argument prototype would still apply.  */
8132 char afopen();
8133
8134 int main() {
8135 afopen()
8136 ; return 0; }
8137 EOF
8138 if { (eval echo configure:8137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8139   rm -rf conftest*
8140   eval "ac_cv_lib_$ac_lib_var=yes"
8141 else
8142   echo "configure: failed program was:" >&5
8143   cat conftest.$ac_ext >&5
8144   rm -rf conftest*
8145   eval "ac_cv_lib_$ac_lib_var=no"
8146 fi
8147 rm -f conftest*
8148 LIBS="$ac_save_LIBS"
8149
8150 fi
8151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8152   echo "$ac_t""yes" 1>&6
8153   
8154         AUTH_LIBS=-ls
8155         cat >> confdefs.h <<\EOF
8156 #define HAVE_AIX_SECURITY 1
8157 EOF
8158
8159
8160 else
8161   echo "$ac_t""no" 1>&6
8162 fi
8163
8164
8165 case "$target" in
8166 *-ibm-openedition)
8167         ac_cv_func_getopt=no
8168         cat >> confdefs.h <<\EOF
8169 #define BOTH_STRINGS_H 1
8170 EOF
8171
8172         ;;
8173 esac
8174
8175 ol_link_modules=no
8176 if test $ol_enable_modules != no ; then
8177         for ac_hdr in ltdl.h
8178 do
8179 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8180 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8181 echo "configure:8180: checking for $ac_hdr" >&5
8182 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8183   echo $ac_n "(cached) $ac_c" 1>&6
8184 else
8185   cat > conftest.$ac_ext <<EOF
8186 #line 8185 "configure"
8187 #include "confdefs.h"
8188 #include <$ac_hdr>
8189 EOF
8190 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8191 { (eval echo configure:8190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8192 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8193 if test -z "$ac_err"; then
8194   rm -rf conftest*
8195   eval "ac_cv_header_$ac_safe=yes"
8196 else
8197   echo "$ac_err" >&5
8198   echo "configure: failed program was:" >&5
8199   cat conftest.$ac_ext >&5
8200   rm -rf conftest*
8201   eval "ac_cv_header_$ac_safe=no"
8202 fi
8203 rm -f conftest*
8204 fi
8205 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8206   echo "$ac_t""yes" 1>&6
8207     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8208   cat >> confdefs.h <<EOF
8209 #define $ac_tr_hdr 1
8210 EOF
8211  
8212 else
8213   echo "$ac_t""no" 1>&6
8214 fi
8215 done
8216
8217
8218         if test $ac_cv_header_ltdl_h = no ; then
8219                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8220         fi
8221
8222         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8223 echo "configure:8222: checking for lt_dlinit in -lltdl" >&5
8224 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8225 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8226   echo $ac_n "(cached) $ac_c" 1>&6
8227 else
8228   ac_save_LIBS="$LIBS"
8229 LIBS="-lltdl  $LIBS"
8230 cat > conftest.$ac_ext <<EOF
8231 #line 8230 "configure"
8232 #include "confdefs.h"
8233 /* Override any gcc2 internal prototype to avoid an error.  */
8234 /* We use char because int might match the return type of a gcc2
8235     builtin and then its argument prototype would still apply.  */
8236 char lt_dlinit();
8237
8238 int main() {
8239 lt_dlinit()
8240 ; return 0; }
8241 EOF
8242 if { (eval echo configure:8241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8243   rm -rf conftest*
8244   eval "ac_cv_lib_$ac_lib_var=yes"
8245 else
8246   echo "configure: failed program was:" >&5
8247   cat conftest.$ac_ext >&5
8248   rm -rf conftest*
8249   eval "ac_cv_lib_$ac_lib_var=no"
8250 fi
8251 rm -f conftest*
8252 LIBS="$ac_save_LIBS"
8253
8254 fi
8255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8256   echo "$ac_t""yes" 1>&6
8257   
8258                 MODULES_LIBS=-lltdl
8259                 cat >> confdefs.h <<\EOF
8260 #define HAVE_LIBLTDL 1
8261 EOF
8262
8263         
8264 else
8265   echo "$ac_t""no" 1>&6
8266 fi
8267
8268
8269         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8270                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8271         fi
8272         ol_link_modules=yes
8273
8274 else
8275         for i in $Backends; do
8276                 eval "ol_tmp=\$ol_enable_$i"
8277                 if test $ol_tmp = mod ; then
8278                         echo "configure: warning: building static $i backend" 1>&2
8279                         eval "ol_enable_$i=yes"
8280                 fi
8281         done
8282         for i in $Overlays; do
8283                 eval "ol_tmp=\$ol_enable_$i"
8284                 if test $ol_tmp = mod ; then
8285                         echo "configure: warning: building static $i overlay" 1>&2
8286                         eval "ol_enable_$i=yes"
8287                 fi
8288         done
8289 fi
8290
8291 # test for EBCDIC
8292 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8293 echo "configure:8292: checking for EBCDIC" >&5
8294 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8295   echo $ac_n "(cached) $ac_c" 1>&6
8296 else
8297   
8298         cat > conftest.$ac_ext <<EOF
8299 #line 8298 "configure"
8300 #include "confdefs.h"
8301
8302 #if !('M' == 0xd4)
8303 #include <__ASCII__/generate_error.h>
8304 #endif
8305
8306 EOF
8307 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8308 { (eval echo configure:8307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8309 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8310 if test -z "$ac_err"; then
8311   rm -rf conftest*
8312   ol_cv_cpp_ebcdic=yes
8313 else
8314   echo "$ac_err" >&5
8315   echo "configure: failed program was:" >&5
8316   cat conftest.$ac_ext >&5
8317   rm -rf conftest*
8318   ol_cv_cpp_ebcdic=no
8319 fi
8320 rm -f conftest*
8321 fi
8322
8323 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8324 if test $ol_cv_cpp_ebcdic = yes ; then
8325         cat >> confdefs.h <<\EOF
8326 #define HAVE_EBCDIC 1
8327 EOF
8328
8329 fi
8330
8331 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8332 echo "configure:8331: checking for ANSI C header files" >&5
8333 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8334   echo $ac_n "(cached) $ac_c" 1>&6
8335 else
8336   cat > conftest.$ac_ext <<EOF
8337 #line 8336 "configure"
8338 #include "confdefs.h"
8339 #include <stdlib.h>
8340 #include <stdarg.h>
8341 #include <string.h>
8342 #include <float.h>
8343 EOF
8344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8345 { (eval echo configure:8344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8347 if test -z "$ac_err"; then
8348   rm -rf conftest*
8349   ol_cv_header_stdc=yes
8350 else
8351   echo "$ac_err" >&5
8352   echo "configure: failed program was:" >&5
8353   cat conftest.$ac_ext >&5
8354   rm -rf conftest*
8355   ol_cv_header_stdc=no
8356 fi
8357 rm -f conftest*
8358
8359 if test $ol_cv_header_stdc = yes; then
8360   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8361 cat > conftest.$ac_ext <<EOF
8362 #line 8361 "configure"
8363 #include "confdefs.h"
8364 #include <string.h>
8365 EOF
8366 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8367   egrep "memchr" >/dev/null 2>&1; then
8368   :
8369 else
8370   rm -rf conftest*
8371   ol_cv_header_stdc=no
8372 fi
8373 rm -f conftest*
8374
8375 fi
8376
8377 if test $ol_cv_header_stdc = yes; then
8378   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8379 cat > conftest.$ac_ext <<EOF
8380 #line 8379 "configure"
8381 #include "confdefs.h"
8382 #include <stdlib.h>
8383 EOF
8384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8385   egrep "free" >/dev/null 2>&1; then
8386   :
8387 else
8388   rm -rf conftest*
8389   ol_cv_header_stdc=no
8390 fi
8391 rm -f conftest*
8392
8393 fi
8394
8395 if test $ol_cv_header_stdc = yes; then
8396   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8397 if test "$cross_compiling" = yes; then
8398   :
8399 else
8400   cat > conftest.$ac_ext <<EOF
8401 #line 8400 "configure"
8402 #include "confdefs.h"
8403 #include <ctype.h>
8404 #ifndef HAVE_EBCDIC
8405 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8406 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8407 #else
8408 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8409                 || ('j' <= (c) && (c) <= 'r') \
8410                 || ('s' <= (c) && (c) <= 'z'))
8411 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8412 #endif
8413 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8414 int main () { int i; for (i = 0; i < 256; i++)
8415 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8416 exit (0); }
8417
8418 EOF
8419 if { (eval echo configure:8418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8420 then
8421   :
8422 else
8423   echo "configure: failed program was:" >&5
8424   cat conftest.$ac_ext >&5
8425   rm -fr conftest*
8426   ol_cv_header_stdc=no
8427 fi
8428 rm -fr conftest*
8429 fi
8430
8431 fi
8432 fi
8433
8434 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8435 if test $ol_cv_header_stdc = yes; then
8436   cat >> confdefs.h <<\EOF
8437 #define STDC_HEADERS 1
8438 EOF
8439
8440 fi
8441 ac_cv_header_stdc=disable
8442
8443
8444 if test $ol_cv_header_stdc != yes; then
8445         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8446 fi
8447
8448 ac_header_dirent=no
8449 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8450 do
8451 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8452 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8453 echo "configure:8452: checking for $ac_hdr that defines DIR" >&5
8454 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8455   echo $ac_n "(cached) $ac_c" 1>&6
8456 else
8457   cat > conftest.$ac_ext <<EOF
8458 #line 8457 "configure"
8459 #include "confdefs.h"
8460 #include <sys/types.h>
8461 #include <$ac_hdr>
8462 int main() {
8463 DIR *dirp = 0;
8464 ; return 0; }
8465 EOF
8466 if { (eval echo configure:8465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8467   rm -rf conftest*
8468   eval "ac_cv_header_dirent_$ac_safe=yes"
8469 else
8470   echo "configure: failed program was:" >&5
8471   cat conftest.$ac_ext >&5
8472   rm -rf conftest*
8473   eval "ac_cv_header_dirent_$ac_safe=no"
8474 fi
8475 rm -f conftest*
8476 fi
8477 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8478   echo "$ac_t""yes" 1>&6
8479     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8480   cat >> confdefs.h <<EOF
8481 #define $ac_tr_hdr 1
8482 EOF
8483  ac_header_dirent=$ac_hdr; break
8484 else
8485   echo "$ac_t""no" 1>&6
8486 fi
8487 done
8488 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8489 if test $ac_header_dirent = dirent.h; then
8490 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8491 echo "configure:8490: checking for opendir in -ldir" >&5
8492 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8493 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8494   echo $ac_n "(cached) $ac_c" 1>&6
8495 else
8496   ac_save_LIBS="$LIBS"
8497 LIBS="-ldir  $LIBS"
8498 cat > conftest.$ac_ext <<EOF
8499 #line 8498 "configure"
8500 #include "confdefs.h"
8501 /* Override any gcc2 internal prototype to avoid an error.  */
8502 /* We use char because int might match the return type of a gcc2
8503     builtin and then its argument prototype would still apply.  */
8504 char opendir();
8505
8506 int main() {
8507 opendir()
8508 ; return 0; }
8509 EOF
8510 if { (eval echo configure:8509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8511   rm -rf conftest*
8512   eval "ac_cv_lib_$ac_lib_var=yes"
8513 else
8514   echo "configure: failed program was:" >&5
8515   cat conftest.$ac_ext >&5
8516   rm -rf conftest*
8517   eval "ac_cv_lib_$ac_lib_var=no"
8518 fi
8519 rm -f conftest*
8520 LIBS="$ac_save_LIBS"
8521
8522 fi
8523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8524   echo "$ac_t""yes" 1>&6
8525   LIBS="$LIBS -ldir"
8526 else
8527   echo "$ac_t""no" 1>&6
8528 fi
8529
8530 else
8531 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8532 echo "configure:8531: checking for opendir in -lx" >&5
8533 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8534 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8535   echo $ac_n "(cached) $ac_c" 1>&6
8536 else
8537   ac_save_LIBS="$LIBS"
8538 LIBS="-lx  $LIBS"
8539 cat > conftest.$ac_ext <<EOF
8540 #line 8539 "configure"
8541 #include "confdefs.h"
8542 /* Override any gcc2 internal prototype to avoid an error.  */
8543 /* We use char because int might match the return type of a gcc2
8544     builtin and then its argument prototype would still apply.  */
8545 char opendir();
8546
8547 int main() {
8548 opendir()
8549 ; return 0; }
8550 EOF
8551 if { (eval echo configure:8550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8552   rm -rf conftest*
8553   eval "ac_cv_lib_$ac_lib_var=yes"
8554 else
8555   echo "configure: failed program was:" >&5
8556   cat conftest.$ac_ext >&5
8557   rm -rf conftest*
8558   eval "ac_cv_lib_$ac_lib_var=no"
8559 fi
8560 rm -f conftest*
8561 LIBS="$ac_save_LIBS"
8562
8563 fi
8564 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8565   echo "$ac_t""yes" 1>&6
8566   LIBS="$LIBS -lx"
8567 else
8568   echo "$ac_t""no" 1>&6
8569 fi
8570
8571 fi
8572
8573 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8574 echo "configure:8573: checking for sys/wait.h that is POSIX.1 compatible" >&5
8575 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8576   echo $ac_n "(cached) $ac_c" 1>&6
8577 else
8578   cat > conftest.$ac_ext <<EOF
8579 #line 8578 "configure"
8580 #include "confdefs.h"
8581 #include <sys/types.h>
8582 #include <sys/wait.h>
8583 #ifndef WEXITSTATUS
8584 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8585 #endif
8586 #ifndef WIFEXITED
8587 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8588 #endif
8589 int main() {
8590 int s;
8591 wait (&s);
8592 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8593 ; return 0; }
8594 EOF
8595 if { (eval echo configure:8594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8596   rm -rf conftest*
8597   ac_cv_header_sys_wait_h=yes
8598 else
8599   echo "configure: failed program was:" >&5
8600   cat conftest.$ac_ext >&5
8601   rm -rf conftest*
8602   ac_cv_header_sys_wait_h=no
8603 fi
8604 rm -f conftest*
8605 fi
8606
8607 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8608 if test $ac_cv_header_sys_wait_h = yes; then
8609   cat >> confdefs.h <<\EOF
8610 #define HAVE_SYS_WAIT_H 1
8611 EOF
8612
8613 fi
8614
8615 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8616 echo "configure:8615: checking POSIX termios" >&5
8617 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8618   echo $ac_n "(cached) $ac_c" 1>&6
8619 else
8620   cat > conftest.$ac_ext <<EOF
8621 #line 8620 "configure"
8622 #include "confdefs.h"
8623 #include <sys/types.h>
8624 #include <unistd.h>
8625 #include <termios.h>
8626 int main() {
8627 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8628    tcgetattr(0, 0);
8629 ; return 0; }
8630 EOF
8631 if { (eval echo configure:8630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8632   rm -rf conftest*
8633   am_cv_sys_posix_termios=yes
8634 else
8635   echo "configure: failed program was:" >&5
8636   cat conftest.$ac_ext >&5
8637   rm -rf conftest*
8638   am_cv_sys_posix_termios=no
8639 fi
8640 rm -f conftest*
8641 fi
8642
8643 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8644
8645
8646  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8647 echo "configure:8646: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8648 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8649   echo $ac_n "(cached) $ac_c" 1>&6
8650 else
8651   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8652
8653   gwinsz_in_termios_h=no
8654   if test $am_cv_sys_posix_termios = yes; then
8655     cat > conftest.$ac_ext <<EOF
8656 #line 8655 "configure"
8657 #include "confdefs.h"
8658 #include <sys/types.h>
8659 #     include <termios.h>
8660 #     ifdef TIOCGWINSZ
8661         yes
8662 #     endif
8663     
8664 EOF
8665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8666   egrep "yes" >/dev/null 2>&1; then
8667   rm -rf conftest*
8668   gwinsz_in_termios_h=yes
8669 fi
8670 rm -f conftest*
8671
8672   fi
8673
8674   if test $gwinsz_in_termios_h = no; then
8675     cat > conftest.$ac_ext <<EOF
8676 #line 8675 "configure"
8677 #include "confdefs.h"
8678 #include <sys/types.h>
8679 #     include <sys/ioctl.h>
8680 #     ifdef TIOCGWINSZ
8681         yes
8682 #     endif
8683     
8684 EOF
8685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8686   egrep "yes" >/dev/null 2>&1; then
8687   rm -rf conftest*
8688   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8689 fi
8690 rm -f conftest*
8691
8692   fi
8693   
8694 fi
8695
8696 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8697   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8698     cat >> confdefs.h <<\EOF
8699 #define GWINSZ_IN_SYS_IOCTL 1
8700 EOF
8701
8702   fi
8703
8704 if test $am_cv_sys_posix_termios = yes ; then
8705         cat >> confdefs.h <<\EOF
8706 #define HAVE_POSIX_TERMIOS 1
8707 EOF
8708
8709 fi
8710
8711 for ac_hdr in \
8712         arpa/inet.h             \
8713         arpa/nameser.h  \
8714         assert.h                \
8715         bits/types.h    \
8716         conio.h                 \
8717         crypt.h                 \
8718         direct.h                \
8719         errno.h                 \
8720         fcntl.h                 \
8721         filio.h                 \
8722         getopt.h                \
8723         grp.h                   \
8724         io.h                    \
8725         libutil.h               \
8726         limits.h                \
8727         locale.h                \
8728         netinet/tcp.h   \
8729         malloc.h                \
8730         memory.h                \
8731         psap.h                  \
8732         pwd.h                   \
8733         process.h               \
8734         resolv.h                \
8735         sgtty.h                 \
8736         shadow.h                \
8737         stddef.h                \
8738         string.h                \
8739         strings.h               \
8740         sysexits.h              \
8741         sys/file.h              \
8742         sys/filio.h             \
8743         sys/errno.h             \
8744         sys/ioctl.h             \
8745         sys/param.h             \
8746         sys/resource.h  \
8747         sys/select.h    \
8748         sys/socket.h    \
8749         sys/stat.h              \
8750         sys/syslog.h    \
8751         sys/time.h              \
8752         sys/types.h             \
8753         sys/ucred.h             \
8754         sys/uio.h               \
8755         syslog.h                \
8756         termios.h               \
8757         unistd.h                \
8758         winsock.h               \
8759         winsock2.h              \
8760
8761 do
8762 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8763 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8764 echo "configure:8763: checking for $ac_hdr" >&5
8765 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8766   echo $ac_n "(cached) $ac_c" 1>&6
8767 else
8768   cat > conftest.$ac_ext <<EOF
8769 #line 8768 "configure"
8770 #include "confdefs.h"
8771 #include <$ac_hdr>
8772 EOF
8773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8774 { (eval echo configure:8773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8776 if test -z "$ac_err"; then
8777   rm -rf conftest*
8778   eval "ac_cv_header_$ac_safe=yes"
8779 else
8780   echo "$ac_err" >&5
8781   echo "configure: failed program was:" >&5
8782   cat conftest.$ac_ext >&5
8783   rm -rf conftest*
8784   eval "ac_cv_header_$ac_safe=no"
8785 fi
8786 rm -f conftest*
8787 fi
8788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8789   echo "$ac_t""yes" 1>&6
8790     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8791   cat >> confdefs.h <<EOF
8792 #define $ac_tr_hdr 1
8793 EOF
8794  
8795 else
8796   echo "$ac_t""no" 1>&6
8797 fi
8798 done
8799
8800
8801
8802
8803 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8804 echo "configure:8803: checking for sigset in -lV3" >&5
8805 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8806 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8807   echo $ac_n "(cached) $ac_c" 1>&6
8808 else
8809   ac_save_LIBS="$LIBS"
8810 LIBS="-lV3  $LIBS"
8811 cat > conftest.$ac_ext <<EOF
8812 #line 8811 "configure"
8813 #include "confdefs.h"
8814 /* Override any gcc2 internal prototype to avoid an error.  */
8815 /* We use char because int might match the return type of a gcc2
8816     builtin and then its argument prototype would still apply.  */
8817 char sigset();
8818
8819 int main() {
8820 sigset()
8821 ; return 0; }
8822 EOF
8823 if { (eval echo configure:8822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8824   rm -rf conftest*
8825   eval "ac_cv_lib_$ac_lib_var=yes"
8826 else
8827   echo "configure: failed program was:" >&5
8828   cat conftest.$ac_ext >&5
8829   rm -rf conftest*
8830   eval "ac_cv_lib_$ac_lib_var=no"
8831 fi
8832 rm -f conftest*
8833 LIBS="$ac_save_LIBS"
8834
8835 fi
8836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8837   echo "$ac_t""yes" 1>&6
8838     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8839     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8840   cat >> confdefs.h <<EOF
8841 #define $ac_tr_lib 1
8842 EOF
8843
8844   LIBS="-lV3 $LIBS"
8845
8846 else
8847   echo "$ac_t""no" 1>&6
8848 fi
8849
8850
8851 if test "$ac_cv_header_winsock_h" = yes; then
8852 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8853 echo "configure:8852: checking for winsock" >&5
8854 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8855   echo $ac_n "(cached) $ac_c" 1>&6
8856 else
8857   save_LIBS="$LIBS"
8858 for curlib in ws2_32 wsock32; do
8859         LIBS="$LIBS -l$curlib"
8860         cat > conftest.$ac_ext <<EOF
8861 #line 8860 "configure"
8862 #include "confdefs.h"
8863 #include <winsock.h>
8864                         
8865 int main() {
8866
8867                         socket(0,0,0);
8868                         select(0,NULL,NULL,NULL,NULL);
8869                         closesocket(0);
8870                         gethostname(NULL,0);
8871                         
8872 ; return 0; }
8873 EOF
8874 if { (eval echo configure:8873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8875   rm -rf conftest*
8876   ol_cv_winsock=yes
8877 else
8878   echo "configure: failed program was:" >&5
8879   cat conftest.$ac_ext >&5
8880   rm -rf conftest*
8881   ol_cv_winsock=no
8882 fi
8883 rm -f conftest*
8884
8885         if test $ol_cv_winsock = yes; then
8886                 cat >> confdefs.h <<\EOF
8887 #define HAVE_WINSOCK 1
8888 EOF
8889
8890                 ac_cv_func_socket=yes
8891                 ac_cv_func_select=yes
8892                 ac_cv_func_closesocket=yes
8893                 ac_cv_func_gethostname=yes
8894                 if test $curlib = ws2_32; then
8895                         ol_cv_winsock=winsock2
8896                         cat >> confdefs.h <<\EOF
8897 #define HAVE_WINSOCK2 1
8898 EOF
8899
8900                 fi
8901                 break
8902         fi
8903         LIBS="$save_LIBS"
8904 done
8905 fi
8906
8907 echo "$ac_t""$ol_cv_winsock" 1>&6
8908 fi
8909
8910
8911 echo $ac_n "checking for socket""... $ac_c" 1>&6
8912 echo "configure:8911: checking for socket" >&5
8913 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8914   echo $ac_n "(cached) $ac_c" 1>&6
8915 else
8916   cat > conftest.$ac_ext <<EOF
8917 #line 8916 "configure"
8918 #include "confdefs.h"
8919 /* System header to define __stub macros and hopefully few prototypes,
8920     which can conflict with char socket(); below.  */
8921 #include <assert.h>
8922 /* Override any gcc2 internal prototype to avoid an error.  */
8923 /* We use char because int might match the return type of a gcc2
8924     builtin and then its argument prototype would still apply.  */
8925 char socket();
8926 char (*f)();
8927
8928 int main() {
8929
8930 /* The GNU C library defines this for functions which it implements
8931     to always fail with ENOSYS.  Some functions are actually named
8932     something starting with __ and the normal name is an alias.  */
8933 #if defined (__stub_socket) || defined (__stub___socket)
8934 choke me
8935 #else
8936 f = socket;
8937 #endif
8938
8939 ; return 0; }
8940 EOF
8941 if { (eval echo configure:8940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8942   rm -rf conftest*
8943   eval "ac_cv_func_socket=yes"
8944 else
8945   echo "configure: failed program was:" >&5
8946   cat conftest.$ac_ext >&5
8947   rm -rf conftest*
8948   eval "ac_cv_func_socket=no"
8949 fi
8950 rm -f conftest*
8951 fi
8952
8953 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8954   echo "$ac_t""yes" 1>&6
8955   :
8956 else
8957   echo "$ac_t""no" 1>&6
8958         
8959         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
8960 echo "configure:8959: checking for main in -lsocket" >&5
8961 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
8962 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8963   echo $ac_n "(cached) $ac_c" 1>&6
8964 else
8965   ac_save_LIBS="$LIBS"
8966 LIBS="-lsocket  $LIBS"
8967 cat > conftest.$ac_ext <<EOF
8968 #line 8967 "configure"
8969 #include "confdefs.h"
8970
8971 int main() {
8972 main()
8973 ; return 0; }
8974 EOF
8975 if { (eval echo configure:8974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8976   rm -rf conftest*
8977   eval "ac_cv_lib_$ac_lib_var=yes"
8978 else
8979   echo "configure: failed program was:" >&5
8980   cat conftest.$ac_ext >&5
8981   rm -rf conftest*
8982   eval "ac_cv_lib_$ac_lib_var=no"
8983 fi
8984 rm -f conftest*
8985 LIBS="$ac_save_LIBS"
8986
8987 fi
8988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8989   echo "$ac_t""yes" 1>&6
8990     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8991     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8992   cat >> confdefs.h <<EOF
8993 #define $ac_tr_lib 1
8994 EOF
8995
8996   LIBS="-lsocket $LIBS"
8997
8998 else
8999   echo "$ac_t""no" 1>&6
9000 fi
9001
9002         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9003 echo "configure:9002: checking for main in -lnet" >&5
9004 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9005 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9006   echo $ac_n "(cached) $ac_c" 1>&6
9007 else
9008   ac_save_LIBS="$LIBS"
9009 LIBS="-lnet  $LIBS"
9010 cat > conftest.$ac_ext <<EOF
9011 #line 9010 "configure"
9012 #include "confdefs.h"
9013
9014 int main() {
9015 main()
9016 ; return 0; }
9017 EOF
9018 if { (eval echo configure:9017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9019   rm -rf conftest*
9020   eval "ac_cv_lib_$ac_lib_var=yes"
9021 else
9022   echo "configure: failed program was:" >&5
9023   cat conftest.$ac_ext >&5
9024   rm -rf conftest*
9025   eval "ac_cv_lib_$ac_lib_var=no"
9026 fi
9027 rm -f conftest*
9028 LIBS="$ac_save_LIBS"
9029
9030 fi
9031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9032   echo "$ac_t""yes" 1>&6
9033     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9034     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9035   cat >> confdefs.h <<EOF
9036 #define $ac_tr_lib 1
9037 EOF
9038
9039   LIBS="-lnet $LIBS"
9040
9041 else
9042   echo "$ac_t""no" 1>&6
9043 fi
9044
9045         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9046 echo "configure:9045: checking for main in -lnsl_s" >&5
9047 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9048 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9049   echo $ac_n "(cached) $ac_c" 1>&6
9050 else
9051   ac_save_LIBS="$LIBS"
9052 LIBS="-lnsl_s  $LIBS"
9053 cat > conftest.$ac_ext <<EOF
9054 #line 9053 "configure"
9055 #include "confdefs.h"
9056
9057 int main() {
9058 main()
9059 ; return 0; }
9060 EOF
9061 if { (eval echo configure:9060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9062   rm -rf conftest*
9063   eval "ac_cv_lib_$ac_lib_var=yes"
9064 else
9065   echo "configure: failed program was:" >&5
9066   cat conftest.$ac_ext >&5
9067   rm -rf conftest*
9068   eval "ac_cv_lib_$ac_lib_var=no"
9069 fi
9070 rm -f conftest*
9071 LIBS="$ac_save_LIBS"
9072
9073 fi
9074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9075   echo "$ac_t""yes" 1>&6
9076     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9077     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9078   cat >> confdefs.h <<EOF
9079 #define $ac_tr_lib 1
9080 EOF
9081
9082   LIBS="-lnsl_s $LIBS"
9083
9084 else
9085   echo "$ac_t""no" 1>&6
9086 fi
9087
9088         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9089 echo "configure:9088: checking for main in -lnsl" >&5
9090 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9091 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9092   echo $ac_n "(cached) $ac_c" 1>&6
9093 else
9094   ac_save_LIBS="$LIBS"
9095 LIBS="-lnsl  $LIBS"
9096 cat > conftest.$ac_ext <<EOF
9097 #line 9096 "configure"
9098 #include "confdefs.h"
9099
9100 int main() {
9101 main()
9102 ; return 0; }
9103 EOF
9104 if { (eval echo configure:9103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9105   rm -rf conftest*
9106   eval "ac_cv_lib_$ac_lib_var=yes"
9107 else
9108   echo "configure: failed program was:" >&5
9109   cat conftest.$ac_ext >&5
9110   rm -rf conftest*
9111   eval "ac_cv_lib_$ac_lib_var=no"
9112 fi
9113 rm -f conftest*
9114 LIBS="$ac_save_LIBS"
9115
9116 fi
9117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9118   echo "$ac_t""yes" 1>&6
9119     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9120     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9121   cat >> confdefs.h <<EOF
9122 #define $ac_tr_lib 1
9123 EOF
9124
9125   LIBS="-lnsl $LIBS"
9126
9127 else
9128   echo "$ac_t""no" 1>&6
9129 fi
9130
9131         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9132 echo "configure:9131: checking for socket in -linet" >&5
9133 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9134 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9135   echo $ac_n "(cached) $ac_c" 1>&6
9136 else
9137   ac_save_LIBS="$LIBS"
9138 LIBS="-linet  $LIBS"
9139 cat > conftest.$ac_ext <<EOF
9140 #line 9139 "configure"
9141 #include "confdefs.h"
9142 /* Override any gcc2 internal prototype to avoid an error.  */
9143 /* We use char because int might match the return type of a gcc2
9144     builtin and then its argument prototype would still apply.  */
9145 char socket();
9146
9147 int main() {
9148 socket()
9149 ; return 0; }
9150 EOF
9151 if { (eval echo configure:9150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9152   rm -rf conftest*
9153   eval "ac_cv_lib_$ac_lib_var=yes"
9154 else
9155   echo "configure: failed program was:" >&5
9156   cat conftest.$ac_ext >&5
9157   rm -rf conftest*
9158   eval "ac_cv_lib_$ac_lib_var=no"
9159 fi
9160 rm -f conftest*
9161 LIBS="$ac_save_LIBS"
9162
9163 fi
9164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9165   echo "$ac_t""yes" 1>&6
9166     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9167     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9168   cat >> confdefs.h <<EOF
9169 #define $ac_tr_lib 1
9170 EOF
9171
9172   LIBS="-linet $LIBS"
9173
9174 else
9175   echo "$ac_t""no" 1>&6
9176 fi
9177
9178         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9179 echo "configure:9178: checking for main in -lgen" >&5
9180 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9181 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9182   echo $ac_n "(cached) $ac_c" 1>&6
9183 else
9184   ac_save_LIBS="$LIBS"
9185 LIBS="-lgen  $LIBS"
9186 cat > conftest.$ac_ext <<EOF
9187 #line 9186 "configure"
9188 #include "confdefs.h"
9189
9190 int main() {
9191 main()
9192 ; return 0; }
9193 EOF
9194 if { (eval echo configure:9193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9195   rm -rf conftest*
9196   eval "ac_cv_lib_$ac_lib_var=yes"
9197 else
9198   echo "configure: failed program was:" >&5
9199   cat conftest.$ac_ext >&5
9200   rm -rf conftest*
9201   eval "ac_cv_lib_$ac_lib_var=no"
9202 fi
9203 rm -f conftest*
9204 LIBS="$ac_save_LIBS"
9205
9206 fi
9207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9208   echo "$ac_t""yes" 1>&6
9209     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9210     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9211   cat >> confdefs.h <<EOF
9212 #define $ac_tr_lib 1
9213 EOF
9214
9215   LIBS="-lgen $LIBS"
9216
9217 else
9218   echo "$ac_t""no" 1>&6
9219 fi
9220
9221
9222 fi
9223
9224
9225 echo $ac_n "checking for select""... $ac_c" 1>&6
9226 echo "configure:9225: checking for select" >&5
9227 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9228   echo $ac_n "(cached) $ac_c" 1>&6
9229 else
9230   cat > conftest.$ac_ext <<EOF
9231 #line 9230 "configure"
9232 #include "confdefs.h"
9233 /* System header to define __stub macros and hopefully few prototypes,
9234     which can conflict with char select(); below.  */
9235 #include <assert.h>
9236 /* Override any gcc2 internal prototype to avoid an error.  */
9237 /* We use char because int might match the return type of a gcc2
9238     builtin and then its argument prototype would still apply.  */
9239 char select();
9240 char (*f)();
9241
9242 int main() {
9243
9244 /* The GNU C library defines this for functions which it implements
9245     to always fail with ENOSYS.  Some functions are actually named
9246     something starting with __ and the normal name is an alias.  */
9247 #if defined (__stub_select) || defined (__stub___select)
9248 choke me
9249 #else
9250 f = select;
9251 #endif
9252
9253 ; return 0; }
9254 EOF
9255 if { (eval echo configure:9254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9256   rm -rf conftest*
9257   eval "ac_cv_func_select=yes"
9258 else
9259   echo "configure: failed program was:" >&5
9260   cat conftest.$ac_ext >&5
9261   rm -rf conftest*
9262   eval "ac_cv_func_select=no"
9263 fi
9264 rm -f conftest*
9265 fi
9266
9267 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9268   echo "$ac_t""yes" 1>&6
9269   :
9270 else
9271   echo "$ac_t""no" 1>&6
9272 { echo "configure: error: select() required." 1>&2; exit 1; }
9273 fi
9274
9275
9276 if test "${ac_cv_header_winsock_h}" != yes; then
9277                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9278 echo "configure:9277: checking types of arguments for select()" >&5
9279  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9280   echo $ac_n "(cached) $ac_c" 1>&6
9281 else
9282    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9283   echo $ac_n "(cached) $ac_c" 1>&6
9284 else
9285     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9286   echo $ac_n "(cached) $ac_c" 1>&6
9287 else
9288      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9289      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9290       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9291        cat > conftest.$ac_ext <<EOF
9292 #line 9291 "configure"
9293 #include "confdefs.h"
9294 #ifdef HAVE_SYS_TYPES_H
9295 #include <sys/types.h>
9296 #endif
9297 #ifdef HAVE_SYS_TIME_H
9298 #include <sys/time.h>
9299 #endif
9300 #ifdef HAVE_SYS_SELECT_H
9301 #include <sys/select.h>
9302 #endif
9303 #ifdef HAVE_SYS_SOCKET_H
9304 #include <sys/socket.h>
9305 #endif
9306 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);
9307 int main() {
9308
9309 ; return 0; }
9310 EOF
9311 if { (eval echo configure:9310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9312   rm -rf conftest*
9313           ac_not_found=no ; break 3
9314 else
9315   echo "configure: failed program was:" >&5
9316   cat conftest.$ac_ext >&5
9317   rm -rf conftest*
9318   ac_not_found=yes
9319 fi
9320 rm -f conftest*
9321       done
9322      done
9323     done
9324    
9325 fi
9326   
9327 fi
9328  
9329 fi
9330  if test "$ac_not_found" = yes; then
9331   ac_cv_func_select_arg1=int 
9332   ac_cv_func_select_arg234='int *' 
9333   ac_cv_func_select_arg5='struct timeval *'
9334  fi
9335  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9336  cat >> confdefs.h <<EOF
9337 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9338 EOF
9339
9340  cat >> confdefs.h <<EOF
9341 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9342 EOF
9343
9344  cat >> confdefs.h <<EOF
9345 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9346 EOF
9347
9348
9349 fi
9350
9351
9352 for ac_func in poll 
9353 do
9354 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9355 echo "configure:9354: checking for $ac_func" >&5
9356 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9357   echo $ac_n "(cached) $ac_c" 1>&6
9358 else
9359   cat > conftest.$ac_ext <<EOF
9360 #line 9359 "configure"
9361 #include "confdefs.h"
9362 /* System header to define __stub macros and hopefully few prototypes,
9363     which can conflict with char $ac_func(); below.  */
9364 #include <assert.h>
9365 /* Override any gcc2 internal prototype to avoid an error.  */
9366 /* We use char because int might match the return type of a gcc2
9367     builtin and then its argument prototype would still apply.  */
9368 char $ac_func();
9369 char (*f)();
9370
9371 int main() {
9372
9373 /* The GNU C library defines this for functions which it implements
9374     to always fail with ENOSYS.  Some functions are actually named
9375     something starting with __ and the normal name is an alias.  */
9376 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9377 choke me
9378 #else
9379 f = $ac_func;
9380 #endif
9381
9382 ; return 0; }
9383 EOF
9384 if { (eval echo configure:9383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9385   rm -rf conftest*
9386   eval "ac_cv_func_$ac_func=yes"
9387 else
9388   echo "configure: failed program was:" >&5
9389   cat conftest.$ac_ext >&5
9390   rm -rf conftest*
9391   eval "ac_cv_func_$ac_func=no"
9392 fi
9393 rm -f conftest*
9394 fi
9395
9396 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9397   echo "$ac_t""yes" 1>&6
9398     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9399   cat >> confdefs.h <<EOF
9400 #define $ac_tr_func 1
9401 EOF
9402  
9403 else
9404   echo "$ac_t""no" 1>&6
9405 fi
9406 done
9407
9408 for ac_hdr in poll.h 
9409 do
9410 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9411 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9412 echo "configure:9411: checking for $ac_hdr" >&5
9413 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9414   echo $ac_n "(cached) $ac_c" 1>&6
9415 else
9416   cat > conftest.$ac_ext <<EOF
9417 #line 9416 "configure"
9418 #include "confdefs.h"
9419 #include <$ac_hdr>
9420 EOF
9421 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9422 { (eval echo configure:9421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9423 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9424 if test -z "$ac_err"; then
9425   rm -rf conftest*
9426   eval "ac_cv_header_$ac_safe=yes"
9427 else
9428   echo "$ac_err" >&5
9429   echo "configure: failed program was:" >&5
9430   cat conftest.$ac_ext >&5
9431   rm -rf conftest*
9432   eval "ac_cv_header_$ac_safe=no"
9433 fi
9434 rm -f conftest*
9435 fi
9436 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9437   echo "$ac_t""yes" 1>&6
9438     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9439   cat >> confdefs.h <<EOF
9440 #define $ac_tr_hdr 1
9441 EOF
9442  
9443 else
9444   echo "$ac_t""no" 1>&6
9445 fi
9446 done
9447
9448
9449 # strerror checks
9450 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9451 echo "configure:9450: checking declaration of sys_errlist" >&5
9452 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9453   echo $ac_n "(cached) $ac_c" 1>&6
9454 else
9455   
9456         cat > conftest.$ac_ext <<EOF
9457 #line 9456 "configure"
9458 #include "confdefs.h"
9459
9460 #include <stdio.h>
9461 #include <sys/types.h>
9462 #include <errno.h>
9463 #ifdef WINNT
9464 #include <stdlib.h>
9465 #endif 
9466 int main() {
9467 char *c = (char *) *sys_errlist
9468 ; return 0; }
9469 EOF
9470 if { (eval echo configure:9469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9471   rm -rf conftest*
9472   ol_cv_dcl_sys_errlist=yes
9473         ol_cv_have_sys_errlist=yes
9474 else
9475   echo "configure: failed program was:" >&5
9476   cat conftest.$ac_ext >&5
9477   rm -rf conftest*
9478   ol_cv_dcl_sys_errlist=no
9479 fi
9480 rm -f conftest*
9481 fi
9482
9483 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9484 #
9485 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9486 if test $ol_cv_dcl_sys_errlist = no ; then
9487         cat >> confdefs.h <<\EOF
9488 #define DECL_SYS_ERRLIST 1
9489 EOF
9490
9491
9492         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9493 echo "configure:9492: checking existence of sys_errlist" >&5
9494 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9495   echo $ac_n "(cached) $ac_c" 1>&6
9496 else
9497   
9498                 cat > conftest.$ac_ext <<EOF
9499 #line 9498 "configure"
9500 #include "confdefs.h"
9501 #include <errno.h>
9502 int main() {
9503 char *c = (char *) *sys_errlist
9504 ; return 0; }
9505 EOF
9506 if { (eval echo configure:9505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9507   rm -rf conftest*
9508   ol_cv_have_sys_errlist=yes
9509 else
9510   echo "configure: failed program was:" >&5
9511   cat conftest.$ac_ext >&5
9512   rm -rf conftest*
9513   ol_cv_have_sys_errlist=no
9514 fi
9515 rm -f conftest*
9516 fi
9517
9518 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9519 fi
9520 if test $ol_cv_have_sys_errlist = yes ; then
9521         cat >> confdefs.h <<\EOF
9522 #define HAVE_SYS_ERRLIST 1
9523 EOF
9524
9525 fi
9526  for ac_func in strerror strerror_r
9527 do
9528 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9529 echo "configure:9528: checking for $ac_func" >&5
9530 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9531   echo $ac_n "(cached) $ac_c" 1>&6
9532 else
9533   cat > conftest.$ac_ext <<EOF
9534 #line 9533 "configure"
9535 #include "confdefs.h"
9536 /* System header to define __stub macros and hopefully few prototypes,
9537     which can conflict with char $ac_func(); below.  */
9538 #include <assert.h>
9539 /* Override any gcc2 internal prototype to avoid an error.  */
9540 /* We use char because int might match the return type of a gcc2
9541     builtin and then its argument prototype would still apply.  */
9542 char $ac_func();
9543 char (*f)();
9544
9545 int main() {
9546
9547 /* The GNU C library defines this for functions which it implements
9548     to always fail with ENOSYS.  Some functions are actually named
9549     something starting with __ and the normal name is an alias.  */
9550 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9551 choke me
9552 #else
9553 f = $ac_func;
9554 #endif
9555
9556 ; return 0; }
9557 EOF
9558 if { (eval echo configure:9557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9559   rm -rf conftest*
9560   eval "ac_cv_func_$ac_func=yes"
9561 else
9562   echo "configure: failed program was:" >&5
9563   cat conftest.$ac_ext >&5
9564   rm -rf conftest*
9565   eval "ac_cv_func_$ac_func=no"
9566 fi
9567 rm -f conftest*
9568 fi
9569
9570 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9571   echo "$ac_t""yes" 1>&6
9572     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9573   cat >> confdefs.h <<EOF
9574 #define $ac_tr_func 1
9575 EOF
9576  
9577 else
9578   echo "$ac_t""no" 1>&6
9579 fi
9580 done
9581
9582 ol_cv_func_strerror_r=no
9583 if test "${ac_cv_func_strerror_r}" = yes ; then
9584         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9585 echo "configure:9584: checking non-posix strerror_r" >&5
9586 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9587   echo $ac_n "(cached) $ac_c" 1>&6
9588 else
9589   
9590         cat > conftest.$ac_ext <<EOF
9591 #line 9590 "configure"
9592 #include "confdefs.h"
9593 #include <string.h>
9594 EOF
9595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9596   egrep "strerror_r" >/dev/null 2>&1; then
9597   rm -rf conftest*
9598   ol_decl_strerror_r=yes
9599 else
9600   rm -rf conftest*
9601   ol_decl_strerror_r=no
9602 fi
9603 rm -f conftest*
9604
9605         if test $ol_decl_strerror_r = yes ; then
9606                 cat > conftest.$ac_ext <<EOF
9607 #line 9606 "configure"
9608 #include "confdefs.h"
9609 #include <string.h>
9610 int main() {
9611    /* from autoconf 2.59 */
9612                                 char buf[100];
9613                                 char x = *strerror_r (0, buf, sizeof buf);
9614                                 char *p = strerror_r (0, buf, sizeof buf);
9615                         
9616 ; return 0; }
9617 EOF
9618 if { (eval echo configure:9617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9619   rm -rf conftest*
9620   ol_cv_nonposix_strerror_r=yes
9621 else
9622   echo "configure: failed program was:" >&5
9623   cat conftest.$ac_ext >&5
9624   rm -rf conftest*
9625   ol_cv_nonposix_strerror_r=no
9626 fi
9627 rm -f conftest*
9628         else
9629                 if test "$cross_compiling" = yes; then
9630     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9631 else
9632   cat > conftest.$ac_ext <<EOF
9633 #line 9632 "configure"
9634 #include "confdefs.h"
9635
9636                         main() {
9637                                 char buf[100];
9638                                 buf[0] = 0;
9639                                 strerror_r( 1, buf, sizeof buf );
9640                                 exit( buf[0] == 0 );
9641                         }
9642                         
9643 EOF
9644 if { (eval echo configure:9643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9645 then
9646   ol_cv_nonposix_strerror_r=yes
9647 else
9648   echo "configure: failed program was:" >&5
9649   cat conftest.$ac_ext >&5
9650   rm -fr conftest*
9651   ol_cv_nonposix_strerror=no
9652 fi
9653 rm -fr conftest*
9654 fi
9655
9656         fi
9657         
9658 fi
9659
9660 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9661 if test $ol_cv_nonposix_strerror_r = yes ; then
9662         cat >> confdefs.h <<\EOF
9663 #define HAVE_NONPOSIX_STRERROR_R 1
9664 EOF
9665
9666 fi
9667
9668 elif test "${ac_cv_func_strerror}" = no ; then
9669         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9670 echo "configure:9669: checking declaration of sys_errlist" >&5
9671 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9672   echo $ac_n "(cached) $ac_c" 1>&6
9673 else
9674   
9675         cat > conftest.$ac_ext <<EOF
9676 #line 9675 "configure"
9677 #include "confdefs.h"
9678
9679 #include <stdio.h>
9680 #include <sys/types.h>
9681 #include <errno.h>
9682 #ifdef WINNT
9683 #include <stdlib.h>
9684 #endif 
9685 int main() {
9686 char *c = (char *) *sys_errlist
9687 ; return 0; }
9688 EOF
9689 if { (eval echo configure:9688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9690   rm -rf conftest*
9691   ol_cv_dcl_sys_errlist=yes
9692         ol_cv_have_sys_errlist=yes
9693 else
9694   echo "configure: failed program was:" >&5
9695   cat conftest.$ac_ext >&5
9696   rm -rf conftest*
9697   ol_cv_dcl_sys_errlist=no
9698 fi
9699 rm -f conftest*
9700 fi
9701
9702 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9703 #
9704 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9705 if test $ol_cv_dcl_sys_errlist = no ; then
9706         cat >> confdefs.h <<\EOF
9707 #define DECL_SYS_ERRLIST 1
9708 EOF
9709
9710
9711         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9712 echo "configure:9711: checking existence of sys_errlist" >&5
9713 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9714   echo $ac_n "(cached) $ac_c" 1>&6
9715 else
9716   
9717                 cat > conftest.$ac_ext <<EOF
9718 #line 9717 "configure"
9719 #include "confdefs.h"
9720 #include <errno.h>
9721 int main() {
9722 char *c = (char *) *sys_errlist
9723 ; return 0; }
9724 EOF
9725 if { (eval echo configure:9724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9726   rm -rf conftest*
9727   ol_cv_have_sys_errlist=yes
9728 else
9729   echo "configure: failed program was:" >&5
9730   cat conftest.$ac_ext >&5
9731   rm -rf conftest*
9732   ol_cv_have_sys_errlist=no
9733 fi
9734 rm -f conftest*
9735 fi
9736
9737 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9738 fi
9739 if test $ol_cv_have_sys_errlist = yes ; then
9740         cat >> confdefs.h <<\EOF
9741 #define HAVE_SYS_ERRLIST 1
9742 EOF
9743
9744 fi
9745
9746 fi
9747
9748
9749 for ac_hdr in regex.h 
9750 do
9751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9753 echo "configure:9752: checking for $ac_hdr" >&5
9754 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9755   echo $ac_n "(cached) $ac_c" 1>&6
9756 else
9757   cat > conftest.$ac_ext <<EOF
9758 #line 9757 "configure"
9759 #include "confdefs.h"
9760 #include <$ac_hdr>
9761 EOF
9762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9763 { (eval echo configure:9762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9765 if test -z "$ac_err"; then
9766   rm -rf conftest*
9767   eval "ac_cv_header_$ac_safe=yes"
9768 else
9769   echo "$ac_err" >&5
9770   echo "configure: failed program was:" >&5
9771   cat conftest.$ac_ext >&5
9772   rm -rf conftest*
9773   eval "ac_cv_header_$ac_safe=no"
9774 fi
9775 rm -f conftest*
9776 fi
9777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9778   echo "$ac_t""yes" 1>&6
9779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9780   cat >> confdefs.h <<EOF
9781 #define $ac_tr_hdr 1
9782 EOF
9783  
9784 else
9785   echo "$ac_t""no" 1>&6
9786 fi
9787 done
9788
9789 if test "$ac_cv_header_regex_h" != yes ; then
9790         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9791 fi
9792
9793 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9794 echo "configure:9793: checking for library containing regfree" >&5
9795 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9796   echo $ac_n "(cached) $ac_c" 1>&6
9797 else
9798   ac_func_search_save_LIBS="$LIBS"
9799 ac_cv_search_regfree="no"
9800 cat > conftest.$ac_ext <<EOF
9801 #line 9800 "configure"
9802 #include "confdefs.h"
9803 /* Override any gcc2 internal prototype to avoid an error.  */
9804 /* We use char because int might match the return type of a gcc2
9805     builtin and then its argument prototype would still apply.  */
9806 char regfree();
9807
9808 int main() {
9809 regfree()
9810 ; return 0; }
9811 EOF
9812 if { (eval echo configure:9811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9813   rm -rf conftest*
9814   ac_cv_search_regfree="none required"
9815 else
9816   echo "configure: failed program was:" >&5
9817   cat conftest.$ac_ext >&5
9818 fi
9819 rm -f conftest*
9820 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9821 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9822 cat > conftest.$ac_ext <<EOF
9823 #line 9822 "configure"
9824 #include "confdefs.h"
9825 /* Override any gcc2 internal prototype to avoid an error.  */
9826 /* We use char because int might match the return type of a gcc2
9827     builtin and then its argument prototype would still apply.  */
9828 char regfree();
9829
9830 int main() {
9831 regfree()
9832 ; return 0; }
9833 EOF
9834 if { (eval echo configure:9833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9835   rm -rf conftest*
9836   ac_cv_search_regfree="-l$ac_lib"
9837 break
9838 else
9839   echo "configure: failed program was:" >&5
9840   cat conftest.$ac_ext >&5
9841 fi
9842 rm -f conftest*
9843 done
9844 LIBS="$ac_func_search_save_LIBS"
9845 fi
9846
9847 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9848 if test "$ac_cv_search_regfree" != "no"; then
9849   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9850   :
9851 else :
9852   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9853 fi
9854
9855
9856 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9857 echo "configure:9856: checking for compatible POSIX regex" >&5
9858 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9859   echo $ac_n "(cached) $ac_c" 1>&6
9860 else
9861   
9862         if test "$cross_compiling" = yes; then
9863   ol_cv_c_posix_regex=cross
9864 else
9865   cat > conftest.$ac_ext <<EOF
9866 #line 9865 "configure"
9867 #include "confdefs.h"
9868
9869 #include <sys/types.h>
9870 #include <regex.h>
9871 static char *pattern, *string;
9872 main()
9873 {
9874         int rc;
9875         regex_t re;
9876
9877         pattern = "^A";
9878
9879         if(regcomp(&re, pattern, 0)) {
9880                 return -1;
9881         }
9882         
9883         string = "ALL MATCH";
9884         
9885         rc = regexec(&re, string, 0, (void*)0, 0);
9886
9887         regfree(&re);
9888
9889         return rc;
9890 }
9891 EOF
9892 if { (eval echo configure:9891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9893 then
9894   ol_cv_c_posix_regex=yes
9895 else
9896   echo "configure: failed program was:" >&5
9897   cat conftest.$ac_ext >&5
9898   rm -fr conftest*
9899   ol_cv_c_posix_regex=no
9900 fi
9901 rm -fr conftest*
9902 fi
9903
9904 fi
9905
9906 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9907
9908 if test "$ol_cv_c_posix_regex" = no ; then
9909         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9910 fi
9911
9912
9913 have_uuid=no
9914 for ac_hdr in sys/uuid.h
9915 do
9916 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9917 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9918 echo "configure:9917: checking for $ac_hdr" >&5
9919 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9920   echo $ac_n "(cached) $ac_c" 1>&6
9921 else
9922   cat > conftest.$ac_ext <<EOF
9923 #line 9922 "configure"
9924 #include "confdefs.h"
9925 #include <$ac_hdr>
9926 EOF
9927 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9928 { (eval echo configure:9927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9929 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9930 if test -z "$ac_err"; then
9931   rm -rf conftest*
9932   eval "ac_cv_header_$ac_safe=yes"
9933 else
9934   echo "$ac_err" >&5
9935   echo "configure: failed program was:" >&5
9936   cat conftest.$ac_ext >&5
9937   rm -rf conftest*
9938   eval "ac_cv_header_$ac_safe=no"
9939 fi
9940 rm -f conftest*
9941 fi
9942 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9943   echo "$ac_t""yes" 1>&6
9944     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9945   cat >> confdefs.h <<EOF
9946 #define $ac_tr_hdr 1
9947 EOF
9948  
9949 else
9950   echo "$ac_t""no" 1>&6
9951 fi
9952 done
9953
9954 if test $ac_cv_header_sys_uuid_h = yes ; then
9955         save_LIBS="$LIBS"
9956         
9957 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9958 echo "configure:9957: checking for library containing uuid_to_str" >&5
9959 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9960   echo $ac_n "(cached) $ac_c" 1>&6
9961 else
9962   ac_func_search_save_LIBS="$LIBS"
9963 ac_cv_search_uuid_to_str="no"
9964 cat > conftest.$ac_ext <<EOF
9965 #line 9964 "configure"
9966 #include "confdefs.h"
9967 /* Override any gcc2 internal prototype to avoid an error.  */
9968 /* We use char because int might match the return type of a gcc2
9969     builtin and then its argument prototype would still apply.  */
9970 char uuid_to_str();
9971
9972 int main() {
9973 uuid_to_str()
9974 ; return 0; }
9975 EOF
9976 if { (eval echo configure:9975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9977   rm -rf conftest*
9978   ac_cv_search_uuid_to_str="none required"
9979 else
9980   echo "configure: failed program was:" >&5
9981   cat conftest.$ac_ext >&5
9982 fi
9983 rm -f conftest*
9984 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9985 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9986 cat > conftest.$ac_ext <<EOF
9987 #line 9986 "configure"
9988 #include "confdefs.h"
9989 /* Override any gcc2 internal prototype to avoid an error.  */
9990 /* We use char because int might match the return type of a gcc2
9991     builtin and then its argument prototype would still apply.  */
9992 char uuid_to_str();
9993
9994 int main() {
9995 uuid_to_str()
9996 ; return 0; }
9997 EOF
9998 if { (eval echo configure:9997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9999   rm -rf conftest*
10000   ac_cv_search_uuid_to_str="-l$ac_lib"
10001 break
10002 else
10003   echo "configure: failed program was:" >&5
10004   cat conftest.$ac_ext >&5
10005 fi
10006 rm -f conftest*
10007 done
10008 LIBS="$ac_func_search_save_LIBS"
10009 fi
10010
10011 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10012 if test "$ac_cv_search_uuid_to_str" != "no"; then
10013   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10014   have_uuid=yes
10015 else :
10016   :
10017 fi
10018         LIBS="$save_LIBS"
10019
10020         if test have_uuid = yes ; then
10021                 cat >> confdefs.h <<\EOF
10022 #define HAVE_UUID_TO_STR 1
10023 EOF
10024
10025
10026                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10027                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10028         fi
10029 fi
10030
10031 if test $have_uuid = no ; then
10032         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10033 echo "configure:10032: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10034         save_LIBS="$LIBS"
10035         LIBS="$LIBS -lrpcrt4"
10036         cat > conftest.$ac_ext <<EOF
10037 #line 10036 "configure"
10038 #include "confdefs.h"
10039
10040                 int __stdcall UuidCreate(void *);
10041                 int __stdcall UuidToStringA(void *,void **);
10042                 
10043 int main() {
10044
10045                 UuidCreate(0);
10046                 UuidToStringA(0,0);
10047                 
10048 ; return 0; }
10049 EOF
10050 if { (eval echo configure:10049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10051   rm -rf conftest*
10052   need_rpcrt=yes
10053 else
10054   echo "configure: failed program was:" >&5
10055   cat conftest.$ac_ext >&5
10056   rm -rf conftest*
10057   need_rpcrt=no
10058 fi
10059 rm -f conftest*
10060         if test $need_rpcrt = yes; then
10061                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10062         fi
10063         LIBS="$save_LIBS"
10064         echo "$ac_t""$need_rpcrt" 1>&6
10065 fi
10066
10067 ol_link_dnssrv=no
10068 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10069 echo "configure:10068: checking for res_query" >&5
10070 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10071   echo $ac_n "(cached) $ac_c" 1>&6
10072 else
10073   cat > conftest.$ac_ext <<EOF
10074 #line 10073 "configure"
10075 #include "confdefs.h"
10076 /* System header to define __stub macros and hopefully few prototypes,
10077     which can conflict with char res_query(); below.  */
10078 #include <assert.h>
10079 /* Override any gcc2 internal prototype to avoid an error.  */
10080 /* We use char because int might match the return type of a gcc2
10081     builtin and then its argument prototype would still apply.  */
10082 char res_query();
10083 char (*f)();
10084
10085 int main() {
10086
10087 /* The GNU C library defines this for functions which it implements
10088     to always fail with ENOSYS.  Some functions are actually named
10089     something starting with __ and the normal name is an alias.  */
10090 #if defined (__stub_res_query) || defined (__stub___res_query)
10091 choke me
10092 #else
10093 f = res_query;
10094 #endif
10095
10096 ; return 0; }
10097 EOF
10098 if { (eval echo configure:10097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10099   rm -rf conftest*
10100   eval "ac_cv_func_res_query=yes"
10101 else
10102   echo "configure: failed program was:" >&5
10103   cat conftest.$ac_ext >&5
10104   rm -rf conftest*
10105   eval "ac_cv_func_res_query=no"
10106 fi
10107 rm -f conftest*
10108 fi
10109
10110 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10111   echo "$ac_t""yes" 1>&6
10112   :
10113 else
10114   echo "$ac_t""no" 1>&6
10115 fi
10116
10117 if test $ac_cv_func_res_query = no ; then 
10118         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10119 echo "configure:10118: checking for __res_query" >&5
10120 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10121   echo $ac_n "(cached) $ac_c" 1>&6
10122 else
10123   cat > conftest.$ac_ext <<EOF
10124 #line 10123 "configure"
10125 #include "confdefs.h"
10126 /* System header to define __stub macros and hopefully few prototypes,
10127     which can conflict with char __res_query(); below.  */
10128 #include <assert.h>
10129 /* Override any gcc2 internal prototype to avoid an error.  */
10130 /* We use char because int might match the return type of a gcc2
10131     builtin and then its argument prototype would still apply.  */
10132 char __res_query();
10133 char (*f)();
10134
10135 int main() {
10136
10137 /* The GNU C library defines this for functions which it implements
10138     to always fail with ENOSYS.  Some functions are actually named
10139     something starting with __ and the normal name is an alias.  */
10140 #if defined (__stub___res_query) || defined (__stub_____res_query)
10141 choke me
10142 #else
10143 f = __res_query;
10144 #endif
10145
10146 ; return 0; }
10147 EOF
10148 if { (eval echo configure:10147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10149   rm -rf conftest*
10150   eval "ac_cv_func___res_query=yes"
10151 else
10152   echo "configure: failed program was:" >&5
10153   cat conftest.$ac_ext >&5
10154   rm -rf conftest*
10155   eval "ac_cv_func___res_query=no"
10156 fi
10157 rm -f conftest*
10158 fi
10159
10160 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10161   echo "$ac_t""yes" 1>&6
10162   :
10163 else
10164   echo "$ac_t""no" 1>&6
10165 fi
10166
10167         ac_cv_func_res_query=$ac_cv_func___res_query
10168 fi
10169
10170 if test $ac_cv_func_res_query = no ; then 
10171         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10172 echo "configure:10171: checking for res_query in -lbind" >&5
10173 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10174 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10175   echo $ac_n "(cached) $ac_c" 1>&6
10176 else
10177   ac_save_LIBS="$LIBS"
10178 LIBS="-lbind  $LIBS"
10179 cat > conftest.$ac_ext <<EOF
10180 #line 10179 "configure"
10181 #include "confdefs.h"
10182 /* Override any gcc2 internal prototype to avoid an error.  */
10183 /* We use char because int might match the return type of a gcc2
10184     builtin and then its argument prototype would still apply.  */
10185 char res_query();
10186
10187 int main() {
10188 res_query()
10189 ; return 0; }
10190 EOF
10191 if { (eval echo configure:10190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10192   rm -rf conftest*
10193   eval "ac_cv_lib_$ac_lib_var=yes"
10194 else
10195   echo "configure: failed program was:" >&5
10196   cat conftest.$ac_ext >&5
10197   rm -rf conftest*
10198   eval "ac_cv_lib_$ac_lib_var=no"
10199 fi
10200 rm -f conftest*
10201 LIBS="$ac_save_LIBS"
10202
10203 fi
10204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10205   echo "$ac_t""yes" 1>&6
10206     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10207     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10208   cat >> confdefs.h <<EOF
10209 #define $ac_tr_lib 1
10210 EOF
10211
10212   LIBS="-lbind $LIBS"
10213
10214 else
10215   echo "$ac_t""no" 1>&6
10216 fi
10217
10218         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10219 fi
10220
10221 if test $ac_cv_func_res_query = no ; then 
10222         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10223 echo "configure:10222: checking for __res_query in -lbind" >&5
10224 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10225 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10226   echo $ac_n "(cached) $ac_c" 1>&6
10227 else
10228   ac_save_LIBS="$LIBS"
10229 LIBS="-lbind  $LIBS"
10230 cat > conftest.$ac_ext <<EOF
10231 #line 10230 "configure"
10232 #include "confdefs.h"
10233 /* Override any gcc2 internal prototype to avoid an error.  */
10234 /* We use char because int might match the return type of a gcc2
10235     builtin and then its argument prototype would still apply.  */
10236 char __res_query();
10237
10238 int main() {
10239 __res_query()
10240 ; return 0; }
10241 EOF
10242 if { (eval echo configure:10241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10243   rm -rf conftest*
10244   eval "ac_cv_lib_$ac_lib_var=yes"
10245 else
10246   echo "configure: failed program was:" >&5
10247   cat conftest.$ac_ext >&5
10248   rm -rf conftest*
10249   eval "ac_cv_lib_$ac_lib_var=no"
10250 fi
10251 rm -f conftest*
10252 LIBS="$ac_save_LIBS"
10253
10254 fi
10255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10256   echo "$ac_t""yes" 1>&6
10257     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10258     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10259   cat >> confdefs.h <<EOF
10260 #define $ac_tr_lib 1
10261 EOF
10262
10263   LIBS="-lbind $LIBS"
10264
10265 else
10266   echo "$ac_t""no" 1>&6
10267 fi
10268
10269         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10270 fi
10271
10272 if test $ac_cv_func_res_query = no ; then 
10273         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10274 echo "configure:10273: checking for res_query in -lresolv" >&5
10275 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10277   echo $ac_n "(cached) $ac_c" 1>&6
10278 else
10279   ac_save_LIBS="$LIBS"
10280 LIBS="-lresolv  $LIBS"
10281 cat > conftest.$ac_ext <<EOF
10282 #line 10281 "configure"
10283 #include "confdefs.h"
10284 /* Override any gcc2 internal prototype to avoid an error.  */
10285 /* We use char because int might match the return type of a gcc2
10286     builtin and then its argument prototype would still apply.  */
10287 char res_query();
10288
10289 int main() {
10290 res_query()
10291 ; return 0; }
10292 EOF
10293 if { (eval echo configure:10292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10294   rm -rf conftest*
10295   eval "ac_cv_lib_$ac_lib_var=yes"
10296 else
10297   echo "configure: failed program was:" >&5
10298   cat conftest.$ac_ext >&5
10299   rm -rf conftest*
10300   eval "ac_cv_lib_$ac_lib_var=no"
10301 fi
10302 rm -f conftest*
10303 LIBS="$ac_save_LIBS"
10304
10305 fi
10306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10307   echo "$ac_t""yes" 1>&6
10308     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10309     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10310   cat >> confdefs.h <<EOF
10311 #define $ac_tr_lib 1
10312 EOF
10313
10314   LIBS="-lresolv $LIBS"
10315
10316 else
10317   echo "$ac_t""no" 1>&6
10318 fi
10319
10320         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10321 fi
10322
10323 if test $ac_cv_func_res_query = no ; then 
10324         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10325 echo "configure:10324: checking for __res_query in -lresolv" >&5
10326 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10327 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10328   echo $ac_n "(cached) $ac_c" 1>&6
10329 else
10330   ac_save_LIBS="$LIBS"
10331 LIBS="-lresolv  $LIBS"
10332 cat > conftest.$ac_ext <<EOF
10333 #line 10332 "configure"
10334 #include "confdefs.h"
10335 /* Override any gcc2 internal prototype to avoid an error.  */
10336 /* We use char because int might match the return type of a gcc2
10337     builtin and then its argument prototype would still apply.  */
10338 char __res_query();
10339
10340 int main() {
10341 __res_query()
10342 ; return 0; }
10343 EOF
10344 if { (eval echo configure:10343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10345   rm -rf conftest*
10346   eval "ac_cv_lib_$ac_lib_var=yes"
10347 else
10348   echo "configure: failed program was:" >&5
10349   cat conftest.$ac_ext >&5
10350   rm -rf conftest*
10351   eval "ac_cv_lib_$ac_lib_var=no"
10352 fi
10353 rm -f conftest*
10354 LIBS="$ac_save_LIBS"
10355
10356 fi
10357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10358   echo "$ac_t""yes" 1>&6
10359     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10360     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10361   cat >> confdefs.h <<EOF
10362 #define $ac_tr_lib 1
10363 EOF
10364
10365   LIBS="-lresolv $LIBS"
10366
10367 else
10368   echo "$ac_t""no" 1>&6
10369 fi
10370
10371         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10372 fi
10373
10374 if test $ac_cv_func_res_query = no ; then 
10375         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
10376 echo "configure:10375: checking for _res_9_query in -lresolv" >&5
10377 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
10378 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10379   echo $ac_n "(cached) $ac_c" 1>&6
10380 else
10381   ac_save_LIBS="$LIBS"
10382 LIBS="-lresolv  $LIBS"
10383 cat > conftest.$ac_ext <<EOF
10384 #line 10383 "configure"
10385 #include "confdefs.h"
10386 /* Override any gcc2 internal prototype to avoid an error.  */
10387 /* We use char because int might match the return type of a gcc2
10388     builtin and then its argument prototype would still apply.  */
10389 char _res_9_query();
10390
10391 int main() {
10392 _res_9_query()
10393 ; return 0; }
10394 EOF
10395 if { (eval echo configure:10394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10396   rm -rf conftest*
10397   eval "ac_cv_lib_$ac_lib_var=yes"
10398 else
10399   echo "configure: failed program was:" >&5
10400   cat conftest.$ac_ext >&5
10401   rm -rf conftest*
10402   eval "ac_cv_lib_$ac_lib_var=no"
10403 fi
10404 rm -f conftest*
10405 LIBS="$ac_save_LIBS"
10406
10407 fi
10408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10409   echo "$ac_t""yes" 1>&6
10410     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10411     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10412   cat >> confdefs.h <<EOF
10413 #define $ac_tr_lib 1
10414 EOF
10415
10416   LIBS="-lresolv $LIBS"
10417
10418 else
10419   echo "$ac_t""no" 1>&6
10420 fi
10421
10422         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
10423 fi
10424
10425 if test "$ac_cv_func_res_query" = yes ; then
10426         cat >> confdefs.h <<\EOF
10427 #define HAVE_RES_QUERY 1
10428 EOF
10429
10430
10431         if test $ol_enable_dnssrv != no ; then
10432                 ol_link_dnssrv=yes
10433         fi
10434 fi
10435
10436 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10437         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10438 fi
10439
10440 for ac_func in hstrerror 
10441 do
10442 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10443 echo "configure:10442: checking for $ac_func" >&5
10444 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10445   echo $ac_n "(cached) $ac_c" 1>&6
10446 else
10447   cat > conftest.$ac_ext <<EOF
10448 #line 10447 "configure"
10449 #include "confdefs.h"
10450 /* System header to define __stub macros and hopefully few prototypes,
10451     which can conflict with char $ac_func(); below.  */
10452 #include <assert.h>
10453 /* Override any gcc2 internal prototype to avoid an error.  */
10454 /* We use char because int might match the return type of a gcc2
10455     builtin and then its argument prototype would still apply.  */
10456 char $ac_func();
10457 char (*f)();
10458
10459 int main() {
10460
10461 /* The GNU C library defines this for functions which it implements
10462     to always fail with ENOSYS.  Some functions are actually named
10463     something starting with __ and the normal name is an alias.  */
10464 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10465 choke me
10466 #else
10467 f = $ac_func;
10468 #endif
10469
10470 ; return 0; }
10471 EOF
10472 if { (eval echo configure:10471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10473   rm -rf conftest*
10474   eval "ac_cv_func_$ac_func=yes"
10475 else
10476   echo "configure: failed program was:" >&5
10477   cat conftest.$ac_ext >&5
10478   rm -rf conftest*
10479   eval "ac_cv_func_$ac_func=no"
10480 fi
10481 rm -f conftest*
10482 fi
10483
10484 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10485   echo "$ac_t""yes" 1>&6
10486     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10487   cat >> confdefs.h <<EOF
10488 #define $ac_tr_func 1
10489 EOF
10490  
10491 else
10492   echo "$ac_t""no" 1>&6
10493 fi
10494 done
10495
10496
10497 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10498 do
10499 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10500 echo "configure:10499: checking for $ac_func" >&5
10501 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10502   echo $ac_n "(cached) $ac_c" 1>&6
10503 else
10504   cat > conftest.$ac_ext <<EOF
10505 #line 10504 "configure"
10506 #include "confdefs.h"
10507 /* System header to define __stub macros and hopefully few prototypes,
10508     which can conflict with char $ac_func(); below.  */
10509 #include <assert.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 $ac_func();
10514 char (*f)();
10515
10516 int main() {
10517
10518 /* The GNU C library defines this for functions which it implements
10519     to always fail with ENOSYS.  Some functions are actually named
10520     something starting with __ and the normal name is an alias.  */
10521 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10522 choke me
10523 #else
10524 f = $ac_func;
10525 #endif
10526
10527 ; return 0; }
10528 EOF
10529 if { (eval echo configure:10528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10530   rm -rf conftest*
10531   eval "ac_cv_func_$ac_func=yes"
10532 else
10533   echo "configure: failed program was:" >&5
10534   cat conftest.$ac_ext >&5
10535   rm -rf conftest*
10536   eval "ac_cv_func_$ac_func=no"
10537 fi
10538 rm -f conftest*
10539 fi
10540
10541 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10542   echo "$ac_t""yes" 1>&6
10543     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10544   cat >> confdefs.h <<EOF
10545 #define $ac_tr_func 1
10546 EOF
10547  
10548 else
10549   echo "$ac_t""no" 1>&6
10550 fi
10551 done
10552
10553
10554 ol_link_ipv6=no
10555 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10556         if test $ol_enable_ipv6 = yes ; then
10557                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10558         fi
10559 elif test $ol_enable_ipv6 != no ; then
10560         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10561 echo "configure:10560: checking INET6_ADDRSTRLEN" >&5
10562 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10563   echo $ac_n "(cached) $ac_c" 1>&6
10564 else
10565   
10566                 cat > conftest.$ac_ext <<EOF
10567 #line 10566 "configure"
10568 #include "confdefs.h"
10569
10570 #                       include <netinet/in.h>
10571 #                       ifdef INET6_ADDRSTRLEN
10572                                 __has_inet6_addrstrlen__;
10573 #                       endif
10574                 
10575 EOF
10576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10577   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10578   rm -rf conftest*
10579   ol_cv_inet6_addrstrlen=yes
10580 else
10581   rm -rf conftest*
10582   ol_cv_inet6_addrstrlen=no
10583 fi
10584 rm -f conftest*
10585
10586 fi
10587
10588 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10589
10590
10591         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10592 echo "configure:10591: checking struct sockaddr_storage" >&5
10593 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10594   echo $ac_n "(cached) $ac_c" 1>&6
10595 else
10596   
10597                 cat > conftest.$ac_ext <<EOF
10598 #line 10597 "configure"
10599 #include "confdefs.h"
10600
10601 #include <sys/types.h>
10602 #include <sys/socket.h>
10603
10604 int main() {
10605
10606                         struct sockaddr_storage ss;
10607
10608 ; return 0; }
10609 EOF
10610 if { (eval echo configure:10609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10611   rm -rf conftest*
10612   ol_cv_struct_sockaddr_storage=yes
10613 else
10614   echo "configure: failed program was:" >&5
10615   cat conftest.$ac_ext >&5
10616   rm -rf conftest*
10617   ol_cv_struct_sockaddr_storage=no
10618 fi
10619 rm -f conftest*
10620 fi
10621
10622 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10623
10624         if test $ol_cv_inet6_addrstrlen = yes \
10625                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10626                 ol_link_ipv6=yes
10627         elif test $ol_enable_ipv6 = yes \
10628                         -a $ol_cv_inet6_addrstrlen = no ; then
10629                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10630         elif test $ol_enable_ipv6 = yes \
10631                         -a $ol_cv_struct_sockaddr_storage = no ; then
10632                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10633         fi
10634 fi
10635
10636 if test $ol_enable_local != no ; then
10637         for ac_hdr in sys/un.h 
10638 do
10639 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10640 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10641 echo "configure:10640: checking for $ac_hdr" >&5
10642 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10643   echo $ac_n "(cached) $ac_c" 1>&6
10644 else
10645   cat > conftest.$ac_ext <<EOF
10646 #line 10645 "configure"
10647 #include "confdefs.h"
10648 #include <$ac_hdr>
10649 EOF
10650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10651 { (eval echo configure:10650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10653 if test -z "$ac_err"; then
10654   rm -rf conftest*
10655   eval "ac_cv_header_$ac_safe=yes"
10656 else
10657   echo "$ac_err" >&5
10658   echo "configure: failed program was:" >&5
10659   cat conftest.$ac_ext >&5
10660   rm -rf conftest*
10661   eval "ac_cv_header_$ac_safe=no"
10662 fi
10663 rm -f conftest*
10664 fi
10665 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10666   echo "$ac_t""yes" 1>&6
10667     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10668   cat >> confdefs.h <<EOF
10669 #define $ac_tr_hdr 1
10670 EOF
10671  
10672 else
10673   echo "$ac_t""no" 1>&6
10674 fi
10675 done
10676
10677
10678         if test $ol_enable_local = auto ; then
10679                 ol_enable_local=$ac_cv_header_sys_un_h
10680         elif test $ac_cv_header_sys_un_h = no ; then
10681                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10682         fi
10683 fi
10684
10685 ol_link_kbind=no
10686 ol_link_krb5=no
10687 ol_link_krb4=no
10688
10689 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10690         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10691         -o $ol_with_kerberos = k425 ; then
10692
10693         for ac_hdr in krb5.h
10694 do
10695 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10696 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10697 echo "configure:10696: checking for $ac_hdr" >&5
10698 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10699   echo $ac_n "(cached) $ac_c" 1>&6
10700 else
10701   cat > conftest.$ac_ext <<EOF
10702 #line 10701 "configure"
10703 #include "confdefs.h"
10704 #include <$ac_hdr>
10705 EOF
10706 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10707 { (eval echo configure:10706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10708 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10709 if test -z "$ac_err"; then
10710   rm -rf conftest*
10711   eval "ac_cv_header_$ac_safe=yes"
10712 else
10713   echo "$ac_err" >&5
10714   echo "configure: failed program was:" >&5
10715   cat conftest.$ac_ext >&5
10716   rm -rf conftest*
10717   eval "ac_cv_header_$ac_safe=no"
10718 fi
10719 rm -f conftest*
10720 fi
10721 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10722   echo "$ac_t""yes" 1>&6
10723     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10724   cat >> confdefs.h <<EOF
10725 #define $ac_tr_hdr 1
10726 EOF
10727  
10728 else
10729   echo "$ac_t""no" 1>&6
10730 fi
10731 done
10732
10733
10734         if test $ac_cv_header_krb5_h = yes ; then
10735                                 for ac_hdr in heim_err.h
10736 do
10737 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10738 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10739 echo "configure:10738: checking for $ac_hdr" >&5
10740 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10741   echo $ac_n "(cached) $ac_c" 1>&6
10742 else
10743   cat > conftest.$ac_ext <<EOF
10744 #line 10743 "configure"
10745 #include "confdefs.h"
10746 #include <$ac_hdr>
10747 EOF
10748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10749 { (eval echo configure:10748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10751 if test -z "$ac_err"; then
10752   rm -rf conftest*
10753   eval "ac_cv_header_$ac_safe=yes"
10754 else
10755   echo "$ac_err" >&5
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -rf conftest*
10759   eval "ac_cv_header_$ac_safe=no"
10760 fi
10761 rm -f conftest*
10762 fi
10763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10764   echo "$ac_t""yes" 1>&6
10765     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10766   cat >> confdefs.h <<EOF
10767 #define $ac_tr_hdr 1
10768 EOF
10769  
10770 else
10771   echo "$ac_t""no" 1>&6
10772 fi
10773 done
10774
10775                 if test $ac_cv_header_heim_err_h = yes ; then
10776                         krb5_impl=heimdal
10777                 else
10778                         krb5_impl=mit
10779                 fi
10780
10781                 if test $krb5_impl = mit; then
10782                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10783 echo "configure:10782: checking for main in -lk5crypto" >&5
10784 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10785 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10786   echo $ac_n "(cached) $ac_c" 1>&6
10787 else
10788   ac_save_LIBS="$LIBS"
10789 LIBS="-lk5crypto  $LIBS"
10790 cat > conftest.$ac_ext <<EOF
10791 #line 10790 "configure"
10792 #include "confdefs.h"
10793
10794 int main() {
10795 main()
10796 ; return 0; }
10797 EOF
10798 if { (eval echo configure:10797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10799   rm -rf conftest*
10800   eval "ac_cv_lib_$ac_lib_var=yes"
10801 else
10802   echo "configure: failed program was:" >&5
10803   cat conftest.$ac_ext >&5
10804   rm -rf conftest*
10805   eval "ac_cv_lib_$ac_lib_var=no"
10806 fi
10807 rm -f conftest*
10808 LIBS="$ac_save_LIBS"
10809
10810 fi
10811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10812   echo "$ac_t""yes" 1>&6
10813   krb5crypto=k5crypto
10814 else
10815   echo "$ac_t""no" 1>&6
10816 krb5crypto=crypto
10817 fi
10818
10819
10820                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10821 echo "configure:10820: checking for main in -lkrb5" >&5
10822 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10823 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10824   echo $ac_n "(cached) $ac_c" 1>&6
10825 else
10826   ac_save_LIBS="$LIBS"
10827 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10828 cat > conftest.$ac_ext <<EOF
10829 #line 10828 "configure"
10830 #include "confdefs.h"
10831
10832 int main() {
10833 main()
10834 ; return 0; }
10835 EOF
10836 if { (eval echo configure:10835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10837   rm -rf conftest*
10838   eval "ac_cv_lib_$ac_lib_var=yes"
10839 else
10840   echo "configure: failed program was:" >&5
10841   cat conftest.$ac_ext >&5
10842   rm -rf conftest*
10843   eval "ac_cv_lib_$ac_lib_var=no"
10844 fi
10845 rm -f conftest*
10846 LIBS="$ac_save_LIBS"
10847
10848 fi
10849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10850   echo "$ac_t""yes" 1>&6
10851   have_krb5=yes
10852                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10853 else
10854   echo "$ac_t""no" 1>&6
10855 have_krb5=no
10856 fi
10857
10858
10859                 elif test $krb5_impl = heimdal; then
10860                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10861 echo "configure:10860: checking for main in -ldes" >&5
10862 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10863 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10864   echo $ac_n "(cached) $ac_c" 1>&6
10865 else
10866   ac_save_LIBS="$LIBS"
10867 LIBS="-ldes  $LIBS"
10868 cat > conftest.$ac_ext <<EOF
10869 #line 10868 "configure"
10870 #include "confdefs.h"
10871
10872 int main() {
10873 main()
10874 ; return 0; }
10875 EOF
10876 if { (eval echo configure:10875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10877   rm -rf conftest*
10878   eval "ac_cv_lib_$ac_lib_var=yes"
10879 else
10880   echo "configure: failed program was:" >&5
10881   cat conftest.$ac_ext >&5
10882   rm -rf conftest*
10883   eval "ac_cv_lib_$ac_lib_var=no"
10884 fi
10885 rm -f conftest*
10886 LIBS="$ac_save_LIBS"
10887
10888 fi
10889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10890   echo "$ac_t""yes" 1>&6
10891   krb5crypto=des
10892 else
10893   echo "$ac_t""no" 1>&6
10894 krb5crypto=crypto
10895 fi
10896
10897
10898                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10899 echo "configure:10898: checking for main in -lkrb5" >&5
10900 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10901 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10902   echo $ac_n "(cached) $ac_c" 1>&6
10903 else
10904   ac_save_LIBS="$LIBS"
10905 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10906 cat > conftest.$ac_ext <<EOF
10907 #line 10906 "configure"
10908 #include "confdefs.h"
10909
10910 int main() {
10911 main()
10912 ; return 0; }
10913 EOF
10914 if { (eval echo configure:10913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10915   rm -rf conftest*
10916   eval "ac_cv_lib_$ac_lib_var=yes"
10917 else
10918   echo "configure: failed program was:" >&5
10919   cat conftest.$ac_ext >&5
10920   rm -rf conftest*
10921   eval "ac_cv_lib_$ac_lib_var=no"
10922 fi
10923 rm -f conftest*
10924 LIBS="$ac_save_LIBS"
10925
10926 fi
10927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10928   echo "$ac_t""yes" 1>&6
10929   have_krb5=yes
10930                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10931 else
10932   echo "$ac_t""no" 1>&6
10933 have_krb5=no
10934 fi
10935
10936
10937                         cat >> confdefs.h <<\EOF
10938 #define HAVE_HEIMDAL_KERBEROS 1
10939 EOF
10940
10941
10942                 else
10943                         have_krb5=no
10944                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10945                 fi
10946
10947                 if test $have_krb5 = yes ; then
10948                         ol_link_krb5=yes
10949
10950                         cat >> confdefs.h <<\EOF
10951 #define HAVE_KRB5 1
10952 EOF
10953
10954
10955                         if test $ol_with_kerberos = k5only ; then
10956                                 ol_with_kerberos=found
10957                         fi
10958
10959                 elif test $ol_with_kerberos != auto ; then
10960                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10961                 fi
10962
10963         fi
10964 fi
10965
10966 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10967         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10968
10969         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10970 do
10971 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10972 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10973 echo "configure:10972: checking for $ac_hdr" >&5
10974 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10975   echo $ac_n "(cached) $ac_c" 1>&6
10976 else
10977   cat > conftest.$ac_ext <<EOF
10978 #line 10977 "configure"
10979 #include "confdefs.h"
10980 #include <$ac_hdr>
10981 EOF
10982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10983 { (eval echo configure:10982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10985 if test -z "$ac_err"; then
10986   rm -rf conftest*
10987   eval "ac_cv_header_$ac_safe=yes"
10988 else
10989   echo "$ac_err" >&5
10990   echo "configure: failed program was:" >&5
10991   cat conftest.$ac_ext >&5
10992   rm -rf conftest*
10993   eval "ac_cv_header_$ac_safe=no"
10994 fi
10995 rm -f conftest*
10996 fi
10997 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10998   echo "$ac_t""yes" 1>&6
10999     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11000   cat >> confdefs.h <<EOF
11001 #define $ac_tr_hdr 1
11002 EOF
11003  
11004 else
11005   echo "$ac_t""no" 1>&6
11006 fi
11007 done
11008
11009
11010         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11011                 if test $krb5_impl = mit; then
11012                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11013 echo "configure:11012: checking for main in -lkrb4" >&5
11014 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11015 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11016   echo $ac_n "(cached) $ac_c" 1>&6
11017 else
11018   ac_save_LIBS="$LIBS"
11019 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11020 cat > conftest.$ac_ext <<EOF
11021 #line 11020 "configure"
11022 #include "confdefs.h"
11023
11024 int main() {
11025 main()
11026 ; return 0; }
11027 EOF
11028 if { (eval echo configure:11027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11029   rm -rf conftest*
11030   eval "ac_cv_lib_$ac_lib_var=yes"
11031 else
11032   echo "configure: failed program was:" >&5
11033   cat conftest.$ac_ext >&5
11034   rm -rf conftest*
11035   eval "ac_cv_lib_$ac_lib_var=no"
11036 fi
11037 rm -f conftest*
11038 LIBS="$ac_save_LIBS"
11039
11040 fi
11041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11042   echo "$ac_t""yes" 1>&6
11043   have_k425=yes
11044                                 KRB4_LIBS="-lkrb4 -ldes425"
11045 else
11046   echo "$ac_t""no" 1>&6
11047 have_k425=no
11048 fi
11049
11050
11051                 elif test $krb5_impl = heimdal; then
11052                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11053 echo "configure:11052: checking for main in -lkrb4" >&5
11054 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11055 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11056   echo $ac_n "(cached) $ac_c" 1>&6
11057 else
11058   ac_save_LIBS="$LIBS"
11059 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11060 cat > conftest.$ac_ext <<EOF
11061 #line 11060 "configure"
11062 #include "confdefs.h"
11063
11064 int main() {
11065 main()
11066 ; return 0; }
11067 EOF
11068 if { (eval echo configure:11067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11069   rm -rf conftest*
11070   eval "ac_cv_lib_$ac_lib_var=yes"
11071 else
11072   echo "configure: failed program was:" >&5
11073   cat conftest.$ac_ext >&5
11074   rm -rf conftest*
11075   eval "ac_cv_lib_$ac_lib_var=no"
11076 fi
11077 rm -f conftest*
11078 LIBS="$ac_save_LIBS"
11079
11080 fi
11081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11082   echo "$ac_t""yes" 1>&6
11083   have_k425=yes
11084                                 KRB4_LIBS="-lkrb4"
11085 else
11086   echo "$ac_t""no" 1>&6
11087 have_k425=no
11088 fi
11089
11090
11091                 else
11092                         have_425=no
11093                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11094                 fi
11095
11096                 if test $have_k425 = yes ; then
11097                         ol_with_kerberos=found
11098                         ol_link_krb4=yes
11099
11100                         cat >> confdefs.h <<\EOF
11101 #define HAVE_KRB425 1
11102 EOF
11103
11104                         cat >> confdefs.h <<\EOF
11105 #define HAVE_KRB4 1
11106 EOF
11107
11108
11109                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11110 echo "configure:11109: checking for des_debug in Kerberos libraries" >&5
11111 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11112   echo $ac_n "(cached) $ac_c" 1>&6
11113 else
11114   
11115                                                                 save_LIBS="$LIBS"
11116                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11117                                 cat > conftest.$ac_ext <<EOF
11118 #line 11117 "configure"
11119 #include "confdefs.h"
11120
11121 #include <kerberosIV/krb.h>
11122 #include <kerberosIV/des.h>
11123 extern int des_debug;
11124
11125 int main() {
11126
11127 des_debug = 1;
11128
11129 ; return 0; }
11130 EOF
11131 if { (eval echo configure:11130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11132   rm -rf conftest*
11133   ol_cv_var_des_debug=yes
11134 else
11135   echo "configure: failed program was:" >&5
11136   cat conftest.$ac_ext >&5
11137   rm -rf conftest*
11138   ol_cv_var_des_debug=no
11139 fi
11140 rm -f conftest*
11141                                                                 LIBS="$save_LIBS"
11142                         
11143 fi
11144
11145 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11146
11147                         if test $ol_cv_var_des_debug = yes ; then
11148                                 cat >> confdefs.h <<\EOF
11149 #define HAVE_DES_DEBUG 1
11150 EOF
11151
11152                         fi
11153
11154                         LIBS="$save_LIBS"
11155                 fi
11156         fi
11157 fi
11158
11159 if test $ol_link_krb5 = yes ; then
11160         ol_with_kerberos=found
11161 fi
11162
11163 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11164         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11165
11166         for ac_hdr in krb.h des.h krb-archaeology.h 
11167 do
11168 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11169 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11170 echo "configure:11169: checking for $ac_hdr" >&5
11171 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11172   echo $ac_n "(cached) $ac_c" 1>&6
11173 else
11174   cat > conftest.$ac_ext <<EOF
11175 #line 11174 "configure"
11176 #include "confdefs.h"
11177 #include <$ac_hdr>
11178 EOF
11179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11180 { (eval echo configure:11179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11182 if test -z "$ac_err"; then
11183   rm -rf conftest*
11184   eval "ac_cv_header_$ac_safe=yes"
11185 else
11186   echo "$ac_err" >&5
11187   echo "configure: failed program was:" >&5
11188   cat conftest.$ac_ext >&5
11189   rm -rf conftest*
11190   eval "ac_cv_header_$ac_safe=no"
11191 fi
11192 rm -f conftest*
11193 fi
11194 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11195   echo "$ac_t""yes" 1>&6
11196     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11197   cat >> confdefs.h <<EOF
11198 #define $ac_tr_hdr 1
11199 EOF
11200  
11201 else
11202   echo "$ac_t""no" 1>&6
11203 fi
11204 done
11205
11206
11207         if test $ac_cv_header_krb_h = yes ; then
11208                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11209 echo "configure:11208: checking for main in -lkrb" >&5
11210 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11211 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11212   echo $ac_n "(cached) $ac_c" 1>&6
11213 else
11214   ac_save_LIBS="$LIBS"
11215 LIBS="-lkrb -ldes $LIBS"
11216 cat > conftest.$ac_ext <<EOF
11217 #line 11216 "configure"
11218 #include "confdefs.h"
11219
11220 int main() {
11221 main()
11222 ; return 0; }
11223 EOF
11224 if { (eval echo configure:11223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11225   rm -rf conftest*
11226   eval "ac_cv_lib_$ac_lib_var=yes"
11227 else
11228   echo "configure: failed program was:" >&5
11229   cat conftest.$ac_ext >&5
11230   rm -rf conftest*
11231   eval "ac_cv_lib_$ac_lib_var=no"
11232 fi
11233 rm -f conftest*
11234 LIBS="$ac_save_LIBS"
11235
11236 fi
11237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11238   echo "$ac_t""yes" 1>&6
11239   have_k4=yes
11240 else
11241   echo "$ac_t""no" 1>&6
11242 have_k4=no
11243 fi
11244
11245
11246                 if test $have_k4 = yes ; then
11247                         ol_with_kerberos=found
11248                         ol_link_krb4=yes
11249
11250                         cat >> confdefs.h <<\EOF
11251 #define HAVE_KRB4 1
11252 EOF
11253
11254
11255                         KRB4_LIBS="-lkrb -ldes"
11256
11257                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11258                                 cat >> confdefs.h <<\EOF
11259 #define HAVE_KTH_KERBEROS 1
11260 EOF
11261
11262                         fi
11263                 fi
11264         fi
11265 fi
11266
11267 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11268         ol_link_kbind=yes
11269
11270 elif test $ol_enable_kbind = yes ; then
11271         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11272 fi
11273
11274 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11275         cat >> confdefs.h <<\EOF
11276 #define HAVE_KERBEROS 1
11277 EOF
11278
11279
11280 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11281         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11282 fi
11283
11284         
11285 ol_link_tls=no
11286 if test $ol_with_tls != no ; then
11287         for ac_hdr in openssl/ssl.h ssl.h
11288 do
11289 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11290 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11291 echo "configure:11290: checking for $ac_hdr" >&5
11292 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11293   echo $ac_n "(cached) $ac_c" 1>&6
11294 else
11295   cat > conftest.$ac_ext <<EOF
11296 #line 11295 "configure"
11297 #include "confdefs.h"
11298 #include <$ac_hdr>
11299 EOF
11300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11301 { (eval echo configure:11300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11303 if test -z "$ac_err"; then
11304   rm -rf conftest*
11305   eval "ac_cv_header_$ac_safe=yes"
11306 else
11307   echo "$ac_err" >&5
11308   echo "configure: failed program was:" >&5
11309   cat conftest.$ac_ext >&5
11310   rm -rf conftest*
11311   eval "ac_cv_header_$ac_safe=no"
11312 fi
11313 rm -f conftest*
11314 fi
11315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11316   echo "$ac_t""yes" 1>&6
11317     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11318   cat >> confdefs.h <<EOF
11319 #define $ac_tr_hdr 1
11320 EOF
11321  
11322 else
11323   echo "$ac_t""no" 1>&6
11324 fi
11325 done
11326
11327
11328         if test $ac_cv_header_openssl_ssl_h = yes \
11329                 -o $ac_cv_header_ssl_h = yes ; then
11330                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11331 echo "configure:11330: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11332 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11333 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11334   echo $ac_n "(cached) $ac_c" 1>&6
11335 else
11336   ac_save_LIBS="$LIBS"
11337 LIBS="-lssl -lcrypto $LIBS"
11338 cat > conftest.$ac_ext <<EOF
11339 #line 11338 "configure"
11340 #include "confdefs.h"
11341 /* Override any gcc2 internal prototype to avoid an error.  */
11342 /* We use char because int might match the return type of a gcc2
11343     builtin and then its argument prototype would still apply.  */
11344 char SSLeay_add_ssl_algorithms();
11345
11346 int main() {
11347 SSLeay_add_ssl_algorithms()
11348 ; return 0; }
11349 EOF
11350 if { (eval echo configure:11349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11351   rm -rf conftest*
11352   eval "ac_cv_lib_$ac_lib_var=yes"
11353 else
11354   echo "configure: failed program was:" >&5
11355   cat conftest.$ac_ext >&5
11356   rm -rf conftest*
11357   eval "ac_cv_lib_$ac_lib_var=no"
11358 fi
11359 rm -f conftest*
11360 LIBS="$ac_save_LIBS"
11361
11362 fi
11363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11364   echo "$ac_t""yes" 1>&6
11365   have_ssleay=yes
11366                         need_rsaref=no
11367 else
11368   echo "$ac_t""no" 1>&6
11369 have_ssleay=no
11370 fi
11371
11372                         
11373                 if test $have_ssleay = no ; then
11374                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11375 echo "configure:11374: checking for SSL_library_init in -lssl" >&5
11376 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11377 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11378   echo $ac_n "(cached) $ac_c" 1>&6
11379 else
11380   ac_save_LIBS="$LIBS"
11381 LIBS="-lssl -lcrypto $LIBS"
11382 cat > conftest.$ac_ext <<EOF
11383 #line 11382 "configure"
11384 #include "confdefs.h"
11385 /* Override any gcc2 internal prototype to avoid an error.  */
11386 /* We use char because int might match the return type of a gcc2
11387     builtin and then its argument prototype would still apply.  */
11388 char SSL_library_init();
11389
11390 int main() {
11391 SSL_library_init()
11392 ; return 0; }
11393 EOF
11394 if { (eval echo configure:11393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11395   rm -rf conftest*
11396   eval "ac_cv_lib_$ac_lib_var=yes"
11397 else
11398   echo "configure: failed program was:" >&5
11399   cat conftest.$ac_ext >&5
11400   rm -rf conftest*
11401   eval "ac_cv_lib_$ac_lib_var=no"
11402 fi
11403 rm -f conftest*
11404 LIBS="$ac_save_LIBS"
11405
11406 fi
11407 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11408   echo "$ac_t""yes" 1>&6
11409   have_ssleay=yes
11410                                 need_rsaref=no
11411 else
11412   echo "$ac_t""no" 1>&6
11413 have_ssleay=no
11414 fi
11415
11416                 fi
11417
11418                 if test $have_ssleay = no ; then
11419                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11420 echo "configure:11419: checking for ssl3_accept in -lssl" >&5
11421 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11422 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11423   echo $ac_n "(cached) $ac_c" 1>&6
11424 else
11425   ac_save_LIBS="$LIBS"
11426 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11427 cat > conftest.$ac_ext <<EOF
11428 #line 11427 "configure"
11429 #include "confdefs.h"
11430 /* Override any gcc2 internal prototype to avoid an error.  */
11431 /* We use char because int might match the return type of a gcc2
11432     builtin and then its argument prototype would still apply.  */
11433 char ssl3_accept();
11434
11435 int main() {
11436 ssl3_accept()
11437 ; return 0; }
11438 EOF
11439 if { (eval echo configure:11438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11440   rm -rf conftest*
11441   eval "ac_cv_lib_$ac_lib_var=yes"
11442 else
11443   echo "configure: failed program was:" >&5
11444   cat conftest.$ac_ext >&5
11445   rm -rf conftest*
11446   eval "ac_cv_lib_$ac_lib_var=no"
11447 fi
11448 rm -f conftest*
11449 LIBS="$ac_save_LIBS"
11450
11451 fi
11452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11453   echo "$ac_t""yes" 1>&6
11454   have_ssleay=yes
11455                                 need_rsaref=yes
11456 else
11457   echo "$ac_t""no" 1>&6
11458 have_ssleay=no
11459 fi
11460
11461                 fi
11462
11463                 if test $have_ssleay = yes ; then
11464                         ol_with_tls=found
11465                         ol_link_tls=yes
11466
11467                         cat >> confdefs.h <<\EOF
11468 #define HAVE_SSLEAY 1
11469 EOF
11470
11471
11472                         if test $need_rsaref = yes; then
11473                                 cat >> confdefs.h <<\EOF
11474 #define HAVE_RSAREF 1
11475 EOF
11476
11477
11478                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11479                         else
11480                                 TLS_LIBS="-lssl -lcrypto"
11481                         fi
11482                 fi
11483         fi
11484
11485 else
11486         echo "configure: warning: TLS data protection not supported!" 1>&2
11487 fi
11488
11489 WITH_TLS=no
11490 if test $ol_link_tls = yes ; then
11491         cat >> confdefs.h <<\EOF
11492 #define HAVE_TLS 1
11493 EOF
11494
11495         WITH_TLS=yes
11496
11497 elif test $ol_with_tls = auto ; then
11498         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11499         echo "configure: warning: TLS data protection not supported!" 1>&2
11500
11501 elif test $ol_with_tls != no ; then
11502         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11503 fi
11504
11505 if test $ol_enable_lmpasswd != no; then
11506         if test $ol_link_tls != yes ; then
11507                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11508         fi
11509
11510         cat >> confdefs.h <<\EOF
11511 #define SLAPD_LMHASH 1
11512 EOF
11513
11514 fi
11515
11516 ol_link_threads=no
11517
11518 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11519         -o $ol_with_threads = nt ; then
11520
11521         
11522         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11523 echo "configure:11522: checking for _beginthread" >&5
11524 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11525   echo $ac_n "(cached) $ac_c" 1>&6
11526 else
11527   cat > conftest.$ac_ext <<EOF
11528 #line 11527 "configure"
11529 #include "confdefs.h"
11530 /* System header to define __stub macros and hopefully few prototypes,
11531     which can conflict with char _beginthread(); below.  */
11532 #include <assert.h>
11533 /* Override any gcc2 internal prototype to avoid an error.  */
11534 /* We use char because int might match the return type of a gcc2
11535     builtin and then its argument prototype would still apply.  */
11536 char _beginthread();
11537 char (*f)();
11538
11539 int main() {
11540
11541 /* The GNU C library defines this for functions which it implements
11542     to always fail with ENOSYS.  Some functions are actually named
11543     something starting with __ and the normal name is an alias.  */
11544 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11545 choke me
11546 #else
11547 f = _beginthread;
11548 #endif
11549
11550 ; return 0; }
11551 EOF
11552 if { (eval echo configure:11551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11553   rm -rf conftest*
11554   eval "ac_cv_func__beginthread=yes"
11555 else
11556   echo "configure: failed program was:" >&5
11557   cat conftest.$ac_ext >&5
11558   rm -rf conftest*
11559   eval "ac_cv_func__beginthread=no"
11560 fi
11561 rm -f conftest*
11562 fi
11563
11564 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11565   echo "$ac_t""yes" 1>&6
11566   :
11567 else
11568   echo "$ac_t""no" 1>&6
11569 fi
11570
11571
11572         if test $ac_cv_func__beginthread = yes ; then
11573                 cat >> confdefs.h <<\EOF
11574 #define HAVE_NT_THREADS 1
11575 EOF
11576
11577                 ol_cv_nt_threads=yes
11578         fi
11579
11580
11581         if test "$ol_cv_nt_threads" = yes ; then
11582                 ol_link_threads=nt
11583                 ol_with_threads=found
11584                 ol_with_yielding_select=yes
11585
11586                 cat >> confdefs.h <<\EOF
11587 #define HAVE_NT_SERVICE_MANAGER 1
11588 EOF
11589
11590                 cat >> confdefs.h <<\EOF
11591 #define HAVE_NT_EVENT_LOG 1
11592 EOF
11593
11594         fi
11595
11596         if test $ol_with_threads = nt ; then
11597                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11598         fi
11599 fi
11600
11601 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11602         -o $ol_with_threads = posix ; then
11603
11604         for ac_hdr in pthread.h
11605 do
11606 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11607 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11608 echo "configure:11607: checking for $ac_hdr" >&5
11609 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11610   echo $ac_n "(cached) $ac_c" 1>&6
11611 else
11612   cat > conftest.$ac_ext <<EOF
11613 #line 11612 "configure"
11614 #include "confdefs.h"
11615 #include <$ac_hdr>
11616 EOF
11617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11618 { (eval echo configure:11617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11619 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11620 if test -z "$ac_err"; then
11621   rm -rf conftest*
11622   eval "ac_cv_header_$ac_safe=yes"
11623 else
11624   echo "$ac_err" >&5
11625   echo "configure: failed program was:" >&5
11626   cat conftest.$ac_ext >&5
11627   rm -rf conftest*
11628   eval "ac_cv_header_$ac_safe=no"
11629 fi
11630 rm -f conftest*
11631 fi
11632 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11633   echo "$ac_t""yes" 1>&6
11634     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11635   cat >> confdefs.h <<EOF
11636 #define $ac_tr_hdr 1
11637 EOF
11638  
11639 else
11640   echo "$ac_t""no" 1>&6
11641 fi
11642 done
11643
11644
11645         if test $ac_cv_header_pthread_h = yes ; then
11646                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11647 echo "configure:11646: checking POSIX thread version" >&5
11648 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11649   echo $ac_n "(cached) $ac_c" 1>&6
11650 else
11651   
11652         cat > conftest.$ac_ext <<EOF
11653 #line 11652 "configure"
11654 #include "confdefs.h"
11655
11656 #               include <pthread.h>
11657         
11658 int main() {
11659
11660                 int i = PTHREAD_CREATE_JOINABLE;
11661         
11662 ; return 0; }
11663 EOF
11664 if { (eval echo configure:11663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11665   rm -rf conftest*
11666   
11667         cat > conftest.$ac_ext <<EOF
11668 #line 11667 "configure"
11669 #include "confdefs.h"
11670 #include <pthread.h>
11671 EOF
11672 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11673   egrep "pthread_detach" >/dev/null 2>&1; then
11674   rm -rf conftest*
11675   ol_cv_pthread_version=10
11676 else
11677   rm -rf conftest*
11678   ol_cv_pthread_version=8
11679 fi
11680 rm -f conftest*
11681
11682 else
11683   echo "configure: failed program was:" >&5
11684   cat conftest.$ac_ext >&5
11685   rm -rf conftest*
11686   
11687         cat > conftest.$ac_ext <<EOF
11688 #line 11687 "configure"
11689 #include "confdefs.h"
11690
11691 #               include <pthread.h>
11692 #               ifdef PTHREAD_CREATE_UNDETACHED
11693                 draft7
11694 #               endif
11695         
11696 EOF
11697 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11698   egrep "draft7" >/dev/null 2>&1; then
11699   rm -rf conftest*
11700   ol_cv_pthread_version=7
11701 else
11702   rm -rf conftest*
11703   
11704         cat > conftest.$ac_ext <<EOF
11705 #line 11704 "configure"
11706 #include "confdefs.h"
11707 #include <pthread.h>
11708 EOF
11709 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11710   egrep "pthread_attr_init" >/dev/null 2>&1; then
11711   rm -rf conftest*
11712   ol_cv_pthread_version=6
11713 else
11714   rm -rf conftest*
11715   
11716         cat > conftest.$ac_ext <<EOF
11717 #line 11716 "configure"
11718 #include "confdefs.h"
11719
11720 #               include <pthread.h>
11721 #ifdef          PTHREAD_MUTEX_INITIALIZER
11722                 draft5
11723 #endif
11724         
11725 EOF
11726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11727   egrep "draft5" >/dev/null 2>&1; then
11728   rm -rf conftest*
11729   ol_cv_pthread_version=5
11730 else
11731   rm -rf conftest*
11732   ol_cv_pthread_version=4
11733 fi
11734 rm -f conftest*
11735  
11736 fi
11737 rm -f conftest*
11738  
11739 fi
11740 rm -f conftest*
11741  
11742 fi
11743 rm -f conftest*
11744
11745 fi
11746
11747 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11748
11749
11750                 if test $ol_cv_pthread_version != 0 ; then
11751                         cat >> confdefs.h <<EOF
11752 #define HAVE_PTHREADS $ol_cv_pthread_version
11753 EOF
11754
11755                 else
11756                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11757                 fi
11758
11759                 # consider threads found
11760                 ol_with_threads=found
11761
11762                 
11763         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11764 echo "configure:11763: checking for LinuxThreads pthread.h" >&5
11765 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11766   echo $ac_n "(cached) $ac_c" 1>&6
11767 else
11768   cat > conftest.$ac_ext <<EOF
11769 #line 11768 "configure"
11770 #include "confdefs.h"
11771 #include <pthread.h>
11772 EOF
11773 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11774   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11775   rm -rf conftest*
11776   ol_cv_header_linux_threads=yes
11777 else
11778   rm -rf conftest*
11779   ol_cv_header_linux_threads=no
11780 fi
11781 rm -f conftest*
11782
11783                 
11784 fi
11785
11786 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11787         if test $ol_cv_header_linux_threads = yes; then
11788                 cat >> confdefs.h <<\EOF
11789 #define HAVE_LINUX_THREADS 1
11790 EOF
11791
11792         fi
11793
11794                 
11795         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11796 echo "configure:11795: checking for GNU Pth pthread.h" >&5
11797 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11798   echo $ac_n "(cached) $ac_c" 1>&6
11799 else
11800   cat > conftest.$ac_ext <<EOF
11801 #line 11800 "configure"
11802 #include "confdefs.h"
11803 #include <pthread.h>
11804 #ifdef _POSIX_THREAD_IS_GNU_PTH
11805         __gnu_pth__;
11806 #endif
11807
11808 EOF
11809 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11810   egrep "__gnu_pth__" >/dev/null 2>&1; then
11811   rm -rf conftest*
11812   ol_cv_header_gnu_pth_pthread_h=yes
11813 else
11814   rm -rf conftest*
11815   ol_cv_header_gnu_pth_pthread_h=no
11816 fi
11817 rm -f conftest*
11818
11819                 
11820 fi
11821
11822 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11823
11824
11825                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11826                         for ac_hdr in sched.h
11827 do
11828 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11829 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11830 echo "configure:11829: checking for $ac_hdr" >&5
11831 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11832   echo $ac_n "(cached) $ac_c" 1>&6
11833 else
11834   cat > conftest.$ac_ext <<EOF
11835 #line 11834 "configure"
11836 #include "confdefs.h"
11837 #include <$ac_hdr>
11838 EOF
11839 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11840 { (eval echo configure:11839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11841 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11842 if test -z "$ac_err"; then
11843   rm -rf conftest*
11844   eval "ac_cv_header_$ac_safe=yes"
11845 else
11846   echo "$ac_err" >&5
11847   echo "configure: failed program was:" >&5
11848   cat conftest.$ac_ext >&5
11849   rm -rf conftest*
11850   eval "ac_cv_header_$ac_safe=no"
11851 fi
11852 rm -f conftest*
11853 fi
11854 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11855   echo "$ac_t""yes" 1>&6
11856     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11857   cat >> confdefs.h <<EOF
11858 #define $ac_tr_hdr 1
11859 EOF
11860  
11861 else
11862   echo "$ac_t""no" 1>&6
11863 fi
11864 done
11865
11866                 fi
11867
11868                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11869                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11870 echo "configure:11869: checking for pthread_create in default libraries" >&5
11871 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11872   echo $ac_n "(cached) $ac_c" 1>&6
11873 else
11874   
11875                 if test "$cross_compiling" = yes; then
11876   cat > conftest.$ac_ext <<EOF
11877 #line 11876 "configure"
11878 #include "confdefs.h"
11879 /* pthread test headers */
11880 #include <pthread.h>
11881 #if HAVE_PTHREADS < 7
11882 #include <errno.h>
11883 #endif
11884 #ifndef NULL
11885 #define NULL (void*)0
11886 #endif
11887
11888 static void *task(p)
11889         void *p;
11890 {
11891         return (void *) (p == NULL);
11892 }
11893
11894 int main() {
11895
11896         /* pthread test function */
11897 #ifndef PTHREAD_CREATE_DETACHED
11898 #define PTHREAD_CREATE_DETACHED 1
11899 #endif
11900         pthread_t t;
11901         int status;
11902         int detach = PTHREAD_CREATE_DETACHED;
11903
11904 #if HAVE_PTHREADS > 4
11905         /* Final pthreads */
11906         pthread_attr_t attr;
11907
11908         status = pthread_attr_init(&attr);
11909         if( status ) return status;
11910
11911 #if HAVE_PTHREADS < 7
11912         status = pthread_attr_setdetachstate(&attr, &detach);
11913         if( status < 0 ) status = errno;
11914 #else
11915         status = pthread_attr_setdetachstate(&attr, detach);
11916 #endif
11917         if( status ) return status;
11918         status = pthread_create( &t, &attr, task, NULL );
11919 #if HAVE_PTHREADS < 7
11920         if( status < 0 ) status = errno;
11921 #endif
11922         if( status ) return status;
11923 #else
11924         /* Draft 4 pthreads */
11925         status = pthread_create( &t, pthread_attr_default, task, NULL );
11926         if( status ) return errno;
11927
11928         /* give thread a chance to complete */
11929         /* it should remain joinable and hence detachable */
11930         sleep( 1 );
11931
11932         status = pthread_detach( &t );
11933         if( status ) return errno;
11934 #endif
11935
11936 #ifdef HAVE_LINUX_THREADS
11937         pthread_kill_other_threads_np();
11938 #endif
11939
11940         return 0;
11941
11942 ; return 0; }
11943 EOF
11944 if { (eval echo configure:11943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11945   rm -rf conftest*
11946   ol_cv_pthread_create=yes
11947 else
11948   echo "configure: failed program was:" >&5
11949   cat conftest.$ac_ext >&5
11950   rm -rf conftest*
11951   ol_cv_pthread_create=no
11952 fi
11953 rm -f conftest*
11954 else
11955   cat > conftest.$ac_ext <<EOF
11956 #line 11955 "configure"
11957 #include "confdefs.h"
11958 /* pthread test headers */
11959 #include <pthread.h>
11960 #if HAVE_PTHREADS < 7
11961 #include <errno.h>
11962 #endif
11963 #ifndef NULL
11964 #define NULL (void*)0
11965 #endif
11966
11967 static void *task(p)
11968         void *p;
11969 {
11970         return (void *) (p == NULL);
11971 }
11972
11973
11974 int main(argc, argv)
11975         int argc;
11976         char **argv;
11977 {
11978
11979         /* pthread test function */
11980 #ifndef PTHREAD_CREATE_DETACHED
11981 #define PTHREAD_CREATE_DETACHED 1
11982 #endif
11983         pthread_t t;
11984         int status;
11985         int detach = PTHREAD_CREATE_DETACHED;
11986
11987 #if HAVE_PTHREADS > 4
11988         /* Final pthreads */
11989         pthread_attr_t attr;
11990
11991         status = pthread_attr_init(&attr);
11992         if( status ) return status;
11993
11994 #if HAVE_PTHREADS < 7
11995         status = pthread_attr_setdetachstate(&attr, &detach);
11996         if( status < 0 ) status = errno;
11997 #else
11998         status = pthread_attr_setdetachstate(&attr, detach);
11999 #endif
12000         if( status ) return status;
12001         status = pthread_create( &t, &attr, task, NULL );
12002 #if HAVE_PTHREADS < 7
12003         if( status < 0 ) status = errno;
12004 #endif
12005         if( status ) return status;
12006 #else
12007         /* Draft 4 pthreads */
12008         status = pthread_create( &t, pthread_attr_default, task, NULL );
12009         if( status ) return errno;
12010
12011         /* give thread a chance to complete */
12012         /* it should remain joinable and hence detachable */
12013         sleep( 1 );
12014
12015         status = pthread_detach( &t );
12016         if( status ) return errno;
12017 #endif
12018
12019 #ifdef HAVE_LINUX_THREADS
12020         pthread_kill_other_threads_np();
12021 #endif
12022
12023         return 0;
12024
12025 }
12026
12027 EOF
12028 if { (eval echo configure:12027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12029 then
12030   ol_cv_pthread_create=yes
12031 else
12032   echo "configure: failed program was:" >&5
12033   cat conftest.$ac_ext >&5
12034   rm -fr conftest*
12035   ol_cv_pthread_create=no
12036 fi
12037 rm -fr conftest*
12038 fi
12039
12040 fi
12041
12042 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12043
12044                 if test $ol_cv_pthread_create != no ; then
12045                         ol_link_threads=posix
12046                         ol_link_pthreads=""
12047                 fi
12048                 
12049                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12050 if test "$ol_link_threads" = no ; then
12051         # try -kthread
12052         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12053 echo "configure:12052: checking for pthread link with -kthread" >&5
12054 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12055   echo $ac_n "(cached) $ac_c" 1>&6
12056 else
12057   
12058                 # save the flags
12059                 ol_LIBS="$LIBS"
12060                 LIBS="-kthread $LIBS"
12061
12062                 if test "$cross_compiling" = yes; then
12063   cat > conftest.$ac_ext <<EOF
12064 #line 12063 "configure"
12065 #include "confdefs.h"
12066 /* pthread test headers */
12067 #include <pthread.h>
12068 #if HAVE_PTHREADS < 7
12069 #include <errno.h>
12070 #endif
12071 #ifndef NULL
12072 #define NULL (void*)0
12073 #endif
12074
12075 static void *task(p)
12076         void *p;
12077 {
12078         return (void *) (p == NULL);
12079 }
12080
12081 int main() {
12082
12083         /* pthread test function */
12084 #ifndef PTHREAD_CREATE_DETACHED
12085 #define PTHREAD_CREATE_DETACHED 1
12086 #endif
12087         pthread_t t;
12088         int status;
12089         int detach = PTHREAD_CREATE_DETACHED;
12090
12091 #if HAVE_PTHREADS > 4
12092         /* Final pthreads */
12093         pthread_attr_t attr;
12094
12095         status = pthread_attr_init(&attr);
12096         if( status ) return status;
12097
12098 #if HAVE_PTHREADS < 7
12099         status = pthread_attr_setdetachstate(&attr, &detach);
12100         if( status < 0 ) status = errno;
12101 #else
12102         status = pthread_attr_setdetachstate(&attr, detach);
12103 #endif
12104         if( status ) return status;
12105         status = pthread_create( &t, &attr, task, NULL );
12106 #if HAVE_PTHREADS < 7
12107         if( status < 0 ) status = errno;
12108 #endif
12109         if( status ) return status;
12110 #else
12111         /* Draft 4 pthreads */
12112         status = pthread_create( &t, pthread_attr_default, task, NULL );
12113         if( status ) return errno;
12114
12115         /* give thread a chance to complete */
12116         /* it should remain joinable and hence detachable */
12117         sleep( 1 );
12118
12119         status = pthread_detach( &t );
12120         if( status ) return errno;
12121 #endif
12122
12123 #ifdef HAVE_LINUX_THREADS
12124         pthread_kill_other_threads_np();
12125 #endif
12126
12127         return 0;
12128
12129 ; return 0; }
12130 EOF
12131 if { (eval echo configure:12130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12132   rm -rf conftest*
12133   ol_cv_pthread_kthread=yes
12134 else
12135   echo "configure: failed program was:" >&5
12136   cat conftest.$ac_ext >&5
12137   rm -rf conftest*
12138   ol_cv_pthread_kthread=no
12139 fi
12140 rm -f conftest*
12141 else
12142   cat > conftest.$ac_ext <<EOF
12143 #line 12142 "configure"
12144 #include "confdefs.h"
12145 /* pthread test headers */
12146 #include <pthread.h>
12147 #if HAVE_PTHREADS < 7
12148 #include <errno.h>
12149 #endif
12150 #ifndef NULL
12151 #define NULL (void*)0
12152 #endif
12153
12154 static void *task(p)
12155         void *p;
12156 {
12157         return (void *) (p == NULL);
12158 }
12159
12160
12161 int main(argc, argv)
12162         int argc;
12163         char **argv;
12164 {
12165
12166         /* pthread test function */
12167 #ifndef PTHREAD_CREATE_DETACHED
12168 #define PTHREAD_CREATE_DETACHED 1
12169 #endif
12170         pthread_t t;
12171         int status;
12172         int detach = PTHREAD_CREATE_DETACHED;
12173
12174 #if HAVE_PTHREADS > 4
12175         /* Final pthreads */
12176         pthread_attr_t attr;
12177
12178         status = pthread_attr_init(&attr);
12179         if( status ) return status;
12180
12181 #if HAVE_PTHREADS < 7
12182         status = pthread_attr_setdetachstate(&attr, &detach);
12183         if( status < 0 ) status = errno;
12184 #else
12185         status = pthread_attr_setdetachstate(&attr, detach);
12186 #endif
12187         if( status ) return status;
12188         status = pthread_create( &t, &attr, task, NULL );
12189 #if HAVE_PTHREADS < 7
12190         if( status < 0 ) status = errno;
12191 #endif
12192         if( status ) return status;
12193 #else
12194         /* Draft 4 pthreads */
12195         status = pthread_create( &t, pthread_attr_default, task, NULL );
12196         if( status ) return errno;
12197
12198         /* give thread a chance to complete */
12199         /* it should remain joinable and hence detachable */
12200         sleep( 1 );
12201
12202         status = pthread_detach( &t );
12203         if( status ) return errno;
12204 #endif
12205
12206 #ifdef HAVE_LINUX_THREADS
12207         pthread_kill_other_threads_np();
12208 #endif
12209
12210         return 0;
12211
12212 }
12213
12214 EOF
12215 if { (eval echo configure:12214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12216 then
12217   ol_cv_pthread_kthread=yes
12218 else
12219   echo "configure: failed program was:" >&5
12220   cat conftest.$ac_ext >&5
12221   rm -fr conftest*
12222   ol_cv_pthread_kthread=no
12223 fi
12224 rm -fr conftest*
12225 fi
12226
12227
12228                 # restore the LIBS
12229                 LIBS="$ol_LIBS"
12230         
12231 fi
12232
12233 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12234
12235         if test $ol_cv_pthread_kthread = yes ; then
12236                 ol_link_pthreads="-kthread"
12237                 ol_link_threads=posix
12238         fi
12239 fi
12240
12241                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12242 if test "$ol_link_threads" = no ; then
12243         # try -pthread
12244         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12245 echo "configure:12244: checking for pthread link with -pthread" >&5
12246 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12247   echo $ac_n "(cached) $ac_c" 1>&6
12248 else
12249   
12250                 # save the flags
12251                 ol_LIBS="$LIBS"
12252                 LIBS="-pthread $LIBS"
12253
12254                 if test "$cross_compiling" = yes; then
12255   cat > conftest.$ac_ext <<EOF
12256 #line 12255 "configure"
12257 #include "confdefs.h"
12258 /* pthread test headers */
12259 #include <pthread.h>
12260 #if HAVE_PTHREADS < 7
12261 #include <errno.h>
12262 #endif
12263 #ifndef NULL
12264 #define NULL (void*)0
12265 #endif
12266
12267 static void *task(p)
12268         void *p;
12269 {
12270         return (void *) (p == NULL);
12271 }
12272
12273 int main() {
12274
12275         /* pthread test function */
12276 #ifndef PTHREAD_CREATE_DETACHED
12277 #define PTHREAD_CREATE_DETACHED 1
12278 #endif
12279         pthread_t t;
12280         int status;
12281         int detach = PTHREAD_CREATE_DETACHED;
12282
12283 #if HAVE_PTHREADS > 4
12284         /* Final pthreads */
12285         pthread_attr_t attr;
12286
12287         status = pthread_attr_init(&attr);
12288         if( status ) return status;
12289
12290 #if HAVE_PTHREADS < 7
12291         status = pthread_attr_setdetachstate(&attr, &detach);
12292         if( status < 0 ) status = errno;
12293 #else
12294         status = pthread_attr_setdetachstate(&attr, detach);
12295 #endif
12296         if( status ) return status;
12297         status = pthread_create( &t, &attr, task, NULL );
12298 #if HAVE_PTHREADS < 7
12299         if( status < 0 ) status = errno;
12300 #endif
12301         if( status ) return status;
12302 #else
12303         /* Draft 4 pthreads */
12304         status = pthread_create( &t, pthread_attr_default, task, NULL );
12305         if( status ) return errno;
12306
12307         /* give thread a chance to complete */
12308         /* it should remain joinable and hence detachable */
12309         sleep( 1 );
12310
12311         status = pthread_detach( &t );
12312         if( status ) return errno;
12313 #endif
12314
12315 #ifdef HAVE_LINUX_THREADS
12316         pthread_kill_other_threads_np();
12317 #endif
12318
12319         return 0;
12320
12321 ; return 0; }
12322 EOF
12323 if { (eval echo configure:12322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12324   rm -rf conftest*
12325   ol_cv_pthread_pthread=yes
12326 else
12327   echo "configure: failed program was:" >&5
12328   cat conftest.$ac_ext >&5
12329   rm -rf conftest*
12330   ol_cv_pthread_pthread=no
12331 fi
12332 rm -f conftest*
12333 else
12334   cat > conftest.$ac_ext <<EOF
12335 #line 12334 "configure"
12336 #include "confdefs.h"
12337 /* pthread test headers */
12338 #include <pthread.h>
12339 #if HAVE_PTHREADS < 7
12340 #include <errno.h>
12341 #endif
12342 #ifndef NULL
12343 #define NULL (void*)0
12344 #endif
12345
12346 static void *task(p)
12347         void *p;
12348 {
12349         return (void *) (p == NULL);
12350 }
12351
12352
12353 int main(argc, argv)
12354         int argc;
12355         char **argv;
12356 {
12357
12358         /* pthread test function */
12359 #ifndef PTHREAD_CREATE_DETACHED
12360 #define PTHREAD_CREATE_DETACHED 1
12361 #endif
12362         pthread_t t;
12363         int status;
12364         int detach = PTHREAD_CREATE_DETACHED;
12365
12366 #if HAVE_PTHREADS > 4
12367         /* Final pthreads */
12368         pthread_attr_t attr;
12369
12370         status = pthread_attr_init(&attr);
12371         if( status ) return status;
12372
12373 #if HAVE_PTHREADS < 7
12374         status = pthread_attr_setdetachstate(&attr, &detach);
12375         if( status < 0 ) status = errno;
12376 #else
12377         status = pthread_attr_setdetachstate(&attr, detach);
12378 #endif
12379         if( status ) return status;
12380         status = pthread_create( &t, &attr, task, NULL );
12381 #if HAVE_PTHREADS < 7
12382         if( status < 0 ) status = errno;
12383 #endif
12384         if( status ) return status;
12385 #else
12386         /* Draft 4 pthreads */
12387         status = pthread_create( &t, pthread_attr_default, task, NULL );
12388         if( status ) return errno;
12389
12390         /* give thread a chance to complete */
12391         /* it should remain joinable and hence detachable */
12392         sleep( 1 );
12393
12394         status = pthread_detach( &t );
12395         if( status ) return errno;
12396 #endif
12397
12398 #ifdef HAVE_LINUX_THREADS
12399         pthread_kill_other_threads_np();
12400 #endif
12401
12402         return 0;
12403
12404 }
12405
12406 EOF
12407 if { (eval echo configure:12406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12408 then
12409   ol_cv_pthread_pthread=yes
12410 else
12411   echo "configure: failed program was:" >&5
12412   cat conftest.$ac_ext >&5
12413   rm -fr conftest*
12414   ol_cv_pthread_pthread=no
12415 fi
12416 rm -fr conftest*
12417 fi
12418
12419
12420                 # restore the LIBS
12421                 LIBS="$ol_LIBS"
12422         
12423 fi
12424
12425 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12426
12427         if test $ol_cv_pthread_pthread = yes ; then
12428                 ol_link_pthreads="-pthread"
12429                 ol_link_threads=posix
12430         fi
12431 fi
12432
12433                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12434 if test "$ol_link_threads" = no ; then
12435         # try -pthreads
12436         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12437 echo "configure:12436: checking for pthread link with -pthreads" >&5
12438 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12439   echo $ac_n "(cached) $ac_c" 1>&6
12440 else
12441   
12442                 # save the flags
12443                 ol_LIBS="$LIBS"
12444                 LIBS="-pthreads $LIBS"
12445
12446                 if test "$cross_compiling" = yes; then
12447   cat > conftest.$ac_ext <<EOF
12448 #line 12447 "configure"
12449 #include "confdefs.h"
12450 /* pthread test headers */
12451 #include <pthread.h>
12452 #if HAVE_PTHREADS < 7
12453 #include <errno.h>
12454 #endif
12455 #ifndef NULL
12456 #define NULL (void*)0
12457 #endif
12458
12459 static void *task(p)
12460         void *p;
12461 {
12462         return (void *) (p == NULL);
12463 }
12464
12465 int main() {
12466
12467         /* pthread test function */
12468 #ifndef PTHREAD_CREATE_DETACHED
12469 #define PTHREAD_CREATE_DETACHED 1
12470 #endif
12471         pthread_t t;
12472         int status;
12473         int detach = PTHREAD_CREATE_DETACHED;
12474
12475 #if HAVE_PTHREADS > 4
12476         /* Final pthreads */
12477         pthread_attr_t attr;
12478
12479         status = pthread_attr_init(&attr);
12480         if( status ) return status;
12481
12482 #if HAVE_PTHREADS < 7
12483         status = pthread_attr_setdetachstate(&attr, &detach);
12484         if( status < 0 ) status = errno;
12485 #else
12486         status = pthread_attr_setdetachstate(&attr, detach);
12487 #endif
12488         if( status ) return status;
12489         status = pthread_create( &t, &attr, task, NULL );
12490 #if HAVE_PTHREADS < 7
12491         if( status < 0 ) status = errno;
12492 #endif
12493         if( status ) return status;
12494 #else
12495         /* Draft 4 pthreads */
12496         status = pthread_create( &t, pthread_attr_default, task, NULL );
12497         if( status ) return errno;
12498
12499         /* give thread a chance to complete */
12500         /* it should remain joinable and hence detachable */
12501         sleep( 1 );
12502
12503         status = pthread_detach( &t );
12504         if( status ) return errno;
12505 #endif
12506
12507 #ifdef HAVE_LINUX_THREADS
12508         pthread_kill_other_threads_np();
12509 #endif
12510
12511         return 0;
12512
12513 ; return 0; }
12514 EOF
12515 if { (eval echo configure:12514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12516   rm -rf conftest*
12517   ol_cv_pthread_pthreads=yes
12518 else
12519   echo "configure: failed program was:" >&5
12520   cat conftest.$ac_ext >&5
12521   rm -rf conftest*
12522   ol_cv_pthread_pthreads=no
12523 fi
12524 rm -f conftest*
12525 else
12526   cat > conftest.$ac_ext <<EOF
12527 #line 12526 "configure"
12528 #include "confdefs.h"
12529 /* pthread test headers */
12530 #include <pthread.h>
12531 #if HAVE_PTHREADS < 7
12532 #include <errno.h>
12533 #endif
12534 #ifndef NULL
12535 #define NULL (void*)0
12536 #endif
12537
12538 static void *task(p)
12539         void *p;
12540 {
12541         return (void *) (p == NULL);
12542 }
12543
12544
12545 int main(argc, argv)
12546         int argc;
12547         char **argv;
12548 {
12549
12550         /* pthread test function */
12551 #ifndef PTHREAD_CREATE_DETACHED
12552 #define PTHREAD_CREATE_DETACHED 1
12553 #endif
12554         pthread_t t;
12555         int status;
12556         int detach = PTHREAD_CREATE_DETACHED;
12557
12558 #if HAVE_PTHREADS > 4
12559         /* Final pthreads */
12560         pthread_attr_t attr;
12561
12562         status = pthread_attr_init(&attr);
12563         if( status ) return status;
12564
12565 #if HAVE_PTHREADS < 7
12566         status = pthread_attr_setdetachstate(&attr, &detach);
12567         if( status < 0 ) status = errno;
12568 #else
12569         status = pthread_attr_setdetachstate(&attr, detach);
12570 #endif
12571         if( status ) return status;
12572         status = pthread_create( &t, &attr, task, NULL );
12573 #if HAVE_PTHREADS < 7
12574         if( status < 0 ) status = errno;
12575 #endif
12576         if( status ) return status;
12577 #else
12578         /* Draft 4 pthreads */
12579         status = pthread_create( &t, pthread_attr_default, task, NULL );
12580         if( status ) return errno;
12581
12582         /* give thread a chance to complete */
12583         /* it should remain joinable and hence detachable */
12584         sleep( 1 );
12585
12586         status = pthread_detach( &t );
12587         if( status ) return errno;
12588 #endif
12589
12590 #ifdef HAVE_LINUX_THREADS
12591         pthread_kill_other_threads_np();
12592 #endif
12593
12594         return 0;
12595
12596 }
12597
12598 EOF
12599 if { (eval echo configure:12598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12600 then
12601   ol_cv_pthread_pthreads=yes
12602 else
12603   echo "configure: failed program was:" >&5
12604   cat conftest.$ac_ext >&5
12605   rm -fr conftest*
12606   ol_cv_pthread_pthreads=no
12607 fi
12608 rm -fr conftest*
12609 fi
12610
12611
12612                 # restore the LIBS
12613                 LIBS="$ol_LIBS"
12614         
12615 fi
12616
12617 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12618
12619         if test $ol_cv_pthread_pthreads = yes ; then
12620                 ol_link_pthreads="-pthreads"
12621                 ol_link_threads=posix
12622         fi
12623 fi
12624
12625                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12626 if test "$ol_link_threads" = no ; then
12627         # try -mthreads
12628         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12629 echo "configure:12628: checking for pthread link with -mthreads" >&5
12630 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12631   echo $ac_n "(cached) $ac_c" 1>&6
12632 else
12633   
12634                 # save the flags
12635                 ol_LIBS="$LIBS"
12636                 LIBS="-mthreads $LIBS"
12637
12638                 if test "$cross_compiling" = yes; then
12639   cat > conftest.$ac_ext <<EOF
12640 #line 12639 "configure"
12641 #include "confdefs.h"
12642 /* pthread test headers */
12643 #include <pthread.h>
12644 #if HAVE_PTHREADS < 7
12645 #include <errno.h>
12646 #endif
12647 #ifndef NULL
12648 #define NULL (void*)0
12649 #endif
12650
12651 static void *task(p)
12652         void *p;
12653 {
12654         return (void *) (p == NULL);
12655 }
12656
12657 int main() {
12658
12659         /* pthread test function */
12660 #ifndef PTHREAD_CREATE_DETACHED
12661 #define PTHREAD_CREATE_DETACHED 1
12662 #endif
12663         pthread_t t;
12664         int status;
12665         int detach = PTHREAD_CREATE_DETACHED;
12666
12667 #if HAVE_PTHREADS > 4
12668         /* Final pthreads */
12669         pthread_attr_t attr;
12670
12671         status = pthread_attr_init(&attr);
12672         if( status ) return status;
12673
12674 #if HAVE_PTHREADS < 7
12675         status = pthread_attr_setdetachstate(&attr, &detach);
12676         if( status < 0 ) status = errno;
12677 #else
12678         status = pthread_attr_setdetachstate(&attr, detach);
12679 #endif
12680         if( status ) return status;
12681         status = pthread_create( &t, &attr, task, NULL );
12682 #if HAVE_PTHREADS < 7
12683         if( status < 0 ) status = errno;
12684 #endif
12685         if( status ) return status;
12686 #else
12687         /* Draft 4 pthreads */
12688         status = pthread_create( &t, pthread_attr_default, task, NULL );
12689         if( status ) return errno;
12690
12691         /* give thread a chance to complete */
12692         /* it should remain joinable and hence detachable */
12693         sleep( 1 );
12694
12695         status = pthread_detach( &t );
12696         if( status ) return errno;
12697 #endif
12698
12699 #ifdef HAVE_LINUX_THREADS
12700         pthread_kill_other_threads_np();
12701 #endif
12702
12703         return 0;
12704
12705 ; return 0; }
12706 EOF
12707 if { (eval echo configure:12706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12708   rm -rf conftest*
12709   ol_cv_pthread_mthreads=yes
12710 else
12711   echo "configure: failed program was:" >&5
12712   cat conftest.$ac_ext >&5
12713   rm -rf conftest*
12714   ol_cv_pthread_mthreads=no
12715 fi
12716 rm -f conftest*
12717 else
12718   cat > conftest.$ac_ext <<EOF
12719 #line 12718 "configure"
12720 #include "confdefs.h"
12721 /* pthread test headers */
12722 #include <pthread.h>
12723 #if HAVE_PTHREADS < 7
12724 #include <errno.h>
12725 #endif
12726 #ifndef NULL
12727 #define NULL (void*)0
12728 #endif
12729
12730 static void *task(p)
12731         void *p;
12732 {
12733         return (void *) (p == NULL);
12734 }
12735
12736
12737 int main(argc, argv)
12738         int argc;
12739         char **argv;
12740 {
12741
12742         /* pthread test function */
12743 #ifndef PTHREAD_CREATE_DETACHED
12744 #define PTHREAD_CREATE_DETACHED 1
12745 #endif
12746         pthread_t t;
12747         int status;
12748         int detach = PTHREAD_CREATE_DETACHED;
12749
12750 #if HAVE_PTHREADS > 4
12751         /* Final pthreads */
12752         pthread_attr_t attr;
12753
12754         status = pthread_attr_init(&attr);
12755         if( status ) return status;
12756
12757 #if HAVE_PTHREADS < 7
12758         status = pthread_attr_setdetachstate(&attr, &detach);
12759         if( status < 0 ) status = errno;
12760 #else
12761         status = pthread_attr_setdetachstate(&attr, detach);
12762 #endif
12763         if( status ) return status;
12764         status = pthread_create( &t, &attr, task, NULL );
12765 #if HAVE_PTHREADS < 7
12766         if( status < 0 ) status = errno;
12767 #endif
12768         if( status ) return status;
12769 #else
12770         /* Draft 4 pthreads */
12771         status = pthread_create( &t, pthread_attr_default, task, NULL );
12772         if( status ) return errno;
12773
12774         /* give thread a chance to complete */
12775         /* it should remain joinable and hence detachable */
12776         sleep( 1 );
12777
12778         status = pthread_detach( &t );
12779         if( status ) return errno;
12780 #endif
12781
12782 #ifdef HAVE_LINUX_THREADS
12783         pthread_kill_other_threads_np();
12784 #endif
12785
12786         return 0;
12787
12788 }
12789
12790 EOF
12791 if { (eval echo configure:12790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12792 then
12793   ol_cv_pthread_mthreads=yes
12794 else
12795   echo "configure: failed program was:" >&5
12796   cat conftest.$ac_ext >&5
12797   rm -fr conftest*
12798   ol_cv_pthread_mthreads=no
12799 fi
12800 rm -fr conftest*
12801 fi
12802
12803
12804                 # restore the LIBS
12805                 LIBS="$ol_LIBS"
12806         
12807 fi
12808
12809 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12810
12811         if test $ol_cv_pthread_mthreads = yes ; then
12812                 ol_link_pthreads="-mthreads"
12813                 ol_link_threads=posix
12814         fi
12815 fi
12816
12817                 # Pthread try link: -thread (ol_cv_pthread_thread)
12818 if test "$ol_link_threads" = no ; then
12819         # try -thread
12820         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12821 echo "configure:12820: checking for pthread link with -thread" >&5
12822 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12823   echo $ac_n "(cached) $ac_c" 1>&6
12824 else
12825   
12826                 # save the flags
12827                 ol_LIBS="$LIBS"
12828                 LIBS="-thread $LIBS"
12829
12830                 if test "$cross_compiling" = yes; then
12831   cat > conftest.$ac_ext <<EOF
12832 #line 12831 "configure"
12833 #include "confdefs.h"
12834 /* pthread test headers */
12835 #include <pthread.h>
12836 #if HAVE_PTHREADS < 7
12837 #include <errno.h>
12838 #endif
12839 #ifndef NULL
12840 #define NULL (void*)0
12841 #endif
12842
12843 static void *task(p)
12844         void *p;
12845 {
12846         return (void *) (p == NULL);
12847 }
12848
12849 int main() {
12850
12851         /* pthread test function */
12852 #ifndef PTHREAD_CREATE_DETACHED
12853 #define PTHREAD_CREATE_DETACHED 1
12854 #endif
12855         pthread_t t;
12856         int status;
12857         int detach = PTHREAD_CREATE_DETACHED;
12858
12859 #if HAVE_PTHREADS > 4
12860         /* Final pthreads */
12861         pthread_attr_t attr;
12862
12863         status = pthread_attr_init(&attr);
12864         if( status ) return status;
12865
12866 #if HAVE_PTHREADS < 7
12867         status = pthread_attr_setdetachstate(&attr, &detach);
12868         if( status < 0 ) status = errno;
12869 #else
12870         status = pthread_attr_setdetachstate(&attr, detach);
12871 #endif
12872         if( status ) return status;
12873         status = pthread_create( &t, &attr, task, NULL );
12874 #if HAVE_PTHREADS < 7
12875         if( status < 0 ) status = errno;
12876 #endif
12877         if( status ) return status;
12878 #else
12879         /* Draft 4 pthreads */
12880         status = pthread_create( &t, pthread_attr_default, task, NULL );
12881         if( status ) return errno;
12882
12883         /* give thread a chance to complete */
12884         /* it should remain joinable and hence detachable */
12885         sleep( 1 );
12886
12887         status = pthread_detach( &t );
12888         if( status ) return errno;
12889 #endif
12890
12891 #ifdef HAVE_LINUX_THREADS
12892         pthread_kill_other_threads_np();
12893 #endif
12894
12895         return 0;
12896
12897 ; return 0; }
12898 EOF
12899 if { (eval echo configure:12898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12900   rm -rf conftest*
12901   ol_cv_pthread_thread=yes
12902 else
12903   echo "configure: failed program was:" >&5
12904   cat conftest.$ac_ext >&5
12905   rm -rf conftest*
12906   ol_cv_pthread_thread=no
12907 fi
12908 rm -f conftest*
12909 else
12910   cat > conftest.$ac_ext <<EOF
12911 #line 12910 "configure"
12912 #include "confdefs.h"
12913 /* pthread test headers */
12914 #include <pthread.h>
12915 #if HAVE_PTHREADS < 7
12916 #include <errno.h>
12917 #endif
12918 #ifndef NULL
12919 #define NULL (void*)0
12920 #endif
12921
12922 static void *task(p)
12923         void *p;
12924 {
12925         return (void *) (p == NULL);
12926 }
12927
12928
12929 int main(argc, argv)
12930         int argc;
12931         char **argv;
12932 {
12933
12934         /* pthread test function */
12935 #ifndef PTHREAD_CREATE_DETACHED
12936 #define PTHREAD_CREATE_DETACHED 1
12937 #endif
12938         pthread_t t;
12939         int status;
12940         int detach = PTHREAD_CREATE_DETACHED;
12941
12942 #if HAVE_PTHREADS > 4
12943         /* Final pthreads */
12944         pthread_attr_t attr;
12945
12946         status = pthread_attr_init(&attr);
12947         if( status ) return status;
12948
12949 #if HAVE_PTHREADS < 7
12950         status = pthread_attr_setdetachstate(&attr, &detach);
12951         if( status < 0 ) status = errno;
12952 #else
12953         status = pthread_attr_setdetachstate(&attr, detach);
12954 #endif
12955         if( status ) return status;
12956         status = pthread_create( &t, &attr, task, NULL );
12957 #if HAVE_PTHREADS < 7
12958         if( status < 0 ) status = errno;
12959 #endif
12960         if( status ) return status;
12961 #else
12962         /* Draft 4 pthreads */
12963         status = pthread_create( &t, pthread_attr_default, task, NULL );
12964         if( status ) return errno;
12965
12966         /* give thread a chance to complete */
12967         /* it should remain joinable and hence detachable */
12968         sleep( 1 );
12969
12970         status = pthread_detach( &t );
12971         if( status ) return errno;
12972 #endif
12973
12974 #ifdef HAVE_LINUX_THREADS
12975         pthread_kill_other_threads_np();
12976 #endif
12977
12978         return 0;
12979
12980 }
12981
12982 EOF
12983 if { (eval echo configure:12982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12984 then
12985   ol_cv_pthread_thread=yes
12986 else
12987   echo "configure: failed program was:" >&5
12988   cat conftest.$ac_ext >&5
12989   rm -fr conftest*
12990   ol_cv_pthread_thread=no
12991 fi
12992 rm -fr conftest*
12993 fi
12994
12995
12996                 # restore the LIBS
12997                 LIBS="$ol_LIBS"
12998         
12999 fi
13000
13001 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13002
13003         if test $ol_cv_pthread_thread = yes ; then
13004                 ol_link_pthreads="-thread"
13005                 ol_link_threads=posix
13006         fi
13007 fi
13008
13009
13010                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13011 if test "$ol_link_threads" = no ; then
13012         # try -lpthread -lmach -lexc -lc_r
13013         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13014 echo "configure:13013: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13015 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13016   echo $ac_n "(cached) $ac_c" 1>&6
13017 else
13018   
13019                 # save the flags
13020                 ol_LIBS="$LIBS"
13021                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13022
13023                 if test "$cross_compiling" = yes; then
13024   cat > conftest.$ac_ext <<EOF
13025 #line 13024 "configure"
13026 #include "confdefs.h"
13027 /* pthread test headers */
13028 #include <pthread.h>
13029 #if HAVE_PTHREADS < 7
13030 #include <errno.h>
13031 #endif
13032 #ifndef NULL
13033 #define NULL (void*)0
13034 #endif
13035
13036 static void *task(p)
13037         void *p;
13038 {
13039         return (void *) (p == NULL);
13040 }
13041
13042 int main() {
13043
13044         /* pthread test function */
13045 #ifndef PTHREAD_CREATE_DETACHED
13046 #define PTHREAD_CREATE_DETACHED 1
13047 #endif
13048         pthread_t t;
13049         int status;
13050         int detach = PTHREAD_CREATE_DETACHED;
13051
13052 #if HAVE_PTHREADS > 4
13053         /* Final pthreads */
13054         pthread_attr_t attr;
13055
13056         status = pthread_attr_init(&attr);
13057         if( status ) return status;
13058
13059 #if HAVE_PTHREADS < 7
13060         status = pthread_attr_setdetachstate(&attr, &detach);
13061         if( status < 0 ) status = errno;
13062 #else
13063         status = pthread_attr_setdetachstate(&attr, detach);
13064 #endif
13065         if( status ) return status;
13066         status = pthread_create( &t, &attr, task, NULL );
13067 #if HAVE_PTHREADS < 7
13068         if( status < 0 ) status = errno;
13069 #endif
13070         if( status ) return status;
13071 #else
13072         /* Draft 4 pthreads */
13073         status = pthread_create( &t, pthread_attr_default, task, NULL );
13074         if( status ) return errno;
13075
13076         /* give thread a chance to complete */
13077         /* it should remain joinable and hence detachable */
13078         sleep( 1 );
13079
13080         status = pthread_detach( &t );
13081         if( status ) return errno;
13082 #endif
13083
13084 #ifdef HAVE_LINUX_THREADS
13085         pthread_kill_other_threads_np();
13086 #endif
13087
13088         return 0;
13089
13090 ; return 0; }
13091 EOF
13092 if { (eval echo configure:13091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13093   rm -rf conftest*
13094   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13095 else
13096   echo "configure: failed program was:" >&5
13097   cat conftest.$ac_ext >&5
13098   rm -rf conftest*
13099   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13100 fi
13101 rm -f conftest*
13102 else
13103   cat > conftest.$ac_ext <<EOF
13104 #line 13103 "configure"
13105 #include "confdefs.h"
13106 /* pthread test headers */
13107 #include <pthread.h>
13108 #if HAVE_PTHREADS < 7
13109 #include <errno.h>
13110 #endif
13111 #ifndef NULL
13112 #define NULL (void*)0
13113 #endif
13114
13115 static void *task(p)
13116         void *p;
13117 {
13118         return (void *) (p == NULL);
13119 }
13120
13121
13122 int main(argc, argv)
13123         int argc;
13124         char **argv;
13125 {
13126
13127         /* pthread test function */
13128 #ifndef PTHREAD_CREATE_DETACHED
13129 #define PTHREAD_CREATE_DETACHED 1
13130 #endif
13131         pthread_t t;
13132         int status;
13133         int detach = PTHREAD_CREATE_DETACHED;
13134
13135 #if HAVE_PTHREADS > 4
13136         /* Final pthreads */
13137         pthread_attr_t attr;
13138
13139         status = pthread_attr_init(&attr);
13140         if( status ) return status;
13141
13142 #if HAVE_PTHREADS < 7
13143         status = pthread_attr_setdetachstate(&attr, &detach);
13144         if( status < 0 ) status = errno;
13145 #else
13146         status = pthread_attr_setdetachstate(&attr, detach);
13147 #endif
13148         if( status ) return status;
13149         status = pthread_create( &t, &attr, task, NULL );
13150 #if HAVE_PTHREADS < 7
13151         if( status < 0 ) status = errno;
13152 #endif
13153         if( status ) return status;
13154 #else
13155         /* Draft 4 pthreads */
13156         status = pthread_create( &t, pthread_attr_default, task, NULL );
13157         if( status ) return errno;
13158
13159         /* give thread a chance to complete */
13160         /* it should remain joinable and hence detachable */
13161         sleep( 1 );
13162
13163         status = pthread_detach( &t );
13164         if( status ) return errno;
13165 #endif
13166
13167 #ifdef HAVE_LINUX_THREADS
13168         pthread_kill_other_threads_np();
13169 #endif
13170
13171         return 0;
13172
13173 }
13174
13175 EOF
13176 if { (eval echo configure:13175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13177 then
13178   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13179 else
13180   echo "configure: failed program was:" >&5
13181   cat conftest.$ac_ext >&5
13182   rm -fr conftest*
13183   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13184 fi
13185 rm -fr conftest*
13186 fi
13187
13188
13189                 # restore the LIBS
13190                 LIBS="$ol_LIBS"
13191         
13192 fi
13193
13194 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13195
13196         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13197                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13198                 ol_link_threads=posix
13199         fi
13200 fi
13201
13202                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13203 if test "$ol_link_threads" = no ; then
13204         # try -lpthread -lmach -lexc
13205         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13206 echo "configure:13205: checking for pthread link with -lpthread -lmach -lexc" >&5
13207 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13208   echo $ac_n "(cached) $ac_c" 1>&6
13209 else
13210   
13211                 # save the flags
13212                 ol_LIBS="$LIBS"
13213                 LIBS="-lpthread -lmach -lexc $LIBS"
13214
13215                 if test "$cross_compiling" = yes; then
13216   cat > conftest.$ac_ext <<EOF
13217 #line 13216 "configure"
13218 #include "confdefs.h"
13219 /* pthread test headers */
13220 #include <pthread.h>
13221 #if HAVE_PTHREADS < 7
13222 #include <errno.h>
13223 #endif
13224 #ifndef NULL
13225 #define NULL (void*)0
13226 #endif
13227
13228 static void *task(p)
13229         void *p;
13230 {
13231         return (void *) (p == NULL);
13232 }
13233
13234 int main() {
13235
13236         /* pthread test function */
13237 #ifndef PTHREAD_CREATE_DETACHED
13238 #define PTHREAD_CREATE_DETACHED 1
13239 #endif
13240         pthread_t t;
13241         int status;
13242         int detach = PTHREAD_CREATE_DETACHED;
13243
13244 #if HAVE_PTHREADS > 4
13245         /* Final pthreads */
13246         pthread_attr_t attr;
13247
13248         status = pthread_attr_init(&attr);
13249         if( status ) return status;
13250
13251 #if HAVE_PTHREADS < 7
13252         status = pthread_attr_setdetachstate(&attr, &detach);
13253         if( status < 0 ) status = errno;
13254 #else
13255         status = pthread_attr_setdetachstate(&attr, detach);
13256 #endif
13257         if( status ) return status;
13258         status = pthread_create( &t, &attr, task, NULL );
13259 #if HAVE_PTHREADS < 7
13260         if( status < 0 ) status = errno;
13261 #endif
13262         if( status ) return status;
13263 #else
13264         /* Draft 4 pthreads */
13265         status = pthread_create( &t, pthread_attr_default, task, NULL );
13266         if( status ) return errno;
13267
13268         /* give thread a chance to complete */
13269         /* it should remain joinable and hence detachable */
13270         sleep( 1 );
13271
13272         status = pthread_detach( &t );
13273         if( status ) return errno;
13274 #endif
13275
13276 #ifdef HAVE_LINUX_THREADS
13277         pthread_kill_other_threads_np();
13278 #endif
13279
13280         return 0;
13281
13282 ; return 0; }
13283 EOF
13284 if { (eval echo configure:13283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13285   rm -rf conftest*
13286   ol_cv_pthread_lpthread_lmach_lexc=yes
13287 else
13288   echo "configure: failed program was:" >&5
13289   cat conftest.$ac_ext >&5
13290   rm -rf conftest*
13291   ol_cv_pthread_lpthread_lmach_lexc=no
13292 fi
13293 rm -f conftest*
13294 else
13295   cat > conftest.$ac_ext <<EOF
13296 #line 13295 "configure"
13297 #include "confdefs.h"
13298 /* pthread test headers */
13299 #include <pthread.h>
13300 #if HAVE_PTHREADS < 7
13301 #include <errno.h>
13302 #endif
13303 #ifndef NULL
13304 #define NULL (void*)0
13305 #endif
13306
13307 static void *task(p)
13308         void *p;
13309 {
13310         return (void *) (p == NULL);
13311 }
13312
13313
13314 int main(argc, argv)
13315         int argc;
13316         char **argv;
13317 {
13318
13319         /* pthread test function */
13320 #ifndef PTHREAD_CREATE_DETACHED
13321 #define PTHREAD_CREATE_DETACHED 1
13322 #endif
13323         pthread_t t;
13324         int status;
13325         int detach = PTHREAD_CREATE_DETACHED;
13326
13327 #if HAVE_PTHREADS > 4
13328         /* Final pthreads */
13329         pthread_attr_t attr;
13330
13331         status = pthread_attr_init(&attr);
13332         if( status ) return status;
13333
13334 #if HAVE_PTHREADS < 7
13335         status = pthread_attr_setdetachstate(&attr, &detach);
13336         if( status < 0 ) status = errno;
13337 #else
13338         status = pthread_attr_setdetachstate(&attr, detach);
13339 #endif
13340         if( status ) return status;
13341         status = pthread_create( &t, &attr, task, NULL );
13342 #if HAVE_PTHREADS < 7
13343         if( status < 0 ) status = errno;
13344 #endif
13345         if( status ) return status;
13346 #else
13347         /* Draft 4 pthreads */
13348         status = pthread_create( &t, pthread_attr_default, task, NULL );
13349         if( status ) return errno;
13350
13351         /* give thread a chance to complete */
13352         /* it should remain joinable and hence detachable */
13353         sleep( 1 );
13354
13355         status = pthread_detach( &t );
13356         if( status ) return errno;
13357 #endif
13358
13359 #ifdef HAVE_LINUX_THREADS
13360         pthread_kill_other_threads_np();
13361 #endif
13362
13363         return 0;
13364
13365 }
13366
13367 EOF
13368 if { (eval echo configure:13367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13369 then
13370   ol_cv_pthread_lpthread_lmach_lexc=yes
13371 else
13372   echo "configure: failed program was:" >&5
13373   cat conftest.$ac_ext >&5
13374   rm -fr conftest*
13375   ol_cv_pthread_lpthread_lmach_lexc=no
13376 fi
13377 rm -fr conftest*
13378 fi
13379
13380
13381                 # restore the LIBS
13382                 LIBS="$ol_LIBS"
13383         
13384 fi
13385
13386 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13387
13388         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13389                 ol_link_pthreads="-lpthread -lmach -lexc"
13390                 ol_link_threads=posix
13391         fi
13392 fi
13393
13394
13395                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13396 if test "$ol_link_threads" = no ; then
13397         # try -lpthread -Wl,-woff,85
13398         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13399 echo "configure:13398: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13400 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13401   echo $ac_n "(cached) $ac_c" 1>&6
13402 else
13403   
13404                 # save the flags
13405                 ol_LIBS="$LIBS"
13406                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13407
13408                 if test "$cross_compiling" = yes; then
13409   cat > conftest.$ac_ext <<EOF
13410 #line 13409 "configure"
13411 #include "confdefs.h"
13412 /* pthread test headers */
13413 #include <pthread.h>
13414 #if HAVE_PTHREADS < 7
13415 #include <errno.h>
13416 #endif
13417 #ifndef NULL
13418 #define NULL (void*)0
13419 #endif
13420
13421 static void *task(p)
13422         void *p;
13423 {
13424         return (void *) (p == NULL);
13425 }
13426
13427 int main() {
13428
13429         /* pthread test function */
13430 #ifndef PTHREAD_CREATE_DETACHED
13431 #define PTHREAD_CREATE_DETACHED 1
13432 #endif
13433         pthread_t t;
13434         int status;
13435         int detach = PTHREAD_CREATE_DETACHED;
13436
13437 #if HAVE_PTHREADS > 4
13438         /* Final pthreads */
13439         pthread_attr_t attr;
13440
13441         status = pthread_attr_init(&attr);
13442         if( status ) return status;
13443
13444 #if HAVE_PTHREADS < 7
13445         status = pthread_attr_setdetachstate(&attr, &detach);
13446         if( status < 0 ) status = errno;
13447 #else
13448         status = pthread_attr_setdetachstate(&attr, detach);
13449 #endif
13450         if( status ) return status;
13451         status = pthread_create( &t, &attr, task, NULL );
13452 #if HAVE_PTHREADS < 7
13453         if( status < 0 ) status = errno;
13454 #endif
13455         if( status ) return status;
13456 #else
13457         /* Draft 4 pthreads */
13458         status = pthread_create( &t, pthread_attr_default, task, NULL );
13459         if( status ) return errno;
13460
13461         /* give thread a chance to complete */
13462         /* it should remain joinable and hence detachable */
13463         sleep( 1 );
13464
13465         status = pthread_detach( &t );
13466         if( status ) return errno;
13467 #endif
13468
13469 #ifdef HAVE_LINUX_THREADS
13470         pthread_kill_other_threads_np();
13471 #endif
13472
13473         return 0;
13474
13475 ; return 0; }
13476 EOF
13477 if { (eval echo configure:13476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13478   rm -rf conftest*
13479   ol_cv_pthread_lib_lpthread_woff=yes
13480 else
13481   echo "configure: failed program was:" >&5
13482   cat conftest.$ac_ext >&5
13483   rm -rf conftest*
13484   ol_cv_pthread_lib_lpthread_woff=no
13485 fi
13486 rm -f conftest*
13487 else
13488   cat > conftest.$ac_ext <<EOF
13489 #line 13488 "configure"
13490 #include "confdefs.h"
13491 /* pthread test headers */
13492 #include <pthread.h>
13493 #if HAVE_PTHREADS < 7
13494 #include <errno.h>
13495 #endif
13496 #ifndef NULL
13497 #define NULL (void*)0
13498 #endif
13499
13500 static void *task(p)
13501         void *p;
13502 {
13503         return (void *) (p == NULL);
13504 }
13505
13506
13507 int main(argc, argv)
13508         int argc;
13509         char **argv;
13510 {
13511
13512         /* pthread test function */
13513 #ifndef PTHREAD_CREATE_DETACHED
13514 #define PTHREAD_CREATE_DETACHED 1
13515 #endif
13516         pthread_t t;
13517         int status;
13518         int detach = PTHREAD_CREATE_DETACHED;
13519
13520 #if HAVE_PTHREADS > 4
13521         /* Final pthreads */
13522         pthread_attr_t attr;
13523
13524         status = pthread_attr_init(&attr);
13525         if( status ) return status;
13526
13527 #if HAVE_PTHREADS < 7
13528         status = pthread_attr_setdetachstate(&attr, &detach);
13529         if( status < 0 ) status = errno;
13530 #else
13531         status = pthread_attr_setdetachstate(&attr, detach);
13532 #endif
13533         if( status ) return status;
13534         status = pthread_create( &t, &attr, task, NULL );
13535 #if HAVE_PTHREADS < 7
13536         if( status < 0 ) status = errno;
13537 #endif
13538         if( status ) return status;
13539 #else
13540         /* Draft 4 pthreads */
13541         status = pthread_create( &t, pthread_attr_default, task, NULL );
13542         if( status ) return errno;
13543
13544         /* give thread a chance to complete */
13545         /* it should remain joinable and hence detachable */
13546         sleep( 1 );
13547
13548         status = pthread_detach( &t );
13549         if( status ) return errno;
13550 #endif
13551
13552 #ifdef HAVE_LINUX_THREADS
13553         pthread_kill_other_threads_np();
13554 #endif
13555
13556         return 0;
13557
13558 }
13559
13560 EOF
13561 if { (eval echo configure:13560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13562 then
13563   ol_cv_pthread_lib_lpthread_woff=yes
13564 else
13565   echo "configure: failed program was:" >&5
13566   cat conftest.$ac_ext >&5
13567   rm -fr conftest*
13568   ol_cv_pthread_lib_lpthread_woff=no
13569 fi
13570 rm -fr conftest*
13571 fi
13572
13573
13574                 # restore the LIBS
13575                 LIBS="$ol_LIBS"
13576         
13577 fi
13578
13579 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13580
13581         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13582                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13583                 ol_link_threads=posix
13584         fi
13585 fi
13586
13587
13588                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13589 if test "$ol_link_threads" = no ; then
13590         # try -lpthread
13591         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13592 echo "configure:13591: checking for pthread link with -lpthread" >&5
13593 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13594   echo $ac_n "(cached) $ac_c" 1>&6
13595 else
13596   
13597                 # save the flags
13598                 ol_LIBS="$LIBS"
13599                 LIBS="-lpthread $LIBS"
13600
13601                 if test "$cross_compiling" = yes; then
13602   cat > conftest.$ac_ext <<EOF
13603 #line 13602 "configure"
13604 #include "confdefs.h"
13605 /* pthread test headers */
13606 #include <pthread.h>
13607 #if HAVE_PTHREADS < 7
13608 #include <errno.h>
13609 #endif
13610 #ifndef NULL
13611 #define NULL (void*)0
13612 #endif
13613
13614 static void *task(p)
13615         void *p;
13616 {
13617         return (void *) (p == NULL);
13618 }
13619
13620 int main() {
13621
13622         /* pthread test function */
13623 #ifndef PTHREAD_CREATE_DETACHED
13624 #define PTHREAD_CREATE_DETACHED 1
13625 #endif
13626         pthread_t t;
13627         int status;
13628         int detach = PTHREAD_CREATE_DETACHED;
13629
13630 #if HAVE_PTHREADS > 4
13631         /* Final pthreads */
13632         pthread_attr_t attr;
13633
13634         status = pthread_attr_init(&attr);
13635         if( status ) return status;
13636
13637 #if HAVE_PTHREADS < 7
13638         status = pthread_attr_setdetachstate(&attr, &detach);
13639         if( status < 0 ) status = errno;
13640 #else
13641         status = pthread_attr_setdetachstate(&attr, detach);
13642 #endif
13643         if( status ) return status;
13644         status = pthread_create( &t, &attr, task, NULL );
13645 #if HAVE_PTHREADS < 7
13646         if( status < 0 ) status = errno;
13647 #endif
13648         if( status ) return status;
13649 #else
13650         /* Draft 4 pthreads */
13651         status = pthread_create( &t, pthread_attr_default, task, NULL );
13652         if( status ) return errno;
13653
13654         /* give thread a chance to complete */
13655         /* it should remain joinable and hence detachable */
13656         sleep( 1 );
13657
13658         status = pthread_detach( &t );
13659         if( status ) return errno;
13660 #endif
13661
13662 #ifdef HAVE_LINUX_THREADS
13663         pthread_kill_other_threads_np();
13664 #endif
13665
13666         return 0;
13667
13668 ; return 0; }
13669 EOF
13670 if { (eval echo configure:13669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13671   rm -rf conftest*
13672   ol_cv_pthread_lpthread=yes
13673 else
13674   echo "configure: failed program was:" >&5
13675   cat conftest.$ac_ext >&5
13676   rm -rf conftest*
13677   ol_cv_pthread_lpthread=no
13678 fi
13679 rm -f conftest*
13680 else
13681   cat > conftest.$ac_ext <<EOF
13682 #line 13681 "configure"
13683 #include "confdefs.h"
13684 /* pthread test headers */
13685 #include <pthread.h>
13686 #if HAVE_PTHREADS < 7
13687 #include <errno.h>
13688 #endif
13689 #ifndef NULL
13690 #define NULL (void*)0
13691 #endif
13692
13693 static void *task(p)
13694         void *p;
13695 {
13696         return (void *) (p == NULL);
13697 }
13698
13699
13700 int main(argc, argv)
13701         int argc;
13702         char **argv;
13703 {
13704
13705         /* pthread test function */
13706 #ifndef PTHREAD_CREATE_DETACHED
13707 #define PTHREAD_CREATE_DETACHED 1
13708 #endif
13709         pthread_t t;
13710         int status;
13711         int detach = PTHREAD_CREATE_DETACHED;
13712
13713 #if HAVE_PTHREADS > 4
13714         /* Final pthreads */
13715         pthread_attr_t attr;
13716
13717         status = pthread_attr_init(&attr);
13718         if( status ) return status;
13719
13720 #if HAVE_PTHREADS < 7
13721         status = pthread_attr_setdetachstate(&attr, &detach);
13722         if( status < 0 ) status = errno;
13723 #else
13724         status = pthread_attr_setdetachstate(&attr, detach);
13725 #endif
13726         if( status ) return status;
13727         status = pthread_create( &t, &attr, task, NULL );
13728 #if HAVE_PTHREADS < 7
13729         if( status < 0 ) status = errno;
13730 #endif
13731         if( status ) return status;
13732 #else
13733         /* Draft 4 pthreads */
13734         status = pthread_create( &t, pthread_attr_default, task, NULL );
13735         if( status ) return errno;
13736
13737         /* give thread a chance to complete */
13738         /* it should remain joinable and hence detachable */
13739         sleep( 1 );
13740
13741         status = pthread_detach( &t );
13742         if( status ) return errno;
13743 #endif
13744
13745 #ifdef HAVE_LINUX_THREADS
13746         pthread_kill_other_threads_np();
13747 #endif
13748
13749         return 0;
13750
13751 }
13752
13753 EOF
13754 if { (eval echo configure:13753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13755 then
13756   ol_cv_pthread_lpthread=yes
13757 else
13758   echo "configure: failed program was:" >&5
13759   cat conftest.$ac_ext >&5
13760   rm -fr conftest*
13761   ol_cv_pthread_lpthread=no
13762 fi
13763 rm -fr conftest*
13764 fi
13765
13766
13767                 # restore the LIBS
13768                 LIBS="$ol_LIBS"
13769         
13770 fi
13771
13772 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13773
13774         if test $ol_cv_pthread_lpthread = yes ; then
13775                 ol_link_pthreads="-lpthread"
13776                 ol_link_threads=posix
13777         fi
13778 fi
13779
13780                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13781 if test "$ol_link_threads" = no ; then
13782         # try -lc_r
13783         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13784 echo "configure:13783: checking for pthread link with -lc_r" >&5
13785 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13786   echo $ac_n "(cached) $ac_c" 1>&6
13787 else
13788   
13789                 # save the flags
13790                 ol_LIBS="$LIBS"
13791                 LIBS="-lc_r $LIBS"
13792
13793                 if test "$cross_compiling" = yes; then
13794   cat > conftest.$ac_ext <<EOF
13795 #line 13794 "configure"
13796 #include "confdefs.h"
13797 /* pthread test headers */
13798 #include <pthread.h>
13799 #if HAVE_PTHREADS < 7
13800 #include <errno.h>
13801 #endif
13802 #ifndef NULL
13803 #define NULL (void*)0
13804 #endif
13805
13806 static void *task(p)
13807         void *p;
13808 {
13809         return (void *) (p == NULL);
13810 }
13811
13812 int main() {
13813
13814         /* pthread test function */
13815 #ifndef PTHREAD_CREATE_DETACHED
13816 #define PTHREAD_CREATE_DETACHED 1
13817 #endif
13818         pthread_t t;
13819         int status;
13820         int detach = PTHREAD_CREATE_DETACHED;
13821
13822 #if HAVE_PTHREADS > 4
13823         /* Final pthreads */
13824         pthread_attr_t attr;
13825
13826         status = pthread_attr_init(&attr);
13827         if( status ) return status;
13828
13829 #if HAVE_PTHREADS < 7
13830         status = pthread_attr_setdetachstate(&attr, &detach);
13831         if( status < 0 ) status = errno;
13832 #else
13833         status = pthread_attr_setdetachstate(&attr, detach);
13834 #endif
13835         if( status ) return status;
13836         status = pthread_create( &t, &attr, task, NULL );
13837 #if HAVE_PTHREADS < 7
13838         if( status < 0 ) status = errno;
13839 #endif
13840         if( status ) return status;
13841 #else
13842         /* Draft 4 pthreads */
13843         status = pthread_create( &t, pthread_attr_default, task, NULL );
13844         if( status ) return errno;
13845
13846         /* give thread a chance to complete */
13847         /* it should remain joinable and hence detachable */
13848         sleep( 1 );
13849
13850         status = pthread_detach( &t );
13851         if( status ) return errno;
13852 #endif
13853
13854 #ifdef HAVE_LINUX_THREADS
13855         pthread_kill_other_threads_np();
13856 #endif
13857
13858         return 0;
13859
13860 ; return 0; }
13861 EOF
13862 if { (eval echo configure:13861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13863   rm -rf conftest*
13864   ol_cv_pthread_lc_r=yes
13865 else
13866   echo "configure: failed program was:" >&5
13867   cat conftest.$ac_ext >&5
13868   rm -rf conftest*
13869   ol_cv_pthread_lc_r=no
13870 fi
13871 rm -f conftest*
13872 else
13873   cat > conftest.$ac_ext <<EOF
13874 #line 13873 "configure"
13875 #include "confdefs.h"
13876 /* pthread test headers */
13877 #include <pthread.h>
13878 #if HAVE_PTHREADS < 7
13879 #include <errno.h>
13880 #endif
13881 #ifndef NULL
13882 #define NULL (void*)0
13883 #endif
13884
13885 static void *task(p)
13886         void *p;
13887 {
13888         return (void *) (p == NULL);
13889 }
13890
13891
13892 int main(argc, argv)
13893         int argc;
13894         char **argv;
13895 {
13896
13897         /* pthread test function */
13898 #ifndef PTHREAD_CREATE_DETACHED
13899 #define PTHREAD_CREATE_DETACHED 1
13900 #endif
13901         pthread_t t;
13902         int status;
13903         int detach = PTHREAD_CREATE_DETACHED;
13904
13905 #if HAVE_PTHREADS > 4
13906         /* Final pthreads */
13907         pthread_attr_t attr;
13908
13909         status = pthread_attr_init(&attr);
13910         if( status ) return status;
13911
13912 #if HAVE_PTHREADS < 7
13913         status = pthread_attr_setdetachstate(&attr, &detach);
13914         if( status < 0 ) status = errno;
13915 #else
13916         status = pthread_attr_setdetachstate(&attr, detach);
13917 #endif
13918         if( status ) return status;
13919         status = pthread_create( &t, &attr, task, NULL );
13920 #if HAVE_PTHREADS < 7
13921         if( status < 0 ) status = errno;
13922 #endif
13923         if( status ) return status;
13924 #else
13925         /* Draft 4 pthreads */
13926         status = pthread_create( &t, pthread_attr_default, task, NULL );
13927         if( status ) return errno;
13928
13929         /* give thread a chance to complete */
13930         /* it should remain joinable and hence detachable */
13931         sleep( 1 );
13932
13933         status = pthread_detach( &t );
13934         if( status ) return errno;
13935 #endif
13936
13937 #ifdef HAVE_LINUX_THREADS
13938         pthread_kill_other_threads_np();
13939 #endif
13940
13941         return 0;
13942
13943 }
13944
13945 EOF
13946 if { (eval echo configure:13945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13947 then
13948   ol_cv_pthread_lc_r=yes
13949 else
13950   echo "configure: failed program was:" >&5
13951   cat conftest.$ac_ext >&5
13952   rm -fr conftest*
13953   ol_cv_pthread_lc_r=no
13954 fi
13955 rm -fr conftest*
13956 fi
13957
13958
13959                 # restore the LIBS
13960                 LIBS="$ol_LIBS"
13961         
13962 fi
13963
13964 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13965
13966         if test $ol_cv_pthread_lc_r = yes ; then
13967                 ol_link_pthreads="-lc_r"
13968                 ol_link_threads=posix
13969         fi
13970 fi
13971
13972
13973                 # Pthread try link: -threads (ol_cv_pthread_threads)
13974 if test "$ol_link_threads" = no ; then
13975         # try -threads
13976         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13977 echo "configure:13976: checking for pthread link with -threads" >&5
13978 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13979   echo $ac_n "(cached) $ac_c" 1>&6
13980 else
13981   
13982                 # save the flags
13983                 ol_LIBS="$LIBS"
13984                 LIBS="-threads $LIBS"
13985
13986                 if test "$cross_compiling" = yes; then
13987   cat > conftest.$ac_ext <<EOF
13988 #line 13987 "configure"
13989 #include "confdefs.h"
13990 /* pthread test headers */
13991 #include <pthread.h>
13992 #if HAVE_PTHREADS < 7
13993 #include <errno.h>
13994 #endif
13995 #ifndef NULL
13996 #define NULL (void*)0
13997 #endif
13998
13999 static void *task(p)
14000         void *p;
14001 {
14002         return (void *) (p == NULL);
14003 }
14004
14005 int main() {
14006
14007         /* pthread test function */
14008 #ifndef PTHREAD_CREATE_DETACHED
14009 #define PTHREAD_CREATE_DETACHED 1
14010 #endif
14011         pthread_t t;
14012         int status;
14013         int detach = PTHREAD_CREATE_DETACHED;
14014
14015 #if HAVE_PTHREADS > 4
14016         /* Final pthreads */
14017         pthread_attr_t attr;
14018
14019         status = pthread_attr_init(&attr);
14020         if( status ) return status;
14021
14022 #if HAVE_PTHREADS < 7
14023         status = pthread_attr_setdetachstate(&attr, &detach);
14024         if( status < 0 ) status = errno;
14025 #else
14026         status = pthread_attr_setdetachstate(&attr, detach);
14027 #endif
14028         if( status ) return status;
14029         status = pthread_create( &t, &attr, task, NULL );
14030 #if HAVE_PTHREADS < 7
14031         if( status < 0 ) status = errno;
14032 #endif
14033         if( status ) return status;
14034 #else
14035         /* Draft 4 pthreads */
14036         status = pthread_create( &t, pthread_attr_default, task, NULL );
14037         if( status ) return errno;
14038
14039         /* give thread a chance to complete */
14040         /* it should remain joinable and hence detachable */
14041         sleep( 1 );
14042
14043         status = pthread_detach( &t );
14044         if( status ) return errno;
14045 #endif
14046
14047 #ifdef HAVE_LINUX_THREADS
14048         pthread_kill_other_threads_np();
14049 #endif
14050
14051         return 0;
14052
14053 ; return 0; }
14054 EOF
14055 if { (eval echo configure:14054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14056   rm -rf conftest*
14057   ol_cv_pthread_threads=yes
14058 else
14059   echo "configure: failed program was:" >&5
14060   cat conftest.$ac_ext >&5
14061   rm -rf conftest*
14062   ol_cv_pthread_threads=no
14063 fi
14064 rm -f conftest*
14065 else
14066   cat > conftest.$ac_ext <<EOF
14067 #line 14066 "configure"
14068 #include "confdefs.h"
14069 /* pthread test headers */
14070 #include <pthread.h>
14071 #if HAVE_PTHREADS < 7
14072 #include <errno.h>
14073 #endif
14074 #ifndef NULL
14075 #define NULL (void*)0
14076 #endif
14077
14078 static void *task(p)
14079         void *p;
14080 {
14081         return (void *) (p == NULL);
14082 }
14083
14084
14085 int main(argc, argv)
14086         int argc;
14087         char **argv;
14088 {
14089
14090         /* pthread test function */
14091 #ifndef PTHREAD_CREATE_DETACHED
14092 #define PTHREAD_CREATE_DETACHED 1
14093 #endif
14094         pthread_t t;
14095         int status;
14096         int detach = PTHREAD_CREATE_DETACHED;
14097
14098 #if HAVE_PTHREADS > 4
14099         /* Final pthreads */
14100         pthread_attr_t attr;
14101
14102         status = pthread_attr_init(&attr);
14103         if( status ) return status;
14104
14105 #if HAVE_PTHREADS < 7
14106         status = pthread_attr_setdetachstate(&attr, &detach);
14107         if( status < 0 ) status = errno;
14108 #else
14109         status = pthread_attr_setdetachstate(&attr, detach);
14110 #endif
14111         if( status ) return status;
14112         status = pthread_create( &t, &attr, task, NULL );
14113 #if HAVE_PTHREADS < 7
14114         if( status < 0 ) status = errno;
14115 #endif
14116         if( status ) return status;
14117 #else
14118         /* Draft 4 pthreads */
14119         status = pthread_create( &t, pthread_attr_default, task, NULL );
14120         if( status ) return errno;
14121
14122         /* give thread a chance to complete */
14123         /* it should remain joinable and hence detachable */
14124         sleep( 1 );
14125
14126         status = pthread_detach( &t );
14127         if( status ) return errno;
14128 #endif
14129
14130 #ifdef HAVE_LINUX_THREADS
14131         pthread_kill_other_threads_np();
14132 #endif
14133
14134         return 0;
14135
14136 }
14137
14138 EOF
14139 if { (eval echo configure:14138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14140 then
14141   ol_cv_pthread_threads=yes
14142 else
14143   echo "configure: failed program was:" >&5
14144   cat conftest.$ac_ext >&5
14145   rm -fr conftest*
14146   ol_cv_pthread_threads=no
14147 fi
14148 rm -fr conftest*
14149 fi
14150
14151
14152                 # restore the LIBS
14153                 LIBS="$ol_LIBS"
14154         
14155 fi
14156
14157 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14158
14159         if test $ol_cv_pthread_threads = yes ; then
14160                 ol_link_pthreads="-threads"
14161                 ol_link_threads=posix
14162         fi
14163 fi
14164
14165
14166                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14167 if test "$ol_link_threads" = no ; then
14168         # try -lpthreads -lmach -lexc -lc_r
14169         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14170 echo "configure:14169: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14171 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14172   echo $ac_n "(cached) $ac_c" 1>&6
14173 else
14174   
14175                 # save the flags
14176                 ol_LIBS="$LIBS"
14177                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14178
14179                 if test "$cross_compiling" = yes; then
14180   cat > conftest.$ac_ext <<EOF
14181 #line 14180 "configure"
14182 #include "confdefs.h"
14183 /* pthread test headers */
14184 #include <pthread.h>
14185 #if HAVE_PTHREADS < 7
14186 #include <errno.h>
14187 #endif
14188 #ifndef NULL
14189 #define NULL (void*)0
14190 #endif
14191
14192 static void *task(p)
14193         void *p;
14194 {
14195         return (void *) (p == NULL);
14196 }
14197
14198 int main() {
14199
14200         /* pthread test function */
14201 #ifndef PTHREAD_CREATE_DETACHED
14202 #define PTHREAD_CREATE_DETACHED 1
14203 #endif
14204         pthread_t t;
14205         int status;
14206         int detach = PTHREAD_CREATE_DETACHED;
14207
14208 #if HAVE_PTHREADS > 4
14209         /* Final pthreads */
14210         pthread_attr_t attr;
14211
14212         status = pthread_attr_init(&attr);
14213         if( status ) return status;
14214
14215 #if HAVE_PTHREADS < 7
14216         status = pthread_attr_setdetachstate(&attr, &detach);
14217         if( status < 0 ) status = errno;
14218 #else
14219         status = pthread_attr_setdetachstate(&attr, detach);
14220 #endif
14221         if( status ) return status;
14222         status = pthread_create( &t, &attr, task, NULL );
14223 #if HAVE_PTHREADS < 7
14224         if( status < 0 ) status = errno;
14225 #endif
14226         if( status ) return status;
14227 #else
14228         /* Draft 4 pthreads */
14229         status = pthread_create( &t, pthread_attr_default, task, NULL );
14230         if( status ) return errno;
14231
14232         /* give thread a chance to complete */
14233         /* it should remain joinable and hence detachable */
14234         sleep( 1 );
14235
14236         status = pthread_detach( &t );
14237         if( status ) return errno;
14238 #endif
14239
14240 #ifdef HAVE_LINUX_THREADS
14241         pthread_kill_other_threads_np();
14242 #endif
14243
14244         return 0;
14245
14246 ; return 0; }
14247 EOF
14248 if { (eval echo configure:14247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14249   rm -rf conftest*
14250   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14251 else
14252   echo "configure: failed program was:" >&5
14253   cat conftest.$ac_ext >&5
14254   rm -rf conftest*
14255   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14256 fi
14257 rm -f conftest*
14258 else
14259   cat > conftest.$ac_ext <<EOF
14260 #line 14259 "configure"
14261 #include "confdefs.h"
14262 /* pthread test headers */
14263 #include <pthread.h>
14264 #if HAVE_PTHREADS < 7
14265 #include <errno.h>
14266 #endif
14267 #ifndef NULL
14268 #define NULL (void*)0
14269 #endif
14270
14271 static void *task(p)
14272         void *p;
14273 {
14274         return (void *) (p == NULL);
14275 }
14276
14277
14278 int main(argc, argv)
14279         int argc;
14280         char **argv;
14281 {
14282
14283         /* pthread test function */
14284 #ifndef PTHREAD_CREATE_DETACHED
14285 #define PTHREAD_CREATE_DETACHED 1
14286 #endif
14287         pthread_t t;
14288         int status;
14289         int detach = PTHREAD_CREATE_DETACHED;
14290
14291 #if HAVE_PTHREADS > 4
14292         /* Final pthreads */
14293         pthread_attr_t attr;
14294
14295         status = pthread_attr_init(&attr);
14296         if( status ) return status;
14297
14298 #if HAVE_PTHREADS < 7
14299         status = pthread_attr_setdetachstate(&attr, &detach);
14300         if( status < 0 ) status = errno;
14301 #else
14302         status = pthread_attr_setdetachstate(&attr, detach);
14303 #endif
14304         if( status ) return status;
14305         status = pthread_create( &t, &attr, task, NULL );
14306 #if HAVE_PTHREADS < 7
14307         if( status < 0 ) status = errno;
14308 #endif
14309         if( status ) return status;
14310 #else
14311         /* Draft 4 pthreads */
14312         status = pthread_create( &t, pthread_attr_default, task, NULL );
14313         if( status ) return errno;
14314
14315         /* give thread a chance to complete */
14316         /* it should remain joinable and hence detachable */
14317         sleep( 1 );
14318
14319         status = pthread_detach( &t );
14320         if( status ) return errno;
14321 #endif
14322
14323 #ifdef HAVE_LINUX_THREADS
14324         pthread_kill_other_threads_np();
14325 #endif
14326
14327         return 0;
14328
14329 }
14330
14331 EOF
14332 if { (eval echo configure:14331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14333 then
14334   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14335 else
14336   echo "configure: failed program was:" >&5
14337   cat conftest.$ac_ext >&5
14338   rm -fr conftest*
14339   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14340 fi
14341 rm -fr conftest*
14342 fi
14343
14344
14345                 # restore the LIBS
14346                 LIBS="$ol_LIBS"
14347         
14348 fi
14349
14350 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14351
14352         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14353                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14354                 ol_link_threads=posix
14355         fi
14356 fi
14357
14358                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14359 if test "$ol_link_threads" = no ; then
14360         # try -lpthreads -lmach -lexc
14361         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14362 echo "configure:14361: checking for pthread link with -lpthreads -lmach -lexc" >&5
14363 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14364   echo $ac_n "(cached) $ac_c" 1>&6
14365 else
14366   
14367                 # save the flags
14368                 ol_LIBS="$LIBS"
14369                 LIBS="-lpthreads -lmach -lexc $LIBS"
14370
14371                 if test "$cross_compiling" = yes; then
14372   cat > conftest.$ac_ext <<EOF
14373 #line 14372 "configure"
14374 #include "confdefs.h"
14375 /* pthread test headers */
14376 #include <pthread.h>
14377 #if HAVE_PTHREADS < 7
14378 #include <errno.h>
14379 #endif
14380 #ifndef NULL
14381 #define NULL (void*)0
14382 #endif
14383
14384 static void *task(p)
14385         void *p;
14386 {
14387         return (void *) (p == NULL);
14388 }
14389
14390 int main() {
14391
14392         /* pthread test function */
14393 #ifndef PTHREAD_CREATE_DETACHED
14394 #define PTHREAD_CREATE_DETACHED 1
14395 #endif
14396         pthread_t t;
14397         int status;
14398         int detach = PTHREAD_CREATE_DETACHED;
14399
14400 #if HAVE_PTHREADS > 4
14401         /* Final pthreads */
14402         pthread_attr_t attr;
14403
14404         status = pthread_attr_init(&attr);
14405         if( status ) return status;
14406
14407 #if HAVE_PTHREADS < 7
14408         status = pthread_attr_setdetachstate(&attr, &detach);
14409         if( status < 0 ) status = errno;
14410 #else
14411         status = pthread_attr_setdetachstate(&attr, detach);
14412 #endif
14413         if( status ) return status;
14414         status = pthread_create( &t, &attr, task, NULL );
14415 #if HAVE_PTHREADS < 7
14416         if( status < 0 ) status = errno;
14417 #endif
14418         if( status ) return status;
14419 #else
14420         /* Draft 4 pthreads */
14421         status = pthread_create( &t, pthread_attr_default, task, NULL );
14422         if( status ) return errno;
14423
14424         /* give thread a chance to complete */
14425         /* it should remain joinable and hence detachable */
14426         sleep( 1 );
14427
14428         status = pthread_detach( &t );
14429         if( status ) return errno;
14430 #endif
14431
14432 #ifdef HAVE_LINUX_THREADS
14433         pthread_kill_other_threads_np();
14434 #endif
14435
14436         return 0;
14437
14438 ; return 0; }
14439 EOF
14440 if { (eval echo configure:14439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14441   rm -rf conftest*
14442   ol_cv_pthread_lpthreads_lmach_lexc=yes
14443 else
14444   echo "configure: failed program was:" >&5
14445   cat conftest.$ac_ext >&5
14446   rm -rf conftest*
14447   ol_cv_pthread_lpthreads_lmach_lexc=no
14448 fi
14449 rm -f conftest*
14450 else
14451   cat > conftest.$ac_ext <<EOF
14452 #line 14451 "configure"
14453 #include "confdefs.h"
14454 /* pthread test headers */
14455 #include <pthread.h>
14456 #if HAVE_PTHREADS < 7
14457 #include <errno.h>
14458 #endif
14459 #ifndef NULL
14460 #define NULL (void*)0
14461 #endif
14462
14463 static void *task(p)
14464         void *p;
14465 {
14466         return (void *) (p == NULL);
14467 }
14468
14469
14470 int main(argc, argv)
14471         int argc;
14472         char **argv;
14473 {
14474
14475         /* pthread test function */
14476 #ifndef PTHREAD_CREATE_DETACHED
14477 #define PTHREAD_CREATE_DETACHED 1
14478 #endif
14479         pthread_t t;
14480         int status;
14481         int detach = PTHREAD_CREATE_DETACHED;
14482
14483 #if HAVE_PTHREADS > 4
14484         /* Final pthreads */
14485         pthread_attr_t attr;
14486
14487         status = pthread_attr_init(&attr);
14488         if( status ) return status;
14489
14490 #if HAVE_PTHREADS < 7
14491         status = pthread_attr_setdetachstate(&attr, &detach);
14492         if( status < 0 ) status = errno;
14493 #else
14494         status = pthread_attr_setdetachstate(&attr, detach);
14495 #endif
14496         if( status ) return status;
14497         status = pthread_create( &t, &attr, task, NULL );
14498 #if HAVE_PTHREADS < 7
14499         if( status < 0 ) status = errno;
14500 #endif
14501         if( status ) return status;
14502 #else
14503         /* Draft 4 pthreads */
14504         status = pthread_create( &t, pthread_attr_default, task, NULL );
14505         if( status ) return errno;
14506
14507         /* give thread a chance to complete */
14508         /* it should remain joinable and hence detachable */
14509         sleep( 1 );
14510
14511         status = pthread_detach( &t );
14512         if( status ) return errno;
14513 #endif
14514
14515 #ifdef HAVE_LINUX_THREADS
14516         pthread_kill_other_threads_np();
14517 #endif
14518
14519         return 0;
14520
14521 }
14522
14523 EOF
14524 if { (eval echo configure:14523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14525 then
14526   ol_cv_pthread_lpthreads_lmach_lexc=yes
14527 else
14528   echo "configure: failed program was:" >&5
14529   cat conftest.$ac_ext >&5
14530   rm -fr conftest*
14531   ol_cv_pthread_lpthreads_lmach_lexc=no
14532 fi
14533 rm -fr conftest*
14534 fi
14535
14536
14537                 # restore the LIBS
14538                 LIBS="$ol_LIBS"
14539         
14540 fi
14541
14542 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14543
14544         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14545                 ol_link_pthreads="-lpthreads -lmach -lexc"
14546                 ol_link_threads=posix
14547         fi
14548 fi
14549
14550                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14551 if test "$ol_link_threads" = no ; then
14552         # try -lpthreads -lexc
14553         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14554 echo "configure:14553: checking for pthread link with -lpthreads -lexc" >&5
14555 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14556   echo $ac_n "(cached) $ac_c" 1>&6
14557 else
14558   
14559                 # save the flags
14560                 ol_LIBS="$LIBS"
14561                 LIBS="-lpthreads -lexc $LIBS"
14562
14563                 if test "$cross_compiling" = yes; then
14564   cat > conftest.$ac_ext <<EOF
14565 #line 14564 "configure"
14566 #include "confdefs.h"
14567 /* pthread test headers */
14568 #include <pthread.h>
14569 #if HAVE_PTHREADS < 7
14570 #include <errno.h>
14571 #endif
14572 #ifndef NULL
14573 #define NULL (void*)0
14574 #endif
14575
14576 static void *task(p)
14577         void *p;
14578 {
14579         return (void *) (p == NULL);
14580 }
14581
14582 int main() {
14583
14584         /* pthread test function */
14585 #ifndef PTHREAD_CREATE_DETACHED
14586 #define PTHREAD_CREATE_DETACHED 1
14587 #endif
14588         pthread_t t;
14589         int status;
14590         int detach = PTHREAD_CREATE_DETACHED;
14591
14592 #if HAVE_PTHREADS > 4
14593         /* Final pthreads */
14594         pthread_attr_t attr;
14595
14596         status = pthread_attr_init(&attr);
14597         if( status ) return status;
14598
14599 #if HAVE_PTHREADS < 7
14600         status = pthread_attr_setdetachstate(&attr, &detach);
14601         if( status < 0 ) status = errno;
14602 #else
14603         status = pthread_attr_setdetachstate(&attr, detach);
14604 #endif
14605         if( status ) return status;
14606         status = pthread_create( &t, &attr, task, NULL );
14607 #if HAVE_PTHREADS < 7
14608         if( status < 0 ) status = errno;
14609 #endif
14610         if( status ) return status;
14611 #else
14612         /* Draft 4 pthreads */
14613         status = pthread_create( &t, pthread_attr_default, task, NULL );
14614         if( status ) return errno;
14615
14616         /* give thread a chance to complete */
14617         /* it should remain joinable and hence detachable */
14618         sleep( 1 );
14619
14620         status = pthread_detach( &t );
14621         if( status ) return errno;
14622 #endif
14623
14624 #ifdef HAVE_LINUX_THREADS
14625         pthread_kill_other_threads_np();
14626 #endif
14627
14628         return 0;
14629
14630 ; return 0; }
14631 EOF
14632 if { (eval echo configure:14631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14633   rm -rf conftest*
14634   ol_cv_pthread_lpthreads_lexc=yes
14635 else
14636   echo "configure: failed program was:" >&5
14637   cat conftest.$ac_ext >&5
14638   rm -rf conftest*
14639   ol_cv_pthread_lpthreads_lexc=no
14640 fi
14641 rm -f conftest*
14642 else
14643   cat > conftest.$ac_ext <<EOF
14644 #line 14643 "configure"
14645 #include "confdefs.h"
14646 /* pthread test headers */
14647 #include <pthread.h>
14648 #if HAVE_PTHREADS < 7
14649 #include <errno.h>
14650 #endif
14651 #ifndef NULL
14652 #define NULL (void*)0
14653 #endif
14654
14655 static void *task(p)
14656         void *p;
14657 {
14658         return (void *) (p == NULL);
14659 }
14660
14661
14662 int main(argc, argv)
14663         int argc;
14664         char **argv;
14665 {
14666
14667         /* pthread test function */
14668 #ifndef PTHREAD_CREATE_DETACHED
14669 #define PTHREAD_CREATE_DETACHED 1
14670 #endif
14671         pthread_t t;
14672         int status;
14673         int detach = PTHREAD_CREATE_DETACHED;
14674
14675 #if HAVE_PTHREADS > 4
14676         /* Final pthreads */
14677         pthread_attr_t attr;
14678
14679         status = pthread_attr_init(&attr);
14680         if( status ) return status;
14681
14682 #if HAVE_PTHREADS < 7
14683         status = pthread_attr_setdetachstate(&attr, &detach);
14684         if( status < 0 ) status = errno;
14685 #else
14686         status = pthread_attr_setdetachstate(&attr, detach);
14687 #endif
14688         if( status ) return status;
14689         status = pthread_create( &t, &attr, task, NULL );
14690 #if HAVE_PTHREADS < 7
14691         if( status < 0 ) status = errno;
14692 #endif
14693         if( status ) return status;
14694 #else
14695         /* Draft 4 pthreads */
14696         status = pthread_create( &t, pthread_attr_default, task, NULL );
14697         if( status ) return errno;
14698
14699         /* give thread a chance to complete */
14700         /* it should remain joinable and hence detachable */
14701         sleep( 1 );
14702
14703         status = pthread_detach( &t );
14704         if( status ) return errno;
14705 #endif
14706
14707 #ifdef HAVE_LINUX_THREADS
14708         pthread_kill_other_threads_np();
14709 #endif
14710
14711         return 0;
14712
14713 }
14714
14715 EOF
14716 if { (eval echo configure:14715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14717 then
14718   ol_cv_pthread_lpthreads_lexc=yes
14719 else
14720   echo "configure: failed program was:" >&5
14721   cat conftest.$ac_ext >&5
14722   rm -fr conftest*
14723   ol_cv_pthread_lpthreads_lexc=no
14724 fi
14725 rm -fr conftest*
14726 fi
14727
14728
14729                 # restore the LIBS
14730                 LIBS="$ol_LIBS"
14731         
14732 fi
14733
14734 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14735
14736         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14737                 ol_link_pthreads="-lpthreads -lexc"
14738                 ol_link_threads=posix
14739         fi
14740 fi
14741
14742
14743                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14744 if test "$ol_link_threads" = no ; then
14745         # try -lpthreads
14746         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14747 echo "configure:14746: checking for pthread link with -lpthreads" >&5
14748 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14749   echo $ac_n "(cached) $ac_c" 1>&6
14750 else
14751   
14752                 # save the flags
14753                 ol_LIBS="$LIBS"
14754                 LIBS="-lpthreads $LIBS"
14755
14756                 if test "$cross_compiling" = yes; then
14757   cat > conftest.$ac_ext <<EOF
14758 #line 14757 "configure"
14759 #include "confdefs.h"
14760 /* pthread test headers */
14761 #include <pthread.h>
14762 #if HAVE_PTHREADS < 7
14763 #include <errno.h>
14764 #endif
14765 #ifndef NULL
14766 #define NULL (void*)0
14767 #endif
14768
14769 static void *task(p)
14770         void *p;
14771 {
14772         return (void *) (p == NULL);
14773 }
14774
14775 int main() {
14776
14777         /* pthread test function */
14778 #ifndef PTHREAD_CREATE_DETACHED
14779 #define PTHREAD_CREATE_DETACHED 1
14780 #endif
14781         pthread_t t;
14782         int status;
14783         int detach = PTHREAD_CREATE_DETACHED;
14784
14785 #if HAVE_PTHREADS > 4
14786         /* Final pthreads */
14787         pthread_attr_t attr;
14788
14789         status = pthread_attr_init(&attr);
14790         if( status ) return status;
14791
14792 #if HAVE_PTHREADS < 7
14793         status = pthread_attr_setdetachstate(&attr, &detach);
14794         if( status < 0 ) status = errno;
14795 #else
14796         status = pthread_attr_setdetachstate(&attr, detach);
14797 #endif
14798         if( status ) return status;
14799         status = pthread_create( &t, &attr, task, NULL );
14800 #if HAVE_PTHREADS < 7
14801         if( status < 0 ) status = errno;
14802 #endif
14803         if( status ) return status;
14804 #else
14805         /* Draft 4 pthreads */
14806         status = pthread_create( &t, pthread_attr_default, task, NULL );
14807         if( status ) return errno;
14808
14809         /* give thread a chance to complete */
14810         /* it should remain joinable and hence detachable */
14811         sleep( 1 );
14812
14813         status = pthread_detach( &t );
14814         if( status ) return errno;
14815 #endif
14816
14817 #ifdef HAVE_LINUX_THREADS
14818         pthread_kill_other_threads_np();
14819 #endif
14820
14821         return 0;
14822
14823 ; return 0; }
14824 EOF
14825 if { (eval echo configure:14824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14826   rm -rf conftest*
14827   ol_cv_pthread_lib_lpthreads=yes
14828 else
14829   echo "configure: failed program was:" >&5
14830   cat conftest.$ac_ext >&5
14831   rm -rf conftest*
14832   ol_cv_pthread_lib_lpthreads=no
14833 fi
14834 rm -f conftest*
14835 else
14836   cat > conftest.$ac_ext <<EOF
14837 #line 14836 "configure"
14838 #include "confdefs.h"
14839 /* pthread test headers */
14840 #include <pthread.h>
14841 #if HAVE_PTHREADS < 7
14842 #include <errno.h>
14843 #endif
14844 #ifndef NULL
14845 #define NULL (void*)0
14846 #endif
14847
14848 static void *task(p)
14849         void *p;
14850 {
14851         return (void *) (p == NULL);
14852 }
14853
14854
14855 int main(argc, argv)
14856         int argc;
14857         char **argv;
14858 {
14859
14860         /* pthread test function */
14861 #ifndef PTHREAD_CREATE_DETACHED
14862 #define PTHREAD_CREATE_DETACHED 1
14863 #endif
14864         pthread_t t;
14865         int status;
14866         int detach = PTHREAD_CREATE_DETACHED;
14867
14868 #if HAVE_PTHREADS > 4
14869         /* Final pthreads */
14870         pthread_attr_t attr;
14871
14872         status = pthread_attr_init(&attr);
14873         if( status ) return status;
14874
14875 #if HAVE_PTHREADS < 7
14876         status = pthread_attr_setdetachstate(&attr, &detach);
14877         if( status < 0 ) status = errno;
14878 #else
14879         status = pthread_attr_setdetachstate(&attr, detach);
14880 #endif
14881         if( status ) return status;
14882         status = pthread_create( &t, &attr, task, NULL );
14883 #if HAVE_PTHREADS < 7
14884         if( status < 0 ) status = errno;
14885 #endif
14886         if( status ) return status;
14887 #else
14888         /* Draft 4 pthreads */
14889         status = pthread_create( &t, pthread_attr_default, task, NULL );
14890         if( status ) return errno;
14891
14892         /* give thread a chance to complete */
14893         /* it should remain joinable and hence detachable */
14894         sleep( 1 );
14895
14896         status = pthread_detach( &t );
14897         if( status ) return errno;
14898 #endif
14899
14900 #ifdef HAVE_LINUX_THREADS
14901         pthread_kill_other_threads_np();
14902 #endif
14903
14904         return 0;
14905
14906 }
14907
14908 EOF
14909 if { (eval echo configure:14908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14910 then
14911   ol_cv_pthread_lib_lpthreads=yes
14912 else
14913   echo "configure: failed program was:" >&5
14914   cat conftest.$ac_ext >&5
14915   rm -fr conftest*
14916   ol_cv_pthread_lib_lpthreads=no
14917 fi
14918 rm -fr conftest*
14919 fi
14920
14921
14922                 # restore the LIBS
14923                 LIBS="$ol_LIBS"
14924         
14925 fi
14926
14927 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14928
14929         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14930                 ol_link_pthreads="-lpthreads"
14931                 ol_link_threads=posix
14932         fi
14933 fi
14934
14935
14936                 if test $ol_link_threads != no ; then
14937                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14938
14939                                                 save_CPPFLAGS="$CPPFLAGS"
14940                         save_LIBS="$LIBS"
14941                         LIBS="$LTHREAD_LIBS $LIBS"
14942
14943                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14944 do
14945 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14946 echo "configure:14945: checking for $ac_func" >&5
14947 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14948   echo $ac_n "(cached) $ac_c" 1>&6
14949 else
14950   cat > conftest.$ac_ext <<EOF
14951 #line 14950 "configure"
14952 #include "confdefs.h"
14953 /* System header to define __stub macros and hopefully few prototypes,
14954     which can conflict with char $ac_func(); below.  */
14955 #include <assert.h>
14956 /* Override any gcc2 internal prototype to avoid an error.  */
14957 /* We use char because int might match the return type of a gcc2
14958     builtin and then its argument prototype would still apply.  */
14959 char $ac_func();
14960 char (*f)();
14961
14962 int main() {
14963
14964 /* The GNU C library defines this for functions which it implements
14965     to always fail with ENOSYS.  Some functions are actually named
14966     something starting with __ and the normal name is an alias.  */
14967 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14968 choke me
14969 #else
14970 f = $ac_func;
14971 #endif
14972
14973 ; return 0; }
14974 EOF
14975 if { (eval echo configure:14974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14976   rm -rf conftest*
14977   eval "ac_cv_func_$ac_func=yes"
14978 else
14979   echo "configure: failed program was:" >&5
14980   cat conftest.$ac_ext >&5
14981   rm -rf conftest*
14982   eval "ac_cv_func_$ac_func=no"
14983 fi
14984 rm -f conftest*
14985 fi
14986
14987 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14988   echo "$ac_t""yes" 1>&6
14989     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14990   cat >> confdefs.h <<EOF
14991 #define $ac_tr_func 1
14992 EOF
14993  
14994 else
14995   echo "$ac_t""no" 1>&6
14996 fi
14997 done
14998
14999
15000                         if test $ac_cv_func_sched_yield = no -a \
15001                                 $ac_cv_func_pthread_yield = no -a \
15002                                 $ac_cv_func_thr_yield = no ; then
15003                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15004 echo "configure:15003: checking for sched_yield in -lrt" >&5
15005 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15006 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15007   echo $ac_n "(cached) $ac_c" 1>&6
15008 else
15009   ac_save_LIBS="$LIBS"
15010 LIBS="-lrt  $LIBS"
15011 cat > conftest.$ac_ext <<EOF
15012 #line 15011 "configure"
15013 #include "confdefs.h"
15014 /* Override any gcc2 internal prototype to avoid an error.  */
15015 /* We use char because int might match the return type of a gcc2
15016     builtin and then its argument prototype would still apply.  */
15017 char sched_yield();
15018
15019 int main() {
15020 sched_yield()
15021 ; return 0; }
15022 EOF
15023 if { (eval echo configure:15022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15024   rm -rf conftest*
15025   eval "ac_cv_lib_$ac_lib_var=yes"
15026 else
15027   echo "configure: failed program was:" >&5
15028   cat conftest.$ac_ext >&5
15029   rm -rf conftest*
15030   eval "ac_cv_lib_$ac_lib_var=no"
15031 fi
15032 rm -f conftest*
15033 LIBS="$ac_save_LIBS"
15034
15035 fi
15036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15037   echo "$ac_t""yes" 1>&6
15038   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15039                                         cat >> confdefs.h <<\EOF
15040 #define HAVE_SCHED_YIELD 1
15041 EOF
15042
15043                                         ac_cv_func_sched_yield=yes
15044 else
15045   echo "$ac_t""no" 1>&6
15046 ac_cv_func_sched_yield=no
15047 fi
15048
15049                         fi
15050                         if test $ac_cv_func_sched_yield = no -a \
15051                                 $ac_cv_func_pthread_yield = no -a \
15052                                 "$ac_cv_func_thr_yield" = no ; then
15053                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15054                         fi
15055
15056                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15057 do
15058 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15059 echo "configure:15058: checking for $ac_func" >&5
15060 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15061   echo $ac_n "(cached) $ac_c" 1>&6
15062 else
15063   cat > conftest.$ac_ext <<EOF
15064 #line 15063 "configure"
15065 #include "confdefs.h"
15066 /* System header to define __stub macros and hopefully few prototypes,
15067     which can conflict with char $ac_func(); below.  */
15068 #include <assert.h>
15069 /* Override any gcc2 internal prototype to avoid an error.  */
15070 /* We use char because int might match the return type of a gcc2
15071     builtin and then its argument prototype would still apply.  */
15072 char $ac_func();
15073 char (*f)();
15074
15075 int main() {
15076
15077 /* The GNU C library defines this for functions which it implements
15078     to always fail with ENOSYS.  Some functions are actually named
15079     something starting with __ and the normal name is an alias.  */
15080 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15081 choke me
15082 #else
15083 f = $ac_func;
15084 #endif
15085
15086 ; return 0; }
15087 EOF
15088 if { (eval echo configure:15087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15089   rm -rf conftest*
15090   eval "ac_cv_func_$ac_func=yes"
15091 else
15092   echo "configure: failed program was:" >&5
15093   cat conftest.$ac_ext >&5
15094   rm -rf conftest*
15095   eval "ac_cv_func_$ac_func=no"
15096 fi
15097 rm -f conftest*
15098 fi
15099
15100 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15101   echo "$ac_t""yes" 1>&6
15102     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15103   cat >> confdefs.h <<EOF
15104 #define $ac_tr_func 1
15105 EOF
15106  
15107 else
15108   echo "$ac_t""no" 1>&6
15109 fi
15110 done
15111
15112
15113                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15114 echo "configure:15113: checking for pthread_detach with <pthread.h>" >&5
15115 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15116   echo $ac_n "(cached) $ac_c" 1>&6
15117 else
15118   
15119                                                                 cat > conftest.$ac_ext <<EOF
15120 #line 15119 "configure"
15121 #include "confdefs.h"
15122
15123 #include <pthread.h>
15124 #ifndef NULL
15125 #define NULL (void*)0
15126 #endif
15127
15128 int main() {
15129 pthread_detach(NULL);
15130 ; return 0; }
15131 EOF
15132 if { (eval echo configure:15131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15133   rm -rf conftest*
15134   ol_cv_func_pthread_detach=yes
15135 else
15136   echo "configure: failed program was:" >&5
15137   cat conftest.$ac_ext >&5
15138   rm -rf conftest*
15139   ol_cv_func_pthread_detach=no
15140 fi
15141 rm -f conftest*
15142                         
15143 fi
15144
15145 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15146
15147                         if test $ol_cv_func_pthread_detach = no ; then
15148                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15149                         fi
15150
15151                         cat >> confdefs.h <<\EOF
15152 #define HAVE_PTHREAD_DETACH 1
15153 EOF
15154
15155
15156                                                 for ac_func in \
15157                                 pthread_setconcurrency \
15158                                 pthread_getconcurrency \
15159                                 thr_setconcurrency \
15160                                 thr_getconcurrency \
15161                         
15162 do
15163 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15164 echo "configure:15163: checking for $ac_func" >&5
15165 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15166   echo $ac_n "(cached) $ac_c" 1>&6
15167 else
15168   cat > conftest.$ac_ext <<EOF
15169 #line 15168 "configure"
15170 #include "confdefs.h"
15171 /* System header to define __stub macros and hopefully few prototypes,
15172     which can conflict with char $ac_func(); below.  */
15173 #include <assert.h>
15174 /* Override any gcc2 internal prototype to avoid an error.  */
15175 /* We use char because int might match the return type of a gcc2
15176     builtin and then its argument prototype would still apply.  */
15177 char $ac_func();
15178 char (*f)();
15179
15180 int main() {
15181
15182 /* The GNU C library defines this for functions which it implements
15183     to always fail with ENOSYS.  Some functions are actually named
15184     something starting with __ and the normal name is an alias.  */
15185 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15186 choke me
15187 #else
15188 f = $ac_func;
15189 #endif
15190
15191 ; return 0; }
15192 EOF
15193 if { (eval echo configure:15192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15194   rm -rf conftest*
15195   eval "ac_cv_func_$ac_func=yes"
15196 else
15197   echo "configure: failed program was:" >&5
15198   cat conftest.$ac_ext >&5
15199   rm -rf conftest*
15200   eval "ac_cv_func_$ac_func=no"
15201 fi
15202 rm -f conftest*
15203 fi
15204
15205 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15206   echo "$ac_t""yes" 1>&6
15207     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15208   cat >> confdefs.h <<EOF
15209 #define $ac_tr_func 1
15210 EOF
15211  
15212 else
15213   echo "$ac_t""no" 1>&6
15214 fi
15215 done
15216
15217
15218                         
15219         for ac_func in pthread_kill_other_threads_np
15220 do
15221 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15222 echo "configure:15221: checking for $ac_func" >&5
15223 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15224   echo $ac_n "(cached) $ac_c" 1>&6
15225 else
15226   cat > conftest.$ac_ext <<EOF
15227 #line 15226 "configure"
15228 #include "confdefs.h"
15229 /* System header to define __stub macros and hopefully few prototypes,
15230     which can conflict with char $ac_func(); below.  */
15231 #include <assert.h>
15232 /* Override any gcc2 internal prototype to avoid an error.  */
15233 /* We use char because int might match the return type of a gcc2
15234     builtin and then its argument prototype would still apply.  */
15235 char $ac_func();
15236 char (*f)();
15237
15238 int main() {
15239
15240 /* The GNU C library defines this for functions which it implements
15241     to always fail with ENOSYS.  Some functions are actually named
15242     something starting with __ and the normal name is an alias.  */
15243 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15244 choke me
15245 #else
15246 f = $ac_func;
15247 #endif
15248
15249 ; return 0; }
15250 EOF
15251 if { (eval echo configure:15250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15252   rm -rf conftest*
15253   eval "ac_cv_func_$ac_func=yes"
15254 else
15255   echo "configure: failed program was:" >&5
15256   cat conftest.$ac_ext >&5
15257   rm -rf conftest*
15258   eval "ac_cv_func_$ac_func=no"
15259 fi
15260 rm -f conftest*
15261 fi
15262
15263 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15264   echo "$ac_t""yes" 1>&6
15265     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15266   cat >> confdefs.h <<EOF
15267 #define $ac_tr_func 1
15268 EOF
15269  
15270 else
15271   echo "$ac_t""no" 1>&6
15272 fi
15273 done
15274
15275         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15276 echo "configure:15275: checking for LinuxThreads implementation" >&5
15277 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15278   echo $ac_n "(cached) $ac_c" 1>&6
15279 else
15280   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15281 fi
15282
15283 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15284
15285                         
15286         
15287         
15288         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15289 echo "configure:15288: checking for LinuxThreads consistency" >&5
15290 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15291   echo $ac_n "(cached) $ac_c" 1>&6
15292 else
15293   
15294                 if test $ol_cv_header_linux_threads = yes -a \
15295                         $ol_cv_sys_linux_threads = yes; then
15296                         ol_cv_linux_threads=yes
15297                 elif test $ol_cv_header_linux_threads = no -a \
15298                         $ol_cv_sys_linux_threads = no; then
15299                         ol_cv_linux_threads=no
15300                 else
15301                         ol_cv_linux_threads=error
15302                 fi
15303         
15304 fi
15305
15306 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15307
15308
15309                         if test $ol_cv_linux_threads = error; then
15310                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15311                         fi
15312
15313                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15314 echo "configure:15313: checking if pthread_create() works" >&5
15315 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15316   echo $ac_n "(cached) $ac_c" 1>&6
15317 else
15318   
15319                         if test "$cross_compiling" = yes; then
15320                                 ol_cv_pthread_create_works=yes
15321 else
15322   cat > conftest.$ac_ext <<EOF
15323 #line 15322 "configure"
15324 #include "confdefs.h"
15325 /* pthread test headers */
15326 #include <pthread.h>
15327 #if HAVE_PTHREADS < 7
15328 #include <errno.h>
15329 #endif
15330 #ifndef NULL
15331 #define NULL (void*)0
15332 #endif
15333
15334 static void *task(p)
15335         void *p;
15336 {
15337         return (void *) (p == NULL);
15338 }
15339
15340
15341 int main(argc, argv)
15342         int argc;
15343         char **argv;
15344 {
15345
15346         /* pthread test function */
15347 #ifndef PTHREAD_CREATE_DETACHED
15348 #define PTHREAD_CREATE_DETACHED 1
15349 #endif
15350         pthread_t t;
15351         int status;
15352         int detach = PTHREAD_CREATE_DETACHED;
15353
15354 #if HAVE_PTHREADS > 4
15355         /* Final pthreads */
15356         pthread_attr_t attr;
15357
15358         status = pthread_attr_init(&attr);
15359         if( status ) return status;
15360
15361 #if HAVE_PTHREADS < 7
15362         status = pthread_attr_setdetachstate(&attr, &detach);
15363         if( status < 0 ) status = errno;
15364 #else
15365         status = pthread_attr_setdetachstate(&attr, detach);
15366 #endif
15367         if( status ) return status;
15368         status = pthread_create( &t, &attr, task, NULL );
15369 #if HAVE_PTHREADS < 7
15370         if( status < 0 ) status = errno;
15371 #endif
15372         if( status ) return status;
15373 #else
15374         /* Draft 4 pthreads */
15375         status = pthread_create( &t, pthread_attr_default, task, NULL );
15376         if( status ) return errno;
15377
15378         /* give thread a chance to complete */
15379         /* it should remain joinable and hence detachable */
15380         sleep( 1 );
15381
15382         status = pthread_detach( &t );
15383         if( status ) return errno;
15384 #endif
15385
15386 #ifdef HAVE_LINUX_THREADS
15387         pthread_kill_other_threads_np();
15388 #endif
15389
15390         return 0;
15391
15392 }
15393
15394 EOF
15395 if { (eval echo configure:15394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15396 then
15397   ol_cv_pthread_create_works=yes
15398 else
15399   echo "configure: failed program was:" >&5
15400   cat conftest.$ac_ext >&5
15401   rm -fr conftest*
15402   ol_cv_pthread_create_works=no
15403 fi
15404 rm -fr conftest*
15405 fi
15406
15407 fi
15408
15409 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15410
15411                         if test $ol_cv_pthread_create_works = no ; then
15412                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15413                         fi
15414
15415                                                 if test $ol_with_yielding_select = auto ; then
15416                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15417 echo "configure:15416: checking if select yields when using pthreads" >&5
15418 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15419   echo $ac_n "(cached) $ac_c" 1>&6
15420 else
15421   
15422                                 if test "$cross_compiling" = yes; then
15423   ol_cv_pthread_select_yields=cross
15424 else
15425   cat > conftest.$ac_ext <<EOF
15426 #line 15425 "configure"
15427 #include "confdefs.h"
15428
15429 #include <sys/types.h>
15430 #include <sys/time.h>
15431 #include <unistd.h>
15432 #include <pthread.h>
15433 #ifndef NULL
15434 #define NULL (void*) 0
15435 #endif
15436
15437 static int fildes[2];
15438
15439 static void *task(p)
15440         void *p;
15441 {
15442         int i;
15443         struct timeval tv;
15444
15445         fd_set rfds;
15446
15447         tv.tv_sec=10;
15448         tv.tv_usec=0;
15449
15450         FD_ZERO(&rfds);
15451         FD_SET(fildes[0], &rfds);
15452
15453         /* we're not interested in any fds */
15454         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15455
15456         if(i < 0) {
15457                 perror("select");
15458                 exit(10);
15459         }
15460
15461         exit(0); /* if we exit here, the select blocked the whole process */
15462 }
15463
15464 int main(argc, argv)
15465         int argc;
15466         char **argv;
15467 {
15468         pthread_t t;
15469
15470         /* create a pipe to select */
15471         if(pipe(&fildes[0])) {
15472                 perror("select");
15473                 exit(1);
15474         }
15475
15476 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15477         (void) pthread_setconcurrency(2);
15478 #else
15479 #ifdef HAVE_THR_SETCONCURRENCY
15480         /* Set Solaris LWP concurrency to 2 */
15481         thr_setconcurrency(2);
15482 #endif
15483 #endif
15484
15485 #if HAVE_PTHREADS < 6
15486         pthread_create(&t, pthread_attr_default, task, NULL);
15487 #else
15488         pthread_create(&t, NULL, task, NULL);
15489 #endif
15490
15491         /* make sure task runs first */
15492 #if HAVE_THR_YIELD
15493         thr_yield();
15494 #elif defined( HAVE_SCHED_YIELD )
15495         sched_yield();
15496 #elif defined( HAVE_PTHREAD_YIELD )
15497         pthread_yield();
15498 #endif
15499
15500         exit(2);
15501 }
15502 EOF
15503 if { (eval echo configure:15502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15504 then
15505   ol_cv_pthread_select_yields=no
15506 else
15507   echo "configure: failed program was:" >&5
15508   cat conftest.$ac_ext >&5
15509   rm -fr conftest*
15510   ol_cv_pthread_select_yields=yes
15511 fi
15512 rm -fr conftest*
15513 fi
15514
15515 fi
15516
15517 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15518
15519                                 if test $ol_cv_pthread_select_yields = cross ; then
15520                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15521                                 fi
15522
15523                                 if test $ol_cv_pthread_select_yields = yes ; then
15524                                         ol_with_yielding_select=yes
15525                                 fi
15526                         fi
15527
15528                                                 CPPFLAGS="$save_CPPFLAGS"
15529                         LIBS="$save_LIBS"
15530                 else
15531                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15532                 fi
15533         fi
15534
15535         if test $ol_with_threads = posix ; then
15536                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15537         fi
15538 fi
15539
15540 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15541         -o $ol_with_threads = mach ; then
15542
15543                 for ac_hdr in mach/cthreads.h cthreads.h
15544 do
15545 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15546 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15547 echo "configure:15546: checking for $ac_hdr" >&5
15548 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15549   echo $ac_n "(cached) $ac_c" 1>&6
15550 else
15551   cat > conftest.$ac_ext <<EOF
15552 #line 15551 "configure"
15553 #include "confdefs.h"
15554 #include <$ac_hdr>
15555 EOF
15556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15557 { (eval echo configure:15556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15558 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15559 if test -z "$ac_err"; then
15560   rm -rf conftest*
15561   eval "ac_cv_header_$ac_safe=yes"
15562 else
15563   echo "$ac_err" >&5
15564   echo "configure: failed program was:" >&5
15565   cat conftest.$ac_ext >&5
15566   rm -rf conftest*
15567   eval "ac_cv_header_$ac_safe=no"
15568 fi
15569 rm -f conftest*
15570 fi
15571 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15572   echo "$ac_t""yes" 1>&6
15573     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15574   cat >> confdefs.h <<EOF
15575 #define $ac_tr_hdr 1
15576 EOF
15577  
15578 else
15579   echo "$ac_t""no" 1>&6
15580 fi
15581 done
15582
15583         if test $ac_cv_header_mach_cthreads_h = yes ; then
15584                 ol_with_threads=found
15585
15586                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15587 echo "configure:15586: checking for cthread_fork" >&5
15588 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15589   echo $ac_n "(cached) $ac_c" 1>&6
15590 else
15591   cat > conftest.$ac_ext <<EOF
15592 #line 15591 "configure"
15593 #include "confdefs.h"
15594 /* System header to define __stub macros and hopefully few prototypes,
15595     which can conflict with char cthread_fork(); below.  */
15596 #include <assert.h>
15597 /* Override any gcc2 internal prototype to avoid an error.  */
15598 /* We use char because int might match the return type of a gcc2
15599     builtin and then its argument prototype would still apply.  */
15600 char cthread_fork();
15601 char (*f)();
15602
15603 int main() {
15604
15605 /* The GNU C library defines this for functions which it implements
15606     to always fail with ENOSYS.  Some functions are actually named
15607     something starting with __ and the normal name is an alias.  */
15608 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15609 choke me
15610 #else
15611 f = cthread_fork;
15612 #endif
15613
15614 ; return 0; }
15615 EOF
15616 if { (eval echo configure:15615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15617   rm -rf conftest*
15618   eval "ac_cv_func_cthread_fork=yes"
15619 else
15620   echo "configure: failed program was:" >&5
15621   cat conftest.$ac_ext >&5
15622   rm -rf conftest*
15623   eval "ac_cv_func_cthread_fork=no"
15624 fi
15625 rm -f conftest*
15626 fi
15627
15628 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15629   echo "$ac_t""yes" 1>&6
15630   ol_link_threads=yes
15631 else
15632   echo "$ac_t""no" 1>&6
15633 fi
15634
15635
15636                 if test $ol_link_threads = no ; then
15637                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15638 echo "configure:15637: checking for cthread_fork with -all_load" >&5
15639 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15640   echo $ac_n "(cached) $ac_c" 1>&6
15641 else
15642   
15643                                                                 save_LIBS="$LIBS"
15644                                 LIBS="-all_load $LIBS"
15645                                 cat > conftest.$ac_ext <<EOF
15646 #line 15645 "configure"
15647 #include "confdefs.h"
15648 #include <mach/cthreads.h>
15649 int main() {
15650
15651                                         cthread_fork((void *)0, (void *)0);
15652                                         
15653 ; return 0; }
15654 EOF
15655 if { (eval echo configure:15654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15656   rm -rf conftest*
15657   ol_cv_cthread_all_load=yes
15658 else
15659   echo "configure: failed program was:" >&5
15660   cat conftest.$ac_ext >&5
15661   rm -rf conftest*
15662   ol_cv_cthread_all_load=no
15663 fi
15664 rm -f conftest*
15665                                                                 LIBS="$save_LIBS"
15666                         
15667 fi
15668
15669 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15670
15671                         if test $ol_cv_cthread_all_load = yes ; then
15672                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15673                                 ol_link_threads=mach
15674                                 ol_with_threads=found
15675                         fi
15676                 fi
15677
15678         elif test $ac_cv_header_cthreads_h = yes ; then
15679                                 
15680                 ol_with_threads=found
15681  
15682                                 save_LIBS="$LIBS"
15683                 LIBS="$LIBS -lthreads"
15684                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15685 echo "configure:15684: checking for cthread_fork" >&5
15686 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15687   echo $ac_n "(cached) $ac_c" 1>&6
15688 else
15689   cat > conftest.$ac_ext <<EOF
15690 #line 15689 "configure"
15691 #include "confdefs.h"
15692 /* System header to define __stub macros and hopefully few prototypes,
15693     which can conflict with char cthread_fork(); below.  */
15694 #include <assert.h>
15695 /* Override any gcc2 internal prototype to avoid an error.  */
15696 /* We use char because int might match the return type of a gcc2
15697     builtin and then its argument prototype would still apply.  */
15698 char cthread_fork();
15699 char (*f)();
15700
15701 int main() {
15702
15703 /* The GNU C library defines this for functions which it implements
15704     to always fail with ENOSYS.  Some functions are actually named
15705     something starting with __ and the normal name is an alias.  */
15706 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15707 choke me
15708 #else
15709 f = cthread_fork;
15710 #endif
15711
15712 ; return 0; }
15713 EOF
15714 if { (eval echo configure:15713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15715   rm -rf conftest*
15716   eval "ac_cv_func_cthread_fork=yes"
15717 else
15718   echo "configure: failed program was:" >&5
15719   cat conftest.$ac_ext >&5
15720   rm -rf conftest*
15721   eval "ac_cv_func_cthread_fork=no"
15722 fi
15723 rm -f conftest*
15724 fi
15725
15726 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15727   echo "$ac_t""yes" 1>&6
15728   ol_link_threads=yes
15729 else
15730   echo "$ac_t""no" 1>&6
15731 fi
15732
15733                 LIBS="$save_LIBS"
15734
15735                 if test $ol_link_threads = yes ; then
15736                         LTHREAD_LIBS="-lthreads"
15737                         ol_link_threads=mach
15738                         ol_with_threads=found
15739                 else
15740                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15741                 fi
15742
15743         elif test $ol_with_threads = mach ; then
15744                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15745         fi
15746
15747         if test $ol_link_threads = mach ; then
15748                 cat >> confdefs.h <<\EOF
15749 #define HAVE_MACH_CTHREADS 1
15750 EOF
15751
15752         elif test $ol_with_threads = found ; then
15753                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15754         fi
15755 fi
15756
15757 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15758         -o $ol_with_threads = pth ; then
15759
15760         for ac_hdr in pth.h
15761 do
15762 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15763 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15764 echo "configure:15763: checking for $ac_hdr" >&5
15765 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15766   echo $ac_n "(cached) $ac_c" 1>&6
15767 else
15768   cat > conftest.$ac_ext <<EOF
15769 #line 15768 "configure"
15770 #include "confdefs.h"
15771 #include <$ac_hdr>
15772 EOF
15773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15774 { (eval echo configure:15773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15776 if test -z "$ac_err"; then
15777   rm -rf conftest*
15778   eval "ac_cv_header_$ac_safe=yes"
15779 else
15780   echo "$ac_err" >&5
15781   echo "configure: failed program was:" >&5
15782   cat conftest.$ac_ext >&5
15783   rm -rf conftest*
15784   eval "ac_cv_header_$ac_safe=no"
15785 fi
15786 rm -f conftest*
15787 fi
15788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15789   echo "$ac_t""yes" 1>&6
15790     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15791   cat >> confdefs.h <<EOF
15792 #define $ac_tr_hdr 1
15793 EOF
15794  
15795 else
15796   echo "$ac_t""no" 1>&6
15797 fi
15798 done
15799
15800
15801         if test $ac_cv_header_pth_h = yes ; then
15802                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15803 echo "configure:15802: checking for pth_version in -lpth" >&5
15804 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15806   echo $ac_n "(cached) $ac_c" 1>&6
15807 else
15808   ac_save_LIBS="$LIBS"
15809 LIBS="-lpth  $LIBS"
15810 cat > conftest.$ac_ext <<EOF
15811 #line 15810 "configure"
15812 #include "confdefs.h"
15813 /* Override any gcc2 internal prototype to avoid an error.  */
15814 /* We use char because int might match the return type of a gcc2
15815     builtin and then its argument prototype would still apply.  */
15816 char pth_version();
15817
15818 int main() {
15819 pth_version()
15820 ; return 0; }
15821 EOF
15822 if { (eval echo configure:15821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15823   rm -rf conftest*
15824   eval "ac_cv_lib_$ac_lib_var=yes"
15825 else
15826   echo "configure: failed program was:" >&5
15827   cat conftest.$ac_ext >&5
15828   rm -rf conftest*
15829   eval "ac_cv_lib_$ac_lib_var=no"
15830 fi
15831 rm -f conftest*
15832 LIBS="$ac_save_LIBS"
15833
15834 fi
15835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15836   echo "$ac_t""yes" 1>&6
15837   have_pth=yes
15838 else
15839   echo "$ac_t""no" 1>&6
15840 have_pth=no
15841 fi
15842
15843
15844                 if test $have_pth = yes ; then
15845                         cat >> confdefs.h <<\EOF
15846 #define HAVE_GNU_PTH 1
15847 EOF
15848
15849                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15850                         ol_link_threads=pth
15851                         ol_with_threads=found
15852
15853                         if test $ol_with_yielding_select = auto ; then
15854                                 ol_with_yielding_select=yes
15855                         fi
15856                 fi
15857         fi
15858 fi
15859
15860 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15861         -o $ol_with_threads = lwp ; then
15862
15863                 for ac_hdr in thread.h synch.h
15864 do
15865 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15866 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15867 echo "configure:15866: checking for $ac_hdr" >&5
15868 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15869   echo $ac_n "(cached) $ac_c" 1>&6
15870 else
15871   cat > conftest.$ac_ext <<EOF
15872 #line 15871 "configure"
15873 #include "confdefs.h"
15874 #include <$ac_hdr>
15875 EOF
15876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15877 { (eval echo configure:15876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15879 if test -z "$ac_err"; then
15880   rm -rf conftest*
15881   eval "ac_cv_header_$ac_safe=yes"
15882 else
15883   echo "$ac_err" >&5
15884   echo "configure: failed program was:" >&5
15885   cat conftest.$ac_ext >&5
15886   rm -rf conftest*
15887   eval "ac_cv_header_$ac_safe=no"
15888 fi
15889 rm -f conftest*
15890 fi
15891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15892   echo "$ac_t""yes" 1>&6
15893     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15894   cat >> confdefs.h <<EOF
15895 #define $ac_tr_hdr 1
15896 EOF
15897  
15898 else
15899   echo "$ac_t""no" 1>&6
15900 fi
15901 done
15902
15903         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15904                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15905 echo "configure:15904: checking for thr_create in -lthread" >&5
15906 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15907 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15908   echo $ac_n "(cached) $ac_c" 1>&6
15909 else
15910   ac_save_LIBS="$LIBS"
15911 LIBS="-lthread  $LIBS"
15912 cat > conftest.$ac_ext <<EOF
15913 #line 15912 "configure"
15914 #include "confdefs.h"
15915 /* Override any gcc2 internal prototype to avoid an error.  */
15916 /* We use char because int might match the return type of a gcc2
15917     builtin and then its argument prototype would still apply.  */
15918 char thr_create();
15919
15920 int main() {
15921 thr_create()
15922 ; return 0; }
15923 EOF
15924 if { (eval echo configure:15923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15925   rm -rf conftest*
15926   eval "ac_cv_lib_$ac_lib_var=yes"
15927 else
15928   echo "configure: failed program was:" >&5
15929   cat conftest.$ac_ext >&5
15930   rm -rf conftest*
15931   eval "ac_cv_lib_$ac_lib_var=no"
15932 fi
15933 rm -f conftest*
15934 LIBS="$ac_save_LIBS"
15935
15936 fi
15937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15938   echo "$ac_t""yes" 1>&6
15939   have_thr=yes
15940 else
15941   echo "$ac_t""no" 1>&6
15942 have_thr=no
15943 fi
15944
15945
15946                 if test $have_thr = yes ; then
15947                         cat >> confdefs.h <<\EOF
15948 #define HAVE_THR 1
15949 EOF
15950
15951                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15952                         ol_link_threads=thr
15953
15954                         if test $ol_with_yielding_select = auto ; then
15955                                 ol_with_yielding_select=yes
15956                         fi
15957
15958                                                 for ac_func in \
15959                                 thr_setconcurrency \
15960                                 thr_getconcurrency \
15961                         
15962 do
15963 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15964 echo "configure:15963: checking for $ac_func" >&5
15965 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15966   echo $ac_n "(cached) $ac_c" 1>&6
15967 else
15968   cat > conftest.$ac_ext <<EOF
15969 #line 15968 "configure"
15970 #include "confdefs.h"
15971 /* System header to define __stub macros and hopefully few prototypes,
15972     which can conflict with char $ac_func(); below.  */
15973 #include <assert.h>
15974 /* Override any gcc2 internal prototype to avoid an error.  */
15975 /* We use char because int might match the return type of a gcc2
15976     builtin and then its argument prototype would still apply.  */
15977 char $ac_func();
15978 char (*f)();
15979
15980 int main() {
15981
15982 /* The GNU C library defines this for functions which it implements
15983     to always fail with ENOSYS.  Some functions are actually named
15984     something starting with __ and the normal name is an alias.  */
15985 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15986 choke me
15987 #else
15988 f = $ac_func;
15989 #endif
15990
15991 ; return 0; }
15992 EOF
15993 if { (eval echo configure:15992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15994   rm -rf conftest*
15995   eval "ac_cv_func_$ac_func=yes"
15996 else
15997   echo "configure: failed program was:" >&5
15998   cat conftest.$ac_ext >&5
15999   rm -rf conftest*
16000   eval "ac_cv_func_$ac_func=no"
16001 fi
16002 rm -f conftest*
16003 fi
16004
16005 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16006   echo "$ac_t""yes" 1>&6
16007     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16008   cat >> confdefs.h <<EOF
16009 #define $ac_tr_func 1
16010 EOF
16011  
16012 else
16013   echo "$ac_t""no" 1>&6
16014 fi
16015 done
16016
16017                 fi
16018         fi
16019
16020                 for ac_hdr in lwp/lwp.h
16021 do
16022 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16023 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16024 echo "configure:16023: checking for $ac_hdr" >&5
16025 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16026   echo $ac_n "(cached) $ac_c" 1>&6
16027 else
16028   cat > conftest.$ac_ext <<EOF
16029 #line 16028 "configure"
16030 #include "confdefs.h"
16031 #include <$ac_hdr>
16032 EOF
16033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16034 { (eval echo configure:16033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16036 if test -z "$ac_err"; then
16037   rm -rf conftest*
16038   eval "ac_cv_header_$ac_safe=yes"
16039 else
16040   echo "$ac_err" >&5
16041   echo "configure: failed program was:" >&5
16042   cat conftest.$ac_ext >&5
16043   rm -rf conftest*
16044   eval "ac_cv_header_$ac_safe=no"
16045 fi
16046 rm -f conftest*
16047 fi
16048 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16049   echo "$ac_t""yes" 1>&6
16050     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16051   cat >> confdefs.h <<EOF
16052 #define $ac_tr_hdr 1
16053 EOF
16054  
16055 else
16056   echo "$ac_t""no" 1>&6
16057 fi
16058 done
16059
16060         if test $ac_cv_header_lwp_lwp_h = yes ; then
16061                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16062 echo "configure:16061: checking for lwp_create in -llwp" >&5
16063 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16065   echo $ac_n "(cached) $ac_c" 1>&6
16066 else
16067   ac_save_LIBS="$LIBS"
16068 LIBS="-llwp  $LIBS"
16069 cat > conftest.$ac_ext <<EOF
16070 #line 16069 "configure"
16071 #include "confdefs.h"
16072 /* Override any gcc2 internal prototype to avoid an error.  */
16073 /* We use char because int might match the return type of a gcc2
16074     builtin and then its argument prototype would still apply.  */
16075 char lwp_create();
16076
16077 int main() {
16078 lwp_create()
16079 ; return 0; }
16080 EOF
16081 if { (eval echo configure:16080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16082   rm -rf conftest*
16083   eval "ac_cv_lib_$ac_lib_var=yes"
16084 else
16085   echo "configure: failed program was:" >&5
16086   cat conftest.$ac_ext >&5
16087   rm -rf conftest*
16088   eval "ac_cv_lib_$ac_lib_var=no"
16089 fi
16090 rm -f conftest*
16091 LIBS="$ac_save_LIBS"
16092
16093 fi
16094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16095   echo "$ac_t""yes" 1>&6
16096   have_lwp=yes
16097 else
16098   echo "$ac_t""no" 1>&6
16099 have_lwp=no
16100 fi
16101
16102
16103                 if test $have_lwp = yes ; then
16104                         cat >> confdefs.h <<\EOF
16105 #define HAVE_LWP 1
16106 EOF
16107
16108                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16109                         ol_link_threads=lwp
16110
16111                         if test $ol_with_yielding_select = auto ; then
16112                                 ol_with_yielding_select=no
16113                         fi
16114                 fi
16115         fi
16116 fi
16117
16118 if test $ol_with_yielding_select = yes ; then
16119         cat >> confdefs.h <<\EOF
16120 #define HAVE_YIELDING_SELECT 1
16121 EOF
16122
16123 fi
16124
16125 if test $ol_with_threads = manual ; then
16126                 ol_link_threads=yes
16127
16128         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16129
16130         for ac_hdr in pthread.h sched.h
16131 do
16132 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16133 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16134 echo "configure:16133: checking for $ac_hdr" >&5
16135 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16136   echo $ac_n "(cached) $ac_c" 1>&6
16137 else
16138   cat > conftest.$ac_ext <<EOF
16139 #line 16138 "configure"
16140 #include "confdefs.h"
16141 #include <$ac_hdr>
16142 EOF
16143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16144 { (eval echo configure:16143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16146 if test -z "$ac_err"; then
16147   rm -rf conftest*
16148   eval "ac_cv_header_$ac_safe=yes"
16149 else
16150   echo "$ac_err" >&5
16151   echo "configure: failed program was:" >&5
16152   cat conftest.$ac_ext >&5
16153   rm -rf conftest*
16154   eval "ac_cv_header_$ac_safe=no"
16155 fi
16156 rm -f conftest*
16157 fi
16158 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16159   echo "$ac_t""yes" 1>&6
16160     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16161   cat >> confdefs.h <<EOF
16162 #define $ac_tr_hdr 1
16163 EOF
16164  
16165 else
16166   echo "$ac_t""no" 1>&6
16167 fi
16168 done
16169
16170         for ac_func in sched_yield pthread_yield
16171 do
16172 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16173 echo "configure:16172: checking for $ac_func" >&5
16174 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16175   echo $ac_n "(cached) $ac_c" 1>&6
16176 else
16177   cat > conftest.$ac_ext <<EOF
16178 #line 16177 "configure"
16179 #include "confdefs.h"
16180 /* System header to define __stub macros and hopefully few prototypes,
16181     which can conflict with char $ac_func(); below.  */
16182 #include <assert.h>
16183 /* Override any gcc2 internal prototype to avoid an error.  */
16184 /* We use char because int might match the return type of a gcc2
16185     builtin and then its argument prototype would still apply.  */
16186 char $ac_func();
16187 char (*f)();
16188
16189 int main() {
16190
16191 /* The GNU C library defines this for functions which it implements
16192     to always fail with ENOSYS.  Some functions are actually named
16193     something starting with __ and the normal name is an alias.  */
16194 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16195 choke me
16196 #else
16197 f = $ac_func;
16198 #endif
16199
16200 ; return 0; }
16201 EOF
16202 if { (eval echo configure:16201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16203   rm -rf conftest*
16204   eval "ac_cv_func_$ac_func=yes"
16205 else
16206   echo "configure: failed program was:" >&5
16207   cat conftest.$ac_ext >&5
16208   rm -rf conftest*
16209   eval "ac_cv_func_$ac_func=no"
16210 fi
16211 rm -f conftest*
16212 fi
16213
16214 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16215   echo "$ac_t""yes" 1>&6
16216     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16217   cat >> confdefs.h <<EOF
16218 #define $ac_tr_func 1
16219 EOF
16220  
16221 else
16222   echo "$ac_t""no" 1>&6
16223 fi
16224 done
16225
16226         
16227         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16228 echo "configure:16227: checking for LinuxThreads pthread.h" >&5
16229 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16230   echo $ac_n "(cached) $ac_c" 1>&6
16231 else
16232   cat > conftest.$ac_ext <<EOF
16233 #line 16232 "configure"
16234 #include "confdefs.h"
16235 #include <pthread.h>
16236 EOF
16237 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16238   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16239   rm -rf conftest*
16240   ol_cv_header_linux_threads=yes
16241 else
16242   rm -rf conftest*
16243   ol_cv_header_linux_threads=no
16244 fi
16245 rm -f conftest*
16246
16247                 
16248 fi
16249
16250 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16251         if test $ol_cv_header_linux_threads = yes; then
16252                 cat >> confdefs.h <<\EOF
16253 #define HAVE_LINUX_THREADS 1
16254 EOF
16255
16256         fi
16257
16258
16259         for ac_hdr in mach/cthreads.h
16260 do
16261 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16262 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16263 echo "configure:16262: checking for $ac_hdr" >&5
16264 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16265   echo $ac_n "(cached) $ac_c" 1>&6
16266 else
16267   cat > conftest.$ac_ext <<EOF
16268 #line 16267 "configure"
16269 #include "confdefs.h"
16270 #include <$ac_hdr>
16271 EOF
16272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16273 { (eval echo configure:16272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16275 if test -z "$ac_err"; then
16276   rm -rf conftest*
16277   eval "ac_cv_header_$ac_safe=yes"
16278 else
16279   echo "$ac_err" >&5
16280   echo "configure: failed program was:" >&5
16281   cat conftest.$ac_ext >&5
16282   rm -rf conftest*
16283   eval "ac_cv_header_$ac_safe=no"
16284 fi
16285 rm -f conftest*
16286 fi
16287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16288   echo "$ac_t""yes" 1>&6
16289     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16290   cat >> confdefs.h <<EOF
16291 #define $ac_tr_hdr 1
16292 EOF
16293  
16294 else
16295   echo "$ac_t""no" 1>&6
16296 fi
16297 done
16298
16299         for ac_hdr in lwp/lwp.h
16300 do
16301 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16302 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16303 echo "configure:16302: checking for $ac_hdr" >&5
16304 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16305   echo $ac_n "(cached) $ac_c" 1>&6
16306 else
16307   cat > conftest.$ac_ext <<EOF
16308 #line 16307 "configure"
16309 #include "confdefs.h"
16310 #include <$ac_hdr>
16311 EOF
16312 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16313 { (eval echo configure:16312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16314 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16315 if test -z "$ac_err"; then
16316   rm -rf conftest*
16317   eval "ac_cv_header_$ac_safe=yes"
16318 else
16319   echo "$ac_err" >&5
16320   echo "configure: failed program was:" >&5
16321   cat conftest.$ac_ext >&5
16322   rm -rf conftest*
16323   eval "ac_cv_header_$ac_safe=no"
16324 fi
16325 rm -f conftest*
16326 fi
16327 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16328   echo "$ac_t""yes" 1>&6
16329     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16330   cat >> confdefs.h <<EOF
16331 #define $ac_tr_hdr 1
16332 EOF
16333  
16334 else
16335   echo "$ac_t""no" 1>&6
16336 fi
16337 done
16338
16339         for ac_hdr in thread.h synch.h
16340 do
16341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16342 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16343 echo "configure:16342: checking for $ac_hdr" >&5
16344 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16345   echo $ac_n "(cached) $ac_c" 1>&6
16346 else
16347   cat > conftest.$ac_ext <<EOF
16348 #line 16347 "configure"
16349 #include "confdefs.h"
16350 #include <$ac_hdr>
16351 EOF
16352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16353 { (eval echo configure:16352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16355 if test -z "$ac_err"; then
16356   rm -rf conftest*
16357   eval "ac_cv_header_$ac_safe=yes"
16358 else
16359   echo "$ac_err" >&5
16360   echo "configure: failed program was:" >&5
16361   cat conftest.$ac_ext >&5
16362   rm -rf conftest*
16363   eval "ac_cv_header_$ac_safe=no"
16364 fi
16365 rm -f conftest*
16366 fi
16367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16368   echo "$ac_t""yes" 1>&6
16369     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16370   cat >> confdefs.h <<EOF
16371 #define $ac_tr_hdr 1
16372 EOF
16373  
16374 else
16375   echo "$ac_t""no" 1>&6
16376 fi
16377 done
16378
16379 fi
16380
16381 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16382                         cat >> confdefs.h <<\EOF
16383 #define REENTRANT 1
16384 EOF
16385
16386         cat >> confdefs.h <<\EOF
16387 #define _REENTRANT 1
16388 EOF
16389
16390         cat >> confdefs.h <<\EOF
16391 #define THREAD_SAFE 1
16392 EOF
16393
16394         cat >> confdefs.h <<\EOF
16395 #define _THREAD_SAFE 1
16396 EOF
16397
16398         cat >> confdefs.h <<\EOF
16399 #define THREADSAFE 1
16400 EOF
16401
16402         cat >> confdefs.h <<\EOF
16403 #define _THREADSAFE 1
16404 EOF
16405
16406         cat >> confdefs.h <<\EOF
16407 #define _SGI_MP_SOURCE 1
16408 EOF
16409
16410
16411                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16412 echo "configure:16411: checking for thread specific errno" >&5
16413 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16414   echo $ac_n "(cached) $ac_c" 1>&6
16415 else
16416   
16417                 cat > conftest.$ac_ext <<EOF
16418 #line 16417 "configure"
16419 #include "confdefs.h"
16420 #include <errno.h>
16421 int main() {
16422 errno = 0;
16423 ; return 0; }
16424 EOF
16425 if { (eval echo configure:16424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16426   rm -rf conftest*
16427   ol_cv_errno_thread_specific=yes
16428 else
16429   echo "configure: failed program was:" >&5
16430   cat conftest.$ac_ext >&5
16431   rm -rf conftest*
16432   ol_cv_errno_thread_specific=no
16433 fi
16434 rm -f conftest*
16435         
16436 fi
16437
16438 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16439
16440                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16441 echo "configure:16440: checking for thread specific h_errno" >&5
16442 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16443   echo $ac_n "(cached) $ac_c" 1>&6
16444 else
16445   
16446                 cat > conftest.$ac_ext <<EOF
16447 #line 16446 "configure"
16448 #include "confdefs.h"
16449 #include <netdb.h>
16450 int main() {
16451 h_errno = 0;
16452 ; return 0; }
16453 EOF
16454 if { (eval echo configure:16453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16455   rm -rf conftest*
16456   ol_cv_h_errno_thread_specific=yes
16457 else
16458   echo "configure: failed program was:" >&5
16459   cat conftest.$ac_ext >&5
16460   rm -rf conftest*
16461   ol_cv_h_errno_thread_specific=no
16462 fi
16463 rm -f conftest*
16464         
16465 fi
16466
16467 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16468
16469         if test $ol_cv_errno_thread_specific != yes \
16470                 -o $ol_cv_h_errno_thread_specific != yes ; then
16471                 LIBS="$LTHREAD_LIBS $LIBS"
16472                 LTHREAD_LIBS=""
16473         fi
16474
16475 fi  
16476
16477 if test $ol_link_threads = no ; then
16478         if test $ol_with_threads = yes ; then
16479                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16480         fi
16481
16482         if test $ol_with_threads = auto ; then
16483                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16484                 ol_with_threads=no
16485         fi
16486
16487         cat >> confdefs.h <<\EOF
16488 #define NO_THREADS 1
16489 EOF
16490
16491         LTHREAD_LIBS=""
16492 fi
16493
16494 if test $ol_link_threads != no ; then
16495         cat >> confdefs.h <<\EOF
16496 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16497 EOF
16498
16499 fi
16500
16501 for ac_func in \
16502         ctime_r                 \
16503         gethostbyname_r gethostbyaddr_r \
16504
16505 do
16506 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16507 echo "configure:16506: checking for $ac_func" >&5
16508 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16509   echo $ac_n "(cached) $ac_c" 1>&6
16510 else
16511   cat > conftest.$ac_ext <<EOF
16512 #line 16511 "configure"
16513 #include "confdefs.h"
16514 /* System header to define __stub macros and hopefully few prototypes,
16515     which can conflict with char $ac_func(); below.  */
16516 #include <assert.h>
16517 /* Override any gcc2 internal prototype to avoid an error.  */
16518 /* We use char because int might match the return type of a gcc2
16519     builtin and then its argument prototype would still apply.  */
16520 char $ac_func();
16521 char (*f)();
16522
16523 int main() {
16524
16525 /* The GNU C library defines this for functions which it implements
16526     to always fail with ENOSYS.  Some functions are actually named
16527     something starting with __ and the normal name is an alias.  */
16528 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16529 choke me
16530 #else
16531 f = $ac_func;
16532 #endif
16533
16534 ; return 0; }
16535 EOF
16536 if { (eval echo configure:16535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16537   rm -rf conftest*
16538   eval "ac_cv_func_$ac_func=yes"
16539 else
16540   echo "configure: failed program was:" >&5
16541   cat conftest.$ac_ext >&5
16542   rm -rf conftest*
16543   eval "ac_cv_func_$ac_func=no"
16544 fi
16545 rm -f conftest*
16546 fi
16547
16548 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16549   echo "$ac_t""yes" 1>&6
16550     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16551   cat >> confdefs.h <<EOF
16552 #define $ac_tr_func 1
16553 EOF
16554  
16555 else
16556   echo "$ac_t""no" 1>&6
16557 fi
16558 done
16559
16560
16561 if test "$ac_cv_func_ctime_r" = no ; then
16562         ol_cv_func_ctime_r_nargs=0
16563 else
16564         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16565 echo "configure:16564: checking number of arguments of ctime_r" >&5
16566 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16567   echo $ac_n "(cached) $ac_c" 1>&6
16568 else
16569   cat > conftest.$ac_ext <<EOF
16570 #line 16569 "configure"
16571 #include "confdefs.h"
16572 #include <time.h>
16573 int main() {
16574 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16575 ; return 0; }
16576 EOF
16577 if { (eval echo configure:16576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16578   rm -rf conftest*
16579   ol_cv_func_ctime_r_nargs3=yes
16580 else
16581   echo "configure: failed program was:" >&5
16582   cat conftest.$ac_ext >&5
16583   rm -rf conftest*
16584   ol_cv_func_ctime_r_nargs3=no
16585 fi
16586 rm -f conftest*
16587
16588         cat > conftest.$ac_ext <<EOF
16589 #line 16588 "configure"
16590 #include "confdefs.h"
16591 #include <time.h>
16592 int main() {
16593 time_t ti; char *buffer; ctime_r(&ti,buffer);
16594 ; return 0; }
16595 EOF
16596 if { (eval echo configure:16595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16597   rm -rf conftest*
16598   ol_cv_func_ctime_r_nargs2=yes
16599 else
16600   echo "configure: failed program was:" >&5
16601   cat conftest.$ac_ext >&5
16602   rm -rf conftest*
16603   ol_cv_func_ctime_r_nargs2=no
16604 fi
16605 rm -f conftest*
16606
16607         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16608                 $ol_cv_func_ctime_r_nargs2 = no ; then
16609
16610                 ol_cv_func_ctime_r_nargs=3
16611
16612         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16613                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16614
16615                 ol_cv_func_ctime_r_nargs=2
16616
16617         else
16618                 ol_cv_func_ctime_r_nargs=0
16619         fi
16620   
16621 fi
16622
16623 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16624
16625   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16626         cat >> confdefs.h <<EOF
16627 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16628 EOF
16629
16630   fi
16631
16632 fi
16633
16634 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16635         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16636 echo "configure:16635: checking number of arguments of gethostbyname_r" >&5
16637 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16638   echo $ac_n "(cached) $ac_c" 1>&6
16639 else
16640   cat > conftest.$ac_ext <<EOF
16641 #line 16640 "configure"
16642 #include "confdefs.h"
16643 #include <sys/types.h>
16644 #include <sys/socket.h>
16645 #include <netinet/in.h>
16646 #include <netdb.h>
16647 #define BUFSIZE (sizeof(struct hostent)+10)
16648 int main() {
16649 struct hostent hent; char buffer[BUFSIZE];
16650                 int bufsize=BUFSIZE;int h_errno;
16651                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16652                         buffer, bufsize, &h_errno);
16653 ; return 0; }
16654 EOF
16655 if { (eval echo configure:16654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16656   rm -rf conftest*
16657   ol_cv_func_gethostbyname_r_nargs5=yes
16658 else
16659   echo "configure: failed program was:" >&5
16660   cat conftest.$ac_ext >&5
16661   rm -rf conftest*
16662   ol_cv_func_gethostbyname_r_nargs5=no
16663 fi
16664 rm -f conftest*
16665
16666         cat > conftest.$ac_ext <<EOF
16667 #line 16666 "configure"
16668 #include "confdefs.h"
16669 #include <sys/types.h>
16670 #include <sys/socket.h>
16671 #include <netinet/in.h>
16672 #include <netdb.h>
16673 #define BUFSIZE (sizeof(struct hostent)+10)
16674 int main() {
16675 struct hostent hent;struct hostent *rhent;
16676                 char buffer[BUFSIZE];
16677                 int bufsize=BUFSIZE;int h_errno;
16678                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16679                         &rhent, &h_errno);
16680 ; return 0; }
16681 EOF
16682 if { (eval echo configure:16681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16683   rm -rf conftest*
16684   ol_cv_func_gethostbyname_r_nargs6=yes
16685 else
16686   echo "configure: failed program was:" >&5
16687   cat conftest.$ac_ext >&5
16688   rm -rf conftest*
16689   ol_cv_func_gethostbyname_r_nargs6=no
16690 fi
16691 rm -f conftest*
16692
16693         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16694                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16695
16696                 ol_cv_func_gethostbyname_r_nargs=5
16697
16698         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16699                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16700
16701                 ol_cv_func_gethostbyname_r_nargs=6
16702
16703         else
16704                 ol_cv_func_gethostbyname_r_nargs=0
16705         fi
16706   
16707 fi
16708
16709 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16710   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16711         cat >> confdefs.h <<EOF
16712 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16713 EOF
16714
16715   fi
16716
16717 else
16718         ol_cv_func_gethostbyname_r_nargs=0
16719 fi
16720  
16721 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16722         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16723 echo "configure:16722: checking number of arguments of gethostbyaddr_r" >&5
16724 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16725   echo $ac_n "(cached) $ac_c" 1>&6
16726 else
16727   cat > conftest.$ac_ext <<EOF
16728 #line 16727 "configure"
16729 #include "confdefs.h"
16730 #include <sys/types.h>
16731 #include <sys/socket.h>
16732 #include <netinet/in.h>
16733 #include <netdb.h>
16734 #define BUFSIZE (sizeof(struct hostent)+10)
16735 int main() {
16736 struct hostent hent; char buffer[BUFSIZE]; 
16737             struct in_addr add;
16738             size_t alen=sizeof(struct in_addr);
16739             int bufsize=BUFSIZE;int h_errno;
16740                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16741                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16742 ; return 0; }
16743 EOF
16744 if { (eval echo configure:16743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16745   rm -rf conftest*
16746   ol_cv_func_gethostbyaddr_r_nargs7=yes
16747 else
16748   echo "configure: failed program was:" >&5
16749   cat conftest.$ac_ext >&5
16750   rm -rf conftest*
16751   ol_cv_func_gethostbyaddr_r_nargs7=no
16752 fi
16753 rm -f conftest*
16754
16755         cat > conftest.$ac_ext <<EOF
16756 #line 16755 "configure"
16757 #include "confdefs.h"
16758 #include <sys/types.h>
16759 #include <sys/socket.h>
16760 #include <netinet/in.h>
16761 #include <netdb.h>
16762 #define BUFSIZE (sizeof(struct hostent)+10)
16763 int main() {
16764 struct hostent hent;
16765                 struct hostent *rhent; char buffer[BUFSIZE]; 
16766                 struct in_addr add;
16767                 size_t alen=sizeof(struct in_addr);
16768                 int bufsize=BUFSIZE;int h_errno;
16769                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16770                         alen, AF_INET, &hent, buffer, bufsize, 
16771                         &rhent, &h_errno);
16772 ; return 0; }
16773 EOF
16774 if { (eval echo configure:16773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16775   rm -rf conftest*
16776   ol_cv_func_gethostbyaddr_r_nargs8=yes
16777 else
16778   echo "configure: failed program was:" >&5
16779   cat conftest.$ac_ext >&5
16780   rm -rf conftest*
16781   ol_cv_func_gethostbyaddr_r_nargs8=no
16782 fi
16783 rm -f conftest*
16784
16785         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16786                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16787
16788                 ol_cv_func_gethostbyaddr_r_nargs=7
16789
16790         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16791                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16792
16793                 ol_cv_func_gethostbyaddr_r_nargs=8
16794
16795         else
16796                 ol_cv_func_gethostbyaddr_r_nargs=0
16797         fi
16798   
16799 fi
16800
16801 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16802   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16803     cat >> confdefs.h <<EOF
16804 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16805 EOF
16806
16807   fi
16808
16809 else
16810         ol_cv_func_gethostbyaddr_r_nargs=0
16811 fi
16812
16813 ol_link_ldbm=no 
16814
16815 if test $ol_with_ldbm_api = auto \
16816         -o $ol_with_ldbm_api = berkeley \
16817         -o $ol_with_ldbm_api = bcompat ; then
16818
16819         if test $ol_with_ldbm_api = bcompat; then \
16820                 for ac_hdr in db_185.h db.h
16821 do
16822 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16823 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16824 echo "configure:16823: checking for $ac_hdr" >&5
16825 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16826   echo $ac_n "(cached) $ac_c" 1>&6
16827 else
16828   cat > conftest.$ac_ext <<EOF
16829 #line 16828 "configure"
16830 #include "confdefs.h"
16831 #include <$ac_hdr>
16832 EOF
16833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16834 { (eval echo configure:16833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16836 if test -z "$ac_err"; then
16837   rm -rf conftest*
16838   eval "ac_cv_header_$ac_safe=yes"
16839 else
16840   echo "$ac_err" >&5
16841   echo "configure: failed program was:" >&5
16842   cat conftest.$ac_ext >&5
16843   rm -rf conftest*
16844   eval "ac_cv_header_$ac_safe=no"
16845 fi
16846 rm -f conftest*
16847 fi
16848 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16849   echo "$ac_t""yes" 1>&6
16850     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16851   cat >> confdefs.h <<EOF
16852 #define $ac_tr_hdr 1
16853 EOF
16854  
16855 else
16856   echo "$ac_t""no" 1>&6
16857 fi
16858 done
16859
16860 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16861         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16862 echo "configure:16861: checking if Berkeley DB header compatibility" >&5
16863 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16864   echo $ac_n "(cached) $ac_c" 1>&6
16865 else
16866   
16867                 cat > conftest.$ac_ext <<EOF
16868 #line 16867 "configure"
16869 #include "confdefs.h"
16870
16871 #if HAVE_DB_185_H
16872 #       include <db_185.h>
16873 #else
16874 #       include <db.h>
16875 #endif
16876
16877  /* this check could be improved */
16878 #ifndef DB_VERSION_MAJOR
16879 #       define DB_VERSION_MAJOR 1
16880 #endif
16881
16882 #if DB_VERSION_MAJOR == 1 
16883         __db_version_1
16884 #endif
16885
16886 EOF
16887 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16888   egrep "__db_version_1" >/dev/null 2>&1; then
16889   rm -rf conftest*
16890   ol_cv_header_db1=yes
16891 else
16892   rm -rf conftest*
16893   ol_cv_header_db1=no
16894 fi
16895 rm -f conftest*
16896
16897 fi
16898
16899 echo "$ac_t""$ol_cv_header_db1" 1>&6
16900
16901         if test $ol_cv_header_db1 = yes ; then
16902                 ol_cv_lib_db=no
16903 if test $ol_cv_lib_db = no ; then
16904         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16905 echo "configure:16904: checking for Berkeley DB link (default)" >&5
16906 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16907   echo $ac_n "(cached) $ac_c" 1>&6
16908 else
16909   
16910         ol_DB_LIB=
16911         ol_LIBS=$LIBS
16912         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16913
16914         cat > conftest.$ac_ext <<EOF
16915 #line 16914 "configure"
16916 #include "confdefs.h"
16917
16918 #ifdef HAVE_DB_185_H
16919 # include <db_185.h>
16920 #else
16921 # include <db.h>
16922 #endif
16923
16924 #ifndef DB_VERSION_MAJOR
16925 # define DB_VERSION_MAJOR 1
16926 #endif
16927
16928 #ifndef NULL
16929 #define NULL ((void*)0)
16930 #endif
16931
16932 int main() {
16933
16934 #if DB_VERSION_MAJOR > 1
16935         {
16936                 char *version;
16937                 int major, minor, patch;
16938
16939                 version = db_version( &major, &minor, &patch );
16940
16941                 if( major != DB_VERSION_MAJOR ||
16942                         minor < DB_VERSION_MINOR )
16943                 {
16944                         printf("Berkeley DB version mismatch\n"
16945                                 "\theader: %s\n\tlibrary: %s\n",
16946                                 DB_VERSION_STRING, version);
16947                         return 1;
16948                 }
16949         }
16950 #endif
16951
16952 #if DB_VERSION_MAJOR > 2
16953         db_env_create( NULL, 0 );
16954 #elif DB_VERSION_MAJOR > 1
16955         db_appexit( NULL );
16956 #else
16957         (void) dbopen( NULL, 0, 0, 0, NULL);
16958 #endif
16959
16960 ; return 0; }
16961 EOF
16962 if { (eval echo configure:16961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16963   rm -rf conftest*
16964   ol_cv_db_none=yes
16965 else
16966   echo "configure: failed program was:" >&5
16967   cat conftest.$ac_ext >&5
16968   rm -rf conftest*
16969   ol_cv_db_none=no
16970 fi
16971 rm -f conftest*
16972
16973         LIBS="$ol_LIBS"
16974
16975 fi
16976
16977 echo "$ac_t""$ol_cv_db_none" 1>&6
16978
16979         if test $ol_cv_db_none = yes ; then
16980                 ol_cv_lib_db=yes
16981         fi
16982 fi
16983
16984 if test $ol_cv_lib_db = no ; then
16985         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16986 echo "configure:16985: checking for Berkeley DB link (-ldb42)" >&5
16987 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16988   echo $ac_n "(cached) $ac_c" 1>&6
16989 else
16990   
16991         ol_DB_LIB=-ldb42
16992         ol_LIBS=$LIBS
16993         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16994
16995         cat > conftest.$ac_ext <<EOF
16996 #line 16995 "configure"
16997 #include "confdefs.h"
16998
16999 #ifdef HAVE_DB_185_H
17000 # include <db_185.h>
17001 #else
17002 # include <db.h>
17003 #endif
17004
17005 #ifndef DB_VERSION_MAJOR
17006 # define DB_VERSION_MAJOR 1
17007 #endif
17008
17009 #ifndef NULL
17010 #define NULL ((void*)0)
17011 #endif
17012
17013 int main() {
17014
17015 #if DB_VERSION_MAJOR > 1
17016         {
17017                 char *version;
17018                 int major, minor, patch;
17019
17020                 version = db_version( &major, &minor, &patch );
17021
17022                 if( major != DB_VERSION_MAJOR ||
17023                         minor < DB_VERSION_MINOR )
17024                 {
17025                         printf("Berkeley DB version mismatch\n"
17026                                 "\theader: %s\n\tlibrary: %s\n",
17027                                 DB_VERSION_STRING, version);
17028                         return 1;
17029                 }
17030         }
17031 #endif
17032
17033 #if DB_VERSION_MAJOR > 2
17034         db_env_create( NULL, 0 );
17035 #elif DB_VERSION_MAJOR > 1
17036         db_appexit( NULL );
17037 #else
17038         (void) dbopen( NULL, 0, 0, 0, NULL);
17039 #endif
17040
17041 ; return 0; }
17042 EOF
17043 if { (eval echo configure:17042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17044   rm -rf conftest*
17045   ol_cv_db_db42=yes
17046 else
17047   echo "configure: failed program was:" >&5
17048   cat conftest.$ac_ext >&5
17049   rm -rf conftest*
17050   ol_cv_db_db42=no
17051 fi
17052 rm -f conftest*
17053
17054         LIBS="$ol_LIBS"
17055
17056 fi
17057
17058 echo "$ac_t""$ol_cv_db_db42" 1>&6
17059
17060         if test $ol_cv_db_db42 = yes ; then
17061                 ol_cv_lib_db=-ldb42
17062         fi
17063 fi
17064
17065 if test $ol_cv_lib_db = no ; then
17066         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17067 echo "configure:17066: checking for Berkeley DB link (-ldb-42)" >&5
17068 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17069   echo $ac_n "(cached) $ac_c" 1>&6
17070 else
17071   
17072         ol_DB_LIB=-ldb-42
17073         ol_LIBS=$LIBS
17074         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17075
17076         cat > conftest.$ac_ext <<EOF
17077 #line 17076 "configure"
17078 #include "confdefs.h"
17079
17080 #ifdef HAVE_DB_185_H
17081 # include <db_185.h>
17082 #else
17083 # include <db.h>
17084 #endif
17085
17086 #ifndef DB_VERSION_MAJOR
17087 # define DB_VERSION_MAJOR 1
17088 #endif
17089
17090 #ifndef NULL
17091 #define NULL ((void*)0)
17092 #endif
17093
17094 int main() {
17095
17096 #if DB_VERSION_MAJOR > 1
17097         {
17098                 char *version;
17099                 int major, minor, patch;
17100
17101                 version = db_version( &major, &minor, &patch );
17102
17103                 if( major != DB_VERSION_MAJOR ||
17104                         minor < DB_VERSION_MINOR )
17105                 {
17106                         printf("Berkeley DB version mismatch\n"
17107                                 "\theader: %s\n\tlibrary: %s\n",
17108                                 DB_VERSION_STRING, version);
17109                         return 1;
17110                 }
17111         }
17112 #endif
17113
17114 #if DB_VERSION_MAJOR > 2
17115         db_env_create( NULL, 0 );
17116 #elif DB_VERSION_MAJOR > 1
17117         db_appexit( NULL );
17118 #else
17119         (void) dbopen( NULL, 0, 0, 0, NULL);
17120 #endif
17121
17122 ; return 0; }
17123 EOF
17124 if { (eval echo configure:17123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17125   rm -rf conftest*
17126   ol_cv_db_db_42=yes
17127 else
17128   echo "configure: failed program was:" >&5
17129   cat conftest.$ac_ext >&5
17130   rm -rf conftest*
17131   ol_cv_db_db_42=no
17132 fi
17133 rm -f conftest*
17134
17135         LIBS="$ol_LIBS"
17136
17137 fi
17138
17139 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17140
17141         if test $ol_cv_db_db_42 = yes ; then
17142                 ol_cv_lib_db=-ldb-42
17143         fi
17144 fi
17145
17146 if test $ol_cv_lib_db = no ; then
17147         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17148 echo "configure:17147: checking for Berkeley DB link (-ldb-4.2)" >&5
17149 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17150   echo $ac_n "(cached) $ac_c" 1>&6
17151 else
17152   
17153         ol_DB_LIB=-ldb-4.2
17154         ol_LIBS=$LIBS
17155         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17156
17157         cat > conftest.$ac_ext <<EOF
17158 #line 17157 "configure"
17159 #include "confdefs.h"
17160
17161 #ifdef HAVE_DB_185_H
17162 # include <db_185.h>
17163 #else
17164 # include <db.h>
17165 #endif
17166
17167 #ifndef DB_VERSION_MAJOR
17168 # define DB_VERSION_MAJOR 1
17169 #endif
17170
17171 #ifndef NULL
17172 #define NULL ((void*)0)
17173 #endif
17174
17175 int main() {
17176
17177 #if DB_VERSION_MAJOR > 1
17178         {
17179                 char *version;
17180                 int major, minor, patch;
17181
17182                 version = db_version( &major, &minor, &patch );
17183
17184                 if( major != DB_VERSION_MAJOR ||
17185                         minor < DB_VERSION_MINOR )
17186                 {
17187                         printf("Berkeley DB version mismatch\n"
17188                                 "\theader: %s\n\tlibrary: %s\n",
17189                                 DB_VERSION_STRING, version);
17190                         return 1;
17191                 }
17192         }
17193 #endif
17194
17195 #if DB_VERSION_MAJOR > 2
17196         db_env_create( NULL, 0 );
17197 #elif DB_VERSION_MAJOR > 1
17198         db_appexit( NULL );
17199 #else
17200         (void) dbopen( NULL, 0, 0, 0, NULL);
17201 #endif
17202
17203 ; return 0; }
17204 EOF
17205 if { (eval echo configure:17204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17206   rm -rf conftest*
17207   ol_cv_db_db_4_dot_2=yes
17208 else
17209   echo "configure: failed program was:" >&5
17210   cat conftest.$ac_ext >&5
17211   rm -rf conftest*
17212   ol_cv_db_db_4_dot_2=no
17213 fi
17214 rm -f conftest*
17215
17216         LIBS="$ol_LIBS"
17217
17218 fi
17219
17220 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17221
17222         if test $ol_cv_db_db_4_dot_2 = yes ; then
17223                 ol_cv_lib_db=-ldb-4.2
17224         fi
17225 fi
17226
17227 if test $ol_cv_lib_db = no ; then
17228         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17229 echo "configure:17228: checking for Berkeley DB link (-ldb-4-2)" >&5
17230 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17231   echo $ac_n "(cached) $ac_c" 1>&6
17232 else
17233   
17234         ol_DB_LIB=-ldb-4-2
17235         ol_LIBS=$LIBS
17236         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17237
17238         cat > conftest.$ac_ext <<EOF
17239 #line 17238 "configure"
17240 #include "confdefs.h"
17241
17242 #ifdef HAVE_DB_185_H
17243 # include <db_185.h>
17244 #else
17245 # include <db.h>
17246 #endif
17247
17248 #ifndef DB_VERSION_MAJOR
17249 # define DB_VERSION_MAJOR 1
17250 #endif
17251
17252 #ifndef NULL
17253 #define NULL ((void*)0)
17254 #endif
17255
17256 int main() {
17257
17258 #if DB_VERSION_MAJOR > 1
17259         {
17260                 char *version;
17261                 int major, minor, patch;
17262
17263                 version = db_version( &major, &minor, &patch );
17264
17265                 if( major != DB_VERSION_MAJOR ||
17266                         minor < DB_VERSION_MINOR )
17267                 {
17268                         printf("Berkeley DB version mismatch\n"
17269                                 "\theader: %s\n\tlibrary: %s\n",
17270                                 DB_VERSION_STRING, version);
17271                         return 1;
17272                 }
17273         }
17274 #endif
17275
17276 #if DB_VERSION_MAJOR > 2
17277         db_env_create( NULL, 0 );
17278 #elif DB_VERSION_MAJOR > 1
17279         db_appexit( NULL );
17280 #else
17281         (void) dbopen( NULL, 0, 0, 0, NULL);
17282 #endif
17283
17284 ; return 0; }
17285 EOF
17286 if { (eval echo configure:17285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17287   rm -rf conftest*
17288   ol_cv_db_db_4_2=yes
17289 else
17290   echo "configure: failed program was:" >&5
17291   cat conftest.$ac_ext >&5
17292   rm -rf conftest*
17293   ol_cv_db_db_4_2=no
17294 fi
17295 rm -f conftest*
17296
17297         LIBS="$ol_LIBS"
17298
17299 fi
17300
17301 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17302
17303         if test $ol_cv_db_db_4_2 = yes ; then
17304                 ol_cv_lib_db=-ldb-4-2
17305         fi
17306 fi
17307
17308 if test $ol_cv_lib_db = no ; then
17309         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17310 echo "configure:17309: checking for Berkeley DB link (-ldb-4)" >&5
17311 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17312   echo $ac_n "(cached) $ac_c" 1>&6
17313 else
17314   
17315         ol_DB_LIB=-ldb-4
17316         ol_LIBS=$LIBS
17317         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17318
17319         cat > conftest.$ac_ext <<EOF
17320 #line 17319 "configure"
17321 #include "confdefs.h"
17322
17323 #ifdef HAVE_DB_185_H
17324 # include <db_185.h>
17325 #else
17326 # include <db.h>
17327 #endif
17328
17329 #ifndef DB_VERSION_MAJOR
17330 # define DB_VERSION_MAJOR 1
17331 #endif
17332
17333 #ifndef NULL
17334 #define NULL ((void*)0)
17335 #endif
17336
17337 int main() {
17338
17339 #if DB_VERSION_MAJOR > 1
17340         {
17341                 char *version;
17342                 int major, minor, patch;
17343
17344                 version = db_version( &major, &minor, &patch );
17345
17346                 if( major != DB_VERSION_MAJOR ||
17347                         minor < DB_VERSION_MINOR )
17348                 {
17349                         printf("Berkeley DB version mismatch\n"
17350                                 "\theader: %s\n\tlibrary: %s\n",
17351                                 DB_VERSION_STRING, version);
17352                         return 1;
17353                 }
17354         }
17355 #endif
17356
17357 #if DB_VERSION_MAJOR > 2
17358         db_env_create( NULL, 0 );
17359 #elif DB_VERSION_MAJOR > 1
17360         db_appexit( NULL );
17361 #else
17362         (void) dbopen( NULL, 0, 0, 0, NULL);
17363 #endif
17364
17365 ; return 0; }
17366 EOF
17367 if { (eval echo configure:17366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17368   rm -rf conftest*
17369   ol_cv_db_db_4=yes
17370 else
17371   echo "configure: failed program was:" >&5
17372   cat conftest.$ac_ext >&5
17373   rm -rf conftest*
17374   ol_cv_db_db_4=no
17375 fi
17376 rm -f conftest*
17377
17378         LIBS="$ol_LIBS"
17379
17380 fi
17381
17382 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17383
17384         if test $ol_cv_db_db_4 = yes ; then
17385                 ol_cv_lib_db=-ldb-4
17386         fi
17387 fi
17388
17389 if test $ol_cv_lib_db = no ; then
17390         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17391 echo "configure:17390: checking for Berkeley DB link (-ldb4)" >&5
17392 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17393   echo $ac_n "(cached) $ac_c" 1>&6
17394 else
17395   
17396         ol_DB_LIB=-ldb4
17397         ol_LIBS=$LIBS
17398         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17399
17400         cat > conftest.$ac_ext <<EOF
17401 #line 17400 "configure"
17402 #include "confdefs.h"
17403
17404 #ifdef HAVE_DB_185_H
17405 # include <db_185.h>
17406 #else
17407 # include <db.h>
17408 #endif
17409
17410 #ifndef DB_VERSION_MAJOR
17411 # define DB_VERSION_MAJOR 1
17412 #endif
17413
17414 #ifndef NULL
17415 #define NULL ((void*)0)
17416 #endif
17417
17418 int main() {
17419
17420 #if DB_VERSION_MAJOR > 1
17421         {
17422                 char *version;
17423                 int major, minor, patch;
17424
17425                 version = db_version( &major, &minor, &patch );
17426
17427                 if( major != DB_VERSION_MAJOR ||
17428                         minor < DB_VERSION_MINOR )
17429                 {
17430                         printf("Berkeley DB version mismatch\n"
17431                                 "\theader: %s\n\tlibrary: %s\n",
17432                                 DB_VERSION_STRING, version);
17433                         return 1;
17434                 }
17435         }
17436 #endif
17437
17438 #if DB_VERSION_MAJOR > 2
17439         db_env_create( NULL, 0 );
17440 #elif DB_VERSION_MAJOR > 1
17441         db_appexit( NULL );
17442 #else
17443         (void) dbopen( NULL, 0, 0, 0, NULL);
17444 #endif
17445
17446 ; return 0; }
17447 EOF
17448 if { (eval echo configure:17447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17449   rm -rf conftest*
17450   ol_cv_db_db4=yes
17451 else
17452   echo "configure: failed program was:" >&5
17453   cat conftest.$ac_ext >&5
17454   rm -rf conftest*
17455   ol_cv_db_db4=no
17456 fi
17457 rm -f conftest*
17458
17459         LIBS="$ol_LIBS"
17460
17461 fi
17462
17463 echo "$ac_t""$ol_cv_db_db4" 1>&6
17464
17465         if test $ol_cv_db_db4 = yes ; then
17466                 ol_cv_lib_db=-ldb4
17467         fi
17468 fi
17469
17470 if test $ol_cv_lib_db = no ; then
17471         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17472 echo "configure:17471: checking for Berkeley DB link (-ldb)" >&5
17473 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17474   echo $ac_n "(cached) $ac_c" 1>&6
17475 else
17476   
17477         ol_DB_LIB=-ldb
17478         ol_LIBS=$LIBS
17479         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17480
17481         cat > conftest.$ac_ext <<EOF
17482 #line 17481 "configure"
17483 #include "confdefs.h"
17484
17485 #ifdef HAVE_DB_185_H
17486 # include <db_185.h>
17487 #else
17488 # include <db.h>
17489 #endif
17490
17491 #ifndef DB_VERSION_MAJOR
17492 # define DB_VERSION_MAJOR 1
17493 #endif
17494
17495 #ifndef NULL
17496 #define NULL ((void*)0)
17497 #endif
17498
17499 int main() {
17500
17501 #if DB_VERSION_MAJOR > 1
17502         {
17503                 char *version;
17504                 int major, minor, patch;
17505
17506                 version = db_version( &major, &minor, &patch );
17507
17508                 if( major != DB_VERSION_MAJOR ||
17509                         minor < DB_VERSION_MINOR )
17510                 {
17511                         printf("Berkeley DB version mismatch\n"
17512                                 "\theader: %s\n\tlibrary: %s\n",
17513                                 DB_VERSION_STRING, version);
17514                         return 1;
17515                 }
17516         }
17517 #endif
17518
17519 #if DB_VERSION_MAJOR > 2
17520         db_env_create( NULL, 0 );
17521 #elif DB_VERSION_MAJOR > 1
17522         db_appexit( NULL );
17523 #else
17524         (void) dbopen( NULL, 0, 0, 0, NULL);
17525 #endif
17526
17527 ; return 0; }
17528 EOF
17529 if { (eval echo configure:17528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17530   rm -rf conftest*
17531   ol_cv_db_db=yes
17532 else
17533   echo "configure: failed program was:" >&5
17534   cat conftest.$ac_ext >&5
17535   rm -rf conftest*
17536   ol_cv_db_db=no
17537 fi
17538 rm -f conftest*
17539
17540         LIBS="$ol_LIBS"
17541
17542 fi
17543
17544 echo "$ac_t""$ol_cv_db_db" 1>&6
17545
17546         if test $ol_cv_db_db = yes ; then
17547                 ol_cv_lib_db=-ldb
17548         fi
17549 fi
17550
17551 if test $ol_cv_lib_db = no ; then
17552         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17553 echo "configure:17552: checking for Berkeley DB link (-ldb41)" >&5
17554 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17555   echo $ac_n "(cached) $ac_c" 1>&6
17556 else
17557   
17558         ol_DB_LIB=-ldb41
17559         ol_LIBS=$LIBS
17560         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17561
17562         cat > conftest.$ac_ext <<EOF
17563 #line 17562 "configure"
17564 #include "confdefs.h"
17565
17566 #ifdef HAVE_DB_185_H
17567 # include <db_185.h>
17568 #else
17569 # include <db.h>
17570 #endif
17571
17572 #ifndef DB_VERSION_MAJOR
17573 # define DB_VERSION_MAJOR 1
17574 #endif
17575
17576 #ifndef NULL
17577 #define NULL ((void*)0)
17578 #endif
17579
17580 int main() {
17581
17582 #if DB_VERSION_MAJOR > 1
17583         {
17584                 char *version;
17585                 int major, minor, patch;
17586
17587                 version = db_version( &major, &minor, &patch );
17588
17589                 if( major != DB_VERSION_MAJOR ||
17590                         minor < DB_VERSION_MINOR )
17591                 {
17592                         printf("Berkeley DB version mismatch\n"
17593                                 "\theader: %s\n\tlibrary: %s\n",
17594                                 DB_VERSION_STRING, version);
17595                         return 1;
17596                 }
17597         }
17598 #endif
17599
17600 #if DB_VERSION_MAJOR > 2
17601         db_env_create( NULL, 0 );
17602 #elif DB_VERSION_MAJOR > 1
17603         db_appexit( NULL );
17604 #else
17605         (void) dbopen( NULL, 0, 0, 0, NULL);
17606 #endif
17607
17608 ; return 0; }
17609 EOF
17610 if { (eval echo configure:17609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17611   rm -rf conftest*
17612   ol_cv_db_db41=yes
17613 else
17614   echo "configure: failed program was:" >&5
17615   cat conftest.$ac_ext >&5
17616   rm -rf conftest*
17617   ol_cv_db_db41=no
17618 fi
17619 rm -f conftest*
17620
17621         LIBS="$ol_LIBS"
17622
17623 fi
17624
17625 echo "$ac_t""$ol_cv_db_db41" 1>&6
17626
17627         if test $ol_cv_db_db41 = yes ; then
17628                 ol_cv_lib_db=-ldb41
17629         fi
17630 fi
17631
17632 if test $ol_cv_lib_db = no ; then
17633         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17634 echo "configure:17633: checking for Berkeley DB link (-ldb-41)" >&5
17635 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17636   echo $ac_n "(cached) $ac_c" 1>&6
17637 else
17638   
17639         ol_DB_LIB=-ldb-41
17640         ol_LIBS=$LIBS
17641         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17642
17643         cat > conftest.$ac_ext <<EOF
17644 #line 17643 "configure"
17645 #include "confdefs.h"
17646
17647 #ifdef HAVE_DB_185_H
17648 # include <db_185.h>
17649 #else
17650 # include <db.h>
17651 #endif
17652
17653 #ifndef DB_VERSION_MAJOR
17654 # define DB_VERSION_MAJOR 1
17655 #endif
17656
17657 #ifndef NULL
17658 #define NULL ((void*)0)
17659 #endif
17660
17661 int main() {
17662
17663 #if DB_VERSION_MAJOR > 1
17664         {
17665                 char *version;
17666                 int major, minor, patch;
17667
17668                 version = db_version( &major, &minor, &patch );
17669
17670                 if( major != DB_VERSION_MAJOR ||
17671                         minor < DB_VERSION_MINOR )
17672                 {
17673                         printf("Berkeley DB version mismatch\n"
17674                                 "\theader: %s\n\tlibrary: %s\n",
17675                                 DB_VERSION_STRING, version);
17676                         return 1;
17677                 }
17678         }
17679 #endif
17680
17681 #if DB_VERSION_MAJOR > 2
17682         db_env_create( NULL, 0 );
17683 #elif DB_VERSION_MAJOR > 1
17684         db_appexit( NULL );
17685 #else
17686         (void) dbopen( NULL, 0, 0, 0, NULL);
17687 #endif
17688
17689 ; return 0; }
17690 EOF
17691 if { (eval echo configure:17690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17692   rm -rf conftest*
17693   ol_cv_db_db_41=yes
17694 else
17695   echo "configure: failed program was:" >&5
17696   cat conftest.$ac_ext >&5
17697   rm -rf conftest*
17698   ol_cv_db_db_41=no
17699 fi
17700 rm -f conftest*
17701
17702         LIBS="$ol_LIBS"
17703
17704 fi
17705
17706 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17707
17708         if test $ol_cv_db_db_41 = yes ; then
17709                 ol_cv_lib_db=-ldb-41
17710         fi
17711 fi
17712
17713 if test $ol_cv_lib_db = no ; then
17714         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17715 echo "configure:17714: checking for Berkeley DB link (-ldb-4.1)" >&5
17716 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17717   echo $ac_n "(cached) $ac_c" 1>&6
17718 else
17719   
17720         ol_DB_LIB=-ldb-4.1
17721         ol_LIBS=$LIBS
17722         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17723
17724         cat > conftest.$ac_ext <<EOF
17725 #line 17724 "configure"
17726 #include "confdefs.h"
17727
17728 #ifdef HAVE_DB_185_H
17729 # include <db_185.h>
17730 #else
17731 # include <db.h>
17732 #endif
17733
17734 #ifndef DB_VERSION_MAJOR
17735 # define DB_VERSION_MAJOR 1
17736 #endif
17737
17738 #ifndef NULL
17739 #define NULL ((void*)0)
17740 #endif
17741
17742 int main() {
17743
17744 #if DB_VERSION_MAJOR > 1
17745         {
17746                 char *version;
17747                 int major, minor, patch;
17748
17749                 version = db_version( &major, &minor, &patch );
17750
17751                 if( major != DB_VERSION_MAJOR ||
17752                         minor < DB_VERSION_MINOR )
17753                 {
17754                         printf("Berkeley DB version mismatch\n"
17755                                 "\theader: %s\n\tlibrary: %s\n",
17756                                 DB_VERSION_STRING, version);
17757                         return 1;
17758                 }
17759         }
17760 #endif
17761
17762 #if DB_VERSION_MAJOR > 2
17763         db_env_create( NULL, 0 );
17764 #elif DB_VERSION_MAJOR > 1
17765         db_appexit( NULL );
17766 #else
17767         (void) dbopen( NULL, 0, 0, 0, NULL);
17768 #endif
17769
17770 ; return 0; }
17771 EOF
17772 if { (eval echo configure:17771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17773   rm -rf conftest*
17774   ol_cv_db_db_4_dot_1=yes
17775 else
17776   echo "configure: failed program was:" >&5
17777   cat conftest.$ac_ext >&5
17778   rm -rf conftest*
17779   ol_cv_db_db_4_dot_1=no
17780 fi
17781 rm -f conftest*
17782
17783         LIBS="$ol_LIBS"
17784
17785 fi
17786
17787 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17788
17789         if test $ol_cv_db_db_4_dot_1 = yes ; then
17790                 ol_cv_lib_db=-ldb-4.1
17791         fi
17792 fi
17793
17794 if test $ol_cv_lib_db = no ; then
17795         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17796 echo "configure:17795: checking for Berkeley DB link (-ldb-4-1)" >&5
17797 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17798   echo $ac_n "(cached) $ac_c" 1>&6
17799 else
17800   
17801         ol_DB_LIB=-ldb-4-1
17802         ol_LIBS=$LIBS
17803         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17804
17805         cat > conftest.$ac_ext <<EOF
17806 #line 17805 "configure"
17807 #include "confdefs.h"
17808
17809 #ifdef HAVE_DB_185_H
17810 # include <db_185.h>
17811 #else
17812 # include <db.h>
17813 #endif
17814
17815 #ifndef DB_VERSION_MAJOR
17816 # define DB_VERSION_MAJOR 1
17817 #endif
17818
17819 #ifndef NULL
17820 #define NULL ((void*)0)
17821 #endif
17822
17823 int main() {
17824
17825 #if DB_VERSION_MAJOR > 1
17826         {
17827                 char *version;
17828                 int major, minor, patch;
17829
17830                 version = db_version( &major, &minor, &patch );
17831
17832                 if( major != DB_VERSION_MAJOR ||
17833                         minor < DB_VERSION_MINOR )
17834                 {
17835                         printf("Berkeley DB version mismatch\n"
17836                                 "\theader: %s\n\tlibrary: %s\n",
17837                                 DB_VERSION_STRING, version);
17838                         return 1;
17839                 }
17840         }
17841 #endif
17842
17843 #if DB_VERSION_MAJOR > 2
17844         db_env_create( NULL, 0 );
17845 #elif DB_VERSION_MAJOR > 1
17846         db_appexit( NULL );
17847 #else
17848         (void) dbopen( NULL, 0, 0, 0, NULL);
17849 #endif
17850
17851 ; return 0; }
17852 EOF
17853 if { (eval echo configure:17852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17854   rm -rf conftest*
17855   ol_cv_db_db_4_1=yes
17856 else
17857   echo "configure: failed program was:" >&5
17858   cat conftest.$ac_ext >&5
17859   rm -rf conftest*
17860   ol_cv_db_db_4_1=no
17861 fi
17862 rm -f conftest*
17863
17864         LIBS="$ol_LIBS"
17865
17866 fi
17867
17868 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17869
17870         if test $ol_cv_db_db_4_1 = yes ; then
17871                 ol_cv_lib_db=-ldb-4-1
17872         fi
17873 fi
17874
17875 if test $ol_cv_lib_db = no ; then
17876         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17877 echo "configure:17876: checking for Berkeley DB link (-ldb3)" >&5
17878 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17879   echo $ac_n "(cached) $ac_c" 1>&6
17880 else
17881   
17882         ol_DB_LIB=-ldb3
17883         ol_LIBS=$LIBS
17884         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17885
17886         cat > conftest.$ac_ext <<EOF
17887 #line 17886 "configure"
17888 #include "confdefs.h"
17889
17890 #ifdef HAVE_DB_185_H
17891 # include <db_185.h>
17892 #else
17893 # include <db.h>
17894 #endif
17895
17896 #ifndef DB_VERSION_MAJOR
17897 # define DB_VERSION_MAJOR 1
17898 #endif
17899
17900 #ifndef NULL
17901 #define NULL ((void*)0)
17902 #endif
17903
17904 int main() {
17905
17906 #if DB_VERSION_MAJOR > 1
17907         {
17908                 char *version;
17909                 int major, minor, patch;
17910
17911                 version = db_version( &major, &minor, &patch );
17912
17913                 if( major != DB_VERSION_MAJOR ||
17914                         minor < DB_VERSION_MINOR )
17915                 {
17916                         printf("Berkeley DB version mismatch\n"
17917                                 "\theader: %s\n\tlibrary: %s\n",
17918                                 DB_VERSION_STRING, version);
17919                         return 1;
17920                 }
17921         }
17922 #endif
17923
17924 #if DB_VERSION_MAJOR > 2
17925         db_env_create( NULL, 0 );
17926 #elif DB_VERSION_MAJOR > 1
17927         db_appexit( NULL );
17928 #else
17929         (void) dbopen( NULL, 0, 0, 0, NULL);
17930 #endif
17931
17932 ; return 0; }
17933 EOF
17934 if { (eval echo configure:17933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17935   rm -rf conftest*
17936   ol_cv_db_db3=yes
17937 else
17938   echo "configure: failed program was:" >&5
17939   cat conftest.$ac_ext >&5
17940   rm -rf conftest*
17941   ol_cv_db_db3=no
17942 fi
17943 rm -f conftest*
17944
17945         LIBS="$ol_LIBS"
17946
17947 fi
17948
17949 echo "$ac_t""$ol_cv_db_db3" 1>&6
17950
17951         if test $ol_cv_db_db3 = yes ; then
17952                 ol_cv_lib_db=-ldb3
17953         fi
17954 fi
17955
17956 if test $ol_cv_lib_db = no ; then
17957         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17958 echo "configure:17957: checking for Berkeley DB link (-ldb-3)" >&5
17959 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17960   echo $ac_n "(cached) $ac_c" 1>&6
17961 else
17962   
17963         ol_DB_LIB=-ldb-3
17964         ol_LIBS=$LIBS
17965         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17966
17967         cat > conftest.$ac_ext <<EOF
17968 #line 17967 "configure"
17969 #include "confdefs.h"
17970
17971 #ifdef HAVE_DB_185_H
17972 # include <db_185.h>
17973 #else
17974 # include <db.h>
17975 #endif
17976
17977 #ifndef DB_VERSION_MAJOR
17978 # define DB_VERSION_MAJOR 1
17979 #endif
17980
17981 #ifndef NULL
17982 #define NULL ((void*)0)
17983 #endif
17984
17985 int main() {
17986
17987 #if DB_VERSION_MAJOR > 1
17988         {
17989                 char *version;
17990                 int major, minor, patch;
17991
17992                 version = db_version( &major, &minor, &patch );
17993
17994                 if( major != DB_VERSION_MAJOR ||
17995                         minor < DB_VERSION_MINOR )
17996                 {
17997                         printf("Berkeley DB version mismatch\n"
17998                                 "\theader: %s\n\tlibrary: %s\n",
17999                                 DB_VERSION_STRING, version);
18000                         return 1;
18001                 }
18002         }
18003 #endif
18004
18005 #if DB_VERSION_MAJOR > 2
18006         db_env_create( NULL, 0 );
18007 #elif DB_VERSION_MAJOR > 1
18008         db_appexit( NULL );
18009 #else
18010         (void) dbopen( NULL, 0, 0, 0, NULL);
18011 #endif
18012
18013 ; return 0; }
18014 EOF
18015 if { (eval echo configure:18014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18016   rm -rf conftest*
18017   ol_cv_db_db_3=yes
18018 else
18019   echo "configure: failed program was:" >&5
18020   cat conftest.$ac_ext >&5
18021   rm -rf conftest*
18022   ol_cv_db_db_3=no
18023 fi
18024 rm -f conftest*
18025
18026         LIBS="$ol_LIBS"
18027
18028 fi
18029
18030 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18031
18032         if test $ol_cv_db_db_3 = yes ; then
18033                 ol_cv_lib_db=-ldb-3
18034         fi
18035 fi
18036
18037 if test $ol_cv_lib_db = no ; then
18038         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18039 echo "configure:18038: checking for Berkeley DB link (-ldb2)" >&5
18040 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18041   echo $ac_n "(cached) $ac_c" 1>&6
18042 else
18043   
18044         ol_DB_LIB=-ldb2
18045         ol_LIBS=$LIBS
18046         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18047
18048         cat > conftest.$ac_ext <<EOF
18049 #line 18048 "configure"
18050 #include "confdefs.h"
18051
18052 #ifdef HAVE_DB_185_H
18053 # include <db_185.h>
18054 #else
18055 # include <db.h>
18056 #endif
18057
18058 #ifndef DB_VERSION_MAJOR
18059 # define DB_VERSION_MAJOR 1
18060 #endif
18061
18062 #ifndef NULL
18063 #define NULL ((void*)0)
18064 #endif
18065
18066 int main() {
18067
18068 #if DB_VERSION_MAJOR > 1
18069         {
18070                 char *version;
18071                 int major, minor, patch;
18072
18073                 version = db_version( &major, &minor, &patch );
18074
18075                 if( major != DB_VERSION_MAJOR ||
18076                         minor < DB_VERSION_MINOR )
18077                 {
18078                         printf("Berkeley DB version mismatch\n"
18079                                 "\theader: %s\n\tlibrary: %s\n",
18080                                 DB_VERSION_STRING, version);
18081                         return 1;
18082                 }
18083         }
18084 #endif
18085
18086 #if DB_VERSION_MAJOR > 2
18087         db_env_create( NULL, 0 );
18088 #elif DB_VERSION_MAJOR > 1
18089         db_appexit( NULL );
18090 #else
18091         (void) dbopen( NULL, 0, 0, 0, NULL);
18092 #endif
18093
18094 ; return 0; }
18095 EOF
18096 if { (eval echo configure:18095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18097   rm -rf conftest*
18098   ol_cv_db_db2=yes
18099 else
18100   echo "configure: failed program was:" >&5
18101   cat conftest.$ac_ext >&5
18102   rm -rf conftest*
18103   ol_cv_db_db2=no
18104 fi
18105 rm -f conftest*
18106
18107         LIBS="$ol_LIBS"
18108
18109 fi
18110
18111 echo "$ac_t""$ol_cv_db_db2" 1>&6
18112
18113         if test $ol_cv_db_db2 = yes ; then
18114                 ol_cv_lib_db=-ldb2
18115         fi
18116 fi
18117
18118 if test $ol_cv_lib_db = no ; then
18119         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18120 echo "configure:18119: checking for Berkeley DB link (-ldb-2)" >&5
18121 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18122   echo $ac_n "(cached) $ac_c" 1>&6
18123 else
18124   
18125         ol_DB_LIB=-ldb-2
18126         ol_LIBS=$LIBS
18127         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18128
18129         cat > conftest.$ac_ext <<EOF
18130 #line 18129 "configure"
18131 #include "confdefs.h"
18132
18133 #ifdef HAVE_DB_185_H
18134 # include <db_185.h>
18135 #else
18136 # include <db.h>
18137 #endif
18138
18139 #ifndef DB_VERSION_MAJOR
18140 # define DB_VERSION_MAJOR 1
18141 #endif
18142
18143 #ifndef NULL
18144 #define NULL ((void*)0)
18145 #endif
18146
18147 int main() {
18148
18149 #if DB_VERSION_MAJOR > 1
18150         {
18151                 char *version;
18152                 int major, minor, patch;
18153
18154                 version = db_version( &major, &minor, &patch );
18155
18156                 if( major != DB_VERSION_MAJOR ||
18157                         minor < DB_VERSION_MINOR )
18158                 {
18159                         printf("Berkeley DB version mismatch\n"
18160                                 "\theader: %s\n\tlibrary: %s\n",
18161                                 DB_VERSION_STRING, version);
18162                         return 1;
18163                 }
18164         }
18165 #endif
18166
18167 #if DB_VERSION_MAJOR > 2
18168         db_env_create( NULL, 0 );
18169 #elif DB_VERSION_MAJOR > 1
18170         db_appexit( NULL );
18171 #else
18172         (void) dbopen( NULL, 0, 0, 0, NULL);
18173 #endif
18174
18175 ; return 0; }
18176 EOF
18177 if { (eval echo configure:18176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18178   rm -rf conftest*
18179   ol_cv_db_db_2=yes
18180 else
18181   echo "configure: failed program was:" >&5
18182   cat conftest.$ac_ext >&5
18183   rm -rf conftest*
18184   ol_cv_db_db_2=no
18185 fi
18186 rm -f conftest*
18187
18188         LIBS="$ol_LIBS"
18189
18190 fi
18191
18192 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18193
18194         if test $ol_cv_db_db_2 = yes ; then
18195                 ol_cv_lib_db=-ldb-2
18196         fi
18197 fi
18198
18199 if test $ol_cv_lib_db = no ; then
18200         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18201 echo "configure:18200: checking for Berkeley DB link (-ldb1)" >&5
18202 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18203   echo $ac_n "(cached) $ac_c" 1>&6
18204 else
18205   
18206         ol_DB_LIB=-ldb1
18207         ol_LIBS=$LIBS
18208         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18209
18210         cat > conftest.$ac_ext <<EOF
18211 #line 18210 "configure"
18212 #include "confdefs.h"
18213
18214 #ifdef HAVE_DB_185_H
18215 # include <db_185.h>
18216 #else
18217 # include <db.h>
18218 #endif
18219
18220 #ifndef DB_VERSION_MAJOR
18221 # define DB_VERSION_MAJOR 1
18222 #endif
18223
18224 #ifndef NULL
18225 #define NULL ((void*)0)
18226 #endif
18227
18228 int main() {
18229
18230 #if DB_VERSION_MAJOR > 1
18231         {
18232                 char *version;
18233                 int major, minor, patch;
18234
18235                 version = db_version( &major, &minor, &patch );
18236
18237                 if( major != DB_VERSION_MAJOR ||
18238                         minor < DB_VERSION_MINOR )
18239                 {
18240                         printf("Berkeley DB version mismatch\n"
18241                                 "\theader: %s\n\tlibrary: %s\n",
18242                                 DB_VERSION_STRING, version);
18243                         return 1;
18244                 }
18245         }
18246 #endif
18247
18248 #if DB_VERSION_MAJOR > 2
18249         db_env_create( NULL, 0 );
18250 #elif DB_VERSION_MAJOR > 1
18251         db_appexit( NULL );
18252 #else
18253         (void) dbopen( NULL, 0, 0, 0, NULL);
18254 #endif
18255
18256 ; return 0; }
18257 EOF
18258 if { (eval echo configure:18257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18259   rm -rf conftest*
18260   ol_cv_db_db1=yes
18261 else
18262   echo "configure: failed program was:" >&5
18263   cat conftest.$ac_ext >&5
18264   rm -rf conftest*
18265   ol_cv_db_db1=no
18266 fi
18267 rm -f conftest*
18268
18269         LIBS="$ol_LIBS"
18270
18271 fi
18272
18273 echo "$ac_t""$ol_cv_db_db1" 1>&6
18274
18275         if test $ol_cv_db_db1 = yes ; then
18276                 ol_cv_lib_db=-ldb1
18277         fi
18278 fi
18279
18280 if test $ol_cv_lib_db = no ; then
18281         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18282 echo "configure:18281: checking for Berkeley DB link (-ldb-1)" >&5
18283 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18284   echo $ac_n "(cached) $ac_c" 1>&6
18285 else
18286   
18287         ol_DB_LIB=-ldb-1
18288         ol_LIBS=$LIBS
18289         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18290
18291         cat > conftest.$ac_ext <<EOF
18292 #line 18291 "configure"
18293 #include "confdefs.h"
18294
18295 #ifdef HAVE_DB_185_H
18296 # include <db_185.h>
18297 #else
18298 # include <db.h>
18299 #endif
18300
18301 #ifndef DB_VERSION_MAJOR
18302 # define DB_VERSION_MAJOR 1
18303 #endif
18304
18305 #ifndef NULL
18306 #define NULL ((void*)0)
18307 #endif
18308
18309 int main() {
18310
18311 #if DB_VERSION_MAJOR > 1
18312         {
18313                 char *version;
18314                 int major, minor, patch;
18315
18316                 version = db_version( &major, &minor, &patch );
18317
18318                 if( major != DB_VERSION_MAJOR ||
18319                         minor < DB_VERSION_MINOR )
18320                 {
18321                         printf("Berkeley DB version mismatch\n"
18322                                 "\theader: %s\n\tlibrary: %s\n",
18323                                 DB_VERSION_STRING, version);
18324                         return 1;
18325                 }
18326         }
18327 #endif
18328
18329 #if DB_VERSION_MAJOR > 2
18330         db_env_create( NULL, 0 );
18331 #elif DB_VERSION_MAJOR > 1
18332         db_appexit( NULL );
18333 #else
18334         (void) dbopen( NULL, 0, 0, 0, NULL);
18335 #endif
18336
18337 ; return 0; }
18338 EOF
18339 if { (eval echo configure:18338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18340   rm -rf conftest*
18341   ol_cv_db_db_1=yes
18342 else
18343   echo "configure: failed program was:" >&5
18344   cat conftest.$ac_ext >&5
18345   rm -rf conftest*
18346   ol_cv_db_db_1=no
18347 fi
18348 rm -f conftest*
18349
18350         LIBS="$ol_LIBS"
18351
18352 fi
18353
18354 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18355
18356         if test $ol_cv_db_db_1 = yes ; then
18357                 ol_cv_lib_db=-ldb-1
18358         fi
18359 fi
18360
18361
18362                 if test "$ol_cv_lib_db" != no ; then
18363                         ol_cv_berkeley_db=yes
18364                 fi
18365         fi
18366 fi
18367
18368         else
18369                 ol_cv_berkeley_db=no
18370 for ac_hdr in db.h
18371 do
18372 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18373 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18374 echo "configure:18373: checking for $ac_hdr" >&5
18375 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18376   echo $ac_n "(cached) $ac_c" 1>&6
18377 else
18378   cat > conftest.$ac_ext <<EOF
18379 #line 18378 "configure"
18380 #include "confdefs.h"
18381 #include <$ac_hdr>
18382 EOF
18383 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18384 { (eval echo configure:18383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18385 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18386 if test -z "$ac_err"; then
18387   rm -rf conftest*
18388   eval "ac_cv_header_$ac_safe=yes"
18389 else
18390   echo "$ac_err" >&5
18391   echo "configure: failed program was:" >&5
18392   cat conftest.$ac_ext >&5
18393   rm -rf conftest*
18394   eval "ac_cv_header_$ac_safe=no"
18395 fi
18396 rm -f conftest*
18397 fi
18398 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18399   echo "$ac_t""yes" 1>&6
18400     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18401   cat >> confdefs.h <<EOF
18402 #define $ac_tr_hdr 1
18403 EOF
18404  
18405 else
18406   echo "$ac_t""no" 1>&6
18407 fi
18408 done
18409
18410 if test $ac_cv_header_db_h = yes; then
18411         ol_cv_lib_db=no
18412 if test $ol_cv_lib_db = no ; then
18413         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18414 echo "configure:18413: checking for Berkeley DB link (default)" >&5
18415 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18416   echo $ac_n "(cached) $ac_c" 1>&6
18417 else
18418   
18419         ol_DB_LIB=
18420         ol_LIBS=$LIBS
18421         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18422
18423         cat > conftest.$ac_ext <<EOF
18424 #line 18423 "configure"
18425 #include "confdefs.h"
18426
18427 #ifdef HAVE_DB_185_H
18428 # include <db_185.h>
18429 #else
18430 # include <db.h>
18431 #endif
18432
18433 #ifndef DB_VERSION_MAJOR
18434 # define DB_VERSION_MAJOR 1
18435 #endif
18436
18437 #ifndef NULL
18438 #define NULL ((void*)0)
18439 #endif
18440
18441 int main() {
18442
18443 #if DB_VERSION_MAJOR > 1
18444         {
18445                 char *version;
18446                 int major, minor, patch;
18447
18448                 version = db_version( &major, &minor, &patch );
18449
18450                 if( major != DB_VERSION_MAJOR ||
18451                         minor < DB_VERSION_MINOR )
18452                 {
18453                         printf("Berkeley DB version mismatch\n"
18454                                 "\theader: %s\n\tlibrary: %s\n",
18455                                 DB_VERSION_STRING, version);
18456                         return 1;
18457                 }
18458         }
18459 #endif
18460
18461 #if DB_VERSION_MAJOR > 2
18462         db_env_create( NULL, 0 );
18463 #elif DB_VERSION_MAJOR > 1
18464         db_appexit( NULL );
18465 #else
18466         (void) dbopen( NULL, 0, 0, 0, NULL);
18467 #endif
18468
18469 ; return 0; }
18470 EOF
18471 if { (eval echo configure:18470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18472   rm -rf conftest*
18473   ol_cv_db_none=yes
18474 else
18475   echo "configure: failed program was:" >&5
18476   cat conftest.$ac_ext >&5
18477   rm -rf conftest*
18478   ol_cv_db_none=no
18479 fi
18480 rm -f conftest*
18481
18482         LIBS="$ol_LIBS"
18483
18484 fi
18485
18486 echo "$ac_t""$ol_cv_db_none" 1>&6
18487
18488         if test $ol_cv_db_none = yes ; then
18489                 ol_cv_lib_db=yes
18490         fi
18491 fi
18492
18493 if test $ol_cv_lib_db = no ; then
18494         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18495 echo "configure:18494: checking for Berkeley DB link (-ldb42)" >&5
18496 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18497   echo $ac_n "(cached) $ac_c" 1>&6
18498 else
18499   
18500         ol_DB_LIB=-ldb42
18501         ol_LIBS=$LIBS
18502         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18503
18504         cat > conftest.$ac_ext <<EOF
18505 #line 18504 "configure"
18506 #include "confdefs.h"
18507
18508 #ifdef HAVE_DB_185_H
18509 # include <db_185.h>
18510 #else
18511 # include <db.h>
18512 #endif
18513
18514 #ifndef DB_VERSION_MAJOR
18515 # define DB_VERSION_MAJOR 1
18516 #endif
18517
18518 #ifndef NULL
18519 #define NULL ((void*)0)
18520 #endif
18521
18522 int main() {
18523
18524 #if DB_VERSION_MAJOR > 1
18525         {
18526                 char *version;
18527                 int major, minor, patch;
18528
18529                 version = db_version( &major, &minor, &patch );
18530
18531                 if( major != DB_VERSION_MAJOR ||
18532                         minor < DB_VERSION_MINOR )
18533                 {
18534                         printf("Berkeley DB version mismatch\n"
18535                                 "\theader: %s\n\tlibrary: %s\n",
18536                                 DB_VERSION_STRING, version);
18537                         return 1;
18538                 }
18539         }
18540 #endif
18541
18542 #if DB_VERSION_MAJOR > 2
18543         db_env_create( NULL, 0 );
18544 #elif DB_VERSION_MAJOR > 1
18545         db_appexit( NULL );
18546 #else
18547         (void) dbopen( NULL, 0, 0, 0, NULL);
18548 #endif
18549
18550 ; return 0; }
18551 EOF
18552 if { (eval echo configure:18551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18553   rm -rf conftest*
18554   ol_cv_db_db42=yes
18555 else
18556   echo "configure: failed program was:" >&5
18557   cat conftest.$ac_ext >&5
18558   rm -rf conftest*
18559   ol_cv_db_db42=no
18560 fi
18561 rm -f conftest*
18562
18563         LIBS="$ol_LIBS"
18564
18565 fi
18566
18567 echo "$ac_t""$ol_cv_db_db42" 1>&6
18568
18569         if test $ol_cv_db_db42 = yes ; then
18570                 ol_cv_lib_db=-ldb42
18571         fi
18572 fi
18573
18574 if test $ol_cv_lib_db = no ; then
18575         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18576 echo "configure:18575: checking for Berkeley DB link (-ldb-42)" >&5
18577 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18578   echo $ac_n "(cached) $ac_c" 1>&6
18579 else
18580   
18581         ol_DB_LIB=-ldb-42
18582         ol_LIBS=$LIBS
18583         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18584
18585         cat > conftest.$ac_ext <<EOF
18586 #line 18585 "configure"
18587 #include "confdefs.h"
18588
18589 #ifdef HAVE_DB_185_H
18590 # include <db_185.h>
18591 #else
18592 # include <db.h>
18593 #endif
18594
18595 #ifndef DB_VERSION_MAJOR
18596 # define DB_VERSION_MAJOR 1
18597 #endif
18598
18599 #ifndef NULL
18600 #define NULL ((void*)0)
18601 #endif
18602
18603 int main() {
18604
18605 #if DB_VERSION_MAJOR > 1
18606         {
18607                 char *version;
18608                 int major, minor, patch;
18609
18610                 version = db_version( &major, &minor, &patch );
18611
18612                 if( major != DB_VERSION_MAJOR ||
18613                         minor < DB_VERSION_MINOR )
18614                 {
18615                         printf("Berkeley DB version mismatch\n"
18616                                 "\theader: %s\n\tlibrary: %s\n",
18617                                 DB_VERSION_STRING, version);
18618                         return 1;
18619                 }
18620         }
18621 #endif
18622
18623 #if DB_VERSION_MAJOR > 2
18624         db_env_create( NULL, 0 );
18625 #elif DB_VERSION_MAJOR > 1
18626         db_appexit( NULL );
18627 #else
18628         (void) dbopen( NULL, 0, 0, 0, NULL);
18629 #endif
18630
18631 ; return 0; }
18632 EOF
18633 if { (eval echo configure:18632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18634   rm -rf conftest*
18635   ol_cv_db_db_42=yes
18636 else
18637   echo "configure: failed program was:" >&5
18638   cat conftest.$ac_ext >&5
18639   rm -rf conftest*
18640   ol_cv_db_db_42=no
18641 fi
18642 rm -f conftest*
18643
18644         LIBS="$ol_LIBS"
18645
18646 fi
18647
18648 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18649
18650         if test $ol_cv_db_db_42 = yes ; then
18651                 ol_cv_lib_db=-ldb-42
18652         fi
18653 fi
18654
18655 if test $ol_cv_lib_db = no ; then
18656         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18657 echo "configure:18656: checking for Berkeley DB link (-ldb-4.2)" >&5
18658 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18659   echo $ac_n "(cached) $ac_c" 1>&6
18660 else
18661   
18662         ol_DB_LIB=-ldb-4.2
18663         ol_LIBS=$LIBS
18664         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18665
18666         cat > conftest.$ac_ext <<EOF
18667 #line 18666 "configure"
18668 #include "confdefs.h"
18669
18670 #ifdef HAVE_DB_185_H
18671 # include <db_185.h>
18672 #else
18673 # include <db.h>
18674 #endif
18675
18676 #ifndef DB_VERSION_MAJOR
18677 # define DB_VERSION_MAJOR 1
18678 #endif
18679
18680 #ifndef NULL
18681 #define NULL ((void*)0)
18682 #endif
18683
18684 int main() {
18685
18686 #if DB_VERSION_MAJOR > 1
18687         {
18688                 char *version;
18689                 int major, minor, patch;
18690
18691                 version = db_version( &major, &minor, &patch );
18692
18693                 if( major != DB_VERSION_MAJOR ||
18694                         minor < DB_VERSION_MINOR )
18695                 {
18696                         printf("Berkeley DB version mismatch\n"
18697                                 "\theader: %s\n\tlibrary: %s\n",
18698                                 DB_VERSION_STRING, version);
18699                         return 1;
18700                 }
18701         }
18702 #endif
18703
18704 #if DB_VERSION_MAJOR > 2
18705         db_env_create( NULL, 0 );
18706 #elif DB_VERSION_MAJOR > 1
18707         db_appexit( NULL );
18708 #else
18709         (void) dbopen( NULL, 0, 0, 0, NULL);
18710 #endif
18711
18712 ; return 0; }
18713 EOF
18714 if { (eval echo configure:18713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18715   rm -rf conftest*
18716   ol_cv_db_db_4_dot_2=yes
18717 else
18718   echo "configure: failed program was:" >&5
18719   cat conftest.$ac_ext >&5
18720   rm -rf conftest*
18721   ol_cv_db_db_4_dot_2=no
18722 fi
18723 rm -f conftest*
18724
18725         LIBS="$ol_LIBS"
18726
18727 fi
18728
18729 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18730
18731         if test $ol_cv_db_db_4_dot_2 = yes ; then
18732                 ol_cv_lib_db=-ldb-4.2
18733         fi
18734 fi
18735
18736 if test $ol_cv_lib_db = no ; then
18737         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18738 echo "configure:18737: checking for Berkeley DB link (-ldb-4-2)" >&5
18739 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18740   echo $ac_n "(cached) $ac_c" 1>&6
18741 else
18742   
18743         ol_DB_LIB=-ldb-4-2
18744         ol_LIBS=$LIBS
18745         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18746
18747         cat > conftest.$ac_ext <<EOF
18748 #line 18747 "configure"
18749 #include "confdefs.h"
18750
18751 #ifdef HAVE_DB_185_H
18752 # include <db_185.h>
18753 #else
18754 # include <db.h>
18755 #endif
18756
18757 #ifndef DB_VERSION_MAJOR
18758 # define DB_VERSION_MAJOR 1
18759 #endif
18760
18761 #ifndef NULL
18762 #define NULL ((void*)0)
18763 #endif
18764
18765 int main() {
18766
18767 #if DB_VERSION_MAJOR > 1
18768         {
18769                 char *version;
18770                 int major, minor, patch;
18771
18772                 version = db_version( &major, &minor, &patch );
18773
18774                 if( major != DB_VERSION_MAJOR ||
18775                         minor < DB_VERSION_MINOR )
18776                 {
18777                         printf("Berkeley DB version mismatch\n"
18778                                 "\theader: %s\n\tlibrary: %s\n",
18779                                 DB_VERSION_STRING, version);
18780                         return 1;
18781                 }
18782         }
18783 #endif
18784
18785 #if DB_VERSION_MAJOR > 2
18786         db_env_create( NULL, 0 );
18787 #elif DB_VERSION_MAJOR > 1
18788         db_appexit( NULL );
18789 #else
18790         (void) dbopen( NULL, 0, 0, 0, NULL);
18791 #endif
18792
18793 ; return 0; }
18794 EOF
18795 if { (eval echo configure:18794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18796   rm -rf conftest*
18797   ol_cv_db_db_4_2=yes
18798 else
18799   echo "configure: failed program was:" >&5
18800   cat conftest.$ac_ext >&5
18801   rm -rf conftest*
18802   ol_cv_db_db_4_2=no
18803 fi
18804 rm -f conftest*
18805
18806         LIBS="$ol_LIBS"
18807
18808 fi
18809
18810 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18811
18812         if test $ol_cv_db_db_4_2 = yes ; then
18813                 ol_cv_lib_db=-ldb-4-2
18814         fi
18815 fi
18816
18817 if test $ol_cv_lib_db = no ; then
18818         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18819 echo "configure:18818: checking for Berkeley DB link (-ldb-4)" >&5
18820 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18821   echo $ac_n "(cached) $ac_c" 1>&6
18822 else
18823   
18824         ol_DB_LIB=-ldb-4
18825         ol_LIBS=$LIBS
18826         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18827
18828         cat > conftest.$ac_ext <<EOF
18829 #line 18828 "configure"
18830 #include "confdefs.h"
18831
18832 #ifdef HAVE_DB_185_H
18833 # include <db_185.h>
18834 #else
18835 # include <db.h>
18836 #endif
18837
18838 #ifndef DB_VERSION_MAJOR
18839 # define DB_VERSION_MAJOR 1
18840 #endif
18841
18842 #ifndef NULL
18843 #define NULL ((void*)0)
18844 #endif
18845
18846 int main() {
18847
18848 #if DB_VERSION_MAJOR > 1
18849         {
18850                 char *version;
18851                 int major, minor, patch;
18852
18853                 version = db_version( &major, &minor, &patch );
18854
18855                 if( major != DB_VERSION_MAJOR ||
18856                         minor < DB_VERSION_MINOR )
18857                 {
18858                         printf("Berkeley DB version mismatch\n"
18859                                 "\theader: %s\n\tlibrary: %s\n",
18860                                 DB_VERSION_STRING, version);
18861                         return 1;
18862                 }
18863         }
18864 #endif
18865
18866 #if DB_VERSION_MAJOR > 2
18867         db_env_create( NULL, 0 );
18868 #elif DB_VERSION_MAJOR > 1
18869         db_appexit( NULL );
18870 #else
18871         (void) dbopen( NULL, 0, 0, 0, NULL);
18872 #endif
18873
18874 ; return 0; }
18875 EOF
18876 if { (eval echo configure:18875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18877   rm -rf conftest*
18878   ol_cv_db_db_4=yes
18879 else
18880   echo "configure: failed program was:" >&5
18881   cat conftest.$ac_ext >&5
18882   rm -rf conftest*
18883   ol_cv_db_db_4=no
18884 fi
18885 rm -f conftest*
18886
18887         LIBS="$ol_LIBS"
18888
18889 fi
18890
18891 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18892
18893         if test $ol_cv_db_db_4 = yes ; then
18894                 ol_cv_lib_db=-ldb-4
18895         fi
18896 fi
18897
18898 if test $ol_cv_lib_db = no ; then
18899         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18900 echo "configure:18899: checking for Berkeley DB link (-ldb4)" >&5
18901 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18902   echo $ac_n "(cached) $ac_c" 1>&6
18903 else
18904   
18905         ol_DB_LIB=-ldb4
18906         ol_LIBS=$LIBS
18907         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18908
18909         cat > conftest.$ac_ext <<EOF
18910 #line 18909 "configure"
18911 #include "confdefs.h"
18912
18913 #ifdef HAVE_DB_185_H
18914 # include <db_185.h>
18915 #else
18916 # include <db.h>
18917 #endif
18918
18919 #ifndef DB_VERSION_MAJOR
18920 # define DB_VERSION_MAJOR 1
18921 #endif
18922
18923 #ifndef NULL
18924 #define NULL ((void*)0)
18925 #endif
18926
18927 int main() {
18928
18929 #if DB_VERSION_MAJOR > 1
18930         {
18931                 char *version;
18932                 int major, minor, patch;
18933
18934                 version = db_version( &major, &minor, &patch );
18935
18936                 if( major != DB_VERSION_MAJOR ||
18937                         minor < DB_VERSION_MINOR )
18938                 {
18939                         printf("Berkeley DB version mismatch\n"
18940                                 "\theader: %s\n\tlibrary: %s\n",
18941                                 DB_VERSION_STRING, version);
18942                         return 1;
18943                 }
18944         }
18945 #endif
18946
18947 #if DB_VERSION_MAJOR > 2
18948         db_env_create( NULL, 0 );
18949 #elif DB_VERSION_MAJOR > 1
18950         db_appexit( NULL );
18951 #else
18952         (void) dbopen( NULL, 0, 0, 0, NULL);
18953 #endif
18954
18955 ; return 0; }
18956 EOF
18957 if { (eval echo configure:18956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18958   rm -rf conftest*
18959   ol_cv_db_db4=yes
18960 else
18961   echo "configure: failed program was:" >&5
18962   cat conftest.$ac_ext >&5
18963   rm -rf conftest*
18964   ol_cv_db_db4=no
18965 fi
18966 rm -f conftest*
18967
18968         LIBS="$ol_LIBS"
18969
18970 fi
18971
18972 echo "$ac_t""$ol_cv_db_db4" 1>&6
18973
18974         if test $ol_cv_db_db4 = yes ; then
18975                 ol_cv_lib_db=-ldb4
18976         fi
18977 fi
18978
18979 if test $ol_cv_lib_db = no ; then
18980         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18981 echo "configure:18980: checking for Berkeley DB link (-ldb)" >&5
18982 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18983   echo $ac_n "(cached) $ac_c" 1>&6
18984 else
18985   
18986         ol_DB_LIB=-ldb
18987         ol_LIBS=$LIBS
18988         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18989
18990         cat > conftest.$ac_ext <<EOF
18991 #line 18990 "configure"
18992 #include "confdefs.h"
18993
18994 #ifdef HAVE_DB_185_H
18995 # include <db_185.h>
18996 #else
18997 # include <db.h>
18998 #endif
18999
19000 #ifndef DB_VERSION_MAJOR
19001 # define DB_VERSION_MAJOR 1
19002 #endif
19003
19004 #ifndef NULL
19005 #define NULL ((void*)0)
19006 #endif
19007
19008 int main() {
19009
19010 #if DB_VERSION_MAJOR > 1
19011         {
19012                 char *version;
19013                 int major, minor, patch;
19014
19015                 version = db_version( &major, &minor, &patch );
19016
19017                 if( major != DB_VERSION_MAJOR ||
19018                         minor < DB_VERSION_MINOR )
19019                 {
19020                         printf("Berkeley DB version mismatch\n"
19021                                 "\theader: %s\n\tlibrary: %s\n",
19022                                 DB_VERSION_STRING, version);
19023                         return 1;
19024                 }
19025         }
19026 #endif
19027
19028 #if DB_VERSION_MAJOR > 2
19029         db_env_create( NULL, 0 );
19030 #elif DB_VERSION_MAJOR > 1
19031         db_appexit( NULL );
19032 #else
19033         (void) dbopen( NULL, 0, 0, 0, NULL);
19034 #endif
19035
19036 ; return 0; }
19037 EOF
19038 if { (eval echo configure:19037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19039   rm -rf conftest*
19040   ol_cv_db_db=yes
19041 else
19042   echo "configure: failed program was:" >&5
19043   cat conftest.$ac_ext >&5
19044   rm -rf conftest*
19045   ol_cv_db_db=no
19046 fi
19047 rm -f conftest*
19048
19049         LIBS="$ol_LIBS"
19050
19051 fi
19052
19053 echo "$ac_t""$ol_cv_db_db" 1>&6
19054
19055         if test $ol_cv_db_db = yes ; then
19056                 ol_cv_lib_db=-ldb
19057         fi
19058 fi
19059
19060 if test $ol_cv_lib_db = no ; then
19061         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19062 echo "configure:19061: checking for Berkeley DB link (-ldb41)" >&5
19063 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19064   echo $ac_n "(cached) $ac_c" 1>&6
19065 else
19066   
19067         ol_DB_LIB=-ldb41
19068         ol_LIBS=$LIBS
19069         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19070
19071         cat > conftest.$ac_ext <<EOF
19072 #line 19071 "configure"
19073 #include "confdefs.h"
19074
19075 #ifdef HAVE_DB_185_H
19076 # include <db_185.h>
19077 #else
19078 # include <db.h>
19079 #endif
19080
19081 #ifndef DB_VERSION_MAJOR
19082 # define DB_VERSION_MAJOR 1
19083 #endif
19084
19085 #ifndef NULL
19086 #define NULL ((void*)0)
19087 #endif
19088
19089 int main() {
19090
19091 #if DB_VERSION_MAJOR > 1
19092         {
19093                 char *version;
19094                 int major, minor, patch;
19095
19096                 version = db_version( &major, &minor, &patch );
19097
19098                 if( major != DB_VERSION_MAJOR ||
19099                         minor < DB_VERSION_MINOR )
19100                 {
19101                         printf("Berkeley DB version mismatch\n"
19102                                 "\theader: %s\n\tlibrary: %s\n",
19103                                 DB_VERSION_STRING, version);
19104                         return 1;
19105                 }
19106         }
19107 #endif
19108
19109 #if DB_VERSION_MAJOR > 2
19110         db_env_create( NULL, 0 );
19111 #elif DB_VERSION_MAJOR > 1
19112         db_appexit( NULL );
19113 #else
19114         (void) dbopen( NULL, 0, 0, 0, NULL);
19115 #endif
19116
19117 ; return 0; }
19118 EOF
19119 if { (eval echo configure:19118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19120   rm -rf conftest*
19121   ol_cv_db_db41=yes
19122 else
19123   echo "configure: failed program was:" >&5
19124   cat conftest.$ac_ext >&5
19125   rm -rf conftest*
19126   ol_cv_db_db41=no
19127 fi
19128 rm -f conftest*
19129
19130         LIBS="$ol_LIBS"
19131
19132 fi
19133
19134 echo "$ac_t""$ol_cv_db_db41" 1>&6
19135
19136         if test $ol_cv_db_db41 = yes ; then
19137                 ol_cv_lib_db=-ldb41
19138         fi
19139 fi
19140
19141 if test $ol_cv_lib_db = no ; then
19142         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19143 echo "configure:19142: checking for Berkeley DB link (-ldb-41)" >&5
19144 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19145   echo $ac_n "(cached) $ac_c" 1>&6
19146 else
19147   
19148         ol_DB_LIB=-ldb-41
19149         ol_LIBS=$LIBS
19150         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19151
19152         cat > conftest.$ac_ext <<EOF
19153 #line 19152 "configure"
19154 #include "confdefs.h"
19155
19156 #ifdef HAVE_DB_185_H
19157 # include <db_185.h>
19158 #else
19159 # include <db.h>
19160 #endif
19161
19162 #ifndef DB_VERSION_MAJOR
19163 # define DB_VERSION_MAJOR 1
19164 #endif
19165
19166 #ifndef NULL
19167 #define NULL ((void*)0)
19168 #endif
19169
19170 int main() {
19171
19172 #if DB_VERSION_MAJOR > 1
19173         {
19174                 char *version;
19175                 int major, minor, patch;
19176
19177                 version = db_version( &major, &minor, &patch );
19178
19179                 if( major != DB_VERSION_MAJOR ||
19180                         minor < DB_VERSION_MINOR )
19181                 {
19182                         printf("Berkeley DB version mismatch\n"
19183                                 "\theader: %s\n\tlibrary: %s\n",
19184                                 DB_VERSION_STRING, version);
19185                         return 1;
19186                 }
19187         }
19188 #endif
19189
19190 #if DB_VERSION_MAJOR > 2
19191         db_env_create( NULL, 0 );
19192 #elif DB_VERSION_MAJOR > 1
19193         db_appexit( NULL );
19194 #else
19195         (void) dbopen( NULL, 0, 0, 0, NULL);
19196 #endif
19197
19198 ; return 0; }
19199 EOF
19200 if { (eval echo configure:19199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19201   rm -rf conftest*
19202   ol_cv_db_db_41=yes
19203 else
19204   echo "configure: failed program was:" >&5
19205   cat conftest.$ac_ext >&5
19206   rm -rf conftest*
19207   ol_cv_db_db_41=no
19208 fi
19209 rm -f conftest*
19210
19211         LIBS="$ol_LIBS"
19212
19213 fi
19214
19215 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19216
19217         if test $ol_cv_db_db_41 = yes ; then
19218                 ol_cv_lib_db=-ldb-41
19219         fi
19220 fi
19221
19222 if test $ol_cv_lib_db = no ; then
19223         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19224 echo "configure:19223: checking for Berkeley DB link (-ldb-4.1)" >&5
19225 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19226   echo $ac_n "(cached) $ac_c" 1>&6
19227 else
19228   
19229         ol_DB_LIB=-ldb-4.1
19230         ol_LIBS=$LIBS
19231         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19232
19233         cat > conftest.$ac_ext <<EOF
19234 #line 19233 "configure"
19235 #include "confdefs.h"
19236
19237 #ifdef HAVE_DB_185_H
19238 # include <db_185.h>
19239 #else
19240 # include <db.h>
19241 #endif
19242
19243 #ifndef DB_VERSION_MAJOR
19244 # define DB_VERSION_MAJOR 1
19245 #endif
19246
19247 #ifndef NULL
19248 #define NULL ((void*)0)
19249 #endif
19250
19251 int main() {
19252
19253 #if DB_VERSION_MAJOR > 1
19254         {
19255                 char *version;
19256                 int major, minor, patch;
19257
19258                 version = db_version( &major, &minor, &patch );
19259
19260                 if( major != DB_VERSION_MAJOR ||
19261                         minor < DB_VERSION_MINOR )
19262                 {
19263                         printf("Berkeley DB version mismatch\n"
19264                                 "\theader: %s\n\tlibrary: %s\n",
19265                                 DB_VERSION_STRING, version);
19266                         return 1;
19267                 }
19268         }
19269 #endif
19270
19271 #if DB_VERSION_MAJOR > 2
19272         db_env_create( NULL, 0 );
19273 #elif DB_VERSION_MAJOR > 1
19274         db_appexit( NULL );
19275 #else
19276         (void) dbopen( NULL, 0, 0, 0, NULL);
19277 #endif
19278
19279 ; return 0; }
19280 EOF
19281 if { (eval echo configure:19280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19282   rm -rf conftest*
19283   ol_cv_db_db_4_dot_1=yes
19284 else
19285   echo "configure: failed program was:" >&5
19286   cat conftest.$ac_ext >&5
19287   rm -rf conftest*
19288   ol_cv_db_db_4_dot_1=no
19289 fi
19290 rm -f conftest*
19291
19292         LIBS="$ol_LIBS"
19293
19294 fi
19295
19296 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19297
19298         if test $ol_cv_db_db_4_dot_1 = yes ; then
19299                 ol_cv_lib_db=-ldb-4.1
19300         fi
19301 fi
19302
19303 if test $ol_cv_lib_db = no ; then
19304         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19305 echo "configure:19304: checking for Berkeley DB link (-ldb-4-1)" >&5
19306 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19307   echo $ac_n "(cached) $ac_c" 1>&6
19308 else
19309   
19310         ol_DB_LIB=-ldb-4-1
19311         ol_LIBS=$LIBS
19312         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19313
19314         cat > conftest.$ac_ext <<EOF
19315 #line 19314 "configure"
19316 #include "confdefs.h"
19317
19318 #ifdef HAVE_DB_185_H
19319 # include <db_185.h>
19320 #else
19321 # include <db.h>
19322 #endif
19323
19324 #ifndef DB_VERSION_MAJOR
19325 # define DB_VERSION_MAJOR 1
19326 #endif
19327
19328 #ifndef NULL
19329 #define NULL ((void*)0)
19330 #endif
19331
19332 int main() {
19333
19334 #if DB_VERSION_MAJOR > 1
19335         {
19336                 char *version;
19337                 int major, minor, patch;
19338
19339                 version = db_version( &major, &minor, &patch );
19340
19341                 if( major != DB_VERSION_MAJOR ||
19342                         minor < DB_VERSION_MINOR )
19343                 {
19344                         printf("Berkeley DB version mismatch\n"
19345                                 "\theader: %s\n\tlibrary: %s\n",
19346                                 DB_VERSION_STRING, version);
19347                         return 1;
19348                 }
19349         }
19350 #endif
19351
19352 #if DB_VERSION_MAJOR > 2
19353         db_env_create( NULL, 0 );
19354 #elif DB_VERSION_MAJOR > 1
19355         db_appexit( NULL );
19356 #else
19357         (void) dbopen( NULL, 0, 0, 0, NULL);
19358 #endif
19359
19360 ; return 0; }
19361 EOF
19362 if { (eval echo configure:19361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19363   rm -rf conftest*
19364   ol_cv_db_db_4_1=yes
19365 else
19366   echo "configure: failed program was:" >&5
19367   cat conftest.$ac_ext >&5
19368   rm -rf conftest*
19369   ol_cv_db_db_4_1=no
19370 fi
19371 rm -f conftest*
19372
19373         LIBS="$ol_LIBS"
19374
19375 fi
19376
19377 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19378
19379         if test $ol_cv_db_db_4_1 = yes ; then
19380                 ol_cv_lib_db=-ldb-4-1
19381         fi
19382 fi
19383
19384 if test $ol_cv_lib_db = no ; then
19385         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19386 echo "configure:19385: checking for Berkeley DB link (-ldb3)" >&5
19387 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19388   echo $ac_n "(cached) $ac_c" 1>&6
19389 else
19390   
19391         ol_DB_LIB=-ldb3
19392         ol_LIBS=$LIBS
19393         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19394
19395         cat > conftest.$ac_ext <<EOF
19396 #line 19395 "configure"
19397 #include "confdefs.h"
19398
19399 #ifdef HAVE_DB_185_H
19400 # include <db_185.h>
19401 #else
19402 # include <db.h>
19403 #endif
19404
19405 #ifndef DB_VERSION_MAJOR
19406 # define DB_VERSION_MAJOR 1
19407 #endif
19408
19409 #ifndef NULL
19410 #define NULL ((void*)0)
19411 #endif
19412
19413 int main() {
19414
19415 #if DB_VERSION_MAJOR > 1
19416         {
19417                 char *version;
19418                 int major, minor, patch;
19419
19420                 version = db_version( &major, &minor, &patch );
19421
19422                 if( major != DB_VERSION_MAJOR ||
19423                         minor < DB_VERSION_MINOR )
19424                 {
19425                         printf("Berkeley DB version mismatch\n"
19426                                 "\theader: %s\n\tlibrary: %s\n",
19427                                 DB_VERSION_STRING, version);
19428                         return 1;
19429                 }
19430         }
19431 #endif
19432
19433 #if DB_VERSION_MAJOR > 2
19434         db_env_create( NULL, 0 );
19435 #elif DB_VERSION_MAJOR > 1
19436         db_appexit( NULL );
19437 #else
19438         (void) dbopen( NULL, 0, 0, 0, NULL);
19439 #endif
19440
19441 ; return 0; }
19442 EOF
19443 if { (eval echo configure:19442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19444   rm -rf conftest*
19445   ol_cv_db_db3=yes
19446 else
19447   echo "configure: failed program was:" >&5
19448   cat conftest.$ac_ext >&5
19449   rm -rf conftest*
19450   ol_cv_db_db3=no
19451 fi
19452 rm -f conftest*
19453
19454         LIBS="$ol_LIBS"
19455
19456 fi
19457
19458 echo "$ac_t""$ol_cv_db_db3" 1>&6
19459
19460         if test $ol_cv_db_db3 = yes ; then
19461                 ol_cv_lib_db=-ldb3
19462         fi
19463 fi
19464
19465 if test $ol_cv_lib_db = no ; then
19466         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19467 echo "configure:19466: checking for Berkeley DB link (-ldb-3)" >&5
19468 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19469   echo $ac_n "(cached) $ac_c" 1>&6
19470 else
19471   
19472         ol_DB_LIB=-ldb-3
19473         ol_LIBS=$LIBS
19474         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19475
19476         cat > conftest.$ac_ext <<EOF
19477 #line 19476 "configure"
19478 #include "confdefs.h"
19479
19480 #ifdef HAVE_DB_185_H
19481 # include <db_185.h>
19482 #else
19483 # include <db.h>
19484 #endif
19485
19486 #ifndef DB_VERSION_MAJOR
19487 # define DB_VERSION_MAJOR 1
19488 #endif
19489
19490 #ifndef NULL
19491 #define NULL ((void*)0)
19492 #endif
19493
19494 int main() {
19495
19496 #if DB_VERSION_MAJOR > 1
19497         {
19498                 char *version;
19499                 int major, minor, patch;
19500
19501                 version = db_version( &major, &minor, &patch );
19502
19503                 if( major != DB_VERSION_MAJOR ||
19504                         minor < DB_VERSION_MINOR )
19505                 {
19506                         printf("Berkeley DB version mismatch\n"
19507                                 "\theader: %s\n\tlibrary: %s\n",
19508                                 DB_VERSION_STRING, version);
19509                         return 1;
19510                 }
19511         }
19512 #endif
19513
19514 #if DB_VERSION_MAJOR > 2
19515         db_env_create( NULL, 0 );
19516 #elif DB_VERSION_MAJOR > 1
19517         db_appexit( NULL );
19518 #else
19519         (void) dbopen( NULL, 0, 0, 0, NULL);
19520 #endif
19521
19522 ; return 0; }
19523 EOF
19524 if { (eval echo configure:19523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19525   rm -rf conftest*
19526   ol_cv_db_db_3=yes
19527 else
19528   echo "configure: failed program was:" >&5
19529   cat conftest.$ac_ext >&5
19530   rm -rf conftest*
19531   ol_cv_db_db_3=no
19532 fi
19533 rm -f conftest*
19534
19535         LIBS="$ol_LIBS"
19536
19537 fi
19538
19539 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19540
19541         if test $ol_cv_db_db_3 = yes ; then
19542                 ol_cv_lib_db=-ldb-3
19543         fi
19544 fi
19545
19546 if test $ol_cv_lib_db = no ; then
19547         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19548 echo "configure:19547: checking for Berkeley DB link (-ldb2)" >&5
19549 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19550   echo $ac_n "(cached) $ac_c" 1>&6
19551 else
19552   
19553         ol_DB_LIB=-ldb2
19554         ol_LIBS=$LIBS
19555         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19556
19557         cat > conftest.$ac_ext <<EOF
19558 #line 19557 "configure"
19559 #include "confdefs.h"
19560
19561 #ifdef HAVE_DB_185_H
19562 # include <db_185.h>
19563 #else
19564 # include <db.h>
19565 #endif
19566
19567 #ifndef DB_VERSION_MAJOR
19568 # define DB_VERSION_MAJOR 1
19569 #endif
19570
19571 #ifndef NULL
19572 #define NULL ((void*)0)
19573 #endif
19574
19575 int main() {
19576
19577 #if DB_VERSION_MAJOR > 1
19578         {
19579                 char *version;
19580                 int major, minor, patch;
19581
19582                 version = db_version( &major, &minor, &patch );
19583
19584                 if( major != DB_VERSION_MAJOR ||
19585                         minor < DB_VERSION_MINOR )
19586                 {
19587                         printf("Berkeley DB version mismatch\n"
19588                                 "\theader: %s\n\tlibrary: %s\n",
19589                                 DB_VERSION_STRING, version);
19590                         return 1;
19591                 }
19592         }
19593 #endif
19594
19595 #if DB_VERSION_MAJOR > 2
19596         db_env_create( NULL, 0 );
19597 #elif DB_VERSION_MAJOR > 1
19598         db_appexit( NULL );
19599 #else
19600         (void) dbopen( NULL, 0, 0, 0, NULL);
19601 #endif
19602
19603 ; return 0; }
19604 EOF
19605 if { (eval echo configure:19604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19606   rm -rf conftest*
19607   ol_cv_db_db2=yes
19608 else
19609   echo "configure: failed program was:" >&5
19610   cat conftest.$ac_ext >&5
19611   rm -rf conftest*
19612   ol_cv_db_db2=no
19613 fi
19614 rm -f conftest*
19615
19616         LIBS="$ol_LIBS"
19617
19618 fi
19619
19620 echo "$ac_t""$ol_cv_db_db2" 1>&6
19621
19622         if test $ol_cv_db_db2 = yes ; then
19623                 ol_cv_lib_db=-ldb2
19624         fi
19625 fi
19626
19627 if test $ol_cv_lib_db = no ; then
19628         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19629 echo "configure:19628: checking for Berkeley DB link (-ldb-2)" >&5
19630 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19631   echo $ac_n "(cached) $ac_c" 1>&6
19632 else
19633   
19634         ol_DB_LIB=-ldb-2
19635         ol_LIBS=$LIBS
19636         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19637
19638         cat > conftest.$ac_ext <<EOF
19639 #line 19638 "configure"
19640 #include "confdefs.h"
19641
19642 #ifdef HAVE_DB_185_H
19643 # include <db_185.h>
19644 #else
19645 # include <db.h>
19646 #endif
19647
19648 #ifndef DB_VERSION_MAJOR
19649 # define DB_VERSION_MAJOR 1
19650 #endif
19651
19652 #ifndef NULL
19653 #define NULL ((void*)0)
19654 #endif
19655
19656 int main() {
19657
19658 #if DB_VERSION_MAJOR > 1
19659         {
19660                 char *version;
19661                 int major, minor, patch;
19662
19663                 version = db_version( &major, &minor, &patch );
19664
19665                 if( major != DB_VERSION_MAJOR ||
19666                         minor < DB_VERSION_MINOR )
19667                 {
19668                         printf("Berkeley DB version mismatch\n"
19669                                 "\theader: %s\n\tlibrary: %s\n",
19670                                 DB_VERSION_STRING, version);
19671                         return 1;
19672                 }
19673         }
19674 #endif
19675
19676 #if DB_VERSION_MAJOR > 2
19677         db_env_create( NULL, 0 );
19678 #elif DB_VERSION_MAJOR > 1
19679         db_appexit( NULL );
19680 #else
19681         (void) dbopen( NULL, 0, 0, 0, NULL);
19682 #endif
19683
19684 ; return 0; }
19685 EOF
19686 if { (eval echo configure:19685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19687   rm -rf conftest*
19688   ol_cv_db_db_2=yes
19689 else
19690   echo "configure: failed program was:" >&5
19691   cat conftest.$ac_ext >&5
19692   rm -rf conftest*
19693   ol_cv_db_db_2=no
19694 fi
19695 rm -f conftest*
19696
19697         LIBS="$ol_LIBS"
19698
19699 fi
19700
19701 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19702
19703         if test $ol_cv_db_db_2 = yes ; then
19704                 ol_cv_lib_db=-ldb-2
19705         fi
19706 fi
19707
19708 if test $ol_cv_lib_db = no ; then
19709         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19710 echo "configure:19709: checking for Berkeley DB link (-ldb1)" >&5
19711 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19712   echo $ac_n "(cached) $ac_c" 1>&6
19713 else
19714   
19715         ol_DB_LIB=-ldb1
19716         ol_LIBS=$LIBS
19717         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19718
19719         cat > conftest.$ac_ext <<EOF
19720 #line 19719 "configure"
19721 #include "confdefs.h"
19722
19723 #ifdef HAVE_DB_185_H
19724 # include <db_185.h>
19725 #else
19726 # include <db.h>
19727 #endif
19728
19729 #ifndef DB_VERSION_MAJOR
19730 # define DB_VERSION_MAJOR 1
19731 #endif
19732
19733 #ifndef NULL
19734 #define NULL ((void*)0)
19735 #endif
19736
19737 int main() {
19738
19739 #if DB_VERSION_MAJOR > 1
19740         {
19741                 char *version;
19742                 int major, minor, patch;
19743
19744                 version = db_version( &major, &minor, &patch );
19745
19746                 if( major != DB_VERSION_MAJOR ||
19747                         minor < DB_VERSION_MINOR )
19748                 {
19749                         printf("Berkeley DB version mismatch\n"
19750                                 "\theader: %s\n\tlibrary: %s\n",
19751                                 DB_VERSION_STRING, version);
19752                         return 1;
19753                 }
19754         }
19755 #endif
19756
19757 #if DB_VERSION_MAJOR > 2
19758         db_env_create( NULL, 0 );
19759 #elif DB_VERSION_MAJOR > 1
19760         db_appexit( NULL );
19761 #else
19762         (void) dbopen( NULL, 0, 0, 0, NULL);
19763 #endif
19764
19765 ; return 0; }
19766 EOF
19767 if { (eval echo configure:19766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19768   rm -rf conftest*
19769   ol_cv_db_db1=yes
19770 else
19771   echo "configure: failed program was:" >&5
19772   cat conftest.$ac_ext >&5
19773   rm -rf conftest*
19774   ol_cv_db_db1=no
19775 fi
19776 rm -f conftest*
19777
19778         LIBS="$ol_LIBS"
19779
19780 fi
19781
19782 echo "$ac_t""$ol_cv_db_db1" 1>&6
19783
19784         if test $ol_cv_db_db1 = yes ; then
19785                 ol_cv_lib_db=-ldb1
19786         fi
19787 fi
19788
19789 if test $ol_cv_lib_db = no ; then
19790         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19791 echo "configure:19790: checking for Berkeley DB link (-ldb-1)" >&5
19792 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19793   echo $ac_n "(cached) $ac_c" 1>&6
19794 else
19795   
19796         ol_DB_LIB=-ldb-1
19797         ol_LIBS=$LIBS
19798         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19799
19800         cat > conftest.$ac_ext <<EOF
19801 #line 19800 "configure"
19802 #include "confdefs.h"
19803
19804 #ifdef HAVE_DB_185_H
19805 # include <db_185.h>
19806 #else
19807 # include <db.h>
19808 #endif
19809
19810 #ifndef DB_VERSION_MAJOR
19811 # define DB_VERSION_MAJOR 1
19812 #endif
19813
19814 #ifndef NULL
19815 #define NULL ((void*)0)
19816 #endif
19817
19818 int main() {
19819
19820 #if DB_VERSION_MAJOR > 1
19821         {
19822                 char *version;
19823                 int major, minor, patch;
19824
19825                 version = db_version( &major, &minor, &patch );
19826
19827                 if( major != DB_VERSION_MAJOR ||
19828                         minor < DB_VERSION_MINOR )
19829                 {
19830                         printf("Berkeley DB version mismatch\n"
19831                                 "\theader: %s\n\tlibrary: %s\n",
19832                                 DB_VERSION_STRING, version);
19833                         return 1;
19834                 }
19835         }
19836 #endif
19837
19838 #if DB_VERSION_MAJOR > 2
19839         db_env_create( NULL, 0 );
19840 #elif DB_VERSION_MAJOR > 1
19841         db_appexit( NULL );
19842 #else
19843         (void) dbopen( NULL, 0, 0, 0, NULL);
19844 #endif
19845
19846 ; return 0; }
19847 EOF
19848 if { (eval echo configure:19847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19849   rm -rf conftest*
19850   ol_cv_db_db_1=yes
19851 else
19852   echo "configure: failed program was:" >&5
19853   cat conftest.$ac_ext >&5
19854   rm -rf conftest*
19855   ol_cv_db_db_1=no
19856 fi
19857 rm -f conftest*
19858
19859         LIBS="$ol_LIBS"
19860
19861 fi
19862
19863 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19864
19865         if test $ol_cv_db_db_1 = yes ; then
19866                 ol_cv_lib_db=-ldb-1
19867         fi
19868 fi
19869
19870
19871         if test "$ol_cv_lib_db" != no ; then
19872                 ol_cv_berkeley_db=yes
19873                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
19874 echo "configure:19873: checking for Berkeley DB version match" >&5
19875 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
19876   echo $ac_n "(cached) $ac_c" 1>&6
19877 else
19878   
19879         ol_LIBS="$LIBS"
19880         LIBS="$LTHREAD_LIBS $LIBS"
19881         if test $ol_cv_lib_db != yes ; then
19882                 LIBS="$ol_cv_lib_db $LIBS"
19883         fi
19884
19885         if test "$cross_compiling" = yes; then
19886   ol_cv_berkeley_db_version=cross
19887 else
19888   cat > conftest.$ac_ext <<EOF
19889 #line 19888 "configure"
19890 #include "confdefs.h"
19891
19892 #ifdef HAVE_DB_185_H
19893         choke me;
19894 #else
19895 #include <db.h>
19896 #endif
19897 #ifndef DB_VERSION_MAJOR
19898 # define DB_VERSION_MAJOR 1
19899 #endif
19900 #ifndef NULL
19901 #define NULL ((void *)0)
19902 #endif
19903 main()
19904 {
19905 #if DB_VERSION_MAJOR > 1
19906         char *version;
19907         int major, minor, patch;
19908
19909         version = db_version( &major, &minor, &patch );
19910
19911         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
19912                 printf("Berkeley DB version mismatch\n"
19913                         "\theader: %s\n\tlibrary: %s\n",
19914                         DB_VERSION_STRING, version);
19915                 return 1;
19916         }
19917 #endif
19918
19919         return 0;
19920 }
19921 EOF
19922 if { (eval echo configure:19921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19923 then
19924   ol_cv_berkeley_db_version=yes
19925 else
19926   echo "configure: failed program was:" >&5
19927   cat conftest.$ac_ext >&5
19928   rm -fr conftest*
19929   ol_cv_berkeley_db_version=no
19930 fi
19931 rm -fr conftest*
19932 fi
19933
19934
19935         LIBS="$ol_LIBS"
19936
19937 fi
19938
19939 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
19940
19941         if test $ol_cv_berkeley_db_version = no ; then
19942                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
19943         fi
19944
19945                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19946 echo "configure:19945: checking for Berkeley DB thread support" >&5
19947 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19948   echo $ac_n "(cached) $ac_c" 1>&6
19949 else
19950   
19951         ol_LIBS="$LIBS"
19952         LIBS="$LTHREAD_LIBS $LIBS"
19953         if test $ol_cv_lib_db != yes ; then
19954                 LIBS="$ol_cv_lib_db $LIBS"
19955         fi
19956
19957         if test "$cross_compiling" = yes; then
19958   ol_cv_berkeley_db_thread=cross
19959 else
19960   cat > conftest.$ac_ext <<EOF
19961 #line 19960 "configure"
19962 #include "confdefs.h"
19963
19964 #ifdef HAVE_DB_185_H
19965         choke me;
19966 #else
19967 #include <db.h>
19968 #endif
19969 #ifndef NULL
19970 #define NULL ((void *)0)
19971 #endif
19972 main()
19973 {
19974         int rc;
19975         u_int32_t flags = DB_CREATE |
19976 #ifdef DB_PRIVATE
19977                 DB_PRIVATE |
19978 #endif
19979                 DB_THREAD;
19980
19981 #if DB_VERSION_MAJOR > 2
19982         DB_ENV *env = NULL;
19983
19984         rc = db_env_create( &env, 0 );
19985
19986         flags |= DB_INIT_MPOOL;
19987 #ifdef DB_MPOOL_PRIVATE
19988         flags |= DB_MPOOL_PRIVATE;
19989 #endif
19990
19991         if( rc ) {
19992                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19993                 return rc;
19994         }
19995
19996 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19997         rc = env->open( env, NULL, flags, 0 );
19998 #else
19999         rc = env->open( env, NULL, NULL, flags, 0 );
20000 #endif
20001
20002         if ( rc == 0 ) {
20003                 rc = env->close( env, 0 );
20004         }
20005
20006         if( rc ) {
20007                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20008                 return rc;
20009         }
20010
20011 #else
20012         DB_ENV env;
20013         memset( &env, '\0', sizeof(env) );
20014
20015         rc = db_appinit( NULL, NULL, &env, flags );
20016
20017         if( rc == 0 ) {
20018                 db_appexit( &env );
20019         }
20020
20021         unlink("__db_mpool.share");
20022         unlink("__db_lock.share");
20023 #endif
20024
20025         return rc;
20026 }
20027 EOF
20028 if { (eval echo configure:20027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20029 then
20030   ol_cv_berkeley_db_thread=yes
20031 else
20032   echo "configure: failed program was:" >&5
20033   cat conftest.$ac_ext >&5
20034   rm -fr conftest*
20035   ol_cv_berkeley_db_thread=no
20036 fi
20037 rm -fr conftest*
20038 fi
20039
20040
20041         LIBS="$ol_LIBS"
20042
20043 fi
20044
20045 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20046
20047         if test $ol_cv_berkeley_db_thread != no ; then
20048                 cat >> confdefs.h <<\EOF
20049 #define HAVE_BERKELEY_DB_THREAD 1
20050 EOF
20051
20052         fi
20053
20054         fi
20055 fi
20056
20057         fi
20058
20059         if test $ol_cv_berkeley_db != no ; then
20060                 cat >> confdefs.h <<\EOF
20061 #define HAVE_BERKELEY_DB 1
20062 EOF
20063
20064
20065                 ol_link_ldbm=berkeley
20066                 ol_with_ldbm_api=berkeley
20067
20068                 if test $ol_with_ldbm_type = hash ; then
20069                         cat >> confdefs.h <<\EOF
20070 #define LDBM_USE_DBHASH 1
20071 EOF
20072
20073                 else
20074                         cat >> confdefs.h <<\EOF
20075 #define LDBM_USE_DBBTREE 1
20076 EOF
20077
20078                 fi
20079
20080                                                 if test $ol_cv_lib_db != yes ; then
20081                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20082                 fi
20083         fi
20084 fi
20085
20086 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20087         if test $ol_link_ldbm != berkeley ; then
20088                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20089         else
20090                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20091 echo "configure:20090: checking Berkeley DB version for BDB backend" >&5
20092 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20093   echo $ac_n "(cached) $ac_c" 1>&6
20094 else
20095   
20096         cat > conftest.$ac_ext <<EOF
20097 #line 20096 "configure"
20098 #include "confdefs.h"
20099
20100 #include <db.h>
20101
20102  /* this check could be improved */
20103 #ifndef DB_VERSION_MAJOR
20104 #       define DB_VERSION_MAJOR 1
20105 #endif
20106 #ifndef DB_VERSION_MINOR
20107 #       define DB_VERSION_MINOR 0
20108 #endif
20109
20110 /* require 4.2 or later */
20111 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20112         __db_version_compat
20113 #endif
20114         
20115 EOF
20116 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20117   egrep "__db_version_compat" >/dev/null 2>&1; then
20118   rm -rf conftest*
20119   ol_cv_bdb_compat=yes
20120 else
20121   rm -rf conftest*
20122   ol_cv_bdb_compat=no
20123 fi
20124 rm -f conftest*
20125
20126 fi
20127
20128 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20129
20130
20131                 if test $ol_cv_bdb_compat != yes ; then
20132                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20133                 fi
20134         fi
20135 fi
20136
20137 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20138         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20139         ol_with_ldbm_api=none
20140 fi
20141
20142 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20143         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20144 echo "configure:20143: checking for MDBM library" >&5
20145 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20146   echo $ac_n "(cached) $ac_c" 1>&6
20147 else
20148         ol_LIBS="$LIBS"
20149         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20150 echo "configure:20149: checking for mdbm_set_chain" >&5
20151 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20152   echo $ac_n "(cached) $ac_c" 1>&6
20153 else
20154   cat > conftest.$ac_ext <<EOF
20155 #line 20154 "configure"
20156 #include "confdefs.h"
20157 /* System header to define __stub macros and hopefully few prototypes,
20158     which can conflict with char mdbm_set_chain(); below.  */
20159 #include <assert.h>
20160 /* Override any gcc2 internal prototype to avoid an error.  */
20161 /* We use char because int might match the return type of a gcc2
20162     builtin and then its argument prototype would still apply.  */
20163 char mdbm_set_chain();
20164 char (*f)();
20165
20166 int main() {
20167
20168 /* The GNU C library defines this for functions which it implements
20169     to always fail with ENOSYS.  Some functions are actually named
20170     something starting with __ and the normal name is an alias.  */
20171 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20172 choke me
20173 #else
20174 f = mdbm_set_chain;
20175 #endif
20176
20177 ; return 0; }
20178 EOF
20179 if { (eval echo configure:20178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20180   rm -rf conftest*
20181   eval "ac_cv_func_mdbm_set_chain=yes"
20182 else
20183   echo "configure: failed program was:" >&5
20184   cat conftest.$ac_ext >&5
20185   rm -rf conftest*
20186   eval "ac_cv_func_mdbm_set_chain=no"
20187 fi
20188 rm -f conftest*
20189 fi
20190
20191 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20192   echo "$ac_t""yes" 1>&6
20193   ol_cv_lib_mdbm=yes
20194 else
20195   echo "$ac_t""no" 1>&6
20196
20197                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20198 echo "configure:20197: checking for mdbm_set_chain in -lmdbm" >&5
20199 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20200 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20201   echo $ac_n "(cached) $ac_c" 1>&6
20202 else
20203   ac_save_LIBS="$LIBS"
20204 LIBS="-lmdbm  $LIBS"
20205 cat > conftest.$ac_ext <<EOF
20206 #line 20205 "configure"
20207 #include "confdefs.h"
20208 /* Override any gcc2 internal prototype to avoid an error.  */
20209 /* We use char because int might match the return type of a gcc2
20210     builtin and then its argument prototype would still apply.  */
20211 char mdbm_set_chain();
20212
20213 int main() {
20214 mdbm_set_chain()
20215 ; return 0; }
20216 EOF
20217 if { (eval echo configure:20216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20218   rm -rf conftest*
20219   eval "ac_cv_lib_$ac_lib_var=yes"
20220 else
20221   echo "configure: failed program was:" >&5
20222   cat conftest.$ac_ext >&5
20223   rm -rf conftest*
20224   eval "ac_cv_lib_$ac_lib_var=no"
20225 fi
20226 rm -f conftest*
20227 LIBS="$ac_save_LIBS"
20228
20229 fi
20230 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20231   echo "$ac_t""yes" 1>&6
20232   ol_cv_lib_mdbm=-lmdbm
20233 else
20234   echo "$ac_t""no" 1>&6
20235 ol_cv_lib_mdbm=no
20236 fi
20237
20238         
20239 fi
20240
20241         LIBS="$ol_LIBS"
20242
20243 fi
20244
20245 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20246
20247
20248  for ac_hdr in mdbm.h
20249 do
20250 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20251 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20252 echo "configure:20251: checking for $ac_hdr" >&5
20253 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20254   echo $ac_n "(cached) $ac_c" 1>&6
20255 else
20256   cat > conftest.$ac_ext <<EOF
20257 #line 20256 "configure"
20258 #include "confdefs.h"
20259 #include <$ac_hdr>
20260 EOF
20261 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20262 { (eval echo configure:20261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20263 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20264 if test -z "$ac_err"; then
20265   rm -rf conftest*
20266   eval "ac_cv_header_$ac_safe=yes"
20267 else
20268   echo "$ac_err" >&5
20269   echo "configure: failed program was:" >&5
20270   cat conftest.$ac_ext >&5
20271   rm -rf conftest*
20272   eval "ac_cv_header_$ac_safe=no"
20273 fi
20274 rm -f conftest*
20275 fi
20276 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20277   echo "$ac_t""yes" 1>&6
20278     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20279   cat >> confdefs.h <<EOF
20280 #define $ac_tr_hdr 1
20281 EOF
20282  
20283 else
20284   echo "$ac_t""no" 1>&6
20285 fi
20286 done
20287
20288  echo $ac_n "checking for db""... $ac_c" 1>&6
20289 echo "configure:20288: checking for db" >&5
20290 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20291   echo $ac_n "(cached) $ac_c" 1>&6
20292 else
20293   
20294         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20295                 ol_cv_mdbm=no
20296         else
20297                 ol_cv_mdbm=yes
20298         fi
20299
20300 fi
20301
20302 echo "$ac_t""$ol_cv_mdbm" 1>&6
20303  if test $ol_cv_mdbm = yes ; then
20304         cat >> confdefs.h <<\EOF
20305 #define HAVE_MDBM 1
20306 EOF
20307
20308  fi
20309
20310
20311         if test $ol_cv_mdbm = yes ; then
20312                 ol_link_ldbm=mdbm
20313                 ol_with_ldbm_api=mdbm
20314                 if test $ol_cv_lib_mdbm != yes ; then
20315                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20316                 fi
20317         fi
20318 fi
20319
20320 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20321         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20322 echo "configure:20321: checking for GDBM library" >&5
20323 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20324   echo $ac_n "(cached) $ac_c" 1>&6
20325 else
20326         ol_LIBS="$LIBS"
20327         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20328 echo "configure:20327: checking for gdbm_open" >&5
20329 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20330   echo $ac_n "(cached) $ac_c" 1>&6
20331 else
20332   cat > conftest.$ac_ext <<EOF
20333 #line 20332 "configure"
20334 #include "confdefs.h"
20335 /* System header to define __stub macros and hopefully few prototypes,
20336     which can conflict with char gdbm_open(); below.  */
20337 #include <assert.h>
20338 /* Override any gcc2 internal prototype to avoid an error.  */
20339 /* We use char because int might match the return type of a gcc2
20340     builtin and then its argument prototype would still apply.  */
20341 char gdbm_open();
20342 char (*f)();
20343
20344 int main() {
20345
20346 /* The GNU C library defines this for functions which it implements
20347     to always fail with ENOSYS.  Some functions are actually named
20348     something starting with __ and the normal name is an alias.  */
20349 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20350 choke me
20351 #else
20352 f = gdbm_open;
20353 #endif
20354
20355 ; return 0; }
20356 EOF
20357 if { (eval echo configure:20356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20358   rm -rf conftest*
20359   eval "ac_cv_func_gdbm_open=yes"
20360 else
20361   echo "configure: failed program was:" >&5
20362   cat conftest.$ac_ext >&5
20363   rm -rf conftest*
20364   eval "ac_cv_func_gdbm_open=no"
20365 fi
20366 rm -f conftest*
20367 fi
20368
20369 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20370   echo "$ac_t""yes" 1>&6
20371   ol_cv_lib_gdbm=yes
20372 else
20373   echo "$ac_t""no" 1>&6
20374
20375                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20376 echo "configure:20375: checking for gdbm_open in -lgdbm" >&5
20377 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20378 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20379   echo $ac_n "(cached) $ac_c" 1>&6
20380 else
20381   ac_save_LIBS="$LIBS"
20382 LIBS="-lgdbm  $LIBS"
20383 cat > conftest.$ac_ext <<EOF
20384 #line 20383 "configure"
20385 #include "confdefs.h"
20386 /* Override any gcc2 internal prototype to avoid an error.  */
20387 /* We use char because int might match the return type of a gcc2
20388     builtin and then its argument prototype would still apply.  */
20389 char gdbm_open();
20390
20391 int main() {
20392 gdbm_open()
20393 ; return 0; }
20394 EOF
20395 if { (eval echo configure:20394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20396   rm -rf conftest*
20397   eval "ac_cv_lib_$ac_lib_var=yes"
20398 else
20399   echo "configure: failed program was:" >&5
20400   cat conftest.$ac_ext >&5
20401   rm -rf conftest*
20402   eval "ac_cv_lib_$ac_lib_var=no"
20403 fi
20404 rm -f conftest*
20405 LIBS="$ac_save_LIBS"
20406
20407 fi
20408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20409   echo "$ac_t""yes" 1>&6
20410   ol_cv_lib_gdbm=-lgdbm
20411 else
20412   echo "$ac_t""no" 1>&6
20413 ol_cv_lib_gdbm=no
20414 fi
20415
20416         
20417 fi
20418
20419         LIBS="$ol_LIBS"
20420
20421 fi
20422
20423 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20424
20425
20426  for ac_hdr in gdbm.h
20427 do
20428 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20429 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20430 echo "configure:20429: checking for $ac_hdr" >&5
20431 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20432   echo $ac_n "(cached) $ac_c" 1>&6
20433 else
20434   cat > conftest.$ac_ext <<EOF
20435 #line 20434 "configure"
20436 #include "confdefs.h"
20437 #include <$ac_hdr>
20438 EOF
20439 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20440 { (eval echo configure:20439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20441 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20442 if test -z "$ac_err"; then
20443   rm -rf conftest*
20444   eval "ac_cv_header_$ac_safe=yes"
20445 else
20446   echo "$ac_err" >&5
20447   echo "configure: failed program was:" >&5
20448   cat conftest.$ac_ext >&5
20449   rm -rf conftest*
20450   eval "ac_cv_header_$ac_safe=no"
20451 fi
20452 rm -f conftest*
20453 fi
20454 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20455   echo "$ac_t""yes" 1>&6
20456     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20457   cat >> confdefs.h <<EOF
20458 #define $ac_tr_hdr 1
20459 EOF
20460  
20461 else
20462   echo "$ac_t""no" 1>&6
20463 fi
20464 done
20465
20466  echo $ac_n "checking for db""... $ac_c" 1>&6
20467 echo "configure:20466: checking for db" >&5
20468 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20469   echo $ac_n "(cached) $ac_c" 1>&6
20470 else
20471   
20472         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20473                 ol_cv_gdbm=no
20474         else
20475                 ol_cv_gdbm=yes
20476         fi
20477
20478 fi
20479
20480 echo "$ac_t""$ol_cv_gdbm" 1>&6
20481  if test $ol_cv_gdbm = yes ; then
20482         cat >> confdefs.h <<\EOF
20483 #define HAVE_GDBM 1
20484 EOF
20485
20486  fi
20487
20488
20489         if test $ol_cv_gdbm = yes ; then
20490                 ol_link_ldbm=gdbm
20491                 ol_with_ldbm_api=gdbm
20492
20493                 if test $ol_cv_lib_gdbm != yes ; then
20494                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20495                 fi
20496         fi
20497 fi
20498
20499 if test $ol_with_ldbm_api = ndbm ; then
20500         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20501 echo "configure:20500: checking for NDBM library" >&5
20502 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20503   echo $ac_n "(cached) $ac_c" 1>&6
20504 else
20505         ol_LIBS="$LIBS"
20506         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20507 echo "configure:20506: checking for dbm_open" >&5
20508 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20509   echo $ac_n "(cached) $ac_c" 1>&6
20510 else
20511   cat > conftest.$ac_ext <<EOF
20512 #line 20511 "configure"
20513 #include "confdefs.h"
20514 /* System header to define __stub macros and hopefully few prototypes,
20515     which can conflict with char dbm_open(); below.  */
20516 #include <assert.h>
20517 /* Override any gcc2 internal prototype to avoid an error.  */
20518 /* We use char because int might match the return type of a gcc2
20519     builtin and then its argument prototype would still apply.  */
20520 char dbm_open();
20521 char (*f)();
20522
20523 int main() {
20524
20525 /* The GNU C library defines this for functions which it implements
20526     to always fail with ENOSYS.  Some functions are actually named
20527     something starting with __ and the normal name is an alias.  */
20528 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20529 choke me
20530 #else
20531 f = dbm_open;
20532 #endif
20533
20534 ; return 0; }
20535 EOF
20536 if { (eval echo configure:20535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20537   rm -rf conftest*
20538   eval "ac_cv_func_dbm_open=yes"
20539 else
20540   echo "configure: failed program was:" >&5
20541   cat conftest.$ac_ext >&5
20542   rm -rf conftest*
20543   eval "ac_cv_func_dbm_open=no"
20544 fi
20545 rm -f conftest*
20546 fi
20547
20548 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20549   echo "$ac_t""yes" 1>&6
20550   ol_cv_lib_ndbm=yes
20551 else
20552   echo "$ac_t""no" 1>&6
20553
20554                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20555 echo "configure:20554: checking for dbm_open in -lndbm" >&5
20556 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20557 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20558   echo $ac_n "(cached) $ac_c" 1>&6
20559 else
20560   ac_save_LIBS="$LIBS"
20561 LIBS="-lndbm  $LIBS"
20562 cat > conftest.$ac_ext <<EOF
20563 #line 20562 "configure"
20564 #include "confdefs.h"
20565 /* Override any gcc2 internal prototype to avoid an error.  */
20566 /* We use char because int might match the return type of a gcc2
20567     builtin and then its argument prototype would still apply.  */
20568 char dbm_open();
20569
20570 int main() {
20571 dbm_open()
20572 ; return 0; }
20573 EOF
20574 if { (eval echo configure:20573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20575   rm -rf conftest*
20576   eval "ac_cv_lib_$ac_lib_var=yes"
20577 else
20578   echo "configure: failed program was:" >&5
20579   cat conftest.$ac_ext >&5
20580   rm -rf conftest*
20581   eval "ac_cv_lib_$ac_lib_var=no"
20582 fi
20583 rm -f conftest*
20584 LIBS="$ac_save_LIBS"
20585
20586 fi
20587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20588   echo "$ac_t""yes" 1>&6
20589   ol_cv_lib_ndbm=-lndbm
20590 else
20591   echo "$ac_t""no" 1>&6
20592
20593                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20594 echo "configure:20593: checking for dbm_open in -ldbm" >&5
20595 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20596 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20597   echo $ac_n "(cached) $ac_c" 1>&6
20598 else
20599   ac_save_LIBS="$LIBS"
20600 LIBS="-ldbm  $LIBS"
20601 cat > conftest.$ac_ext <<EOF
20602 #line 20601 "configure"
20603 #include "confdefs.h"
20604 /* Override any gcc2 internal prototype to avoid an error.  */
20605 /* We use char because int might match the return type of a gcc2
20606     builtin and then its argument prototype would still apply.  */
20607 char dbm_open();
20608
20609 int main() {
20610 dbm_open()
20611 ; return 0; }
20612 EOF
20613 if { (eval echo configure:20612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20614   rm -rf conftest*
20615   eval "ac_cv_lib_$ac_lib_var=yes"
20616 else
20617   echo "configure: failed program was:" >&5
20618   cat conftest.$ac_ext >&5
20619   rm -rf conftest*
20620   eval "ac_cv_lib_$ac_lib_var=no"
20621 fi
20622 rm -f conftest*
20623 LIBS="$ac_save_LIBS"
20624
20625 fi
20626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20627   echo "$ac_t""yes" 1>&6
20628   ol_cv_lib_ndbm=-ldbm
20629 else
20630   echo "$ac_t""no" 1>&6
20631 ol_cv_lib_ndbm=no
20632 fi
20633                 
20634 fi
20635
20636         
20637 fi
20638
20639         LIBS="$ol_LIBS"
20640
20641 fi
20642
20643 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20644
20645
20646  for ac_hdr in ndbm.h
20647 do
20648 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20649 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20650 echo "configure:20649: checking for $ac_hdr" >&5
20651 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20652   echo $ac_n "(cached) $ac_c" 1>&6
20653 else
20654   cat > conftest.$ac_ext <<EOF
20655 #line 20654 "configure"
20656 #include "confdefs.h"
20657 #include <$ac_hdr>
20658 EOF
20659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20660 { (eval echo configure:20659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20662 if test -z "$ac_err"; then
20663   rm -rf conftest*
20664   eval "ac_cv_header_$ac_safe=yes"
20665 else
20666   echo "$ac_err" >&5
20667   echo "configure: failed program was:" >&5
20668   cat conftest.$ac_ext >&5
20669   rm -rf conftest*
20670   eval "ac_cv_header_$ac_safe=no"
20671 fi
20672 rm -f conftest*
20673 fi
20674 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20675   echo "$ac_t""yes" 1>&6
20676     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20677   cat >> confdefs.h <<EOF
20678 #define $ac_tr_hdr 1
20679 EOF
20680  
20681 else
20682   echo "$ac_t""no" 1>&6
20683 fi
20684 done
20685
20686  echo $ac_n "checking for db""... $ac_c" 1>&6
20687 echo "configure:20686: checking for db" >&5
20688 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20689   echo $ac_n "(cached) $ac_c" 1>&6
20690 else
20691   
20692         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20693                 ol_cv_ndbm=no
20694         else
20695                 ol_cv_ndbm=yes
20696         fi
20697
20698 fi
20699
20700 echo "$ac_t""$ol_cv_ndbm" 1>&6
20701  if test $ol_cv_ndbm = yes ; then
20702         cat >> confdefs.h <<\EOF
20703 #define HAVE_NDBM 1
20704 EOF
20705
20706  fi
20707
20708
20709         if test $ol_cv_ndbm = yes ; then
20710                 ol_link_ldbm=ndbm
20711                 ol_with_ldbm_api=ndbm
20712
20713                 if test $ol_cv_lib_ndbm != yes ; then
20714                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20715                 fi
20716         fi
20717 fi
20718
20719 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20720         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
20721 fi
20722
20723 if test $ol_enable_bdb = yes -o \
20724         $ol_enable_hdb = yes -o \
20725         $ol_enable_ldbm = yes ; then
20726         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
20727 fi
20728
20729
20730 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20731         BUILD_LIBS_DYNAMIC=shared
20732         cat >> confdefs.h <<\EOF
20733 #define LDAP_LIBS_DYNAMIC 1
20734 EOF
20735
20736         LTSTATIC=""
20737 else
20738         BUILD_LIBS_DYNAMIC=static
20739         LTSTATIC="-static"
20740 fi
20741
20742 if test $ol_enable_wrappers != no ; then
20743         for ac_hdr in tcpd.h
20744 do
20745 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20746 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20747 echo "configure:20746: checking for $ac_hdr" >&5
20748 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20749   echo $ac_n "(cached) $ac_c" 1>&6
20750 else
20751   cat > conftest.$ac_ext <<EOF
20752 #line 20751 "configure"
20753 #include "confdefs.h"
20754 #include <$ac_hdr>
20755 EOF
20756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20757 { (eval echo configure:20756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20758 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20759 if test -z "$ac_err"; then
20760   rm -rf conftest*
20761   eval "ac_cv_header_$ac_safe=yes"
20762 else
20763   echo "$ac_err" >&5
20764   echo "configure: failed program was:" >&5
20765   cat conftest.$ac_ext >&5
20766   rm -rf conftest*
20767   eval "ac_cv_header_$ac_safe=no"
20768 fi
20769 rm -f conftest*
20770 fi
20771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20772   echo "$ac_t""yes" 1>&6
20773     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20774   cat >> confdefs.h <<EOF
20775 #define $ac_tr_hdr 1
20776 EOF
20777  
20778                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20779 echo "configure:20778: checking for TCP wrappers library" >&5
20780                 save_LIBS="$LIBS"
20781                 LIBS="$LIBS -lwrap"
20782                 cat > conftest.$ac_ext <<EOF
20783 #line 20782 "configure"
20784 #include "confdefs.h"
20785
20786 #include <tcpd.h>
20787 int allow_severity = 0;
20788 int deny_severity  = 0;
20789
20790 struct request_info *req;
20791                 
20792 int main() {
20793
20794 hosts_access(req)
20795                 
20796 ; return 0; }
20797 EOF
20798 if { (eval echo configure:20797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20799   rm -rf conftest*
20800   echo "$ac_t""-lwrap" 1>&6
20801                 have_wrappers=yes
20802                 LIBS="$save_LIBS"
20803 else
20804   echo "configure: failed program was:" >&5
20805   cat conftest.$ac_ext >&5
20806   rm -rf conftest*
20807   
20808                                 LIBS="$LIBS -lnsl"
20809                 cat > conftest.$ac_ext <<EOF
20810 #line 20809 "configure"
20811 #include "confdefs.h"
20812
20813 #include <tcpd.h>
20814 int allow_severity = 0;
20815 int deny_severity  = 0;
20816
20817 struct request_info *req;
20818                 
20819 int main() {
20820
20821 hosts_access(req)
20822                 
20823 ; return 0; }
20824 EOF
20825 if { (eval echo configure:20824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20826   rm -rf conftest*
20827   echo "$ac_t""-lwrap -lnsl" 1>&6
20828                 have_wrappers=yes
20829                 LIBS="$save_LIBS -lnsl"
20830 else
20831   echo "configure: failed program was:" >&5
20832   cat conftest.$ac_ext >&5
20833   rm -rf conftest*
20834   
20835                 echo "$ac_t""no" 1>&6
20836                 have_wrappers=no
20837                 LIBS=$save_LIBS
20838 fi
20839 rm -f conftest*
20840 fi
20841 rm -f conftest*
20842 else
20843   echo "$ac_t""no" 1>&6
20844 have_wrappers=no
20845 fi
20846 done
20847
20848
20849         if test $have_wrappers = yes ; then
20850                 cat >> confdefs.h <<\EOF
20851 #define HAVE_TCPD 1
20852 EOF
20853
20854                 WRAP_LIBS="-lwrap"
20855         elif test $ol_enable_wrappers = yes ; then
20856                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20857         else
20858                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20859                 WRAP_LIBS=""
20860         fi
20861 fi
20862
20863 if test $ol_enable_syslog != no ; then
20864         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20865 echo "configure:20864: checking for openlog" >&5
20866 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20867   echo $ac_n "(cached) $ac_c" 1>&6
20868 else
20869   cat > conftest.$ac_ext <<EOF
20870 #line 20869 "configure"
20871 #include "confdefs.h"
20872 /* System header to define __stub macros and hopefully few prototypes,
20873     which can conflict with char openlog(); below.  */
20874 #include <assert.h>
20875 /* Override any gcc2 internal prototype to avoid an error.  */
20876 /* We use char because int might match the return type of a gcc2
20877     builtin and then its argument prototype would still apply.  */
20878 char openlog();
20879 char (*f)();
20880
20881 int main() {
20882
20883 /* The GNU C library defines this for functions which it implements
20884     to always fail with ENOSYS.  Some functions are actually named
20885     something starting with __ and the normal name is an alias.  */
20886 #if defined (__stub_openlog) || defined (__stub___openlog)
20887 choke me
20888 #else
20889 f = openlog;
20890 #endif
20891
20892 ; return 0; }
20893 EOF
20894 if { (eval echo configure:20893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20895   rm -rf conftest*
20896   eval "ac_cv_func_openlog=yes"
20897 else
20898   echo "configure: failed program was:" >&5
20899   cat conftest.$ac_ext >&5
20900   rm -rf conftest*
20901   eval "ac_cv_func_openlog=no"
20902 fi
20903 rm -f conftest*
20904 fi
20905
20906 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20907   echo "$ac_t""yes" 1>&6
20908   :
20909 else
20910   echo "$ac_t""no" 1>&6
20911 fi
20912
20913         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20914                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20915         fi
20916         ol_enable_syslog=$ac_cv_func_openlog
20917 fi
20918
20919
20920 ol_link_sql=no
20921 if test $ol_enable_sql != no ; then
20922         for ac_hdr in sql.h sqlext.h
20923 do
20924 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20925 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20926 echo "configure:20925: checking for $ac_hdr" >&5
20927 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20928   echo $ac_n "(cached) $ac_c" 1>&6
20929 else
20930   cat > conftest.$ac_ext <<EOF
20931 #line 20930 "configure"
20932 #include "confdefs.h"
20933 #include <$ac_hdr>
20934 EOF
20935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20936 { (eval echo configure:20935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20938 if test -z "$ac_err"; then
20939   rm -rf conftest*
20940   eval "ac_cv_header_$ac_safe=yes"
20941 else
20942   echo "$ac_err" >&5
20943   echo "configure: failed program was:" >&5
20944   cat conftest.$ac_ext >&5
20945   rm -rf conftest*
20946   eval "ac_cv_header_$ac_safe=no"
20947 fi
20948 rm -f conftest*
20949 fi
20950 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20951   echo "$ac_t""yes" 1>&6
20952     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20953   cat >> confdefs.h <<EOF
20954 #define $ac_tr_hdr 1
20955 EOF
20956  
20957 else
20958   echo "$ac_t""no" 1>&6
20959 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20960         
20961 fi
20962 done
20963
20964
20965         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20966 echo "configure:20965: checking for SQLDriverConnect in -liodbc" >&5
20967 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20968 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20969   echo $ac_n "(cached) $ac_c" 1>&6
20970 else
20971   ac_save_LIBS="$LIBS"
20972 LIBS="-liodbc  $LIBS"
20973 cat > conftest.$ac_ext <<EOF
20974 #line 20973 "configure"
20975 #include "confdefs.h"
20976 /* Override any gcc2 internal prototype to avoid an error.  */
20977 /* We use char because int might match the return type of a gcc2
20978     builtin and then its argument prototype would still apply.  */
20979 char SQLDriverConnect();
20980
20981 int main() {
20982 SQLDriverConnect()
20983 ; return 0; }
20984 EOF
20985 if { (eval echo configure:20984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20986   rm -rf conftest*
20987   eval "ac_cv_lib_$ac_lib_var=yes"
20988 else
20989   echo "configure: failed program was:" >&5
20990   cat conftest.$ac_ext >&5
20991   rm -rf conftest*
20992   eval "ac_cv_lib_$ac_lib_var=no"
20993 fi
20994 rm -f conftest*
20995 LIBS="$ac_save_LIBS"
20996
20997 fi
20998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20999   echo "$ac_t""yes" 1>&6
21000   have_iodbc=yes
21001 else
21002   echo "$ac_t""no" 1>&6
21003 have_iodbc=no
21004 fi
21005
21006         if test $have_iodbc = yes ; then
21007                 ol_link_sql="-liodbc"
21008         else
21009                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21010 echo "configure:21009: checking for SQLDriverConnect in -lodbc" >&5
21011 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21012 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21013   echo $ac_n "(cached) $ac_c" 1>&6
21014 else
21015   ac_save_LIBS="$LIBS"
21016 LIBS="-lodbc  $LIBS"
21017 cat > conftest.$ac_ext <<EOF
21018 #line 21017 "configure"
21019 #include "confdefs.h"
21020 /* Override any gcc2 internal prototype to avoid an error.  */
21021 /* We use char because int might match the return type of a gcc2
21022     builtin and then its argument prototype would still apply.  */
21023 char SQLDriverConnect();
21024
21025 int main() {
21026 SQLDriverConnect()
21027 ; return 0; }
21028 EOF
21029 if { (eval echo configure:21028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21030   rm -rf conftest*
21031   eval "ac_cv_lib_$ac_lib_var=yes"
21032 else
21033   echo "configure: failed program was:" >&5
21034   cat conftest.$ac_ext >&5
21035   rm -rf conftest*
21036   eval "ac_cv_lib_$ac_lib_var=no"
21037 fi
21038 rm -f conftest*
21039 LIBS="$ac_save_LIBS"
21040
21041 fi
21042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21043   echo "$ac_t""yes" 1>&6
21044   have_odbc=yes
21045 else
21046   echo "$ac_t""no" 1>&6
21047 have_odbc=no
21048 fi
21049
21050                 if test $have_odbc = yes ; then
21051                         ol_link_sql="-lodbc"
21052                 fi
21053         fi
21054
21055         if test $ol_link_sql != no ; then
21056                 SLAPD_SQL_LIBS="$ol_link_sql"
21057
21058         elif test $ol_enable_sql != auto ; then
21059                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21060         fi
21061 fi
21062
21063 WITH_SASL=no
21064 ol_link_sasl=no
21065 ol_link_spasswd=no
21066 if test $ol_with_cyrus_sasl != no ; then
21067         for ac_hdr in sasl/sasl.h sasl.h
21068 do
21069 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21070 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21071 echo "configure:21070: checking for $ac_hdr" >&5
21072 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21073   echo $ac_n "(cached) $ac_c" 1>&6
21074 else
21075   cat > conftest.$ac_ext <<EOF
21076 #line 21075 "configure"
21077 #include "confdefs.h"
21078 #include <$ac_hdr>
21079 EOF
21080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21081 { (eval echo configure:21080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21083 if test -z "$ac_err"; then
21084   rm -rf conftest*
21085   eval "ac_cv_header_$ac_safe=yes"
21086 else
21087   echo "$ac_err" >&5
21088   echo "configure: failed program was:" >&5
21089   cat conftest.$ac_ext >&5
21090   rm -rf conftest*
21091   eval "ac_cv_header_$ac_safe=no"
21092 fi
21093 rm -f conftest*
21094 fi
21095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21096   echo "$ac_t""yes" 1>&6
21097     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21098   cat >> confdefs.h <<EOF
21099 #define $ac_tr_hdr 1
21100 EOF
21101  
21102 else
21103   echo "$ac_t""no" 1>&6
21104 fi
21105 done
21106
21107
21108         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21109                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21110 echo "configure:21109: checking for sasl_client_init in -lsasl2" >&5
21111 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21112 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21113   echo $ac_n "(cached) $ac_c" 1>&6
21114 else
21115   ac_save_LIBS="$LIBS"
21116 LIBS="-lsasl2  $LIBS"
21117 cat > conftest.$ac_ext <<EOF
21118 #line 21117 "configure"
21119 #include "confdefs.h"
21120 /* Override any gcc2 internal prototype to avoid an error.  */
21121 /* We use char because int might match the return type of a gcc2
21122     builtin and then its argument prototype would still apply.  */
21123 char sasl_client_init();
21124
21125 int main() {
21126 sasl_client_init()
21127 ; return 0; }
21128 EOF
21129 if { (eval echo configure:21128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21130   rm -rf conftest*
21131   eval "ac_cv_lib_$ac_lib_var=yes"
21132 else
21133   echo "configure: failed program was:" >&5
21134   cat conftest.$ac_ext >&5
21135   rm -rf conftest*
21136   eval "ac_cv_lib_$ac_lib_var=no"
21137 fi
21138 rm -f conftest*
21139 LIBS="$ac_save_LIBS"
21140
21141 fi
21142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21143   echo "$ac_t""yes" 1>&6
21144   ol_link_sasl="-lsasl2"
21145 else
21146   echo "$ac_t""no" 1>&6
21147 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21148 echo "configure:21147: checking for sasl_client_init in -lsasl" >&5
21149 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21151   echo $ac_n "(cached) $ac_c" 1>&6
21152 else
21153   ac_save_LIBS="$LIBS"
21154 LIBS="-lsasl  $LIBS"
21155 cat > conftest.$ac_ext <<EOF
21156 #line 21155 "configure"
21157 #include "confdefs.h"
21158 /* Override any gcc2 internal prototype to avoid an error.  */
21159 /* We use char because int might match the return type of a gcc2
21160     builtin and then its argument prototype would still apply.  */
21161 char sasl_client_init();
21162
21163 int main() {
21164 sasl_client_init()
21165 ; return 0; }
21166 EOF
21167 if { (eval echo configure:21166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21168   rm -rf conftest*
21169   eval "ac_cv_lib_$ac_lib_var=yes"
21170 else
21171   echo "configure: failed program was:" >&5
21172   cat conftest.$ac_ext >&5
21173   rm -rf conftest*
21174   eval "ac_cv_lib_$ac_lib_var=no"
21175 fi
21176 rm -f conftest*
21177 LIBS="$ac_save_LIBS"
21178
21179 fi
21180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21181   echo "$ac_t""yes" 1>&6
21182   ol_link_sasl="-lsasl"
21183 else
21184   echo "$ac_t""no" 1>&6
21185 fi
21186
21187 fi
21188
21189         fi
21190
21191         if test $ol_link_sasl = no ; then
21192                 if test $ol_with_cyrus_sasl != auto ; then
21193                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21194                 else
21195                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21196                         echo "configure: warning: SASL authentication not supported!" 1>&2
21197                         if test $ol_link_tls = no ; then
21198                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21199                         fi
21200                 fi
21201         else
21202                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21203 echo "configure:21202: checking Cyrus SASL library version" >&5
21204 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21205   echo $ac_n "(cached) $ac_c" 1>&6
21206 else
21207   
21208         cat > conftest.$ac_ext <<EOF
21209 #line 21208 "configure"
21210 #include "confdefs.h"
21211
21212 #ifdef HAVE_SASL_SASL_H
21213 #include <sasl/sasl.h>
21214 #else
21215 #include <sasl.h>
21216 #endif
21217
21218 /* Require 2.1.15+ */
21219 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21220         char *__sasl_compat = "2.2+ or better okay (we guess)";
21221 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21222         && SASL_VERSION_STEP >=15
21223         char *__sasl_compat = "2.1.15+ or better okay";
21224 #endif
21225         
21226 EOF
21227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21228   egrep "__sasl_compat" >/dev/null 2>&1; then
21229   rm -rf conftest*
21230   ol_cv_sasl_compat=yes
21231 else
21232   rm -rf conftest*
21233   ol_cv_sasl_compat=no
21234 fi
21235 rm -f conftest*
21236
21237 fi
21238
21239 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21240
21241                 if test $ol_cv_sasl_compat = no ; then
21242                         ol_link_sasl=no
21243                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
21244                 fi
21245
21246                 cat >> confdefs.h <<\EOF
21247 #define HAVE_CYRUS_SASL 1
21248 EOF
21249
21250                 SASL_LIBS="$ol_link_sasl"
21251                 if test $ol_enable_spasswd != no ; then
21252                         ol_link_spasswd=yes
21253                 fi
21254
21255                 ac_save_LIBS="$LIBS"
21256                 LIBS="$LIBS $ol_link_sasl"
21257                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21258 echo "configure:21257: checking for sasl_version" >&5
21259 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21260   echo $ac_n "(cached) $ac_c" 1>&6
21261 else
21262   cat > conftest.$ac_ext <<EOF
21263 #line 21262 "configure"
21264 #include "confdefs.h"
21265 /* System header to define __stub macros and hopefully few prototypes,
21266     which can conflict with char sasl_version(); below.  */
21267 #include <assert.h>
21268 /* Override any gcc2 internal prototype to avoid an error.  */
21269 /* We use char because int might match the return type of a gcc2
21270     builtin and then its argument prototype would still apply.  */
21271 char sasl_version();
21272 char (*f)();
21273
21274 int main() {
21275
21276 /* The GNU C library defines this for functions which it implements
21277     to always fail with ENOSYS.  Some functions are actually named
21278     something starting with __ and the normal name is an alias.  */
21279 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21280 choke me
21281 #else
21282 f = sasl_version;
21283 #endif
21284
21285 ; return 0; }
21286 EOF
21287 if { (eval echo configure:21286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21288   rm -rf conftest*
21289   eval "ac_cv_func_sasl_version=yes"
21290 else
21291   echo "configure: failed program was:" >&5
21292   cat conftest.$ac_ext >&5
21293   rm -rf conftest*
21294   eval "ac_cv_func_sasl_version=no"
21295 fi
21296 rm -f conftest*
21297 fi
21298
21299 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21300   echo "$ac_t""yes" 1>&6
21301   cat >> confdefs.h <<\EOF
21302 #define HAVE_SASL_VERSION 1
21303 EOF
21304
21305 else
21306   echo "$ac_t""no" 1>&6
21307 fi
21308
21309                 LIBS="$ac_save_LIBS"
21310
21311                 WITH_SASL=yes
21312         fi
21313
21314 else
21315         echo "configure: warning: SASL authentication not supported!" 1>&2
21316         if test $ol_link_tls = no ; then
21317                 echo "configure: warning: Strong authentication not supported!" 1>&2
21318         fi
21319 fi
21320
21321 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21322         dev=no
21323         if test -r /dev/urandom ; then
21324                 dev="/dev/urandom";
21325         elif test -r /idev/urandom ; then
21326                 dev="/idev/urandom";
21327         elif test -r /dev/srandom ; then
21328                 dev="/dev/srandom";
21329         elif test -r /dev/random ; then
21330                 dev="/dev/random";
21331         elif test -r /idev/random ; then
21332                 dev="/idev/random";
21333         fi
21334
21335         if test $dev != no ; then
21336                 cat >> confdefs.h <<EOF
21337 #define URANDOM_DEVICE "$dev"
21338 EOF
21339
21340         fi
21341 fi
21342
21343 ol_link_fetch=no
21344 if test $ol_with_fetch != no ; then
21345         ol_LIBS=$LIBS
21346 LIBS="-lfetch -lcom_err $LIBS"
21347 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21348 echo "configure:21347: checking fetch(3) library" >&5
21349 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21350   echo $ac_n "(cached) $ac_c" 1>&6
21351 else
21352   
21353         cat > conftest.$ac_ext <<EOF
21354 #line 21353 "configure"
21355 #include "confdefs.h"
21356
21357 #include <sys/param.h>
21358 #include <stdio.h>
21359 #include <fetch.h>
21360 int main() {
21361 struct url *u = fetchParseURL("file:///"); 
21362 ; return 0; }
21363 EOF
21364 if { (eval echo configure:21363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21365   rm -rf conftest*
21366   ol_cv_lib_fetch=yes
21367 else
21368   echo "configure: failed program was:" >&5
21369   cat conftest.$ac_ext >&5
21370   rm -rf conftest*
21371   ol_cv_lib_fetch=no
21372 fi
21373 rm -f conftest*
21374 fi
21375
21376 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21377 LIBS=$ol_LIBS
21378 if test $ol_cv_lib_fetch != no ; then
21379         ol_link_fetch="-lfetch -lcom_err"
21380         cat >> confdefs.h <<\EOF
21381 #define HAVE_FETCH 1
21382 EOF
21383
21384 fi
21385
21386
21387         if test $ol_cv_lib_fetch != no ; then
21388                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21389                 ol_link_fetch=freebsd
21390
21391         elif test $ol_with_fetch != auto ; then
21392                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21393         fi 
21394 fi
21395
21396 if test $ol_enable_crypt != no ; then
21397         save_LIBS="$LIBS"
21398         LIBS="$TLS_LIBS $LIBS"
21399
21400         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21401 echo "configure:21400: checking for crypt" >&5
21402 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21403   echo $ac_n "(cached) $ac_c" 1>&6
21404 else
21405   cat > conftest.$ac_ext <<EOF
21406 #line 21405 "configure"
21407 #include "confdefs.h"
21408 /* System header to define __stub macros and hopefully few prototypes,
21409     which can conflict with char crypt(); below.  */
21410 #include <assert.h>
21411 /* Override any gcc2 internal prototype to avoid an error.  */
21412 /* We use char because int might match the return type of a gcc2
21413     builtin and then its argument prototype would still apply.  */
21414 char crypt();
21415 char (*f)();
21416
21417 int main() {
21418
21419 /* The GNU C library defines this for functions which it implements
21420     to always fail with ENOSYS.  Some functions are actually named
21421     something starting with __ and the normal name is an alias.  */
21422 #if defined (__stub_crypt) || defined (__stub___crypt)
21423 choke me
21424 #else
21425 f = crypt;
21426 #endif
21427
21428 ; return 0; }
21429 EOF
21430 if { (eval echo configure:21429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21431   rm -rf conftest*
21432   eval "ac_cv_func_crypt=yes"
21433 else
21434   echo "configure: failed program was:" >&5
21435   cat conftest.$ac_ext >&5
21436   rm -rf conftest*
21437   eval "ac_cv_func_crypt=no"
21438 fi
21439 rm -f conftest*
21440 fi
21441
21442 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21443   echo "$ac_t""yes" 1>&6
21444   have_crypt=yes
21445 else
21446   echo "$ac_t""no" 1>&6
21447
21448                 LIBS="$save_LIBS"
21449                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21450 echo "configure:21449: checking for crypt in -lcrypt" >&5
21451 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21452 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21453   echo $ac_n "(cached) $ac_c" 1>&6
21454 else
21455   ac_save_LIBS="$LIBS"
21456 LIBS="-lcrypt  $LIBS"
21457 cat > conftest.$ac_ext <<EOF
21458 #line 21457 "configure"
21459 #include "confdefs.h"
21460 /* Override any gcc2 internal prototype to avoid an error.  */
21461 /* We use char because int might match the return type of a gcc2
21462     builtin and then its argument prototype would still apply.  */
21463 char crypt();
21464
21465 int main() {
21466 crypt()
21467 ; return 0; }
21468 EOF
21469 if { (eval echo configure:21468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21470   rm -rf conftest*
21471   eval "ac_cv_lib_$ac_lib_var=yes"
21472 else
21473   echo "configure: failed program was:" >&5
21474   cat conftest.$ac_ext >&5
21475   rm -rf conftest*
21476   eval "ac_cv_lib_$ac_lib_var=no"
21477 fi
21478 rm -f conftest*
21479 LIBS="$ac_save_LIBS"
21480
21481 fi
21482 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21483   echo "$ac_t""yes" 1>&6
21484   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21485                         have_crypt=yes
21486 else
21487   echo "$ac_t""no" 1>&6
21488 have_crypt=no
21489 fi
21490
21491 fi
21492
21493
21494         LIBS="$save_LIBS"
21495
21496         if test $have_crypt = yes ; then
21497                 cat >> confdefs.h <<\EOF
21498 #define HAVE_CRYPT 1
21499 EOF
21500
21501         else
21502                 echo "configure: warning: could not find crypt" 1>&2
21503                 if test $ol_enable_crypt = yes ; then
21504                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
21505                 fi
21506
21507                 echo "configure: warning: disabling crypt support" 1>&2
21508                 ol_enable_crypt=no
21509         fi
21510 fi
21511
21512 if test $ol_enable_proctitle != no ; then
21513         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21514 echo "configure:21513: checking for setproctitle" >&5
21515 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21516   echo $ac_n "(cached) $ac_c" 1>&6
21517 else
21518   cat > conftest.$ac_ext <<EOF
21519 #line 21518 "configure"
21520 #include "confdefs.h"
21521 /* System header to define __stub macros and hopefully few prototypes,
21522     which can conflict with char setproctitle(); below.  */
21523 #include <assert.h>
21524 /* Override any gcc2 internal prototype to avoid an error.  */
21525 /* We use char because int might match the return type of a gcc2
21526     builtin and then its argument prototype would still apply.  */
21527 char setproctitle();
21528 char (*f)();
21529
21530 int main() {
21531
21532 /* The GNU C library defines this for functions which it implements
21533     to always fail with ENOSYS.  Some functions are actually named
21534     something starting with __ and the normal name is an alias.  */
21535 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21536 choke me
21537 #else
21538 f = setproctitle;
21539 #endif
21540
21541 ; return 0; }
21542 EOF
21543 if { (eval echo configure:21542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21544   rm -rf conftest*
21545   eval "ac_cv_func_setproctitle=yes"
21546 else
21547   echo "configure: failed program was:" >&5
21548   cat conftest.$ac_ext >&5
21549   rm -rf conftest*
21550   eval "ac_cv_func_setproctitle=no"
21551 fi
21552 rm -f conftest*
21553 fi
21554
21555 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21556   echo "$ac_t""yes" 1>&6
21557   have_setproctitle=yes
21558 else
21559   echo "$ac_t""no" 1>&6
21560
21561                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21562 echo "configure:21561: checking for setproctitle in -lutil" >&5
21563 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21564 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21565   echo $ac_n "(cached) $ac_c" 1>&6
21566 else
21567   ac_save_LIBS="$LIBS"
21568 LIBS="-lutil  $LIBS"
21569 cat > conftest.$ac_ext <<EOF
21570 #line 21569 "configure"
21571 #include "confdefs.h"
21572 /* Override any gcc2 internal prototype to avoid an error.  */
21573 /* We use char because int might match the return type of a gcc2
21574     builtin and then its argument prototype would still apply.  */
21575 char setproctitle();
21576
21577 int main() {
21578 setproctitle()
21579 ; return 0; }
21580 EOF
21581 if { (eval echo configure:21580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21582   rm -rf conftest*
21583   eval "ac_cv_lib_$ac_lib_var=yes"
21584 else
21585   echo "configure: failed program was:" >&5
21586   cat conftest.$ac_ext >&5
21587   rm -rf conftest*
21588   eval "ac_cv_lib_$ac_lib_var=no"
21589 fi
21590 rm -f conftest*
21591 LIBS="$ac_save_LIBS"
21592
21593 fi
21594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21595   echo "$ac_t""yes" 1>&6
21596   have_setproctitle=yes
21597                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21598 else
21599   echo "$ac_t""no" 1>&6
21600 have_setproctitle=no
21601                         LIBOBJS="$LIBOBJS setproctitle.o"
21602                         LIBSRCS="$LIBSRCS setproctitle.c"
21603 fi
21604
21605 fi
21606
21607
21608         if test $have_setproctitle = yes ; then
21609                 cat >> confdefs.h <<\EOF
21610 #define HAVE_SETPROCTITLE 1
21611 EOF
21612
21613         fi
21614 fi
21615
21616 if test $ol_enable_slp != no ; then
21617         for ac_hdr in slp.h 
21618 do
21619 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21620 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21621 echo "configure:21620: checking for $ac_hdr" >&5
21622 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21623   echo $ac_n "(cached) $ac_c" 1>&6
21624 else
21625   cat > conftest.$ac_ext <<EOF
21626 #line 21625 "configure"
21627 #include "confdefs.h"
21628 #include <$ac_hdr>
21629 EOF
21630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21631 { (eval echo configure:21630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21633 if test -z "$ac_err"; then
21634   rm -rf conftest*
21635   eval "ac_cv_header_$ac_safe=yes"
21636 else
21637   echo "$ac_err" >&5
21638   echo "configure: failed program was:" >&5
21639   cat conftest.$ac_ext >&5
21640   rm -rf conftest*
21641   eval "ac_cv_header_$ac_safe=no"
21642 fi
21643 rm -f conftest*
21644 fi
21645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21646   echo "$ac_t""yes" 1>&6
21647     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21648   cat >> confdefs.h <<EOF
21649 #define $ac_tr_hdr 1
21650 EOF
21651  
21652 else
21653   echo "$ac_t""no" 1>&6
21654 fi
21655 done
21656
21657
21658         if test $ac_cv_header_slp_h = yes ; then
21659                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21660 echo "configure:21659: checking for SLPOpen in -lslp" >&5
21661 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21662 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21663   echo $ac_n "(cached) $ac_c" 1>&6
21664 else
21665   ac_save_LIBS="$LIBS"
21666 LIBS="-lslp  $LIBS"
21667 cat > conftest.$ac_ext <<EOF
21668 #line 21667 "configure"
21669 #include "confdefs.h"
21670 /* Override any gcc2 internal prototype to avoid an error.  */
21671 /* We use char because int might match the return type of a gcc2
21672     builtin and then its argument prototype would still apply.  */
21673 char SLPOpen();
21674
21675 int main() {
21676 SLPOpen()
21677 ; return 0; }
21678 EOF
21679 if { (eval echo configure:21678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21680   rm -rf conftest*
21681   eval "ac_cv_lib_$ac_lib_var=yes"
21682 else
21683   echo "configure: failed program was:" >&5
21684   cat conftest.$ac_ext >&5
21685   rm -rf conftest*
21686   eval "ac_cv_lib_$ac_lib_var=no"
21687 fi
21688 rm -f conftest*
21689 LIBS="$ac_save_LIBS"
21690
21691 fi
21692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21693   echo "$ac_t""yes" 1>&6
21694   have_slp=yes
21695 else
21696   echo "$ac_t""no" 1>&6
21697 have_slp=no
21698 fi
21699
21700                 if test $have_slp = yes ; then
21701                         cat >> confdefs.h <<\EOF
21702 #define HAVE_SLP 1
21703 EOF
21704
21705                         SLAPD_SLP_LIBS=-lslp
21706                 fi
21707
21708         elif test $ol_enable_slp = yes ; then
21709                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21710         fi
21711 fi
21712
21713 if test "$ol_with_multiple_precision" != "no" ; then
21714         ol_have_bignum=no
21715         ol_have_gmp=no
21716
21717         for ac_hdr in openssl/bn.h bn.h
21718 do
21719 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21720 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21721 echo "configure:21720: checking for $ac_hdr" >&5
21722 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21723   echo $ac_n "(cached) $ac_c" 1>&6
21724 else
21725   cat > conftest.$ac_ext <<EOF
21726 #line 21725 "configure"
21727 #include "confdefs.h"
21728 #include <$ac_hdr>
21729 EOF
21730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21731 { (eval echo configure:21730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21733 if test -z "$ac_err"; then
21734   rm -rf conftest*
21735   eval "ac_cv_header_$ac_safe=yes"
21736 else
21737   echo "$ac_err" >&5
21738   echo "configure: failed program was:" >&5
21739   cat conftest.$ac_ext >&5
21740   rm -rf conftest*
21741   eval "ac_cv_header_$ac_safe=no"
21742 fi
21743 rm -f conftest*
21744 fi
21745 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21746   echo "$ac_t""yes" 1>&6
21747     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21748   cat >> confdefs.h <<EOF
21749 #define $ac_tr_hdr 1
21750 EOF
21751  
21752 else
21753   echo "$ac_t""no" 1>&6
21754 fi
21755 done
21756
21757         for ac_hdr in openssl/crypto.h crypto.h
21758 do
21759 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21760 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21761 echo "configure:21760: checking for $ac_hdr" >&5
21762 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21763   echo $ac_n "(cached) $ac_c" 1>&6
21764 else
21765   cat > conftest.$ac_ext <<EOF
21766 #line 21765 "configure"
21767 #include "confdefs.h"
21768 #include <$ac_hdr>
21769 EOF
21770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21771 { (eval echo configure:21770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21773 if test -z "$ac_err"; then
21774   rm -rf conftest*
21775   eval "ac_cv_header_$ac_safe=yes"
21776 else
21777   echo "$ac_err" >&5
21778   echo "configure: failed program was:" >&5
21779   cat conftest.$ac_ext >&5
21780   rm -rf conftest*
21781   eval "ac_cv_header_$ac_safe=no"
21782 fi
21783 rm -f conftest*
21784 fi
21785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21786   echo "$ac_t""yes" 1>&6
21787     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21788   cat >> confdefs.h <<EOF
21789 #define $ac_tr_hdr 1
21790 EOF
21791  
21792 else
21793   echo "$ac_t""no" 1>&6
21794 fi
21795 done
21796
21797         for ac_hdr in gmp.h 
21798 do
21799 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21800 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21801 echo "configure:21800: checking for $ac_hdr" >&5
21802 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21803   echo $ac_n "(cached) $ac_c" 1>&6
21804 else
21805   cat > conftest.$ac_ext <<EOF
21806 #line 21805 "configure"
21807 #include "confdefs.h"
21808 #include <$ac_hdr>
21809 EOF
21810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21811 { (eval echo configure:21810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21813 if test -z "$ac_err"; then
21814   rm -rf conftest*
21815   eval "ac_cv_header_$ac_safe=yes"
21816 else
21817   echo "$ac_err" >&5
21818   echo "configure: failed program was:" >&5
21819   cat conftest.$ac_ext >&5
21820   rm -rf conftest*
21821   eval "ac_cv_header_$ac_safe=no"
21822 fi
21823 rm -f conftest*
21824 fi
21825 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21826   echo "$ac_t""yes" 1>&6
21827     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21828   cat >> confdefs.h <<EOF
21829 #define $ac_tr_hdr 1
21830 EOF
21831  
21832 else
21833   echo "$ac_t""no" 1>&6
21834 fi
21835 done
21836
21837
21838         if test "$ol_with_tls" = "found" ; then
21839                 ol_have_bn_h=no
21840                 ol_have_crypto_h=no
21841
21842                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
21843                                 -o "$ac_cv_header_bn_h" = "yes" ; then
21844                         ol_have_bn_h=yes
21845                 fi
21846
21847                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
21848                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
21849                         ol_have_crypto_h=yes
21850                 fi
21851
21852                 if test "$ol_have_bn_h" = "yes" \
21853                                 -a "$ol_have_crypto_h" = "yes" ; then
21854                         ol_have_bignum=yes
21855                 fi
21856         fi
21857
21858         if test $ac_cv_header_gmp_h = yes ; then
21859                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
21860 echo "configure:21859: checking for __gmpz_add_ui in -lgmp" >&5
21861 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
21862 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21863   echo $ac_n "(cached) $ac_c" 1>&6
21864 else
21865   ac_save_LIBS="$LIBS"
21866 LIBS="-lgmp  $LIBS"
21867 cat > conftest.$ac_ext <<EOF
21868 #line 21867 "configure"
21869 #include "confdefs.h"
21870 /* Override any gcc2 internal prototype to avoid an error.  */
21871 /* We use char because int might match the return type of a gcc2
21872     builtin and then its argument prototype would still apply.  */
21873 char __gmpz_add_ui();
21874
21875 int main() {
21876 __gmpz_add_ui()
21877 ; return 0; }
21878 EOF
21879 if { (eval echo configure:21878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21880   rm -rf conftest*
21881   eval "ac_cv_lib_$ac_lib_var=yes"
21882 else
21883   echo "configure: failed program was:" >&5
21884   cat conftest.$ac_ext >&5
21885   rm -rf conftest*
21886   eval "ac_cv_lib_$ac_lib_var=no"
21887 fi
21888 rm -f conftest*
21889 LIBS="$ac_save_LIBS"
21890
21891 fi
21892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21893   echo "$ac_t""yes" 1>&6
21894   have_gmp=yes
21895 else
21896   echo "$ac_t""no" 1>&6
21897 have_gmp=no
21898 fi
21899
21900                 if test $have_gmp = yes ; then
21901                         ol_have_gmp=yes
21902                 fi
21903         fi
21904
21905         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
21906 echo "configure:21905: checking for multiple precision support" >&5
21907
21908         ol_mp_support="none"
21909         case "$ol_with_multiple_precision" in
21910         auto)
21911                                                                                 if test "$ol_have_bignum" = "yes" ; then
21912                         ol_mp_support="bignum"
21913                 else
21914                         if test "$ol_have_gmp" = "yes" ; then
21915                                 ol_mp_support="gmp"
21916                         fi
21917                 fi
21918                 ;;
21919         bignum)
21920                 if test "$ol_have_bignum" != "yes" ; then
21921                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
21922                 fi
21923                 ol_mp_support="bignum"
21924                 ;;
21925         gmp)
21926                 if test "$ol_have_gmp" != "yes" ; then
21927                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
21928                 fi
21929                 ol_mp_support="gmp"
21930                 ;;
21931         yes)
21932                 if test "$ol_have_bignum" = "yes" ; then
21933                         ol_mp_support="bignum"
21934                 elif test "$ol_have_gmp" = "yes" ; then
21935                         ol_mp_support="gmp"
21936                 else
21937                         { echo "configure: error: not available" 1>&2; exit 1; }
21938                 fi
21939                 ;;
21940         esac
21941
21942         case "$ol_mp_support" in
21943         bignum)
21944                 cat >> confdefs.h <<\EOF
21945 #define HAVE_BIGNUM 1
21946 EOF
21947
21948                 ;;
21949         gmp)
21950                 cat >> confdefs.h <<\EOF
21951 #define HAVE_GMP 1
21952 EOF
21953
21954                 SLAPD_GMP_LIBS=-lgmp
21955                 ;;
21956         none)
21957                 ;;
21958         esac
21959
21960         echo "$ac_t""$ol_mp_support" 1>&6
21961 fi
21962
21963
21964 echo $ac_n "checking long long""... $ac_c" 1>&6
21965 echo "configure:21964: checking long long" >&5
21966 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21967   echo $ac_n "(cached) $ac_c" 1>&6
21968 else
21969   
21970         cat > conftest.$ac_ext <<EOF
21971 #line 21970 "configure"
21972 #include "confdefs.h"
21973
21974 int main() {
21975 long long x;
21976 ; return 0; }
21977 EOF
21978 if { (eval echo configure:21977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21979   rm -rf conftest*
21980   ol_cv_type_long_long=yes
21981 else
21982   echo "configure: failed program was:" >&5
21983   cat conftest.$ac_ext >&5
21984   rm -rf conftest*
21985   ol_cv_type_long_long=no
21986 fi
21987 rm -f conftest*
21988 fi
21989
21990 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21991 if test $ol_cv_type_long_long = yes; then
21992         cat >> confdefs.h <<\EOF
21993 #define HAVE_LONG_LONG 1
21994 EOF
21995
21996 fi
21997
21998 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21999 echo "configure:21998: checking for ANSI C header files" >&5
22000 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22001   echo $ac_n "(cached) $ac_c" 1>&6
22002 else
22003   cat > conftest.$ac_ext <<EOF
22004 #line 22003 "configure"
22005 #include "confdefs.h"
22006 #include <stdlib.h>
22007 #include <stdarg.h>
22008 #include <string.h>
22009 #include <float.h>
22010 EOF
22011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22012 { (eval echo configure:22011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22014 if test -z "$ac_err"; then
22015   rm -rf conftest*
22016   ac_cv_header_stdc=yes
22017 else
22018   echo "$ac_err" >&5
22019   echo "configure: failed program was:" >&5
22020   cat conftest.$ac_ext >&5
22021   rm -rf conftest*
22022   ac_cv_header_stdc=no
22023 fi
22024 rm -f conftest*
22025
22026 if test $ac_cv_header_stdc = yes; then
22027   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22028 cat > conftest.$ac_ext <<EOF
22029 #line 22028 "configure"
22030 #include "confdefs.h"
22031 #include <string.h>
22032 EOF
22033 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22034   egrep "memchr" >/dev/null 2>&1; then
22035   :
22036 else
22037   rm -rf conftest*
22038   ac_cv_header_stdc=no
22039 fi
22040 rm -f conftest*
22041
22042 fi
22043
22044 if test $ac_cv_header_stdc = yes; then
22045   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22046 cat > conftest.$ac_ext <<EOF
22047 #line 22046 "configure"
22048 #include "confdefs.h"
22049 #include <stdlib.h>
22050 EOF
22051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22052   egrep "free" >/dev/null 2>&1; then
22053   :
22054 else
22055   rm -rf conftest*
22056   ac_cv_header_stdc=no
22057 fi
22058 rm -f conftest*
22059
22060 fi
22061
22062 if test $ac_cv_header_stdc = yes; then
22063   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22064 if test "$cross_compiling" = yes; then
22065   :
22066 else
22067   cat > conftest.$ac_ext <<EOF
22068 #line 22067 "configure"
22069 #include "confdefs.h"
22070 #include <ctype.h>
22071 #if ((' ' & 0x0FF) == 0x020)
22072 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22073 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22074 #else
22075 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22076  || ('j' <= (c) && (c) <= 'r') \
22077  || ('s' <= (c) && (c) <= 'z'))
22078 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22079 #endif
22080 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22081 int main () { int i; for (i = 0; i < 256; i++)
22082 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22083 exit (0); }
22084
22085 EOF
22086 if { (eval echo configure:22085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22087 then
22088   :
22089 else
22090   echo "configure: failed program was:" >&5
22091   cat conftest.$ac_ext >&5
22092   rm -fr conftest*
22093   ac_cv_header_stdc=no
22094 fi
22095 rm -fr conftest*
22096 fi
22097
22098 fi
22099 fi
22100
22101 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22102 if test $ac_cv_header_stdc = yes; then
22103   cat >> confdefs.h <<\EOF
22104 #define STDC_HEADERS 1
22105 EOF
22106
22107 fi
22108
22109 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22110 echo "configure:22109: checking for mode_t" >&5
22111 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22112   echo $ac_n "(cached) $ac_c" 1>&6
22113 else
22114   cat > conftest.$ac_ext <<EOF
22115 #line 22114 "configure"
22116 #include "confdefs.h"
22117 #include <sys/types.h>
22118 #if STDC_HEADERS
22119 #include <stdlib.h>
22120 #include <stddef.h>
22121 #endif
22122
22123 EOF
22124 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22125   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22126   rm -rf conftest*
22127   eval "ac_cv_type_mode_t=yes"
22128 else
22129   rm -rf conftest*
22130   eval "ac_cv_type_mode_t=no"
22131 fi
22132 rm -f conftest*
22133
22134 fi
22135 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22136   echo "$ac_t""yes" 1>&6
22137 else
22138   echo "$ac_t""no" 1>&6
22139   cat >> confdefs.h <<EOF
22140 #define mode_t int
22141 EOF
22142
22143 fi
22144
22145 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22146 echo "configure:22145: checking for off_t" >&5
22147 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22148   echo $ac_n "(cached) $ac_c" 1>&6
22149 else
22150   cat > conftest.$ac_ext <<EOF
22151 #line 22150 "configure"
22152 #include "confdefs.h"
22153 #include <sys/types.h>
22154 #if STDC_HEADERS
22155 #include <stdlib.h>
22156 #include <stddef.h>
22157 #endif
22158
22159 EOF
22160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22161   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22162   rm -rf conftest*
22163   eval "ac_cv_type_off_t=yes"
22164 else
22165   rm -rf conftest*
22166   eval "ac_cv_type_off_t=no"
22167 fi
22168 rm -f conftest*
22169
22170 fi
22171 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
22172   echo "$ac_t""yes" 1>&6
22173 else
22174   echo "$ac_t""no" 1>&6
22175   cat >> confdefs.h <<EOF
22176 #define off_t long
22177 EOF
22178
22179 fi
22180
22181 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
22182 echo "configure:22181: checking for pid_t" >&5
22183 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
22184   echo $ac_n "(cached) $ac_c" 1>&6
22185 else
22186   cat > conftest.$ac_ext <<EOF
22187 #line 22186 "configure"
22188 #include "confdefs.h"
22189 #include <sys/types.h>
22190 #if STDC_HEADERS
22191 #include <stdlib.h>
22192 #include <stddef.h>
22193 #endif
22194
22195 EOF
22196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22197   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22198   rm -rf conftest*
22199   eval "ac_cv_type_pid_t=yes"
22200 else
22201   rm -rf conftest*
22202   eval "ac_cv_type_pid_t=no"
22203 fi
22204 rm -f conftest*
22205
22206 fi
22207 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
22208   echo "$ac_t""yes" 1>&6
22209 else
22210   echo "$ac_t""no" 1>&6
22211   cat >> confdefs.h <<EOF
22212 #define pid_t int
22213 EOF
22214
22215 fi
22216
22217 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
22218 echo "configure:22217: checking for ptrdiff_t" >&5
22219 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
22220   echo $ac_n "(cached) $ac_c" 1>&6
22221 else
22222   cat > conftest.$ac_ext <<EOF
22223 #line 22222 "configure"
22224 #include "confdefs.h"
22225 #include <stddef.h>
22226 int main() {
22227 ptrdiff_t p
22228 ; return 0; }
22229 EOF
22230 if { (eval echo configure:22229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22231   rm -rf conftest*
22232   am_cv_type_ptrdiff_t=yes
22233 else
22234   echo "configure: failed program was:" >&5
22235   cat conftest.$ac_ext >&5
22236   rm -rf conftest*
22237   am_cv_type_ptrdiff_t=no
22238 fi
22239 rm -f conftest*
22240 fi
22241
22242 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
22243    if test $am_cv_type_ptrdiff_t = yes; then
22244      cat >> confdefs.h <<\EOF
22245 #define HAVE_PTRDIFF_T 1
22246 EOF
22247
22248    fi
22249
22250 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
22251 echo "configure:22250: checking return type of signal handlers" >&5
22252 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
22253   echo $ac_n "(cached) $ac_c" 1>&6
22254 else
22255   cat > conftest.$ac_ext <<EOF
22256 #line 22255 "configure"
22257 #include "confdefs.h"
22258 #include <sys/types.h>
22259 #include <signal.h>
22260 #ifdef signal
22261 #undef signal
22262 #endif
22263 #ifdef __cplusplus
22264 extern "C" void (*signal (int, void (*)(int)))(int);
22265 #else
22266 void (*signal ()) ();
22267 #endif
22268
22269 int main() {
22270 int i;
22271 ; return 0; }
22272 EOF
22273 if { (eval echo configure:22272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22274   rm -rf conftest*
22275   ac_cv_type_signal=void
22276 else
22277   echo "configure: failed program was:" >&5
22278   cat conftest.$ac_ext >&5
22279   rm -rf conftest*
22280   ac_cv_type_signal=int
22281 fi
22282 rm -f conftest*
22283 fi
22284
22285 echo "$ac_t""$ac_cv_type_signal" 1>&6
22286 cat >> confdefs.h <<EOF
22287 #define RETSIGTYPE $ac_cv_type_signal
22288 EOF
22289
22290
22291 echo $ac_n "checking for size_t""... $ac_c" 1>&6
22292 echo "configure:22291: checking for size_t" >&5
22293 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
22294   echo $ac_n "(cached) $ac_c" 1>&6
22295 else
22296   cat > conftest.$ac_ext <<EOF
22297 #line 22296 "configure"
22298 #include "confdefs.h"
22299 #include <sys/types.h>
22300 #if STDC_HEADERS
22301 #include <stdlib.h>
22302 #include <stddef.h>
22303 #endif
22304
22305 EOF
22306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22307   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22308   rm -rf conftest*
22309   eval "ac_cv_type_size_t=yes"
22310 else
22311   rm -rf conftest*
22312   eval "ac_cv_type_size_t=no"
22313 fi
22314 rm -f conftest*
22315
22316 fi
22317 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
22318   echo "$ac_t""yes" 1>&6
22319 else
22320   echo "$ac_t""no" 1>&6
22321   cat >> confdefs.h <<EOF
22322 #define size_t unsigned
22323 EOF
22324
22325 fi
22326
22327
22328 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
22329 echo "configure:22328: checking for ssize_t" >&5
22330 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
22331   echo $ac_n "(cached) $ac_c" 1>&6
22332 else
22333   cat > conftest.$ac_ext <<EOF
22334 #line 22333 "configure"
22335 #include "confdefs.h"
22336 #include <sys/types.h>
22337 #if STDC_HEADERS
22338 #include <stdlib.h>
22339 #include <stddef.h>
22340 #endif
22341
22342 EOF
22343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22344   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22345   rm -rf conftest*
22346   eval "ac_cv_type_ssize_t=yes"
22347 else
22348   rm -rf conftest*
22349   eval "ac_cv_type_ssize_t=no"
22350 fi
22351 rm -f conftest*
22352
22353 fi
22354 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
22355   echo "$ac_t""yes" 1>&6
22356 else
22357   echo "$ac_t""no" 1>&6
22358   cat >> confdefs.h <<EOF
22359 #define ssize_t signed int
22360 EOF
22361
22362 fi
22363
22364 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
22365 echo "configure:22364: checking for caddr_t" >&5
22366 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
22367   echo $ac_n "(cached) $ac_c" 1>&6
22368 else
22369   cat > conftest.$ac_ext <<EOF
22370 #line 22369 "configure"
22371 #include "confdefs.h"
22372 #include <sys/types.h>
22373 #if STDC_HEADERS
22374 #include <stdlib.h>
22375 #include <stddef.h>
22376 #endif
22377
22378 EOF
22379 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22380   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22381   rm -rf conftest*
22382   eval "ac_cv_type_caddr_t=yes"
22383 else
22384   rm -rf conftest*
22385   eval "ac_cv_type_caddr_t=no"
22386 fi
22387 rm -f conftest*
22388
22389 fi
22390 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
22391   echo "$ac_t""yes" 1>&6
22392 else
22393   echo "$ac_t""no" 1>&6
22394   cat >> confdefs.h <<EOF
22395 #define caddr_t char *
22396 EOF
22397
22398 fi
22399
22400
22401 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
22402 echo "configure:22401: checking for socklen_t" >&5
22403 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
22404   echo $ac_n "(cached) $ac_c" 1>&6
22405 else
22406   cat > conftest.$ac_ext <<EOF
22407 #line 22406 "configure"
22408 #include "confdefs.h"
22409
22410 #ifdef HAVE_SYS_TYPES_H
22411 #include <sys/types.h>
22412 #endif
22413 #ifdef HAVE_SYS_SOCKET_H
22414 #include <sys/socket.h>
22415 #endif
22416
22417 int main() {
22418 socklen_t len;
22419 ; return 0; }
22420 EOF
22421 if { (eval echo configure:22420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22422   rm -rf conftest*
22423   ol_cv_type_socklen_t=yes
22424 else
22425   echo "configure: failed program was:" >&5
22426   cat conftest.$ac_ext >&5
22427   rm -rf conftest*
22428   ol_cv_type_socklen_t=no
22429 fi
22430 rm -f conftest*
22431 fi
22432
22433 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
22434   if test $ol_cv_type_socklen_t = no; then
22435     cat >> confdefs.h <<\EOF
22436 #define socklen_t int
22437 EOF
22438
22439   fi
22440  
22441 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
22442 echo "configure:22441: checking for member st_blksize in aggregate type struct stat" >&5
22443 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
22444   echo $ac_n "(cached) $ac_c" 1>&6
22445 else
22446   cat > conftest.$ac_ext <<EOF
22447 #line 22446 "configure"
22448 #include "confdefs.h"
22449 #include <sys/types.h>
22450 #include <sys/stat.h>
22451 int main() {
22452 struct stat foo; foo.st_blksize;
22453 ; return 0; }
22454 EOF
22455 if { (eval echo configure:22454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22456   rm -rf conftest*
22457   ac_cv_c_struct_member_st_blksize=yes
22458 else
22459   echo "configure: failed program was:" >&5
22460   cat conftest.$ac_ext >&5
22461   rm -rf conftest*
22462   ac_cv_c_struct_member_st_blksize=no
22463 fi
22464 rm -f conftest*
22465 fi
22466
22467 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22468 st_blksize="$ac_cv_c_struct_member_st_blksize"
22469 if test $ac_cv_c_struct_member_st_blksize = yes; then
22470   cat >> confdefs.h <<\EOF
22471 #define HAVE_ST_BLKSIZE 1
22472 EOF
22473
22474 fi
22475
22476 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22477 echo "configure:22476: checking whether time.h and sys/time.h may both be included" >&5
22478 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22479   echo $ac_n "(cached) $ac_c" 1>&6
22480 else
22481   cat > conftest.$ac_ext <<EOF
22482 #line 22481 "configure"
22483 #include "confdefs.h"
22484 #include <sys/types.h>
22485 #include <sys/time.h>
22486 #include <time.h>
22487 int main() {
22488 struct tm *tp;
22489 ; return 0; }
22490 EOF
22491 if { (eval echo configure:22490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22492   rm -rf conftest*
22493   ac_cv_header_time=yes
22494 else
22495   echo "configure: failed program was:" >&5
22496   cat conftest.$ac_ext >&5
22497   rm -rf conftest*
22498   ac_cv_header_time=no
22499 fi
22500 rm -f conftest*
22501 fi
22502
22503 echo "$ac_t""$ac_cv_header_time" 1>&6
22504 if test $ac_cv_header_time = yes; then
22505   cat >> confdefs.h <<\EOF
22506 #define TIME_WITH_SYS_TIME 1
22507 EOF
22508
22509 fi
22510
22511 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22512 echo "configure:22511: checking whether struct tm is in sys/time.h or time.h" >&5
22513 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22514   echo $ac_n "(cached) $ac_c" 1>&6
22515 else
22516   cat > conftest.$ac_ext <<EOF
22517 #line 22516 "configure"
22518 #include "confdefs.h"
22519 #include <sys/types.h>
22520 #include <time.h>
22521 int main() {
22522 struct tm *tp; tp->tm_sec;
22523 ; return 0; }
22524 EOF
22525 if { (eval echo configure:22524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22526   rm -rf conftest*
22527   ac_cv_struct_tm=time.h
22528 else
22529   echo "configure: failed program was:" >&5
22530   cat conftest.$ac_ext >&5
22531   rm -rf conftest*
22532   ac_cv_struct_tm=sys/time.h
22533 fi
22534 rm -f conftest*
22535 fi
22536
22537 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22538 if test $ac_cv_struct_tm = sys/time.h; then
22539   cat >> confdefs.h <<\EOF
22540 #define TM_IN_SYS_TIME 1
22541 EOF
22542
22543 fi
22544
22545 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22546 echo "configure:22545: checking for uid_t in sys/types.h" >&5
22547 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22548   echo $ac_n "(cached) $ac_c" 1>&6
22549 else
22550   cat > conftest.$ac_ext <<EOF
22551 #line 22550 "configure"
22552 #include "confdefs.h"
22553 #include <sys/types.h>
22554 EOF
22555 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22556   egrep "uid_t" >/dev/null 2>&1; then
22557   rm -rf conftest*
22558   ac_cv_type_uid_t=yes
22559 else
22560   rm -rf conftest*
22561   ac_cv_type_uid_t=no
22562 fi
22563 rm -f conftest*
22564
22565 fi
22566
22567 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22568 if test $ac_cv_type_uid_t = no; then
22569   cat >> confdefs.h <<\EOF
22570 #define uid_t int
22571 EOF
22572
22573   cat >> confdefs.h <<\EOF
22574 #define gid_t int
22575 EOF
22576
22577 fi
22578
22579 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22580 echo "configure:22579: checking for sig_atomic_t" >&5
22581 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22582   echo $ac_n "(cached) $ac_c" 1>&6
22583 else
22584   cat > conftest.$ac_ext <<EOF
22585 #line 22584 "configure"
22586 #include "confdefs.h"
22587 #include <signal.h>
22588 int main() {
22589 sig_atomic_t atomic;
22590 ; return 0; }
22591 EOF
22592 if { (eval echo configure:22591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22593   rm -rf conftest*
22594   ol_cv_type_sig_atomic_t=yes
22595 else
22596   echo "configure: failed program was:" >&5
22597   cat conftest.$ac_ext >&5
22598   rm -rf conftest*
22599   ol_cv_type_sig_atomic_t=no
22600 fi
22601 rm -f conftest*
22602 fi
22603
22604 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22605   if test $ol_cv_type_sig_atomic_t = no; then
22606     cat >> confdefs.h <<\EOF
22607 #define sig_atomic_t int
22608 EOF
22609
22610   fi
22611  
22612
22613
22614 # test for pw_gecos in struct passwd
22615 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22616 echo "configure:22615: checking struct passwd for pw_gecos" >&5
22617 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22618   echo $ac_n "(cached) $ac_c" 1>&6
22619 else
22620   
22621         cat > conftest.$ac_ext <<EOF
22622 #line 22621 "configure"
22623 #include "confdefs.h"
22624 #include <pwd.h>
22625 int main() {
22626
22627         struct passwd pwd;
22628         pwd.pw_gecos = pwd.pw_name;
22629
22630 ; return 0; }
22631 EOF
22632 if { (eval echo configure:22631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22633   rm -rf conftest*
22634   ol_cv_struct_passwd_pw_gecos=yes
22635 else
22636   echo "configure: failed program was:" >&5
22637   cat conftest.$ac_ext >&5
22638   rm -rf conftest*
22639   ol_cv_struct_passwd_pw_gecos=no
22640 fi
22641 rm -f conftest*
22642 fi
22643
22644 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22645 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22646         cat >> confdefs.h <<\EOF
22647 #define HAVE_PW_GECOS 1
22648 EOF
22649
22650 fi
22651
22652 # test for pw_passwd in struct passwd
22653 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22654 echo "configure:22653: checking struct passwd for pw_passwd" >&5
22655 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22656   echo $ac_n "(cached) $ac_c" 1>&6
22657 else
22658   
22659         cat > conftest.$ac_ext <<EOF
22660 #line 22659 "configure"
22661 #include "confdefs.h"
22662 #include <pwd.h>
22663 int main() {
22664
22665         struct passwd pwd;
22666         pwd.pw_passwd = pwd.pw_name;
22667
22668 ; return 0; }
22669 EOF
22670 if { (eval echo configure:22669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22671   rm -rf conftest*
22672   ol_cv_struct_passwd_pw_passwd=yes
22673 else
22674   echo "configure: failed program was:" >&5
22675   cat conftest.$ac_ext >&5
22676   rm -rf conftest*
22677   ol_cv_struct_passwd_pw_passwd=no
22678 fi
22679 rm -f conftest*
22680 fi
22681
22682 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22683 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22684         cat >> confdefs.h <<\EOF
22685 #define HAVE_PW_PASSWD 1
22686 EOF
22687
22688 fi
22689
22690
22691 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22692 echo "configure:22691: checking if toupper() requires islower()" >&5
22693 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22694   echo $ac_n "(cached) $ac_c" 1>&6
22695 else
22696   
22697         if test "$cross_compiling" = yes; then
22698   ol_cv_c_upper_lower=safe
22699 else
22700   cat > conftest.$ac_ext <<EOF
22701 #line 22700 "configure"
22702 #include "confdefs.h"
22703
22704 #include <ctype.h>
22705 main()
22706 {
22707         if ('C' == toupper('C'))
22708                 exit(0);
22709         else
22710                 exit(1);
22711 }
22712 EOF
22713 if { (eval echo configure:22712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22714 then
22715   ol_cv_c_upper_lower=no
22716 else
22717   echo "configure: failed program was:" >&5
22718   cat conftest.$ac_ext >&5
22719   rm -fr conftest*
22720   ol_cv_c_upper_lower=yes
22721 fi
22722 rm -fr conftest*
22723 fi
22724
22725 fi
22726
22727 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22728 if test $ol_cv_c_upper_lower != no ; then
22729         cat >> confdefs.h <<\EOF
22730 #define C_UPPER_LOWER 1
22731 EOF
22732
22733 fi
22734
22735 echo $ac_n "checking for working const""... $ac_c" 1>&6
22736 echo "configure:22735: checking for working const" >&5
22737 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22738   echo $ac_n "(cached) $ac_c" 1>&6
22739 else
22740   cat > conftest.$ac_ext <<EOF
22741 #line 22740 "configure"
22742 #include "confdefs.h"
22743
22744 int main() {
22745
22746 /* Ultrix mips cc rejects this.  */
22747 typedef int charset[2]; const charset x;
22748 /* SunOS 4.1.1 cc rejects this.  */
22749 char const *const *ccp;
22750 char **p;
22751 /* NEC SVR4.0.2 mips cc rejects this.  */
22752 struct point {int x, y;};
22753 static struct point const zero = {0,0};
22754 /* AIX XL C 1.02.0.0 rejects this.
22755    It does not let you subtract one const X* pointer from another in an arm
22756    of an if-expression whose if-part is not a constant expression */
22757 const char *g = "string";
22758 ccp = &g + (g ? g-g : 0);
22759 /* HPUX 7.0 cc rejects these. */
22760 ++ccp;
22761 p = (char**) ccp;
22762 ccp = (char const *const *) p;
22763 { /* SCO 3.2v4 cc rejects this.  */
22764   char *t;
22765   char const *s = 0 ? (char *) 0 : (char const *) 0;
22766
22767   *t++ = 0;
22768 }
22769 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22770   int x[] = {25, 17};
22771   const int *foo = &x[0];
22772   ++foo;
22773 }
22774 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22775   typedef const int *iptr;
22776   iptr p = 0;
22777   ++p;
22778 }
22779 { /* AIX XL C 1.02.0.0 rejects this saying
22780      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22781   struct s { int j; const int *ap[3]; };
22782   struct s *b; b->j = 5;
22783 }
22784 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22785   const int foo = 10;
22786 }
22787
22788 ; return 0; }
22789 EOF
22790 if { (eval echo configure:22789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22791   rm -rf conftest*
22792   ac_cv_c_const=yes
22793 else
22794   echo "configure: failed program was:" >&5
22795   cat conftest.$ac_ext >&5
22796   rm -rf conftest*
22797   ac_cv_c_const=no
22798 fi
22799 rm -f conftest*
22800 fi
22801
22802 echo "$ac_t""$ac_cv_c_const" 1>&6
22803 if test $ac_cv_c_const = no; then
22804   cat >> confdefs.h <<\EOF
22805 #define const 
22806 EOF
22807
22808 fi
22809
22810 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22811 echo "configure:22810: checking if compiler understands volatile" >&5
22812 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22813   echo $ac_n "(cached) $ac_c" 1>&6
22814 else
22815   cat > conftest.$ac_ext <<EOF
22816 #line 22815 "configure"
22817 #include "confdefs.h"
22818 int x, y, z;
22819 int main() {
22820 volatile int a; int * volatile b = x ? &y : &z;
22821       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22822       *b = 0;
22823 ; return 0; }
22824 EOF
22825 if { (eval echo configure:22824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22826   rm -rf conftest*
22827   ol_cv_c_volatile=yes
22828 else
22829   echo "configure: failed program was:" >&5
22830   cat conftest.$ac_ext >&5
22831   rm -rf conftest*
22832   ol_cv_c_volatile=no
22833 fi
22834 rm -f conftest*
22835 fi
22836
22837 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22838   if test $ol_cv_c_volatile = yes; then
22839     : 
22840   else
22841     cat >> confdefs.h <<\EOF
22842 #define volatile 
22843 EOF
22844
22845   fi
22846  
22847
22848 if test $cross_compiling = yes ; then
22849         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22850         cat >> confdefs.h <<\EOF
22851 #define CROSS_COMPILING 1
22852 EOF
22853
22854 else
22855         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22856 echo "configure:22855: checking whether byte ordering is bigendian" >&5
22857 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22858   echo $ac_n "(cached) $ac_c" 1>&6
22859 else
22860   ac_cv_c_bigendian=unknown
22861 # See if sys/param.h defines the BYTE_ORDER macro.
22862 cat > conftest.$ac_ext <<EOF
22863 #line 22862 "configure"
22864 #include "confdefs.h"
22865 #include <sys/types.h>
22866 #include <sys/param.h>
22867 int main() {
22868
22869 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22870  bogus endian macros
22871 #endif
22872 ; return 0; }
22873 EOF
22874 if { (eval echo configure:22873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22875   rm -rf conftest*
22876   # It does; now see whether it defined to BIG_ENDIAN or not.
22877 cat > conftest.$ac_ext <<EOF
22878 #line 22877 "configure"
22879 #include "confdefs.h"
22880 #include <sys/types.h>
22881 #include <sys/param.h>
22882 int main() {
22883
22884 #if BYTE_ORDER != BIG_ENDIAN
22885  not big endian
22886 #endif
22887 ; return 0; }
22888 EOF
22889 if { (eval echo configure:22888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22890   rm -rf conftest*
22891   ac_cv_c_bigendian=yes
22892 else
22893   echo "configure: failed program was:" >&5
22894   cat conftest.$ac_ext >&5
22895   rm -rf conftest*
22896   ac_cv_c_bigendian=no
22897 fi
22898 rm -f conftest*
22899 else
22900   echo "configure: failed program was:" >&5
22901   cat conftest.$ac_ext >&5
22902 fi
22903 rm -f conftest*
22904 if test $ac_cv_c_bigendian = unknown; then
22905 if test "$cross_compiling" = yes; then
22906     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22907 else
22908   cat > conftest.$ac_ext <<EOF
22909 #line 22908 "configure"
22910 #include "confdefs.h"
22911 main () {
22912   /* Are we little or big endian?  From Harbison&Steele.  */
22913   union
22914   {
22915     long l;
22916     char c[sizeof (long)];
22917   } u;
22918   u.l = 1;
22919   exit (u.c[sizeof (long) - 1] == 1);
22920 }
22921 EOF
22922 if { (eval echo configure:22921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22923 then
22924   ac_cv_c_bigendian=no
22925 else
22926   echo "configure: failed program was:" >&5
22927   cat conftest.$ac_ext >&5
22928   rm -fr conftest*
22929   ac_cv_c_bigendian=yes
22930 fi
22931 rm -fr conftest*
22932 fi
22933
22934 fi
22935 fi
22936
22937 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22938 if test $ac_cv_c_bigendian = yes; then
22939   cat >> confdefs.h <<\EOF
22940 #define WORDS_BIGENDIAN 1
22941 EOF
22942
22943 fi
22944
22945 fi
22946
22947 echo $ac_n "checking size of short""... $ac_c" 1>&6
22948 echo "configure:22947: checking size of short" >&5 
22949 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22950   echo $ac_n "(cached) $ac_c" 1>&6
22951 else
22952   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22953   cat > conftest.$ac_ext <<EOF
22954 #line 22953 "configure"
22955 #include "confdefs.h"
22956 #include "confdefs.h" 
22957 #include <stdlib.h>
22958 #include <sys/types.h> 
22959  
22960
22961 int main() {
22962 switch (0) case 0: case (sizeof (short) == $ac_size):;
22963 ; return 0; }
22964 EOF
22965 if { (eval echo configure:22964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22966   rm -rf conftest*
22967   ac_cv_sizeof_short=$ac_size
22968 else
22969   echo "configure: failed program was:" >&5
22970   cat conftest.$ac_ext >&5
22971 fi
22972 rm -f conftest* 
22973   if test x$ac_cv_sizeof_short != x ; then break; fi 
22974 done 
22975
22976 fi
22977  
22978 if test x$ac_cv_sizeof_short = x ; then 
22979   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22980 fi 
22981 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22982 cat >> confdefs.h <<EOF
22983 #define SIZEOF_SHORT $ac_cv_sizeof_short
22984 EOF
22985  
22986  
22987 echo $ac_n "checking size of int""... $ac_c" 1>&6
22988 echo "configure:22987: checking size of int" >&5 
22989 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22990   echo $ac_n "(cached) $ac_c" 1>&6
22991 else
22992   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22993   cat > conftest.$ac_ext <<EOF
22994 #line 22993 "configure"
22995 #include "confdefs.h"
22996 #include "confdefs.h" 
22997 #include <stdlib.h>
22998 #include <sys/types.h> 
22999  
23000
23001 int main() {
23002 switch (0) case 0: case (sizeof (int) == $ac_size):;
23003 ; return 0; }
23004 EOF
23005 if { (eval echo configure:23004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23006   rm -rf conftest*
23007   ac_cv_sizeof_int=$ac_size
23008 else
23009   echo "configure: failed program was:" >&5
23010   cat conftest.$ac_ext >&5
23011 fi
23012 rm -f conftest* 
23013   if test x$ac_cv_sizeof_int != x ; then break; fi 
23014 done 
23015
23016 fi
23017  
23018 if test x$ac_cv_sizeof_int = x ; then 
23019   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23020 fi 
23021 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23022 cat >> confdefs.h <<EOF
23023 #define SIZEOF_INT $ac_cv_sizeof_int
23024 EOF
23025  
23026  
23027 echo $ac_n "checking size of long""... $ac_c" 1>&6
23028 echo "configure:23027: checking size of long" >&5 
23029 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23030   echo $ac_n "(cached) $ac_c" 1>&6
23031 else
23032   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23033   cat > conftest.$ac_ext <<EOF
23034 #line 23033 "configure"
23035 #include "confdefs.h"
23036 #include "confdefs.h" 
23037 #include <stdlib.h>
23038 #include <sys/types.h> 
23039  
23040
23041 int main() {
23042 switch (0) case 0: case (sizeof (long) == $ac_size):;
23043 ; return 0; }
23044 EOF
23045 if { (eval echo configure:23044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23046   rm -rf conftest*
23047   ac_cv_sizeof_long=$ac_size
23048 else
23049   echo "configure: failed program was:" >&5
23050   cat conftest.$ac_ext >&5
23051 fi
23052 rm -f conftest* 
23053   if test x$ac_cv_sizeof_long != x ; then break; fi 
23054 done 
23055
23056 fi
23057  
23058 if test x$ac_cv_sizeof_long = x ; then 
23059   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23060 fi 
23061 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23062 cat >> confdefs.h <<EOF
23063 #define SIZEOF_LONG $ac_cv_sizeof_long
23064 EOF
23065  
23066
23067 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23068 echo "configure:23067: checking size of wchar_t" >&5 
23069 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23070   echo $ac_n "(cached) $ac_c" 1>&6
23071 else
23072   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23073   cat > conftest.$ac_ext <<EOF
23074 #line 23073 "configure"
23075 #include "confdefs.h"
23076 #include "confdefs.h" 
23077 #include <stdlib.h>
23078 #include <sys/types.h> 
23079  
23080
23081 int main() {
23082 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23083 ; return 0; }
23084 EOF
23085 if { (eval echo configure:23084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23086   rm -rf conftest*
23087   ac_cv_sizeof_wchar_t=$ac_size
23088 else
23089   echo "configure: failed program was:" >&5
23090   cat conftest.$ac_ext >&5
23091 fi
23092 rm -f conftest* 
23093   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23094 done 
23095
23096 fi
23097  
23098 if test x$ac_cv_sizeof_wchar_t = x ; then 
23099   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23100 fi 
23101 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23102 cat >> confdefs.h <<EOF
23103 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23104 EOF
23105  
23106
23107
23108 if test "$ac_cv_sizeof_int" -lt 4 ; then
23109         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23110
23111         cat >> confdefs.h <<\EOF
23112 #define LBER_INT_T long
23113 EOF
23114
23115 else
23116         cat >> confdefs.h <<\EOF
23117 #define LBER_INT_T int
23118 EOF
23119
23120 fi
23121
23122 cat >> confdefs.h <<\EOF
23123 #define LBER_LEN_T long
23124 EOF
23125
23126 cat >> confdefs.h <<\EOF
23127 #define LBER_SOCKET_T int
23128 EOF
23129
23130 cat >> confdefs.h <<\EOF
23131 #define LBER_TAG_T long
23132 EOF
23133
23134
23135 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23136 echo "configure:23135: checking for 8-bit clean memcmp" >&5
23137 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23138   echo $ac_n "(cached) $ac_c" 1>&6
23139 else
23140   if test "$cross_compiling" = yes; then
23141   ac_cv_func_memcmp_clean=no
23142 else
23143   cat > conftest.$ac_ext <<EOF
23144 #line 23143 "configure"
23145 #include "confdefs.h"
23146
23147 main()
23148 {
23149   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23150   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23151 }
23152
23153 EOF
23154 if { (eval echo configure:23153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
23155 then
23156   ac_cv_func_memcmp_clean=yes
23157 else
23158   echo "configure: failed program was:" >&5
23159   cat conftest.$ac_ext >&5
23160   rm -fr conftest*
23161   ac_cv_func_memcmp_clean=no
23162 fi
23163 rm -fr conftest*
23164 fi
23165
23166 fi
23167
23168 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
23169 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
23170
23171 echo $ac_n "checking for strftime""... $ac_c" 1>&6
23172 echo "configure:23171: checking for strftime" >&5
23173 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
23174   echo $ac_n "(cached) $ac_c" 1>&6
23175 else
23176   cat > conftest.$ac_ext <<EOF
23177 #line 23176 "configure"
23178 #include "confdefs.h"
23179 /* System header to define __stub macros and hopefully few prototypes,
23180     which can conflict with char strftime(); below.  */
23181 #include <assert.h>
23182 /* Override any gcc2 internal prototype to avoid an error.  */
23183 /* We use char because int might match the return type of a gcc2
23184     builtin and then its argument prototype would still apply.  */
23185 char strftime();
23186 char (*f)();
23187
23188 int main() {
23189
23190 /* The GNU C library defines this for functions which it implements
23191     to always fail with ENOSYS.  Some functions are actually named
23192     something starting with __ and the normal name is an alias.  */
23193 #if defined (__stub_strftime) || defined (__stub___strftime)
23194 choke me
23195 #else
23196 f = strftime;
23197 #endif
23198
23199 ; return 0; }
23200 EOF
23201 if { (eval echo configure:23200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23202   rm -rf conftest*
23203   eval "ac_cv_func_strftime=yes"
23204 else
23205   echo "configure: failed program was:" >&5
23206   cat conftest.$ac_ext >&5
23207   rm -rf conftest*
23208   eval "ac_cv_func_strftime=no"
23209 fi
23210 rm -f conftest*
23211 fi
23212
23213 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
23214   echo "$ac_t""yes" 1>&6
23215   cat >> confdefs.h <<\EOF
23216 #define HAVE_STRFTIME 1
23217 EOF
23218
23219 else
23220   echo "$ac_t""no" 1>&6
23221 # strftime is in -lintl on SCO UNIX.
23222 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
23223 echo "configure:23222: checking for strftime in -lintl" >&5
23224 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
23225 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23226   echo $ac_n "(cached) $ac_c" 1>&6
23227 else
23228   ac_save_LIBS="$LIBS"
23229 LIBS="-lintl  $LIBS"
23230 cat > conftest.$ac_ext <<EOF
23231 #line 23230 "configure"
23232 #include "confdefs.h"
23233 /* Override any gcc2 internal prototype to avoid an error.  */
23234 /* We use char because int might match the return type of a gcc2
23235     builtin and then its argument prototype would still apply.  */
23236 char strftime();
23237
23238 int main() {
23239 strftime()
23240 ; return 0; }
23241 EOF
23242 if { (eval echo configure:23241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23243   rm -rf conftest*
23244   eval "ac_cv_lib_$ac_lib_var=yes"
23245 else
23246   echo "configure: failed program was:" >&5
23247   cat conftest.$ac_ext >&5
23248   rm -rf conftest*
23249   eval "ac_cv_lib_$ac_lib_var=no"
23250 fi
23251 rm -f conftest*
23252 LIBS="$ac_save_LIBS"
23253
23254 fi
23255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23256   echo "$ac_t""yes" 1>&6
23257   cat >> confdefs.h <<\EOF
23258 #define HAVE_STRFTIME 1
23259 EOF
23260
23261 LIBS="-lintl $LIBS"
23262 else
23263   echo "$ac_t""no" 1>&6
23264 fi
23265
23266 fi
23267
23268
23269 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
23270 echo "configure:23269: checking for inet_aton()" >&5
23271 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
23272   echo $ac_n "(cached) $ac_c" 1>&6
23273 else
23274   cat > conftest.$ac_ext <<EOF
23275 #line 23274 "configure"
23276 #include "confdefs.h"
23277
23278 #ifdef HAVE_SYS_TYPES_H
23279 #       include <sys/types.h>
23280 #endif
23281 #ifdef HAVE_SYS_SOCKET_H
23282 #       include <sys/socket.h>
23283 #       ifdef HAVE_SYS_SELECT_H
23284 #               include <sys/select.h>
23285 #       endif
23286 #       include <netinet/in.h>
23287 #       ifdef HAVE_ARPA_INET_H
23288 #               include <arpa/inet.h>
23289 #       endif
23290 #endif
23291
23292 int main() {
23293 struct in_addr in;
23294 int rc = inet_aton( "255.255.255.255", &in );
23295 ; return 0; }
23296 EOF
23297 if { (eval echo configure:23296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23298   rm -rf conftest*
23299   ol_cv_func_inet_aton=yes
23300 else
23301   echo "configure: failed program was:" >&5
23302   cat conftest.$ac_ext >&5
23303   rm -rf conftest*
23304   ol_cv_func_inet_aton=no
23305 fi
23306 rm -f conftest*
23307 fi
23308
23309 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
23310   if test $ol_cv_func_inet_aton != no; then
23311     cat >> confdefs.h <<\EOF
23312 #define HAVE_INET_ATON 1
23313 EOF
23314
23315   fi
23316  
23317
23318 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
23319 echo "configure:23318: checking for _spawnlp" >&5
23320 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
23321   echo $ac_n "(cached) $ac_c" 1>&6
23322 else
23323   cat > conftest.$ac_ext <<EOF
23324 #line 23323 "configure"
23325 #include "confdefs.h"
23326 /* System header to define __stub macros and hopefully few prototypes,
23327     which can conflict with char _spawnlp(); below.  */
23328 #include <assert.h>
23329 /* Override any gcc2 internal prototype to avoid an error.  */
23330 /* We use char because int might match the return type of a gcc2
23331     builtin and then its argument prototype would still apply.  */
23332 char _spawnlp();
23333 char (*f)();
23334
23335 int main() {
23336
23337 /* The GNU C library defines this for functions which it implements
23338     to always fail with ENOSYS.  Some functions are actually named
23339     something starting with __ and the normal name is an alias.  */
23340 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
23341 choke me
23342 #else
23343 f = _spawnlp;
23344 #endif
23345
23346 ; return 0; }
23347 EOF
23348 if { (eval echo configure:23347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23349   rm -rf conftest*
23350   eval "ac_cv_func__spawnlp=yes"
23351 else
23352   echo "configure: failed program was:" >&5
23353   cat conftest.$ac_ext >&5
23354   rm -rf conftest*
23355   eval "ac_cv_func__spawnlp=no"
23356 fi
23357 rm -f conftest*
23358 fi
23359
23360 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
23361   echo "$ac_t""yes" 1>&6
23362   cat >> confdefs.h <<\EOF
23363 #define HAVE_SPAWNLP 1
23364 EOF
23365
23366 else
23367   echo "$ac_t""no" 1>&6
23368 fi
23369
23370
23371 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
23372 echo "configure:23371: checking for _snprintf" >&5
23373 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
23374   echo $ac_n "(cached) $ac_c" 1>&6
23375 else
23376   cat > conftest.$ac_ext <<EOF
23377 #line 23376 "configure"
23378 #include "confdefs.h"
23379 /* System header to define __stub macros and hopefully few prototypes,
23380     which can conflict with char _snprintf(); below.  */
23381 #include <assert.h>
23382 /* Override any gcc2 internal prototype to avoid an error.  */
23383 /* We use char because int might match the return type of a gcc2
23384     builtin and then its argument prototype would still apply.  */
23385 char _snprintf();
23386 char (*f)();
23387
23388 int main() {
23389
23390 /* The GNU C library defines this for functions which it implements
23391     to always fail with ENOSYS.  Some functions are actually named
23392     something starting with __ and the normal name is an alias.  */
23393 #if defined (__stub__snprintf) || defined (__stub____snprintf)
23394 choke me
23395 #else
23396 f = _snprintf;
23397 #endif
23398
23399 ; return 0; }
23400 EOF
23401 if { (eval echo configure:23400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23402   rm -rf conftest*
23403   eval "ac_cv_func__snprintf=yes"
23404 else
23405   echo "configure: failed program was:" >&5
23406   cat conftest.$ac_ext >&5
23407   rm -rf conftest*
23408   eval "ac_cv_func__snprintf=no"
23409 fi
23410 rm -f conftest*
23411 fi
23412
23413 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
23414   echo "$ac_t""yes" 1>&6
23415   ac_cv_func_snprintf=yes
23416         cat >> confdefs.h <<\EOF
23417 #define snprintf _snprintf
23418 EOF
23419
23420
23421 else
23422   echo "$ac_t""no" 1>&6
23423 fi
23424
23425
23426 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
23427 echo "configure:23426: checking for _vsnprintf" >&5
23428 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
23429   echo $ac_n "(cached) $ac_c" 1>&6
23430 else
23431   cat > conftest.$ac_ext <<EOF
23432 #line 23431 "configure"
23433 #include "confdefs.h"
23434 /* System header to define __stub macros and hopefully few prototypes,
23435     which can conflict with char _vsnprintf(); below.  */
23436 #include <assert.h>
23437 /* Override any gcc2 internal prototype to avoid an error.  */
23438 /* We use char because int might match the return type of a gcc2
23439     builtin and then its argument prototype would still apply.  */
23440 char _vsnprintf();
23441 char (*f)();
23442
23443 int main() {
23444
23445 /* The GNU C library defines this for functions which it implements
23446     to always fail with ENOSYS.  Some functions are actually named
23447     something starting with __ and the normal name is an alias.  */
23448 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
23449 choke me
23450 #else
23451 f = _vsnprintf;
23452 #endif
23453
23454 ; return 0; }
23455 EOF
23456 if { (eval echo configure:23455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23457   rm -rf conftest*
23458   eval "ac_cv_func__vsnprintf=yes"
23459 else
23460   echo "configure: failed program was:" >&5
23461   cat conftest.$ac_ext >&5
23462   rm -rf conftest*
23463   eval "ac_cv_func__vsnprintf=no"
23464 fi
23465 rm -f conftest*
23466 fi
23467
23468 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
23469   echo "$ac_t""yes" 1>&6
23470   ac_cv_func_vsnprintf=yes
23471         cat >> confdefs.h <<\EOF
23472 #define vsnprintf _vsnprintf
23473 EOF
23474
23475
23476 else
23477   echo "$ac_t""no" 1>&6
23478 fi
23479
23480
23481 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
23482 echo "configure:23481: checking for vprintf" >&5
23483 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23484   echo $ac_n "(cached) $ac_c" 1>&6
23485 else
23486   cat > conftest.$ac_ext <<EOF
23487 #line 23486 "configure"
23488 #include "confdefs.h"
23489 /* System header to define __stub macros and hopefully few prototypes,
23490     which can conflict with char vprintf(); below.  */
23491 #include <assert.h>
23492 /* Override any gcc2 internal prototype to avoid an error.  */
23493 /* We use char because int might match the return type of a gcc2
23494     builtin and then its argument prototype would still apply.  */
23495 char vprintf();
23496 char (*f)();
23497
23498 int main() {
23499
23500 /* The GNU C library defines this for functions which it implements
23501     to always fail with ENOSYS.  Some functions are actually named
23502     something starting with __ and the normal name is an alias.  */
23503 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23504 choke me
23505 #else
23506 f = vprintf;
23507 #endif
23508
23509 ; return 0; }
23510 EOF
23511 if { (eval echo configure:23510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23512   rm -rf conftest*
23513   eval "ac_cv_func_vprintf=yes"
23514 else
23515   echo "configure: failed program was:" >&5
23516   cat conftest.$ac_ext >&5
23517   rm -rf conftest*
23518   eval "ac_cv_func_vprintf=no"
23519 fi
23520 rm -f conftest*
23521 fi
23522
23523 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23524   echo "$ac_t""yes" 1>&6
23525   cat >> confdefs.h <<\EOF
23526 #define HAVE_VPRINTF 1
23527 EOF
23528
23529 else
23530   echo "$ac_t""no" 1>&6
23531 fi
23532
23533 if test "$ac_cv_func_vprintf" != yes; then
23534 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23535 echo "configure:23534: checking for _doprnt" >&5
23536 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23537   echo $ac_n "(cached) $ac_c" 1>&6
23538 else
23539   cat > conftest.$ac_ext <<EOF
23540 #line 23539 "configure"
23541 #include "confdefs.h"
23542 /* System header to define __stub macros and hopefully few prototypes,
23543     which can conflict with char _doprnt(); below.  */
23544 #include <assert.h>
23545 /* Override any gcc2 internal prototype to avoid an error.  */
23546 /* We use char because int might match the return type of a gcc2
23547     builtin and then its argument prototype would still apply.  */
23548 char _doprnt();
23549 char (*f)();
23550
23551 int main() {
23552
23553 /* The GNU C library defines this for functions which it implements
23554     to always fail with ENOSYS.  Some functions are actually named
23555     something starting with __ and the normal name is an alias.  */
23556 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23557 choke me
23558 #else
23559 f = _doprnt;
23560 #endif
23561
23562 ; return 0; }
23563 EOF
23564 if { (eval echo configure:23563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23565   rm -rf conftest*
23566   eval "ac_cv_func__doprnt=yes"
23567 else
23568   echo "configure: failed program was:" >&5
23569   cat conftest.$ac_ext >&5
23570   rm -rf conftest*
23571   eval "ac_cv_func__doprnt=no"
23572 fi
23573 rm -f conftest*
23574 fi
23575
23576 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23577   echo "$ac_t""yes" 1>&6
23578   cat >> confdefs.h <<\EOF
23579 #define HAVE_DOPRNT 1
23580 EOF
23581
23582 else
23583   echo "$ac_t""no" 1>&6
23584 fi
23585
23586 fi
23587
23588
23589 if test $ac_cv_func_vprintf = yes ; then
23590                 for ac_func in snprintf vsnprintf
23591 do
23592 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23593 echo "configure:23592: checking for $ac_func" >&5
23594 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23595   echo $ac_n "(cached) $ac_c" 1>&6
23596 else
23597   cat > conftest.$ac_ext <<EOF
23598 #line 23597 "configure"
23599 #include "confdefs.h"
23600 /* System header to define __stub macros and hopefully few prototypes,
23601     which can conflict with char $ac_func(); below.  */
23602 #include <assert.h>
23603 /* Override any gcc2 internal prototype to avoid an error.  */
23604 /* We use char because int might match the return type of a gcc2
23605     builtin and then its argument prototype would still apply.  */
23606 char $ac_func();
23607 char (*f)();
23608
23609 int main() {
23610
23611 /* The GNU C library defines this for functions which it implements
23612     to always fail with ENOSYS.  Some functions are actually named
23613     something starting with __ and the normal name is an alias.  */
23614 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23615 choke me
23616 #else
23617 f = $ac_func;
23618 #endif
23619
23620 ; return 0; }
23621 EOF
23622 if { (eval echo configure:23621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23623   rm -rf conftest*
23624   eval "ac_cv_func_$ac_func=yes"
23625 else
23626   echo "configure: failed program was:" >&5
23627   cat conftest.$ac_ext >&5
23628   rm -rf conftest*
23629   eval "ac_cv_func_$ac_func=no"
23630 fi
23631 rm -f conftest*
23632 fi
23633
23634 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23635   echo "$ac_t""yes" 1>&6
23636     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23637   cat >> confdefs.h <<EOF
23638 #define $ac_tr_func 1
23639 EOF
23640  
23641 else
23642   echo "$ac_t""no" 1>&6
23643 fi
23644 done
23645
23646 fi
23647
23648 for ac_func in \
23649         bcopy                   \
23650         closesocket             \
23651         chroot                  \
23652         endgrent                \
23653         endpwent                \
23654         fcntl                   \
23655         flock                   \
23656         fstat                   \
23657         getdtablesize   \
23658         getgrgid                \
23659         gethostname             \
23660         getpass                 \
23661         getpassphrase   \
23662         getpwuid                \
23663         getpwnam                \
23664         getspnam                \
23665         gettimeofday    \
23666         initgroups              \
23667         lockf                   \
23668         memcpy                  \
23669         memmove                 \
23670         mkstemp                 \
23671         mktemp                  \
23672         pipe                    \
23673         read                    \
23674         recv                    \
23675         recvfrom                \
23676         setpwfile               \
23677         setgid                  \
23678         setegid                 \
23679         setsid                  \
23680         setuid                  \
23681         seteuid                 \
23682         sigaction               \
23683         signal                  \
23684         sigset                  \
23685         strdup                  \
23686         strpbrk                 \
23687         strrchr                 \
23688         strsep                  \
23689         strstr                  \
23690         strtol                  \
23691         strtoul                 \
23692         strtoq                  \
23693         strtouq                 \
23694         strtoll                 \
23695         strspn                  \
23696         sysconf                 \
23697         usleep                  \
23698         waitpid                 \
23699         wait4                   \
23700         write                   \
23701         send                    \
23702         sendmsg                 \
23703         sendto                  \
23704
23705 do
23706 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23707 echo "configure:23706: checking for $ac_func" >&5
23708 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23709   echo $ac_n "(cached) $ac_c" 1>&6
23710 else
23711   cat > conftest.$ac_ext <<EOF
23712 #line 23711 "configure"
23713 #include "confdefs.h"
23714 /* System header to define __stub macros and hopefully few prototypes,
23715     which can conflict with char $ac_func(); below.  */
23716 #include <assert.h>
23717 /* Override any gcc2 internal prototype to avoid an error.  */
23718 /* We use char because int might match the return type of a gcc2
23719     builtin and then its argument prototype would still apply.  */
23720 char $ac_func();
23721 char (*f)();
23722
23723 int main() {
23724
23725 /* The GNU C library defines this for functions which it implements
23726     to always fail with ENOSYS.  Some functions are actually named
23727     something starting with __ and the normal name is an alias.  */
23728 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23729 choke me
23730 #else
23731 f = $ac_func;
23732 #endif
23733
23734 ; return 0; }
23735 EOF
23736 if { (eval echo configure:23735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23737   rm -rf conftest*
23738   eval "ac_cv_func_$ac_func=yes"
23739 else
23740   echo "configure: failed program was:" >&5
23741   cat conftest.$ac_ext >&5
23742   rm -rf conftest*
23743   eval "ac_cv_func_$ac_func=no"
23744 fi
23745 rm -f conftest*
23746 fi
23747
23748 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23749   echo "$ac_t""yes" 1>&6
23750     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23751   cat >> confdefs.h <<EOF
23752 #define $ac_tr_func 1
23753 EOF
23754  
23755 else
23756   echo "$ac_t""no" 1>&6
23757 fi
23758 done
23759
23760
23761 for ac_func in getopt getpeereid
23762 do
23763 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23764 echo "configure:23763: checking for $ac_func" >&5
23765 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23766   echo $ac_n "(cached) $ac_c" 1>&6
23767 else
23768   cat > conftest.$ac_ext <<EOF
23769 #line 23768 "configure"
23770 #include "confdefs.h"
23771 /* System header to define __stub macros and hopefully few prototypes,
23772     which can conflict with char $ac_func(); below.  */
23773 #include <assert.h>
23774 /* Override any gcc2 internal prototype to avoid an error.  */
23775 /* We use char because int might match the return type of a gcc2
23776     builtin and then its argument prototype would still apply.  */
23777 char $ac_func();
23778 char (*f)();
23779
23780 int main() {
23781
23782 /* The GNU C library defines this for functions which it implements
23783     to always fail with ENOSYS.  Some functions are actually named
23784     something starting with __ and the normal name is an alias.  */
23785 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23786 choke me
23787 #else
23788 f = $ac_func;
23789 #endif
23790
23791 ; return 0; }
23792 EOF
23793 if { (eval echo configure:23792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23794   rm -rf conftest*
23795   eval "ac_cv_func_$ac_func=yes"
23796 else
23797   echo "configure: failed program was:" >&5
23798   cat conftest.$ac_ext >&5
23799   rm -rf conftest*
23800   eval "ac_cv_func_$ac_func=no"
23801 fi
23802 rm -f conftest*
23803 fi
23804
23805 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23806   echo "$ac_t""yes" 1>&6
23807     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23808   cat >> confdefs.h <<EOF
23809 #define $ac_tr_func 1
23810 EOF
23811  
23812 else
23813   echo "$ac_t""no" 1>&6
23814 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23815 fi
23816 done
23817
23818
23819
23820 if test "$ac_cv_func_getopt" != yes; then
23821         LIBSRCS="$LIBSRCS getopt.c"
23822 fi
23823 if test "$ac_cv_func_getpeereid" != yes; then
23824         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23825 echo "configure:23824: checking for msg_accrights in msghdr" >&5
23826 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23827   echo $ac_n "(cached) $ac_c" 1>&6
23828 else
23829   cat > conftest.$ac_ext <<EOF
23830 #line 23829 "configure"
23831 #include "confdefs.h"
23832 #include <sys/socket.h>
23833 int main() {
23834 struct msghdr m; m.msg_accrightslen=0
23835 ; return 0; }
23836 EOF
23837 if { (eval echo configure:23836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23838   rm -rf conftest*
23839   ol_cv_msghdr_msg_accrights=yes
23840 else
23841   echo "configure: failed program was:" >&5
23842   cat conftest.$ac_ext >&5
23843   rm -rf conftest*
23844   ol_cv_msghdr_msg_accrights=no
23845 fi
23846 rm -f conftest*
23847         
23848 fi
23849
23850 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23851   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23852         cat >> confdefs.h <<\EOF
23853 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23854 EOF
23855
23856   fi
23857
23858         LIBSRCS="$LIBSRCS getpeereid.c"
23859 fi
23860 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23861         if test "$ac_cv_func_snprintf" != yes; then
23862                 cat >> confdefs.h <<\EOF
23863 #define snprintf ber_pvt_snprintf
23864 EOF
23865
23866         fi
23867         if test "$ac_cv_func_vsnprintf" != yes; then
23868                 cat >> confdefs.h <<\EOF
23869 #define vsnprintf ber_pvt_vsnprintf
23870 EOF
23871
23872         fi
23873 fi
23874
23875
23876 if test "$ol_enable_slapi" != no ; then
23877                         for ac_hdr in ltdl.h
23878 do
23879 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23880 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23881 echo "configure:23880: checking for $ac_hdr" >&5
23882 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23883   echo $ac_n "(cached) $ac_c" 1>&6
23884 else
23885   cat > conftest.$ac_ext <<EOF
23886 #line 23885 "configure"
23887 #include "confdefs.h"
23888 #include <$ac_hdr>
23889 EOF
23890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23891 { (eval echo configure:23890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23893 if test -z "$ac_err"; then
23894   rm -rf conftest*
23895   eval "ac_cv_header_$ac_safe=yes"
23896 else
23897   echo "$ac_err" >&5
23898   echo "configure: failed program was:" >&5
23899   cat conftest.$ac_ext >&5
23900   rm -rf conftest*
23901   eval "ac_cv_header_$ac_safe=no"
23902 fi
23903 rm -f conftest*
23904 fi
23905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23906   echo "$ac_t""yes" 1>&6
23907     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23908   cat >> confdefs.h <<EOF
23909 #define $ac_tr_hdr 1
23910 EOF
23911  
23912 else
23913   echo "$ac_t""no" 1>&6
23914 fi
23915 done
23916
23917
23918         if test $ac_cv_header_ltdl_h != yes ; then
23919                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23920         fi
23921         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23922 echo "configure:23921: checking for lt_dlinit in -lltdl" >&5
23923 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23924 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23925   echo $ac_n "(cached) $ac_c" 1>&6
23926 else
23927   ac_save_LIBS="$LIBS"
23928 LIBS="-lltdl  $LIBS"
23929 cat > conftest.$ac_ext <<EOF
23930 #line 23929 "configure"
23931 #include "confdefs.h"
23932 /* Override any gcc2 internal prototype to avoid an error.  */
23933 /* We use char because int might match the return type of a gcc2
23934     builtin and then its argument prototype would still apply.  */
23935 char lt_dlinit();
23936
23937 int main() {
23938 lt_dlinit()
23939 ; return 0; }
23940 EOF
23941 if { (eval echo configure:23940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23942   rm -rf conftest*
23943   eval "ac_cv_lib_$ac_lib_var=yes"
23944 else
23945   echo "configure: failed program was:" >&5
23946   cat conftest.$ac_ext >&5
23947   rm -rf conftest*
23948   eval "ac_cv_lib_$ac_lib_var=no"
23949 fi
23950 rm -f conftest*
23951 LIBS="$ac_save_LIBS"
23952
23953 fi
23954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23955   echo "$ac_t""yes" 1>&6
23956   
23957                 SLAPI_LIBS=-lltdl
23958                 LIBSLAPI=libslapi.a
23959                 LIBSLAPITOOLS=../libslapi.a
23960                 cat >> confdefs.h <<\EOF
23961 #define HAVE_LIBLTDL 1
23962 EOF
23963
23964         
23965 else
23966   echo "$ac_t""no" 1>&6
23967 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23968 fi
23969
23970
23971         cat >> confdefs.h <<\EOF
23972 #define LDAP_SLAPI 1
23973 EOF
23974
23975 fi
23976
23977 if test "$ol_enable_debug" != no ; then
23978         cat >> confdefs.h <<\EOF
23979 #define LDAP_DEBUG 1
23980 EOF
23981
23982 fi
23983 if test "$ol_enable_syslog" = yes ; then
23984         cat >> confdefs.h <<\EOF
23985 #define LDAP_SYSLOG 1
23986 EOF
23987
23988 fi
23989 if test "$ol_link_kbind" != no ; then
23990         cat >> confdefs.h <<\EOF
23991 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23992 EOF
23993
23994 fi
23995 if test "$ol_enable_proctitle" != no ; then
23996         cat >> confdefs.h <<\EOF
23997 #define LDAP_PROCTITLE 1
23998 EOF
23999
24000 fi
24001 if test "$ol_enable_referrals" != no ; then
24002         cat >> confdefs.h <<\EOF
24003 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24004 EOF
24005
24006 fi
24007 if test "$ol_enable_local" != no; then
24008         cat >> confdefs.h <<\EOF
24009 #define LDAP_PF_LOCAL 1
24010 EOF
24011
24012 fi
24013 if test "$ol_link_ipv6" != no; then
24014         cat >> confdefs.h <<\EOF
24015 #define LDAP_PF_INET6 1
24016 EOF
24017
24018 fi
24019 if test "$ol_enable_cleartext" != no ; then
24020         cat >> confdefs.h <<\EOF
24021 #define SLAPD_CLEARTEXT 1
24022 EOF
24023
24024 fi
24025 if test "$ol_enable_crypt" != no ; then
24026         cat >> confdefs.h <<\EOF
24027 #define SLAPD_CRYPT 1
24028 EOF
24029
24030 fi
24031 if test "$ol_link_spasswd" != no ; then
24032         cat >> confdefs.h <<\EOF
24033 #define SLAPD_SPASSWD 1
24034 EOF
24035
24036 fi
24037 if test "$ol_enable_multimaster" != no ; then
24038         cat >> confdefs.h <<\EOF
24039 #define SLAPD_MULTIMASTER 1
24040 EOF
24041
24042 fi
24043 if test "$ol_enable_rlookups" != no ; then
24044         cat >> confdefs.h <<\EOF
24045 #define SLAPD_RLOOKUPS 1
24046 EOF
24047
24048 fi
24049 if test "$ol_enable_aci" != no ; then
24050         cat >> confdefs.h <<\EOF
24051 #define SLAPD_ACI_ENABLED 1
24052 EOF
24053
24054 fi
24055
24056 WITH_MODULES_ENABLED=no
24057 if test "$ol_link_modules" != no ; then
24058         cat >> confdefs.h <<\EOF
24059 #define SLAPD_MODULES 1
24060 EOF
24061
24062         BUILD_SLAPD=yes
24063         SLAPD_MODULES_LDFLAGS="-dlopen self"
24064         WITH_MODULES_ENABLED=yes
24065 fi
24066
24067 cat >> confdefs.h <<\EOF
24068 #define SLAPD_MOD_STATIC 1
24069 EOF
24070
24071 cat >> confdefs.h <<\EOF
24072 #define SLAPD_MOD_DYNAMIC 2
24073 EOF
24074
24075
24076 if test "$ol_enable_bdb" != no ; then
24077         BUILD_SLAPD=yes
24078         BUILD_BDB=$ol_enable_bdb
24079         if test "$ol_enable_bdb" = mod ; then
24080                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24081                 MFLAG=SLAPD_MOD_DYNAMIC
24082         else
24083                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24084                 MFLAG=SLAPD_MOD_STATIC
24085         fi
24086         cat >> confdefs.h <<EOF
24087 #define SLAPD_BDB $MFLAG
24088 EOF
24089
24090 fi
24091
24092 if test "$ol_enable_dnssrv" != no ; then
24093         BUILD_SLAPD=yes
24094         BUILD_DNSSRV=$ol_enable_dnssrv
24095         if test "$ol_enable_dnssrv" = mod ; then
24096                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24097                 MFLAG=SLAPD_MOD_DYNAMIC
24098         else
24099                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24100                 MFLAG=SLAPD_MOD_STATIC
24101         fi
24102         cat >> confdefs.h <<EOF
24103 #define SLAPD_DNSSRV $MFLAG
24104 EOF
24105
24106 fi
24107
24108 if test "$ol_enable_hdb" != no ; then
24109         BUILD_SLAPD=yes
24110         BUILD_HDB=$ol_enable_hdb
24111         if test "$ol_enable_hdb" = mod ; then
24112                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24113                 MFLAG=SLAPD_MOD_DYNAMIC
24114         else
24115                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24116                 MFLAG=SLAPD_MOD_STATIC
24117         fi
24118         cat >> confdefs.h <<EOF
24119 #define SLAPD_HDB $MFLAG
24120 EOF
24121
24122 fi
24123
24124 if test "$ol_enable_ldap" != no ; then
24125         BUILD_SLAPD=yes
24126         BUILD_LDAP=$ol_enable_ldap
24127         if test "$ol_enable_ldap" = mod ; then
24128                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24129                 MFLAG=SLAPD_MOD_DYNAMIC
24130         else
24131                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24132                 MFLAG=SLAPD_MOD_STATIC
24133         fi
24134         cat >> confdefs.h <<EOF
24135 #define SLAPD_LDAP $MFLAG
24136 EOF
24137
24138 fi
24139
24140 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
24141         BUILD_SLAPD=yes
24142         BUILD_LDBM=$ol_enable_ldbm
24143         if test "$ol_enable_ldbm" = mod ; then
24144                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
24145                 MFLAG=SLAPD_MOD_DYNAMIC
24146         else
24147                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24148                 MFLAG=SLAPD_MOD_STATIC
24149         fi
24150         cat >> confdefs.h <<EOF
24151 #define SLAPD_LDBM $MFLAG
24152 EOF
24153
24154 fi
24155
24156 if test "$ol_enable_meta" != no ; then
24157         BUILD_SLAPD=yes
24158         BUILD_META=$ol_enable_meta
24159         BUILD_REWRITE=yes
24160         if test "$ol_enable_meta" = mod ; then
24161                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24162                 MFLAG=SLAPD_MOD_DYNAMIC
24163         else
24164                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24165                 MFLAG=SLAPD_MOD_STATIC
24166         fi
24167         cat >> confdefs.h <<EOF
24168 #define SLAPD_META $MFLAG
24169 EOF
24170
24171 fi
24172
24173 if test "$ol_enable_monitor" != no ; then
24174         BUILD_SLAPD=yes
24175         BUILD_MONITOR=$ol_enable_monitor
24176         if test "$ol_enable_monitor" = mod ; then
24177                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24178                 MFLAG=SLAPD_MOD_DYNAMIC
24179         else
24180                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24181                 MFLAG=SLAPD_MOD_STATIC
24182         fi
24183         cat >> confdefs.h <<EOF
24184 #define SLAPD_MONITOR $MFLAG
24185 EOF
24186
24187 fi
24188
24189 if test "$ol_enable_null" != no ; then
24190         BUILD_SLAPD=yes
24191         BUILD_NULL=$ol_enable_null
24192         if test "$ol_enable_null" = mod ; then
24193                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24194                 MFLAG=SLAPD_MOD_DYNAMIC
24195         else
24196                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24197                 MFLAG=SLAPD_MOD_STATIC
24198         fi
24199         cat >> confdefs.h <<EOF
24200 #define SLAPD_NULL $MFLAG
24201 EOF
24202
24203 fi
24204
24205 if test "$ol_enable_passwd" != no ; then
24206         BUILD_SLAPD=yes
24207         BUILD_PASSWD=$ol_enable_passwd
24208         if test "$ol_enable_passwd" = mod ; then
24209                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24210                 MFLAG=SLAPD_MOD_DYNAMIC
24211         else
24212                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24213                 MFLAG=SLAPD_MOD_STATIC
24214         fi
24215         cat >> confdefs.h <<EOF
24216 #define SLAPD_PASSWD $MFLAG
24217 EOF
24218
24219 fi
24220
24221 if test "$ol_link_perl" != no ; then
24222         BUILD_SLAPD=yes
24223         BUILD_PERL=$ol_enable_perl
24224         if test "$ol_enable_perl" = mod ; then
24225                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24226                 MFLAG=SLAPD_MOD_DYNAMIC
24227         else
24228                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24229                 MFLAG=SLAPD_MOD_STATIC
24230         fi
24231         cat >> confdefs.h <<EOF
24232 #define SLAPD_PERL $MFLAG
24233 EOF
24234
24235 fi
24236
24237 if test "$ol_enable_relay" != no ; then
24238         BUILD_SLAPD=yes
24239         BUILD_RELAY=$ol_enable_relay
24240         if test "$ol_enable_relay" = mod ; then
24241                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
24242                 MFLAG=SLAPD_MOD_DYNAMIC
24243         else
24244                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
24245                 MFLAG=SLAPD_MOD_STATIC
24246         fi
24247         cat >> confdefs.h <<EOF
24248 #define SLAPD_RELAY $MFLAG
24249 EOF
24250
24251 fi
24252
24253 if test "$ol_enable_shell" != no ; then
24254         if test "$ol_link_thread" != no ; then
24255                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
24256         fi
24257         BUILD_SLAPD=yes
24258         BUILD_SHELL=$ol_enable_shell
24259         if test "$ol_enable_shell" = mod ; then
24260                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24261                 MFLAG=SLAPD_MOD_DYNAMIC
24262         else
24263                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24264                 MFLAG=SLAPD_MOD_STATIC
24265         fi
24266         cat >> confdefs.h <<EOF
24267 #define SLAPD_SHELL $MFLAG
24268 EOF
24269
24270 fi
24271
24272 if test "$ol_link_sql" != no ; then
24273         BUILD_SLAPD=yes
24274         BUILD_SQL=$ol_enable_sql
24275         if test "$ol_enable_sql" = mod; then
24276                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24277                 MFLAG=SLAPD_MOD_DYNAMIC
24278         else
24279                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24280                 MFLAG=SLAPD_MOD_STATIC
24281         fi
24282         cat >> confdefs.h <<EOF
24283 #define SLAPD_SQL $MFLAG
24284 EOF
24285
24286 fi
24287
24288 if test "$ol_enable_chain" != no ; then
24289         BUILD_CHAIN=$ol_enable_chain
24290         if test "$ol_enable_chain" = mod ; then
24291                 MFLAG=SLAPD_MOD_DYNAMIC
24292                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
24293         else
24294                 MFLAG=SLAPD_MOD_STATIC
24295         fi
24296         cat >> confdefs.h <<EOF
24297 #define SLAPD_OVER_CHAIN $MFLAG
24298 EOF
24299
24300 fi
24301
24302 if test "$ol_enable_denyop" != no ; then
24303         BUILD_DENYOP=$ol_enable_denyop
24304         if test "$ol_enable_denyop" = mod ; then
24305                 MFLAG=SLAPD_MOD_DYNAMIC
24306                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
24307         else
24308                 MFLAG=SLAPD_MOD_STATIC
24309         fi
24310         cat >> confdefs.h <<EOF
24311 #define SLAPD_OVER_DENYOP $MFLAG
24312 EOF
24313
24314 fi
24315
24316 if test "$ol_enable_dyngroup" != no ; then
24317         BUILD_DYNGROUP=$ol_enable_dyngroup
24318         if test "$ol_enable_dyngroup" = mod ; then
24319                 MFLAG=SLAPD_MOD_DYNAMIC
24320                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24321         else
24322                 MFLAG=SLAPD_MOD_STATIC
24323         fi
24324         cat >> confdefs.h <<EOF
24325 #define SLAPD_OVER_DYNGROUP $MFLAG
24326 EOF
24327
24328 fi
24329
24330 if test "$ol_enable_lastmod" != no ; then
24331         BUILD_LASTMOD=$ol_enable_lastmod
24332         if test "$ol_enable_lastmod" = mod ; then
24333                 MFLAG=SLAPD_MOD_DYNAMIC
24334                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
24335         else
24336                 MFLAG=SLAPD_MOD_STATIC
24337         fi
24338         cat >> confdefs.h <<EOF
24339 #define SLAPD_OVER_LASTMOD $MFLAG
24340 EOF
24341
24342 fi
24343
24344 if test "$ol_enable_ppolicy" != no ; then
24345         BUILD_PPOLICY=$ol_enable_ppolicy
24346         if test "$ol_enable_ppolicy" = mod ; then
24347                 MFLAG=SLAPD_MOD_DYNAMIC
24348                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24349         else
24350                 MFLAG=SLAPD_MOD_STATIC
24351         fi
24352         cat >> confdefs.h <<EOF
24353 #define SLAPD_OVER_PPOLICY $MFLAG
24354 EOF
24355
24356 fi
24357
24358 if test "$ol_enable_proxycache" != no ; then
24359         BUILD_PROXYCACHE=$ol_enable_proxycache
24360         if test "$ol_enable_proxycache" = mod ; then
24361                 MFLAG=SLAPD_MOD_DYNAMIC
24362                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24363         else
24364                 MFLAG=SLAPD_MOD_STATIC
24365         fi
24366         cat >> confdefs.h <<EOF
24367 #define SLAPD_OVER_PROXYCACHE $MFLAG
24368 EOF
24369
24370 fi
24371
24372 if test "$ol_enable_refint" != no ; then
24373         BUILD_REFINT=$ol_enable_refint
24374         if test "$ol_enable_refint" = mod ; then
24375                 MFLAG=SLAPD_MOD_DYNAMIC
24376                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24377         else
24378                 MFLAG=SLAPD_MOD_STATIC
24379         fi
24380         cat >> confdefs.h <<EOF
24381 #define SLAPD_OVER_REFINT $MFLAG
24382 EOF
24383
24384 fi
24385
24386 if test "$ol_enable_rwm" != no ; then
24387         BUILD_REWRITE=yes
24388         BUILD_RWM=$ol_enable_rwm
24389         if test "$ol_enable_rwm" = mod ; then
24390                 MFLAG=SLAPD_MOD_DYNAMIC
24391                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24392         else
24393                 MFLAG=SLAPD_MOD_STATIC
24394         fi
24395         cat >> confdefs.h <<EOF
24396 #define SLAPD_OVER_RWM $MFLAG
24397 EOF
24398
24399 fi
24400
24401 if test "$ol_enable_unique" != no ; then
24402         BUILD_UNIQUE=$ol_enable_unique
24403         if test "$ol_enable_unique" = mod ; then
24404                 MFLAG=SLAPD_MOD_DYNAMIC
24405                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
24406         else
24407                 MFLAG=SLAPD_MOD_STATIC
24408         fi
24409         cat >> confdefs.h <<EOF
24410 #define SLAPD_OVER_UNIQUE $MFLAG
24411 EOF
24412
24413 fi
24414
24415 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
24416         $BUILD_SLAPD = yes ; then
24417         BUILD_SLURPD=yes
24418 fi
24419
24420 if test "$ol_enable_rewrite" != no ; then
24421         cat >> confdefs.h <<\EOF
24422 #define ENABLE_REWRITE 1
24423 EOF
24424
24425         BUILD_REWRITE=yes
24426 fi
24427
24428 if test "$ol_enable_slapi" != no ; then
24429         cat >> confdefs.h <<\EOF
24430 #define ENABLE_SLAPI 1
24431 EOF
24432
24433         BUILD_SLAPI=yes
24434         SLAPD_SLAPI_DEPEND=libslapi.a
24435 fi
24436
24437
24438
24439 if test "$ac_cv_mingw32" = yes ; then
24440         PLAT=NT
24441         SLAPD_MODULES_LDFLAGS=
24442 else
24443         PLAT=UNIX
24444 fi
24445
24446 if test -z "$SLAPD_STATIC_BACKENDS"; then
24447         SLAPD_NO_STATIC='#'
24448 else
24449         SLAPD_NO_STATIC=
24450 fi
24451
24452
24453
24454
24455
24456
24457
24458
24459   
24460   
24461   
24462   
24463   
24464   
24465   
24466   
24467   
24468   
24469   
24470   
24471   
24472   
24473   
24474   
24475   
24476   
24477   
24478   
24479   
24480   
24481   
24482   
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
24498
24499
24500
24501
24502
24503
24504
24505
24506
24507
24508
24509
24510
24511
24512
24513
24514
24515
24516
24517
24518
24519
24520
24521
24522 # Check whether --with-xxinstall or --without-xxinstall was given.
24523 if test "${with_xxinstall+set}" = set; then
24524   withval="$with_xxinstall"
24525   :
24526 fi
24527
24528
24529
24530 trap '' 1 2 15
24531
24532 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24533
24534 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24535 # Let make expand exec_prefix.
24536 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24537
24538 # Any assignment to VPATH causes Sun make to only execute
24539 # the first set of double-colon rules, so remove it if not needed.
24540 # If there is a colon in the path, we need to keep it.
24541 if test "x$srcdir" = x.; then
24542   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24543 fi
24544
24545 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24546
24547 DEFS=-DHAVE_CONFIG_H
24548
24549 # Without the "./", some shells look in PATH for config.status.
24550 : ${CONFIG_STATUS=./config.status}
24551
24552 echo creating $CONFIG_STATUS
24553 rm -f $CONFIG_STATUS
24554 cat > $CONFIG_STATUS <<EOF
24555 #! /bin/sh
24556 # Generated automatically by configure.
24557 # Run this file to recreate the current configuration.
24558 # This directory was configured as follows,
24559 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24560 #
24561 # $0 $ac_configure_args
24562 #
24563 # Compiler output produced by configure, useful for debugging
24564 # configure, is in ./config.log if it exists.
24565
24566 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24567 for ac_option
24568 do
24569   case "\$ac_option" in
24570   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24571     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24572     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24573   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24574     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24575     exit 0 ;;
24576   -help | --help | --hel | --he | --h)
24577     echo "\$ac_cs_usage"; exit 0 ;;
24578   *) echo "\$ac_cs_usage"; exit 1 ;;
24579   esac
24580 done
24581
24582 ac_given_srcdir=$srcdir
24583 ac_given_INSTALL="$INSTALL"
24584
24585 trap 'rm -fr `echo "\
24586 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24587 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24588 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24589 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24590 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24591 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24592 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24593 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24594 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24595 include/Makefile:build/top.mk:include/Makefile.in \
24596 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24597 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24598 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24599 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24600 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24601 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24602 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24603 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24604 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24605 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24606 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24607 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24608 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24609 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24610 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24611 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24612 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24613 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24614 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24615 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24616 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24617 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24618 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24619 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24620 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24621 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24622 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24623 tests/run \
24624 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24625  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24626 EOF
24627 cat >> $CONFIG_STATUS <<EOF
24628
24629 # Protect against being on the right side of a sed subst in config.status.
24630 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24631  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24632 $ac_vpsub
24633 $extrasub
24634 s%@SHELL@%$SHELL%g
24635 s%@CFLAGS@%$CFLAGS%g
24636 s%@CPPFLAGS@%$CPPFLAGS%g
24637 s%@CXXFLAGS@%$CXXFLAGS%g
24638 s%@FFLAGS@%$FFLAGS%g
24639 s%@DEFS@%$DEFS%g
24640 s%@LDFLAGS@%$LDFLAGS%g
24641 s%@LIBS@%$LIBS%g
24642 s%@exec_prefix@%$exec_prefix%g
24643 s%@prefix@%$prefix%g
24644 s%@program_transform_name@%$program_transform_name%g
24645 s%@bindir@%$bindir%g
24646 s%@sbindir@%$sbindir%g
24647 s%@libexecdir@%$libexecdir%g
24648 s%@datadir@%$datadir%g
24649 s%@sysconfdir@%$sysconfdir%g
24650 s%@sharedstatedir@%$sharedstatedir%g
24651 s%@localstatedir@%$localstatedir%g
24652 s%@libdir@%$libdir%g
24653 s%@includedir@%$includedir%g
24654 s%@oldincludedir@%$oldincludedir%g
24655 s%@infodir@%$infodir%g
24656 s%@mandir@%$mandir%g
24657 s%@host@%$host%g
24658 s%@host_alias@%$host_alias%g
24659 s%@host_cpu@%$host_cpu%g
24660 s%@host_vendor@%$host_vendor%g
24661 s%@host_os@%$host_os%g
24662 s%@target@%$target%g
24663 s%@target_alias@%$target_alias%g
24664 s%@target_cpu@%$target_cpu%g
24665 s%@target_vendor@%$target_vendor%g
24666 s%@target_os@%$target_os%g
24667 s%@build@%$build%g
24668 s%@build_alias@%$build_alias%g
24669 s%@build_cpu@%$build_cpu%g
24670 s%@build_vendor@%$build_vendor%g
24671 s%@build_os@%$build_os%g
24672 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24673 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24674 s%@INSTALL_DATA@%$INSTALL_DATA%g
24675 s%@PACKAGE@%$PACKAGE%g
24676 s%@VERSION@%$VERSION%g
24677 s%@ACLOCAL@%$ACLOCAL%g
24678 s%@AUTOCONF@%$AUTOCONF%g
24679 s%@AUTOMAKE@%$AUTOMAKE%g
24680 s%@AUTOHEADER@%$AUTOHEADER%g
24681 s%@MAKEINFO@%$MAKEINFO%g
24682 s%@install_sh@%$install_sh%g
24683 s%@AMTAR@%$AMTAR%g
24684 s%@AWK@%$AWK%g
24685 s%@AMTARFLAGS@%$AMTARFLAGS%g
24686 s%@SET_MAKE@%$SET_MAKE%g
24687 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24688 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24689 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24690 s%@top_builddir@%$top_builddir%g
24691 s%@ldap_subdir@%$ldap_subdir%g
24692 s%@CC@%$CC%g
24693 s%@AR@%$AR%g
24694 s%@LN_S@%$LN_S%g
24695 s%@OBJEXT@%$OBJEXT%g
24696 s%@EXEEXT@%$EXEEXT%g
24697 s%@ECHO@%$ECHO%g
24698 s%@RANLIB@%$RANLIB%g
24699 s%@STRIP@%$STRIP%g
24700 s%@DLLTOOL@%$DLLTOOL%g
24701 s%@AS@%$AS%g
24702 s%@OBJDUMP@%$OBJDUMP%g
24703 s%@CPP@%$CPP%g
24704 s%@LIBTOOL@%$LIBTOOL%g
24705 s%@PERLBIN@%$PERLBIN%g
24706 s%@OL_MKDEP@%$OL_MKDEP%g
24707 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24708 s%@LTSTATIC@%$LTSTATIC%g
24709 s%@LIBOBJS@%$LIBOBJS%g
24710 s%@LIBSRCS@%$LIBSRCS%g
24711 s%@PLAT@%$PLAT%g
24712 s%@WITH_SASL@%$WITH_SASL%g
24713 s%@WITH_TLS@%$WITH_TLS%g
24714 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
24715 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24716 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24717 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24718 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24719 s%@BUILD_BDB@%$BUILD_BDB%g
24720 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24721 s%@BUILD_HDB@%$BUILD_HDB%g
24722 s%@BUILD_LDAP@%$BUILD_LDAP%g
24723 s%@BUILD_LDBM@%$BUILD_LDBM%g
24724 s%@BUILD_META@%$BUILD_META%g
24725 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24726 s%@BUILD_NULL@%$BUILD_NULL%g
24727 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24728 s%@BUILD_RELAY@%$BUILD_RELAY%g
24729 s%@BUILD_PERL@%$BUILD_PERL%g
24730 s%@BUILD_SHELL@%$BUILD_SHELL%g
24731 s%@BUILD_SQL@%$BUILD_SQL%g
24732 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
24733 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
24734 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24735 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
24736 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
24737 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24738 s%@BUILD_REFINT@%$BUILD_REFINT%g
24739 s%@BUILD_RWM@%$BUILD_RWM%g
24740 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
24741 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24742 s%@LDAP_LIBS@%$LDAP_LIBS%g
24743 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24744 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24745 s%@LDBM_LIBS@%$LDBM_LIBS%g
24746 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24747 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24748 s%@WRAP_LIBS@%$WRAP_LIBS%g
24749 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24750 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24751 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24752 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24753 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24754 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24755 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24756 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24757 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24758 s%@KRB4_LIBS@%$KRB4_LIBS%g
24759 s%@KRB5_LIBS@%$KRB5_LIBS%g
24760 s%@SASL_LIBS@%$SASL_LIBS%g
24761 s%@TLS_LIBS@%$TLS_LIBS%g
24762 s%@MODULES_LIBS@%$MODULES_LIBS%g
24763 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24764 s%@LIBSLAPI@%$LIBSLAPI%g
24765 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24766 s%@AUTH_LIBS@%$AUTH_LIBS%g
24767 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24768 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
24769 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24770 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24771 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24772
24773 CEOF
24774 EOF
24775
24776 cat >> $CONFIG_STATUS <<\EOF
24777
24778 # Split the substitutions into bite-sized pieces for seds with
24779 # small command number limits, like on Digital OSF/1 and HP-UX.
24780 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24781 ac_file=1 # Number of current file.
24782 ac_beg=1 # First line for current file.
24783 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24784 ac_more_lines=:
24785 ac_sed_cmds=""
24786 while $ac_more_lines; do
24787   if test $ac_beg -gt 1; then
24788     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24789   else
24790     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24791   fi
24792   if test ! -s conftest.s$ac_file; then
24793     ac_more_lines=false
24794     rm -f conftest.s$ac_file
24795   else
24796     if test -z "$ac_sed_cmds"; then
24797       ac_sed_cmds="sed -f conftest.s$ac_file"
24798     else
24799       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24800     fi
24801     ac_file=`expr $ac_file + 1`
24802     ac_beg=$ac_end
24803     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24804   fi
24805 done
24806 if test -z "$ac_sed_cmds"; then
24807   ac_sed_cmds=cat
24808 fi
24809 EOF
24810
24811 cat >> $CONFIG_STATUS <<EOF
24812
24813 CONFIG_FILES=\${CONFIG_FILES-"\
24814 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24815 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24816 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24817 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24818 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24819 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24820 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24821 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24822 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24823 include/Makefile:build/top.mk:include/Makefile.in \
24824 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24825 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24826 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24827 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24828 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24829 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24830 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24831 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24832 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24833 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24834 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24835 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24836 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24837 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24838 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24839 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24840 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24841 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24842 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24843 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24844 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24845 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24846 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24847 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24848 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24849 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24850 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24851 tests/run \
24852 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24853 "}
24854 EOF
24855 cat >> $CONFIG_STATUS <<\EOF
24856 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24857   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24858   case "$ac_file" in
24859   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24860        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24861   *) ac_file_in="${ac_file}.in" ;;
24862   esac
24863
24864   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24865
24866   # Remove last slash and all that follows it.  Not all systems have dirname.
24867   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24868   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24869     # The file is in a subdirectory.
24870     test ! -d "$ac_dir" && mkdir "$ac_dir"
24871     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24872     # A "../" for each directory in $ac_dir_suffix.
24873     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24874   else
24875     ac_dir_suffix= ac_dots=
24876   fi
24877
24878   case "$ac_given_srcdir" in
24879   .)  srcdir=.
24880       if test -z "$ac_dots"; then top_srcdir=.
24881       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24882   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24883   *) # Relative path.
24884     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24885     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24886   esac
24887
24888   case "$ac_given_INSTALL" in
24889   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24890   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24891   esac
24892
24893   echo creating "$ac_file"
24894   rm -f "$ac_file"
24895   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24896   case "$ac_file" in
24897   *[Mm]akefile*) ac_comsub="1i\\
24898 # $configure_input" ;;
24899   *) ac_comsub= ;;
24900   esac
24901
24902   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24903   sed -e "$ac_comsub
24904 s%@configure_input@%$configure_input%g
24905 s%@srcdir@%$srcdir%g
24906 s%@top_srcdir@%$top_srcdir%g
24907 s%@INSTALL@%$INSTALL%g
24908 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24909 fi; done
24910 rm -f conftest.s*
24911
24912 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24913 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24914 #
24915 # ac_d sets the value in "#define NAME VALUE" lines.
24916 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24917 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24918 ac_dC='\3'
24919 ac_dD='%g'
24920 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24921 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24922 ac_uB='\([      ]\)%\1#\2define\3'
24923 ac_uC=' '
24924 ac_uD='\4%g'
24925 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24926 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24927 ac_eB='$%\1#\2define\3'
24928 ac_eC=' '
24929 ac_eD='%g'
24930
24931 if test "${CONFIG_HEADERS+set}" != set; then
24932 EOF
24933 cat >> $CONFIG_STATUS <<EOF
24934   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24935 EOF
24936 cat >> $CONFIG_STATUS <<\EOF
24937 fi
24938 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24939   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24940   case "$ac_file" in
24941   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24942        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24943   *) ac_file_in="${ac_file}.in" ;;
24944   esac
24945
24946   echo creating $ac_file
24947
24948   rm -f conftest.frag conftest.in conftest.out
24949   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24950   cat $ac_file_inputs > conftest.in
24951
24952 EOF
24953
24954 # Transform confdefs.h into a sed script conftest.vals that substitutes
24955 # the proper values into config.h.in to produce config.h.  And first:
24956 # Protect against being on the right side of a sed subst in config.status.
24957 # Protect against being in an unquoted here document in config.status.
24958 rm -f conftest.vals
24959 cat > conftest.hdr <<\EOF
24960 s/[\\&%]/\\&/g
24961 s%[\\$`]%\\&%g
24962 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24963 s%ac_d%ac_u%gp
24964 s%ac_u%ac_e%gp
24965 EOF
24966 sed -n -f conftest.hdr confdefs.h > conftest.vals
24967 rm -f conftest.hdr
24968
24969 # This sed command replaces #undef with comments.  This is necessary, for
24970 # example, in the case of _POSIX_SOURCE, which is predefined and required
24971 # on some systems where configure will not decide to define it.
24972 cat >> conftest.vals <<\EOF
24973 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24974 EOF
24975
24976 # Break up conftest.vals because some shells have a limit on
24977 # the size of here documents, and old seds have small limits too.
24978
24979 rm -f conftest.tail
24980 while :
24981 do
24982   ac_lines=`grep -c . conftest.vals`
24983   # grep -c gives empty output for an empty file on some AIX systems.
24984   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24985   # Write a limited-size here document to conftest.frag.
24986   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24987   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24988   echo 'CEOF
24989   sed -f conftest.frag conftest.in > conftest.out
24990   rm -f conftest.in
24991   mv conftest.out conftest.in
24992 ' >> $CONFIG_STATUS
24993   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24994   rm -f conftest.vals
24995   mv conftest.tail conftest.vals
24996 done
24997 rm -f conftest.vals
24998
24999 cat >> $CONFIG_STATUS <<\EOF
25000   rm -f conftest.frag conftest.h
25001   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25002   cat conftest.in >> conftest.h
25003   rm -f conftest.in
25004   if cmp -s $ac_file conftest.h 2>/dev/null; then
25005     echo "$ac_file is unchanged"
25006     rm -f conftest.h
25007   else
25008     # Remove last slash and all that follows it.  Not all systems have dirname.
25009       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25010       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25011       # The file is in a subdirectory.
25012       test ! -d "$ac_dir" && mkdir "$ac_dir"
25013     fi
25014     rm -f $ac_file
25015     mv conftest.h $ac_file
25016   fi
25017 fi; done
25018
25019 EOF
25020 cat >> $CONFIG_STATUS <<EOF
25021
25022 EOF
25023 cat >> $CONFIG_STATUS <<\EOF
25024
25025 chmod +x tests/run
25026 date > stamp-h
25027 echo Please run \"make depend\" to build dependencies
25028
25029 exit 0
25030 EOF
25031 chmod +x $CONFIG_STATUS
25032 rm -fr confdefs* $ac_clean_files
25033 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
25034