]> git.sur5r.net Git - openldap/blob - configure
68099c9ed4e38cb3a6b6da38f4b19baaacbd696a
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.510 2004/01/15 06:08:07 hyc 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   --enable-x-compile      enable cross compiling [no]"
49 ac_help="$ac_help
50   --with-cyrus-sasl       with Cyrus SASL support [auto]"
51 ac_help="$ac_help
52   --with-fetch            with fetch(3) URL support [auto]"
53 ac_help="$ac_help
54   --with-threads          with threads [auto]"
55 ac_help="$ac_help
56   --with-tls              with TLS/SSL support [auto]"
57 ac_help="$ac_help
58   --with-yielding-select  with implicitly yielding select [auto]"
59 ac_help="$ac_help
60
61 SLAPD (Standalone LDAP Daemon) Options:"
62 ac_help="$ac_help
63   --enable-slapd          enable building slapd [yes]"
64 ac_help="$ac_help
65     --enable-aci          enable per-object ACIs (experimental) [no]"
66 ac_help="$ac_help
67     --enable-cleartext    enable cleartext passwords [yes]"
68 ac_help="$ac_help
69     --enable-crypt        enable crypt(3) passwords [no]"
70 ac_help="$ac_help
71     --enable-lmpasswd     enable LAN Manager passwords [no]"
72 ac_help="$ac_help
73     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
74 ac_help="$ac_help
75     --enable-modules      enable dynamic module support [no]"
76 ac_help="$ac_help
77     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
78 ac_help="$ac_help
79     --enable-rlookups     enable reverse lookups of client hostnames [no]"
80 ac_help="$ac_help
81     --enable-slapi        enable SLAPI support (experimental) [no]"
82 ac_help="$ac_help
83     --enable-slp          enable SLPv2 support [no]"
84 ac_help="$ac_help
85     --enable-wrappers     enable tcp wrapper support [no]"
86 ac_help="$ac_help
87     --enable-bdb          enable Berkeley DB backend [yes]"
88 ac_help="$ac_help
89     --with-bdb-module     module type static|dynamic [static]"
90 ac_help="$ac_help
91     --enable-dnssrv       enable dnssrv backend [no]"
92 ac_help="$ac_help
93     --with-dnssrv-module  module type static|dynamic [static]"
94 ac_help="$ac_help
95     --enable-hdb          enable Hierarchical DB backend [no]"
96 ac_help="$ac_help
97     --with-hdb-module     module type static|dynamic [static]"
98 ac_help="$ac_help
99     --enable-ldap         enable ldap backend [no]"
100 ac_help="$ac_help
101     --with-ldap-module    module type static|dynamic [static]"
102 ac_help="$ac_help
103     --enable-ldbm         enable ldbm backend [no]"
104 ac_help="$ac_help
105     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
106 ac_help="$ac_help
107     --with-ldbm-module    module type static|dynamic [static]"
108 ac_help="$ac_help
109     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
110 ac_help="$ac_help
111     --enable-meta         enable metadirectory backend [no]"
112 ac_help="$ac_help
113     --with-meta-module    module type static|dynamic [static]"
114 ac_help="$ac_help
115     --enable-monitor      enable monitor backend [yes]"
116 ac_help="$ac_help
117     --with-monitor-module module type static|dynamic [static]"
118 ac_help="$ac_help
119     --enable-null         enable null backend [no]"
120 ac_help="$ac_help
121     --with-null-module    module type static|dynamic [static]"
122 ac_help="$ac_help
123     --enable-passwd       enable passwd backend [no]"
124 ac_help="$ac_help
125     --with-passwd-module  module type static|dynamic [static]"
126 ac_help="$ac_help
127     --enable-perl         enable perl backend [no]"
128 ac_help="$ac_help
129     --with-perl-module    module type static|dynamic [static]"
130 ac_help="$ac_help
131     --enable-shell        enable shell backend [no]"
132 ac_help="$ac_help
133     --with-shell-module   module type static|dynamic [static]"
134 ac_help="$ac_help
135     --enable-sql          enable sql backend [no]"
136 ac_help="$ac_help
137     --with-sql-module     module type static|dynamic [static]"
138 ac_help="$ac_help
139
140 SLAPD Overlay Options:"
141 ac_help="$ac_help
142     --with-dyngroup       Dynamic Group overlay no|yes|mod [no]"
143 ac_help="$ac_help
144     --with-proxycache     Proxy Cache overlay no|yes|mod [no]"
145 ac_help="$ac_help
146     --with-rwm            Rewrite/Remap overlay no|yes|mod [no]"
147 ac_help="$ac_help
148
149 SLURPD (Replication Daemon) Options:"
150 ac_help="$ac_help
151   --enable-slurpd         enable building slurpd [auto]"
152 ac_help="$ac_help
153
154 Library Generation & Linking Options"
155 ac_help="$ac_help
156   --enable-static[=PKGS]  build static libraries [default=yes]"
157 ac_help="$ac_help
158   --enable-shared[=PKGS]  build shared libraries [default=yes]"
159 ac_help="$ac_help
160   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
161 ac_help="$ac_help
162   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
163
164 # Find the correct PATH separator.  Usually this is `:', but
165 # DJGPP uses `;' like DOS.
166 if test "X${PATH_SEPARATOR+set}" != Xset; then
167   UNAME=${UNAME-`uname 2>/dev/null`}
168   case X$UNAME in
169     *-DOS) lt_cv_sys_path_separator=';' ;;
170     *)     lt_cv_sys_path_separator=':' ;;
171   esac
172   PATH_SEPARATOR=$lt_cv_sys_path_separator
173 fi
174
175
176 # Check that we are running under the correct shell.
177 SHELL=${CONFIG_SHELL-/bin/sh}
178
179 case X$ECHO in
180 X*--fallback-echo)
181   # Remove one level of quotation (which was required for Make).
182   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
183   ;;
184 esac
185
186 echo=${ECHO-echo}
187 if test "X$1" = X--no-reexec; then
188   # Discard the --no-reexec flag, and continue.
189   shift
190 elif test "X$1" = X--fallback-echo; then
191   # Avoid inline document here, it may be left over
192   :
193 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
194   # Yippee, $echo works!
195   :
196 else
197   # Restart under the correct shell.
198   exec $SHELL "$0" --no-reexec ${1+"$@"}
199 fi
200
201 if test "X$1" = X--fallback-echo; then
202   # used as fallback echo
203   shift
204   cat <<EOF
205
206 EOF
207   exit 0
208 fi
209
210 # The HP-UX ksh and POSIX shell print the target directory to stdout
211 # if CDPATH is set.
212 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
213
214 if test -z "$ECHO"; then
215 if test "X${echo_test_string+set}" != Xset; then
216 # find a string as large as possible, as long as the shell can cope with it
217   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
218     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
219     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
220        echo_test_string="`eval $cmd`" &&
221        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
222     then
223       break
224     fi
225   done
226 fi
227
228 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
229    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
230    test "X$echo_testing_string" = "X$echo_test_string"; then
231   :
232 else
233   # The Solaris, AIX, and Digital Unix default echo programs unquote
234   # backslashes.  This makes it impossible to quote backslashes using
235   #   echo "$something" | sed 's/\\/\\\\/g'
236   #
237   # So, first we look for a working echo in the user's PATH.
238
239   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
240   for dir in $PATH /usr/ucb; do
241     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
242        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
243        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
244        test "X$echo_testing_string" = "X$echo_test_string"; then
245       echo="$dir/echo"
246       break
247     fi
248   done
249   IFS="$save_ifs"
250
251   if test "X$echo" = Xecho; then
252     # We didn't find a better echo, so look for alternatives.
253     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
254        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
255        test "X$echo_testing_string" = "X$echo_test_string"; then
256       # This shell has a builtin print -r that does the trick.
257       echo='print -r'
258     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
259          test "X$CONFIG_SHELL" != X/bin/ksh; then
260       # If we have ksh, try running configure again with it.
261       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
262       export ORIGINAL_CONFIG_SHELL
263       CONFIG_SHELL=/bin/ksh
264       export CONFIG_SHELL
265       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
266     else
267       # Try using printf.
268       echo='printf %s\n'
269       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
270          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
271          test "X$echo_testing_string" = "X$echo_test_string"; then
272         # Cool, printf works
273         :
274       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
275            test "X$echo_testing_string" = 'X\t' &&
276            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
277            test "X$echo_testing_string" = "X$echo_test_string"; then
278         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
279         export CONFIG_SHELL
280         SHELL="$CONFIG_SHELL"
281         export SHELL
282         echo="$CONFIG_SHELL $0 --fallback-echo"
283       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
284            test "X$echo_testing_string" = 'X\t' &&
285            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
286            test "X$echo_testing_string" = "X$echo_test_string"; then
287         echo="$CONFIG_SHELL $0 --fallback-echo"
288       else
289         # maybe with a smaller string...
290         prev=:
291
292         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
293           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
294           then
295             break
296           fi
297           prev="$cmd"
298         done
299
300         if test "$prev" != 'sed 50q "$0"'; then
301           echo_test_string=`eval $prev`
302           export echo_test_string
303           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
304         else
305           # Oops.  We lost completely, so just stick with echo.
306           echo=echo
307         fi
308       fi
309     fi
310   fi
311 fi
312 fi
313
314 # Copy echo and quote the copy suitably for passing to libtool from
315 # the Makefile, instead of quoting the original, which is used later.
316 ECHO=$echo
317 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
318    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
319 fi
320
321
322 ac_help="$ac_help
323   --disable-libtool-lock  avoid locking (might break parallel builds)"
324 ac_help="$ac_help
325   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
326 ac_help="$ac_help
327
328 See INSTALL file for further details."
329
330 # Initialize some variables set by options.
331 # The variables have the same names as the options, with
332 # dashes changed to underlines.
333 build=NONE
334 cache_file=./config.cache
335 exec_prefix=NONE
336 host=NONE
337 no_create=
338 nonopt=NONE
339 no_recursion=
340 prefix=NONE
341 program_prefix=NONE
342 program_suffix=NONE
343 program_transform_name=s,x,x,
344 silent=
345 site=
346 srcdir=
347 target=NONE
348 verbose=
349 x_includes=NONE
350 x_libraries=NONE
351 bindir='${exec_prefix}/bin'
352 sbindir='${exec_prefix}/sbin'
353 libexecdir='${exec_prefix}/libexec'
354 datadir='${prefix}/share'
355 sysconfdir='${prefix}/etc'
356 sharedstatedir='${prefix}/com'
357 localstatedir='${prefix}/var'
358 libdir='${exec_prefix}/lib'
359 includedir='${prefix}/include'
360 oldincludedir='/usr/include'
361 infodir='${prefix}/info'
362 mandir='${prefix}/man'
363
364 # Initialize some other variables.
365 subdirs=
366 MFLAGS= MAKEFLAGS=
367 SHELL=${CONFIG_SHELL-/bin/sh}
368 # Maximum number of lines to put in a shell here document.
369 ac_max_here_lines=12
370
371 ac_prev=
372 for ac_option
373 do
374
375   # If the previous option needs an argument, assign it.
376   if test -n "$ac_prev"; then
377     eval "$ac_prev=\$ac_option"
378     ac_prev=
379     continue
380   fi
381
382   case "$ac_option" in
383   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
384   *) ac_optarg= ;;
385   esac
386
387   # Accept the important Cygnus configure options, so we can diagnose typos.
388
389   case "$ac_option" in
390
391   -bindir | --bindir | --bindi | --bind | --bin | --bi)
392     ac_prev=bindir ;;
393   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
394     bindir="$ac_optarg" ;;
395
396   -build | --build | --buil | --bui | --bu)
397     ac_prev=build ;;
398   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
399     build="$ac_optarg" ;;
400
401   -cache-file | --cache-file | --cache-fil | --cache-fi \
402   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
403     ac_prev=cache_file ;;
404   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
405   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
406     cache_file="$ac_optarg" ;;
407
408   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
409     ac_prev=datadir ;;
410   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
411   | --da=*)
412     datadir="$ac_optarg" ;;
413
414   -disable-* | --disable-*)
415     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
416     # Reject names that are not valid shell variable names.
417     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
418       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
419     fi
420     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
421     eval "enable_${ac_feature}=no" ;;
422
423   -enable-* | --enable-*)
424     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
425     # Reject names that are not valid shell variable names.
426     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
427       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
428     fi
429     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
430     case "$ac_option" in
431       *=*) ;;
432       *) ac_optarg=yes ;;
433     esac
434     eval "enable_${ac_feature}='$ac_optarg'" ;;
435
436   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
437   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
438   | --exec | --exe | --ex)
439     ac_prev=exec_prefix ;;
440   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
441   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
442   | --exec=* | --exe=* | --ex=*)
443     exec_prefix="$ac_optarg" ;;
444
445   -gas | --gas | --ga | --g)
446     # Obsolete; use --with-gas.
447     with_gas=yes ;;
448
449   -help | --help | --hel | --he)
450     # Omit some internal or obsolete options to make the list less imposing.
451     # This message is too long to be a string in the A/UX 3.1 sh.
452     cat << EOF
453 Usage: configure [options] [host]
454 Options: [defaults in brackets after descriptions]
455 Configuration:
456   --cache-file=FILE       cache test results in FILE
457   --help                  print this message
458   --no-create             do not create output files
459   --quiet, --silent       do not print \`checking...' messages
460   --version               print the version of autoconf that created configure
461 Directory and file names:
462   --prefix=PREFIX         install architecture-independent files in PREFIX
463                           [$ac_default_prefix]
464   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
465                           [same as prefix]
466   --bindir=DIR            user executables in DIR [EPREFIX/bin]
467   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
468   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
469   --datadir=DIR           read-only architecture-independent data in DIR
470                           [PREFIX/share]
471   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
472   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
473                           [PREFIX/com]
474   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
475   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
476   --includedir=DIR        C header files in DIR [PREFIX/include]
477   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
478   --infodir=DIR           info documentation in DIR [PREFIX/info]
479   --mandir=DIR            man documentation in DIR [PREFIX/man]
480   --srcdir=DIR            find the sources in DIR [configure dir or ..]
481   --program-prefix=PREFIX prepend PREFIX to installed program names
482   --program-suffix=SUFFIX append SUFFIX to installed program names
483   --program-transform-name=PROGRAM
484                           run sed PROGRAM on installed program names
485 EOF
486     cat << EOF
487 Host type:
488   --build=BUILD           configure for building on BUILD [BUILD=HOST]
489   --host=HOST             configure for HOST [guessed]
490   --target=TARGET         configure for TARGET [TARGET=HOST]
491 Features and packages:
492   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
493   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
494   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
495   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
496   --x-includes=DIR        X include files are in DIR
497   --x-libraries=DIR       X library files are in DIR
498 EOF
499     if test -n "$ac_help"; then
500       echo "--enable and --with options recognized:$ac_help"
501     fi
502     exit 0 ;;
503
504   -host | --host | --hos | --ho)
505     ac_prev=host ;;
506   -host=* | --host=* | --hos=* | --ho=*)
507     host="$ac_optarg" ;;
508
509   -includedir | --includedir | --includedi | --included | --include \
510   | --includ | --inclu | --incl | --inc)
511     ac_prev=includedir ;;
512   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
513   | --includ=* | --inclu=* | --incl=* | --inc=*)
514     includedir="$ac_optarg" ;;
515
516   -infodir | --infodir | --infodi | --infod | --info | --inf)
517     ac_prev=infodir ;;
518   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
519     infodir="$ac_optarg" ;;
520
521   -libdir | --libdir | --libdi | --libd)
522     ac_prev=libdir ;;
523   -libdir=* | --libdir=* | --libdi=* | --libd=*)
524     libdir="$ac_optarg" ;;
525
526   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
527   | --libexe | --libex | --libe)
528     ac_prev=libexecdir ;;
529   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
530   | --libexe=* | --libex=* | --libe=*)
531     libexecdir="$ac_optarg" ;;
532
533   -localstatedir | --localstatedir | --localstatedi | --localstated \
534   | --localstate | --localstat | --localsta | --localst \
535   | --locals | --local | --loca | --loc | --lo)
536     ac_prev=localstatedir ;;
537   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
538   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
539   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
540     localstatedir="$ac_optarg" ;;
541
542   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
543     ac_prev=mandir ;;
544   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
545     mandir="$ac_optarg" ;;
546
547   -nfp | --nfp | --nf)
548     # Obsolete; use --without-fp.
549     with_fp=no ;;
550
551   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
552   | --no-cr | --no-c)
553     no_create=yes ;;
554
555   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
556   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
557     no_recursion=yes ;;
558
559   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
560   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
561   | --oldin | --oldi | --old | --ol | --o)
562     ac_prev=oldincludedir ;;
563   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
564   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
565   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
566     oldincludedir="$ac_optarg" ;;
567
568   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
569     ac_prev=prefix ;;
570   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
571     prefix="$ac_optarg" ;;
572
573   -program-prefix | --program-prefix | --program-prefi | --program-pref \
574   | --program-pre | --program-pr | --program-p)
575     ac_prev=program_prefix ;;
576   -program-prefix=* | --program-prefix=* | --program-prefi=* \
577   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
578     program_prefix="$ac_optarg" ;;
579
580   -program-suffix | --program-suffix | --program-suffi | --program-suff \
581   | --program-suf | --program-su | --program-s)
582     ac_prev=program_suffix ;;
583   -program-suffix=* | --program-suffix=* | --program-suffi=* \
584   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
585     program_suffix="$ac_optarg" ;;
586
587   -program-transform-name | --program-transform-name \
588   | --program-transform-nam | --program-transform-na \
589   | --program-transform-n | --program-transform- \
590   | --program-transform | --program-transfor \
591   | --program-transfo | --program-transf \
592   | --program-trans | --program-tran \
593   | --progr-tra | --program-tr | --program-t)
594     ac_prev=program_transform_name ;;
595   -program-transform-name=* | --program-transform-name=* \
596   | --program-transform-nam=* | --program-transform-na=* \
597   | --program-transform-n=* | --program-transform-=* \
598   | --program-transform=* | --program-transfor=* \
599   | --program-transfo=* | --program-transf=* \
600   | --program-trans=* | --program-tran=* \
601   | --progr-tra=* | --program-tr=* | --program-t=*)
602     program_transform_name="$ac_optarg" ;;
603
604   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
605   | -silent | --silent | --silen | --sile | --sil)
606     silent=yes ;;
607
608   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
609     ac_prev=sbindir ;;
610   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
611   | --sbi=* | --sb=*)
612     sbindir="$ac_optarg" ;;
613
614   -sharedstatedir | --sharedstatedir | --sharedstatedi \
615   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
616   | --sharedst | --shareds | --shared | --share | --shar \
617   | --sha | --sh)
618     ac_prev=sharedstatedir ;;
619   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
620   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
621   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
622   | --sha=* | --sh=*)
623     sharedstatedir="$ac_optarg" ;;
624
625   -site | --site | --sit)
626     ac_prev=site ;;
627   -site=* | --site=* | --sit=*)
628     site="$ac_optarg" ;;
629
630   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
631     ac_prev=srcdir ;;
632   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
633     srcdir="$ac_optarg" ;;
634
635   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
636   | --syscon | --sysco | --sysc | --sys | --sy)
637     ac_prev=sysconfdir ;;
638   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
639   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
640     sysconfdir="$ac_optarg" ;;
641
642   -target | --target | --targe | --targ | --tar | --ta | --t)
643     ac_prev=target ;;
644   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
645     target="$ac_optarg" ;;
646
647   -v | -verbose | --verbose | --verbos | --verbo | --verb)
648     verbose=yes ;;
649
650   -version | --version | --versio | --versi | --vers)
651     echo "configure generated by autoconf version 2.13.1"
652     exit 0 ;;
653
654   -with-* | --with-*)
655     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
656     # Reject names that are not valid shell variable names.
657     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
658       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
659     fi
660     ac_package=`echo $ac_package| sed 's/-/_/g'`
661     case "$ac_option" in
662       *=*) ;;
663       *) ac_optarg=yes ;;
664     esac
665     eval "with_${ac_package}='$ac_optarg'" ;;
666
667   -without-* | --without-*)
668     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
669     # Reject names that are not valid shell variable names.
670     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
671       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
672     fi
673     ac_package=`echo $ac_package| sed 's/-/_/g'`
674     eval "with_${ac_package}=no" ;;
675
676   --x)
677     # Obsolete; use --with-x.
678     with_x=yes ;;
679
680   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
681   | --x-incl | --x-inc | --x-in | --x-i)
682     ac_prev=x_includes ;;
683   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
684   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
685     x_includes="$ac_optarg" ;;
686
687   -x-libraries | --x-libraries | --x-librarie | --x-librari \
688   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
689     ac_prev=x_libraries ;;
690   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
691   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
692     x_libraries="$ac_optarg" ;;
693
694   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
695     ;;
696
697   *)
698     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
699       echo "configure: warning: $ac_option: invalid host type" 1>&2
700     fi
701     if test "x$nonopt" != xNONE; then
702       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
703     fi
704     nonopt="$ac_option"
705     ;;
706
707   esac
708 done
709
710 if test -n "$ac_prev"; then
711   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
712 fi
713
714 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
715
716 # File descriptor usage:
717 # 0 standard input
718 # 1 file creation
719 # 2 errors and warnings
720 # 3 some systems may open it to /dev/tty
721 # 4 used on the Kubota Titan
722 # 6 checking for... messages and results
723 # 5 compiler messages saved in config.log
724 if test "$silent" = yes; then
725   exec 6>/dev/null
726 else
727   exec 6>&1
728 fi
729 exec 5>./config.log
730
731 echo "\
732 This file contains any messages produced by compilers while
733 running configure, to aid debugging if configure makes a mistake.
734 " 1>&5
735
736 # Strip out --no-create and --no-recursion so they do not pile up.
737 # Also quote any args containing shell metacharacters.
738 ac_configure_args=
739 for ac_arg
740 do
741   case "$ac_arg" in
742   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
743   | --no-cr | --no-c) ;;
744   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
745   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
746   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
747   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
748   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
749   esac
750 done
751
752 # NLS nuisances.
753 # Only set these to C if already set.  These must not be set unconditionally
754 # because not all systems understand e.g. LANG=C (notably SCO).
755 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
756 # Non-C LC_CTYPE values break the ctype check.
757 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
758 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
759 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
760 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
761
762 # confdefs.h avoids OS command line length limits that DEFS can exceed.
763 rm -rf conftest* confdefs.h
764 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
765 echo > confdefs.h
766
767 # A filename unique to this package, relative to the directory that
768 # configure is in, which we can look for to find out if srcdir is correct.
769 ac_unique_file=build/version.sh
770
771 # Find the source files, if location was not specified.
772 if test -z "$srcdir"; then
773   ac_srcdir_defaulted=yes
774   # Try the directory containing this script, then its parent.
775   ac_prog=$0
776   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
777   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
778   srcdir=$ac_confdir
779   if test ! -r $srcdir/$ac_unique_file; then
780     srcdir=..
781   fi
782 else
783   ac_srcdir_defaulted=no
784 fi
785 if test ! -r $srcdir/$ac_unique_file; then
786   if test "$ac_srcdir_defaulted" = yes; then
787     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
788   else
789     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
790   fi
791 fi
792 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
793
794 # Prefer explicitly selected file to automatically selected ones.
795 if test -z "$CONFIG_SITE"; then
796   if test "x$prefix" != xNONE; then
797     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
798   else
799     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
800   fi
801 fi
802 for ac_site_file in $CONFIG_SITE; do
803   if test -r "$ac_site_file"; then
804     echo "loading site script $ac_site_file"
805     . "$ac_site_file"
806   fi
807 done
808
809
810 ac_ext=c
811 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
812 ac_cpp='$CPP $CPPFLAGS'
813 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
814 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
815 cross_compiling=$ac_cv_prog_cc_cross
816
817 ac_exeext=
818 ac_objext=o
819 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
820   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
821   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
822     ac_n= ac_c='
823 ' ac_t='        '
824   else
825     ac_n=-n ac_c= ac_t=
826   fi
827 else
828   ac_n= ac_c='\c' ac_t=
829 fi
830
831
832 # set unset (borrowed from autoconf 2.49c)
833 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
834   ol_unset=unset
835 else
836   ol_unset=false
837 fi
838 # unset CDPATH
839 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
840
841 ac_aux_dir=
842 for ac_dir in build $srcdir/build; do
843   if test -f $ac_dir/install-sh; then
844     ac_aux_dir=$ac_dir
845     ac_install_sh="$ac_aux_dir/install-sh -c"
846     break
847   elif test -f $ac_dir/install.sh; then
848     ac_aux_dir=$ac_dir
849     ac_install_sh="$ac_aux_dir/install.sh -c"
850     break
851   elif test -f $ac_dir/shtool; then
852     ac_aux_dir=$ac_dir
853     ac_install_sh="$ac_aux_dir/shtool install -c"
854     break
855   fi
856 done
857 if test -z "$ac_aux_dir"; then
858   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
859 fi
860 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
861 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
862 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
863
864 eval `$ac_aux_dir/version.sh`
865 if test -z "$OL_STRING"; then
866         { echo "configure: error: could not determine version" 1>&2; exit 1; }
867 fi
868
869 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
870         ac_cv_shtool="$ac_aux_dir/shtool"
871 else
872         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
873 fi
874
875 SHTOOL="$ac_cv_shtool"
876
877 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
878 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
879
880 OPENLDAP_CVS=""
881 if test -d $ac_aux_dir/CVS; then
882         OPENLDAP_CVS="(from CVS sources) "
883 fi
884
885 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
886
887
888 echo $ac_n "checking host system type""... $ac_c" 1>&6
889 echo "configure:890: checking host system type" >&5
890 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
891
892 # Make sure we can run config.sub.
893   if $ac_config_sub sun4 >/dev/null 2>&1; then :
894     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
895   fi
896
897   ac_cv_host_alias=$host
898   case "$ac_cv_host_alias" in
899   NONE)
900     case $nonopt in
901     NONE)
902       if ac_cv_host_alias=`$ac_config_guess`; then :
903       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
904       fi ;;
905     *) ac_cv_host_alias=$nonopt ;;
906     esac ;;
907   esac
908
909   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
910   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
911   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
912   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
913 else
914   echo $ac_n "(cached) $ac_c" 1>&6
915 fi
916
917 echo "$ac_t""$ac_cv_host" 1>&6
918
919 host=$ac_cv_host
920 host_alias=$ac_cv_host_alias
921 host_cpu=$ac_cv_host_cpu
922 host_vendor=$ac_cv_host_vendor
923 host_os=$ac_cv_host_os
924
925
926
927
928
929 echo $ac_n "checking target system type""... $ac_c" 1>&6
930 echo "configure:931: checking target system type" >&5
931 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
932
933 # Make sure we can run config.sub.
934   if $ac_config_sub sun4 >/dev/null 2>&1; then :
935     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
936   fi
937
938   ac_cv_target_alias=$target
939   case "$ac_cv_target_alias" in
940   NONE)
941     case $nonopt in
942     NONE)
943       ac_cv_target_alias=$host_alias ;;
944
945     *) ac_cv_target_alias=$nonopt ;;
946     esac ;;
947   esac
948
949   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
950   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
951   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
952   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
953 else
954   echo $ac_n "(cached) $ac_c" 1>&6
955 fi
956
957 echo "$ac_t""$ac_cv_target" 1>&6
958
959 target=$ac_cv_target
960 target_alias=$ac_cv_target_alias
961 target_cpu=$ac_cv_target_cpu
962 target_vendor=$ac_cv_target_vendor
963 target_os=$ac_cv_target_os
964
965
966
967
968
969 echo $ac_n "checking build system type""... $ac_c" 1>&6
970 echo "configure:971: checking build system type" >&5
971 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
972
973 # Make sure we can run config.sub.
974   if $ac_config_sub sun4 >/dev/null 2>&1; then :
975     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
976   fi
977
978   ac_cv_build_alias=$build
979   case "$ac_cv_build_alias" in
980   NONE)
981     case $nonopt in
982     NONE)
983       ac_cv_build_alias=$host_alias ;;
984
985     *) ac_cv_build_alias=$nonopt ;;
986     esac ;;
987   esac
988
989   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
990   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
991   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
992   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
993 else
994   echo $ac_n "(cached) $ac_c" 1>&6
995 fi
996
997 echo "$ac_t""$ac_cv_build" 1>&6
998
999 build=$ac_cv_build
1000 build_alias=$ac_cv_build_alias
1001 build_cpu=$ac_cv_build_cpu
1002 build_vendor=$ac_cv_build_vendor
1003 build_os=$ac_cv_build_os
1004
1005
1006
1007
1008
1009 # Do some error checking and defaulting for the host and target type.
1010 # The inputs are:
1011 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1012 #
1013 # The rules are:
1014 # 1. You are not allowed to specify --host, --target, and nonopt at the
1015 #    same time.
1016 # 2. Host defaults to nonopt.
1017 # 3. If nonopt is not specified, then host defaults to the current host,
1018 #    as determined by config.guess.
1019 # 4. Target and build default to nonopt.
1020 # 5. If nonopt is not specified, then target and build default to host.
1021
1022 # The aliases save the names the user supplied, while $host etc.
1023 # will get canonicalized.
1024 case $host---$target---$nonopt in
1025 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1026 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1027 esac
1028
1029 test "$host_alias" != "$target_alias" &&
1030   test "$program_prefix$program_suffix$program_transform_name" = \
1031     NONENONEs,x,x, &&
1032   program_prefix=${target_alias}-
1033
1034
1035 # Find a good install program.  We prefer a C program (faster),
1036 # so one script is as good as another.  But avoid the broken or
1037 # incompatible versions:
1038 # SysV /etc/install, /usr/sbin/install
1039 # SunOS /usr/etc/install
1040 # IRIX /sbin/install
1041 # AIX /bin/install
1042 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1043 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1044 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1045 # ./install, which can be erroneously created by make from ./install.sh.
1046 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1047 echo "configure:1048: checking for a BSD compatible install" >&5
1048 if test -z "$INSTALL"; then
1049 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1050   echo $ac_n "(cached) $ac_c" 1>&6
1051 else
1052     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1053   for ac_dir in $PATH; do
1054     # Account for people who put trailing slashes in PATH elements.
1055     case "$ac_dir/" in
1056     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1057     *)
1058       # OSF1 and SCO ODT 3.0 have their own names for install.
1059       # Don't use installbsd from OSF since it installs stuff as root
1060       # by default.
1061       for ac_prog in ginstall scoinst install; do
1062         if test -f $ac_dir/$ac_prog; then
1063           if test $ac_prog = install &&
1064             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1065             # AIX install.  It has an incompatible calling convention.
1066             :
1067           elif test $ac_prog = install &&
1068             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1069             # program-specific install script used by HP pwplus--don't use.
1070             :
1071           else
1072             ac_cv_path_install="$ac_dir/$ac_prog -c"
1073             break 2
1074           fi
1075         fi
1076       done
1077       ;;
1078     esac
1079   done
1080   IFS="$ac_save_IFS"
1081
1082 fi
1083   if test "${ac_cv_path_install+set}" = set; then
1084     INSTALL="$ac_cv_path_install"
1085   else
1086     # As a last resort, use the slow shell script.  We don't cache a
1087     # path for INSTALL within a source directory, because that will
1088     # break other packages using the cache if that directory is
1089     # removed, or if the path is relative.
1090     INSTALL="$ac_install_sh"
1091   fi
1092 fi
1093 echo "$ac_t""$INSTALL" 1>&6
1094
1095 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1096 # It thinks the first close brace ends the variable substitution.
1097 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1098
1099 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1100
1101 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1102
1103 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1104 echo "configure:1105: checking whether build environment is sane" >&5
1105 # Just in case
1106 sleep 1
1107 echo timestamp > conftestfile
1108 # Do `set' in a subshell so we don't clobber the current shell's
1109 # arguments.  Must try -L first in case configure is actually a
1110 # symlink; some systems play weird games with the mod time of symlinks
1111 # (eg FreeBSD returns the mod time of the symlink's containing
1112 # directory).
1113 if (
1114    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1115    if test "$*" = "X"; then
1116       # -L didn't work.
1117       set X `ls -t $srcdir/configure conftestfile`
1118    fi
1119    if test "$*" != "X $srcdir/configure conftestfile" \
1120       && test "$*" != "X conftestfile $srcdir/configure"; then
1121
1122       # If neither matched, then we have a broken ls.  This can happen
1123       # if, for instance, CONFIG_SHELL is bash and it inherits a
1124       # broken ls alias from the environment.  This has actually
1125       # happened.  Such a system could not be considered "sane".
1126       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1127 alias in your environment" 1>&2; exit 1; }
1128    fi
1129
1130    test "$2" = conftestfile
1131    )
1132 then
1133    # Ok.
1134    :
1135 else
1136    { echo "configure: error: newly created file is older than distributed files!
1137 Check your system clock" 1>&2; exit 1; }
1138 fi
1139 rm -f conftest*
1140 echo "$ac_t""yes" 1>&6
1141 if test "$program_transform_name" = s,x,x,; then
1142   program_transform_name=
1143 else
1144   # Double any \ or $.  echo might interpret backslashes.
1145   cat <<\EOF_SED > conftestsed
1146 s,\\,\\\\,g; s,\$,$$,g
1147 EOF_SED
1148   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1149   rm -f conftestsed
1150 fi
1151 test "$program_prefix" != NONE &&
1152   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1153 # Use a double $ so make ignores it.
1154 test "$program_suffix" != NONE &&
1155   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1156
1157 # sed with no file args requires a program.
1158 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1159
1160 for ac_prog in mawk gawk nawk awk
1161 do
1162 # Extract the first word of "$ac_prog", so it can be a program name with args.
1163 set dummy $ac_prog; ac_word=$2
1164 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1165 echo "configure:1166: checking for $ac_word" >&5
1166 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1167   echo $ac_n "(cached) $ac_c" 1>&6
1168 else
1169   if test -n "$AWK"; then
1170   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1171 else
1172   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1173   ac_dummy="$PATH"
1174   for ac_dir in $ac_dummy; do
1175     test -z "$ac_dir" && ac_dir=.
1176     if test -f $ac_dir/$ac_word; then
1177       ac_cv_prog_AWK="$ac_prog"
1178       break
1179     fi
1180   done
1181   IFS="$ac_save_ifs"
1182 fi
1183 fi
1184 AWK="$ac_cv_prog_AWK"
1185 if test -n "$AWK"; then
1186   echo "$ac_t""$AWK" 1>&6
1187 else
1188   echo "$ac_t""no" 1>&6
1189 fi
1190
1191 test -n "$AWK" && break
1192 done
1193
1194 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1195 echo "configure:1196: checking whether ${MAKE-make} sets \${MAKE}" >&5
1196 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1197 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1198   echo $ac_n "(cached) $ac_c" 1>&6
1199 else
1200   cat > conftestmake <<\EOF
1201 all:
1202         @echo 'ac_maketemp="${MAKE}"'
1203 EOF
1204 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1205 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1206 if test -n "$ac_maketemp"; then
1207   eval ac_cv_prog_make_${ac_make}_set=yes
1208 else
1209   eval ac_cv_prog_make_${ac_make}_set=no
1210 fi
1211 rm -f conftestmake
1212 fi
1213 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1214   echo "$ac_t""yes" 1>&6
1215   SET_MAKE=
1216 else
1217   echo "$ac_t""no" 1>&6
1218   SET_MAKE="MAKE=${MAKE-make}"
1219 fi
1220
1221
1222
1223 PACKAGE=$OL_PACKAGE
1224
1225 VERSION=$OL_VERSION
1226
1227 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1228   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1229 fi
1230
1231
1232
1233 missing_dir=`cd $ac_aux_dir && pwd`
1234 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1235 echo "configure:1236: checking for working aclocal" >&5
1236 # Run test in a subshell; some versions of sh will print an error if
1237 # an executable is not found, even if stderr is redirected.
1238 # Redirect stdin to placate older versions of autoconf.  Sigh.
1239 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1240    ACLOCAL=aclocal
1241    echo "$ac_t""found" 1>&6
1242 else
1243    ACLOCAL="$missing_dir/missing aclocal"
1244    echo "$ac_t""missing" 1>&6
1245 fi
1246
1247 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1248 echo "configure:1249: checking for working autoconf" >&5
1249 # Run test in a subshell; some versions of sh will print an error if
1250 # an executable is not found, even if stderr is redirected.
1251 # Redirect stdin to placate older versions of autoconf.  Sigh.
1252 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1253    AUTOCONF=autoconf
1254    echo "$ac_t""found" 1>&6
1255 else
1256    AUTOCONF="$missing_dir/missing autoconf"
1257    echo "$ac_t""missing" 1>&6
1258 fi
1259
1260 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1261 echo "configure:1262: checking for working automake" >&5
1262 # Run test in a subshell; some versions of sh will print an error if
1263 # an executable is not found, even if stderr is redirected.
1264 # Redirect stdin to placate older versions of autoconf.  Sigh.
1265 if (automake --version) < /dev/null > /dev/null 2>&1; then
1266    AUTOMAKE=automake
1267    echo "$ac_t""found" 1>&6
1268 else
1269    AUTOMAKE="$missing_dir/missing automake"
1270    echo "$ac_t""missing" 1>&6
1271 fi
1272
1273 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1274 echo "configure:1275: checking for working autoheader" >&5
1275 # Run test in a subshell; some versions of sh will print an error if
1276 # an executable is not found, even if stderr is redirected.
1277 # Redirect stdin to placate older versions of autoconf.  Sigh.
1278 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1279    AUTOHEADER=autoheader
1280    echo "$ac_t""found" 1>&6
1281 else
1282    AUTOHEADER="$missing_dir/missing autoheader"
1283    echo "$ac_t""missing" 1>&6
1284 fi
1285
1286 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1287 echo "configure:1288: checking for working makeinfo" >&5
1288 # Run test in a subshell; some versions of sh will print an error if
1289 # an executable is not found, even if stderr is redirected.
1290 # Redirect stdin to placate older versions of autoconf.  Sigh.
1291 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1292    MAKEINFO=makeinfo
1293    echo "$ac_t""found" 1>&6
1294 else
1295    MAKEINFO="$missing_dir/missing makeinfo"
1296    echo "$ac_t""missing" 1>&6
1297 fi
1298
1299 install_sh="$missing_dir/install-sh"
1300 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1301
1302 for ac_prog in gnutar gtar tar
1303 do
1304 # Extract the first word of "$ac_prog", so it can be a program name with args.
1305 set dummy $ac_prog; ac_word=$2
1306 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1307 echo "configure:1308: checking for $ac_word" >&5
1308 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1309   echo $ac_n "(cached) $ac_c" 1>&6
1310 else
1311   if test -n "$AMTAR"; then
1312   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1313 else
1314   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1315   ac_dummy="$PATH"
1316   for ac_dir in $ac_dummy; do
1317     test -z "$ac_dir" && ac_dir=.
1318     if test -f $ac_dir/$ac_word; then
1319       ac_cv_prog_AMTAR="$ac_prog"
1320       break
1321     fi
1322   done
1323   IFS="$ac_save_ifs"
1324 fi
1325 fi
1326 AMTAR="$ac_cv_prog_AMTAR"
1327 if test -n "$AMTAR"; then
1328   echo "$ac_t""$AMTAR" 1>&6
1329 else
1330   echo "$ac_t""no" 1>&6
1331 fi
1332
1333 test -n "$AMTAR" && break
1334 done
1335
1336
1337 AMTARFLAGS=
1338 if test -n "$AMTAR"; then
1339   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1340         AMTARFLAGS=o
1341   fi
1342 fi
1343
1344 cat >> confdefs.h <<EOF
1345 #define OPENLDAP_PACKAGE "$PACKAGE"
1346 EOF
1347
1348 cat >> confdefs.h <<EOF
1349 #define OPENLDAP_VERSION "$VERSION"
1350 EOF
1351
1352
1353 cat >> confdefs.h <<EOF
1354 #define LDAP_VENDOR_VERSION $OL_API_INC
1355 EOF
1356
1357 cat >> confdefs.h <<EOF
1358 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1359 EOF
1360
1361 cat >> confdefs.h <<EOF
1362 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1363 EOF
1364
1365 cat >> confdefs.h <<EOF
1366 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1367 EOF
1368
1369
1370 OPENLDAP_LIBVERSION=$OL_API_LIB
1371
1372 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1373
1374
1375
1376 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1377 echo "configure:1378: checking configure arguments" >&5
1378
1379
1380 top_builddir=`pwd`
1381
1382 ldap_subdir="/openldap"
1383
1384 # Check whether --with-subdir or --without-subdir was given.
1385 if test "${with_subdir+set}" = set; then
1386   withval="$with_subdir"
1387   case "$withval" in
1388         no) ldap_subdir=""
1389                 ;;
1390         yes)
1391                 ;;
1392         /*|\\*)
1393                 ldap_subdir="$withval"
1394                 ;;
1395         *)
1396                 ldap_subdir="/$withval"
1397                 ;;
1398 esac
1399
1400 fi
1401
1402
1403 # OpenLDAP --enable-debug
1404         # Check whether --enable-debug or --disable-debug was given.
1405 if test "${enable_debug+set}" = set; then
1406   enableval="$enable_debug"
1407   
1408         ol_arg=invalid
1409         for ol_val in auto yes no ; do
1410                 if test "$enableval" = "$ol_val" ; then
1411                         ol_arg="$ol_val"
1412                 fi
1413         done
1414         if test "$ol_arg" = "invalid" ; then
1415                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1416         fi
1417         ol_enable_debug="$ol_arg"
1418
1419 else
1420         ol_enable_debug="yes"
1421 fi
1422 # end --enable-debug
1423 # OpenLDAP --enable-dynamic
1424         # Check whether --enable-dynamic or --disable-dynamic was given.
1425 if test "${enable_dynamic+set}" = set; then
1426   enableval="$enable_dynamic"
1427   
1428         ol_arg=invalid
1429         for ol_val in auto yes no ; do
1430                 if test "$enableval" = "$ol_val" ; then
1431                         ol_arg="$ol_val"
1432                 fi
1433         done
1434         if test "$ol_arg" = "invalid" ; then
1435                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1436         fi
1437         ol_enable_dynamic="$ol_arg"
1438
1439 else
1440         ol_enable_dynamic="no"
1441 fi
1442 # end --enable-dynamic
1443 # OpenLDAP --enable-syslog
1444         # Check whether --enable-syslog or --disable-syslog was given.
1445 if test "${enable_syslog+set}" = set; then
1446   enableval="$enable_syslog"
1447   
1448         ol_arg=invalid
1449         for ol_val in auto yes no ; do
1450                 if test "$enableval" = "$ol_val" ; then
1451                         ol_arg="$ol_val"
1452                 fi
1453         done
1454         if test "$ol_arg" = "invalid" ; then
1455                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1456         fi
1457         ol_enable_syslog="$ol_arg"
1458
1459 else
1460         ol_enable_syslog="auto"
1461 fi
1462 # end --enable-syslog
1463 # OpenLDAP --enable-proctitle
1464         # Check whether --enable-proctitle or --disable-proctitle was given.
1465 if test "${enable_proctitle+set}" = set; then
1466   enableval="$enable_proctitle"
1467   
1468         ol_arg=invalid
1469         for ol_val in auto yes no ; do
1470                 if test "$enableval" = "$ol_val" ; then
1471                         ol_arg="$ol_val"
1472                 fi
1473         done
1474         if test "$ol_arg" = "invalid" ; then
1475                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1476         fi
1477         ol_enable_proctitle="$ol_arg"
1478
1479 else
1480         ol_enable_proctitle="yes"
1481 fi
1482 # end --enable-proctitle
1483 ol_enable_referrals=${ol_enable_referrals-no}
1484 ol_enable_kbind=${ol_enable_kbind-no}
1485 # OpenLDAP --enable-ipv6
1486         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1487 if test "${enable_ipv6+set}" = set; then
1488   enableval="$enable_ipv6"
1489   
1490         ol_arg=invalid
1491         for ol_val in auto yes no ; do
1492                 if test "$enableval" = "$ol_val" ; then
1493                         ol_arg="$ol_val"
1494                 fi
1495         done
1496         if test "$ol_arg" = "invalid" ; then
1497                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1498         fi
1499         ol_enable_ipv6="$ol_arg"
1500
1501 else
1502         ol_enable_ipv6="auto"
1503 fi
1504 # end --enable-ipv6
1505 # OpenLDAP --enable-local
1506         # Check whether --enable-local or --disable-local was given.
1507 if test "${enable_local+set}" = set; then
1508   enableval="$enable_local"
1509   
1510         ol_arg=invalid
1511         for ol_val in auto yes no ; do
1512                 if test "$enableval" = "$ol_val" ; then
1513                         ol_arg="$ol_val"
1514                 fi
1515         done
1516         if test "$ol_arg" = "invalid" ; then
1517                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1518         fi
1519         ol_enable_local="$ol_arg"
1520
1521 else
1522         ol_enable_local="auto"
1523 fi
1524 # end --enable-local
1525 # OpenLDAP --enable-x_compile
1526         # Check whether --enable-x_compile or --disable-x_compile was given.
1527 if test "${enable_x_compile+set}" = set; then
1528   enableval="$enable_x_compile"
1529   
1530         ol_arg=invalid
1531         for ol_val in yes no ; do
1532                 if test "$enableval" = "$ol_val" ; then
1533                         ol_arg="$ol_val"
1534                 fi
1535         done
1536         if test "$ol_arg" = "invalid" ; then
1537                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1538         fi
1539         ol_enable_x_compile="$ol_arg"
1540
1541 else
1542         ol_enable_x_compile="no"
1543 fi
1544 # end --enable-x_compile
1545
1546
1547 # OpenLDAP --with-cyrus_sasl
1548         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1549 if test "${with_cyrus_sasl+set}" = set; then
1550   withval="$with_cyrus_sasl"
1551   
1552         ol_arg=invalid
1553         for ol_val in auto yes no  ; do
1554                 if test "$withval" = "$ol_val" ; then
1555                         ol_arg="$ol_val"
1556                 fi
1557         done
1558         if test "$ol_arg" = "invalid" ; then
1559                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1560         fi
1561         ol_with_cyrus_sasl="$ol_arg"
1562
1563 else
1564         ol_with_cyrus_sasl="auto"
1565 fi
1566 # end --with-cyrus_sasl
1567
1568 # OpenLDAP --with-fetch
1569         # Check whether --with-fetch or --without-fetch was given.
1570 if test "${with_fetch+set}" = set; then
1571   withval="$with_fetch"
1572   
1573         ol_arg=invalid
1574         for ol_val in auto yes no  ; do
1575                 if test "$withval" = "$ol_val" ; then
1576                         ol_arg="$ol_val"
1577                 fi
1578         done
1579         if test "$ol_arg" = "invalid" ; then
1580                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1581         fi
1582         ol_with_fetch="$ol_arg"
1583
1584 else
1585         ol_with_fetch="auto"
1586 fi
1587 # end --with-fetch
1588
1589 ol_with_kerberos=${ol_with_kerberos-auto}
1590 # OpenLDAP --with-threads
1591         # Check whether --with-threads or --without-threads was given.
1592 if test "${with_threads+set}" = set; then
1593   withval="$with_threads"
1594   
1595         ol_arg=invalid
1596         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1597                 if test "$withval" = "$ol_val" ; then
1598                         ol_arg="$ol_val"
1599                 fi
1600         done
1601         if test "$ol_arg" = "invalid" ; then
1602                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1603         fi
1604         ol_with_threads="$ol_arg"
1605
1606 else
1607         ol_with_threads="auto"
1608 fi
1609 # end --with-threads
1610
1611 # OpenLDAP --with-tls
1612         # Check whether --with-tls or --without-tls was given.
1613 if test "${with_tls+set}" = set; then
1614   withval="$with_tls"
1615   
1616         ol_arg=invalid
1617         for ol_val in auto ssleay openssl yes no  ; do
1618                 if test "$withval" = "$ol_val" ; then
1619                         ol_arg="$ol_val"
1620                 fi
1621         done
1622         if test "$ol_arg" = "invalid" ; then
1623                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1624         fi
1625         ol_with_tls="$ol_arg"
1626
1627 else
1628         ol_with_tls="auto"
1629 fi
1630 # end --with-tls
1631
1632 # OpenLDAP --with-yielding_select
1633         # Check whether --with-yielding_select or --without-yielding_select was given.
1634 if test "${with_yielding_select+set}" = set; then
1635   withval="$with_yielding_select"
1636   
1637         ol_arg=invalid
1638         for ol_val in auto yes no manual  ; do
1639                 if test "$withval" = "$ol_val" ; then
1640                         ol_arg="$ol_val"
1641                 fi
1642         done
1643         if test "$ol_arg" = "invalid" ; then
1644                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1645         fi
1646         ol_with_yielding_select="$ol_arg"
1647
1648 else
1649         ol_with_yielding_select="auto"
1650 fi
1651 # end --with-yielding_select
1652
1653
1654
1655 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1656 if test "${with_xxslapdoptions+set}" = set; then
1657   withval="$with_xxslapdoptions"
1658   :
1659 fi
1660
1661 # OpenLDAP --enable-slapd
1662         # Check whether --enable-slapd or --disable-slapd was given.
1663 if test "${enable_slapd+set}" = set; then
1664   enableval="$enable_slapd"
1665   
1666         ol_arg=invalid
1667         for ol_val in auto yes no ; do
1668                 if test "$enableval" = "$ol_val" ; then
1669                         ol_arg="$ol_val"
1670                 fi
1671         done
1672         if test "$ol_arg" = "invalid" ; then
1673                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1674         fi
1675         ol_enable_slapd="$ol_arg"
1676
1677 else
1678         ol_enable_slapd="yes"
1679 fi
1680 # end --enable-slapd
1681 # OpenLDAP --enable-aci
1682         # Check whether --enable-aci or --disable-aci was given.
1683 if test "${enable_aci+set}" = set; then
1684   enableval="$enable_aci"
1685   
1686         ol_arg=invalid
1687         for ol_val in auto yes no ; do
1688                 if test "$enableval" = "$ol_val" ; then
1689                         ol_arg="$ol_val"
1690                 fi
1691         done
1692         if test "$ol_arg" = "invalid" ; then
1693                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1694         fi
1695         ol_enable_aci="$ol_arg"
1696
1697 else
1698         ol_enable_aci="no"
1699 fi
1700 # end --enable-aci
1701 # OpenLDAP --enable-cleartext
1702         # Check whether --enable-cleartext or --disable-cleartext was given.
1703 if test "${enable_cleartext+set}" = set; then
1704   enableval="$enable_cleartext"
1705   
1706         ol_arg=invalid
1707         for ol_val in auto yes no ; do
1708                 if test "$enableval" = "$ol_val" ; then
1709                         ol_arg="$ol_val"
1710                 fi
1711         done
1712         if test "$ol_arg" = "invalid" ; then
1713                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1714         fi
1715         ol_enable_cleartext="$ol_arg"
1716
1717 else
1718         ol_enable_cleartext="yes"
1719 fi
1720 # end --enable-cleartext
1721 # OpenLDAP --enable-crypt
1722         # Check whether --enable-crypt or --disable-crypt was given.
1723 if test "${enable_crypt+set}" = set; then
1724   enableval="$enable_crypt"
1725   
1726         ol_arg=invalid
1727         for ol_val in auto yes no ; do
1728                 if test "$enableval" = "$ol_val" ; then
1729                         ol_arg="$ol_val"
1730                 fi
1731         done
1732         if test "$ol_arg" = "invalid" ; then
1733                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1734         fi
1735         ol_enable_crypt="$ol_arg"
1736
1737 else
1738         ol_enable_crypt="no"
1739 fi
1740 # end --enable-crypt
1741 ol_enable_kpasswd=${ol_enable_kpasswd-no}
1742 # OpenLDAP --enable-lmpasswd
1743         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1744 if test "${enable_lmpasswd+set}" = set; then
1745   enableval="$enable_lmpasswd"
1746   
1747         ol_arg=invalid
1748         for ol_val in auto yes no ; do
1749                 if test "$enableval" = "$ol_val" ; then
1750                         ol_arg="$ol_val"
1751                 fi
1752         done
1753         if test "$ol_arg" = "invalid" ; then
1754                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1755         fi
1756         ol_enable_lmpasswd="$ol_arg"
1757
1758 else
1759         ol_enable_lmpasswd="no"
1760 fi
1761 # end --enable-lmpasswd
1762 # OpenLDAP --enable-spasswd
1763         # Check whether --enable-spasswd or --disable-spasswd was given.
1764 if test "${enable_spasswd+set}" = set; then
1765   enableval="$enable_spasswd"
1766   
1767         ol_arg=invalid
1768         for ol_val in auto yes no ; do
1769                 if test "$enableval" = "$ol_val" ; then
1770                         ol_arg="$ol_val"
1771                 fi
1772         done
1773         if test "$ol_arg" = "invalid" ; then
1774                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1775         fi
1776         ol_enable_spasswd="$ol_arg"
1777
1778 else
1779         ol_enable_spasswd="no"
1780 fi
1781 # end --enable-spasswd
1782 # OpenLDAP --enable-modules
1783         # Check whether --enable-modules or --disable-modules was given.
1784 if test "${enable_modules+set}" = set; then
1785   enableval="$enable_modules"
1786   
1787         ol_arg=invalid
1788         for ol_val in auto yes no ; do
1789                 if test "$enableval" = "$ol_val" ; then
1790                         ol_arg="$ol_val"
1791                 fi
1792         done
1793         if test "$ol_arg" = "invalid" ; then
1794                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1795         fi
1796         ol_enable_modules="$ol_arg"
1797
1798 else
1799         ol_enable_modules="no"
1800 fi
1801 # end --enable-modules
1802 ol_enable_multimaster=${ol_enable_multimaster-no}
1803 # OpenLDAP --enable-rewrite
1804         # Check whether --enable-rewrite or --disable-rewrite was given.
1805 if test "${enable_rewrite+set}" = set; then
1806   enableval="$enable_rewrite"
1807   
1808         ol_arg=invalid
1809         for ol_val in auto yes no ; do
1810                 if test "$enableval" = "$ol_val" ; then
1811                         ol_arg="$ol_val"
1812                 fi
1813         done
1814         if test "$ol_arg" = "invalid" ; then
1815                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1816         fi
1817         ol_enable_rewrite="$ol_arg"
1818
1819 else
1820         ol_enable_rewrite="no"
1821 fi
1822 # end --enable-rewrite
1823 # OpenLDAP --enable-rlookups
1824         # Check whether --enable-rlookups or --disable-rlookups was given.
1825 if test "${enable_rlookups+set}" = set; then
1826   enableval="$enable_rlookups"
1827   
1828         ol_arg=invalid
1829         for ol_val in auto yes no ; do
1830                 if test "$enableval" = "$ol_val" ; then
1831                         ol_arg="$ol_val"
1832                 fi
1833         done
1834         if test "$ol_arg" = "invalid" ; then
1835                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1836         fi
1837         ol_enable_rlookups="$ol_arg"
1838
1839 else
1840         ol_enable_rlookups="no"
1841 fi
1842 # end --enable-rlookups
1843 # OpenLDAP --enable-slapi
1844         # Check whether --enable-slapi or --disable-slapi was given.
1845 if test "${enable_slapi+set}" = set; then
1846   enableval="$enable_slapi"
1847   
1848         ol_arg=invalid
1849         for ol_val in auto yes no ; do
1850                 if test "$enableval" = "$ol_val" ; then
1851                         ol_arg="$ol_val"
1852                 fi
1853         done
1854         if test "$ol_arg" = "invalid" ; then
1855                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1856         fi
1857         ol_enable_slapi="$ol_arg"
1858
1859 else
1860         ol_enable_slapi="no"
1861 fi
1862 # end --enable-slapi
1863 # OpenLDAP --enable-slp
1864         # Check whether --enable-slp or --disable-slp was given.
1865 if test "${enable_slp+set}" = set; then
1866   enableval="$enable_slp"
1867   
1868         ol_arg=invalid
1869         for ol_val in auto yes no ; do
1870                 if test "$enableval" = "$ol_val" ; then
1871                         ol_arg="$ol_val"
1872                 fi
1873         done
1874         if test "$ol_arg" = "invalid" ; then
1875                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1876         fi
1877         ol_enable_slp="$ol_arg"
1878
1879 else
1880         ol_enable_slp="no"
1881 fi
1882 # end --enable-slp
1883 # OpenLDAP --enable-wrappers
1884         # Check whether --enable-wrappers or --disable-wrappers was given.
1885 if test "${enable_wrappers+set}" = set; then
1886   enableval="$enable_wrappers"
1887   
1888         ol_arg=invalid
1889         for ol_val in auto yes no ; do
1890                 if test "$enableval" = "$ol_val" ; then
1891                         ol_arg="$ol_val"
1892                 fi
1893         done
1894         if test "$ol_arg" = "invalid" ; then
1895                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1896         fi
1897         ol_enable_wrappers="$ol_arg"
1898
1899 else
1900         ol_enable_wrappers="no"
1901 fi
1902 # end --enable-wrappers
1903
1904
1905 # OpenLDAP --enable-bdb
1906         # Check whether --enable-bdb or --disable-bdb was given.
1907 if test "${enable_bdb+set}" = set; then
1908   enableval="$enable_bdb"
1909   
1910         ol_arg=invalid
1911         for ol_val in auto yes no ; do
1912                 if test "$enableval" = "$ol_val" ; then
1913                         ol_arg="$ol_val"
1914                 fi
1915         done
1916         if test "$ol_arg" = "invalid" ; then
1917                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1918         fi
1919         ol_enable_bdb="$ol_arg"
1920
1921 else
1922         ol_enable_bdb="yes"
1923 fi
1924 # end --enable-bdb
1925 # OpenLDAP --with-bdb_module
1926         # Check whether --with-bdb_module or --without-bdb_module was given.
1927 if test "${with_bdb_module+set}" = set; then
1928   withval="$with_bdb_module"
1929   
1930         ol_arg=invalid
1931         for ol_val in static dynamic ; do
1932                 if test "$withval" = "$ol_val" ; then
1933                         ol_arg="$ol_val"
1934                 fi
1935         done
1936         if test "$ol_arg" = "invalid" ; then
1937                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1938         fi
1939         ol_with_bdb_module="$ol_arg"
1940
1941 else
1942         ol_with_bdb_module="static"
1943 fi
1944 # end --with-bdb_module
1945
1946 # OpenLDAP --enable-dnssrv
1947         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1948 if test "${enable_dnssrv+set}" = set; then
1949   enableval="$enable_dnssrv"
1950   
1951         ol_arg=invalid
1952         for ol_val in auto yes no ; do
1953                 if test "$enableval" = "$ol_val" ; then
1954                         ol_arg="$ol_val"
1955                 fi
1956         done
1957         if test "$ol_arg" = "invalid" ; then
1958                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1959         fi
1960         ol_enable_dnssrv="$ol_arg"
1961
1962 else
1963         ol_enable_dnssrv="no"
1964 fi
1965 # end --enable-dnssrv
1966 # OpenLDAP --with-dnssrv_module
1967         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1968 if test "${with_dnssrv_module+set}" = set; then
1969   withval="$with_dnssrv_module"
1970   
1971         ol_arg=invalid
1972         for ol_val in static dynamic ; do
1973                 if test "$withval" = "$ol_val" ; then
1974                         ol_arg="$ol_val"
1975                 fi
1976         done
1977         if test "$ol_arg" = "invalid" ; then
1978                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1979         fi
1980         ol_with_dnssrv_module="$ol_arg"
1981
1982 else
1983         ol_with_dnssrv_module="static"
1984 fi
1985 # end --with-dnssrv_module
1986
1987 # OpenLDAP --enable-hdb
1988         # Check whether --enable-hdb or --disable-hdb was given.
1989 if test "${enable_hdb+set}" = set; then
1990   enableval="$enable_hdb"
1991   
1992         ol_arg=invalid
1993         for ol_val in auto yes no ; do
1994                 if test "$enableval" = "$ol_val" ; then
1995                         ol_arg="$ol_val"
1996                 fi
1997         done
1998         if test "$ol_arg" = "invalid" ; then
1999                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
2000         fi
2001         ol_enable_hdb="$ol_arg"
2002
2003 else
2004         ol_enable_hdb="no"
2005 fi
2006 # end --enable-hdb
2007 # OpenLDAP --with-hdb_module
2008         # Check whether --with-hdb_module or --without-hdb_module was given.
2009 if test "${with_hdb_module+set}" = set; then
2010   withval="$with_hdb_module"
2011   
2012         ol_arg=invalid
2013         for ol_val in static dynamic ; do
2014                 if test "$withval" = "$ol_val" ; then
2015                         ol_arg="$ol_val"
2016                 fi
2017         done
2018         if test "$ol_arg" = "invalid" ; then
2019                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2020         fi
2021         ol_with_hdb_module="$ol_arg"
2022
2023 else
2024         ol_with_hdb_module="static"
2025 fi
2026 # end --with-hdb_module
2027
2028 # OpenLDAP --enable-ldap
2029         # Check whether --enable-ldap or --disable-ldap was given.
2030 if test "${enable_ldap+set}" = set; then
2031   enableval="$enable_ldap"
2032   
2033         ol_arg=invalid
2034         for ol_val in auto yes no ; do
2035                 if test "$enableval" = "$ol_val" ; then
2036                         ol_arg="$ol_val"
2037                 fi
2038         done
2039         if test "$ol_arg" = "invalid" ; then
2040                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2041         fi
2042         ol_enable_ldap="$ol_arg"
2043
2044 else
2045         ol_enable_ldap="no"
2046 fi
2047 # end --enable-ldap
2048 # OpenLDAP --with-ldap_module
2049         # Check whether --with-ldap_module or --without-ldap_module was given.
2050 if test "${with_ldap_module+set}" = set; then
2051   withval="$with_ldap_module"
2052   
2053         ol_arg=invalid
2054         for ol_val in static dynamic ; do
2055                 if test "$withval" = "$ol_val" ; then
2056                         ol_arg="$ol_val"
2057                 fi
2058         done
2059         if test "$ol_arg" = "invalid" ; then
2060                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2061         fi
2062         ol_with_ldap_module="$ol_arg"
2063
2064 else
2065         ol_with_ldap_module="static"
2066 fi
2067 # end --with-ldap_module
2068
2069 # OpenLDAP --enable-ldbm
2070         # Check whether --enable-ldbm or --disable-ldbm was given.
2071 if test "${enable_ldbm+set}" = set; then
2072   enableval="$enable_ldbm"
2073   
2074         ol_arg=invalid
2075         for ol_val in auto yes no ; do
2076                 if test "$enableval" = "$ol_val" ; then
2077                         ol_arg="$ol_val"
2078                 fi
2079         done
2080         if test "$ol_arg" = "invalid" ; then
2081                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2082         fi
2083         ol_enable_ldbm="$ol_arg"
2084
2085 else
2086         ol_enable_ldbm="no"
2087 fi
2088 # end --enable-ldbm
2089 # OpenLDAP --with-ldbm_api
2090         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2091 if test "${with_ldbm_api+set}" = set; then
2092   withval="$with_ldbm_api"
2093   
2094         ol_arg=invalid
2095         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2096                 if test "$withval" = "$ol_val" ; then
2097                         ol_arg="$ol_val"
2098                 fi
2099         done
2100         if test "$ol_arg" = "invalid" ; then
2101                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2102         fi
2103         ol_with_ldbm_api="$ol_arg"
2104
2105 else
2106         ol_with_ldbm_api="auto"
2107 fi
2108 # end --with-ldbm_api
2109
2110 # OpenLDAP --with-ldbm_module
2111         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2112 if test "${with_ldbm_module+set}" = set; then
2113   withval="$with_ldbm_module"
2114   
2115         ol_arg=invalid
2116         for ol_val in static dynamic ; do
2117                 if test "$withval" = "$ol_val" ; then
2118                         ol_arg="$ol_val"
2119                 fi
2120         done
2121         if test "$ol_arg" = "invalid" ; then
2122                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2123         fi
2124         ol_with_ldbm_module="$ol_arg"
2125
2126 else
2127         ol_with_ldbm_module="static"
2128 fi
2129 # end --with-ldbm_module
2130
2131 # OpenLDAP --with-ldbm_type
2132         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2133 if test "${with_ldbm_type+set}" = set; then
2134   withval="$with_ldbm_type"
2135   
2136         ol_arg=invalid
2137         for ol_val in auto btree hash ; do
2138                 if test "$withval" = "$ol_val" ; then
2139                         ol_arg="$ol_val"
2140                 fi
2141         done
2142         if test "$ol_arg" = "invalid" ; then
2143                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2144         fi
2145         ol_with_ldbm_type="$ol_arg"
2146
2147 else
2148         ol_with_ldbm_type="auto"
2149 fi
2150 # end --with-ldbm_type
2151
2152 # OpenLDAP --enable-meta
2153         # Check whether --enable-meta or --disable-meta was given.
2154 if test "${enable_meta+set}" = set; then
2155   enableval="$enable_meta"
2156   
2157         ol_arg=invalid
2158         for ol_val in auto yes no ; do
2159                 if test "$enableval" = "$ol_val" ; then
2160                         ol_arg="$ol_val"
2161                 fi
2162         done
2163         if test "$ol_arg" = "invalid" ; then
2164                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2165         fi
2166         ol_enable_meta="$ol_arg"
2167
2168 else
2169         ol_enable_meta="no"
2170 fi
2171 # end --enable-meta
2172 # OpenLDAP --with-meta_module
2173         # Check whether --with-meta_module or --without-meta_module was given.
2174 if test "${with_meta_module+set}" = set; then
2175   withval="$with_meta_module"
2176   
2177         ol_arg=invalid
2178         for ol_val in static dynamic ; do
2179                 if test "$withval" = "$ol_val" ; then
2180                         ol_arg="$ol_val"
2181                 fi
2182         done
2183         if test "$ol_arg" = "invalid" ; then
2184                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2185         fi
2186         ol_with_meta_module="$ol_arg"
2187
2188 else
2189         ol_with_meta_module="static"
2190 fi
2191 # end --with-meta_module
2192
2193 # OpenLDAP --enable-monitor
2194         # Check whether --enable-monitor or --disable-monitor was given.
2195 if test "${enable_monitor+set}" = set; then
2196   enableval="$enable_monitor"
2197   
2198         ol_arg=invalid
2199         for ol_val in auto yes no ; do
2200                 if test "$enableval" = "$ol_val" ; then
2201                         ol_arg="$ol_val"
2202                 fi
2203         done
2204         if test "$ol_arg" = "invalid" ; then
2205                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2206         fi
2207         ol_enable_monitor="$ol_arg"
2208
2209 else
2210         ol_enable_monitor="yes"
2211 fi
2212 # end --enable-monitor
2213 # OpenLDAP --with-monitor_module
2214         # Check whether --with-monitor_module or --without-monitor_module was given.
2215 if test "${with_monitor_module+set}" = set; then
2216   withval="$with_monitor_module"
2217   
2218         ol_arg=invalid
2219         for ol_val in static dynamic ; do
2220                 if test "$withval" = "$ol_val" ; then
2221                         ol_arg="$ol_val"
2222                 fi
2223         done
2224         if test "$ol_arg" = "invalid" ; then
2225                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2226         fi
2227         ol_with_monitor_module="$ol_arg"
2228
2229 else
2230         ol_with_monitor_module="static"
2231 fi
2232 # end --with-monitor_module
2233
2234 # OpenLDAP --enable-null
2235         # Check whether --enable-null or --disable-null was given.
2236 if test "${enable_null+set}" = set; then
2237   enableval="$enable_null"
2238   
2239         ol_arg=invalid
2240         for ol_val in auto yes no ; do
2241                 if test "$enableval" = "$ol_val" ; then
2242                         ol_arg="$ol_val"
2243                 fi
2244         done
2245         if test "$ol_arg" = "invalid" ; then
2246                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2247         fi
2248         ol_enable_null="$ol_arg"
2249
2250 else
2251         ol_enable_null="no"
2252 fi
2253 # end --enable-null
2254 # OpenLDAP --with-null_module
2255         # Check whether --with-null_module or --without-null_module was given.
2256 if test "${with_null_module+set}" = set; then
2257   withval="$with_null_module"
2258   
2259         ol_arg=invalid
2260         for ol_val in static dynamic ; do
2261                 if test "$withval" = "$ol_val" ; then
2262                         ol_arg="$ol_val"
2263                 fi
2264         done
2265         if test "$ol_arg" = "invalid" ; then
2266                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2267         fi
2268         ol_with_null_module="$ol_arg"
2269
2270 else
2271         ol_with_null_module="static"
2272 fi
2273 # end --with-null_module
2274
2275 # OpenLDAP --enable-passwd
2276         # Check whether --enable-passwd or --disable-passwd was given.
2277 if test "${enable_passwd+set}" = set; then
2278   enableval="$enable_passwd"
2279   
2280         ol_arg=invalid
2281         for ol_val in auto yes no ; do
2282                 if test "$enableval" = "$ol_val" ; then
2283                         ol_arg="$ol_val"
2284                 fi
2285         done
2286         if test "$ol_arg" = "invalid" ; then
2287                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2288         fi
2289         ol_enable_passwd="$ol_arg"
2290
2291 else
2292         ol_enable_passwd="no"
2293 fi
2294 # end --enable-passwd
2295 # OpenLDAP --with-passwd_module
2296         # Check whether --with-passwd_module or --without-passwd_module was given.
2297 if test "${with_passwd_module+set}" = set; then
2298   withval="$with_passwd_module"
2299   
2300         ol_arg=invalid
2301         for ol_val in static dynamic ; do
2302                 if test "$withval" = "$ol_val" ; then
2303                         ol_arg="$ol_val"
2304                 fi
2305         done
2306         if test "$ol_arg" = "invalid" ; then
2307                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2308         fi
2309         ol_with_passwd_module="$ol_arg"
2310
2311 else
2312         ol_with_passwd_module="static"
2313 fi
2314 # end --with-passwd_module
2315
2316 # OpenLDAP --enable-perl
2317         # Check whether --enable-perl or --disable-perl was given.
2318 if test "${enable_perl+set}" = set; then
2319   enableval="$enable_perl"
2320   
2321         ol_arg=invalid
2322         for ol_val in auto yes no ; do
2323                 if test "$enableval" = "$ol_val" ; then
2324                         ol_arg="$ol_val"
2325                 fi
2326         done
2327         if test "$ol_arg" = "invalid" ; then
2328                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2329         fi
2330         ol_enable_perl="$ol_arg"
2331
2332 else
2333         ol_enable_perl="no"
2334 fi
2335 # end --enable-perl
2336 # OpenLDAP --with-perl_module
2337         # Check whether --with-perl_module or --without-perl_module was given.
2338 if test "${with_perl_module+set}" = set; then
2339   withval="$with_perl_module"
2340   
2341         ol_arg=invalid
2342         for ol_val in static dynamic ; do
2343                 if test "$withval" = "$ol_val" ; then
2344                         ol_arg="$ol_val"
2345                 fi
2346         done
2347         if test "$ol_arg" = "invalid" ; then
2348                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2349         fi
2350         ol_with_perl_module="$ol_arg"
2351
2352 else
2353         ol_with_perl_module="static"
2354 fi
2355 # end --with-perl_module
2356
2357 # OpenLDAP --enable-shell
2358         # Check whether --enable-shell or --disable-shell was given.
2359 if test "${enable_shell+set}" = set; then
2360   enableval="$enable_shell"
2361   
2362         ol_arg=invalid
2363         for ol_val in auto yes no ; do
2364                 if test "$enableval" = "$ol_val" ; then
2365                         ol_arg="$ol_val"
2366                 fi
2367         done
2368         if test "$ol_arg" = "invalid" ; then
2369                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2370         fi
2371         ol_enable_shell="$ol_arg"
2372
2373 else
2374         ol_enable_shell="no"
2375 fi
2376 # end --enable-shell
2377 # OpenLDAP --with-shell_module
2378         # Check whether --with-shell_module or --without-shell_module was given.
2379 if test "${with_shell_module+set}" = set; then
2380   withval="$with_shell_module"
2381   
2382         ol_arg=invalid
2383         for ol_val in static dynamic ; do
2384                 if test "$withval" = "$ol_val" ; then
2385                         ol_arg="$ol_val"
2386                 fi
2387         done
2388         if test "$ol_arg" = "invalid" ; then
2389                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2390         fi
2391         ol_with_shell_module="$ol_arg"
2392
2393 else
2394         ol_with_shell_module="static"
2395 fi
2396 # end --with-shell_module
2397
2398 # OpenLDAP --enable-sql
2399         # Check whether --enable-sql or --disable-sql was given.
2400 if test "${enable_sql+set}" = set; then
2401   enableval="$enable_sql"
2402   
2403         ol_arg=invalid
2404         for ol_val in auto yes no ; do
2405                 if test "$enableval" = "$ol_val" ; then
2406                         ol_arg="$ol_val"
2407                 fi
2408         done
2409         if test "$ol_arg" = "invalid" ; then
2410                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2411         fi
2412         ol_enable_sql="$ol_arg"
2413
2414 else
2415         ol_enable_sql="no"
2416 fi
2417 # end --enable-sql
2418 # OpenLDAP --with-sql_module
2419         # Check whether --with-sql_module or --without-sql_module was given.
2420 if test "${with_sql_module+set}" = set; then
2421   withval="$with_sql_module"
2422   
2423         ol_arg=invalid
2424         for ol_val in static dynamic ; do
2425                 if test "$withval" = "$ol_val" ; then
2426                         ol_arg="$ol_val"
2427                 fi
2428         done
2429         if test "$ol_arg" = "invalid" ; then
2430                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2431         fi
2432         ol_with_sql_module="$ol_arg"
2433
2434 else
2435         ol_with_sql_module="static"
2436 fi
2437 # end --with-sql_module
2438
2439
2440 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2441 if test "${with_xxslapoverlays+set}" = set; then
2442   withval="$with_xxslapoverlays"
2443   :
2444 fi
2445
2446 # OpenLDAP --with-dyngroup
2447         # Check whether --with-dyngroup or --without-dyngroup was given.
2448 if test "${with_dyngroup+set}" = set; then
2449   withval="$with_dyngroup"
2450   
2451         ol_arg=invalid
2452         for ol_val in no yes mod ; do
2453                 if test "$withval" = "$ol_val" ; then
2454                         ol_arg="$ol_val"
2455                 fi
2456         done
2457         if test "$ol_arg" = "invalid" ; then
2458                 { echo "configure: error: bad value $withval for --with-dyngroup" 1>&2; exit 1; }
2459         fi
2460         ol_with_dyngroup="$ol_arg"
2461
2462 else
2463         ol_with_dyngroup="no"
2464 fi
2465 # end --with-dyngroup
2466
2467 # OpenLDAP --with-proxycache
2468         # Check whether --with-proxycache or --without-proxycache was given.
2469 if test "${with_proxycache+set}" = set; then
2470   withval="$with_proxycache"
2471   
2472         ol_arg=invalid
2473         for ol_val in no yes mod ; do
2474                 if test "$withval" = "$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 $withval for --with-proxycache" 1>&2; exit 1; }
2480         fi
2481         ol_with_proxycache="$ol_arg"
2482
2483 else
2484         ol_with_proxycache="no"
2485 fi
2486 # end --with-proxycache
2487
2488 # OpenLDAP --with-rwm
2489         # Check whether --with-rwm or --without-rwm was given.
2490 if test "${with_rwm+set}" = set; then
2491   withval="$with_rwm"
2492   
2493         ol_arg=invalid
2494         for ol_val in no yes mod ; do
2495                 if test "$withval" = "$ol_val" ; then
2496                         ol_arg="$ol_val"
2497                 fi
2498         done
2499         if test "$ol_arg" = "invalid" ; then
2500                 { echo "configure: error: bad value $withval for --with-rwm" 1>&2; exit 1; }
2501         fi
2502         ol_with_rwm="$ol_arg"
2503
2504 else
2505         ol_with_rwm="no"
2506 fi
2507 # end --with-rwm
2508
2509
2510 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2511 if test "${with_xxslurpdoptions+set}" = set; then
2512   withval="$with_xxslurpdoptions"
2513   :
2514 fi
2515
2516 # OpenLDAP --enable-slurpd
2517         # Check whether --enable-slurpd or --disable-slurpd was given.
2518 if test "${enable_slurpd+set}" = set; then
2519   enableval="$enable_slurpd"
2520   
2521         ol_arg=invalid
2522         for ol_val in auto yes no ; do
2523                 if test "$enableval" = "$ol_val" ; then
2524                         ol_arg="$ol_val"
2525                 fi
2526         done
2527         if test "$ol_arg" = "invalid" ; then
2528                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2529         fi
2530         ol_enable_slurpd="$ol_arg"
2531
2532 else
2533         ol_enable_slurpd="auto"
2534 fi
2535 # end --enable-slurpd
2536
2537 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2538 if test "${with_xxliboptions+set}" = set; then
2539   withval="$with_xxliboptions"
2540   :
2541 fi
2542
2543 # Check whether --enable-static or --disable-static was given.
2544 if test "${enable_static+set}" = set; then
2545   enableval="$enable_static"
2546   p=${PACKAGE-default}
2547 case $enableval in
2548 yes) enable_static=yes ;;
2549 no) enable_static=no ;;
2550 *)
2551   enable_static=no
2552   # Look at the argument we got.  We use all the common list separators.
2553   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2554   for pkg in $enableval; do
2555     if test "X$pkg" = "X$p"; then
2556       enable_static=yes
2557     fi
2558   done
2559   IFS="$ac_save_ifs"
2560   ;;
2561 esac
2562 else
2563   enable_static=yes
2564 fi
2565
2566 # Check whether --enable-shared or --disable-shared was given.
2567 if test "${enable_shared+set}" = set; then
2568   enableval="$enable_shared"
2569   p=${PACKAGE-default}
2570 case $enableval in
2571 yes) enable_shared=yes ;;
2572 no) enable_shared=no ;;
2573 *)
2574   enable_shared=no
2575   # Look at the argument we got.  We use all the common list separators.
2576   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2577   for pkg in $enableval; do
2578     if test "X$pkg" = "X$p"; then
2579       enable_shared=yes
2580     fi
2581   done
2582   IFS="$ac_save_ifs"
2583   ;;
2584 esac
2585 else
2586   enable_shared=yes
2587 fi
2588
2589
2590
2591 # validate options
2592 if test $ol_enable_slapd = no ; then
2593                 if test $ol_enable_slapi = yes ; then
2594                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2595         fi
2596         if test $ol_enable_bdb = yes ; then
2597                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2598         fi
2599         if test $ol_enable_dnssrv = yes ; then
2600                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2601         fi
2602         if test $ol_enable_hdb = yes ; then
2603                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2604         fi
2605         if test $ol_enable_ldap = yes ; then
2606                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2607         fi
2608         if test $ol_enable_ldbm = yes ; then
2609                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2610         fi
2611         if test $ol_enable_meta = yes ; then
2612                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2613         fi
2614         if test $ol_enable_monitor = yes ; then
2615                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2616         fi
2617         if test $ol_enable_null = yes ; then
2618                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2619         fi
2620         if test $ol_enable_passwd = yes ; then
2621                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2622         fi
2623         if test $ol_enable_perl = yes ; then
2624                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2625         fi
2626         if test $ol_enable_shell = yes ; then
2627                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2628         fi
2629         if test $ol_enable_sql = yes ; then
2630                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2631         fi
2632         if test $ol_enable_modules = yes ; then
2633                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2634         fi
2635         if test $ol_enable_multimaster = yes ; then
2636                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2637         fi
2638         if test $ol_enable_wrappers = yes ; then
2639                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2640         fi
2641         if test $ol_enable_rlookups = yes ; then
2642                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2643         fi
2644         if test $ol_enable_aci = yes ; then
2645                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2646         fi
2647         if test $ol_with_ldbm_api != auto ; then
2648                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2649         fi
2650         if test $ol_with_ldbm_type != auto ; then
2651                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2652         fi
2653         if test $ol_with_bdb_module != static ; then
2654                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2655         fi
2656         if test $ol_with_dnssrv_module != static ; then
2657                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2658         fi
2659         if test $ol_with_hdb_module != static ; then
2660                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2661         fi
2662         if test $ol_with_ldap_module != static ; then
2663                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2664         fi
2665         if test $ol_with_ldbm_module != static ; then
2666                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2667         fi
2668         if test $ol_with_meta_module != static ; then
2669                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2670         fi
2671         if test $ol_with_monitor_module != static ; then
2672                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2673         fi
2674         if test $ol_with_null_module != static ; then
2675                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2676         fi
2677         if test $ol_with_passwd_module != static ; then
2678                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2679         fi
2680         if test $ol_with_perl_module != static ; then
2681                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2682         fi
2683         if test $ol_with_shell_module != static ; then
2684                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2685         fi
2686         if test $ol_with_sql_module != static ; then
2687                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2688         fi
2689         if test $ol_enable_slurpd = yes ; then
2690                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2691         fi
2692         if test $ol_enable_rewrite = yes ; then
2693                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2694         fi
2695         if test $ol_with_dyngroup != no ; then
2696                 echo "configure: warning: slapd disabled, ignoring --with-dyngroup argument" 1>&2
2697         fi
2698         if test $ol_with_proxycache != no ; then
2699                 echo "configure: warning: slapd disabled, ignoring --with-proxycache argument" 1>&2
2700         fi
2701         if test $ol_with_rwm != no ; then
2702                 echo "configure: warning: slapd disabled, ignoring --with-rwm argument" 1>&2
2703         fi
2704
2705         # force settings to no
2706         ol_enable_slapi=no
2707         ol_enable_bdb=no
2708         ol_enable_dnssrv=no
2709         ol_enable_hdb=no
2710         ol_enable_ldap=no
2711         ol_enable_ldbm=no
2712         ol_enable_meta=no
2713         ol_enable_monitor=no
2714         ol_enable_null=no
2715         ol_enable_passwd=no
2716         ol_enable_perl=no
2717         ol_enable_shell=no
2718         ol_enable_sql=no
2719
2720         ol_enable_modules=no
2721         ol_enable_multimaster=no
2722         ol_enable_rlookups=no
2723         ol_enable_aci=no
2724         ol_enable_wrappers=no
2725
2726         ol_with_ldbm_api=no
2727         ol_with_ldbm_type=no
2728
2729         ol_with_bdb_module=static
2730         ol_with_dnssrv_module=static
2731         ol_with_hdb_module=static
2732         ol_with_ldap_module=static
2733         ol_with_ldbm_module=static
2734         ol_with_meta_module=static
2735         ol_with_monitor_module=static
2736         ol_with_null_module=static
2737         ol_with_passwd_module=static
2738         ol_with_perl_module=static
2739         ol_with_shell_module=static
2740         ol_with_sql_module=static
2741
2742         ol_enable_slurpd=no
2743
2744         ol_enable_rewrite=no
2745
2746         ol_with_dyngroup=no
2747         ol_with_proxycache=no
2748         ol_with_rwm=no
2749
2750 elif test $ol_enable_ldbm = no ; then
2751         
2752         if test $ol_with_ldbm_api != auto ; then
2753                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2754         fi
2755
2756         if test $ol_with_ldbm_type != auto ; then
2757                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2758         fi
2759
2760         if test $ol_with_ldbm_module != static ; then
2761                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2762         fi
2763
2764         if test $ol_enable_modules != yes -a \
2765                 $ol_enable_bdb = no -a \
2766                 $ol_enable_dnssrv = no -a \
2767                 $ol_enable_hdb = no -a \
2768                 $ol_enable_ldap = no -a \
2769                 $ol_enable_meta = no -a \
2770                 $ol_enable_monitor = no -a \
2771                 $ol_enable_null = no -a \
2772                 $ol_enable_passwd = no -a \
2773                 $ol_enable_perl = no -a \
2774                 $ol_enable_shell = no -a \
2775                 $ol_enable_sql = no ; then
2776
2777                 if test $ol_enable_slapd = yes ; then
2778                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2779                 else
2780                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2781                         ol_enable_slapd=no
2782                 fi
2783         fi
2784
2785         ol_with_ldbm_api=no
2786         ol_with_ldbm_type=no
2787         ol_with_ldbm_module=static
2788
2789         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2790                 ol_with_ldbm_api=berkeley
2791         fi
2792
2793 else
2794                 if test $ol_with_ldbm_api = gdbm -a \
2795                 $ol_with_ldbm_type = btree ; then
2796                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2797         fi
2798         if test $ol_with_ldbm_api = mdbm -a \
2799                 $ol_with_ldbm_type = btree ; then
2800                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2801         fi
2802         if test $ol_with_ldbm_api = ndbm -a \
2803                 $ol_with_ldbm_type = btree ; then
2804                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2805         fi
2806
2807         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2808                 if test $ol_with_ldbm_api = auto ; then
2809                         ol_with_ldbm_api=berkeley
2810                 elif test $ol_with_ldbm_api != berkeley ; then
2811                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2812                 fi
2813
2814         elif test $ol_enable_bdb = auto ; then
2815                 if test $ol_with_ldbm_api != berkeley \
2816                         -o $ol_with_ldbm_api != auto ; then
2817                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2818                         ol_enable_bdb=no
2819                 fi
2820         fi
2821 fi
2822
2823 if test $ol_enable_slurpd = yes ; then
2824                 if test $ol_with_threads = no ; then
2825                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2826         fi
2827 fi
2828
2829 if test $ol_enable_lmpasswd = yes ; then
2830         if test $ol_with_tls = no ; then
2831                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2832         fi
2833 fi
2834
2835 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2836         if test $ol_with_kerberos = no ; then
2837                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2838         elif test $ol_with_kerberos = auto ; then
2839                 ol_with_kerberos=yes
2840         fi
2841
2842 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2843         if test $ol_with_kerberos = auto ; then
2844                 ol_with_kerberos=no
2845         elif test $ol_with_kerberos != no ; then
2846                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2847                 ol_with_kerberos=no
2848         fi
2849 fi
2850
2851 if test $ol_enable_spasswd = yes ; then
2852         if test $ol_with_cyrus_sasl = no ; then
2853                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2854         fi
2855         ol_with_cyrus_sasl=yes
2856 fi
2857
2858 echo "$ac_t""done" 1>&6
2859
2860 LDAP_LIBS=
2861 LDBM_LIBS=
2862 LTHREAD_LIBS=
2863 LUTIL_LIBS=
2864
2865 SLAPD_LIBS=
2866 SLURPD_LIBS=
2867
2868 BUILD_SLAPD=no
2869 BUILD_SLURPD=no
2870
2871 BUILD_THREAD=no
2872
2873 BUILD_SLAPI=no
2874 SLAPD_SLAPI_DEPEND=
2875
2876 BUILD_BDB=no
2877 BUILD_DNSSRV=no
2878 BUILD_HDB=no
2879 BUILD_LDAP=no
2880 BUILD_LDBM=no
2881 BUILD_META=no
2882 BUILD_MONITOR=no
2883 BUILD_NULL=no
2884 BUILD_PASSWD=no
2885 BUILD_PERL=no
2886 BUILD_SHELL=no
2887 BUILD_SQL=no
2888
2889 BUILD_BDB_DYNAMIC=static
2890 BUILD_DNSSRV_DYNAMIC=static
2891 BUILD_HDB_DYNAMIC=static
2892 BUILD_LDAP_DYNAMIC=static
2893 BUILD_LDBM_DYNAMIC=static
2894 BUILD_META_DYNAMIC=static
2895 BUILD_MONITOR_DYNAMIC=static
2896 BUILD_NULL_DYNAMIC=static
2897 BUILD_PASSWD_DYNAMIC=static
2898 BUILD_PERL_DYNAMIC=static
2899 BUILD_SHELL_DYNAMIC=static
2900 BUILD_SQL_DYNAMIC=static
2901
2902 BUILD_DYNGROUP=no
2903 BUILD_PROXYCACHE=no
2904 BUILD_RWM=no
2905
2906 SLAPD_DYNAMIC_OVERLAYS=
2907
2908 SLAPD_MODULES_LDFLAGS=
2909 SLAPD_MODULES_CPPFLAGS=
2910
2911 SLAPD_STATIC_BACKENDS=
2912 SLAPD_DYNAMIC_BACKENDS=
2913
2914 SLAPD_PERL_LDFLAGS=
2915 MOD_PERL_LDFLAGS=
2916 PERL_CPPFLAGS=
2917
2918 SLAPD_SQL_LDFLAGS=
2919 SLAPD_SQL_LIBS=
2920 SLAPD_SQL_INCLUDES=
2921
2922 KRB4_LIBS=
2923 KRB5_LIBS=
2924 SASL_LIBS=
2925 TLS_LIBS=
2926 MODULES_LIBS=
2927 SLAPI_LIBS=
2928 LIBSLAPI=
2929 LIBSLAPITOOLS=
2930 AUTH_LIBS=
2931
2932 SLAPD_SLP_LIBS=
2933
2934
2935 # Find a good install program.  We prefer a C program (faster),
2936 # so one script is as good as another.  But avoid the broken or
2937 # incompatible versions:
2938 # SysV /etc/install, /usr/sbin/install
2939 # SunOS /usr/etc/install
2940 # IRIX /sbin/install
2941 # AIX /bin/install
2942 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2943 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2944 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2945 # ./install, which can be erroneously created by make from ./install.sh.
2946 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2947 echo "configure:2948: checking for a BSD compatible install" >&5
2948 if test -z "$INSTALL"; then
2949 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2950   echo $ac_n "(cached) $ac_c" 1>&6
2951 else
2952     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2953   for ac_dir in $PATH; do
2954     # Account for people who put trailing slashes in PATH elements.
2955     case "$ac_dir/" in
2956     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2957     *)
2958       # OSF1 and SCO ODT 3.0 have their own names for install.
2959       # Don't use installbsd from OSF since it installs stuff as root
2960       # by default.
2961       for ac_prog in ginstall scoinst install; do
2962         if test -f $ac_dir/$ac_prog; then
2963           if test $ac_prog = install &&
2964             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2965             # AIX install.  It has an incompatible calling convention.
2966             :
2967           elif test $ac_prog = install &&
2968             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2969             # program-specific install script used by HP pwplus--don't use.
2970             :
2971           else
2972             ac_cv_path_install="$ac_dir/$ac_prog -c"
2973             break 2
2974           fi
2975         fi
2976       done
2977       ;;
2978     esac
2979   done
2980   IFS="$ac_save_IFS"
2981
2982 fi
2983   if test "${ac_cv_path_install+set}" = set; then
2984     INSTALL="$ac_cv_path_install"
2985   else
2986     # As a last resort, use the slow shell script.  We don't cache a
2987     # path for INSTALL within a source directory, because that will
2988     # break other packages using the cache if that directory is
2989     # removed, or if the path is relative.
2990     INSTALL="$ac_install_sh"
2991   fi
2992 fi
2993 echo "$ac_t""$INSTALL" 1>&6
2994
2995 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2996 # It thinks the first close brace ends the variable substitution.
2997 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2998
2999 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3000
3001 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3002
3003
3004 cat >> confdefs.h <<\EOF
3005 #define HAVE_MKVERSION 1
3006 EOF
3007
3008
3009
3010
3011 ol_aix_threads=no
3012 case "$target" in
3013 *-*-aix*)       if test -z "$CC" ; then
3014                 case "$ol_with_threads" in
3015                 auto | yes |  posix) ol_aix_threads=yes ;;
3016                 esac
3017         fi
3018 ;;
3019 esac
3020
3021 if test $ol_aix_threads = yes ; then
3022         if test -z "${CC}" ; then
3023                 for ac_prog in cc_r xlc_r cc
3024 do
3025 # Extract the first word of "$ac_prog", so it can be a program name with args.
3026 set dummy $ac_prog; ac_word=$2
3027 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3028 echo "configure:3029: checking for $ac_word" >&5
3029 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3030   echo $ac_n "(cached) $ac_c" 1>&6
3031 else
3032   if test -n "$CC"; then
3033   ac_cv_prog_CC="$CC" # Let the user override the test.
3034 else
3035   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3036   ac_dummy="$PATH"
3037   for ac_dir in $ac_dummy; do
3038     test -z "$ac_dir" && ac_dir=.
3039     if test -f $ac_dir/$ac_word; then
3040       ac_cv_prog_CC="$ac_prog"
3041       break
3042     fi
3043   done
3044   IFS="$ac_save_ifs"
3045 fi
3046 fi
3047 CC="$ac_cv_prog_CC"
3048 if test -n "$CC"; then
3049   echo "$ac_t""$CC" 1>&6
3050 else
3051   echo "$ac_t""no" 1>&6
3052 fi
3053
3054 test -n "$CC" && break
3055 done
3056
3057
3058                 if test "$CC" = cc ; then
3059                                                 if test $ol_with_threads != auto ; then
3060                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3061                         else
3062                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3063                         fi
3064                         ol_with_threads=no
3065                 fi
3066         fi
3067
3068         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3069                 ol_with_threads=posix
3070                 ol_cv_pthread_create=yes
3071         fi
3072 fi
3073
3074 if test -z "${CC}"; then
3075         for ac_prog in cc gcc
3076 do
3077 # Extract the first word of "$ac_prog", so it can be a program name with args.
3078 set dummy $ac_prog; ac_word=$2
3079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3080 echo "configure:3081: checking for $ac_word" >&5
3081 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   if test -n "$CC"; then
3085   ac_cv_prog_CC="$CC" # Let the user override the test.
3086 else
3087   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3088   ac_dummy="$PATH"
3089   for ac_dir in $ac_dummy; do
3090     test -z "$ac_dir" && ac_dir=.
3091     if test -f $ac_dir/$ac_word; then
3092       ac_cv_prog_CC="$ac_prog"
3093       break
3094     fi
3095   done
3096   IFS="$ac_save_ifs"
3097 fi
3098 fi
3099 CC="$ac_cv_prog_CC"
3100 if test -n "$CC"; then
3101   echo "$ac_t""$CC" 1>&6
3102 else
3103   echo "$ac_t""no" 1>&6
3104 fi
3105
3106 test -n "$CC" && break
3107 done
3108 test -n "$CC" || CC="missing"
3109
3110
3111         if test "${CC}" = "missing" ; then
3112                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3113         fi
3114 fi
3115
3116 if test -z "${AR}"; then
3117         for ac_prog in ar gar
3118 do
3119 # Extract the first word of "$ac_prog", so it can be a program name with args.
3120 set dummy $ac_prog; ac_word=$2
3121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3122 echo "configure:3123: checking for $ac_word" >&5
3123 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3124   echo $ac_n "(cached) $ac_c" 1>&6
3125 else
3126   if test -n "$AR"; then
3127   ac_cv_prog_AR="$AR" # Let the user override the test.
3128 else
3129   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3130   ac_dummy="$PATH"
3131   for ac_dir in $ac_dummy; do
3132     test -z "$ac_dir" && ac_dir=.
3133     if test -f $ac_dir/$ac_word; then
3134       ac_cv_prog_AR="$ac_prog"
3135       break
3136     fi
3137   done
3138   IFS="$ac_save_ifs"
3139 fi
3140 fi
3141 AR="$ac_cv_prog_AR"
3142 if test -n "$AR"; then
3143   echo "$ac_t""$AR" 1>&6
3144 else
3145   echo "$ac_t""no" 1>&6
3146 fi
3147
3148 test -n "$AR" && break
3149 done
3150 test -n "$AR" || AR="missing"
3151
3152
3153         if test "${AR}" = "missing" ; then
3154                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3155         fi
3156 fi
3157
3158
3159
3160 # Find the correct PATH separator.  Usually this is `:', but
3161 # DJGPP uses `;' like DOS.
3162 if test "X${PATH_SEPARATOR+set}" != Xset; then
3163   UNAME=${UNAME-`uname 2>/dev/null`}
3164   case X$UNAME in
3165     *-DOS) lt_cv_sys_path_separator=';' ;;
3166     *)     lt_cv_sys_path_separator=':' ;;
3167   esac
3168   PATH_SEPARATOR=$lt_cv_sys_path_separator
3169 fi
3170
3171 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3172 echo "configure:3173: checking for Cygwin environment" >&5
3173 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3174   echo $ac_n "(cached) $ac_c" 1>&6
3175 else
3176   cat > conftest.$ac_ext <<EOF
3177 #line 3178 "configure"
3178 #include "confdefs.h"
3179
3180 int main() {
3181
3182 #ifndef __CYGWIN__
3183 #define __CYGWIN__ __CYGWIN32__
3184 #endif
3185 return __CYGWIN__;
3186 ; return 0; }
3187 EOF
3188 if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189   rm -rf conftest*
3190   ac_cv_cygwin=yes
3191 else
3192   echo "configure: failed program was:" >&5
3193   cat conftest.$ac_ext >&5
3194   rm -rf conftest*
3195   ac_cv_cygwin=no
3196 fi
3197 rm -f conftest*
3198 fi
3199
3200 echo "$ac_t""$ac_cv_cygwin" 1>&6
3201 CYGWIN=
3202 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3203 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3204 echo "configure:3205: checking for mingw32 environment" >&5
3205 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3206   echo $ac_n "(cached) $ac_c" 1>&6
3207 else
3208   cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211
3212 int main() {
3213 return __MINGW32__;
3214 ; return 0; }
3215 EOF
3216 if { (eval echo configure:3217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3217   rm -rf conftest*
3218   ac_cv_mingw32=yes
3219 else
3220   echo "configure: failed program was:" >&5
3221   cat conftest.$ac_ext >&5
3222   rm -rf conftest*
3223   ac_cv_mingw32=no
3224 fi
3225 rm -f conftest*
3226 fi
3227
3228 echo "$ac_t""$ac_cv_mingw32" 1>&6
3229 MINGW32=
3230 test "$ac_cv_mingw32" = yes && MINGW32=yes
3231 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3232 echo "configure:3233: checking for EMX OS/2 environment" >&5
3233 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3234   echo $ac_n "(cached) $ac_c" 1>&6
3235 else
3236   cat > conftest.$ac_ext <<EOF
3237 #line 3238 "configure"
3238 #include "confdefs.h"
3239
3240 int main() {
3241 return __EMX__;
3242 ; return 0; }
3243 EOF
3244 if { (eval echo configure:3245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3245   rm -rf conftest*
3246   ac_cv_emxos2=yes
3247 else
3248   echo "configure: failed program was:" >&5
3249   cat conftest.$ac_ext >&5
3250   rm -rf conftest*
3251   ac_cv_emxos2=no
3252 fi
3253 rm -f conftest*
3254 fi
3255
3256 echo "$ac_t""$ac_cv_emxos2" 1>&6
3257 EMXOS2=
3258 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3259 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3260 echo "configure:3261: checking how to run the C preprocessor" >&5
3261 # On Suns, sometimes $CPP names a directory.
3262 if test -n "$CPP" && test -d "$CPP"; then
3263   CPP=
3264 fi
3265 if test -z "$CPP"; then
3266 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3267   echo $ac_n "(cached) $ac_c" 1>&6
3268 else
3269     # This must be in double quotes, not single quotes, because CPP may get
3270   # substituted into the Makefile and "${CC-cc}" will confuse make.
3271   CPP="${CC-cc} -E"
3272   # On the NeXT, cc -E runs the code through the compiler's parser,
3273   # not just through cpp.
3274   cat > conftest.$ac_ext <<EOF
3275 #line 3276 "configure"
3276 #include "confdefs.h"
3277 #include <assert.h>
3278 Syntax Error
3279 EOF
3280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3281 { (eval echo configure:3282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3283 if test -z "$ac_err"; then
3284   :
3285 else
3286   echo "$ac_err" >&5
3287   echo "configure: failed program was:" >&5
3288   cat conftest.$ac_ext >&5
3289   rm -rf conftest*
3290   CPP="${CC-cc} -E -traditional-cpp"
3291   cat > conftest.$ac_ext <<EOF
3292 #line 3293 "configure"
3293 #include "confdefs.h"
3294 #include <assert.h>
3295 Syntax Error
3296 EOF
3297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3298 { (eval echo configure:3299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3300 if test -z "$ac_err"; then
3301   :
3302 else
3303   echo "$ac_err" >&5
3304   echo "configure: failed program was:" >&5
3305   cat conftest.$ac_ext >&5
3306   rm -rf conftest*
3307   CPP="${CC-cc} -nologo -E"
3308   cat > conftest.$ac_ext <<EOF
3309 #line 3310 "configure"
3310 #include "confdefs.h"
3311 #include <assert.h>
3312 Syntax Error
3313 EOF
3314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3315 { (eval echo configure:3316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3317 if test -z "$ac_err"; then
3318   :
3319 else
3320   echo "$ac_err" >&5
3321   echo "configure: failed program was:" >&5
3322   cat conftest.$ac_ext >&5
3323   rm -rf conftest*
3324   CPP=/lib/cpp
3325 fi
3326 rm -f conftest*
3327 fi
3328 rm -f conftest*
3329 fi
3330 rm -f conftest*
3331   ac_cv_prog_CPP="$CPP"
3332 fi
3333   CPP="$ac_cv_prog_CPP"
3334 else
3335   ac_cv_prog_CPP="$CPP"
3336 fi
3337 echo "$ac_t""$CPP" 1>&6
3338
3339 # Check whether --enable-fast-install or --disable-fast-install was given.
3340 if test "${enable_fast_install+set}" = set; then
3341   enableval="$enable_fast_install"
3342   p=${PACKAGE-default}
3343 case $enableval in
3344 yes) enable_fast_install=yes ;;
3345 no) enable_fast_install=no ;;
3346 *)
3347   enable_fast_install=no
3348   # Look at the argument we got.  We use all the common list separators.
3349   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3350   for pkg in $enableval; do
3351     if test "X$pkg" = "X$p"; then
3352       enable_fast_install=yes
3353     fi
3354   done
3355   IFS="$ac_save_ifs"
3356   ;;
3357 esac
3358 else
3359   enable_fast_install=yes
3360 fi
3361
3362 # Extract the first word of "gcc", so it can be a program name with args.
3363 set dummy gcc; ac_word=$2
3364 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3365 echo "configure:3366: checking for $ac_word" >&5
3366 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3367   echo $ac_n "(cached) $ac_c" 1>&6
3368 else
3369   if test -n "$CC"; then
3370   ac_cv_prog_CC="$CC" # Let the user override the test.
3371 else
3372   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3373   ac_dummy="$PATH"
3374   for ac_dir in $ac_dummy; do
3375     test -z "$ac_dir" && ac_dir=.
3376     if test -f $ac_dir/$ac_word; then
3377       ac_cv_prog_CC="gcc"
3378       break
3379     fi
3380   done
3381   IFS="$ac_save_ifs"
3382 fi
3383 fi
3384 CC="$ac_cv_prog_CC"
3385 if test -n "$CC"; then
3386   echo "$ac_t""$CC" 1>&6
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390
3391 if test -z "$CC"; then
3392   # Extract the first word of "cc", so it can be a program name with args.
3393 set dummy cc; ac_word=$2
3394 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3395 echo "configure:3396: checking for $ac_word" >&5
3396 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3397   echo $ac_n "(cached) $ac_c" 1>&6
3398 else
3399   if test -n "$CC"; then
3400   ac_cv_prog_CC="$CC" # Let the user override the test.
3401 else
3402   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3403   ac_prog_rejected=no
3404   ac_dummy="$PATH"
3405   for ac_dir in $ac_dummy; do
3406     test -z "$ac_dir" && ac_dir=.
3407     if test -f $ac_dir/$ac_word; then
3408       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3409         ac_prog_rejected=yes
3410         continue
3411       fi
3412       ac_cv_prog_CC="cc"
3413       break
3414     fi
3415   done
3416   IFS="$ac_save_ifs"
3417 if test $ac_prog_rejected = yes; then
3418   # We found a bogon in the path, so make sure we never use it.
3419   set dummy $ac_cv_prog_CC
3420   shift
3421   if test $# -gt 0; then
3422     # We chose a different compiler from the bogus one.
3423     # However, it has the same basename, so the bogon will be chosen
3424     # first if we set CC to just the basename; use the full file name.
3425     shift
3426     set dummy "$ac_dir/$ac_word" "$@"
3427     shift
3428     ac_cv_prog_CC="$@"
3429   fi
3430 fi
3431 fi
3432 fi
3433 CC="$ac_cv_prog_CC"
3434 if test -n "$CC"; then
3435   echo "$ac_t""$CC" 1>&6
3436 else
3437   echo "$ac_t""no" 1>&6
3438 fi
3439
3440   if test -z "$CC"; then
3441     case "`uname -s`" in
3442     *win32* | *WIN32* | *CYGWIN*)
3443       # Extract the first word of "cl", so it can be a program name with args.
3444 set dummy cl; ac_word=$2
3445 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3446 echo "configure:3447: checking for $ac_word" >&5
3447 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3448   echo $ac_n "(cached) $ac_c" 1>&6
3449 else
3450   if test -n "$CC"; then
3451   ac_cv_prog_CC="$CC" # Let the user override the test.
3452 else
3453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3454   ac_dummy="$PATH"
3455   for ac_dir in $ac_dummy; do
3456     test -z "$ac_dir" && ac_dir=.
3457     if test -f $ac_dir/$ac_word; then
3458       ac_cv_prog_CC="cl"
3459       break
3460     fi
3461   done
3462   IFS="$ac_save_ifs"
3463 fi
3464 fi
3465 CC="$ac_cv_prog_CC"
3466 if test -n "$CC"; then
3467   echo "$ac_t""$CC" 1>&6
3468 else
3469   echo "$ac_t""no" 1>&6
3470 fi
3471  ;;
3472     esac
3473   fi
3474   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3475 fi
3476
3477 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3478 echo "configure:3479: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3479
3480 ac_ext=c
3481 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3482 ac_cpp='$CPP $CPPFLAGS'
3483 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3484 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3485 cross_compiling=$ac_cv_prog_cc_cross
3486
3487 cat > conftest.$ac_ext << EOF
3488
3489 #line 3490 "configure"
3490 #include "confdefs.h"
3491
3492 main(){return(0);}
3493 EOF
3494 if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3495   ac_cv_prog_cc_works=yes
3496   # If we can't run a trivial program, we are probably using a cross compiler.
3497   if (./conftest; exit) 2>/dev/null; then
3498     ac_cv_prog_cc_cross=no
3499   else
3500     ac_cv_prog_cc_cross=yes
3501   fi
3502 else
3503   echo "configure: failed program was:" >&5
3504   cat conftest.$ac_ext >&5
3505   ac_cv_prog_cc_works=no
3506 fi
3507 rm -fr conftest*
3508 ac_ext=c
3509 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3510 ac_cpp='$CPP $CPPFLAGS'
3511 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3512 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3513 cross_compiling=$ac_cv_prog_cc_cross
3514
3515 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3516 if test $ac_cv_prog_cc_works = no; then
3517   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3518 fi
3519 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3520 echo "configure:3521: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3521 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3522 cross_compiling=$ac_cv_prog_cc_cross
3523
3524 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3525 echo "configure:3526: checking whether we are using GNU C" >&5
3526 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   cat > conftest.c <<EOF
3530 #ifdef __GNUC__
3531   yes;
3532 #endif
3533 EOF
3534 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3535   ac_cv_prog_gcc=yes
3536 else
3537   ac_cv_prog_gcc=no
3538 fi
3539 fi
3540
3541 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3542
3543 if test $ac_cv_prog_gcc = yes; then
3544   GCC=yes
3545 else
3546   GCC=
3547 fi
3548
3549 ac_test_CFLAGS="${CFLAGS+set}"
3550 ac_save_CFLAGS="$CFLAGS"
3551 CFLAGS=
3552 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3553 echo "configure:3554: checking whether ${CC-cc} accepts -g" >&5
3554 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3555   echo $ac_n "(cached) $ac_c" 1>&6
3556 else
3557   echo 'void f(){}' > conftest.c
3558 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3559   ac_cv_prog_cc_g=yes
3560 else
3561   ac_cv_prog_cc_g=no
3562 fi
3563 rm -f conftest*
3564
3565 fi
3566
3567 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3568 if test "$ac_test_CFLAGS" = set; then
3569   CFLAGS="$ac_save_CFLAGS"
3570 elif test $ac_cv_prog_cc_g = yes; then
3571   if test "$GCC" = yes; then
3572     CFLAGS="-g -O2"
3573   else
3574     CFLAGS="-g"
3575   fi
3576 else
3577   if test "$GCC" = yes; then
3578     CFLAGS="-O2"
3579   else
3580     CFLAGS=
3581   fi
3582 fi
3583
3584 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3585 if test "${with_gnu_ld+set}" = set; then
3586   withval="$with_gnu_ld"
3587   test "$withval" = no || with_gnu_ld=yes
3588 else
3589   with_gnu_ld=no
3590 fi
3591
3592 ac_prog=ld
3593 if test "$GCC" = yes; then
3594   # Check if gcc -print-prog-name=ld gives a path.
3595   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3596 echo "configure:3597: checking for ld used by GCC" >&5
3597   case $host in
3598   *-*-mingw*)
3599     # gcc leaves a trailing carriage return which upsets mingw
3600     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3601   *)
3602     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3603   esac
3604   case $ac_prog in
3605     # Accept absolute paths.
3606     [\\/]* | [A-Za-z]:[\\/]*)
3607       re_direlt='/[^/][^/]*/\.\./'
3608       # Canonicalize the path of ld
3609       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3610       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3611         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3612       done
3613       test -z "$LD" && LD="$ac_prog"
3614       ;;
3615   "")
3616     # If it fails, then pretend we aren't using GCC.
3617     ac_prog=ld
3618     ;;
3619   *)
3620     # If it is relative, then search for the first ld in PATH.
3621     with_gnu_ld=unknown
3622     ;;
3623   esac
3624 elif test "$with_gnu_ld" = yes; then
3625   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3626 echo "configure:3627: checking for GNU ld" >&5
3627 else
3628   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3629 echo "configure:3630: checking for non-GNU ld" >&5
3630 fi
3631 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3632   echo $ac_n "(cached) $ac_c" 1>&6
3633 else
3634   if test -z "$LD"; then
3635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3636   for ac_dir in $PATH; do
3637     test -z "$ac_dir" && ac_dir=.
3638     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3639       lt_cv_path_LD="$ac_dir/$ac_prog"
3640       # Check to see if the program is GNU ld.  I'd rather use --version,
3641       # but apparently some GNU ld's only accept -v.
3642       # Break only if it was the GNU/non-GNU ld that we prefer.
3643       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3644         test "$with_gnu_ld" != no && break
3645       else
3646         test "$with_gnu_ld" != yes && break
3647       fi
3648     fi
3649   done
3650   IFS="$ac_save_ifs"
3651 else
3652   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3653 fi
3654 fi
3655
3656 LD="$lt_cv_path_LD"
3657 if test -n "$LD"; then
3658   echo "$ac_t""$LD" 1>&6
3659 else
3660   echo "$ac_t""no" 1>&6
3661 fi
3662 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3663 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3664 echo "configure:3665: checking if the linker ($LD) is GNU ld" >&5
3665 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3666   echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3669 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3670   lt_cv_prog_gnu_ld=yes
3671 else
3672   lt_cv_prog_gnu_ld=no
3673 fi
3674 fi
3675
3676 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3677 with_gnu_ld=$lt_cv_prog_gnu_ld
3678
3679
3680 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3681 echo "configure:3682: checking for $LD option to reload object files" >&5
3682 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3683   echo $ac_n "(cached) $ac_c" 1>&6
3684 else
3685   lt_cv_ld_reload_flag='-r'
3686 fi
3687
3688 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3689 reload_flag=$lt_cv_ld_reload_flag
3690 test -n "$reload_flag" && reload_flag=" $reload_flag"
3691
3692 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3693 echo "configure:3694: checking for BSD-compatible nm" >&5
3694 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3695   echo $ac_n "(cached) $ac_c" 1>&6
3696 else
3697   if test -n "$NM"; then
3698   # Let the user override the test.
3699   lt_cv_path_NM="$NM"
3700 else
3701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3702   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3703     test -z "$ac_dir" && ac_dir=.
3704     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3705     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3706       # Check to see if the nm accepts a BSD-compat flag.
3707       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3708       #   nm: unknown option "B" ignored
3709       # Tru64's nm complains that /dev/null is an invalid object file
3710       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3711         lt_cv_path_NM="$tmp_nm -B"
3712         break
3713       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3714         lt_cv_path_NM="$tmp_nm -p"
3715         break
3716       else
3717         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3718         continue # so that we can try to find one that supports BSD flags
3719       fi
3720     fi
3721   done
3722   IFS="$ac_save_ifs"
3723   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3724 fi
3725 fi
3726
3727 NM="$lt_cv_path_NM"
3728 echo "$ac_t""$NM" 1>&6
3729
3730 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3731 echo "configure:3732: checking for a sed that does not truncate output" >&5
3732 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3733   echo $ac_n "(cached) $ac_c" 1>&6
3734 else
3735   # Loop through the user's path and test for sed and gsed.
3736 # Then use that list of sed's as ones to test for truncation.
3737 as_executable_p="test -f"
3738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3739 for as_dir in $PATH
3740 do
3741   IFS=$as_save_IFS
3742   test -z "$as_dir" && as_dir=.
3743   for ac_prog in sed gsed; do
3744     for ac_exec_ext in '' $ac_executable_extensions; do
3745       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3746         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3747       fi
3748     done
3749   done
3750 done
3751
3752   # Create a temporary directory, and hook for its removal unless debugging.
3753 $debug ||
3754 {
3755   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3756   trap '{ (exit 1); exit 1; }' 1 2 13 15
3757 }
3758
3759 # Create a (secure) tmp directory for tmp files.
3760 : ${TMPDIR=/tmp}
3761 {
3762   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3763   test -n "$tmp" && test -d "$tmp"
3764 }  ||
3765 {
3766   tmp=$TMPDIR/sed$$-$RANDOM
3767   (umask 077 && mkdir $tmp)
3768 } ||
3769 {
3770    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3771    { (exit 1); exit 1; }
3772 }
3773   _max=0
3774   _count=0
3775   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3776   # along with /bin/sed that truncates output.
3777   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3778     test ! -f ${_sed} && break
3779     cat /dev/null > "$tmp/sed.in"
3780     _count=0
3781     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3782     # Check for GNU sed and select it if it is found.
3783     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3784       lt_cv_path_SED=${_sed}
3785       break
3786     fi
3787     while true; do
3788       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3789       mv "$tmp/sed.tmp" "$tmp/sed.in"
3790       cp "$tmp/sed.in" "$tmp/sed.nl"
3791       echo >>"$tmp/sed.nl"
3792       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3793       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3794       # 40000 chars as input seems more than enough
3795       test $_count -gt 10 && break
3796       _count=`expr $_count + 1`
3797       if test $_count -gt $_max; then
3798         _max=$_count
3799         lt_cv_path_SED=$_sed
3800       fi
3801     done
3802   done
3803   rm -rf "$tmp"
3804
3805 fi
3806
3807 if test "X$SED" != "X"; then
3808   lt_cv_path_SED=$SED
3809 else
3810   SED=$lt_cv_path_SED
3811 fi
3812 echo "$ac_t""$SED" 1>&6
3813
3814 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3815 echo "configure:3816: checking whether ln -s works" >&5
3816 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3817   echo $ac_n "(cached) $ac_c" 1>&6
3818 else
3819   rm -f conftestdata
3820 if ln -s X conftestdata 2>/dev/null
3821 then
3822   rm -f conftestdata
3823   ac_cv_prog_LN_S="ln -s"
3824 else
3825   ac_cv_prog_LN_S=ln
3826 fi
3827 fi
3828 LN_S="$ac_cv_prog_LN_S"
3829 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3830   echo "$ac_t""yes" 1>&6
3831 else
3832   echo "$ac_t""no" 1>&6
3833 fi
3834
3835 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3836 echo "configure:3837: checking how to recognise dependent libraries" >&5
3837 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3838   echo $ac_n "(cached) $ac_c" 1>&6
3839 else
3840   lt_cv_file_magic_cmd='$MAGIC_CMD'
3841 lt_cv_file_magic_test_file=
3842 lt_cv_deplibs_check_method='unknown'
3843 # Need to set the preceding variable on all platforms that support
3844 # interlibrary dependencies.
3845 # 'none' -- dependencies not supported.
3846 # `unknown' -- same as none, but documents that we really don't know.
3847 # 'pass_all' -- all dependencies passed with no checks.
3848 # 'test_compile' -- check by making test program.
3849 # 'file_magic [[regex]]' -- check by looking for files in library path
3850 # which responds to the $file_magic_cmd with a given egrep regex.
3851 # If you have `file' or equivalent on your system and you're not sure
3852 # whether `pass_all' will *always* work, you probably want this one.
3853
3854 case $host_os in
3855 aix4* | aix5*)
3856   lt_cv_deplibs_check_method=pass_all
3857   ;;
3858
3859 beos*)
3860   lt_cv_deplibs_check_method=pass_all
3861   ;;
3862
3863 bsdi4*)
3864   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3865   lt_cv_file_magic_cmd='/usr/bin/file -L'
3866   lt_cv_file_magic_test_file=/shlib/libc.so
3867   ;;
3868
3869 cygwin* | mingw* | pw32*)
3870   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3871   lt_cv_file_magic_cmd='$OBJDUMP -f'
3872   ;;
3873
3874 darwin* | rhapsody*)
3875   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3876   lt_cv_file_magic_cmd='/usr/bin/file -L'
3877   case "$host_os" in
3878   rhapsody* | darwin1.[012])
3879     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3880     ;;
3881   *) # Darwin 1.3 on
3882     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3883     ;;
3884   esac
3885   ;;
3886
3887 freebsd*)
3888   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3889     case $host_cpu in
3890     i*86 )
3891       # Not sure whether the presence of OpenBSD here was a mistake.
3892       # Let's accept both of them until this is cleared up.
3893       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3894       lt_cv_file_magic_cmd=/usr/bin/file
3895       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3896       ;;
3897     esac
3898   else
3899     lt_cv_deplibs_check_method=pass_all
3900   fi
3901   ;;
3902
3903 gnu*)
3904   lt_cv_deplibs_check_method=pass_all
3905   ;;
3906
3907 hpux10.20*|hpux11*)
3908   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3909   lt_cv_file_magic_cmd=/usr/bin/file
3910   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3911   ;;
3912
3913 irix5* | irix6* | nonstopux*)
3914   case $host_os in
3915   irix5* | nonstopux*)
3916     # this will be overridden with pass_all, but let us keep it just in case
3917     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3918     ;;
3919   *)
3920     case $LD in
3921     *-32|*"-32 ") libmagic=32-bit;;
3922     *-n32|*"-n32 ") libmagic=N32;;
3923     *-64|*"-64 ") libmagic=64-bit;;
3924     *) libmagic=never-match;;
3925     esac
3926     # this will be overridden with pass_all, but let us keep it just in case
3927     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3928     ;;
3929   esac
3930   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3931   lt_cv_deplibs_check_method=pass_all
3932   ;;
3933
3934 # This must be Linux ELF.
3935 linux-gnu*)
3936   case $host_cpu in
3937   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3938     lt_cv_deplibs_check_method=pass_all ;;
3939   *)
3940     # glibc up to 2.1.1 does not perform some relocations on ARM
3941     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3942   esac
3943   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3944   ;;
3945
3946 netbsd*)
3947   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3948     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3949   else
3950     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3951   fi
3952   ;;
3953
3954 newos6*)
3955   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3956   lt_cv_file_magic_cmd=/usr/bin/file
3957   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3958   ;;
3959
3960 openbsd*)
3961   lt_cv_file_magic_cmd=/usr/bin/file
3962   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3963   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3964     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3965   else
3966     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3967   fi
3968   ;;
3969
3970 openedition*)
3971   lt_cv_deplibs_check_method=pass_all
3972   ;;
3973
3974 osf3* | osf4* | osf5*)
3975   # this will be overridden with pass_all, but let us keep it just in case
3976   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3977   lt_cv_file_magic_test_file=/shlib/libc.so
3978   lt_cv_deplibs_check_method=pass_all
3979   ;;
3980
3981 sco3.2v5*)
3982   lt_cv_deplibs_check_method=pass_all
3983   ;;
3984
3985 solaris*)
3986   lt_cv_deplibs_check_method=pass_all
3987   lt_cv_file_magic_test_file=/lib/libc.so
3988   ;;
3989
3990 sysv5uw[78]* | sysv4*uw2*)
3991   lt_cv_deplibs_check_method=pass_all
3992   ;;
3993
3994 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3995   case $host_vendor in
3996   motorola)
3997     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]'
3998     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3999     ;;
4000   ncr)
4001     lt_cv_deplibs_check_method=pass_all
4002     ;;
4003   sequent)
4004     lt_cv_file_magic_cmd='/bin/file'
4005     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4006     ;;
4007   sni)
4008     lt_cv_file_magic_cmd='/bin/file'
4009     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4010     lt_cv_file_magic_test_file=/lib/libc.so
4011     ;;
4012   siemens)
4013     lt_cv_deplibs_check_method=pass_all
4014     ;;
4015   esac
4016   ;;
4017 esac
4018
4019 fi
4020
4021 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
4022 file_magic_cmd=$lt_cv_file_magic_cmd
4023 deplibs_check_method=$lt_cv_deplibs_check_method
4024
4025 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4026 echo "configure:4027: checking for object suffix" >&5
4027 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4028   echo $ac_n "(cached) $ac_c" 1>&6
4029 else
4030   rm -f conftest*
4031 echo 'int i = 1;' > conftest.$ac_ext
4032 if { (eval echo configure:4033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4033   for ac_file in conftest.*; do
4034     case $ac_file in
4035     *.c) ;;
4036     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4037     esac
4038   done
4039 else
4040   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4041 fi
4042 rm -f conftest*
4043 fi
4044
4045 echo "$ac_t""$ac_cv_objext" 1>&6
4046 OBJEXT=$ac_cv_objext
4047 ac_objext=$ac_cv_objext
4048
4049
4050
4051
4052 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4053 echo "configure:4054: checking for executable suffix" >&5
4054 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4055   echo $ac_n "(cached) $ac_c" 1>&6
4056 else
4057   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4058   ac_cv_exeext=.exe
4059 else
4060   rm -f conftest*
4061   echo 'int main () { return 0; }' > conftest.$ac_ext
4062   ac_cv_exeext=
4063   if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4064     for file in conftest.*; do
4065       case $file in
4066       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4067       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4068       esac
4069     done
4070   else
4071     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4072   fi
4073   rm -f conftest*
4074   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4075 fi
4076 fi
4077
4078 EXEEXT=""
4079 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4080 echo "$ac_t""${ac_cv_exeext}" 1>&6
4081 ac_exeext=$EXEEXT
4082
4083 if test $host != $build; then
4084   ac_tool_prefix=${host_alias}-
4085 else
4086   ac_tool_prefix=
4087 fi
4088
4089
4090
4091
4092 # Check for command to grab the raw symbol name followed by C symbol from nm.
4093 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4094 echo "configure:4095: checking command to parse $NM output" >&5
4095 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4096   echo $ac_n "(cached) $ac_c" 1>&6
4097 else
4098   
4099 # These are sane defaults that work on at least a few old systems.
4100 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4101
4102 # Character class describing NM global symbol codes.
4103 symcode='[BCDEGRST]'
4104
4105 # Regexp to match symbols that can be accessed directly from C.
4106 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4107
4108 # Transform the above into a raw symbol and a C symbol.
4109 symxfrm='\1 \2\3 \3'
4110
4111 # Transform an extracted symbol line into a proper C declaration
4112 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4113
4114 # Transform an extracted symbol line into symbol name and symbol address
4115 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'"
4116
4117 # Define system-specific variables.
4118 case $host_os in
4119 aix*)
4120   symcode='[BCDT]'
4121   ;;
4122 cygwin* | mingw* | pw32*)
4123   symcode='[ABCDGISTW]'
4124   ;;
4125 hpux*) # Its linker distinguishes data from code symbols
4126   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4127   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'"
4128   ;;
4129 irix* | nonstopux*)
4130   symcode='[BCDEGRST]'
4131   ;;
4132 osf*)
4133   symcode='[BCDEGQRST]'
4134   ;;
4135 solaris* | sysv5*)
4136   symcode='[BDT]'
4137   ;;
4138 sysv4)
4139   symcode='[DFNSTU]'
4140   ;;
4141 esac
4142
4143 # Handle CRLF in mingw tool chain
4144 opt_cr=
4145 case $host_os in
4146 mingw*)
4147   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4148   ;;
4149 esac
4150
4151 # If we're using GNU nm, then use its standard symbol codes.
4152 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4153   symcode='[ABCDGISTW]'
4154 fi
4155
4156 # Try without a prefix undercore, then with it.
4157 for ac_symprfx in "" "_"; do
4158
4159   # Write the raw and C identifiers.
4160 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4161
4162   # Check to see that the pipe works correctly.
4163   pipe_works=no
4164   rm -f conftest*
4165   cat > conftest.$ac_ext <<EOF
4166 #ifdef __cplusplus
4167 extern "C" {
4168 #endif
4169 char nm_test_var;
4170 void nm_test_func(){}
4171 #ifdef __cplusplus
4172 }
4173 #endif
4174 int main(){nm_test_var='a';nm_test_func();return(0);}
4175 EOF
4176
4177   if { (eval echo configure:4178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4178     # Now try to grab the symbols.
4179     nlist=conftest.nm
4180     if { (eval echo configure:4181: \"$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
4181       # Try sorting and uniquifying the output.
4182       if sort "$nlist" | uniq > "$nlist"T; then
4183         mv -f "$nlist"T "$nlist"
4184       else
4185         rm -f "$nlist"T
4186       fi
4187
4188       # Make sure that we snagged all the symbols we need.
4189       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4190         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4191           cat <<EOF > conftest.$ac_ext
4192 #ifdef __cplusplus
4193 extern "C" {
4194 #endif
4195
4196 EOF
4197           # Now generate the symbol file.
4198           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4199
4200           cat <<EOF >> conftest.$ac_ext
4201 #if defined (__STDC__) && __STDC__
4202 # define lt_ptr void *
4203 #else
4204 # define lt_ptr char *
4205 # define const
4206 #endif
4207
4208 /* The mapping between symbol names and symbols. */
4209 const struct {
4210   const char *name;
4211   lt_ptr address;
4212 }
4213 lt_preloaded_symbols[] =
4214 {
4215 EOF
4216           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4217           cat <<\EOF >> conftest.$ac_ext
4218   {0, (lt_ptr) 0}
4219 };
4220
4221 #ifdef __cplusplus
4222 }
4223 #endif
4224 EOF
4225           # Now try linking the two files.
4226           mv conftest.$ac_objext conftstm.$ac_objext
4227           save_LIBS="$LIBS"
4228           save_CFLAGS="$CFLAGS"
4229           LIBS="conftstm.$ac_objext"
4230           CFLAGS="$CFLAGS$no_builtin_flag"
4231           if { (eval echo configure:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4232             pipe_works=yes
4233           fi
4234           LIBS="$save_LIBS"
4235           CFLAGS="$save_CFLAGS"
4236         else
4237           echo "cannot find nm_test_func in $nlist" >&5
4238         fi
4239       else
4240         echo "cannot find nm_test_var in $nlist" >&5
4241       fi
4242     else
4243       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4244     fi
4245   else
4246     echo "$progname: failed program was:" >&5
4247     cat conftest.$ac_ext >&5
4248   fi
4249   rm -f conftest* conftst*
4250
4251   # Do not use the global_symbol_pipe unless it works.
4252   if test "$pipe_works" = yes; then
4253     break
4254   else
4255     lt_cv_sys_global_symbol_pipe=
4256   fi
4257 done
4258
4259 fi
4260
4261 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4262 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4263   global_symbol_to_cdecl=
4264   global_symbol_to_c_name_address=
4265 else
4266   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4267   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4268 fi
4269 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4270 then
4271   echo "$ac_t""failed" 1>&6
4272 else
4273   echo "$ac_t""ok" 1>&6
4274 fi
4275
4276 for ac_hdr in dlfcn.h
4277 do
4278 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4279 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4280 echo "configure:4281: checking for $ac_hdr" >&5
4281 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4282   echo $ac_n "(cached) $ac_c" 1>&6
4283 else
4284   cat > conftest.$ac_ext <<EOF
4285 #line 4286 "configure"
4286 #include "confdefs.h"
4287 #include <$ac_hdr>
4288 EOF
4289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4290 { (eval echo configure:4291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4292 if test -z "$ac_err"; then
4293   rm -rf conftest*
4294   eval "ac_cv_header_$ac_safe=yes"
4295 else
4296   echo "$ac_err" >&5
4297   echo "configure: failed program was:" >&5
4298   cat conftest.$ac_ext >&5
4299   rm -rf conftest*
4300   eval "ac_cv_header_$ac_safe=no"
4301 fi
4302 rm -f conftest*
4303 fi
4304 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4305   echo "$ac_t""yes" 1>&6
4306     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4307   cat >> confdefs.h <<EOF
4308 #define $ac_tr_hdr 1
4309 EOF
4310  
4311 else
4312   echo "$ac_t""no" 1>&6
4313 fi
4314 done
4315
4316
4317
4318
4319
4320
4321 # Only perform the check for file, if the check method requires it
4322 case $deplibs_check_method in
4323 file_magic*)
4324   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4325     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4326 echo "configure:4327: checking for ${ac_tool_prefix}file" >&5
4327 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4328   echo $ac_n "(cached) $ac_c" 1>&6
4329 else
4330   case $MAGIC_CMD in
4331   /*)
4332   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4333   ;;
4334   ?:/*)
4335   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4336   ;;
4337   *)
4338   ac_save_MAGIC_CMD="$MAGIC_CMD"
4339   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4340   ac_dummy="/usr/bin:$PATH"
4341   for ac_dir in $ac_dummy; do
4342     test -z "$ac_dir" && ac_dir=.
4343     if test -f $ac_dir/${ac_tool_prefix}file; then
4344       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4345       if test -n "$file_magic_test_file"; then
4346         case $deplibs_check_method in
4347         "file_magic "*)
4348           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4349           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4350           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4351             egrep "$file_magic_regex" > /dev/null; then
4352             :
4353           else
4354             cat <<EOF 1>&2
4355
4356 *** Warning: the command libtool uses to detect shared libraries,
4357 *** $file_magic_cmd, produces output that libtool cannot recognize.
4358 *** The result is that libtool may fail to recognize shared libraries
4359 *** as such.  This will affect the creation of libtool libraries that
4360 *** depend on shared libraries, but programs linked with such libtool
4361 *** libraries will work regardless of this problem.  Nevertheless, you
4362 *** may want to report the problem to your system manager and/or to
4363 *** bug-libtool@gnu.org
4364
4365 EOF
4366           fi ;;
4367         esac
4368       fi
4369       break
4370     fi
4371   done
4372   IFS="$ac_save_ifs"
4373   MAGIC_CMD="$ac_save_MAGIC_CMD"
4374   ;;
4375 esac
4376 fi
4377
4378 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4379 if test -n "$MAGIC_CMD"; then
4380   echo "$ac_t""$MAGIC_CMD" 1>&6
4381 else
4382   echo "$ac_t""no" 1>&6
4383 fi
4384
4385 if test -z "$lt_cv_path_MAGIC_CMD"; then
4386   if test -n "$ac_tool_prefix"; then
4387     echo $ac_n "checking for file""... $ac_c" 1>&6
4388 echo "configure:4389: checking for file" >&5
4389 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4390   echo $ac_n "(cached) $ac_c" 1>&6
4391 else
4392   case $MAGIC_CMD in
4393   /*)
4394   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4395   ;;
4396   ?:/*)
4397   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4398   ;;
4399   *)
4400   ac_save_MAGIC_CMD="$MAGIC_CMD"
4401   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4402   ac_dummy="/usr/bin:$PATH"
4403   for ac_dir in $ac_dummy; do
4404     test -z "$ac_dir" && ac_dir=.
4405     if test -f $ac_dir/file; then
4406       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4407       if test -n "$file_magic_test_file"; then
4408         case $deplibs_check_method in
4409         "file_magic "*)
4410           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4411           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4412           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4413             egrep "$file_magic_regex" > /dev/null; then
4414             :
4415           else
4416             cat <<EOF 1>&2
4417
4418 *** Warning: the command libtool uses to detect shared libraries,
4419 *** $file_magic_cmd, produces output that libtool cannot recognize.
4420 *** The result is that libtool may fail to recognize shared libraries
4421 *** as such.  This will affect the creation of libtool libraries that
4422 *** depend on shared libraries, but programs linked with such libtool
4423 *** libraries will work regardless of this problem.  Nevertheless, you
4424 *** may want to report the problem to your system manager and/or to
4425 *** bug-libtool@gnu.org
4426
4427 EOF
4428           fi ;;
4429         esac
4430       fi
4431       break
4432     fi
4433   done
4434   IFS="$ac_save_ifs"
4435   MAGIC_CMD="$ac_save_MAGIC_CMD"
4436   ;;
4437 esac
4438 fi
4439
4440 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4441 if test -n "$MAGIC_CMD"; then
4442   echo "$ac_t""$MAGIC_CMD" 1>&6
4443 else
4444   echo "$ac_t""no" 1>&6
4445 fi
4446
4447   else
4448     MAGIC_CMD=:
4449   fi
4450 fi
4451
4452   fi
4453   ;;
4454 esac
4455
4456 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4457 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4459 echo "configure:4460: checking for $ac_word" >&5
4460 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4461   echo $ac_n "(cached) $ac_c" 1>&6
4462 else
4463   if test -n "$RANLIB"; then
4464   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4465 else
4466   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4467   ac_dummy="$PATH"
4468   for ac_dir in $ac_dummy; do
4469     test -z "$ac_dir" && ac_dir=.
4470     if test -f $ac_dir/$ac_word; then
4471       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4472       break
4473     fi
4474   done
4475   IFS="$ac_save_ifs"
4476 fi
4477 fi
4478 RANLIB="$ac_cv_prog_RANLIB"
4479 if test -n "$RANLIB"; then
4480   echo "$ac_t""$RANLIB" 1>&6
4481 else
4482   echo "$ac_t""no" 1>&6
4483 fi
4484
4485
4486 if test -z "$ac_cv_prog_RANLIB"; then
4487 if test -n "$ac_tool_prefix"; then
4488   # Extract the first word of "ranlib", so it can be a program name with args.
4489 set dummy ranlib; ac_word=$2
4490 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4491 echo "configure:4492: checking for $ac_word" >&5
4492 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4493   echo $ac_n "(cached) $ac_c" 1>&6
4494 else
4495   if test -n "$RANLIB"; then
4496   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4497 else
4498   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4499   ac_dummy="$PATH"
4500   for ac_dir in $ac_dummy; do
4501     test -z "$ac_dir" && ac_dir=.
4502     if test -f $ac_dir/$ac_word; then
4503       ac_cv_prog_RANLIB="ranlib"
4504       break
4505     fi
4506   done
4507   IFS="$ac_save_ifs"
4508   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4509 fi
4510 fi
4511 RANLIB="$ac_cv_prog_RANLIB"
4512 if test -n "$RANLIB"; then
4513   echo "$ac_t""$RANLIB" 1>&6
4514 else
4515   echo "$ac_t""no" 1>&6
4516 fi
4517
4518 else
4519   RANLIB=":"
4520 fi
4521 fi
4522
4523 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4524 set dummy ${ac_tool_prefix}strip; ac_word=$2
4525 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4526 echo "configure:4527: checking for $ac_word" >&5
4527 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   if test -n "$STRIP"; then
4531   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4532 else
4533   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4534   ac_dummy="$PATH"
4535   for ac_dir in $ac_dummy; do
4536     test -z "$ac_dir" && ac_dir=.
4537     if test -f $ac_dir/$ac_word; then
4538       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4539       break
4540     fi
4541   done
4542   IFS="$ac_save_ifs"
4543 fi
4544 fi
4545 STRIP="$ac_cv_prog_STRIP"
4546 if test -n "$STRIP"; then
4547   echo "$ac_t""$STRIP" 1>&6
4548 else
4549   echo "$ac_t""no" 1>&6
4550 fi
4551
4552
4553 if test -z "$ac_cv_prog_STRIP"; then
4554 if test -n "$ac_tool_prefix"; then
4555   # Extract the first word of "strip", so it can be a program name with args.
4556 set dummy strip; ac_word=$2
4557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4558 echo "configure:4559: checking for $ac_word" >&5
4559 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4560   echo $ac_n "(cached) $ac_c" 1>&6
4561 else
4562   if test -n "$STRIP"; then
4563   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4564 else
4565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4566   ac_dummy="$PATH"
4567   for ac_dir in $ac_dummy; do
4568     test -z "$ac_dir" && ac_dir=.
4569     if test -f $ac_dir/$ac_word; then
4570       ac_cv_prog_STRIP="strip"
4571       break
4572     fi
4573   done
4574   IFS="$ac_save_ifs"
4575   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4576 fi
4577 fi
4578 STRIP="$ac_cv_prog_STRIP"
4579 if test -n "$STRIP"; then
4580   echo "$ac_t""$STRIP" 1>&6
4581 else
4582   echo "$ac_t""no" 1>&6
4583 fi
4584
4585 else
4586   STRIP=":"
4587 fi
4588 fi
4589
4590
4591 enable_dlopen=yes
4592 enable_win32_dll=yes
4593
4594 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4595 if test "${enable_libtool_lock+set}" = set; then
4596   enableval="$enable_libtool_lock"
4597   :
4598 fi
4599
4600 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4601
4602 # Some flags need to be propagated to the compiler or linker for good
4603 # libtool support.
4604 case $host in
4605 *-*-irix6*)
4606   # Find out which ABI we are using.
4607   echo '#line 4608 "configure"' > conftest.$ac_ext
4608   if { (eval echo configure:4609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4609     case `/usr/bin/file conftest.$ac_objext` in
4610     *32-bit*)
4611       LD="${LD-ld} -32"
4612       ;;
4613     *N32*)
4614       LD="${LD-ld} -n32"
4615       ;;
4616     *64-bit*)
4617       LD="${LD-ld} -64"
4618       ;;
4619     esac
4620   fi
4621   rm -rf conftest*
4622   ;;
4623
4624 *-*-sco3.2v5*)
4625   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4626   SAVE_CFLAGS="$CFLAGS"
4627   CFLAGS="$CFLAGS -belf"
4628   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4629 echo "configure:4630: checking whether the C compiler needs -belf" >&5
4630 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4631   echo $ac_n "(cached) $ac_c" 1>&6
4632 else
4633   
4634      ac_ext=c
4635 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4636 ac_cpp='$CPP $CPPFLAGS'
4637 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4638 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4639 cross_compiling=$ac_cv_prog_cc_cross
4640
4641      cat > conftest.$ac_ext <<EOF
4642 #line 4643 "configure"
4643 #include "confdefs.h"
4644
4645 int main() {
4646
4647 ; return 0; }
4648 EOF
4649 if { (eval echo configure:4650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4650   rm -rf conftest*
4651   lt_cv_cc_needs_belf=yes
4652 else
4653   echo "configure: failed program was:" >&5
4654   cat conftest.$ac_ext >&5
4655   rm -rf conftest*
4656   lt_cv_cc_needs_belf=no
4657 fi
4658 rm -f conftest*
4659      ac_ext=c
4660 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4661 ac_cpp='$CPP $CPPFLAGS'
4662 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4663 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4664 cross_compiling=$ac_cv_prog_cc_cross
4665
4666 fi
4667
4668 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4669   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4670     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4671     CFLAGS="$SAVE_CFLAGS"
4672   fi
4673   ;;
4674
4675 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4676   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4677 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4678 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4679 echo "configure:4680: checking for $ac_word" >&5
4680 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4681   echo $ac_n "(cached) $ac_c" 1>&6
4682 else
4683   if test -n "$DLLTOOL"; then
4684   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4685 else
4686   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4687   ac_dummy="$PATH"
4688   for ac_dir in $ac_dummy; do
4689     test -z "$ac_dir" && ac_dir=.
4690     if test -f $ac_dir/$ac_word; then
4691       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4692       break
4693     fi
4694   done
4695   IFS="$ac_save_ifs"
4696 fi
4697 fi
4698 DLLTOOL="$ac_cv_prog_DLLTOOL"
4699 if test -n "$DLLTOOL"; then
4700   echo "$ac_t""$DLLTOOL" 1>&6
4701 else
4702   echo "$ac_t""no" 1>&6
4703 fi
4704
4705
4706 if test -z "$ac_cv_prog_DLLTOOL"; then
4707 if test -n "$ac_tool_prefix"; then
4708   # Extract the first word of "dlltool", so it can be a program name with args.
4709 set dummy dlltool; ac_word=$2
4710 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4711 echo "configure:4712: checking for $ac_word" >&5
4712 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4713   echo $ac_n "(cached) $ac_c" 1>&6
4714 else
4715   if test -n "$DLLTOOL"; then
4716   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4717 else
4718   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4719   ac_dummy="$PATH"
4720   for ac_dir in $ac_dummy; do
4721     test -z "$ac_dir" && ac_dir=.
4722     if test -f $ac_dir/$ac_word; then
4723       ac_cv_prog_DLLTOOL="dlltool"
4724       break
4725     fi
4726   done
4727   IFS="$ac_save_ifs"
4728   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4729 fi
4730 fi
4731 DLLTOOL="$ac_cv_prog_DLLTOOL"
4732 if test -n "$DLLTOOL"; then
4733   echo "$ac_t""$DLLTOOL" 1>&6
4734 else
4735   echo "$ac_t""no" 1>&6
4736 fi
4737
4738 else
4739   DLLTOOL="false"
4740 fi
4741 fi
4742
4743   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4744 set dummy ${ac_tool_prefix}as; ac_word=$2
4745 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4746 echo "configure:4747: checking for $ac_word" >&5
4747 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4748   echo $ac_n "(cached) $ac_c" 1>&6
4749 else
4750   if test -n "$AS"; then
4751   ac_cv_prog_AS="$AS" # Let the user override the test.
4752 else
4753   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4754   ac_dummy="$PATH"
4755   for ac_dir in $ac_dummy; do
4756     test -z "$ac_dir" && ac_dir=.
4757     if test -f $ac_dir/$ac_word; then
4758       ac_cv_prog_AS="${ac_tool_prefix}as"
4759       break
4760     fi
4761   done
4762   IFS="$ac_save_ifs"
4763 fi
4764 fi
4765 AS="$ac_cv_prog_AS"
4766 if test -n "$AS"; then
4767   echo "$ac_t""$AS" 1>&6
4768 else
4769   echo "$ac_t""no" 1>&6
4770 fi
4771
4772
4773 if test -z "$ac_cv_prog_AS"; then
4774 if test -n "$ac_tool_prefix"; then
4775   # Extract the first word of "as", so it can be a program name with args.
4776 set dummy as; ac_word=$2
4777 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4778 echo "configure:4779: checking for $ac_word" >&5
4779 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4780   echo $ac_n "(cached) $ac_c" 1>&6
4781 else
4782   if test -n "$AS"; then
4783   ac_cv_prog_AS="$AS" # Let the user override the test.
4784 else
4785   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4786   ac_dummy="$PATH"
4787   for ac_dir in $ac_dummy; do
4788     test -z "$ac_dir" && ac_dir=.
4789     if test -f $ac_dir/$ac_word; then
4790       ac_cv_prog_AS="as"
4791       break
4792     fi
4793   done
4794   IFS="$ac_save_ifs"
4795   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4796 fi
4797 fi
4798 AS="$ac_cv_prog_AS"
4799 if test -n "$AS"; then
4800   echo "$ac_t""$AS" 1>&6
4801 else
4802   echo "$ac_t""no" 1>&6
4803 fi
4804
4805 else
4806   AS="false"
4807 fi
4808 fi
4809
4810   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4811 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4812 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4813 echo "configure:4814: checking for $ac_word" >&5
4814 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4815   echo $ac_n "(cached) $ac_c" 1>&6
4816 else
4817   if test -n "$OBJDUMP"; then
4818   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4819 else
4820   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4821   ac_dummy="$PATH"
4822   for ac_dir in $ac_dummy; do
4823     test -z "$ac_dir" && ac_dir=.
4824     if test -f $ac_dir/$ac_word; then
4825       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4826       break
4827     fi
4828   done
4829   IFS="$ac_save_ifs"
4830 fi
4831 fi
4832 OBJDUMP="$ac_cv_prog_OBJDUMP"
4833 if test -n "$OBJDUMP"; then
4834   echo "$ac_t""$OBJDUMP" 1>&6
4835 else
4836   echo "$ac_t""no" 1>&6
4837 fi
4838
4839
4840 if test -z "$ac_cv_prog_OBJDUMP"; then
4841 if test -n "$ac_tool_prefix"; then
4842   # Extract the first word of "objdump", so it can be a program name with args.
4843 set dummy objdump; ac_word=$2
4844 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4845 echo "configure:4846: checking for $ac_word" >&5
4846 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4847   echo $ac_n "(cached) $ac_c" 1>&6
4848 else
4849   if test -n "$OBJDUMP"; then
4850   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4851 else
4852   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4853   ac_dummy="$PATH"
4854   for ac_dir in $ac_dummy; do
4855     test -z "$ac_dir" && ac_dir=.
4856     if test -f $ac_dir/$ac_word; then
4857       ac_cv_prog_OBJDUMP="objdump"
4858       break
4859     fi
4860   done
4861   IFS="$ac_save_ifs"
4862   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4863 fi
4864 fi
4865 OBJDUMP="$ac_cv_prog_OBJDUMP"
4866 if test -n "$OBJDUMP"; then
4867   echo "$ac_t""$OBJDUMP" 1>&6
4868 else
4869   echo "$ac_t""no" 1>&6
4870 fi
4871
4872 else
4873   OBJDUMP="false"
4874 fi
4875 fi
4876
4877
4878   # recent cygwin and mingw systems supply a stub DllMain which the user
4879   # can override, but on older systems we have to supply one
4880   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4881 echo "configure:4882: checking if libtool should supply DllMain function" >&5
4882 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4883   echo $ac_n "(cached) $ac_c" 1>&6
4884 else
4885   cat > conftest.$ac_ext <<EOF
4886 #line 4887 "configure"
4887 #include "confdefs.h"
4888
4889 int main() {
4890 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4891       DllMain (0, 0, 0);
4892 ; return 0; }
4893 EOF
4894 if { (eval echo configure:4895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4895   rm -rf conftest*
4896   lt_cv_need_dllmain=no
4897 else
4898   echo "configure: failed program was:" >&5
4899   cat conftest.$ac_ext >&5
4900   rm -rf conftest*
4901   lt_cv_need_dllmain=yes
4902 fi
4903 rm -f conftest*
4904 fi
4905
4906 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4907
4908   case $host/$CC in
4909   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4910     # old mingw systems require "-dll" to link a DLL, while more recent ones
4911     # require "-mdll"
4912     SAVE_CFLAGS="$CFLAGS"
4913     CFLAGS="$CFLAGS -mdll"
4914     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4915 echo "configure:4916: checking how to link DLLs" >&5
4916 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4917   echo $ac_n "(cached) $ac_c" 1>&6
4918 else
4919   cat > conftest.$ac_ext <<EOF
4920 #line 4921 "configure"
4921 #include "confdefs.h"
4922
4923 int main() {
4924
4925 ; return 0; }
4926 EOF
4927 if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4928   rm -rf conftest*
4929   lt_cv_cc_dll_switch=-mdll
4930 else
4931   echo "configure: failed program was:" >&5
4932   cat conftest.$ac_ext >&5
4933   rm -rf conftest*
4934   lt_cv_cc_dll_switch=-dll
4935 fi
4936 rm -f conftest*
4937 fi
4938
4939 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4940     CFLAGS="$SAVE_CFLAGS" ;;
4941   *-*-cygwin* | *-*-pw32*)
4942     # cygwin systems need to pass --dll to the linker, and not link
4943     # crt.o which will require a WinMain@16 definition.
4944     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4945   esac
4946   ;;
4947   
4948 esac
4949
4950 # Sed substitution that helps us do robust quoting.  It backslashifies
4951 # metacharacters that are still active within double-quoted strings.
4952 Xsed='sed -e s/^X//'
4953 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4954
4955 # Same as above, but do not quote variable references.
4956 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4957
4958 # Sed substitution to delay expansion of an escaped shell variable in a
4959 # double_quote_subst'ed string.
4960 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4961
4962 # Constants:
4963 rm="rm -f"
4964
4965 # Global variables:
4966 default_ofile=libtool
4967 can_build_shared=yes
4968
4969 # All known linkers require a `.a' archive for static linking (except M$VC,
4970 # which needs '.lib').
4971 libext=a
4972 ltmain="$ac_aux_dir/ltmain.sh"
4973 ofile="$default_ofile"
4974 with_gnu_ld="$lt_cv_prog_gnu_ld"
4975 need_locks="$enable_libtool_lock"
4976
4977 old_CC="$CC"
4978 old_CFLAGS="$CFLAGS"
4979
4980 # Set sane defaults for various variables
4981 test -z "$AR" && AR=ar
4982 test -z "$AR_FLAGS" && AR_FLAGS=cru
4983 test -z "$AS" && AS=as
4984 test -z "$CC" && CC=cc
4985 test -z "$DLLTOOL" && DLLTOOL=dlltool
4986 test -z "$LD" && LD=ld
4987 test -z "$LN_S" && LN_S="ln -s"
4988 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4989 test -z "$NM" && NM=nm
4990 test -z "$OBJDUMP" && OBJDUMP=objdump
4991 test -z "$RANLIB" && RANLIB=:
4992 test -z "$STRIP" && STRIP=:
4993 test -z "$ac_objext" && ac_objext=o
4994
4995 if test x"$host" != x"$build"; then
4996   ac_tool_prefix=${host_alias}-
4997 else
4998   ac_tool_prefix=
4999 fi
5000
5001 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
5002 case $host_os in
5003 linux-gnu*) ;;
5004 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5005 esac
5006
5007 case $host_os in
5008 aix3*)
5009   # AIX sometimes has problems with the GCC collect2 program.  For some
5010   # reason, if we set the COLLECT_NAMES environment variable, the problems
5011   # vanish in a puff of smoke.
5012   if test "X${COLLECT_NAMES+set}" != Xset; then
5013     COLLECT_NAMES=
5014     export COLLECT_NAMES
5015   fi
5016   ;;
5017 esac
5018
5019 # Determine commands to create old-style static archives.
5020 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5021 old_postinstall_cmds='chmod 644 $oldlib'
5022 old_postuninstall_cmds=
5023
5024 if test -n "$RANLIB"; then
5025   case $host_os in
5026   openbsd*)
5027     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5028     ;;
5029   *)
5030     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5031     ;;
5032   esac
5033   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5034 fi
5035
5036 # Allow CC to be a program name with arguments.
5037 set dummy $CC
5038 compiler="$2"
5039
5040 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5041 echo "configure:5042: checking for objdir" >&5
5042 rm -f .libs 2>/dev/null
5043 mkdir .libs 2>/dev/null
5044 if test -d .libs; then
5045   objdir=.libs
5046 else
5047   # MS-DOS does not allow filenames that begin with a dot.
5048   objdir=_libs
5049 fi
5050 rmdir .libs 2>/dev/null
5051 echo "$ac_t""$objdir" 1>&6
5052
5053
5054 # Check whether --with-pic or --without-pic was given.
5055 if test "${with_pic+set}" = set; then
5056   withval="$with_pic"
5057   pic_mode="$withval"
5058 else
5059   pic_mode=default
5060 fi
5061
5062 test -z "$pic_mode" && pic_mode=default
5063
5064 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5065 # in isolation, and that seeing it set (from the cache) indicates that
5066 # the associated values are set (in the cache) correctly too.
5067 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5068 echo "configure:5069: checking for $compiler option to produce PIC" >&5
5069 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5070   echo $ac_n "(cached) $ac_c" 1>&6
5071 else
5072    lt_cv_prog_cc_pic=
5073   lt_cv_prog_cc_shlib=
5074   lt_cv_prog_cc_wl=
5075   lt_cv_prog_cc_static=
5076   lt_cv_prog_cc_no_builtin=
5077   lt_cv_prog_cc_can_build_shared=$can_build_shared
5078
5079   if test "$GCC" = yes; then
5080     lt_cv_prog_cc_wl='-Wl,'
5081     lt_cv_prog_cc_static='-static'
5082
5083     case $host_os in
5084     aix*)
5085       # Below there is a dirty hack to force normal static linking with -ldl
5086       # The problem is because libdl dynamically linked with both libc and
5087       # libC (AIX C++ library), which obviously doesn't included in libraries
5088       # list by gcc. This cause undefined symbols with -static flags.
5089       # This hack allows C programs to be linked with "-static -ldl", but
5090       # not sure about C++ programs.
5091       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5092       ;;
5093     amigaos*)
5094       # FIXME: we need at least 68020 code to build shared libraries, but
5095       # adding the `-m68020' flag to GCC prevents building anything better,
5096       # like `-m68040'.
5097       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5098       ;;
5099     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5100       # PIC is the default for these OSes.
5101       ;;
5102     darwin* | rhapsody*)
5103       # PIC is the default on this platform
5104       # Common symbols not allowed in MH_DYLIB files
5105       lt_cv_prog_cc_pic='-fno-common'
5106       ;;
5107     cygwin* | mingw* | pw32* | os2*)
5108       # This hack is so that the source file can tell whether it is being
5109       # built for inclusion in a dll (and should export symbols for example).
5110       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5111       ;;
5112     sysv4*MP*)
5113       if test -d /usr/nec; then
5114          lt_cv_prog_cc_pic=-Kconform_pic
5115       fi
5116       ;;
5117     *)
5118       lt_cv_prog_cc_pic='-fPIC'
5119       ;;
5120     esac
5121   else
5122     # PORTME Check for PIC flags for the system compiler.
5123     case $host_os in
5124     aix3* | aix4* | aix5*)
5125       lt_cv_prog_cc_wl='-Wl,'
5126       # All AIX code is PIC.
5127       if test "$host_cpu" = ia64; then
5128         # AIX 5 now supports IA64 processor
5129         lt_cv_prog_cc_static='-Bstatic'
5130       else
5131         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5132       fi
5133       ;;
5134
5135     hpux9* | hpux10* | hpux11*)
5136       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5137       lt_cv_prog_cc_wl='-Wl,'
5138       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5139       lt_cv_prog_cc_pic='+Z'
5140       ;;
5141
5142     irix5* | irix6* | nonstopux*)
5143       lt_cv_prog_cc_wl='-Wl,'
5144       lt_cv_prog_cc_static='-non_shared'
5145       # PIC (with -KPIC) is the default.
5146       ;;
5147
5148     cygwin* | mingw* | pw32* | os2*)
5149       # This hack is so that the source file can tell whether it is being
5150       # built for inclusion in a dll (and should export symbols for example).
5151       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5152       ;;
5153
5154     newsos6)
5155       lt_cv_prog_cc_pic='-KPIC'
5156       lt_cv_prog_cc_static='-Bstatic'
5157       ;;
5158     
5159     openedition)
5160       # XPLINK code is PIC by default
5161       ;;
5162
5163     osf3* | osf4* | osf5*)
5164       # All OSF/1 code is PIC.
5165       lt_cv_prog_cc_wl='-Wl,'
5166       lt_cv_prog_cc_static='-non_shared'
5167       ;;
5168
5169     sco3.2v5*)
5170       lt_cv_prog_cc_pic='-Kpic'
5171       lt_cv_prog_cc_static='-dn'
5172       lt_cv_prog_cc_shlib='-belf'
5173       ;;
5174
5175     solaris*)
5176       lt_cv_prog_cc_pic='-KPIC'
5177       lt_cv_prog_cc_static='-Bstatic'
5178       lt_cv_prog_cc_wl='-Wl,'
5179       ;;
5180
5181     sunos4*)
5182       lt_cv_prog_cc_pic='-PIC'
5183       lt_cv_prog_cc_static='-Bstatic'
5184       lt_cv_prog_cc_wl='-Qoption ld '
5185       ;;
5186
5187     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5188       lt_cv_prog_cc_pic='-KPIC'
5189       lt_cv_prog_cc_static='-Bstatic'
5190       lt_cv_prog_cc_wl='-Wl,'
5191       ;;
5192
5193     uts4*)
5194       lt_cv_prog_cc_pic='-pic'
5195       lt_cv_prog_cc_static='-Bstatic'
5196       ;;
5197
5198     sysv4*MP*)
5199       if test -d /usr/nec ;then
5200         lt_cv_prog_cc_pic='-Kconform_pic'
5201         lt_cv_prog_cc_static='-Bstatic'
5202       fi
5203       ;;
5204
5205     *)
5206       lt_cv_prog_cc_can_build_shared=no
5207       ;;
5208     esac
5209   fi
5210
5211 fi
5212
5213 if test -z "$lt_cv_prog_cc_pic"; then
5214   echo "$ac_t""none" 1>&6
5215 else
5216   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5217
5218   # Check to make sure the pic_flag actually works.
5219   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5220 echo "configure:5221: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5221   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5222   echo $ac_n "(cached) $ac_c" 1>&6
5223 else
5224       save_CFLAGS="$CFLAGS"
5225     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5226     cat > conftest.$ac_ext <<EOF
5227 #line 5228 "configure"
5228 #include "confdefs.h"
5229
5230 int main() {
5231
5232 ; return 0; }
5233 EOF
5234 if { (eval echo configure:5235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5235   rm -rf conftest*
5236         case $host_os in
5237       hpux9* | hpux10* | hpux11*)
5238         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5239         # they create non-PIC objects.  So, if there were any warnings, we
5240         # assume that PIC is not supported.
5241         if test -s conftest.err; then
5242           lt_cv_prog_cc_pic_works=no
5243         else
5244           lt_cv_prog_cc_pic_works=yes
5245         fi
5246         ;;
5247       *)
5248         lt_cv_prog_cc_pic_works=yes
5249         ;;
5250       esac
5251     
5252 else
5253   echo "configure: failed program was:" >&5
5254   cat conftest.$ac_ext >&5
5255   rm -rf conftest*
5256         lt_cv_prog_cc_pic_works=no
5257     
5258 fi
5259 rm -f conftest*
5260     CFLAGS="$save_CFLAGS"
5261   
5262 fi
5263
5264
5265   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5266     lt_cv_prog_cc_pic=
5267     lt_cv_prog_cc_can_build_shared=no
5268   else
5269     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5270   fi
5271
5272   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5273 fi
5274
5275 # Check for any special shared library compilation flags.
5276 if test -n "$lt_cv_prog_cc_shlib"; then
5277   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5278   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5279   else
5280    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5281     lt_cv_prog_cc_can_build_shared=no
5282   fi
5283 fi
5284
5285 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5286 echo "configure:5287: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5287 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5288   echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290     lt_cv_prog_cc_static_works=no
5291   save_LDFLAGS="$LDFLAGS"
5292   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5293   cat > conftest.$ac_ext <<EOF
5294 #line 5295 "configure"
5295 #include "confdefs.h"
5296
5297 int main() {
5298
5299 ; return 0; }
5300 EOF
5301 if { (eval echo configure:5302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5302   rm -rf conftest*
5303   lt_cv_prog_cc_static_works=yes
5304 else
5305   echo "configure: failed program was:" >&5
5306   cat conftest.$ac_ext >&5
5307 fi
5308 rm -f conftest*
5309   LDFLAGS="$save_LDFLAGS"
5310
5311 fi
5312
5313
5314 # Belt *and* braces to stop my trousers falling down:
5315 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5316 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5317
5318 pic_flag="$lt_cv_prog_cc_pic"
5319 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5320 wl="$lt_cv_prog_cc_wl"
5321 link_static_flag="$lt_cv_prog_cc_static"
5322 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5323 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5324
5325
5326 # Check to see if options -o and -c are simultaneously supported by compiler
5327 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5328 echo "configure:5329: checking if $compiler supports -c -o file.$ac_objext" >&5
5329 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5330   echo $ac_n "(cached) $ac_c" 1>&6
5331 else
5332   
5333 $rm -r conftest 2>/dev/null
5334 mkdir conftest
5335 cd conftest
5336 echo "int some_variable = 0;" > conftest.$ac_ext
5337 mkdir out
5338 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5339 # that will create temporary files in the current directory regardless of
5340 # the output directory.  Thus, making CWD read-only will cause this test
5341 # to fail, enabling locking or at least warning the user not to do parallel
5342 # builds.
5343 chmod -w .
5344 save_CFLAGS="$CFLAGS"
5345 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5346 compiler_c_o=no
5347 if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5348   # The compiler can only warn and ignore the option if not recognized
5349   # So say no if there are warnings
5350   if test -s out/conftest.err; then
5351     lt_cv_compiler_c_o=no
5352   else
5353     lt_cv_compiler_c_o=yes
5354   fi
5355 else
5356   # Append any errors to the config.log.
5357   cat out/conftest.err 1>&5
5358   lt_cv_compiler_c_o=no
5359 fi
5360 CFLAGS="$save_CFLAGS"
5361 chmod u+w .
5362 $rm conftest* out/*
5363 rmdir out
5364 cd ..
5365 rmdir conftest
5366 $rm -r conftest 2>/dev/null
5367
5368 fi
5369
5370 compiler_c_o=$lt_cv_compiler_c_o
5371 echo "$ac_t""$compiler_c_o" 1>&6
5372
5373 if test x"$compiler_c_o" = x"yes"; then
5374   # Check to see if we can write to a .lo
5375   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5376 echo "configure:5377: checking if $compiler supports -c -o file.lo" >&5
5377   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5378   echo $ac_n "(cached) $ac_c" 1>&6
5379 else
5380   
5381   lt_cv_compiler_o_lo=no
5382   save_CFLAGS="$CFLAGS"
5383   CFLAGS="$CFLAGS -c -o conftest.lo"
5384   save_objext="$ac_objext"
5385   ac_objext=lo
5386   cat > conftest.$ac_ext <<EOF
5387 #line 5388 "configure"
5388 #include "confdefs.h"
5389
5390 int main() {
5391 int some_variable = 0;
5392 ; return 0; }
5393 EOF
5394 if { (eval echo configure:5395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5395   rm -rf conftest*
5396       # The compiler can only warn and ignore the option if not recognized
5397     # So say no if there are warnings
5398     if test -s conftest.err; then
5399       lt_cv_compiler_o_lo=no
5400     else
5401       lt_cv_compiler_o_lo=yes
5402     fi
5403   
5404 else
5405   echo "configure: failed program was:" >&5
5406   cat conftest.$ac_ext >&5
5407 fi
5408 rm -f conftest*
5409   ac_objext="$save_objext"
5410   CFLAGS="$save_CFLAGS"
5411   
5412 fi
5413
5414   compiler_o_lo=$lt_cv_compiler_o_lo
5415   echo "$ac_t""$compiler_o_lo" 1>&6
5416 else
5417   compiler_o_lo=no
5418 fi
5419
5420 # Check to see if we can do hard links to lock some files if needed
5421 hard_links="nottested"
5422 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5423   # do not overwrite the value of need_locks provided by the user
5424   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5425 echo "configure:5426: checking if we can lock with hard links" >&5
5426   hard_links=yes
5427   $rm conftest*
5428   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5429   touch conftest.a
5430   ln conftest.a conftest.b 2>&5 || hard_links=no
5431   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5432   echo "$ac_t""$hard_links" 1>&6
5433   if test "$hard_links" = no; then
5434     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5435     need_locks=warn
5436   fi
5437 else
5438   need_locks=no
5439 fi
5440
5441 if test "$GCC" = yes; then
5442   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5443   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5444 echo "configure:5445: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5445   echo "int some_variable = 0;" > conftest.$ac_ext
5446   save_CFLAGS="$CFLAGS"
5447   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5448   compiler_rtti_exceptions=no
5449   cat > conftest.$ac_ext <<EOF
5450 #line 5451 "configure"
5451 #include "confdefs.h"
5452
5453 int main() {
5454 int some_variable = 0;
5455 ; return 0; }
5456 EOF
5457 if { (eval echo configure:5458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5458   rm -rf conftest*
5459       # The compiler can only warn and ignore the option if not recognized
5460     # So say no if there are warnings
5461     if test -s conftest.err; then
5462       compiler_rtti_exceptions=no
5463     else
5464       compiler_rtti_exceptions=yes
5465     fi
5466   
5467 else
5468   echo "configure: failed program was:" >&5
5469   cat conftest.$ac_ext >&5
5470 fi
5471 rm -f conftest*
5472   CFLAGS="$save_CFLAGS"
5473   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5474
5475   if test "$compiler_rtti_exceptions" = "yes"; then
5476     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5477   else
5478     no_builtin_flag=' -fno-builtin'
5479   fi
5480 fi
5481
5482 # See if the linker supports building shared libraries.
5483 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5484 echo "configure:5485: checking whether the linker ($LD) supports shared libraries" >&5
5485
5486 allow_undefined_flag=
5487 no_undefined_flag=
5488 need_lib_prefix=unknown
5489 need_version=unknown
5490 # when you set need_version to no, make sure it does not cause -set_version
5491 # flags to be left without arguments
5492 archive_cmds=
5493 archive_expsym_cmds=
5494 old_archive_from_new_cmds=
5495 old_archive_from_expsyms_cmds=
5496 export_dynamic_flag_spec=
5497 whole_archive_flag_spec=
5498 thread_safe_flag_spec=
5499 hardcode_into_libs=no
5500 hardcode_libdir_flag_spec=
5501 hardcode_libdir_separator=
5502 hardcode_direct=no
5503 hardcode_minus_L=no
5504 hardcode_shlibpath_var=unsupported
5505 runpath_var=
5506 link_all_deplibs=unknown
5507 always_export_symbols=no
5508 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5509 # include_expsyms should be a list of space-separated symbols to be *always*
5510 # included in the symbol list
5511 include_expsyms=
5512 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5513 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5514 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5515 # as well as any symbol that contains `d'.
5516 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5517 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5518 # platforms (ab)use it in PIC code, but their linkers get confused if
5519 # the symbol is explicitly referenced.  Since portable code cannot
5520 # rely on this symbol name, it's probably fine to never include it in
5521 # preloaded symbol tables.
5522 extract_expsyms_cmds=
5523
5524 case $host_os in
5525 cygwin* | mingw* | pw32*)
5526   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5527   # When not using gcc, we currently assume that we are using
5528   # Microsoft Visual C++.
5529   if test "$GCC" != yes; then
5530     with_gnu_ld=no
5531   fi
5532   ;;
5533 openbsd*)
5534   with_gnu_ld=no
5535   ;;
5536 esac
5537
5538 ld_shlibs=yes
5539 if test "$with_gnu_ld" = yes; then
5540   # If archive_cmds runs LD, not CC, wlarc should be empty
5541   wlarc='${wl}'
5542
5543   # See if GNU ld supports shared libraries.
5544   case $host_os in
5545   aix3* | aix4* | aix5*)
5546     # On AIX, the GNU linker is very broken
5547     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5548     ld_shlibs=no
5549     cat <<EOF 1>&2
5550
5551 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5552 *** to be unable to reliably create shared libraries on AIX.
5553 *** Therefore, libtool is disabling shared libraries support.  If you
5554 *** really care for shared libraries, you may want to modify your PATH
5555 *** so that a non-GNU linker is found, and then restart.
5556
5557 EOF
5558     ;;
5559
5560   amigaos*)
5561     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)'
5562     hardcode_libdir_flag_spec='-L$libdir'
5563     hardcode_minus_L=yes
5564
5565     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5566     # that the semantics of dynamic libraries on AmigaOS, at least up
5567     # to version 4, is to share data among multiple programs linked
5568     # with the same dynamic library.  Since this doesn't match the
5569     # behavior of shared libraries on other platforms, we can use
5570     # them.
5571     ld_shlibs=no
5572     ;;
5573
5574   beos*)
5575     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5576       allow_undefined_flag=unsupported
5577       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5578       # support --undefined.  This deserves some investigation.  FIXME
5579       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5580     else
5581       ld_shlibs=no
5582     fi
5583     ;;
5584
5585   cygwin* | mingw* | pw32*)
5586     # hardcode_libdir_flag_spec is actually meaningless, as there is
5587     # no search path for DLLs.
5588     hardcode_libdir_flag_spec='-L$libdir'
5589     allow_undefined_flag=unsupported
5590     always_export_symbols=yes
5591
5592     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5593       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5594       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5595       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5596       else $CC -o impgen impgen.c ; fi)~
5597       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5598
5599     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5600
5601     # cygwin and mingw dlls have different entry points and sets of symbols
5602     # to exclude.
5603     # FIXME: what about values for MSVC?
5604     dll_entry=__cygwin_dll_entry@12
5605     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5606     case $host_os in
5607     mingw*)
5608       # mingw values
5609       dll_entry=_DllMainCRTStartup@12
5610       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5611       ;;
5612     esac
5613
5614     # mingw and cygwin differ, and it's simplest to just exclude the union
5615     # of the two symbol sets.
5616     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5617
5618     # recent cygwin and mingw systems supply a stub DllMain which the user
5619     # can override, but on older systems we have to supply one (in ltdll.c)
5620     if test "x$lt_cv_need_dllmain" = "xyes"; then
5621       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5622       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~
5623         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5624     else
5625       ltdll_obj=
5626       ltdll_cmds=
5627     fi
5628
5629     # Extract the symbol export list from an `--export-all' def file,
5630     # then regenerate the def file from the symbol export list, so that
5631     # the compiled dll only exports the symbol export list.
5632     # Be careful not to strip the DATA tag left be newer dlltools.
5633     export_symbols_cmds="$ltdll_cmds"'
5634       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5635       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5636
5637     # If the export-symbols file already is a .def file (1st line
5638     # is EXPORTS), use it as is.
5639     # If DATA tags from a recent dlltool are present, honour them!
5640     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5641         cp $export_symbols $output_objdir/$soname-def;
5642       else
5643         echo EXPORTS > $output_objdir/$soname-def;
5644         _lt_hint=1;
5645         cat $export_symbols | while read symbol; do
5646          set dummy \$symbol;
5647          case \$# in
5648            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5649            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5650            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5651          esac;
5652          _lt_hint=`expr 1 + \$_lt_hint`;
5653         done;
5654       fi~
5655       '"$ltdll_cmds"'
5656       $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~
5657       $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~
5658       $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~
5659       $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~
5660       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5661     ;;
5662
5663   netbsd*)
5664     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5665       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5666       wlarc=
5667     else
5668       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5669       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5670     fi
5671     ;;
5672
5673   solaris* | sysv5*)
5674     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5675       ld_shlibs=no
5676       cat <<EOF 1>&2
5677
5678 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5679 *** create shared libraries on Solaris systems.  Therefore, libtool
5680 *** is disabling shared libraries support.  We urge you to upgrade GNU
5681 *** binutils to release 2.9.1 or newer.  Another option is to modify
5682 *** your PATH or compiler configuration so that the native linker is
5683 *** used, and then restart.
5684
5685 EOF
5686     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5687       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5688       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5689     else
5690       ld_shlibs=no
5691     fi
5692     ;;
5693
5694   sunos4*)
5695     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5696     wlarc=
5697     hardcode_direct=yes
5698     hardcode_shlibpath_var=no
5699     ;;
5700
5701   *)
5702     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5703       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5704       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5705     else
5706       ld_shlibs=no
5707     fi
5708     ;;
5709   esac
5710
5711   if test "$ld_shlibs" = yes; then
5712     runpath_var=LD_RUN_PATH
5713     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5714     export_dynamic_flag_spec='${wl}--export-dynamic'
5715     case $host_os in
5716     cygwin* | mingw* | pw32*)
5717       # dlltool doesn't understand --whole-archive et. al.
5718       whole_archive_flag_spec=
5719       ;;
5720     *)
5721       # ancient GNU ld didn't support --whole-archive et. al.
5722       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5723         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5724       else
5725         whole_archive_flag_spec=
5726       fi
5727       ;;
5728     esac
5729   fi
5730 else
5731   # PORTME fill in a description of your system's linker (not GNU ld)
5732   case $host_os in
5733   aix3*)
5734     allow_undefined_flag=unsupported
5735     always_export_symbols=yes
5736     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'
5737     # Note: this linker hardcodes the directories in LIBPATH if there
5738     # are no directories specified by -L.
5739     hardcode_minus_L=yes
5740     if test "$GCC" = yes && test -z "$link_static_flag"; then
5741       # Neither direct hardcoding nor static linking is supported with a
5742       # broken collect2.
5743       hardcode_direct=unsupported
5744     fi
5745     ;;
5746
5747   aix4* | aix5*)
5748     if test "$host_cpu" = ia64; then
5749       # On IA64, the linker does run time linking by default, so we don't
5750       # have to do anything special.
5751       aix_use_runtimelinking=no
5752       exp_sym_flag='-Bexport'
5753       no_entry_flag=""
5754     else
5755       aix_use_runtimelinking=no
5756
5757       # Test if we are trying to use run time linking or normal
5758       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5759       # need to do runtime linking.
5760       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5761         for ld_flag in $LDFLAGS; do
5762           case $ld_flag in
5763           *-brtl*)
5764             aix_use_runtimelinking=yes
5765             break
5766           ;;
5767           esac
5768         done
5769       esac
5770
5771       exp_sym_flag='-bexport'
5772       no_entry_flag='-bnoentry'
5773     fi
5774
5775     # When large executables or shared objects are built, AIX ld can
5776     # have problems creating the table of contents.  If linking a library
5777     # or program results in "error TOC overflow" add -mminimal-toc to
5778     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5779     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5780
5781     hardcode_direct=yes
5782     archive_cmds=''
5783     hardcode_libdir_separator=':'
5784     if test "$GCC" = yes; then
5785       case $host_os in aix4.[012]|aix4.[012].*)
5786         collect2name=`${CC} -print-prog-name=collect2`
5787         if test -f "$collect2name" && \
5788           strings "$collect2name" | grep resolve_lib_name >/dev/null
5789         then
5790           # We have reworked collect2
5791           hardcode_direct=yes
5792         else
5793           # We have old collect2
5794           hardcode_direct=unsupported
5795           # It fails to find uninstalled libraries when the uninstalled
5796           # path is not listed in the libpath.  Setting hardcode_minus_L
5797           # to unsupported forces relinking
5798           hardcode_minus_L=yes
5799           hardcode_libdir_flag_spec='-L$libdir'
5800           hardcode_libdir_separator=
5801         fi
5802       esac
5803
5804       shared_flag='-shared'
5805     else
5806       # not using gcc
5807       if test "$host_cpu" = ia64; then
5808         shared_flag='${wl}-G'
5809       else
5810         if test "$aix_use_runtimelinking" = yes; then
5811           shared_flag='${wl}-G'
5812         else
5813           shared_flag='${wl}-bM:SRE'
5814         fi
5815       fi
5816     fi
5817
5818     # It seems that -bexpall can do strange things, so it is better to
5819     # generate a list of symbols to export.
5820     always_export_symbols=yes
5821     if test "$aix_use_runtimelinking" = yes; then
5822       # Warning - without using the other runtime loading flags (-brtl),
5823       # -berok will link without error, but may produce a broken library.
5824       allow_undefined_flag='-berok'
5825       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5826       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"
5827     else
5828       if test "$host_cpu" = ia64; then
5829         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5830         allow_undefined_flag="-z nodefs"
5831         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"
5832       else
5833         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5834         # Warning - without using the other run time loading flags,
5835         # -berok will link without error, but may produce a broken library.
5836         allow_undefined_flag='${wl}-berok'
5837         # This is a bit strange, but is similar to how AIX traditionally builds
5838         # it's shared libraries.
5839         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'
5840       fi
5841     fi
5842     ;;
5843
5844   amigaos*)
5845     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)'
5846     hardcode_libdir_flag_spec='-L$libdir'
5847     hardcode_minus_L=yes
5848     # see comment about different semantics on the GNU ld section
5849     ld_shlibs=no
5850     ;;
5851
5852   cygwin* | mingw* | pw32*)
5853     # When not using gcc, we currently assume that we are using
5854     # Microsoft Visual C++.
5855     # hardcode_libdir_flag_spec is actually meaningless, as there is
5856     # no search path for DLLs.
5857     hardcode_libdir_flag_spec=' '
5858     allow_undefined_flag=unsupported
5859     # Tell ltmain to make .lib files, not .a files.
5860     libext=lib
5861     # FIXME: Setting linknames here is a bad hack.
5862     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5863     # The linker will automatically build a .lib file if we build a DLL.
5864     old_archive_from_new_cmds='true'
5865     # FIXME: Should let the user specify the lib program.
5866     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5867     fix_srcfile_path='`cygpath -w "$srcfile"`'
5868     ;;
5869
5870   darwin* | rhapsody*)
5871     case "$host_os" in
5872     rhapsody* | darwin1.[012])
5873       allow_undefined_flag='-undefined suppress'
5874       ;;
5875     *) # Darwin 1.3 on
5876       allow_undefined_flag='-flat_namespace -undefined suppress'
5877       ;;
5878     esac
5879     # FIXME: Relying on posixy $() will cause problems for
5880     #        cross-compilation, but unfortunately the echo tests do not
5881     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5882     #        `"' quotes if we put them in here... so don't!
5883     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)'
5884     # We need to add '_' to the symbols in $export_symbols first
5885     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5886     hardcode_direct=yes
5887     hardcode_shlibpath_var=no
5888     whole_archive_flag_spec='-all_load $convenience'
5889     ;;
5890
5891   freebsd1*)
5892     ld_shlibs=no
5893     ;;
5894
5895   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5896   # support.  Future versions do this automatically, but an explicit c++rt0.o
5897   # does not break anything, and helps significantly (at the cost of a little
5898   # extra space).
5899   freebsd2.2*)
5900     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5901     hardcode_libdir_flag_spec='-R$libdir'
5902     hardcode_direct=yes
5903     hardcode_shlibpath_var=no
5904     ;;
5905
5906   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5907   freebsd2*)
5908     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5909     hardcode_direct=yes
5910     hardcode_minus_L=yes
5911     hardcode_shlibpath_var=no
5912     ;;
5913
5914   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5915   freebsd*)
5916     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5917     hardcode_libdir_flag_spec='-R$libdir'
5918     hardcode_direct=yes
5919     hardcode_shlibpath_var=no
5920     ;;
5921
5922   hpux9* | hpux10* | hpux11*)
5923     case $host_os in
5924     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' ;;
5925     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5926     esac
5927     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5928     hardcode_libdir_separator=:
5929     hardcode_direct=yes
5930     hardcode_minus_L=yes # Not in the search PATH, but as the default
5931                          # location of the library.
5932     export_dynamic_flag_spec='${wl}-E'
5933     ;;
5934
5935   irix5* | irix6* | nonstopux*)
5936     if test "$GCC" = yes; then
5937       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'
5938       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5939     else
5940       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'
5941       hardcode_libdir_flag_spec='-rpath $libdir'
5942     fi
5943     hardcode_libdir_separator=:
5944     link_all_deplibs=yes
5945     ;;
5946
5947   netbsd*)
5948     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5949       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5950     else
5951       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5952     fi
5953     hardcode_libdir_flag_spec='-R$libdir'
5954     hardcode_direct=yes
5955     hardcode_shlibpath_var=no
5956     ;;
5957
5958   newsos6)
5959     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5960     hardcode_direct=yes
5961     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5962     hardcode_libdir_separator=:
5963     hardcode_shlibpath_var=no
5964     ;;
5965
5966   openbsd*)
5967     hardcode_direct=yes
5968     hardcode_shlibpath_var=no
5969     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5970       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5971       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5972       export_dynamic_flag_spec='${wl}-E'
5973     else
5974       case "$host_os" in
5975       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5976         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5977         hardcode_libdir_flag_spec='-R$libdir'
5978         ;;
5979       *)
5980         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5981         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5982         ;;
5983       esac
5984     fi
5985     ;;
5986
5987   openedition*)
5988     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5989         cp \$linknames \$output_objdir && linknames=''"
5990     export_dynamic_flag_spec="-Wl,DLL"
5991     ;;
5992
5993   os2*)
5994     hardcode_libdir_flag_spec='-L$libdir'
5995     hardcode_minus_L=yes
5996     allow_undefined_flag=unsupported
5997     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'
5998     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5999     ;;
6000
6001   osf3*)
6002     if test "$GCC" = yes; then
6003       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6004       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'
6005     else
6006       allow_undefined_flag=' -expect_unresolved \*'
6007       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'
6008     fi
6009     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6010     hardcode_libdir_separator=:
6011     ;;
6012
6013   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6014     if test "$GCC" = yes; then
6015       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6016       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'
6017       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6018     else
6019       allow_undefined_flag=' -expect_unresolved \*'
6020       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'
6021       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6022       $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'
6023
6024       #Both c and cxx compiler support -rpath directly
6025       hardcode_libdir_flag_spec='-rpath $libdir'
6026     fi
6027     hardcode_libdir_separator=:
6028     ;;
6029
6030   sco3.2v5*)
6031     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6032     hardcode_shlibpath_var=no
6033     runpath_var=LD_RUN_PATH
6034     hardcode_runpath_var=yes
6035     export_dynamic_flag_spec='${wl}-Bexport'
6036     ;;
6037
6038   solaris*)
6039     # gcc --version < 3.0 without binutils cannot create self contained
6040     # shared libraries reliably, requiring libgcc.a to resolve some of
6041     # the object symbols generated in some cases.  Libraries that use
6042     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6043     # a copy of libgcc.a into every shared library to guarantee resolving
6044     # such symbols causes other problems:  According to Tim Van Holder
6045     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6046     # (to the application) exception stack for one thing.
6047     no_undefined_flag=' -z defs'
6048     if test "$GCC" = yes; then
6049       case `$CC --version 2>/dev/null` in
6050       [12].*)
6051         cat <<EOF 1>&2
6052
6053 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6054 *** create self contained shared libraries on Solaris systems, without
6055 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6056 *** -no-undefined support, which will at least allow you to build shared
6057 *** libraries.  However, you may find that when you link such libraries
6058 *** into an application without using GCC, you have to manually add
6059 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6060 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6061 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6062
6063 EOF
6064         no_undefined_flag=
6065         ;;
6066       esac
6067     fi
6068     # $CC -shared without GNU ld will not create a library from C++
6069     # object files and a static libstdc++, better avoid it by now
6070     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6071     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6072                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6073     hardcode_libdir_flag_spec='-R$libdir'
6074     hardcode_shlibpath_var=no
6075     case $host_os in
6076     solaris2.[0-5] | solaris2.[0-5].*) ;;
6077     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6078       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6079     esac
6080     link_all_deplibs=yes
6081     ;;
6082
6083   sunos4*)
6084     if test "x$host_vendor" = xsequent; then
6085       # Use $CC to link under sequent, because it throws in some extra .o
6086       # files that make .init and .fini sections work.
6087       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6088     else
6089       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6090     fi
6091     hardcode_libdir_flag_spec='-L$libdir'
6092     hardcode_direct=yes
6093     hardcode_minus_L=yes
6094     hardcode_shlibpath_var=no
6095     ;;
6096
6097   sysv4)
6098     case $host_vendor in
6099       sni)
6100         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6101         hardcode_direct=yes # is this really true???
6102         ;;
6103       siemens)
6104         ## LD is ld it makes a PLAMLIB
6105         ## CC just makes a GrossModule.
6106         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6107         reload_cmds='$CC -r -o $output$reload_objs'
6108         hardcode_direct=no
6109         ;;
6110       motorola)
6111         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6112         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6113         ;;
6114     esac
6115     runpath_var='LD_RUN_PATH'
6116     hardcode_shlibpath_var=no
6117     ;;
6118
6119   sysv4.3*)
6120     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6121     hardcode_shlibpath_var=no
6122     export_dynamic_flag_spec='-Bexport'
6123     ;;
6124
6125   sysv5*)
6126     no_undefined_flag=' -z text'
6127     # $CC -shared without GNU ld will not create a library from C++
6128     # object files and a static libstdc++, better avoid it by now
6129     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6130     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6131                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6132     hardcode_libdir_flag_spec=
6133     hardcode_shlibpath_var=no
6134     runpath_var='LD_RUN_PATH'
6135     ;;
6136
6137   uts4*)
6138     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6139     hardcode_libdir_flag_spec='-L$libdir'
6140     hardcode_shlibpath_var=no
6141     ;;
6142
6143   dgux*)
6144     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6145     hardcode_libdir_flag_spec='-L$libdir'
6146     hardcode_shlibpath_var=no
6147     ;;
6148
6149   sysv4*MP*)
6150     if test -d /usr/nec; then
6151       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6152       hardcode_shlibpath_var=no
6153       runpath_var=LD_RUN_PATH
6154       hardcode_runpath_var=yes
6155       ld_shlibs=yes
6156     fi
6157     ;;
6158
6159   sysv4.2uw2*)
6160     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6161     hardcode_direct=yes
6162     hardcode_minus_L=no
6163     hardcode_shlibpath_var=no
6164     hardcode_runpath_var=yes
6165     runpath_var=LD_RUN_PATH
6166     ;;
6167
6168   sysv5uw7* | unixware7*)
6169     no_undefined_flag='${wl}-z ${wl}text'
6170     if test "$GCC" = yes; then
6171       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6172     else
6173       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6174     fi
6175     runpath_var='LD_RUN_PATH'
6176     hardcode_shlibpath_var=no
6177     ;;
6178
6179   *)
6180     ld_shlibs=no
6181     ;;
6182   esac
6183 fi
6184 echo "$ac_t""$ld_shlibs" 1>&6
6185 test "$ld_shlibs" = no && can_build_shared=no
6186
6187 # Check hardcoding attributes.
6188 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6189 echo "configure:6190: checking how to hardcode library paths into programs" >&5
6190 hardcode_action=
6191 if test -n "$hardcode_libdir_flag_spec" || \
6192    test -n "$runpath_var"; then
6193
6194   # We can hardcode non-existant directories.
6195   if test "$hardcode_direct" != no &&
6196      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6197      # have to relink, otherwise we might link with an installed library
6198      # when we should be linking with a yet-to-be-installed one
6199      ## test "$hardcode_shlibpath_var" != no &&
6200      test "$hardcode_minus_L" != no; then
6201     # Linking always hardcodes the temporary library directory.
6202     hardcode_action=relink
6203   else
6204     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6205     hardcode_action=immediate
6206   fi
6207 else
6208   # We cannot hardcode anything, or else we can only hardcode existing
6209   # directories.
6210   hardcode_action=unsupported
6211 fi
6212 echo "$ac_t""$hardcode_action" 1>&6
6213
6214 striplib=
6215 old_striplib=
6216 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6217 echo "configure:6218: checking whether stripping libraries is possible" >&5
6218 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6219   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6220   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6221   echo "$ac_t""yes" 1>&6
6222 else
6223   echo "$ac_t""no" 1>&6
6224 fi
6225
6226 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6227 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6228
6229 # PORTME Fill in your ld.so characteristics
6230 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6231 echo "configure:6232: checking dynamic linker characteristics" >&5
6232 library_names_spec=
6233 libname_spec='lib$name'
6234 soname_spec=
6235 postinstall_cmds=
6236 postuninstall_cmds=
6237 finish_cmds=
6238 finish_eval=
6239 shlibpath_var=
6240 shlibpath_overrides_runpath=unknown
6241 version_type=none
6242 dynamic_linker="$host_os ld.so"
6243 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6244 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6245
6246 case $host_os in
6247 aix3*)
6248   version_type=linux
6249   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6250   shlibpath_var=LIBPATH
6251
6252   # AIX has no versioning support, so we append a major version to the name.
6253   soname_spec='${libname}${release}.so$major'
6254   ;;
6255
6256 aix4* | aix5*)
6257   version_type=linux
6258   need_lib_prefix=no
6259   need_version=no
6260   hardcode_into_libs=yes
6261   if test "$host_cpu" = ia64; then
6262     # AIX 5 supports IA64
6263     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6264     shlibpath_var=LD_LIBRARY_PATH
6265   else
6266     # With GCC up to 2.95.x, collect2 would create an import file
6267     # for dependence libraries.  The import file would start with
6268     # the line `#! .'.  This would cause the generated library to
6269     # depend on `.', always an invalid library.  This was fixed in
6270     # development snapshots of GCC prior to 3.0.
6271     case $host_os in
6272       aix4 | aix4.[01] | aix4.[01].*)
6273         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6274              echo ' yes '
6275              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6276           :
6277         else
6278           can_build_shared=no
6279         fi
6280         ;;
6281     esac
6282     # AIX (on Power*) has no versioning support, so currently we can
6283     # not hardcode correct soname into executable. Probably we can
6284     # add versioning support to collect2, so additional links can
6285     # be useful in future.
6286     if test "$aix_use_runtimelinking" = yes; then
6287       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6288       # instead of lib<name>.a to let people know that these are not
6289       # typical AIX shared libraries.
6290       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6291     else
6292       # We preserve .a as extension for shared libraries through AIX4.2
6293       # and later when we are not doing run time linking.
6294       library_names_spec='${libname}${release}.a $libname.a'
6295       soname_spec='${libname}${release}.so$major'
6296     fi
6297     shlibpath_var=LIBPATH
6298   fi
6299   hardcode_into_libs=yes
6300   ;;
6301
6302 amigaos*)
6303   library_names_spec='$libname.ixlibrary $libname.a'
6304   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6305   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'
6306   ;;
6307
6308 beos*)
6309   library_names_spec='${libname}.so'
6310   dynamic_linker="$host_os ld.so"
6311   shlibpath_var=LIBRARY_PATH
6312   ;;
6313
6314 bsdi4*)
6315   version_type=linux
6316   need_version=no
6317   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6318   soname_spec='${libname}${release}.so$major'
6319   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6320   shlibpath_var=LD_LIBRARY_PATH
6321   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6322   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6323   export_dynamic_flag_spec=-rdynamic
6324   # the default ld.so.conf also contains /usr/contrib/lib and
6325   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6326   # libtool to hard-code these into programs
6327   ;;
6328
6329 cygwin* | mingw* | pw32*)
6330   version_type=windows
6331   need_version=no
6332   need_lib_prefix=no
6333   case $GCC,$host_os in
6334   yes,cygwin*)
6335     library_names_spec='$libname.dll.a'
6336     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6337     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6338       dldir=$destdir/`dirname \$dlpath`~
6339       test -d \$dldir || mkdir -p \$dldir~
6340       $install_prog .libs/$dlname \$dldir/$dlname'
6341     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6342       dlpath=$dir/\$dldll~
6343        $rm \$dlpath'
6344     ;;
6345   yes,mingw*)
6346     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6347     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6348     ;;
6349   yes,pw32*)
6350     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6351     ;;
6352   *)
6353     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6354     ;;
6355   esac
6356   dynamic_linker='Win32 ld.exe'
6357   # FIXME: first we should search . and the directory the executable is in
6358   shlibpath_var=PATH
6359   ;;
6360
6361 darwin* | rhapsody*)
6362   dynamic_linker="$host_os dyld"
6363   version_type=darwin
6364   need_lib_prefix=no
6365   need_version=no
6366   # FIXME: Relying on posixy $() will cause problems for
6367   #        cross-compilation, but unfortunately the echo tests do not
6368   #        yet detect zsh echo's removal of \ escapes.
6369   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)'
6370   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6371   shlibpath_overrides_runpath=yes
6372   shlibpath_var=DYLD_LIBRARY_PATH
6373   ;;
6374
6375 freebsd1*)
6376   dynamic_linker=no
6377   ;;
6378
6379 freebsd*)
6380   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6381   version_type=freebsd-$objformat
6382   case $version_type in
6383     freebsd-elf*)
6384       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6385       need_version=no
6386       need_lib_prefix=no
6387       ;;
6388     freebsd-*)
6389       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6390       need_version=yes
6391       ;;
6392   esac
6393   shlibpath_var=LD_LIBRARY_PATH
6394   case $host_os in
6395   freebsd2*)
6396     shlibpath_overrides_runpath=yes
6397     ;;
6398   *)
6399     shlibpath_overrides_runpath=no
6400     hardcode_into_libs=yes
6401     ;;
6402   esac
6403   ;;
6404
6405 gnu*)
6406   version_type=linux
6407   need_lib_prefix=no
6408   need_version=no
6409   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6410   soname_spec='${libname}${release}.so$major'
6411   shlibpath_var=LD_LIBRARY_PATH
6412   hardcode_into_libs=yes
6413   ;;
6414
6415 hpux9* | hpux10* | hpux11*)
6416   # Give a soname corresponding to the major version so that dld.sl refuses to
6417   # link against other versions.
6418   dynamic_linker="$host_os dld.sl"
6419   version_type=sunos
6420   need_lib_prefix=no
6421   need_version=no
6422   shlibpath_var=SHLIB_PATH
6423   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6424   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6425   soname_spec='${libname}${release}.sl$major'
6426   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6427   postinstall_cmds='chmod 555 $lib'
6428   ;;
6429
6430 irix5* | irix6* | nonstopux*)
6431   case $host_os in
6432     nonstopux*) version_type=nonstopux ;;
6433     *)          version_type=irix ;;
6434   esac
6435   need_lib_prefix=no
6436   need_version=no
6437   soname_spec='${libname}${release}.so$major'
6438   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6439   case $host_os in
6440   irix5* | nonstopux*)
6441     libsuff= shlibsuff=
6442     ;;
6443   *)
6444     case $LD in # libtool.m4 will add one of these switches to LD
6445     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6446     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6447     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6448     *) libsuff= shlibsuff= libmagic=never-match;;
6449     esac
6450     ;;
6451   esac
6452   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6453   shlibpath_overrides_runpath=no
6454   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6455   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6456   ;;
6457
6458 # No shared lib support for Linux oldld, aout, or coff.
6459 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6460   dynamic_linker=no
6461   ;;
6462
6463 # This must be Linux ELF.
6464 linux-gnu*)
6465   version_type=linux
6466   need_lib_prefix=no
6467   need_version=no
6468   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6469   soname_spec='${libname}${release}.so$major'
6470   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6471   shlibpath_var=LD_LIBRARY_PATH
6472   shlibpath_overrides_runpath=no
6473   # This implies no fast_install, which is unacceptable.
6474   # Some rework will be needed to allow for fast_install
6475   # before this can be enabled.
6476   hardcode_into_libs=yes
6477
6478   # We used to test for /lib/ld.so.1 and disable shared libraries on
6479   # powerpc, because MkLinux only supported shared libraries with the
6480   # GNU dynamic linker.  Since this was broken with cross compilers,
6481   # most powerpc-linux boxes support dynamic linking these days and
6482   # people can always --disable-shared, the test was removed, and we
6483   # assume the GNU/Linux dynamic linker is in use.
6484   dynamic_linker='GNU/Linux ld.so'
6485   ;;
6486
6487 netbsd*)
6488   version_type=sunos
6489   need_lib_prefix=no
6490   need_version=no
6491   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6492     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6493     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6494     dynamic_linker='NetBSD (a.out) ld.so'
6495   else
6496     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6497     soname_spec='${libname}${release}.so$major'
6498     dynamic_linker='NetBSD ld.elf_so'
6499   fi
6500   shlibpath_var=LD_LIBRARY_PATH
6501   shlibpath_overrides_runpath=yes
6502   hardcode_into_libs=yes
6503   ;;
6504
6505 newsos6)
6506   version_type=linux
6507   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6508   shlibpath_var=LD_LIBRARY_PATH
6509   shlibpath_overrides_runpath=yes
6510   ;;
6511
6512 openbsd*)
6513   version_type=sunos
6514   need_lib_prefix=no
6515   need_version=no
6516   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6517     case "$host_os" in
6518     openbsd2.[89] | openbsd2.[89].*)
6519       shlibpath_overrides_runpath=no
6520       ;;
6521     *)
6522       shlibpath_overrides_runpath=yes
6523       ;;
6524     esac
6525   else
6526     shlibpath_overrides_runpath=yes
6527   fi
6528   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6529   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6530   shlibpath_var=LD_LIBRARY_PATH
6531   ;;
6532
6533 openedition*)
6534   need_lib_prefix=no
6535   need_version=no
6536   shlibpath_var=LIBPATH
6537   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir"
6538   # the library's exports are in libname.x; this is the file that must
6539   # actually be linked with to use a DLL.
6540   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6541   ;;
6542
6543 os2*)
6544   libname_spec='$name'
6545   need_lib_prefix=no
6546   library_names_spec='$libname.dll $libname.a'
6547   dynamic_linker='OS/2 ld.exe'
6548   shlibpath_var=LIBPATH
6549   ;;
6550
6551 osf3* | osf4* | osf5*)
6552   version_type=osf
6553   need_version=no
6554   soname_spec='${libname}${release}.so$major'
6555   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6556   shlibpath_var=LD_LIBRARY_PATH
6557   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6558   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6559   hardcode_into_libs=yes
6560   ;;
6561
6562 sco3.2v5*)
6563   version_type=osf
6564   soname_spec='${libname}${release}.so$major'
6565   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6566   shlibpath_var=LD_LIBRARY_PATH
6567   ;;
6568
6569 solaris*)
6570   version_type=linux
6571   need_lib_prefix=no
6572   need_version=no
6573   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6574   soname_spec='${libname}${release}.so$major'
6575   shlibpath_var=LD_LIBRARY_PATH
6576   shlibpath_overrides_runpath=yes
6577   hardcode_into_libs=yes
6578   # ldd complains unless libraries are executable
6579   postinstall_cmds='chmod +x $lib'
6580   ;;
6581
6582 sunos4*)
6583   version_type=sunos
6584   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6585   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6586   shlibpath_var=LD_LIBRARY_PATH
6587   shlibpath_overrides_runpath=yes
6588   if test "$with_gnu_ld" = yes; then
6589     need_lib_prefix=no
6590   fi
6591   need_version=yes
6592   ;;
6593
6594 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6595   version_type=linux
6596   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6597   soname_spec='${libname}${release}.so$major'
6598   shlibpath_var=LD_LIBRARY_PATH
6599   case $host_vendor in
6600     sni)
6601       shlibpath_overrides_runpath=no
6602       need_lib_prefix=no
6603       export_dynamic_flag_spec='${wl}-Blargedynsym'
6604       runpath_var=LD_RUN_PATH
6605       ;;
6606     siemens)
6607       need_lib_prefix=no
6608       ;;
6609     motorola)
6610       need_lib_prefix=no
6611       need_version=no
6612       shlibpath_overrides_runpath=no
6613       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6614       ;;
6615   esac
6616   ;;
6617
6618 uts4*)
6619   version_type=linux
6620   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6621   soname_spec='${libname}${release}.so$major'
6622   shlibpath_var=LD_LIBRARY_PATH
6623   ;;
6624
6625 dgux*)
6626   version_type=linux
6627   need_lib_prefix=no
6628   need_version=no
6629   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6630   soname_spec='${libname}${release}.so$major'
6631   shlibpath_var=LD_LIBRARY_PATH
6632   ;;
6633
6634 sysv4*MP*)
6635   if test -d /usr/nec ;then
6636     version_type=linux
6637     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6638     soname_spec='$libname.so.$major'
6639     shlibpath_var=LD_LIBRARY_PATH
6640   fi
6641   ;;
6642
6643 *)
6644   dynamic_linker=no
6645   ;;
6646 esac
6647 echo "$ac_t""$dynamic_linker" 1>&6
6648 test "$dynamic_linker" = no && can_build_shared=no
6649
6650 # Report the final consequences.
6651 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6652 echo "configure:6653: checking if libtool supports shared libraries" >&5
6653 echo "$ac_t""$can_build_shared" 1>&6
6654
6655 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6656 echo "configure:6657: checking whether to build shared libraries" >&5
6657 test "$can_build_shared" = "no" && enable_shared=no
6658
6659 # On AIX, shared libraries and static libraries use the same namespace, and
6660 # are all built from PIC.
6661 case "$host_os" in
6662 aix3*)
6663   test "$enable_shared" = yes && enable_static=no
6664   if test -n "$RANLIB"; then
6665     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6666     postinstall_cmds='$RANLIB $lib'
6667   fi
6668   ;;
6669
6670 aix4*)
6671   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6672     test "$enable_shared" = yes && enable_static=no
6673   fi
6674   ;;
6675 esac
6676 echo "$ac_t""$enable_shared" 1>&6
6677
6678 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6679 echo "configure:6680: checking whether to build static libraries" >&5
6680 # Make sure either enable_shared or enable_static is yes.
6681 test "$enable_shared" = yes || enable_static=yes
6682 echo "$ac_t""$enable_static" 1>&6
6683
6684 if test "$hardcode_action" = relink; then
6685   # Fast installation is not supported
6686   enable_fast_install=no
6687 elif test "$shlibpath_overrides_runpath" = yes ||
6688      test "$enable_shared" = no; then
6689   # Fast installation is not necessary
6690   enable_fast_install=needless
6691 fi
6692
6693 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6694 if test "$GCC" = yes; then
6695   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6696 fi
6697
6698 if test "x$enable_dlopen" != xyes; then
6699   enable_dlopen=unknown
6700   enable_dlopen_self=unknown
6701   enable_dlopen_self_static=unknown
6702 else
6703   lt_cv_dlopen=no
6704   lt_cv_dlopen_libs=
6705
6706   case $host_os in
6707   beos*)
6708     lt_cv_dlopen="load_add_on"
6709     lt_cv_dlopen_libs=
6710     lt_cv_dlopen_self=yes
6711     ;;
6712
6713   cygwin* | mingw* | pw32*)
6714     lt_cv_dlopen="LoadLibrary"
6715     lt_cv_dlopen_libs=
6716    ;;
6717
6718   *)
6719     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6720 echo "configure:6721: checking for dllload" >&5
6721 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6722   echo $ac_n "(cached) $ac_c" 1>&6
6723 else
6724   cat > conftest.$ac_ext <<EOF
6725 #line 6726 "configure"
6726 #include "confdefs.h"
6727 /* System header to define __stub macros and hopefully few prototypes,
6728     which can conflict with char dllload(); below.  */
6729 #include <assert.h>
6730 /* Override any gcc2 internal prototype to avoid an error.  */
6731 /* We use char because int might match the return type of a gcc2
6732     builtin and then its argument prototype would still apply.  */
6733 char dllload();
6734 char (*f)();
6735
6736 int main() {
6737
6738 /* The GNU C library defines this for functions which it implements
6739     to always fail with ENOSYS.  Some functions are actually named
6740     something starting with __ and the normal name is an alias.  */
6741 #if defined (__stub_dllload) || defined (__stub___dllload)
6742 choke me
6743 #else
6744 f = dllload;
6745 #endif
6746
6747 ; return 0; }
6748 EOF
6749 if { (eval echo configure:6750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6750   rm -rf conftest*
6751   eval "ac_cv_func_dllload=yes"
6752 else
6753   echo "configure: failed program was:" >&5
6754   cat conftest.$ac_ext >&5
6755   rm -rf conftest*
6756   eval "ac_cv_func_dllload=no"
6757 fi
6758 rm -f conftest*
6759 fi
6760
6761 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6762   echo "$ac_t""yes" 1>&6
6763   lt_cv_dlopen="dllload"
6764 else
6765   echo "$ac_t""no" 1>&6
6766 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6767 echo "configure:6768: checking for shl_load" >&5
6768 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6769   echo $ac_n "(cached) $ac_c" 1>&6
6770 else
6771   cat > conftest.$ac_ext <<EOF
6772 #line 6773 "configure"
6773 #include "confdefs.h"
6774 /* System header to define __stub macros and hopefully few prototypes,
6775     which can conflict with char shl_load(); below.  */
6776 #include <assert.h>
6777 /* Override any gcc2 internal prototype to avoid an error.  */
6778 /* We use char because int might match the return type of a gcc2
6779     builtin and then its argument prototype would still apply.  */
6780 char shl_load();
6781 char (*f)();
6782
6783 int main() {
6784
6785 /* The GNU C library defines this for functions which it implements
6786     to always fail with ENOSYS.  Some functions are actually named
6787     something starting with __ and the normal name is an alias.  */
6788 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6789 choke me
6790 #else
6791 f = shl_load;
6792 #endif
6793
6794 ; return 0; }
6795 EOF
6796 if { (eval echo configure:6797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6797   rm -rf conftest*
6798   eval "ac_cv_func_shl_load=yes"
6799 else
6800   echo "configure: failed program was:" >&5
6801   cat conftest.$ac_ext >&5
6802   rm -rf conftest*
6803   eval "ac_cv_func_shl_load=no"
6804 fi
6805 rm -f conftest*
6806 fi
6807
6808 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6809   echo "$ac_t""yes" 1>&6
6810   lt_cv_dlopen="shl_load"
6811 else
6812   echo "$ac_t""no" 1>&6
6813 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6814 echo "configure:6815: checking for shl_load in -ldld" >&5
6815 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6816 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6817   echo $ac_n "(cached) $ac_c" 1>&6
6818 else
6819   ac_save_LIBS="$LIBS"
6820 LIBS="-ldld  $LIBS"
6821 cat > conftest.$ac_ext <<EOF
6822 #line 6823 "configure"
6823 #include "confdefs.h"
6824 /* Override any gcc2 internal prototype to avoid an error.  */
6825 /* We use char because int might match the return type of a gcc2
6826     builtin and then its argument prototype would still apply.  */
6827 char shl_load();
6828
6829 int main() {
6830 shl_load()
6831 ; return 0; }
6832 EOF
6833 if { (eval echo configure:6834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6834   rm -rf conftest*
6835   eval "ac_cv_lib_$ac_lib_var=yes"
6836 else
6837   echo "configure: failed program was:" >&5
6838   cat conftest.$ac_ext >&5
6839   rm -rf conftest*
6840   eval "ac_cv_lib_$ac_lib_var=no"
6841 fi
6842 rm -f conftest*
6843 LIBS="$ac_save_LIBS"
6844
6845 fi
6846 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6847   echo "$ac_t""yes" 1>&6
6848   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6849 else
6850   echo "$ac_t""no" 1>&6
6851 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6852 echo "configure:6853: checking for dlopen" >&5
6853 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6854   echo $ac_n "(cached) $ac_c" 1>&6
6855 else
6856   cat > conftest.$ac_ext <<EOF
6857 #line 6858 "configure"
6858 #include "confdefs.h"
6859 /* System header to define __stub macros and hopefully few prototypes,
6860     which can conflict with char dlopen(); below.  */
6861 #include <assert.h>
6862 /* Override any gcc2 internal prototype to avoid an error.  */
6863 /* We use char because int might match the return type of a gcc2
6864     builtin and then its argument prototype would still apply.  */
6865 char dlopen();
6866 char (*f)();
6867
6868 int main() {
6869
6870 /* The GNU C library defines this for functions which it implements
6871     to always fail with ENOSYS.  Some functions are actually named
6872     something starting with __ and the normal name is an alias.  */
6873 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6874 choke me
6875 #else
6876 f = dlopen;
6877 #endif
6878
6879 ; return 0; }
6880 EOF
6881 if { (eval echo configure:6882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6882   rm -rf conftest*
6883   eval "ac_cv_func_dlopen=yes"
6884 else
6885   echo "configure: failed program was:" >&5
6886   cat conftest.$ac_ext >&5
6887   rm -rf conftest*
6888   eval "ac_cv_func_dlopen=no"
6889 fi
6890 rm -f conftest*
6891 fi
6892
6893 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6894   echo "$ac_t""yes" 1>&6
6895   lt_cv_dlopen="dlopen"
6896 else
6897   echo "$ac_t""no" 1>&6
6898 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6899 echo "configure:6900: checking for dlopen in -ldl" >&5
6900 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6901 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6902   echo $ac_n "(cached) $ac_c" 1>&6
6903 else
6904   ac_save_LIBS="$LIBS"
6905 LIBS="-ldl  $LIBS"
6906 cat > conftest.$ac_ext <<EOF
6907 #line 6908 "configure"
6908 #include "confdefs.h"
6909 /* Override any gcc2 internal prototype to avoid an error.  */
6910 /* We use char because int might match the return type of a gcc2
6911     builtin and then its argument prototype would still apply.  */
6912 char dlopen();
6913
6914 int main() {
6915 dlopen()
6916 ; return 0; }
6917 EOF
6918 if { (eval echo configure:6919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6919   rm -rf conftest*
6920   eval "ac_cv_lib_$ac_lib_var=yes"
6921 else
6922   echo "configure: failed program was:" >&5
6923   cat conftest.$ac_ext >&5
6924   rm -rf conftest*
6925   eval "ac_cv_lib_$ac_lib_var=no"
6926 fi
6927 rm -f conftest*
6928 LIBS="$ac_save_LIBS"
6929
6930 fi
6931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6932   echo "$ac_t""yes" 1>&6
6933   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6934 else
6935   echo "$ac_t""no" 1>&6
6936 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6937 echo "configure:6938: checking for dlopen in -lsvld" >&5
6938 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6939 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6940   echo $ac_n "(cached) $ac_c" 1>&6
6941 else
6942   ac_save_LIBS="$LIBS"
6943 LIBS="-lsvld  $LIBS"
6944 cat > conftest.$ac_ext <<EOF
6945 #line 6946 "configure"
6946 #include "confdefs.h"
6947 /* Override any gcc2 internal prototype to avoid an error.  */
6948 /* We use char because int might match the return type of a gcc2
6949     builtin and then its argument prototype would still apply.  */
6950 char dlopen();
6951
6952 int main() {
6953 dlopen()
6954 ; return 0; }
6955 EOF
6956 if { (eval echo configure:6957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6957   rm -rf conftest*
6958   eval "ac_cv_lib_$ac_lib_var=yes"
6959 else
6960   echo "configure: failed program was:" >&5
6961   cat conftest.$ac_ext >&5
6962   rm -rf conftest*
6963   eval "ac_cv_lib_$ac_lib_var=no"
6964 fi
6965 rm -f conftest*
6966 LIBS="$ac_save_LIBS"
6967
6968 fi
6969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6970   echo "$ac_t""yes" 1>&6
6971   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6972 else
6973   echo "$ac_t""no" 1>&6
6974 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6975 echo "configure:6976: checking for dld_link in -ldld" >&5
6976 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6977 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6978   echo $ac_n "(cached) $ac_c" 1>&6
6979 else
6980   ac_save_LIBS="$LIBS"
6981 LIBS="-ldld  $LIBS"
6982 cat > conftest.$ac_ext <<EOF
6983 #line 6984 "configure"
6984 #include "confdefs.h"
6985 /* Override any gcc2 internal prototype to avoid an error.  */
6986 /* We use char because int might match the return type of a gcc2
6987     builtin and then its argument prototype would still apply.  */
6988 char dld_link();
6989
6990 int main() {
6991 dld_link()
6992 ; return 0; }
6993 EOF
6994 if { (eval echo configure:6995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6995   rm -rf conftest*
6996   eval "ac_cv_lib_$ac_lib_var=yes"
6997 else
6998   echo "configure: failed program was:" >&5
6999   cat conftest.$ac_ext >&5
7000   rm -rf conftest*
7001   eval "ac_cv_lib_$ac_lib_var=no"
7002 fi
7003 rm -f conftest*
7004 LIBS="$ac_save_LIBS"
7005
7006 fi
7007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7008   echo "$ac_t""yes" 1>&6
7009   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
7010 else
7011   echo "$ac_t""no" 1>&6
7012 fi
7013
7014               
7015 fi
7016
7017             
7018 fi
7019
7020           
7021 fi
7022
7023         
7024 fi
7025
7026       
7027 fi
7028
7029     
7030 fi
7031
7032     ;;
7033   esac
7034
7035   if test "x$lt_cv_dlopen" != xno; then
7036     enable_dlopen=yes
7037   else
7038     enable_dlopen=no
7039   fi
7040
7041   case $lt_cv_dlopen in
7042   dlopen)
7043     save_CPPFLAGS="$CPPFLAGS"
7044         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
7045
7046     save_LDFLAGS="$LDFLAGS"
7047     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7048
7049     save_LIBS="$LIBS"
7050     LIBS="$lt_cv_dlopen_libs $LIBS"
7051
7052     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
7053 echo "configure:7054: checking whether a program can dlopen itself" >&5
7054 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
7055   echo $ac_n "(cached) $ac_c" 1>&6
7056 else
7057           if test "$cross_compiling" = yes; then :
7058   lt_cv_dlopen_self=cross
7059 else
7060     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7061   lt_status=$lt_dlunknown
7062   cat > conftest.$ac_ext <<EOF
7063 #line 7064 "configure"
7064 #include "confdefs.h"
7065
7066 #if HAVE_DLFCN_H
7067 #include <dlfcn.h>
7068 #endif
7069
7070 #include <stdio.h>
7071
7072 #ifdef RTLD_GLOBAL
7073 #  define LT_DLGLOBAL           RTLD_GLOBAL
7074 #else
7075 #  ifdef DL_GLOBAL
7076 #    define LT_DLGLOBAL         DL_GLOBAL
7077 #  else
7078 #    define LT_DLGLOBAL         0
7079 #  endif
7080 #endif
7081
7082 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7083    find out it does not work in some platform. */
7084 #ifndef LT_DLLAZY_OR_NOW
7085 #  ifdef RTLD_LAZY
7086 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7087 #  else
7088 #    ifdef DL_LAZY
7089 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7090 #    else
7091 #      ifdef RTLD_NOW
7092 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7093 #      else
7094 #        ifdef DL_NOW
7095 #          define LT_DLLAZY_OR_NOW      DL_NOW
7096 #        else
7097 #          define LT_DLLAZY_OR_NOW      0
7098 #        endif
7099 #      endif
7100 #    endif
7101 #  endif
7102 #endif
7103
7104 #ifdef __cplusplus
7105 extern "C" void exit (int);
7106 #endif
7107
7108 void fnord() { int i=42;}
7109 int main ()
7110 {
7111   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7112   int status = $lt_dlunknown;
7113
7114   if (self)
7115     {
7116       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7117       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7118       /* dlclose (self); */
7119     }
7120
7121     exit (status);
7122 }
7123 EOF
7124   if { (eval echo configure:7125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7125     (./conftest; exit; ) 2>/dev/null
7126     lt_status=$?
7127     case x$lt_status in
7128       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7129       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7130       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7131     esac
7132   else :
7133     # compilation failed
7134     lt_cv_dlopen_self=no
7135   fi
7136 fi
7137 rm -fr conftest*
7138
7139     
7140 fi
7141
7142 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7143
7144     if test "x$lt_cv_dlopen_self" = xyes; then
7145       LDFLAGS="$LDFLAGS $link_static_flag"
7146       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7147 echo "configure:7148: checking whether a statically linked program can dlopen itself" >&5
7148 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7149   echo $ac_n "(cached) $ac_c" 1>&6
7150 else
7151           if test "$cross_compiling" = yes; then :
7152   lt_cv_dlopen_self_static=cross
7153 else
7154     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7155   lt_status=$lt_dlunknown
7156   cat > conftest.$ac_ext <<EOF
7157 #line 7158 "configure"
7158 #include "confdefs.h"
7159
7160 #if HAVE_DLFCN_H
7161 #include <dlfcn.h>
7162 #endif
7163
7164 #include <stdio.h>
7165
7166 #ifdef RTLD_GLOBAL
7167 #  define LT_DLGLOBAL           RTLD_GLOBAL
7168 #else
7169 #  ifdef DL_GLOBAL
7170 #    define LT_DLGLOBAL         DL_GLOBAL
7171 #  else
7172 #    define LT_DLGLOBAL         0
7173 #  endif
7174 #endif
7175
7176 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7177    find out it does not work in some platform. */
7178 #ifndef LT_DLLAZY_OR_NOW
7179 #  ifdef RTLD_LAZY
7180 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7181 #  else
7182 #    ifdef DL_LAZY
7183 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7184 #    else
7185 #      ifdef RTLD_NOW
7186 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7187 #      else
7188 #        ifdef DL_NOW
7189 #          define LT_DLLAZY_OR_NOW      DL_NOW
7190 #        else
7191 #          define LT_DLLAZY_OR_NOW      0
7192 #        endif
7193 #      endif
7194 #    endif
7195 #  endif
7196 #endif
7197
7198 #ifdef __cplusplus
7199 extern "C" void exit (int);
7200 #endif
7201
7202 void fnord() { int i=42;}
7203 int main ()
7204 {
7205   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7206   int status = $lt_dlunknown;
7207
7208   if (self)
7209     {
7210       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7211       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7212       /* dlclose (self); */
7213     }
7214
7215     exit (status);
7216 }
7217 EOF
7218   if { (eval echo configure:7219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7219     (./conftest; exit; ) 2>/dev/null
7220     lt_status=$?
7221     case x$lt_status in
7222       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7223       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7224       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7225     esac
7226   else :
7227     # compilation failed
7228     lt_cv_dlopen_self_static=no
7229   fi
7230 fi
7231 rm -fr conftest*
7232
7233       
7234 fi
7235
7236 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7237     fi
7238
7239     CPPFLAGS="$save_CPPFLAGS"
7240     LDFLAGS="$save_LDFLAGS"
7241     LIBS="$save_LIBS"
7242     ;;
7243   esac
7244
7245   case $lt_cv_dlopen_self in
7246   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7247   *) enable_dlopen_self=unknown ;;
7248   esac
7249
7250   case $lt_cv_dlopen_self_static in
7251   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7252   *) enable_dlopen_self_static=unknown ;;
7253   esac
7254 fi
7255
7256
7257 if test "$enable_shared" = yes && test "$GCC" = yes; then
7258   case $archive_cmds in
7259   *'~'*)
7260     # FIXME: we may have to deal with multi-command sequences.
7261     ;;
7262   '$CC '*)
7263     # Test whether the compiler implicitly links with -lc since on some
7264     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7265     # to ld, don't add -lc before -lgcc.
7266     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7267 echo "configure:7268: checking whether -lc should be explicitly linked in" >&5
7268     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7269   echo $ac_n "(cached) $ac_c" 1>&6
7270 else
7271   $rm conftest*
7272     echo 'static int dummy;' > conftest.$ac_ext
7273
7274     if { (eval echo configure:7275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7275       soname=conftest
7276       lib=conftest
7277       libobjs=conftest.$ac_objext
7278       deplibs=
7279       wl=$lt_cv_prog_cc_wl
7280       compiler_flags=-v
7281       linker_flags=-v
7282       verstring=
7283       output_objdir=.
7284       libname=conftest
7285       save_allow_undefined_flag=$allow_undefined_flag
7286       allow_undefined_flag=
7287       if { (eval echo configure:7288: \"$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; }
7288       then
7289         lt_cv_archive_cmds_need_lc=no
7290       else
7291         lt_cv_archive_cmds_need_lc=yes
7292       fi
7293       allow_undefined_flag=$save_allow_undefined_flag
7294     else
7295       cat conftest.err 1>&5
7296     fi
7297 fi
7298
7299     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7300     ;;
7301   esac
7302 fi
7303 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7304
7305 # The second clause should only fire when bootstrapping the
7306 # libtool distribution, otherwise you forgot to ship ltmain.sh
7307 # with your package, and you will get complaints that there are
7308 # no rules to generate ltmain.sh.
7309 if test -f "$ltmain"; then
7310   :
7311 else
7312   # If there is no Makefile yet, we rely on a make rule to execute
7313   # `config.status --recheck' to rerun these tests and create the
7314   # libtool script then.
7315   test -f Makefile && make "$ltmain"
7316 fi
7317
7318 if test -f "$ltmain"; then
7319   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7320   $rm -f "${ofile}T"
7321
7322   echo creating $ofile
7323
7324   # Now quote all the things that may contain metacharacters while being
7325   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7326   # variables and quote the copies for generation of the libtool script.
7327   for var in echo old_CC old_CFLAGS SED \
7328     AR AR_FLAGS CC LD LN_S NM SHELL \
7329     reload_flag reload_cmds wl \
7330     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7331     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7332     library_names_spec soname_spec \
7333     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7334     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7335     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7336     old_striplib striplib file_magic_cmd export_symbols_cmds \
7337     deplibs_check_method allow_undefined_flag no_undefined_flag \
7338     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7339     global_symbol_to_c_name_address \
7340     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7341     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7342     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7343
7344     case $var in
7345     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7346     old_postinstall_cmds | old_postuninstall_cmds | \
7347     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7348     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7349     postinstall_cmds | postuninstall_cmds | \
7350     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7351       # Double-quote double-evaled strings.
7352       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7353       ;;
7354     *)
7355       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7356       ;;
7357     esac
7358   done
7359
7360   cat <<__EOF__ > "${ofile}T"
7361 #! $SHELL
7362
7363 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7364 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7365 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7366 #
7367 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7368 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7369 #
7370 # This program is free software; you can redistribute it and/or modify
7371 # it under the terms of the GNU General Public License as published by
7372 # the Free Software Foundation; either version 2 of the License, or
7373 # (at your option) any later version.
7374 #
7375 # This program is distributed in the hope that it will be useful, but
7376 # WITHOUT ANY WARRANTY; without even the implied warranty of
7377 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7378 # General Public License for more details.
7379 #
7380 # You should have received a copy of the GNU General Public License
7381 # along with this program; if not, write to the Free Software
7382 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7383 #
7384 # As a special exception to the GNU General Public License, if you
7385 # distribute this file as part of a program that contains a
7386 # configuration script generated by Autoconf, you may include it under
7387 # the same distribution terms that you use for the rest of that program.
7388
7389 # A sed that does not truncate output.
7390 SED=$lt_SED
7391
7392 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7393 Xsed="${SED} -e s/^X//"
7394
7395 # The HP-UX ksh and POSIX shell print the target directory to stdout
7396 # if CDPATH is set.
7397 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7398
7399 # ### BEGIN LIBTOOL CONFIG
7400
7401 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7402
7403 # Shell to use when invoking shell scripts.
7404 SHELL=$lt_SHELL
7405
7406 # Whether or not to build shared libraries.
7407 build_libtool_libs=$enable_shared
7408
7409 # Whether or not to build static libraries.
7410 build_old_libs=$enable_static
7411
7412 # Whether or not to add -lc for building shared libraries.
7413 build_libtool_need_lc=$need_lc
7414
7415 # Whether or not to optimize for fast installation.
7416 fast_install=$enable_fast_install
7417
7418 # The host system.
7419 host_alias=$host_alias
7420 host=$host
7421
7422 # An echo program that does not interpret backslashes.
7423 echo=$lt_echo
7424
7425 # The archiver.
7426 AR=$lt_AR
7427 AR_FLAGS=$lt_AR_FLAGS
7428
7429 # The default C compiler.
7430 CC=$lt_CC
7431
7432 # Is the compiler the GNU C compiler?
7433 with_gcc=$GCC
7434
7435 # The linker used to build libraries.
7436 LD=$lt_LD
7437
7438 # Whether we need hard or soft links.
7439 LN_S=$lt_LN_S
7440
7441 # A BSD-compatible nm program.
7442 NM=$lt_NM
7443
7444 # A symbol stripping program
7445 STRIP=$STRIP
7446
7447 # Used to examine libraries when file_magic_cmd begins "file"
7448 MAGIC_CMD=$MAGIC_CMD
7449
7450 # Used on cygwin: DLL creation program.
7451 DLLTOOL="$DLLTOOL"
7452
7453 # Used on cygwin: object dumper.
7454 OBJDUMP="$OBJDUMP"
7455
7456 # Used on cygwin: assembler.
7457 AS="$AS"
7458
7459 # The name of the directory that contains temporary libtool files.
7460 objdir=$objdir
7461
7462 # How to create reloadable object files.
7463 reload_flag=$lt_reload_flag
7464 reload_cmds=$lt_reload_cmds
7465
7466 # How to pass a linker flag through the compiler.
7467 wl=$lt_wl
7468
7469 # Object file suffix (normally "o").
7470 objext="$ac_objext"
7471
7472 # Old archive suffix (normally "a").
7473 libext="$libext"
7474
7475 # Executable file suffix (normally "").
7476 exeext="$exeext"
7477
7478 # Additional compiler flags for building library objects.
7479 pic_flag=$lt_pic_flag
7480 pic_mode=$pic_mode
7481
7482 # Does compiler simultaneously support -c and -o options?
7483 compiler_c_o=$lt_compiler_c_o
7484
7485 # Can we write directly to a .lo ?
7486 compiler_o_lo=$lt_compiler_o_lo
7487
7488 # Must we lock files when doing compilation ?
7489 need_locks=$lt_need_locks
7490
7491 # Do we need the lib prefix for modules?
7492 need_lib_prefix=$need_lib_prefix
7493
7494 # Do we need a version for libraries?
7495 need_version=$need_version
7496
7497 # Whether dlopen is supported.
7498 dlopen_support=$enable_dlopen
7499
7500 # Whether dlopen of programs is supported.
7501 dlopen_self=$enable_dlopen_self
7502
7503 # Whether dlopen of statically linked programs is supported.
7504 dlopen_self_static=$enable_dlopen_self_static
7505
7506 # Compiler flag to prevent dynamic linking.
7507 link_static_flag=$lt_link_static_flag
7508
7509 # Compiler flag to turn off builtin functions.
7510 no_builtin_flag=$lt_no_builtin_flag
7511
7512 # Compiler flag to allow reflexive dlopens.
7513 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7514
7515 # Compiler flag to generate shared objects directly from archives.
7516 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7517
7518 # Compiler flag to generate thread-safe objects.
7519 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7520
7521 # Library versioning type.
7522 version_type=$version_type
7523
7524 # Format of library name prefix.
7525 libname_spec=$lt_libname_spec
7526
7527 # List of archive names.  First name is the real one, the rest are links.
7528 # The last name is the one that the linker finds with -lNAME.
7529 library_names_spec=$lt_library_names_spec
7530
7531 # The coded name of the library, if different from the real name.
7532 soname_spec=$lt_soname_spec
7533
7534 # Commands used to build and install an old-style archive.
7535 RANLIB=$lt_RANLIB
7536 old_archive_cmds=$lt_old_archive_cmds
7537 old_postinstall_cmds=$lt_old_postinstall_cmds
7538 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7539
7540 # Create an old-style archive from a shared archive.
7541 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7542
7543 # Create a temporary old-style archive to link instead of a shared archive.
7544 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7545
7546 # Commands used to build and install a shared archive.
7547 archive_cmds=$lt_archive_cmds
7548 archive_expsym_cmds=$lt_archive_expsym_cmds
7549 postinstall_cmds=$lt_postinstall_cmds
7550 postuninstall_cmds=$lt_postuninstall_cmds
7551
7552 # Commands to strip libraries.
7553 old_striplib=$lt_old_striplib
7554 striplib=$lt_striplib
7555
7556 # Method to check whether dependent libraries are shared objects.
7557 deplibs_check_method=$lt_deplibs_check_method
7558
7559 # Command to use when deplibs_check_method == file_magic.
7560 file_magic_cmd=$lt_file_magic_cmd
7561
7562 # Flag that allows shared libraries with undefined symbols to be built.
7563 allow_undefined_flag=$lt_allow_undefined_flag
7564
7565 # Flag that forces no undefined symbols.
7566 no_undefined_flag=$lt_no_undefined_flag
7567
7568 # Commands used to finish a libtool library installation in a directory.
7569 finish_cmds=$lt_finish_cmds
7570
7571 # Same as above, but a single script fragment to be evaled but not shown.
7572 finish_eval=$lt_finish_eval
7573
7574 # Take the output of nm and produce a listing of raw symbols and C names.
7575 global_symbol_pipe=$lt_global_symbol_pipe
7576
7577 # Transform the output of nm in a proper C declaration
7578 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7579
7580 # Transform the output of nm in a C name address pair
7581 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7582
7583 # This is the shared library runtime path variable.
7584 runpath_var=$runpath_var
7585
7586 # This is the shared library path variable.
7587 shlibpath_var=$shlibpath_var
7588
7589 # Is shlibpath searched before the hard-coded library search path?
7590 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7591
7592 # How to hardcode a shared library path into an executable.
7593 hardcode_action=$hardcode_action
7594
7595 # Whether we should hardcode library paths into libraries.
7596 hardcode_into_libs=$hardcode_into_libs
7597
7598 # Flag to hardcode \$libdir into a binary during linking.
7599 # This must work even if \$libdir does not exist.
7600 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7601
7602 # Whether we need a single -rpath flag with a separated argument.
7603 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7604
7605 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7606 # resulting binary.
7607 hardcode_direct=$hardcode_direct
7608
7609 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7610 # resulting binary.
7611 hardcode_minus_L=$hardcode_minus_L
7612
7613 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7614 # the resulting binary.
7615 hardcode_shlibpath_var=$hardcode_shlibpath_var
7616
7617 # Variables whose values should be saved in libtool wrapper scripts and
7618 # restored at relink time.
7619 variables_saved_for_relink="$variables_saved_for_relink"
7620
7621 # Whether libtool must link a program against all its dependency libraries.
7622 link_all_deplibs=$link_all_deplibs
7623
7624 # Compile-time system search path for libraries
7625 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7626
7627 # Run-time system search path for libraries
7628 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7629
7630 # Fix the shell variable \$srcfile for the compiler.
7631 fix_srcfile_path="$fix_srcfile_path"
7632
7633 # Set to yes if exported symbols are required.
7634 always_export_symbols=$always_export_symbols
7635
7636 # The commands to list exported symbols.
7637 export_symbols_cmds=$lt_export_symbols_cmds
7638
7639 # The commands to extract the exported symbol list from a shared archive.
7640 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7641
7642 # Symbols that should not be listed in the preloaded symbols.
7643 exclude_expsyms=$lt_exclude_expsyms
7644
7645 # Symbols that must always be exported.
7646 include_expsyms=$lt_include_expsyms
7647
7648 # ### END LIBTOOL CONFIG
7649
7650 __EOF__
7651
7652   case $host_os in
7653   aix3*)
7654     cat <<\EOF >> "${ofile}T"
7655
7656 # AIX sometimes has problems with the GCC collect2 program.  For some
7657 # reason, if we set the COLLECT_NAMES environment variable, the problems
7658 # vanish in a puff of smoke.
7659 if test "X${COLLECT_NAMES+set}" != Xset; then
7660   COLLECT_NAMES=
7661   export COLLECT_NAMES
7662 fi
7663 EOF
7664     ;;
7665   esac
7666
7667   case $host_os in
7668   cygwin* | mingw* | pw32* | os2*)
7669     cat <<'EOF' >> "${ofile}T"
7670       # This is a source program that is used to create dlls on Windows
7671       # Don't remove nor modify the starting and closing comments
7672 # /* ltdll.c starts here */
7673 # #define WIN32_LEAN_AND_MEAN
7674 # #include <windows.h>
7675 # #undef WIN32_LEAN_AND_MEAN
7676 # #include <stdio.h>
7677 #
7678 # #ifndef __CYGWIN__
7679 # #  ifdef __CYGWIN32__
7680 # #    define __CYGWIN__ __CYGWIN32__
7681 # #  endif
7682 # #endif
7683 #
7684 # #ifdef __cplusplus
7685 # extern "C" {
7686 # #endif
7687 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7688 # #ifdef __cplusplus
7689 # }
7690 # #endif
7691 #
7692 # #ifdef __CYGWIN__
7693 # #include <cygwin/cygwin_dll.h>
7694 # DECLARE_CYGWIN_DLL( DllMain );
7695 # #endif
7696 # HINSTANCE __hDllInstance_base;
7697 #
7698 # BOOL APIENTRY
7699 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7700 # {
7701 #   __hDllInstance_base = hInst;
7702 #   return TRUE;
7703 # }
7704 # /* ltdll.c ends here */
7705         # This is a source program that is used to create import libraries
7706         # on Windows for dlls which lack them. Don't remove nor modify the
7707         # starting and closing comments
7708 # /* impgen.c starts here */
7709 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7710 #
7711 #  This file is part of GNU libtool.
7712 #
7713 #  This program is free software; you can redistribute it and/or modify
7714 #  it under the terms of the GNU General Public License as published by
7715 #  the Free Software Foundation; either version 2 of the License, or
7716 #  (at your option) any later version.
7717 #
7718 #  This program is distributed in the hope that it will be useful,
7719 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7720 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7721 #  GNU General Public License for more details.
7722 #
7723 #  You should have received a copy of the GNU General Public License
7724 #  along with this program; if not, write to the Free Software
7725 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7726 #  */
7727 #
7728 # #include <stdio.h>            /* for printf() */
7729 # #include <unistd.h>           /* for open(), lseek(), read() */
7730 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7731 # #include <string.h>           /* for strdup() */
7732 #
7733 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7734 # #ifndef O_BINARY
7735 # #define O_BINARY 0
7736 # #endif
7737 #
7738 # static unsigned int
7739 # pe_get16 (fd, offset)
7740 #      int fd;
7741 #      int offset;
7742 # {
7743 #   unsigned char b[2];
7744 #   lseek (fd, offset, SEEK_SET);
7745 #   read (fd, b, 2);
7746 #   return b[0] + (b[1]<<8);
7747 # }
7748 #
7749 # static unsigned int
7750 # pe_get32 (fd, offset)
7751 #     int fd;
7752 #     int offset;
7753 # {
7754 #   unsigned char b[4];
7755 #   lseek (fd, offset, SEEK_SET);
7756 #   read (fd, b, 4);
7757 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7758 # }
7759 #
7760 # static unsigned int
7761 # pe_as32 (ptr)
7762 #      void *ptr;
7763 # {
7764 #   unsigned char *b = ptr;
7765 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7766 # }
7767 #
7768 # int
7769 # main (argc, argv)
7770 #     int argc;
7771 #     char *argv[];
7772 # {
7773 #     int dll;
7774 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7775 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7776 #     unsigned long name_rvas, nexp;
7777 #     unsigned char *expdata, *erva;
7778 #     char *filename, *dll_name;
7779 #
7780 #     filename = argv[1];
7781 #
7782 #     dll = open(filename, O_RDONLY|O_BINARY);
7783 #     if (dll < 1)
7784 #       return 1;
7785 #
7786 #     dll_name = filename;
7787 #
7788 #     for (i=0; filename[i]; i++)
7789 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7790 #           dll_name = filename + i +1;
7791 #
7792 #     pe_header_offset = pe_get32 (dll, 0x3c);
7793 #     opthdr_ofs = pe_header_offset + 4 + 20;
7794 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7795 #
7796 #     if (num_entries < 1) /* no exports */
7797 #       return 1;
7798 #
7799 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7800 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7801 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7802 #     secptr = (pe_header_offset + 4 + 20 +
7803 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7804 #
7805 #     expptr = 0;
7806 #     for (i = 0; i < nsections; i++)
7807 #     {
7808 #       char sname[8];
7809 #       unsigned long secptr1 = secptr + 40 * i;
7810 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7811 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7812 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7813 #       lseek(dll, secptr1, SEEK_SET);
7814 #       read(dll, sname, 8);
7815 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7816 #       {
7817 #           expptr = fptr + (export_rva - vaddr);
7818 #           if (export_rva + export_size > vaddr + vsize)
7819 #               export_size = vsize - (export_rva - vaddr);
7820 #           break;
7821 #       }
7822 #     }
7823 #
7824 #     expdata = (unsigned char*)malloc(export_size);
7825 #     lseek (dll, expptr, SEEK_SET);
7826 #     read (dll, expdata, export_size);
7827 #     erva = expdata - export_rva;
7828 #
7829 #     nexp = pe_as32 (expdata+24);
7830 #     name_rvas = pe_as32 (expdata+32);
7831 #
7832 #     printf ("EXPORTS\n");
7833 #     for (i = 0; i<nexp; i++)
7834 #     {
7835 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7836 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7837 #     }
7838 #
7839 #     return 0;
7840 # }
7841 # /* impgen.c ends here */
7842
7843 EOF
7844     ;;
7845   esac
7846
7847   # We use sed instead of cat because bash on DJGPP gets confused if
7848   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7849   # text mode, it properly converts lines to CR/LF.  This bash problem
7850   # is reportedly fixed, but why not run on old versions too?
7851   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7852
7853   mv -f "${ofile}T" "$ofile" || \
7854     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7855   chmod +x "$ofile"
7856 fi
7857
7858
7859
7860
7861
7862 # This can be used to rebuild libtool when needed
7863 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7864
7865 # Always use our own libtool.
7866 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7867
7868 # Prevent multiple expansion
7869
7870
7871
7872 # test for ln hardlink support
7873 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7874 echo "configure:7875: checking whether ln works" >&5
7875 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7876   echo $ac_n "(cached) $ac_c" 1>&6
7877 else
7878   rm -f conftest.src conftest.dst
7879 echo "conftest" > conftest.src
7880 if ln conftest.src conftest.dst 2>/dev/null
7881 then
7882   ol_cv_prog_LN_H="ln"
7883 else
7884   ol_cv_prog_LN_H="cp"
7885 fi
7886 rm -f conftest.src conftest.dst
7887
7888 fi
7889 LN_H="$ol_cv_prog_LN_H"
7890 if test "$ol_cv_prog_LN_H" = "ln"; then
7891         echo "$ac_t""yes" 1>&6
7892 else
7893         echo "$ac_t""no" 1>&6
7894 fi
7895
7896 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7897 echo "configure:7898: checking whether ln -s works" >&5
7898 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7899   echo $ac_n "(cached) $ac_c" 1>&6
7900 else
7901   rm -f conftestdata
7902 if ln -s X conftestdata 2>/dev/null
7903 then
7904   rm -f conftestdata
7905   ac_cv_prog_LN_S="ln -s"
7906 else
7907   ac_cv_prog_LN_S=ln
7908 fi
7909 fi
7910 LN_S="$ac_cv_prog_LN_S"
7911 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7912   echo "$ac_t""yes" 1>&6
7913 else
7914   echo "$ac_t""no" 1>&6
7915 fi
7916
7917
7918 ol_link_perl=no
7919 if test $ol_enable_perl != no ; then
7920         # Extract the first word of "perl", so it can be a program name with args.
7921 set dummy perl; ac_word=$2
7922 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7923 echo "configure:7924: checking for $ac_word" >&5
7924 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7925   echo $ac_n "(cached) $ac_c" 1>&6
7926 else
7927   case "$PERLBIN" in
7928   /*)
7929   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7930   ;;
7931   ?:/*)
7932   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7933   ;;
7934   *)
7935   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7936   ac_dummy="$PATH"
7937   for ac_dir in $ac_dummy; do 
7938     test -z "$ac_dir" && ac_dir=.
7939     if test -f $ac_dir/$ac_word; then
7940       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7941       break
7942     fi
7943   done
7944   IFS="$ac_save_ifs"
7945   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7946   ;;
7947 esac
7948 fi
7949 PERLBIN="$ac_cv_path_PERLBIN"
7950 if test -n "$PERLBIN"; then
7951   echo "$ac_t""$PERLBIN" 1>&6
7952 else
7953   echo "$ac_t""no" 1>&6
7954 fi
7955
7956
7957         if test "no$PERLBIN" = "no" ; then
7958                 if test $ol_enable_perl = yes ; then
7959                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7960                 fi
7961
7962         else
7963                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7964                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7965
7966                 if test x"$ol_with_perl_module" = "xstatic" ; then
7967                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7968                 else
7969                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7970                 fi
7971                                 ol_link_perl=yes
7972         fi
7973 fi
7974
7975 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7976 echo "configure:7977: checking how to run the C preprocessor" >&5
7977 # On Suns, sometimes $CPP names a directory.
7978 if test -n "$CPP" && test -d "$CPP"; then
7979   CPP=
7980 fi
7981 if test -z "$CPP"; then
7982 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7983   echo $ac_n "(cached) $ac_c" 1>&6
7984 else
7985     # This must be in double quotes, not single quotes, because CPP may get
7986   # substituted into the Makefile and "${CC-cc}" will confuse make.
7987   CPP="${CC-cc} -E"
7988   # On the NeXT, cc -E runs the code through the compiler's parser,
7989   # not just through cpp.
7990   cat > conftest.$ac_ext <<EOF
7991 #line 7992 "configure"
7992 #include "confdefs.h"
7993 #include <assert.h>
7994 Syntax Error
7995 EOF
7996 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7997 { (eval echo configure:7998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7998 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7999 if test -z "$ac_err"; then
8000   :
8001 else
8002   echo "$ac_err" >&5
8003   echo "configure: failed program was:" >&5
8004   cat conftest.$ac_ext >&5
8005   rm -rf conftest*
8006   CPP="${CC-cc} -E -traditional-cpp"
8007   cat > conftest.$ac_ext <<EOF
8008 #line 8009 "configure"
8009 #include "confdefs.h"
8010 #include <assert.h>
8011 Syntax Error
8012 EOF
8013 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8014 { (eval echo configure:8015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8015 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8016 if test -z "$ac_err"; then
8017   :
8018 else
8019   echo "$ac_err" >&5
8020   echo "configure: failed program was:" >&5
8021   cat conftest.$ac_ext >&5
8022   rm -rf conftest*
8023   CPP="${CC-cc} -nologo -E"
8024   cat > conftest.$ac_ext <<EOF
8025 #line 8026 "configure"
8026 #include "confdefs.h"
8027 #include <assert.h>
8028 Syntax Error
8029 EOF
8030 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8031 { (eval echo configure:8032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8032 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8033 if test -z "$ac_err"; then
8034   :
8035 else
8036   echo "$ac_err" >&5
8037   echo "configure: failed program was:" >&5
8038   cat conftest.$ac_ext >&5
8039   rm -rf conftest*
8040   CPP=/lib/cpp
8041 fi
8042 rm -f conftest*
8043 fi
8044 rm -f conftest*
8045 fi
8046 rm -f conftest*
8047   ac_cv_prog_CPP="$CPP"
8048 fi
8049   CPP="$ac_cv_prog_CPP"
8050 else
8051   ac_cv_prog_CPP="$CPP"
8052 fi
8053 echo "$ac_t""$CPP" 1>&6
8054
8055
8056 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
8057         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
8058
8059 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
8060         echo "configure: warning: programs compiled here do run here..." 1>&2
8061         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
8062
8063 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
8064         echo "configure: warning: programs compiled here do not run here..." 1>&2
8065         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
8066 fi
8067
8068
8069 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8070 echo "configure:8071: checking for Cygwin environment" >&5
8071 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
8072   echo $ac_n "(cached) $ac_c" 1>&6
8073 else
8074   cat > conftest.$ac_ext <<EOF
8075 #line 8076 "configure"
8076 #include "confdefs.h"
8077
8078 int main() {
8079
8080 #ifndef __CYGWIN__
8081 #define __CYGWIN__ __CYGWIN32__
8082 #endif
8083 return __CYGWIN__;
8084 ; return 0; }
8085 EOF
8086 if { (eval echo configure:8087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8087   rm -rf conftest*
8088   ac_cv_cygwin=yes
8089 else
8090   echo "configure: failed program was:" >&5
8091   cat conftest.$ac_ext >&5
8092   rm -rf conftest*
8093   ac_cv_cygwin=no
8094 fi
8095 rm -f conftest*
8096 fi
8097
8098 echo "$ac_t""$ac_cv_cygwin" 1>&6
8099 CYGWIN=
8100 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8101 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8102 echo "configure:8103: checking for mingw32 environment" >&5
8103 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8104   echo $ac_n "(cached) $ac_c" 1>&6
8105 else
8106   cat > conftest.$ac_ext <<EOF
8107 #line 8108 "configure"
8108 #include "confdefs.h"
8109
8110 int main() {
8111 return __MINGW32__;
8112 ; return 0; }
8113 EOF
8114 if { (eval echo configure:8115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8115   rm -rf conftest*
8116   ac_cv_mingw32=yes
8117 else
8118   echo "configure: failed program was:" >&5
8119   cat conftest.$ac_ext >&5
8120   rm -rf conftest*
8121   ac_cv_mingw32=no
8122 fi
8123 rm -f conftest*
8124 fi
8125
8126 echo "$ac_t""$ac_cv_mingw32" 1>&6
8127 MINGW32=
8128 test "$ac_cv_mingw32" = yes && MINGW32=yes
8129
8130
8131
8132 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8133 echo "configure:8134: checking for executable suffix" >&5
8134 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8135   echo $ac_n "(cached) $ac_c" 1>&6
8136 else
8137   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8138   ac_cv_exeext=.exe
8139 else
8140   rm -f conftest*
8141   echo 'int main () { return 0; }' > conftest.$ac_ext
8142   ac_cv_exeext=
8143   if { (eval echo configure:8144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8144     for file in conftest.*; do
8145       case $file in
8146       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8147       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8148       esac
8149     done
8150   else
8151     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8152   fi
8153   rm -f conftest*
8154   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8155 fi
8156 fi
8157
8158 EXEEXT=""
8159 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8160 echo "$ac_t""${ac_cv_exeext}" 1>&6
8161 ac_exeext=$EXEEXT
8162
8163 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8164 echo "configure:8165: checking for object suffix" >&5
8165 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8166   echo $ac_n "(cached) $ac_c" 1>&6
8167 else
8168   rm -f conftest*
8169 echo 'int i = 1;' > conftest.$ac_ext
8170 if { (eval echo configure:8171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8171   for ac_file in conftest.*; do
8172     case $ac_file in
8173     *.c) ;;
8174     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8175     esac
8176   done
8177 else
8178   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8179 fi
8180 rm -f conftest*
8181 fi
8182
8183 echo "$ac_t""$ac_cv_objext" 1>&6
8184 OBJEXT=$ac_cv_objext
8185 ac_objext=$ac_cv_objext
8186
8187
8188 cat >> confdefs.h <<EOF
8189 #define EXEEXT "${EXEEXT}"
8190 EOF
8191
8192
8193 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8194 echo "configure:8195: checking for be_app in -lbe" >&5
8195 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8196 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8197   echo $ac_n "(cached) $ac_c" 1>&6
8198 else
8199   ac_save_LIBS="$LIBS"
8200 LIBS="-lbe -lroot -lnet $LIBS"
8201 cat > conftest.$ac_ext <<EOF
8202 #line 8203 "configure"
8203 #include "confdefs.h"
8204 /* Override any gcc2 internal prototype to avoid an error.  */
8205 /* We use char because int might match the return type of a gcc2
8206     builtin and then its argument prototype would still apply.  */
8207 char be_app();
8208
8209 int main() {
8210 be_app()
8211 ; return 0; }
8212 EOF
8213 if { (eval echo configure:8214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8214   rm -rf conftest*
8215   eval "ac_cv_lib_$ac_lib_var=yes"
8216 else
8217   echo "configure: failed program was:" >&5
8218   cat conftest.$ac_ext >&5
8219   rm -rf conftest*
8220   eval "ac_cv_lib_$ac_lib_var=no"
8221 fi
8222 rm -f conftest*
8223 LIBS="$ac_save_LIBS"
8224
8225 fi
8226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8227   echo "$ac_t""yes" 1>&6
8228   LIBS="$LIBS -lbe -lroot -lnet"
8229 else
8230   echo "$ac_t""no" 1>&6
8231 :
8232 fi
8233
8234
8235
8236
8237
8238 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8239 echo "configure:8240: checking for ${CC-cc} option to accept ANSI C" >&5
8240 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8241   echo $ac_n "(cached) $ac_c" 1>&6
8242 else
8243   am_cv_prog_cc_stdc=no
8244 ac_save_CC="$CC"
8245 # Don't try gcc -ansi; that turns off useful extensions and
8246 # breaks some systems' header files.
8247 # AIX                   -qlanglvl=ansi
8248 # Ultrix and OSF/1      -std1
8249 # HP-UX 10.20 and later -Ae
8250 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8251 # SVR4                  -Xc -D__EXTENSIONS__
8252 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8253 do
8254   CC="$ac_save_CC $ac_arg"
8255   cat > conftest.$ac_ext <<EOF
8256 #line 8257 "configure"
8257 #include "confdefs.h"
8258 #include <stdarg.h>
8259 #include <stdio.h>
8260 #include <sys/types.h>
8261 #include <sys/stat.h>
8262 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8263 struct buf { int x; };
8264 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8265 static char *e (p, i)
8266      char **p;
8267      int i;
8268 {
8269   return p[i];
8270 }
8271 static char *f (char * (*g) (char **, int), char **p, ...)
8272 {
8273   char *s;
8274   va_list v;
8275   va_start (v,p);
8276   s = g (p, va_arg (v,int));
8277   va_end (v);
8278   return s;
8279 }
8280 int test (int i, double x);
8281 struct s1 {int (*f) (int a);};
8282 struct s2 {int (*f) (double a);};
8283 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8284 int argc;
8285 char **argv;
8286
8287 int main() {
8288
8289 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8290
8291 ; return 0; }
8292 EOF
8293 if { (eval echo configure:8294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8294   rm -rf conftest*
8295   am_cv_prog_cc_stdc="$ac_arg"; break
8296 else
8297   echo "configure: failed program was:" >&5
8298   cat conftest.$ac_ext >&5
8299 fi
8300 rm -f conftest*
8301 done
8302 CC="$ac_save_CC"
8303
8304 fi
8305
8306 if test -z "$am_cv_prog_cc_stdc"; then
8307   echo "$ac_t""none needed" 1>&6
8308 else
8309   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8310 fi
8311 case "x$am_cv_prog_cc_stdc" in
8312   x|xno) ;;
8313   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8314 esac
8315
8316 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8317         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8318 fi
8319
8320 # test for make depend flag
8321 OL_MKDEP=
8322 OL_MKDEP_FLAGS=
8323 if test -z "${MKDEP}"; then
8324         OL_MKDEP="${CC-cc}"
8325         if test -z "${MKDEP_FLAGS}"; then
8326                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8327 echo "configure:8328: checking for ${OL_MKDEP} depend flag" >&5
8328 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8329   echo $ac_n "(cached) $ac_c" 1>&6
8330 else
8331   
8332                         ol_cv_mkdep=no
8333                         for flag in "-M" "-xM"; do
8334                                 cat > conftest.c <<EOF
8335  noCode;
8336 EOF
8337                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8338                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8339                                 then
8340                                         if test ! -f conftest."${ac_object}" ; then
8341                                                 ol_cv_mkdep=$flag
8342                                                 OL_MKDEP_FLAGS="$flag"
8343                                                 break
8344                                         fi
8345                                 fi
8346                         done
8347                         rm -f conftest*
8348                 
8349 fi
8350
8351 echo "$ac_t""$ol_cv_mkdep" 1>&6
8352         else
8353                 cc_cv_mkdep=yes
8354                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8355         fi
8356 else
8357         cc_cv_mkdep=yes
8358         OL_MKDEP="${MKDEP}"
8359         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8360 fi
8361
8362
8363
8364 if test "${ol_cv_mkdep}" = no ; then
8365         # this will soon become an error
8366         echo "configure: warning: do not know how to generate dependencies" 1>&2
8367 fi
8368
8369 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8370 echo "configure:8371: checking for afopen in -ls" >&5
8371 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8372 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8373   echo $ac_n "(cached) $ac_c" 1>&6
8374 else
8375   ac_save_LIBS="$LIBS"
8376 LIBS="-ls  $LIBS"
8377 cat > conftest.$ac_ext <<EOF
8378 #line 8379 "configure"
8379 #include "confdefs.h"
8380 /* Override any gcc2 internal prototype to avoid an error.  */
8381 /* We use char because int might match the return type of a gcc2
8382     builtin and then its argument prototype would still apply.  */
8383 char afopen();
8384
8385 int main() {
8386 afopen()
8387 ; return 0; }
8388 EOF
8389 if { (eval echo configure:8390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8390   rm -rf conftest*
8391   eval "ac_cv_lib_$ac_lib_var=yes"
8392 else
8393   echo "configure: failed program was:" >&5
8394   cat conftest.$ac_ext >&5
8395   rm -rf conftest*
8396   eval "ac_cv_lib_$ac_lib_var=no"
8397 fi
8398 rm -f conftest*
8399 LIBS="$ac_save_LIBS"
8400
8401 fi
8402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8403   echo "$ac_t""yes" 1>&6
8404   
8405         AUTH_LIBS=-ls
8406         cat >> confdefs.h <<\EOF
8407 #define HAVE_AIX_SECURITY 1
8408 EOF
8409
8410
8411 else
8412   echo "$ac_t""no" 1>&6
8413 fi
8414
8415
8416 case "$target" in
8417 *-ibm-openedition)
8418         ac_cv_func_getopt=no
8419         cat >> confdefs.h <<\EOF
8420 #define BOTH_STRINGS_H 1
8421 EOF
8422
8423         ;;
8424 esac
8425
8426 ol_link_modules=no
8427 if test $ol_enable_modules != no ; then
8428         for ac_hdr in ltdl.h
8429 do
8430 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8431 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8432 echo "configure:8433: checking for $ac_hdr" >&5
8433 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8434   echo $ac_n "(cached) $ac_c" 1>&6
8435 else
8436   cat > conftest.$ac_ext <<EOF
8437 #line 8438 "configure"
8438 #include "confdefs.h"
8439 #include <$ac_hdr>
8440 EOF
8441 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8442 { (eval echo configure:8443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8443 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8444 if test -z "$ac_err"; then
8445   rm -rf conftest*
8446   eval "ac_cv_header_$ac_safe=yes"
8447 else
8448   echo "$ac_err" >&5
8449   echo "configure: failed program was:" >&5
8450   cat conftest.$ac_ext >&5
8451   rm -rf conftest*
8452   eval "ac_cv_header_$ac_safe=no"
8453 fi
8454 rm -f conftest*
8455 fi
8456 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8457   echo "$ac_t""yes" 1>&6
8458     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8459   cat >> confdefs.h <<EOF
8460 #define $ac_tr_hdr 1
8461 EOF
8462  
8463 else
8464   echo "$ac_t""no" 1>&6
8465 fi
8466 done
8467
8468
8469         if test $ac_cv_header_ltdl_h = no ; then
8470                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8471         fi
8472
8473         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8474 echo "configure:8475: checking for lt_dlinit in -lltdl" >&5
8475 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8476 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8477   echo $ac_n "(cached) $ac_c" 1>&6
8478 else
8479   ac_save_LIBS="$LIBS"
8480 LIBS="-lltdl  $LIBS"
8481 cat > conftest.$ac_ext <<EOF
8482 #line 8483 "configure"
8483 #include "confdefs.h"
8484 /* Override any gcc2 internal prototype to avoid an error.  */
8485 /* We use char because int might match the return type of a gcc2
8486     builtin and then its argument prototype would still apply.  */
8487 char lt_dlinit();
8488
8489 int main() {
8490 lt_dlinit()
8491 ; return 0; }
8492 EOF
8493 if { (eval echo configure:8494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8494   rm -rf conftest*
8495   eval "ac_cv_lib_$ac_lib_var=yes"
8496 else
8497   echo "configure: failed program was:" >&5
8498   cat conftest.$ac_ext >&5
8499   rm -rf conftest*
8500   eval "ac_cv_lib_$ac_lib_var=no"
8501 fi
8502 rm -f conftest*
8503 LIBS="$ac_save_LIBS"
8504
8505 fi
8506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8507   echo "$ac_t""yes" 1>&6
8508   
8509                 MODULES_LIBS=-lltdl
8510                 cat >> confdefs.h <<\EOF
8511 #define HAVE_LIBLTDL 1
8512 EOF
8513
8514         
8515 else
8516   echo "$ac_t""no" 1>&6
8517 fi
8518
8519
8520         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8521                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8522         fi
8523         ol_link_modules=yes
8524 else
8525         ol_with_bdb_module=static
8526         ol_with_dnssrv_module=static
8527         ol_with_hdb_module=static
8528         ol_with_ldap_module=static
8529         ol_with_ldbm_module=static
8530         ol_with_meta_module=static
8531         ol_with_monitor_module=static
8532         ol_with_null_module=static
8533         ol_with_passwd_module=static
8534         ol_with_perl_module=static
8535         ol_with_shell_module=static
8536         ol_with_sql_module=static
8537         if test $ol_with_dyngroup = mod ; then
8538                 echo "configure: warning: building static dyngroup overlay" 1>&2
8539                 ol_with_dyngroup = yes
8540         fi
8541         if test $ol_with_proxycache = mod ; then
8542                 echo "configure: warning: building static proxycache overlay" 1>&2
8543                 ol_with_proxycache = yes
8544         fi
8545         if test $ol_with_rwm = mod ; then
8546                 echo "configure: warning: building static rwm overlay" 1>&2
8547                 ol_with_rwm = yes
8548         fi
8549 fi
8550
8551 # test for EBCDIC
8552 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8553 echo "configure:8554: checking for EBCDIC" >&5
8554 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8555   echo $ac_n "(cached) $ac_c" 1>&6
8556 else
8557   
8558         cat > conftest.$ac_ext <<EOF
8559 #line 8560 "configure"
8560 #include "confdefs.h"
8561
8562 #if !('M' == 0xd4)
8563 #include <__ASCII__/generate_error.h>
8564 #endif
8565
8566 EOF
8567 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8568 { (eval echo configure:8569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8569 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8570 if test -z "$ac_err"; then
8571   rm -rf conftest*
8572   ol_cv_cpp_ebcdic=yes
8573 else
8574   echo "$ac_err" >&5
8575   echo "configure: failed program was:" >&5
8576   cat conftest.$ac_ext >&5
8577   rm -rf conftest*
8578   ol_cv_cpp_ebcdic=no
8579 fi
8580 rm -f conftest*
8581 fi
8582
8583 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8584 if test $ol_cv_cpp_ebcdic = yes ; then
8585         cat >> confdefs.h <<\EOF
8586 #define HAVE_EBCDIC 1
8587 EOF
8588
8589 fi
8590
8591 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8592 echo "configure:8593: checking for ANSI C header files" >&5
8593 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8594   echo $ac_n "(cached) $ac_c" 1>&6
8595 else
8596   cat > conftest.$ac_ext <<EOF
8597 #line 8598 "configure"
8598 #include "confdefs.h"
8599 #include <stdlib.h>
8600 #include <stdarg.h>
8601 #include <string.h>
8602 #include <float.h>
8603 EOF
8604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8605 { (eval echo configure:8606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8607 if test -z "$ac_err"; then
8608   rm -rf conftest*
8609   ol_cv_header_stdc=yes
8610 else
8611   echo "$ac_err" >&5
8612   echo "configure: failed program was:" >&5
8613   cat conftest.$ac_ext >&5
8614   rm -rf conftest*
8615   ol_cv_header_stdc=no
8616 fi
8617 rm -f conftest*
8618
8619 if test $ol_cv_header_stdc = yes; then
8620   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8621 cat > conftest.$ac_ext <<EOF
8622 #line 8623 "configure"
8623 #include "confdefs.h"
8624 #include <string.h>
8625 EOF
8626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8627   egrep "memchr" >/dev/null 2>&1; then
8628   :
8629 else
8630   rm -rf conftest*
8631   ol_cv_header_stdc=no
8632 fi
8633 rm -f conftest*
8634
8635 fi
8636
8637 if test $ol_cv_header_stdc = yes; then
8638   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8639 cat > conftest.$ac_ext <<EOF
8640 #line 8641 "configure"
8641 #include "confdefs.h"
8642 #include <stdlib.h>
8643 EOF
8644 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8645   egrep "free" >/dev/null 2>&1; then
8646   :
8647 else
8648   rm -rf conftest*
8649   ol_cv_header_stdc=no
8650 fi
8651 rm -f conftest*
8652
8653 fi
8654
8655 if test $ol_cv_header_stdc = yes; then
8656   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8657 if test "$cross_compiling" = yes; then
8658   :
8659 else
8660   cat > conftest.$ac_ext <<EOF
8661 #line 8662 "configure"
8662 #include "confdefs.h"
8663 #include <ctype.h>
8664 #ifndef HAVE_EBCDIC
8665 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8666 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8667 #else
8668 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8669                 || ('j' <= (c) && (c) <= 'r') \
8670                 || ('s' <= (c) && (c) <= 'z'))
8671 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8672 #endif
8673 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8674 int main () { int i; for (i = 0; i < 256; i++)
8675 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8676 exit (0); }
8677
8678 EOF
8679 if { (eval echo configure:8680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8680 then
8681   :
8682 else
8683   echo "configure: failed program was:" >&5
8684   cat conftest.$ac_ext >&5
8685   rm -fr conftest*
8686   ol_cv_header_stdc=no
8687 fi
8688 rm -fr conftest*
8689 fi
8690
8691 fi
8692 fi
8693
8694 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8695 if test $ol_cv_header_stdc = yes; then
8696   cat >> confdefs.h <<\EOF
8697 #define STDC_HEADERS 1
8698 EOF
8699
8700 fi
8701 ac_cv_header_stdc=disable
8702
8703
8704 if test $ol_cv_header_stdc != yes; then
8705         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8706 fi
8707
8708 ac_header_dirent=no
8709 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8710 do
8711 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8712 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8713 echo "configure:8714: checking for $ac_hdr that defines DIR" >&5
8714 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8715   echo $ac_n "(cached) $ac_c" 1>&6
8716 else
8717   cat > conftest.$ac_ext <<EOF
8718 #line 8719 "configure"
8719 #include "confdefs.h"
8720 #include <sys/types.h>
8721 #include <$ac_hdr>
8722 int main() {
8723 DIR *dirp = 0;
8724 ; return 0; }
8725 EOF
8726 if { (eval echo configure:8727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8727   rm -rf conftest*
8728   eval "ac_cv_header_dirent_$ac_safe=yes"
8729 else
8730   echo "configure: failed program was:" >&5
8731   cat conftest.$ac_ext >&5
8732   rm -rf conftest*
8733   eval "ac_cv_header_dirent_$ac_safe=no"
8734 fi
8735 rm -f conftest*
8736 fi
8737 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8738   echo "$ac_t""yes" 1>&6
8739     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8740   cat >> confdefs.h <<EOF
8741 #define $ac_tr_hdr 1
8742 EOF
8743  ac_header_dirent=$ac_hdr; break
8744 else
8745   echo "$ac_t""no" 1>&6
8746 fi
8747 done
8748 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8749 if test $ac_header_dirent = dirent.h; then
8750 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8751 echo "configure:8752: checking for opendir in -ldir" >&5
8752 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8753 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8754   echo $ac_n "(cached) $ac_c" 1>&6
8755 else
8756   ac_save_LIBS="$LIBS"
8757 LIBS="-ldir  $LIBS"
8758 cat > conftest.$ac_ext <<EOF
8759 #line 8760 "configure"
8760 #include "confdefs.h"
8761 /* Override any gcc2 internal prototype to avoid an error.  */
8762 /* We use char because int might match the return type of a gcc2
8763     builtin and then its argument prototype would still apply.  */
8764 char opendir();
8765
8766 int main() {
8767 opendir()
8768 ; return 0; }
8769 EOF
8770 if { (eval echo configure:8771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8771   rm -rf conftest*
8772   eval "ac_cv_lib_$ac_lib_var=yes"
8773 else
8774   echo "configure: failed program was:" >&5
8775   cat conftest.$ac_ext >&5
8776   rm -rf conftest*
8777   eval "ac_cv_lib_$ac_lib_var=no"
8778 fi
8779 rm -f conftest*
8780 LIBS="$ac_save_LIBS"
8781
8782 fi
8783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8784   echo "$ac_t""yes" 1>&6
8785   LIBS="$LIBS -ldir"
8786 else
8787   echo "$ac_t""no" 1>&6
8788 fi
8789
8790 else
8791 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8792 echo "configure:8793: checking for opendir in -lx" >&5
8793 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8795   echo $ac_n "(cached) $ac_c" 1>&6
8796 else
8797   ac_save_LIBS="$LIBS"
8798 LIBS="-lx  $LIBS"
8799 cat > conftest.$ac_ext <<EOF
8800 #line 8801 "configure"
8801 #include "confdefs.h"
8802 /* Override any gcc2 internal prototype to avoid an error.  */
8803 /* We use char because int might match the return type of a gcc2
8804     builtin and then its argument prototype would still apply.  */
8805 char opendir();
8806
8807 int main() {
8808 opendir()
8809 ; return 0; }
8810 EOF
8811 if { (eval echo configure:8812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8812   rm -rf conftest*
8813   eval "ac_cv_lib_$ac_lib_var=yes"
8814 else
8815   echo "configure: failed program was:" >&5
8816   cat conftest.$ac_ext >&5
8817   rm -rf conftest*
8818   eval "ac_cv_lib_$ac_lib_var=no"
8819 fi
8820 rm -f conftest*
8821 LIBS="$ac_save_LIBS"
8822
8823 fi
8824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8825   echo "$ac_t""yes" 1>&6
8826   LIBS="$LIBS -lx"
8827 else
8828   echo "$ac_t""no" 1>&6
8829 fi
8830
8831 fi
8832
8833 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8834 echo "configure:8835: checking for sys/wait.h that is POSIX.1 compatible" >&5
8835 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8836   echo $ac_n "(cached) $ac_c" 1>&6
8837 else
8838   cat > conftest.$ac_ext <<EOF
8839 #line 8840 "configure"
8840 #include "confdefs.h"
8841 #include <sys/types.h>
8842 #include <sys/wait.h>
8843 #ifndef WEXITSTATUS
8844 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8845 #endif
8846 #ifndef WIFEXITED
8847 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8848 #endif
8849 int main() {
8850 int s;
8851 wait (&s);
8852 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8853 ; return 0; }
8854 EOF
8855 if { (eval echo configure:8856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8856   rm -rf conftest*
8857   ac_cv_header_sys_wait_h=yes
8858 else
8859   echo "configure: failed program was:" >&5
8860   cat conftest.$ac_ext >&5
8861   rm -rf conftest*
8862   ac_cv_header_sys_wait_h=no
8863 fi
8864 rm -f conftest*
8865 fi
8866
8867 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8868 if test $ac_cv_header_sys_wait_h = yes; then
8869   cat >> confdefs.h <<\EOF
8870 #define HAVE_SYS_WAIT_H 1
8871 EOF
8872
8873 fi
8874
8875 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8876 echo "configure:8877: checking POSIX termios" >&5
8877 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8878   echo $ac_n "(cached) $ac_c" 1>&6
8879 else
8880   cat > conftest.$ac_ext <<EOF
8881 #line 8882 "configure"
8882 #include "confdefs.h"
8883 #include <sys/types.h>
8884 #include <unistd.h>
8885 #include <termios.h>
8886 int main() {
8887 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8888    tcgetattr(0, 0);
8889 ; return 0; }
8890 EOF
8891 if { (eval echo configure:8892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8892   rm -rf conftest*
8893   am_cv_sys_posix_termios=yes
8894 else
8895   echo "configure: failed program was:" >&5
8896   cat conftest.$ac_ext >&5
8897   rm -rf conftest*
8898   am_cv_sys_posix_termios=no
8899 fi
8900 rm -f conftest*
8901 fi
8902
8903 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8904
8905
8906  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8907 echo "configure:8908: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8908 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8909   echo $ac_n "(cached) $ac_c" 1>&6
8910 else
8911   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8912
8913   gwinsz_in_termios_h=no
8914   if test $am_cv_sys_posix_termios = yes; then
8915     cat > conftest.$ac_ext <<EOF
8916 #line 8917 "configure"
8917 #include "confdefs.h"
8918 #include <sys/types.h>
8919 #     include <termios.h>
8920 #     ifdef TIOCGWINSZ
8921         yes
8922 #     endif
8923     
8924 EOF
8925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8926   egrep "yes" >/dev/null 2>&1; then
8927   rm -rf conftest*
8928   gwinsz_in_termios_h=yes
8929 fi
8930 rm -f conftest*
8931
8932   fi
8933
8934   if test $gwinsz_in_termios_h = no; then
8935     cat > conftest.$ac_ext <<EOF
8936 #line 8937 "configure"
8937 #include "confdefs.h"
8938 #include <sys/types.h>
8939 #     include <sys/ioctl.h>
8940 #     ifdef TIOCGWINSZ
8941         yes
8942 #     endif
8943     
8944 EOF
8945 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8946   egrep "yes" >/dev/null 2>&1; then
8947   rm -rf conftest*
8948   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8949 fi
8950 rm -f conftest*
8951
8952   fi
8953   
8954 fi
8955
8956 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8957   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8958     cat >> confdefs.h <<\EOF
8959 #define GWINSZ_IN_SYS_IOCTL 1
8960 EOF
8961
8962   fi
8963
8964 if test $am_cv_sys_posix_termios = yes ; then
8965         cat >> confdefs.h <<\EOF
8966 #define HAVE_POSIX_TERMIOS 1
8967 EOF
8968
8969 fi
8970
8971 for ac_hdr in \
8972         arpa/inet.h             \
8973         arpa/nameser.h  \
8974         assert.h                \
8975         bits/types.h    \
8976         conio.h                 \
8977         crypt.h                 \
8978         direct.h                \
8979         errno.h                 \
8980         fcntl.h                 \
8981         filio.h                 \
8982         getopt.h                \
8983         grp.h                   \
8984         io.h                    \
8985         libutil.h               \
8986         limits.h                \
8987         locale.h                \
8988         netinet/tcp.h   \
8989         malloc.h                \
8990         memory.h                \
8991         psap.h                  \
8992         pwd.h                   \
8993         process.h               \
8994         resolv.h                \
8995         sgtty.h                 \
8996         shadow.h                \
8997         stddef.h                \
8998         string.h                \
8999         strings.h               \
9000         sysexits.h              \
9001         sys/file.h              \
9002         sys/filio.h             \
9003         sys/errno.h             \
9004         sys/ioctl.h             \
9005         sys/param.h             \
9006         sys/resource.h  \
9007         sys/select.h    \
9008         sys/socket.h    \
9009         sys/stat.h              \
9010         sys/syslog.h    \
9011         sys/time.h              \
9012         sys/types.h             \
9013         sys/ucred.h             \
9014         sys/uio.h               \
9015         syslog.h                \
9016         termios.h               \
9017         unistd.h                \
9018         winsock.h               \
9019         winsock2.h              \
9020
9021 do
9022 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9023 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9024 echo "configure:9025: checking for $ac_hdr" >&5
9025 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9026   echo $ac_n "(cached) $ac_c" 1>&6
9027 else
9028   cat > conftest.$ac_ext <<EOF
9029 #line 9030 "configure"
9030 #include "confdefs.h"
9031 #include <$ac_hdr>
9032 EOF
9033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9034 { (eval echo configure:9035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9036 if test -z "$ac_err"; then
9037   rm -rf conftest*
9038   eval "ac_cv_header_$ac_safe=yes"
9039 else
9040   echo "$ac_err" >&5
9041   echo "configure: failed program was:" >&5
9042   cat conftest.$ac_ext >&5
9043   rm -rf conftest*
9044   eval "ac_cv_header_$ac_safe=no"
9045 fi
9046 rm -f conftest*
9047 fi
9048 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9049   echo "$ac_t""yes" 1>&6
9050     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9051   cat >> confdefs.h <<EOF
9052 #define $ac_tr_hdr 1
9053 EOF
9054  
9055 else
9056   echo "$ac_t""no" 1>&6
9057 fi
9058 done
9059
9060
9061
9062
9063 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
9064 echo "configure:9065: checking for dlopen" >&5
9065 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
9066   echo $ac_n "(cached) $ac_c" 1>&6
9067 else
9068   cat > conftest.$ac_ext <<EOF
9069 #line 9070 "configure"
9070 #include "confdefs.h"
9071 /* System header to define __stub macros and hopefully few prototypes,
9072     which can conflict with char dlopen(); below.  */
9073 #include <assert.h>
9074 /* Override any gcc2 internal prototype to avoid an error.  */
9075 /* We use char because int might match the return type of a gcc2
9076     builtin and then its argument prototype would still apply.  */
9077 char dlopen();
9078 char (*f)();
9079
9080 int main() {
9081
9082 /* The GNU C library defines this for functions which it implements
9083     to always fail with ENOSYS.  Some functions are actually named
9084     something starting with __ and the normal name is an alias.  */
9085 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9086 choke me
9087 #else
9088 f = dlopen;
9089 #endif
9090
9091 ; return 0; }
9092 EOF
9093 if { (eval echo configure:9094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9094   rm -rf conftest*
9095   eval "ac_cv_func_dlopen=yes"
9096 else
9097   echo "configure: failed program was:" >&5
9098   cat conftest.$ac_ext >&5
9099   rm -rf conftest*
9100   eval "ac_cv_func_dlopen=no"
9101 fi
9102 rm -f conftest*
9103 fi
9104
9105 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9106   echo "$ac_t""yes" 1>&6
9107   :
9108 else
9109   echo "$ac_t""no" 1>&6
9110 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9111 echo "configure:9112: checking for dlopen in -ldl" >&5
9112 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9113 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9114   echo $ac_n "(cached) $ac_c" 1>&6
9115 else
9116   ac_save_LIBS="$LIBS"
9117 LIBS="-ldl  $LIBS"
9118 cat > conftest.$ac_ext <<EOF
9119 #line 9120 "configure"
9120 #include "confdefs.h"
9121 /* Override any gcc2 internal prototype to avoid an error.  */
9122 /* We use char because int might match the return type of a gcc2
9123     builtin and then its argument prototype would still apply.  */
9124 char dlopen();
9125
9126 int main() {
9127 dlopen()
9128 ; return 0; }
9129 EOF
9130 if { (eval echo configure:9131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9131   rm -rf conftest*
9132   eval "ac_cv_lib_$ac_lib_var=yes"
9133 else
9134   echo "configure: failed program was:" >&5
9135   cat conftest.$ac_ext >&5
9136   rm -rf conftest*
9137   eval "ac_cv_lib_$ac_lib_var=no"
9138 fi
9139 rm -f conftest*
9140 LIBS="$ac_save_LIBS"
9141
9142 fi
9143 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9144   echo "$ac_t""yes" 1>&6
9145     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9146     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9147   cat >> confdefs.h <<EOF
9148 #define $ac_tr_lib 1
9149 EOF
9150
9151   LIBS="-ldl $LIBS"
9152
9153 else
9154   echo "$ac_t""no" 1>&6
9155 fi
9156
9157 fi
9158
9159
9160 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9161 echo "configure:9162: checking for sigset in -lV3" >&5
9162 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9164   echo $ac_n "(cached) $ac_c" 1>&6
9165 else
9166   ac_save_LIBS="$LIBS"
9167 LIBS="-lV3  $LIBS"
9168 cat > conftest.$ac_ext <<EOF
9169 #line 9170 "configure"
9170 #include "confdefs.h"
9171 /* Override any gcc2 internal prototype to avoid an error.  */
9172 /* We use char because int might match the return type of a gcc2
9173     builtin and then its argument prototype would still apply.  */
9174 char sigset();
9175
9176 int main() {
9177 sigset()
9178 ; return 0; }
9179 EOF
9180 if { (eval echo configure:9181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9181   rm -rf conftest*
9182   eval "ac_cv_lib_$ac_lib_var=yes"
9183 else
9184   echo "configure: failed program was:" >&5
9185   cat conftest.$ac_ext >&5
9186   rm -rf conftest*
9187   eval "ac_cv_lib_$ac_lib_var=no"
9188 fi
9189 rm -f conftest*
9190 LIBS="$ac_save_LIBS"
9191
9192 fi
9193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9194   echo "$ac_t""yes" 1>&6
9195     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9196     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9197   cat >> confdefs.h <<EOF
9198 #define $ac_tr_lib 1
9199 EOF
9200
9201   LIBS="-lV3 $LIBS"
9202
9203 else
9204   echo "$ac_t""no" 1>&6
9205 fi
9206
9207
9208 if test "$ac_cv_header_winsock_h" = yes; then
9209 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9210 echo "configure:9211: checking for winsock" >&5
9211 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9212   echo $ac_n "(cached) $ac_c" 1>&6
9213 else
9214   save_LIBS="$LIBS"
9215 for curlib in ws2_32 wsock32; do
9216         LIBS="$LIBS -l$curlib"
9217         cat > conftest.$ac_ext <<EOF
9218 #line 9219 "configure"
9219 #include "confdefs.h"
9220 #include <winsock.h>
9221                         
9222 int main() {
9223
9224                         socket(0,0,0);
9225                         select(0,NULL,NULL,NULL,NULL);
9226                         closesocket(0);
9227                         gethostname(NULL,0);
9228                         
9229 ; return 0; }
9230 EOF
9231 if { (eval echo configure:9232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9232   rm -rf conftest*
9233   ol_cv_winsock=yes
9234 else
9235   echo "configure: failed program was:" >&5
9236   cat conftest.$ac_ext >&5
9237   rm -rf conftest*
9238   ol_cv_winsock=no
9239 fi
9240 rm -f conftest*
9241
9242         if test $ol_cv_winsock = yes; then
9243                 cat >> confdefs.h <<\EOF
9244 #define HAVE_WINSOCK 1
9245 EOF
9246
9247                 ac_cv_func_socket=yes
9248                 ac_cv_func_select=yes
9249                 ac_cv_func_closesocket=yes
9250                 ac_cv_func_gethostname=yes
9251                 if test $curlib = ws2_32; then
9252                         ol_cv_winsock=winsock2
9253                         cat >> confdefs.h <<\EOF
9254 #define HAVE_WINSOCK2 1
9255 EOF
9256
9257                 fi
9258                 break
9259         fi
9260         LIBS="$save_LIBS"
9261 done
9262 fi
9263
9264 echo "$ac_t""$ol_cv_winsock" 1>&6
9265 fi
9266
9267
9268 echo $ac_n "checking for socket""... $ac_c" 1>&6
9269 echo "configure:9270: checking for socket" >&5
9270 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9271   echo $ac_n "(cached) $ac_c" 1>&6
9272 else
9273   cat > conftest.$ac_ext <<EOF
9274 #line 9275 "configure"
9275 #include "confdefs.h"
9276 /* System header to define __stub macros and hopefully few prototypes,
9277     which can conflict with char socket(); below.  */
9278 #include <assert.h>
9279 /* Override any gcc2 internal prototype to avoid an error.  */
9280 /* We use char because int might match the return type of a gcc2
9281     builtin and then its argument prototype would still apply.  */
9282 char socket();
9283 char (*f)();
9284
9285 int main() {
9286
9287 /* The GNU C library defines this for functions which it implements
9288     to always fail with ENOSYS.  Some functions are actually named
9289     something starting with __ and the normal name is an alias.  */
9290 #if defined (__stub_socket) || defined (__stub___socket)
9291 choke me
9292 #else
9293 f = socket;
9294 #endif
9295
9296 ; return 0; }
9297 EOF
9298 if { (eval echo configure:9299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9299   rm -rf conftest*
9300   eval "ac_cv_func_socket=yes"
9301 else
9302   echo "configure: failed program was:" >&5
9303   cat conftest.$ac_ext >&5
9304   rm -rf conftest*
9305   eval "ac_cv_func_socket=no"
9306 fi
9307 rm -f conftest*
9308 fi
9309
9310 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9311   echo "$ac_t""yes" 1>&6
9312   :
9313 else
9314   echo "$ac_t""no" 1>&6
9315         
9316         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9317 echo "configure:9318: checking for main in -lsocket" >&5
9318 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9319 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9320   echo $ac_n "(cached) $ac_c" 1>&6
9321 else
9322   ac_save_LIBS="$LIBS"
9323 LIBS="-lsocket  $LIBS"
9324 cat > conftest.$ac_ext <<EOF
9325 #line 9326 "configure"
9326 #include "confdefs.h"
9327
9328 int main() {
9329 main()
9330 ; return 0; }
9331 EOF
9332 if { (eval echo configure:9333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9333   rm -rf conftest*
9334   eval "ac_cv_lib_$ac_lib_var=yes"
9335 else
9336   echo "configure: failed program was:" >&5
9337   cat conftest.$ac_ext >&5
9338   rm -rf conftest*
9339   eval "ac_cv_lib_$ac_lib_var=no"
9340 fi
9341 rm -f conftest*
9342 LIBS="$ac_save_LIBS"
9343
9344 fi
9345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9346   echo "$ac_t""yes" 1>&6
9347     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9348     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9349   cat >> confdefs.h <<EOF
9350 #define $ac_tr_lib 1
9351 EOF
9352
9353   LIBS="-lsocket $LIBS"
9354
9355 else
9356   echo "$ac_t""no" 1>&6
9357 fi
9358
9359         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9360 echo "configure:9361: checking for main in -lnet" >&5
9361 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9362 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9363   echo $ac_n "(cached) $ac_c" 1>&6
9364 else
9365   ac_save_LIBS="$LIBS"
9366 LIBS="-lnet  $LIBS"
9367 cat > conftest.$ac_ext <<EOF
9368 #line 9369 "configure"
9369 #include "confdefs.h"
9370
9371 int main() {
9372 main()
9373 ; return 0; }
9374 EOF
9375 if { (eval echo configure:9376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9376   rm -rf conftest*
9377   eval "ac_cv_lib_$ac_lib_var=yes"
9378 else
9379   echo "configure: failed program was:" >&5
9380   cat conftest.$ac_ext >&5
9381   rm -rf conftest*
9382   eval "ac_cv_lib_$ac_lib_var=no"
9383 fi
9384 rm -f conftest*
9385 LIBS="$ac_save_LIBS"
9386
9387 fi
9388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9389   echo "$ac_t""yes" 1>&6
9390     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9391     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9392   cat >> confdefs.h <<EOF
9393 #define $ac_tr_lib 1
9394 EOF
9395
9396   LIBS="-lnet $LIBS"
9397
9398 else
9399   echo "$ac_t""no" 1>&6
9400 fi
9401
9402         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9403 echo "configure:9404: checking for main in -lnsl_s" >&5
9404 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9405 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9406   echo $ac_n "(cached) $ac_c" 1>&6
9407 else
9408   ac_save_LIBS="$LIBS"
9409 LIBS="-lnsl_s  $LIBS"
9410 cat > conftest.$ac_ext <<EOF
9411 #line 9412 "configure"
9412 #include "confdefs.h"
9413
9414 int main() {
9415 main()
9416 ; return 0; }
9417 EOF
9418 if { (eval echo configure:9419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9419   rm -rf conftest*
9420   eval "ac_cv_lib_$ac_lib_var=yes"
9421 else
9422   echo "configure: failed program was:" >&5
9423   cat conftest.$ac_ext >&5
9424   rm -rf conftest*
9425   eval "ac_cv_lib_$ac_lib_var=no"
9426 fi
9427 rm -f conftest*
9428 LIBS="$ac_save_LIBS"
9429
9430 fi
9431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9432   echo "$ac_t""yes" 1>&6
9433     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9434     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9435   cat >> confdefs.h <<EOF
9436 #define $ac_tr_lib 1
9437 EOF
9438
9439   LIBS="-lnsl_s $LIBS"
9440
9441 else
9442   echo "$ac_t""no" 1>&6
9443 fi
9444
9445         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9446 echo "configure:9447: checking for main in -lnsl" >&5
9447 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9448 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9449   echo $ac_n "(cached) $ac_c" 1>&6
9450 else
9451   ac_save_LIBS="$LIBS"
9452 LIBS="-lnsl  $LIBS"
9453 cat > conftest.$ac_ext <<EOF
9454 #line 9455 "configure"
9455 #include "confdefs.h"
9456
9457 int main() {
9458 main()
9459 ; return 0; }
9460 EOF
9461 if { (eval echo configure:9462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9462   rm -rf conftest*
9463   eval "ac_cv_lib_$ac_lib_var=yes"
9464 else
9465   echo "configure: failed program was:" >&5
9466   cat conftest.$ac_ext >&5
9467   rm -rf conftest*
9468   eval "ac_cv_lib_$ac_lib_var=no"
9469 fi
9470 rm -f conftest*
9471 LIBS="$ac_save_LIBS"
9472
9473 fi
9474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9475   echo "$ac_t""yes" 1>&6
9476     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9477     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9478   cat >> confdefs.h <<EOF
9479 #define $ac_tr_lib 1
9480 EOF
9481
9482   LIBS="-lnsl $LIBS"
9483
9484 else
9485   echo "$ac_t""no" 1>&6
9486 fi
9487
9488         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9489 echo "configure:9490: checking for socket in -linet" >&5
9490 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9491 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9492   echo $ac_n "(cached) $ac_c" 1>&6
9493 else
9494   ac_save_LIBS="$LIBS"
9495 LIBS="-linet  $LIBS"
9496 cat > conftest.$ac_ext <<EOF
9497 #line 9498 "configure"
9498 #include "confdefs.h"
9499 /* Override any gcc2 internal prototype to avoid an error.  */
9500 /* We use char because int might match the return type of a gcc2
9501     builtin and then its argument prototype would still apply.  */
9502 char socket();
9503
9504 int main() {
9505 socket()
9506 ; return 0; }
9507 EOF
9508 if { (eval echo configure:9509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9509   rm -rf conftest*
9510   eval "ac_cv_lib_$ac_lib_var=yes"
9511 else
9512   echo "configure: failed program was:" >&5
9513   cat conftest.$ac_ext >&5
9514   rm -rf conftest*
9515   eval "ac_cv_lib_$ac_lib_var=no"
9516 fi
9517 rm -f conftest*
9518 LIBS="$ac_save_LIBS"
9519
9520 fi
9521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9522   echo "$ac_t""yes" 1>&6
9523     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9524     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9525   cat >> confdefs.h <<EOF
9526 #define $ac_tr_lib 1
9527 EOF
9528
9529   LIBS="-linet $LIBS"
9530
9531 else
9532   echo "$ac_t""no" 1>&6
9533 fi
9534
9535         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9536 echo "configure:9537: checking for main in -lgen" >&5
9537 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9538 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9539   echo $ac_n "(cached) $ac_c" 1>&6
9540 else
9541   ac_save_LIBS="$LIBS"
9542 LIBS="-lgen  $LIBS"
9543 cat > conftest.$ac_ext <<EOF
9544 #line 9545 "configure"
9545 #include "confdefs.h"
9546
9547 int main() {
9548 main()
9549 ; return 0; }
9550 EOF
9551 if { (eval echo configure:9552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9552   rm -rf conftest*
9553   eval "ac_cv_lib_$ac_lib_var=yes"
9554 else
9555   echo "configure: failed program was:" >&5
9556   cat conftest.$ac_ext >&5
9557   rm -rf conftest*
9558   eval "ac_cv_lib_$ac_lib_var=no"
9559 fi
9560 rm -f conftest*
9561 LIBS="$ac_save_LIBS"
9562
9563 fi
9564 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9565   echo "$ac_t""yes" 1>&6
9566     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9567     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9568   cat >> confdefs.h <<EOF
9569 #define $ac_tr_lib 1
9570 EOF
9571
9572   LIBS="-lgen $LIBS"
9573
9574 else
9575   echo "$ac_t""no" 1>&6
9576 fi
9577
9578
9579 fi
9580
9581
9582 echo $ac_n "checking for select""... $ac_c" 1>&6
9583 echo "configure:9584: checking for select" >&5
9584 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9585   echo $ac_n "(cached) $ac_c" 1>&6
9586 else
9587   cat > conftest.$ac_ext <<EOF
9588 #line 9589 "configure"
9589 #include "confdefs.h"
9590 /* System header to define __stub macros and hopefully few prototypes,
9591     which can conflict with char select(); below.  */
9592 #include <assert.h>
9593 /* Override any gcc2 internal prototype to avoid an error.  */
9594 /* We use char because int might match the return type of a gcc2
9595     builtin and then its argument prototype would still apply.  */
9596 char select();
9597 char (*f)();
9598
9599 int main() {
9600
9601 /* The GNU C library defines this for functions which it implements
9602     to always fail with ENOSYS.  Some functions are actually named
9603     something starting with __ and the normal name is an alias.  */
9604 #if defined (__stub_select) || defined (__stub___select)
9605 choke me
9606 #else
9607 f = select;
9608 #endif
9609
9610 ; return 0; }
9611 EOF
9612 if { (eval echo configure:9613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9613   rm -rf conftest*
9614   eval "ac_cv_func_select=yes"
9615 else
9616   echo "configure: failed program was:" >&5
9617   cat conftest.$ac_ext >&5
9618   rm -rf conftest*
9619   eval "ac_cv_func_select=no"
9620 fi
9621 rm -f conftest*
9622 fi
9623
9624 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9625   echo "$ac_t""yes" 1>&6
9626   :
9627 else
9628   echo "$ac_t""no" 1>&6
9629 { echo "configure: error: select() required." 1>&2; exit 1; }
9630 fi
9631
9632
9633 if test "${ac_cv_header_winsock_h}" != yes; then
9634                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9635 echo "configure:9636: checking types of arguments for select()" >&5
9636  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9637   echo $ac_n "(cached) $ac_c" 1>&6
9638 else
9639    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9640   echo $ac_n "(cached) $ac_c" 1>&6
9641 else
9642     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9643   echo $ac_n "(cached) $ac_c" 1>&6
9644 else
9645      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9646      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9647       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9648        cat > conftest.$ac_ext <<EOF
9649 #line 9650 "configure"
9650 #include "confdefs.h"
9651 #ifdef HAVE_SYS_TYPES_H
9652 #include <sys/types.h>
9653 #endif
9654 #ifdef HAVE_SYS_TIME_H
9655 #include <sys/time.h>
9656 #endif
9657 #ifdef HAVE_SYS_SELECT_H
9658 #include <sys/select.h>
9659 #endif
9660 #ifdef HAVE_SYS_SOCKET_H
9661 #include <sys/socket.h>
9662 #endif
9663 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);
9664 int main() {
9665
9666 ; return 0; }
9667 EOF
9668 if { (eval echo configure:9669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9669   rm -rf conftest*
9670           ac_not_found=no ; break 3
9671 else
9672   echo "configure: failed program was:" >&5
9673   cat conftest.$ac_ext >&5
9674   rm -rf conftest*
9675   ac_not_found=yes
9676 fi
9677 rm -f conftest*
9678       done
9679      done
9680     done
9681    
9682 fi
9683   
9684 fi
9685  
9686 fi
9687  if test "$ac_not_found" = yes; then
9688   ac_cv_func_select_arg1=int 
9689   ac_cv_func_select_arg234='int *' 
9690   ac_cv_func_select_arg5='struct timeval *'
9691  fi
9692  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9693  cat >> confdefs.h <<EOF
9694 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9695 EOF
9696
9697  cat >> confdefs.h <<EOF
9698 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9699 EOF
9700
9701  cat >> confdefs.h <<EOF
9702 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9703 EOF
9704
9705
9706 fi
9707
9708
9709 for ac_hdr in regex.h 
9710 do
9711 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9712 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9713 echo "configure:9714: checking for $ac_hdr" >&5
9714 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9715   echo $ac_n "(cached) $ac_c" 1>&6
9716 else
9717   cat > conftest.$ac_ext <<EOF
9718 #line 9719 "configure"
9719 #include "confdefs.h"
9720 #include <$ac_hdr>
9721 EOF
9722 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9723 { (eval echo configure:9724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9724 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9725 if test -z "$ac_err"; then
9726   rm -rf conftest*
9727   eval "ac_cv_header_$ac_safe=yes"
9728 else
9729   echo "$ac_err" >&5
9730   echo "configure: failed program was:" >&5
9731   cat conftest.$ac_ext >&5
9732   rm -rf conftest*
9733   eval "ac_cv_header_$ac_safe=no"
9734 fi
9735 rm -f conftest*
9736 fi
9737 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9738   echo "$ac_t""yes" 1>&6
9739     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9740   cat >> confdefs.h <<EOF
9741 #define $ac_tr_hdr 1
9742 EOF
9743  
9744 else
9745   echo "$ac_t""no" 1>&6
9746 fi
9747 done
9748
9749 if test "$ac_cv_header_regex_h" != yes ; then
9750         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9751 fi
9752
9753 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9754 echo "configure:9755: checking for library containing regfree" >&5
9755 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9756   echo $ac_n "(cached) $ac_c" 1>&6
9757 else
9758   ac_func_search_save_LIBS="$LIBS"
9759 ac_cv_search_regfree="no"
9760 cat > conftest.$ac_ext <<EOF
9761 #line 9762 "configure"
9762 #include "confdefs.h"
9763 /* Override any gcc2 internal prototype to avoid an error.  */
9764 /* We use char because int might match the return type of a gcc2
9765     builtin and then its argument prototype would still apply.  */
9766 char regfree();
9767
9768 int main() {
9769 regfree()
9770 ; return 0; }
9771 EOF
9772 if { (eval echo configure:9773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9773   rm -rf conftest*
9774   ac_cv_search_regfree="none required"
9775 else
9776   echo "configure: failed program was:" >&5
9777   cat conftest.$ac_ext >&5
9778 fi
9779 rm -f conftest*
9780 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9781 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9782 cat > conftest.$ac_ext <<EOF
9783 #line 9784 "configure"
9784 #include "confdefs.h"
9785 /* Override any gcc2 internal prototype to avoid an error.  */
9786 /* We use char because int might match the return type of a gcc2
9787     builtin and then its argument prototype would still apply.  */
9788 char regfree();
9789
9790 int main() {
9791 regfree()
9792 ; return 0; }
9793 EOF
9794 if { (eval echo configure:9795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9795   rm -rf conftest*
9796   ac_cv_search_regfree="-l$ac_lib"
9797 break
9798 else
9799   echo "configure: failed program was:" >&5
9800   cat conftest.$ac_ext >&5
9801 fi
9802 rm -f conftest*
9803 done
9804 LIBS="$ac_func_search_save_LIBS"
9805 fi
9806
9807 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9808 if test "$ac_cv_search_regfree" != "no"; then
9809   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9810   :
9811 else :
9812   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9813 fi
9814
9815
9816 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9817 echo "configure:9818: checking for compatible POSIX regex" >&5
9818 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9819   echo $ac_n "(cached) $ac_c" 1>&6
9820 else
9821   
9822         if test "$cross_compiling" = yes; then
9823   ol_cv_c_posix_regex=cross
9824 else
9825   cat > conftest.$ac_ext <<EOF
9826 #line 9827 "configure"
9827 #include "confdefs.h"
9828
9829 #include <sys/types.h>
9830 #include <regex.h>
9831 static char *pattern, *string;
9832 main()
9833 {
9834         int rc;
9835         regex_t re;
9836
9837         pattern = "^A";
9838
9839         if(regcomp(&re, pattern, 0)) {
9840                 return -1;
9841         }
9842         
9843         string = "ALL MATCH";
9844         
9845         rc = regexec(&re, string, 0, (void*)0, 0);
9846
9847         regfree(&re);
9848
9849         return rc;
9850 }
9851 EOF
9852 if { (eval echo configure:9853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9853 then
9854   ol_cv_c_posix_regex=yes
9855 else
9856   echo "configure: failed program was:" >&5
9857   cat conftest.$ac_ext >&5
9858   rm -fr conftest*
9859   ol_cv_c_posix_regex=no
9860 fi
9861 rm -fr conftest*
9862 fi
9863
9864 fi
9865
9866 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9867
9868 if test "$ol_cv_c_posix_regex" = no ; then
9869         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9870 fi
9871
9872
9873 have_uuid=no
9874 for ac_hdr in sys/uuid.h
9875 do
9876 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9877 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9878 echo "configure:9879: checking for $ac_hdr" >&5
9879 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9880   echo $ac_n "(cached) $ac_c" 1>&6
9881 else
9882   cat > conftest.$ac_ext <<EOF
9883 #line 9884 "configure"
9884 #include "confdefs.h"
9885 #include <$ac_hdr>
9886 EOF
9887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9888 { (eval echo configure:9889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9890 if test -z "$ac_err"; then
9891   rm -rf conftest*
9892   eval "ac_cv_header_$ac_safe=yes"
9893 else
9894   echo "$ac_err" >&5
9895   echo "configure: failed program was:" >&5
9896   cat conftest.$ac_ext >&5
9897   rm -rf conftest*
9898   eval "ac_cv_header_$ac_safe=no"
9899 fi
9900 rm -f conftest*
9901 fi
9902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9903   echo "$ac_t""yes" 1>&6
9904     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9905   cat >> confdefs.h <<EOF
9906 #define $ac_tr_hdr 1
9907 EOF
9908  
9909 else
9910   echo "$ac_t""no" 1>&6
9911 fi
9912 done
9913
9914 if test $ac_cv_header_sys_uuid_h = yes ; then
9915         save_LIBS="$LIBS"
9916         
9917 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9918 echo "configure:9919: checking for library containing uuid_to_str" >&5
9919 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9920   echo $ac_n "(cached) $ac_c" 1>&6
9921 else
9922   ac_func_search_save_LIBS="$LIBS"
9923 ac_cv_search_uuid_to_str="no"
9924 cat > conftest.$ac_ext <<EOF
9925 #line 9926 "configure"
9926 #include "confdefs.h"
9927 /* Override any gcc2 internal prototype to avoid an error.  */
9928 /* We use char because int might match the return type of a gcc2
9929     builtin and then its argument prototype would still apply.  */
9930 char uuid_to_str();
9931
9932 int main() {
9933 uuid_to_str()
9934 ; return 0; }
9935 EOF
9936 if { (eval echo configure:9937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9937   rm -rf conftest*
9938   ac_cv_search_uuid_to_str="none required"
9939 else
9940   echo "configure: failed program was:" >&5
9941   cat conftest.$ac_ext >&5
9942 fi
9943 rm -f conftest*
9944 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9945 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9946 cat > conftest.$ac_ext <<EOF
9947 #line 9948 "configure"
9948 #include "confdefs.h"
9949 /* Override any gcc2 internal prototype to avoid an error.  */
9950 /* We use char because int might match the return type of a gcc2
9951     builtin and then its argument prototype would still apply.  */
9952 char uuid_to_str();
9953
9954 int main() {
9955 uuid_to_str()
9956 ; return 0; }
9957 EOF
9958 if { (eval echo configure:9959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9959   rm -rf conftest*
9960   ac_cv_search_uuid_to_str="-l$ac_lib"
9961 break
9962 else
9963   echo "configure: failed program was:" >&5
9964   cat conftest.$ac_ext >&5
9965 fi
9966 rm -f conftest*
9967 done
9968 LIBS="$ac_func_search_save_LIBS"
9969 fi
9970
9971 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9972 if test "$ac_cv_search_uuid_to_str" != "no"; then
9973   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9974   have_uuid=yes
9975 else :
9976   :
9977 fi
9978         LIBS="$save_LIBS"
9979
9980         if test have_uuid = yes ; then
9981                 cat >> confdefs.h <<\EOF
9982 #define HAVE_UUID_TO_STR 1
9983 EOF
9984
9985
9986                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9987                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9988         fi
9989 fi
9990
9991 if test $have_uuid = no ; then
9992         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9993 echo "configure:9994: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9994         save_LIBS="$LIBS"
9995         LIBS="$LIBS -lrpcrt4"
9996         cat > conftest.$ac_ext <<EOF
9997 #line 9998 "configure"
9998 #include "confdefs.h"
9999
10000                 int __stdcall UuidCreate(void *);
10001                 int __stdcall UuidToStringA(void *,void **);
10002                 
10003 int main() {
10004
10005                 UuidCreate(0);
10006                 UuidToStringA(0,0);
10007                 
10008 ; return 0; }
10009 EOF
10010 if { (eval echo configure:10011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10011   rm -rf conftest*
10012   need_rpcrt=yes
10013 else
10014   echo "configure: failed program was:" >&5
10015   cat conftest.$ac_ext >&5
10016   rm -rf conftest*
10017   need_rpcrt=no
10018 fi
10019 rm -f conftest*
10020         if test $need_rpcrt = yes; then
10021                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10022         fi
10023         LIBS="$save_LIBS"
10024         echo "$ac_t""$need_rpcrt" 1>&6
10025 fi
10026
10027 ol_link_dnssrv=no
10028 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10029 echo "configure:10030: checking for res_query" >&5
10030 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10031   echo $ac_n "(cached) $ac_c" 1>&6
10032 else
10033   cat > conftest.$ac_ext <<EOF
10034 #line 10035 "configure"
10035 #include "confdefs.h"
10036 /* System header to define __stub macros and hopefully few prototypes,
10037     which can conflict with char res_query(); below.  */
10038 #include <assert.h>
10039 /* Override any gcc2 internal prototype to avoid an error.  */
10040 /* We use char because int might match the return type of a gcc2
10041     builtin and then its argument prototype would still apply.  */
10042 char res_query();
10043 char (*f)();
10044
10045 int main() {
10046
10047 /* The GNU C library defines this for functions which it implements
10048     to always fail with ENOSYS.  Some functions are actually named
10049     something starting with __ and the normal name is an alias.  */
10050 #if defined (__stub_res_query) || defined (__stub___res_query)
10051 choke me
10052 #else
10053 f = res_query;
10054 #endif
10055
10056 ; return 0; }
10057 EOF
10058 if { (eval echo configure:10059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10059   rm -rf conftest*
10060   eval "ac_cv_func_res_query=yes"
10061 else
10062   echo "configure: failed program was:" >&5
10063   cat conftest.$ac_ext >&5
10064   rm -rf conftest*
10065   eval "ac_cv_func_res_query=no"
10066 fi
10067 rm -f conftest*
10068 fi
10069
10070 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10071   echo "$ac_t""yes" 1>&6
10072   :
10073 else
10074   echo "$ac_t""no" 1>&6
10075 fi
10076
10077 if test $ac_cv_func_res_query = no ; then 
10078         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10079 echo "configure:10080: checking for __res_query" >&5
10080 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10081   echo $ac_n "(cached) $ac_c" 1>&6
10082 else
10083   cat > conftest.$ac_ext <<EOF
10084 #line 10085 "configure"
10085 #include "confdefs.h"
10086 /* System header to define __stub macros and hopefully few prototypes,
10087     which can conflict with char __res_query(); below.  */
10088 #include <assert.h>
10089 /* Override any gcc2 internal prototype to avoid an error.  */
10090 /* We use char because int might match the return type of a gcc2
10091     builtin and then its argument prototype would still apply.  */
10092 char __res_query();
10093 char (*f)();
10094
10095 int main() {
10096
10097 /* The GNU C library defines this for functions which it implements
10098     to always fail with ENOSYS.  Some functions are actually named
10099     something starting with __ and the normal name is an alias.  */
10100 #if defined (__stub___res_query) || defined (__stub_____res_query)
10101 choke me
10102 #else
10103 f = __res_query;
10104 #endif
10105
10106 ; return 0; }
10107 EOF
10108 if { (eval echo configure:10109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10109   rm -rf conftest*
10110   eval "ac_cv_func___res_query=yes"
10111 else
10112   echo "configure: failed program was:" >&5
10113   cat conftest.$ac_ext >&5
10114   rm -rf conftest*
10115   eval "ac_cv_func___res_query=no"
10116 fi
10117 rm -f conftest*
10118 fi
10119
10120 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10121   echo "$ac_t""yes" 1>&6
10122   :
10123 else
10124   echo "$ac_t""no" 1>&6
10125 fi
10126
10127         ac_cv_func_res_query=$ac_cv_func___res_query
10128 fi
10129
10130 if test $ac_cv_func_res_query = no ; then 
10131         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10132 echo "configure:10133: checking for res_query in -lbind" >&5
10133 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10134 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10135   echo $ac_n "(cached) $ac_c" 1>&6
10136 else
10137   ac_save_LIBS="$LIBS"
10138 LIBS="-lbind  $LIBS"
10139 cat > conftest.$ac_ext <<EOF
10140 #line 10141 "configure"
10141 #include "confdefs.h"
10142 /* Override any gcc2 internal prototype to avoid an error.  */
10143 /* We use char because int might match the return type of a gcc2
10144     builtin and then its argument prototype would still apply.  */
10145 char res_query();
10146
10147 int main() {
10148 res_query()
10149 ; return 0; }
10150 EOF
10151 if { (eval echo configure:10152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10152   rm -rf conftest*
10153   eval "ac_cv_lib_$ac_lib_var=yes"
10154 else
10155   echo "configure: failed program was:" >&5
10156   cat conftest.$ac_ext >&5
10157   rm -rf conftest*
10158   eval "ac_cv_lib_$ac_lib_var=no"
10159 fi
10160 rm -f conftest*
10161 LIBS="$ac_save_LIBS"
10162
10163 fi
10164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10165   echo "$ac_t""yes" 1>&6
10166     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10167     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10168   cat >> confdefs.h <<EOF
10169 #define $ac_tr_lib 1
10170 EOF
10171
10172   LIBS="-lbind $LIBS"
10173
10174 else
10175   echo "$ac_t""no" 1>&6
10176 fi
10177
10178         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10179 fi
10180
10181 if test $ac_cv_func_res_query = no ; then 
10182         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10183 echo "configure:10184: checking for __res_query in -lbind" >&5
10184 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10185 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10186   echo $ac_n "(cached) $ac_c" 1>&6
10187 else
10188   ac_save_LIBS="$LIBS"
10189 LIBS="-lbind  $LIBS"
10190 cat > conftest.$ac_ext <<EOF
10191 #line 10192 "configure"
10192 #include "confdefs.h"
10193 /* Override any gcc2 internal prototype to avoid an error.  */
10194 /* We use char because int might match the return type of a gcc2
10195     builtin and then its argument prototype would still apply.  */
10196 char __res_query();
10197
10198 int main() {
10199 __res_query()
10200 ; return 0; }
10201 EOF
10202 if { (eval echo configure:10203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10203   rm -rf conftest*
10204   eval "ac_cv_lib_$ac_lib_var=yes"
10205 else
10206   echo "configure: failed program was:" >&5
10207   cat conftest.$ac_ext >&5
10208   rm -rf conftest*
10209   eval "ac_cv_lib_$ac_lib_var=no"
10210 fi
10211 rm -f conftest*
10212 LIBS="$ac_save_LIBS"
10213
10214 fi
10215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10216   echo "$ac_t""yes" 1>&6
10217     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10218     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10219   cat >> confdefs.h <<EOF
10220 #define $ac_tr_lib 1
10221 EOF
10222
10223   LIBS="-lbind $LIBS"
10224
10225 else
10226   echo "$ac_t""no" 1>&6
10227 fi
10228
10229         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10230 fi
10231
10232 if test $ac_cv_func_res_query = no ; then 
10233         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10234 echo "configure:10235: checking for res_query in -lresolv" >&5
10235 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10236 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10237   echo $ac_n "(cached) $ac_c" 1>&6
10238 else
10239   ac_save_LIBS="$LIBS"
10240 LIBS="-lresolv  $LIBS"
10241 cat > conftest.$ac_ext <<EOF
10242 #line 10243 "configure"
10243 #include "confdefs.h"
10244 /* Override any gcc2 internal prototype to avoid an error.  */
10245 /* We use char because int might match the return type of a gcc2
10246     builtin and then its argument prototype would still apply.  */
10247 char res_query();
10248
10249 int main() {
10250 res_query()
10251 ; return 0; }
10252 EOF
10253 if { (eval echo configure:10254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10254   rm -rf conftest*
10255   eval "ac_cv_lib_$ac_lib_var=yes"
10256 else
10257   echo "configure: failed program was:" >&5
10258   cat conftest.$ac_ext >&5
10259   rm -rf conftest*
10260   eval "ac_cv_lib_$ac_lib_var=no"
10261 fi
10262 rm -f conftest*
10263 LIBS="$ac_save_LIBS"
10264
10265 fi
10266 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10267   echo "$ac_t""yes" 1>&6
10268     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10269     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10270   cat >> confdefs.h <<EOF
10271 #define $ac_tr_lib 1
10272 EOF
10273
10274   LIBS="-lresolv $LIBS"
10275
10276 else
10277   echo "$ac_t""no" 1>&6
10278 fi
10279
10280         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10281 fi
10282
10283 if test $ac_cv_func_res_query = no ; then 
10284         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10285 echo "configure:10286: checking for __res_query in -lresolv" >&5
10286 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10288   echo $ac_n "(cached) $ac_c" 1>&6
10289 else
10290   ac_save_LIBS="$LIBS"
10291 LIBS="-lresolv  $LIBS"
10292 cat > conftest.$ac_ext <<EOF
10293 #line 10294 "configure"
10294 #include "confdefs.h"
10295 /* Override any gcc2 internal prototype to avoid an error.  */
10296 /* We use char because int might match the return type of a gcc2
10297     builtin and then its argument prototype would still apply.  */
10298 char __res_query();
10299
10300 int main() {
10301 __res_query()
10302 ; return 0; }
10303 EOF
10304 if { (eval echo configure:10305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10305   rm -rf conftest*
10306   eval "ac_cv_lib_$ac_lib_var=yes"
10307 else
10308   echo "configure: failed program was:" >&5
10309   cat conftest.$ac_ext >&5
10310   rm -rf conftest*
10311   eval "ac_cv_lib_$ac_lib_var=no"
10312 fi
10313 rm -f conftest*
10314 LIBS="$ac_save_LIBS"
10315
10316 fi
10317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10318   echo "$ac_t""yes" 1>&6
10319     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10320     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10321   cat >> confdefs.h <<EOF
10322 #define $ac_tr_lib 1
10323 EOF
10324
10325   LIBS="-lresolv $LIBS"
10326
10327 else
10328   echo "$ac_t""no" 1>&6
10329 fi
10330
10331         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10332 fi
10333
10334 if test "$ac_cv_func_res_query" = yes ; then
10335         cat >> confdefs.h <<\EOF
10336 #define HAVE_RES_QUERY 1
10337 EOF
10338
10339
10340         if test $ol_enable_dnssrv != no ; then
10341                 ol_link_dnssrv=yes
10342         fi
10343 fi
10344
10345 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10346         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10347 fi
10348
10349 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10350 do
10351 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10352 echo "configure:10353: checking for $ac_func" >&5
10353 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10354   echo $ac_n "(cached) $ac_c" 1>&6
10355 else
10356   cat > conftest.$ac_ext <<EOF
10357 #line 10358 "configure"
10358 #include "confdefs.h"
10359 /* System header to define __stub macros and hopefully few prototypes,
10360     which can conflict with char $ac_func(); below.  */
10361 #include <assert.h>
10362 /* Override any gcc2 internal prototype to avoid an error.  */
10363 /* We use char because int might match the return type of a gcc2
10364     builtin and then its argument prototype would still apply.  */
10365 char $ac_func();
10366 char (*f)();
10367
10368 int main() {
10369
10370 /* The GNU C library defines this for functions which it implements
10371     to always fail with ENOSYS.  Some functions are actually named
10372     something starting with __ and the normal name is an alias.  */
10373 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10374 choke me
10375 #else
10376 f = $ac_func;
10377 #endif
10378
10379 ; return 0; }
10380 EOF
10381 if { (eval echo configure:10382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10382   rm -rf conftest*
10383   eval "ac_cv_func_$ac_func=yes"
10384 else
10385   echo "configure: failed program was:" >&5
10386   cat conftest.$ac_ext >&5
10387   rm -rf conftest*
10388   eval "ac_cv_func_$ac_func=no"
10389 fi
10390 rm -f conftest*
10391 fi
10392
10393 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10394   echo "$ac_t""yes" 1>&6
10395     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10396   cat >> confdefs.h <<EOF
10397 #define $ac_tr_func 1
10398 EOF
10399  
10400 else
10401   echo "$ac_t""no" 1>&6
10402 fi
10403 done
10404
10405
10406 ol_link_ipv6=no
10407 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10408         if test $ol_enable_ipv6 = yes ; then
10409                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10410         fi
10411 elif test $ol_enable_ipv6 != no ; then
10412         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10413 echo "configure:10414: checking INET6_ADDRSTRLEN" >&5
10414 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10415   echo $ac_n "(cached) $ac_c" 1>&6
10416 else
10417   
10418                 cat > conftest.$ac_ext <<EOF
10419 #line 10420 "configure"
10420 #include "confdefs.h"
10421
10422 #                       include <netinet/in.h>
10423 #                       ifdef INET6_ADDRSTRLEN
10424                                 __has_inet6_addrstrlen__;
10425 #                       endif
10426                 
10427 EOF
10428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10429   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10430   rm -rf conftest*
10431   ol_cv_inet6_addrstrlen=yes
10432 else
10433   rm -rf conftest*
10434   ol_cv_inet6_addrstrlen=no
10435 fi
10436 rm -f conftest*
10437
10438 fi
10439
10440 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10441
10442
10443         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10444 echo "configure:10445: checking struct sockaddr_storage" >&5
10445 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10446   echo $ac_n "(cached) $ac_c" 1>&6
10447 else
10448   
10449                 cat > conftest.$ac_ext <<EOF
10450 #line 10451 "configure"
10451 #include "confdefs.h"
10452
10453 #include <sys/types.h>
10454 #include <sys/socket.h>
10455
10456 int main() {
10457
10458                         struct sockaddr_storage ss;
10459
10460 ; return 0; }
10461 EOF
10462 if { (eval echo configure:10463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10463   rm -rf conftest*
10464   ol_cv_struct_sockaddr_storage=yes
10465 else
10466   echo "configure: failed program was:" >&5
10467   cat conftest.$ac_ext >&5
10468   rm -rf conftest*
10469   ol_cv_struct_sockaddr_storage=no
10470 fi
10471 rm -f conftest*
10472 fi
10473
10474 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10475
10476         if test $ol_cv_inet6_addrstrlen = yes \
10477                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10478                 ol_link_ipv6=yes
10479         elif test $ol_enable_ipv6 = yes \
10480                         -a $ol_cv_inet6_addrstrlen = no ; then
10481                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10482         elif test $ol_enable_ipv6 = yes \
10483                         -a $ol_cv_struct_sockaddr_storage = no ; then
10484                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10485         fi
10486 fi
10487
10488 if test $ol_enable_local != no ; then
10489         for ac_hdr in sys/un.h 
10490 do
10491 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10492 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10493 echo "configure:10494: checking for $ac_hdr" >&5
10494 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10495   echo $ac_n "(cached) $ac_c" 1>&6
10496 else
10497   cat > conftest.$ac_ext <<EOF
10498 #line 10499 "configure"
10499 #include "confdefs.h"
10500 #include <$ac_hdr>
10501 EOF
10502 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10503 { (eval echo configure:10504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10504 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10505 if test -z "$ac_err"; then
10506   rm -rf conftest*
10507   eval "ac_cv_header_$ac_safe=yes"
10508 else
10509   echo "$ac_err" >&5
10510   echo "configure: failed program was:" >&5
10511   cat conftest.$ac_ext >&5
10512   rm -rf conftest*
10513   eval "ac_cv_header_$ac_safe=no"
10514 fi
10515 rm -f conftest*
10516 fi
10517 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10518   echo "$ac_t""yes" 1>&6
10519     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10520   cat >> confdefs.h <<EOF
10521 #define $ac_tr_hdr 1
10522 EOF
10523  
10524 else
10525   echo "$ac_t""no" 1>&6
10526 fi
10527 done
10528
10529
10530         if test $ol_enable_local = auto ; then
10531                 ol_enable_local=$ac_cv_header_sys_un_h
10532         elif test $ac_cv_header_sys_un_h = no ; then
10533                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10534         fi
10535 fi
10536
10537 ol_link_kbind=no
10538 ol_link_kpasswd=no
10539 ol_link_krb5=no
10540 ol_link_krb4=no
10541
10542 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10543         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10544         -o $ol_with_kerberos = k425 ; then
10545
10546         for ac_hdr in krb5.h
10547 do
10548 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10549 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10550 echo "configure:10551: checking for $ac_hdr" >&5
10551 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10552   echo $ac_n "(cached) $ac_c" 1>&6
10553 else
10554   cat > conftest.$ac_ext <<EOF
10555 #line 10556 "configure"
10556 #include "confdefs.h"
10557 #include <$ac_hdr>
10558 EOF
10559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10560 { (eval echo configure:10561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10562 if test -z "$ac_err"; then
10563   rm -rf conftest*
10564   eval "ac_cv_header_$ac_safe=yes"
10565 else
10566   echo "$ac_err" >&5
10567   echo "configure: failed program was:" >&5
10568   cat conftest.$ac_ext >&5
10569   rm -rf conftest*
10570   eval "ac_cv_header_$ac_safe=no"
10571 fi
10572 rm -f conftest*
10573 fi
10574 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10575   echo "$ac_t""yes" 1>&6
10576     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10577   cat >> confdefs.h <<EOF
10578 #define $ac_tr_hdr 1
10579 EOF
10580  
10581 else
10582   echo "$ac_t""no" 1>&6
10583 fi
10584 done
10585
10586
10587         if test $ac_cv_header_krb5_h = yes ; then
10588                                 for ac_hdr in heim_err.h
10589 do
10590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10592 echo "configure:10593: checking for $ac_hdr" >&5
10593 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10594   echo $ac_n "(cached) $ac_c" 1>&6
10595 else
10596   cat > conftest.$ac_ext <<EOF
10597 #line 10598 "configure"
10598 #include "confdefs.h"
10599 #include <$ac_hdr>
10600 EOF
10601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10602 { (eval echo configure:10603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10604 if test -z "$ac_err"; then
10605   rm -rf conftest*
10606   eval "ac_cv_header_$ac_safe=yes"
10607 else
10608   echo "$ac_err" >&5
10609   echo "configure: failed program was:" >&5
10610   cat conftest.$ac_ext >&5
10611   rm -rf conftest*
10612   eval "ac_cv_header_$ac_safe=no"
10613 fi
10614 rm -f conftest*
10615 fi
10616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10617   echo "$ac_t""yes" 1>&6
10618     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10619   cat >> confdefs.h <<EOF
10620 #define $ac_tr_hdr 1
10621 EOF
10622  
10623 else
10624   echo "$ac_t""no" 1>&6
10625 fi
10626 done
10627
10628                 if test $ac_cv_header_heim_err_h = yes ; then
10629                         krb5_impl=heimdal
10630                 else
10631                         krb5_impl=mit
10632                 fi
10633
10634                 if test $krb5_impl = mit; then
10635                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10636 echo "configure:10637: checking for main in -lk5crypto" >&5
10637 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10638 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10639   echo $ac_n "(cached) $ac_c" 1>&6
10640 else
10641   ac_save_LIBS="$LIBS"
10642 LIBS="-lk5crypto  $LIBS"
10643 cat > conftest.$ac_ext <<EOF
10644 #line 10645 "configure"
10645 #include "confdefs.h"
10646
10647 int main() {
10648 main()
10649 ; return 0; }
10650 EOF
10651 if { (eval echo configure:10652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10652   rm -rf conftest*
10653   eval "ac_cv_lib_$ac_lib_var=yes"
10654 else
10655   echo "configure: failed program was:" >&5
10656   cat conftest.$ac_ext >&5
10657   rm -rf conftest*
10658   eval "ac_cv_lib_$ac_lib_var=no"
10659 fi
10660 rm -f conftest*
10661 LIBS="$ac_save_LIBS"
10662
10663 fi
10664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10665   echo "$ac_t""yes" 1>&6
10666   krb5crypto=k5crypto
10667 else
10668   echo "$ac_t""no" 1>&6
10669 krb5crypto=crypto
10670 fi
10671
10672
10673                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10674 echo "configure:10675: checking for main in -lkrb5" >&5
10675 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10676 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10677   echo $ac_n "(cached) $ac_c" 1>&6
10678 else
10679   ac_save_LIBS="$LIBS"
10680 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10681 cat > conftest.$ac_ext <<EOF
10682 #line 10683 "configure"
10683 #include "confdefs.h"
10684
10685 int main() {
10686 main()
10687 ; return 0; }
10688 EOF
10689 if { (eval echo configure:10690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10690   rm -rf conftest*
10691   eval "ac_cv_lib_$ac_lib_var=yes"
10692 else
10693   echo "configure: failed program was:" >&5
10694   cat conftest.$ac_ext >&5
10695   rm -rf conftest*
10696   eval "ac_cv_lib_$ac_lib_var=no"
10697 fi
10698 rm -f conftest*
10699 LIBS="$ac_save_LIBS"
10700
10701 fi
10702 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10703   echo "$ac_t""yes" 1>&6
10704   have_krb5=yes
10705                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10706 else
10707   echo "$ac_t""no" 1>&6
10708 have_krb5=no
10709 fi
10710
10711
10712                 elif test $krb5_impl = heimdal; then
10713                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10714 echo "configure:10715: checking for main in -ldes" >&5
10715 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10716 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10717   echo $ac_n "(cached) $ac_c" 1>&6
10718 else
10719   ac_save_LIBS="$LIBS"
10720 LIBS="-ldes  $LIBS"
10721 cat > conftest.$ac_ext <<EOF
10722 #line 10723 "configure"
10723 #include "confdefs.h"
10724
10725 int main() {
10726 main()
10727 ; return 0; }
10728 EOF
10729 if { (eval echo configure:10730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10730   rm -rf conftest*
10731   eval "ac_cv_lib_$ac_lib_var=yes"
10732 else
10733   echo "configure: failed program was:" >&5
10734   cat conftest.$ac_ext >&5
10735   rm -rf conftest*
10736   eval "ac_cv_lib_$ac_lib_var=no"
10737 fi
10738 rm -f conftest*
10739 LIBS="$ac_save_LIBS"
10740
10741 fi
10742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10743   echo "$ac_t""yes" 1>&6
10744   krb5crypto=des
10745 else
10746   echo "$ac_t""no" 1>&6
10747 krb5crypto=crypto
10748 fi
10749
10750
10751                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10752 echo "configure:10753: checking for main in -lkrb5" >&5
10753 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10754 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10755   echo $ac_n "(cached) $ac_c" 1>&6
10756 else
10757   ac_save_LIBS="$LIBS"
10758 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10759 cat > conftest.$ac_ext <<EOF
10760 #line 10761 "configure"
10761 #include "confdefs.h"
10762
10763 int main() {
10764 main()
10765 ; return 0; }
10766 EOF
10767 if { (eval echo configure:10768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10768   rm -rf conftest*
10769   eval "ac_cv_lib_$ac_lib_var=yes"
10770 else
10771   echo "configure: failed program was:" >&5
10772   cat conftest.$ac_ext >&5
10773   rm -rf conftest*
10774   eval "ac_cv_lib_$ac_lib_var=no"
10775 fi
10776 rm -f conftest*
10777 LIBS="$ac_save_LIBS"
10778
10779 fi
10780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10781   echo "$ac_t""yes" 1>&6
10782   have_krb5=yes
10783                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10784 else
10785   echo "$ac_t""no" 1>&6
10786 have_krb5=no
10787 fi
10788
10789
10790                         cat >> confdefs.h <<\EOF
10791 #define HAVE_HEIMDAL_KERBEROS 1
10792 EOF
10793
10794
10795                 else
10796                         have_krb5=no
10797                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10798                 fi
10799
10800                 if test $have_krb5 = yes ; then
10801                         ol_link_krb5=yes
10802
10803                         cat >> confdefs.h <<\EOF
10804 #define HAVE_KRB5 1
10805 EOF
10806
10807
10808                         if test $ol_enable_kpasswd != no ; then
10809                                 ol_link_kpasswd=yes;
10810                         fi
10811
10812                         if test $ol_with_kerberos = k5only ; then
10813                                 ol_with_kerberos=found
10814                         fi
10815
10816                 elif test $ol_with_kerberos != auto ; then
10817                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10818                 fi
10819
10820         fi
10821 fi
10822
10823 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10824         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10825
10826         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10827 do
10828 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10829 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10830 echo "configure:10831: checking for $ac_hdr" >&5
10831 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10832   echo $ac_n "(cached) $ac_c" 1>&6
10833 else
10834   cat > conftest.$ac_ext <<EOF
10835 #line 10836 "configure"
10836 #include "confdefs.h"
10837 #include <$ac_hdr>
10838 EOF
10839 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10840 { (eval echo configure:10841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10841 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10842 if test -z "$ac_err"; then
10843   rm -rf conftest*
10844   eval "ac_cv_header_$ac_safe=yes"
10845 else
10846   echo "$ac_err" >&5
10847   echo "configure: failed program was:" >&5
10848   cat conftest.$ac_ext >&5
10849   rm -rf conftest*
10850   eval "ac_cv_header_$ac_safe=no"
10851 fi
10852 rm -f conftest*
10853 fi
10854 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10855   echo "$ac_t""yes" 1>&6
10856     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10857   cat >> confdefs.h <<EOF
10858 #define $ac_tr_hdr 1
10859 EOF
10860  
10861 else
10862   echo "$ac_t""no" 1>&6
10863 fi
10864 done
10865
10866
10867         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10868                 if test $krb5_impl = mit; then
10869                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10870 echo "configure:10871: checking for main in -lkrb4" >&5
10871 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10872 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10873   echo $ac_n "(cached) $ac_c" 1>&6
10874 else
10875   ac_save_LIBS="$LIBS"
10876 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10877 cat > conftest.$ac_ext <<EOF
10878 #line 10879 "configure"
10879 #include "confdefs.h"
10880
10881 int main() {
10882 main()
10883 ; return 0; }
10884 EOF
10885 if { (eval echo configure:10886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10886   rm -rf conftest*
10887   eval "ac_cv_lib_$ac_lib_var=yes"
10888 else
10889   echo "configure: failed program was:" >&5
10890   cat conftest.$ac_ext >&5
10891   rm -rf conftest*
10892   eval "ac_cv_lib_$ac_lib_var=no"
10893 fi
10894 rm -f conftest*
10895 LIBS="$ac_save_LIBS"
10896
10897 fi
10898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10899   echo "$ac_t""yes" 1>&6
10900   have_k425=yes
10901                                 KRB4_LIBS="-lkrb4 -ldes425"
10902 else
10903   echo "$ac_t""no" 1>&6
10904 have_k425=no
10905 fi
10906
10907
10908                 elif test $krb5_impl = heimdal; then
10909                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10910 echo "configure:10911: checking for main in -lkrb4" >&5
10911 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10912 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10913   echo $ac_n "(cached) $ac_c" 1>&6
10914 else
10915   ac_save_LIBS="$LIBS"
10916 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10917 cat > conftest.$ac_ext <<EOF
10918 #line 10919 "configure"
10919 #include "confdefs.h"
10920
10921 int main() {
10922 main()
10923 ; return 0; }
10924 EOF
10925 if { (eval echo configure:10926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10926   rm -rf conftest*
10927   eval "ac_cv_lib_$ac_lib_var=yes"
10928 else
10929   echo "configure: failed program was:" >&5
10930   cat conftest.$ac_ext >&5
10931   rm -rf conftest*
10932   eval "ac_cv_lib_$ac_lib_var=no"
10933 fi
10934 rm -f conftest*
10935 LIBS="$ac_save_LIBS"
10936
10937 fi
10938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10939   echo "$ac_t""yes" 1>&6
10940   have_k425=yes
10941                                 KRB4_LIBS="-lkrb4"
10942 else
10943   echo "$ac_t""no" 1>&6
10944 have_k425=no
10945 fi
10946
10947
10948                 else
10949                         have_425=no
10950                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10951                 fi
10952
10953                 if test $have_k425 = yes ; then
10954                         ol_with_kerberos=found
10955                         ol_link_krb4=yes
10956
10957                         cat >> confdefs.h <<\EOF
10958 #define HAVE_KRB425 1
10959 EOF
10960
10961                         cat >> confdefs.h <<\EOF
10962 #define HAVE_KRB4 1
10963 EOF
10964
10965
10966                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10967 echo "configure:10968: checking for des_debug in Kerberos libraries" >&5
10968 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10969   echo $ac_n "(cached) $ac_c" 1>&6
10970 else
10971   
10972                                                                 save_LIBS="$LIBS"
10973                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10974                                 cat > conftest.$ac_ext <<EOF
10975 #line 10976 "configure"
10976 #include "confdefs.h"
10977
10978 #include <kerberosIV/krb.h>
10979 #include <kerberosIV/des.h>
10980 extern int des_debug;
10981
10982 int main() {
10983
10984 des_debug = 1;
10985
10986 ; return 0; }
10987 EOF
10988 if { (eval echo configure:10989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10989   rm -rf conftest*
10990   ol_cv_var_des_debug=yes
10991 else
10992   echo "configure: failed program was:" >&5
10993   cat conftest.$ac_ext >&5
10994   rm -rf conftest*
10995   ol_cv_var_des_debug=no
10996 fi
10997 rm -f conftest*
10998                                                                 LIBS="$save_LIBS"
10999                         
11000 fi
11001
11002 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11003
11004                         if test $ol_cv_var_des_debug = yes ; then
11005                                 cat >> confdefs.h <<\EOF
11006 #define HAVE_DES_DEBUG 1
11007 EOF
11008
11009                         fi
11010
11011                         LIBS="$save_LIBS"
11012                 fi
11013         fi
11014 fi
11015
11016 if test $ol_link_krb5 = yes ; then
11017         ol_with_kerberos=found
11018 fi
11019
11020 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11021         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11022
11023         for ac_hdr in krb.h des.h krb-archaeology.h 
11024 do
11025 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11026 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11027 echo "configure:11028: checking for $ac_hdr" >&5
11028 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11029   echo $ac_n "(cached) $ac_c" 1>&6
11030 else
11031   cat > conftest.$ac_ext <<EOF
11032 #line 11033 "configure"
11033 #include "confdefs.h"
11034 #include <$ac_hdr>
11035 EOF
11036 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11037 { (eval echo configure:11038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11038 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11039 if test -z "$ac_err"; then
11040   rm -rf conftest*
11041   eval "ac_cv_header_$ac_safe=yes"
11042 else
11043   echo "$ac_err" >&5
11044   echo "configure: failed program was:" >&5
11045   cat conftest.$ac_ext >&5
11046   rm -rf conftest*
11047   eval "ac_cv_header_$ac_safe=no"
11048 fi
11049 rm -f conftest*
11050 fi
11051 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11052   echo "$ac_t""yes" 1>&6
11053     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11054   cat >> confdefs.h <<EOF
11055 #define $ac_tr_hdr 1
11056 EOF
11057  
11058 else
11059   echo "$ac_t""no" 1>&6
11060 fi
11061 done
11062
11063
11064         if test $ac_cv_header_krb_h = yes ; then
11065                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11066 echo "configure:11067: checking for main in -lkrb" >&5
11067 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11068 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11069   echo $ac_n "(cached) $ac_c" 1>&6
11070 else
11071   ac_save_LIBS="$LIBS"
11072 LIBS="-lkrb -ldes $LIBS"
11073 cat > conftest.$ac_ext <<EOF
11074 #line 11075 "configure"
11075 #include "confdefs.h"
11076
11077 int main() {
11078 main()
11079 ; return 0; }
11080 EOF
11081 if { (eval echo configure:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11082   rm -rf conftest*
11083   eval "ac_cv_lib_$ac_lib_var=yes"
11084 else
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -rf conftest*
11088   eval "ac_cv_lib_$ac_lib_var=no"
11089 fi
11090 rm -f conftest*
11091 LIBS="$ac_save_LIBS"
11092
11093 fi
11094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11095   echo "$ac_t""yes" 1>&6
11096   have_k4=yes
11097 else
11098   echo "$ac_t""no" 1>&6
11099 have_k4=no
11100 fi
11101
11102
11103                 if test $have_k4 = yes ; then
11104                         ol_with_kerberos=found
11105                         ol_link_krb4=yes
11106
11107                         cat >> confdefs.h <<\EOF
11108 #define HAVE_KRB4 1
11109 EOF
11110
11111
11112                         KRB4_LIBS="-lkrb -ldes"
11113
11114                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11115                                 cat >> confdefs.h <<\EOF
11116 #define HAVE_KTH_KERBEROS 1
11117 EOF
11118
11119                         fi
11120                 fi
11121         fi
11122 fi
11123
11124 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11125         ol_link_kpasswd=yes
11126 fi
11127
11128 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11129         ol_link_kbind=yes
11130
11131 elif test $ol_enable_kbind = yes ; then
11132         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11133 fi
11134
11135 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11136         cat >> confdefs.h <<\EOF
11137 #define HAVE_KERBEROS 1
11138 EOF
11139
11140
11141 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11142         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11143 fi
11144
11145 ol_link_tls=no
11146 if test $ol_with_tls != no ; then
11147         for ac_hdr in openssl/ssl.h ssl.h
11148 do
11149 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11150 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11151 echo "configure:11152: checking for $ac_hdr" >&5
11152 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11153   echo $ac_n "(cached) $ac_c" 1>&6
11154 else
11155   cat > conftest.$ac_ext <<EOF
11156 #line 11157 "configure"
11157 #include "confdefs.h"
11158 #include <$ac_hdr>
11159 EOF
11160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11161 { (eval echo configure:11162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11163 if test -z "$ac_err"; then
11164   rm -rf conftest*
11165   eval "ac_cv_header_$ac_safe=yes"
11166 else
11167   echo "$ac_err" >&5
11168   echo "configure: failed program was:" >&5
11169   cat conftest.$ac_ext >&5
11170   rm -rf conftest*
11171   eval "ac_cv_header_$ac_safe=no"
11172 fi
11173 rm -f conftest*
11174 fi
11175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11176   echo "$ac_t""yes" 1>&6
11177     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11178   cat >> confdefs.h <<EOF
11179 #define $ac_tr_hdr 1
11180 EOF
11181  
11182 else
11183   echo "$ac_t""no" 1>&6
11184 fi
11185 done
11186
11187         
11188         if test $ac_cv_header_openssl_ssl_h = yes \
11189                 -o $ac_cv_header_ssl_h = yes ; then
11190                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11191 echo "configure:11192: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11192 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11193 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11194   echo $ac_n "(cached) $ac_c" 1>&6
11195 else
11196   ac_save_LIBS="$LIBS"
11197 LIBS="-lssl -lcrypto $LIBS"
11198 cat > conftest.$ac_ext <<EOF
11199 #line 11200 "configure"
11200 #include "confdefs.h"
11201 /* Override any gcc2 internal prototype to avoid an error.  */
11202 /* We use char because int might match the return type of a gcc2
11203     builtin and then its argument prototype would still apply.  */
11204 char SSLeay_add_ssl_algorithms();
11205
11206 int main() {
11207 SSLeay_add_ssl_algorithms()
11208 ; return 0; }
11209 EOF
11210 if { (eval echo configure:11211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11211   rm -rf conftest*
11212   eval "ac_cv_lib_$ac_lib_var=yes"
11213 else
11214   echo "configure: failed program was:" >&5
11215   cat conftest.$ac_ext >&5
11216   rm -rf conftest*
11217   eval "ac_cv_lib_$ac_lib_var=no"
11218 fi
11219 rm -f conftest*
11220 LIBS="$ac_save_LIBS"
11221
11222 fi
11223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11224   echo "$ac_t""yes" 1>&6
11225   have_ssleay=yes
11226                         need_rsaref=no
11227 else
11228   echo "$ac_t""no" 1>&6
11229 have_ssleay=no
11230 fi
11231
11232                         
11233                 if test $have_ssleay = no ; then
11234                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11235 echo "configure:11236: checking for SSL_library_init in -lssl" >&5
11236 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11237 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11238   echo $ac_n "(cached) $ac_c" 1>&6
11239 else
11240   ac_save_LIBS="$LIBS"
11241 LIBS="-lssl -lcrypto $LIBS"
11242 cat > conftest.$ac_ext <<EOF
11243 #line 11244 "configure"
11244 #include "confdefs.h"
11245 /* Override any gcc2 internal prototype to avoid an error.  */
11246 /* We use char because int might match the return type of a gcc2
11247     builtin and then its argument prototype would still apply.  */
11248 char SSL_library_init();
11249
11250 int main() {
11251 SSL_library_init()
11252 ; return 0; }
11253 EOF
11254 if { (eval echo configure:11255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11255   rm -rf conftest*
11256   eval "ac_cv_lib_$ac_lib_var=yes"
11257 else
11258   echo "configure: failed program was:" >&5
11259   cat conftest.$ac_ext >&5
11260   rm -rf conftest*
11261   eval "ac_cv_lib_$ac_lib_var=no"
11262 fi
11263 rm -f conftest*
11264 LIBS="$ac_save_LIBS"
11265
11266 fi
11267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11268   echo "$ac_t""yes" 1>&6
11269   have_ssleay=yes
11270                                 need_rsaref=no
11271 else
11272   echo "$ac_t""no" 1>&6
11273 have_ssleay=no
11274 fi
11275
11276                 fi
11277
11278                 if test $have_ssleay = no ; then
11279                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11280 echo "configure:11281: checking for ssl3_accept in -lssl" >&5
11281 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11282 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11283   echo $ac_n "(cached) $ac_c" 1>&6
11284 else
11285   ac_save_LIBS="$LIBS"
11286 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11287 cat > conftest.$ac_ext <<EOF
11288 #line 11289 "configure"
11289 #include "confdefs.h"
11290 /* Override any gcc2 internal prototype to avoid an error.  */
11291 /* We use char because int might match the return type of a gcc2
11292     builtin and then its argument prototype would still apply.  */
11293 char ssl3_accept();
11294
11295 int main() {
11296 ssl3_accept()
11297 ; return 0; }
11298 EOF
11299 if { (eval echo configure:11300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11300   rm -rf conftest*
11301   eval "ac_cv_lib_$ac_lib_var=yes"
11302 else
11303   echo "configure: failed program was:" >&5
11304   cat conftest.$ac_ext >&5
11305   rm -rf conftest*
11306   eval "ac_cv_lib_$ac_lib_var=no"
11307 fi
11308 rm -f conftest*
11309 LIBS="$ac_save_LIBS"
11310
11311 fi
11312 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11313   echo "$ac_t""yes" 1>&6
11314   have_ssleay=yes
11315                                 need_rsaref=yes
11316 else
11317   echo "$ac_t""no" 1>&6
11318 have_ssleay=no
11319 fi
11320
11321                 fi
11322
11323                 if test $have_ssleay = yes ; then
11324                         ol_with_tls=found
11325                         ol_link_tls=yes
11326
11327                         cat >> confdefs.h <<\EOF
11328 #define HAVE_SSLEAY 1
11329 EOF
11330
11331
11332                         if test $need_rsaref = yes; then
11333                                 cat >> confdefs.h <<\EOF
11334 #define HAVE_RSAREF 1
11335 EOF
11336
11337
11338                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11339                         else
11340                                 TLS_LIBS="-lssl -lcrypto"
11341                         fi
11342                 fi
11343         fi
11344
11345 else
11346         echo "configure: warning: TLS data protection not supported!" 1>&2
11347 fi
11348
11349 WITH_TLS=no
11350 if test $ol_link_tls = yes ; then
11351         cat >> confdefs.h <<\EOF
11352 #define HAVE_TLS 1
11353 EOF
11354
11355         WITH_TLS=yes
11356
11357 elif test $ol_with_tls = auto ; then
11358         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11359         echo "configure: warning: TLS data protection not supported!" 1>&2
11360
11361 elif test $ol_with_tls != no ; then
11362         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11363 fi
11364
11365 if test $ol_enable_lmpasswd != no; then
11366         if test $ol_link_tls != yes ; then
11367                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11368         fi
11369
11370         cat >> confdefs.h <<\EOF
11371 #define SLAPD_LMHASH 1
11372 EOF
11373
11374 fi
11375
11376 ol_link_threads=no
11377
11378 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11379         -o $ol_with_threads = nt ; then
11380
11381         
11382         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11383 echo "configure:11384: checking for _beginthread" >&5
11384 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11385   echo $ac_n "(cached) $ac_c" 1>&6
11386 else
11387   cat > conftest.$ac_ext <<EOF
11388 #line 11389 "configure"
11389 #include "confdefs.h"
11390 /* System header to define __stub macros and hopefully few prototypes,
11391     which can conflict with char _beginthread(); below.  */
11392 #include <assert.h>
11393 /* Override any gcc2 internal prototype to avoid an error.  */
11394 /* We use char because int might match the return type of a gcc2
11395     builtin and then its argument prototype would still apply.  */
11396 char _beginthread();
11397 char (*f)();
11398
11399 int main() {
11400
11401 /* The GNU C library defines this for functions which it implements
11402     to always fail with ENOSYS.  Some functions are actually named
11403     something starting with __ and the normal name is an alias.  */
11404 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11405 choke me
11406 #else
11407 f = _beginthread;
11408 #endif
11409
11410 ; return 0; }
11411 EOF
11412 if { (eval echo configure:11413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11413   rm -rf conftest*
11414   eval "ac_cv_func__beginthread=yes"
11415 else
11416   echo "configure: failed program was:" >&5
11417   cat conftest.$ac_ext >&5
11418   rm -rf conftest*
11419   eval "ac_cv_func__beginthread=no"
11420 fi
11421 rm -f conftest*
11422 fi
11423
11424 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11425   echo "$ac_t""yes" 1>&6
11426   :
11427 else
11428   echo "$ac_t""no" 1>&6
11429 fi
11430
11431
11432         if test $ac_cv_func__beginthread = yes ; then
11433                 cat >> confdefs.h <<\EOF
11434 #define HAVE_NT_THREADS 1
11435 EOF
11436
11437                 ol_cv_nt_threads=yes
11438         fi
11439
11440
11441         if test "$ol_cv_nt_threads" = yes ; then
11442                 ol_link_threads=nt
11443                 ol_with_threads=found
11444                 ol_with_yielding_select=yes
11445
11446                 cat >> confdefs.h <<\EOF
11447 #define HAVE_NT_SERVICE_MANAGER 1
11448 EOF
11449
11450                 cat >> confdefs.h <<\EOF
11451 #define HAVE_NT_EVENT_LOG 1
11452 EOF
11453
11454         fi
11455
11456         if test $ol_with_threads = nt ; then
11457                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11458         fi
11459 fi
11460
11461 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11462         -o $ol_with_threads = posix ; then
11463
11464         for ac_hdr in pthread.h
11465 do
11466 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11467 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11468 echo "configure:11469: checking for $ac_hdr" >&5
11469 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11470   echo $ac_n "(cached) $ac_c" 1>&6
11471 else
11472   cat > conftest.$ac_ext <<EOF
11473 #line 11474 "configure"
11474 #include "confdefs.h"
11475 #include <$ac_hdr>
11476 EOF
11477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11478 { (eval echo configure:11479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11480 if test -z "$ac_err"; then
11481   rm -rf conftest*
11482   eval "ac_cv_header_$ac_safe=yes"
11483 else
11484   echo "$ac_err" >&5
11485   echo "configure: failed program was:" >&5
11486   cat conftest.$ac_ext >&5
11487   rm -rf conftest*
11488   eval "ac_cv_header_$ac_safe=no"
11489 fi
11490 rm -f conftest*
11491 fi
11492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11493   echo "$ac_t""yes" 1>&6
11494     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11495   cat >> confdefs.h <<EOF
11496 #define $ac_tr_hdr 1
11497 EOF
11498  
11499 else
11500   echo "$ac_t""no" 1>&6
11501 fi
11502 done
11503
11504
11505         if test $ac_cv_header_pthread_h = yes ; then
11506                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11507 echo "configure:11508: checking POSIX thread version" >&5
11508 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11509   echo $ac_n "(cached) $ac_c" 1>&6
11510 else
11511   
11512         cat > conftest.$ac_ext <<EOF
11513 #line 11514 "configure"
11514 #include "confdefs.h"
11515
11516 #               include <pthread.h>
11517         
11518 int main() {
11519
11520                 int i = PTHREAD_CREATE_JOINABLE;
11521         
11522 ; return 0; }
11523 EOF
11524 if { (eval echo configure:11525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11525   rm -rf conftest*
11526   
11527         cat > conftest.$ac_ext <<EOF
11528 #line 11529 "configure"
11529 #include "confdefs.h"
11530 #include <pthread.h>
11531 EOF
11532 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11533   egrep "pthread_detach" >/dev/null 2>&1; then
11534   rm -rf conftest*
11535   ol_cv_pthread_version=10
11536 else
11537   rm -rf conftest*
11538   ol_cv_pthread_version=8
11539 fi
11540 rm -f conftest*
11541
11542 else
11543   echo "configure: failed program was:" >&5
11544   cat conftest.$ac_ext >&5
11545   rm -rf conftest*
11546   
11547         cat > conftest.$ac_ext <<EOF
11548 #line 11549 "configure"
11549 #include "confdefs.h"
11550
11551 #               include <pthread.h>
11552 #               ifdef PTHREAD_CREATE_UNDETACHED
11553                 draft7
11554 #               endif
11555         
11556 EOF
11557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11558   egrep "draft7" >/dev/null 2>&1; then
11559   rm -rf conftest*
11560   ol_cv_pthread_version=7
11561 else
11562   rm -rf conftest*
11563   
11564         cat > conftest.$ac_ext <<EOF
11565 #line 11566 "configure"
11566 #include "confdefs.h"
11567 #include <pthread.h>
11568 EOF
11569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11570   egrep "pthread_attr_init" >/dev/null 2>&1; then
11571   rm -rf conftest*
11572   ol_cv_pthread_version=6
11573 else
11574   rm -rf conftest*
11575   
11576         cat > conftest.$ac_ext <<EOF
11577 #line 11578 "configure"
11578 #include "confdefs.h"
11579
11580 #               include <pthread.h>
11581 #ifdef          PTHREAD_MUTEX_INITIALIZER
11582                 draft5
11583 #endif
11584         
11585 EOF
11586 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11587   egrep "draft5" >/dev/null 2>&1; then
11588   rm -rf conftest*
11589   ol_cv_pthread_version=5
11590 else
11591   rm -rf conftest*
11592   ol_cv_pthread_version=4
11593 fi
11594 rm -f conftest*
11595  
11596 fi
11597 rm -f conftest*
11598  
11599 fi
11600 rm -f conftest*
11601  
11602 fi
11603 rm -f conftest*
11604
11605 fi
11606
11607 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11608
11609
11610                 if test $ol_cv_pthread_version != 0 ; then
11611                         cat >> confdefs.h <<EOF
11612 #define HAVE_PTHREADS $ol_cv_pthread_version
11613 EOF
11614
11615                 else
11616                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11617                 fi
11618
11619                 # consider threads found
11620                 ol_with_threads=found
11621
11622                 
11623         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11624 echo "configure:11625: checking for LinuxThreads pthread.h" >&5
11625 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11626   echo $ac_n "(cached) $ac_c" 1>&6
11627 else
11628   cat > conftest.$ac_ext <<EOF
11629 #line 11630 "configure"
11630 #include "confdefs.h"
11631 #include <pthread.h>
11632 EOF
11633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11634   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11635   rm -rf conftest*
11636   ol_cv_header_linux_threads=yes
11637 else
11638   rm -rf conftest*
11639   ol_cv_header_linux_threads=no
11640 fi
11641 rm -f conftest*
11642
11643                 
11644 fi
11645
11646 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11647         if test $ol_cv_header_linux_threads = yes; then
11648                 cat >> confdefs.h <<\EOF
11649 #define HAVE_LINUX_THREADS 1
11650 EOF
11651
11652         fi
11653
11654                 
11655         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11656 echo "configure:11657: checking for GNU Pth pthread.h" >&5
11657 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11658   echo $ac_n "(cached) $ac_c" 1>&6
11659 else
11660   cat > conftest.$ac_ext <<EOF
11661 #line 11662 "configure"
11662 #include "confdefs.h"
11663 #include <pthread.h>
11664 #ifdef _POSIX_THREAD_IS_GNU_PTH
11665         __gnu_pth__;
11666 #endif
11667
11668 EOF
11669 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11670   egrep "__gnu_pth__" >/dev/null 2>&1; then
11671   rm -rf conftest*
11672   ol_cv_header_gnu_pth_pthread_h=yes
11673 else
11674   rm -rf conftest*
11675   ol_cv_header_gnu_pth_pthread_h=no
11676 fi
11677 rm -f conftest*
11678
11679                 
11680 fi
11681
11682 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11683
11684
11685                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11686                         for ac_hdr in sched.h
11687 do
11688 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11689 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11690 echo "configure:11691: checking for $ac_hdr" >&5
11691 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11692   echo $ac_n "(cached) $ac_c" 1>&6
11693 else
11694   cat > conftest.$ac_ext <<EOF
11695 #line 11696 "configure"
11696 #include "confdefs.h"
11697 #include <$ac_hdr>
11698 EOF
11699 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11700 { (eval echo configure:11701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11701 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11702 if test -z "$ac_err"; then
11703   rm -rf conftest*
11704   eval "ac_cv_header_$ac_safe=yes"
11705 else
11706   echo "$ac_err" >&5
11707   echo "configure: failed program was:" >&5
11708   cat conftest.$ac_ext >&5
11709   rm -rf conftest*
11710   eval "ac_cv_header_$ac_safe=no"
11711 fi
11712 rm -f conftest*
11713 fi
11714 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11715   echo "$ac_t""yes" 1>&6
11716     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11717   cat >> confdefs.h <<EOF
11718 #define $ac_tr_hdr 1
11719 EOF
11720  
11721 else
11722   echo "$ac_t""no" 1>&6
11723 fi
11724 done
11725
11726                 fi
11727
11728                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11729                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11730 echo "configure:11731: checking for pthread_create in default libraries" >&5
11731 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11732   echo $ac_n "(cached) $ac_c" 1>&6
11733 else
11734   
11735                 if test "$cross_compiling" = yes; then
11736   cat > conftest.$ac_ext <<EOF
11737 #line 11738 "configure"
11738 #include "confdefs.h"
11739 /* pthread test headers */
11740 #include <pthread.h>
11741 #if HAVE_PTHREADS < 7
11742 #include <errno.h>
11743 #endif
11744 #ifndef NULL
11745 #define NULL (void*)0
11746 #endif
11747
11748 static void *task(p)
11749         void *p;
11750 {
11751         return (void *) (p == NULL);
11752 }
11753
11754 int main() {
11755
11756         /* pthread test function */
11757 #ifndef PTHREAD_CREATE_DETACHED
11758 #define PTHREAD_CREATE_DETACHED 1
11759 #endif
11760         pthread_t t;
11761         int status;
11762         int detach = PTHREAD_CREATE_DETACHED;
11763
11764 #if HAVE_PTHREADS > 4
11765         /* Final pthreads */
11766         pthread_attr_t attr;
11767
11768         status = pthread_attr_init(&attr);
11769         if( status ) return status;
11770
11771 #if HAVE_PTHREADS < 7
11772         status = pthread_attr_setdetachstate(&attr, &detach);
11773         if( status < 0 ) status = errno;
11774 #else
11775         status = pthread_attr_setdetachstate(&attr, detach);
11776 #endif
11777         if( status ) return status;
11778         status = pthread_create( &t, &attr, task, NULL );
11779 #if HAVE_PTHREADS < 7
11780         if( status < 0 ) status = errno;
11781 #endif
11782         if( status ) return status;
11783 #else
11784         /* Draft 4 pthreads */
11785         status = pthread_create( &t, pthread_attr_default, task, NULL );
11786         if( status ) return errno;
11787
11788         /* give thread a chance to complete */
11789         /* it should remain joinable and hence detachable */
11790         sleep( 1 );
11791
11792         status = pthread_detach( &t );
11793         if( status ) return errno;
11794 #endif
11795
11796 #ifdef HAVE_LINUX_THREADS
11797         pthread_kill_other_threads_np();
11798 #endif
11799
11800         return 0;
11801
11802 ; return 0; }
11803 EOF
11804 if { (eval echo configure:11805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11805   rm -rf conftest*
11806   ol_cv_pthread_create=yes
11807 else
11808   echo "configure: failed program was:" >&5
11809   cat conftest.$ac_ext >&5
11810   rm -rf conftest*
11811   ol_cv_pthread_create=no
11812 fi
11813 rm -f conftest*
11814 else
11815   cat > conftest.$ac_ext <<EOF
11816 #line 11817 "configure"
11817 #include "confdefs.h"
11818 /* pthread test headers */
11819 #include <pthread.h>
11820 #if HAVE_PTHREADS < 7
11821 #include <errno.h>
11822 #endif
11823 #ifndef NULL
11824 #define NULL (void*)0
11825 #endif
11826
11827 static void *task(p)
11828         void *p;
11829 {
11830         return (void *) (p == NULL);
11831 }
11832
11833
11834 int main(argc, argv)
11835         int argc;
11836         char **argv;
11837 {
11838
11839         /* pthread test function */
11840 #ifndef PTHREAD_CREATE_DETACHED
11841 #define PTHREAD_CREATE_DETACHED 1
11842 #endif
11843         pthread_t t;
11844         int status;
11845         int detach = PTHREAD_CREATE_DETACHED;
11846
11847 #if HAVE_PTHREADS > 4
11848         /* Final pthreads */
11849         pthread_attr_t attr;
11850
11851         status = pthread_attr_init(&attr);
11852         if( status ) return status;
11853
11854 #if HAVE_PTHREADS < 7
11855         status = pthread_attr_setdetachstate(&attr, &detach);
11856         if( status < 0 ) status = errno;
11857 #else
11858         status = pthread_attr_setdetachstate(&attr, detach);
11859 #endif
11860         if( status ) return status;
11861         status = pthread_create( &t, &attr, task, NULL );
11862 #if HAVE_PTHREADS < 7
11863         if( status < 0 ) status = errno;
11864 #endif
11865         if( status ) return status;
11866 #else
11867         /* Draft 4 pthreads */
11868         status = pthread_create( &t, pthread_attr_default, task, NULL );
11869         if( status ) return errno;
11870
11871         /* give thread a chance to complete */
11872         /* it should remain joinable and hence detachable */
11873         sleep( 1 );
11874
11875         status = pthread_detach( &t );
11876         if( status ) return errno;
11877 #endif
11878
11879 #ifdef HAVE_LINUX_THREADS
11880         pthread_kill_other_threads_np();
11881 #endif
11882
11883         return 0;
11884
11885 }
11886
11887 EOF
11888 if { (eval echo configure:11889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11889 then
11890   ol_cv_pthread_create=yes
11891 else
11892   echo "configure: failed program was:" >&5
11893   cat conftest.$ac_ext >&5
11894   rm -fr conftest*
11895   ol_cv_pthread_create=no
11896 fi
11897 rm -fr conftest*
11898 fi
11899
11900 fi
11901
11902 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11903
11904                 if test $ol_cv_pthread_create != no ; then
11905                         ol_link_threads=posix
11906                         ol_link_pthreads=""
11907                 fi
11908                 
11909                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11910 if test "$ol_link_threads" = no ; then
11911         # try -kthread
11912         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11913 echo "configure:11914: checking for pthread link with -kthread" >&5
11914 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11915   echo $ac_n "(cached) $ac_c" 1>&6
11916 else
11917   
11918                 # save the flags
11919                 ol_LIBS="$LIBS"
11920                 LIBS="-kthread $LIBS"
11921
11922                 if test "$cross_compiling" = yes; then
11923   cat > conftest.$ac_ext <<EOF
11924 #line 11925 "configure"
11925 #include "confdefs.h"
11926 /* pthread test headers */
11927 #include <pthread.h>
11928 #if HAVE_PTHREADS < 7
11929 #include <errno.h>
11930 #endif
11931 #ifndef NULL
11932 #define NULL (void*)0
11933 #endif
11934
11935 static void *task(p)
11936         void *p;
11937 {
11938         return (void *) (p == NULL);
11939 }
11940
11941 int main() {
11942
11943         /* pthread test function */
11944 #ifndef PTHREAD_CREATE_DETACHED
11945 #define PTHREAD_CREATE_DETACHED 1
11946 #endif
11947         pthread_t t;
11948         int status;
11949         int detach = PTHREAD_CREATE_DETACHED;
11950
11951 #if HAVE_PTHREADS > 4
11952         /* Final pthreads */
11953         pthread_attr_t attr;
11954
11955         status = pthread_attr_init(&attr);
11956         if( status ) return status;
11957
11958 #if HAVE_PTHREADS < 7
11959         status = pthread_attr_setdetachstate(&attr, &detach);
11960         if( status < 0 ) status = errno;
11961 #else
11962         status = pthread_attr_setdetachstate(&attr, detach);
11963 #endif
11964         if( status ) return status;
11965         status = pthread_create( &t, &attr, task, NULL );
11966 #if HAVE_PTHREADS < 7
11967         if( status < 0 ) status = errno;
11968 #endif
11969         if( status ) return status;
11970 #else
11971         /* Draft 4 pthreads */
11972         status = pthread_create( &t, pthread_attr_default, task, NULL );
11973         if( status ) return errno;
11974
11975         /* give thread a chance to complete */
11976         /* it should remain joinable and hence detachable */
11977         sleep( 1 );
11978
11979         status = pthread_detach( &t );
11980         if( status ) return errno;
11981 #endif
11982
11983 #ifdef HAVE_LINUX_THREADS
11984         pthread_kill_other_threads_np();
11985 #endif
11986
11987         return 0;
11988
11989 ; return 0; }
11990 EOF
11991 if { (eval echo configure:11992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11992   rm -rf conftest*
11993   ol_cv_pthread_kthread=yes
11994 else
11995   echo "configure: failed program was:" >&5
11996   cat conftest.$ac_ext >&5
11997   rm -rf conftest*
11998   ol_cv_pthread_kthread=no
11999 fi
12000 rm -f conftest*
12001 else
12002   cat > conftest.$ac_ext <<EOF
12003 #line 12004 "configure"
12004 #include "confdefs.h"
12005 /* pthread test headers */
12006 #include <pthread.h>
12007 #if HAVE_PTHREADS < 7
12008 #include <errno.h>
12009 #endif
12010 #ifndef NULL
12011 #define NULL (void*)0
12012 #endif
12013
12014 static void *task(p)
12015         void *p;
12016 {
12017         return (void *) (p == NULL);
12018 }
12019
12020
12021 int main(argc, argv)
12022         int argc;
12023         char **argv;
12024 {
12025
12026         /* pthread test function */
12027 #ifndef PTHREAD_CREATE_DETACHED
12028 #define PTHREAD_CREATE_DETACHED 1
12029 #endif
12030         pthread_t t;
12031         int status;
12032         int detach = PTHREAD_CREATE_DETACHED;
12033
12034 #if HAVE_PTHREADS > 4
12035         /* Final pthreads */
12036         pthread_attr_t attr;
12037
12038         status = pthread_attr_init(&attr);
12039         if( status ) return status;
12040
12041 #if HAVE_PTHREADS < 7
12042         status = pthread_attr_setdetachstate(&attr, &detach);
12043         if( status < 0 ) status = errno;
12044 #else
12045         status = pthread_attr_setdetachstate(&attr, detach);
12046 #endif
12047         if( status ) return status;
12048         status = pthread_create( &t, &attr, task, NULL );
12049 #if HAVE_PTHREADS < 7
12050         if( status < 0 ) status = errno;
12051 #endif
12052         if( status ) return status;
12053 #else
12054         /* Draft 4 pthreads */
12055         status = pthread_create( &t, pthread_attr_default, task, NULL );
12056         if( status ) return errno;
12057
12058         /* give thread a chance to complete */
12059         /* it should remain joinable and hence detachable */
12060         sleep( 1 );
12061
12062         status = pthread_detach( &t );
12063         if( status ) return errno;
12064 #endif
12065
12066 #ifdef HAVE_LINUX_THREADS
12067         pthread_kill_other_threads_np();
12068 #endif
12069
12070         return 0;
12071
12072 }
12073
12074 EOF
12075 if { (eval echo configure:12076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12076 then
12077   ol_cv_pthread_kthread=yes
12078 else
12079   echo "configure: failed program was:" >&5
12080   cat conftest.$ac_ext >&5
12081   rm -fr conftest*
12082   ol_cv_pthread_kthread=no
12083 fi
12084 rm -fr conftest*
12085 fi
12086
12087
12088                 # restore the LIBS
12089                 LIBS="$ol_LIBS"
12090         
12091 fi
12092
12093 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12094
12095         if test $ol_cv_pthread_kthread = yes ; then
12096                 ol_link_pthreads="-kthread"
12097                 ol_link_threads=posix
12098         fi
12099 fi
12100
12101                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12102 if test "$ol_link_threads" = no ; then
12103         # try -pthread
12104         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12105 echo "configure:12106: checking for pthread link with -pthread" >&5
12106 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12107   echo $ac_n "(cached) $ac_c" 1>&6
12108 else
12109   
12110                 # save the flags
12111                 ol_LIBS="$LIBS"
12112                 LIBS="-pthread $LIBS"
12113
12114                 if test "$cross_compiling" = yes; then
12115   cat > conftest.$ac_ext <<EOF
12116 #line 12117 "configure"
12117 #include "confdefs.h"
12118 /* pthread test headers */
12119 #include <pthread.h>
12120 #if HAVE_PTHREADS < 7
12121 #include <errno.h>
12122 #endif
12123 #ifndef NULL
12124 #define NULL (void*)0
12125 #endif
12126
12127 static void *task(p)
12128         void *p;
12129 {
12130         return (void *) (p == NULL);
12131 }
12132
12133 int main() {
12134
12135         /* pthread test function */
12136 #ifndef PTHREAD_CREATE_DETACHED
12137 #define PTHREAD_CREATE_DETACHED 1
12138 #endif
12139         pthread_t t;
12140         int status;
12141         int detach = PTHREAD_CREATE_DETACHED;
12142
12143 #if HAVE_PTHREADS > 4
12144         /* Final pthreads */
12145         pthread_attr_t attr;
12146
12147         status = pthread_attr_init(&attr);
12148         if( status ) return status;
12149
12150 #if HAVE_PTHREADS < 7
12151         status = pthread_attr_setdetachstate(&attr, &detach);
12152         if( status < 0 ) status = errno;
12153 #else
12154         status = pthread_attr_setdetachstate(&attr, detach);
12155 #endif
12156         if( status ) return status;
12157         status = pthread_create( &t, &attr, task, NULL );
12158 #if HAVE_PTHREADS < 7
12159         if( status < 0 ) status = errno;
12160 #endif
12161         if( status ) return status;
12162 #else
12163         /* Draft 4 pthreads */
12164         status = pthread_create( &t, pthread_attr_default, task, NULL );
12165         if( status ) return errno;
12166
12167         /* give thread a chance to complete */
12168         /* it should remain joinable and hence detachable */
12169         sleep( 1 );
12170
12171         status = pthread_detach( &t );
12172         if( status ) return errno;
12173 #endif
12174
12175 #ifdef HAVE_LINUX_THREADS
12176         pthread_kill_other_threads_np();
12177 #endif
12178
12179         return 0;
12180
12181 ; return 0; }
12182 EOF
12183 if { (eval echo configure:12184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12184   rm -rf conftest*
12185   ol_cv_pthread_pthread=yes
12186 else
12187   echo "configure: failed program was:" >&5
12188   cat conftest.$ac_ext >&5
12189   rm -rf conftest*
12190   ol_cv_pthread_pthread=no
12191 fi
12192 rm -f conftest*
12193 else
12194   cat > conftest.$ac_ext <<EOF
12195 #line 12196 "configure"
12196 #include "confdefs.h"
12197 /* pthread test headers */
12198 #include <pthread.h>
12199 #if HAVE_PTHREADS < 7
12200 #include <errno.h>
12201 #endif
12202 #ifndef NULL
12203 #define NULL (void*)0
12204 #endif
12205
12206 static void *task(p)
12207         void *p;
12208 {
12209         return (void *) (p == NULL);
12210 }
12211
12212
12213 int main(argc, argv)
12214         int argc;
12215         char **argv;
12216 {
12217
12218         /* pthread test function */
12219 #ifndef PTHREAD_CREATE_DETACHED
12220 #define PTHREAD_CREATE_DETACHED 1
12221 #endif
12222         pthread_t t;
12223         int status;
12224         int detach = PTHREAD_CREATE_DETACHED;
12225
12226 #if HAVE_PTHREADS > 4
12227         /* Final pthreads */
12228         pthread_attr_t attr;
12229
12230         status = pthread_attr_init(&attr);
12231         if( status ) return status;
12232
12233 #if HAVE_PTHREADS < 7
12234         status = pthread_attr_setdetachstate(&attr, &detach);
12235         if( status < 0 ) status = errno;
12236 #else
12237         status = pthread_attr_setdetachstate(&attr, detach);
12238 #endif
12239         if( status ) return status;
12240         status = pthread_create( &t, &attr, task, NULL );
12241 #if HAVE_PTHREADS < 7
12242         if( status < 0 ) status = errno;
12243 #endif
12244         if( status ) return status;
12245 #else
12246         /* Draft 4 pthreads */
12247         status = pthread_create( &t, pthread_attr_default, task, NULL );
12248         if( status ) return errno;
12249
12250         /* give thread a chance to complete */
12251         /* it should remain joinable and hence detachable */
12252         sleep( 1 );
12253
12254         status = pthread_detach( &t );
12255         if( status ) return errno;
12256 #endif
12257
12258 #ifdef HAVE_LINUX_THREADS
12259         pthread_kill_other_threads_np();
12260 #endif
12261
12262         return 0;
12263
12264 }
12265
12266 EOF
12267 if { (eval echo configure:12268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12268 then
12269   ol_cv_pthread_pthread=yes
12270 else
12271   echo "configure: failed program was:" >&5
12272   cat conftest.$ac_ext >&5
12273   rm -fr conftest*
12274   ol_cv_pthread_pthread=no
12275 fi
12276 rm -fr conftest*
12277 fi
12278
12279
12280                 # restore the LIBS
12281                 LIBS="$ol_LIBS"
12282         
12283 fi
12284
12285 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12286
12287         if test $ol_cv_pthread_pthread = yes ; then
12288                 ol_link_pthreads="-pthread"
12289                 ol_link_threads=posix
12290         fi
12291 fi
12292
12293                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12294 if test "$ol_link_threads" = no ; then
12295         # try -pthreads
12296         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12297 echo "configure:12298: checking for pthread link with -pthreads" >&5
12298 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12299   echo $ac_n "(cached) $ac_c" 1>&6
12300 else
12301   
12302                 # save the flags
12303                 ol_LIBS="$LIBS"
12304                 LIBS="-pthreads $LIBS"
12305
12306                 if test "$cross_compiling" = yes; then
12307   cat > conftest.$ac_ext <<EOF
12308 #line 12309 "configure"
12309 #include "confdefs.h"
12310 /* pthread test headers */
12311 #include <pthread.h>
12312 #if HAVE_PTHREADS < 7
12313 #include <errno.h>
12314 #endif
12315 #ifndef NULL
12316 #define NULL (void*)0
12317 #endif
12318
12319 static void *task(p)
12320         void *p;
12321 {
12322         return (void *) (p == NULL);
12323 }
12324
12325 int main() {
12326
12327         /* pthread test function */
12328 #ifndef PTHREAD_CREATE_DETACHED
12329 #define PTHREAD_CREATE_DETACHED 1
12330 #endif
12331         pthread_t t;
12332         int status;
12333         int detach = PTHREAD_CREATE_DETACHED;
12334
12335 #if HAVE_PTHREADS > 4
12336         /* Final pthreads */
12337         pthread_attr_t attr;
12338
12339         status = pthread_attr_init(&attr);
12340         if( status ) return status;
12341
12342 #if HAVE_PTHREADS < 7
12343         status = pthread_attr_setdetachstate(&attr, &detach);
12344         if( status < 0 ) status = errno;
12345 #else
12346         status = pthread_attr_setdetachstate(&attr, detach);
12347 #endif
12348         if( status ) return status;
12349         status = pthread_create( &t, &attr, task, NULL );
12350 #if HAVE_PTHREADS < 7
12351         if( status < 0 ) status = errno;
12352 #endif
12353         if( status ) return status;
12354 #else
12355         /* Draft 4 pthreads */
12356         status = pthread_create( &t, pthread_attr_default, task, NULL );
12357         if( status ) return errno;
12358
12359         /* give thread a chance to complete */
12360         /* it should remain joinable and hence detachable */
12361         sleep( 1 );
12362
12363         status = pthread_detach( &t );
12364         if( status ) return errno;
12365 #endif
12366
12367 #ifdef HAVE_LINUX_THREADS
12368         pthread_kill_other_threads_np();
12369 #endif
12370
12371         return 0;
12372
12373 ; return 0; }
12374 EOF
12375 if { (eval echo configure:12376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12376   rm -rf conftest*
12377   ol_cv_pthread_pthreads=yes
12378 else
12379   echo "configure: failed program was:" >&5
12380   cat conftest.$ac_ext >&5
12381   rm -rf conftest*
12382   ol_cv_pthread_pthreads=no
12383 fi
12384 rm -f conftest*
12385 else
12386   cat > conftest.$ac_ext <<EOF
12387 #line 12388 "configure"
12388 #include "confdefs.h"
12389 /* pthread test headers */
12390 #include <pthread.h>
12391 #if HAVE_PTHREADS < 7
12392 #include <errno.h>
12393 #endif
12394 #ifndef NULL
12395 #define NULL (void*)0
12396 #endif
12397
12398 static void *task(p)
12399         void *p;
12400 {
12401         return (void *) (p == NULL);
12402 }
12403
12404
12405 int main(argc, argv)
12406         int argc;
12407         char **argv;
12408 {
12409
12410         /* pthread test function */
12411 #ifndef PTHREAD_CREATE_DETACHED
12412 #define PTHREAD_CREATE_DETACHED 1
12413 #endif
12414         pthread_t t;
12415         int status;
12416         int detach = PTHREAD_CREATE_DETACHED;
12417
12418 #if HAVE_PTHREADS > 4
12419         /* Final pthreads */
12420         pthread_attr_t attr;
12421
12422         status = pthread_attr_init(&attr);
12423         if( status ) return status;
12424
12425 #if HAVE_PTHREADS < 7
12426         status = pthread_attr_setdetachstate(&attr, &detach);
12427         if( status < 0 ) status = errno;
12428 #else
12429         status = pthread_attr_setdetachstate(&attr, detach);
12430 #endif
12431         if( status ) return status;
12432         status = pthread_create( &t, &attr, task, NULL );
12433 #if HAVE_PTHREADS < 7
12434         if( status < 0 ) status = errno;
12435 #endif
12436         if( status ) return status;
12437 #else
12438         /* Draft 4 pthreads */
12439         status = pthread_create( &t, pthread_attr_default, task, NULL );
12440         if( status ) return errno;
12441
12442         /* give thread a chance to complete */
12443         /* it should remain joinable and hence detachable */
12444         sleep( 1 );
12445
12446         status = pthread_detach( &t );
12447         if( status ) return errno;
12448 #endif
12449
12450 #ifdef HAVE_LINUX_THREADS
12451         pthread_kill_other_threads_np();
12452 #endif
12453
12454         return 0;
12455
12456 }
12457
12458 EOF
12459 if { (eval echo configure:12460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12460 then
12461   ol_cv_pthread_pthreads=yes
12462 else
12463   echo "configure: failed program was:" >&5
12464   cat conftest.$ac_ext >&5
12465   rm -fr conftest*
12466   ol_cv_pthread_pthreads=no
12467 fi
12468 rm -fr conftest*
12469 fi
12470
12471
12472                 # restore the LIBS
12473                 LIBS="$ol_LIBS"
12474         
12475 fi
12476
12477 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12478
12479         if test $ol_cv_pthread_pthreads = yes ; then
12480                 ol_link_pthreads="-pthreads"
12481                 ol_link_threads=posix
12482         fi
12483 fi
12484
12485                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12486 if test "$ol_link_threads" = no ; then
12487         # try -mthreads
12488         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12489 echo "configure:12490: checking for pthread link with -mthreads" >&5
12490 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12491   echo $ac_n "(cached) $ac_c" 1>&6
12492 else
12493   
12494                 # save the flags
12495                 ol_LIBS="$LIBS"
12496                 LIBS="-mthreads $LIBS"
12497
12498                 if test "$cross_compiling" = yes; then
12499   cat > conftest.$ac_ext <<EOF
12500 #line 12501 "configure"
12501 #include "confdefs.h"
12502 /* pthread test headers */
12503 #include <pthread.h>
12504 #if HAVE_PTHREADS < 7
12505 #include <errno.h>
12506 #endif
12507 #ifndef NULL
12508 #define NULL (void*)0
12509 #endif
12510
12511 static void *task(p)
12512         void *p;
12513 {
12514         return (void *) (p == NULL);
12515 }
12516
12517 int main() {
12518
12519         /* pthread test function */
12520 #ifndef PTHREAD_CREATE_DETACHED
12521 #define PTHREAD_CREATE_DETACHED 1
12522 #endif
12523         pthread_t t;
12524         int status;
12525         int detach = PTHREAD_CREATE_DETACHED;
12526
12527 #if HAVE_PTHREADS > 4
12528         /* Final pthreads */
12529         pthread_attr_t attr;
12530
12531         status = pthread_attr_init(&attr);
12532         if( status ) return status;
12533
12534 #if HAVE_PTHREADS < 7
12535         status = pthread_attr_setdetachstate(&attr, &detach);
12536         if( status < 0 ) status = errno;
12537 #else
12538         status = pthread_attr_setdetachstate(&attr, detach);
12539 #endif
12540         if( status ) return status;
12541         status = pthread_create( &t, &attr, task, NULL );
12542 #if HAVE_PTHREADS < 7
12543         if( status < 0 ) status = errno;
12544 #endif
12545         if( status ) return status;
12546 #else
12547         /* Draft 4 pthreads */
12548         status = pthread_create( &t, pthread_attr_default, task, NULL );
12549         if( status ) return errno;
12550
12551         /* give thread a chance to complete */
12552         /* it should remain joinable and hence detachable */
12553         sleep( 1 );
12554
12555         status = pthread_detach( &t );
12556         if( status ) return errno;
12557 #endif
12558
12559 #ifdef HAVE_LINUX_THREADS
12560         pthread_kill_other_threads_np();
12561 #endif
12562
12563         return 0;
12564
12565 ; return 0; }
12566 EOF
12567 if { (eval echo configure:12568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12568   rm -rf conftest*
12569   ol_cv_pthread_mthreads=yes
12570 else
12571   echo "configure: failed program was:" >&5
12572   cat conftest.$ac_ext >&5
12573   rm -rf conftest*
12574   ol_cv_pthread_mthreads=no
12575 fi
12576 rm -f conftest*
12577 else
12578   cat > conftest.$ac_ext <<EOF
12579 #line 12580 "configure"
12580 #include "confdefs.h"
12581 /* pthread test headers */
12582 #include <pthread.h>
12583 #if HAVE_PTHREADS < 7
12584 #include <errno.h>
12585 #endif
12586 #ifndef NULL
12587 #define NULL (void*)0
12588 #endif
12589
12590 static void *task(p)
12591         void *p;
12592 {
12593         return (void *) (p == NULL);
12594 }
12595
12596
12597 int main(argc, argv)
12598         int argc;
12599         char **argv;
12600 {
12601
12602         /* pthread test function */
12603 #ifndef PTHREAD_CREATE_DETACHED
12604 #define PTHREAD_CREATE_DETACHED 1
12605 #endif
12606         pthread_t t;
12607         int status;
12608         int detach = PTHREAD_CREATE_DETACHED;
12609
12610 #if HAVE_PTHREADS > 4
12611         /* Final pthreads */
12612         pthread_attr_t attr;
12613
12614         status = pthread_attr_init(&attr);
12615         if( status ) return status;
12616
12617 #if HAVE_PTHREADS < 7
12618         status = pthread_attr_setdetachstate(&attr, &detach);
12619         if( status < 0 ) status = errno;
12620 #else
12621         status = pthread_attr_setdetachstate(&attr, detach);
12622 #endif
12623         if( status ) return status;
12624         status = pthread_create( &t, &attr, task, NULL );
12625 #if HAVE_PTHREADS < 7
12626         if( status < 0 ) status = errno;
12627 #endif
12628         if( status ) return status;
12629 #else
12630         /* Draft 4 pthreads */
12631         status = pthread_create( &t, pthread_attr_default, task, NULL );
12632         if( status ) return errno;
12633
12634         /* give thread a chance to complete */
12635         /* it should remain joinable and hence detachable */
12636         sleep( 1 );
12637
12638         status = pthread_detach( &t );
12639         if( status ) return errno;
12640 #endif
12641
12642 #ifdef HAVE_LINUX_THREADS
12643         pthread_kill_other_threads_np();
12644 #endif
12645
12646         return 0;
12647
12648 }
12649
12650 EOF
12651 if { (eval echo configure:12652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12652 then
12653   ol_cv_pthread_mthreads=yes
12654 else
12655   echo "configure: failed program was:" >&5
12656   cat conftest.$ac_ext >&5
12657   rm -fr conftest*
12658   ol_cv_pthread_mthreads=no
12659 fi
12660 rm -fr conftest*
12661 fi
12662
12663
12664                 # restore the LIBS
12665                 LIBS="$ol_LIBS"
12666         
12667 fi
12668
12669 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12670
12671         if test $ol_cv_pthread_mthreads = yes ; then
12672                 ol_link_pthreads="-mthreads"
12673                 ol_link_threads=posix
12674         fi
12675 fi
12676
12677                 # Pthread try link: -thread (ol_cv_pthread_thread)
12678 if test "$ol_link_threads" = no ; then
12679         # try -thread
12680         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12681 echo "configure:12682: checking for pthread link with -thread" >&5
12682 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12683   echo $ac_n "(cached) $ac_c" 1>&6
12684 else
12685   
12686                 # save the flags
12687                 ol_LIBS="$LIBS"
12688                 LIBS="-thread $LIBS"
12689
12690                 if test "$cross_compiling" = yes; then
12691   cat > conftest.$ac_ext <<EOF
12692 #line 12693 "configure"
12693 #include "confdefs.h"
12694 /* pthread test headers */
12695 #include <pthread.h>
12696 #if HAVE_PTHREADS < 7
12697 #include <errno.h>
12698 #endif
12699 #ifndef NULL
12700 #define NULL (void*)0
12701 #endif
12702
12703 static void *task(p)
12704         void *p;
12705 {
12706         return (void *) (p == NULL);
12707 }
12708
12709 int main() {
12710
12711         /* pthread test function */
12712 #ifndef PTHREAD_CREATE_DETACHED
12713 #define PTHREAD_CREATE_DETACHED 1
12714 #endif
12715         pthread_t t;
12716         int status;
12717         int detach = PTHREAD_CREATE_DETACHED;
12718
12719 #if HAVE_PTHREADS > 4
12720         /* Final pthreads */
12721         pthread_attr_t attr;
12722
12723         status = pthread_attr_init(&attr);
12724         if( status ) return status;
12725
12726 #if HAVE_PTHREADS < 7
12727         status = pthread_attr_setdetachstate(&attr, &detach);
12728         if( status < 0 ) status = errno;
12729 #else
12730         status = pthread_attr_setdetachstate(&attr, detach);
12731 #endif
12732         if( status ) return status;
12733         status = pthread_create( &t, &attr, task, NULL );
12734 #if HAVE_PTHREADS < 7
12735         if( status < 0 ) status = errno;
12736 #endif
12737         if( status ) return status;
12738 #else
12739         /* Draft 4 pthreads */
12740         status = pthread_create( &t, pthread_attr_default, task, NULL );
12741         if( status ) return errno;
12742
12743         /* give thread a chance to complete */
12744         /* it should remain joinable and hence detachable */
12745         sleep( 1 );
12746
12747         status = pthread_detach( &t );
12748         if( status ) return errno;
12749 #endif
12750
12751 #ifdef HAVE_LINUX_THREADS
12752         pthread_kill_other_threads_np();
12753 #endif
12754
12755         return 0;
12756
12757 ; return 0; }
12758 EOF
12759 if { (eval echo configure:12760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12760   rm -rf conftest*
12761   ol_cv_pthread_thread=yes
12762 else
12763   echo "configure: failed program was:" >&5
12764   cat conftest.$ac_ext >&5
12765   rm -rf conftest*
12766   ol_cv_pthread_thread=no
12767 fi
12768 rm -f conftest*
12769 else
12770   cat > conftest.$ac_ext <<EOF
12771 #line 12772 "configure"
12772 #include "confdefs.h"
12773 /* pthread test headers */
12774 #include <pthread.h>
12775 #if HAVE_PTHREADS < 7
12776 #include <errno.h>
12777 #endif
12778 #ifndef NULL
12779 #define NULL (void*)0
12780 #endif
12781
12782 static void *task(p)
12783         void *p;
12784 {
12785         return (void *) (p == NULL);
12786 }
12787
12788
12789 int main(argc, argv)
12790         int argc;
12791         char **argv;
12792 {
12793
12794         /* pthread test function */
12795 #ifndef PTHREAD_CREATE_DETACHED
12796 #define PTHREAD_CREATE_DETACHED 1
12797 #endif
12798         pthread_t t;
12799         int status;
12800         int detach = PTHREAD_CREATE_DETACHED;
12801
12802 #if HAVE_PTHREADS > 4
12803         /* Final pthreads */
12804         pthread_attr_t attr;
12805
12806         status = pthread_attr_init(&attr);
12807         if( status ) return status;
12808
12809 #if HAVE_PTHREADS < 7
12810         status = pthread_attr_setdetachstate(&attr, &detach);
12811         if( status < 0 ) status = errno;
12812 #else
12813         status = pthread_attr_setdetachstate(&attr, detach);
12814 #endif
12815         if( status ) return status;
12816         status = pthread_create( &t, &attr, task, NULL );
12817 #if HAVE_PTHREADS < 7
12818         if( status < 0 ) status = errno;
12819 #endif
12820         if( status ) return status;
12821 #else
12822         /* Draft 4 pthreads */
12823         status = pthread_create( &t, pthread_attr_default, task, NULL );
12824         if( status ) return errno;
12825
12826         /* give thread a chance to complete */
12827         /* it should remain joinable and hence detachable */
12828         sleep( 1 );
12829
12830         status = pthread_detach( &t );
12831         if( status ) return errno;
12832 #endif
12833
12834 #ifdef HAVE_LINUX_THREADS
12835         pthread_kill_other_threads_np();
12836 #endif
12837
12838         return 0;
12839
12840 }
12841
12842 EOF
12843 if { (eval echo configure:12844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12844 then
12845   ol_cv_pthread_thread=yes
12846 else
12847   echo "configure: failed program was:" >&5
12848   cat conftest.$ac_ext >&5
12849   rm -fr conftest*
12850   ol_cv_pthread_thread=no
12851 fi
12852 rm -fr conftest*
12853 fi
12854
12855
12856                 # restore the LIBS
12857                 LIBS="$ol_LIBS"
12858         
12859 fi
12860
12861 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12862
12863         if test $ol_cv_pthread_thread = yes ; then
12864                 ol_link_pthreads="-thread"
12865                 ol_link_threads=posix
12866         fi
12867 fi
12868
12869
12870                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12871 if test "$ol_link_threads" = no ; then
12872         # try -lpthread -lmach -lexc -lc_r
12873         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12874 echo "configure:12875: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12875 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12876   echo $ac_n "(cached) $ac_c" 1>&6
12877 else
12878   
12879                 # save the flags
12880                 ol_LIBS="$LIBS"
12881                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12882
12883                 if test "$cross_compiling" = yes; then
12884   cat > conftest.$ac_ext <<EOF
12885 #line 12886 "configure"
12886 #include "confdefs.h"
12887 /* pthread test headers */
12888 #include <pthread.h>
12889 #if HAVE_PTHREADS < 7
12890 #include <errno.h>
12891 #endif
12892 #ifndef NULL
12893 #define NULL (void*)0
12894 #endif
12895
12896 static void *task(p)
12897         void *p;
12898 {
12899         return (void *) (p == NULL);
12900 }
12901
12902 int main() {
12903
12904         /* pthread test function */
12905 #ifndef PTHREAD_CREATE_DETACHED
12906 #define PTHREAD_CREATE_DETACHED 1
12907 #endif
12908         pthread_t t;
12909         int status;
12910         int detach = PTHREAD_CREATE_DETACHED;
12911
12912 #if HAVE_PTHREADS > 4
12913         /* Final pthreads */
12914         pthread_attr_t attr;
12915
12916         status = pthread_attr_init(&attr);
12917         if( status ) return status;
12918
12919 #if HAVE_PTHREADS < 7
12920         status = pthread_attr_setdetachstate(&attr, &detach);
12921         if( status < 0 ) status = errno;
12922 #else
12923         status = pthread_attr_setdetachstate(&attr, detach);
12924 #endif
12925         if( status ) return status;
12926         status = pthread_create( &t, &attr, task, NULL );
12927 #if HAVE_PTHREADS < 7
12928         if( status < 0 ) status = errno;
12929 #endif
12930         if( status ) return status;
12931 #else
12932         /* Draft 4 pthreads */
12933         status = pthread_create( &t, pthread_attr_default, task, NULL );
12934         if( status ) return errno;
12935
12936         /* give thread a chance to complete */
12937         /* it should remain joinable and hence detachable */
12938         sleep( 1 );
12939
12940         status = pthread_detach( &t );
12941         if( status ) return errno;
12942 #endif
12943
12944 #ifdef HAVE_LINUX_THREADS
12945         pthread_kill_other_threads_np();
12946 #endif
12947
12948         return 0;
12949
12950 ; return 0; }
12951 EOF
12952 if { (eval echo configure:12953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12953   rm -rf conftest*
12954   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12955 else
12956   echo "configure: failed program was:" >&5
12957   cat conftest.$ac_ext >&5
12958   rm -rf conftest*
12959   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12960 fi
12961 rm -f conftest*
12962 else
12963   cat > conftest.$ac_ext <<EOF
12964 #line 12965 "configure"
12965 #include "confdefs.h"
12966 /* pthread test headers */
12967 #include <pthread.h>
12968 #if HAVE_PTHREADS < 7
12969 #include <errno.h>
12970 #endif
12971 #ifndef NULL
12972 #define NULL (void*)0
12973 #endif
12974
12975 static void *task(p)
12976         void *p;
12977 {
12978         return (void *) (p == NULL);
12979 }
12980
12981
12982 int main(argc, argv)
12983         int argc;
12984         char **argv;
12985 {
12986
12987         /* pthread test function */
12988 #ifndef PTHREAD_CREATE_DETACHED
12989 #define PTHREAD_CREATE_DETACHED 1
12990 #endif
12991         pthread_t t;
12992         int status;
12993         int detach = PTHREAD_CREATE_DETACHED;
12994
12995 #if HAVE_PTHREADS > 4
12996         /* Final pthreads */
12997         pthread_attr_t attr;
12998
12999         status = pthread_attr_init(&attr);
13000         if( status ) return status;
13001
13002 #if HAVE_PTHREADS < 7
13003         status = pthread_attr_setdetachstate(&attr, &detach);
13004         if( status < 0 ) status = errno;
13005 #else
13006         status = pthread_attr_setdetachstate(&attr, detach);
13007 #endif
13008         if( status ) return status;
13009         status = pthread_create( &t, &attr, task, NULL );
13010 #if HAVE_PTHREADS < 7
13011         if( status < 0 ) status = errno;
13012 #endif
13013         if( status ) return status;
13014 #else
13015         /* Draft 4 pthreads */
13016         status = pthread_create( &t, pthread_attr_default, task, NULL );
13017         if( status ) return errno;
13018
13019         /* give thread a chance to complete */
13020         /* it should remain joinable and hence detachable */
13021         sleep( 1 );
13022
13023         status = pthread_detach( &t );
13024         if( status ) return errno;
13025 #endif
13026
13027 #ifdef HAVE_LINUX_THREADS
13028         pthread_kill_other_threads_np();
13029 #endif
13030
13031         return 0;
13032
13033 }
13034
13035 EOF
13036 if { (eval echo configure:13037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13037 then
13038   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13039 else
13040   echo "configure: failed program was:" >&5
13041   cat conftest.$ac_ext >&5
13042   rm -fr conftest*
13043   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13044 fi
13045 rm -fr conftest*
13046 fi
13047
13048
13049                 # restore the LIBS
13050                 LIBS="$ol_LIBS"
13051         
13052 fi
13053
13054 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13055
13056         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13057                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13058                 ol_link_threads=posix
13059         fi
13060 fi
13061
13062                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13063 if test "$ol_link_threads" = no ; then
13064         # try -lpthread -lmach -lexc
13065         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13066 echo "configure:13067: checking for pthread link with -lpthread -lmach -lexc" >&5
13067 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13068   echo $ac_n "(cached) $ac_c" 1>&6
13069 else
13070   
13071                 # save the flags
13072                 ol_LIBS="$LIBS"
13073                 LIBS="-lpthread -lmach -lexc $LIBS"
13074
13075                 if test "$cross_compiling" = yes; then
13076   cat > conftest.$ac_ext <<EOF
13077 #line 13078 "configure"
13078 #include "confdefs.h"
13079 /* pthread test headers */
13080 #include <pthread.h>
13081 #if HAVE_PTHREADS < 7
13082 #include <errno.h>
13083 #endif
13084 #ifndef NULL
13085 #define NULL (void*)0
13086 #endif
13087
13088 static void *task(p)
13089         void *p;
13090 {
13091         return (void *) (p == NULL);
13092 }
13093
13094 int main() {
13095
13096         /* pthread test function */
13097 #ifndef PTHREAD_CREATE_DETACHED
13098 #define PTHREAD_CREATE_DETACHED 1
13099 #endif
13100         pthread_t t;
13101         int status;
13102         int detach = PTHREAD_CREATE_DETACHED;
13103
13104 #if HAVE_PTHREADS > 4
13105         /* Final pthreads */
13106         pthread_attr_t attr;
13107
13108         status = pthread_attr_init(&attr);
13109         if( status ) return status;
13110
13111 #if HAVE_PTHREADS < 7
13112         status = pthread_attr_setdetachstate(&attr, &detach);
13113         if( status < 0 ) status = errno;
13114 #else
13115         status = pthread_attr_setdetachstate(&attr, detach);
13116 #endif
13117         if( status ) return status;
13118         status = pthread_create( &t, &attr, task, NULL );
13119 #if HAVE_PTHREADS < 7
13120         if( status < 0 ) status = errno;
13121 #endif
13122         if( status ) return status;
13123 #else
13124         /* Draft 4 pthreads */
13125         status = pthread_create( &t, pthread_attr_default, task, NULL );
13126         if( status ) return errno;
13127
13128         /* give thread a chance to complete */
13129         /* it should remain joinable and hence detachable */
13130         sleep( 1 );
13131
13132         status = pthread_detach( &t );
13133         if( status ) return errno;
13134 #endif
13135
13136 #ifdef HAVE_LINUX_THREADS
13137         pthread_kill_other_threads_np();
13138 #endif
13139
13140         return 0;
13141
13142 ; return 0; }
13143 EOF
13144 if { (eval echo configure:13145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13145   rm -rf conftest*
13146   ol_cv_pthread_lpthread_lmach_lexc=yes
13147 else
13148   echo "configure: failed program was:" >&5
13149   cat conftest.$ac_ext >&5
13150   rm -rf conftest*
13151   ol_cv_pthread_lpthread_lmach_lexc=no
13152 fi
13153 rm -f conftest*
13154 else
13155   cat > conftest.$ac_ext <<EOF
13156 #line 13157 "configure"
13157 #include "confdefs.h"
13158 /* pthread test headers */
13159 #include <pthread.h>
13160 #if HAVE_PTHREADS < 7
13161 #include <errno.h>
13162 #endif
13163 #ifndef NULL
13164 #define NULL (void*)0
13165 #endif
13166
13167 static void *task(p)
13168         void *p;
13169 {
13170         return (void *) (p == NULL);
13171 }
13172
13173
13174 int main(argc, argv)
13175         int argc;
13176         char **argv;
13177 {
13178
13179         /* pthread test function */
13180 #ifndef PTHREAD_CREATE_DETACHED
13181 #define PTHREAD_CREATE_DETACHED 1
13182 #endif
13183         pthread_t t;
13184         int status;
13185         int detach = PTHREAD_CREATE_DETACHED;
13186
13187 #if HAVE_PTHREADS > 4
13188         /* Final pthreads */
13189         pthread_attr_t attr;
13190
13191         status = pthread_attr_init(&attr);
13192         if( status ) return status;
13193
13194 #if HAVE_PTHREADS < 7
13195         status = pthread_attr_setdetachstate(&attr, &detach);
13196         if( status < 0 ) status = errno;
13197 #else
13198         status = pthread_attr_setdetachstate(&attr, detach);
13199 #endif
13200         if( status ) return status;
13201         status = pthread_create( &t, &attr, task, NULL );
13202 #if HAVE_PTHREADS < 7
13203         if( status < 0 ) status = errno;
13204 #endif
13205         if( status ) return status;
13206 #else
13207         /* Draft 4 pthreads */
13208         status = pthread_create( &t, pthread_attr_default, task, NULL );
13209         if( status ) return errno;
13210
13211         /* give thread a chance to complete */
13212         /* it should remain joinable and hence detachable */
13213         sleep( 1 );
13214
13215         status = pthread_detach( &t );
13216         if( status ) return errno;
13217 #endif
13218
13219 #ifdef HAVE_LINUX_THREADS
13220         pthread_kill_other_threads_np();
13221 #endif
13222
13223         return 0;
13224
13225 }
13226
13227 EOF
13228 if { (eval echo configure:13229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13229 then
13230   ol_cv_pthread_lpthread_lmach_lexc=yes
13231 else
13232   echo "configure: failed program was:" >&5
13233   cat conftest.$ac_ext >&5
13234   rm -fr conftest*
13235   ol_cv_pthread_lpthread_lmach_lexc=no
13236 fi
13237 rm -fr conftest*
13238 fi
13239
13240
13241                 # restore the LIBS
13242                 LIBS="$ol_LIBS"
13243         
13244 fi
13245
13246 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13247
13248         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13249                 ol_link_pthreads="-lpthread -lmach -lexc"
13250                 ol_link_threads=posix
13251         fi
13252 fi
13253
13254
13255                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13256 if test "$ol_link_threads" = no ; then
13257         # try -lpthread -Wl,-woff,85
13258         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13259 echo "configure:13260: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13260 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13261   echo $ac_n "(cached) $ac_c" 1>&6
13262 else
13263   
13264                 # save the flags
13265                 ol_LIBS="$LIBS"
13266                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13267
13268                 if test "$cross_compiling" = yes; then
13269   cat > conftest.$ac_ext <<EOF
13270 #line 13271 "configure"
13271 #include "confdefs.h"
13272 /* pthread test headers */
13273 #include <pthread.h>
13274 #if HAVE_PTHREADS < 7
13275 #include <errno.h>
13276 #endif
13277 #ifndef NULL
13278 #define NULL (void*)0
13279 #endif
13280
13281 static void *task(p)
13282         void *p;
13283 {
13284         return (void *) (p == NULL);
13285 }
13286
13287 int main() {
13288
13289         /* pthread test function */
13290 #ifndef PTHREAD_CREATE_DETACHED
13291 #define PTHREAD_CREATE_DETACHED 1
13292 #endif
13293         pthread_t t;
13294         int status;
13295         int detach = PTHREAD_CREATE_DETACHED;
13296
13297 #if HAVE_PTHREADS > 4
13298         /* Final pthreads */
13299         pthread_attr_t attr;
13300
13301         status = pthread_attr_init(&attr);
13302         if( status ) return status;
13303
13304 #if HAVE_PTHREADS < 7
13305         status = pthread_attr_setdetachstate(&attr, &detach);
13306         if( status < 0 ) status = errno;
13307 #else
13308         status = pthread_attr_setdetachstate(&attr, detach);
13309 #endif
13310         if( status ) return status;
13311         status = pthread_create( &t, &attr, task, NULL );
13312 #if HAVE_PTHREADS < 7
13313         if( status < 0 ) status = errno;
13314 #endif
13315         if( status ) return status;
13316 #else
13317         /* Draft 4 pthreads */
13318         status = pthread_create( &t, pthread_attr_default, task, NULL );
13319         if( status ) return errno;
13320
13321         /* give thread a chance to complete */
13322         /* it should remain joinable and hence detachable */
13323         sleep( 1 );
13324
13325         status = pthread_detach( &t );
13326         if( status ) return errno;
13327 #endif
13328
13329 #ifdef HAVE_LINUX_THREADS
13330         pthread_kill_other_threads_np();
13331 #endif
13332
13333         return 0;
13334
13335 ; return 0; }
13336 EOF
13337 if { (eval echo configure:13338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13338   rm -rf conftest*
13339   ol_cv_pthread_lib_lpthread_woff=yes
13340 else
13341   echo "configure: failed program was:" >&5
13342   cat conftest.$ac_ext >&5
13343   rm -rf conftest*
13344   ol_cv_pthread_lib_lpthread_woff=no
13345 fi
13346 rm -f conftest*
13347 else
13348   cat > conftest.$ac_ext <<EOF
13349 #line 13350 "configure"
13350 #include "confdefs.h"
13351 /* pthread test headers */
13352 #include <pthread.h>
13353 #if HAVE_PTHREADS < 7
13354 #include <errno.h>
13355 #endif
13356 #ifndef NULL
13357 #define NULL (void*)0
13358 #endif
13359
13360 static void *task(p)
13361         void *p;
13362 {
13363         return (void *) (p == NULL);
13364 }
13365
13366
13367 int main(argc, argv)
13368         int argc;
13369         char **argv;
13370 {
13371
13372         /* pthread test function */
13373 #ifndef PTHREAD_CREATE_DETACHED
13374 #define PTHREAD_CREATE_DETACHED 1
13375 #endif
13376         pthread_t t;
13377         int status;
13378         int detach = PTHREAD_CREATE_DETACHED;
13379
13380 #if HAVE_PTHREADS > 4
13381         /* Final pthreads */
13382         pthread_attr_t attr;
13383
13384         status = pthread_attr_init(&attr);
13385         if( status ) return status;
13386
13387 #if HAVE_PTHREADS < 7
13388         status = pthread_attr_setdetachstate(&attr, &detach);
13389         if( status < 0 ) status = errno;
13390 #else
13391         status = pthread_attr_setdetachstate(&attr, detach);
13392 #endif
13393         if( status ) return status;
13394         status = pthread_create( &t, &attr, task, NULL );
13395 #if HAVE_PTHREADS < 7
13396         if( status < 0 ) status = errno;
13397 #endif
13398         if( status ) return status;
13399 #else
13400         /* Draft 4 pthreads */
13401         status = pthread_create( &t, pthread_attr_default, task, NULL );
13402         if( status ) return errno;
13403
13404         /* give thread a chance to complete */
13405         /* it should remain joinable and hence detachable */
13406         sleep( 1 );
13407
13408         status = pthread_detach( &t );
13409         if( status ) return errno;
13410 #endif
13411
13412 #ifdef HAVE_LINUX_THREADS
13413         pthread_kill_other_threads_np();
13414 #endif
13415
13416         return 0;
13417
13418 }
13419
13420 EOF
13421 if { (eval echo configure:13422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13422 then
13423   ol_cv_pthread_lib_lpthread_woff=yes
13424 else
13425   echo "configure: failed program was:" >&5
13426   cat conftest.$ac_ext >&5
13427   rm -fr conftest*
13428   ol_cv_pthread_lib_lpthread_woff=no
13429 fi
13430 rm -fr conftest*
13431 fi
13432
13433
13434                 # restore the LIBS
13435                 LIBS="$ol_LIBS"
13436         
13437 fi
13438
13439 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13440
13441         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13442                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13443                 ol_link_threads=posix
13444         fi
13445 fi
13446
13447
13448                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13449 if test "$ol_link_threads" = no ; then
13450         # try -lpthread
13451         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13452 echo "configure:13453: checking for pthread link with -lpthread" >&5
13453 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13454   echo $ac_n "(cached) $ac_c" 1>&6
13455 else
13456   
13457                 # save the flags
13458                 ol_LIBS="$LIBS"
13459                 LIBS="-lpthread $LIBS"
13460
13461                 if test "$cross_compiling" = yes; then
13462   cat > conftest.$ac_ext <<EOF
13463 #line 13464 "configure"
13464 #include "confdefs.h"
13465 /* pthread test headers */
13466 #include <pthread.h>
13467 #if HAVE_PTHREADS < 7
13468 #include <errno.h>
13469 #endif
13470 #ifndef NULL
13471 #define NULL (void*)0
13472 #endif
13473
13474 static void *task(p)
13475         void *p;
13476 {
13477         return (void *) (p == NULL);
13478 }
13479
13480 int main() {
13481
13482         /* pthread test function */
13483 #ifndef PTHREAD_CREATE_DETACHED
13484 #define PTHREAD_CREATE_DETACHED 1
13485 #endif
13486         pthread_t t;
13487         int status;
13488         int detach = PTHREAD_CREATE_DETACHED;
13489
13490 #if HAVE_PTHREADS > 4
13491         /* Final pthreads */
13492         pthread_attr_t attr;
13493
13494         status = pthread_attr_init(&attr);
13495         if( status ) return status;
13496
13497 #if HAVE_PTHREADS < 7
13498         status = pthread_attr_setdetachstate(&attr, &detach);
13499         if( status < 0 ) status = errno;
13500 #else
13501         status = pthread_attr_setdetachstate(&attr, detach);
13502 #endif
13503         if( status ) return status;
13504         status = pthread_create( &t, &attr, task, NULL );
13505 #if HAVE_PTHREADS < 7
13506         if( status < 0 ) status = errno;
13507 #endif
13508         if( status ) return status;
13509 #else
13510         /* Draft 4 pthreads */
13511         status = pthread_create( &t, pthread_attr_default, task, NULL );
13512         if( status ) return errno;
13513
13514         /* give thread a chance to complete */
13515         /* it should remain joinable and hence detachable */
13516         sleep( 1 );
13517
13518         status = pthread_detach( &t );
13519         if( status ) return errno;
13520 #endif
13521
13522 #ifdef HAVE_LINUX_THREADS
13523         pthread_kill_other_threads_np();
13524 #endif
13525
13526         return 0;
13527
13528 ; return 0; }
13529 EOF
13530 if { (eval echo configure:13531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13531   rm -rf conftest*
13532   ol_cv_pthread_lpthread=yes
13533 else
13534   echo "configure: failed program was:" >&5
13535   cat conftest.$ac_ext >&5
13536   rm -rf conftest*
13537   ol_cv_pthread_lpthread=no
13538 fi
13539 rm -f conftest*
13540 else
13541   cat > conftest.$ac_ext <<EOF
13542 #line 13543 "configure"
13543 #include "confdefs.h"
13544 /* pthread test headers */
13545 #include <pthread.h>
13546 #if HAVE_PTHREADS < 7
13547 #include <errno.h>
13548 #endif
13549 #ifndef NULL
13550 #define NULL (void*)0
13551 #endif
13552
13553 static void *task(p)
13554         void *p;
13555 {
13556         return (void *) (p == NULL);
13557 }
13558
13559
13560 int main(argc, argv)
13561         int argc;
13562         char **argv;
13563 {
13564
13565         /* pthread test function */
13566 #ifndef PTHREAD_CREATE_DETACHED
13567 #define PTHREAD_CREATE_DETACHED 1
13568 #endif
13569         pthread_t t;
13570         int status;
13571         int detach = PTHREAD_CREATE_DETACHED;
13572
13573 #if HAVE_PTHREADS > 4
13574         /* Final pthreads */
13575         pthread_attr_t attr;
13576
13577         status = pthread_attr_init(&attr);
13578         if( status ) return status;
13579
13580 #if HAVE_PTHREADS < 7
13581         status = pthread_attr_setdetachstate(&attr, &detach);
13582         if( status < 0 ) status = errno;
13583 #else
13584         status = pthread_attr_setdetachstate(&attr, detach);
13585 #endif
13586         if( status ) return status;
13587         status = pthread_create( &t, &attr, task, NULL );
13588 #if HAVE_PTHREADS < 7
13589         if( status < 0 ) status = errno;
13590 #endif
13591         if( status ) return status;
13592 #else
13593         /* Draft 4 pthreads */
13594         status = pthread_create( &t, pthread_attr_default, task, NULL );
13595         if( status ) return errno;
13596
13597         /* give thread a chance to complete */
13598         /* it should remain joinable and hence detachable */
13599         sleep( 1 );
13600
13601         status = pthread_detach( &t );
13602         if( status ) return errno;
13603 #endif
13604
13605 #ifdef HAVE_LINUX_THREADS
13606         pthread_kill_other_threads_np();
13607 #endif
13608
13609         return 0;
13610
13611 }
13612
13613 EOF
13614 if { (eval echo configure:13615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13615 then
13616   ol_cv_pthread_lpthread=yes
13617 else
13618   echo "configure: failed program was:" >&5
13619   cat conftest.$ac_ext >&5
13620   rm -fr conftest*
13621   ol_cv_pthread_lpthread=no
13622 fi
13623 rm -fr conftest*
13624 fi
13625
13626
13627                 # restore the LIBS
13628                 LIBS="$ol_LIBS"
13629         
13630 fi
13631
13632 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13633
13634         if test $ol_cv_pthread_lpthread = yes ; then
13635                 ol_link_pthreads="-lpthread"
13636                 ol_link_threads=posix
13637         fi
13638 fi
13639
13640                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13641 if test "$ol_link_threads" = no ; then
13642         # try -lc_r
13643         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13644 echo "configure:13645: checking for pthread link with -lc_r" >&5
13645 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13646   echo $ac_n "(cached) $ac_c" 1>&6
13647 else
13648   
13649                 # save the flags
13650                 ol_LIBS="$LIBS"
13651                 LIBS="-lc_r $LIBS"
13652
13653                 if test "$cross_compiling" = yes; then
13654   cat > conftest.$ac_ext <<EOF
13655 #line 13656 "configure"
13656 #include "confdefs.h"
13657 /* pthread test headers */
13658 #include <pthread.h>
13659 #if HAVE_PTHREADS < 7
13660 #include <errno.h>
13661 #endif
13662 #ifndef NULL
13663 #define NULL (void*)0
13664 #endif
13665
13666 static void *task(p)
13667         void *p;
13668 {
13669         return (void *) (p == NULL);
13670 }
13671
13672 int main() {
13673
13674         /* pthread test function */
13675 #ifndef PTHREAD_CREATE_DETACHED
13676 #define PTHREAD_CREATE_DETACHED 1
13677 #endif
13678         pthread_t t;
13679         int status;
13680         int detach = PTHREAD_CREATE_DETACHED;
13681
13682 #if HAVE_PTHREADS > 4
13683         /* Final pthreads */
13684         pthread_attr_t attr;
13685
13686         status = pthread_attr_init(&attr);
13687         if( status ) return status;
13688
13689 #if HAVE_PTHREADS < 7
13690         status = pthread_attr_setdetachstate(&attr, &detach);
13691         if( status < 0 ) status = errno;
13692 #else
13693         status = pthread_attr_setdetachstate(&attr, detach);
13694 #endif
13695         if( status ) return status;
13696         status = pthread_create( &t, &attr, task, NULL );
13697 #if HAVE_PTHREADS < 7
13698         if( status < 0 ) status = errno;
13699 #endif
13700         if( status ) return status;
13701 #else
13702         /* Draft 4 pthreads */
13703         status = pthread_create( &t, pthread_attr_default, task, NULL );
13704         if( status ) return errno;
13705
13706         /* give thread a chance to complete */
13707         /* it should remain joinable and hence detachable */
13708         sleep( 1 );
13709
13710         status = pthread_detach( &t );
13711         if( status ) return errno;
13712 #endif
13713
13714 #ifdef HAVE_LINUX_THREADS
13715         pthread_kill_other_threads_np();
13716 #endif
13717
13718         return 0;
13719
13720 ; return 0; }
13721 EOF
13722 if { (eval echo configure:13723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13723   rm -rf conftest*
13724   ol_cv_pthread_lc_r=yes
13725 else
13726   echo "configure: failed program was:" >&5
13727   cat conftest.$ac_ext >&5
13728   rm -rf conftest*
13729   ol_cv_pthread_lc_r=no
13730 fi
13731 rm -f conftest*
13732 else
13733   cat > conftest.$ac_ext <<EOF
13734 #line 13735 "configure"
13735 #include "confdefs.h"
13736 /* pthread test headers */
13737 #include <pthread.h>
13738 #if HAVE_PTHREADS < 7
13739 #include <errno.h>
13740 #endif
13741 #ifndef NULL
13742 #define NULL (void*)0
13743 #endif
13744
13745 static void *task(p)
13746         void *p;
13747 {
13748         return (void *) (p == NULL);
13749 }
13750
13751
13752 int main(argc, argv)
13753         int argc;
13754         char **argv;
13755 {
13756
13757         /* pthread test function */
13758 #ifndef PTHREAD_CREATE_DETACHED
13759 #define PTHREAD_CREATE_DETACHED 1
13760 #endif
13761         pthread_t t;
13762         int status;
13763         int detach = PTHREAD_CREATE_DETACHED;
13764
13765 #if HAVE_PTHREADS > 4
13766         /* Final pthreads */
13767         pthread_attr_t attr;
13768
13769         status = pthread_attr_init(&attr);
13770         if( status ) return status;
13771
13772 #if HAVE_PTHREADS < 7
13773         status = pthread_attr_setdetachstate(&attr, &detach);
13774         if( status < 0 ) status = errno;
13775 #else
13776         status = pthread_attr_setdetachstate(&attr, detach);
13777 #endif
13778         if( status ) return status;
13779         status = pthread_create( &t, &attr, task, NULL );
13780 #if HAVE_PTHREADS < 7
13781         if( status < 0 ) status = errno;
13782 #endif
13783         if( status ) return status;
13784 #else
13785         /* Draft 4 pthreads */
13786         status = pthread_create( &t, pthread_attr_default, task, NULL );
13787         if( status ) return errno;
13788
13789         /* give thread a chance to complete */
13790         /* it should remain joinable and hence detachable */
13791         sleep( 1 );
13792
13793         status = pthread_detach( &t );
13794         if( status ) return errno;
13795 #endif
13796
13797 #ifdef HAVE_LINUX_THREADS
13798         pthread_kill_other_threads_np();
13799 #endif
13800
13801         return 0;
13802
13803 }
13804
13805 EOF
13806 if { (eval echo configure:13807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13807 then
13808   ol_cv_pthread_lc_r=yes
13809 else
13810   echo "configure: failed program was:" >&5
13811   cat conftest.$ac_ext >&5
13812   rm -fr conftest*
13813   ol_cv_pthread_lc_r=no
13814 fi
13815 rm -fr conftest*
13816 fi
13817
13818
13819                 # restore the LIBS
13820                 LIBS="$ol_LIBS"
13821         
13822 fi
13823
13824 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13825
13826         if test $ol_cv_pthread_lc_r = yes ; then
13827                 ol_link_pthreads="-lc_r"
13828                 ol_link_threads=posix
13829         fi
13830 fi
13831
13832
13833                 # Pthread try link: -threads (ol_cv_pthread_threads)
13834 if test "$ol_link_threads" = no ; then
13835         # try -threads
13836         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13837 echo "configure:13838: checking for pthread link with -threads" >&5
13838 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13839   echo $ac_n "(cached) $ac_c" 1>&6
13840 else
13841   
13842                 # save the flags
13843                 ol_LIBS="$LIBS"
13844                 LIBS="-threads $LIBS"
13845
13846                 if test "$cross_compiling" = yes; then
13847   cat > conftest.$ac_ext <<EOF
13848 #line 13849 "configure"
13849 #include "confdefs.h"
13850 /* pthread test headers */
13851 #include <pthread.h>
13852 #if HAVE_PTHREADS < 7
13853 #include <errno.h>
13854 #endif
13855 #ifndef NULL
13856 #define NULL (void*)0
13857 #endif
13858
13859 static void *task(p)
13860         void *p;
13861 {
13862         return (void *) (p == NULL);
13863 }
13864
13865 int main() {
13866
13867         /* pthread test function */
13868 #ifndef PTHREAD_CREATE_DETACHED
13869 #define PTHREAD_CREATE_DETACHED 1
13870 #endif
13871         pthread_t t;
13872         int status;
13873         int detach = PTHREAD_CREATE_DETACHED;
13874
13875 #if HAVE_PTHREADS > 4
13876         /* Final pthreads */
13877         pthread_attr_t attr;
13878
13879         status = pthread_attr_init(&attr);
13880         if( status ) return status;
13881
13882 #if HAVE_PTHREADS < 7
13883         status = pthread_attr_setdetachstate(&attr, &detach);
13884         if( status < 0 ) status = errno;
13885 #else
13886         status = pthread_attr_setdetachstate(&attr, detach);
13887 #endif
13888         if( status ) return status;
13889         status = pthread_create( &t, &attr, task, NULL );
13890 #if HAVE_PTHREADS < 7
13891         if( status < 0 ) status = errno;
13892 #endif
13893         if( status ) return status;
13894 #else
13895         /* Draft 4 pthreads */
13896         status = pthread_create( &t, pthread_attr_default, task, NULL );
13897         if( status ) return errno;
13898
13899         /* give thread a chance to complete */
13900         /* it should remain joinable and hence detachable */
13901         sleep( 1 );
13902
13903         status = pthread_detach( &t );
13904         if( status ) return errno;
13905 #endif
13906
13907 #ifdef HAVE_LINUX_THREADS
13908         pthread_kill_other_threads_np();
13909 #endif
13910
13911         return 0;
13912
13913 ; return 0; }
13914 EOF
13915 if { (eval echo configure:13916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13916   rm -rf conftest*
13917   ol_cv_pthread_threads=yes
13918 else
13919   echo "configure: failed program was:" >&5
13920   cat conftest.$ac_ext >&5
13921   rm -rf conftest*
13922   ol_cv_pthread_threads=no
13923 fi
13924 rm -f conftest*
13925 else
13926   cat > conftest.$ac_ext <<EOF
13927 #line 13928 "configure"
13928 #include "confdefs.h"
13929 /* pthread test headers */
13930 #include <pthread.h>
13931 #if HAVE_PTHREADS < 7
13932 #include <errno.h>
13933 #endif
13934 #ifndef NULL
13935 #define NULL (void*)0
13936 #endif
13937
13938 static void *task(p)
13939         void *p;
13940 {
13941         return (void *) (p == NULL);
13942 }
13943
13944
13945 int main(argc, argv)
13946         int argc;
13947         char **argv;
13948 {
13949
13950         /* pthread test function */
13951 #ifndef PTHREAD_CREATE_DETACHED
13952 #define PTHREAD_CREATE_DETACHED 1
13953 #endif
13954         pthread_t t;
13955         int status;
13956         int detach = PTHREAD_CREATE_DETACHED;
13957
13958 #if HAVE_PTHREADS > 4
13959         /* Final pthreads */
13960         pthread_attr_t attr;
13961
13962         status = pthread_attr_init(&attr);
13963         if( status ) return status;
13964
13965 #if HAVE_PTHREADS < 7
13966         status = pthread_attr_setdetachstate(&attr, &detach);
13967         if( status < 0 ) status = errno;
13968 #else
13969         status = pthread_attr_setdetachstate(&attr, detach);
13970 #endif
13971         if( status ) return status;
13972         status = pthread_create( &t, &attr, task, NULL );
13973 #if HAVE_PTHREADS < 7
13974         if( status < 0 ) status = errno;
13975 #endif
13976         if( status ) return status;
13977 #else
13978         /* Draft 4 pthreads */
13979         status = pthread_create( &t, pthread_attr_default, task, NULL );
13980         if( status ) return errno;
13981
13982         /* give thread a chance to complete */
13983         /* it should remain joinable and hence detachable */
13984         sleep( 1 );
13985
13986         status = pthread_detach( &t );
13987         if( status ) return errno;
13988 #endif
13989
13990 #ifdef HAVE_LINUX_THREADS
13991         pthread_kill_other_threads_np();
13992 #endif
13993
13994         return 0;
13995
13996 }
13997
13998 EOF
13999 if { (eval echo configure:14000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14000 then
14001   ol_cv_pthread_threads=yes
14002 else
14003   echo "configure: failed program was:" >&5
14004   cat conftest.$ac_ext >&5
14005   rm -fr conftest*
14006   ol_cv_pthread_threads=no
14007 fi
14008 rm -fr conftest*
14009 fi
14010
14011
14012                 # restore the LIBS
14013                 LIBS="$ol_LIBS"
14014         
14015 fi
14016
14017 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14018
14019         if test $ol_cv_pthread_threads = yes ; then
14020                 ol_link_pthreads="-threads"
14021                 ol_link_threads=posix
14022         fi
14023 fi
14024
14025
14026                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14027 if test "$ol_link_threads" = no ; then
14028         # try -lpthreads -lmach -lexc -lc_r
14029         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14030 echo "configure:14031: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14031 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14032   echo $ac_n "(cached) $ac_c" 1>&6
14033 else
14034   
14035                 # save the flags
14036                 ol_LIBS="$LIBS"
14037                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14038
14039                 if test "$cross_compiling" = yes; then
14040   cat > conftest.$ac_ext <<EOF
14041 #line 14042 "configure"
14042 #include "confdefs.h"
14043 /* pthread test headers */
14044 #include <pthread.h>
14045 #if HAVE_PTHREADS < 7
14046 #include <errno.h>
14047 #endif
14048 #ifndef NULL
14049 #define NULL (void*)0
14050 #endif
14051
14052 static void *task(p)
14053         void *p;
14054 {
14055         return (void *) (p == NULL);
14056 }
14057
14058 int main() {
14059
14060         /* pthread test function */
14061 #ifndef PTHREAD_CREATE_DETACHED
14062 #define PTHREAD_CREATE_DETACHED 1
14063 #endif
14064         pthread_t t;
14065         int status;
14066         int detach = PTHREAD_CREATE_DETACHED;
14067
14068 #if HAVE_PTHREADS > 4
14069         /* Final pthreads */
14070         pthread_attr_t attr;
14071
14072         status = pthread_attr_init(&attr);
14073         if( status ) return status;
14074
14075 #if HAVE_PTHREADS < 7
14076         status = pthread_attr_setdetachstate(&attr, &detach);
14077         if( status < 0 ) status = errno;
14078 #else
14079         status = pthread_attr_setdetachstate(&attr, detach);
14080 #endif
14081         if( status ) return status;
14082         status = pthread_create( &t, &attr, task, NULL );
14083 #if HAVE_PTHREADS < 7
14084         if( status < 0 ) status = errno;
14085 #endif
14086         if( status ) return status;
14087 #else
14088         /* Draft 4 pthreads */
14089         status = pthread_create( &t, pthread_attr_default, task, NULL );
14090         if( status ) return errno;
14091
14092         /* give thread a chance to complete */
14093         /* it should remain joinable and hence detachable */
14094         sleep( 1 );
14095
14096         status = pthread_detach( &t );
14097         if( status ) return errno;
14098 #endif
14099
14100 #ifdef HAVE_LINUX_THREADS
14101         pthread_kill_other_threads_np();
14102 #endif
14103
14104         return 0;
14105
14106 ; return 0; }
14107 EOF
14108 if { (eval echo configure:14109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14109   rm -rf conftest*
14110   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14111 else
14112   echo "configure: failed program was:" >&5
14113   cat conftest.$ac_ext >&5
14114   rm -rf conftest*
14115   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14116 fi
14117 rm -f conftest*
14118 else
14119   cat > conftest.$ac_ext <<EOF
14120 #line 14121 "configure"
14121 #include "confdefs.h"
14122 /* pthread test headers */
14123 #include <pthread.h>
14124 #if HAVE_PTHREADS < 7
14125 #include <errno.h>
14126 #endif
14127 #ifndef NULL
14128 #define NULL (void*)0
14129 #endif
14130
14131 static void *task(p)
14132         void *p;
14133 {
14134         return (void *) (p == NULL);
14135 }
14136
14137
14138 int main(argc, argv)
14139         int argc;
14140         char **argv;
14141 {
14142
14143         /* pthread test function */
14144 #ifndef PTHREAD_CREATE_DETACHED
14145 #define PTHREAD_CREATE_DETACHED 1
14146 #endif
14147         pthread_t t;
14148         int status;
14149         int detach = PTHREAD_CREATE_DETACHED;
14150
14151 #if HAVE_PTHREADS > 4
14152         /* Final pthreads */
14153         pthread_attr_t attr;
14154
14155         status = pthread_attr_init(&attr);
14156         if( status ) return status;
14157
14158 #if HAVE_PTHREADS < 7
14159         status = pthread_attr_setdetachstate(&attr, &detach);
14160         if( status < 0 ) status = errno;
14161 #else
14162         status = pthread_attr_setdetachstate(&attr, detach);
14163 #endif
14164         if( status ) return status;
14165         status = pthread_create( &t, &attr, task, NULL );
14166 #if HAVE_PTHREADS < 7
14167         if( status < 0 ) status = errno;
14168 #endif
14169         if( status ) return status;
14170 #else
14171         /* Draft 4 pthreads */
14172         status = pthread_create( &t, pthread_attr_default, task, NULL );
14173         if( status ) return errno;
14174
14175         /* give thread a chance to complete */
14176         /* it should remain joinable and hence detachable */
14177         sleep( 1 );
14178
14179         status = pthread_detach( &t );
14180         if( status ) return errno;
14181 #endif
14182
14183 #ifdef HAVE_LINUX_THREADS
14184         pthread_kill_other_threads_np();
14185 #endif
14186
14187         return 0;
14188
14189 }
14190
14191 EOF
14192 if { (eval echo configure:14193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14193 then
14194   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14195 else
14196   echo "configure: failed program was:" >&5
14197   cat conftest.$ac_ext >&5
14198   rm -fr conftest*
14199   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14200 fi
14201 rm -fr conftest*
14202 fi
14203
14204
14205                 # restore the LIBS
14206                 LIBS="$ol_LIBS"
14207         
14208 fi
14209
14210 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14211
14212         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14213                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14214                 ol_link_threads=posix
14215         fi
14216 fi
14217
14218                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14219 if test "$ol_link_threads" = no ; then
14220         # try -lpthreads -lmach -lexc
14221         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14222 echo "configure:14223: checking for pthread link with -lpthreads -lmach -lexc" >&5
14223 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14224   echo $ac_n "(cached) $ac_c" 1>&6
14225 else
14226   
14227                 # save the flags
14228                 ol_LIBS="$LIBS"
14229                 LIBS="-lpthreads -lmach -lexc $LIBS"
14230
14231                 if test "$cross_compiling" = yes; then
14232   cat > conftest.$ac_ext <<EOF
14233 #line 14234 "configure"
14234 #include "confdefs.h"
14235 /* pthread test headers */
14236 #include <pthread.h>
14237 #if HAVE_PTHREADS < 7
14238 #include <errno.h>
14239 #endif
14240 #ifndef NULL
14241 #define NULL (void*)0
14242 #endif
14243
14244 static void *task(p)
14245         void *p;
14246 {
14247         return (void *) (p == NULL);
14248 }
14249
14250 int main() {
14251
14252         /* pthread test function */
14253 #ifndef PTHREAD_CREATE_DETACHED
14254 #define PTHREAD_CREATE_DETACHED 1
14255 #endif
14256         pthread_t t;
14257         int status;
14258         int detach = PTHREAD_CREATE_DETACHED;
14259
14260 #if HAVE_PTHREADS > 4
14261         /* Final pthreads */
14262         pthread_attr_t attr;
14263
14264         status = pthread_attr_init(&attr);
14265         if( status ) return status;
14266
14267 #if HAVE_PTHREADS < 7
14268         status = pthread_attr_setdetachstate(&attr, &detach);
14269         if( status < 0 ) status = errno;
14270 #else
14271         status = pthread_attr_setdetachstate(&attr, detach);
14272 #endif
14273         if( status ) return status;
14274         status = pthread_create( &t, &attr, task, NULL );
14275 #if HAVE_PTHREADS < 7
14276         if( status < 0 ) status = errno;
14277 #endif
14278         if( status ) return status;
14279 #else
14280         /* Draft 4 pthreads */
14281         status = pthread_create( &t, pthread_attr_default, task, NULL );
14282         if( status ) return errno;
14283
14284         /* give thread a chance to complete */
14285         /* it should remain joinable and hence detachable */
14286         sleep( 1 );
14287
14288         status = pthread_detach( &t );
14289         if( status ) return errno;
14290 #endif
14291
14292 #ifdef HAVE_LINUX_THREADS
14293         pthread_kill_other_threads_np();
14294 #endif
14295
14296         return 0;
14297
14298 ; return 0; }
14299 EOF
14300 if { (eval echo configure:14301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14301   rm -rf conftest*
14302   ol_cv_pthread_lpthreads_lmach_lexc=yes
14303 else
14304   echo "configure: failed program was:" >&5
14305   cat conftest.$ac_ext >&5
14306   rm -rf conftest*
14307   ol_cv_pthread_lpthreads_lmach_lexc=no
14308 fi
14309 rm -f conftest*
14310 else
14311   cat > conftest.$ac_ext <<EOF
14312 #line 14313 "configure"
14313 #include "confdefs.h"
14314 /* pthread test headers */
14315 #include <pthread.h>
14316 #if HAVE_PTHREADS < 7
14317 #include <errno.h>
14318 #endif
14319 #ifndef NULL
14320 #define NULL (void*)0
14321 #endif
14322
14323 static void *task(p)
14324         void *p;
14325 {
14326         return (void *) (p == NULL);
14327 }
14328
14329
14330 int main(argc, argv)
14331         int argc;
14332         char **argv;
14333 {
14334
14335         /* pthread test function */
14336 #ifndef PTHREAD_CREATE_DETACHED
14337 #define PTHREAD_CREATE_DETACHED 1
14338 #endif
14339         pthread_t t;
14340         int status;
14341         int detach = PTHREAD_CREATE_DETACHED;
14342
14343 #if HAVE_PTHREADS > 4
14344         /* Final pthreads */
14345         pthread_attr_t attr;
14346
14347         status = pthread_attr_init(&attr);
14348         if( status ) return status;
14349
14350 #if HAVE_PTHREADS < 7
14351         status = pthread_attr_setdetachstate(&attr, &detach);
14352         if( status < 0 ) status = errno;
14353 #else
14354         status = pthread_attr_setdetachstate(&attr, detach);
14355 #endif
14356         if( status ) return status;
14357         status = pthread_create( &t, &attr, task, NULL );
14358 #if HAVE_PTHREADS < 7
14359         if( status < 0 ) status = errno;
14360 #endif
14361         if( status ) return status;
14362 #else
14363         /* Draft 4 pthreads */
14364         status = pthread_create( &t, pthread_attr_default, task, NULL );
14365         if( status ) return errno;
14366
14367         /* give thread a chance to complete */
14368         /* it should remain joinable and hence detachable */
14369         sleep( 1 );
14370
14371         status = pthread_detach( &t );
14372         if( status ) return errno;
14373 #endif
14374
14375 #ifdef HAVE_LINUX_THREADS
14376         pthread_kill_other_threads_np();
14377 #endif
14378
14379         return 0;
14380
14381 }
14382
14383 EOF
14384 if { (eval echo configure:14385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14385 then
14386   ol_cv_pthread_lpthreads_lmach_lexc=yes
14387 else
14388   echo "configure: failed program was:" >&5
14389   cat conftest.$ac_ext >&5
14390   rm -fr conftest*
14391   ol_cv_pthread_lpthreads_lmach_lexc=no
14392 fi
14393 rm -fr conftest*
14394 fi
14395
14396
14397                 # restore the LIBS
14398                 LIBS="$ol_LIBS"
14399         
14400 fi
14401
14402 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14403
14404         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14405                 ol_link_pthreads="-lpthreads -lmach -lexc"
14406                 ol_link_threads=posix
14407         fi
14408 fi
14409
14410                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14411 if test "$ol_link_threads" = no ; then
14412         # try -lpthreads -lexc
14413         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14414 echo "configure:14415: checking for pthread link with -lpthreads -lexc" >&5
14415 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14416   echo $ac_n "(cached) $ac_c" 1>&6
14417 else
14418   
14419                 # save the flags
14420                 ol_LIBS="$LIBS"
14421                 LIBS="-lpthreads -lexc $LIBS"
14422
14423                 if test "$cross_compiling" = yes; then
14424   cat > conftest.$ac_ext <<EOF
14425 #line 14426 "configure"
14426 #include "confdefs.h"
14427 /* pthread test headers */
14428 #include <pthread.h>
14429 #if HAVE_PTHREADS < 7
14430 #include <errno.h>
14431 #endif
14432 #ifndef NULL
14433 #define NULL (void*)0
14434 #endif
14435
14436 static void *task(p)
14437         void *p;
14438 {
14439         return (void *) (p == NULL);
14440 }
14441
14442 int main() {
14443
14444         /* pthread test function */
14445 #ifndef PTHREAD_CREATE_DETACHED
14446 #define PTHREAD_CREATE_DETACHED 1
14447 #endif
14448         pthread_t t;
14449         int status;
14450         int detach = PTHREAD_CREATE_DETACHED;
14451
14452 #if HAVE_PTHREADS > 4
14453         /* Final pthreads */
14454         pthread_attr_t attr;
14455
14456         status = pthread_attr_init(&attr);
14457         if( status ) return status;
14458
14459 #if HAVE_PTHREADS < 7
14460         status = pthread_attr_setdetachstate(&attr, &detach);
14461         if( status < 0 ) status = errno;
14462 #else
14463         status = pthread_attr_setdetachstate(&attr, detach);
14464 #endif
14465         if( status ) return status;
14466         status = pthread_create( &t, &attr, task, NULL );
14467 #if HAVE_PTHREADS < 7
14468         if( status < 0 ) status = errno;
14469 #endif
14470         if( status ) return status;
14471 #else
14472         /* Draft 4 pthreads */
14473         status = pthread_create( &t, pthread_attr_default, task, NULL );
14474         if( status ) return errno;
14475
14476         /* give thread a chance to complete */
14477         /* it should remain joinable and hence detachable */
14478         sleep( 1 );
14479
14480         status = pthread_detach( &t );
14481         if( status ) return errno;
14482 #endif
14483
14484 #ifdef HAVE_LINUX_THREADS
14485         pthread_kill_other_threads_np();
14486 #endif
14487
14488         return 0;
14489
14490 ; return 0; }
14491 EOF
14492 if { (eval echo configure:14493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14493   rm -rf conftest*
14494   ol_cv_pthread_lpthreads_lexc=yes
14495 else
14496   echo "configure: failed program was:" >&5
14497   cat conftest.$ac_ext >&5
14498   rm -rf conftest*
14499   ol_cv_pthread_lpthreads_lexc=no
14500 fi
14501 rm -f conftest*
14502 else
14503   cat > conftest.$ac_ext <<EOF
14504 #line 14505 "configure"
14505 #include "confdefs.h"
14506 /* pthread test headers */
14507 #include <pthread.h>
14508 #if HAVE_PTHREADS < 7
14509 #include <errno.h>
14510 #endif
14511 #ifndef NULL
14512 #define NULL (void*)0
14513 #endif
14514
14515 static void *task(p)
14516         void *p;
14517 {
14518         return (void *) (p == NULL);
14519 }
14520
14521
14522 int main(argc, argv)
14523         int argc;
14524         char **argv;
14525 {
14526
14527         /* pthread test function */
14528 #ifndef PTHREAD_CREATE_DETACHED
14529 #define PTHREAD_CREATE_DETACHED 1
14530 #endif
14531         pthread_t t;
14532         int status;
14533         int detach = PTHREAD_CREATE_DETACHED;
14534
14535 #if HAVE_PTHREADS > 4
14536         /* Final pthreads */
14537         pthread_attr_t attr;
14538
14539         status = pthread_attr_init(&attr);
14540         if( status ) return status;
14541
14542 #if HAVE_PTHREADS < 7
14543         status = pthread_attr_setdetachstate(&attr, &detach);
14544         if( status < 0 ) status = errno;
14545 #else
14546         status = pthread_attr_setdetachstate(&attr, detach);
14547 #endif
14548         if( status ) return status;
14549         status = pthread_create( &t, &attr, task, NULL );
14550 #if HAVE_PTHREADS < 7
14551         if( status < 0 ) status = errno;
14552 #endif
14553         if( status ) return status;
14554 #else
14555         /* Draft 4 pthreads */
14556         status = pthread_create( &t, pthread_attr_default, task, NULL );
14557         if( status ) return errno;
14558
14559         /* give thread a chance to complete */
14560         /* it should remain joinable and hence detachable */
14561         sleep( 1 );
14562
14563         status = pthread_detach( &t );
14564         if( status ) return errno;
14565 #endif
14566
14567 #ifdef HAVE_LINUX_THREADS
14568         pthread_kill_other_threads_np();
14569 #endif
14570
14571         return 0;
14572
14573 }
14574
14575 EOF
14576 if { (eval echo configure:14577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14577 then
14578   ol_cv_pthread_lpthreads_lexc=yes
14579 else
14580   echo "configure: failed program was:" >&5
14581   cat conftest.$ac_ext >&5
14582   rm -fr conftest*
14583   ol_cv_pthread_lpthreads_lexc=no
14584 fi
14585 rm -fr conftest*
14586 fi
14587
14588
14589                 # restore the LIBS
14590                 LIBS="$ol_LIBS"
14591         
14592 fi
14593
14594 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14595
14596         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14597                 ol_link_pthreads="-lpthreads -lexc"
14598                 ol_link_threads=posix
14599         fi
14600 fi
14601
14602
14603                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14604 if test "$ol_link_threads" = no ; then
14605         # try -lpthreads
14606         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14607 echo "configure:14608: checking for pthread link with -lpthreads" >&5
14608 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14609   echo $ac_n "(cached) $ac_c" 1>&6
14610 else
14611   
14612                 # save the flags
14613                 ol_LIBS="$LIBS"
14614                 LIBS="-lpthreads $LIBS"
14615
14616                 if test "$cross_compiling" = yes; then
14617   cat > conftest.$ac_ext <<EOF
14618 #line 14619 "configure"
14619 #include "confdefs.h"
14620 /* pthread test headers */
14621 #include <pthread.h>
14622 #if HAVE_PTHREADS < 7
14623 #include <errno.h>
14624 #endif
14625 #ifndef NULL
14626 #define NULL (void*)0
14627 #endif
14628
14629 static void *task(p)
14630         void *p;
14631 {
14632         return (void *) (p == NULL);
14633 }
14634
14635 int main() {
14636
14637         /* pthread test function */
14638 #ifndef PTHREAD_CREATE_DETACHED
14639 #define PTHREAD_CREATE_DETACHED 1
14640 #endif
14641         pthread_t t;
14642         int status;
14643         int detach = PTHREAD_CREATE_DETACHED;
14644
14645 #if HAVE_PTHREADS > 4
14646         /* Final pthreads */
14647         pthread_attr_t attr;
14648
14649         status = pthread_attr_init(&attr);
14650         if( status ) return status;
14651
14652 #if HAVE_PTHREADS < 7
14653         status = pthread_attr_setdetachstate(&attr, &detach);
14654         if( status < 0 ) status = errno;
14655 #else
14656         status = pthread_attr_setdetachstate(&attr, detach);
14657 #endif
14658         if( status ) return status;
14659         status = pthread_create( &t, &attr, task, NULL );
14660 #if HAVE_PTHREADS < 7
14661         if( status < 0 ) status = errno;
14662 #endif
14663         if( status ) return status;
14664 #else
14665         /* Draft 4 pthreads */
14666         status = pthread_create( &t, pthread_attr_default, task, NULL );
14667         if( status ) return errno;
14668
14669         /* give thread a chance to complete */
14670         /* it should remain joinable and hence detachable */
14671         sleep( 1 );
14672
14673         status = pthread_detach( &t );
14674         if( status ) return errno;
14675 #endif
14676
14677 #ifdef HAVE_LINUX_THREADS
14678         pthread_kill_other_threads_np();
14679 #endif
14680
14681         return 0;
14682
14683 ; return 0; }
14684 EOF
14685 if { (eval echo configure:14686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14686   rm -rf conftest*
14687   ol_cv_pthread_lib_lpthreads=yes
14688 else
14689   echo "configure: failed program was:" >&5
14690   cat conftest.$ac_ext >&5
14691   rm -rf conftest*
14692   ol_cv_pthread_lib_lpthreads=no
14693 fi
14694 rm -f conftest*
14695 else
14696   cat > conftest.$ac_ext <<EOF
14697 #line 14698 "configure"
14698 #include "confdefs.h"
14699 /* pthread test headers */
14700 #include <pthread.h>
14701 #if HAVE_PTHREADS < 7
14702 #include <errno.h>
14703 #endif
14704 #ifndef NULL
14705 #define NULL (void*)0
14706 #endif
14707
14708 static void *task(p)
14709         void *p;
14710 {
14711         return (void *) (p == NULL);
14712 }
14713
14714
14715 int main(argc, argv)
14716         int argc;
14717         char **argv;
14718 {
14719
14720         /* pthread test function */
14721 #ifndef PTHREAD_CREATE_DETACHED
14722 #define PTHREAD_CREATE_DETACHED 1
14723 #endif
14724         pthread_t t;
14725         int status;
14726         int detach = PTHREAD_CREATE_DETACHED;
14727
14728 #if HAVE_PTHREADS > 4
14729         /* Final pthreads */
14730         pthread_attr_t attr;
14731
14732         status = pthread_attr_init(&attr);
14733         if( status ) return status;
14734
14735 #if HAVE_PTHREADS < 7
14736         status = pthread_attr_setdetachstate(&attr, &detach);
14737         if( status < 0 ) status = errno;
14738 #else
14739         status = pthread_attr_setdetachstate(&attr, detach);
14740 #endif
14741         if( status ) return status;
14742         status = pthread_create( &t, &attr, task, NULL );
14743 #if HAVE_PTHREADS < 7
14744         if( status < 0 ) status = errno;
14745 #endif
14746         if( status ) return status;
14747 #else
14748         /* Draft 4 pthreads */
14749         status = pthread_create( &t, pthread_attr_default, task, NULL );
14750         if( status ) return errno;
14751
14752         /* give thread a chance to complete */
14753         /* it should remain joinable and hence detachable */
14754         sleep( 1 );
14755
14756         status = pthread_detach( &t );
14757         if( status ) return errno;
14758 #endif
14759
14760 #ifdef HAVE_LINUX_THREADS
14761         pthread_kill_other_threads_np();
14762 #endif
14763
14764         return 0;
14765
14766 }
14767
14768 EOF
14769 if { (eval echo configure:14770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14770 then
14771   ol_cv_pthread_lib_lpthreads=yes
14772 else
14773   echo "configure: failed program was:" >&5
14774   cat conftest.$ac_ext >&5
14775   rm -fr conftest*
14776   ol_cv_pthread_lib_lpthreads=no
14777 fi
14778 rm -fr conftest*
14779 fi
14780
14781
14782                 # restore the LIBS
14783                 LIBS="$ol_LIBS"
14784         
14785 fi
14786
14787 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14788
14789         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14790                 ol_link_pthreads="-lpthreads"
14791                 ol_link_threads=posix
14792         fi
14793 fi
14794
14795
14796                 if test $ol_link_threads != no ; then
14797                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14798
14799                                                 save_CPPFLAGS="$CPPFLAGS"
14800                         save_LIBS="$LIBS"
14801                         LIBS="$LTHREAD_LIBS $LIBS"
14802
14803                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14804 do
14805 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14806 echo "configure:14807: checking for $ac_func" >&5
14807 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14808   echo $ac_n "(cached) $ac_c" 1>&6
14809 else
14810   cat > conftest.$ac_ext <<EOF
14811 #line 14812 "configure"
14812 #include "confdefs.h"
14813 /* System header to define __stub macros and hopefully few prototypes,
14814     which can conflict with char $ac_func(); below.  */
14815 #include <assert.h>
14816 /* Override any gcc2 internal prototype to avoid an error.  */
14817 /* We use char because int might match the return type of a gcc2
14818     builtin and then its argument prototype would still apply.  */
14819 char $ac_func();
14820 char (*f)();
14821
14822 int main() {
14823
14824 /* The GNU C library defines this for functions which it implements
14825     to always fail with ENOSYS.  Some functions are actually named
14826     something starting with __ and the normal name is an alias.  */
14827 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14828 choke me
14829 #else
14830 f = $ac_func;
14831 #endif
14832
14833 ; return 0; }
14834 EOF
14835 if { (eval echo configure:14836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14836   rm -rf conftest*
14837   eval "ac_cv_func_$ac_func=yes"
14838 else
14839   echo "configure: failed program was:" >&5
14840   cat conftest.$ac_ext >&5
14841   rm -rf conftest*
14842   eval "ac_cv_func_$ac_func=no"
14843 fi
14844 rm -f conftest*
14845 fi
14846
14847 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14848   echo "$ac_t""yes" 1>&6
14849     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14850   cat >> confdefs.h <<EOF
14851 #define $ac_tr_func 1
14852 EOF
14853  
14854 else
14855   echo "$ac_t""no" 1>&6
14856 fi
14857 done
14858
14859
14860                         if test $ac_cv_func_sched_yield = no -a \
14861                                 $ac_cv_func_pthread_yield = no -a \
14862                                 $ac_cv_func_thr_yield = no ; then
14863                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14864 echo "configure:14865: checking for sched_yield in -lrt" >&5
14865 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14866 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14867   echo $ac_n "(cached) $ac_c" 1>&6
14868 else
14869   ac_save_LIBS="$LIBS"
14870 LIBS="-lrt  $LIBS"
14871 cat > conftest.$ac_ext <<EOF
14872 #line 14873 "configure"
14873 #include "confdefs.h"
14874 /* Override any gcc2 internal prototype to avoid an error.  */
14875 /* We use char because int might match the return type of a gcc2
14876     builtin and then its argument prototype would still apply.  */
14877 char sched_yield();
14878
14879 int main() {
14880 sched_yield()
14881 ; return 0; }
14882 EOF
14883 if { (eval echo configure:14884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14884   rm -rf conftest*
14885   eval "ac_cv_lib_$ac_lib_var=yes"
14886 else
14887   echo "configure: failed program was:" >&5
14888   cat conftest.$ac_ext >&5
14889   rm -rf conftest*
14890   eval "ac_cv_lib_$ac_lib_var=no"
14891 fi
14892 rm -f conftest*
14893 LIBS="$ac_save_LIBS"
14894
14895 fi
14896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14897   echo "$ac_t""yes" 1>&6
14898   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14899                                         cat >> confdefs.h <<\EOF
14900 #define HAVE_SCHED_YIELD 1
14901 EOF
14902
14903                                         ac_cv_func_sched_yield=yes
14904 else
14905   echo "$ac_t""no" 1>&6
14906 ac_cv_func_sched_yield=no
14907 fi
14908
14909                         fi
14910                         if test $ac_cv_func_sched_yield = no -a \
14911                                 $ac_cv_func_pthread_yield = no -a \
14912                                 "$ac_cv_func_thr_yield" = no ; then
14913                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14914                         fi
14915
14916                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14917 do
14918 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14919 echo "configure:14920: checking for $ac_func" >&5
14920 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14921   echo $ac_n "(cached) $ac_c" 1>&6
14922 else
14923   cat > conftest.$ac_ext <<EOF
14924 #line 14925 "configure"
14925 #include "confdefs.h"
14926 /* System header to define __stub macros and hopefully few prototypes,
14927     which can conflict with char $ac_func(); below.  */
14928 #include <assert.h>
14929 /* Override any gcc2 internal prototype to avoid an error.  */
14930 /* We use char because int might match the return type of a gcc2
14931     builtin and then its argument prototype would still apply.  */
14932 char $ac_func();
14933 char (*f)();
14934
14935 int main() {
14936
14937 /* The GNU C library defines this for functions which it implements
14938     to always fail with ENOSYS.  Some functions are actually named
14939     something starting with __ and the normal name is an alias.  */
14940 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14941 choke me
14942 #else
14943 f = $ac_func;
14944 #endif
14945
14946 ; return 0; }
14947 EOF
14948 if { (eval echo configure:14949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14949   rm -rf conftest*
14950   eval "ac_cv_func_$ac_func=yes"
14951 else
14952   echo "configure: failed program was:" >&5
14953   cat conftest.$ac_ext >&5
14954   rm -rf conftest*
14955   eval "ac_cv_func_$ac_func=no"
14956 fi
14957 rm -f conftest*
14958 fi
14959
14960 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14961   echo "$ac_t""yes" 1>&6
14962     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14963   cat >> confdefs.h <<EOF
14964 #define $ac_tr_func 1
14965 EOF
14966  
14967 else
14968   echo "$ac_t""no" 1>&6
14969 fi
14970 done
14971
14972
14973                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14974 echo "configure:14975: checking for pthread_detach with <pthread.h>" >&5
14975 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14976   echo $ac_n "(cached) $ac_c" 1>&6
14977 else
14978   
14979                                                                 cat > conftest.$ac_ext <<EOF
14980 #line 14981 "configure"
14981 #include "confdefs.h"
14982
14983 #include <pthread.h>
14984 #ifndef NULL
14985 #define NULL (void*)0
14986 #endif
14987
14988 int main() {
14989 pthread_detach(NULL);
14990 ; return 0; }
14991 EOF
14992 if { (eval echo configure:14993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14993   rm -rf conftest*
14994   ol_cv_func_pthread_detach=yes
14995 else
14996   echo "configure: failed program was:" >&5
14997   cat conftest.$ac_ext >&5
14998   rm -rf conftest*
14999   ol_cv_func_pthread_detach=no
15000 fi
15001 rm -f conftest*
15002                         
15003 fi
15004
15005 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15006
15007                         if test $ol_cv_func_pthread_detach = no ; then
15008                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15009                         fi
15010
15011                         cat >> confdefs.h <<\EOF
15012 #define HAVE_PTHREAD_DETACH 1
15013 EOF
15014
15015
15016                                                 for ac_func in \
15017                                 pthread_setconcurrency \
15018                                 pthread_getconcurrency \
15019                                 thr_setconcurrency \
15020                                 thr_getconcurrency \
15021                         
15022 do
15023 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15024 echo "configure:15025: checking for $ac_func" >&5
15025 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15026   echo $ac_n "(cached) $ac_c" 1>&6
15027 else
15028   cat > conftest.$ac_ext <<EOF
15029 #line 15030 "configure"
15030 #include "confdefs.h"
15031 /* System header to define __stub macros and hopefully few prototypes,
15032     which can conflict with char $ac_func(); below.  */
15033 #include <assert.h>
15034 /* Override any gcc2 internal prototype to avoid an error.  */
15035 /* We use char because int might match the return type of a gcc2
15036     builtin and then its argument prototype would still apply.  */
15037 char $ac_func();
15038 char (*f)();
15039
15040 int main() {
15041
15042 /* The GNU C library defines this for functions which it implements
15043     to always fail with ENOSYS.  Some functions are actually named
15044     something starting with __ and the normal name is an alias.  */
15045 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15046 choke me
15047 #else
15048 f = $ac_func;
15049 #endif
15050
15051 ; return 0; }
15052 EOF
15053 if { (eval echo configure:15054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15054   rm -rf conftest*
15055   eval "ac_cv_func_$ac_func=yes"
15056 else
15057   echo "configure: failed program was:" >&5
15058   cat conftest.$ac_ext >&5
15059   rm -rf conftest*
15060   eval "ac_cv_func_$ac_func=no"
15061 fi
15062 rm -f conftest*
15063 fi
15064
15065 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15066   echo "$ac_t""yes" 1>&6
15067     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15068   cat >> confdefs.h <<EOF
15069 #define $ac_tr_func 1
15070 EOF
15071  
15072 else
15073   echo "$ac_t""no" 1>&6
15074 fi
15075 done
15076
15077
15078                         
15079         for ac_func in pthread_kill_other_threads_np
15080 do
15081 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15082 echo "configure:15083: checking for $ac_func" >&5
15083 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15084   echo $ac_n "(cached) $ac_c" 1>&6
15085 else
15086   cat > conftest.$ac_ext <<EOF
15087 #line 15088 "configure"
15088 #include "confdefs.h"
15089 /* System header to define __stub macros and hopefully few prototypes,
15090     which can conflict with char $ac_func(); below.  */
15091 #include <assert.h>
15092 /* Override any gcc2 internal prototype to avoid an error.  */
15093 /* We use char because int might match the return type of a gcc2
15094     builtin and then its argument prototype would still apply.  */
15095 char $ac_func();
15096 char (*f)();
15097
15098 int main() {
15099
15100 /* The GNU C library defines this for functions which it implements
15101     to always fail with ENOSYS.  Some functions are actually named
15102     something starting with __ and the normal name is an alias.  */
15103 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15104 choke me
15105 #else
15106 f = $ac_func;
15107 #endif
15108
15109 ; return 0; }
15110 EOF
15111 if { (eval echo configure:15112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15112   rm -rf conftest*
15113   eval "ac_cv_func_$ac_func=yes"
15114 else
15115   echo "configure: failed program was:" >&5
15116   cat conftest.$ac_ext >&5
15117   rm -rf conftest*
15118   eval "ac_cv_func_$ac_func=no"
15119 fi
15120 rm -f conftest*
15121 fi
15122
15123 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15124   echo "$ac_t""yes" 1>&6
15125     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15126   cat >> confdefs.h <<EOF
15127 #define $ac_tr_func 1
15128 EOF
15129  
15130 else
15131   echo "$ac_t""no" 1>&6
15132 fi
15133 done
15134
15135         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15136 echo "configure:15137: checking for LinuxThreads implementation" >&5
15137 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15138   echo $ac_n "(cached) $ac_c" 1>&6
15139 else
15140   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15141 fi
15142
15143 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15144
15145                         
15146         
15147         
15148         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15149 echo "configure:15150: checking for LinuxThreads consistency" >&5
15150 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15151   echo $ac_n "(cached) $ac_c" 1>&6
15152 else
15153   
15154                 if test $ol_cv_header_linux_threads = yes -a \
15155                         $ol_cv_sys_linux_threads = yes; then
15156                         ol_cv_linux_threads=yes
15157                 elif test $ol_cv_header_linux_threads = no -a \
15158                         $ol_cv_sys_linux_threads = no; then
15159                         ol_cv_linux_threads=no
15160                 else
15161                         ol_cv_linux_threads=error
15162                 fi
15163         
15164 fi
15165
15166 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15167
15168
15169                         if test $ol_cv_linux_threads = error; then
15170                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15171                         fi
15172
15173                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15174 echo "configure:15175: checking if pthread_create() works" >&5
15175 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15176   echo $ac_n "(cached) $ac_c" 1>&6
15177 else
15178   
15179                         if test "$cross_compiling" = yes; then
15180                                 ol_cv_pthread_create_works=yes
15181 else
15182   cat > conftest.$ac_ext <<EOF
15183 #line 15184 "configure"
15184 #include "confdefs.h"
15185 /* pthread test headers */
15186 #include <pthread.h>
15187 #if HAVE_PTHREADS < 7
15188 #include <errno.h>
15189 #endif
15190 #ifndef NULL
15191 #define NULL (void*)0
15192 #endif
15193
15194 static void *task(p)
15195         void *p;
15196 {
15197         return (void *) (p == NULL);
15198 }
15199
15200
15201 int main(argc, argv)
15202         int argc;
15203         char **argv;
15204 {
15205
15206         /* pthread test function */
15207 #ifndef PTHREAD_CREATE_DETACHED
15208 #define PTHREAD_CREATE_DETACHED 1
15209 #endif
15210         pthread_t t;
15211         int status;
15212         int detach = PTHREAD_CREATE_DETACHED;
15213
15214 #if HAVE_PTHREADS > 4
15215         /* Final pthreads */
15216         pthread_attr_t attr;
15217
15218         status = pthread_attr_init(&attr);
15219         if( status ) return status;
15220
15221 #if HAVE_PTHREADS < 7
15222         status = pthread_attr_setdetachstate(&attr, &detach);
15223         if( status < 0 ) status = errno;
15224 #else
15225         status = pthread_attr_setdetachstate(&attr, detach);
15226 #endif
15227         if( status ) return status;
15228         status = pthread_create( &t, &attr, task, NULL );
15229 #if HAVE_PTHREADS < 7
15230         if( status < 0 ) status = errno;
15231 #endif
15232         if( status ) return status;
15233 #else
15234         /* Draft 4 pthreads */
15235         status = pthread_create( &t, pthread_attr_default, task, NULL );
15236         if( status ) return errno;
15237
15238         /* give thread a chance to complete */
15239         /* it should remain joinable and hence detachable */
15240         sleep( 1 );
15241
15242         status = pthread_detach( &t );
15243         if( status ) return errno;
15244 #endif
15245
15246 #ifdef HAVE_LINUX_THREADS
15247         pthread_kill_other_threads_np();
15248 #endif
15249
15250         return 0;
15251
15252 }
15253
15254 EOF
15255 if { (eval echo configure:15256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15256 then
15257   ol_cv_pthread_create_works=yes
15258 else
15259   echo "configure: failed program was:" >&5
15260   cat conftest.$ac_ext >&5
15261   rm -fr conftest*
15262   ol_cv_pthread_create_works=no
15263 fi
15264 rm -fr conftest*
15265 fi
15266
15267 fi
15268
15269 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15270
15271                         if test $ol_cv_pthread_create_works = no ; then
15272                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15273                         fi
15274
15275                                                 if test $ol_with_yielding_select = auto ; then
15276                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15277 echo "configure:15278: checking if select yields when using pthreads" >&5
15278 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15279   echo $ac_n "(cached) $ac_c" 1>&6
15280 else
15281   
15282                                 if test "$cross_compiling" = yes; then
15283   ol_cv_pthread_select_yields=cross
15284 else
15285   cat > conftest.$ac_ext <<EOF
15286 #line 15287 "configure"
15287 #include "confdefs.h"
15288
15289 #include <sys/types.h>
15290 #include <sys/time.h>
15291 #include <unistd.h>
15292 #include <pthread.h>
15293 #ifndef NULL
15294 #define NULL (void*) 0
15295 #endif
15296
15297 static int fildes[2];
15298
15299 static void *task(p)
15300         void *p;
15301 {
15302         int i;
15303         struct timeval tv;
15304
15305         fd_set rfds;
15306
15307         tv.tv_sec=10;
15308         tv.tv_usec=0;
15309
15310         FD_ZERO(&rfds);
15311         FD_SET(fildes[0], &rfds);
15312
15313         /* we're not interested in any fds */
15314         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15315
15316         if(i < 0) {
15317                 perror("select");
15318                 exit(10);
15319         }
15320
15321         exit(0); /* if we exit here, the select blocked the whole process */
15322 }
15323
15324 int main(argc, argv)
15325         int argc;
15326         char **argv;
15327 {
15328         pthread_t t;
15329
15330         /* create a pipe to select */
15331         if(pipe(&fildes[0])) {
15332                 perror("select");
15333                 exit(1);
15334         }
15335
15336 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15337         (void) pthread_setconcurrency(2);
15338 #else
15339 #ifdef HAVE_THR_SETCONCURRENCY
15340         /* Set Solaris LWP concurrency to 2 */
15341         thr_setconcurrency(2);
15342 #endif
15343 #endif
15344
15345 #if HAVE_PTHREADS < 6
15346         pthread_create(&t, pthread_attr_default, task, NULL);
15347 #else
15348         pthread_create(&t, NULL, task, NULL);
15349 #endif
15350
15351         /* make sure task runs first */
15352 #if HAVE_THR_YIELD
15353         thr_yield();
15354 #elif defined( HAVE_SCHED_YIELD )
15355         sched_yield();
15356 #elif defined( HAVE_PTHREAD_YIELD )
15357         pthread_yield();
15358 #endif
15359
15360         exit(2);
15361 }
15362 EOF
15363 if { (eval echo configure:15364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15364 then
15365   ol_cv_pthread_select_yields=no
15366 else
15367   echo "configure: failed program was:" >&5
15368   cat conftest.$ac_ext >&5
15369   rm -fr conftest*
15370   ol_cv_pthread_select_yields=yes
15371 fi
15372 rm -fr conftest*
15373 fi
15374
15375 fi
15376
15377 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15378
15379                                 if test $ol_cv_pthread_select_yields = cross ; then
15380                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15381                                 fi
15382
15383                                 if test $ol_cv_pthread_select_yields = yes ; then
15384                                         ol_with_yielding_select=yes
15385                                 fi
15386                         fi
15387
15388                                                 CPPFLAGS="$save_CPPFLAGS"
15389                         LIBS="$save_LIBS"
15390                 else
15391                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15392                 fi
15393         fi
15394
15395         if test $ol_with_threads = posix ; then
15396                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15397         fi
15398 fi
15399
15400 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15401         -o $ol_with_threads = mach ; then
15402
15403                 for ac_hdr in mach/cthreads.h cthreads.h
15404 do
15405 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15406 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15407 echo "configure:15408: checking for $ac_hdr" >&5
15408 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15409   echo $ac_n "(cached) $ac_c" 1>&6
15410 else
15411   cat > conftest.$ac_ext <<EOF
15412 #line 15413 "configure"
15413 #include "confdefs.h"
15414 #include <$ac_hdr>
15415 EOF
15416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15417 { (eval echo configure:15418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15419 if test -z "$ac_err"; then
15420   rm -rf conftest*
15421   eval "ac_cv_header_$ac_safe=yes"
15422 else
15423   echo "$ac_err" >&5
15424   echo "configure: failed program was:" >&5
15425   cat conftest.$ac_ext >&5
15426   rm -rf conftest*
15427   eval "ac_cv_header_$ac_safe=no"
15428 fi
15429 rm -f conftest*
15430 fi
15431 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15432   echo "$ac_t""yes" 1>&6
15433     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15434   cat >> confdefs.h <<EOF
15435 #define $ac_tr_hdr 1
15436 EOF
15437  
15438 else
15439   echo "$ac_t""no" 1>&6
15440 fi
15441 done
15442
15443         if test $ac_cv_header_mach_cthreads_h = yes ; then
15444                 ol_with_threads=found
15445
15446                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15447 echo "configure:15448: checking for cthread_fork" >&5
15448 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15449   echo $ac_n "(cached) $ac_c" 1>&6
15450 else
15451   cat > conftest.$ac_ext <<EOF
15452 #line 15453 "configure"
15453 #include "confdefs.h"
15454 /* System header to define __stub macros and hopefully few prototypes,
15455     which can conflict with char cthread_fork(); below.  */
15456 #include <assert.h>
15457 /* Override any gcc2 internal prototype to avoid an error.  */
15458 /* We use char because int might match the return type of a gcc2
15459     builtin and then its argument prototype would still apply.  */
15460 char cthread_fork();
15461 char (*f)();
15462
15463 int main() {
15464
15465 /* The GNU C library defines this for functions which it implements
15466     to always fail with ENOSYS.  Some functions are actually named
15467     something starting with __ and the normal name is an alias.  */
15468 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15469 choke me
15470 #else
15471 f = cthread_fork;
15472 #endif
15473
15474 ; return 0; }
15475 EOF
15476 if { (eval echo configure:15477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15477   rm -rf conftest*
15478   eval "ac_cv_func_cthread_fork=yes"
15479 else
15480   echo "configure: failed program was:" >&5
15481   cat conftest.$ac_ext >&5
15482   rm -rf conftest*
15483   eval "ac_cv_func_cthread_fork=no"
15484 fi
15485 rm -f conftest*
15486 fi
15487
15488 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15489   echo "$ac_t""yes" 1>&6
15490   ol_link_threads=yes
15491 else
15492   echo "$ac_t""no" 1>&6
15493 fi
15494
15495
15496                 if test $ol_link_threads = no ; then
15497                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15498 echo "configure:15499: checking for cthread_fork with -all_load" >&5
15499 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15500   echo $ac_n "(cached) $ac_c" 1>&6
15501 else
15502   
15503                                                                 save_LIBS="$LIBS"
15504                                 LIBS="-all_load $LIBS"
15505                                 cat > conftest.$ac_ext <<EOF
15506 #line 15507 "configure"
15507 #include "confdefs.h"
15508 #include <mach/cthreads.h>
15509 int main() {
15510
15511                                         cthread_fork((void *)0, (void *)0);
15512                                         
15513 ; return 0; }
15514 EOF
15515 if { (eval echo configure:15516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15516   rm -rf conftest*
15517   ol_cv_cthread_all_load=yes
15518 else
15519   echo "configure: failed program was:" >&5
15520   cat conftest.$ac_ext >&5
15521   rm -rf conftest*
15522   ol_cv_cthread_all_load=no
15523 fi
15524 rm -f conftest*
15525                                                                 LIBS="$save_LIBS"
15526                         
15527 fi
15528
15529 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15530
15531                         if test $ol_cv_cthread_all_load = yes ; then
15532                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15533                                 ol_link_threads=mach
15534                                 ol_with_threads=found
15535                         fi
15536                 fi
15537
15538         elif test $ac_cv_header_cthreads_h = yes ; then
15539                                 
15540                 ol_with_threads=found
15541  
15542                                 save_LIBS="$LIBS"
15543                 LIBS="$LIBS -lthreads"
15544                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15545 echo "configure:15546: checking for cthread_fork" >&5
15546 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15547   echo $ac_n "(cached) $ac_c" 1>&6
15548 else
15549   cat > conftest.$ac_ext <<EOF
15550 #line 15551 "configure"
15551 #include "confdefs.h"
15552 /* System header to define __stub macros and hopefully few prototypes,
15553     which can conflict with char cthread_fork(); below.  */
15554 #include <assert.h>
15555 /* Override any gcc2 internal prototype to avoid an error.  */
15556 /* We use char because int might match the return type of a gcc2
15557     builtin and then its argument prototype would still apply.  */
15558 char cthread_fork();
15559 char (*f)();
15560
15561 int main() {
15562
15563 /* The GNU C library defines this for functions which it implements
15564     to always fail with ENOSYS.  Some functions are actually named
15565     something starting with __ and the normal name is an alias.  */
15566 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15567 choke me
15568 #else
15569 f = cthread_fork;
15570 #endif
15571
15572 ; return 0; }
15573 EOF
15574 if { (eval echo configure:15575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15575   rm -rf conftest*
15576   eval "ac_cv_func_cthread_fork=yes"
15577 else
15578   echo "configure: failed program was:" >&5
15579   cat conftest.$ac_ext >&5
15580   rm -rf conftest*
15581   eval "ac_cv_func_cthread_fork=no"
15582 fi
15583 rm -f conftest*
15584 fi
15585
15586 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15587   echo "$ac_t""yes" 1>&6
15588   ol_link_threads=yes
15589 else
15590   echo "$ac_t""no" 1>&6
15591 fi
15592
15593                 LIBS="$save_LIBS"
15594
15595                 if test $ol_link_threads = yes ; then
15596                         LTHREAD_LIBS="-lthreads"
15597                         ol_link_threads=mach
15598                         ol_with_threads=found
15599                 else
15600                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15601                 fi
15602
15603         elif test $ol_with_threads = mach ; then
15604                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15605         fi
15606
15607         if test $ol_link_threads = mach ; then
15608                 cat >> confdefs.h <<\EOF
15609 #define HAVE_MACH_CTHREADS 1
15610 EOF
15611
15612         elif test $ol_with_threads = found ; then
15613                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15614         fi
15615 fi
15616
15617 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15618         -o $ol_with_threads = pth ; then
15619
15620         for ac_hdr in pth.h
15621 do
15622 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15623 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15624 echo "configure:15625: checking for $ac_hdr" >&5
15625 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15626   echo $ac_n "(cached) $ac_c" 1>&6
15627 else
15628   cat > conftest.$ac_ext <<EOF
15629 #line 15630 "configure"
15630 #include "confdefs.h"
15631 #include <$ac_hdr>
15632 EOF
15633 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15634 { (eval echo configure:15635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15635 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15636 if test -z "$ac_err"; then
15637   rm -rf conftest*
15638   eval "ac_cv_header_$ac_safe=yes"
15639 else
15640   echo "$ac_err" >&5
15641   echo "configure: failed program was:" >&5
15642   cat conftest.$ac_ext >&5
15643   rm -rf conftest*
15644   eval "ac_cv_header_$ac_safe=no"
15645 fi
15646 rm -f conftest*
15647 fi
15648 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15649   echo "$ac_t""yes" 1>&6
15650     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15651   cat >> confdefs.h <<EOF
15652 #define $ac_tr_hdr 1
15653 EOF
15654  
15655 else
15656   echo "$ac_t""no" 1>&6
15657 fi
15658 done
15659
15660
15661         if test $ac_cv_header_pth_h = yes ; then
15662                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15663 echo "configure:15664: checking for pth_version in -lpth" >&5
15664 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15665 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15666   echo $ac_n "(cached) $ac_c" 1>&6
15667 else
15668   ac_save_LIBS="$LIBS"
15669 LIBS="-lpth  $LIBS"
15670 cat > conftest.$ac_ext <<EOF
15671 #line 15672 "configure"
15672 #include "confdefs.h"
15673 /* Override any gcc2 internal prototype to avoid an error.  */
15674 /* We use char because int might match the return type of a gcc2
15675     builtin and then its argument prototype would still apply.  */
15676 char pth_version();
15677
15678 int main() {
15679 pth_version()
15680 ; return 0; }
15681 EOF
15682 if { (eval echo configure:15683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15683   rm -rf conftest*
15684   eval "ac_cv_lib_$ac_lib_var=yes"
15685 else
15686   echo "configure: failed program was:" >&5
15687   cat conftest.$ac_ext >&5
15688   rm -rf conftest*
15689   eval "ac_cv_lib_$ac_lib_var=no"
15690 fi
15691 rm -f conftest*
15692 LIBS="$ac_save_LIBS"
15693
15694 fi
15695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15696   echo "$ac_t""yes" 1>&6
15697   have_pth=yes
15698 else
15699   echo "$ac_t""no" 1>&6
15700 have_pth=no
15701 fi
15702
15703
15704                 if test $have_pth = yes ; then
15705                         cat >> confdefs.h <<\EOF
15706 #define HAVE_GNU_PTH 1
15707 EOF
15708
15709                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15710                         ol_link_threads=pth
15711                         ol_with_threads=found
15712
15713                         if test $ol_with_yielding_select = auto ; then
15714                                 ol_with_yielding_select=yes
15715                         fi
15716                 fi
15717         fi
15718 fi
15719
15720 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15721         -o $ol_with_threads = lwp ; then
15722
15723                 for ac_hdr in thread.h synch.h
15724 do
15725 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15726 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15727 echo "configure:15728: checking for $ac_hdr" >&5
15728 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15729   echo $ac_n "(cached) $ac_c" 1>&6
15730 else
15731   cat > conftest.$ac_ext <<EOF
15732 #line 15733 "configure"
15733 #include "confdefs.h"
15734 #include <$ac_hdr>
15735 EOF
15736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15737 { (eval echo configure:15738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15738 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15739 if test -z "$ac_err"; then
15740   rm -rf conftest*
15741   eval "ac_cv_header_$ac_safe=yes"
15742 else
15743   echo "$ac_err" >&5
15744   echo "configure: failed program was:" >&5
15745   cat conftest.$ac_ext >&5
15746   rm -rf conftest*
15747   eval "ac_cv_header_$ac_safe=no"
15748 fi
15749 rm -f conftest*
15750 fi
15751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15752   echo "$ac_t""yes" 1>&6
15753     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15754   cat >> confdefs.h <<EOF
15755 #define $ac_tr_hdr 1
15756 EOF
15757  
15758 else
15759   echo "$ac_t""no" 1>&6
15760 fi
15761 done
15762
15763         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15764                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15765 echo "configure:15766: checking for thr_create in -lthread" >&5
15766 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15767 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15768   echo $ac_n "(cached) $ac_c" 1>&6
15769 else
15770   ac_save_LIBS="$LIBS"
15771 LIBS="-lthread  $LIBS"
15772 cat > conftest.$ac_ext <<EOF
15773 #line 15774 "configure"
15774 #include "confdefs.h"
15775 /* Override any gcc2 internal prototype to avoid an error.  */
15776 /* We use char because int might match the return type of a gcc2
15777     builtin and then its argument prototype would still apply.  */
15778 char thr_create();
15779
15780 int main() {
15781 thr_create()
15782 ; return 0; }
15783 EOF
15784 if { (eval echo configure:15785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15785   rm -rf conftest*
15786   eval "ac_cv_lib_$ac_lib_var=yes"
15787 else
15788   echo "configure: failed program was:" >&5
15789   cat conftest.$ac_ext >&5
15790   rm -rf conftest*
15791   eval "ac_cv_lib_$ac_lib_var=no"
15792 fi
15793 rm -f conftest*
15794 LIBS="$ac_save_LIBS"
15795
15796 fi
15797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15798   echo "$ac_t""yes" 1>&6
15799   have_thr=yes
15800 else
15801   echo "$ac_t""no" 1>&6
15802 have_thr=no
15803 fi
15804
15805
15806                 if test $have_thr = yes ; then
15807                         cat >> confdefs.h <<\EOF
15808 #define HAVE_THR 1
15809 EOF
15810
15811                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15812                         ol_link_threads=thr
15813
15814                         if test $ol_with_yielding_select = auto ; then
15815                                 ol_with_yielding_select=yes
15816                         fi
15817
15818                                                 for ac_func in \
15819                                 thr_setconcurrency \
15820                                 thr_getconcurrency \
15821                         
15822 do
15823 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15824 echo "configure:15825: checking for $ac_func" >&5
15825 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15826   echo $ac_n "(cached) $ac_c" 1>&6
15827 else
15828   cat > conftest.$ac_ext <<EOF
15829 #line 15830 "configure"
15830 #include "confdefs.h"
15831 /* System header to define __stub macros and hopefully few prototypes,
15832     which can conflict with char $ac_func(); below.  */
15833 #include <assert.h>
15834 /* Override any gcc2 internal prototype to avoid an error.  */
15835 /* We use char because int might match the return type of a gcc2
15836     builtin and then its argument prototype would still apply.  */
15837 char $ac_func();
15838 char (*f)();
15839
15840 int main() {
15841
15842 /* The GNU C library defines this for functions which it implements
15843     to always fail with ENOSYS.  Some functions are actually named
15844     something starting with __ and the normal name is an alias.  */
15845 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15846 choke me
15847 #else
15848 f = $ac_func;
15849 #endif
15850
15851 ; return 0; }
15852 EOF
15853 if { (eval echo configure:15854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15854   rm -rf conftest*
15855   eval "ac_cv_func_$ac_func=yes"
15856 else
15857   echo "configure: failed program was:" >&5
15858   cat conftest.$ac_ext >&5
15859   rm -rf conftest*
15860   eval "ac_cv_func_$ac_func=no"
15861 fi
15862 rm -f conftest*
15863 fi
15864
15865 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15866   echo "$ac_t""yes" 1>&6
15867     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15868   cat >> confdefs.h <<EOF
15869 #define $ac_tr_func 1
15870 EOF
15871  
15872 else
15873   echo "$ac_t""no" 1>&6
15874 fi
15875 done
15876
15877                 fi
15878         fi
15879
15880                 for ac_hdr in lwp/lwp.h
15881 do
15882 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15883 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15884 echo "configure:15885: checking for $ac_hdr" >&5
15885 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15886   echo $ac_n "(cached) $ac_c" 1>&6
15887 else
15888   cat > conftest.$ac_ext <<EOF
15889 #line 15890 "configure"
15890 #include "confdefs.h"
15891 #include <$ac_hdr>
15892 EOF
15893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15894 { (eval echo configure:15895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15896 if test -z "$ac_err"; then
15897   rm -rf conftest*
15898   eval "ac_cv_header_$ac_safe=yes"
15899 else
15900   echo "$ac_err" >&5
15901   echo "configure: failed program was:" >&5
15902   cat conftest.$ac_ext >&5
15903   rm -rf conftest*
15904   eval "ac_cv_header_$ac_safe=no"
15905 fi
15906 rm -f conftest*
15907 fi
15908 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15909   echo "$ac_t""yes" 1>&6
15910     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15911   cat >> confdefs.h <<EOF
15912 #define $ac_tr_hdr 1
15913 EOF
15914  
15915 else
15916   echo "$ac_t""no" 1>&6
15917 fi
15918 done
15919
15920         if test $ac_cv_header_lwp_lwp_h = yes ; then
15921                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15922 echo "configure:15923: checking for lwp_create in -llwp" >&5
15923 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15924 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15925   echo $ac_n "(cached) $ac_c" 1>&6
15926 else
15927   ac_save_LIBS="$LIBS"
15928 LIBS="-llwp  $LIBS"
15929 cat > conftest.$ac_ext <<EOF
15930 #line 15931 "configure"
15931 #include "confdefs.h"
15932 /* Override any gcc2 internal prototype to avoid an error.  */
15933 /* We use char because int might match the return type of a gcc2
15934     builtin and then its argument prototype would still apply.  */
15935 char lwp_create();
15936
15937 int main() {
15938 lwp_create()
15939 ; return 0; }
15940 EOF
15941 if { (eval echo configure:15942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15942   rm -rf conftest*
15943   eval "ac_cv_lib_$ac_lib_var=yes"
15944 else
15945   echo "configure: failed program was:" >&5
15946   cat conftest.$ac_ext >&5
15947   rm -rf conftest*
15948   eval "ac_cv_lib_$ac_lib_var=no"
15949 fi
15950 rm -f conftest*
15951 LIBS="$ac_save_LIBS"
15952
15953 fi
15954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15955   echo "$ac_t""yes" 1>&6
15956   have_lwp=yes
15957 else
15958   echo "$ac_t""no" 1>&6
15959 have_lwp=no
15960 fi
15961
15962
15963                 if test $have_lwp = yes ; then
15964                         cat >> confdefs.h <<\EOF
15965 #define HAVE_LWP 1
15966 EOF
15967
15968                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15969                         ol_link_threads=lwp
15970
15971                         if test $ol_with_yielding_select = auto ; then
15972                                 ol_with_yielding_select=no
15973                         fi
15974                 fi
15975         fi
15976 fi
15977
15978 if test $ol_with_yielding_select = yes ; then
15979         cat >> confdefs.h <<\EOF
15980 #define HAVE_YIELDING_SELECT 1
15981 EOF
15982
15983 fi
15984
15985 if test $ol_with_threads = manual ; then
15986                 ol_link_threads=yes
15987
15988         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15989
15990         for ac_hdr in pthread.h sched.h
15991 do
15992 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15993 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15994 echo "configure:15995: checking for $ac_hdr" >&5
15995 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15996   echo $ac_n "(cached) $ac_c" 1>&6
15997 else
15998   cat > conftest.$ac_ext <<EOF
15999 #line 16000 "configure"
16000 #include "confdefs.h"
16001 #include <$ac_hdr>
16002 EOF
16003 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16004 { (eval echo configure:16005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16005 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16006 if test -z "$ac_err"; then
16007   rm -rf conftest*
16008   eval "ac_cv_header_$ac_safe=yes"
16009 else
16010   echo "$ac_err" >&5
16011   echo "configure: failed program was:" >&5
16012   cat conftest.$ac_ext >&5
16013   rm -rf conftest*
16014   eval "ac_cv_header_$ac_safe=no"
16015 fi
16016 rm -f conftest*
16017 fi
16018 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16019   echo "$ac_t""yes" 1>&6
16020     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16021   cat >> confdefs.h <<EOF
16022 #define $ac_tr_hdr 1
16023 EOF
16024  
16025 else
16026   echo "$ac_t""no" 1>&6
16027 fi
16028 done
16029
16030         for ac_func in sched_yield pthread_yield
16031 do
16032 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16033 echo "configure:16034: checking for $ac_func" >&5
16034 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16035   echo $ac_n "(cached) $ac_c" 1>&6
16036 else
16037   cat > conftest.$ac_ext <<EOF
16038 #line 16039 "configure"
16039 #include "confdefs.h"
16040 /* System header to define __stub macros and hopefully few prototypes,
16041     which can conflict with char $ac_func(); below.  */
16042 #include <assert.h>
16043 /* Override any gcc2 internal prototype to avoid an error.  */
16044 /* We use char because int might match the return type of a gcc2
16045     builtin and then its argument prototype would still apply.  */
16046 char $ac_func();
16047 char (*f)();
16048
16049 int main() {
16050
16051 /* The GNU C library defines this for functions which it implements
16052     to always fail with ENOSYS.  Some functions are actually named
16053     something starting with __ and the normal name is an alias.  */
16054 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16055 choke me
16056 #else
16057 f = $ac_func;
16058 #endif
16059
16060 ; return 0; }
16061 EOF
16062 if { (eval echo configure:16063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16063   rm -rf conftest*
16064   eval "ac_cv_func_$ac_func=yes"
16065 else
16066   echo "configure: failed program was:" >&5
16067   cat conftest.$ac_ext >&5
16068   rm -rf conftest*
16069   eval "ac_cv_func_$ac_func=no"
16070 fi
16071 rm -f conftest*
16072 fi
16073
16074 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16075   echo "$ac_t""yes" 1>&6
16076     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16077   cat >> confdefs.h <<EOF
16078 #define $ac_tr_func 1
16079 EOF
16080  
16081 else
16082   echo "$ac_t""no" 1>&6
16083 fi
16084 done
16085
16086         
16087         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16088 echo "configure:16089: checking for LinuxThreads pthread.h" >&5
16089 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16090   echo $ac_n "(cached) $ac_c" 1>&6
16091 else
16092   cat > conftest.$ac_ext <<EOF
16093 #line 16094 "configure"
16094 #include "confdefs.h"
16095 #include <pthread.h>
16096 EOF
16097 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16098   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16099   rm -rf conftest*
16100   ol_cv_header_linux_threads=yes
16101 else
16102   rm -rf conftest*
16103   ol_cv_header_linux_threads=no
16104 fi
16105 rm -f conftest*
16106
16107                 
16108 fi
16109
16110 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16111         if test $ol_cv_header_linux_threads = yes; then
16112                 cat >> confdefs.h <<\EOF
16113 #define HAVE_LINUX_THREADS 1
16114 EOF
16115
16116         fi
16117
16118
16119         for ac_hdr in mach/cthreads.h
16120 do
16121 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16122 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16123 echo "configure:16124: checking for $ac_hdr" >&5
16124 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16125   echo $ac_n "(cached) $ac_c" 1>&6
16126 else
16127   cat > conftest.$ac_ext <<EOF
16128 #line 16129 "configure"
16129 #include "confdefs.h"
16130 #include <$ac_hdr>
16131 EOF
16132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16133 { (eval echo configure:16134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16135 if test -z "$ac_err"; then
16136   rm -rf conftest*
16137   eval "ac_cv_header_$ac_safe=yes"
16138 else
16139   echo "$ac_err" >&5
16140   echo "configure: failed program was:" >&5
16141   cat conftest.$ac_ext >&5
16142   rm -rf conftest*
16143   eval "ac_cv_header_$ac_safe=no"
16144 fi
16145 rm -f conftest*
16146 fi
16147 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16148   echo "$ac_t""yes" 1>&6
16149     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16150   cat >> confdefs.h <<EOF
16151 #define $ac_tr_hdr 1
16152 EOF
16153  
16154 else
16155   echo "$ac_t""no" 1>&6
16156 fi
16157 done
16158
16159         for ac_hdr in lwp/lwp.h
16160 do
16161 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16162 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16163 echo "configure:16164: checking for $ac_hdr" >&5
16164 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16165   echo $ac_n "(cached) $ac_c" 1>&6
16166 else
16167   cat > conftest.$ac_ext <<EOF
16168 #line 16169 "configure"
16169 #include "confdefs.h"
16170 #include <$ac_hdr>
16171 EOF
16172 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16173 { (eval echo configure:16174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16174 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16175 if test -z "$ac_err"; then
16176   rm -rf conftest*
16177   eval "ac_cv_header_$ac_safe=yes"
16178 else
16179   echo "$ac_err" >&5
16180   echo "configure: failed program was:" >&5
16181   cat conftest.$ac_ext >&5
16182   rm -rf conftest*
16183   eval "ac_cv_header_$ac_safe=no"
16184 fi
16185 rm -f conftest*
16186 fi
16187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16188   echo "$ac_t""yes" 1>&6
16189     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16190   cat >> confdefs.h <<EOF
16191 #define $ac_tr_hdr 1
16192 EOF
16193  
16194 else
16195   echo "$ac_t""no" 1>&6
16196 fi
16197 done
16198
16199         for ac_hdr in thread.h synch.h
16200 do
16201 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16202 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16203 echo "configure:16204: checking for $ac_hdr" >&5
16204 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16205   echo $ac_n "(cached) $ac_c" 1>&6
16206 else
16207   cat > conftest.$ac_ext <<EOF
16208 #line 16209 "configure"
16209 #include "confdefs.h"
16210 #include <$ac_hdr>
16211 EOF
16212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16213 { (eval echo configure:16214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16215 if test -z "$ac_err"; then
16216   rm -rf conftest*
16217   eval "ac_cv_header_$ac_safe=yes"
16218 else
16219   echo "$ac_err" >&5
16220   echo "configure: failed program was:" >&5
16221   cat conftest.$ac_ext >&5
16222   rm -rf conftest*
16223   eval "ac_cv_header_$ac_safe=no"
16224 fi
16225 rm -f conftest*
16226 fi
16227 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16228   echo "$ac_t""yes" 1>&6
16229     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16230   cat >> confdefs.h <<EOF
16231 #define $ac_tr_hdr 1
16232 EOF
16233  
16234 else
16235   echo "$ac_t""no" 1>&6
16236 fi
16237 done
16238
16239 fi
16240
16241 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16242                         cat >> confdefs.h <<\EOF
16243 #define REENTRANT 1
16244 EOF
16245
16246         cat >> confdefs.h <<\EOF
16247 #define _REENTRANT 1
16248 EOF
16249
16250         cat >> confdefs.h <<\EOF
16251 #define THREAD_SAFE 1
16252 EOF
16253
16254         cat >> confdefs.h <<\EOF
16255 #define _THREAD_SAFE 1
16256 EOF
16257
16258         cat >> confdefs.h <<\EOF
16259 #define THREADSAFE 1
16260 EOF
16261
16262         cat >> confdefs.h <<\EOF
16263 #define _THREADSAFE 1
16264 EOF
16265
16266         cat >> confdefs.h <<\EOF
16267 #define _SGI_MP_SOURCE 1
16268 EOF
16269
16270
16271                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16272 echo "configure:16273: checking for thread specific errno" >&5
16273 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16274   echo $ac_n "(cached) $ac_c" 1>&6
16275 else
16276   
16277                 cat > conftest.$ac_ext <<EOF
16278 #line 16279 "configure"
16279 #include "confdefs.h"
16280 #include <errno.h>
16281 int main() {
16282 errno = 0;
16283 ; return 0; }
16284 EOF
16285 if { (eval echo configure:16286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16286   rm -rf conftest*
16287   ol_cv_errno_thread_specific=yes
16288 else
16289   echo "configure: failed program was:" >&5
16290   cat conftest.$ac_ext >&5
16291   rm -rf conftest*
16292   ol_cv_errno_thread_specific=no
16293 fi
16294 rm -f conftest*
16295         
16296 fi
16297
16298 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16299
16300                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16301 echo "configure:16302: checking for thread specific h_errno" >&5
16302 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16303   echo $ac_n "(cached) $ac_c" 1>&6
16304 else
16305   
16306                 cat > conftest.$ac_ext <<EOF
16307 #line 16308 "configure"
16308 #include "confdefs.h"
16309 #include <netdb.h>
16310 int main() {
16311 h_errno = 0;
16312 ; return 0; }
16313 EOF
16314 if { (eval echo configure:16315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16315   rm -rf conftest*
16316   ol_cv_h_errno_thread_specific=yes
16317 else
16318   echo "configure: failed program was:" >&5
16319   cat conftest.$ac_ext >&5
16320   rm -rf conftest*
16321   ol_cv_h_errno_thread_specific=no
16322 fi
16323 rm -f conftest*
16324         
16325 fi
16326
16327 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16328
16329         if test $ol_cv_errno_thread_specific != yes \
16330                 -o $ol_cv_h_errno_thread_specific != yes ; then
16331                 LIBS="$LTHREAD_LIBS $LIBS"
16332                 LTHREAD_LIBS=""
16333         fi
16334
16335 fi  
16336
16337 if test $ol_link_threads = no ; then
16338         if test $ol_with_threads = yes ; then
16339                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16340         fi
16341
16342         if test $ol_with_threads = auto ; then
16343                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16344                 ol_with_threads=no
16345         fi
16346
16347         cat >> confdefs.h <<\EOF
16348 #define NO_THREADS 1
16349 EOF
16350
16351         LTHREAD_LIBS=""
16352 fi
16353
16354 if test $ol_link_threads != no ; then
16355         cat >> confdefs.h <<\EOF
16356 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16357 EOF
16358
16359 fi
16360
16361 for ac_func in \
16362         ctime_r                 \
16363         gethostbyname_r gethostbyaddr_r \
16364
16365 do
16366 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16367 echo "configure:16368: checking for $ac_func" >&5
16368 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16369   echo $ac_n "(cached) $ac_c" 1>&6
16370 else
16371   cat > conftest.$ac_ext <<EOF
16372 #line 16373 "configure"
16373 #include "confdefs.h"
16374 /* System header to define __stub macros and hopefully few prototypes,
16375     which can conflict with char $ac_func(); below.  */
16376 #include <assert.h>
16377 /* Override any gcc2 internal prototype to avoid an error.  */
16378 /* We use char because int might match the return type of a gcc2
16379     builtin and then its argument prototype would still apply.  */
16380 char $ac_func();
16381 char (*f)();
16382
16383 int main() {
16384
16385 /* The GNU C library defines this for functions which it implements
16386     to always fail with ENOSYS.  Some functions are actually named
16387     something starting with __ and the normal name is an alias.  */
16388 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16389 choke me
16390 #else
16391 f = $ac_func;
16392 #endif
16393
16394 ; return 0; }
16395 EOF
16396 if { (eval echo configure:16397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16397   rm -rf conftest*
16398   eval "ac_cv_func_$ac_func=yes"
16399 else
16400   echo "configure: failed program was:" >&5
16401   cat conftest.$ac_ext >&5
16402   rm -rf conftest*
16403   eval "ac_cv_func_$ac_func=no"
16404 fi
16405 rm -f conftest*
16406 fi
16407
16408 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16409   echo "$ac_t""yes" 1>&6
16410     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16411   cat >> confdefs.h <<EOF
16412 #define $ac_tr_func 1
16413 EOF
16414  
16415 else
16416   echo "$ac_t""no" 1>&6
16417 fi
16418 done
16419
16420
16421 if test "$ac_cv_func_ctime_r" = no ; then
16422         ol_cv_func_ctime_r_nargs=0
16423 else
16424         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16425 echo "configure:16426: checking number of arguments of ctime_r" >&5
16426 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16427   echo $ac_n "(cached) $ac_c" 1>&6
16428 else
16429   cat > conftest.$ac_ext <<EOF
16430 #line 16431 "configure"
16431 #include "confdefs.h"
16432 #include <time.h>
16433 int main() {
16434 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16435 ; return 0; }
16436 EOF
16437 if { (eval echo configure:16438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16438   rm -rf conftest*
16439   ol_cv_func_ctime_r_nargs3=yes
16440 else
16441   echo "configure: failed program was:" >&5
16442   cat conftest.$ac_ext >&5
16443   rm -rf conftest*
16444   ol_cv_func_ctime_r_nargs3=no
16445 fi
16446 rm -f conftest*
16447
16448         cat > conftest.$ac_ext <<EOF
16449 #line 16450 "configure"
16450 #include "confdefs.h"
16451 #include <time.h>
16452 int main() {
16453 time_t ti; char *buffer; ctime_r(&ti,buffer);
16454 ; return 0; }
16455 EOF
16456 if { (eval echo configure:16457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16457   rm -rf conftest*
16458   ol_cv_func_ctime_r_nargs2=yes
16459 else
16460   echo "configure: failed program was:" >&5
16461   cat conftest.$ac_ext >&5
16462   rm -rf conftest*
16463   ol_cv_func_ctime_r_nargs2=no
16464 fi
16465 rm -f conftest*
16466
16467         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16468                 $ol_cv_func_ctime_r_nargs2 = no ; then
16469
16470                 ol_cv_func_ctime_r_nargs=3
16471
16472         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16473                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16474
16475                 ol_cv_func_ctime_r_nargs=2
16476
16477         else
16478                 ol_cv_func_ctime_r_nargs=0
16479         fi
16480   
16481 fi
16482
16483 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16484
16485   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16486         cat >> confdefs.h <<EOF
16487 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16488 EOF
16489
16490   fi
16491
16492 fi
16493
16494 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16495         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16496 echo "configure:16497: checking number of arguments of gethostbyname_r" >&5
16497 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16498   echo $ac_n "(cached) $ac_c" 1>&6
16499 else
16500   cat > conftest.$ac_ext <<EOF
16501 #line 16502 "configure"
16502 #include "confdefs.h"
16503 #include <sys/types.h>
16504 #include <sys/socket.h>
16505 #include <netinet/in.h>
16506 #include <netdb.h>
16507 #define BUFSIZE (sizeof(struct hostent)+10)
16508 int main() {
16509 struct hostent hent; char buffer[BUFSIZE];
16510                 int bufsize=BUFSIZE;int h_errno;
16511                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16512                         buffer, bufsize, &h_errno);
16513 ; return 0; }
16514 EOF
16515 if { (eval echo configure:16516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16516   rm -rf conftest*
16517   ol_cv_func_gethostbyname_r_nargs5=yes
16518 else
16519   echo "configure: failed program was:" >&5
16520   cat conftest.$ac_ext >&5
16521   rm -rf conftest*
16522   ol_cv_func_gethostbyname_r_nargs5=no
16523 fi
16524 rm -f conftest*
16525
16526         cat > conftest.$ac_ext <<EOF
16527 #line 16528 "configure"
16528 #include "confdefs.h"
16529 #include <sys/types.h>
16530 #include <sys/socket.h>
16531 #include <netinet/in.h>
16532 #include <netdb.h>
16533 #define BUFSIZE (sizeof(struct hostent)+10)
16534 int main() {
16535 struct hostent hent;struct hostent *rhent;
16536                 char buffer[BUFSIZE];
16537                 int bufsize=BUFSIZE;int h_errno;
16538                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16539                         &rhent, &h_errno);
16540 ; return 0; }
16541 EOF
16542 if { (eval echo configure:16543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16543   rm -rf conftest*
16544   ol_cv_func_gethostbyname_r_nargs6=yes
16545 else
16546   echo "configure: failed program was:" >&5
16547   cat conftest.$ac_ext >&5
16548   rm -rf conftest*
16549   ol_cv_func_gethostbyname_r_nargs6=no
16550 fi
16551 rm -f conftest*
16552
16553         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16554                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16555
16556                 ol_cv_func_gethostbyname_r_nargs=5
16557
16558         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16559                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16560
16561                 ol_cv_func_gethostbyname_r_nargs=6
16562
16563         else
16564                 ol_cv_func_gethostbyname_r_nargs=0
16565         fi
16566   
16567 fi
16568
16569 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16570   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16571         cat >> confdefs.h <<EOF
16572 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16573 EOF
16574
16575   fi
16576
16577 else
16578         ol_cv_func_gethostbyname_r_nargs=0
16579 fi
16580  
16581 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16582         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16583 echo "configure:16584: checking number of arguments of gethostbyaddr_r" >&5
16584 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16585   echo $ac_n "(cached) $ac_c" 1>&6
16586 else
16587   cat > conftest.$ac_ext <<EOF
16588 #line 16589 "configure"
16589 #include "confdefs.h"
16590 #include <sys/types.h>
16591 #include <sys/socket.h>
16592 #include <netinet/in.h>
16593 #include <netdb.h>
16594 #define BUFSIZE (sizeof(struct hostent)+10)
16595 int main() {
16596 struct hostent hent; char buffer[BUFSIZE]; 
16597             struct in_addr add;
16598             size_t alen=sizeof(struct in_addr);
16599             int bufsize=BUFSIZE;int h_errno;
16600                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16601                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16602 ; return 0; }
16603 EOF
16604 if { (eval echo configure:16605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16605   rm -rf conftest*
16606   ol_cv_func_gethostbyaddr_r_nargs7=yes
16607 else
16608   echo "configure: failed program was:" >&5
16609   cat conftest.$ac_ext >&5
16610   rm -rf conftest*
16611   ol_cv_func_gethostbyaddr_r_nargs7=no
16612 fi
16613 rm -f conftest*
16614
16615         cat > conftest.$ac_ext <<EOF
16616 #line 16617 "configure"
16617 #include "confdefs.h"
16618 #include <sys/types.h>
16619 #include <sys/socket.h>
16620 #include <netinet/in.h>
16621 #include <netdb.h>
16622 #define BUFSIZE (sizeof(struct hostent)+10)
16623 int main() {
16624 struct hostent hent;
16625                 struct hostent *rhent; char buffer[BUFSIZE]; 
16626                 struct in_addr add;
16627                 size_t alen=sizeof(struct in_addr);
16628                 int bufsize=BUFSIZE;int h_errno;
16629                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16630                         alen, AF_INET, &hent, buffer, bufsize, 
16631                         &rhent, &h_errno);
16632 ; return 0; }
16633 EOF
16634 if { (eval echo configure:16635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16635   rm -rf conftest*
16636   ol_cv_func_gethostbyaddr_r_nargs8=yes
16637 else
16638   echo "configure: failed program was:" >&5
16639   cat conftest.$ac_ext >&5
16640   rm -rf conftest*
16641   ol_cv_func_gethostbyaddr_r_nargs8=no
16642 fi
16643 rm -f conftest*
16644
16645         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16646                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16647
16648                 ol_cv_func_gethostbyaddr_r_nargs=7
16649
16650         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16651                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16652
16653                 ol_cv_func_gethostbyaddr_r_nargs=8
16654
16655         else
16656                 ol_cv_func_gethostbyaddr_r_nargs=0
16657         fi
16658   
16659 fi
16660
16661 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16662   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16663     cat >> confdefs.h <<EOF
16664 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16665 EOF
16666
16667   fi
16668
16669 else
16670         ol_cv_func_gethostbyaddr_r_nargs=0
16671 fi
16672
16673 ol_link_ldbm=no 
16674
16675 if test $ol_with_ldbm_api = auto \
16676         -o $ol_with_ldbm_api = berkeley \
16677         -o $ol_with_ldbm_api = bcompat ; then
16678
16679         if test $ol_with_ldbm_api = bcompat; then \
16680                 for ac_hdr in db_185.h db.h
16681 do
16682 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16683 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16684 echo "configure:16685: checking for $ac_hdr" >&5
16685 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16686   echo $ac_n "(cached) $ac_c" 1>&6
16687 else
16688   cat > conftest.$ac_ext <<EOF
16689 #line 16690 "configure"
16690 #include "confdefs.h"
16691 #include <$ac_hdr>
16692 EOF
16693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16694 { (eval echo configure:16695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16696 if test -z "$ac_err"; then
16697   rm -rf conftest*
16698   eval "ac_cv_header_$ac_safe=yes"
16699 else
16700   echo "$ac_err" >&5
16701   echo "configure: failed program was:" >&5
16702   cat conftest.$ac_ext >&5
16703   rm -rf conftest*
16704   eval "ac_cv_header_$ac_safe=no"
16705 fi
16706 rm -f conftest*
16707 fi
16708 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16709   echo "$ac_t""yes" 1>&6
16710     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16711   cat >> confdefs.h <<EOF
16712 #define $ac_tr_hdr 1
16713 EOF
16714  
16715 else
16716   echo "$ac_t""no" 1>&6
16717 fi
16718 done
16719
16720 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16721         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16722 echo "configure:16723: checking if Berkeley DB header compatibility" >&5
16723 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16724   echo $ac_n "(cached) $ac_c" 1>&6
16725 else
16726   
16727                 cat > conftest.$ac_ext <<EOF
16728 #line 16729 "configure"
16729 #include "confdefs.h"
16730
16731 #if HAVE_DB_185_H
16732 #       include <db_185.h>
16733 #else
16734 #       include <db.h>
16735 #endif
16736
16737  /* this check could be improved */
16738 #ifndef DB_VERSION_MAJOR
16739 #       define DB_VERSION_MAJOR 1
16740 #endif
16741
16742 #if DB_VERSION_MAJOR == 1 
16743         __db_version_1
16744 #endif
16745
16746 EOF
16747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16748   egrep "__db_version_1" >/dev/null 2>&1; then
16749   rm -rf conftest*
16750   ol_cv_header_db1=yes
16751 else
16752   rm -rf conftest*
16753   ol_cv_header_db1=no
16754 fi
16755 rm -f conftest*
16756
16757 fi
16758
16759 echo "$ac_t""$ol_cv_header_db1" 1>&6
16760
16761         if test $ol_cv_header_db1 = yes ; then
16762                 ol_cv_lib_db=no
16763 if test $ol_cv_lib_db = no ; then
16764         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16765 echo "configure:16766: checking for Berkeley DB link (default)" >&5
16766 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16767   echo $ac_n "(cached) $ac_c" 1>&6
16768 else
16769   
16770         ol_DB_LIB=
16771         ol_LIBS=$LIBS
16772         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16773
16774         cat > conftest.$ac_ext <<EOF
16775 #line 16776 "configure"
16776 #include "confdefs.h"
16777
16778 #ifdef HAVE_DB_185_H
16779 # include <db_185.h>
16780 #else
16781 # include <db.h>
16782 #endif
16783
16784 #ifndef DB_VERSION_MAJOR
16785 # define DB_VERSION_MAJOR 1
16786 #endif
16787
16788 #ifndef NULL
16789 #define NULL ((void*)0)
16790 #endif
16791
16792 int main() {
16793
16794 #if DB_VERSION_MAJOR > 1
16795         {
16796                 char *version;
16797                 int major, minor, patch;
16798
16799                 version = db_version( &major, &minor, &patch );
16800
16801                 if( major != DB_VERSION_MAJOR ||
16802                         minor < DB_VERSION_MINOR )
16803                 {
16804                         printf("Berkeley DB version mismatch\n"
16805                                 "\texpected: %s\n\tgot: %s\n",
16806                                 DB_VERSION_STRING, version);
16807                         return 1;
16808                 }
16809         }
16810 #endif
16811
16812 #if DB_VERSION_MAJOR > 2
16813         db_env_create( NULL, 0 );
16814 #elif DB_VERSION_MAJOR > 1
16815         db_appexit( NULL );
16816 #else
16817         (void) dbopen( NULL, 0, 0, 0, NULL);
16818 #endif
16819
16820 ; return 0; }
16821 EOF
16822 if { (eval echo configure:16823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16823   rm -rf conftest*
16824   ol_cv_db_none=yes
16825 else
16826   echo "configure: failed program was:" >&5
16827   cat conftest.$ac_ext >&5
16828   rm -rf conftest*
16829   ol_cv_db_none=no
16830 fi
16831 rm -f conftest*
16832
16833         LIBS="$ol_LIBS"
16834
16835 fi
16836
16837 echo "$ac_t""$ol_cv_db_none" 1>&6
16838
16839         if test $ol_cv_db_none = yes ; then
16840                 ol_cv_lib_db=yes
16841         fi
16842 fi
16843
16844 if test $ol_cv_lib_db = no ; then
16845         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16846 echo "configure:16847: checking for Berkeley DB link (-ldb42)" >&5
16847 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16848   echo $ac_n "(cached) $ac_c" 1>&6
16849 else
16850   
16851         ol_DB_LIB=-ldb42
16852         ol_LIBS=$LIBS
16853         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16854
16855         cat > conftest.$ac_ext <<EOF
16856 #line 16857 "configure"
16857 #include "confdefs.h"
16858
16859 #ifdef HAVE_DB_185_H
16860 # include <db_185.h>
16861 #else
16862 # include <db.h>
16863 #endif
16864
16865 #ifndef DB_VERSION_MAJOR
16866 # define DB_VERSION_MAJOR 1
16867 #endif
16868
16869 #ifndef NULL
16870 #define NULL ((void*)0)
16871 #endif
16872
16873 int main() {
16874
16875 #if DB_VERSION_MAJOR > 1
16876         {
16877                 char *version;
16878                 int major, minor, patch;
16879
16880                 version = db_version( &major, &minor, &patch );
16881
16882                 if( major != DB_VERSION_MAJOR ||
16883                         minor < DB_VERSION_MINOR )
16884                 {
16885                         printf("Berkeley DB version mismatch\n"
16886                                 "\texpected: %s\n\tgot: %s\n",
16887                                 DB_VERSION_STRING, version);
16888                         return 1;
16889                 }
16890         }
16891 #endif
16892
16893 #if DB_VERSION_MAJOR > 2
16894         db_env_create( NULL, 0 );
16895 #elif DB_VERSION_MAJOR > 1
16896         db_appexit( NULL );
16897 #else
16898         (void) dbopen( NULL, 0, 0, 0, NULL);
16899 #endif
16900
16901 ; return 0; }
16902 EOF
16903 if { (eval echo configure:16904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16904   rm -rf conftest*
16905   ol_cv_db_db42=yes
16906 else
16907   echo "configure: failed program was:" >&5
16908   cat conftest.$ac_ext >&5
16909   rm -rf conftest*
16910   ol_cv_db_db42=no
16911 fi
16912 rm -f conftest*
16913
16914         LIBS="$ol_LIBS"
16915
16916 fi
16917
16918 echo "$ac_t""$ol_cv_db_db42" 1>&6
16919
16920         if test $ol_cv_db_db42 = yes ; then
16921                 ol_cv_lib_db=-ldb42
16922         fi
16923 fi
16924
16925 if test $ol_cv_lib_db = no ; then
16926         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16927 echo "configure:16928: checking for Berkeley DB link (-ldb-42)" >&5
16928 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16929   echo $ac_n "(cached) $ac_c" 1>&6
16930 else
16931   
16932         ol_DB_LIB=-ldb-42
16933         ol_LIBS=$LIBS
16934         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16935
16936         cat > conftest.$ac_ext <<EOF
16937 #line 16938 "configure"
16938 #include "confdefs.h"
16939
16940 #ifdef HAVE_DB_185_H
16941 # include <db_185.h>
16942 #else
16943 # include <db.h>
16944 #endif
16945
16946 #ifndef DB_VERSION_MAJOR
16947 # define DB_VERSION_MAJOR 1
16948 #endif
16949
16950 #ifndef NULL
16951 #define NULL ((void*)0)
16952 #endif
16953
16954 int main() {
16955
16956 #if DB_VERSION_MAJOR > 1
16957         {
16958                 char *version;
16959                 int major, minor, patch;
16960
16961                 version = db_version( &major, &minor, &patch );
16962
16963                 if( major != DB_VERSION_MAJOR ||
16964                         minor < DB_VERSION_MINOR )
16965                 {
16966                         printf("Berkeley DB version mismatch\n"
16967                                 "\texpected: %s\n\tgot: %s\n",
16968                                 DB_VERSION_STRING, version);
16969                         return 1;
16970                 }
16971         }
16972 #endif
16973
16974 #if DB_VERSION_MAJOR > 2
16975         db_env_create( NULL, 0 );
16976 #elif DB_VERSION_MAJOR > 1
16977         db_appexit( NULL );
16978 #else
16979         (void) dbopen( NULL, 0, 0, 0, NULL);
16980 #endif
16981
16982 ; return 0; }
16983 EOF
16984 if { (eval echo configure:16985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16985   rm -rf conftest*
16986   ol_cv_db_db_42=yes
16987 else
16988   echo "configure: failed program was:" >&5
16989   cat conftest.$ac_ext >&5
16990   rm -rf conftest*
16991   ol_cv_db_db_42=no
16992 fi
16993 rm -f conftest*
16994
16995         LIBS="$ol_LIBS"
16996
16997 fi
16998
16999 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17000
17001         if test $ol_cv_db_db_42 = yes ; then
17002                 ol_cv_lib_db=-ldb-42
17003         fi
17004 fi
17005
17006 if test $ol_cv_lib_db = no ; then
17007         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17008 echo "configure:17009: checking for Berkeley DB link (-ldb-4.2)" >&5
17009 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17010   echo $ac_n "(cached) $ac_c" 1>&6
17011 else
17012   
17013         ol_DB_LIB=-ldb-4.2
17014         ol_LIBS=$LIBS
17015         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17016
17017         cat > conftest.$ac_ext <<EOF
17018 #line 17019 "configure"
17019 #include "confdefs.h"
17020
17021 #ifdef HAVE_DB_185_H
17022 # include <db_185.h>
17023 #else
17024 # include <db.h>
17025 #endif
17026
17027 #ifndef DB_VERSION_MAJOR
17028 # define DB_VERSION_MAJOR 1
17029 #endif
17030
17031 #ifndef NULL
17032 #define NULL ((void*)0)
17033 #endif
17034
17035 int main() {
17036
17037 #if DB_VERSION_MAJOR > 1
17038         {
17039                 char *version;
17040                 int major, minor, patch;
17041
17042                 version = db_version( &major, &minor, &patch );
17043
17044                 if( major != DB_VERSION_MAJOR ||
17045                         minor < DB_VERSION_MINOR )
17046                 {
17047                         printf("Berkeley DB version mismatch\n"
17048                                 "\texpected: %s\n\tgot: %s\n",
17049                                 DB_VERSION_STRING, version);
17050                         return 1;
17051                 }
17052         }
17053 #endif
17054
17055 #if DB_VERSION_MAJOR > 2
17056         db_env_create( NULL, 0 );
17057 #elif DB_VERSION_MAJOR > 1
17058         db_appexit( NULL );
17059 #else
17060         (void) dbopen( NULL, 0, 0, 0, NULL);
17061 #endif
17062
17063 ; return 0; }
17064 EOF
17065 if { (eval echo configure:17066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17066   rm -rf conftest*
17067   ol_cv_db_db_4_dot_2=yes
17068 else
17069   echo "configure: failed program was:" >&5
17070   cat conftest.$ac_ext >&5
17071   rm -rf conftest*
17072   ol_cv_db_db_4_dot_2=no
17073 fi
17074 rm -f conftest*
17075
17076         LIBS="$ol_LIBS"
17077
17078 fi
17079
17080 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17081
17082         if test $ol_cv_db_db_4_dot_2 = yes ; then
17083                 ol_cv_lib_db=-ldb-4.2
17084         fi
17085 fi
17086
17087 if test $ol_cv_lib_db = no ; then
17088         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17089 echo "configure:17090: checking for Berkeley DB link (-ldb-4-2)" >&5
17090 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17091   echo $ac_n "(cached) $ac_c" 1>&6
17092 else
17093   
17094         ol_DB_LIB=-ldb-4-2
17095         ol_LIBS=$LIBS
17096         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17097
17098         cat > conftest.$ac_ext <<EOF
17099 #line 17100 "configure"
17100 #include "confdefs.h"
17101
17102 #ifdef HAVE_DB_185_H
17103 # include <db_185.h>
17104 #else
17105 # include <db.h>
17106 #endif
17107
17108 #ifndef DB_VERSION_MAJOR
17109 # define DB_VERSION_MAJOR 1
17110 #endif
17111
17112 #ifndef NULL
17113 #define NULL ((void*)0)
17114 #endif
17115
17116 int main() {
17117
17118 #if DB_VERSION_MAJOR > 1
17119         {
17120                 char *version;
17121                 int major, minor, patch;
17122
17123                 version = db_version( &major, &minor, &patch );
17124
17125                 if( major != DB_VERSION_MAJOR ||
17126                         minor < DB_VERSION_MINOR )
17127                 {
17128                         printf("Berkeley DB version mismatch\n"
17129                                 "\texpected: %s\n\tgot: %s\n",
17130                                 DB_VERSION_STRING, version);
17131                         return 1;
17132                 }
17133         }
17134 #endif
17135
17136 #if DB_VERSION_MAJOR > 2
17137         db_env_create( NULL, 0 );
17138 #elif DB_VERSION_MAJOR > 1
17139         db_appexit( NULL );
17140 #else
17141         (void) dbopen( NULL, 0, 0, 0, NULL);
17142 #endif
17143
17144 ; return 0; }
17145 EOF
17146 if { (eval echo configure:17147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17147   rm -rf conftest*
17148   ol_cv_db_db_4_2=yes
17149 else
17150   echo "configure: failed program was:" >&5
17151   cat conftest.$ac_ext >&5
17152   rm -rf conftest*
17153   ol_cv_db_db_4_2=no
17154 fi
17155 rm -f conftest*
17156
17157         LIBS="$ol_LIBS"
17158
17159 fi
17160
17161 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17162
17163         if test $ol_cv_db_db_4_2 = yes ; then
17164                 ol_cv_lib_db=-ldb-4-2
17165         fi
17166 fi
17167
17168 if test $ol_cv_lib_db = no ; then
17169         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17170 echo "configure:17171: checking for Berkeley DB link (-ldb-4)" >&5
17171 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17172   echo $ac_n "(cached) $ac_c" 1>&6
17173 else
17174   
17175         ol_DB_LIB=-ldb-4
17176         ol_LIBS=$LIBS
17177         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17178
17179         cat > conftest.$ac_ext <<EOF
17180 #line 17181 "configure"
17181 #include "confdefs.h"
17182
17183 #ifdef HAVE_DB_185_H
17184 # include <db_185.h>
17185 #else
17186 # include <db.h>
17187 #endif
17188
17189 #ifndef DB_VERSION_MAJOR
17190 # define DB_VERSION_MAJOR 1
17191 #endif
17192
17193 #ifndef NULL
17194 #define NULL ((void*)0)
17195 #endif
17196
17197 int main() {
17198
17199 #if DB_VERSION_MAJOR > 1
17200         {
17201                 char *version;
17202                 int major, minor, patch;
17203
17204                 version = db_version( &major, &minor, &patch );
17205
17206                 if( major != DB_VERSION_MAJOR ||
17207                         minor < DB_VERSION_MINOR )
17208                 {
17209                         printf("Berkeley DB version mismatch\n"
17210                                 "\texpected: %s\n\tgot: %s\n",
17211                                 DB_VERSION_STRING, version);
17212                         return 1;
17213                 }
17214         }
17215 #endif
17216
17217 #if DB_VERSION_MAJOR > 2
17218         db_env_create( NULL, 0 );
17219 #elif DB_VERSION_MAJOR > 1
17220         db_appexit( NULL );
17221 #else
17222         (void) dbopen( NULL, 0, 0, 0, NULL);
17223 #endif
17224
17225 ; return 0; }
17226 EOF
17227 if { (eval echo configure:17228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17228   rm -rf conftest*
17229   ol_cv_db_db_4=yes
17230 else
17231   echo "configure: failed program was:" >&5
17232   cat conftest.$ac_ext >&5
17233   rm -rf conftest*
17234   ol_cv_db_db_4=no
17235 fi
17236 rm -f conftest*
17237
17238         LIBS="$ol_LIBS"
17239
17240 fi
17241
17242 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17243
17244         if test $ol_cv_db_db_4 = yes ; then
17245                 ol_cv_lib_db=-ldb-4
17246         fi
17247 fi
17248
17249 if test $ol_cv_lib_db = no ; then
17250         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17251 echo "configure:17252: checking for Berkeley DB link (-ldb4)" >&5
17252 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17253   echo $ac_n "(cached) $ac_c" 1>&6
17254 else
17255   
17256         ol_DB_LIB=-ldb4
17257         ol_LIBS=$LIBS
17258         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17259
17260         cat > conftest.$ac_ext <<EOF
17261 #line 17262 "configure"
17262 #include "confdefs.h"
17263
17264 #ifdef HAVE_DB_185_H
17265 # include <db_185.h>
17266 #else
17267 # include <db.h>
17268 #endif
17269
17270 #ifndef DB_VERSION_MAJOR
17271 # define DB_VERSION_MAJOR 1
17272 #endif
17273
17274 #ifndef NULL
17275 #define NULL ((void*)0)
17276 #endif
17277
17278 int main() {
17279
17280 #if DB_VERSION_MAJOR > 1
17281         {
17282                 char *version;
17283                 int major, minor, patch;
17284
17285                 version = db_version( &major, &minor, &patch );
17286
17287                 if( major != DB_VERSION_MAJOR ||
17288                         minor < DB_VERSION_MINOR )
17289                 {
17290                         printf("Berkeley DB version mismatch\n"
17291                                 "\texpected: %s\n\tgot: %s\n",
17292                                 DB_VERSION_STRING, version);
17293                         return 1;
17294                 }
17295         }
17296 #endif
17297
17298 #if DB_VERSION_MAJOR > 2
17299         db_env_create( NULL, 0 );
17300 #elif DB_VERSION_MAJOR > 1
17301         db_appexit( NULL );
17302 #else
17303         (void) dbopen( NULL, 0, 0, 0, NULL);
17304 #endif
17305
17306 ; return 0; }
17307 EOF
17308 if { (eval echo configure:17309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17309   rm -rf conftest*
17310   ol_cv_db_db4=yes
17311 else
17312   echo "configure: failed program was:" >&5
17313   cat conftest.$ac_ext >&5
17314   rm -rf conftest*
17315   ol_cv_db_db4=no
17316 fi
17317 rm -f conftest*
17318
17319         LIBS="$ol_LIBS"
17320
17321 fi
17322
17323 echo "$ac_t""$ol_cv_db_db4" 1>&6
17324
17325         if test $ol_cv_db_db4 = yes ; then
17326                 ol_cv_lib_db=-ldb4
17327         fi
17328 fi
17329
17330 if test $ol_cv_lib_db = no ; then
17331         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17332 echo "configure:17333: checking for Berkeley DB link (-ldb)" >&5
17333 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17334   echo $ac_n "(cached) $ac_c" 1>&6
17335 else
17336   
17337         ol_DB_LIB=-ldb
17338         ol_LIBS=$LIBS
17339         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17340
17341         cat > conftest.$ac_ext <<EOF
17342 #line 17343 "configure"
17343 #include "confdefs.h"
17344
17345 #ifdef HAVE_DB_185_H
17346 # include <db_185.h>
17347 #else
17348 # include <db.h>
17349 #endif
17350
17351 #ifndef DB_VERSION_MAJOR
17352 # define DB_VERSION_MAJOR 1
17353 #endif
17354
17355 #ifndef NULL
17356 #define NULL ((void*)0)
17357 #endif
17358
17359 int main() {
17360
17361 #if DB_VERSION_MAJOR > 1
17362         {
17363                 char *version;
17364                 int major, minor, patch;
17365
17366                 version = db_version( &major, &minor, &patch );
17367
17368                 if( major != DB_VERSION_MAJOR ||
17369                         minor < DB_VERSION_MINOR )
17370                 {
17371                         printf("Berkeley DB version mismatch\n"
17372                                 "\texpected: %s\n\tgot: %s\n",
17373                                 DB_VERSION_STRING, version);
17374                         return 1;
17375                 }
17376         }
17377 #endif
17378
17379 #if DB_VERSION_MAJOR > 2
17380         db_env_create( NULL, 0 );
17381 #elif DB_VERSION_MAJOR > 1
17382         db_appexit( NULL );
17383 #else
17384         (void) dbopen( NULL, 0, 0, 0, NULL);
17385 #endif
17386
17387 ; return 0; }
17388 EOF
17389 if { (eval echo configure:17390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17390   rm -rf conftest*
17391   ol_cv_db_db=yes
17392 else
17393   echo "configure: failed program was:" >&5
17394   cat conftest.$ac_ext >&5
17395   rm -rf conftest*
17396   ol_cv_db_db=no
17397 fi
17398 rm -f conftest*
17399
17400         LIBS="$ol_LIBS"
17401
17402 fi
17403
17404 echo "$ac_t""$ol_cv_db_db" 1>&6
17405
17406         if test $ol_cv_db_db = yes ; then
17407                 ol_cv_lib_db=-ldb
17408         fi
17409 fi
17410
17411 if test $ol_cv_lib_db = no ; then
17412         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17413 echo "configure:17414: checking for Berkeley DB link (-ldb41)" >&5
17414 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17415   echo $ac_n "(cached) $ac_c" 1>&6
17416 else
17417   
17418         ol_DB_LIB=-ldb41
17419         ol_LIBS=$LIBS
17420         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17421
17422         cat > conftest.$ac_ext <<EOF
17423 #line 17424 "configure"
17424 #include "confdefs.h"
17425
17426 #ifdef HAVE_DB_185_H
17427 # include <db_185.h>
17428 #else
17429 # include <db.h>
17430 #endif
17431
17432 #ifndef DB_VERSION_MAJOR
17433 # define DB_VERSION_MAJOR 1
17434 #endif
17435
17436 #ifndef NULL
17437 #define NULL ((void*)0)
17438 #endif
17439
17440 int main() {
17441
17442 #if DB_VERSION_MAJOR > 1
17443         {
17444                 char *version;
17445                 int major, minor, patch;
17446
17447                 version = db_version( &major, &minor, &patch );
17448
17449                 if( major != DB_VERSION_MAJOR ||
17450                         minor < DB_VERSION_MINOR )
17451                 {
17452                         printf("Berkeley DB version mismatch\n"
17453                                 "\texpected: %s\n\tgot: %s\n",
17454                                 DB_VERSION_STRING, version);
17455                         return 1;
17456                 }
17457         }
17458 #endif
17459
17460 #if DB_VERSION_MAJOR > 2
17461         db_env_create( NULL, 0 );
17462 #elif DB_VERSION_MAJOR > 1
17463         db_appexit( NULL );
17464 #else
17465         (void) dbopen( NULL, 0, 0, 0, NULL);
17466 #endif
17467
17468 ; return 0; }
17469 EOF
17470 if { (eval echo configure:17471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17471   rm -rf conftest*
17472   ol_cv_db_db41=yes
17473 else
17474   echo "configure: failed program was:" >&5
17475   cat conftest.$ac_ext >&5
17476   rm -rf conftest*
17477   ol_cv_db_db41=no
17478 fi
17479 rm -f conftest*
17480
17481         LIBS="$ol_LIBS"
17482
17483 fi
17484
17485 echo "$ac_t""$ol_cv_db_db41" 1>&6
17486
17487         if test $ol_cv_db_db41 = yes ; then
17488                 ol_cv_lib_db=-ldb41
17489         fi
17490 fi
17491
17492 if test $ol_cv_lib_db = no ; then
17493         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17494 echo "configure:17495: checking for Berkeley DB link (-ldb-41)" >&5
17495 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17496   echo $ac_n "(cached) $ac_c" 1>&6
17497 else
17498   
17499         ol_DB_LIB=-ldb-41
17500         ol_LIBS=$LIBS
17501         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17502
17503         cat > conftest.$ac_ext <<EOF
17504 #line 17505 "configure"
17505 #include "confdefs.h"
17506
17507 #ifdef HAVE_DB_185_H
17508 # include <db_185.h>
17509 #else
17510 # include <db.h>
17511 #endif
17512
17513 #ifndef DB_VERSION_MAJOR
17514 # define DB_VERSION_MAJOR 1
17515 #endif
17516
17517 #ifndef NULL
17518 #define NULL ((void*)0)
17519 #endif
17520
17521 int main() {
17522
17523 #if DB_VERSION_MAJOR > 1
17524         {
17525                 char *version;
17526                 int major, minor, patch;
17527
17528                 version = db_version( &major, &minor, &patch );
17529
17530                 if( major != DB_VERSION_MAJOR ||
17531                         minor < DB_VERSION_MINOR )
17532                 {
17533                         printf("Berkeley DB version mismatch\n"
17534                                 "\texpected: %s\n\tgot: %s\n",
17535                                 DB_VERSION_STRING, version);
17536                         return 1;
17537                 }
17538         }
17539 #endif
17540
17541 #if DB_VERSION_MAJOR > 2
17542         db_env_create( NULL, 0 );
17543 #elif DB_VERSION_MAJOR > 1
17544         db_appexit( NULL );
17545 #else
17546         (void) dbopen( NULL, 0, 0, 0, NULL);
17547 #endif
17548
17549 ; return 0; }
17550 EOF
17551 if { (eval echo configure:17552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17552   rm -rf conftest*
17553   ol_cv_db_db_41=yes
17554 else
17555   echo "configure: failed program was:" >&5
17556   cat conftest.$ac_ext >&5
17557   rm -rf conftest*
17558   ol_cv_db_db_41=no
17559 fi
17560 rm -f conftest*
17561
17562         LIBS="$ol_LIBS"
17563
17564 fi
17565
17566 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17567
17568         if test $ol_cv_db_db_41 = yes ; then
17569                 ol_cv_lib_db=-ldb-41
17570         fi
17571 fi
17572
17573 if test $ol_cv_lib_db = no ; then
17574         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17575 echo "configure:17576: checking for Berkeley DB link (-ldb-4.1)" >&5
17576 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17577   echo $ac_n "(cached) $ac_c" 1>&6
17578 else
17579   
17580         ol_DB_LIB=-ldb-4.1
17581         ol_LIBS=$LIBS
17582         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17583
17584         cat > conftest.$ac_ext <<EOF
17585 #line 17586 "configure"
17586 #include "confdefs.h"
17587
17588 #ifdef HAVE_DB_185_H
17589 # include <db_185.h>
17590 #else
17591 # include <db.h>
17592 #endif
17593
17594 #ifndef DB_VERSION_MAJOR
17595 # define DB_VERSION_MAJOR 1
17596 #endif
17597
17598 #ifndef NULL
17599 #define NULL ((void*)0)
17600 #endif
17601
17602 int main() {
17603
17604 #if DB_VERSION_MAJOR > 1
17605         {
17606                 char *version;
17607                 int major, minor, patch;
17608
17609                 version = db_version( &major, &minor, &patch );
17610
17611                 if( major != DB_VERSION_MAJOR ||
17612                         minor < DB_VERSION_MINOR )
17613                 {
17614                         printf("Berkeley DB version mismatch\n"
17615                                 "\texpected: %s\n\tgot: %s\n",
17616                                 DB_VERSION_STRING, version);
17617                         return 1;
17618                 }
17619         }
17620 #endif
17621
17622 #if DB_VERSION_MAJOR > 2
17623         db_env_create( NULL, 0 );
17624 #elif DB_VERSION_MAJOR > 1
17625         db_appexit( NULL );
17626 #else
17627         (void) dbopen( NULL, 0, 0, 0, NULL);
17628 #endif
17629
17630 ; return 0; }
17631 EOF
17632 if { (eval echo configure:17633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17633   rm -rf conftest*
17634   ol_cv_db_db_4_dot_1=yes
17635 else
17636   echo "configure: failed program was:" >&5
17637   cat conftest.$ac_ext >&5
17638   rm -rf conftest*
17639   ol_cv_db_db_4_dot_1=no
17640 fi
17641 rm -f conftest*
17642
17643         LIBS="$ol_LIBS"
17644
17645 fi
17646
17647 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17648
17649         if test $ol_cv_db_db_4_dot_1 = yes ; then
17650                 ol_cv_lib_db=-ldb-4.1
17651         fi
17652 fi
17653
17654 if test $ol_cv_lib_db = no ; then
17655         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17656 echo "configure:17657: checking for Berkeley DB link (-ldb-4-1)" >&5
17657 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17658   echo $ac_n "(cached) $ac_c" 1>&6
17659 else
17660   
17661         ol_DB_LIB=-ldb-4-1
17662         ol_LIBS=$LIBS
17663         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17664
17665         cat > conftest.$ac_ext <<EOF
17666 #line 17667 "configure"
17667 #include "confdefs.h"
17668
17669 #ifdef HAVE_DB_185_H
17670 # include <db_185.h>
17671 #else
17672 # include <db.h>
17673 #endif
17674
17675 #ifndef DB_VERSION_MAJOR
17676 # define DB_VERSION_MAJOR 1
17677 #endif
17678
17679 #ifndef NULL
17680 #define NULL ((void*)0)
17681 #endif
17682
17683 int main() {
17684
17685 #if DB_VERSION_MAJOR > 1
17686         {
17687                 char *version;
17688                 int major, minor, patch;
17689
17690                 version = db_version( &major, &minor, &patch );
17691
17692                 if( major != DB_VERSION_MAJOR ||
17693                         minor < DB_VERSION_MINOR )
17694                 {
17695                         printf("Berkeley DB version mismatch\n"
17696                                 "\texpected: %s\n\tgot: %s\n",
17697                                 DB_VERSION_STRING, version);
17698                         return 1;
17699                 }
17700         }
17701 #endif
17702
17703 #if DB_VERSION_MAJOR > 2
17704         db_env_create( NULL, 0 );
17705 #elif DB_VERSION_MAJOR > 1
17706         db_appexit( NULL );
17707 #else
17708         (void) dbopen( NULL, 0, 0, 0, NULL);
17709 #endif
17710
17711 ; return 0; }
17712 EOF
17713 if { (eval echo configure:17714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17714   rm -rf conftest*
17715   ol_cv_db_db_4_1=yes
17716 else
17717   echo "configure: failed program was:" >&5
17718   cat conftest.$ac_ext >&5
17719   rm -rf conftest*
17720   ol_cv_db_db_4_1=no
17721 fi
17722 rm -f conftest*
17723
17724         LIBS="$ol_LIBS"
17725
17726 fi
17727
17728 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17729
17730         if test $ol_cv_db_db_4_1 = yes ; then
17731                 ol_cv_lib_db=-ldb-4-1
17732         fi
17733 fi
17734
17735 if test $ol_cv_lib_db = no ; then
17736         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17737 echo "configure:17738: checking for Berkeley DB link (-ldb3)" >&5
17738 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17739   echo $ac_n "(cached) $ac_c" 1>&6
17740 else
17741   
17742         ol_DB_LIB=-ldb3
17743         ol_LIBS=$LIBS
17744         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17745
17746         cat > conftest.$ac_ext <<EOF
17747 #line 17748 "configure"
17748 #include "confdefs.h"
17749
17750 #ifdef HAVE_DB_185_H
17751 # include <db_185.h>
17752 #else
17753 # include <db.h>
17754 #endif
17755
17756 #ifndef DB_VERSION_MAJOR
17757 # define DB_VERSION_MAJOR 1
17758 #endif
17759
17760 #ifndef NULL
17761 #define NULL ((void*)0)
17762 #endif
17763
17764 int main() {
17765
17766 #if DB_VERSION_MAJOR > 1
17767         {
17768                 char *version;
17769                 int major, minor, patch;
17770
17771                 version = db_version( &major, &minor, &patch );
17772
17773                 if( major != DB_VERSION_MAJOR ||
17774                         minor < DB_VERSION_MINOR )
17775                 {
17776                         printf("Berkeley DB version mismatch\n"
17777                                 "\texpected: %s\n\tgot: %s\n",
17778                                 DB_VERSION_STRING, version);
17779                         return 1;
17780                 }
17781         }
17782 #endif
17783
17784 #if DB_VERSION_MAJOR > 2
17785         db_env_create( NULL, 0 );
17786 #elif DB_VERSION_MAJOR > 1
17787         db_appexit( NULL );
17788 #else
17789         (void) dbopen( NULL, 0, 0, 0, NULL);
17790 #endif
17791
17792 ; return 0; }
17793 EOF
17794 if { (eval echo configure:17795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17795   rm -rf conftest*
17796   ol_cv_db_db3=yes
17797 else
17798   echo "configure: failed program was:" >&5
17799   cat conftest.$ac_ext >&5
17800   rm -rf conftest*
17801   ol_cv_db_db3=no
17802 fi
17803 rm -f conftest*
17804
17805         LIBS="$ol_LIBS"
17806
17807 fi
17808
17809 echo "$ac_t""$ol_cv_db_db3" 1>&6
17810
17811         if test $ol_cv_db_db3 = yes ; then
17812                 ol_cv_lib_db=-ldb3
17813         fi
17814 fi
17815
17816 if test $ol_cv_lib_db = no ; then
17817         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17818 echo "configure:17819: checking for Berkeley DB link (-ldb-3)" >&5
17819 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17820   echo $ac_n "(cached) $ac_c" 1>&6
17821 else
17822   
17823         ol_DB_LIB=-ldb-3
17824         ol_LIBS=$LIBS
17825         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17826
17827         cat > conftest.$ac_ext <<EOF
17828 #line 17829 "configure"
17829 #include "confdefs.h"
17830
17831 #ifdef HAVE_DB_185_H
17832 # include <db_185.h>
17833 #else
17834 # include <db.h>
17835 #endif
17836
17837 #ifndef DB_VERSION_MAJOR
17838 # define DB_VERSION_MAJOR 1
17839 #endif
17840
17841 #ifndef NULL
17842 #define NULL ((void*)0)
17843 #endif
17844
17845 int main() {
17846
17847 #if DB_VERSION_MAJOR > 1
17848         {
17849                 char *version;
17850                 int major, minor, patch;
17851
17852                 version = db_version( &major, &minor, &patch );
17853
17854                 if( major != DB_VERSION_MAJOR ||
17855                         minor < DB_VERSION_MINOR )
17856                 {
17857                         printf("Berkeley DB version mismatch\n"
17858                                 "\texpected: %s\n\tgot: %s\n",
17859                                 DB_VERSION_STRING, version);
17860                         return 1;
17861                 }
17862         }
17863 #endif
17864
17865 #if DB_VERSION_MAJOR > 2
17866         db_env_create( NULL, 0 );
17867 #elif DB_VERSION_MAJOR > 1
17868         db_appexit( NULL );
17869 #else
17870         (void) dbopen( NULL, 0, 0, 0, NULL);
17871 #endif
17872
17873 ; return 0; }
17874 EOF
17875 if { (eval echo configure:17876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17876   rm -rf conftest*
17877   ol_cv_db_db_3=yes
17878 else
17879   echo "configure: failed program was:" >&5
17880   cat conftest.$ac_ext >&5
17881   rm -rf conftest*
17882   ol_cv_db_db_3=no
17883 fi
17884 rm -f conftest*
17885
17886         LIBS="$ol_LIBS"
17887
17888 fi
17889
17890 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17891
17892         if test $ol_cv_db_db_3 = yes ; then
17893                 ol_cv_lib_db=-ldb-3
17894         fi
17895 fi
17896
17897 if test $ol_cv_lib_db = no ; then
17898         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17899 echo "configure:17900: checking for Berkeley DB link (-ldb2)" >&5
17900 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17901   echo $ac_n "(cached) $ac_c" 1>&6
17902 else
17903   
17904         ol_DB_LIB=-ldb2
17905         ol_LIBS=$LIBS
17906         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17907
17908         cat > conftest.$ac_ext <<EOF
17909 #line 17910 "configure"
17910 #include "confdefs.h"
17911
17912 #ifdef HAVE_DB_185_H
17913 # include <db_185.h>
17914 #else
17915 # include <db.h>
17916 #endif
17917
17918 #ifndef DB_VERSION_MAJOR
17919 # define DB_VERSION_MAJOR 1
17920 #endif
17921
17922 #ifndef NULL
17923 #define NULL ((void*)0)
17924 #endif
17925
17926 int main() {
17927
17928 #if DB_VERSION_MAJOR > 1
17929         {
17930                 char *version;
17931                 int major, minor, patch;
17932
17933                 version = db_version( &major, &minor, &patch );
17934
17935                 if( major != DB_VERSION_MAJOR ||
17936                         minor < DB_VERSION_MINOR )
17937                 {
17938                         printf("Berkeley DB version mismatch\n"
17939                                 "\texpected: %s\n\tgot: %s\n",
17940                                 DB_VERSION_STRING, version);
17941                         return 1;
17942                 }
17943         }
17944 #endif
17945
17946 #if DB_VERSION_MAJOR > 2
17947         db_env_create( NULL, 0 );
17948 #elif DB_VERSION_MAJOR > 1
17949         db_appexit( NULL );
17950 #else
17951         (void) dbopen( NULL, 0, 0, 0, NULL);
17952 #endif
17953
17954 ; return 0; }
17955 EOF
17956 if { (eval echo configure:17957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17957   rm -rf conftest*
17958   ol_cv_db_db2=yes
17959 else
17960   echo "configure: failed program was:" >&5
17961   cat conftest.$ac_ext >&5
17962   rm -rf conftest*
17963   ol_cv_db_db2=no
17964 fi
17965 rm -f conftest*
17966
17967         LIBS="$ol_LIBS"
17968
17969 fi
17970
17971 echo "$ac_t""$ol_cv_db_db2" 1>&6
17972
17973         if test $ol_cv_db_db2 = yes ; then
17974                 ol_cv_lib_db=-ldb2
17975         fi
17976 fi
17977
17978 if test $ol_cv_lib_db = no ; then
17979         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17980 echo "configure:17981: checking for Berkeley DB link (-ldb-2)" >&5
17981 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17982   echo $ac_n "(cached) $ac_c" 1>&6
17983 else
17984   
17985         ol_DB_LIB=-ldb-2
17986         ol_LIBS=$LIBS
17987         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17988
17989         cat > conftest.$ac_ext <<EOF
17990 #line 17991 "configure"
17991 #include "confdefs.h"
17992
17993 #ifdef HAVE_DB_185_H
17994 # include <db_185.h>
17995 #else
17996 # include <db.h>
17997 #endif
17998
17999 #ifndef DB_VERSION_MAJOR
18000 # define DB_VERSION_MAJOR 1
18001 #endif
18002
18003 #ifndef NULL
18004 #define NULL ((void*)0)
18005 #endif
18006
18007 int main() {
18008
18009 #if DB_VERSION_MAJOR > 1
18010         {
18011                 char *version;
18012                 int major, minor, patch;
18013
18014                 version = db_version( &major, &minor, &patch );
18015
18016                 if( major != DB_VERSION_MAJOR ||
18017                         minor < DB_VERSION_MINOR )
18018                 {
18019                         printf("Berkeley DB version mismatch\n"
18020                                 "\texpected: %s\n\tgot: %s\n",
18021                                 DB_VERSION_STRING, version);
18022                         return 1;
18023                 }
18024         }
18025 #endif
18026
18027 #if DB_VERSION_MAJOR > 2
18028         db_env_create( NULL, 0 );
18029 #elif DB_VERSION_MAJOR > 1
18030         db_appexit( NULL );
18031 #else
18032         (void) dbopen( NULL, 0, 0, 0, NULL);
18033 #endif
18034
18035 ; return 0; }
18036 EOF
18037 if { (eval echo configure:18038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18038   rm -rf conftest*
18039   ol_cv_db_db_2=yes
18040 else
18041   echo "configure: failed program was:" >&5
18042   cat conftest.$ac_ext >&5
18043   rm -rf conftest*
18044   ol_cv_db_db_2=no
18045 fi
18046 rm -f conftest*
18047
18048         LIBS="$ol_LIBS"
18049
18050 fi
18051
18052 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18053
18054         if test $ol_cv_db_db_2 = yes ; then
18055                 ol_cv_lib_db=-ldb-2
18056         fi
18057 fi
18058
18059 if test $ol_cv_lib_db = no ; then
18060         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18061 echo "configure:18062: checking for Berkeley DB link (-ldb1)" >&5
18062 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18063   echo $ac_n "(cached) $ac_c" 1>&6
18064 else
18065   
18066         ol_DB_LIB=-ldb1
18067         ol_LIBS=$LIBS
18068         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18069
18070         cat > conftest.$ac_ext <<EOF
18071 #line 18072 "configure"
18072 #include "confdefs.h"
18073
18074 #ifdef HAVE_DB_185_H
18075 # include <db_185.h>
18076 #else
18077 # include <db.h>
18078 #endif
18079
18080 #ifndef DB_VERSION_MAJOR
18081 # define DB_VERSION_MAJOR 1
18082 #endif
18083
18084 #ifndef NULL
18085 #define NULL ((void*)0)
18086 #endif
18087
18088 int main() {
18089
18090 #if DB_VERSION_MAJOR > 1
18091         {
18092                 char *version;
18093                 int major, minor, patch;
18094
18095                 version = db_version( &major, &minor, &patch );
18096
18097                 if( major != DB_VERSION_MAJOR ||
18098                         minor < DB_VERSION_MINOR )
18099                 {
18100                         printf("Berkeley DB version mismatch\n"
18101                                 "\texpected: %s\n\tgot: %s\n",
18102                                 DB_VERSION_STRING, version);
18103                         return 1;
18104                 }
18105         }
18106 #endif
18107
18108 #if DB_VERSION_MAJOR > 2
18109         db_env_create( NULL, 0 );
18110 #elif DB_VERSION_MAJOR > 1
18111         db_appexit( NULL );
18112 #else
18113         (void) dbopen( NULL, 0, 0, 0, NULL);
18114 #endif
18115
18116 ; return 0; }
18117 EOF
18118 if { (eval echo configure:18119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18119   rm -rf conftest*
18120   ol_cv_db_db1=yes
18121 else
18122   echo "configure: failed program was:" >&5
18123   cat conftest.$ac_ext >&5
18124   rm -rf conftest*
18125   ol_cv_db_db1=no
18126 fi
18127 rm -f conftest*
18128
18129         LIBS="$ol_LIBS"
18130
18131 fi
18132
18133 echo "$ac_t""$ol_cv_db_db1" 1>&6
18134
18135         if test $ol_cv_db_db1 = yes ; then
18136                 ol_cv_lib_db=-ldb1
18137         fi
18138 fi
18139
18140 if test $ol_cv_lib_db = no ; then
18141         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18142 echo "configure:18143: checking for Berkeley DB link (-ldb-1)" >&5
18143 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18144   echo $ac_n "(cached) $ac_c" 1>&6
18145 else
18146   
18147         ol_DB_LIB=-ldb-1
18148         ol_LIBS=$LIBS
18149         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18150
18151         cat > conftest.$ac_ext <<EOF
18152 #line 18153 "configure"
18153 #include "confdefs.h"
18154
18155 #ifdef HAVE_DB_185_H
18156 # include <db_185.h>
18157 #else
18158 # include <db.h>
18159 #endif
18160
18161 #ifndef DB_VERSION_MAJOR
18162 # define DB_VERSION_MAJOR 1
18163 #endif
18164
18165 #ifndef NULL
18166 #define NULL ((void*)0)
18167 #endif
18168
18169 int main() {
18170
18171 #if DB_VERSION_MAJOR > 1
18172         {
18173                 char *version;
18174                 int major, minor, patch;
18175
18176                 version = db_version( &major, &minor, &patch );
18177
18178                 if( major != DB_VERSION_MAJOR ||
18179                         minor < DB_VERSION_MINOR )
18180                 {
18181                         printf("Berkeley DB version mismatch\n"
18182                                 "\texpected: %s\n\tgot: %s\n",
18183                                 DB_VERSION_STRING, version);
18184                         return 1;
18185                 }
18186         }
18187 #endif
18188
18189 #if DB_VERSION_MAJOR > 2
18190         db_env_create( NULL, 0 );
18191 #elif DB_VERSION_MAJOR > 1
18192         db_appexit( NULL );
18193 #else
18194         (void) dbopen( NULL, 0, 0, 0, NULL);
18195 #endif
18196
18197 ; return 0; }
18198 EOF
18199 if { (eval echo configure:18200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18200   rm -rf conftest*
18201   ol_cv_db_db_1=yes
18202 else
18203   echo "configure: failed program was:" >&5
18204   cat conftest.$ac_ext >&5
18205   rm -rf conftest*
18206   ol_cv_db_db_1=no
18207 fi
18208 rm -f conftest*
18209
18210         LIBS="$ol_LIBS"
18211
18212 fi
18213
18214 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18215
18216         if test $ol_cv_db_db_1 = yes ; then
18217                 ol_cv_lib_db=-ldb-1
18218         fi
18219 fi
18220
18221
18222                 if test "$ol_cv_lib_db" != no ; then
18223                         ol_cv_berkeley_db=yes
18224                 fi
18225         fi
18226 fi
18227
18228         else
18229                 ol_cv_berkeley_db=no
18230 for ac_hdr in db.h
18231 do
18232 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18233 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18234 echo "configure:18235: checking for $ac_hdr" >&5
18235 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18236   echo $ac_n "(cached) $ac_c" 1>&6
18237 else
18238   cat > conftest.$ac_ext <<EOF
18239 #line 18240 "configure"
18240 #include "confdefs.h"
18241 #include <$ac_hdr>
18242 EOF
18243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18244 { (eval echo configure:18245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18246 if test -z "$ac_err"; then
18247   rm -rf conftest*
18248   eval "ac_cv_header_$ac_safe=yes"
18249 else
18250   echo "$ac_err" >&5
18251   echo "configure: failed program was:" >&5
18252   cat conftest.$ac_ext >&5
18253   rm -rf conftest*
18254   eval "ac_cv_header_$ac_safe=no"
18255 fi
18256 rm -f conftest*
18257 fi
18258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18259   echo "$ac_t""yes" 1>&6
18260     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18261   cat >> confdefs.h <<EOF
18262 #define $ac_tr_hdr 1
18263 EOF
18264  
18265 else
18266   echo "$ac_t""no" 1>&6
18267 fi
18268 done
18269
18270 if test $ac_cv_header_db_h = yes; then
18271         ol_cv_lib_db=no
18272 if test $ol_cv_lib_db = no ; then
18273         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18274 echo "configure:18275: checking for Berkeley DB link (default)" >&5
18275 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18276   echo $ac_n "(cached) $ac_c" 1>&6
18277 else
18278   
18279         ol_DB_LIB=
18280         ol_LIBS=$LIBS
18281         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18282
18283         cat > conftest.$ac_ext <<EOF
18284 #line 18285 "configure"
18285 #include "confdefs.h"
18286
18287 #ifdef HAVE_DB_185_H
18288 # include <db_185.h>
18289 #else
18290 # include <db.h>
18291 #endif
18292
18293 #ifndef DB_VERSION_MAJOR
18294 # define DB_VERSION_MAJOR 1
18295 #endif
18296
18297 #ifndef NULL
18298 #define NULL ((void*)0)
18299 #endif
18300
18301 int main() {
18302
18303 #if DB_VERSION_MAJOR > 1
18304         {
18305                 char *version;
18306                 int major, minor, patch;
18307
18308                 version = db_version( &major, &minor, &patch );
18309
18310                 if( major != DB_VERSION_MAJOR ||
18311                         minor < DB_VERSION_MINOR )
18312                 {
18313                         printf("Berkeley DB version mismatch\n"
18314                                 "\texpected: %s\n\tgot: %s\n",
18315                                 DB_VERSION_STRING, version);
18316                         return 1;
18317                 }
18318         }
18319 #endif
18320
18321 #if DB_VERSION_MAJOR > 2
18322         db_env_create( NULL, 0 );
18323 #elif DB_VERSION_MAJOR > 1
18324         db_appexit( NULL );
18325 #else
18326         (void) dbopen( NULL, 0, 0, 0, NULL);
18327 #endif
18328
18329 ; return 0; }
18330 EOF
18331 if { (eval echo configure:18332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18332   rm -rf conftest*
18333   ol_cv_db_none=yes
18334 else
18335   echo "configure: failed program was:" >&5
18336   cat conftest.$ac_ext >&5
18337   rm -rf conftest*
18338   ol_cv_db_none=no
18339 fi
18340 rm -f conftest*
18341
18342         LIBS="$ol_LIBS"
18343
18344 fi
18345
18346 echo "$ac_t""$ol_cv_db_none" 1>&6
18347
18348         if test $ol_cv_db_none = yes ; then
18349                 ol_cv_lib_db=yes
18350         fi
18351 fi
18352
18353 if test $ol_cv_lib_db = no ; then
18354         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18355 echo "configure:18356: checking for Berkeley DB link (-ldb42)" >&5
18356 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18357   echo $ac_n "(cached) $ac_c" 1>&6
18358 else
18359   
18360         ol_DB_LIB=-ldb42
18361         ol_LIBS=$LIBS
18362         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18363
18364         cat > conftest.$ac_ext <<EOF
18365 #line 18366 "configure"
18366 #include "confdefs.h"
18367
18368 #ifdef HAVE_DB_185_H
18369 # include <db_185.h>
18370 #else
18371 # include <db.h>
18372 #endif
18373
18374 #ifndef DB_VERSION_MAJOR
18375 # define DB_VERSION_MAJOR 1
18376 #endif
18377
18378 #ifndef NULL
18379 #define NULL ((void*)0)
18380 #endif
18381
18382 int main() {
18383
18384 #if DB_VERSION_MAJOR > 1
18385         {
18386                 char *version;
18387                 int major, minor, patch;
18388
18389                 version = db_version( &major, &minor, &patch );
18390
18391                 if( major != DB_VERSION_MAJOR ||
18392                         minor < DB_VERSION_MINOR )
18393                 {
18394                         printf("Berkeley DB version mismatch\n"
18395                                 "\texpected: %s\n\tgot: %s\n",
18396                                 DB_VERSION_STRING, version);
18397                         return 1;
18398                 }
18399         }
18400 #endif
18401
18402 #if DB_VERSION_MAJOR > 2
18403         db_env_create( NULL, 0 );
18404 #elif DB_VERSION_MAJOR > 1
18405         db_appexit( NULL );
18406 #else
18407         (void) dbopen( NULL, 0, 0, 0, NULL);
18408 #endif
18409
18410 ; return 0; }
18411 EOF
18412 if { (eval echo configure:18413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18413   rm -rf conftest*
18414   ol_cv_db_db42=yes
18415 else
18416   echo "configure: failed program was:" >&5
18417   cat conftest.$ac_ext >&5
18418   rm -rf conftest*
18419   ol_cv_db_db42=no
18420 fi
18421 rm -f conftest*
18422
18423         LIBS="$ol_LIBS"
18424
18425 fi
18426
18427 echo "$ac_t""$ol_cv_db_db42" 1>&6
18428
18429         if test $ol_cv_db_db42 = yes ; then
18430                 ol_cv_lib_db=-ldb42
18431         fi
18432 fi
18433
18434 if test $ol_cv_lib_db = no ; then
18435         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18436 echo "configure:18437: checking for Berkeley DB link (-ldb-42)" >&5
18437 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18438   echo $ac_n "(cached) $ac_c" 1>&6
18439 else
18440   
18441         ol_DB_LIB=-ldb-42
18442         ol_LIBS=$LIBS
18443         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18444
18445         cat > conftest.$ac_ext <<EOF
18446 #line 18447 "configure"
18447 #include "confdefs.h"
18448
18449 #ifdef HAVE_DB_185_H
18450 # include <db_185.h>
18451 #else
18452 # include <db.h>
18453 #endif
18454
18455 #ifndef DB_VERSION_MAJOR
18456 # define DB_VERSION_MAJOR 1
18457 #endif
18458
18459 #ifndef NULL
18460 #define NULL ((void*)0)
18461 #endif
18462
18463 int main() {
18464
18465 #if DB_VERSION_MAJOR > 1
18466         {
18467                 char *version;
18468                 int major, minor, patch;
18469
18470                 version = db_version( &major, &minor, &patch );
18471
18472                 if( major != DB_VERSION_MAJOR ||
18473                         minor < DB_VERSION_MINOR )
18474                 {
18475                         printf("Berkeley DB version mismatch\n"
18476                                 "\texpected: %s\n\tgot: %s\n",
18477                                 DB_VERSION_STRING, version);
18478                         return 1;
18479                 }
18480         }
18481 #endif
18482
18483 #if DB_VERSION_MAJOR > 2
18484         db_env_create( NULL, 0 );
18485 #elif DB_VERSION_MAJOR > 1
18486         db_appexit( NULL );
18487 #else
18488         (void) dbopen( NULL, 0, 0, 0, NULL);
18489 #endif
18490
18491 ; return 0; }
18492 EOF
18493 if { (eval echo configure:18494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18494   rm -rf conftest*
18495   ol_cv_db_db_42=yes
18496 else
18497   echo "configure: failed program was:" >&5
18498   cat conftest.$ac_ext >&5
18499   rm -rf conftest*
18500   ol_cv_db_db_42=no
18501 fi
18502 rm -f conftest*
18503
18504         LIBS="$ol_LIBS"
18505
18506 fi
18507
18508 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18509
18510         if test $ol_cv_db_db_42 = yes ; then
18511                 ol_cv_lib_db=-ldb-42
18512         fi
18513 fi
18514
18515 if test $ol_cv_lib_db = no ; then
18516         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18517 echo "configure:18518: checking for Berkeley DB link (-ldb-4.2)" >&5
18518 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18519   echo $ac_n "(cached) $ac_c" 1>&6
18520 else
18521   
18522         ol_DB_LIB=-ldb-4.2
18523         ol_LIBS=$LIBS
18524         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18525
18526         cat > conftest.$ac_ext <<EOF
18527 #line 18528 "configure"
18528 #include "confdefs.h"
18529
18530 #ifdef HAVE_DB_185_H
18531 # include <db_185.h>
18532 #else
18533 # include <db.h>
18534 #endif
18535
18536 #ifndef DB_VERSION_MAJOR
18537 # define DB_VERSION_MAJOR 1
18538 #endif
18539
18540 #ifndef NULL
18541 #define NULL ((void*)0)
18542 #endif
18543
18544 int main() {
18545
18546 #if DB_VERSION_MAJOR > 1
18547         {
18548                 char *version;
18549                 int major, minor, patch;
18550
18551                 version = db_version( &major, &minor, &patch );
18552
18553                 if( major != DB_VERSION_MAJOR ||
18554                         minor < DB_VERSION_MINOR )
18555                 {
18556                         printf("Berkeley DB version mismatch\n"
18557                                 "\texpected: %s\n\tgot: %s\n",
18558                                 DB_VERSION_STRING, version);
18559                         return 1;
18560                 }
18561         }
18562 #endif
18563
18564 #if DB_VERSION_MAJOR > 2
18565         db_env_create( NULL, 0 );
18566 #elif DB_VERSION_MAJOR > 1
18567         db_appexit( NULL );
18568 #else
18569         (void) dbopen( NULL, 0, 0, 0, NULL);
18570 #endif
18571
18572 ; return 0; }
18573 EOF
18574 if { (eval echo configure:18575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18575   rm -rf conftest*
18576   ol_cv_db_db_4_dot_2=yes
18577 else
18578   echo "configure: failed program was:" >&5
18579   cat conftest.$ac_ext >&5
18580   rm -rf conftest*
18581   ol_cv_db_db_4_dot_2=no
18582 fi
18583 rm -f conftest*
18584
18585         LIBS="$ol_LIBS"
18586
18587 fi
18588
18589 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18590
18591         if test $ol_cv_db_db_4_dot_2 = yes ; then
18592                 ol_cv_lib_db=-ldb-4.2
18593         fi
18594 fi
18595
18596 if test $ol_cv_lib_db = no ; then
18597         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18598 echo "configure:18599: checking for Berkeley DB link (-ldb-4-2)" >&5
18599 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18600   echo $ac_n "(cached) $ac_c" 1>&6
18601 else
18602   
18603         ol_DB_LIB=-ldb-4-2
18604         ol_LIBS=$LIBS
18605         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18606
18607         cat > conftest.$ac_ext <<EOF
18608 #line 18609 "configure"
18609 #include "confdefs.h"
18610
18611 #ifdef HAVE_DB_185_H
18612 # include <db_185.h>
18613 #else
18614 # include <db.h>
18615 #endif
18616
18617 #ifndef DB_VERSION_MAJOR
18618 # define DB_VERSION_MAJOR 1
18619 #endif
18620
18621 #ifndef NULL
18622 #define NULL ((void*)0)
18623 #endif
18624
18625 int main() {
18626
18627 #if DB_VERSION_MAJOR > 1
18628         {
18629                 char *version;
18630                 int major, minor, patch;
18631
18632                 version = db_version( &major, &minor, &patch );
18633
18634                 if( major != DB_VERSION_MAJOR ||
18635                         minor < DB_VERSION_MINOR )
18636                 {
18637                         printf("Berkeley DB version mismatch\n"
18638                                 "\texpected: %s\n\tgot: %s\n",
18639                                 DB_VERSION_STRING, version);
18640                         return 1;
18641                 }
18642         }
18643 #endif
18644
18645 #if DB_VERSION_MAJOR > 2
18646         db_env_create( NULL, 0 );
18647 #elif DB_VERSION_MAJOR > 1
18648         db_appexit( NULL );
18649 #else
18650         (void) dbopen( NULL, 0, 0, 0, NULL);
18651 #endif
18652
18653 ; return 0; }
18654 EOF
18655 if { (eval echo configure:18656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18656   rm -rf conftest*
18657   ol_cv_db_db_4_2=yes
18658 else
18659   echo "configure: failed program was:" >&5
18660   cat conftest.$ac_ext >&5
18661   rm -rf conftest*
18662   ol_cv_db_db_4_2=no
18663 fi
18664 rm -f conftest*
18665
18666         LIBS="$ol_LIBS"
18667
18668 fi
18669
18670 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18671
18672         if test $ol_cv_db_db_4_2 = yes ; then
18673                 ol_cv_lib_db=-ldb-4-2
18674         fi
18675 fi
18676
18677 if test $ol_cv_lib_db = no ; then
18678         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18679 echo "configure:18680: checking for Berkeley DB link (-ldb-4)" >&5
18680 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18681   echo $ac_n "(cached) $ac_c" 1>&6
18682 else
18683   
18684         ol_DB_LIB=-ldb-4
18685         ol_LIBS=$LIBS
18686         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18687
18688         cat > conftest.$ac_ext <<EOF
18689 #line 18690 "configure"
18690 #include "confdefs.h"
18691
18692 #ifdef HAVE_DB_185_H
18693 # include <db_185.h>
18694 #else
18695 # include <db.h>
18696 #endif
18697
18698 #ifndef DB_VERSION_MAJOR
18699 # define DB_VERSION_MAJOR 1
18700 #endif
18701
18702 #ifndef NULL
18703 #define NULL ((void*)0)
18704 #endif
18705
18706 int main() {
18707
18708 #if DB_VERSION_MAJOR > 1
18709         {
18710                 char *version;
18711                 int major, minor, patch;
18712
18713                 version = db_version( &major, &minor, &patch );
18714
18715                 if( major != DB_VERSION_MAJOR ||
18716                         minor < DB_VERSION_MINOR )
18717                 {
18718                         printf("Berkeley DB version mismatch\n"
18719                                 "\texpected: %s\n\tgot: %s\n",
18720                                 DB_VERSION_STRING, version);
18721                         return 1;
18722                 }
18723         }
18724 #endif
18725
18726 #if DB_VERSION_MAJOR > 2
18727         db_env_create( NULL, 0 );
18728 #elif DB_VERSION_MAJOR > 1
18729         db_appexit( NULL );
18730 #else
18731         (void) dbopen( NULL, 0, 0, 0, NULL);
18732 #endif
18733
18734 ; return 0; }
18735 EOF
18736 if { (eval echo configure:18737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18737   rm -rf conftest*
18738   ol_cv_db_db_4=yes
18739 else
18740   echo "configure: failed program was:" >&5
18741   cat conftest.$ac_ext >&5
18742   rm -rf conftest*
18743   ol_cv_db_db_4=no
18744 fi
18745 rm -f conftest*
18746
18747         LIBS="$ol_LIBS"
18748
18749 fi
18750
18751 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18752
18753         if test $ol_cv_db_db_4 = yes ; then
18754                 ol_cv_lib_db=-ldb-4
18755         fi
18756 fi
18757
18758 if test $ol_cv_lib_db = no ; then
18759         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18760 echo "configure:18761: checking for Berkeley DB link (-ldb4)" >&5
18761 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18762   echo $ac_n "(cached) $ac_c" 1>&6
18763 else
18764   
18765         ol_DB_LIB=-ldb4
18766         ol_LIBS=$LIBS
18767         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18768
18769         cat > conftest.$ac_ext <<EOF
18770 #line 18771 "configure"
18771 #include "confdefs.h"
18772
18773 #ifdef HAVE_DB_185_H
18774 # include <db_185.h>
18775 #else
18776 # include <db.h>
18777 #endif
18778
18779 #ifndef DB_VERSION_MAJOR
18780 # define DB_VERSION_MAJOR 1
18781 #endif
18782
18783 #ifndef NULL
18784 #define NULL ((void*)0)
18785 #endif
18786
18787 int main() {
18788
18789 #if DB_VERSION_MAJOR > 1
18790         {
18791                 char *version;
18792                 int major, minor, patch;
18793
18794                 version = db_version( &major, &minor, &patch );
18795
18796                 if( major != DB_VERSION_MAJOR ||
18797                         minor < DB_VERSION_MINOR )
18798                 {
18799                         printf("Berkeley DB version mismatch\n"
18800                                 "\texpected: %s\n\tgot: %s\n",
18801                                 DB_VERSION_STRING, version);
18802                         return 1;
18803                 }
18804         }
18805 #endif
18806
18807 #if DB_VERSION_MAJOR > 2
18808         db_env_create( NULL, 0 );
18809 #elif DB_VERSION_MAJOR > 1
18810         db_appexit( NULL );
18811 #else
18812         (void) dbopen( NULL, 0, 0, 0, NULL);
18813 #endif
18814
18815 ; return 0; }
18816 EOF
18817 if { (eval echo configure:18818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18818   rm -rf conftest*
18819   ol_cv_db_db4=yes
18820 else
18821   echo "configure: failed program was:" >&5
18822   cat conftest.$ac_ext >&5
18823   rm -rf conftest*
18824   ol_cv_db_db4=no
18825 fi
18826 rm -f conftest*
18827
18828         LIBS="$ol_LIBS"
18829
18830 fi
18831
18832 echo "$ac_t""$ol_cv_db_db4" 1>&6
18833
18834         if test $ol_cv_db_db4 = yes ; then
18835                 ol_cv_lib_db=-ldb4
18836         fi
18837 fi
18838
18839 if test $ol_cv_lib_db = no ; then
18840         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18841 echo "configure:18842: checking for Berkeley DB link (-ldb)" >&5
18842 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18843   echo $ac_n "(cached) $ac_c" 1>&6
18844 else
18845   
18846         ol_DB_LIB=-ldb
18847         ol_LIBS=$LIBS
18848         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18849
18850         cat > conftest.$ac_ext <<EOF
18851 #line 18852 "configure"
18852 #include "confdefs.h"
18853
18854 #ifdef HAVE_DB_185_H
18855 # include <db_185.h>
18856 #else
18857 # include <db.h>
18858 #endif
18859
18860 #ifndef DB_VERSION_MAJOR
18861 # define DB_VERSION_MAJOR 1
18862 #endif
18863
18864 #ifndef NULL
18865 #define NULL ((void*)0)
18866 #endif
18867
18868 int main() {
18869
18870 #if DB_VERSION_MAJOR > 1
18871         {
18872                 char *version;
18873                 int major, minor, patch;
18874
18875                 version = db_version( &major, &minor, &patch );
18876
18877                 if( major != DB_VERSION_MAJOR ||
18878                         minor < DB_VERSION_MINOR )
18879                 {
18880                         printf("Berkeley DB version mismatch\n"
18881                                 "\texpected: %s\n\tgot: %s\n",
18882                                 DB_VERSION_STRING, version);
18883                         return 1;
18884                 }
18885         }
18886 #endif
18887
18888 #if DB_VERSION_MAJOR > 2
18889         db_env_create( NULL, 0 );
18890 #elif DB_VERSION_MAJOR > 1
18891         db_appexit( NULL );
18892 #else
18893         (void) dbopen( NULL, 0, 0, 0, NULL);
18894 #endif
18895
18896 ; return 0; }
18897 EOF
18898 if { (eval echo configure:18899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18899   rm -rf conftest*
18900   ol_cv_db_db=yes
18901 else
18902   echo "configure: failed program was:" >&5
18903   cat conftest.$ac_ext >&5
18904   rm -rf conftest*
18905   ol_cv_db_db=no
18906 fi
18907 rm -f conftest*
18908
18909         LIBS="$ol_LIBS"
18910
18911 fi
18912
18913 echo "$ac_t""$ol_cv_db_db" 1>&6
18914
18915         if test $ol_cv_db_db = yes ; then
18916                 ol_cv_lib_db=-ldb
18917         fi
18918 fi
18919
18920 if test $ol_cv_lib_db = no ; then
18921         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18922 echo "configure:18923: checking for Berkeley DB link (-ldb41)" >&5
18923 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18924   echo $ac_n "(cached) $ac_c" 1>&6
18925 else
18926   
18927         ol_DB_LIB=-ldb41
18928         ol_LIBS=$LIBS
18929         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18930
18931         cat > conftest.$ac_ext <<EOF
18932 #line 18933 "configure"
18933 #include "confdefs.h"
18934
18935 #ifdef HAVE_DB_185_H
18936 # include <db_185.h>
18937 #else
18938 # include <db.h>
18939 #endif
18940
18941 #ifndef DB_VERSION_MAJOR
18942 # define DB_VERSION_MAJOR 1
18943 #endif
18944
18945 #ifndef NULL
18946 #define NULL ((void*)0)
18947 #endif
18948
18949 int main() {
18950
18951 #if DB_VERSION_MAJOR > 1
18952         {
18953                 char *version;
18954                 int major, minor, patch;
18955
18956                 version = db_version( &major, &minor, &patch );
18957
18958                 if( major != DB_VERSION_MAJOR ||
18959                         minor < DB_VERSION_MINOR )
18960                 {
18961                         printf("Berkeley DB version mismatch\n"
18962                                 "\texpected: %s\n\tgot: %s\n",
18963                                 DB_VERSION_STRING, version);
18964                         return 1;
18965                 }
18966         }
18967 #endif
18968
18969 #if DB_VERSION_MAJOR > 2
18970         db_env_create( NULL, 0 );
18971 #elif DB_VERSION_MAJOR > 1
18972         db_appexit( NULL );
18973 #else
18974         (void) dbopen( NULL, 0, 0, 0, NULL);
18975 #endif
18976
18977 ; return 0; }
18978 EOF
18979 if { (eval echo configure:18980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18980   rm -rf conftest*
18981   ol_cv_db_db41=yes
18982 else
18983   echo "configure: failed program was:" >&5
18984   cat conftest.$ac_ext >&5
18985   rm -rf conftest*
18986   ol_cv_db_db41=no
18987 fi
18988 rm -f conftest*
18989
18990         LIBS="$ol_LIBS"
18991
18992 fi
18993
18994 echo "$ac_t""$ol_cv_db_db41" 1>&6
18995
18996         if test $ol_cv_db_db41 = yes ; then
18997                 ol_cv_lib_db=-ldb41
18998         fi
18999 fi
19000
19001 if test $ol_cv_lib_db = no ; then
19002         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19003 echo "configure:19004: checking for Berkeley DB link (-ldb-41)" >&5
19004 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19005   echo $ac_n "(cached) $ac_c" 1>&6
19006 else
19007   
19008         ol_DB_LIB=-ldb-41
19009         ol_LIBS=$LIBS
19010         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19011
19012         cat > conftest.$ac_ext <<EOF
19013 #line 19014 "configure"
19014 #include "confdefs.h"
19015
19016 #ifdef HAVE_DB_185_H
19017 # include <db_185.h>
19018 #else
19019 # include <db.h>
19020 #endif
19021
19022 #ifndef DB_VERSION_MAJOR
19023 # define DB_VERSION_MAJOR 1
19024 #endif
19025
19026 #ifndef NULL
19027 #define NULL ((void*)0)
19028 #endif
19029
19030 int main() {
19031
19032 #if DB_VERSION_MAJOR > 1
19033         {
19034                 char *version;
19035                 int major, minor, patch;
19036
19037                 version = db_version( &major, &minor, &patch );
19038
19039                 if( major != DB_VERSION_MAJOR ||
19040                         minor < DB_VERSION_MINOR )
19041                 {
19042                         printf("Berkeley DB version mismatch\n"
19043                                 "\texpected: %s\n\tgot: %s\n",
19044                                 DB_VERSION_STRING, version);
19045                         return 1;
19046                 }
19047         }
19048 #endif
19049
19050 #if DB_VERSION_MAJOR > 2
19051         db_env_create( NULL, 0 );
19052 #elif DB_VERSION_MAJOR > 1
19053         db_appexit( NULL );
19054 #else
19055         (void) dbopen( NULL, 0, 0, 0, NULL);
19056 #endif
19057
19058 ; return 0; }
19059 EOF
19060 if { (eval echo configure:19061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19061   rm -rf conftest*
19062   ol_cv_db_db_41=yes
19063 else
19064   echo "configure: failed program was:" >&5
19065   cat conftest.$ac_ext >&5
19066   rm -rf conftest*
19067   ol_cv_db_db_41=no
19068 fi
19069 rm -f conftest*
19070
19071         LIBS="$ol_LIBS"
19072
19073 fi
19074
19075 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19076
19077         if test $ol_cv_db_db_41 = yes ; then
19078                 ol_cv_lib_db=-ldb-41
19079         fi
19080 fi
19081
19082 if test $ol_cv_lib_db = no ; then
19083         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19084 echo "configure:19085: checking for Berkeley DB link (-ldb-4.1)" >&5
19085 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19086   echo $ac_n "(cached) $ac_c" 1>&6
19087 else
19088   
19089         ol_DB_LIB=-ldb-4.1
19090         ol_LIBS=$LIBS
19091         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19092
19093         cat > conftest.$ac_ext <<EOF
19094 #line 19095 "configure"
19095 #include "confdefs.h"
19096
19097 #ifdef HAVE_DB_185_H
19098 # include <db_185.h>
19099 #else
19100 # include <db.h>
19101 #endif
19102
19103 #ifndef DB_VERSION_MAJOR
19104 # define DB_VERSION_MAJOR 1
19105 #endif
19106
19107 #ifndef NULL
19108 #define NULL ((void*)0)
19109 #endif
19110
19111 int main() {
19112
19113 #if DB_VERSION_MAJOR > 1
19114         {
19115                 char *version;
19116                 int major, minor, patch;
19117
19118                 version = db_version( &major, &minor, &patch );
19119
19120                 if( major != DB_VERSION_MAJOR ||
19121                         minor < DB_VERSION_MINOR )
19122                 {
19123                         printf("Berkeley DB version mismatch\n"
19124                                 "\texpected: %s\n\tgot: %s\n",
19125                                 DB_VERSION_STRING, version);
19126                         return 1;
19127                 }
19128         }
19129 #endif
19130
19131 #if DB_VERSION_MAJOR > 2
19132         db_env_create( NULL, 0 );
19133 #elif DB_VERSION_MAJOR > 1
19134         db_appexit( NULL );
19135 #else
19136         (void) dbopen( NULL, 0, 0, 0, NULL);
19137 #endif
19138
19139 ; return 0; }
19140 EOF
19141 if { (eval echo configure:19142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19142   rm -rf conftest*
19143   ol_cv_db_db_4_dot_1=yes
19144 else
19145   echo "configure: failed program was:" >&5
19146   cat conftest.$ac_ext >&5
19147   rm -rf conftest*
19148   ol_cv_db_db_4_dot_1=no
19149 fi
19150 rm -f conftest*
19151
19152         LIBS="$ol_LIBS"
19153
19154 fi
19155
19156 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19157
19158         if test $ol_cv_db_db_4_dot_1 = yes ; then
19159                 ol_cv_lib_db=-ldb-4.1
19160         fi
19161 fi
19162
19163 if test $ol_cv_lib_db = no ; then
19164         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19165 echo "configure:19166: checking for Berkeley DB link (-ldb-4-1)" >&5
19166 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19167   echo $ac_n "(cached) $ac_c" 1>&6
19168 else
19169   
19170         ol_DB_LIB=-ldb-4-1
19171         ol_LIBS=$LIBS
19172         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19173
19174         cat > conftest.$ac_ext <<EOF
19175 #line 19176 "configure"
19176 #include "confdefs.h"
19177
19178 #ifdef HAVE_DB_185_H
19179 # include <db_185.h>
19180 #else
19181 # include <db.h>
19182 #endif
19183
19184 #ifndef DB_VERSION_MAJOR
19185 # define DB_VERSION_MAJOR 1
19186 #endif
19187
19188 #ifndef NULL
19189 #define NULL ((void*)0)
19190 #endif
19191
19192 int main() {
19193
19194 #if DB_VERSION_MAJOR > 1
19195         {
19196                 char *version;
19197                 int major, minor, patch;
19198
19199                 version = db_version( &major, &minor, &patch );
19200
19201                 if( major != DB_VERSION_MAJOR ||
19202                         minor < DB_VERSION_MINOR )
19203                 {
19204                         printf("Berkeley DB version mismatch\n"
19205                                 "\texpected: %s\n\tgot: %s\n",
19206                                 DB_VERSION_STRING, version);
19207                         return 1;
19208                 }
19209         }
19210 #endif
19211
19212 #if DB_VERSION_MAJOR > 2
19213         db_env_create( NULL, 0 );
19214 #elif DB_VERSION_MAJOR > 1
19215         db_appexit( NULL );
19216 #else
19217         (void) dbopen( NULL, 0, 0, 0, NULL);
19218 #endif
19219
19220 ; return 0; }
19221 EOF
19222 if { (eval echo configure:19223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19223   rm -rf conftest*
19224   ol_cv_db_db_4_1=yes
19225 else
19226   echo "configure: failed program was:" >&5
19227   cat conftest.$ac_ext >&5
19228   rm -rf conftest*
19229   ol_cv_db_db_4_1=no
19230 fi
19231 rm -f conftest*
19232
19233         LIBS="$ol_LIBS"
19234
19235 fi
19236
19237 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19238
19239         if test $ol_cv_db_db_4_1 = yes ; then
19240                 ol_cv_lib_db=-ldb-4-1
19241         fi
19242 fi
19243
19244 if test $ol_cv_lib_db = no ; then
19245         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19246 echo "configure:19247: checking for Berkeley DB link (-ldb3)" >&5
19247 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19248   echo $ac_n "(cached) $ac_c" 1>&6
19249 else
19250   
19251         ol_DB_LIB=-ldb3
19252         ol_LIBS=$LIBS
19253         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19254
19255         cat > conftest.$ac_ext <<EOF
19256 #line 19257 "configure"
19257 #include "confdefs.h"
19258
19259 #ifdef HAVE_DB_185_H
19260 # include <db_185.h>
19261 #else
19262 # include <db.h>
19263 #endif
19264
19265 #ifndef DB_VERSION_MAJOR
19266 # define DB_VERSION_MAJOR 1
19267 #endif
19268
19269 #ifndef NULL
19270 #define NULL ((void*)0)
19271 #endif
19272
19273 int main() {
19274
19275 #if DB_VERSION_MAJOR > 1
19276         {
19277                 char *version;
19278                 int major, minor, patch;
19279
19280                 version = db_version( &major, &minor, &patch );
19281
19282                 if( major != DB_VERSION_MAJOR ||
19283                         minor < DB_VERSION_MINOR )
19284                 {
19285                         printf("Berkeley DB version mismatch\n"
19286                                 "\texpected: %s\n\tgot: %s\n",
19287                                 DB_VERSION_STRING, version);
19288                         return 1;
19289                 }
19290         }
19291 #endif
19292
19293 #if DB_VERSION_MAJOR > 2
19294         db_env_create( NULL, 0 );
19295 #elif DB_VERSION_MAJOR > 1
19296         db_appexit( NULL );
19297 #else
19298         (void) dbopen( NULL, 0, 0, 0, NULL);
19299 #endif
19300
19301 ; return 0; }
19302 EOF
19303 if { (eval echo configure:19304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19304   rm -rf conftest*
19305   ol_cv_db_db3=yes
19306 else
19307   echo "configure: failed program was:" >&5
19308   cat conftest.$ac_ext >&5
19309   rm -rf conftest*
19310   ol_cv_db_db3=no
19311 fi
19312 rm -f conftest*
19313
19314         LIBS="$ol_LIBS"
19315
19316 fi
19317
19318 echo "$ac_t""$ol_cv_db_db3" 1>&6
19319
19320         if test $ol_cv_db_db3 = yes ; then
19321                 ol_cv_lib_db=-ldb3
19322         fi
19323 fi
19324
19325 if test $ol_cv_lib_db = no ; then
19326         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19327 echo "configure:19328: checking for Berkeley DB link (-ldb-3)" >&5
19328 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19329   echo $ac_n "(cached) $ac_c" 1>&6
19330 else
19331   
19332         ol_DB_LIB=-ldb-3
19333         ol_LIBS=$LIBS
19334         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19335
19336         cat > conftest.$ac_ext <<EOF
19337 #line 19338 "configure"
19338 #include "confdefs.h"
19339
19340 #ifdef HAVE_DB_185_H
19341 # include <db_185.h>
19342 #else
19343 # include <db.h>
19344 #endif
19345
19346 #ifndef DB_VERSION_MAJOR
19347 # define DB_VERSION_MAJOR 1
19348 #endif
19349
19350 #ifndef NULL
19351 #define NULL ((void*)0)
19352 #endif
19353
19354 int main() {
19355
19356 #if DB_VERSION_MAJOR > 1
19357         {
19358                 char *version;
19359                 int major, minor, patch;
19360
19361                 version = db_version( &major, &minor, &patch );
19362
19363                 if( major != DB_VERSION_MAJOR ||
19364                         minor < DB_VERSION_MINOR )
19365                 {
19366                         printf("Berkeley DB version mismatch\n"
19367                                 "\texpected: %s\n\tgot: %s\n",
19368                                 DB_VERSION_STRING, version);
19369                         return 1;
19370                 }
19371         }
19372 #endif
19373
19374 #if DB_VERSION_MAJOR > 2
19375         db_env_create( NULL, 0 );
19376 #elif DB_VERSION_MAJOR > 1
19377         db_appexit( NULL );
19378 #else
19379         (void) dbopen( NULL, 0, 0, 0, NULL);
19380 #endif
19381
19382 ; return 0; }
19383 EOF
19384 if { (eval echo configure:19385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19385   rm -rf conftest*
19386   ol_cv_db_db_3=yes
19387 else
19388   echo "configure: failed program was:" >&5
19389   cat conftest.$ac_ext >&5
19390   rm -rf conftest*
19391   ol_cv_db_db_3=no
19392 fi
19393 rm -f conftest*
19394
19395         LIBS="$ol_LIBS"
19396
19397 fi
19398
19399 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19400
19401         if test $ol_cv_db_db_3 = yes ; then
19402                 ol_cv_lib_db=-ldb-3
19403         fi
19404 fi
19405
19406 if test $ol_cv_lib_db = no ; then
19407         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19408 echo "configure:19409: checking for Berkeley DB link (-ldb2)" >&5
19409 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19410   echo $ac_n "(cached) $ac_c" 1>&6
19411 else
19412   
19413         ol_DB_LIB=-ldb2
19414         ol_LIBS=$LIBS
19415         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19416
19417         cat > conftest.$ac_ext <<EOF
19418 #line 19419 "configure"
19419 #include "confdefs.h"
19420
19421 #ifdef HAVE_DB_185_H
19422 # include <db_185.h>
19423 #else
19424 # include <db.h>
19425 #endif
19426
19427 #ifndef DB_VERSION_MAJOR
19428 # define DB_VERSION_MAJOR 1
19429 #endif
19430
19431 #ifndef NULL
19432 #define NULL ((void*)0)
19433 #endif
19434
19435 int main() {
19436
19437 #if DB_VERSION_MAJOR > 1
19438         {
19439                 char *version;
19440                 int major, minor, patch;
19441
19442                 version = db_version( &major, &minor, &patch );
19443
19444                 if( major != DB_VERSION_MAJOR ||
19445                         minor < DB_VERSION_MINOR )
19446                 {
19447                         printf("Berkeley DB version mismatch\n"
19448                                 "\texpected: %s\n\tgot: %s\n",
19449                                 DB_VERSION_STRING, version);
19450                         return 1;
19451                 }
19452         }
19453 #endif
19454
19455 #if DB_VERSION_MAJOR > 2
19456         db_env_create( NULL, 0 );
19457 #elif DB_VERSION_MAJOR > 1
19458         db_appexit( NULL );
19459 #else
19460         (void) dbopen( NULL, 0, 0, 0, NULL);
19461 #endif
19462
19463 ; return 0; }
19464 EOF
19465 if { (eval echo configure:19466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19466   rm -rf conftest*
19467   ol_cv_db_db2=yes
19468 else
19469   echo "configure: failed program was:" >&5
19470   cat conftest.$ac_ext >&5
19471   rm -rf conftest*
19472   ol_cv_db_db2=no
19473 fi
19474 rm -f conftest*
19475
19476         LIBS="$ol_LIBS"
19477
19478 fi
19479
19480 echo "$ac_t""$ol_cv_db_db2" 1>&6
19481
19482         if test $ol_cv_db_db2 = yes ; then
19483                 ol_cv_lib_db=-ldb2
19484         fi
19485 fi
19486
19487 if test $ol_cv_lib_db = no ; then
19488         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19489 echo "configure:19490: checking for Berkeley DB link (-ldb-2)" >&5
19490 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19491   echo $ac_n "(cached) $ac_c" 1>&6
19492 else
19493   
19494         ol_DB_LIB=-ldb-2
19495         ol_LIBS=$LIBS
19496         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19497
19498         cat > conftest.$ac_ext <<EOF
19499 #line 19500 "configure"
19500 #include "confdefs.h"
19501
19502 #ifdef HAVE_DB_185_H
19503 # include <db_185.h>
19504 #else
19505 # include <db.h>
19506 #endif
19507
19508 #ifndef DB_VERSION_MAJOR
19509 # define DB_VERSION_MAJOR 1
19510 #endif
19511
19512 #ifndef NULL
19513 #define NULL ((void*)0)
19514 #endif
19515
19516 int main() {
19517
19518 #if DB_VERSION_MAJOR > 1
19519         {
19520                 char *version;
19521                 int major, minor, patch;
19522
19523                 version = db_version( &major, &minor, &patch );
19524
19525                 if( major != DB_VERSION_MAJOR ||
19526                         minor < DB_VERSION_MINOR )
19527                 {
19528                         printf("Berkeley DB version mismatch\n"
19529                                 "\texpected: %s\n\tgot: %s\n",
19530                                 DB_VERSION_STRING, version);
19531                         return 1;
19532                 }
19533         }
19534 #endif
19535
19536 #if DB_VERSION_MAJOR > 2
19537         db_env_create( NULL, 0 );
19538 #elif DB_VERSION_MAJOR > 1
19539         db_appexit( NULL );
19540 #else
19541         (void) dbopen( NULL, 0, 0, 0, NULL);
19542 #endif
19543
19544 ; return 0; }
19545 EOF
19546 if { (eval echo configure:19547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19547   rm -rf conftest*
19548   ol_cv_db_db_2=yes
19549 else
19550   echo "configure: failed program was:" >&5
19551   cat conftest.$ac_ext >&5
19552   rm -rf conftest*
19553   ol_cv_db_db_2=no
19554 fi
19555 rm -f conftest*
19556
19557         LIBS="$ol_LIBS"
19558
19559 fi
19560
19561 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19562
19563         if test $ol_cv_db_db_2 = yes ; then
19564                 ol_cv_lib_db=-ldb-2
19565         fi
19566 fi
19567
19568 if test $ol_cv_lib_db = no ; then
19569         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19570 echo "configure:19571: checking for Berkeley DB link (-ldb1)" >&5
19571 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19572   echo $ac_n "(cached) $ac_c" 1>&6
19573 else
19574   
19575         ol_DB_LIB=-ldb1
19576         ol_LIBS=$LIBS
19577         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19578
19579         cat > conftest.$ac_ext <<EOF
19580 #line 19581 "configure"
19581 #include "confdefs.h"
19582
19583 #ifdef HAVE_DB_185_H
19584 # include <db_185.h>
19585 #else
19586 # include <db.h>
19587 #endif
19588
19589 #ifndef DB_VERSION_MAJOR
19590 # define DB_VERSION_MAJOR 1
19591 #endif
19592
19593 #ifndef NULL
19594 #define NULL ((void*)0)
19595 #endif
19596
19597 int main() {
19598
19599 #if DB_VERSION_MAJOR > 1
19600         {
19601                 char *version;
19602                 int major, minor, patch;
19603
19604                 version = db_version( &major, &minor, &patch );
19605
19606                 if( major != DB_VERSION_MAJOR ||
19607                         minor < DB_VERSION_MINOR )
19608                 {
19609                         printf("Berkeley DB version mismatch\n"
19610                                 "\texpected: %s\n\tgot: %s\n",
19611                                 DB_VERSION_STRING, version);
19612                         return 1;
19613                 }
19614         }
19615 #endif
19616
19617 #if DB_VERSION_MAJOR > 2
19618         db_env_create( NULL, 0 );
19619 #elif DB_VERSION_MAJOR > 1
19620         db_appexit( NULL );
19621 #else
19622         (void) dbopen( NULL, 0, 0, 0, NULL);
19623 #endif
19624
19625 ; return 0; }
19626 EOF
19627 if { (eval echo configure:19628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19628   rm -rf conftest*
19629   ol_cv_db_db1=yes
19630 else
19631   echo "configure: failed program was:" >&5
19632   cat conftest.$ac_ext >&5
19633   rm -rf conftest*
19634   ol_cv_db_db1=no
19635 fi
19636 rm -f conftest*
19637
19638         LIBS="$ol_LIBS"
19639
19640 fi
19641
19642 echo "$ac_t""$ol_cv_db_db1" 1>&6
19643
19644         if test $ol_cv_db_db1 = yes ; then
19645                 ol_cv_lib_db=-ldb1
19646         fi
19647 fi
19648
19649 if test $ol_cv_lib_db = no ; then
19650         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19651 echo "configure:19652: checking for Berkeley DB link (-ldb-1)" >&5
19652 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19653   echo $ac_n "(cached) $ac_c" 1>&6
19654 else
19655   
19656         ol_DB_LIB=-ldb-1
19657         ol_LIBS=$LIBS
19658         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19659
19660         cat > conftest.$ac_ext <<EOF
19661 #line 19662 "configure"
19662 #include "confdefs.h"
19663
19664 #ifdef HAVE_DB_185_H
19665 # include <db_185.h>
19666 #else
19667 # include <db.h>
19668 #endif
19669
19670 #ifndef DB_VERSION_MAJOR
19671 # define DB_VERSION_MAJOR 1
19672 #endif
19673
19674 #ifndef NULL
19675 #define NULL ((void*)0)
19676 #endif
19677
19678 int main() {
19679
19680 #if DB_VERSION_MAJOR > 1
19681         {
19682                 char *version;
19683                 int major, minor, patch;
19684
19685                 version = db_version( &major, &minor, &patch );
19686
19687                 if( major != DB_VERSION_MAJOR ||
19688                         minor < DB_VERSION_MINOR )
19689                 {
19690                         printf("Berkeley DB version mismatch\n"
19691                                 "\texpected: %s\n\tgot: %s\n",
19692                                 DB_VERSION_STRING, version);
19693                         return 1;
19694                 }
19695         }
19696 #endif
19697
19698 #if DB_VERSION_MAJOR > 2
19699         db_env_create( NULL, 0 );
19700 #elif DB_VERSION_MAJOR > 1
19701         db_appexit( NULL );
19702 #else
19703         (void) dbopen( NULL, 0, 0, 0, NULL);
19704 #endif
19705
19706 ; return 0; }
19707 EOF
19708 if { (eval echo configure:19709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19709   rm -rf conftest*
19710   ol_cv_db_db_1=yes
19711 else
19712   echo "configure: failed program was:" >&5
19713   cat conftest.$ac_ext >&5
19714   rm -rf conftest*
19715   ol_cv_db_db_1=no
19716 fi
19717 rm -f conftest*
19718
19719         LIBS="$ol_LIBS"
19720
19721 fi
19722
19723 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19724
19725         if test $ol_cv_db_db_1 = yes ; then
19726                 ol_cv_lib_db=-ldb-1
19727         fi
19728 fi
19729
19730
19731         if test "$ol_cv_lib_db" != no ; then
19732                 ol_cv_berkeley_db=yes
19733                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19734 echo "configure:19735: checking for Berkeley DB thread support" >&5
19735 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19736   echo $ac_n "(cached) $ac_c" 1>&6
19737 else
19738   
19739         ol_LIBS="$LIBS"
19740         LIBS="$LTHREAD_LIBS $LIBS"
19741         if test $ol_cv_lib_db != yes ; then
19742                 LIBS="$ol_cv_lib_db $LIBS"
19743         fi
19744
19745         if test "$cross_compiling" = yes; then
19746   ol_cv_berkeley_db_thread=cross
19747 else
19748   cat > conftest.$ac_ext <<EOF
19749 #line 19750 "configure"
19750 #include "confdefs.h"
19751
19752 #ifdef HAVE_DB_185_H
19753         choke me;
19754 #else
19755 #include <db.h>
19756 #endif
19757 #ifndef NULL
19758 #define NULL ((void *)0)
19759 #endif
19760 main()
19761 {
19762         int rc;
19763         u_int32_t flags = DB_CREATE |
19764 #ifdef DB_PRIVATE
19765                 DB_PRIVATE |
19766 #endif
19767                 DB_THREAD;
19768
19769 #if DB_VERSION_MAJOR > 2
19770         DB_ENV *env = NULL;
19771
19772         rc = db_env_create( &env, 0 );
19773
19774         flags |= DB_INIT_MPOOL;
19775 #ifdef DB_MPOOL_PRIVATE
19776         flags |= DB_MPOOL_PRIVATE;
19777 #endif
19778
19779         if( rc ) {
19780                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19781                 return rc;
19782         }
19783
19784 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19785         rc = env->open( env, NULL, flags, 0 );
19786 #else
19787         rc = env->open( env, NULL, NULL, flags, 0 );
19788 #endif
19789
19790         if ( rc == 0 ) {
19791                 rc = env->close( env, 0 );
19792         }
19793
19794         if( rc ) {
19795                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19796                 return rc;
19797         }
19798
19799 #else
19800         DB_ENV env;
19801         memset( &env, '\0', sizeof(env) );
19802
19803         rc = db_appinit( NULL, NULL, &env, flags );
19804
19805         if( rc == 0 ) {
19806                 db_appexit( &env );
19807         }
19808
19809         unlink("__db_mpool.share");
19810         unlink("__db_lock.share");
19811 #endif
19812
19813         return rc;
19814 }
19815 EOF
19816 if { (eval echo configure:19817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19817 then
19818   ol_cv_berkeley_db_thread=yes
19819 else
19820   echo "configure: failed program was:" >&5
19821   cat conftest.$ac_ext >&5
19822   rm -fr conftest*
19823   ol_cv_berkeley_db_thread=no
19824 fi
19825 rm -fr conftest*
19826 fi
19827
19828
19829         LIBS="$ol_LIBS"
19830
19831 fi
19832
19833 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19834
19835         if test $ol_cv_berkeley_db_thread != no ; then
19836                 cat >> confdefs.h <<\EOF
19837 #define HAVE_BERKELEY_DB_THREAD 1
19838 EOF
19839
19840         fi
19841
19842         fi
19843 fi
19844
19845         fi
19846
19847         if test $ol_cv_berkeley_db != no ; then
19848                 cat >> confdefs.h <<\EOF
19849 #define HAVE_BERKELEY_DB 1
19850 EOF
19851
19852
19853                 ol_link_ldbm=berkeley
19854                 ol_with_ldbm_api=berkeley
19855
19856                 if test $ol_with_ldbm_type = hash ; then
19857                         cat >> confdefs.h <<\EOF
19858 #define LDBM_USE_DBHASH 1
19859 EOF
19860
19861                 else
19862                         cat >> confdefs.h <<\EOF
19863 #define LDBM_USE_DBBTREE 1
19864 EOF
19865
19866                 fi
19867
19868                                                 if test $ol_cv_lib_db != yes ; then
19869                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19870                 fi
19871         fi
19872 fi
19873
19874 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19875         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19876 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19877         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19878 echo "configure:19879: checking Berkeley DB version for BDB backend" >&5
19879 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19880   echo $ac_n "(cached) $ac_c" 1>&6
19881 else
19882   
19883         cat > conftest.$ac_ext <<EOF
19884 #line 19885 "configure"
19885 #include "confdefs.h"
19886
19887 #include <db.h>
19888
19889  /* this check could be improved */
19890 #ifndef DB_VERSION_MAJOR
19891 #       define DB_VERSION_MAJOR 1
19892 #endif
19893 #ifndef DB_VERSION_MINOR
19894 #       define DB_VERSION_MINOR 0
19895 #endif
19896
19897 /* require 4.2 or later */
19898 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19899         __db_version_compat
19900 #endif
19901         
19902 EOF
19903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19904   egrep "__db_version_compat" >/dev/null 2>&1; then
19905   rm -rf conftest*
19906   ol_cv_bdb_compat=yes
19907 else
19908   rm -rf conftest*
19909   ol_cv_bdb_compat=no
19910 fi
19911 rm -f conftest*
19912
19913 fi
19914
19915 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19916
19917
19918         if test $ol_cv_bdb_compat = yes ; then
19919                 ol_enable_bdb=yes
19920         elif test $ol_enable_bdb = yes ; then
19921                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19922         else
19923                 ol_enable_bdb=no
19924         fi
19925 fi
19926 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19927         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19928 fi
19929
19930 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19931         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19932         ol_with_ldbm_api=none
19933 fi
19934
19935 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19936         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19937 echo "configure:19938: checking for MDBM library" >&5
19938 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19939   echo $ac_n "(cached) $ac_c" 1>&6
19940 else
19941         ol_LIBS="$LIBS"
19942         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19943 echo "configure:19944: checking for mdbm_set_chain" >&5
19944 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19945   echo $ac_n "(cached) $ac_c" 1>&6
19946 else
19947   cat > conftest.$ac_ext <<EOF
19948 #line 19949 "configure"
19949 #include "confdefs.h"
19950 /* System header to define __stub macros and hopefully few prototypes,
19951     which can conflict with char mdbm_set_chain(); below.  */
19952 #include <assert.h>
19953 /* Override any gcc2 internal prototype to avoid an error.  */
19954 /* We use char because int might match the return type of a gcc2
19955     builtin and then its argument prototype would still apply.  */
19956 char mdbm_set_chain();
19957 char (*f)();
19958
19959 int main() {
19960
19961 /* The GNU C library defines this for functions which it implements
19962     to always fail with ENOSYS.  Some functions are actually named
19963     something starting with __ and the normal name is an alias.  */
19964 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19965 choke me
19966 #else
19967 f = mdbm_set_chain;
19968 #endif
19969
19970 ; return 0; }
19971 EOF
19972 if { (eval echo configure:19973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19973   rm -rf conftest*
19974   eval "ac_cv_func_mdbm_set_chain=yes"
19975 else
19976   echo "configure: failed program was:" >&5
19977   cat conftest.$ac_ext >&5
19978   rm -rf conftest*
19979   eval "ac_cv_func_mdbm_set_chain=no"
19980 fi
19981 rm -f conftest*
19982 fi
19983
19984 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19985   echo "$ac_t""yes" 1>&6
19986   ol_cv_lib_mdbm=yes
19987 else
19988   echo "$ac_t""no" 1>&6
19989
19990                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19991 echo "configure:19992: checking for mdbm_set_chain in -lmdbm" >&5
19992 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19993 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19994   echo $ac_n "(cached) $ac_c" 1>&6
19995 else
19996   ac_save_LIBS="$LIBS"
19997 LIBS="-lmdbm  $LIBS"
19998 cat > conftest.$ac_ext <<EOF
19999 #line 20000 "configure"
20000 #include "confdefs.h"
20001 /* Override any gcc2 internal prototype to avoid an error.  */
20002 /* We use char because int might match the return type of a gcc2
20003     builtin and then its argument prototype would still apply.  */
20004 char mdbm_set_chain();
20005
20006 int main() {
20007 mdbm_set_chain()
20008 ; return 0; }
20009 EOF
20010 if { (eval echo configure:20011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20011   rm -rf conftest*
20012   eval "ac_cv_lib_$ac_lib_var=yes"
20013 else
20014   echo "configure: failed program was:" >&5
20015   cat conftest.$ac_ext >&5
20016   rm -rf conftest*
20017   eval "ac_cv_lib_$ac_lib_var=no"
20018 fi
20019 rm -f conftest*
20020 LIBS="$ac_save_LIBS"
20021
20022 fi
20023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20024   echo "$ac_t""yes" 1>&6
20025   ol_cv_lib_mdbm=-lmdbm
20026 else
20027   echo "$ac_t""no" 1>&6
20028 ol_cv_lib_mdbm=no
20029 fi
20030
20031         
20032 fi
20033
20034         LIBS="$ol_LIBS"
20035
20036 fi
20037
20038 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20039
20040
20041  for ac_hdr in mdbm.h
20042 do
20043 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20044 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20045 echo "configure:20046: checking for $ac_hdr" >&5
20046 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20047   echo $ac_n "(cached) $ac_c" 1>&6
20048 else
20049   cat > conftest.$ac_ext <<EOF
20050 #line 20051 "configure"
20051 #include "confdefs.h"
20052 #include <$ac_hdr>
20053 EOF
20054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20055 { (eval echo configure:20056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20057 if test -z "$ac_err"; then
20058   rm -rf conftest*
20059   eval "ac_cv_header_$ac_safe=yes"
20060 else
20061   echo "$ac_err" >&5
20062   echo "configure: failed program was:" >&5
20063   cat conftest.$ac_ext >&5
20064   rm -rf conftest*
20065   eval "ac_cv_header_$ac_safe=no"
20066 fi
20067 rm -f conftest*
20068 fi
20069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20070   echo "$ac_t""yes" 1>&6
20071     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20072   cat >> confdefs.h <<EOF
20073 #define $ac_tr_hdr 1
20074 EOF
20075  
20076 else
20077   echo "$ac_t""no" 1>&6
20078 fi
20079 done
20080
20081  echo $ac_n "checking for db""... $ac_c" 1>&6
20082 echo "configure:20083: checking for db" >&5
20083 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20084   echo $ac_n "(cached) $ac_c" 1>&6
20085 else
20086   
20087         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20088                 ol_cv_mdbm=no
20089         else
20090                 ol_cv_mdbm=yes
20091         fi
20092
20093 fi
20094
20095 echo "$ac_t""$ol_cv_mdbm" 1>&6
20096  if test $ol_cv_mdbm = yes ; then
20097         cat >> confdefs.h <<\EOF
20098 #define HAVE_MDBM 1
20099 EOF
20100
20101  fi
20102
20103
20104         if test $ol_cv_mdbm = yes ; then
20105                 ol_link_ldbm=mdbm
20106                 ol_with_ldbm_api=mdbm
20107                 if test $ol_cv_lib_mdbm != yes ; then
20108                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20109                 fi
20110         fi
20111 fi
20112
20113 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20114         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20115 echo "configure:20116: checking for GDBM library" >&5
20116 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20117   echo $ac_n "(cached) $ac_c" 1>&6
20118 else
20119         ol_LIBS="$LIBS"
20120         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20121 echo "configure:20122: checking for gdbm_open" >&5
20122 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20123   echo $ac_n "(cached) $ac_c" 1>&6
20124 else
20125   cat > conftest.$ac_ext <<EOF
20126 #line 20127 "configure"
20127 #include "confdefs.h"
20128 /* System header to define __stub macros and hopefully few prototypes,
20129     which can conflict with char gdbm_open(); below.  */
20130 #include <assert.h>
20131 /* Override any gcc2 internal prototype to avoid an error.  */
20132 /* We use char because int might match the return type of a gcc2
20133     builtin and then its argument prototype would still apply.  */
20134 char gdbm_open();
20135 char (*f)();
20136
20137 int main() {
20138
20139 /* The GNU C library defines this for functions which it implements
20140     to always fail with ENOSYS.  Some functions are actually named
20141     something starting with __ and the normal name is an alias.  */
20142 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20143 choke me
20144 #else
20145 f = gdbm_open;
20146 #endif
20147
20148 ; return 0; }
20149 EOF
20150 if { (eval echo configure:20151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20151   rm -rf conftest*
20152   eval "ac_cv_func_gdbm_open=yes"
20153 else
20154   echo "configure: failed program was:" >&5
20155   cat conftest.$ac_ext >&5
20156   rm -rf conftest*
20157   eval "ac_cv_func_gdbm_open=no"
20158 fi
20159 rm -f conftest*
20160 fi
20161
20162 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20163   echo "$ac_t""yes" 1>&6
20164   ol_cv_lib_gdbm=yes
20165 else
20166   echo "$ac_t""no" 1>&6
20167
20168                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20169 echo "configure:20170: checking for gdbm_open in -lgdbm" >&5
20170 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20171 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20172   echo $ac_n "(cached) $ac_c" 1>&6
20173 else
20174   ac_save_LIBS="$LIBS"
20175 LIBS="-lgdbm  $LIBS"
20176 cat > conftest.$ac_ext <<EOF
20177 #line 20178 "configure"
20178 #include "confdefs.h"
20179 /* Override any gcc2 internal prototype to avoid an error.  */
20180 /* We use char because int might match the return type of a gcc2
20181     builtin and then its argument prototype would still apply.  */
20182 char gdbm_open();
20183
20184 int main() {
20185 gdbm_open()
20186 ; return 0; }
20187 EOF
20188 if { (eval echo configure:20189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20189   rm -rf conftest*
20190   eval "ac_cv_lib_$ac_lib_var=yes"
20191 else
20192   echo "configure: failed program was:" >&5
20193   cat conftest.$ac_ext >&5
20194   rm -rf conftest*
20195   eval "ac_cv_lib_$ac_lib_var=no"
20196 fi
20197 rm -f conftest*
20198 LIBS="$ac_save_LIBS"
20199
20200 fi
20201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20202   echo "$ac_t""yes" 1>&6
20203   ol_cv_lib_gdbm=-lgdbm
20204 else
20205   echo "$ac_t""no" 1>&6
20206 ol_cv_lib_gdbm=no
20207 fi
20208
20209         
20210 fi
20211
20212         LIBS="$ol_LIBS"
20213
20214 fi
20215
20216 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20217
20218
20219  for ac_hdr in gdbm.h
20220 do
20221 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20222 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20223 echo "configure:20224: checking for $ac_hdr" >&5
20224 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20225   echo $ac_n "(cached) $ac_c" 1>&6
20226 else
20227   cat > conftest.$ac_ext <<EOF
20228 #line 20229 "configure"
20229 #include "confdefs.h"
20230 #include <$ac_hdr>
20231 EOF
20232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20233 { (eval echo configure:20234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20235 if test -z "$ac_err"; then
20236   rm -rf conftest*
20237   eval "ac_cv_header_$ac_safe=yes"
20238 else
20239   echo "$ac_err" >&5
20240   echo "configure: failed program was:" >&5
20241   cat conftest.$ac_ext >&5
20242   rm -rf conftest*
20243   eval "ac_cv_header_$ac_safe=no"
20244 fi
20245 rm -f conftest*
20246 fi
20247 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20248   echo "$ac_t""yes" 1>&6
20249     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20250   cat >> confdefs.h <<EOF
20251 #define $ac_tr_hdr 1
20252 EOF
20253  
20254 else
20255   echo "$ac_t""no" 1>&6
20256 fi
20257 done
20258
20259  echo $ac_n "checking for db""... $ac_c" 1>&6
20260 echo "configure:20261: checking for db" >&5
20261 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20262   echo $ac_n "(cached) $ac_c" 1>&6
20263 else
20264   
20265         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20266                 ol_cv_gdbm=no
20267         else
20268                 ol_cv_gdbm=yes
20269         fi
20270
20271 fi
20272
20273 echo "$ac_t""$ol_cv_gdbm" 1>&6
20274  if test $ol_cv_gdbm = yes ; then
20275         cat >> confdefs.h <<\EOF
20276 #define HAVE_GDBM 1
20277 EOF
20278
20279  fi
20280
20281
20282         if test $ol_cv_gdbm = yes ; then
20283                 ol_link_ldbm=gdbm
20284                 ol_with_ldbm_api=gdbm
20285
20286                 if test $ol_cv_lib_gdbm != yes ; then
20287                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20288                 fi
20289         fi
20290 fi
20291
20292 if test $ol_with_ldbm_api = ndbm ; then
20293         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20294 echo "configure:20295: checking for NDBM library" >&5
20295 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20296   echo $ac_n "(cached) $ac_c" 1>&6
20297 else
20298         ol_LIBS="$LIBS"
20299         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20300 echo "configure:20301: checking for dbm_open" >&5
20301 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20302   echo $ac_n "(cached) $ac_c" 1>&6
20303 else
20304   cat > conftest.$ac_ext <<EOF
20305 #line 20306 "configure"
20306 #include "confdefs.h"
20307 /* System header to define __stub macros and hopefully few prototypes,
20308     which can conflict with char dbm_open(); below.  */
20309 #include <assert.h>
20310 /* Override any gcc2 internal prototype to avoid an error.  */
20311 /* We use char because int might match the return type of a gcc2
20312     builtin and then its argument prototype would still apply.  */
20313 char dbm_open();
20314 char (*f)();
20315
20316 int main() {
20317
20318 /* The GNU C library defines this for functions which it implements
20319     to always fail with ENOSYS.  Some functions are actually named
20320     something starting with __ and the normal name is an alias.  */
20321 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20322 choke me
20323 #else
20324 f = dbm_open;
20325 #endif
20326
20327 ; return 0; }
20328 EOF
20329 if { (eval echo configure:20330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20330   rm -rf conftest*
20331   eval "ac_cv_func_dbm_open=yes"
20332 else
20333   echo "configure: failed program was:" >&5
20334   cat conftest.$ac_ext >&5
20335   rm -rf conftest*
20336   eval "ac_cv_func_dbm_open=no"
20337 fi
20338 rm -f conftest*
20339 fi
20340
20341 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20342   echo "$ac_t""yes" 1>&6
20343   ol_cv_lib_ndbm=yes
20344 else
20345   echo "$ac_t""no" 1>&6
20346
20347                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20348 echo "configure:20349: checking for dbm_open in -lndbm" >&5
20349 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20350 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20351   echo $ac_n "(cached) $ac_c" 1>&6
20352 else
20353   ac_save_LIBS="$LIBS"
20354 LIBS="-lndbm  $LIBS"
20355 cat > conftest.$ac_ext <<EOF
20356 #line 20357 "configure"
20357 #include "confdefs.h"
20358 /* Override any gcc2 internal prototype to avoid an error.  */
20359 /* We use char because int might match the return type of a gcc2
20360     builtin and then its argument prototype would still apply.  */
20361 char dbm_open();
20362
20363 int main() {
20364 dbm_open()
20365 ; return 0; }
20366 EOF
20367 if { (eval echo configure:20368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20368   rm -rf conftest*
20369   eval "ac_cv_lib_$ac_lib_var=yes"
20370 else
20371   echo "configure: failed program was:" >&5
20372   cat conftest.$ac_ext >&5
20373   rm -rf conftest*
20374   eval "ac_cv_lib_$ac_lib_var=no"
20375 fi
20376 rm -f conftest*
20377 LIBS="$ac_save_LIBS"
20378
20379 fi
20380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20381   echo "$ac_t""yes" 1>&6
20382   ol_cv_lib_ndbm=-lndbm
20383 else
20384   echo "$ac_t""no" 1>&6
20385
20386                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20387 echo "configure:20388: checking for dbm_open in -ldbm" >&5
20388 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20389 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20390   echo $ac_n "(cached) $ac_c" 1>&6
20391 else
20392   ac_save_LIBS="$LIBS"
20393 LIBS="-ldbm  $LIBS"
20394 cat > conftest.$ac_ext <<EOF
20395 #line 20396 "configure"
20396 #include "confdefs.h"
20397 /* Override any gcc2 internal prototype to avoid an error.  */
20398 /* We use char because int might match the return type of a gcc2
20399     builtin and then its argument prototype would still apply.  */
20400 char dbm_open();
20401
20402 int main() {
20403 dbm_open()
20404 ; return 0; }
20405 EOF
20406 if { (eval echo configure:20407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20407   rm -rf conftest*
20408   eval "ac_cv_lib_$ac_lib_var=yes"
20409 else
20410   echo "configure: failed program was:" >&5
20411   cat conftest.$ac_ext >&5
20412   rm -rf conftest*
20413   eval "ac_cv_lib_$ac_lib_var=no"
20414 fi
20415 rm -f conftest*
20416 LIBS="$ac_save_LIBS"
20417
20418 fi
20419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20420   echo "$ac_t""yes" 1>&6
20421   ol_cv_lib_ndbm=-ldbm
20422 else
20423   echo "$ac_t""no" 1>&6
20424 ol_cv_lib_ndbm=no
20425 fi
20426                 
20427 fi
20428
20429         
20430 fi
20431
20432         LIBS="$ol_LIBS"
20433
20434 fi
20435
20436 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20437
20438
20439  for ac_hdr in ndbm.h
20440 do
20441 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20442 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20443 echo "configure:20444: checking for $ac_hdr" >&5
20444 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20445   echo $ac_n "(cached) $ac_c" 1>&6
20446 else
20447   cat > conftest.$ac_ext <<EOF
20448 #line 20449 "configure"
20449 #include "confdefs.h"
20450 #include <$ac_hdr>
20451 EOF
20452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20453 { (eval echo configure:20454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20455 if test -z "$ac_err"; then
20456   rm -rf conftest*
20457   eval "ac_cv_header_$ac_safe=yes"
20458 else
20459   echo "$ac_err" >&5
20460   echo "configure: failed program was:" >&5
20461   cat conftest.$ac_ext >&5
20462   rm -rf conftest*
20463   eval "ac_cv_header_$ac_safe=no"
20464 fi
20465 rm -f conftest*
20466 fi
20467 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20468   echo "$ac_t""yes" 1>&6
20469     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20470   cat >> confdefs.h <<EOF
20471 #define $ac_tr_hdr 1
20472 EOF
20473  
20474 else
20475   echo "$ac_t""no" 1>&6
20476 fi
20477 done
20478
20479  echo $ac_n "checking for db""... $ac_c" 1>&6
20480 echo "configure:20481: checking for db" >&5
20481 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20482   echo $ac_n "(cached) $ac_c" 1>&6
20483 else
20484   
20485         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20486                 ol_cv_ndbm=no
20487         else
20488                 ol_cv_ndbm=yes
20489         fi
20490
20491 fi
20492
20493 echo "$ac_t""$ol_cv_ndbm" 1>&6
20494  if test $ol_cv_ndbm = yes ; then
20495         cat >> confdefs.h <<\EOF
20496 #define HAVE_NDBM 1
20497 EOF
20498
20499  fi
20500
20501
20502         if test $ol_cv_ndbm = yes ; then
20503                 ol_link_ldbm=ndbm
20504                 ol_with_ldbm_api=ndbm
20505
20506                 if test $ol_cv_lib_ndbm != yes ; then
20507                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20508                 fi
20509         fi
20510 fi
20511
20512 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20513         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20514         if test $ol_enable_ldbm = yes ; then
20515                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20516         fi
20517
20518         echo "configure: warning: disabling LDBM" 1>&2
20519         ol_enable_ldbm=no
20520 fi
20521
20522
20523 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20524         BUILD_LIBS_DYNAMIC=shared
20525         cat >> confdefs.h <<\EOF
20526 #define LDAP_LIBS_DYNAMIC 1
20527 EOF
20528
20529         LTSTATIC=""
20530 else
20531         BUILD_LIBS_DYNAMIC=static
20532         LTSTATIC="-static"
20533 fi
20534
20535 if test $ol_enable_wrappers != no ; then
20536         for ac_hdr in tcpd.h
20537 do
20538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20540 echo "configure:20541: checking for $ac_hdr" >&5
20541 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20542   echo $ac_n "(cached) $ac_c" 1>&6
20543 else
20544   cat > conftest.$ac_ext <<EOF
20545 #line 20546 "configure"
20546 #include "confdefs.h"
20547 #include <$ac_hdr>
20548 EOF
20549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20550 { (eval echo configure:20551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20552 if test -z "$ac_err"; then
20553   rm -rf conftest*
20554   eval "ac_cv_header_$ac_safe=yes"
20555 else
20556   echo "$ac_err" >&5
20557   echo "configure: failed program was:" >&5
20558   cat conftest.$ac_ext >&5
20559   rm -rf conftest*
20560   eval "ac_cv_header_$ac_safe=no"
20561 fi
20562 rm -f conftest*
20563 fi
20564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20565   echo "$ac_t""yes" 1>&6
20566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20567   cat >> confdefs.h <<EOF
20568 #define $ac_tr_hdr 1
20569 EOF
20570  
20571                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20572 echo "configure:20573: checking for TCP wrappers library" >&5
20573                 save_LIBS="$LIBS"
20574                 LIBS="$LIBS -lwrap"
20575                 cat > conftest.$ac_ext <<EOF
20576 #line 20577 "configure"
20577 #include "confdefs.h"
20578
20579 #include <tcpd.h>
20580 int allow_severity = 0;
20581 int deny_severity  = 0;
20582
20583 struct request_info *req;
20584                 
20585 int main() {
20586
20587 hosts_access(req)
20588                 
20589 ; return 0; }
20590 EOF
20591 if { (eval echo configure:20592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20592   rm -rf conftest*
20593   echo "$ac_t""-lwrap" 1>&6
20594                 have_wrappers=yes
20595                 LIBS="$save_LIBS"
20596 else
20597   echo "configure: failed program was:" >&5
20598   cat conftest.$ac_ext >&5
20599   rm -rf conftest*
20600   
20601                                 LIBS="$LIBS -lnsl"
20602                 cat > conftest.$ac_ext <<EOF
20603 #line 20604 "configure"
20604 #include "confdefs.h"
20605
20606 #include <tcpd.h>
20607 int allow_severity = 0;
20608 int deny_severity  = 0;
20609
20610 struct request_info *req;
20611                 
20612 int main() {
20613
20614 hosts_access(req)
20615                 
20616 ; return 0; }
20617 EOF
20618 if { (eval echo configure:20619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20619   rm -rf conftest*
20620   echo "$ac_t""-lwrap -lnsl" 1>&6
20621                 have_wrappers=yes
20622                 LIBS="$save_LIBS -lnsl"
20623 else
20624   echo "configure: failed program was:" >&5
20625   cat conftest.$ac_ext >&5
20626   rm -rf conftest*
20627   
20628                 echo "$ac_t""no" 1>&6
20629                 have_wrappers=no
20630                 LIBS=$save_LIBS
20631 fi
20632 rm -f conftest*
20633 fi
20634 rm -f conftest*
20635 else
20636   echo "$ac_t""no" 1>&6
20637 have_wrappers=no
20638 fi
20639 done
20640
20641
20642         if test $have_wrappers = yes ; then
20643                 cat >> confdefs.h <<\EOF
20644 #define HAVE_TCPD 1
20645 EOF
20646
20647                 WRAP_LIBS="-lwrap"
20648         elif test $ol_enable_wrappers = yes ; then
20649                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20650         else
20651                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20652                 WRAP_LIBS=""
20653         fi
20654 fi
20655
20656 if test $ol_enable_syslog != no ; then
20657         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20658 echo "configure:20659: checking for openlog" >&5
20659 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20660   echo $ac_n "(cached) $ac_c" 1>&6
20661 else
20662   cat > conftest.$ac_ext <<EOF
20663 #line 20664 "configure"
20664 #include "confdefs.h"
20665 /* System header to define __stub macros and hopefully few prototypes,
20666     which can conflict with char openlog(); below.  */
20667 #include <assert.h>
20668 /* Override any gcc2 internal prototype to avoid an error.  */
20669 /* We use char because int might match the return type of a gcc2
20670     builtin and then its argument prototype would still apply.  */
20671 char openlog();
20672 char (*f)();
20673
20674 int main() {
20675
20676 /* The GNU C library defines this for functions which it implements
20677     to always fail with ENOSYS.  Some functions are actually named
20678     something starting with __ and the normal name is an alias.  */
20679 #if defined (__stub_openlog) || defined (__stub___openlog)
20680 choke me
20681 #else
20682 f = openlog;
20683 #endif
20684
20685 ; return 0; }
20686 EOF
20687 if { (eval echo configure:20688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20688   rm -rf conftest*
20689   eval "ac_cv_func_openlog=yes"
20690 else
20691   echo "configure: failed program was:" >&5
20692   cat conftest.$ac_ext >&5
20693   rm -rf conftest*
20694   eval "ac_cv_func_openlog=no"
20695 fi
20696 rm -f conftest*
20697 fi
20698
20699 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20700   echo "$ac_t""yes" 1>&6
20701   :
20702 else
20703   echo "$ac_t""no" 1>&6
20704 fi
20705
20706         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20707                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20708         fi
20709         ol_enable_syslog=$ac_cv_func_openlog
20710 fi
20711
20712
20713 ol_link_sql=no
20714 if test $ol_enable_sql != no ; then
20715         for ac_hdr in sql.h sqlext.h
20716 do
20717 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20718 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20719 echo "configure:20720: checking for $ac_hdr" >&5
20720 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20721   echo $ac_n "(cached) $ac_c" 1>&6
20722 else
20723   cat > conftest.$ac_ext <<EOF
20724 #line 20725 "configure"
20725 #include "confdefs.h"
20726 #include <$ac_hdr>
20727 EOF
20728 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20729 { (eval echo configure:20730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20730 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20731 if test -z "$ac_err"; then
20732   rm -rf conftest*
20733   eval "ac_cv_header_$ac_safe=yes"
20734 else
20735   echo "$ac_err" >&5
20736   echo "configure: failed program was:" >&5
20737   cat conftest.$ac_ext >&5
20738   rm -rf conftest*
20739   eval "ac_cv_header_$ac_safe=no"
20740 fi
20741 rm -f conftest*
20742 fi
20743 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20744   echo "$ac_t""yes" 1>&6
20745     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20746   cat >> confdefs.h <<EOF
20747 #define $ac_tr_hdr 1
20748 EOF
20749  
20750 else
20751   echo "$ac_t""no" 1>&6
20752 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20753         
20754 fi
20755 done
20756
20757
20758         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20759 echo "configure:20760: checking for SQLDriverConnect in -liodbc" >&5
20760 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20761 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20762   echo $ac_n "(cached) $ac_c" 1>&6
20763 else
20764   ac_save_LIBS="$LIBS"
20765 LIBS="-liodbc  $LIBS"
20766 cat > conftest.$ac_ext <<EOF
20767 #line 20768 "configure"
20768 #include "confdefs.h"
20769 /* Override any gcc2 internal prototype to avoid an error.  */
20770 /* We use char because int might match the return type of a gcc2
20771     builtin and then its argument prototype would still apply.  */
20772 char SQLDriverConnect();
20773
20774 int main() {
20775 SQLDriverConnect()
20776 ; return 0; }
20777 EOF
20778 if { (eval echo configure:20779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20779   rm -rf conftest*
20780   eval "ac_cv_lib_$ac_lib_var=yes"
20781 else
20782   echo "configure: failed program was:" >&5
20783   cat conftest.$ac_ext >&5
20784   rm -rf conftest*
20785   eval "ac_cv_lib_$ac_lib_var=no"
20786 fi
20787 rm -f conftest*
20788 LIBS="$ac_save_LIBS"
20789
20790 fi
20791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20792   echo "$ac_t""yes" 1>&6
20793   have_iodbc=yes
20794 else
20795   echo "$ac_t""no" 1>&6
20796 have_iodbc=no
20797 fi
20798
20799         if test $have_iodbc = yes ; then
20800                 ol_link_sql="-liodbc"
20801         else
20802                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20803 echo "configure:20804: checking for SQLDriverConnect in -lodbc" >&5
20804 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20805 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20806   echo $ac_n "(cached) $ac_c" 1>&6
20807 else
20808   ac_save_LIBS="$LIBS"
20809 LIBS="-lodbc  $LIBS"
20810 cat > conftest.$ac_ext <<EOF
20811 #line 20812 "configure"
20812 #include "confdefs.h"
20813 /* Override any gcc2 internal prototype to avoid an error.  */
20814 /* We use char because int might match the return type of a gcc2
20815     builtin and then its argument prototype would still apply.  */
20816 char SQLDriverConnect();
20817
20818 int main() {
20819 SQLDriverConnect()
20820 ; return 0; }
20821 EOF
20822 if { (eval echo configure:20823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20823   rm -rf conftest*
20824   eval "ac_cv_lib_$ac_lib_var=yes"
20825 else
20826   echo "configure: failed program was:" >&5
20827   cat conftest.$ac_ext >&5
20828   rm -rf conftest*
20829   eval "ac_cv_lib_$ac_lib_var=no"
20830 fi
20831 rm -f conftest*
20832 LIBS="$ac_save_LIBS"
20833
20834 fi
20835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20836   echo "$ac_t""yes" 1>&6
20837   have_odbc=yes
20838 else
20839   echo "$ac_t""no" 1>&6
20840 have_odbc=no
20841 fi
20842
20843                 if test $have_odbc = yes ; then
20844                         ol_link_sql="-lodbc"
20845                 fi
20846         fi
20847
20848         if test $ol_link_sql != no ; then
20849                 SLAPD_SQL_LIBS="$ol_link_sql"
20850
20851         elif test $ol_enable_sql != auto ; then
20852                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20853         fi
20854 fi
20855
20856 ol_link_sasl=no
20857 ol_link_spasswd=no
20858 if test $ol_with_cyrus_sasl != no ; then
20859         for ac_hdr in sasl/sasl.h sasl.h
20860 do
20861 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20862 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20863 echo "configure:20864: checking for $ac_hdr" >&5
20864 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20865   echo $ac_n "(cached) $ac_c" 1>&6
20866 else
20867   cat > conftest.$ac_ext <<EOF
20868 #line 20869 "configure"
20869 #include "confdefs.h"
20870 #include <$ac_hdr>
20871 EOF
20872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20873 { (eval echo configure:20874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20875 if test -z "$ac_err"; then
20876   rm -rf conftest*
20877   eval "ac_cv_header_$ac_safe=yes"
20878 else
20879   echo "$ac_err" >&5
20880   echo "configure: failed program was:" >&5
20881   cat conftest.$ac_ext >&5
20882   rm -rf conftest*
20883   eval "ac_cv_header_$ac_safe=no"
20884 fi
20885 rm -f conftest*
20886 fi
20887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20888   echo "$ac_t""yes" 1>&6
20889     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20890   cat >> confdefs.h <<EOF
20891 #define $ac_tr_hdr 1
20892 EOF
20893  
20894 else
20895   echo "$ac_t""no" 1>&6
20896 fi
20897 done
20898
20899
20900         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20901                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20902 echo "configure:20903: checking for sasl_client_init in -lsasl2" >&5
20903 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20904 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20905   echo $ac_n "(cached) $ac_c" 1>&6
20906 else
20907   ac_save_LIBS="$LIBS"
20908 LIBS="-lsasl2  $LIBS"
20909 cat > conftest.$ac_ext <<EOF
20910 #line 20911 "configure"
20911 #include "confdefs.h"
20912 /* Override any gcc2 internal prototype to avoid an error.  */
20913 /* We use char because int might match the return type of a gcc2
20914     builtin and then its argument prototype would still apply.  */
20915 char sasl_client_init();
20916
20917 int main() {
20918 sasl_client_init()
20919 ; return 0; }
20920 EOF
20921 if { (eval echo configure:20922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20922   rm -rf conftest*
20923   eval "ac_cv_lib_$ac_lib_var=yes"
20924 else
20925   echo "configure: failed program was:" >&5
20926   cat conftest.$ac_ext >&5
20927   rm -rf conftest*
20928   eval "ac_cv_lib_$ac_lib_var=no"
20929 fi
20930 rm -f conftest*
20931 LIBS="$ac_save_LIBS"
20932
20933 fi
20934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20935   echo "$ac_t""yes" 1>&6
20936   ol_link_sasl="-lsasl2"
20937 else
20938   echo "$ac_t""no" 1>&6
20939 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20940 echo "configure:20941: checking for sasl_client_init in -lsasl" >&5
20941 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20942 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20943   echo $ac_n "(cached) $ac_c" 1>&6
20944 else
20945   ac_save_LIBS="$LIBS"
20946 LIBS="-lsasl  $LIBS"
20947 cat > conftest.$ac_ext <<EOF
20948 #line 20949 "configure"
20949 #include "confdefs.h"
20950 /* Override any gcc2 internal prototype to avoid an error.  */
20951 /* We use char because int might match the return type of a gcc2
20952     builtin and then its argument prototype would still apply.  */
20953 char sasl_client_init();
20954
20955 int main() {
20956 sasl_client_init()
20957 ; return 0; }
20958 EOF
20959 if { (eval echo configure:20960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20960   rm -rf conftest*
20961   eval "ac_cv_lib_$ac_lib_var=yes"
20962 else
20963   echo "configure: failed program was:" >&5
20964   cat conftest.$ac_ext >&5
20965   rm -rf conftest*
20966   eval "ac_cv_lib_$ac_lib_var=no"
20967 fi
20968 rm -f conftest*
20969 LIBS="$ac_save_LIBS"
20970
20971 fi
20972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20973   echo "$ac_t""yes" 1>&6
20974   ol_link_sasl="-lsasl"
20975 else
20976   echo "$ac_t""no" 1>&6
20977 fi
20978
20979 fi
20980
20981         fi
20982
20983         if test $ol_link_sasl = no ; then
20984                 if test $ol_with_cyrus_sasl != auto ; then
20985                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20986                 else
20987                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20988                         echo "configure: warning: SASL authentication not supported!" 1>&2
20989                         if test $ol_link_tls = no ; then
20990                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20991                         fi
20992                 fi
20993         else
20994                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20995 echo "configure:20996: checking Cyrus SASL library version" >&5
20996 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20997   echo $ac_n "(cached) $ac_c" 1>&6
20998 else
20999   
21000         cat > conftest.$ac_ext <<EOF
21001 #line 21002 "configure"
21002 #include "confdefs.h"
21003
21004 #ifdef HAVE_SASL_SASL_H
21005 #include <sasl/sasl.h>
21006 #else
21007 #include <sasl.h>
21008 #endif
21009
21010 /* Require 2.1.15+ */
21011 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21012         char *__sasl_compat = "2.2+ or better okay (we guess)";
21013 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21014         && SASL_VERSION_STEP >=15
21015         char *__sasl_compat = "2.1.15+ or better okay";
21016 #endif
21017         
21018 EOF
21019 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21020   egrep "__sasl_compat" >/dev/null 2>&1; then
21021   rm -rf conftest*
21022   ol_cv_sasl_compat=yes
21023 else
21024   rm -rf conftest*
21025   ol_cv_sasl_compat=no
21026 fi
21027 rm -f conftest*
21028
21029 fi
21030
21031 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21032
21033                 if test $ol_cv_sasl_compat = no ; then
21034                         ol_link_sasl=no
21035                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
21036                 fi
21037
21038                 cat >> confdefs.h <<\EOF
21039 #define HAVE_CYRUS_SASL 1
21040 EOF
21041
21042                 SASL_LIBS="$ol_link_sasl"
21043                 if test $ol_enable_spasswd != no ; then
21044                         ol_link_spasswd=yes
21045                 fi
21046
21047                 ac_save_LIBS="$LIBS"
21048                 LIBS="$LIBS $ol_link_sasl"
21049                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21050 echo "configure:21051: checking for sasl_version" >&5
21051 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21052   echo $ac_n "(cached) $ac_c" 1>&6
21053 else
21054   cat > conftest.$ac_ext <<EOF
21055 #line 21056 "configure"
21056 #include "confdefs.h"
21057 /* System header to define __stub macros and hopefully few prototypes,
21058     which can conflict with char sasl_version(); below.  */
21059 #include <assert.h>
21060 /* Override any gcc2 internal prototype to avoid an error.  */
21061 /* We use char because int might match the return type of a gcc2
21062     builtin and then its argument prototype would still apply.  */
21063 char sasl_version();
21064 char (*f)();
21065
21066 int main() {
21067
21068 /* The GNU C library defines this for functions which it implements
21069     to always fail with ENOSYS.  Some functions are actually named
21070     something starting with __ and the normal name is an alias.  */
21071 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21072 choke me
21073 #else
21074 f = sasl_version;
21075 #endif
21076
21077 ; return 0; }
21078 EOF
21079 if { (eval echo configure:21080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21080   rm -rf conftest*
21081   eval "ac_cv_func_sasl_version=yes"
21082 else
21083   echo "configure: failed program was:" >&5
21084   cat conftest.$ac_ext >&5
21085   rm -rf conftest*
21086   eval "ac_cv_func_sasl_version=no"
21087 fi
21088 rm -f conftest*
21089 fi
21090
21091 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21092   echo "$ac_t""yes" 1>&6
21093   cat >> confdefs.h <<\EOF
21094 #define HAVE_SASL_VERSION 1
21095 EOF
21096
21097 else
21098   echo "$ac_t""no" 1>&6
21099 fi
21100
21101                 LIBS="$ac_save_LIBS"
21102         fi
21103
21104 else
21105         echo "configure: warning: SASL authentication not supported!" 1>&2
21106         if test $ol_link_tls = no ; then
21107                 echo "configure: warning: Strong authentication not supported!" 1>&2
21108         fi
21109 fi
21110
21111 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21112         dev=no
21113         if test -r /dev/urandom ; then
21114                 dev="/dev/urandom";
21115         elif test -r /idev/urandom ; then
21116                 dev="/idev/urandom";
21117         elif test -r /dev/srandom ; then
21118                 dev="/dev/srandom";
21119         elif test -r /dev/random ; then
21120                 dev="/dev/random";
21121         elif test -r /idev/random ; then
21122                 dev="/idev/random";
21123         fi
21124
21125         if test $dev != no ; then
21126                 cat >> confdefs.h <<EOF
21127 #define URANDOM_DEVICE "$dev"
21128 EOF
21129
21130         fi
21131 fi
21132
21133 ol_link_fetch=no
21134 if test $ol_with_fetch != no ; then
21135         ol_LIBS=$LIBS
21136 LIBS="-lfetch -lcom_err $LIBS"
21137 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21138 echo "configure:21139: checking fetch(3) library" >&5
21139 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21140   echo $ac_n "(cached) $ac_c" 1>&6
21141 else
21142   
21143         cat > conftest.$ac_ext <<EOF
21144 #line 21145 "configure"
21145 #include "confdefs.h"
21146
21147 #include <sys/param.h>
21148 #include <stdio.h>
21149 #include <fetch.h>
21150 int main() {
21151 struct url *u = fetchParseURL("file:///"); 
21152 ; return 0; }
21153 EOF
21154 if { (eval echo configure:21155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21155   rm -rf conftest*
21156   ol_cv_lib_fetch=yes
21157 else
21158   echo "configure: failed program was:" >&5
21159   cat conftest.$ac_ext >&5
21160   rm -rf conftest*
21161   ol_cv_lib_fetch=no
21162 fi
21163 rm -f conftest*
21164 fi
21165
21166 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21167 LIBS=$ol_LIBS
21168 if test $ol_cv_lib_fetch != no ; then
21169         ol_link_fetch="-lfetch -lcom_err"
21170         cat >> confdefs.h <<\EOF
21171 #define HAVE_FETCH 1
21172 EOF
21173
21174 fi
21175
21176
21177         if test $ol_cv_lib_fetch != no ; then
21178                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21179                 ol_link_fetch=freebsd
21180
21181         elif test $ol_with_fetch != auto ; then
21182                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21183         fi 
21184 fi
21185
21186 if test $ol_enable_crypt != no ; then
21187         save_LIBS="$LIBS"
21188         LIBS="$TLS_LIBS $LIBS"
21189
21190         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21191 echo "configure:21192: checking for crypt" >&5
21192 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21193   echo $ac_n "(cached) $ac_c" 1>&6
21194 else
21195   cat > conftest.$ac_ext <<EOF
21196 #line 21197 "configure"
21197 #include "confdefs.h"
21198 /* System header to define __stub macros and hopefully few prototypes,
21199     which can conflict with char crypt(); below.  */
21200 #include <assert.h>
21201 /* Override any gcc2 internal prototype to avoid an error.  */
21202 /* We use char because int might match the return type of a gcc2
21203     builtin and then its argument prototype would still apply.  */
21204 char crypt();
21205 char (*f)();
21206
21207 int main() {
21208
21209 /* The GNU C library defines this for functions which it implements
21210     to always fail with ENOSYS.  Some functions are actually named
21211     something starting with __ and the normal name is an alias.  */
21212 #if defined (__stub_crypt) || defined (__stub___crypt)
21213 choke me
21214 #else
21215 f = crypt;
21216 #endif
21217
21218 ; return 0; }
21219 EOF
21220 if { (eval echo configure:21221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21221   rm -rf conftest*
21222   eval "ac_cv_func_crypt=yes"
21223 else
21224   echo "configure: failed program was:" >&5
21225   cat conftest.$ac_ext >&5
21226   rm -rf conftest*
21227   eval "ac_cv_func_crypt=no"
21228 fi
21229 rm -f conftest*
21230 fi
21231
21232 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21233   echo "$ac_t""yes" 1>&6
21234   have_crypt=yes
21235 else
21236   echo "$ac_t""no" 1>&6
21237
21238                 LIBS="$save_LIBS"
21239                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21240 echo "configure:21241: checking for crypt in -lcrypt" >&5
21241 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21242 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21243   echo $ac_n "(cached) $ac_c" 1>&6
21244 else
21245   ac_save_LIBS="$LIBS"
21246 LIBS="-lcrypt  $LIBS"
21247 cat > conftest.$ac_ext <<EOF
21248 #line 21249 "configure"
21249 #include "confdefs.h"
21250 /* Override any gcc2 internal prototype to avoid an error.  */
21251 /* We use char because int might match the return type of a gcc2
21252     builtin and then its argument prototype would still apply.  */
21253 char crypt();
21254
21255 int main() {
21256 crypt()
21257 ; return 0; }
21258 EOF
21259 if { (eval echo configure:21260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21260   rm -rf conftest*
21261   eval "ac_cv_lib_$ac_lib_var=yes"
21262 else
21263   echo "configure: failed program was:" >&5
21264   cat conftest.$ac_ext >&5
21265   rm -rf conftest*
21266   eval "ac_cv_lib_$ac_lib_var=no"
21267 fi
21268 rm -f conftest*
21269 LIBS="$ac_save_LIBS"
21270
21271 fi
21272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21273   echo "$ac_t""yes" 1>&6
21274   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21275                         have_crypt=yes
21276 else
21277   echo "$ac_t""no" 1>&6
21278 have_crypt=no
21279 fi
21280
21281 fi
21282
21283
21284         LIBS="$save_LIBS"
21285
21286         if test $have_crypt = yes ; then
21287                 cat >> confdefs.h <<\EOF
21288 #define HAVE_CRYPT 1
21289 EOF
21290
21291         else
21292                 echo "configure: warning: could not find crypt" 1>&2
21293                 if test $ol_enable_crypt = yes ; then
21294                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21295                 fi
21296
21297                 echo "configure: warning: disabling crypt support" 1>&2
21298                 ol_enable_crypt=no
21299         fi
21300 fi
21301
21302 if test $ol_enable_proctitle != no ; then
21303         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21304 echo "configure:21305: checking for setproctitle" >&5
21305 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21306   echo $ac_n "(cached) $ac_c" 1>&6
21307 else
21308   cat > conftest.$ac_ext <<EOF
21309 #line 21310 "configure"
21310 #include "confdefs.h"
21311 /* System header to define __stub macros and hopefully few prototypes,
21312     which can conflict with char setproctitle(); below.  */
21313 #include <assert.h>
21314 /* Override any gcc2 internal prototype to avoid an error.  */
21315 /* We use char because int might match the return type of a gcc2
21316     builtin and then its argument prototype would still apply.  */
21317 char setproctitle();
21318 char (*f)();
21319
21320 int main() {
21321
21322 /* The GNU C library defines this for functions which it implements
21323     to always fail with ENOSYS.  Some functions are actually named
21324     something starting with __ and the normal name is an alias.  */
21325 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21326 choke me
21327 #else
21328 f = setproctitle;
21329 #endif
21330
21331 ; return 0; }
21332 EOF
21333 if { (eval echo configure:21334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21334   rm -rf conftest*
21335   eval "ac_cv_func_setproctitle=yes"
21336 else
21337   echo "configure: failed program was:" >&5
21338   cat conftest.$ac_ext >&5
21339   rm -rf conftest*
21340   eval "ac_cv_func_setproctitle=no"
21341 fi
21342 rm -f conftest*
21343 fi
21344
21345 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21346   echo "$ac_t""yes" 1>&6
21347   have_setproctitle=yes
21348 else
21349   echo "$ac_t""no" 1>&6
21350
21351                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21352 echo "configure:21353: checking for setproctitle in -lutil" >&5
21353 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21354 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21355   echo $ac_n "(cached) $ac_c" 1>&6
21356 else
21357   ac_save_LIBS="$LIBS"
21358 LIBS="-lutil  $LIBS"
21359 cat > conftest.$ac_ext <<EOF
21360 #line 21361 "configure"
21361 #include "confdefs.h"
21362 /* Override any gcc2 internal prototype to avoid an error.  */
21363 /* We use char because int might match the return type of a gcc2
21364     builtin and then its argument prototype would still apply.  */
21365 char setproctitle();
21366
21367 int main() {
21368 setproctitle()
21369 ; return 0; }
21370 EOF
21371 if { (eval echo configure:21372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21372   rm -rf conftest*
21373   eval "ac_cv_lib_$ac_lib_var=yes"
21374 else
21375   echo "configure: failed program was:" >&5
21376   cat conftest.$ac_ext >&5
21377   rm -rf conftest*
21378   eval "ac_cv_lib_$ac_lib_var=no"
21379 fi
21380 rm -f conftest*
21381 LIBS="$ac_save_LIBS"
21382
21383 fi
21384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21385   echo "$ac_t""yes" 1>&6
21386   have_setproctitle=yes
21387                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21388 else
21389   echo "$ac_t""no" 1>&6
21390 have_setproctitle=no
21391                         LIBOBJS="$LIBOBJS setproctitle.o"
21392                         LIBSRCS="$LIBSRCS setproctitle.c"
21393 fi
21394
21395 fi
21396
21397
21398         if test $have_setproctitle = yes ; then
21399                 cat >> confdefs.h <<\EOF
21400 #define HAVE_SETPROCTITLE 1
21401 EOF
21402
21403         fi
21404 fi
21405
21406 if test $ol_enable_slp != no ; then
21407         for ac_hdr in slp.h 
21408 do
21409 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21410 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21411 echo "configure:21412: checking for $ac_hdr" >&5
21412 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21413   echo $ac_n "(cached) $ac_c" 1>&6
21414 else
21415   cat > conftest.$ac_ext <<EOF
21416 #line 21417 "configure"
21417 #include "confdefs.h"
21418 #include <$ac_hdr>
21419 EOF
21420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21421 { (eval echo configure:21422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21423 if test -z "$ac_err"; then
21424   rm -rf conftest*
21425   eval "ac_cv_header_$ac_safe=yes"
21426 else
21427   echo "$ac_err" >&5
21428   echo "configure: failed program was:" >&5
21429   cat conftest.$ac_ext >&5
21430   rm -rf conftest*
21431   eval "ac_cv_header_$ac_safe=no"
21432 fi
21433 rm -f conftest*
21434 fi
21435 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21436   echo "$ac_t""yes" 1>&6
21437     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21438   cat >> confdefs.h <<EOF
21439 #define $ac_tr_hdr 1
21440 EOF
21441  
21442 else
21443   echo "$ac_t""no" 1>&6
21444 fi
21445 done
21446
21447
21448         if test $ac_cv_header_slp_h = yes ; then
21449                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21450 echo "configure:21451: checking for SLPOpen in -lslp" >&5
21451 ac_lib_var=`echo slp'_'SLPOpen | 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="-lslp  $LIBS"
21457 cat > conftest.$ac_ext <<EOF
21458 #line 21459 "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 SLPOpen();
21464
21465 int main() {
21466 SLPOpen()
21467 ; return 0; }
21468 EOF
21469 if { (eval echo configure:21470: \"$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   have_slp=yes
21485 else
21486   echo "$ac_t""no" 1>&6
21487 have_slp=no
21488 fi
21489
21490                 if test $have_slp = yes ; then
21491                         cat >> confdefs.h <<\EOF
21492 #define HAVE_SLP 1
21493 EOF
21494
21495                         SLAPD_SLP_LIBS=-lslp
21496                 fi
21497
21498         elif test $ol_enable_slp = yes ; then
21499                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21500         fi
21501 fi
21502
21503
21504 echo $ac_n "checking long long""... $ac_c" 1>&6
21505 echo "configure:21506: checking long long" >&5
21506 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21507   echo $ac_n "(cached) $ac_c" 1>&6
21508 else
21509   
21510         cat > conftest.$ac_ext <<EOF
21511 #line 21512 "configure"
21512 #include "confdefs.h"
21513
21514 int main() {
21515 long long x;
21516 ; return 0; }
21517 EOF
21518 if { (eval echo configure:21519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21519   rm -rf conftest*
21520   ol_cv_type_long_long=yes
21521 else
21522   echo "configure: failed program was:" >&5
21523   cat conftest.$ac_ext >&5
21524   rm -rf conftest*
21525   ol_cv_type_long_long=no
21526 fi
21527 rm -f conftest*
21528 fi
21529
21530 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21531 if test $ol_cv_type_long_long = yes; then
21532         cat >> confdefs.h <<\EOF
21533 #define HAVE_LONG_LONG 1
21534 EOF
21535
21536 fi
21537
21538 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21539 echo "configure:21540: checking for ANSI C header files" >&5
21540 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21541   echo $ac_n "(cached) $ac_c" 1>&6
21542 else
21543   cat > conftest.$ac_ext <<EOF
21544 #line 21545 "configure"
21545 #include "confdefs.h"
21546 #include <stdlib.h>
21547 #include <stdarg.h>
21548 #include <string.h>
21549 #include <float.h>
21550 EOF
21551 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21552 { (eval echo configure:21553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21553 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21554 if test -z "$ac_err"; then
21555   rm -rf conftest*
21556   ac_cv_header_stdc=yes
21557 else
21558   echo "$ac_err" >&5
21559   echo "configure: failed program was:" >&5
21560   cat conftest.$ac_ext >&5
21561   rm -rf conftest*
21562   ac_cv_header_stdc=no
21563 fi
21564 rm -f conftest*
21565
21566 if test $ac_cv_header_stdc = yes; then
21567   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21568 cat > conftest.$ac_ext <<EOF
21569 #line 21570 "configure"
21570 #include "confdefs.h"
21571 #include <string.h>
21572 EOF
21573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21574   egrep "memchr" >/dev/null 2>&1; then
21575   :
21576 else
21577   rm -rf conftest*
21578   ac_cv_header_stdc=no
21579 fi
21580 rm -f conftest*
21581
21582 fi
21583
21584 if test $ac_cv_header_stdc = yes; then
21585   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21586 cat > conftest.$ac_ext <<EOF
21587 #line 21588 "configure"
21588 #include "confdefs.h"
21589 #include <stdlib.h>
21590 EOF
21591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21592   egrep "free" >/dev/null 2>&1; then
21593   :
21594 else
21595   rm -rf conftest*
21596   ac_cv_header_stdc=no
21597 fi
21598 rm -f conftest*
21599
21600 fi
21601
21602 if test $ac_cv_header_stdc = yes; then
21603   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21604 if test "$cross_compiling" = yes; then
21605   :
21606 else
21607   cat > conftest.$ac_ext <<EOF
21608 #line 21609 "configure"
21609 #include "confdefs.h"
21610 #include <ctype.h>
21611 #if ((' ' & 0x0FF) == 0x020)
21612 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21613 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21614 #else
21615 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21616  || ('j' <= (c) && (c) <= 'r') \
21617  || ('s' <= (c) && (c) <= 'z'))
21618 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21619 #endif
21620 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21621 int main () { int i; for (i = 0; i < 256; i++)
21622 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21623 exit (0); }
21624
21625 EOF
21626 if { (eval echo configure:21627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21627 then
21628   :
21629 else
21630   echo "configure: failed program was:" >&5
21631   cat conftest.$ac_ext >&5
21632   rm -fr conftest*
21633   ac_cv_header_stdc=no
21634 fi
21635 rm -fr conftest*
21636 fi
21637
21638 fi
21639 fi
21640
21641 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21642 if test $ac_cv_header_stdc = yes; then
21643   cat >> confdefs.h <<\EOF
21644 #define STDC_HEADERS 1
21645 EOF
21646
21647 fi
21648
21649 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21650 echo "configure:21651: checking for mode_t" >&5
21651 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21652   echo $ac_n "(cached) $ac_c" 1>&6
21653 else
21654   cat > conftest.$ac_ext <<EOF
21655 #line 21656 "configure"
21656 #include "confdefs.h"
21657 #include <sys/types.h>
21658 #if STDC_HEADERS
21659 #include <stdlib.h>
21660 #include <stddef.h>
21661 #endif
21662
21663 EOF
21664 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21665   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21666   rm -rf conftest*
21667   eval "ac_cv_type_mode_t=yes"
21668 else
21669   rm -rf conftest*
21670   eval "ac_cv_type_mode_t=no"
21671 fi
21672 rm -f conftest*
21673
21674 fi
21675 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21676   echo "$ac_t""yes" 1>&6
21677 else
21678   echo "$ac_t""no" 1>&6
21679   cat >> confdefs.h <<EOF
21680 #define mode_t int
21681 EOF
21682
21683 fi
21684
21685 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21686 echo "configure:21687: checking for off_t" >&5
21687 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21688   echo $ac_n "(cached) $ac_c" 1>&6
21689 else
21690   cat > conftest.$ac_ext <<EOF
21691 #line 21692 "configure"
21692 #include "confdefs.h"
21693 #include <sys/types.h>
21694 #if STDC_HEADERS
21695 #include <stdlib.h>
21696 #include <stddef.h>
21697 #endif
21698
21699 EOF
21700 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21701   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21702   rm -rf conftest*
21703   eval "ac_cv_type_off_t=yes"
21704 else
21705   rm -rf conftest*
21706   eval "ac_cv_type_off_t=no"
21707 fi
21708 rm -f conftest*
21709
21710 fi
21711 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21712   echo "$ac_t""yes" 1>&6
21713 else
21714   echo "$ac_t""no" 1>&6
21715   cat >> confdefs.h <<EOF
21716 #define off_t long
21717 EOF
21718
21719 fi
21720
21721 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21722 echo "configure:21723: checking for pid_t" >&5
21723 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21724   echo $ac_n "(cached) $ac_c" 1>&6
21725 else
21726   cat > conftest.$ac_ext <<EOF
21727 #line 21728 "configure"
21728 #include "confdefs.h"
21729 #include <sys/types.h>
21730 #if STDC_HEADERS
21731 #include <stdlib.h>
21732 #include <stddef.h>
21733 #endif
21734
21735 EOF
21736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21737   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21738   rm -rf conftest*
21739   eval "ac_cv_type_pid_t=yes"
21740 else
21741   rm -rf conftest*
21742   eval "ac_cv_type_pid_t=no"
21743 fi
21744 rm -f conftest*
21745
21746 fi
21747 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21748   echo "$ac_t""yes" 1>&6
21749 else
21750   echo "$ac_t""no" 1>&6
21751   cat >> confdefs.h <<EOF
21752 #define pid_t int
21753 EOF
21754
21755 fi
21756
21757 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21758 echo "configure:21759: checking for ptrdiff_t" >&5
21759 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21760   echo $ac_n "(cached) $ac_c" 1>&6
21761 else
21762   cat > conftest.$ac_ext <<EOF
21763 #line 21764 "configure"
21764 #include "confdefs.h"
21765 #include <stddef.h>
21766 int main() {
21767 ptrdiff_t p
21768 ; return 0; }
21769 EOF
21770 if { (eval echo configure:21771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21771   rm -rf conftest*
21772   am_cv_type_ptrdiff_t=yes
21773 else
21774   echo "configure: failed program was:" >&5
21775   cat conftest.$ac_ext >&5
21776   rm -rf conftest*
21777   am_cv_type_ptrdiff_t=no
21778 fi
21779 rm -f conftest*
21780 fi
21781
21782 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21783    if test $am_cv_type_ptrdiff_t = yes; then
21784      cat >> confdefs.h <<\EOF
21785 #define HAVE_PTRDIFF_T 1
21786 EOF
21787
21788    fi
21789
21790 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21791 echo "configure:21792: checking return type of signal handlers" >&5
21792 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21793   echo $ac_n "(cached) $ac_c" 1>&6
21794 else
21795   cat > conftest.$ac_ext <<EOF
21796 #line 21797 "configure"
21797 #include "confdefs.h"
21798 #include <sys/types.h>
21799 #include <signal.h>
21800 #ifdef signal
21801 #undef signal
21802 #endif
21803 #ifdef __cplusplus
21804 extern "C" void (*signal (int, void (*)(int)))(int);
21805 #else
21806 void (*signal ()) ();
21807 #endif
21808
21809 int main() {
21810 int i;
21811 ; return 0; }
21812 EOF
21813 if { (eval echo configure:21814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21814   rm -rf conftest*
21815   ac_cv_type_signal=void
21816 else
21817   echo "configure: failed program was:" >&5
21818   cat conftest.$ac_ext >&5
21819   rm -rf conftest*
21820   ac_cv_type_signal=int
21821 fi
21822 rm -f conftest*
21823 fi
21824
21825 echo "$ac_t""$ac_cv_type_signal" 1>&6
21826 cat >> confdefs.h <<EOF
21827 #define RETSIGTYPE $ac_cv_type_signal
21828 EOF
21829
21830
21831 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21832 echo "configure:21833: checking for size_t" >&5
21833 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21834   echo $ac_n "(cached) $ac_c" 1>&6
21835 else
21836   cat > conftest.$ac_ext <<EOF
21837 #line 21838 "configure"
21838 #include "confdefs.h"
21839 #include <sys/types.h>
21840 #if STDC_HEADERS
21841 #include <stdlib.h>
21842 #include <stddef.h>
21843 #endif
21844
21845 EOF
21846 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21847   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21848   rm -rf conftest*
21849   eval "ac_cv_type_size_t=yes"
21850 else
21851   rm -rf conftest*
21852   eval "ac_cv_type_size_t=no"
21853 fi
21854 rm -f conftest*
21855
21856 fi
21857 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21858   echo "$ac_t""yes" 1>&6
21859 else
21860   echo "$ac_t""no" 1>&6
21861   cat >> confdefs.h <<EOF
21862 #define size_t unsigned
21863 EOF
21864
21865 fi
21866
21867
21868 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21869 echo "configure:21870: checking for ssize_t" >&5
21870 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21871   echo $ac_n "(cached) $ac_c" 1>&6
21872 else
21873   cat > conftest.$ac_ext <<EOF
21874 #line 21875 "configure"
21875 #include "confdefs.h"
21876 #include <sys/types.h>
21877 #if STDC_HEADERS
21878 #include <stdlib.h>
21879 #include <stddef.h>
21880 #endif
21881
21882 EOF
21883 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21884   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21885   rm -rf conftest*
21886   eval "ac_cv_type_ssize_t=yes"
21887 else
21888   rm -rf conftest*
21889   eval "ac_cv_type_ssize_t=no"
21890 fi
21891 rm -f conftest*
21892
21893 fi
21894 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21895   echo "$ac_t""yes" 1>&6
21896 else
21897   echo "$ac_t""no" 1>&6
21898   cat >> confdefs.h <<EOF
21899 #define ssize_t signed int
21900 EOF
21901
21902 fi
21903
21904 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21905 echo "configure:21906: checking for caddr_t" >&5
21906 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21907   echo $ac_n "(cached) $ac_c" 1>&6
21908 else
21909   cat > conftest.$ac_ext <<EOF
21910 #line 21911 "configure"
21911 #include "confdefs.h"
21912 #include <sys/types.h>
21913 #if STDC_HEADERS
21914 #include <stdlib.h>
21915 #include <stddef.h>
21916 #endif
21917
21918 EOF
21919 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21920   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21921   rm -rf conftest*
21922   eval "ac_cv_type_caddr_t=yes"
21923 else
21924   rm -rf conftest*
21925   eval "ac_cv_type_caddr_t=no"
21926 fi
21927 rm -f conftest*
21928
21929 fi
21930 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21931   echo "$ac_t""yes" 1>&6
21932 else
21933   echo "$ac_t""no" 1>&6
21934   cat >> confdefs.h <<EOF
21935 #define caddr_t char *
21936 EOF
21937
21938 fi
21939
21940
21941 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21942 echo "configure:21943: checking for socklen_t" >&5
21943 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21944   echo $ac_n "(cached) $ac_c" 1>&6
21945 else
21946   cat > conftest.$ac_ext <<EOF
21947 #line 21948 "configure"
21948 #include "confdefs.h"
21949
21950 #ifdef HAVE_SYS_TYPES_H
21951 #include <sys/types.h>
21952 #endif
21953 #ifdef HAVE_SYS_SOCKET_H
21954 #include <sys/socket.h>
21955 #endif
21956
21957 int main() {
21958 socklen_t len;
21959 ; return 0; }
21960 EOF
21961 if { (eval echo configure:21962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21962   rm -rf conftest*
21963   ol_cv_type_socklen_t=yes
21964 else
21965   echo "configure: failed program was:" >&5
21966   cat conftest.$ac_ext >&5
21967   rm -rf conftest*
21968   ol_cv_type_socklen_t=no
21969 fi
21970 rm -f conftest*
21971 fi
21972
21973 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21974   if test $ol_cv_type_socklen_t = no; then
21975     cat >> confdefs.h <<\EOF
21976 #define socklen_t int
21977 EOF
21978
21979   fi
21980  
21981 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21982 echo "configure:21983: checking for member st_blksize in aggregate type struct stat" >&5
21983 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21984   echo $ac_n "(cached) $ac_c" 1>&6
21985 else
21986   cat > conftest.$ac_ext <<EOF
21987 #line 21988 "configure"
21988 #include "confdefs.h"
21989 #include <sys/types.h>
21990 #include <sys/stat.h>
21991 int main() {
21992 struct stat foo; foo.st_blksize;
21993 ; return 0; }
21994 EOF
21995 if { (eval echo configure:21996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21996   rm -rf conftest*
21997   ac_cv_c_struct_member_st_blksize=yes
21998 else
21999   echo "configure: failed program was:" >&5
22000   cat conftest.$ac_ext >&5
22001   rm -rf conftest*
22002   ac_cv_c_struct_member_st_blksize=no
22003 fi
22004 rm -f conftest*
22005 fi
22006
22007 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22008 st_blksize="$ac_cv_c_struct_member_st_blksize"
22009 if test $ac_cv_c_struct_member_st_blksize = yes; then
22010   cat >> confdefs.h <<\EOF
22011 #define HAVE_ST_BLKSIZE 1
22012 EOF
22013
22014 fi
22015
22016 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22017 echo "configure:22018: checking whether time.h and sys/time.h may both be included" >&5
22018 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22019   echo $ac_n "(cached) $ac_c" 1>&6
22020 else
22021   cat > conftest.$ac_ext <<EOF
22022 #line 22023 "configure"
22023 #include "confdefs.h"
22024 #include <sys/types.h>
22025 #include <sys/time.h>
22026 #include <time.h>
22027 int main() {
22028 struct tm *tp;
22029 ; return 0; }
22030 EOF
22031 if { (eval echo configure:22032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22032   rm -rf conftest*
22033   ac_cv_header_time=yes
22034 else
22035   echo "configure: failed program was:" >&5
22036   cat conftest.$ac_ext >&5
22037   rm -rf conftest*
22038   ac_cv_header_time=no
22039 fi
22040 rm -f conftest*
22041 fi
22042
22043 echo "$ac_t""$ac_cv_header_time" 1>&6
22044 if test $ac_cv_header_time = yes; then
22045   cat >> confdefs.h <<\EOF
22046 #define TIME_WITH_SYS_TIME 1
22047 EOF
22048
22049 fi
22050
22051 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22052 echo "configure:22053: checking whether struct tm is in sys/time.h or time.h" >&5
22053 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22054   echo $ac_n "(cached) $ac_c" 1>&6
22055 else
22056   cat > conftest.$ac_ext <<EOF
22057 #line 22058 "configure"
22058 #include "confdefs.h"
22059 #include <sys/types.h>
22060 #include <time.h>
22061 int main() {
22062 struct tm *tp; tp->tm_sec;
22063 ; return 0; }
22064 EOF
22065 if { (eval echo configure:22066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22066   rm -rf conftest*
22067   ac_cv_struct_tm=time.h
22068 else
22069   echo "configure: failed program was:" >&5
22070   cat conftest.$ac_ext >&5
22071   rm -rf conftest*
22072   ac_cv_struct_tm=sys/time.h
22073 fi
22074 rm -f conftest*
22075 fi
22076
22077 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22078 if test $ac_cv_struct_tm = sys/time.h; then
22079   cat >> confdefs.h <<\EOF
22080 #define TM_IN_SYS_TIME 1
22081 EOF
22082
22083 fi
22084
22085 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22086 echo "configure:22087: checking for uid_t in sys/types.h" >&5
22087 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22088   echo $ac_n "(cached) $ac_c" 1>&6
22089 else
22090   cat > conftest.$ac_ext <<EOF
22091 #line 22092 "configure"
22092 #include "confdefs.h"
22093 #include <sys/types.h>
22094 EOF
22095 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22096   egrep "uid_t" >/dev/null 2>&1; then
22097   rm -rf conftest*
22098   ac_cv_type_uid_t=yes
22099 else
22100   rm -rf conftest*
22101   ac_cv_type_uid_t=no
22102 fi
22103 rm -f conftest*
22104
22105 fi
22106
22107 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22108 if test $ac_cv_type_uid_t = no; then
22109   cat >> confdefs.h <<\EOF
22110 #define uid_t int
22111 EOF
22112
22113   cat >> confdefs.h <<\EOF
22114 #define gid_t int
22115 EOF
22116
22117 fi
22118
22119 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22120 echo "configure:22121: checking for sig_atomic_t" >&5
22121 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22122   echo $ac_n "(cached) $ac_c" 1>&6
22123 else
22124   cat > conftest.$ac_ext <<EOF
22125 #line 22126 "configure"
22126 #include "confdefs.h"
22127 #include <signal.h>
22128 int main() {
22129 sig_atomic_t atomic;
22130 ; return 0; }
22131 EOF
22132 if { (eval echo configure:22133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22133   rm -rf conftest*
22134   ol_cv_type_sig_atomic_t=yes
22135 else
22136   echo "configure: failed program was:" >&5
22137   cat conftest.$ac_ext >&5
22138   rm -rf conftest*
22139   ol_cv_type_sig_atomic_t=no
22140 fi
22141 rm -f conftest*
22142 fi
22143
22144 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22145   if test $ol_cv_type_sig_atomic_t = no; then
22146     cat >> confdefs.h <<\EOF
22147 #define sig_atomic_t int
22148 EOF
22149
22150   fi
22151  
22152
22153
22154 # test for pw_gecos in struct passwd
22155 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22156 echo "configure:22157: checking struct passwd for pw_gecos" >&5
22157 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22158   echo $ac_n "(cached) $ac_c" 1>&6
22159 else
22160   
22161         cat > conftest.$ac_ext <<EOF
22162 #line 22163 "configure"
22163 #include "confdefs.h"
22164 #include <pwd.h>
22165 int main() {
22166
22167         struct passwd pwd;
22168         pwd.pw_gecos = pwd.pw_name;
22169
22170 ; return 0; }
22171 EOF
22172 if { (eval echo configure:22173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22173   rm -rf conftest*
22174   ol_cv_struct_passwd_pw_gecos=yes
22175 else
22176   echo "configure: failed program was:" >&5
22177   cat conftest.$ac_ext >&5
22178   rm -rf conftest*
22179   ol_cv_struct_passwd_pw_gecos=no
22180 fi
22181 rm -f conftest*
22182 fi
22183
22184 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22185 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22186         cat >> confdefs.h <<\EOF
22187 #define HAVE_PW_GECOS 1
22188 EOF
22189
22190 fi
22191
22192 # test for pw_passwd in struct passwd
22193 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22194 echo "configure:22195: checking struct passwd for pw_passwd" >&5
22195 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22196   echo $ac_n "(cached) $ac_c" 1>&6
22197 else
22198   
22199         cat > conftest.$ac_ext <<EOF
22200 #line 22201 "configure"
22201 #include "confdefs.h"
22202 #include <pwd.h>
22203 int main() {
22204
22205         struct passwd pwd;
22206         pwd.pw_passwd = pwd.pw_name;
22207
22208 ; return 0; }
22209 EOF
22210 if { (eval echo configure:22211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22211   rm -rf conftest*
22212   ol_cv_struct_passwd_pw_passwd=yes
22213 else
22214   echo "configure: failed program was:" >&5
22215   cat conftest.$ac_ext >&5
22216   rm -rf conftest*
22217   ol_cv_struct_passwd_pw_passwd=no
22218 fi
22219 rm -f conftest*
22220 fi
22221
22222 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22223 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22224         cat >> confdefs.h <<\EOF
22225 #define HAVE_PW_PASSWD 1
22226 EOF
22227
22228 fi
22229
22230
22231 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22232 echo "configure:22233: checking if toupper() requires islower()" >&5
22233 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22234   echo $ac_n "(cached) $ac_c" 1>&6
22235 else
22236   
22237         if test "$cross_compiling" = yes; then
22238   ol_cv_c_upper_lower=safe
22239 else
22240   cat > conftest.$ac_ext <<EOF
22241 #line 22242 "configure"
22242 #include "confdefs.h"
22243
22244 #include <ctype.h>
22245 main()
22246 {
22247         if ('C' == toupper('C'))
22248                 exit(0);
22249         else
22250                 exit(1);
22251 }
22252 EOF
22253 if { (eval echo configure:22254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22254 then
22255   ol_cv_c_upper_lower=no
22256 else
22257   echo "configure: failed program was:" >&5
22258   cat conftest.$ac_ext >&5
22259   rm -fr conftest*
22260   ol_cv_c_upper_lower=yes
22261 fi
22262 rm -fr conftest*
22263 fi
22264
22265 fi
22266
22267 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22268 if test $ol_cv_c_upper_lower != no ; then
22269         cat >> confdefs.h <<\EOF
22270 #define C_UPPER_LOWER 1
22271 EOF
22272
22273 fi
22274
22275 echo $ac_n "checking for working const""... $ac_c" 1>&6
22276 echo "configure:22277: checking for working const" >&5
22277 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22278   echo $ac_n "(cached) $ac_c" 1>&6
22279 else
22280   cat > conftest.$ac_ext <<EOF
22281 #line 22282 "configure"
22282 #include "confdefs.h"
22283
22284 int main() {
22285
22286 /* Ultrix mips cc rejects this.  */
22287 typedef int charset[2]; const charset x;
22288 /* SunOS 4.1.1 cc rejects this.  */
22289 char const *const *ccp;
22290 char **p;
22291 /* NEC SVR4.0.2 mips cc rejects this.  */
22292 struct point {int x, y;};
22293 static struct point const zero = {0,0};
22294 /* AIX XL C 1.02.0.0 rejects this.
22295    It does not let you subtract one const X* pointer from another in an arm
22296    of an if-expression whose if-part is not a constant expression */
22297 const char *g = "string";
22298 ccp = &g + (g ? g-g : 0);
22299 /* HPUX 7.0 cc rejects these. */
22300 ++ccp;
22301 p = (char**) ccp;
22302 ccp = (char const *const *) p;
22303 { /* SCO 3.2v4 cc rejects this.  */
22304   char *t;
22305   char const *s = 0 ? (char *) 0 : (char const *) 0;
22306
22307   *t++ = 0;
22308 }
22309 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22310   int x[] = {25, 17};
22311   const int *foo = &x[0];
22312   ++foo;
22313 }
22314 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22315   typedef const int *iptr;
22316   iptr p = 0;
22317   ++p;
22318 }
22319 { /* AIX XL C 1.02.0.0 rejects this saying
22320      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22321   struct s { int j; const int *ap[3]; };
22322   struct s *b; b->j = 5;
22323 }
22324 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22325   const int foo = 10;
22326 }
22327
22328 ; return 0; }
22329 EOF
22330 if { (eval echo configure:22331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22331   rm -rf conftest*
22332   ac_cv_c_const=yes
22333 else
22334   echo "configure: failed program was:" >&5
22335   cat conftest.$ac_ext >&5
22336   rm -rf conftest*
22337   ac_cv_c_const=no
22338 fi
22339 rm -f conftest*
22340 fi
22341
22342 echo "$ac_t""$ac_cv_c_const" 1>&6
22343 if test $ac_cv_c_const = no; then
22344   cat >> confdefs.h <<\EOF
22345 #define const 
22346 EOF
22347
22348 fi
22349
22350 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22351 echo "configure:22352: checking if compiler understands volatile" >&5
22352 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22353   echo $ac_n "(cached) $ac_c" 1>&6
22354 else
22355   cat > conftest.$ac_ext <<EOF
22356 #line 22357 "configure"
22357 #include "confdefs.h"
22358 int x, y, z;
22359 int main() {
22360 volatile int a; int * volatile b = x ? &y : &z;
22361       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22362       *b = 0;
22363 ; return 0; }
22364 EOF
22365 if { (eval echo configure:22366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22366   rm -rf conftest*
22367   ol_cv_c_volatile=yes
22368 else
22369   echo "configure: failed program was:" >&5
22370   cat conftest.$ac_ext >&5
22371   rm -rf conftest*
22372   ol_cv_c_volatile=no
22373 fi
22374 rm -f conftest*
22375 fi
22376
22377 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22378   if test $ol_cv_c_volatile = yes; then
22379     : 
22380   else
22381     cat >> confdefs.h <<\EOF
22382 #define volatile 
22383 EOF
22384
22385   fi
22386  
22387
22388 if test $cross_compiling = yes ; then
22389         cat >> confdefs.h <<\EOF
22390 #define CROSS_COMPILING 1
22391 EOF
22392
22393 else
22394         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22395 echo "configure:22396: checking whether byte ordering is bigendian" >&5
22396 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22397   echo $ac_n "(cached) $ac_c" 1>&6
22398 else
22399   ac_cv_c_bigendian=unknown
22400 # See if sys/param.h defines the BYTE_ORDER macro.
22401 cat > conftest.$ac_ext <<EOF
22402 #line 22403 "configure"
22403 #include "confdefs.h"
22404 #include <sys/types.h>
22405 #include <sys/param.h>
22406 int main() {
22407
22408 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22409  bogus endian macros
22410 #endif
22411 ; return 0; }
22412 EOF
22413 if { (eval echo configure:22414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22414   rm -rf conftest*
22415   # It does; now see whether it defined to BIG_ENDIAN or not.
22416 cat > conftest.$ac_ext <<EOF
22417 #line 22418 "configure"
22418 #include "confdefs.h"
22419 #include <sys/types.h>
22420 #include <sys/param.h>
22421 int main() {
22422
22423 #if BYTE_ORDER != BIG_ENDIAN
22424  not big endian
22425 #endif
22426 ; return 0; }
22427 EOF
22428 if { (eval echo configure:22429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22429   rm -rf conftest*
22430   ac_cv_c_bigendian=yes
22431 else
22432   echo "configure: failed program was:" >&5
22433   cat conftest.$ac_ext >&5
22434   rm -rf conftest*
22435   ac_cv_c_bigendian=no
22436 fi
22437 rm -f conftest*
22438 else
22439   echo "configure: failed program was:" >&5
22440   cat conftest.$ac_ext >&5
22441 fi
22442 rm -f conftest*
22443 if test $ac_cv_c_bigendian = unknown; then
22444 if test "$cross_compiling" = yes; then
22445     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22446 else
22447   cat > conftest.$ac_ext <<EOF
22448 #line 22449 "configure"
22449 #include "confdefs.h"
22450 main () {
22451   /* Are we little or big endian?  From Harbison&Steele.  */
22452   union
22453   {
22454     long l;
22455     char c[sizeof (long)];
22456   } u;
22457   u.l = 1;
22458   exit (u.c[sizeof (long) - 1] == 1);
22459 }
22460 EOF
22461 if { (eval echo configure:22462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22462 then
22463   ac_cv_c_bigendian=no
22464 else
22465   echo "configure: failed program was:" >&5
22466   cat conftest.$ac_ext >&5
22467   rm -fr conftest*
22468   ac_cv_c_bigendian=yes
22469 fi
22470 rm -fr conftest*
22471 fi
22472
22473 fi
22474 fi
22475
22476 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22477 if test $ac_cv_c_bigendian = yes; then
22478   cat >> confdefs.h <<\EOF
22479 #define WORDS_BIGENDIAN 1
22480 EOF
22481
22482 fi
22483
22484 fi
22485
22486 echo $ac_n "checking size of short""... $ac_c" 1>&6
22487 echo "configure:22488: checking size of short" >&5 
22488 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22489   echo $ac_n "(cached) $ac_c" 1>&6
22490 else
22491   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22492   cat > conftest.$ac_ext <<EOF
22493 #line 22494 "configure"
22494 #include "confdefs.h"
22495 #include "confdefs.h" 
22496 #include <sys/types.h> 
22497  
22498
22499 int main() {
22500 switch (0) case 0: case (sizeof (short) == $ac_size):;
22501 ; return 0; }
22502 EOF
22503 if { (eval echo configure:22504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22504   rm -rf conftest*
22505   ac_cv_sizeof_short=$ac_size
22506 else
22507   echo "configure: failed program was:" >&5
22508   cat conftest.$ac_ext >&5
22509 fi
22510 rm -f conftest* 
22511   if test x$ac_cv_sizeof_short != x ; then break; fi 
22512 done 
22513
22514 fi
22515  
22516 if test x$ac_cv_sizeof_short = x ; then 
22517   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22518 fi 
22519 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22520 cat >> confdefs.h <<EOF
22521 #define SIZEOF_SHORT $ac_cv_sizeof_short
22522 EOF
22523  
22524  
22525 echo $ac_n "checking size of int""... $ac_c" 1>&6
22526 echo "configure:22527: checking size of int" >&5 
22527 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22528   echo $ac_n "(cached) $ac_c" 1>&6
22529 else
22530   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22531   cat > conftest.$ac_ext <<EOF
22532 #line 22533 "configure"
22533 #include "confdefs.h"
22534 #include "confdefs.h" 
22535 #include <sys/types.h> 
22536  
22537
22538 int main() {
22539 switch (0) case 0: case (sizeof (int) == $ac_size):;
22540 ; return 0; }
22541 EOF
22542 if { (eval echo configure:22543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22543   rm -rf conftest*
22544   ac_cv_sizeof_int=$ac_size
22545 else
22546   echo "configure: failed program was:" >&5
22547   cat conftest.$ac_ext >&5
22548 fi
22549 rm -f conftest* 
22550   if test x$ac_cv_sizeof_int != x ; then break; fi 
22551 done 
22552
22553 fi
22554  
22555 if test x$ac_cv_sizeof_int = x ; then 
22556   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22557 fi 
22558 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22559 cat >> confdefs.h <<EOF
22560 #define SIZEOF_INT $ac_cv_sizeof_int
22561 EOF
22562  
22563  
22564 echo $ac_n "checking size of long""... $ac_c" 1>&6
22565 echo "configure:22566: checking size of long" >&5 
22566 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22567   echo $ac_n "(cached) $ac_c" 1>&6
22568 else
22569   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22570   cat > conftest.$ac_ext <<EOF
22571 #line 22572 "configure"
22572 #include "confdefs.h"
22573 #include "confdefs.h" 
22574 #include <sys/types.h> 
22575  
22576
22577 int main() {
22578 switch (0) case 0: case (sizeof (long) == $ac_size):;
22579 ; return 0; }
22580 EOF
22581 if { (eval echo configure:22582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22582   rm -rf conftest*
22583   ac_cv_sizeof_long=$ac_size
22584 else
22585   echo "configure: failed program was:" >&5
22586   cat conftest.$ac_ext >&5
22587 fi
22588 rm -f conftest* 
22589   if test x$ac_cv_sizeof_long != x ; then break; fi 
22590 done 
22591
22592 fi
22593  
22594 if test x$ac_cv_sizeof_long = x ; then 
22595   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22596 fi 
22597 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22598 cat >> confdefs.h <<EOF
22599 #define SIZEOF_LONG $ac_cv_sizeof_long
22600 EOF
22601  
22602
22603
22604 if test "$ac_cv_sizeof_int" -lt 4 ; then
22605         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22606
22607         cat >> confdefs.h <<\EOF
22608 #define LBER_INT_T long
22609 EOF
22610
22611 else
22612         cat >> confdefs.h <<\EOF
22613 #define LBER_INT_T int
22614 EOF
22615
22616 fi
22617
22618 cat >> confdefs.h <<\EOF
22619 #define LBER_LEN_T long
22620 EOF
22621
22622 cat >> confdefs.h <<\EOF
22623 #define LBER_SOCKET_T int
22624 EOF
22625
22626 cat >> confdefs.h <<\EOF
22627 #define LBER_TAG_T long
22628 EOF
22629
22630
22631 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22632 echo "configure:22633: checking for 8-bit clean memcmp" >&5
22633 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22634   echo $ac_n "(cached) $ac_c" 1>&6
22635 else
22636   if test "$cross_compiling" = yes; then
22637   ac_cv_func_memcmp_clean=no
22638 else
22639   cat > conftest.$ac_ext <<EOF
22640 #line 22641 "configure"
22641 #include "confdefs.h"
22642
22643 main()
22644 {
22645   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22646   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22647 }
22648
22649 EOF
22650 if { (eval echo configure:22651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22651 then
22652   ac_cv_func_memcmp_clean=yes
22653 else
22654   echo "configure: failed program was:" >&5
22655   cat conftest.$ac_ext >&5
22656   rm -fr conftest*
22657   ac_cv_func_memcmp_clean=no
22658 fi
22659 rm -fr conftest*
22660 fi
22661
22662 fi
22663
22664 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22665 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22666
22667 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22668 echo "configure:22669: checking for strftime" >&5
22669 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22670   echo $ac_n "(cached) $ac_c" 1>&6
22671 else
22672   cat > conftest.$ac_ext <<EOF
22673 #line 22674 "configure"
22674 #include "confdefs.h"
22675 /* System header to define __stub macros and hopefully few prototypes,
22676     which can conflict with char strftime(); below.  */
22677 #include <assert.h>
22678 /* Override any gcc2 internal prototype to avoid an error.  */
22679 /* We use char because int might match the return type of a gcc2
22680     builtin and then its argument prototype would still apply.  */
22681 char strftime();
22682 char (*f)();
22683
22684 int main() {
22685
22686 /* The GNU C library defines this for functions which it implements
22687     to always fail with ENOSYS.  Some functions are actually named
22688     something starting with __ and the normal name is an alias.  */
22689 #if defined (__stub_strftime) || defined (__stub___strftime)
22690 choke me
22691 #else
22692 f = strftime;
22693 #endif
22694
22695 ; return 0; }
22696 EOF
22697 if { (eval echo configure:22698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22698   rm -rf conftest*
22699   eval "ac_cv_func_strftime=yes"
22700 else
22701   echo "configure: failed program was:" >&5
22702   cat conftest.$ac_ext >&5
22703   rm -rf conftest*
22704   eval "ac_cv_func_strftime=no"
22705 fi
22706 rm -f conftest*
22707 fi
22708
22709 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22710   echo "$ac_t""yes" 1>&6
22711   cat >> confdefs.h <<\EOF
22712 #define HAVE_STRFTIME 1
22713 EOF
22714
22715 else
22716   echo "$ac_t""no" 1>&6
22717 # strftime is in -lintl on SCO UNIX.
22718 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22719 echo "configure:22720: checking for strftime in -lintl" >&5
22720 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22721 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22722   echo $ac_n "(cached) $ac_c" 1>&6
22723 else
22724   ac_save_LIBS="$LIBS"
22725 LIBS="-lintl  $LIBS"
22726 cat > conftest.$ac_ext <<EOF
22727 #line 22728 "configure"
22728 #include "confdefs.h"
22729 /* Override any gcc2 internal prototype to avoid an error.  */
22730 /* We use char because int might match the return type of a gcc2
22731     builtin and then its argument prototype would still apply.  */
22732 char strftime();
22733
22734 int main() {
22735 strftime()
22736 ; return 0; }
22737 EOF
22738 if { (eval echo configure:22739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22739   rm -rf conftest*
22740   eval "ac_cv_lib_$ac_lib_var=yes"
22741 else
22742   echo "configure: failed program was:" >&5
22743   cat conftest.$ac_ext >&5
22744   rm -rf conftest*
22745   eval "ac_cv_lib_$ac_lib_var=no"
22746 fi
22747 rm -f conftest*
22748 LIBS="$ac_save_LIBS"
22749
22750 fi
22751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22752   echo "$ac_t""yes" 1>&6
22753   cat >> confdefs.h <<\EOF
22754 #define HAVE_STRFTIME 1
22755 EOF
22756
22757 LIBS="-lintl $LIBS"
22758 else
22759   echo "$ac_t""no" 1>&6
22760 fi
22761
22762 fi
22763
22764
22765 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22766 echo "configure:22767: checking for inet_aton()" >&5
22767 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22768   echo $ac_n "(cached) $ac_c" 1>&6
22769 else
22770   cat > conftest.$ac_ext <<EOF
22771 #line 22772 "configure"
22772 #include "confdefs.h"
22773
22774 #ifdef HAVE_SYS_TYPES_H
22775 #       include <sys/types.h>
22776 #endif
22777 #ifdef HAVE_SYS_SOCKET_H
22778 #       include <sys/socket.h>
22779 #       ifdef HAVE_SYS_SELECT_H
22780 #               include <sys/select.h>
22781 #       endif
22782 #       include <netinet/in.h>
22783 #       ifdef HAVE_ARPA_INET_H
22784 #               include <arpa/inet.h>
22785 #       endif
22786 #endif
22787
22788 int main() {
22789 struct in_addr in;
22790 int rc = inet_aton( "255.255.255.255", &in );
22791 ; return 0; }
22792 EOF
22793 if { (eval echo configure:22794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22794   rm -rf conftest*
22795   ol_cv_func_inet_aton=yes
22796 else
22797   echo "configure: failed program was:" >&5
22798   cat conftest.$ac_ext >&5
22799   rm -rf conftest*
22800   ol_cv_func_inet_aton=no
22801 fi
22802 rm -f conftest*
22803 fi
22804
22805 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22806   if test $ol_cv_func_inet_aton != no; then
22807     cat >> confdefs.h <<\EOF
22808 #define HAVE_INET_ATON 1
22809 EOF
22810
22811   fi
22812  
22813
22814 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22815 echo "configure:22816: checking for _spawnlp" >&5
22816 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22817   echo $ac_n "(cached) $ac_c" 1>&6
22818 else
22819   cat > conftest.$ac_ext <<EOF
22820 #line 22821 "configure"
22821 #include "confdefs.h"
22822 /* System header to define __stub macros and hopefully few prototypes,
22823     which can conflict with char _spawnlp(); below.  */
22824 #include <assert.h>
22825 /* Override any gcc2 internal prototype to avoid an error.  */
22826 /* We use char because int might match the return type of a gcc2
22827     builtin and then its argument prototype would still apply.  */
22828 char _spawnlp();
22829 char (*f)();
22830
22831 int main() {
22832
22833 /* The GNU C library defines this for functions which it implements
22834     to always fail with ENOSYS.  Some functions are actually named
22835     something starting with __ and the normal name is an alias.  */
22836 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22837 choke me
22838 #else
22839 f = _spawnlp;
22840 #endif
22841
22842 ; return 0; }
22843 EOF
22844 if { (eval echo configure:22845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22845   rm -rf conftest*
22846   eval "ac_cv_func__spawnlp=yes"
22847 else
22848   echo "configure: failed program was:" >&5
22849   cat conftest.$ac_ext >&5
22850   rm -rf conftest*
22851   eval "ac_cv_func__spawnlp=no"
22852 fi
22853 rm -f conftest*
22854 fi
22855
22856 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22857   echo "$ac_t""yes" 1>&6
22858   cat >> confdefs.h <<\EOF
22859 #define HAVE_SPAWNLP 1
22860 EOF
22861
22862 else
22863   echo "$ac_t""no" 1>&6
22864 fi
22865
22866
22867 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22868 echo "configure:22869: checking for _snprintf" >&5
22869 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22870   echo $ac_n "(cached) $ac_c" 1>&6
22871 else
22872   cat > conftest.$ac_ext <<EOF
22873 #line 22874 "configure"
22874 #include "confdefs.h"
22875 /* System header to define __stub macros and hopefully few prototypes,
22876     which can conflict with char _snprintf(); below.  */
22877 #include <assert.h>
22878 /* Override any gcc2 internal prototype to avoid an error.  */
22879 /* We use char because int might match the return type of a gcc2
22880     builtin and then its argument prototype would still apply.  */
22881 char _snprintf();
22882 char (*f)();
22883
22884 int main() {
22885
22886 /* The GNU C library defines this for functions which it implements
22887     to always fail with ENOSYS.  Some functions are actually named
22888     something starting with __ and the normal name is an alias.  */
22889 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22890 choke me
22891 #else
22892 f = _snprintf;
22893 #endif
22894
22895 ; return 0; }
22896 EOF
22897 if { (eval echo configure:22898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22898   rm -rf conftest*
22899   eval "ac_cv_func__snprintf=yes"
22900 else
22901   echo "configure: failed program was:" >&5
22902   cat conftest.$ac_ext >&5
22903   rm -rf conftest*
22904   eval "ac_cv_func__snprintf=no"
22905 fi
22906 rm -f conftest*
22907 fi
22908
22909 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22910   echo "$ac_t""yes" 1>&6
22911   ac_cv_func_snprintf=yes
22912         cat >> confdefs.h <<\EOF
22913 #define snprintf _snprintf
22914 EOF
22915
22916
22917 else
22918   echo "$ac_t""no" 1>&6
22919 fi
22920
22921
22922 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22923 echo "configure:22924: checking for _vsnprintf" >&5
22924 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22925   echo $ac_n "(cached) $ac_c" 1>&6
22926 else
22927   cat > conftest.$ac_ext <<EOF
22928 #line 22929 "configure"
22929 #include "confdefs.h"
22930 /* System header to define __stub macros and hopefully few prototypes,
22931     which can conflict with char _vsnprintf(); below.  */
22932 #include <assert.h>
22933 /* Override any gcc2 internal prototype to avoid an error.  */
22934 /* We use char because int might match the return type of a gcc2
22935     builtin and then its argument prototype would still apply.  */
22936 char _vsnprintf();
22937 char (*f)();
22938
22939 int main() {
22940
22941 /* The GNU C library defines this for functions which it implements
22942     to always fail with ENOSYS.  Some functions are actually named
22943     something starting with __ and the normal name is an alias.  */
22944 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22945 choke me
22946 #else
22947 f = _vsnprintf;
22948 #endif
22949
22950 ; return 0; }
22951 EOF
22952 if { (eval echo configure:22953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22953   rm -rf conftest*
22954   eval "ac_cv_func__vsnprintf=yes"
22955 else
22956   echo "configure: failed program was:" >&5
22957   cat conftest.$ac_ext >&5
22958   rm -rf conftest*
22959   eval "ac_cv_func__vsnprintf=no"
22960 fi
22961 rm -f conftest*
22962 fi
22963
22964 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22965   echo "$ac_t""yes" 1>&6
22966   ac_cv_func_vsnprintf=yes
22967         cat >> confdefs.h <<\EOF
22968 #define vsnprintf _vsnprintf
22969 EOF
22970
22971
22972 else
22973   echo "$ac_t""no" 1>&6
22974 fi
22975
22976
22977 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22978 echo "configure:22979: checking for vprintf" >&5
22979 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22980   echo $ac_n "(cached) $ac_c" 1>&6
22981 else
22982   cat > conftest.$ac_ext <<EOF
22983 #line 22984 "configure"
22984 #include "confdefs.h"
22985 /* System header to define __stub macros and hopefully few prototypes,
22986     which can conflict with char vprintf(); below.  */
22987 #include <assert.h>
22988 /* Override any gcc2 internal prototype to avoid an error.  */
22989 /* We use char because int might match the return type of a gcc2
22990     builtin and then its argument prototype would still apply.  */
22991 char vprintf();
22992 char (*f)();
22993
22994 int main() {
22995
22996 /* The GNU C library defines this for functions which it implements
22997     to always fail with ENOSYS.  Some functions are actually named
22998     something starting with __ and the normal name is an alias.  */
22999 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23000 choke me
23001 #else
23002 f = vprintf;
23003 #endif
23004
23005 ; return 0; }
23006 EOF
23007 if { (eval echo configure:23008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23008   rm -rf conftest*
23009   eval "ac_cv_func_vprintf=yes"
23010 else
23011   echo "configure: failed program was:" >&5
23012   cat conftest.$ac_ext >&5
23013   rm -rf conftest*
23014   eval "ac_cv_func_vprintf=no"
23015 fi
23016 rm -f conftest*
23017 fi
23018
23019 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23020   echo "$ac_t""yes" 1>&6
23021   cat >> confdefs.h <<\EOF
23022 #define HAVE_VPRINTF 1
23023 EOF
23024
23025 else
23026   echo "$ac_t""no" 1>&6
23027 fi
23028
23029 if test "$ac_cv_func_vprintf" != yes; then
23030 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23031 echo "configure:23032: checking for _doprnt" >&5
23032 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23033   echo $ac_n "(cached) $ac_c" 1>&6
23034 else
23035   cat > conftest.$ac_ext <<EOF
23036 #line 23037 "configure"
23037 #include "confdefs.h"
23038 /* System header to define __stub macros and hopefully few prototypes,
23039     which can conflict with char _doprnt(); below.  */
23040 #include <assert.h>
23041 /* Override any gcc2 internal prototype to avoid an error.  */
23042 /* We use char because int might match the return type of a gcc2
23043     builtin and then its argument prototype would still apply.  */
23044 char _doprnt();
23045 char (*f)();
23046
23047 int main() {
23048
23049 /* The GNU C library defines this for functions which it implements
23050     to always fail with ENOSYS.  Some functions are actually named
23051     something starting with __ and the normal name is an alias.  */
23052 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23053 choke me
23054 #else
23055 f = _doprnt;
23056 #endif
23057
23058 ; return 0; }
23059 EOF
23060 if { (eval echo configure:23061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23061   rm -rf conftest*
23062   eval "ac_cv_func__doprnt=yes"
23063 else
23064   echo "configure: failed program was:" >&5
23065   cat conftest.$ac_ext >&5
23066   rm -rf conftest*
23067   eval "ac_cv_func__doprnt=no"
23068 fi
23069 rm -f conftest*
23070 fi
23071
23072 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23073   echo "$ac_t""yes" 1>&6
23074   cat >> confdefs.h <<\EOF
23075 #define HAVE_DOPRNT 1
23076 EOF
23077
23078 else
23079   echo "$ac_t""no" 1>&6
23080 fi
23081
23082 fi
23083
23084
23085 if test $ac_cv_func_vprintf = yes ; then
23086                 for ac_func in snprintf vsnprintf
23087 do
23088 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23089 echo "configure:23090: checking for $ac_func" >&5
23090 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23091   echo $ac_n "(cached) $ac_c" 1>&6
23092 else
23093   cat > conftest.$ac_ext <<EOF
23094 #line 23095 "configure"
23095 #include "confdefs.h"
23096 /* System header to define __stub macros and hopefully few prototypes,
23097     which can conflict with char $ac_func(); below.  */
23098 #include <assert.h>
23099 /* Override any gcc2 internal prototype to avoid an error.  */
23100 /* We use char because int might match the return type of a gcc2
23101     builtin and then its argument prototype would still apply.  */
23102 char $ac_func();
23103 char (*f)();
23104
23105 int main() {
23106
23107 /* The GNU C library defines this for functions which it implements
23108     to always fail with ENOSYS.  Some functions are actually named
23109     something starting with __ and the normal name is an alias.  */
23110 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23111 choke me
23112 #else
23113 f = $ac_func;
23114 #endif
23115
23116 ; return 0; }
23117 EOF
23118 if { (eval echo configure:23119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23119   rm -rf conftest*
23120   eval "ac_cv_func_$ac_func=yes"
23121 else
23122   echo "configure: failed program was:" >&5
23123   cat conftest.$ac_ext >&5
23124   rm -rf conftest*
23125   eval "ac_cv_func_$ac_func=no"
23126 fi
23127 rm -f conftest*
23128 fi
23129
23130 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23131   echo "$ac_t""yes" 1>&6
23132     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23133   cat >> confdefs.h <<EOF
23134 #define $ac_tr_func 1
23135 EOF
23136  
23137 else
23138   echo "$ac_t""no" 1>&6
23139 fi
23140 done
23141
23142 fi
23143
23144 for ac_func in \
23145         bcopy                   \
23146         closesocket             \
23147         chroot                  \
23148         endgrent                \
23149         endpwent                \
23150         fcntl                   \
23151         flock                   \
23152         fstat                   \
23153         getdtablesize   \
23154         getgrgid                \
23155         gethostname             \
23156         getpass                 \
23157         getpassphrase   \
23158         getpwuid                \
23159         getpwnam                \
23160         getspnam                \
23161         gettimeofday    \
23162         initgroups              \
23163         lockf                   \
23164         memcpy                  \
23165         memmove                 \
23166         mkstemp                 \
23167         mktemp                  \
23168         pipe                    \
23169         read                    \
23170         recv                    \
23171         recvfrom                \
23172         setpwfile               \
23173         setgid                  \
23174         setegid                 \
23175         setsid                  \
23176         setuid                  \
23177         seteuid                 \
23178         sigaction               \
23179         signal                  \
23180         sigset                  \
23181         strdup                  \
23182         strerror                \
23183         strpbrk                 \
23184         strrchr                 \
23185         strsep                  \
23186         strstr                  \
23187         strtol                  \
23188         strtoul                 \
23189         strtoq                  \
23190         strtouq                 \
23191         strtoll                 \
23192         strspn                  \
23193         sysconf                 \
23194         usleep                  \
23195         waitpid                 \
23196         wait4                   \
23197         write                   \
23198         send                    \
23199         sendmsg                 \
23200         sendto                  \
23201
23202 do
23203 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23204 echo "configure:23205: checking for $ac_func" >&5
23205 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23206   echo $ac_n "(cached) $ac_c" 1>&6
23207 else
23208   cat > conftest.$ac_ext <<EOF
23209 #line 23210 "configure"
23210 #include "confdefs.h"
23211 /* System header to define __stub macros and hopefully few prototypes,
23212     which can conflict with char $ac_func(); below.  */
23213 #include <assert.h>
23214 /* Override any gcc2 internal prototype to avoid an error.  */
23215 /* We use char because int might match the return type of a gcc2
23216     builtin and then its argument prototype would still apply.  */
23217 char $ac_func();
23218 char (*f)();
23219
23220 int main() {
23221
23222 /* The GNU C library defines this for functions which it implements
23223     to always fail with ENOSYS.  Some functions are actually named
23224     something starting with __ and the normal name is an alias.  */
23225 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23226 choke me
23227 #else
23228 f = $ac_func;
23229 #endif
23230
23231 ; return 0; }
23232 EOF
23233 if { (eval echo configure:23234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23234   rm -rf conftest*
23235   eval "ac_cv_func_$ac_func=yes"
23236 else
23237   echo "configure: failed program was:" >&5
23238   cat conftest.$ac_ext >&5
23239   rm -rf conftest*
23240   eval "ac_cv_func_$ac_func=no"
23241 fi
23242 rm -f conftest*
23243 fi
23244
23245 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23246   echo "$ac_t""yes" 1>&6
23247     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23248   cat >> confdefs.h <<EOF
23249 #define $ac_tr_func 1
23250 EOF
23251  
23252 else
23253   echo "$ac_t""no" 1>&6
23254 fi
23255 done
23256
23257
23258 for ac_func in getopt getpeereid
23259 do
23260 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23261 echo "configure:23262: checking for $ac_func" >&5
23262 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23263   echo $ac_n "(cached) $ac_c" 1>&6
23264 else
23265   cat > conftest.$ac_ext <<EOF
23266 #line 23267 "configure"
23267 #include "confdefs.h"
23268 /* System header to define __stub macros and hopefully few prototypes,
23269     which can conflict with char $ac_func(); below.  */
23270 #include <assert.h>
23271 /* Override any gcc2 internal prototype to avoid an error.  */
23272 /* We use char because int might match the return type of a gcc2
23273     builtin and then its argument prototype would still apply.  */
23274 char $ac_func();
23275 char (*f)();
23276
23277 int main() {
23278
23279 /* The GNU C library defines this for functions which it implements
23280     to always fail with ENOSYS.  Some functions are actually named
23281     something starting with __ and the normal name is an alias.  */
23282 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23283 choke me
23284 #else
23285 f = $ac_func;
23286 #endif
23287
23288 ; return 0; }
23289 EOF
23290 if { (eval echo configure:23291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23291   rm -rf conftest*
23292   eval "ac_cv_func_$ac_func=yes"
23293 else
23294   echo "configure: failed program was:" >&5
23295   cat conftest.$ac_ext >&5
23296   rm -rf conftest*
23297   eval "ac_cv_func_$ac_func=no"
23298 fi
23299 rm -f conftest*
23300 fi
23301
23302 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23303   echo "$ac_t""yes" 1>&6
23304     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23305   cat >> confdefs.h <<EOF
23306 #define $ac_tr_func 1
23307 EOF
23308  
23309 else
23310   echo "$ac_t""no" 1>&6
23311 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23312 fi
23313 done
23314
23315
23316
23317 if test "$ac_cv_func_getopt" != yes; then
23318         LIBSRCS="$LIBSRCS getopt.c"
23319 fi
23320 if test "$ac_cv_func_getpeereid" != yes; then
23321         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23322 echo "configure:23323: checking for msg_accrights in msghdr" >&5
23323 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23324   echo $ac_n "(cached) $ac_c" 1>&6
23325 else
23326   cat > conftest.$ac_ext <<EOF
23327 #line 23328 "configure"
23328 #include "confdefs.h"
23329 #include <sys/socket.h>
23330 int main() {
23331 struct msghdr m; m.msg_accrightslen=0
23332 ; return 0; }
23333 EOF
23334 if { (eval echo configure:23335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23335   rm -rf conftest*
23336   ol_cv_msghdr_msg_accrights=yes
23337 else
23338   echo "configure: failed program was:" >&5
23339   cat conftest.$ac_ext >&5
23340   rm -rf conftest*
23341   ol_cv_msghdr_msg_accrights=no
23342 fi
23343 rm -f conftest*
23344         
23345 fi
23346
23347 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23348   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23349         cat >> confdefs.h <<\EOF
23350 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23351 EOF
23352
23353   fi
23354
23355         LIBSRCS="$LIBSRCS getpeereid.c"
23356 fi
23357 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23358         if test "$ac_cv_func_snprintf" != yes; then
23359                 cat >> confdefs.h <<\EOF
23360 #define snprintf ber_pvt_snprintf
23361 EOF
23362
23363         fi
23364         if test "$ac_cv_func_vsnprintf" != yes; then
23365                 cat >> confdefs.h <<\EOF
23366 #define vsnprintf ber_pvt_vsnprintf
23367 EOF
23368
23369         fi
23370 fi
23371
23372 # Check Configuration
23373 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23374 echo "configure:23375: checking declaration of sys_errlist" >&5
23375 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23376   echo $ac_n "(cached) $ac_c" 1>&6
23377 else
23378   
23379         cat > conftest.$ac_ext <<EOF
23380 #line 23381 "configure"
23381 #include "confdefs.h"
23382
23383 #include <stdio.h>
23384 #include <sys/types.h>
23385 #include <errno.h>
23386 #ifdef WINNT
23387 #include <stdlib.h>
23388 #endif 
23389 int main() {
23390 char *c = (char *) *sys_errlist
23391 ; return 0; }
23392 EOF
23393 if { (eval echo configure:23394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23394   rm -rf conftest*
23395   ol_cv_dcl_sys_errlist=yes
23396         ol_cv_have_sys_errlist=yes
23397 else
23398   echo "configure: failed program was:" >&5
23399   cat conftest.$ac_ext >&5
23400   rm -rf conftest*
23401   ol_cv_dcl_sys_errlist=no
23402 fi
23403 rm -f conftest*
23404 fi
23405
23406 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23407 #
23408 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23409 if test $ol_cv_dcl_sys_errlist = no ; then
23410         cat >> confdefs.h <<\EOF
23411 #define DECL_SYS_ERRLIST 1
23412 EOF
23413
23414
23415         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23416 echo "configure:23417: checking existence of sys_errlist" >&5
23417 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23418   echo $ac_n "(cached) $ac_c" 1>&6
23419 else
23420   
23421                 cat > conftest.$ac_ext <<EOF
23422 #line 23423 "configure"
23423 #include "confdefs.h"
23424 #include <errno.h>
23425 int main() {
23426 char *c = (char *) *sys_errlist
23427 ; return 0; }
23428 EOF
23429 if { (eval echo configure:23430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23430   rm -rf conftest*
23431   ol_cv_have_sys_errlist=yes
23432 else
23433   echo "configure: failed program was:" >&5
23434   cat conftest.$ac_ext >&5
23435   rm -rf conftest*
23436   ol_cv_have_sys_errlist=no
23437 fi
23438 rm -f conftest*
23439 fi
23440
23441 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23442 fi
23443 if test $ol_cv_have_sys_errlist = yes ; then
23444         cat >> confdefs.h <<\EOF
23445 #define HAVE_SYS_ERRLIST 1
23446 EOF
23447
23448 fi
23449
23450
23451
23452 if test "$ol_enable_slapi" != no ; then
23453                         for ac_hdr in ltdl.h
23454 do
23455 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23456 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23457 echo "configure:23458: checking for $ac_hdr" >&5
23458 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23459   echo $ac_n "(cached) $ac_c" 1>&6
23460 else
23461   cat > conftest.$ac_ext <<EOF
23462 #line 23463 "configure"
23463 #include "confdefs.h"
23464 #include <$ac_hdr>
23465 EOF
23466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23467 { (eval echo configure:23468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23469 if test -z "$ac_err"; then
23470   rm -rf conftest*
23471   eval "ac_cv_header_$ac_safe=yes"
23472 else
23473   echo "$ac_err" >&5
23474   echo "configure: failed program was:" >&5
23475   cat conftest.$ac_ext >&5
23476   rm -rf conftest*
23477   eval "ac_cv_header_$ac_safe=no"
23478 fi
23479 rm -f conftest*
23480 fi
23481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23482   echo "$ac_t""yes" 1>&6
23483     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23484   cat >> confdefs.h <<EOF
23485 #define $ac_tr_hdr 1
23486 EOF
23487  
23488 else
23489   echo "$ac_t""no" 1>&6
23490 fi
23491 done
23492
23493
23494         if test $ac_cv_header_ltdl_h != yes ; then
23495                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23496         fi
23497         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23498 echo "configure:23499: checking for lt_dlinit in -lltdl" >&5
23499 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23500 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23501   echo $ac_n "(cached) $ac_c" 1>&6
23502 else
23503   ac_save_LIBS="$LIBS"
23504 LIBS="-lltdl  $LIBS"
23505 cat > conftest.$ac_ext <<EOF
23506 #line 23507 "configure"
23507 #include "confdefs.h"
23508 /* Override any gcc2 internal prototype to avoid an error.  */
23509 /* We use char because int might match the return type of a gcc2
23510     builtin and then its argument prototype would still apply.  */
23511 char lt_dlinit();
23512
23513 int main() {
23514 lt_dlinit()
23515 ; return 0; }
23516 EOF
23517 if { (eval echo configure:23518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23518   rm -rf conftest*
23519   eval "ac_cv_lib_$ac_lib_var=yes"
23520 else
23521   echo "configure: failed program was:" >&5
23522   cat conftest.$ac_ext >&5
23523   rm -rf conftest*
23524   eval "ac_cv_lib_$ac_lib_var=no"
23525 fi
23526 rm -f conftest*
23527 LIBS="$ac_save_LIBS"
23528
23529 fi
23530 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23531   echo "$ac_t""yes" 1>&6
23532   
23533                 SLAPI_LIBS=-lltdl
23534                 LIBSLAPI=libslapi.a
23535                 LIBSLAPITOOLS=../libslapi.a
23536                 cat >> confdefs.h <<\EOF
23537 #define HAVE_LIBLTDL 1
23538 EOF
23539
23540         
23541 else
23542   echo "$ac_t""no" 1>&6
23543 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23544 fi
23545
23546
23547         cat >> confdefs.h <<\EOF
23548 #define LDAP_SLAPI 1
23549 EOF
23550
23551 fi
23552
23553 if test "$ol_enable_debug" != no ; then
23554         cat >> confdefs.h <<\EOF
23555 #define LDAP_DEBUG 1
23556 EOF
23557
23558 fi
23559 if test "$ol_enable_syslog" = yes ; then
23560         cat >> confdefs.h <<\EOF
23561 #define LDAP_SYSLOG 1
23562 EOF
23563
23564 fi
23565 if test "$ol_link_kbind" != no ; then
23566         cat >> confdefs.h <<\EOF
23567 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23568 EOF
23569
23570 fi
23571 if test "$ol_enable_proctitle" != no ; then
23572         cat >> confdefs.h <<\EOF
23573 #define LDAP_PROCTITLE 1
23574 EOF
23575
23576 fi
23577 if test "$ol_enable_referrals" != no ; then
23578         cat >> confdefs.h <<\EOF
23579 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23580 EOF
23581
23582 fi
23583 if test "$ol_enable_local" != no; then
23584         cat >> confdefs.h <<\EOF
23585 #define LDAP_PF_LOCAL 1
23586 EOF
23587
23588 fi
23589 if test "$ol_link_ipv6" != no; then
23590         cat >> confdefs.h <<\EOF
23591 #define LDAP_PF_INET6 1
23592 EOF
23593
23594 fi
23595 if test "$ol_enable_cleartext" != no ; then
23596         cat >> confdefs.h <<\EOF
23597 #define SLAPD_CLEARTEXT 1
23598 EOF
23599
23600 fi
23601 if test "$ol_enable_crypt" != no ; then
23602         cat >> confdefs.h <<\EOF
23603 #define SLAPD_CRYPT 1
23604 EOF
23605
23606 fi
23607 if test "$ol_link_kpasswd" != no ; then
23608         cat >> confdefs.h <<\EOF
23609 #define SLAPD_KPASSWD 1
23610 EOF
23611
23612 fi
23613 if test "$ol_link_spasswd" != no ; then
23614         cat >> confdefs.h <<\EOF
23615 #define SLAPD_SPASSWD 1
23616 EOF
23617
23618 fi
23619 if test "$ol_enable_multimaster" != no ; then
23620         cat >> confdefs.h <<\EOF
23621 #define SLAPD_MULTIMASTER 1
23622 EOF
23623
23624 fi
23625 if test "$ol_enable_rlookups" != no ; then
23626         cat >> confdefs.h <<\EOF
23627 #define SLAPD_RLOOKUPS 1
23628 EOF
23629
23630 fi
23631 if test "$ol_enable_aci" != no ; then
23632         cat >> confdefs.h <<\EOF
23633 #define SLAPD_ACI_ENABLED 1
23634 EOF
23635
23636 fi
23637
23638 if test "$ol_link_modules" != no ; then
23639         cat >> confdefs.h <<\EOF
23640 #define SLAPD_MODULES 1
23641 EOF
23642
23643         BUILD_SLAPD=yes
23644         SLAPD_MODULES_LDFLAGS="-dlopen self"
23645 fi
23646
23647 cat >> confdefs.h <<\EOF
23648 #define SLAPD_MOD_STATIC 1
23649 EOF
23650
23651 cat >> confdefs.h <<\EOF
23652 #define SLAPD_MOD_DYNAMIC 2
23653 EOF
23654
23655
23656 if test "$ol_enable_bdb" != no ; then
23657         cat >> confdefs.h <<\EOF
23658 #define SLAPD_BDB 1
23659 EOF
23660
23661         BUILD_SLAPD=yes
23662         BUILD_BDB=yes
23663         if test "$ol_with_bdb_module" != static ; then
23664                 cat >> confdefs.h <<\EOF
23665 #define SLAPD_BDB_DYNAMIC 1
23666 EOF
23667
23668                 BUILD_BDB=mod
23669                 BUILD_BDB_DYNAMIC=shared
23670                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23671         else
23672                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23673         fi
23674 fi
23675
23676 if test "$ol_link_dnssrv" != no ; then
23677         cat >> confdefs.h <<\EOF
23678 #define SLAPD_DNSSRV 1
23679 EOF
23680
23681         BUILD_SLAPD=yes
23682         BUILD_DNSSRV=yes
23683         if test "$ol_with_dnssrv_module" != static ; then
23684                 cat >> confdefs.h <<\EOF
23685 #define SLAPD_DNSSRV_DYNAMIC 1
23686 EOF
23687
23688                 BUILD_DNSSRV=mod
23689                 BUILD_DNSSRV_DYNAMIC=shared
23690                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23691         else
23692                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23693         fi
23694 fi
23695
23696 if test "$ol_enable_hdb" != no ; then
23697         cat >> confdefs.h <<\EOF
23698 #define SLAPD_HDB 1
23699 EOF
23700
23701         BUILD_SLAPD=yes
23702         BUILD_HDB=yes
23703         if test "$ol_with_hdb_module" != static ; then
23704                 cat >> confdefs.h <<\EOF
23705 #define SLAPD_HDB_DYNAMIC 1
23706 EOF
23707
23708                 BUILD_HDB=mod
23709                 BUILD_HDB_DYNAMIC=shared
23710                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23711         else
23712                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23713         fi
23714 fi
23715
23716 if test "$ol_enable_ldap" != no ; then
23717         cat >> confdefs.h <<\EOF
23718 #define SLAPD_LDAP 1
23719 EOF
23720
23721         BUILD_SLAPD=yes
23722         BUILD_LDAP=yes
23723         if test "$ol_with_ldap_module" != static ; then
23724                 cat >> confdefs.h <<\EOF
23725 #define SLAPD_LDAP_DYNAMIC 1
23726 EOF
23727
23728                 BUILD_LDAP=mod
23729                 BUILD_LDAP_DYNAMIC=shared
23730                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23731         else
23732                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23733         fi
23734 fi
23735
23736 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23737         cat >> confdefs.h <<\EOF
23738 #define SLAPD_LDBM 1
23739 EOF
23740
23741         BUILD_SLAPD=yes
23742         BUILD_LDBM=yes
23743         if test "$ol_with_ldbm_module" != static ; then
23744                 cat >> confdefs.h <<\EOF
23745 #define SLAPD_LDBM_DYNAMIC 1
23746 EOF
23747
23748                 BUILD_LDBM=mod
23749                 BUILD_LDBM_DYNAMIC=shared
23750                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23751         else
23752                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23753         fi
23754 fi
23755
23756 if test "$ol_enable_meta" != no ; then
23757         if test "$ol_enable_ldap" = no ; then
23758                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23759         fi
23760         if test "$ol_enable_rewrite" = no ; then
23761                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23762         fi
23763         cat >> confdefs.h <<\EOF
23764 #define SLAPD_META 1
23765 EOF
23766
23767         BUILD_SLAPD=yes
23768         BUILD_META=yes
23769         BUILD_REWRITE=yes
23770         if test "$ol_with_meta_module" != static ; then
23771                 cat >> confdefs.h <<\EOF
23772 #define SLAPD_META_DYNAMIC 1
23773 EOF
23774
23775                 BUILD_META=mod
23776                 BUILD_META_DYNAMIC=shared
23777                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23778         else
23779                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23780         fi
23781 fi
23782
23783 if test "$ol_enable_monitor" != no ; then
23784         cat >> confdefs.h <<\EOF
23785 #define SLAPD_MONITOR 1
23786 EOF
23787
23788         BUILD_SLAPD=yes
23789         BUILD_MONITOR=yes
23790         if test "$ol_with_monitor_module" != static ; then
23791                 cat >> confdefs.h <<\EOF
23792 #define SLAPD_MONITOR_DYNAMIC 1
23793 EOF
23794
23795                 BUILD_MONITOR=mod
23796                 BUILD_MONITOR_DYNAMIC=shared
23797                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23798         else
23799                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23800         fi
23801 fi
23802
23803 if test "$ol_enable_null" != no ; then
23804         cat >> confdefs.h <<\EOF
23805 #define SLAPD_NULL 1
23806 EOF
23807
23808         BUILD_SLAPD=yes
23809         BUILD_NULL=yes
23810         if test "$ol_with_null_module" != static ; then
23811                 cat >> confdefs.h <<\EOF
23812 #define SLAPD_NULL_DYNAMIC 1
23813 EOF
23814
23815                 BUILD_NULL=mod
23816                 BUILD_NULL_DYNAMIC=shared
23817                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23818         else
23819                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23820         fi
23821 fi
23822
23823 if test "$ol_enable_passwd" != no ; then
23824         cat >> confdefs.h <<\EOF
23825 #define SLAPD_PASSWD 1
23826 EOF
23827
23828         BUILD_SLAPD=yes
23829         BUILD_PASSWD=yes
23830         if test "$ol_with_passwd_module" != static ; then
23831                 cat >> confdefs.h <<\EOF
23832 #define SLAPD_PASSWD_DYNAMIC 1
23833 EOF
23834
23835                 BUILD_PASSWD=mod
23836                 BUILD_PASSWD_DYNAMIC=shared
23837                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23838         else
23839                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23840         fi
23841 fi
23842
23843 if test "$ol_link_perl" != no ; then
23844         cat >> confdefs.h <<\EOF
23845 #define SLAPD_PERL 1
23846 EOF
23847
23848         BUILD_SLAPD=yes
23849         BUILD_PERL=yes
23850         if test "$ol_with_perl_module" != static ; then
23851                 cat >> confdefs.h <<\EOF
23852 #define SLAPD_PERL_DYNAMIC 1
23853 EOF
23854
23855                 BUILD_PERL=mod
23856                 BUILD_PERL_DYNAMIC=shared
23857                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23858         else
23859                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23860         fi
23861 fi
23862
23863 if test "$ol_enable_shell" != no ; then
23864         if test "$ol_link_thread" != no ; then
23865                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23866         fi
23867         cat >> confdefs.h <<\EOF
23868 #define SLAPD_SHELL 1
23869 EOF
23870
23871         BUILD_SLAPD=yes
23872         BUILD_SHELL=yes
23873         if test "$ol_with_shell_module" != static ; then
23874                 cat >> confdefs.h <<\EOF
23875 #define SLAPD_SHELL_DYNAMIC 1
23876 EOF
23877
23878                 BUILD_SHELL=mod
23879                 BUILD_SHELL_DYNAMIC=shared
23880                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23881         else
23882                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23883         fi
23884 fi
23885
23886 if test "$ol_link_sql" != no ; then
23887         cat >> confdefs.h <<\EOF
23888 #define SLAPD_SQL 1
23889 EOF
23890
23891         BUILD_SLAPD=yes
23892         BUILD_SQL=yes
23893         if test "$ol_with_sql_module" != static; then
23894                 cat >> confdefs.h <<\EOF
23895 #define SLAPD_SQL_DYNAMIC 1
23896 EOF
23897
23898                 BUILD_SQL=mod
23899                 BUILD_SQL_DYNAMIC=shared
23900                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23901         else
23902                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23903         fi
23904 fi
23905
23906 if test "$ol_with_dyngroup" != no ; then
23907         BUILD_DYNGROUP=$ol_with_dyngroup
23908         if test "$ol_with_dyngroup" = mod ; then
23909                 MFLAG=SLAPD_MOD_DYNAMIC
23910                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23911         else
23912                 MFLAG=SLAPD_MOD_STATIC
23913         fi
23914         cat >> confdefs.h <<EOF
23915 #define SLAPD_OVER_DYNGROUP $MFLAG
23916 EOF
23917
23918 fi
23919
23920 if test "$ol_with_proxycache" != no ; then
23921         BUILD_PROXYCACHE=$ol_with_proxycache
23922         if test "$ol_with_proxycache" = mod ; then
23923                 MFLAG=SLAPD_MOD_DYNAMIC
23924                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23925         else
23926                 MFLAG=SLAPD_MOD_STATIC
23927         fi
23928         cat >> confdefs.h <<EOF
23929 #define SLAPD_OVER_PROXYCACHE $MFLAG
23930 EOF
23931
23932 fi
23933
23934 if test "$ol_with_rwm " != no ; then
23935         BUILD_REWRITE=yes
23936         BUILD_RWM=$ol_with_rwm
23937         if test "$ol_with_rwm" = mod ; then
23938                 MFLAG=SLAPD_MOD_DYNAMIC
23939                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
23940         else
23941                 MFLAG=SLAPD_MOD_STATIC
23942         fi
23943         cat >> confdefs.h <<EOF
23944 #define SLAPD_OVER_RWM $MFLAG
23945 EOF
23946
23947 fi
23948
23949 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23950         $BUILD_SLAPD = yes ; then
23951         BUILD_SLURPD=yes
23952 fi
23953
23954 if test "$ol_enable_rewrite" != no ; then
23955         cat >> confdefs.h <<\EOF
23956 #define ENABLE_REWRITE 1
23957 EOF
23958
23959         BUILD_REWRITE=yes
23960 fi
23961
23962 if test "$ol_enable_slapi" != no ; then
23963         cat >> confdefs.h <<\EOF
23964 #define ENABLE_SLAPI 1
23965 EOF
23966
23967         BUILD_SLAPI=yes
23968         SLAPD_SLAPI_DEPEND=libslapi.a
23969 fi
23970
23971
23972
23973 if test "$ac_cv_mingw32" = yes ; then
23974         PLAT=NT
23975         SLAPD_MODULES_LDFLAGS=
23976 else
23977         PLAT=UNIX
23978 fi
23979
23980 if test -z "$SLAPD_STATIC_BACKENDS"; then
23981         SLAPD_NO_STATIC='#'
23982 else
23983         SLAPD_NO_STATIC=
23984 fi
23985
23986
23987
23988
23989
23990
23991
23992   
23993   
23994   
23995   
23996   
23997   
23998   
23999   
24000   
24001   
24002   
24003   
24004   
24005   
24006   
24007   
24008   
24009   
24010   
24011   
24012   
24013   
24014   
24015   
24016   
24017   
24018   
24019   
24020   
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059 # Check whether --with-xxinstall or --without-xxinstall was given.
24060 if test "${with_xxinstall+set}" = set; then
24061   withval="$with_xxinstall"
24062   :
24063 fi
24064
24065
24066
24067 trap '' 1 2 15
24068
24069 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24070
24071 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24072 # Let make expand exec_prefix.
24073 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24074
24075 # Any assignment to VPATH causes Sun make to only execute
24076 # the first set of double-colon rules, so remove it if not needed.
24077 # If there is a colon in the path, we need to keep it.
24078 if test "x$srcdir" = x.; then
24079   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24080 fi
24081
24082 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24083
24084 DEFS=-DHAVE_CONFIG_H
24085
24086 # Without the "./", some shells look in PATH for config.status.
24087 : ${CONFIG_STATUS=./config.status}
24088
24089 echo creating $CONFIG_STATUS
24090 rm -f $CONFIG_STATUS
24091 cat > $CONFIG_STATUS <<EOF
24092 #! /bin/sh
24093 # Generated automatically by configure.
24094 # Run this file to recreate the current configuration.
24095 # This directory was configured as follows,
24096 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24097 #
24098 # $0 $ac_configure_args
24099 #
24100 # Compiler output produced by configure, useful for debugging
24101 # configure, is in ./config.log if it exists.
24102
24103 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24104 for ac_option
24105 do
24106   case "\$ac_option" in
24107   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24108     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24109     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24110   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24111     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24112     exit 0 ;;
24113   -help | --help | --hel | --he | --h)
24114     echo "\$ac_cs_usage"; exit 0 ;;
24115   *) echo "\$ac_cs_usage"; exit 1 ;;
24116   esac
24117 done
24118
24119 ac_given_srcdir=$srcdir
24120 ac_given_INSTALL="$INSTALL"
24121
24122 trap 'rm -fr `echo "\
24123 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24124 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24125 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24126 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24127 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24128 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24129 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24130 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24131 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24132 include/Makefile:build/top.mk:include/Makefile.in \
24133 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24134 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24135 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24136 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24137 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24138 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24139 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24140 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24141 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24142 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24143 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24144 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24145 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24146 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24147 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24148 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24149 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24150 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24151 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24152 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24153 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24154 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24155 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24156 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24157 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24158 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24159 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24160 tests/run \
24161 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24162  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24163 EOF
24164 cat >> $CONFIG_STATUS <<EOF
24165
24166 # Protect against being on the right side of a sed subst in config.status.
24167 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24168  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24169 $ac_vpsub
24170 $extrasub
24171 s%@SHELL@%$SHELL%g
24172 s%@CFLAGS@%$CFLAGS%g
24173 s%@CPPFLAGS@%$CPPFLAGS%g
24174 s%@CXXFLAGS@%$CXXFLAGS%g
24175 s%@FFLAGS@%$FFLAGS%g
24176 s%@DEFS@%$DEFS%g
24177 s%@LDFLAGS@%$LDFLAGS%g
24178 s%@LIBS@%$LIBS%g
24179 s%@exec_prefix@%$exec_prefix%g
24180 s%@prefix@%$prefix%g
24181 s%@program_transform_name@%$program_transform_name%g
24182 s%@bindir@%$bindir%g
24183 s%@sbindir@%$sbindir%g
24184 s%@libexecdir@%$libexecdir%g
24185 s%@datadir@%$datadir%g
24186 s%@sysconfdir@%$sysconfdir%g
24187 s%@sharedstatedir@%$sharedstatedir%g
24188 s%@localstatedir@%$localstatedir%g
24189 s%@libdir@%$libdir%g
24190 s%@includedir@%$includedir%g
24191 s%@oldincludedir@%$oldincludedir%g
24192 s%@infodir@%$infodir%g
24193 s%@mandir@%$mandir%g
24194 s%@host@%$host%g
24195 s%@host_alias@%$host_alias%g
24196 s%@host_cpu@%$host_cpu%g
24197 s%@host_vendor@%$host_vendor%g
24198 s%@host_os@%$host_os%g
24199 s%@target@%$target%g
24200 s%@target_alias@%$target_alias%g
24201 s%@target_cpu@%$target_cpu%g
24202 s%@target_vendor@%$target_vendor%g
24203 s%@target_os@%$target_os%g
24204 s%@build@%$build%g
24205 s%@build_alias@%$build_alias%g
24206 s%@build_cpu@%$build_cpu%g
24207 s%@build_vendor@%$build_vendor%g
24208 s%@build_os@%$build_os%g
24209 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24210 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24211 s%@INSTALL_DATA@%$INSTALL_DATA%g
24212 s%@PACKAGE@%$PACKAGE%g
24213 s%@VERSION@%$VERSION%g
24214 s%@ACLOCAL@%$ACLOCAL%g
24215 s%@AUTOCONF@%$AUTOCONF%g
24216 s%@AUTOMAKE@%$AUTOMAKE%g
24217 s%@AUTOHEADER@%$AUTOHEADER%g
24218 s%@MAKEINFO@%$MAKEINFO%g
24219 s%@install_sh@%$install_sh%g
24220 s%@AMTAR@%$AMTAR%g
24221 s%@AWK@%$AWK%g
24222 s%@AMTARFLAGS@%$AMTARFLAGS%g
24223 s%@SET_MAKE@%$SET_MAKE%g
24224 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24225 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24226 s%@top_builddir@%$top_builddir%g
24227 s%@ldap_subdir@%$ldap_subdir%g
24228 s%@CC@%$CC%g
24229 s%@AR@%$AR%g
24230 s%@LN_S@%$LN_S%g
24231 s%@OBJEXT@%$OBJEXT%g
24232 s%@EXEEXT@%$EXEEXT%g
24233 s%@ECHO@%$ECHO%g
24234 s%@RANLIB@%$RANLIB%g
24235 s%@STRIP@%$STRIP%g
24236 s%@DLLTOOL@%$DLLTOOL%g
24237 s%@AS@%$AS%g
24238 s%@OBJDUMP@%$OBJDUMP%g
24239 s%@CPP@%$CPP%g
24240 s%@LIBTOOL@%$LIBTOOL%g
24241 s%@LN_H@%$LN_H%g
24242 s%@PERLBIN@%$PERLBIN%g
24243 s%@OL_MKDEP@%$OL_MKDEP%g
24244 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24245 s%@LTSTATIC@%$LTSTATIC%g
24246 s%@LIBOBJS@%$LIBOBJS%g
24247 s%@LIBSRCS@%$LIBSRCS%g
24248 s%@PLAT@%$PLAT%g
24249 s%@WITH_TLS@%$WITH_TLS%g
24250 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24251 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24252 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24253 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24254 s%@BUILD_BDB@%$BUILD_BDB%g
24255 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24256 s%@BUILD_HDB@%$BUILD_HDB%g
24257 s%@BUILD_LDAP@%$BUILD_LDAP%g
24258 s%@BUILD_LDBM@%$BUILD_LDBM%g
24259 s%@BUILD_META@%$BUILD_META%g
24260 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24261 s%@BUILD_NULL@%$BUILD_NULL%g
24262 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24263 s%@BUILD_PERL@%$BUILD_PERL%g
24264 s%@BUILD_SHELL@%$BUILD_SHELL%g
24265 s%@BUILD_SQL@%$BUILD_SQL%g
24266 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24267 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24268 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24269 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24270 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24271 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24272 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24273 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24274 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24275 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24276 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24277 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24278 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24279 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24280 s%@BUILD_RWM@%$BUILD_RWM%g
24281 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24282 s%@LDAP_LIBS@%$LDAP_LIBS%g
24283 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24284 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24285 s%@LDBM_LIBS@%$LDBM_LIBS%g
24286 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24287 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24288 s%@WRAP_LIBS@%$WRAP_LIBS%g
24289 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24290 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24291 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24292 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24293 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24294 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24295 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24296 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24297 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24298 s%@KRB4_LIBS@%$KRB4_LIBS%g
24299 s%@KRB5_LIBS@%$KRB5_LIBS%g
24300 s%@SASL_LIBS@%$SASL_LIBS%g
24301 s%@TLS_LIBS@%$TLS_LIBS%g
24302 s%@MODULES_LIBS@%$MODULES_LIBS%g
24303 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24304 s%@LIBSLAPI@%$LIBSLAPI%g
24305 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24306 s%@AUTH_LIBS@%$AUTH_LIBS%g
24307 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24308 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24309 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24310 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24311
24312 CEOF
24313 EOF
24314
24315 cat >> $CONFIG_STATUS <<\EOF
24316
24317 # Split the substitutions into bite-sized pieces for seds with
24318 # small command number limits, like on Digital OSF/1 and HP-UX.
24319 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24320 ac_file=1 # Number of current file.
24321 ac_beg=1 # First line for current file.
24322 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24323 ac_more_lines=:
24324 ac_sed_cmds=""
24325 while $ac_more_lines; do
24326   if test $ac_beg -gt 1; then
24327     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24328   else
24329     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24330   fi
24331   if test ! -s conftest.s$ac_file; then
24332     ac_more_lines=false
24333     rm -f conftest.s$ac_file
24334   else
24335     if test -z "$ac_sed_cmds"; then
24336       ac_sed_cmds="sed -f conftest.s$ac_file"
24337     else
24338       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24339     fi
24340     ac_file=`expr $ac_file + 1`
24341     ac_beg=$ac_end
24342     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24343   fi
24344 done
24345 if test -z "$ac_sed_cmds"; then
24346   ac_sed_cmds=cat
24347 fi
24348 EOF
24349
24350 cat >> $CONFIG_STATUS <<EOF
24351
24352 CONFIG_FILES=\${CONFIG_FILES-"\
24353 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24354 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24355 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24356 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24357 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24358 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24359 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24360 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24361 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24362 include/Makefile:build/top.mk:include/Makefile.in \
24363 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24364 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24365 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24366 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24367 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24368 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24369 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24370 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24371 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24372 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24373 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24374 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24375 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24376 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24377 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24378 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24379 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24380 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24381 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24382 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24383 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24384 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24385 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24386 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24387 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24388 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24389 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24390 tests/run \
24391 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24392 "}
24393 EOF
24394 cat >> $CONFIG_STATUS <<\EOF
24395 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24396   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24397   case "$ac_file" in
24398   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24399        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24400   *) ac_file_in="${ac_file}.in" ;;
24401   esac
24402
24403   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24404
24405   # Remove last slash and all that follows it.  Not all systems have dirname.
24406   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24407   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24408     # The file is in a subdirectory.
24409     test ! -d "$ac_dir" && mkdir "$ac_dir"
24410     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24411     # A "../" for each directory in $ac_dir_suffix.
24412     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24413   else
24414     ac_dir_suffix= ac_dots=
24415   fi
24416
24417   case "$ac_given_srcdir" in
24418   .)  srcdir=.
24419       if test -z "$ac_dots"; then top_srcdir=.
24420       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24421   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24422   *) # Relative path.
24423     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24424     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24425   esac
24426
24427   case "$ac_given_INSTALL" in
24428   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24429   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24430   esac
24431
24432   echo creating "$ac_file"
24433   rm -f "$ac_file"
24434   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24435   case "$ac_file" in
24436   *[Mm]akefile*) ac_comsub="1i\\
24437 # $configure_input" ;;
24438   *) ac_comsub= ;;
24439   esac
24440
24441   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24442   sed -e "$ac_comsub
24443 s%@configure_input@%$configure_input%g
24444 s%@srcdir@%$srcdir%g
24445 s%@top_srcdir@%$top_srcdir%g
24446 s%@INSTALL@%$INSTALL%g
24447 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24448 fi; done
24449 rm -f conftest.s*
24450
24451 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24452 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24453 #
24454 # ac_d sets the value in "#define NAME VALUE" lines.
24455 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24456 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24457 ac_dC='\3'
24458 ac_dD='%g'
24459 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24460 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24461 ac_uB='\([      ]\)%\1#\2define\3'
24462 ac_uC=' '
24463 ac_uD='\4%g'
24464 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24465 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24466 ac_eB='$%\1#\2define\3'
24467 ac_eC=' '
24468 ac_eD='%g'
24469
24470 if test "${CONFIG_HEADERS+set}" != set; then
24471 EOF
24472 cat >> $CONFIG_STATUS <<EOF
24473   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24474 EOF
24475 cat >> $CONFIG_STATUS <<\EOF
24476 fi
24477 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24478   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24479   case "$ac_file" in
24480   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24481        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24482   *) ac_file_in="${ac_file}.in" ;;
24483   esac
24484
24485   echo creating $ac_file
24486
24487   rm -f conftest.frag conftest.in conftest.out
24488   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24489   cat $ac_file_inputs > conftest.in
24490
24491 EOF
24492
24493 # Transform confdefs.h into a sed script conftest.vals that substitutes
24494 # the proper values into config.h.in to produce config.h.  And first:
24495 # Protect against being on the right side of a sed subst in config.status.
24496 # Protect against being in an unquoted here document in config.status.
24497 rm -f conftest.vals
24498 cat > conftest.hdr <<\EOF
24499 s/[\\&%]/\\&/g
24500 s%[\\$`]%\\&%g
24501 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24502 s%ac_d%ac_u%gp
24503 s%ac_u%ac_e%gp
24504 EOF
24505 sed -n -f conftest.hdr confdefs.h > conftest.vals
24506 rm -f conftest.hdr
24507
24508 # This sed command replaces #undef with comments.  This is necessary, for
24509 # example, in the case of _POSIX_SOURCE, which is predefined and required
24510 # on some systems where configure will not decide to define it.
24511 cat >> conftest.vals <<\EOF
24512 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24513 EOF
24514
24515 # Break up conftest.vals because some shells have a limit on
24516 # the size of here documents, and old seds have small limits too.
24517
24518 rm -f conftest.tail
24519 while :
24520 do
24521   ac_lines=`grep -c . conftest.vals`
24522   # grep -c gives empty output for an empty file on some AIX systems.
24523   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24524   # Write a limited-size here document to conftest.frag.
24525   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24526   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24527   echo 'CEOF
24528   sed -f conftest.frag conftest.in > conftest.out
24529   rm -f conftest.in
24530   mv conftest.out conftest.in
24531 ' >> $CONFIG_STATUS
24532   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24533   rm -f conftest.vals
24534   mv conftest.tail conftest.vals
24535 done
24536 rm -f conftest.vals
24537
24538 cat >> $CONFIG_STATUS <<\EOF
24539   rm -f conftest.frag conftest.h
24540   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24541   cat conftest.in >> conftest.h
24542   rm -f conftest.in
24543   if cmp -s $ac_file conftest.h 2>/dev/null; then
24544     echo "$ac_file is unchanged"
24545     rm -f conftest.h
24546   else
24547     # Remove last slash and all that follows it.  Not all systems have dirname.
24548       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24549       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24550       # The file is in a subdirectory.
24551       test ! -d "$ac_dir" && mkdir "$ac_dir"
24552     fi
24553     rm -f $ac_file
24554     mv conftest.h $ac_file
24555   fi
24556 fi; done
24557
24558 EOF
24559 cat >> $CONFIG_STATUS <<EOF
24560
24561 EOF
24562 cat >> $CONFIG_STATUS <<\EOF
24563
24564 chmod +x tests/run
24565 date > stamp-h
24566 echo Please run \"make depend\" to build dependencies
24567
24568 exit 0
24569 EOF
24570 chmod +x $CONFIG_STATUS
24571 rm -fr confdefs* $ac_clean_files
24572 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24573