]> git.sur5r.net Git - openldap/blob - configure
ITS#2985 regenerate to drop slapd/tools directory
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.514 2004/02/26 18:27:28 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 # OpenLDAP --enable-lmpasswd
1742         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1743 if test "${enable_lmpasswd+set}" = set; then
1744   enableval="$enable_lmpasswd"
1745   
1746         ol_arg=invalid
1747         for ol_val in auto yes no ; do
1748                 if test "$enableval" = "$ol_val" ; then
1749                         ol_arg="$ol_val"
1750                 fi
1751         done
1752         if test "$ol_arg" = "invalid" ; then
1753                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1754         fi
1755         ol_enable_lmpasswd="$ol_arg"
1756
1757 else
1758         ol_enable_lmpasswd="no"
1759 fi
1760 # end --enable-lmpasswd
1761 # OpenLDAP --enable-spasswd
1762         # Check whether --enable-spasswd or --disable-spasswd was given.
1763 if test "${enable_spasswd+set}" = set; then
1764   enableval="$enable_spasswd"
1765   
1766         ol_arg=invalid
1767         for ol_val in auto yes no ; do
1768                 if test "$enableval" = "$ol_val" ; then
1769                         ol_arg="$ol_val"
1770                 fi
1771         done
1772         if test "$ol_arg" = "invalid" ; then
1773                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1774         fi
1775         ol_enable_spasswd="$ol_arg"
1776
1777 else
1778         ol_enable_spasswd="no"
1779 fi
1780 # end --enable-spasswd
1781 # OpenLDAP --enable-modules
1782         # Check whether --enable-modules or --disable-modules was given.
1783 if test "${enable_modules+set}" = set; then
1784   enableval="$enable_modules"
1785   
1786         ol_arg=invalid
1787         for ol_val in auto yes no ; do
1788                 if test "$enableval" = "$ol_val" ; then
1789                         ol_arg="$ol_val"
1790                 fi
1791         done
1792         if test "$ol_arg" = "invalid" ; then
1793                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1794         fi
1795         ol_enable_modules="$ol_arg"
1796
1797 else
1798         ol_enable_modules="no"
1799 fi
1800 # end --enable-modules
1801 ol_enable_multimaster=${ol_enable_multimaster-no}
1802 # OpenLDAP --enable-rewrite
1803         # Check whether --enable-rewrite or --disable-rewrite was given.
1804 if test "${enable_rewrite+set}" = set; then
1805   enableval="$enable_rewrite"
1806   
1807         ol_arg=invalid
1808         for ol_val in auto yes no ; do
1809                 if test "$enableval" = "$ol_val" ; then
1810                         ol_arg="$ol_val"
1811                 fi
1812         done
1813         if test "$ol_arg" = "invalid" ; then
1814                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1815         fi
1816         ol_enable_rewrite="$ol_arg"
1817
1818 else
1819         ol_enable_rewrite="no"
1820 fi
1821 # end --enable-rewrite
1822 # OpenLDAP --enable-rlookups
1823         # Check whether --enable-rlookups or --disable-rlookups was given.
1824 if test "${enable_rlookups+set}" = set; then
1825   enableval="$enable_rlookups"
1826   
1827         ol_arg=invalid
1828         for ol_val in auto yes no ; do
1829                 if test "$enableval" = "$ol_val" ; then
1830                         ol_arg="$ol_val"
1831                 fi
1832         done
1833         if test "$ol_arg" = "invalid" ; then
1834                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1835         fi
1836         ol_enable_rlookups="$ol_arg"
1837
1838 else
1839         ol_enable_rlookups="no"
1840 fi
1841 # end --enable-rlookups
1842 # OpenLDAP --enable-slapi
1843         # Check whether --enable-slapi or --disable-slapi was given.
1844 if test "${enable_slapi+set}" = set; then
1845   enableval="$enable_slapi"
1846   
1847         ol_arg=invalid
1848         for ol_val in auto yes no ; do
1849                 if test "$enableval" = "$ol_val" ; then
1850                         ol_arg="$ol_val"
1851                 fi
1852         done
1853         if test "$ol_arg" = "invalid" ; then
1854                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1855         fi
1856         ol_enable_slapi="$ol_arg"
1857
1858 else
1859         ol_enable_slapi="no"
1860 fi
1861 # end --enable-slapi
1862 # OpenLDAP --enable-slp
1863         # Check whether --enable-slp or --disable-slp was given.
1864 if test "${enable_slp+set}" = set; then
1865   enableval="$enable_slp"
1866   
1867         ol_arg=invalid
1868         for ol_val in auto yes no ; do
1869                 if test "$enableval" = "$ol_val" ; then
1870                         ol_arg="$ol_val"
1871                 fi
1872         done
1873         if test "$ol_arg" = "invalid" ; then
1874                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1875         fi
1876         ol_enable_slp="$ol_arg"
1877
1878 else
1879         ol_enable_slp="no"
1880 fi
1881 # end --enable-slp
1882 # OpenLDAP --enable-wrappers
1883         # Check whether --enable-wrappers or --disable-wrappers was given.
1884 if test "${enable_wrappers+set}" = set; then
1885   enableval="$enable_wrappers"
1886   
1887         ol_arg=invalid
1888         for ol_val in auto yes no ; do
1889                 if test "$enableval" = "$ol_val" ; then
1890                         ol_arg="$ol_val"
1891                 fi
1892         done
1893         if test "$ol_arg" = "invalid" ; then
1894                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1895         fi
1896         ol_enable_wrappers="$ol_arg"
1897
1898 else
1899         ol_enable_wrappers="no"
1900 fi
1901 # end --enable-wrappers
1902
1903
1904 # OpenLDAP --enable-bdb
1905         # Check whether --enable-bdb or --disable-bdb was given.
1906 if test "${enable_bdb+set}" = set; then
1907   enableval="$enable_bdb"
1908   
1909         ol_arg=invalid
1910         for ol_val in auto yes no ; do
1911                 if test "$enableval" = "$ol_val" ; then
1912                         ol_arg="$ol_val"
1913                 fi
1914         done
1915         if test "$ol_arg" = "invalid" ; then
1916                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1917         fi
1918         ol_enable_bdb="$ol_arg"
1919
1920 else
1921         ol_enable_bdb="yes"
1922 fi
1923 # end --enable-bdb
1924 # OpenLDAP --with-bdb_module
1925         # Check whether --with-bdb_module or --without-bdb_module was given.
1926 if test "${with_bdb_module+set}" = set; then
1927   withval="$with_bdb_module"
1928   
1929         ol_arg=invalid
1930         for ol_val in static dynamic ; do
1931                 if test "$withval" = "$ol_val" ; then
1932                         ol_arg="$ol_val"
1933                 fi
1934         done
1935         if test "$ol_arg" = "invalid" ; then
1936                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1937         fi
1938         ol_with_bdb_module="$ol_arg"
1939
1940 else
1941         ol_with_bdb_module="static"
1942 fi
1943 # end --with-bdb_module
1944
1945 # OpenLDAP --enable-dnssrv
1946         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1947 if test "${enable_dnssrv+set}" = set; then
1948   enableval="$enable_dnssrv"
1949   
1950         ol_arg=invalid
1951         for ol_val in auto yes no ; do
1952                 if test "$enableval" = "$ol_val" ; then
1953                         ol_arg="$ol_val"
1954                 fi
1955         done
1956         if test "$ol_arg" = "invalid" ; then
1957                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1958         fi
1959         ol_enable_dnssrv="$ol_arg"
1960
1961 else
1962         ol_enable_dnssrv="no"
1963 fi
1964 # end --enable-dnssrv
1965 # OpenLDAP --with-dnssrv_module
1966         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1967 if test "${with_dnssrv_module+set}" = set; then
1968   withval="$with_dnssrv_module"
1969   
1970         ol_arg=invalid
1971         for ol_val in static dynamic ; do
1972                 if test "$withval" = "$ol_val" ; then
1973                         ol_arg="$ol_val"
1974                 fi
1975         done
1976         if test "$ol_arg" = "invalid" ; then
1977                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1978         fi
1979         ol_with_dnssrv_module="$ol_arg"
1980
1981 else
1982         ol_with_dnssrv_module="static"
1983 fi
1984 # end --with-dnssrv_module
1985
1986 # OpenLDAP --enable-hdb
1987         # Check whether --enable-hdb or --disable-hdb was given.
1988 if test "${enable_hdb+set}" = set; then
1989   enableval="$enable_hdb"
1990   
1991         ol_arg=invalid
1992         for ol_val in auto yes no ; do
1993                 if test "$enableval" = "$ol_val" ; then
1994                         ol_arg="$ol_val"
1995                 fi
1996         done
1997         if test "$ol_arg" = "invalid" ; then
1998                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1999         fi
2000         ol_enable_hdb="$ol_arg"
2001
2002 else
2003         ol_enable_hdb="no"
2004 fi
2005 # end --enable-hdb
2006 # OpenLDAP --with-hdb_module
2007         # Check whether --with-hdb_module or --without-hdb_module was given.
2008 if test "${with_hdb_module+set}" = set; then
2009   withval="$with_hdb_module"
2010   
2011         ol_arg=invalid
2012         for ol_val in static dynamic ; do
2013                 if test "$withval" = "$ol_val" ; then
2014                         ol_arg="$ol_val"
2015                 fi
2016         done
2017         if test "$ol_arg" = "invalid" ; then
2018                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2019         fi
2020         ol_with_hdb_module="$ol_arg"
2021
2022 else
2023         ol_with_hdb_module="static"
2024 fi
2025 # end --with-hdb_module
2026
2027 # OpenLDAP --enable-ldap
2028         # Check whether --enable-ldap or --disable-ldap was given.
2029 if test "${enable_ldap+set}" = set; then
2030   enableval="$enable_ldap"
2031   
2032         ol_arg=invalid
2033         for ol_val in auto yes no ; do
2034                 if test "$enableval" = "$ol_val" ; then
2035                         ol_arg="$ol_val"
2036                 fi
2037         done
2038         if test "$ol_arg" = "invalid" ; then
2039                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2040         fi
2041         ol_enable_ldap="$ol_arg"
2042
2043 else
2044         ol_enable_ldap="no"
2045 fi
2046 # end --enable-ldap
2047 # OpenLDAP --with-ldap_module
2048         # Check whether --with-ldap_module or --without-ldap_module was given.
2049 if test "${with_ldap_module+set}" = set; then
2050   withval="$with_ldap_module"
2051   
2052         ol_arg=invalid
2053         for ol_val in static dynamic ; do
2054                 if test "$withval" = "$ol_val" ; then
2055                         ol_arg="$ol_val"
2056                 fi
2057         done
2058         if test "$ol_arg" = "invalid" ; then
2059                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2060         fi
2061         ol_with_ldap_module="$ol_arg"
2062
2063 else
2064         ol_with_ldap_module="static"
2065 fi
2066 # end --with-ldap_module
2067
2068 # OpenLDAP --enable-ldbm
2069         # Check whether --enable-ldbm or --disable-ldbm was given.
2070 if test "${enable_ldbm+set}" = set; then
2071   enableval="$enable_ldbm"
2072   
2073         ol_arg=invalid
2074         for ol_val in auto yes no ; do
2075                 if test "$enableval" = "$ol_val" ; then
2076                         ol_arg="$ol_val"
2077                 fi
2078         done
2079         if test "$ol_arg" = "invalid" ; then
2080                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2081         fi
2082         ol_enable_ldbm="$ol_arg"
2083
2084 else
2085         ol_enable_ldbm="no"
2086 fi
2087 # end --enable-ldbm
2088 # OpenLDAP --with-ldbm_api
2089         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2090 if test "${with_ldbm_api+set}" = set; then
2091   withval="$with_ldbm_api"
2092   
2093         ol_arg=invalid
2094         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2095                 if test "$withval" = "$ol_val" ; then
2096                         ol_arg="$ol_val"
2097                 fi
2098         done
2099         if test "$ol_arg" = "invalid" ; then
2100                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2101         fi
2102         ol_with_ldbm_api="$ol_arg"
2103
2104 else
2105         ol_with_ldbm_api="auto"
2106 fi
2107 # end --with-ldbm_api
2108
2109 # OpenLDAP --with-ldbm_module
2110         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2111 if test "${with_ldbm_module+set}" = set; then
2112   withval="$with_ldbm_module"
2113   
2114         ol_arg=invalid
2115         for ol_val in static dynamic ; do
2116                 if test "$withval" = "$ol_val" ; then
2117                         ol_arg="$ol_val"
2118                 fi
2119         done
2120         if test "$ol_arg" = "invalid" ; then
2121                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2122         fi
2123         ol_with_ldbm_module="$ol_arg"
2124
2125 else
2126         ol_with_ldbm_module="static"
2127 fi
2128 # end --with-ldbm_module
2129
2130 # OpenLDAP --with-ldbm_type
2131         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2132 if test "${with_ldbm_type+set}" = set; then
2133   withval="$with_ldbm_type"
2134   
2135         ol_arg=invalid
2136         for ol_val in auto btree hash ; do
2137                 if test "$withval" = "$ol_val" ; then
2138                         ol_arg="$ol_val"
2139                 fi
2140         done
2141         if test "$ol_arg" = "invalid" ; then
2142                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2143         fi
2144         ol_with_ldbm_type="$ol_arg"
2145
2146 else
2147         ol_with_ldbm_type="auto"
2148 fi
2149 # end --with-ldbm_type
2150
2151 # OpenLDAP --enable-meta
2152         # Check whether --enable-meta or --disable-meta was given.
2153 if test "${enable_meta+set}" = set; then
2154   enableval="$enable_meta"
2155   
2156         ol_arg=invalid
2157         for ol_val in auto yes no ; do
2158                 if test "$enableval" = "$ol_val" ; then
2159                         ol_arg="$ol_val"
2160                 fi
2161         done
2162         if test "$ol_arg" = "invalid" ; then
2163                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2164         fi
2165         ol_enable_meta="$ol_arg"
2166
2167 else
2168         ol_enable_meta="no"
2169 fi
2170 # end --enable-meta
2171 # OpenLDAP --with-meta_module
2172         # Check whether --with-meta_module or --without-meta_module was given.
2173 if test "${with_meta_module+set}" = set; then
2174   withval="$with_meta_module"
2175   
2176         ol_arg=invalid
2177         for ol_val in static dynamic ; do
2178                 if test "$withval" = "$ol_val" ; then
2179                         ol_arg="$ol_val"
2180                 fi
2181         done
2182         if test "$ol_arg" = "invalid" ; then
2183                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2184         fi
2185         ol_with_meta_module="$ol_arg"
2186
2187 else
2188         ol_with_meta_module="static"
2189 fi
2190 # end --with-meta_module
2191
2192 # OpenLDAP --enable-monitor
2193         # Check whether --enable-monitor or --disable-monitor was given.
2194 if test "${enable_monitor+set}" = set; then
2195   enableval="$enable_monitor"
2196   
2197         ol_arg=invalid
2198         for ol_val in auto yes no ; do
2199                 if test "$enableval" = "$ol_val" ; then
2200                         ol_arg="$ol_val"
2201                 fi
2202         done
2203         if test "$ol_arg" = "invalid" ; then
2204                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2205         fi
2206         ol_enable_monitor="$ol_arg"
2207
2208 else
2209         ol_enable_monitor="yes"
2210 fi
2211 # end --enable-monitor
2212 # OpenLDAP --with-monitor_module
2213         # Check whether --with-monitor_module or --without-monitor_module was given.
2214 if test "${with_monitor_module+set}" = set; then
2215   withval="$with_monitor_module"
2216   
2217         ol_arg=invalid
2218         for ol_val in static dynamic ; do
2219                 if test "$withval" = "$ol_val" ; then
2220                         ol_arg="$ol_val"
2221                 fi
2222         done
2223         if test "$ol_arg" = "invalid" ; then
2224                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2225         fi
2226         ol_with_monitor_module="$ol_arg"
2227
2228 else
2229         ol_with_monitor_module="static"
2230 fi
2231 # end --with-monitor_module
2232
2233 # OpenLDAP --enable-null
2234         # Check whether --enable-null or --disable-null was given.
2235 if test "${enable_null+set}" = set; then
2236   enableval="$enable_null"
2237   
2238         ol_arg=invalid
2239         for ol_val in auto yes no ; do
2240                 if test "$enableval" = "$ol_val" ; then
2241                         ol_arg="$ol_val"
2242                 fi
2243         done
2244         if test "$ol_arg" = "invalid" ; then
2245                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2246         fi
2247         ol_enable_null="$ol_arg"
2248
2249 else
2250         ol_enable_null="no"
2251 fi
2252 # end --enable-null
2253 # OpenLDAP --with-null_module
2254         # Check whether --with-null_module or --without-null_module was given.
2255 if test "${with_null_module+set}" = set; then
2256   withval="$with_null_module"
2257   
2258         ol_arg=invalid
2259         for ol_val in static dynamic ; do
2260                 if test "$withval" = "$ol_val" ; then
2261                         ol_arg="$ol_val"
2262                 fi
2263         done
2264         if test "$ol_arg" = "invalid" ; then
2265                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2266         fi
2267         ol_with_null_module="$ol_arg"
2268
2269 else
2270         ol_with_null_module="static"
2271 fi
2272 # end --with-null_module
2273
2274 # OpenLDAP --enable-passwd
2275         # Check whether --enable-passwd or --disable-passwd was given.
2276 if test "${enable_passwd+set}" = set; then
2277   enableval="$enable_passwd"
2278   
2279         ol_arg=invalid
2280         for ol_val in auto yes no ; do
2281                 if test "$enableval" = "$ol_val" ; then
2282                         ol_arg="$ol_val"
2283                 fi
2284         done
2285         if test "$ol_arg" = "invalid" ; then
2286                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2287         fi
2288         ol_enable_passwd="$ol_arg"
2289
2290 else
2291         ol_enable_passwd="no"
2292 fi
2293 # end --enable-passwd
2294 # OpenLDAP --with-passwd_module
2295         # Check whether --with-passwd_module or --without-passwd_module was given.
2296 if test "${with_passwd_module+set}" = set; then
2297   withval="$with_passwd_module"
2298   
2299         ol_arg=invalid
2300         for ol_val in static dynamic ; do
2301                 if test "$withval" = "$ol_val" ; then
2302                         ol_arg="$ol_val"
2303                 fi
2304         done
2305         if test "$ol_arg" = "invalid" ; then
2306                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2307         fi
2308         ol_with_passwd_module="$ol_arg"
2309
2310 else
2311         ol_with_passwd_module="static"
2312 fi
2313 # end --with-passwd_module
2314
2315 # OpenLDAP --enable-perl
2316         # Check whether --enable-perl or --disable-perl was given.
2317 if test "${enable_perl+set}" = set; then
2318   enableval="$enable_perl"
2319   
2320         ol_arg=invalid
2321         for ol_val in auto yes no ; do
2322                 if test "$enableval" = "$ol_val" ; then
2323                         ol_arg="$ol_val"
2324                 fi
2325         done
2326         if test "$ol_arg" = "invalid" ; then
2327                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2328         fi
2329         ol_enable_perl="$ol_arg"
2330
2331 else
2332         ol_enable_perl="no"
2333 fi
2334 # end --enable-perl
2335 # OpenLDAP --with-perl_module
2336         # Check whether --with-perl_module or --without-perl_module was given.
2337 if test "${with_perl_module+set}" = set; then
2338   withval="$with_perl_module"
2339   
2340         ol_arg=invalid
2341         for ol_val in static dynamic ; do
2342                 if test "$withval" = "$ol_val" ; then
2343                         ol_arg="$ol_val"
2344                 fi
2345         done
2346         if test "$ol_arg" = "invalid" ; then
2347                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2348         fi
2349         ol_with_perl_module="$ol_arg"
2350
2351 else
2352         ol_with_perl_module="static"
2353 fi
2354 # end --with-perl_module
2355
2356 # OpenLDAP --enable-shell
2357         # Check whether --enable-shell or --disable-shell was given.
2358 if test "${enable_shell+set}" = set; then
2359   enableval="$enable_shell"
2360   
2361         ol_arg=invalid
2362         for ol_val in auto yes no ; do
2363                 if test "$enableval" = "$ol_val" ; then
2364                         ol_arg="$ol_val"
2365                 fi
2366         done
2367         if test "$ol_arg" = "invalid" ; then
2368                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2369         fi
2370         ol_enable_shell="$ol_arg"
2371
2372 else
2373         ol_enable_shell="no"
2374 fi
2375 # end --enable-shell
2376 # OpenLDAP --with-shell_module
2377         # Check whether --with-shell_module or --without-shell_module was given.
2378 if test "${with_shell_module+set}" = set; then
2379   withval="$with_shell_module"
2380   
2381         ol_arg=invalid
2382         for ol_val in static dynamic ; do
2383                 if test "$withval" = "$ol_val" ; then
2384                         ol_arg="$ol_val"
2385                 fi
2386         done
2387         if test "$ol_arg" = "invalid" ; then
2388                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2389         fi
2390         ol_with_shell_module="$ol_arg"
2391
2392 else
2393         ol_with_shell_module="static"
2394 fi
2395 # end --with-shell_module
2396
2397 # OpenLDAP --enable-sql
2398         # Check whether --enable-sql or --disable-sql was given.
2399 if test "${enable_sql+set}" = set; then
2400   enableval="$enable_sql"
2401   
2402         ol_arg=invalid
2403         for ol_val in auto yes no ; do
2404                 if test "$enableval" = "$ol_val" ; then
2405                         ol_arg="$ol_val"
2406                 fi
2407         done
2408         if test "$ol_arg" = "invalid" ; then
2409                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2410         fi
2411         ol_enable_sql="$ol_arg"
2412
2413 else
2414         ol_enable_sql="no"
2415 fi
2416 # end --enable-sql
2417 # OpenLDAP --with-sql_module
2418         # Check whether --with-sql_module or --without-sql_module was given.
2419 if test "${with_sql_module+set}" = set; then
2420   withval="$with_sql_module"
2421   
2422         ol_arg=invalid
2423         for ol_val in static dynamic ; do
2424                 if test "$withval" = "$ol_val" ; then
2425                         ol_arg="$ol_val"
2426                 fi
2427         done
2428         if test "$ol_arg" = "invalid" ; then
2429                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2430         fi
2431         ol_with_sql_module="$ol_arg"
2432
2433 else
2434         ol_with_sql_module="static"
2435 fi
2436 # end --with-sql_module
2437
2438
2439 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2440 if test "${with_xxslapoverlays+set}" = set; then
2441   withval="$with_xxslapoverlays"
2442   :
2443 fi
2444
2445 # OpenLDAP --with-dyngroup
2446         # Check whether --with-dyngroup or --without-dyngroup was given.
2447 if test "${with_dyngroup+set}" = set; then
2448   withval="$with_dyngroup"
2449   
2450         ol_arg=invalid
2451         for ol_val in no yes mod ; do
2452                 if test "$withval" = "$ol_val" ; then
2453                         ol_arg="$ol_val"
2454                 fi
2455         done
2456         if test "$ol_arg" = "invalid" ; then
2457                 { echo "configure: error: bad value $withval for --with-dyngroup" 1>&2; exit 1; }
2458         fi
2459         ol_with_dyngroup="$ol_arg"
2460
2461 else
2462         ol_with_dyngroup="no"
2463 fi
2464 # end --with-dyngroup
2465
2466 # OpenLDAP --with-proxycache
2467         # Check whether --with-proxycache or --without-proxycache was given.
2468 if test "${with_proxycache+set}" = set; then
2469   withval="$with_proxycache"
2470   
2471         ol_arg=invalid
2472         for ol_val in no yes mod ; do
2473                 if test "$withval" = "$ol_val" ; then
2474                         ol_arg="$ol_val"
2475                 fi
2476         done
2477         if test "$ol_arg" = "invalid" ; then
2478                 { echo "configure: error: bad value $withval for --with-proxycache" 1>&2; exit 1; }
2479         fi
2480         ol_with_proxycache="$ol_arg"
2481
2482 else
2483         ol_with_proxycache="no"
2484 fi
2485 # end --with-proxycache
2486
2487 # OpenLDAP --with-rwm
2488         # Check whether --with-rwm or --without-rwm was given.
2489 if test "${with_rwm+set}" = set; then
2490   withval="$with_rwm"
2491   
2492         ol_arg=invalid
2493         for ol_val in no yes mod ; do
2494                 if test "$withval" = "$ol_val" ; then
2495                         ol_arg="$ol_val"
2496                 fi
2497         done
2498         if test "$ol_arg" = "invalid" ; then
2499                 { echo "configure: error: bad value $withval for --with-rwm" 1>&2; exit 1; }
2500         fi
2501         ol_with_rwm="$ol_arg"
2502
2503 else
2504         ol_with_rwm="no"
2505 fi
2506 # end --with-rwm
2507
2508
2509 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2510 if test "${with_xxslurpdoptions+set}" = set; then
2511   withval="$with_xxslurpdoptions"
2512   :
2513 fi
2514
2515 # OpenLDAP --enable-slurpd
2516         # Check whether --enable-slurpd or --disable-slurpd was given.
2517 if test "${enable_slurpd+set}" = set; then
2518   enableval="$enable_slurpd"
2519   
2520         ol_arg=invalid
2521         for ol_val in auto yes no ; do
2522                 if test "$enableval" = "$ol_val" ; then
2523                         ol_arg="$ol_val"
2524                 fi
2525         done
2526         if test "$ol_arg" = "invalid" ; then
2527                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2528         fi
2529         ol_enable_slurpd="$ol_arg"
2530
2531 else
2532         ol_enable_slurpd="auto"
2533 fi
2534 # end --enable-slurpd
2535
2536 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2537 if test "${with_xxliboptions+set}" = set; then
2538   withval="$with_xxliboptions"
2539   :
2540 fi
2541
2542 # Check whether --enable-static or --disable-static was given.
2543 if test "${enable_static+set}" = set; then
2544   enableval="$enable_static"
2545   p=${PACKAGE-default}
2546 case $enableval in
2547 yes) enable_static=yes ;;
2548 no) enable_static=no ;;
2549 *)
2550   enable_static=no
2551   # Look at the argument we got.  We use all the common list separators.
2552   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2553   for pkg in $enableval; do
2554     if test "X$pkg" = "X$p"; then
2555       enable_static=yes
2556     fi
2557   done
2558   IFS="$ac_save_ifs"
2559   ;;
2560 esac
2561 else
2562   enable_static=yes
2563 fi
2564
2565 # Check whether --enable-shared or --disable-shared was given.
2566 if test "${enable_shared+set}" = set; then
2567   enableval="$enable_shared"
2568   p=${PACKAGE-default}
2569 case $enableval in
2570 yes) enable_shared=yes ;;
2571 no) enable_shared=no ;;
2572 *)
2573   enable_shared=no
2574   # Look at the argument we got.  We use all the common list separators.
2575   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2576   for pkg in $enableval; do
2577     if test "X$pkg" = "X$p"; then
2578       enable_shared=yes
2579     fi
2580   done
2581   IFS="$ac_save_ifs"
2582   ;;
2583 esac
2584 else
2585   enable_shared=yes
2586 fi
2587
2588
2589
2590 # validate options
2591 if test $ol_enable_slapd = no ; then
2592                 if test $ol_enable_slapi = yes ; then
2593                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2594         fi
2595         if test $ol_enable_bdb = yes ; then
2596                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2597         fi
2598         if test $ol_enable_dnssrv = yes ; then
2599                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2600         fi
2601         if test $ol_enable_hdb = yes ; then
2602                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2603         fi
2604         if test $ol_enable_ldap = yes ; then
2605                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2606         fi
2607         if test $ol_enable_ldbm = yes ; then
2608                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2609         fi
2610         if test $ol_enable_meta = yes ; then
2611                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2612         fi
2613         if test $ol_enable_monitor = yes ; then
2614                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2615         fi
2616         if test $ol_enable_null = yes ; then
2617                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2618         fi
2619         if test $ol_enable_passwd = yes ; then
2620                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2621         fi
2622         if test $ol_enable_perl = yes ; then
2623                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2624         fi
2625         if test $ol_enable_shell = yes ; then
2626                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2627         fi
2628         if test $ol_enable_sql = yes ; then
2629                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2630         fi
2631         if test $ol_enable_modules = yes ; then
2632                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2633         fi
2634         if test $ol_enable_multimaster = yes ; then
2635                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2636         fi
2637         if test $ol_enable_wrappers = yes ; then
2638                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2639         fi
2640         if test $ol_enable_rlookups = yes ; then
2641                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2642         fi
2643         if test $ol_enable_aci = yes ; then
2644                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2645         fi
2646         if test $ol_with_ldbm_api != auto ; then
2647                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2648         fi
2649         if test $ol_with_ldbm_type != auto ; then
2650                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2651         fi
2652         if test $ol_with_bdb_module != static ; then
2653                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2654         fi
2655         if test $ol_with_dnssrv_module != static ; then
2656                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2657         fi
2658         if test $ol_with_hdb_module != static ; then
2659                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2660         fi
2661         if test $ol_with_ldap_module != static ; then
2662                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2663         fi
2664         if test $ol_with_ldbm_module != static ; then
2665                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2666         fi
2667         if test $ol_with_meta_module != static ; then
2668                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2669         fi
2670         if test $ol_with_monitor_module != static ; then
2671                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2672         fi
2673         if test $ol_with_null_module != static ; then
2674                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2675         fi
2676         if test $ol_with_passwd_module != static ; then
2677                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2678         fi
2679         if test $ol_with_perl_module != static ; then
2680                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2681         fi
2682         if test $ol_with_shell_module != static ; then
2683                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2684         fi
2685         if test $ol_with_sql_module != static ; then
2686                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2687         fi
2688         if test $ol_enable_slurpd = yes ; then
2689                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2690         fi
2691         if test $ol_enable_rewrite = yes ; then
2692                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2693         fi
2694         if test $ol_with_dyngroup != no ; then
2695                 echo "configure: warning: slapd disabled, ignoring --with-dyngroup argument" 1>&2
2696         fi
2697         if test $ol_with_proxycache != no ; then
2698                 echo "configure: warning: slapd disabled, ignoring --with-proxycache argument" 1>&2
2699         fi
2700         if test $ol_with_rwm != no ; then
2701                 echo "configure: warning: slapd disabled, ignoring --with-rwm argument" 1>&2
2702         fi
2703
2704         # force settings to no
2705         ol_enable_slapi=no
2706         ol_enable_bdb=no
2707         ol_enable_dnssrv=no
2708         ol_enable_hdb=no
2709         ol_enable_ldap=no
2710         ol_enable_ldbm=no
2711         ol_enable_meta=no
2712         ol_enable_monitor=no
2713         ol_enable_null=no
2714         ol_enable_passwd=no
2715         ol_enable_perl=no
2716         ol_enable_shell=no
2717         ol_enable_sql=no
2718
2719         ol_enable_modules=no
2720         ol_enable_multimaster=no
2721         ol_enable_rlookups=no
2722         ol_enable_aci=no
2723         ol_enable_wrappers=no
2724
2725         ol_with_ldbm_api=no
2726         ol_with_ldbm_type=no
2727
2728         ol_with_bdb_module=static
2729         ol_with_dnssrv_module=static
2730         ol_with_hdb_module=static
2731         ol_with_ldap_module=static
2732         ol_with_ldbm_module=static
2733         ol_with_meta_module=static
2734         ol_with_monitor_module=static
2735         ol_with_null_module=static
2736         ol_with_passwd_module=static
2737         ol_with_perl_module=static
2738         ol_with_shell_module=static
2739         ol_with_sql_module=static
2740
2741         ol_enable_slurpd=no
2742
2743         ol_enable_rewrite=no
2744
2745         ol_with_dyngroup=no
2746         ol_with_proxycache=no
2747         ol_with_rwm=no
2748
2749 elif test $ol_enable_ldbm = no ; then
2750         
2751         if test $ol_with_ldbm_api != auto ; then
2752                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2753         fi
2754
2755         if test $ol_with_ldbm_type != auto ; then
2756                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2757         fi
2758
2759         if test $ol_with_ldbm_module != static ; then
2760                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2761         fi
2762
2763         if test $ol_enable_modules != yes -a \
2764                 $ol_enable_bdb = no -a \
2765                 $ol_enable_dnssrv = no -a \
2766                 $ol_enable_hdb = no -a \
2767                 $ol_enable_ldap = no -a \
2768                 $ol_enable_meta = no -a \
2769                 $ol_enable_monitor = no -a \
2770                 $ol_enable_null = no -a \
2771                 $ol_enable_passwd = no -a \
2772                 $ol_enable_perl = no -a \
2773                 $ol_enable_shell = no -a \
2774                 $ol_enable_sql = no ; then
2775
2776                 if test $ol_enable_slapd = yes ; then
2777                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2778                 else
2779                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2780                         ol_enable_slapd=no
2781                 fi
2782         fi
2783
2784         ol_with_ldbm_api=no
2785         ol_with_ldbm_type=no
2786         ol_with_ldbm_module=static
2787
2788         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2789                 ol_with_ldbm_api=berkeley
2790         fi
2791
2792 else
2793                 if test $ol_with_ldbm_api = gdbm -a \
2794                 $ol_with_ldbm_type = btree ; then
2795                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2796         fi
2797         if test $ol_with_ldbm_api = mdbm -a \
2798                 $ol_with_ldbm_type = btree ; then
2799                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2800         fi
2801         if test $ol_with_ldbm_api = ndbm -a \
2802                 $ol_with_ldbm_type = btree ; then
2803                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2804         fi
2805
2806         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2807                 if test $ol_with_ldbm_api = auto ; then
2808                         ol_with_ldbm_api=berkeley
2809                 elif test $ol_with_ldbm_api != berkeley ; then
2810                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2811                 fi
2812
2813         elif test $ol_enable_bdb = auto ; then
2814                 if test $ol_with_ldbm_api != berkeley \
2815                         -o $ol_with_ldbm_api != auto ; then
2816                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2817                         ol_enable_bdb=no
2818                 fi
2819         fi
2820 fi
2821
2822 if test $ol_enable_slurpd = yes ; then
2823                 if test $ol_with_threads = no ; then
2824                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2825         fi
2826 fi
2827
2828 if test $ol_enable_lmpasswd = yes ; then
2829         if test $ol_with_tls = no ; then
2830                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2831         fi
2832 fi
2833
2834 if test $ol_enable_kbind = yes ; then
2835         if test $ol_with_kerberos = no ; then
2836                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2837         elif test $ol_with_kerberos = auto ; then
2838                 ol_with_kerberos=yes
2839         fi
2840
2841 elif test $ol_enable_kbind = no ; then
2842         if test $ol_with_kerberos = auto ; then
2843                 ol_with_kerberos=no
2844         elif test $ol_with_kerberos != no ; then
2845                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2846                 ol_with_kerberos=no
2847         fi
2848 fi
2849
2850 if test $ol_enable_spasswd = yes ; then
2851         if test $ol_with_cyrus_sasl = no ; then
2852                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2853         fi
2854         ol_with_cyrus_sasl=yes
2855 fi
2856
2857 echo "$ac_t""done" 1>&6
2858
2859 LDAP_LIBS=
2860 LDBM_LIBS=
2861 LTHREAD_LIBS=
2862 LUTIL_LIBS=
2863
2864 SLAPD_LIBS=
2865 SLURPD_LIBS=
2866
2867 BUILD_SLAPD=no
2868 BUILD_SLURPD=no
2869
2870 BUILD_THREAD=no
2871
2872 BUILD_SLAPI=no
2873 SLAPD_SLAPI_DEPEND=
2874
2875 BUILD_BDB=no
2876 BUILD_DNSSRV=no
2877 BUILD_HDB=no
2878 BUILD_LDAP=no
2879 BUILD_LDBM=no
2880 BUILD_META=no
2881 BUILD_MONITOR=no
2882 BUILD_NULL=no
2883 BUILD_PASSWD=no
2884 BUILD_PERL=no
2885 BUILD_SHELL=no
2886 BUILD_SQL=no
2887
2888 BUILD_BDB_DYNAMIC=static
2889 BUILD_DNSSRV_DYNAMIC=static
2890 BUILD_HDB_DYNAMIC=static
2891 BUILD_LDAP_DYNAMIC=static
2892 BUILD_LDBM_DYNAMIC=static
2893 BUILD_META_DYNAMIC=static
2894 BUILD_MONITOR_DYNAMIC=static
2895 BUILD_NULL_DYNAMIC=static
2896 BUILD_PASSWD_DYNAMIC=static
2897 BUILD_PERL_DYNAMIC=static
2898 BUILD_SHELL_DYNAMIC=static
2899 BUILD_SQL_DYNAMIC=static
2900
2901 BUILD_DYNGROUP=no
2902 BUILD_PROXYCACHE=no
2903 BUILD_RWM=no
2904
2905 SLAPD_DYNAMIC_OVERLAYS=
2906
2907 SLAPD_MODULES_LDFLAGS=
2908 SLAPD_MODULES_CPPFLAGS=
2909
2910 SLAPD_STATIC_BACKENDS=
2911 SLAPD_DYNAMIC_BACKENDS=
2912
2913 SLAPD_PERL_LDFLAGS=
2914 MOD_PERL_LDFLAGS=
2915 PERL_CPPFLAGS=
2916
2917 SLAPD_SQL_LDFLAGS=
2918 SLAPD_SQL_LIBS=
2919 SLAPD_SQL_INCLUDES=
2920
2921 KRB4_LIBS=
2922 KRB5_LIBS=
2923 SASL_LIBS=
2924 TLS_LIBS=
2925 MODULES_LIBS=
2926 SLAPI_LIBS=
2927 LIBSLAPI=
2928 LIBSLAPITOOLS=
2929 AUTH_LIBS=
2930
2931 SLAPD_SLP_LIBS=
2932
2933
2934 # Find a good install program.  We prefer a C program (faster),
2935 # so one script is as good as another.  But avoid the broken or
2936 # incompatible versions:
2937 # SysV /etc/install, /usr/sbin/install
2938 # SunOS /usr/etc/install
2939 # IRIX /sbin/install
2940 # AIX /bin/install
2941 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2942 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2943 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2944 # ./install, which can be erroneously created by make from ./install.sh.
2945 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2946 echo "configure:2947: checking for a BSD compatible install" >&5
2947 if test -z "$INSTALL"; then
2948 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2949   echo $ac_n "(cached) $ac_c" 1>&6
2950 else
2951     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2952   for ac_dir in $PATH; do
2953     # Account for people who put trailing slashes in PATH elements.
2954     case "$ac_dir/" in
2955     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2956     *)
2957       # OSF1 and SCO ODT 3.0 have their own names for install.
2958       # Don't use installbsd from OSF since it installs stuff as root
2959       # by default.
2960       for ac_prog in ginstall scoinst install; do
2961         if test -f $ac_dir/$ac_prog; then
2962           if test $ac_prog = install &&
2963             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2964             # AIX install.  It has an incompatible calling convention.
2965             :
2966           elif test $ac_prog = install &&
2967             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2968             # program-specific install script used by HP pwplus--don't use.
2969             :
2970           else
2971             ac_cv_path_install="$ac_dir/$ac_prog -c"
2972             break 2
2973           fi
2974         fi
2975       done
2976       ;;
2977     esac
2978   done
2979   IFS="$ac_save_IFS"
2980
2981 fi
2982   if test "${ac_cv_path_install+set}" = set; then
2983     INSTALL="$ac_cv_path_install"
2984   else
2985     # As a last resort, use the slow shell script.  We don't cache a
2986     # path for INSTALL within a source directory, because that will
2987     # break other packages using the cache if that directory is
2988     # removed, or if the path is relative.
2989     INSTALL="$ac_install_sh"
2990   fi
2991 fi
2992 echo "$ac_t""$INSTALL" 1>&6
2993
2994 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2995 # It thinks the first close brace ends the variable substitution.
2996 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2997
2998 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2999
3000 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3001
3002
3003 cat >> confdefs.h <<\EOF
3004 #define HAVE_MKVERSION 1
3005 EOF
3006
3007
3008
3009
3010 ol_aix_threads=no
3011 case "$target" in
3012 *-*-aix*)       if test -z "$CC" ; then
3013                 case "$ol_with_threads" in
3014                 auto | yes |  posix) ol_aix_threads=yes ;;
3015                 esac
3016         fi
3017 ;;
3018 esac
3019
3020 if test $ol_aix_threads = yes ; then
3021         if test -z "${CC}" ; then
3022                 for ac_prog in cc_r xlc_r cc
3023 do
3024 # Extract the first word of "$ac_prog", so it can be a program name with args.
3025 set dummy $ac_prog; ac_word=$2
3026 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3027 echo "configure:3028: checking for $ac_word" >&5
3028 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3029   echo $ac_n "(cached) $ac_c" 1>&6
3030 else
3031   if test -n "$CC"; then
3032   ac_cv_prog_CC="$CC" # Let the user override the test.
3033 else
3034   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3035   ac_dummy="$PATH"
3036   for ac_dir in $ac_dummy; do
3037     test -z "$ac_dir" && ac_dir=.
3038     if test -f $ac_dir/$ac_word; then
3039       ac_cv_prog_CC="$ac_prog"
3040       break
3041     fi
3042   done
3043   IFS="$ac_save_ifs"
3044 fi
3045 fi
3046 CC="$ac_cv_prog_CC"
3047 if test -n "$CC"; then
3048   echo "$ac_t""$CC" 1>&6
3049 else
3050   echo "$ac_t""no" 1>&6
3051 fi
3052
3053 test -n "$CC" && break
3054 done
3055
3056
3057                 if test "$CC" = cc ; then
3058                                                 if test $ol_with_threads != auto ; then
3059                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3060                         else
3061                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3062                         fi
3063                         ol_with_threads=no
3064                 fi
3065         fi
3066
3067         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3068                 ol_with_threads=posix
3069                 ol_cv_pthread_create=yes
3070         fi
3071 fi
3072
3073 if test -z "${CC}"; then
3074         for ac_prog in cc gcc
3075 do
3076 # Extract the first word of "$ac_prog", so it can be a program name with args.
3077 set dummy $ac_prog; ac_word=$2
3078 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3079 echo "configure:3080: checking for $ac_word" >&5
3080 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3081   echo $ac_n "(cached) $ac_c" 1>&6
3082 else
3083   if test -n "$CC"; then
3084   ac_cv_prog_CC="$CC" # Let the user override the test.
3085 else
3086   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3087   ac_dummy="$PATH"
3088   for ac_dir in $ac_dummy; do
3089     test -z "$ac_dir" && ac_dir=.
3090     if test -f $ac_dir/$ac_word; then
3091       ac_cv_prog_CC="$ac_prog"
3092       break
3093     fi
3094   done
3095   IFS="$ac_save_ifs"
3096 fi
3097 fi
3098 CC="$ac_cv_prog_CC"
3099 if test -n "$CC"; then
3100   echo "$ac_t""$CC" 1>&6
3101 else
3102   echo "$ac_t""no" 1>&6
3103 fi
3104
3105 test -n "$CC" && break
3106 done
3107 test -n "$CC" || CC="missing"
3108
3109
3110         if test "${CC}" = "missing" ; then
3111                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3112         fi
3113 fi
3114
3115 if test -z "${AR}"; then
3116         for ac_prog in ar gar
3117 do
3118 # Extract the first word of "$ac_prog", so it can be a program name with args.
3119 set dummy $ac_prog; ac_word=$2
3120 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3121 echo "configure:3122: checking for $ac_word" >&5
3122 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3123   echo $ac_n "(cached) $ac_c" 1>&6
3124 else
3125   if test -n "$AR"; then
3126   ac_cv_prog_AR="$AR" # Let the user override the test.
3127 else
3128   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3129   ac_dummy="$PATH"
3130   for ac_dir in $ac_dummy; do
3131     test -z "$ac_dir" && ac_dir=.
3132     if test -f $ac_dir/$ac_word; then
3133       ac_cv_prog_AR="$ac_prog"
3134       break
3135     fi
3136   done
3137   IFS="$ac_save_ifs"
3138 fi
3139 fi
3140 AR="$ac_cv_prog_AR"
3141 if test -n "$AR"; then
3142   echo "$ac_t""$AR" 1>&6
3143 else
3144   echo "$ac_t""no" 1>&6
3145 fi
3146
3147 test -n "$AR" && break
3148 done
3149 test -n "$AR" || AR="missing"
3150
3151
3152         if test "${AR}" = "missing" ; then
3153                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3154         fi
3155 fi
3156
3157
3158
3159 # Find the correct PATH separator.  Usually this is `:', but
3160 # DJGPP uses `;' like DOS.
3161 if test "X${PATH_SEPARATOR+set}" != Xset; then
3162   UNAME=${UNAME-`uname 2>/dev/null`}
3163   case X$UNAME in
3164     *-DOS) lt_cv_sys_path_separator=';' ;;
3165     *)     lt_cv_sys_path_separator=':' ;;
3166   esac
3167   PATH_SEPARATOR=$lt_cv_sys_path_separator
3168 fi
3169
3170 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3171 echo "configure:3172: checking for Cygwin environment" >&5
3172 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3173   echo $ac_n "(cached) $ac_c" 1>&6
3174 else
3175   cat > conftest.$ac_ext <<EOF
3176 #line 3177 "configure"
3177 #include "confdefs.h"
3178
3179 int main() {
3180
3181 #ifndef __CYGWIN__
3182 #define __CYGWIN__ __CYGWIN32__
3183 #endif
3184 return __CYGWIN__;
3185 ; return 0; }
3186 EOF
3187 if { (eval echo configure:3188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3188   rm -rf conftest*
3189   ac_cv_cygwin=yes
3190 else
3191   echo "configure: failed program was:" >&5
3192   cat conftest.$ac_ext >&5
3193   rm -rf conftest*
3194   ac_cv_cygwin=no
3195 fi
3196 rm -f conftest*
3197 fi
3198
3199 echo "$ac_t""$ac_cv_cygwin" 1>&6
3200 CYGWIN=
3201 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3202 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3203 echo "configure:3204: checking for mingw32 environment" >&5
3204 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3205   echo $ac_n "(cached) $ac_c" 1>&6
3206 else
3207   cat > conftest.$ac_ext <<EOF
3208 #line 3209 "configure"
3209 #include "confdefs.h"
3210
3211 int main() {
3212 return __MINGW32__;
3213 ; return 0; }
3214 EOF
3215 if { (eval echo configure:3216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3216   rm -rf conftest*
3217   ac_cv_mingw32=yes
3218 else
3219   echo "configure: failed program was:" >&5
3220   cat conftest.$ac_ext >&5
3221   rm -rf conftest*
3222   ac_cv_mingw32=no
3223 fi
3224 rm -f conftest*
3225 fi
3226
3227 echo "$ac_t""$ac_cv_mingw32" 1>&6
3228 MINGW32=
3229 test "$ac_cv_mingw32" = yes && MINGW32=yes
3230 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3231 echo "configure:3232: checking for EMX OS/2 environment" >&5
3232 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3233   echo $ac_n "(cached) $ac_c" 1>&6
3234 else
3235   cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238
3239 int main() {
3240 return __EMX__;
3241 ; return 0; }
3242 EOF
3243 if { (eval echo configure:3244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3244   rm -rf conftest*
3245   ac_cv_emxos2=yes
3246 else
3247   echo "configure: failed program was:" >&5
3248   cat conftest.$ac_ext >&5
3249   rm -rf conftest*
3250   ac_cv_emxos2=no
3251 fi
3252 rm -f conftest*
3253 fi
3254
3255 echo "$ac_t""$ac_cv_emxos2" 1>&6
3256 EMXOS2=
3257 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3258 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3259 echo "configure:3260: checking how to run the C preprocessor" >&5
3260 # On Suns, sometimes $CPP names a directory.
3261 if test -n "$CPP" && test -d "$CPP"; then
3262   CPP=
3263 fi
3264 if test -z "$CPP"; then
3265 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3266   echo $ac_n "(cached) $ac_c" 1>&6
3267 else
3268     # This must be in double quotes, not single quotes, because CPP may get
3269   # substituted into the Makefile and "${CC-cc}" will confuse make.
3270   CPP="${CC-cc} -E"
3271   # On the NeXT, cc -E runs the code through the compiler's parser,
3272   # not just through cpp.
3273   cat > conftest.$ac_ext <<EOF
3274 #line 3275 "configure"
3275 #include "confdefs.h"
3276 #include <assert.h>
3277 Syntax Error
3278 EOF
3279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3280 { (eval echo configure:3281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3282 if test -z "$ac_err"; then
3283   :
3284 else
3285   echo "$ac_err" >&5
3286   echo "configure: failed program was:" >&5
3287   cat conftest.$ac_ext >&5
3288   rm -rf conftest*
3289   CPP="${CC-cc} -E -traditional-cpp"
3290   cat > conftest.$ac_ext <<EOF
3291 #line 3292 "configure"
3292 #include "confdefs.h"
3293 #include <assert.h>
3294 Syntax Error
3295 EOF
3296 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3297 { (eval echo configure:3298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3298 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3299 if test -z "$ac_err"; then
3300   :
3301 else
3302   echo "$ac_err" >&5
3303   echo "configure: failed program was:" >&5
3304   cat conftest.$ac_ext >&5
3305   rm -rf conftest*
3306   CPP="${CC-cc} -nologo -E"
3307   cat > conftest.$ac_ext <<EOF
3308 #line 3309 "configure"
3309 #include "confdefs.h"
3310 #include <assert.h>
3311 Syntax Error
3312 EOF
3313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3314 { (eval echo configure:3315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3316 if test -z "$ac_err"; then
3317   :
3318 else
3319   echo "$ac_err" >&5
3320   echo "configure: failed program was:" >&5
3321   cat conftest.$ac_ext >&5
3322   rm -rf conftest*
3323   CPP=/lib/cpp
3324 fi
3325 rm -f conftest*
3326 fi
3327 rm -f conftest*
3328 fi
3329 rm -f conftest*
3330   ac_cv_prog_CPP="$CPP"
3331 fi
3332   CPP="$ac_cv_prog_CPP"
3333 else
3334   ac_cv_prog_CPP="$CPP"
3335 fi
3336 echo "$ac_t""$CPP" 1>&6
3337
3338 # Check whether --enable-fast-install or --disable-fast-install was given.
3339 if test "${enable_fast_install+set}" = set; then
3340   enableval="$enable_fast_install"
3341   p=${PACKAGE-default}
3342 case $enableval in
3343 yes) enable_fast_install=yes ;;
3344 no) enable_fast_install=no ;;
3345 *)
3346   enable_fast_install=no
3347   # Look at the argument we got.  We use all the common list separators.
3348   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3349   for pkg in $enableval; do
3350     if test "X$pkg" = "X$p"; then
3351       enable_fast_install=yes
3352     fi
3353   done
3354   IFS="$ac_save_ifs"
3355   ;;
3356 esac
3357 else
3358   enable_fast_install=yes
3359 fi
3360
3361 # Extract the first word of "gcc", so it can be a program name with args.
3362 set dummy gcc; ac_word=$2
3363 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3364 echo "configure:3365: checking for $ac_word" >&5
3365 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3366   echo $ac_n "(cached) $ac_c" 1>&6
3367 else
3368   if test -n "$CC"; then
3369   ac_cv_prog_CC="$CC" # Let the user override the test.
3370 else
3371   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3372   ac_dummy="$PATH"
3373   for ac_dir in $ac_dummy; do
3374     test -z "$ac_dir" && ac_dir=.
3375     if test -f $ac_dir/$ac_word; then
3376       ac_cv_prog_CC="gcc"
3377       break
3378     fi
3379   done
3380   IFS="$ac_save_ifs"
3381 fi
3382 fi
3383 CC="$ac_cv_prog_CC"
3384 if test -n "$CC"; then
3385   echo "$ac_t""$CC" 1>&6
3386 else
3387   echo "$ac_t""no" 1>&6
3388 fi
3389
3390 if test -z "$CC"; then
3391   # Extract the first word of "cc", so it can be a program name with args.
3392 set dummy cc; ac_word=$2
3393 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3394 echo "configure:3395: checking for $ac_word" >&5
3395 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3396   echo $ac_n "(cached) $ac_c" 1>&6
3397 else
3398   if test -n "$CC"; then
3399   ac_cv_prog_CC="$CC" # Let the user override the test.
3400 else
3401   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3402   ac_prog_rejected=no
3403   ac_dummy="$PATH"
3404   for ac_dir in $ac_dummy; do
3405     test -z "$ac_dir" && ac_dir=.
3406     if test -f $ac_dir/$ac_word; then
3407       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3408         ac_prog_rejected=yes
3409         continue
3410       fi
3411       ac_cv_prog_CC="cc"
3412       break
3413     fi
3414   done
3415   IFS="$ac_save_ifs"
3416 if test $ac_prog_rejected = yes; then
3417   # We found a bogon in the path, so make sure we never use it.
3418   set dummy $ac_cv_prog_CC
3419   shift
3420   if test $# -gt 0; then
3421     # We chose a different compiler from the bogus one.
3422     # However, it has the same basename, so the bogon will be chosen
3423     # first if we set CC to just the basename; use the full file name.
3424     shift
3425     set dummy "$ac_dir/$ac_word" "$@"
3426     shift
3427     ac_cv_prog_CC="$@"
3428   fi
3429 fi
3430 fi
3431 fi
3432 CC="$ac_cv_prog_CC"
3433 if test -n "$CC"; then
3434   echo "$ac_t""$CC" 1>&6
3435 else
3436   echo "$ac_t""no" 1>&6
3437 fi
3438
3439   if test -z "$CC"; then
3440     case "`uname -s`" in
3441     *win32* | *WIN32* | *CYGWIN*)
3442       # Extract the first word of "cl", so it can be a program name with args.
3443 set dummy cl; ac_word=$2
3444 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3445 echo "configure:3446: checking for $ac_word" >&5
3446 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3447   echo $ac_n "(cached) $ac_c" 1>&6
3448 else
3449   if test -n "$CC"; then
3450   ac_cv_prog_CC="$CC" # Let the user override the test.
3451 else
3452   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3453   ac_dummy="$PATH"
3454   for ac_dir in $ac_dummy; do
3455     test -z "$ac_dir" && ac_dir=.
3456     if test -f $ac_dir/$ac_word; then
3457       ac_cv_prog_CC="cl"
3458       break
3459     fi
3460   done
3461   IFS="$ac_save_ifs"
3462 fi
3463 fi
3464 CC="$ac_cv_prog_CC"
3465 if test -n "$CC"; then
3466   echo "$ac_t""$CC" 1>&6
3467 else
3468   echo "$ac_t""no" 1>&6
3469 fi
3470  ;;
3471     esac
3472   fi
3473   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3474 fi
3475
3476 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3477 echo "configure:3478: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3478
3479 ac_ext=c
3480 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3481 ac_cpp='$CPP $CPPFLAGS'
3482 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3483 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3484 cross_compiling=$ac_cv_prog_cc_cross
3485
3486 cat > conftest.$ac_ext << EOF
3487
3488 #line 3489 "configure"
3489 #include "confdefs.h"
3490
3491 main(){return(0);}
3492 EOF
3493 if { (eval echo configure:3494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3494   ac_cv_prog_cc_works=yes
3495   # If we can't run a trivial program, we are probably using a cross compiler.
3496   if (./conftest; exit) 2>/dev/null; then
3497     ac_cv_prog_cc_cross=no
3498   else
3499     ac_cv_prog_cc_cross=yes
3500   fi
3501 else
3502   echo "configure: failed program was:" >&5
3503   cat conftest.$ac_ext >&5
3504   ac_cv_prog_cc_works=no
3505 fi
3506 rm -fr conftest*
3507 ac_ext=c
3508 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3509 ac_cpp='$CPP $CPPFLAGS'
3510 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3511 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3512 cross_compiling=$ac_cv_prog_cc_cross
3513
3514 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3515 if test $ac_cv_prog_cc_works = no; then
3516   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3517 fi
3518 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3519 echo "configure:3520: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3520 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3521 cross_compiling=$ac_cv_prog_cc_cross
3522
3523 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3524 echo "configure:3525: checking whether we are using GNU C" >&5
3525 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3526   echo $ac_n "(cached) $ac_c" 1>&6
3527 else
3528   cat > conftest.c <<EOF
3529 #ifdef __GNUC__
3530   yes;
3531 #endif
3532 EOF
3533 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3534   ac_cv_prog_gcc=yes
3535 else
3536   ac_cv_prog_gcc=no
3537 fi
3538 fi
3539
3540 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3541
3542 if test $ac_cv_prog_gcc = yes; then
3543   GCC=yes
3544 else
3545   GCC=
3546 fi
3547
3548 ac_test_CFLAGS="${CFLAGS+set}"
3549 ac_save_CFLAGS="$CFLAGS"
3550 CFLAGS=
3551 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3552 echo "configure:3553: checking whether ${CC-cc} accepts -g" >&5
3553 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3554   echo $ac_n "(cached) $ac_c" 1>&6
3555 else
3556   echo 'void f(){}' > conftest.c
3557 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3558   ac_cv_prog_cc_g=yes
3559 else
3560   ac_cv_prog_cc_g=no
3561 fi
3562 rm -f conftest*
3563
3564 fi
3565
3566 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3567 if test "$ac_test_CFLAGS" = set; then
3568   CFLAGS="$ac_save_CFLAGS"
3569 elif test $ac_cv_prog_cc_g = yes; then
3570   if test "$GCC" = yes; then
3571     CFLAGS="-g -O2"
3572   else
3573     CFLAGS="-g"
3574   fi
3575 else
3576   if test "$GCC" = yes; then
3577     CFLAGS="-O2"
3578   else
3579     CFLAGS=
3580   fi
3581 fi
3582
3583 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3584 if test "${with_gnu_ld+set}" = set; then
3585   withval="$with_gnu_ld"
3586   test "$withval" = no || with_gnu_ld=yes
3587 else
3588   with_gnu_ld=no
3589 fi
3590
3591 ac_prog=ld
3592 if test "$GCC" = yes; then
3593   # Check if gcc -print-prog-name=ld gives a path.
3594   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3595 echo "configure:3596: checking for ld used by GCC" >&5
3596   case $host in
3597   *-*-mingw*)
3598     # gcc leaves a trailing carriage return which upsets mingw
3599     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3600   *)
3601     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3602   esac
3603   case $ac_prog in
3604     # Accept absolute paths.
3605     [\\/]* | [A-Za-z]:[\\/]*)
3606       re_direlt='/[^/][^/]*/\.\./'
3607       # Canonicalize the path of ld
3608       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3609       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3610         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3611       done
3612       test -z "$LD" && LD="$ac_prog"
3613       ;;
3614   "")
3615     # If it fails, then pretend we aren't using GCC.
3616     ac_prog=ld
3617     ;;
3618   *)
3619     # If it is relative, then search for the first ld in PATH.
3620     with_gnu_ld=unknown
3621     ;;
3622   esac
3623 elif test "$with_gnu_ld" = yes; then
3624   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3625 echo "configure:3626: checking for GNU ld" >&5
3626 else
3627   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3628 echo "configure:3629: checking for non-GNU ld" >&5
3629 fi
3630 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3631   echo $ac_n "(cached) $ac_c" 1>&6
3632 else
3633   if test -z "$LD"; then
3634   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3635   for ac_dir in $PATH; do
3636     test -z "$ac_dir" && ac_dir=.
3637     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3638       lt_cv_path_LD="$ac_dir/$ac_prog"
3639       # Check to see if the program is GNU ld.  I'd rather use --version,
3640       # but apparently some GNU ld's only accept -v.
3641       # Break only if it was the GNU/non-GNU ld that we prefer.
3642       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3643         test "$with_gnu_ld" != no && break
3644       else
3645         test "$with_gnu_ld" != yes && break
3646       fi
3647     fi
3648   done
3649   IFS="$ac_save_ifs"
3650 else
3651   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3652 fi
3653 fi
3654
3655 LD="$lt_cv_path_LD"
3656 if test -n "$LD"; then
3657   echo "$ac_t""$LD" 1>&6
3658 else
3659   echo "$ac_t""no" 1>&6
3660 fi
3661 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3662 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3663 echo "configure:3664: checking if the linker ($LD) is GNU ld" >&5
3664 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3665   echo $ac_n "(cached) $ac_c" 1>&6
3666 else
3667   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3668 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3669   lt_cv_prog_gnu_ld=yes
3670 else
3671   lt_cv_prog_gnu_ld=no
3672 fi
3673 fi
3674
3675 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3676 with_gnu_ld=$lt_cv_prog_gnu_ld
3677
3678
3679 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3680 echo "configure:3681: checking for $LD option to reload object files" >&5
3681 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3682   echo $ac_n "(cached) $ac_c" 1>&6
3683 else
3684   lt_cv_ld_reload_flag='-r'
3685 fi
3686
3687 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3688 reload_flag=$lt_cv_ld_reload_flag
3689 test -n "$reload_flag" && reload_flag=" $reload_flag"
3690
3691 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3692 echo "configure:3693: checking for BSD-compatible nm" >&5
3693 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3694   echo $ac_n "(cached) $ac_c" 1>&6
3695 else
3696   if test -n "$NM"; then
3697   # Let the user override the test.
3698   lt_cv_path_NM="$NM"
3699 else
3700   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3701   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3702     test -z "$ac_dir" && ac_dir=.
3703     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3704     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3705       # Check to see if the nm accepts a BSD-compat flag.
3706       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3707       #   nm: unknown option "B" ignored
3708       # Tru64's nm complains that /dev/null is an invalid object file
3709       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3710         lt_cv_path_NM="$tmp_nm -B"
3711         break
3712       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3713         lt_cv_path_NM="$tmp_nm -p"
3714         break
3715       else
3716         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3717         continue # so that we can try to find one that supports BSD flags
3718       fi
3719     fi
3720   done
3721   IFS="$ac_save_ifs"
3722   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3723 fi
3724 fi
3725
3726 NM="$lt_cv_path_NM"
3727 echo "$ac_t""$NM" 1>&6
3728
3729 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3730 echo "configure:3731: checking for a sed that does not truncate output" >&5
3731 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3732   echo $ac_n "(cached) $ac_c" 1>&6
3733 else
3734   # Loop through the user's path and test for sed and gsed.
3735 # Then use that list of sed's as ones to test for truncation.
3736 as_executable_p="test -f"
3737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3738 for as_dir in $PATH
3739 do
3740   IFS=$as_save_IFS
3741   test -z "$as_dir" && as_dir=.
3742   for ac_prog in sed gsed; do
3743     for ac_exec_ext in '' $ac_executable_extensions; do
3744       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3745         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3746       fi
3747     done
3748   done
3749 done
3750
3751   # Create a temporary directory, and hook for its removal unless debugging.
3752 $debug ||
3753 {
3754   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3755   trap '{ (exit 1); exit 1; }' 1 2 13 15
3756 }
3757
3758 # Create a (secure) tmp directory for tmp files.
3759 : ${TMPDIR=/tmp}
3760 {
3761   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3762   test -n "$tmp" && test -d "$tmp"
3763 }  ||
3764 {
3765   tmp=$TMPDIR/sed$$-$RANDOM
3766   (umask 077 && mkdir $tmp)
3767 } ||
3768 {
3769    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3770    { (exit 1); exit 1; }
3771 }
3772   _max=0
3773   _count=0
3774   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3775   # along with /bin/sed that truncates output.
3776   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3777     test ! -f ${_sed} && break
3778     cat /dev/null > "$tmp/sed.in"
3779     _count=0
3780     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3781     # Check for GNU sed and select it if it is found.
3782     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3783       lt_cv_path_SED=${_sed}
3784       break
3785     fi
3786     while true; do
3787       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3788       mv "$tmp/sed.tmp" "$tmp/sed.in"
3789       cp "$tmp/sed.in" "$tmp/sed.nl"
3790       echo >>"$tmp/sed.nl"
3791       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3792       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3793       # 40000 chars as input seems more than enough
3794       test $_count -gt 10 && break
3795       _count=`expr $_count + 1`
3796       if test $_count -gt $_max; then
3797         _max=$_count
3798         lt_cv_path_SED=$_sed
3799       fi
3800     done
3801   done
3802   rm -rf "$tmp"
3803
3804 fi
3805
3806 if test "X$SED" != "X"; then
3807   lt_cv_path_SED=$SED
3808 else
3809   SED=$lt_cv_path_SED
3810 fi
3811 echo "$ac_t""$SED" 1>&6
3812
3813 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3814 echo "configure:3815: checking whether ln -s works" >&5
3815 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3816   echo $ac_n "(cached) $ac_c" 1>&6
3817 else
3818   rm -f conftestdata
3819 if ln -s X conftestdata 2>/dev/null
3820 then
3821   rm -f conftestdata
3822   ac_cv_prog_LN_S="ln -s"
3823 else
3824   ac_cv_prog_LN_S=ln
3825 fi
3826 fi
3827 LN_S="$ac_cv_prog_LN_S"
3828 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3829   echo "$ac_t""yes" 1>&6
3830 else
3831   echo "$ac_t""no" 1>&6
3832 fi
3833
3834 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3835 echo "configure:3836: checking how to recognise dependent libraries" >&5
3836 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3837   echo $ac_n "(cached) $ac_c" 1>&6
3838 else
3839   lt_cv_file_magic_cmd='$MAGIC_CMD'
3840 lt_cv_file_magic_test_file=
3841 lt_cv_deplibs_check_method='unknown'
3842 # Need to set the preceding variable on all platforms that support
3843 # interlibrary dependencies.
3844 # 'none' -- dependencies not supported.
3845 # `unknown' -- same as none, but documents that we really don't know.
3846 # 'pass_all' -- all dependencies passed with no checks.
3847 # 'test_compile' -- check by making test program.
3848 # 'file_magic [[regex]]' -- check by looking for files in library path
3849 # which responds to the $file_magic_cmd with a given egrep regex.
3850 # If you have `file' or equivalent on your system and you're not sure
3851 # whether `pass_all' will *always* work, you probably want this one.
3852
3853 case $host_os in
3854 aix4* | aix5*)
3855   lt_cv_deplibs_check_method=pass_all
3856   ;;
3857
3858 beos*)
3859   lt_cv_deplibs_check_method=pass_all
3860   ;;
3861
3862 bsdi4*)
3863   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3864   lt_cv_file_magic_cmd='/usr/bin/file -L'
3865   lt_cv_file_magic_test_file=/shlib/libc.so
3866   ;;
3867
3868 cygwin* | mingw* | pw32*)
3869   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3870   lt_cv_file_magic_cmd='$OBJDUMP -f'
3871   ;;
3872
3873 darwin* | rhapsody*)
3874   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3875   lt_cv_file_magic_cmd='/usr/bin/file -L'
3876   case "$host_os" in
3877   rhapsody* | darwin1.[012])
3878     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3879     ;;
3880   *) # Darwin 1.3 on
3881     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3882     ;;
3883   esac
3884   ;;
3885
3886 freebsd*)
3887   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3888     case $host_cpu in
3889     i*86 )
3890       # Not sure whether the presence of OpenBSD here was a mistake.
3891       # Let's accept both of them until this is cleared up.
3892       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3893       lt_cv_file_magic_cmd=/usr/bin/file
3894       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3895       ;;
3896     esac
3897   else
3898     lt_cv_deplibs_check_method=pass_all
3899   fi
3900   ;;
3901
3902 gnu*)
3903   lt_cv_deplibs_check_method=pass_all
3904   ;;
3905
3906 hpux10.20*|hpux11*)
3907   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3908   lt_cv_file_magic_cmd=/usr/bin/file
3909   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3910   ;;
3911
3912 irix5* | irix6* | nonstopux*)
3913   case $host_os in
3914   irix5* | nonstopux*)
3915     # this will be overridden with pass_all, but let us keep it just in case
3916     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3917     ;;
3918   *)
3919     case $LD in
3920     *-32|*"-32 ") libmagic=32-bit;;
3921     *-n32|*"-n32 ") libmagic=N32;;
3922     *-64|*"-64 ") libmagic=64-bit;;
3923     *) libmagic=never-match;;
3924     esac
3925     # this will be overridden with pass_all, but let us keep it just in case
3926     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3927     ;;
3928   esac
3929   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3930   lt_cv_deplibs_check_method=pass_all
3931   ;;
3932
3933 # This must be Linux ELF.
3934 linux-gnu*)
3935   case $host_cpu in
3936   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3937     lt_cv_deplibs_check_method=pass_all ;;
3938   *)
3939     # glibc up to 2.1.1 does not perform some relocations on ARM
3940     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3941   esac
3942   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3943   ;;
3944
3945 netbsd*)
3946   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3947     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3948   else
3949     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3950   fi
3951   ;;
3952
3953 newos6*)
3954   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3955   lt_cv_file_magic_cmd=/usr/bin/file
3956   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3957   ;;
3958
3959 openbsd*)
3960   lt_cv_file_magic_cmd=/usr/bin/file
3961   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3962   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3963     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3964   else
3965     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3966   fi
3967   ;;
3968
3969 openedition*)
3970   lt_cv_deplibs_check_method=pass_all
3971   ;;
3972
3973 osf3* | osf4* | osf5*)
3974   # this will be overridden with pass_all, but let us keep it just in case
3975   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3976   lt_cv_file_magic_test_file=/shlib/libc.so
3977   lt_cv_deplibs_check_method=pass_all
3978   ;;
3979
3980 sco3.2v5*)
3981   lt_cv_deplibs_check_method=pass_all
3982   ;;
3983
3984 solaris*)
3985   lt_cv_deplibs_check_method=pass_all
3986   lt_cv_file_magic_test_file=/lib/libc.so
3987   ;;
3988
3989 sysv5uw[78]* | sysv4*uw2*)
3990   lt_cv_deplibs_check_method=pass_all
3991   ;;
3992
3993 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3994   case $host_vendor in
3995   motorola)
3996     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]'
3997     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3998     ;;
3999   ncr)
4000     lt_cv_deplibs_check_method=pass_all
4001     ;;
4002   sequent)
4003     lt_cv_file_magic_cmd='/bin/file'
4004     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4005     ;;
4006   sni)
4007     lt_cv_file_magic_cmd='/bin/file'
4008     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4009     lt_cv_file_magic_test_file=/lib/libc.so
4010     ;;
4011   siemens)
4012     lt_cv_deplibs_check_method=pass_all
4013     ;;
4014   esac
4015   ;;
4016 esac
4017
4018 fi
4019
4020 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
4021 file_magic_cmd=$lt_cv_file_magic_cmd
4022 deplibs_check_method=$lt_cv_deplibs_check_method
4023
4024 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4025 echo "configure:4026: checking for object suffix" >&5
4026 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4027   echo $ac_n "(cached) $ac_c" 1>&6
4028 else
4029   rm -f conftest*
4030 echo 'int i = 1;' > conftest.$ac_ext
4031 if { (eval echo configure:4032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4032   for ac_file in conftest.*; do
4033     case $ac_file in
4034     *.c) ;;
4035     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4036     esac
4037   done
4038 else
4039   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4040 fi
4041 rm -f conftest*
4042 fi
4043
4044 echo "$ac_t""$ac_cv_objext" 1>&6
4045 OBJEXT=$ac_cv_objext
4046 ac_objext=$ac_cv_objext
4047
4048
4049
4050
4051 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4052 echo "configure:4053: checking for executable suffix" >&5
4053 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4054   echo $ac_n "(cached) $ac_c" 1>&6
4055 else
4056   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4057   ac_cv_exeext=.exe
4058 else
4059   rm -f conftest*
4060   echo 'int main () { return 0; }' > conftest.$ac_ext
4061   ac_cv_exeext=
4062   if { (eval echo configure:4063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4063     for file in conftest.*; do
4064       case $file in
4065       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4066       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4067       esac
4068     done
4069   else
4070     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4071   fi
4072   rm -f conftest*
4073   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4074 fi
4075 fi
4076
4077 EXEEXT=""
4078 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4079 echo "$ac_t""${ac_cv_exeext}" 1>&6
4080 ac_exeext=$EXEEXT
4081
4082 if test $host != $build; then
4083   ac_tool_prefix=${host_alias}-
4084 else
4085   ac_tool_prefix=
4086 fi
4087
4088
4089
4090
4091 # Check for command to grab the raw symbol name followed by C symbol from nm.
4092 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4093 echo "configure:4094: checking command to parse $NM output" >&5
4094 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4095   echo $ac_n "(cached) $ac_c" 1>&6
4096 else
4097   
4098 # These are sane defaults that work on at least a few old systems.
4099 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4100
4101 # Character class describing NM global symbol codes.
4102 symcode='[BCDEGRST]'
4103
4104 # Regexp to match symbols that can be accessed directly from C.
4105 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4106
4107 # Transform the above into a raw symbol and a C symbol.
4108 symxfrm='\1 \2\3 \3'
4109
4110 # Transform an extracted symbol line into a proper C declaration
4111 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4112
4113 # Transform an extracted symbol line into symbol name and symbol address
4114 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'"
4115
4116 # Define system-specific variables.
4117 case $host_os in
4118 aix*)
4119   symcode='[BCDT]'
4120   ;;
4121 cygwin* | mingw* | pw32*)
4122   symcode='[ABCDGISTW]'
4123   ;;
4124 hpux*) # Its linker distinguishes data from code symbols
4125   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4126   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'"
4127   ;;
4128 irix* | nonstopux*)
4129   symcode='[BCDEGRST]'
4130   ;;
4131 osf*)
4132   symcode='[BCDEGQRST]'
4133   ;;
4134 solaris* | sysv5*)
4135   symcode='[BDT]'
4136   ;;
4137 sysv4)
4138   symcode='[DFNSTU]'
4139   ;;
4140 esac
4141
4142 # Handle CRLF in mingw tool chain
4143 opt_cr=
4144 case $host_os in
4145 mingw*)
4146   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4147   ;;
4148 esac
4149
4150 # If we're using GNU nm, then use its standard symbol codes.
4151 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4152   symcode='[ABCDGISTW]'
4153 fi
4154
4155 # Try without a prefix undercore, then with it.
4156 for ac_symprfx in "" "_"; do
4157
4158   # Write the raw and C identifiers.
4159 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4160
4161   # Check to see that the pipe works correctly.
4162   pipe_works=no
4163   rm -f conftest*
4164   cat > conftest.$ac_ext <<EOF
4165 #ifdef __cplusplus
4166 extern "C" {
4167 #endif
4168 char nm_test_var;
4169 void nm_test_func(){}
4170 #ifdef __cplusplus
4171 }
4172 #endif
4173 int main(){nm_test_var='a';nm_test_func();return(0);}
4174 EOF
4175
4176   if { (eval echo configure:4177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4177     # Now try to grab the symbols.
4178     nlist=conftest.nm
4179     if { (eval echo configure:4180: \"$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
4180       # Try sorting and uniquifying the output.
4181       if sort "$nlist" | uniq > "$nlist"T; then
4182         mv -f "$nlist"T "$nlist"
4183       else
4184         rm -f "$nlist"T
4185       fi
4186
4187       # Make sure that we snagged all the symbols we need.
4188       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4189         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4190           cat <<EOF > conftest.$ac_ext
4191 #ifdef __cplusplus
4192 extern "C" {
4193 #endif
4194
4195 EOF
4196           # Now generate the symbol file.
4197           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4198
4199           cat <<EOF >> conftest.$ac_ext
4200 #if defined (__STDC__) && __STDC__
4201 # define lt_ptr void *
4202 #else
4203 # define lt_ptr char *
4204 # define const
4205 #endif
4206
4207 /* The mapping between symbol names and symbols. */
4208 const struct {
4209   const char *name;
4210   lt_ptr address;
4211 }
4212 lt_preloaded_symbols[] =
4213 {
4214 EOF
4215           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4216           cat <<\EOF >> conftest.$ac_ext
4217   {0, (lt_ptr) 0}
4218 };
4219
4220 #ifdef __cplusplus
4221 }
4222 #endif
4223 EOF
4224           # Now try linking the two files.
4225           mv conftest.$ac_objext conftstm.$ac_objext
4226           save_LIBS="$LIBS"
4227           save_CFLAGS="$CFLAGS"
4228           LIBS="conftstm.$ac_objext"
4229           CFLAGS="$CFLAGS$no_builtin_flag"
4230           if { (eval echo configure:4231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4231             pipe_works=yes
4232           fi
4233           LIBS="$save_LIBS"
4234           CFLAGS="$save_CFLAGS"
4235         else
4236           echo "cannot find nm_test_func in $nlist" >&5
4237         fi
4238       else
4239         echo "cannot find nm_test_var in $nlist" >&5
4240       fi
4241     else
4242       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4243     fi
4244   else
4245     echo "$progname: failed program was:" >&5
4246     cat conftest.$ac_ext >&5
4247   fi
4248   rm -f conftest* conftst*
4249
4250   # Do not use the global_symbol_pipe unless it works.
4251   if test "$pipe_works" = yes; then
4252     break
4253   else
4254     lt_cv_sys_global_symbol_pipe=
4255   fi
4256 done
4257
4258 fi
4259
4260 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4261 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4262   global_symbol_to_cdecl=
4263   global_symbol_to_c_name_address=
4264 else
4265   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4266   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4267 fi
4268 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4269 then
4270   echo "$ac_t""failed" 1>&6
4271 else
4272   echo "$ac_t""ok" 1>&6
4273 fi
4274
4275 for ac_hdr in dlfcn.h
4276 do
4277 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4278 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4279 echo "configure:4280: checking for $ac_hdr" >&5
4280 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4281   echo $ac_n "(cached) $ac_c" 1>&6
4282 else
4283   cat > conftest.$ac_ext <<EOF
4284 #line 4285 "configure"
4285 #include "confdefs.h"
4286 #include <$ac_hdr>
4287 EOF
4288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4289 { (eval echo configure:4290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4291 if test -z "$ac_err"; then
4292   rm -rf conftest*
4293   eval "ac_cv_header_$ac_safe=yes"
4294 else
4295   echo "$ac_err" >&5
4296   echo "configure: failed program was:" >&5
4297   cat conftest.$ac_ext >&5
4298   rm -rf conftest*
4299   eval "ac_cv_header_$ac_safe=no"
4300 fi
4301 rm -f conftest*
4302 fi
4303 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4304   echo "$ac_t""yes" 1>&6
4305     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4306   cat >> confdefs.h <<EOF
4307 #define $ac_tr_hdr 1
4308 EOF
4309  
4310 else
4311   echo "$ac_t""no" 1>&6
4312 fi
4313 done
4314
4315
4316
4317
4318
4319
4320 # Only perform the check for file, if the check method requires it
4321 case $deplibs_check_method in
4322 file_magic*)
4323   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4324     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4325 echo "configure:4326: checking for ${ac_tool_prefix}file" >&5
4326 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4327   echo $ac_n "(cached) $ac_c" 1>&6
4328 else
4329   case $MAGIC_CMD in
4330   /*)
4331   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4332   ;;
4333   ?:/*)
4334   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4335   ;;
4336   *)
4337   ac_save_MAGIC_CMD="$MAGIC_CMD"
4338   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4339   ac_dummy="/usr/bin:$PATH"
4340   for ac_dir in $ac_dummy; do
4341     test -z "$ac_dir" && ac_dir=.
4342     if test -f $ac_dir/${ac_tool_prefix}file; then
4343       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4344       if test -n "$file_magic_test_file"; then
4345         case $deplibs_check_method in
4346         "file_magic "*)
4347           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4348           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4349           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4350             egrep "$file_magic_regex" > /dev/null; then
4351             :
4352           else
4353             cat <<EOF 1>&2
4354
4355 *** Warning: the command libtool uses to detect shared libraries,
4356 *** $file_magic_cmd, produces output that libtool cannot recognize.
4357 *** The result is that libtool may fail to recognize shared libraries
4358 *** as such.  This will affect the creation of libtool libraries that
4359 *** depend on shared libraries, but programs linked with such libtool
4360 *** libraries will work regardless of this problem.  Nevertheless, you
4361 *** may want to report the problem to your system manager and/or to
4362 *** bug-libtool@gnu.org
4363
4364 EOF
4365           fi ;;
4366         esac
4367       fi
4368       break
4369     fi
4370   done
4371   IFS="$ac_save_ifs"
4372   MAGIC_CMD="$ac_save_MAGIC_CMD"
4373   ;;
4374 esac
4375 fi
4376
4377 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4378 if test -n "$MAGIC_CMD"; then
4379   echo "$ac_t""$MAGIC_CMD" 1>&6
4380 else
4381   echo "$ac_t""no" 1>&6
4382 fi
4383
4384 if test -z "$lt_cv_path_MAGIC_CMD"; then
4385   if test -n "$ac_tool_prefix"; then
4386     echo $ac_n "checking for file""... $ac_c" 1>&6
4387 echo "configure:4388: checking for file" >&5
4388 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4389   echo $ac_n "(cached) $ac_c" 1>&6
4390 else
4391   case $MAGIC_CMD in
4392   /*)
4393   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4394   ;;
4395   ?:/*)
4396   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4397   ;;
4398   *)
4399   ac_save_MAGIC_CMD="$MAGIC_CMD"
4400   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4401   ac_dummy="/usr/bin:$PATH"
4402   for ac_dir in $ac_dummy; do
4403     test -z "$ac_dir" && ac_dir=.
4404     if test -f $ac_dir/file; then
4405       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4406       if test -n "$file_magic_test_file"; then
4407         case $deplibs_check_method in
4408         "file_magic "*)
4409           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4410           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4411           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4412             egrep "$file_magic_regex" > /dev/null; then
4413             :
4414           else
4415             cat <<EOF 1>&2
4416
4417 *** Warning: the command libtool uses to detect shared libraries,
4418 *** $file_magic_cmd, produces output that libtool cannot recognize.
4419 *** The result is that libtool may fail to recognize shared libraries
4420 *** as such.  This will affect the creation of libtool libraries that
4421 *** depend on shared libraries, but programs linked with such libtool
4422 *** libraries will work regardless of this problem.  Nevertheless, you
4423 *** may want to report the problem to your system manager and/or to
4424 *** bug-libtool@gnu.org
4425
4426 EOF
4427           fi ;;
4428         esac
4429       fi
4430       break
4431     fi
4432   done
4433   IFS="$ac_save_ifs"
4434   MAGIC_CMD="$ac_save_MAGIC_CMD"
4435   ;;
4436 esac
4437 fi
4438
4439 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4440 if test -n "$MAGIC_CMD"; then
4441   echo "$ac_t""$MAGIC_CMD" 1>&6
4442 else
4443   echo "$ac_t""no" 1>&6
4444 fi
4445
4446   else
4447     MAGIC_CMD=:
4448   fi
4449 fi
4450
4451   fi
4452   ;;
4453 esac
4454
4455 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4456 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4457 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4458 echo "configure:4459: checking for $ac_word" >&5
4459 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4460   echo $ac_n "(cached) $ac_c" 1>&6
4461 else
4462   if test -n "$RANLIB"; then
4463   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4464 else
4465   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4466   ac_dummy="$PATH"
4467   for ac_dir in $ac_dummy; do
4468     test -z "$ac_dir" && ac_dir=.
4469     if test -f $ac_dir/$ac_word; then
4470       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4471       break
4472     fi
4473   done
4474   IFS="$ac_save_ifs"
4475 fi
4476 fi
4477 RANLIB="$ac_cv_prog_RANLIB"
4478 if test -n "$RANLIB"; then
4479   echo "$ac_t""$RANLIB" 1>&6
4480 else
4481   echo "$ac_t""no" 1>&6
4482 fi
4483
4484
4485 if test -z "$ac_cv_prog_RANLIB"; then
4486 if test -n "$ac_tool_prefix"; then
4487   # Extract the first word of "ranlib", so it can be a program name with args.
4488 set dummy ranlib; ac_word=$2
4489 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4490 echo "configure:4491: checking for $ac_word" >&5
4491 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4492   echo $ac_n "(cached) $ac_c" 1>&6
4493 else
4494   if test -n "$RANLIB"; then
4495   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4496 else
4497   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4498   ac_dummy="$PATH"
4499   for ac_dir in $ac_dummy; do
4500     test -z "$ac_dir" && ac_dir=.
4501     if test -f $ac_dir/$ac_word; then
4502       ac_cv_prog_RANLIB="ranlib"
4503       break
4504     fi
4505   done
4506   IFS="$ac_save_ifs"
4507   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4508 fi
4509 fi
4510 RANLIB="$ac_cv_prog_RANLIB"
4511 if test -n "$RANLIB"; then
4512   echo "$ac_t""$RANLIB" 1>&6
4513 else
4514   echo "$ac_t""no" 1>&6
4515 fi
4516
4517 else
4518   RANLIB=":"
4519 fi
4520 fi
4521
4522 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4523 set dummy ${ac_tool_prefix}strip; ac_word=$2
4524 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525 echo "configure:4526: checking for $ac_word" >&5
4526 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4527   echo $ac_n "(cached) $ac_c" 1>&6
4528 else
4529   if test -n "$STRIP"; then
4530   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4531 else
4532   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4533   ac_dummy="$PATH"
4534   for ac_dir in $ac_dummy; do
4535     test -z "$ac_dir" && ac_dir=.
4536     if test -f $ac_dir/$ac_word; then
4537       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4538       break
4539     fi
4540   done
4541   IFS="$ac_save_ifs"
4542 fi
4543 fi
4544 STRIP="$ac_cv_prog_STRIP"
4545 if test -n "$STRIP"; then
4546   echo "$ac_t""$STRIP" 1>&6
4547 else
4548   echo "$ac_t""no" 1>&6
4549 fi
4550
4551
4552 if test -z "$ac_cv_prog_STRIP"; then
4553 if test -n "$ac_tool_prefix"; then
4554   # Extract the first word of "strip", so it can be a program name with args.
4555 set dummy strip; ac_word=$2
4556 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4557 echo "configure:4558: checking for $ac_word" >&5
4558 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4559   echo $ac_n "(cached) $ac_c" 1>&6
4560 else
4561   if test -n "$STRIP"; then
4562   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4563 else
4564   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4565   ac_dummy="$PATH"
4566   for ac_dir in $ac_dummy; do
4567     test -z "$ac_dir" && ac_dir=.
4568     if test -f $ac_dir/$ac_word; then
4569       ac_cv_prog_STRIP="strip"
4570       break
4571     fi
4572   done
4573   IFS="$ac_save_ifs"
4574   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4575 fi
4576 fi
4577 STRIP="$ac_cv_prog_STRIP"
4578 if test -n "$STRIP"; then
4579   echo "$ac_t""$STRIP" 1>&6
4580 else
4581   echo "$ac_t""no" 1>&6
4582 fi
4583
4584 else
4585   STRIP=":"
4586 fi
4587 fi
4588
4589
4590 enable_dlopen=yes
4591 enable_win32_dll=yes
4592
4593 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4594 if test "${enable_libtool_lock+set}" = set; then
4595   enableval="$enable_libtool_lock"
4596   :
4597 fi
4598
4599 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4600
4601 # Some flags need to be propagated to the compiler or linker for good
4602 # libtool support.
4603 case $host in
4604 *-*-irix6*)
4605   # Find out which ABI we are using.
4606   echo '#line 4607 "configure"' > conftest.$ac_ext
4607   if { (eval echo configure:4608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4608     case `/usr/bin/file conftest.$ac_objext` in
4609     *32-bit*)
4610       LD="${LD-ld} -32"
4611       ;;
4612     *N32*)
4613       LD="${LD-ld} -n32"
4614       ;;
4615     *64-bit*)
4616       LD="${LD-ld} -64"
4617       ;;
4618     esac
4619   fi
4620   rm -rf conftest*
4621   ;;
4622
4623 *-*-sco3.2v5*)
4624   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4625   SAVE_CFLAGS="$CFLAGS"
4626   CFLAGS="$CFLAGS -belf"
4627   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4628 echo "configure:4629: checking whether the C compiler needs -belf" >&5
4629 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4630   echo $ac_n "(cached) $ac_c" 1>&6
4631 else
4632   
4633      ac_ext=c
4634 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4635 ac_cpp='$CPP $CPPFLAGS'
4636 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4637 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4638 cross_compiling=$ac_cv_prog_cc_cross
4639
4640      cat > conftest.$ac_ext <<EOF
4641 #line 4642 "configure"
4642 #include "confdefs.h"
4643
4644 int main() {
4645
4646 ; return 0; }
4647 EOF
4648 if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4649   rm -rf conftest*
4650   lt_cv_cc_needs_belf=yes
4651 else
4652   echo "configure: failed program was:" >&5
4653   cat conftest.$ac_ext >&5
4654   rm -rf conftest*
4655   lt_cv_cc_needs_belf=no
4656 fi
4657 rm -f conftest*
4658      ac_ext=c
4659 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4660 ac_cpp='$CPP $CPPFLAGS'
4661 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4662 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4663 cross_compiling=$ac_cv_prog_cc_cross
4664
4665 fi
4666
4667 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4668   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4669     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4670     CFLAGS="$SAVE_CFLAGS"
4671   fi
4672   ;;
4673
4674 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4675   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4676 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4677 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4678 echo "configure:4679: checking for $ac_word" >&5
4679 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4680   echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682   if test -n "$DLLTOOL"; then
4683   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4684 else
4685   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4686   ac_dummy="$PATH"
4687   for ac_dir in $ac_dummy; do
4688     test -z "$ac_dir" && ac_dir=.
4689     if test -f $ac_dir/$ac_word; then
4690       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4691       break
4692     fi
4693   done
4694   IFS="$ac_save_ifs"
4695 fi
4696 fi
4697 DLLTOOL="$ac_cv_prog_DLLTOOL"
4698 if test -n "$DLLTOOL"; then
4699   echo "$ac_t""$DLLTOOL" 1>&6
4700 else
4701   echo "$ac_t""no" 1>&6
4702 fi
4703
4704
4705 if test -z "$ac_cv_prog_DLLTOOL"; then
4706 if test -n "$ac_tool_prefix"; then
4707   # Extract the first word of "dlltool", so it can be a program name with args.
4708 set dummy dlltool; ac_word=$2
4709 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4710 echo "configure:4711: checking for $ac_word" >&5
4711 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4712   echo $ac_n "(cached) $ac_c" 1>&6
4713 else
4714   if test -n "$DLLTOOL"; then
4715   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4716 else
4717   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4718   ac_dummy="$PATH"
4719   for ac_dir in $ac_dummy; do
4720     test -z "$ac_dir" && ac_dir=.
4721     if test -f $ac_dir/$ac_word; then
4722       ac_cv_prog_DLLTOOL="dlltool"
4723       break
4724     fi
4725   done
4726   IFS="$ac_save_ifs"
4727   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4728 fi
4729 fi
4730 DLLTOOL="$ac_cv_prog_DLLTOOL"
4731 if test -n "$DLLTOOL"; then
4732   echo "$ac_t""$DLLTOOL" 1>&6
4733 else
4734   echo "$ac_t""no" 1>&6
4735 fi
4736
4737 else
4738   DLLTOOL="false"
4739 fi
4740 fi
4741
4742   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4743 set dummy ${ac_tool_prefix}as; ac_word=$2
4744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4745 echo "configure:4746: checking for $ac_word" >&5
4746 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4747   echo $ac_n "(cached) $ac_c" 1>&6
4748 else
4749   if test -n "$AS"; then
4750   ac_cv_prog_AS="$AS" # Let the user override the test.
4751 else
4752   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4753   ac_dummy="$PATH"
4754   for ac_dir in $ac_dummy; do
4755     test -z "$ac_dir" && ac_dir=.
4756     if test -f $ac_dir/$ac_word; then
4757       ac_cv_prog_AS="${ac_tool_prefix}as"
4758       break
4759     fi
4760   done
4761   IFS="$ac_save_ifs"
4762 fi
4763 fi
4764 AS="$ac_cv_prog_AS"
4765 if test -n "$AS"; then
4766   echo "$ac_t""$AS" 1>&6
4767 else
4768   echo "$ac_t""no" 1>&6
4769 fi
4770
4771
4772 if test -z "$ac_cv_prog_AS"; then
4773 if test -n "$ac_tool_prefix"; then
4774   # Extract the first word of "as", so it can be a program name with args.
4775 set dummy as; ac_word=$2
4776 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4777 echo "configure:4778: checking for $ac_word" >&5
4778 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4779   echo $ac_n "(cached) $ac_c" 1>&6
4780 else
4781   if test -n "$AS"; then
4782   ac_cv_prog_AS="$AS" # Let the user override the test.
4783 else
4784   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4785   ac_dummy="$PATH"
4786   for ac_dir in $ac_dummy; do
4787     test -z "$ac_dir" && ac_dir=.
4788     if test -f $ac_dir/$ac_word; then
4789       ac_cv_prog_AS="as"
4790       break
4791     fi
4792   done
4793   IFS="$ac_save_ifs"
4794   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4795 fi
4796 fi
4797 AS="$ac_cv_prog_AS"
4798 if test -n "$AS"; then
4799   echo "$ac_t""$AS" 1>&6
4800 else
4801   echo "$ac_t""no" 1>&6
4802 fi
4803
4804 else
4805   AS="false"
4806 fi
4807 fi
4808
4809   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4810 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4811 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4812 echo "configure:4813: checking for $ac_word" >&5
4813 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4814   echo $ac_n "(cached) $ac_c" 1>&6
4815 else
4816   if test -n "$OBJDUMP"; then
4817   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4818 else
4819   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4820   ac_dummy="$PATH"
4821   for ac_dir in $ac_dummy; do
4822     test -z "$ac_dir" && ac_dir=.
4823     if test -f $ac_dir/$ac_word; then
4824       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4825       break
4826     fi
4827   done
4828   IFS="$ac_save_ifs"
4829 fi
4830 fi
4831 OBJDUMP="$ac_cv_prog_OBJDUMP"
4832 if test -n "$OBJDUMP"; then
4833   echo "$ac_t""$OBJDUMP" 1>&6
4834 else
4835   echo "$ac_t""no" 1>&6
4836 fi
4837
4838
4839 if test -z "$ac_cv_prog_OBJDUMP"; then
4840 if test -n "$ac_tool_prefix"; then
4841   # Extract the first word of "objdump", so it can be a program name with args.
4842 set dummy objdump; ac_word=$2
4843 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4844 echo "configure:4845: checking for $ac_word" >&5
4845 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4846   echo $ac_n "(cached) $ac_c" 1>&6
4847 else
4848   if test -n "$OBJDUMP"; then
4849   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4850 else
4851   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4852   ac_dummy="$PATH"
4853   for ac_dir in $ac_dummy; do
4854     test -z "$ac_dir" && ac_dir=.
4855     if test -f $ac_dir/$ac_word; then
4856       ac_cv_prog_OBJDUMP="objdump"
4857       break
4858     fi
4859   done
4860   IFS="$ac_save_ifs"
4861   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4862 fi
4863 fi
4864 OBJDUMP="$ac_cv_prog_OBJDUMP"
4865 if test -n "$OBJDUMP"; then
4866   echo "$ac_t""$OBJDUMP" 1>&6
4867 else
4868   echo "$ac_t""no" 1>&6
4869 fi
4870
4871 else
4872   OBJDUMP="false"
4873 fi
4874 fi
4875
4876
4877   # recent cygwin and mingw systems supply a stub DllMain which the user
4878   # can override, but on older systems we have to supply one
4879   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4880 echo "configure:4881: checking if libtool should supply DllMain function" >&5
4881 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4882   echo $ac_n "(cached) $ac_c" 1>&6
4883 else
4884   cat > conftest.$ac_ext <<EOF
4885 #line 4886 "configure"
4886 #include "confdefs.h"
4887
4888 int main() {
4889 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4890       DllMain (0, 0, 0);
4891 ; return 0; }
4892 EOF
4893 if { (eval echo configure:4894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4894   rm -rf conftest*
4895   lt_cv_need_dllmain=no
4896 else
4897   echo "configure: failed program was:" >&5
4898   cat conftest.$ac_ext >&5
4899   rm -rf conftest*
4900   lt_cv_need_dllmain=yes
4901 fi
4902 rm -f conftest*
4903 fi
4904
4905 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4906
4907   case $host/$CC in
4908   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4909     # old mingw systems require "-dll" to link a DLL, while more recent ones
4910     # require "-mdll"
4911     SAVE_CFLAGS="$CFLAGS"
4912     CFLAGS="$CFLAGS -mdll"
4913     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4914 echo "configure:4915: checking how to link DLLs" >&5
4915 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4916   echo $ac_n "(cached) $ac_c" 1>&6
4917 else
4918   cat > conftest.$ac_ext <<EOF
4919 #line 4920 "configure"
4920 #include "confdefs.h"
4921
4922 int main() {
4923
4924 ; return 0; }
4925 EOF
4926 if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4927   rm -rf conftest*
4928   lt_cv_cc_dll_switch=-mdll
4929 else
4930   echo "configure: failed program was:" >&5
4931   cat conftest.$ac_ext >&5
4932   rm -rf conftest*
4933   lt_cv_cc_dll_switch=-dll
4934 fi
4935 rm -f conftest*
4936 fi
4937
4938 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4939     CFLAGS="$SAVE_CFLAGS" ;;
4940   *-*-cygwin* | *-*-pw32*)
4941     # cygwin systems need to pass --dll to the linker, and not link
4942     # crt.o which will require a WinMain@16 definition.
4943     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4944   esac
4945   ;;
4946   
4947 esac
4948
4949 # Sed substitution that helps us do robust quoting.  It backslashifies
4950 # metacharacters that are still active within double-quoted strings.
4951 Xsed='sed -e s/^X//'
4952 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4953
4954 # Same as above, but do not quote variable references.
4955 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4956
4957 # Sed substitution to delay expansion of an escaped shell variable in a
4958 # double_quote_subst'ed string.
4959 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4960
4961 # Constants:
4962 rm="rm -f"
4963
4964 # Global variables:
4965 default_ofile=libtool
4966 can_build_shared=yes
4967
4968 # All known linkers require a `.a' archive for static linking (except M$VC,
4969 # which needs '.lib').
4970 libext=a
4971 ltmain="$ac_aux_dir/ltmain.sh"
4972 ofile="$default_ofile"
4973 with_gnu_ld="$lt_cv_prog_gnu_ld"
4974 need_locks="$enable_libtool_lock"
4975
4976 old_CC="$CC"
4977 old_CFLAGS="$CFLAGS"
4978
4979 # Set sane defaults for various variables
4980 test -z "$AR" && AR=ar
4981 test -z "$AR_FLAGS" && AR_FLAGS=cru
4982 test -z "$AS" && AS=as
4983 test -z "$CC" && CC=cc
4984 test -z "$DLLTOOL" && DLLTOOL=dlltool
4985 test -z "$LD" && LD=ld
4986 test -z "$LN_S" && LN_S="ln -s"
4987 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4988 test -z "$NM" && NM=nm
4989 test -z "$OBJDUMP" && OBJDUMP=objdump
4990 test -z "$RANLIB" && RANLIB=:
4991 test -z "$STRIP" && STRIP=:
4992 test -z "$ac_objext" && ac_objext=o
4993
4994 if test x"$host" != x"$build"; then
4995   ac_tool_prefix=${host_alias}-
4996 else
4997   ac_tool_prefix=
4998 fi
4999
5000 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
5001 case $host_os in
5002 linux-gnu*) ;;
5003 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5004 esac
5005
5006 case $host_os in
5007 aix3*)
5008   # AIX sometimes has problems with the GCC collect2 program.  For some
5009   # reason, if we set the COLLECT_NAMES environment variable, the problems
5010   # vanish in a puff of smoke.
5011   if test "X${COLLECT_NAMES+set}" != Xset; then
5012     COLLECT_NAMES=
5013     export COLLECT_NAMES
5014   fi
5015   ;;
5016 esac
5017
5018 # Determine commands to create old-style static archives.
5019 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5020 old_postinstall_cmds='chmod 644 $oldlib'
5021 old_postuninstall_cmds=
5022
5023 if test -n "$RANLIB"; then
5024   case $host_os in
5025   openbsd*)
5026     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5027     ;;
5028   *)
5029     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5030     ;;
5031   esac
5032   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5033 fi
5034
5035 # Allow CC to be a program name with arguments.
5036 set dummy $CC
5037 compiler="$2"
5038
5039 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5040 echo "configure:5041: checking for objdir" >&5
5041 rm -f .libs 2>/dev/null
5042 mkdir .libs 2>/dev/null
5043 if test -d .libs; then
5044   objdir=.libs
5045 else
5046   # MS-DOS does not allow filenames that begin with a dot.
5047   objdir=_libs
5048 fi
5049 rmdir .libs 2>/dev/null
5050 echo "$ac_t""$objdir" 1>&6
5051
5052
5053 # Check whether --with-pic or --without-pic was given.
5054 if test "${with_pic+set}" = set; then
5055   withval="$with_pic"
5056   pic_mode="$withval"
5057 else
5058   pic_mode=default
5059 fi
5060
5061 test -z "$pic_mode" && pic_mode=default
5062
5063 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5064 # in isolation, and that seeing it set (from the cache) indicates that
5065 # the associated values are set (in the cache) correctly too.
5066 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5067 echo "configure:5068: checking for $compiler option to produce PIC" >&5
5068 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5069   echo $ac_n "(cached) $ac_c" 1>&6
5070 else
5071    lt_cv_prog_cc_pic=
5072   lt_cv_prog_cc_shlib=
5073   lt_cv_prog_cc_wl=
5074   lt_cv_prog_cc_static=
5075   lt_cv_prog_cc_no_builtin=
5076   lt_cv_prog_cc_can_build_shared=$can_build_shared
5077
5078   if test "$GCC" = yes; then
5079     lt_cv_prog_cc_wl='-Wl,'
5080     lt_cv_prog_cc_static='-static'
5081
5082     case $host_os in
5083     aix*)
5084       # Below there is a dirty hack to force normal static linking with -ldl
5085       # The problem is because libdl dynamically linked with both libc and
5086       # libC (AIX C++ library), which obviously doesn't included in libraries
5087       # list by gcc. This cause undefined symbols with -static flags.
5088       # This hack allows C programs to be linked with "-static -ldl", but
5089       # not sure about C++ programs.
5090       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5091       ;;
5092     amigaos*)
5093       # FIXME: we need at least 68020 code to build shared libraries, but
5094       # adding the `-m68020' flag to GCC prevents building anything better,
5095       # like `-m68040'.
5096       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5097       ;;
5098     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5099       # PIC is the default for these OSes.
5100       ;;
5101     darwin* | rhapsody*)
5102       # PIC is the default on this platform
5103       # Common symbols not allowed in MH_DYLIB files
5104       lt_cv_prog_cc_pic='-fno-common'
5105       ;;
5106     cygwin* | mingw* | pw32* | os2*)
5107       # This hack is so that the source file can tell whether it is being
5108       # built for inclusion in a dll (and should export symbols for example).
5109       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5110       ;;
5111     sysv4*MP*)
5112       if test -d /usr/nec; then
5113          lt_cv_prog_cc_pic=-Kconform_pic
5114       fi
5115       ;;
5116     *)
5117       lt_cv_prog_cc_pic='-fPIC'
5118       ;;
5119     esac
5120   else
5121     # PORTME Check for PIC flags for the system compiler.
5122     case $host_os in
5123     aix3* | aix4* | aix5*)
5124       lt_cv_prog_cc_wl='-Wl,'
5125       # All AIX code is PIC.
5126       if test "$host_cpu" = ia64; then
5127         # AIX 5 now supports IA64 processor
5128         lt_cv_prog_cc_static='-Bstatic'
5129       else
5130         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5131       fi
5132       ;;
5133
5134     hpux9* | hpux10* | hpux11*)
5135       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5136       lt_cv_prog_cc_wl='-Wl,'
5137       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5138       lt_cv_prog_cc_pic='+Z'
5139       ;;
5140
5141     irix5* | irix6* | nonstopux*)
5142       lt_cv_prog_cc_wl='-Wl,'
5143       lt_cv_prog_cc_static='-non_shared'
5144       # PIC (with -KPIC) is the default.
5145       ;;
5146
5147     cygwin* | mingw* | pw32* | os2*)
5148       # This hack is so that the source file can tell whether it is being
5149       # built for inclusion in a dll (and should export symbols for example).
5150       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5151       ;;
5152
5153     newsos6)
5154       lt_cv_prog_cc_pic='-KPIC'
5155       lt_cv_prog_cc_static='-Bstatic'
5156       ;;
5157     
5158     openedition)
5159       # XPLINK code is PIC by default
5160       ;;
5161
5162     osf3* | osf4* | osf5*)
5163       # All OSF/1 code is PIC.
5164       lt_cv_prog_cc_wl='-Wl,'
5165       lt_cv_prog_cc_static='-non_shared'
5166       ;;
5167
5168     sco3.2v5*)
5169       lt_cv_prog_cc_pic='-Kpic'
5170       lt_cv_prog_cc_static='-dn'
5171       lt_cv_prog_cc_shlib='-belf'
5172       ;;
5173
5174     solaris*)
5175       lt_cv_prog_cc_pic='-KPIC'
5176       lt_cv_prog_cc_static='-Bstatic'
5177       lt_cv_prog_cc_wl='-Wl,'
5178       ;;
5179
5180     sunos4*)
5181       lt_cv_prog_cc_pic='-PIC'
5182       lt_cv_prog_cc_static='-Bstatic'
5183       lt_cv_prog_cc_wl='-Qoption ld '
5184       ;;
5185
5186     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5187       lt_cv_prog_cc_pic='-KPIC'
5188       lt_cv_prog_cc_static='-Bstatic'
5189       lt_cv_prog_cc_wl='-Wl,'
5190       ;;
5191
5192     uts4*)
5193       lt_cv_prog_cc_pic='-pic'
5194       lt_cv_prog_cc_static='-Bstatic'
5195       ;;
5196
5197     sysv4*MP*)
5198       if test -d /usr/nec ;then
5199         lt_cv_prog_cc_pic='-Kconform_pic'
5200         lt_cv_prog_cc_static='-Bstatic'
5201       fi
5202       ;;
5203
5204     *)
5205       lt_cv_prog_cc_can_build_shared=no
5206       ;;
5207     esac
5208   fi
5209
5210 fi
5211
5212 if test -z "$lt_cv_prog_cc_pic"; then
5213   echo "$ac_t""none" 1>&6
5214 else
5215   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5216
5217   # Check to make sure the pic_flag actually works.
5218   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5219 echo "configure:5220: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5220   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5221   echo $ac_n "(cached) $ac_c" 1>&6
5222 else
5223       save_CFLAGS="$CFLAGS"
5224     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5225     cat > conftest.$ac_ext <<EOF
5226 #line 5227 "configure"
5227 #include "confdefs.h"
5228
5229 int main() {
5230
5231 ; return 0; }
5232 EOF
5233 if { (eval echo configure:5234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5234   rm -rf conftest*
5235         case $host_os in
5236       hpux9* | hpux10* | hpux11*)
5237         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5238         # they create non-PIC objects.  So, if there were any warnings, we
5239         # assume that PIC is not supported.
5240         if test -s conftest.err; then
5241           lt_cv_prog_cc_pic_works=no
5242         else
5243           lt_cv_prog_cc_pic_works=yes
5244         fi
5245         ;;
5246       *)
5247         lt_cv_prog_cc_pic_works=yes
5248         ;;
5249       esac
5250     
5251 else
5252   echo "configure: failed program was:" >&5
5253   cat conftest.$ac_ext >&5
5254   rm -rf conftest*
5255         lt_cv_prog_cc_pic_works=no
5256     
5257 fi
5258 rm -f conftest*
5259     CFLAGS="$save_CFLAGS"
5260   
5261 fi
5262
5263
5264   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5265     lt_cv_prog_cc_pic=
5266     lt_cv_prog_cc_can_build_shared=no
5267   else
5268     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5269   fi
5270
5271   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5272 fi
5273
5274 # Check for any special shared library compilation flags.
5275 if test -n "$lt_cv_prog_cc_shlib"; then
5276   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5277   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5278   else
5279    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5280     lt_cv_prog_cc_can_build_shared=no
5281   fi
5282 fi
5283
5284 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5285 echo "configure:5286: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5286 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5287   echo $ac_n "(cached) $ac_c" 1>&6
5288 else
5289     lt_cv_prog_cc_static_works=no
5290   save_LDFLAGS="$LDFLAGS"
5291   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5292   cat > conftest.$ac_ext <<EOF
5293 #line 5294 "configure"
5294 #include "confdefs.h"
5295
5296 int main() {
5297
5298 ; return 0; }
5299 EOF
5300 if { (eval echo configure:5301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5301   rm -rf conftest*
5302   lt_cv_prog_cc_static_works=yes
5303 else
5304   echo "configure: failed program was:" >&5
5305   cat conftest.$ac_ext >&5
5306 fi
5307 rm -f conftest*
5308   LDFLAGS="$save_LDFLAGS"
5309
5310 fi
5311
5312
5313 # Belt *and* braces to stop my trousers falling down:
5314 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5315 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5316
5317 pic_flag="$lt_cv_prog_cc_pic"
5318 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5319 wl="$lt_cv_prog_cc_wl"
5320 link_static_flag="$lt_cv_prog_cc_static"
5321 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5322 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5323
5324
5325 # Check to see if options -o and -c are simultaneously supported by compiler
5326 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5327 echo "configure:5328: checking if $compiler supports -c -o file.$ac_objext" >&5
5328 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5329   echo $ac_n "(cached) $ac_c" 1>&6
5330 else
5331   
5332 $rm -r conftest 2>/dev/null
5333 mkdir conftest
5334 cd conftest
5335 echo "int some_variable = 0;" > conftest.$ac_ext
5336 mkdir out
5337 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5338 # that will create temporary files in the current directory regardless of
5339 # the output directory.  Thus, making CWD read-only will cause this test
5340 # to fail, enabling locking or at least warning the user not to do parallel
5341 # builds.
5342 chmod -w .
5343 save_CFLAGS="$CFLAGS"
5344 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5345 compiler_c_o=no
5346 if { (eval echo configure:5347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5347   # The compiler can only warn and ignore the option if not recognized
5348   # So say no if there are warnings
5349   if test -s out/conftest.err; then
5350     lt_cv_compiler_c_o=no
5351   else
5352     lt_cv_compiler_c_o=yes
5353   fi
5354 else
5355   # Append any errors to the config.log.
5356   cat out/conftest.err 1>&5
5357   lt_cv_compiler_c_o=no
5358 fi
5359 CFLAGS="$save_CFLAGS"
5360 chmod u+w .
5361 $rm conftest* out/*
5362 rmdir out
5363 cd ..
5364 rmdir conftest
5365 $rm -r conftest 2>/dev/null
5366
5367 fi
5368
5369 compiler_c_o=$lt_cv_compiler_c_o
5370 echo "$ac_t""$compiler_c_o" 1>&6
5371
5372 if test x"$compiler_c_o" = x"yes"; then
5373   # Check to see if we can write to a .lo
5374   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5375 echo "configure:5376: checking if $compiler supports -c -o file.lo" >&5
5376   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5377   echo $ac_n "(cached) $ac_c" 1>&6
5378 else
5379   
5380   lt_cv_compiler_o_lo=no
5381   save_CFLAGS="$CFLAGS"
5382   CFLAGS="$CFLAGS -c -o conftest.lo"
5383   save_objext="$ac_objext"
5384   ac_objext=lo
5385   cat > conftest.$ac_ext <<EOF
5386 #line 5387 "configure"
5387 #include "confdefs.h"
5388
5389 int main() {
5390 int some_variable = 0;
5391 ; return 0; }
5392 EOF
5393 if { (eval echo configure:5394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5394   rm -rf conftest*
5395       # The compiler can only warn and ignore the option if not recognized
5396     # So say no if there are warnings
5397     if test -s conftest.err; then
5398       lt_cv_compiler_o_lo=no
5399     else
5400       lt_cv_compiler_o_lo=yes
5401     fi
5402   
5403 else
5404   echo "configure: failed program was:" >&5
5405   cat conftest.$ac_ext >&5
5406 fi
5407 rm -f conftest*
5408   ac_objext="$save_objext"
5409   CFLAGS="$save_CFLAGS"
5410   
5411 fi
5412
5413   compiler_o_lo=$lt_cv_compiler_o_lo
5414   echo "$ac_t""$compiler_o_lo" 1>&6
5415 else
5416   compiler_o_lo=no
5417 fi
5418
5419 # Check to see if we can do hard links to lock some files if needed
5420 hard_links="nottested"
5421 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5422   # do not overwrite the value of need_locks provided by the user
5423   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5424 echo "configure:5425: checking if we can lock with hard links" >&5
5425   hard_links=yes
5426   $rm conftest*
5427   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5428   touch conftest.a
5429   ln conftest.a conftest.b 2>&5 || hard_links=no
5430   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5431   echo "$ac_t""$hard_links" 1>&6
5432   if test "$hard_links" = no; then
5433     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5434     need_locks=warn
5435   fi
5436 else
5437   need_locks=no
5438 fi
5439
5440 if test "$GCC" = yes; then
5441   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5442   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5443 echo "configure:5444: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5444   echo "int some_variable = 0;" > conftest.$ac_ext
5445   save_CFLAGS="$CFLAGS"
5446   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5447   compiler_rtti_exceptions=no
5448   cat > conftest.$ac_ext <<EOF
5449 #line 5450 "configure"
5450 #include "confdefs.h"
5451
5452 int main() {
5453 int some_variable = 0;
5454 ; return 0; }
5455 EOF
5456 if { (eval echo configure:5457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5457   rm -rf conftest*
5458       # The compiler can only warn and ignore the option if not recognized
5459     # So say no if there are warnings
5460     if test -s conftest.err; then
5461       compiler_rtti_exceptions=no
5462     else
5463       compiler_rtti_exceptions=yes
5464     fi
5465   
5466 else
5467   echo "configure: failed program was:" >&5
5468   cat conftest.$ac_ext >&5
5469 fi
5470 rm -f conftest*
5471   CFLAGS="$save_CFLAGS"
5472   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5473
5474   if test "$compiler_rtti_exceptions" = "yes"; then
5475     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5476   else
5477     no_builtin_flag=' -fno-builtin'
5478   fi
5479 fi
5480
5481 # See if the linker supports building shared libraries.
5482 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5483 echo "configure:5484: checking whether the linker ($LD) supports shared libraries" >&5
5484
5485 allow_undefined_flag=
5486 no_undefined_flag=
5487 need_lib_prefix=unknown
5488 need_version=unknown
5489 # when you set need_version to no, make sure it does not cause -set_version
5490 # flags to be left without arguments
5491 archive_cmds=
5492 archive_expsym_cmds=
5493 old_archive_from_new_cmds=
5494 old_archive_from_expsyms_cmds=
5495 export_dynamic_flag_spec=
5496 whole_archive_flag_spec=
5497 thread_safe_flag_spec=
5498 hardcode_into_libs=no
5499 hardcode_libdir_flag_spec=
5500 hardcode_libdir_separator=
5501 hardcode_direct=no
5502 hardcode_minus_L=no
5503 hardcode_shlibpath_var=unsupported
5504 runpath_var=
5505 link_all_deplibs=unknown
5506 always_export_symbols=no
5507 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5508 # include_expsyms should be a list of space-separated symbols to be *always*
5509 # included in the symbol list
5510 include_expsyms=
5511 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5512 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5513 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5514 # as well as any symbol that contains `d'.
5515 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5516 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5517 # platforms (ab)use it in PIC code, but their linkers get confused if
5518 # the symbol is explicitly referenced.  Since portable code cannot
5519 # rely on this symbol name, it's probably fine to never include it in
5520 # preloaded symbol tables.
5521 extract_expsyms_cmds=
5522
5523 case $host_os in
5524 cygwin* | mingw* | pw32*)
5525   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5526   # When not using gcc, we currently assume that we are using
5527   # Microsoft Visual C++.
5528   if test "$GCC" != yes; then
5529     with_gnu_ld=no
5530   fi
5531   ;;
5532 openbsd*)
5533   with_gnu_ld=no
5534   ;;
5535 esac
5536
5537 ld_shlibs=yes
5538 if test "$with_gnu_ld" = yes; then
5539   # If archive_cmds runs LD, not CC, wlarc should be empty
5540   wlarc='${wl}'
5541
5542   # See if GNU ld supports shared libraries.
5543   case $host_os in
5544   aix3* | aix4* | aix5*)
5545     # On AIX, the GNU linker is very broken
5546     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5547     ld_shlibs=no
5548     cat <<EOF 1>&2
5549
5550 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5551 *** to be unable to reliably create shared libraries on AIX.
5552 *** Therefore, libtool is disabling shared libraries support.  If you
5553 *** really care for shared libraries, you may want to modify your PATH
5554 *** so that a non-GNU linker is found, and then restart.
5555
5556 EOF
5557     ;;
5558
5559   amigaos*)
5560     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)'
5561     hardcode_libdir_flag_spec='-L$libdir'
5562     hardcode_minus_L=yes
5563
5564     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5565     # that the semantics of dynamic libraries on AmigaOS, at least up
5566     # to version 4, is to share data among multiple programs linked
5567     # with the same dynamic library.  Since this doesn't match the
5568     # behavior of shared libraries on other platforms, we can use
5569     # them.
5570     ld_shlibs=no
5571     ;;
5572
5573   beos*)
5574     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5575       allow_undefined_flag=unsupported
5576       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5577       # support --undefined.  This deserves some investigation.  FIXME
5578       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5579     else
5580       ld_shlibs=no
5581     fi
5582     ;;
5583
5584   cygwin* | mingw* | pw32*)
5585     # hardcode_libdir_flag_spec is actually meaningless, as there is
5586     # no search path for DLLs.
5587     hardcode_libdir_flag_spec='-L$libdir'
5588     allow_undefined_flag=unsupported
5589     always_export_symbols=yes
5590
5591     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5592       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5593       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5594       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5595       else $CC -o impgen impgen.c ; fi)~
5596       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5597
5598     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5599
5600     # cygwin and mingw dlls have different entry points and sets of symbols
5601     # to exclude.
5602     # FIXME: what about values for MSVC?
5603     dll_entry=__cygwin_dll_entry@12
5604     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5605     case $host_os in
5606     mingw*)
5607       # mingw values
5608       dll_entry=_DllMainCRTStartup@12
5609       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5610       ;;
5611     esac
5612
5613     # mingw and cygwin differ, and it's simplest to just exclude the union
5614     # of the two symbol sets.
5615     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5616
5617     # recent cygwin and mingw systems supply a stub DllMain which the user
5618     # can override, but on older systems we have to supply one (in ltdll.c)
5619     if test "x$lt_cv_need_dllmain" = "xyes"; then
5620       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5621       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~
5622         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5623     else
5624       ltdll_obj=
5625       ltdll_cmds=
5626     fi
5627
5628     # Extract the symbol export list from an `--export-all' def file,
5629     # then regenerate the def file from the symbol export list, so that
5630     # the compiled dll only exports the symbol export list.
5631     # Be careful not to strip the DATA tag left be newer dlltools.
5632     export_symbols_cmds="$ltdll_cmds"'
5633       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5634       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5635
5636     # If the export-symbols file already is a .def file (1st line
5637     # is EXPORTS), use it as is.
5638     # If DATA tags from a recent dlltool are present, honour them!
5639     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5640         cp $export_symbols $output_objdir/$soname-def;
5641       else
5642         echo EXPORTS > $output_objdir/$soname-def;
5643         _lt_hint=1;
5644         cat $export_symbols | while read symbol; do
5645          set dummy \$symbol;
5646          case \$# in
5647            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5648            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5649            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5650          esac;
5651          _lt_hint=`expr 1 + \$_lt_hint`;
5652         done;
5653       fi~
5654       '"$ltdll_cmds"'
5655       $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~
5656       $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~
5657       $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~
5658       $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~
5659       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5660     ;;
5661
5662   netbsd*)
5663     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5664       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5665       wlarc=
5666     else
5667       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5668       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5669     fi
5670     ;;
5671
5672   solaris* | sysv5*)
5673     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5674       ld_shlibs=no
5675       cat <<EOF 1>&2
5676
5677 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5678 *** create shared libraries on Solaris systems.  Therefore, libtool
5679 *** is disabling shared libraries support.  We urge you to upgrade GNU
5680 *** binutils to release 2.9.1 or newer.  Another option is to modify
5681 *** your PATH or compiler configuration so that the native linker is
5682 *** used, and then restart.
5683
5684 EOF
5685     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5686       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5687       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5688     else
5689       ld_shlibs=no
5690     fi
5691     ;;
5692
5693   sunos4*)
5694     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5695     wlarc=
5696     hardcode_direct=yes
5697     hardcode_shlibpath_var=no
5698     ;;
5699
5700   *)
5701     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5702       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5703       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5704     else
5705       ld_shlibs=no
5706     fi
5707     ;;
5708   esac
5709
5710   if test "$ld_shlibs" = yes; then
5711     runpath_var=LD_RUN_PATH
5712     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5713     export_dynamic_flag_spec='${wl}--export-dynamic'
5714     case $host_os in
5715     cygwin* | mingw* | pw32*)
5716       # dlltool doesn't understand --whole-archive et. al.
5717       whole_archive_flag_spec=
5718       ;;
5719     *)
5720       # ancient GNU ld didn't support --whole-archive et. al.
5721       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5722         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5723       else
5724         whole_archive_flag_spec=
5725       fi
5726       ;;
5727     esac
5728   fi
5729 else
5730   # PORTME fill in a description of your system's linker (not GNU ld)
5731   case $host_os in
5732   aix3*)
5733     allow_undefined_flag=unsupported
5734     always_export_symbols=yes
5735     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'
5736     # Note: this linker hardcodes the directories in LIBPATH if there
5737     # are no directories specified by -L.
5738     hardcode_minus_L=yes
5739     if test "$GCC" = yes && test -z "$link_static_flag"; then
5740       # Neither direct hardcoding nor static linking is supported with a
5741       # broken collect2.
5742       hardcode_direct=unsupported
5743     fi
5744     ;;
5745
5746   aix4* | aix5*)
5747     if test "$host_cpu" = ia64; then
5748       # On IA64, the linker does run time linking by default, so we don't
5749       # have to do anything special.
5750       aix_use_runtimelinking=no
5751       exp_sym_flag='-Bexport'
5752       no_entry_flag=""
5753     else
5754       aix_use_runtimelinking=no
5755
5756       # Test if we are trying to use run time linking or normal
5757       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5758       # need to do runtime linking.
5759       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5760         for ld_flag in $LDFLAGS; do
5761           case $ld_flag in
5762           *-brtl*)
5763             aix_use_runtimelinking=yes
5764             break
5765           ;;
5766           esac
5767         done
5768       esac
5769
5770       exp_sym_flag='-bexport'
5771       no_entry_flag='-bnoentry'
5772     fi
5773
5774     # When large executables or shared objects are built, AIX ld can
5775     # have problems creating the table of contents.  If linking a library
5776     # or program results in "error TOC overflow" add -mminimal-toc to
5777     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5778     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5779
5780     hardcode_direct=yes
5781     archive_cmds=''
5782     hardcode_libdir_separator=':'
5783     if test "$GCC" = yes; then
5784       case $host_os in aix4.[012]|aix4.[012].*)
5785         collect2name=`${CC} -print-prog-name=collect2`
5786         if test -f "$collect2name" && \
5787           strings "$collect2name" | grep resolve_lib_name >/dev/null
5788         then
5789           # We have reworked collect2
5790           hardcode_direct=yes
5791         else
5792           # We have old collect2
5793           hardcode_direct=unsupported
5794           # It fails to find uninstalled libraries when the uninstalled
5795           # path is not listed in the libpath.  Setting hardcode_minus_L
5796           # to unsupported forces relinking
5797           hardcode_minus_L=yes
5798           hardcode_libdir_flag_spec='-L$libdir'
5799           hardcode_libdir_separator=
5800         fi
5801       esac
5802
5803       shared_flag='-shared'
5804     else
5805       # not using gcc
5806       if test "$host_cpu" = ia64; then
5807         shared_flag='${wl}-G'
5808       else
5809         if test "$aix_use_runtimelinking" = yes; then
5810           shared_flag='${wl}-G'
5811         else
5812           shared_flag='${wl}-bM:SRE'
5813         fi
5814       fi
5815     fi
5816
5817     # It seems that -bexpall can do strange things, so it is better to
5818     # generate a list of symbols to export.
5819     always_export_symbols=yes
5820     if test "$aix_use_runtimelinking" = yes; then
5821       # Warning - without using the other runtime loading flags (-brtl),
5822       # -berok will link without error, but may produce a broken library.
5823       allow_undefined_flag='-berok'
5824       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5825       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"
5826     else
5827       if test "$host_cpu" = ia64; then
5828         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5829         allow_undefined_flag="-z nodefs"
5830         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"
5831       else
5832         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5833         # Warning - without using the other run time loading flags,
5834         # -berok will link without error, but may produce a broken library.
5835         allow_undefined_flag='${wl}-berok'
5836         # This is a bit strange, but is similar to how AIX traditionally builds
5837         # it's shared libraries.
5838         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'
5839       fi
5840     fi
5841     ;;
5842
5843   amigaos*)
5844     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)'
5845     hardcode_libdir_flag_spec='-L$libdir'
5846     hardcode_minus_L=yes
5847     # see comment about different semantics on the GNU ld section
5848     ld_shlibs=no
5849     ;;
5850
5851   cygwin* | mingw* | pw32*)
5852     # When not using gcc, we currently assume that we are using
5853     # Microsoft Visual C++.
5854     # hardcode_libdir_flag_spec is actually meaningless, as there is
5855     # no search path for DLLs.
5856     hardcode_libdir_flag_spec=' '
5857     allow_undefined_flag=unsupported
5858     # Tell ltmain to make .lib files, not .a files.
5859     libext=lib
5860     # FIXME: Setting linknames here is a bad hack.
5861     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5862     # The linker will automatically build a .lib file if we build a DLL.
5863     old_archive_from_new_cmds='true'
5864     # FIXME: Should let the user specify the lib program.
5865     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5866     fix_srcfile_path='`cygpath -w "$srcfile"`'
5867     ;;
5868
5869   darwin* | rhapsody*)
5870     case "$host_os" in
5871     rhapsody* | darwin1.[012])
5872       allow_undefined_flag='-undefined suppress'
5873       ;;
5874     *) # Darwin 1.3 on
5875       allow_undefined_flag='-flat_namespace -undefined suppress'
5876       ;;
5877     esac
5878     # FIXME: Relying on posixy $() will cause problems for
5879     #        cross-compilation, but unfortunately the echo tests do not
5880     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5881     #        `"' quotes if we put them in here... so don't!
5882     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)'
5883     # We need to add '_' to the symbols in $export_symbols first
5884     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5885     hardcode_direct=yes
5886     hardcode_shlibpath_var=no
5887     whole_archive_flag_spec='-all_load $convenience'
5888     ;;
5889
5890   freebsd1*)
5891     ld_shlibs=no
5892     ;;
5893
5894   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5895   # support.  Future versions do this automatically, but an explicit c++rt0.o
5896   # does not break anything, and helps significantly (at the cost of a little
5897   # extra space).
5898   freebsd2.2*)
5899     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5900     hardcode_libdir_flag_spec='-R$libdir'
5901     hardcode_direct=yes
5902     hardcode_shlibpath_var=no
5903     ;;
5904
5905   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5906   freebsd2*)
5907     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5908     hardcode_direct=yes
5909     hardcode_minus_L=yes
5910     hardcode_shlibpath_var=no
5911     ;;
5912
5913   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5914   freebsd*)
5915     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5916     hardcode_libdir_flag_spec='-R$libdir'
5917     hardcode_direct=yes
5918     hardcode_shlibpath_var=no
5919     ;;
5920
5921   hpux9* | hpux10* | hpux11*)
5922     case $host_os in
5923     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' ;;
5924     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5925     esac
5926     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5927     hardcode_libdir_separator=:
5928     hardcode_direct=yes
5929     hardcode_minus_L=yes # Not in the search PATH, but as the default
5930                          # location of the library.
5931     export_dynamic_flag_spec='${wl}-E'
5932     ;;
5933
5934   irix5* | irix6* | nonstopux*)
5935     if test "$GCC" = yes; then
5936       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'
5937       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5938     else
5939       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'
5940       hardcode_libdir_flag_spec='-rpath $libdir'
5941     fi
5942     hardcode_libdir_separator=:
5943     link_all_deplibs=yes
5944     ;;
5945
5946   netbsd*)
5947     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5948       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5949     else
5950       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5951     fi
5952     hardcode_libdir_flag_spec='-R$libdir'
5953     hardcode_direct=yes
5954     hardcode_shlibpath_var=no
5955     ;;
5956
5957   newsos6)
5958     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5959     hardcode_direct=yes
5960     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5961     hardcode_libdir_separator=:
5962     hardcode_shlibpath_var=no
5963     ;;
5964
5965   openbsd*)
5966     hardcode_direct=yes
5967     hardcode_shlibpath_var=no
5968     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5969       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5970       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5971       export_dynamic_flag_spec='${wl}-E'
5972     else
5973       case "$host_os" in
5974       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5975         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5976         hardcode_libdir_flag_spec='-R$libdir'
5977         ;;
5978       *)
5979         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5980         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5981         ;;
5982       esac
5983     fi
5984     ;;
5985
5986   openedition*)
5987     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5988         cp \$linknames \$output_objdir && linknames=''"
5989     export_dynamic_flag_spec="-Wl,DLL"
5990     ;;
5991
5992   os2*)
5993     hardcode_libdir_flag_spec='-L$libdir'
5994     hardcode_minus_L=yes
5995     allow_undefined_flag=unsupported
5996     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'
5997     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5998     ;;
5999
6000   osf3*)
6001     if test "$GCC" = yes; then
6002       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6003       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'
6004     else
6005       allow_undefined_flag=' -expect_unresolved \*'
6006       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'
6007     fi
6008     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6009     hardcode_libdir_separator=:
6010     ;;
6011
6012   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6013     if test "$GCC" = yes; then
6014       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6015       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'
6016       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6017     else
6018       allow_undefined_flag=' -expect_unresolved \*'
6019       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'
6020       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6021       $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'
6022
6023       #Both c and cxx compiler support -rpath directly
6024       hardcode_libdir_flag_spec='-rpath $libdir'
6025     fi
6026     hardcode_libdir_separator=:
6027     ;;
6028
6029   sco3.2v5*)
6030     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6031     hardcode_shlibpath_var=no
6032     runpath_var=LD_RUN_PATH
6033     hardcode_runpath_var=yes
6034     export_dynamic_flag_spec='${wl}-Bexport'
6035     ;;
6036
6037   solaris*)
6038     # gcc --version < 3.0 without binutils cannot create self contained
6039     # shared libraries reliably, requiring libgcc.a to resolve some of
6040     # the object symbols generated in some cases.  Libraries that use
6041     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6042     # a copy of libgcc.a into every shared library to guarantee resolving
6043     # such symbols causes other problems:  According to Tim Van Holder
6044     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6045     # (to the application) exception stack for one thing.
6046     no_undefined_flag=' -z defs'
6047     if test "$GCC" = yes; then
6048       case `$CC --version 2>/dev/null` in
6049       [12].*)
6050         cat <<EOF 1>&2
6051
6052 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6053 *** create self contained shared libraries on Solaris systems, without
6054 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6055 *** -no-undefined support, which will at least allow you to build shared
6056 *** libraries.  However, you may find that when you link such libraries
6057 *** into an application without using GCC, you have to manually add
6058 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6059 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6060 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6061
6062 EOF
6063         no_undefined_flag=
6064         ;;
6065       esac
6066     fi
6067     # $CC -shared without GNU ld will not create a library from C++
6068     # object files and a static libstdc++, better avoid it by now
6069     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6070     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6071                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6072     hardcode_libdir_flag_spec='-R$libdir'
6073     hardcode_shlibpath_var=no
6074     case $host_os in
6075     solaris2.[0-5] | solaris2.[0-5].*) ;;
6076     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6077       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6078     esac
6079     link_all_deplibs=yes
6080     ;;
6081
6082   sunos4*)
6083     if test "x$host_vendor" = xsequent; then
6084       # Use $CC to link under sequent, because it throws in some extra .o
6085       # files that make .init and .fini sections work.
6086       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6087     else
6088       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6089     fi
6090     hardcode_libdir_flag_spec='-L$libdir'
6091     hardcode_direct=yes
6092     hardcode_minus_L=yes
6093     hardcode_shlibpath_var=no
6094     ;;
6095
6096   sysv4)
6097     case $host_vendor in
6098       sni)
6099         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6100         hardcode_direct=yes # is this really true???
6101         ;;
6102       siemens)
6103         ## LD is ld it makes a PLAMLIB
6104         ## CC just makes a GrossModule.
6105         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6106         reload_cmds='$CC -r -o $output$reload_objs'
6107         hardcode_direct=no
6108         ;;
6109       motorola)
6110         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6111         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6112         ;;
6113     esac
6114     runpath_var='LD_RUN_PATH'
6115     hardcode_shlibpath_var=no
6116     ;;
6117
6118   sysv4.3*)
6119     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6120     hardcode_shlibpath_var=no
6121     export_dynamic_flag_spec='-Bexport'
6122     ;;
6123
6124   sysv5*)
6125     no_undefined_flag=' -z text'
6126     # $CC -shared without GNU ld will not create a library from C++
6127     # object files and a static libstdc++, better avoid it by now
6128     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6129     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6130                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6131     hardcode_libdir_flag_spec=
6132     hardcode_shlibpath_var=no
6133     runpath_var='LD_RUN_PATH'
6134     ;;
6135
6136   uts4*)
6137     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6138     hardcode_libdir_flag_spec='-L$libdir'
6139     hardcode_shlibpath_var=no
6140     ;;
6141
6142   dgux*)
6143     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6144     hardcode_libdir_flag_spec='-L$libdir'
6145     hardcode_shlibpath_var=no
6146     ;;
6147
6148   sysv4*MP*)
6149     if test -d /usr/nec; then
6150       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6151       hardcode_shlibpath_var=no
6152       runpath_var=LD_RUN_PATH
6153       hardcode_runpath_var=yes
6154       ld_shlibs=yes
6155     fi
6156     ;;
6157
6158   sysv4.2uw2*)
6159     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6160     hardcode_direct=yes
6161     hardcode_minus_L=no
6162     hardcode_shlibpath_var=no
6163     hardcode_runpath_var=yes
6164     runpath_var=LD_RUN_PATH
6165     ;;
6166
6167   sysv5uw7* | unixware7*)
6168     no_undefined_flag='${wl}-z ${wl}text'
6169     if test "$GCC" = yes; then
6170       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6171     else
6172       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6173     fi
6174     runpath_var='LD_RUN_PATH'
6175     hardcode_shlibpath_var=no
6176     ;;
6177
6178   *)
6179     ld_shlibs=no
6180     ;;
6181   esac
6182 fi
6183 echo "$ac_t""$ld_shlibs" 1>&6
6184 test "$ld_shlibs" = no && can_build_shared=no
6185
6186 # Check hardcoding attributes.
6187 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6188 echo "configure:6189: checking how to hardcode library paths into programs" >&5
6189 hardcode_action=
6190 if test -n "$hardcode_libdir_flag_spec" || \
6191    test -n "$runpath_var"; then
6192
6193   # We can hardcode non-existant directories.
6194   if test "$hardcode_direct" != no &&
6195      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6196      # have to relink, otherwise we might link with an installed library
6197      # when we should be linking with a yet-to-be-installed one
6198      ## test "$hardcode_shlibpath_var" != no &&
6199      test "$hardcode_minus_L" != no; then
6200     # Linking always hardcodes the temporary library directory.
6201     hardcode_action=relink
6202   else
6203     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6204     hardcode_action=immediate
6205   fi
6206 else
6207   # We cannot hardcode anything, or else we can only hardcode existing
6208   # directories.
6209   hardcode_action=unsupported
6210 fi
6211 echo "$ac_t""$hardcode_action" 1>&6
6212
6213 striplib=
6214 old_striplib=
6215 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6216 echo "configure:6217: checking whether stripping libraries is possible" >&5
6217 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6218   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6219   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6220   echo "$ac_t""yes" 1>&6
6221 else
6222   echo "$ac_t""no" 1>&6
6223 fi
6224
6225 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6226 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6227
6228 # PORTME Fill in your ld.so characteristics
6229 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6230 echo "configure:6231: checking dynamic linker characteristics" >&5
6231 library_names_spec=
6232 libname_spec='lib$name'
6233 soname_spec=
6234 postinstall_cmds=
6235 postuninstall_cmds=
6236 finish_cmds=
6237 finish_eval=
6238 shlibpath_var=
6239 shlibpath_overrides_runpath=unknown
6240 version_type=none
6241 dynamic_linker="$host_os ld.so"
6242 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6243 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6244
6245 case $host_os in
6246 aix3*)
6247   version_type=linux
6248   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6249   shlibpath_var=LIBPATH
6250
6251   # AIX has no versioning support, so we append a major version to the name.
6252   soname_spec='${libname}${release}.so$major'
6253   ;;
6254
6255 aix4* | aix5*)
6256   version_type=linux
6257   need_lib_prefix=no
6258   need_version=no
6259   hardcode_into_libs=yes
6260   if test "$host_cpu" = ia64; then
6261     # AIX 5 supports IA64
6262     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6263     shlibpath_var=LD_LIBRARY_PATH
6264   else
6265     # With GCC up to 2.95.x, collect2 would create an import file
6266     # for dependence libraries.  The import file would start with
6267     # the line `#! .'.  This would cause the generated library to
6268     # depend on `.', always an invalid library.  This was fixed in
6269     # development snapshots of GCC prior to 3.0.
6270     case $host_os in
6271       aix4 | aix4.[01] | aix4.[01].*)
6272         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6273              echo ' yes '
6274              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6275           :
6276         else
6277           can_build_shared=no
6278         fi
6279         ;;
6280     esac
6281     # AIX (on Power*) has no versioning support, so currently we can
6282     # not hardcode correct soname into executable. Probably we can
6283     # add versioning support to collect2, so additional links can
6284     # be useful in future.
6285     if test "$aix_use_runtimelinking" = yes; then
6286       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6287       # instead of lib<name>.a to let people know that these are not
6288       # typical AIX shared libraries.
6289       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6290     else
6291       # We preserve .a as extension for shared libraries through AIX4.2
6292       # and later when we are not doing run time linking.
6293       library_names_spec='${libname}${release}.a $libname.a'
6294       soname_spec='${libname}${release}.so$major'
6295     fi
6296     shlibpath_var=LIBPATH
6297   fi
6298   hardcode_into_libs=yes
6299   ;;
6300
6301 amigaos*)
6302   library_names_spec='$libname.ixlibrary $libname.a'
6303   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6304   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'
6305   ;;
6306
6307 beos*)
6308   library_names_spec='${libname}.so'
6309   dynamic_linker="$host_os ld.so"
6310   shlibpath_var=LIBRARY_PATH
6311   ;;
6312
6313 bsdi4*)
6314   version_type=linux
6315   need_version=no
6316   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6317   soname_spec='${libname}${release}.so$major'
6318   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6319   shlibpath_var=LD_LIBRARY_PATH
6320   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6321   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6322   export_dynamic_flag_spec=-rdynamic
6323   # the default ld.so.conf also contains /usr/contrib/lib and
6324   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6325   # libtool to hard-code these into programs
6326   ;;
6327
6328 cygwin* | mingw* | pw32*)
6329   version_type=windows
6330   need_version=no
6331   need_lib_prefix=no
6332   case $GCC,$host_os in
6333   yes,cygwin*)
6334     library_names_spec='$libname.dll.a'
6335     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6336     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6337       dldir=$destdir/`dirname \$dlpath`~
6338       test -d \$dldir || mkdir -p \$dldir~
6339       $install_prog .libs/$dlname \$dldir/$dlname'
6340     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6341       dlpath=$dir/\$dldll~
6342        $rm \$dlpath'
6343     ;;
6344   yes,mingw*)
6345     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6346     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6347     ;;
6348   yes,pw32*)
6349     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6350     ;;
6351   *)
6352     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6353     ;;
6354   esac
6355   dynamic_linker='Win32 ld.exe'
6356   # FIXME: first we should search . and the directory the executable is in
6357   shlibpath_var=PATH
6358   ;;
6359
6360 darwin* | rhapsody*)
6361   dynamic_linker="$host_os dyld"
6362   version_type=darwin
6363   need_lib_prefix=no
6364   need_version=no
6365   # FIXME: Relying on posixy $() will cause problems for
6366   #        cross-compilation, but unfortunately the echo tests do not
6367   #        yet detect zsh echo's removal of \ escapes.
6368   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)'
6369   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6370   shlibpath_overrides_runpath=yes
6371   shlibpath_var=DYLD_LIBRARY_PATH
6372   ;;
6373
6374 freebsd1*)
6375   dynamic_linker=no
6376   ;;
6377
6378 freebsd*)
6379   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6380   version_type=freebsd-$objformat
6381   case $version_type in
6382     freebsd-elf*)
6383       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6384       need_version=no
6385       need_lib_prefix=no
6386       ;;
6387     freebsd-*)
6388       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6389       need_version=yes
6390       ;;
6391   esac
6392   shlibpath_var=LD_LIBRARY_PATH
6393   case $host_os in
6394   freebsd2*)
6395     shlibpath_overrides_runpath=yes
6396     ;;
6397   *)
6398     shlibpath_overrides_runpath=no
6399     hardcode_into_libs=yes
6400     ;;
6401   esac
6402   ;;
6403
6404 gnu*)
6405   version_type=linux
6406   need_lib_prefix=no
6407   need_version=no
6408   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6409   soname_spec='${libname}${release}.so$major'
6410   shlibpath_var=LD_LIBRARY_PATH
6411   hardcode_into_libs=yes
6412   ;;
6413
6414 hpux9* | hpux10* | hpux11*)
6415   # Give a soname corresponding to the major version so that dld.sl refuses to
6416   # link against other versions.
6417   dynamic_linker="$host_os dld.sl"
6418   version_type=sunos
6419   need_lib_prefix=no
6420   need_version=no
6421   shlibpath_var=SHLIB_PATH
6422   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6423   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6424   soname_spec='${libname}${release}.sl$major'
6425   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6426   postinstall_cmds='chmod 555 $lib'
6427   ;;
6428
6429 irix5* | irix6* | nonstopux*)
6430   case $host_os in
6431     nonstopux*) version_type=nonstopux ;;
6432     *)          version_type=irix ;;
6433   esac
6434   need_lib_prefix=no
6435   need_version=no
6436   soname_spec='${libname}${release}.so$major'
6437   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6438   case $host_os in
6439   irix5* | nonstopux*)
6440     libsuff= shlibsuff=
6441     ;;
6442   *)
6443     case $LD in # libtool.m4 will add one of these switches to LD
6444     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6445     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6446     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6447     *) libsuff= shlibsuff= libmagic=never-match;;
6448     esac
6449     ;;
6450   esac
6451   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6452   shlibpath_overrides_runpath=no
6453   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6454   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6455   ;;
6456
6457 # No shared lib support for Linux oldld, aout, or coff.
6458 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6459   dynamic_linker=no
6460   ;;
6461
6462 # This must be Linux ELF.
6463 linux-gnu*)
6464   version_type=linux
6465   need_lib_prefix=no
6466   need_version=no
6467   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6468   soname_spec='${libname}${release}.so$major'
6469   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6470   shlibpath_var=LD_LIBRARY_PATH
6471   shlibpath_overrides_runpath=no
6472   # This implies no fast_install, which is unacceptable.
6473   # Some rework will be needed to allow for fast_install
6474   # before this can be enabled.
6475   hardcode_into_libs=yes
6476
6477   # We used to test for /lib/ld.so.1 and disable shared libraries on
6478   # powerpc, because MkLinux only supported shared libraries with the
6479   # GNU dynamic linker.  Since this was broken with cross compilers,
6480   # most powerpc-linux boxes support dynamic linking these days and
6481   # people can always --disable-shared, the test was removed, and we
6482   # assume the GNU/Linux dynamic linker is in use.
6483   dynamic_linker='GNU/Linux ld.so'
6484   ;;
6485
6486 netbsd*)
6487   version_type=sunos
6488   need_lib_prefix=no
6489   need_version=no
6490   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6491     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6492     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6493     dynamic_linker='NetBSD (a.out) ld.so'
6494   else
6495     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6496     soname_spec='${libname}${release}.so$major'
6497     dynamic_linker='NetBSD ld.elf_so'
6498   fi
6499   shlibpath_var=LD_LIBRARY_PATH
6500   shlibpath_overrides_runpath=yes
6501   hardcode_into_libs=yes
6502   ;;
6503
6504 newsos6)
6505   version_type=linux
6506   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6507   shlibpath_var=LD_LIBRARY_PATH
6508   shlibpath_overrides_runpath=yes
6509   ;;
6510
6511 openbsd*)
6512   version_type=sunos
6513   need_lib_prefix=no
6514   need_version=no
6515   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6516     case "$host_os" in
6517     openbsd2.[89] | openbsd2.[89].*)
6518       shlibpath_overrides_runpath=no
6519       ;;
6520     *)
6521       shlibpath_overrides_runpath=yes
6522       ;;
6523     esac
6524   else
6525     shlibpath_overrides_runpath=yes
6526   fi
6527   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6528   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6529   shlibpath_var=LD_LIBRARY_PATH
6530   ;;
6531
6532 openedition*)
6533   need_lib_prefix=no
6534   need_version=no
6535   shlibpath_overrides_runpath=yes
6536   shlibpath_var=LIBPATH
6537   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
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 sigset in -lV3""... $ac_c" 1>&6
9064 echo "configure:9065: checking for sigset in -lV3" >&5
9065 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9066 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9067   echo $ac_n "(cached) $ac_c" 1>&6
9068 else
9069   ac_save_LIBS="$LIBS"
9070 LIBS="-lV3  $LIBS"
9071 cat > conftest.$ac_ext <<EOF
9072 #line 9073 "configure"
9073 #include "confdefs.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 sigset();
9078
9079 int main() {
9080 sigset()
9081 ; return 0; }
9082 EOF
9083 if { (eval echo configure:9084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9084   rm -rf conftest*
9085   eval "ac_cv_lib_$ac_lib_var=yes"
9086 else
9087   echo "configure: failed program was:" >&5
9088   cat conftest.$ac_ext >&5
9089   rm -rf conftest*
9090   eval "ac_cv_lib_$ac_lib_var=no"
9091 fi
9092 rm -f conftest*
9093 LIBS="$ac_save_LIBS"
9094
9095 fi
9096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9097   echo "$ac_t""yes" 1>&6
9098     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9099     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9100   cat >> confdefs.h <<EOF
9101 #define $ac_tr_lib 1
9102 EOF
9103
9104   LIBS="-lV3 $LIBS"
9105
9106 else
9107   echo "$ac_t""no" 1>&6
9108 fi
9109
9110
9111 if test "$ac_cv_header_winsock_h" = yes; then
9112 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9113 echo "configure:9114: checking for winsock" >&5
9114 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9115   echo $ac_n "(cached) $ac_c" 1>&6
9116 else
9117   save_LIBS="$LIBS"
9118 for curlib in ws2_32 wsock32; do
9119         LIBS="$LIBS -l$curlib"
9120         cat > conftest.$ac_ext <<EOF
9121 #line 9122 "configure"
9122 #include "confdefs.h"
9123 #include <winsock.h>
9124                         
9125 int main() {
9126
9127                         socket(0,0,0);
9128                         select(0,NULL,NULL,NULL,NULL);
9129                         closesocket(0);
9130                         gethostname(NULL,0);
9131                         
9132 ; return 0; }
9133 EOF
9134 if { (eval echo configure:9135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9135   rm -rf conftest*
9136   ol_cv_winsock=yes
9137 else
9138   echo "configure: failed program was:" >&5
9139   cat conftest.$ac_ext >&5
9140   rm -rf conftest*
9141   ol_cv_winsock=no
9142 fi
9143 rm -f conftest*
9144
9145         if test $ol_cv_winsock = yes; then
9146                 cat >> confdefs.h <<\EOF
9147 #define HAVE_WINSOCK 1
9148 EOF
9149
9150                 ac_cv_func_socket=yes
9151                 ac_cv_func_select=yes
9152                 ac_cv_func_closesocket=yes
9153                 ac_cv_func_gethostname=yes
9154                 if test $curlib = ws2_32; then
9155                         ol_cv_winsock=winsock2
9156                         cat >> confdefs.h <<\EOF
9157 #define HAVE_WINSOCK2 1
9158 EOF
9159
9160                 fi
9161                 break
9162         fi
9163         LIBS="$save_LIBS"
9164 done
9165 fi
9166
9167 echo "$ac_t""$ol_cv_winsock" 1>&6
9168 fi
9169
9170
9171 echo $ac_n "checking for socket""... $ac_c" 1>&6
9172 echo "configure:9173: checking for socket" >&5
9173 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9174   echo $ac_n "(cached) $ac_c" 1>&6
9175 else
9176   cat > conftest.$ac_ext <<EOF
9177 #line 9178 "configure"
9178 #include "confdefs.h"
9179 /* System header to define __stub macros and hopefully few prototypes,
9180     which can conflict with char socket(); below.  */
9181 #include <assert.h>
9182 /* Override any gcc2 internal prototype to avoid an error.  */
9183 /* We use char because int might match the return type of a gcc2
9184     builtin and then its argument prototype would still apply.  */
9185 char socket();
9186 char (*f)();
9187
9188 int main() {
9189
9190 /* The GNU C library defines this for functions which it implements
9191     to always fail with ENOSYS.  Some functions are actually named
9192     something starting with __ and the normal name is an alias.  */
9193 #if defined (__stub_socket) || defined (__stub___socket)
9194 choke me
9195 #else
9196 f = socket;
9197 #endif
9198
9199 ; return 0; }
9200 EOF
9201 if { (eval echo configure:9202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9202   rm -rf conftest*
9203   eval "ac_cv_func_socket=yes"
9204 else
9205   echo "configure: failed program was:" >&5
9206   cat conftest.$ac_ext >&5
9207   rm -rf conftest*
9208   eval "ac_cv_func_socket=no"
9209 fi
9210 rm -f conftest*
9211 fi
9212
9213 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9214   echo "$ac_t""yes" 1>&6
9215   :
9216 else
9217   echo "$ac_t""no" 1>&6
9218         
9219         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9220 echo "configure:9221: checking for main in -lsocket" >&5
9221 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9222 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9223   echo $ac_n "(cached) $ac_c" 1>&6
9224 else
9225   ac_save_LIBS="$LIBS"
9226 LIBS="-lsocket  $LIBS"
9227 cat > conftest.$ac_ext <<EOF
9228 #line 9229 "configure"
9229 #include "confdefs.h"
9230
9231 int main() {
9232 main()
9233 ; return 0; }
9234 EOF
9235 if { (eval echo configure:9236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9236   rm -rf conftest*
9237   eval "ac_cv_lib_$ac_lib_var=yes"
9238 else
9239   echo "configure: failed program was:" >&5
9240   cat conftest.$ac_ext >&5
9241   rm -rf conftest*
9242   eval "ac_cv_lib_$ac_lib_var=no"
9243 fi
9244 rm -f conftest*
9245 LIBS="$ac_save_LIBS"
9246
9247 fi
9248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9249   echo "$ac_t""yes" 1>&6
9250     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9251     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9252   cat >> confdefs.h <<EOF
9253 #define $ac_tr_lib 1
9254 EOF
9255
9256   LIBS="-lsocket $LIBS"
9257
9258 else
9259   echo "$ac_t""no" 1>&6
9260 fi
9261
9262         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9263 echo "configure:9264: checking for main in -lnet" >&5
9264 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9265 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9266   echo $ac_n "(cached) $ac_c" 1>&6
9267 else
9268   ac_save_LIBS="$LIBS"
9269 LIBS="-lnet  $LIBS"
9270 cat > conftest.$ac_ext <<EOF
9271 #line 9272 "configure"
9272 #include "confdefs.h"
9273
9274 int main() {
9275 main()
9276 ; return 0; }
9277 EOF
9278 if { (eval echo configure:9279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9279   rm -rf conftest*
9280   eval "ac_cv_lib_$ac_lib_var=yes"
9281 else
9282   echo "configure: failed program was:" >&5
9283   cat conftest.$ac_ext >&5
9284   rm -rf conftest*
9285   eval "ac_cv_lib_$ac_lib_var=no"
9286 fi
9287 rm -f conftest*
9288 LIBS="$ac_save_LIBS"
9289
9290 fi
9291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9292   echo "$ac_t""yes" 1>&6
9293     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9294     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9295   cat >> confdefs.h <<EOF
9296 #define $ac_tr_lib 1
9297 EOF
9298
9299   LIBS="-lnet $LIBS"
9300
9301 else
9302   echo "$ac_t""no" 1>&6
9303 fi
9304
9305         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9306 echo "configure:9307: checking for main in -lnsl_s" >&5
9307 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9308 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9309   echo $ac_n "(cached) $ac_c" 1>&6
9310 else
9311   ac_save_LIBS="$LIBS"
9312 LIBS="-lnsl_s  $LIBS"
9313 cat > conftest.$ac_ext <<EOF
9314 #line 9315 "configure"
9315 #include "confdefs.h"
9316
9317 int main() {
9318 main()
9319 ; return 0; }
9320 EOF
9321 if { (eval echo configure:9322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9322   rm -rf conftest*
9323   eval "ac_cv_lib_$ac_lib_var=yes"
9324 else
9325   echo "configure: failed program was:" >&5
9326   cat conftest.$ac_ext >&5
9327   rm -rf conftest*
9328   eval "ac_cv_lib_$ac_lib_var=no"
9329 fi
9330 rm -f conftest*
9331 LIBS="$ac_save_LIBS"
9332
9333 fi
9334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9335   echo "$ac_t""yes" 1>&6
9336     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9337     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9338   cat >> confdefs.h <<EOF
9339 #define $ac_tr_lib 1
9340 EOF
9341
9342   LIBS="-lnsl_s $LIBS"
9343
9344 else
9345   echo "$ac_t""no" 1>&6
9346 fi
9347
9348         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9349 echo "configure:9350: checking for main in -lnsl" >&5
9350 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9351 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9352   echo $ac_n "(cached) $ac_c" 1>&6
9353 else
9354   ac_save_LIBS="$LIBS"
9355 LIBS="-lnsl  $LIBS"
9356 cat > conftest.$ac_ext <<EOF
9357 #line 9358 "configure"
9358 #include "confdefs.h"
9359
9360 int main() {
9361 main()
9362 ; return 0; }
9363 EOF
9364 if { (eval echo configure:9365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9365   rm -rf conftest*
9366   eval "ac_cv_lib_$ac_lib_var=yes"
9367 else
9368   echo "configure: failed program was:" >&5
9369   cat conftest.$ac_ext >&5
9370   rm -rf conftest*
9371   eval "ac_cv_lib_$ac_lib_var=no"
9372 fi
9373 rm -f conftest*
9374 LIBS="$ac_save_LIBS"
9375
9376 fi
9377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9378   echo "$ac_t""yes" 1>&6
9379     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9380     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9381   cat >> confdefs.h <<EOF
9382 #define $ac_tr_lib 1
9383 EOF
9384
9385   LIBS="-lnsl $LIBS"
9386
9387 else
9388   echo "$ac_t""no" 1>&6
9389 fi
9390
9391         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9392 echo "configure:9393: checking for socket in -linet" >&5
9393 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9394 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9395   echo $ac_n "(cached) $ac_c" 1>&6
9396 else
9397   ac_save_LIBS="$LIBS"
9398 LIBS="-linet  $LIBS"
9399 cat > conftest.$ac_ext <<EOF
9400 #line 9401 "configure"
9401 #include "confdefs.h"
9402 /* Override any gcc2 internal prototype to avoid an error.  */
9403 /* We use char because int might match the return type of a gcc2
9404     builtin and then its argument prototype would still apply.  */
9405 char socket();
9406
9407 int main() {
9408 socket()
9409 ; return 0; }
9410 EOF
9411 if { (eval echo configure:9412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9412   rm -rf conftest*
9413   eval "ac_cv_lib_$ac_lib_var=yes"
9414 else
9415   echo "configure: failed program was:" >&5
9416   cat conftest.$ac_ext >&5
9417   rm -rf conftest*
9418   eval "ac_cv_lib_$ac_lib_var=no"
9419 fi
9420 rm -f conftest*
9421 LIBS="$ac_save_LIBS"
9422
9423 fi
9424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9425   echo "$ac_t""yes" 1>&6
9426     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9427     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9428   cat >> confdefs.h <<EOF
9429 #define $ac_tr_lib 1
9430 EOF
9431
9432   LIBS="-linet $LIBS"
9433
9434 else
9435   echo "$ac_t""no" 1>&6
9436 fi
9437
9438         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9439 echo "configure:9440: checking for main in -lgen" >&5
9440 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9441 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9442   echo $ac_n "(cached) $ac_c" 1>&6
9443 else
9444   ac_save_LIBS="$LIBS"
9445 LIBS="-lgen  $LIBS"
9446 cat > conftest.$ac_ext <<EOF
9447 #line 9448 "configure"
9448 #include "confdefs.h"
9449
9450 int main() {
9451 main()
9452 ; return 0; }
9453 EOF
9454 if { (eval echo configure:9455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9455   rm -rf conftest*
9456   eval "ac_cv_lib_$ac_lib_var=yes"
9457 else
9458   echo "configure: failed program was:" >&5
9459   cat conftest.$ac_ext >&5
9460   rm -rf conftest*
9461   eval "ac_cv_lib_$ac_lib_var=no"
9462 fi
9463 rm -f conftest*
9464 LIBS="$ac_save_LIBS"
9465
9466 fi
9467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9468   echo "$ac_t""yes" 1>&6
9469     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9470     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9471   cat >> confdefs.h <<EOF
9472 #define $ac_tr_lib 1
9473 EOF
9474
9475   LIBS="-lgen $LIBS"
9476
9477 else
9478   echo "$ac_t""no" 1>&6
9479 fi
9480
9481
9482 fi
9483
9484
9485 echo $ac_n "checking for select""... $ac_c" 1>&6
9486 echo "configure:9487: checking for select" >&5
9487 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9488   echo $ac_n "(cached) $ac_c" 1>&6
9489 else
9490   cat > conftest.$ac_ext <<EOF
9491 #line 9492 "configure"
9492 #include "confdefs.h"
9493 /* System header to define __stub macros and hopefully few prototypes,
9494     which can conflict with char select(); below.  */
9495 #include <assert.h>
9496 /* Override any gcc2 internal prototype to avoid an error.  */
9497 /* We use char because int might match the return type of a gcc2
9498     builtin and then its argument prototype would still apply.  */
9499 char select();
9500 char (*f)();
9501
9502 int main() {
9503
9504 /* The GNU C library defines this for functions which it implements
9505     to always fail with ENOSYS.  Some functions are actually named
9506     something starting with __ and the normal name is an alias.  */
9507 #if defined (__stub_select) || defined (__stub___select)
9508 choke me
9509 #else
9510 f = select;
9511 #endif
9512
9513 ; return 0; }
9514 EOF
9515 if { (eval echo configure:9516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9516   rm -rf conftest*
9517   eval "ac_cv_func_select=yes"
9518 else
9519   echo "configure: failed program was:" >&5
9520   cat conftest.$ac_ext >&5
9521   rm -rf conftest*
9522   eval "ac_cv_func_select=no"
9523 fi
9524 rm -f conftest*
9525 fi
9526
9527 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9528   echo "$ac_t""yes" 1>&6
9529   :
9530 else
9531   echo "$ac_t""no" 1>&6
9532 { echo "configure: error: select() required." 1>&2; exit 1; }
9533 fi
9534
9535
9536 if test "${ac_cv_header_winsock_h}" != yes; then
9537                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9538 echo "configure:9539: checking types of arguments for select()" >&5
9539  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9540   echo $ac_n "(cached) $ac_c" 1>&6
9541 else
9542    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9543   echo $ac_n "(cached) $ac_c" 1>&6
9544 else
9545     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9546   echo $ac_n "(cached) $ac_c" 1>&6
9547 else
9548      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9549      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9550       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9551        cat > conftest.$ac_ext <<EOF
9552 #line 9553 "configure"
9553 #include "confdefs.h"
9554 #ifdef HAVE_SYS_TYPES_H
9555 #include <sys/types.h>
9556 #endif
9557 #ifdef HAVE_SYS_TIME_H
9558 #include <sys/time.h>
9559 #endif
9560 #ifdef HAVE_SYS_SELECT_H
9561 #include <sys/select.h>
9562 #endif
9563 #ifdef HAVE_SYS_SOCKET_H
9564 #include <sys/socket.h>
9565 #endif
9566 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);
9567 int main() {
9568
9569 ; return 0; }
9570 EOF
9571 if { (eval echo configure:9572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9572   rm -rf conftest*
9573           ac_not_found=no ; break 3
9574 else
9575   echo "configure: failed program was:" >&5
9576   cat conftest.$ac_ext >&5
9577   rm -rf conftest*
9578   ac_not_found=yes
9579 fi
9580 rm -f conftest*
9581       done
9582      done
9583     done
9584    
9585 fi
9586   
9587 fi
9588  
9589 fi
9590  if test "$ac_not_found" = yes; then
9591   ac_cv_func_select_arg1=int 
9592   ac_cv_func_select_arg234='int *' 
9593   ac_cv_func_select_arg5='struct timeval *'
9594  fi
9595  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9596  cat >> confdefs.h <<EOF
9597 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9598 EOF
9599
9600  cat >> confdefs.h <<EOF
9601 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9602 EOF
9603
9604  cat >> confdefs.h <<EOF
9605 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9606 EOF
9607
9608
9609 fi
9610
9611
9612 for ac_hdr in regex.h 
9613 do
9614 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9615 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9616 echo "configure:9617: checking for $ac_hdr" >&5
9617 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9618   echo $ac_n "(cached) $ac_c" 1>&6
9619 else
9620   cat > conftest.$ac_ext <<EOF
9621 #line 9622 "configure"
9622 #include "confdefs.h"
9623 #include <$ac_hdr>
9624 EOF
9625 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9626 { (eval echo configure:9627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9627 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9628 if test -z "$ac_err"; then
9629   rm -rf conftest*
9630   eval "ac_cv_header_$ac_safe=yes"
9631 else
9632   echo "$ac_err" >&5
9633   echo "configure: failed program was:" >&5
9634   cat conftest.$ac_ext >&5
9635   rm -rf conftest*
9636   eval "ac_cv_header_$ac_safe=no"
9637 fi
9638 rm -f conftest*
9639 fi
9640 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9641   echo "$ac_t""yes" 1>&6
9642     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9643   cat >> confdefs.h <<EOF
9644 #define $ac_tr_hdr 1
9645 EOF
9646  
9647 else
9648   echo "$ac_t""no" 1>&6
9649 fi
9650 done
9651
9652 if test "$ac_cv_header_regex_h" != yes ; then
9653         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9654 fi
9655
9656 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9657 echo "configure:9658: checking for library containing regfree" >&5
9658 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9659   echo $ac_n "(cached) $ac_c" 1>&6
9660 else
9661   ac_func_search_save_LIBS="$LIBS"
9662 ac_cv_search_regfree="no"
9663 cat > conftest.$ac_ext <<EOF
9664 #line 9665 "configure"
9665 #include "confdefs.h"
9666 /* Override any gcc2 internal prototype to avoid an error.  */
9667 /* We use char because int might match the return type of a gcc2
9668     builtin and then its argument prototype would still apply.  */
9669 char regfree();
9670
9671 int main() {
9672 regfree()
9673 ; return 0; }
9674 EOF
9675 if { (eval echo configure:9676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9676   rm -rf conftest*
9677   ac_cv_search_regfree="none required"
9678 else
9679   echo "configure: failed program was:" >&5
9680   cat conftest.$ac_ext >&5
9681 fi
9682 rm -f conftest*
9683 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9684 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9685 cat > conftest.$ac_ext <<EOF
9686 #line 9687 "configure"
9687 #include "confdefs.h"
9688 /* Override any gcc2 internal prototype to avoid an error.  */
9689 /* We use char because int might match the return type of a gcc2
9690     builtin and then its argument prototype would still apply.  */
9691 char regfree();
9692
9693 int main() {
9694 regfree()
9695 ; return 0; }
9696 EOF
9697 if { (eval echo configure:9698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9698   rm -rf conftest*
9699   ac_cv_search_regfree="-l$ac_lib"
9700 break
9701 else
9702   echo "configure: failed program was:" >&5
9703   cat conftest.$ac_ext >&5
9704 fi
9705 rm -f conftest*
9706 done
9707 LIBS="$ac_func_search_save_LIBS"
9708 fi
9709
9710 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9711 if test "$ac_cv_search_regfree" != "no"; then
9712   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9713   :
9714 else :
9715   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9716 fi
9717
9718
9719 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9720 echo "configure:9721: checking for compatible POSIX regex" >&5
9721 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9722   echo $ac_n "(cached) $ac_c" 1>&6
9723 else
9724   
9725         if test "$cross_compiling" = yes; then
9726   ol_cv_c_posix_regex=cross
9727 else
9728   cat > conftest.$ac_ext <<EOF
9729 #line 9730 "configure"
9730 #include "confdefs.h"
9731
9732 #include <sys/types.h>
9733 #include <regex.h>
9734 static char *pattern, *string;
9735 main()
9736 {
9737         int rc;
9738         regex_t re;
9739
9740         pattern = "^A";
9741
9742         if(regcomp(&re, pattern, 0)) {
9743                 return -1;
9744         }
9745         
9746         string = "ALL MATCH";
9747         
9748         rc = regexec(&re, string, 0, (void*)0, 0);
9749
9750         regfree(&re);
9751
9752         return rc;
9753 }
9754 EOF
9755 if { (eval echo configure:9756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9756 then
9757   ol_cv_c_posix_regex=yes
9758 else
9759   echo "configure: failed program was:" >&5
9760   cat conftest.$ac_ext >&5
9761   rm -fr conftest*
9762   ol_cv_c_posix_regex=no
9763 fi
9764 rm -fr conftest*
9765 fi
9766
9767 fi
9768
9769 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9770
9771 if test "$ol_cv_c_posix_regex" = no ; then
9772         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9773 fi
9774
9775
9776 have_uuid=no
9777 for ac_hdr in sys/uuid.h
9778 do
9779 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9780 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9781 echo "configure:9782: checking for $ac_hdr" >&5
9782 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9783   echo $ac_n "(cached) $ac_c" 1>&6
9784 else
9785   cat > conftest.$ac_ext <<EOF
9786 #line 9787 "configure"
9787 #include "confdefs.h"
9788 #include <$ac_hdr>
9789 EOF
9790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9791 { (eval echo configure:9792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9792 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9793 if test -z "$ac_err"; then
9794   rm -rf conftest*
9795   eval "ac_cv_header_$ac_safe=yes"
9796 else
9797   echo "$ac_err" >&5
9798   echo "configure: failed program was:" >&5
9799   cat conftest.$ac_ext >&5
9800   rm -rf conftest*
9801   eval "ac_cv_header_$ac_safe=no"
9802 fi
9803 rm -f conftest*
9804 fi
9805 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9806   echo "$ac_t""yes" 1>&6
9807     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9808   cat >> confdefs.h <<EOF
9809 #define $ac_tr_hdr 1
9810 EOF
9811  
9812 else
9813   echo "$ac_t""no" 1>&6
9814 fi
9815 done
9816
9817 if test $ac_cv_header_sys_uuid_h = yes ; then
9818         save_LIBS="$LIBS"
9819         
9820 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9821 echo "configure:9822: checking for library containing uuid_to_str" >&5
9822 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9823   echo $ac_n "(cached) $ac_c" 1>&6
9824 else
9825   ac_func_search_save_LIBS="$LIBS"
9826 ac_cv_search_uuid_to_str="no"
9827 cat > conftest.$ac_ext <<EOF
9828 #line 9829 "configure"
9829 #include "confdefs.h"
9830 /* Override any gcc2 internal prototype to avoid an error.  */
9831 /* We use char because int might match the return type of a gcc2
9832     builtin and then its argument prototype would still apply.  */
9833 char uuid_to_str();
9834
9835 int main() {
9836 uuid_to_str()
9837 ; return 0; }
9838 EOF
9839 if { (eval echo configure:9840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9840   rm -rf conftest*
9841   ac_cv_search_uuid_to_str="none required"
9842 else
9843   echo "configure: failed program was:" >&5
9844   cat conftest.$ac_ext >&5
9845 fi
9846 rm -f conftest*
9847 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9848 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9849 cat > conftest.$ac_ext <<EOF
9850 #line 9851 "configure"
9851 #include "confdefs.h"
9852 /* Override any gcc2 internal prototype to avoid an error.  */
9853 /* We use char because int might match the return type of a gcc2
9854     builtin and then its argument prototype would still apply.  */
9855 char uuid_to_str();
9856
9857 int main() {
9858 uuid_to_str()
9859 ; return 0; }
9860 EOF
9861 if { (eval echo configure:9862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9862   rm -rf conftest*
9863   ac_cv_search_uuid_to_str="-l$ac_lib"
9864 break
9865 else
9866   echo "configure: failed program was:" >&5
9867   cat conftest.$ac_ext >&5
9868 fi
9869 rm -f conftest*
9870 done
9871 LIBS="$ac_func_search_save_LIBS"
9872 fi
9873
9874 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9875 if test "$ac_cv_search_uuid_to_str" != "no"; then
9876   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9877   have_uuid=yes
9878 else :
9879   :
9880 fi
9881         LIBS="$save_LIBS"
9882
9883         if test have_uuid = yes ; then
9884                 cat >> confdefs.h <<\EOF
9885 #define HAVE_UUID_TO_STR 1
9886 EOF
9887
9888
9889                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9890                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9891         fi
9892 fi
9893
9894 if test $have_uuid = no ; then
9895         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9896 echo "configure:9897: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9897         save_LIBS="$LIBS"
9898         LIBS="$LIBS -lrpcrt4"
9899         cat > conftest.$ac_ext <<EOF
9900 #line 9901 "configure"
9901 #include "confdefs.h"
9902
9903                 int __stdcall UuidCreate(void *);
9904                 int __stdcall UuidToStringA(void *,void **);
9905                 
9906 int main() {
9907
9908                 UuidCreate(0);
9909                 UuidToStringA(0,0);
9910                 
9911 ; return 0; }
9912 EOF
9913 if { (eval echo configure:9914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9914   rm -rf conftest*
9915   need_rpcrt=yes
9916 else
9917   echo "configure: failed program was:" >&5
9918   cat conftest.$ac_ext >&5
9919   rm -rf conftest*
9920   need_rpcrt=no
9921 fi
9922 rm -f conftest*
9923         if test $need_rpcrt = yes; then
9924                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9925         fi
9926         LIBS="$save_LIBS"
9927         echo "$ac_t""$need_rpcrt" 1>&6
9928 fi
9929
9930 ol_link_dnssrv=no
9931 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9932 echo "configure:9933: checking for res_query" >&5
9933 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9934   echo $ac_n "(cached) $ac_c" 1>&6
9935 else
9936   cat > conftest.$ac_ext <<EOF
9937 #line 9938 "configure"
9938 #include "confdefs.h"
9939 /* System header to define __stub macros and hopefully few prototypes,
9940     which can conflict with char res_query(); below.  */
9941 #include <assert.h>
9942 /* Override any gcc2 internal prototype to avoid an error.  */
9943 /* We use char because int might match the return type of a gcc2
9944     builtin and then its argument prototype would still apply.  */
9945 char res_query();
9946 char (*f)();
9947
9948 int main() {
9949
9950 /* The GNU C library defines this for functions which it implements
9951     to always fail with ENOSYS.  Some functions are actually named
9952     something starting with __ and the normal name is an alias.  */
9953 #if defined (__stub_res_query) || defined (__stub___res_query)
9954 choke me
9955 #else
9956 f = res_query;
9957 #endif
9958
9959 ; return 0; }
9960 EOF
9961 if { (eval echo configure:9962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9962   rm -rf conftest*
9963   eval "ac_cv_func_res_query=yes"
9964 else
9965   echo "configure: failed program was:" >&5
9966   cat conftest.$ac_ext >&5
9967   rm -rf conftest*
9968   eval "ac_cv_func_res_query=no"
9969 fi
9970 rm -f conftest*
9971 fi
9972
9973 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9974   echo "$ac_t""yes" 1>&6
9975   :
9976 else
9977   echo "$ac_t""no" 1>&6
9978 fi
9979
9980 if test $ac_cv_func_res_query = no ; then 
9981         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9982 echo "configure:9983: checking for __res_query" >&5
9983 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9984   echo $ac_n "(cached) $ac_c" 1>&6
9985 else
9986   cat > conftest.$ac_ext <<EOF
9987 #line 9988 "configure"
9988 #include "confdefs.h"
9989 /* System header to define __stub macros and hopefully few prototypes,
9990     which can conflict with char __res_query(); below.  */
9991 #include <assert.h>
9992 /* Override any gcc2 internal prototype to avoid an error.  */
9993 /* We use char because int might match the return type of a gcc2
9994     builtin and then its argument prototype would still apply.  */
9995 char __res_query();
9996 char (*f)();
9997
9998 int main() {
9999
10000 /* The GNU C library defines this for functions which it implements
10001     to always fail with ENOSYS.  Some functions are actually named
10002     something starting with __ and the normal name is an alias.  */
10003 #if defined (__stub___res_query) || defined (__stub_____res_query)
10004 choke me
10005 #else
10006 f = __res_query;
10007 #endif
10008
10009 ; return 0; }
10010 EOF
10011 if { (eval echo configure:10012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10012   rm -rf conftest*
10013   eval "ac_cv_func___res_query=yes"
10014 else
10015   echo "configure: failed program was:" >&5
10016   cat conftest.$ac_ext >&5
10017   rm -rf conftest*
10018   eval "ac_cv_func___res_query=no"
10019 fi
10020 rm -f conftest*
10021 fi
10022
10023 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10024   echo "$ac_t""yes" 1>&6
10025   :
10026 else
10027   echo "$ac_t""no" 1>&6
10028 fi
10029
10030         ac_cv_func_res_query=$ac_cv_func___res_query
10031 fi
10032
10033 if test $ac_cv_func_res_query = no ; then 
10034         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10035 echo "configure:10036: checking for res_query in -lbind" >&5
10036 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10037 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10038   echo $ac_n "(cached) $ac_c" 1>&6
10039 else
10040   ac_save_LIBS="$LIBS"
10041 LIBS="-lbind  $LIBS"
10042 cat > conftest.$ac_ext <<EOF
10043 #line 10044 "configure"
10044 #include "confdefs.h"
10045 /* Override any gcc2 internal prototype to avoid an error.  */
10046 /* We use char because int might match the return type of a gcc2
10047     builtin and then its argument prototype would still apply.  */
10048 char res_query();
10049
10050 int main() {
10051 res_query()
10052 ; return 0; }
10053 EOF
10054 if { (eval echo configure:10055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10055   rm -rf conftest*
10056   eval "ac_cv_lib_$ac_lib_var=yes"
10057 else
10058   echo "configure: failed program was:" >&5
10059   cat conftest.$ac_ext >&5
10060   rm -rf conftest*
10061   eval "ac_cv_lib_$ac_lib_var=no"
10062 fi
10063 rm -f conftest*
10064 LIBS="$ac_save_LIBS"
10065
10066 fi
10067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10068   echo "$ac_t""yes" 1>&6
10069     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10071   cat >> confdefs.h <<EOF
10072 #define $ac_tr_lib 1
10073 EOF
10074
10075   LIBS="-lbind $LIBS"
10076
10077 else
10078   echo "$ac_t""no" 1>&6
10079 fi
10080
10081         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10082 fi
10083
10084 if test $ac_cv_func_res_query = no ; then 
10085         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10086 echo "configure:10087: checking for __res_query in -lbind" >&5
10087 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10088 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10089   echo $ac_n "(cached) $ac_c" 1>&6
10090 else
10091   ac_save_LIBS="$LIBS"
10092 LIBS="-lbind  $LIBS"
10093 cat > conftest.$ac_ext <<EOF
10094 #line 10095 "configure"
10095 #include "confdefs.h"
10096 /* Override any gcc2 internal prototype to avoid an error.  */
10097 /* We use char because int might match the return type of a gcc2
10098     builtin and then its argument prototype would still apply.  */
10099 char __res_query();
10100
10101 int main() {
10102 __res_query()
10103 ; return 0; }
10104 EOF
10105 if { (eval echo configure:10106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10106   rm -rf conftest*
10107   eval "ac_cv_lib_$ac_lib_var=yes"
10108 else
10109   echo "configure: failed program was:" >&5
10110   cat conftest.$ac_ext >&5
10111   rm -rf conftest*
10112   eval "ac_cv_lib_$ac_lib_var=no"
10113 fi
10114 rm -f conftest*
10115 LIBS="$ac_save_LIBS"
10116
10117 fi
10118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10119   echo "$ac_t""yes" 1>&6
10120     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10121     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10122   cat >> confdefs.h <<EOF
10123 #define $ac_tr_lib 1
10124 EOF
10125
10126   LIBS="-lbind $LIBS"
10127
10128 else
10129   echo "$ac_t""no" 1>&6
10130 fi
10131
10132         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10133 fi
10134
10135 if test $ac_cv_func_res_query = no ; then 
10136         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10137 echo "configure:10138: checking for res_query in -lresolv" >&5
10138 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10139 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10140   echo $ac_n "(cached) $ac_c" 1>&6
10141 else
10142   ac_save_LIBS="$LIBS"
10143 LIBS="-lresolv  $LIBS"
10144 cat > conftest.$ac_ext <<EOF
10145 #line 10146 "configure"
10146 #include "confdefs.h"
10147 /* Override any gcc2 internal prototype to avoid an error.  */
10148 /* We use char because int might match the return type of a gcc2
10149     builtin and then its argument prototype would still apply.  */
10150 char res_query();
10151
10152 int main() {
10153 res_query()
10154 ; return 0; }
10155 EOF
10156 if { (eval echo configure:10157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10157   rm -rf conftest*
10158   eval "ac_cv_lib_$ac_lib_var=yes"
10159 else
10160   echo "configure: failed program was:" >&5
10161   cat conftest.$ac_ext >&5
10162   rm -rf conftest*
10163   eval "ac_cv_lib_$ac_lib_var=no"
10164 fi
10165 rm -f conftest*
10166 LIBS="$ac_save_LIBS"
10167
10168 fi
10169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10170   echo "$ac_t""yes" 1>&6
10171     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10172     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10173   cat >> confdefs.h <<EOF
10174 #define $ac_tr_lib 1
10175 EOF
10176
10177   LIBS="-lresolv $LIBS"
10178
10179 else
10180   echo "$ac_t""no" 1>&6
10181 fi
10182
10183         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10184 fi
10185
10186 if test $ac_cv_func_res_query = no ; then 
10187         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10188 echo "configure:10189: checking for __res_query in -lresolv" >&5
10189 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10190 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10191   echo $ac_n "(cached) $ac_c" 1>&6
10192 else
10193   ac_save_LIBS="$LIBS"
10194 LIBS="-lresolv  $LIBS"
10195 cat > conftest.$ac_ext <<EOF
10196 #line 10197 "configure"
10197 #include "confdefs.h"
10198 /* Override any gcc2 internal prototype to avoid an error.  */
10199 /* We use char because int might match the return type of a gcc2
10200     builtin and then its argument prototype would still apply.  */
10201 char __res_query();
10202
10203 int main() {
10204 __res_query()
10205 ; return 0; }
10206 EOF
10207 if { (eval echo configure:10208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10208   rm -rf conftest*
10209   eval "ac_cv_lib_$ac_lib_var=yes"
10210 else
10211   echo "configure: failed program was:" >&5
10212   cat conftest.$ac_ext >&5
10213   rm -rf conftest*
10214   eval "ac_cv_lib_$ac_lib_var=no"
10215 fi
10216 rm -f conftest*
10217 LIBS="$ac_save_LIBS"
10218
10219 fi
10220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10221   echo "$ac_t""yes" 1>&6
10222     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10223     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10224   cat >> confdefs.h <<EOF
10225 #define $ac_tr_lib 1
10226 EOF
10227
10228   LIBS="-lresolv $LIBS"
10229
10230 else
10231   echo "$ac_t""no" 1>&6
10232 fi
10233
10234         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10235 fi
10236
10237 if test "$ac_cv_func_res_query" = yes ; then
10238         cat >> confdefs.h <<\EOF
10239 #define HAVE_RES_QUERY 1
10240 EOF
10241
10242
10243         if test $ol_enable_dnssrv != no ; then
10244                 ol_link_dnssrv=yes
10245         fi
10246 fi
10247
10248 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10249         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10250 fi
10251
10252 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10253 do
10254 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10255 echo "configure:10256: checking for $ac_func" >&5
10256 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10257   echo $ac_n "(cached) $ac_c" 1>&6
10258 else
10259   cat > conftest.$ac_ext <<EOF
10260 #line 10261 "configure"
10261 #include "confdefs.h"
10262 /* System header to define __stub macros and hopefully few prototypes,
10263     which can conflict with char $ac_func(); below.  */
10264 #include <assert.h>
10265 /* Override any gcc2 internal prototype to avoid an error.  */
10266 /* We use char because int might match the return type of a gcc2
10267     builtin and then its argument prototype would still apply.  */
10268 char $ac_func();
10269 char (*f)();
10270
10271 int main() {
10272
10273 /* The GNU C library defines this for functions which it implements
10274     to always fail with ENOSYS.  Some functions are actually named
10275     something starting with __ and the normal name is an alias.  */
10276 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10277 choke me
10278 #else
10279 f = $ac_func;
10280 #endif
10281
10282 ; return 0; }
10283 EOF
10284 if { (eval echo configure:10285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10285   rm -rf conftest*
10286   eval "ac_cv_func_$ac_func=yes"
10287 else
10288   echo "configure: failed program was:" >&5
10289   cat conftest.$ac_ext >&5
10290   rm -rf conftest*
10291   eval "ac_cv_func_$ac_func=no"
10292 fi
10293 rm -f conftest*
10294 fi
10295
10296 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10297   echo "$ac_t""yes" 1>&6
10298     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10299   cat >> confdefs.h <<EOF
10300 #define $ac_tr_func 1
10301 EOF
10302  
10303 else
10304   echo "$ac_t""no" 1>&6
10305 fi
10306 done
10307
10308
10309 ol_link_ipv6=no
10310 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10311         if test $ol_enable_ipv6 = yes ; then
10312                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10313         fi
10314 elif test $ol_enable_ipv6 != no ; then
10315         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10316 echo "configure:10317: checking INET6_ADDRSTRLEN" >&5
10317 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10318   echo $ac_n "(cached) $ac_c" 1>&6
10319 else
10320   
10321                 cat > conftest.$ac_ext <<EOF
10322 #line 10323 "configure"
10323 #include "confdefs.h"
10324
10325 #                       include <netinet/in.h>
10326 #                       ifdef INET6_ADDRSTRLEN
10327                                 __has_inet6_addrstrlen__;
10328 #                       endif
10329                 
10330 EOF
10331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10332   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10333   rm -rf conftest*
10334   ol_cv_inet6_addrstrlen=yes
10335 else
10336   rm -rf conftest*
10337   ol_cv_inet6_addrstrlen=no
10338 fi
10339 rm -f conftest*
10340
10341 fi
10342
10343 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10344
10345
10346         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10347 echo "configure:10348: checking struct sockaddr_storage" >&5
10348 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10349   echo $ac_n "(cached) $ac_c" 1>&6
10350 else
10351   
10352                 cat > conftest.$ac_ext <<EOF
10353 #line 10354 "configure"
10354 #include "confdefs.h"
10355
10356 #include <sys/types.h>
10357 #include <sys/socket.h>
10358
10359 int main() {
10360
10361                         struct sockaddr_storage ss;
10362
10363 ; return 0; }
10364 EOF
10365 if { (eval echo configure:10366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10366   rm -rf conftest*
10367   ol_cv_struct_sockaddr_storage=yes
10368 else
10369   echo "configure: failed program was:" >&5
10370   cat conftest.$ac_ext >&5
10371   rm -rf conftest*
10372   ol_cv_struct_sockaddr_storage=no
10373 fi
10374 rm -f conftest*
10375 fi
10376
10377 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10378
10379         if test $ol_cv_inet6_addrstrlen = yes \
10380                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10381                 ol_link_ipv6=yes
10382         elif test $ol_enable_ipv6 = yes \
10383                         -a $ol_cv_inet6_addrstrlen = no ; then
10384                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10385         elif test $ol_enable_ipv6 = yes \
10386                         -a $ol_cv_struct_sockaddr_storage = no ; then
10387                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10388         fi
10389 fi
10390
10391 if test $ol_enable_local != no ; then
10392         for ac_hdr in sys/un.h 
10393 do
10394 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10395 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10396 echo "configure:10397: checking for $ac_hdr" >&5
10397 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10398   echo $ac_n "(cached) $ac_c" 1>&6
10399 else
10400   cat > conftest.$ac_ext <<EOF
10401 #line 10402 "configure"
10402 #include "confdefs.h"
10403 #include <$ac_hdr>
10404 EOF
10405 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10406 { (eval echo configure:10407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10407 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10408 if test -z "$ac_err"; then
10409   rm -rf conftest*
10410   eval "ac_cv_header_$ac_safe=yes"
10411 else
10412   echo "$ac_err" >&5
10413   echo "configure: failed program was:" >&5
10414   cat conftest.$ac_ext >&5
10415   rm -rf conftest*
10416   eval "ac_cv_header_$ac_safe=no"
10417 fi
10418 rm -f conftest*
10419 fi
10420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10421   echo "$ac_t""yes" 1>&6
10422     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10423   cat >> confdefs.h <<EOF
10424 #define $ac_tr_hdr 1
10425 EOF
10426  
10427 else
10428   echo "$ac_t""no" 1>&6
10429 fi
10430 done
10431
10432
10433         if test $ol_enable_local = auto ; then
10434                 ol_enable_local=$ac_cv_header_sys_un_h
10435         elif test $ac_cv_header_sys_un_h = no ; then
10436                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10437         fi
10438 fi
10439
10440 ol_link_kbind=no
10441 ol_link_krb5=no
10442 ol_link_krb4=no
10443
10444 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10445         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10446         -o $ol_with_kerberos = k425 ; then
10447
10448         for ac_hdr in krb5.h
10449 do
10450 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10451 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10452 echo "configure:10453: checking for $ac_hdr" >&5
10453 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10454   echo $ac_n "(cached) $ac_c" 1>&6
10455 else
10456   cat > conftest.$ac_ext <<EOF
10457 #line 10458 "configure"
10458 #include "confdefs.h"
10459 #include <$ac_hdr>
10460 EOF
10461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10462 { (eval echo configure:10463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10464 if test -z "$ac_err"; then
10465   rm -rf conftest*
10466   eval "ac_cv_header_$ac_safe=yes"
10467 else
10468   echo "$ac_err" >&5
10469   echo "configure: failed program was:" >&5
10470   cat conftest.$ac_ext >&5
10471   rm -rf conftest*
10472   eval "ac_cv_header_$ac_safe=no"
10473 fi
10474 rm -f conftest*
10475 fi
10476 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10477   echo "$ac_t""yes" 1>&6
10478     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10479   cat >> confdefs.h <<EOF
10480 #define $ac_tr_hdr 1
10481 EOF
10482  
10483 else
10484   echo "$ac_t""no" 1>&6
10485 fi
10486 done
10487
10488
10489         if test $ac_cv_header_krb5_h = yes ; then
10490                                 for ac_hdr in heim_err.h
10491 do
10492 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10493 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10494 echo "configure:10495: checking for $ac_hdr" >&5
10495 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10496   echo $ac_n "(cached) $ac_c" 1>&6
10497 else
10498   cat > conftest.$ac_ext <<EOF
10499 #line 10500 "configure"
10500 #include "confdefs.h"
10501 #include <$ac_hdr>
10502 EOF
10503 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10504 { (eval echo configure:10505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10505 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10506 if test -z "$ac_err"; then
10507   rm -rf conftest*
10508   eval "ac_cv_header_$ac_safe=yes"
10509 else
10510   echo "$ac_err" >&5
10511   echo "configure: failed program was:" >&5
10512   cat conftest.$ac_ext >&5
10513   rm -rf conftest*
10514   eval "ac_cv_header_$ac_safe=no"
10515 fi
10516 rm -f conftest*
10517 fi
10518 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10519   echo "$ac_t""yes" 1>&6
10520     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10521   cat >> confdefs.h <<EOF
10522 #define $ac_tr_hdr 1
10523 EOF
10524  
10525 else
10526   echo "$ac_t""no" 1>&6
10527 fi
10528 done
10529
10530                 if test $ac_cv_header_heim_err_h = yes ; then
10531                         krb5_impl=heimdal
10532                 else
10533                         krb5_impl=mit
10534                 fi
10535
10536                 if test $krb5_impl = mit; then
10537                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10538 echo "configure:10539: checking for main in -lk5crypto" >&5
10539 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10540 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10541   echo $ac_n "(cached) $ac_c" 1>&6
10542 else
10543   ac_save_LIBS="$LIBS"
10544 LIBS="-lk5crypto  $LIBS"
10545 cat > conftest.$ac_ext <<EOF
10546 #line 10547 "configure"
10547 #include "confdefs.h"
10548
10549 int main() {
10550 main()
10551 ; return 0; }
10552 EOF
10553 if { (eval echo configure:10554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10554   rm -rf conftest*
10555   eval "ac_cv_lib_$ac_lib_var=yes"
10556 else
10557   echo "configure: failed program was:" >&5
10558   cat conftest.$ac_ext >&5
10559   rm -rf conftest*
10560   eval "ac_cv_lib_$ac_lib_var=no"
10561 fi
10562 rm -f conftest*
10563 LIBS="$ac_save_LIBS"
10564
10565 fi
10566 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10567   echo "$ac_t""yes" 1>&6
10568   krb5crypto=k5crypto
10569 else
10570   echo "$ac_t""no" 1>&6
10571 krb5crypto=crypto
10572 fi
10573
10574
10575                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10576 echo "configure:10577: checking for main in -lkrb5" >&5
10577 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10578 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10579   echo $ac_n "(cached) $ac_c" 1>&6
10580 else
10581   ac_save_LIBS="$LIBS"
10582 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10583 cat > conftest.$ac_ext <<EOF
10584 #line 10585 "configure"
10585 #include "confdefs.h"
10586
10587 int main() {
10588 main()
10589 ; return 0; }
10590 EOF
10591 if { (eval echo configure:10592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10592   rm -rf conftest*
10593   eval "ac_cv_lib_$ac_lib_var=yes"
10594 else
10595   echo "configure: failed program was:" >&5
10596   cat conftest.$ac_ext >&5
10597   rm -rf conftest*
10598   eval "ac_cv_lib_$ac_lib_var=no"
10599 fi
10600 rm -f conftest*
10601 LIBS="$ac_save_LIBS"
10602
10603 fi
10604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10605   echo "$ac_t""yes" 1>&6
10606   have_krb5=yes
10607                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10608 else
10609   echo "$ac_t""no" 1>&6
10610 have_krb5=no
10611 fi
10612
10613
10614                 elif test $krb5_impl = heimdal; then
10615                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10616 echo "configure:10617: checking for main in -ldes" >&5
10617 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10618 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10619   echo $ac_n "(cached) $ac_c" 1>&6
10620 else
10621   ac_save_LIBS="$LIBS"
10622 LIBS="-ldes  $LIBS"
10623 cat > conftest.$ac_ext <<EOF
10624 #line 10625 "configure"
10625 #include "confdefs.h"
10626
10627 int main() {
10628 main()
10629 ; return 0; }
10630 EOF
10631 if { (eval echo configure:10632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10632   rm -rf conftest*
10633   eval "ac_cv_lib_$ac_lib_var=yes"
10634 else
10635   echo "configure: failed program was:" >&5
10636   cat conftest.$ac_ext >&5
10637   rm -rf conftest*
10638   eval "ac_cv_lib_$ac_lib_var=no"
10639 fi
10640 rm -f conftest*
10641 LIBS="$ac_save_LIBS"
10642
10643 fi
10644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10645   echo "$ac_t""yes" 1>&6
10646   krb5crypto=des
10647 else
10648   echo "$ac_t""no" 1>&6
10649 krb5crypto=crypto
10650 fi
10651
10652
10653                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10654 echo "configure:10655: checking for main in -lkrb5" >&5
10655 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10656 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10657   echo $ac_n "(cached) $ac_c" 1>&6
10658 else
10659   ac_save_LIBS="$LIBS"
10660 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10661 cat > conftest.$ac_ext <<EOF
10662 #line 10663 "configure"
10663 #include "confdefs.h"
10664
10665 int main() {
10666 main()
10667 ; return 0; }
10668 EOF
10669 if { (eval echo configure:10670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10670   rm -rf conftest*
10671   eval "ac_cv_lib_$ac_lib_var=yes"
10672 else
10673   echo "configure: failed program was:" >&5
10674   cat conftest.$ac_ext >&5
10675   rm -rf conftest*
10676   eval "ac_cv_lib_$ac_lib_var=no"
10677 fi
10678 rm -f conftest*
10679 LIBS="$ac_save_LIBS"
10680
10681 fi
10682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10683   echo "$ac_t""yes" 1>&6
10684   have_krb5=yes
10685                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10686 else
10687   echo "$ac_t""no" 1>&6
10688 have_krb5=no
10689 fi
10690
10691
10692                         cat >> confdefs.h <<\EOF
10693 #define HAVE_HEIMDAL_KERBEROS 1
10694 EOF
10695
10696
10697                 else
10698                         have_krb5=no
10699                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10700                 fi
10701
10702                 if test $have_krb5 = yes ; then
10703                         ol_link_krb5=yes
10704
10705                         cat >> confdefs.h <<\EOF
10706 #define HAVE_KRB5 1
10707 EOF
10708
10709
10710                         if test $ol_with_kerberos = k5only ; then
10711                                 ol_with_kerberos=found
10712                         fi
10713
10714                 elif test $ol_with_kerberos != auto ; then
10715                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10716                 fi
10717
10718         fi
10719 fi
10720
10721 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10722         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10723
10724         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10725 do
10726 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10727 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10728 echo "configure:10729: checking for $ac_hdr" >&5
10729 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10730   echo $ac_n "(cached) $ac_c" 1>&6
10731 else
10732   cat > conftest.$ac_ext <<EOF
10733 #line 10734 "configure"
10734 #include "confdefs.h"
10735 #include <$ac_hdr>
10736 EOF
10737 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10738 { (eval echo configure:10739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10739 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10740 if test -z "$ac_err"; then
10741   rm -rf conftest*
10742   eval "ac_cv_header_$ac_safe=yes"
10743 else
10744   echo "$ac_err" >&5
10745   echo "configure: failed program was:" >&5
10746   cat conftest.$ac_ext >&5
10747   rm -rf conftest*
10748   eval "ac_cv_header_$ac_safe=no"
10749 fi
10750 rm -f conftest*
10751 fi
10752 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10753   echo "$ac_t""yes" 1>&6
10754     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10755   cat >> confdefs.h <<EOF
10756 #define $ac_tr_hdr 1
10757 EOF
10758  
10759 else
10760   echo "$ac_t""no" 1>&6
10761 fi
10762 done
10763
10764
10765         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10766                 if test $krb5_impl = mit; then
10767                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10768 echo "configure:10769: checking for main in -lkrb4" >&5
10769 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10770 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10771   echo $ac_n "(cached) $ac_c" 1>&6
10772 else
10773   ac_save_LIBS="$LIBS"
10774 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10775 cat > conftest.$ac_ext <<EOF
10776 #line 10777 "configure"
10777 #include "confdefs.h"
10778
10779 int main() {
10780 main()
10781 ; return 0; }
10782 EOF
10783 if { (eval echo configure:10784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10784   rm -rf conftest*
10785   eval "ac_cv_lib_$ac_lib_var=yes"
10786 else
10787   echo "configure: failed program was:" >&5
10788   cat conftest.$ac_ext >&5
10789   rm -rf conftest*
10790   eval "ac_cv_lib_$ac_lib_var=no"
10791 fi
10792 rm -f conftest*
10793 LIBS="$ac_save_LIBS"
10794
10795 fi
10796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10797   echo "$ac_t""yes" 1>&6
10798   have_k425=yes
10799                                 KRB4_LIBS="-lkrb4 -ldes425"
10800 else
10801   echo "$ac_t""no" 1>&6
10802 have_k425=no
10803 fi
10804
10805
10806                 elif test $krb5_impl = heimdal; then
10807                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10808 echo "configure:10809: checking for main in -lkrb4" >&5
10809 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10810 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10811   echo $ac_n "(cached) $ac_c" 1>&6
10812 else
10813   ac_save_LIBS="$LIBS"
10814 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10815 cat > conftest.$ac_ext <<EOF
10816 #line 10817 "configure"
10817 #include "confdefs.h"
10818
10819 int main() {
10820 main()
10821 ; return 0; }
10822 EOF
10823 if { (eval echo configure:10824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10824   rm -rf conftest*
10825   eval "ac_cv_lib_$ac_lib_var=yes"
10826 else
10827   echo "configure: failed program was:" >&5
10828   cat conftest.$ac_ext >&5
10829   rm -rf conftest*
10830   eval "ac_cv_lib_$ac_lib_var=no"
10831 fi
10832 rm -f conftest*
10833 LIBS="$ac_save_LIBS"
10834
10835 fi
10836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10837   echo "$ac_t""yes" 1>&6
10838   have_k425=yes
10839                                 KRB4_LIBS="-lkrb4"
10840 else
10841   echo "$ac_t""no" 1>&6
10842 have_k425=no
10843 fi
10844
10845
10846                 else
10847                         have_425=no
10848                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10849                 fi
10850
10851                 if test $have_k425 = yes ; then
10852                         ol_with_kerberos=found
10853                         ol_link_krb4=yes
10854
10855                         cat >> confdefs.h <<\EOF
10856 #define HAVE_KRB425 1
10857 EOF
10858
10859                         cat >> confdefs.h <<\EOF
10860 #define HAVE_KRB4 1
10861 EOF
10862
10863
10864                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10865 echo "configure:10866: checking for des_debug in Kerberos libraries" >&5
10866 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10867   echo $ac_n "(cached) $ac_c" 1>&6
10868 else
10869   
10870                                                                 save_LIBS="$LIBS"
10871                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10872                                 cat > conftest.$ac_ext <<EOF
10873 #line 10874 "configure"
10874 #include "confdefs.h"
10875
10876 #include <kerberosIV/krb.h>
10877 #include <kerberosIV/des.h>
10878 extern int des_debug;
10879
10880 int main() {
10881
10882 des_debug = 1;
10883
10884 ; return 0; }
10885 EOF
10886 if { (eval echo configure:10887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10887   rm -rf conftest*
10888   ol_cv_var_des_debug=yes
10889 else
10890   echo "configure: failed program was:" >&5
10891   cat conftest.$ac_ext >&5
10892   rm -rf conftest*
10893   ol_cv_var_des_debug=no
10894 fi
10895 rm -f conftest*
10896                                                                 LIBS="$save_LIBS"
10897                         
10898 fi
10899
10900 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10901
10902                         if test $ol_cv_var_des_debug = yes ; then
10903                                 cat >> confdefs.h <<\EOF
10904 #define HAVE_DES_DEBUG 1
10905 EOF
10906
10907                         fi
10908
10909                         LIBS="$save_LIBS"
10910                 fi
10911         fi
10912 fi
10913
10914 if test $ol_link_krb5 = yes ; then
10915         ol_with_kerberos=found
10916 fi
10917
10918 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10919         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10920
10921         for ac_hdr in krb.h des.h krb-archaeology.h 
10922 do
10923 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10924 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10925 echo "configure:10926: checking for $ac_hdr" >&5
10926 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10927   echo $ac_n "(cached) $ac_c" 1>&6
10928 else
10929   cat > conftest.$ac_ext <<EOF
10930 #line 10931 "configure"
10931 #include "confdefs.h"
10932 #include <$ac_hdr>
10933 EOF
10934 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10935 { (eval echo configure:10936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10936 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10937 if test -z "$ac_err"; then
10938   rm -rf conftest*
10939   eval "ac_cv_header_$ac_safe=yes"
10940 else
10941   echo "$ac_err" >&5
10942   echo "configure: failed program was:" >&5
10943   cat conftest.$ac_ext >&5
10944   rm -rf conftest*
10945   eval "ac_cv_header_$ac_safe=no"
10946 fi
10947 rm -f conftest*
10948 fi
10949 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10950   echo "$ac_t""yes" 1>&6
10951     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10952   cat >> confdefs.h <<EOF
10953 #define $ac_tr_hdr 1
10954 EOF
10955  
10956 else
10957   echo "$ac_t""no" 1>&6
10958 fi
10959 done
10960
10961
10962         if test $ac_cv_header_krb_h = yes ; then
10963                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10964 echo "configure:10965: checking for main in -lkrb" >&5
10965 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10966 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10967   echo $ac_n "(cached) $ac_c" 1>&6
10968 else
10969   ac_save_LIBS="$LIBS"
10970 LIBS="-lkrb -ldes $LIBS"
10971 cat > conftest.$ac_ext <<EOF
10972 #line 10973 "configure"
10973 #include "confdefs.h"
10974
10975 int main() {
10976 main()
10977 ; return 0; }
10978 EOF
10979 if { (eval echo configure:10980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10980   rm -rf conftest*
10981   eval "ac_cv_lib_$ac_lib_var=yes"
10982 else
10983   echo "configure: failed program was:" >&5
10984   cat conftest.$ac_ext >&5
10985   rm -rf conftest*
10986   eval "ac_cv_lib_$ac_lib_var=no"
10987 fi
10988 rm -f conftest*
10989 LIBS="$ac_save_LIBS"
10990
10991 fi
10992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10993   echo "$ac_t""yes" 1>&6
10994   have_k4=yes
10995 else
10996   echo "$ac_t""no" 1>&6
10997 have_k4=no
10998 fi
10999
11000
11001                 if test $have_k4 = yes ; then
11002                         ol_with_kerberos=found
11003                         ol_link_krb4=yes
11004
11005                         cat >> confdefs.h <<\EOF
11006 #define HAVE_KRB4 1
11007 EOF
11008
11009
11010                         KRB4_LIBS="-lkrb -ldes"
11011
11012                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11013                                 cat >> confdefs.h <<\EOF
11014 #define HAVE_KTH_KERBEROS 1
11015 EOF
11016
11017                         fi
11018                 fi
11019         fi
11020 fi
11021
11022 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11023         ol_link_kbind=yes
11024
11025 elif test $ol_enable_kbind = yes ; then
11026         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11027 fi
11028
11029 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11030         cat >> confdefs.h <<\EOF
11031 #define HAVE_KERBEROS 1
11032 EOF
11033
11034
11035 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11036         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11037 fi
11038
11039 ol_link_tls=no
11040 if test $ol_with_tls != no ; then
11041         for ac_hdr in openssl/ssl.h ssl.h
11042 do
11043 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11044 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11045 echo "configure:11046: checking for $ac_hdr" >&5
11046 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11047   echo $ac_n "(cached) $ac_c" 1>&6
11048 else
11049   cat > conftest.$ac_ext <<EOF
11050 #line 11051 "configure"
11051 #include "confdefs.h"
11052 #include <$ac_hdr>
11053 EOF
11054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11055 { (eval echo configure:11056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11057 if test -z "$ac_err"; then
11058   rm -rf conftest*
11059   eval "ac_cv_header_$ac_safe=yes"
11060 else
11061   echo "$ac_err" >&5
11062   echo "configure: failed program was:" >&5
11063   cat conftest.$ac_ext >&5
11064   rm -rf conftest*
11065   eval "ac_cv_header_$ac_safe=no"
11066 fi
11067 rm -f conftest*
11068 fi
11069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11070   echo "$ac_t""yes" 1>&6
11071     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11072   cat >> confdefs.h <<EOF
11073 #define $ac_tr_hdr 1
11074 EOF
11075  
11076 else
11077   echo "$ac_t""no" 1>&6
11078 fi
11079 done
11080
11081         
11082         if test $ac_cv_header_openssl_ssl_h = yes \
11083                 -o $ac_cv_header_ssl_h = yes ; then
11084                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11085 echo "configure:11086: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11086 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11087 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11088   echo $ac_n "(cached) $ac_c" 1>&6
11089 else
11090   ac_save_LIBS="$LIBS"
11091 LIBS="-lssl -lcrypto $LIBS"
11092 cat > conftest.$ac_ext <<EOF
11093 #line 11094 "configure"
11094 #include "confdefs.h"
11095 /* Override any gcc2 internal prototype to avoid an error.  */
11096 /* We use char because int might match the return type of a gcc2
11097     builtin and then its argument prototype would still apply.  */
11098 char SSLeay_add_ssl_algorithms();
11099
11100 int main() {
11101 SSLeay_add_ssl_algorithms()
11102 ; return 0; }
11103 EOF
11104 if { (eval echo configure:11105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11105   rm -rf conftest*
11106   eval "ac_cv_lib_$ac_lib_var=yes"
11107 else
11108   echo "configure: failed program was:" >&5
11109   cat conftest.$ac_ext >&5
11110   rm -rf conftest*
11111   eval "ac_cv_lib_$ac_lib_var=no"
11112 fi
11113 rm -f conftest*
11114 LIBS="$ac_save_LIBS"
11115
11116 fi
11117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11118   echo "$ac_t""yes" 1>&6
11119   have_ssleay=yes
11120                         need_rsaref=no
11121 else
11122   echo "$ac_t""no" 1>&6
11123 have_ssleay=no
11124 fi
11125
11126                         
11127                 if test $have_ssleay = no ; then
11128                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11129 echo "configure:11130: checking for SSL_library_init in -lssl" >&5
11130 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11131 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11132   echo $ac_n "(cached) $ac_c" 1>&6
11133 else
11134   ac_save_LIBS="$LIBS"
11135 LIBS="-lssl -lcrypto $LIBS"
11136 cat > conftest.$ac_ext <<EOF
11137 #line 11138 "configure"
11138 #include "confdefs.h"
11139 /* Override any gcc2 internal prototype to avoid an error.  */
11140 /* We use char because int might match the return type of a gcc2
11141     builtin and then its argument prototype would still apply.  */
11142 char SSL_library_init();
11143
11144 int main() {
11145 SSL_library_init()
11146 ; return 0; }
11147 EOF
11148 if { (eval echo configure:11149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11149   rm -rf conftest*
11150   eval "ac_cv_lib_$ac_lib_var=yes"
11151 else
11152   echo "configure: failed program was:" >&5
11153   cat conftest.$ac_ext >&5
11154   rm -rf conftest*
11155   eval "ac_cv_lib_$ac_lib_var=no"
11156 fi
11157 rm -f conftest*
11158 LIBS="$ac_save_LIBS"
11159
11160 fi
11161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11162   echo "$ac_t""yes" 1>&6
11163   have_ssleay=yes
11164                                 need_rsaref=no
11165 else
11166   echo "$ac_t""no" 1>&6
11167 have_ssleay=no
11168 fi
11169
11170                 fi
11171
11172                 if test $have_ssleay = no ; then
11173                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11174 echo "configure:11175: checking for ssl3_accept in -lssl" >&5
11175 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11176 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11177   echo $ac_n "(cached) $ac_c" 1>&6
11178 else
11179   ac_save_LIBS="$LIBS"
11180 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11181 cat > conftest.$ac_ext <<EOF
11182 #line 11183 "configure"
11183 #include "confdefs.h"
11184 /* Override any gcc2 internal prototype to avoid an error.  */
11185 /* We use char because int might match the return type of a gcc2
11186     builtin and then its argument prototype would still apply.  */
11187 char ssl3_accept();
11188
11189 int main() {
11190 ssl3_accept()
11191 ; return 0; }
11192 EOF
11193 if { (eval echo configure:11194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11194   rm -rf conftest*
11195   eval "ac_cv_lib_$ac_lib_var=yes"
11196 else
11197   echo "configure: failed program was:" >&5
11198   cat conftest.$ac_ext >&5
11199   rm -rf conftest*
11200   eval "ac_cv_lib_$ac_lib_var=no"
11201 fi
11202 rm -f conftest*
11203 LIBS="$ac_save_LIBS"
11204
11205 fi
11206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11207   echo "$ac_t""yes" 1>&6
11208   have_ssleay=yes
11209                                 need_rsaref=yes
11210 else
11211   echo "$ac_t""no" 1>&6
11212 have_ssleay=no
11213 fi
11214
11215                 fi
11216
11217                 if test $have_ssleay = yes ; then
11218                         ol_with_tls=found
11219                         ol_link_tls=yes
11220
11221                         cat >> confdefs.h <<\EOF
11222 #define HAVE_SSLEAY 1
11223 EOF
11224
11225
11226                         if test $need_rsaref = yes; then
11227                                 cat >> confdefs.h <<\EOF
11228 #define HAVE_RSAREF 1
11229 EOF
11230
11231
11232                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11233                         else
11234                                 TLS_LIBS="-lssl -lcrypto"
11235                         fi
11236                 fi
11237         fi
11238
11239 else
11240         echo "configure: warning: TLS data protection not supported!" 1>&2
11241 fi
11242
11243 WITH_TLS=no
11244 if test $ol_link_tls = yes ; then
11245         cat >> confdefs.h <<\EOF
11246 #define HAVE_TLS 1
11247 EOF
11248
11249         WITH_TLS=yes
11250
11251 elif test $ol_with_tls = auto ; then
11252         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11253         echo "configure: warning: TLS data protection not supported!" 1>&2
11254
11255 elif test $ol_with_tls != no ; then
11256         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11257 fi
11258
11259 if test $ol_enable_lmpasswd != no; then
11260         if test $ol_link_tls != yes ; then
11261                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11262         fi
11263
11264         cat >> confdefs.h <<\EOF
11265 #define SLAPD_LMHASH 1
11266 EOF
11267
11268 fi
11269
11270 ol_link_threads=no
11271
11272 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11273         -o $ol_with_threads = nt ; then
11274
11275         
11276         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11277 echo "configure:11278: checking for _beginthread" >&5
11278 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11279   echo $ac_n "(cached) $ac_c" 1>&6
11280 else
11281   cat > conftest.$ac_ext <<EOF
11282 #line 11283 "configure"
11283 #include "confdefs.h"
11284 /* System header to define __stub macros and hopefully few prototypes,
11285     which can conflict with char _beginthread(); below.  */
11286 #include <assert.h>
11287 /* Override any gcc2 internal prototype to avoid an error.  */
11288 /* We use char because int might match the return type of a gcc2
11289     builtin and then its argument prototype would still apply.  */
11290 char _beginthread();
11291 char (*f)();
11292
11293 int main() {
11294
11295 /* The GNU C library defines this for functions which it implements
11296     to always fail with ENOSYS.  Some functions are actually named
11297     something starting with __ and the normal name is an alias.  */
11298 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11299 choke me
11300 #else
11301 f = _beginthread;
11302 #endif
11303
11304 ; return 0; }
11305 EOF
11306 if { (eval echo configure:11307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11307   rm -rf conftest*
11308   eval "ac_cv_func__beginthread=yes"
11309 else
11310   echo "configure: failed program was:" >&5
11311   cat conftest.$ac_ext >&5
11312   rm -rf conftest*
11313   eval "ac_cv_func__beginthread=no"
11314 fi
11315 rm -f conftest*
11316 fi
11317
11318 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11319   echo "$ac_t""yes" 1>&6
11320   :
11321 else
11322   echo "$ac_t""no" 1>&6
11323 fi
11324
11325
11326         if test $ac_cv_func__beginthread = yes ; then
11327                 cat >> confdefs.h <<\EOF
11328 #define HAVE_NT_THREADS 1
11329 EOF
11330
11331                 ol_cv_nt_threads=yes
11332         fi
11333
11334
11335         if test "$ol_cv_nt_threads" = yes ; then
11336                 ol_link_threads=nt
11337                 ol_with_threads=found
11338                 ol_with_yielding_select=yes
11339
11340                 cat >> confdefs.h <<\EOF
11341 #define HAVE_NT_SERVICE_MANAGER 1
11342 EOF
11343
11344                 cat >> confdefs.h <<\EOF
11345 #define HAVE_NT_EVENT_LOG 1
11346 EOF
11347
11348         fi
11349
11350         if test $ol_with_threads = nt ; then
11351                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11352         fi
11353 fi
11354
11355 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11356         -o $ol_with_threads = posix ; then
11357
11358         for ac_hdr in pthread.h
11359 do
11360 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11361 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11362 echo "configure:11363: checking for $ac_hdr" >&5
11363 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11364   echo $ac_n "(cached) $ac_c" 1>&6
11365 else
11366   cat > conftest.$ac_ext <<EOF
11367 #line 11368 "configure"
11368 #include "confdefs.h"
11369 #include <$ac_hdr>
11370 EOF
11371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11372 { (eval echo configure:11373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11374 if test -z "$ac_err"; then
11375   rm -rf conftest*
11376   eval "ac_cv_header_$ac_safe=yes"
11377 else
11378   echo "$ac_err" >&5
11379   echo "configure: failed program was:" >&5
11380   cat conftest.$ac_ext >&5
11381   rm -rf conftest*
11382   eval "ac_cv_header_$ac_safe=no"
11383 fi
11384 rm -f conftest*
11385 fi
11386 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11387   echo "$ac_t""yes" 1>&6
11388     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11389   cat >> confdefs.h <<EOF
11390 #define $ac_tr_hdr 1
11391 EOF
11392  
11393 else
11394   echo "$ac_t""no" 1>&6
11395 fi
11396 done
11397
11398
11399         if test $ac_cv_header_pthread_h = yes ; then
11400                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11401 echo "configure:11402: checking POSIX thread version" >&5
11402 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11403   echo $ac_n "(cached) $ac_c" 1>&6
11404 else
11405   
11406         cat > conftest.$ac_ext <<EOF
11407 #line 11408 "configure"
11408 #include "confdefs.h"
11409
11410 #               include <pthread.h>
11411         
11412 int main() {
11413
11414                 int i = PTHREAD_CREATE_JOINABLE;
11415         
11416 ; return 0; }
11417 EOF
11418 if { (eval echo configure:11419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11419   rm -rf conftest*
11420   
11421         cat > conftest.$ac_ext <<EOF
11422 #line 11423 "configure"
11423 #include "confdefs.h"
11424 #include <pthread.h>
11425 EOF
11426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11427   egrep "pthread_detach" >/dev/null 2>&1; then
11428   rm -rf conftest*
11429   ol_cv_pthread_version=10
11430 else
11431   rm -rf conftest*
11432   ol_cv_pthread_version=8
11433 fi
11434 rm -f conftest*
11435
11436 else
11437   echo "configure: failed program was:" >&5
11438   cat conftest.$ac_ext >&5
11439   rm -rf conftest*
11440   
11441         cat > conftest.$ac_ext <<EOF
11442 #line 11443 "configure"
11443 #include "confdefs.h"
11444
11445 #               include <pthread.h>
11446 #               ifdef PTHREAD_CREATE_UNDETACHED
11447                 draft7
11448 #               endif
11449         
11450 EOF
11451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11452   egrep "draft7" >/dev/null 2>&1; then
11453   rm -rf conftest*
11454   ol_cv_pthread_version=7
11455 else
11456   rm -rf conftest*
11457   
11458         cat > conftest.$ac_ext <<EOF
11459 #line 11460 "configure"
11460 #include "confdefs.h"
11461 #include <pthread.h>
11462 EOF
11463 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11464   egrep "pthread_attr_init" >/dev/null 2>&1; then
11465   rm -rf conftest*
11466   ol_cv_pthread_version=6
11467 else
11468   rm -rf conftest*
11469   
11470         cat > conftest.$ac_ext <<EOF
11471 #line 11472 "configure"
11472 #include "confdefs.h"
11473
11474 #               include <pthread.h>
11475 #ifdef          PTHREAD_MUTEX_INITIALIZER
11476                 draft5
11477 #endif
11478         
11479 EOF
11480 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11481   egrep "draft5" >/dev/null 2>&1; then
11482   rm -rf conftest*
11483   ol_cv_pthread_version=5
11484 else
11485   rm -rf conftest*
11486   ol_cv_pthread_version=4
11487 fi
11488 rm -f conftest*
11489  
11490 fi
11491 rm -f conftest*
11492  
11493 fi
11494 rm -f conftest*
11495  
11496 fi
11497 rm -f conftest*
11498
11499 fi
11500
11501 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11502
11503
11504                 if test $ol_cv_pthread_version != 0 ; then
11505                         cat >> confdefs.h <<EOF
11506 #define HAVE_PTHREADS $ol_cv_pthread_version
11507 EOF
11508
11509                 else
11510                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11511                 fi
11512
11513                 # consider threads found
11514                 ol_with_threads=found
11515
11516                 
11517         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11518 echo "configure:11519: checking for LinuxThreads pthread.h" >&5
11519 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11520   echo $ac_n "(cached) $ac_c" 1>&6
11521 else
11522   cat > conftest.$ac_ext <<EOF
11523 #line 11524 "configure"
11524 #include "confdefs.h"
11525 #include <pthread.h>
11526 EOF
11527 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11528   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11529   rm -rf conftest*
11530   ol_cv_header_linux_threads=yes
11531 else
11532   rm -rf conftest*
11533   ol_cv_header_linux_threads=no
11534 fi
11535 rm -f conftest*
11536
11537                 
11538 fi
11539
11540 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11541         if test $ol_cv_header_linux_threads = yes; then
11542                 cat >> confdefs.h <<\EOF
11543 #define HAVE_LINUX_THREADS 1
11544 EOF
11545
11546         fi
11547
11548                 
11549         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11550 echo "configure:11551: checking for GNU Pth pthread.h" >&5
11551 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11552   echo $ac_n "(cached) $ac_c" 1>&6
11553 else
11554   cat > conftest.$ac_ext <<EOF
11555 #line 11556 "configure"
11556 #include "confdefs.h"
11557 #include <pthread.h>
11558 #ifdef _POSIX_THREAD_IS_GNU_PTH
11559         __gnu_pth__;
11560 #endif
11561
11562 EOF
11563 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11564   egrep "__gnu_pth__" >/dev/null 2>&1; then
11565   rm -rf conftest*
11566   ol_cv_header_gnu_pth_pthread_h=yes
11567 else
11568   rm -rf conftest*
11569   ol_cv_header_gnu_pth_pthread_h=no
11570 fi
11571 rm -f conftest*
11572
11573                 
11574 fi
11575
11576 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11577
11578
11579                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11580                         for ac_hdr in sched.h
11581 do
11582 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11583 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11584 echo "configure:11585: checking for $ac_hdr" >&5
11585 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11586   echo $ac_n "(cached) $ac_c" 1>&6
11587 else
11588   cat > conftest.$ac_ext <<EOF
11589 #line 11590 "configure"
11590 #include "confdefs.h"
11591 #include <$ac_hdr>
11592 EOF
11593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11594 { (eval echo configure:11595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11596 if test -z "$ac_err"; then
11597   rm -rf conftest*
11598   eval "ac_cv_header_$ac_safe=yes"
11599 else
11600   echo "$ac_err" >&5
11601   echo "configure: failed program was:" >&5
11602   cat conftest.$ac_ext >&5
11603   rm -rf conftest*
11604   eval "ac_cv_header_$ac_safe=no"
11605 fi
11606 rm -f conftest*
11607 fi
11608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11609   echo "$ac_t""yes" 1>&6
11610     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11611   cat >> confdefs.h <<EOF
11612 #define $ac_tr_hdr 1
11613 EOF
11614  
11615 else
11616   echo "$ac_t""no" 1>&6
11617 fi
11618 done
11619
11620                 fi
11621
11622                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11623                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11624 echo "configure:11625: checking for pthread_create in default libraries" >&5
11625 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11626   echo $ac_n "(cached) $ac_c" 1>&6
11627 else
11628   
11629                 if test "$cross_compiling" = yes; then
11630   cat > conftest.$ac_ext <<EOF
11631 #line 11632 "configure"
11632 #include "confdefs.h"
11633 /* pthread test headers */
11634 #include <pthread.h>
11635 #if HAVE_PTHREADS < 7
11636 #include <errno.h>
11637 #endif
11638 #ifndef NULL
11639 #define NULL (void*)0
11640 #endif
11641
11642 static void *task(p)
11643         void *p;
11644 {
11645         return (void *) (p == NULL);
11646 }
11647
11648 int main() {
11649
11650         /* pthread test function */
11651 #ifndef PTHREAD_CREATE_DETACHED
11652 #define PTHREAD_CREATE_DETACHED 1
11653 #endif
11654         pthread_t t;
11655         int status;
11656         int detach = PTHREAD_CREATE_DETACHED;
11657
11658 #if HAVE_PTHREADS > 4
11659         /* Final pthreads */
11660         pthread_attr_t attr;
11661
11662         status = pthread_attr_init(&attr);
11663         if( status ) return status;
11664
11665 #if HAVE_PTHREADS < 7
11666         status = pthread_attr_setdetachstate(&attr, &detach);
11667         if( status < 0 ) status = errno;
11668 #else
11669         status = pthread_attr_setdetachstate(&attr, detach);
11670 #endif
11671         if( status ) return status;
11672         status = pthread_create( &t, &attr, task, NULL );
11673 #if HAVE_PTHREADS < 7
11674         if( status < 0 ) status = errno;
11675 #endif
11676         if( status ) return status;
11677 #else
11678         /* Draft 4 pthreads */
11679         status = pthread_create( &t, pthread_attr_default, task, NULL );
11680         if( status ) return errno;
11681
11682         /* give thread a chance to complete */
11683         /* it should remain joinable and hence detachable */
11684         sleep( 1 );
11685
11686         status = pthread_detach( &t );
11687         if( status ) return errno;
11688 #endif
11689
11690 #ifdef HAVE_LINUX_THREADS
11691         pthread_kill_other_threads_np();
11692 #endif
11693
11694         return 0;
11695
11696 ; return 0; }
11697 EOF
11698 if { (eval echo configure:11699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11699   rm -rf conftest*
11700   ol_cv_pthread_create=yes
11701 else
11702   echo "configure: failed program was:" >&5
11703   cat conftest.$ac_ext >&5
11704   rm -rf conftest*
11705   ol_cv_pthread_create=no
11706 fi
11707 rm -f conftest*
11708 else
11709   cat > conftest.$ac_ext <<EOF
11710 #line 11711 "configure"
11711 #include "confdefs.h"
11712 /* pthread test headers */
11713 #include <pthread.h>
11714 #if HAVE_PTHREADS < 7
11715 #include <errno.h>
11716 #endif
11717 #ifndef NULL
11718 #define NULL (void*)0
11719 #endif
11720
11721 static void *task(p)
11722         void *p;
11723 {
11724         return (void *) (p == NULL);
11725 }
11726
11727
11728 int main(argc, argv)
11729         int argc;
11730         char **argv;
11731 {
11732
11733         /* pthread test function */
11734 #ifndef PTHREAD_CREATE_DETACHED
11735 #define PTHREAD_CREATE_DETACHED 1
11736 #endif
11737         pthread_t t;
11738         int status;
11739         int detach = PTHREAD_CREATE_DETACHED;
11740
11741 #if HAVE_PTHREADS > 4
11742         /* Final pthreads */
11743         pthread_attr_t attr;
11744
11745         status = pthread_attr_init(&attr);
11746         if( status ) return status;
11747
11748 #if HAVE_PTHREADS < 7
11749         status = pthread_attr_setdetachstate(&attr, &detach);
11750         if( status < 0 ) status = errno;
11751 #else
11752         status = pthread_attr_setdetachstate(&attr, detach);
11753 #endif
11754         if( status ) return status;
11755         status = pthread_create( &t, &attr, task, NULL );
11756 #if HAVE_PTHREADS < 7
11757         if( status < 0 ) status = errno;
11758 #endif
11759         if( status ) return status;
11760 #else
11761         /* Draft 4 pthreads */
11762         status = pthread_create( &t, pthread_attr_default, task, NULL );
11763         if( status ) return errno;
11764
11765         /* give thread a chance to complete */
11766         /* it should remain joinable and hence detachable */
11767         sleep( 1 );
11768
11769         status = pthread_detach( &t );
11770         if( status ) return errno;
11771 #endif
11772
11773 #ifdef HAVE_LINUX_THREADS
11774         pthread_kill_other_threads_np();
11775 #endif
11776
11777         return 0;
11778
11779 }
11780
11781 EOF
11782 if { (eval echo configure:11783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11783 then
11784   ol_cv_pthread_create=yes
11785 else
11786   echo "configure: failed program was:" >&5
11787   cat conftest.$ac_ext >&5
11788   rm -fr conftest*
11789   ol_cv_pthread_create=no
11790 fi
11791 rm -fr conftest*
11792 fi
11793
11794 fi
11795
11796 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11797
11798                 if test $ol_cv_pthread_create != no ; then
11799                         ol_link_threads=posix
11800                         ol_link_pthreads=""
11801                 fi
11802                 
11803                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11804 if test "$ol_link_threads" = no ; then
11805         # try -kthread
11806         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11807 echo "configure:11808: checking for pthread link with -kthread" >&5
11808 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11809   echo $ac_n "(cached) $ac_c" 1>&6
11810 else
11811   
11812                 # save the flags
11813                 ol_LIBS="$LIBS"
11814                 LIBS="-kthread $LIBS"
11815
11816                 if test "$cross_compiling" = yes; then
11817   cat > conftest.$ac_ext <<EOF
11818 #line 11819 "configure"
11819 #include "confdefs.h"
11820 /* pthread test headers */
11821 #include <pthread.h>
11822 #if HAVE_PTHREADS < 7
11823 #include <errno.h>
11824 #endif
11825 #ifndef NULL
11826 #define NULL (void*)0
11827 #endif
11828
11829 static void *task(p)
11830         void *p;
11831 {
11832         return (void *) (p == NULL);
11833 }
11834
11835 int main() {
11836
11837         /* pthread test function */
11838 #ifndef PTHREAD_CREATE_DETACHED
11839 #define PTHREAD_CREATE_DETACHED 1
11840 #endif
11841         pthread_t t;
11842         int status;
11843         int detach = PTHREAD_CREATE_DETACHED;
11844
11845 #if HAVE_PTHREADS > 4
11846         /* Final pthreads */
11847         pthread_attr_t attr;
11848
11849         status = pthread_attr_init(&attr);
11850         if( status ) return status;
11851
11852 #if HAVE_PTHREADS < 7
11853         status = pthread_attr_setdetachstate(&attr, &detach);
11854         if( status < 0 ) status = errno;
11855 #else
11856         status = pthread_attr_setdetachstate(&attr, detach);
11857 #endif
11858         if( status ) return status;
11859         status = pthread_create( &t, &attr, task, NULL );
11860 #if HAVE_PTHREADS < 7
11861         if( status < 0 ) status = errno;
11862 #endif
11863         if( status ) return status;
11864 #else
11865         /* Draft 4 pthreads */
11866         status = pthread_create( &t, pthread_attr_default, task, NULL );
11867         if( status ) return errno;
11868
11869         /* give thread a chance to complete */
11870         /* it should remain joinable and hence detachable */
11871         sleep( 1 );
11872
11873         status = pthread_detach( &t );
11874         if( status ) return errno;
11875 #endif
11876
11877 #ifdef HAVE_LINUX_THREADS
11878         pthread_kill_other_threads_np();
11879 #endif
11880
11881         return 0;
11882
11883 ; return 0; }
11884 EOF
11885 if { (eval echo configure:11886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11886   rm -rf conftest*
11887   ol_cv_pthread_kthread=yes
11888 else
11889   echo "configure: failed program was:" >&5
11890   cat conftest.$ac_ext >&5
11891   rm -rf conftest*
11892   ol_cv_pthread_kthread=no
11893 fi
11894 rm -f conftest*
11895 else
11896   cat > conftest.$ac_ext <<EOF
11897 #line 11898 "configure"
11898 #include "confdefs.h"
11899 /* pthread test headers */
11900 #include <pthread.h>
11901 #if HAVE_PTHREADS < 7
11902 #include <errno.h>
11903 #endif
11904 #ifndef NULL
11905 #define NULL (void*)0
11906 #endif
11907
11908 static void *task(p)
11909         void *p;
11910 {
11911         return (void *) (p == NULL);
11912 }
11913
11914
11915 int main(argc, argv)
11916         int argc;
11917         char **argv;
11918 {
11919
11920         /* pthread test function */
11921 #ifndef PTHREAD_CREATE_DETACHED
11922 #define PTHREAD_CREATE_DETACHED 1
11923 #endif
11924         pthread_t t;
11925         int status;
11926         int detach = PTHREAD_CREATE_DETACHED;
11927
11928 #if HAVE_PTHREADS > 4
11929         /* Final pthreads */
11930         pthread_attr_t attr;
11931
11932         status = pthread_attr_init(&attr);
11933         if( status ) return status;
11934
11935 #if HAVE_PTHREADS < 7
11936         status = pthread_attr_setdetachstate(&attr, &detach);
11937         if( status < 0 ) status = errno;
11938 #else
11939         status = pthread_attr_setdetachstate(&attr, detach);
11940 #endif
11941         if( status ) return status;
11942         status = pthread_create( &t, &attr, task, NULL );
11943 #if HAVE_PTHREADS < 7
11944         if( status < 0 ) status = errno;
11945 #endif
11946         if( status ) return status;
11947 #else
11948         /* Draft 4 pthreads */
11949         status = pthread_create( &t, pthread_attr_default, task, NULL );
11950         if( status ) return errno;
11951
11952         /* give thread a chance to complete */
11953         /* it should remain joinable and hence detachable */
11954         sleep( 1 );
11955
11956         status = pthread_detach( &t );
11957         if( status ) return errno;
11958 #endif
11959
11960 #ifdef HAVE_LINUX_THREADS
11961         pthread_kill_other_threads_np();
11962 #endif
11963
11964         return 0;
11965
11966 }
11967
11968 EOF
11969 if { (eval echo configure:11970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11970 then
11971   ol_cv_pthread_kthread=yes
11972 else
11973   echo "configure: failed program was:" >&5
11974   cat conftest.$ac_ext >&5
11975   rm -fr conftest*
11976   ol_cv_pthread_kthread=no
11977 fi
11978 rm -fr conftest*
11979 fi
11980
11981
11982                 # restore the LIBS
11983                 LIBS="$ol_LIBS"
11984         
11985 fi
11986
11987 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11988
11989         if test $ol_cv_pthread_kthread = yes ; then
11990                 ol_link_pthreads="-kthread"
11991                 ol_link_threads=posix
11992         fi
11993 fi
11994
11995                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11996 if test "$ol_link_threads" = no ; then
11997         # try -pthread
11998         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11999 echo "configure:12000: checking for pthread link with -pthread" >&5
12000 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12001   echo $ac_n "(cached) $ac_c" 1>&6
12002 else
12003   
12004                 # save the flags
12005                 ol_LIBS="$LIBS"
12006                 LIBS="-pthread $LIBS"
12007
12008                 if test "$cross_compiling" = yes; then
12009   cat > conftest.$ac_ext <<EOF
12010 #line 12011 "configure"
12011 #include "confdefs.h"
12012 /* pthread test headers */
12013 #include <pthread.h>
12014 #if HAVE_PTHREADS < 7
12015 #include <errno.h>
12016 #endif
12017 #ifndef NULL
12018 #define NULL (void*)0
12019 #endif
12020
12021 static void *task(p)
12022         void *p;
12023 {
12024         return (void *) (p == NULL);
12025 }
12026
12027 int main() {
12028
12029         /* pthread test function */
12030 #ifndef PTHREAD_CREATE_DETACHED
12031 #define PTHREAD_CREATE_DETACHED 1
12032 #endif
12033         pthread_t t;
12034         int status;
12035         int detach = PTHREAD_CREATE_DETACHED;
12036
12037 #if HAVE_PTHREADS > 4
12038         /* Final pthreads */
12039         pthread_attr_t attr;
12040
12041         status = pthread_attr_init(&attr);
12042         if( status ) return status;
12043
12044 #if HAVE_PTHREADS < 7
12045         status = pthread_attr_setdetachstate(&attr, &detach);
12046         if( status < 0 ) status = errno;
12047 #else
12048         status = pthread_attr_setdetachstate(&attr, detach);
12049 #endif
12050         if( status ) return status;
12051         status = pthread_create( &t, &attr, task, NULL );
12052 #if HAVE_PTHREADS < 7
12053         if( status < 0 ) status = errno;
12054 #endif
12055         if( status ) return status;
12056 #else
12057         /* Draft 4 pthreads */
12058         status = pthread_create( &t, pthread_attr_default, task, NULL );
12059         if( status ) return errno;
12060
12061         /* give thread a chance to complete */
12062         /* it should remain joinable and hence detachable */
12063         sleep( 1 );
12064
12065         status = pthread_detach( &t );
12066         if( status ) return errno;
12067 #endif
12068
12069 #ifdef HAVE_LINUX_THREADS
12070         pthread_kill_other_threads_np();
12071 #endif
12072
12073         return 0;
12074
12075 ; return 0; }
12076 EOF
12077 if { (eval echo configure:12078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12078   rm -rf conftest*
12079   ol_cv_pthread_pthread=yes
12080 else
12081   echo "configure: failed program was:" >&5
12082   cat conftest.$ac_ext >&5
12083   rm -rf conftest*
12084   ol_cv_pthread_pthread=no
12085 fi
12086 rm -f conftest*
12087 else
12088   cat > conftest.$ac_ext <<EOF
12089 #line 12090 "configure"
12090 #include "confdefs.h"
12091 /* pthread test headers */
12092 #include <pthread.h>
12093 #if HAVE_PTHREADS < 7
12094 #include <errno.h>
12095 #endif
12096 #ifndef NULL
12097 #define NULL (void*)0
12098 #endif
12099
12100 static void *task(p)
12101         void *p;
12102 {
12103         return (void *) (p == NULL);
12104 }
12105
12106
12107 int main(argc, argv)
12108         int argc;
12109         char **argv;
12110 {
12111
12112         /* pthread test function */
12113 #ifndef PTHREAD_CREATE_DETACHED
12114 #define PTHREAD_CREATE_DETACHED 1
12115 #endif
12116         pthread_t t;
12117         int status;
12118         int detach = PTHREAD_CREATE_DETACHED;
12119
12120 #if HAVE_PTHREADS > 4
12121         /* Final pthreads */
12122         pthread_attr_t attr;
12123
12124         status = pthread_attr_init(&attr);
12125         if( status ) return status;
12126
12127 #if HAVE_PTHREADS < 7
12128         status = pthread_attr_setdetachstate(&attr, &detach);
12129         if( status < 0 ) status = errno;
12130 #else
12131         status = pthread_attr_setdetachstate(&attr, detach);
12132 #endif
12133         if( status ) return status;
12134         status = pthread_create( &t, &attr, task, NULL );
12135 #if HAVE_PTHREADS < 7
12136         if( status < 0 ) status = errno;
12137 #endif
12138         if( status ) return status;
12139 #else
12140         /* Draft 4 pthreads */
12141         status = pthread_create( &t, pthread_attr_default, task, NULL );
12142         if( status ) return errno;
12143
12144         /* give thread a chance to complete */
12145         /* it should remain joinable and hence detachable */
12146         sleep( 1 );
12147
12148         status = pthread_detach( &t );
12149         if( status ) return errno;
12150 #endif
12151
12152 #ifdef HAVE_LINUX_THREADS
12153         pthread_kill_other_threads_np();
12154 #endif
12155
12156         return 0;
12157
12158 }
12159
12160 EOF
12161 if { (eval echo configure:12162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12162 then
12163   ol_cv_pthread_pthread=yes
12164 else
12165   echo "configure: failed program was:" >&5
12166   cat conftest.$ac_ext >&5
12167   rm -fr conftest*
12168   ol_cv_pthread_pthread=no
12169 fi
12170 rm -fr conftest*
12171 fi
12172
12173
12174                 # restore the LIBS
12175                 LIBS="$ol_LIBS"
12176         
12177 fi
12178
12179 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12180
12181         if test $ol_cv_pthread_pthread = yes ; then
12182                 ol_link_pthreads="-pthread"
12183                 ol_link_threads=posix
12184         fi
12185 fi
12186
12187                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12188 if test "$ol_link_threads" = no ; then
12189         # try -pthreads
12190         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12191 echo "configure:12192: checking for pthread link with -pthreads" >&5
12192 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12193   echo $ac_n "(cached) $ac_c" 1>&6
12194 else
12195   
12196                 # save the flags
12197                 ol_LIBS="$LIBS"
12198                 LIBS="-pthreads $LIBS"
12199
12200                 if test "$cross_compiling" = yes; then
12201   cat > conftest.$ac_ext <<EOF
12202 #line 12203 "configure"
12203 #include "confdefs.h"
12204 /* pthread test headers */
12205 #include <pthread.h>
12206 #if HAVE_PTHREADS < 7
12207 #include <errno.h>
12208 #endif
12209 #ifndef NULL
12210 #define NULL (void*)0
12211 #endif
12212
12213 static void *task(p)
12214         void *p;
12215 {
12216         return (void *) (p == NULL);
12217 }
12218
12219 int main() {
12220
12221         /* pthread test function */
12222 #ifndef PTHREAD_CREATE_DETACHED
12223 #define PTHREAD_CREATE_DETACHED 1
12224 #endif
12225         pthread_t t;
12226         int status;
12227         int detach = PTHREAD_CREATE_DETACHED;
12228
12229 #if HAVE_PTHREADS > 4
12230         /* Final pthreads */
12231         pthread_attr_t attr;
12232
12233         status = pthread_attr_init(&attr);
12234         if( status ) return status;
12235
12236 #if HAVE_PTHREADS < 7
12237         status = pthread_attr_setdetachstate(&attr, &detach);
12238         if( status < 0 ) status = errno;
12239 #else
12240         status = pthread_attr_setdetachstate(&attr, detach);
12241 #endif
12242         if( status ) return status;
12243         status = pthread_create( &t, &attr, task, NULL );
12244 #if HAVE_PTHREADS < 7
12245         if( status < 0 ) status = errno;
12246 #endif
12247         if( status ) return status;
12248 #else
12249         /* Draft 4 pthreads */
12250         status = pthread_create( &t, pthread_attr_default, task, NULL );
12251         if( status ) return errno;
12252
12253         /* give thread a chance to complete */
12254         /* it should remain joinable and hence detachable */
12255         sleep( 1 );
12256
12257         status = pthread_detach( &t );
12258         if( status ) return errno;
12259 #endif
12260
12261 #ifdef HAVE_LINUX_THREADS
12262         pthread_kill_other_threads_np();
12263 #endif
12264
12265         return 0;
12266
12267 ; return 0; }
12268 EOF
12269 if { (eval echo configure:12270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12270   rm -rf conftest*
12271   ol_cv_pthread_pthreads=yes
12272 else
12273   echo "configure: failed program was:" >&5
12274   cat conftest.$ac_ext >&5
12275   rm -rf conftest*
12276   ol_cv_pthread_pthreads=no
12277 fi
12278 rm -f conftest*
12279 else
12280   cat > conftest.$ac_ext <<EOF
12281 #line 12282 "configure"
12282 #include "confdefs.h"
12283 /* pthread test headers */
12284 #include <pthread.h>
12285 #if HAVE_PTHREADS < 7
12286 #include <errno.h>
12287 #endif
12288 #ifndef NULL
12289 #define NULL (void*)0
12290 #endif
12291
12292 static void *task(p)
12293         void *p;
12294 {
12295         return (void *) (p == NULL);
12296 }
12297
12298
12299 int main(argc, argv)
12300         int argc;
12301         char **argv;
12302 {
12303
12304         /* pthread test function */
12305 #ifndef PTHREAD_CREATE_DETACHED
12306 #define PTHREAD_CREATE_DETACHED 1
12307 #endif
12308         pthread_t t;
12309         int status;
12310         int detach = PTHREAD_CREATE_DETACHED;
12311
12312 #if HAVE_PTHREADS > 4
12313         /* Final pthreads */
12314         pthread_attr_t attr;
12315
12316         status = pthread_attr_init(&attr);
12317         if( status ) return status;
12318
12319 #if HAVE_PTHREADS < 7
12320         status = pthread_attr_setdetachstate(&attr, &detach);
12321         if( status < 0 ) status = errno;
12322 #else
12323         status = pthread_attr_setdetachstate(&attr, detach);
12324 #endif
12325         if( status ) return status;
12326         status = pthread_create( &t, &attr, task, NULL );
12327 #if HAVE_PTHREADS < 7
12328         if( status < 0 ) status = errno;
12329 #endif
12330         if( status ) return status;
12331 #else
12332         /* Draft 4 pthreads */
12333         status = pthread_create( &t, pthread_attr_default, task, NULL );
12334         if( status ) return errno;
12335
12336         /* give thread a chance to complete */
12337         /* it should remain joinable and hence detachable */
12338         sleep( 1 );
12339
12340         status = pthread_detach( &t );
12341         if( status ) return errno;
12342 #endif
12343
12344 #ifdef HAVE_LINUX_THREADS
12345         pthread_kill_other_threads_np();
12346 #endif
12347
12348         return 0;
12349
12350 }
12351
12352 EOF
12353 if { (eval echo configure:12354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12354 then
12355   ol_cv_pthread_pthreads=yes
12356 else
12357   echo "configure: failed program was:" >&5
12358   cat conftest.$ac_ext >&5
12359   rm -fr conftest*
12360   ol_cv_pthread_pthreads=no
12361 fi
12362 rm -fr conftest*
12363 fi
12364
12365
12366                 # restore the LIBS
12367                 LIBS="$ol_LIBS"
12368         
12369 fi
12370
12371 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12372
12373         if test $ol_cv_pthread_pthreads = yes ; then
12374                 ol_link_pthreads="-pthreads"
12375                 ol_link_threads=posix
12376         fi
12377 fi
12378
12379                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12380 if test "$ol_link_threads" = no ; then
12381         # try -mthreads
12382         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12383 echo "configure:12384: checking for pthread link with -mthreads" >&5
12384 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12385   echo $ac_n "(cached) $ac_c" 1>&6
12386 else
12387   
12388                 # save the flags
12389                 ol_LIBS="$LIBS"
12390                 LIBS="-mthreads $LIBS"
12391
12392                 if test "$cross_compiling" = yes; then
12393   cat > conftest.$ac_ext <<EOF
12394 #line 12395 "configure"
12395 #include "confdefs.h"
12396 /* pthread test headers */
12397 #include <pthread.h>
12398 #if HAVE_PTHREADS < 7
12399 #include <errno.h>
12400 #endif
12401 #ifndef NULL
12402 #define NULL (void*)0
12403 #endif
12404
12405 static void *task(p)
12406         void *p;
12407 {
12408         return (void *) (p == NULL);
12409 }
12410
12411 int main() {
12412
12413         /* pthread test function */
12414 #ifndef PTHREAD_CREATE_DETACHED
12415 #define PTHREAD_CREATE_DETACHED 1
12416 #endif
12417         pthread_t t;
12418         int status;
12419         int detach = PTHREAD_CREATE_DETACHED;
12420
12421 #if HAVE_PTHREADS > 4
12422         /* Final pthreads */
12423         pthread_attr_t attr;
12424
12425         status = pthread_attr_init(&attr);
12426         if( status ) return status;
12427
12428 #if HAVE_PTHREADS < 7
12429         status = pthread_attr_setdetachstate(&attr, &detach);
12430         if( status < 0 ) status = errno;
12431 #else
12432         status = pthread_attr_setdetachstate(&attr, detach);
12433 #endif
12434         if( status ) return status;
12435         status = pthread_create( &t, &attr, task, NULL );
12436 #if HAVE_PTHREADS < 7
12437         if( status < 0 ) status = errno;
12438 #endif
12439         if( status ) return status;
12440 #else
12441         /* Draft 4 pthreads */
12442         status = pthread_create( &t, pthread_attr_default, task, NULL );
12443         if( status ) return errno;
12444
12445         /* give thread a chance to complete */
12446         /* it should remain joinable and hence detachable */
12447         sleep( 1 );
12448
12449         status = pthread_detach( &t );
12450         if( status ) return errno;
12451 #endif
12452
12453 #ifdef HAVE_LINUX_THREADS
12454         pthread_kill_other_threads_np();
12455 #endif
12456
12457         return 0;
12458
12459 ; return 0; }
12460 EOF
12461 if { (eval echo configure:12462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12462   rm -rf conftest*
12463   ol_cv_pthread_mthreads=yes
12464 else
12465   echo "configure: failed program was:" >&5
12466   cat conftest.$ac_ext >&5
12467   rm -rf conftest*
12468   ol_cv_pthread_mthreads=no
12469 fi
12470 rm -f conftest*
12471 else
12472   cat > conftest.$ac_ext <<EOF
12473 #line 12474 "configure"
12474 #include "confdefs.h"
12475 /* pthread test headers */
12476 #include <pthread.h>
12477 #if HAVE_PTHREADS < 7
12478 #include <errno.h>
12479 #endif
12480 #ifndef NULL
12481 #define NULL (void*)0
12482 #endif
12483
12484 static void *task(p)
12485         void *p;
12486 {
12487         return (void *) (p == NULL);
12488 }
12489
12490
12491 int main(argc, argv)
12492         int argc;
12493         char **argv;
12494 {
12495
12496         /* pthread test function */
12497 #ifndef PTHREAD_CREATE_DETACHED
12498 #define PTHREAD_CREATE_DETACHED 1
12499 #endif
12500         pthread_t t;
12501         int status;
12502         int detach = PTHREAD_CREATE_DETACHED;
12503
12504 #if HAVE_PTHREADS > 4
12505         /* Final pthreads */
12506         pthread_attr_t attr;
12507
12508         status = pthread_attr_init(&attr);
12509         if( status ) return status;
12510
12511 #if HAVE_PTHREADS < 7
12512         status = pthread_attr_setdetachstate(&attr, &detach);
12513         if( status < 0 ) status = errno;
12514 #else
12515         status = pthread_attr_setdetachstate(&attr, detach);
12516 #endif
12517         if( status ) return status;
12518         status = pthread_create( &t, &attr, task, NULL );
12519 #if HAVE_PTHREADS < 7
12520         if( status < 0 ) status = errno;
12521 #endif
12522         if( status ) return status;
12523 #else
12524         /* Draft 4 pthreads */
12525         status = pthread_create( &t, pthread_attr_default, task, NULL );
12526         if( status ) return errno;
12527
12528         /* give thread a chance to complete */
12529         /* it should remain joinable and hence detachable */
12530         sleep( 1 );
12531
12532         status = pthread_detach( &t );
12533         if( status ) return errno;
12534 #endif
12535
12536 #ifdef HAVE_LINUX_THREADS
12537         pthread_kill_other_threads_np();
12538 #endif
12539
12540         return 0;
12541
12542 }
12543
12544 EOF
12545 if { (eval echo configure:12546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12546 then
12547   ol_cv_pthread_mthreads=yes
12548 else
12549   echo "configure: failed program was:" >&5
12550   cat conftest.$ac_ext >&5
12551   rm -fr conftest*
12552   ol_cv_pthread_mthreads=no
12553 fi
12554 rm -fr conftest*
12555 fi
12556
12557
12558                 # restore the LIBS
12559                 LIBS="$ol_LIBS"
12560         
12561 fi
12562
12563 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12564
12565         if test $ol_cv_pthread_mthreads = yes ; then
12566                 ol_link_pthreads="-mthreads"
12567                 ol_link_threads=posix
12568         fi
12569 fi
12570
12571                 # Pthread try link: -thread (ol_cv_pthread_thread)
12572 if test "$ol_link_threads" = no ; then
12573         # try -thread
12574         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12575 echo "configure:12576: checking for pthread link with -thread" >&5
12576 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12577   echo $ac_n "(cached) $ac_c" 1>&6
12578 else
12579   
12580                 # save the flags
12581                 ol_LIBS="$LIBS"
12582                 LIBS="-thread $LIBS"
12583
12584                 if test "$cross_compiling" = yes; then
12585   cat > conftest.$ac_ext <<EOF
12586 #line 12587 "configure"
12587 #include "confdefs.h"
12588 /* pthread test headers */
12589 #include <pthread.h>
12590 #if HAVE_PTHREADS < 7
12591 #include <errno.h>
12592 #endif
12593 #ifndef NULL
12594 #define NULL (void*)0
12595 #endif
12596
12597 static void *task(p)
12598         void *p;
12599 {
12600         return (void *) (p == NULL);
12601 }
12602
12603 int main() {
12604
12605         /* pthread test function */
12606 #ifndef PTHREAD_CREATE_DETACHED
12607 #define PTHREAD_CREATE_DETACHED 1
12608 #endif
12609         pthread_t t;
12610         int status;
12611         int detach = PTHREAD_CREATE_DETACHED;
12612
12613 #if HAVE_PTHREADS > 4
12614         /* Final pthreads */
12615         pthread_attr_t attr;
12616
12617         status = pthread_attr_init(&attr);
12618         if( status ) return status;
12619
12620 #if HAVE_PTHREADS < 7
12621         status = pthread_attr_setdetachstate(&attr, &detach);
12622         if( status < 0 ) status = errno;
12623 #else
12624         status = pthread_attr_setdetachstate(&attr, detach);
12625 #endif
12626         if( status ) return status;
12627         status = pthread_create( &t, &attr, task, NULL );
12628 #if HAVE_PTHREADS < 7
12629         if( status < 0 ) status = errno;
12630 #endif
12631         if( status ) return status;
12632 #else
12633         /* Draft 4 pthreads */
12634         status = pthread_create( &t, pthread_attr_default, task, NULL );
12635         if( status ) return errno;
12636
12637         /* give thread a chance to complete */
12638         /* it should remain joinable and hence detachable */
12639         sleep( 1 );
12640
12641         status = pthread_detach( &t );
12642         if( status ) return errno;
12643 #endif
12644
12645 #ifdef HAVE_LINUX_THREADS
12646         pthread_kill_other_threads_np();
12647 #endif
12648
12649         return 0;
12650
12651 ; return 0; }
12652 EOF
12653 if { (eval echo configure:12654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12654   rm -rf conftest*
12655   ol_cv_pthread_thread=yes
12656 else
12657   echo "configure: failed program was:" >&5
12658   cat conftest.$ac_ext >&5
12659   rm -rf conftest*
12660   ol_cv_pthread_thread=no
12661 fi
12662 rm -f conftest*
12663 else
12664   cat > conftest.$ac_ext <<EOF
12665 #line 12666 "configure"
12666 #include "confdefs.h"
12667 /* pthread test headers */
12668 #include <pthread.h>
12669 #if HAVE_PTHREADS < 7
12670 #include <errno.h>
12671 #endif
12672 #ifndef NULL
12673 #define NULL (void*)0
12674 #endif
12675
12676 static void *task(p)
12677         void *p;
12678 {
12679         return (void *) (p == NULL);
12680 }
12681
12682
12683 int main(argc, argv)
12684         int argc;
12685         char **argv;
12686 {
12687
12688         /* pthread test function */
12689 #ifndef PTHREAD_CREATE_DETACHED
12690 #define PTHREAD_CREATE_DETACHED 1
12691 #endif
12692         pthread_t t;
12693         int status;
12694         int detach = PTHREAD_CREATE_DETACHED;
12695
12696 #if HAVE_PTHREADS > 4
12697         /* Final pthreads */
12698         pthread_attr_t attr;
12699
12700         status = pthread_attr_init(&attr);
12701         if( status ) return status;
12702
12703 #if HAVE_PTHREADS < 7
12704         status = pthread_attr_setdetachstate(&attr, &detach);
12705         if( status < 0 ) status = errno;
12706 #else
12707         status = pthread_attr_setdetachstate(&attr, detach);
12708 #endif
12709         if( status ) return status;
12710         status = pthread_create( &t, &attr, task, NULL );
12711 #if HAVE_PTHREADS < 7
12712         if( status < 0 ) status = errno;
12713 #endif
12714         if( status ) return status;
12715 #else
12716         /* Draft 4 pthreads */
12717         status = pthread_create( &t, pthread_attr_default, task, NULL );
12718         if( status ) return errno;
12719
12720         /* give thread a chance to complete */
12721         /* it should remain joinable and hence detachable */
12722         sleep( 1 );
12723
12724         status = pthread_detach( &t );
12725         if( status ) return errno;
12726 #endif
12727
12728 #ifdef HAVE_LINUX_THREADS
12729         pthread_kill_other_threads_np();
12730 #endif
12731
12732         return 0;
12733
12734 }
12735
12736 EOF
12737 if { (eval echo configure:12738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12738 then
12739   ol_cv_pthread_thread=yes
12740 else
12741   echo "configure: failed program was:" >&5
12742   cat conftest.$ac_ext >&5
12743   rm -fr conftest*
12744   ol_cv_pthread_thread=no
12745 fi
12746 rm -fr conftest*
12747 fi
12748
12749
12750                 # restore the LIBS
12751                 LIBS="$ol_LIBS"
12752         
12753 fi
12754
12755 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12756
12757         if test $ol_cv_pthread_thread = yes ; then
12758                 ol_link_pthreads="-thread"
12759                 ol_link_threads=posix
12760         fi
12761 fi
12762
12763
12764                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12765 if test "$ol_link_threads" = no ; then
12766         # try -lpthread -lmach -lexc -lc_r
12767         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12768 echo "configure:12769: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12769 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12770   echo $ac_n "(cached) $ac_c" 1>&6
12771 else
12772   
12773                 # save the flags
12774                 ol_LIBS="$LIBS"
12775                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12776
12777                 if test "$cross_compiling" = yes; then
12778   cat > conftest.$ac_ext <<EOF
12779 #line 12780 "configure"
12780 #include "confdefs.h"
12781 /* pthread test headers */
12782 #include <pthread.h>
12783 #if HAVE_PTHREADS < 7
12784 #include <errno.h>
12785 #endif
12786 #ifndef NULL
12787 #define NULL (void*)0
12788 #endif
12789
12790 static void *task(p)
12791         void *p;
12792 {
12793         return (void *) (p == NULL);
12794 }
12795
12796 int main() {
12797
12798         /* pthread test function */
12799 #ifndef PTHREAD_CREATE_DETACHED
12800 #define PTHREAD_CREATE_DETACHED 1
12801 #endif
12802         pthread_t t;
12803         int status;
12804         int detach = PTHREAD_CREATE_DETACHED;
12805
12806 #if HAVE_PTHREADS > 4
12807         /* Final pthreads */
12808         pthread_attr_t attr;
12809
12810         status = pthread_attr_init(&attr);
12811         if( status ) return status;
12812
12813 #if HAVE_PTHREADS < 7
12814         status = pthread_attr_setdetachstate(&attr, &detach);
12815         if( status < 0 ) status = errno;
12816 #else
12817         status = pthread_attr_setdetachstate(&attr, detach);
12818 #endif
12819         if( status ) return status;
12820         status = pthread_create( &t, &attr, task, NULL );
12821 #if HAVE_PTHREADS < 7
12822         if( status < 0 ) status = errno;
12823 #endif
12824         if( status ) return status;
12825 #else
12826         /* Draft 4 pthreads */
12827         status = pthread_create( &t, pthread_attr_default, task, NULL );
12828         if( status ) return errno;
12829
12830         /* give thread a chance to complete */
12831         /* it should remain joinable and hence detachable */
12832         sleep( 1 );
12833
12834         status = pthread_detach( &t );
12835         if( status ) return errno;
12836 #endif
12837
12838 #ifdef HAVE_LINUX_THREADS
12839         pthread_kill_other_threads_np();
12840 #endif
12841
12842         return 0;
12843
12844 ; return 0; }
12845 EOF
12846 if { (eval echo configure:12847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12847   rm -rf conftest*
12848   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12849 else
12850   echo "configure: failed program was:" >&5
12851   cat conftest.$ac_ext >&5
12852   rm -rf conftest*
12853   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12854 fi
12855 rm -f conftest*
12856 else
12857   cat > conftest.$ac_ext <<EOF
12858 #line 12859 "configure"
12859 #include "confdefs.h"
12860 /* pthread test headers */
12861 #include <pthread.h>
12862 #if HAVE_PTHREADS < 7
12863 #include <errno.h>
12864 #endif
12865 #ifndef NULL
12866 #define NULL (void*)0
12867 #endif
12868
12869 static void *task(p)
12870         void *p;
12871 {
12872         return (void *) (p == NULL);
12873 }
12874
12875
12876 int main(argc, argv)
12877         int argc;
12878         char **argv;
12879 {
12880
12881         /* pthread test function */
12882 #ifndef PTHREAD_CREATE_DETACHED
12883 #define PTHREAD_CREATE_DETACHED 1
12884 #endif
12885         pthread_t t;
12886         int status;
12887         int detach = PTHREAD_CREATE_DETACHED;
12888
12889 #if HAVE_PTHREADS > 4
12890         /* Final pthreads */
12891         pthread_attr_t attr;
12892
12893         status = pthread_attr_init(&attr);
12894         if( status ) return status;
12895
12896 #if HAVE_PTHREADS < 7
12897         status = pthread_attr_setdetachstate(&attr, &detach);
12898         if( status < 0 ) status = errno;
12899 #else
12900         status = pthread_attr_setdetachstate(&attr, detach);
12901 #endif
12902         if( status ) return status;
12903         status = pthread_create( &t, &attr, task, NULL );
12904 #if HAVE_PTHREADS < 7
12905         if( status < 0 ) status = errno;
12906 #endif
12907         if( status ) return status;
12908 #else
12909         /* Draft 4 pthreads */
12910         status = pthread_create( &t, pthread_attr_default, task, NULL );
12911         if( status ) return errno;
12912
12913         /* give thread a chance to complete */
12914         /* it should remain joinable and hence detachable */
12915         sleep( 1 );
12916
12917         status = pthread_detach( &t );
12918         if( status ) return errno;
12919 #endif
12920
12921 #ifdef HAVE_LINUX_THREADS
12922         pthread_kill_other_threads_np();
12923 #endif
12924
12925         return 0;
12926
12927 }
12928
12929 EOF
12930 if { (eval echo configure:12931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12931 then
12932   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12933 else
12934   echo "configure: failed program was:" >&5
12935   cat conftest.$ac_ext >&5
12936   rm -fr conftest*
12937   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12938 fi
12939 rm -fr conftest*
12940 fi
12941
12942
12943                 # restore the LIBS
12944                 LIBS="$ol_LIBS"
12945         
12946 fi
12947
12948 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12949
12950         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12951                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12952                 ol_link_threads=posix
12953         fi
12954 fi
12955
12956                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12957 if test "$ol_link_threads" = no ; then
12958         # try -lpthread -lmach -lexc
12959         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12960 echo "configure:12961: checking for pthread link with -lpthread -lmach -lexc" >&5
12961 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12962   echo $ac_n "(cached) $ac_c" 1>&6
12963 else
12964   
12965                 # save the flags
12966                 ol_LIBS="$LIBS"
12967                 LIBS="-lpthread -lmach -lexc $LIBS"
12968
12969                 if test "$cross_compiling" = yes; then
12970   cat > conftest.$ac_ext <<EOF
12971 #line 12972 "configure"
12972 #include "confdefs.h"
12973 /* pthread test headers */
12974 #include <pthread.h>
12975 #if HAVE_PTHREADS < 7
12976 #include <errno.h>
12977 #endif
12978 #ifndef NULL
12979 #define NULL (void*)0
12980 #endif
12981
12982 static void *task(p)
12983         void *p;
12984 {
12985         return (void *) (p == NULL);
12986 }
12987
12988 int main() {
12989
12990         /* pthread test function */
12991 #ifndef PTHREAD_CREATE_DETACHED
12992 #define PTHREAD_CREATE_DETACHED 1
12993 #endif
12994         pthread_t t;
12995         int status;
12996         int detach = PTHREAD_CREATE_DETACHED;
12997
12998 #if HAVE_PTHREADS > 4
12999         /* Final pthreads */
13000         pthread_attr_t attr;
13001
13002         status = pthread_attr_init(&attr);
13003         if( status ) return status;
13004
13005 #if HAVE_PTHREADS < 7
13006         status = pthread_attr_setdetachstate(&attr, &detach);
13007         if( status < 0 ) status = errno;
13008 #else
13009         status = pthread_attr_setdetachstate(&attr, detach);
13010 #endif
13011         if( status ) return status;
13012         status = pthread_create( &t, &attr, task, NULL );
13013 #if HAVE_PTHREADS < 7
13014         if( status < 0 ) status = errno;
13015 #endif
13016         if( status ) return status;
13017 #else
13018         /* Draft 4 pthreads */
13019         status = pthread_create( &t, pthread_attr_default, task, NULL );
13020         if( status ) return errno;
13021
13022         /* give thread a chance to complete */
13023         /* it should remain joinable and hence detachable */
13024         sleep( 1 );
13025
13026         status = pthread_detach( &t );
13027         if( status ) return errno;
13028 #endif
13029
13030 #ifdef HAVE_LINUX_THREADS
13031         pthread_kill_other_threads_np();
13032 #endif
13033
13034         return 0;
13035
13036 ; return 0; }
13037 EOF
13038 if { (eval echo configure:13039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13039   rm -rf conftest*
13040   ol_cv_pthread_lpthread_lmach_lexc=yes
13041 else
13042   echo "configure: failed program was:" >&5
13043   cat conftest.$ac_ext >&5
13044   rm -rf conftest*
13045   ol_cv_pthread_lpthread_lmach_lexc=no
13046 fi
13047 rm -f conftest*
13048 else
13049   cat > conftest.$ac_ext <<EOF
13050 #line 13051 "configure"
13051 #include "confdefs.h"
13052 /* pthread test headers */
13053 #include <pthread.h>
13054 #if HAVE_PTHREADS < 7
13055 #include <errno.h>
13056 #endif
13057 #ifndef NULL
13058 #define NULL (void*)0
13059 #endif
13060
13061 static void *task(p)
13062         void *p;
13063 {
13064         return (void *) (p == NULL);
13065 }
13066
13067
13068 int main(argc, argv)
13069         int argc;
13070         char **argv;
13071 {
13072
13073         /* pthread test function */
13074 #ifndef PTHREAD_CREATE_DETACHED
13075 #define PTHREAD_CREATE_DETACHED 1
13076 #endif
13077         pthread_t t;
13078         int status;
13079         int detach = PTHREAD_CREATE_DETACHED;
13080
13081 #if HAVE_PTHREADS > 4
13082         /* Final pthreads */
13083         pthread_attr_t attr;
13084
13085         status = pthread_attr_init(&attr);
13086         if( status ) return status;
13087
13088 #if HAVE_PTHREADS < 7
13089         status = pthread_attr_setdetachstate(&attr, &detach);
13090         if( status < 0 ) status = errno;
13091 #else
13092         status = pthread_attr_setdetachstate(&attr, detach);
13093 #endif
13094         if( status ) return status;
13095         status = pthread_create( &t, &attr, task, NULL );
13096 #if HAVE_PTHREADS < 7
13097         if( status < 0 ) status = errno;
13098 #endif
13099         if( status ) return status;
13100 #else
13101         /* Draft 4 pthreads */
13102         status = pthread_create( &t, pthread_attr_default, task, NULL );
13103         if( status ) return errno;
13104
13105         /* give thread a chance to complete */
13106         /* it should remain joinable and hence detachable */
13107         sleep( 1 );
13108
13109         status = pthread_detach( &t );
13110         if( status ) return errno;
13111 #endif
13112
13113 #ifdef HAVE_LINUX_THREADS
13114         pthread_kill_other_threads_np();
13115 #endif
13116
13117         return 0;
13118
13119 }
13120
13121 EOF
13122 if { (eval echo configure:13123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13123 then
13124   ol_cv_pthread_lpthread_lmach_lexc=yes
13125 else
13126   echo "configure: failed program was:" >&5
13127   cat conftest.$ac_ext >&5
13128   rm -fr conftest*
13129   ol_cv_pthread_lpthread_lmach_lexc=no
13130 fi
13131 rm -fr conftest*
13132 fi
13133
13134
13135                 # restore the LIBS
13136                 LIBS="$ol_LIBS"
13137         
13138 fi
13139
13140 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13141
13142         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13143                 ol_link_pthreads="-lpthread -lmach -lexc"
13144                 ol_link_threads=posix
13145         fi
13146 fi
13147
13148
13149                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13150 if test "$ol_link_threads" = no ; then
13151         # try -lpthread -Wl,-woff,85
13152         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13153 echo "configure:13154: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13154 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13155   echo $ac_n "(cached) $ac_c" 1>&6
13156 else
13157   
13158                 # save the flags
13159                 ol_LIBS="$LIBS"
13160                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13161
13162                 if test "$cross_compiling" = yes; then
13163   cat > conftest.$ac_ext <<EOF
13164 #line 13165 "configure"
13165 #include "confdefs.h"
13166 /* pthread test headers */
13167 #include <pthread.h>
13168 #if HAVE_PTHREADS < 7
13169 #include <errno.h>
13170 #endif
13171 #ifndef NULL
13172 #define NULL (void*)0
13173 #endif
13174
13175 static void *task(p)
13176         void *p;
13177 {
13178         return (void *) (p == NULL);
13179 }
13180
13181 int main() {
13182
13183         /* pthread test function */
13184 #ifndef PTHREAD_CREATE_DETACHED
13185 #define PTHREAD_CREATE_DETACHED 1
13186 #endif
13187         pthread_t t;
13188         int status;
13189         int detach = PTHREAD_CREATE_DETACHED;
13190
13191 #if HAVE_PTHREADS > 4
13192         /* Final pthreads */
13193         pthread_attr_t attr;
13194
13195         status = pthread_attr_init(&attr);
13196         if( status ) return status;
13197
13198 #if HAVE_PTHREADS < 7
13199         status = pthread_attr_setdetachstate(&attr, &detach);
13200         if( status < 0 ) status = errno;
13201 #else
13202         status = pthread_attr_setdetachstate(&attr, detach);
13203 #endif
13204         if( status ) return status;
13205         status = pthread_create( &t, &attr, task, NULL );
13206 #if HAVE_PTHREADS < 7
13207         if( status < 0 ) status = errno;
13208 #endif
13209         if( status ) return status;
13210 #else
13211         /* Draft 4 pthreads */
13212         status = pthread_create( &t, pthread_attr_default, task, NULL );
13213         if( status ) return errno;
13214
13215         /* give thread a chance to complete */
13216         /* it should remain joinable and hence detachable */
13217         sleep( 1 );
13218
13219         status = pthread_detach( &t );
13220         if( status ) return errno;
13221 #endif
13222
13223 #ifdef HAVE_LINUX_THREADS
13224         pthread_kill_other_threads_np();
13225 #endif
13226
13227         return 0;
13228
13229 ; return 0; }
13230 EOF
13231 if { (eval echo configure:13232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13232   rm -rf conftest*
13233   ol_cv_pthread_lib_lpthread_woff=yes
13234 else
13235   echo "configure: failed program was:" >&5
13236   cat conftest.$ac_ext >&5
13237   rm -rf conftest*
13238   ol_cv_pthread_lib_lpthread_woff=no
13239 fi
13240 rm -f conftest*
13241 else
13242   cat > conftest.$ac_ext <<EOF
13243 #line 13244 "configure"
13244 #include "confdefs.h"
13245 /* pthread test headers */
13246 #include <pthread.h>
13247 #if HAVE_PTHREADS < 7
13248 #include <errno.h>
13249 #endif
13250 #ifndef NULL
13251 #define NULL (void*)0
13252 #endif
13253
13254 static void *task(p)
13255         void *p;
13256 {
13257         return (void *) (p == NULL);
13258 }
13259
13260
13261 int main(argc, argv)
13262         int argc;
13263         char **argv;
13264 {
13265
13266         /* pthread test function */
13267 #ifndef PTHREAD_CREATE_DETACHED
13268 #define PTHREAD_CREATE_DETACHED 1
13269 #endif
13270         pthread_t t;
13271         int status;
13272         int detach = PTHREAD_CREATE_DETACHED;
13273
13274 #if HAVE_PTHREADS > 4
13275         /* Final pthreads */
13276         pthread_attr_t attr;
13277
13278         status = pthread_attr_init(&attr);
13279         if( status ) return status;
13280
13281 #if HAVE_PTHREADS < 7
13282         status = pthread_attr_setdetachstate(&attr, &detach);
13283         if( status < 0 ) status = errno;
13284 #else
13285         status = pthread_attr_setdetachstate(&attr, detach);
13286 #endif
13287         if( status ) return status;
13288         status = pthread_create( &t, &attr, task, NULL );
13289 #if HAVE_PTHREADS < 7
13290         if( status < 0 ) status = errno;
13291 #endif
13292         if( status ) return status;
13293 #else
13294         /* Draft 4 pthreads */
13295         status = pthread_create( &t, pthread_attr_default, task, NULL );
13296         if( status ) return errno;
13297
13298         /* give thread a chance to complete */
13299         /* it should remain joinable and hence detachable */
13300         sleep( 1 );
13301
13302         status = pthread_detach( &t );
13303         if( status ) return errno;
13304 #endif
13305
13306 #ifdef HAVE_LINUX_THREADS
13307         pthread_kill_other_threads_np();
13308 #endif
13309
13310         return 0;
13311
13312 }
13313
13314 EOF
13315 if { (eval echo configure:13316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13316 then
13317   ol_cv_pthread_lib_lpthread_woff=yes
13318 else
13319   echo "configure: failed program was:" >&5
13320   cat conftest.$ac_ext >&5
13321   rm -fr conftest*
13322   ol_cv_pthread_lib_lpthread_woff=no
13323 fi
13324 rm -fr conftest*
13325 fi
13326
13327
13328                 # restore the LIBS
13329                 LIBS="$ol_LIBS"
13330         
13331 fi
13332
13333 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13334
13335         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13336                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13337                 ol_link_threads=posix
13338         fi
13339 fi
13340
13341
13342                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13343 if test "$ol_link_threads" = no ; then
13344         # try -lpthread
13345         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13346 echo "configure:13347: checking for pthread link with -lpthread" >&5
13347 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13348   echo $ac_n "(cached) $ac_c" 1>&6
13349 else
13350   
13351                 # save the flags
13352                 ol_LIBS="$LIBS"
13353                 LIBS="-lpthread $LIBS"
13354
13355                 if test "$cross_compiling" = yes; then
13356   cat > conftest.$ac_ext <<EOF
13357 #line 13358 "configure"
13358 #include "confdefs.h"
13359 /* pthread test headers */
13360 #include <pthread.h>
13361 #if HAVE_PTHREADS < 7
13362 #include <errno.h>
13363 #endif
13364 #ifndef NULL
13365 #define NULL (void*)0
13366 #endif
13367
13368 static void *task(p)
13369         void *p;
13370 {
13371         return (void *) (p == NULL);
13372 }
13373
13374 int main() {
13375
13376         /* pthread test function */
13377 #ifndef PTHREAD_CREATE_DETACHED
13378 #define PTHREAD_CREATE_DETACHED 1
13379 #endif
13380         pthread_t t;
13381         int status;
13382         int detach = PTHREAD_CREATE_DETACHED;
13383
13384 #if HAVE_PTHREADS > 4
13385         /* Final pthreads */
13386         pthread_attr_t attr;
13387
13388         status = pthread_attr_init(&attr);
13389         if( status ) return status;
13390
13391 #if HAVE_PTHREADS < 7
13392         status = pthread_attr_setdetachstate(&attr, &detach);
13393         if( status < 0 ) status = errno;
13394 #else
13395         status = pthread_attr_setdetachstate(&attr, detach);
13396 #endif
13397         if( status ) return status;
13398         status = pthread_create( &t, &attr, task, NULL );
13399 #if HAVE_PTHREADS < 7
13400         if( status < 0 ) status = errno;
13401 #endif
13402         if( status ) return status;
13403 #else
13404         /* Draft 4 pthreads */
13405         status = pthread_create( &t, pthread_attr_default, task, NULL );
13406         if( status ) return errno;
13407
13408         /* give thread a chance to complete */
13409         /* it should remain joinable and hence detachable */
13410         sleep( 1 );
13411
13412         status = pthread_detach( &t );
13413         if( status ) return errno;
13414 #endif
13415
13416 #ifdef HAVE_LINUX_THREADS
13417         pthread_kill_other_threads_np();
13418 #endif
13419
13420         return 0;
13421
13422 ; return 0; }
13423 EOF
13424 if { (eval echo configure:13425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13425   rm -rf conftest*
13426   ol_cv_pthread_lpthread=yes
13427 else
13428   echo "configure: failed program was:" >&5
13429   cat conftest.$ac_ext >&5
13430   rm -rf conftest*
13431   ol_cv_pthread_lpthread=no
13432 fi
13433 rm -f conftest*
13434 else
13435   cat > conftest.$ac_ext <<EOF
13436 #line 13437 "configure"
13437 #include "confdefs.h"
13438 /* pthread test headers */
13439 #include <pthread.h>
13440 #if HAVE_PTHREADS < 7
13441 #include <errno.h>
13442 #endif
13443 #ifndef NULL
13444 #define NULL (void*)0
13445 #endif
13446
13447 static void *task(p)
13448         void *p;
13449 {
13450         return (void *) (p == NULL);
13451 }
13452
13453
13454 int main(argc, argv)
13455         int argc;
13456         char **argv;
13457 {
13458
13459         /* pthread test function */
13460 #ifndef PTHREAD_CREATE_DETACHED
13461 #define PTHREAD_CREATE_DETACHED 1
13462 #endif
13463         pthread_t t;
13464         int status;
13465         int detach = PTHREAD_CREATE_DETACHED;
13466
13467 #if HAVE_PTHREADS > 4
13468         /* Final pthreads */
13469         pthread_attr_t attr;
13470
13471         status = pthread_attr_init(&attr);
13472         if( status ) return status;
13473
13474 #if HAVE_PTHREADS < 7
13475         status = pthread_attr_setdetachstate(&attr, &detach);
13476         if( status < 0 ) status = errno;
13477 #else
13478         status = pthread_attr_setdetachstate(&attr, detach);
13479 #endif
13480         if( status ) return status;
13481         status = pthread_create( &t, &attr, task, NULL );
13482 #if HAVE_PTHREADS < 7
13483         if( status < 0 ) status = errno;
13484 #endif
13485         if( status ) return status;
13486 #else
13487         /* Draft 4 pthreads */
13488         status = pthread_create( &t, pthread_attr_default, task, NULL );
13489         if( status ) return errno;
13490
13491         /* give thread a chance to complete */
13492         /* it should remain joinable and hence detachable */
13493         sleep( 1 );
13494
13495         status = pthread_detach( &t );
13496         if( status ) return errno;
13497 #endif
13498
13499 #ifdef HAVE_LINUX_THREADS
13500         pthread_kill_other_threads_np();
13501 #endif
13502
13503         return 0;
13504
13505 }
13506
13507 EOF
13508 if { (eval echo configure:13509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13509 then
13510   ol_cv_pthread_lpthread=yes
13511 else
13512   echo "configure: failed program was:" >&5
13513   cat conftest.$ac_ext >&5
13514   rm -fr conftest*
13515   ol_cv_pthread_lpthread=no
13516 fi
13517 rm -fr conftest*
13518 fi
13519
13520
13521                 # restore the LIBS
13522                 LIBS="$ol_LIBS"
13523         
13524 fi
13525
13526 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13527
13528         if test $ol_cv_pthread_lpthread = yes ; then
13529                 ol_link_pthreads="-lpthread"
13530                 ol_link_threads=posix
13531         fi
13532 fi
13533
13534                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13535 if test "$ol_link_threads" = no ; then
13536         # try -lc_r
13537         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13538 echo "configure:13539: checking for pthread link with -lc_r" >&5
13539 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13540   echo $ac_n "(cached) $ac_c" 1>&6
13541 else
13542   
13543                 # save the flags
13544                 ol_LIBS="$LIBS"
13545                 LIBS="-lc_r $LIBS"
13546
13547                 if test "$cross_compiling" = yes; then
13548   cat > conftest.$ac_ext <<EOF
13549 #line 13550 "configure"
13550 #include "confdefs.h"
13551 /* pthread test headers */
13552 #include <pthread.h>
13553 #if HAVE_PTHREADS < 7
13554 #include <errno.h>
13555 #endif
13556 #ifndef NULL
13557 #define NULL (void*)0
13558 #endif
13559
13560 static void *task(p)
13561         void *p;
13562 {
13563         return (void *) (p == NULL);
13564 }
13565
13566 int main() {
13567
13568         /* pthread test function */
13569 #ifndef PTHREAD_CREATE_DETACHED
13570 #define PTHREAD_CREATE_DETACHED 1
13571 #endif
13572         pthread_t t;
13573         int status;
13574         int detach = PTHREAD_CREATE_DETACHED;
13575
13576 #if HAVE_PTHREADS > 4
13577         /* Final pthreads */
13578         pthread_attr_t attr;
13579
13580         status = pthread_attr_init(&attr);
13581         if( status ) return status;
13582
13583 #if HAVE_PTHREADS < 7
13584         status = pthread_attr_setdetachstate(&attr, &detach);
13585         if( status < 0 ) status = errno;
13586 #else
13587         status = pthread_attr_setdetachstate(&attr, detach);
13588 #endif
13589         if( status ) return status;
13590         status = pthread_create( &t, &attr, task, NULL );
13591 #if HAVE_PTHREADS < 7
13592         if( status < 0 ) status = errno;
13593 #endif
13594         if( status ) return status;
13595 #else
13596         /* Draft 4 pthreads */
13597         status = pthread_create( &t, pthread_attr_default, task, NULL );
13598         if( status ) return errno;
13599
13600         /* give thread a chance to complete */
13601         /* it should remain joinable and hence detachable */
13602         sleep( 1 );
13603
13604         status = pthread_detach( &t );
13605         if( status ) return errno;
13606 #endif
13607
13608 #ifdef HAVE_LINUX_THREADS
13609         pthread_kill_other_threads_np();
13610 #endif
13611
13612         return 0;
13613
13614 ; return 0; }
13615 EOF
13616 if { (eval echo configure:13617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13617   rm -rf conftest*
13618   ol_cv_pthread_lc_r=yes
13619 else
13620   echo "configure: failed program was:" >&5
13621   cat conftest.$ac_ext >&5
13622   rm -rf conftest*
13623   ol_cv_pthread_lc_r=no
13624 fi
13625 rm -f conftest*
13626 else
13627   cat > conftest.$ac_ext <<EOF
13628 #line 13629 "configure"
13629 #include "confdefs.h"
13630 /* pthread test headers */
13631 #include <pthread.h>
13632 #if HAVE_PTHREADS < 7
13633 #include <errno.h>
13634 #endif
13635 #ifndef NULL
13636 #define NULL (void*)0
13637 #endif
13638
13639 static void *task(p)
13640         void *p;
13641 {
13642         return (void *) (p == NULL);
13643 }
13644
13645
13646 int main(argc, argv)
13647         int argc;
13648         char **argv;
13649 {
13650
13651         /* pthread test function */
13652 #ifndef PTHREAD_CREATE_DETACHED
13653 #define PTHREAD_CREATE_DETACHED 1
13654 #endif
13655         pthread_t t;
13656         int status;
13657         int detach = PTHREAD_CREATE_DETACHED;
13658
13659 #if HAVE_PTHREADS > 4
13660         /* Final pthreads */
13661         pthread_attr_t attr;
13662
13663         status = pthread_attr_init(&attr);
13664         if( status ) return status;
13665
13666 #if HAVE_PTHREADS < 7
13667         status = pthread_attr_setdetachstate(&attr, &detach);
13668         if( status < 0 ) status = errno;
13669 #else
13670         status = pthread_attr_setdetachstate(&attr, detach);
13671 #endif
13672         if( status ) return status;
13673         status = pthread_create( &t, &attr, task, NULL );
13674 #if HAVE_PTHREADS < 7
13675         if( status < 0 ) status = errno;
13676 #endif
13677         if( status ) return status;
13678 #else
13679         /* Draft 4 pthreads */
13680         status = pthread_create( &t, pthread_attr_default, task, NULL );
13681         if( status ) return errno;
13682
13683         /* give thread a chance to complete */
13684         /* it should remain joinable and hence detachable */
13685         sleep( 1 );
13686
13687         status = pthread_detach( &t );
13688         if( status ) return errno;
13689 #endif
13690
13691 #ifdef HAVE_LINUX_THREADS
13692         pthread_kill_other_threads_np();
13693 #endif
13694
13695         return 0;
13696
13697 }
13698
13699 EOF
13700 if { (eval echo configure:13701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13701 then
13702   ol_cv_pthread_lc_r=yes
13703 else
13704   echo "configure: failed program was:" >&5
13705   cat conftest.$ac_ext >&5
13706   rm -fr conftest*
13707   ol_cv_pthread_lc_r=no
13708 fi
13709 rm -fr conftest*
13710 fi
13711
13712
13713                 # restore the LIBS
13714                 LIBS="$ol_LIBS"
13715         
13716 fi
13717
13718 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13719
13720         if test $ol_cv_pthread_lc_r = yes ; then
13721                 ol_link_pthreads="-lc_r"
13722                 ol_link_threads=posix
13723         fi
13724 fi
13725
13726
13727                 # Pthread try link: -threads (ol_cv_pthread_threads)
13728 if test "$ol_link_threads" = no ; then
13729         # try -threads
13730         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13731 echo "configure:13732: checking for pthread link with -threads" >&5
13732 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13733   echo $ac_n "(cached) $ac_c" 1>&6
13734 else
13735   
13736                 # save the flags
13737                 ol_LIBS="$LIBS"
13738                 LIBS="-threads $LIBS"
13739
13740                 if test "$cross_compiling" = yes; then
13741   cat > conftest.$ac_ext <<EOF
13742 #line 13743 "configure"
13743 #include "confdefs.h"
13744 /* pthread test headers */
13745 #include <pthread.h>
13746 #if HAVE_PTHREADS < 7
13747 #include <errno.h>
13748 #endif
13749 #ifndef NULL
13750 #define NULL (void*)0
13751 #endif
13752
13753 static void *task(p)
13754         void *p;
13755 {
13756         return (void *) (p == NULL);
13757 }
13758
13759 int main() {
13760
13761         /* pthread test function */
13762 #ifndef PTHREAD_CREATE_DETACHED
13763 #define PTHREAD_CREATE_DETACHED 1
13764 #endif
13765         pthread_t t;
13766         int status;
13767         int detach = PTHREAD_CREATE_DETACHED;
13768
13769 #if HAVE_PTHREADS > 4
13770         /* Final pthreads */
13771         pthread_attr_t attr;
13772
13773         status = pthread_attr_init(&attr);
13774         if( status ) return status;
13775
13776 #if HAVE_PTHREADS < 7
13777         status = pthread_attr_setdetachstate(&attr, &detach);
13778         if( status < 0 ) status = errno;
13779 #else
13780         status = pthread_attr_setdetachstate(&attr, detach);
13781 #endif
13782         if( status ) return status;
13783         status = pthread_create( &t, &attr, task, NULL );
13784 #if HAVE_PTHREADS < 7
13785         if( status < 0 ) status = errno;
13786 #endif
13787         if( status ) return status;
13788 #else
13789         /* Draft 4 pthreads */
13790         status = pthread_create( &t, pthread_attr_default, task, NULL );
13791         if( status ) return errno;
13792
13793         /* give thread a chance to complete */
13794         /* it should remain joinable and hence detachable */
13795         sleep( 1 );
13796
13797         status = pthread_detach( &t );
13798         if( status ) return errno;
13799 #endif
13800
13801 #ifdef HAVE_LINUX_THREADS
13802         pthread_kill_other_threads_np();
13803 #endif
13804
13805         return 0;
13806
13807 ; return 0; }
13808 EOF
13809 if { (eval echo configure:13810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13810   rm -rf conftest*
13811   ol_cv_pthread_threads=yes
13812 else
13813   echo "configure: failed program was:" >&5
13814   cat conftest.$ac_ext >&5
13815   rm -rf conftest*
13816   ol_cv_pthread_threads=no
13817 fi
13818 rm -f conftest*
13819 else
13820   cat > conftest.$ac_ext <<EOF
13821 #line 13822 "configure"
13822 #include "confdefs.h"
13823 /* pthread test headers */
13824 #include <pthread.h>
13825 #if HAVE_PTHREADS < 7
13826 #include <errno.h>
13827 #endif
13828 #ifndef NULL
13829 #define NULL (void*)0
13830 #endif
13831
13832 static void *task(p)
13833         void *p;
13834 {
13835         return (void *) (p == NULL);
13836 }
13837
13838
13839 int main(argc, argv)
13840         int argc;
13841         char **argv;
13842 {
13843
13844         /* pthread test function */
13845 #ifndef PTHREAD_CREATE_DETACHED
13846 #define PTHREAD_CREATE_DETACHED 1
13847 #endif
13848         pthread_t t;
13849         int status;
13850         int detach = PTHREAD_CREATE_DETACHED;
13851
13852 #if HAVE_PTHREADS > 4
13853         /* Final pthreads */
13854         pthread_attr_t attr;
13855
13856         status = pthread_attr_init(&attr);
13857         if( status ) return status;
13858
13859 #if HAVE_PTHREADS < 7
13860         status = pthread_attr_setdetachstate(&attr, &detach);
13861         if( status < 0 ) status = errno;
13862 #else
13863         status = pthread_attr_setdetachstate(&attr, detach);
13864 #endif
13865         if( status ) return status;
13866         status = pthread_create( &t, &attr, task, NULL );
13867 #if HAVE_PTHREADS < 7
13868         if( status < 0 ) status = errno;
13869 #endif
13870         if( status ) return status;
13871 #else
13872         /* Draft 4 pthreads */
13873         status = pthread_create( &t, pthread_attr_default, task, NULL );
13874         if( status ) return errno;
13875
13876         /* give thread a chance to complete */
13877         /* it should remain joinable and hence detachable */
13878         sleep( 1 );
13879
13880         status = pthread_detach( &t );
13881         if( status ) return errno;
13882 #endif
13883
13884 #ifdef HAVE_LINUX_THREADS
13885         pthread_kill_other_threads_np();
13886 #endif
13887
13888         return 0;
13889
13890 }
13891
13892 EOF
13893 if { (eval echo configure:13894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13894 then
13895   ol_cv_pthread_threads=yes
13896 else
13897   echo "configure: failed program was:" >&5
13898   cat conftest.$ac_ext >&5
13899   rm -fr conftest*
13900   ol_cv_pthread_threads=no
13901 fi
13902 rm -fr conftest*
13903 fi
13904
13905
13906                 # restore the LIBS
13907                 LIBS="$ol_LIBS"
13908         
13909 fi
13910
13911 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13912
13913         if test $ol_cv_pthread_threads = yes ; then
13914                 ol_link_pthreads="-threads"
13915                 ol_link_threads=posix
13916         fi
13917 fi
13918
13919
13920                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13921 if test "$ol_link_threads" = no ; then
13922         # try -lpthreads -lmach -lexc -lc_r
13923         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13924 echo "configure:13925: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13925 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13926   echo $ac_n "(cached) $ac_c" 1>&6
13927 else
13928   
13929                 # save the flags
13930                 ol_LIBS="$LIBS"
13931                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13932
13933                 if test "$cross_compiling" = yes; then
13934   cat > conftest.$ac_ext <<EOF
13935 #line 13936 "configure"
13936 #include "confdefs.h"
13937 /* pthread test headers */
13938 #include <pthread.h>
13939 #if HAVE_PTHREADS < 7
13940 #include <errno.h>
13941 #endif
13942 #ifndef NULL
13943 #define NULL (void*)0
13944 #endif
13945
13946 static void *task(p)
13947         void *p;
13948 {
13949         return (void *) (p == NULL);
13950 }
13951
13952 int main() {
13953
13954         /* pthread test function */
13955 #ifndef PTHREAD_CREATE_DETACHED
13956 #define PTHREAD_CREATE_DETACHED 1
13957 #endif
13958         pthread_t t;
13959         int status;
13960         int detach = PTHREAD_CREATE_DETACHED;
13961
13962 #if HAVE_PTHREADS > 4
13963         /* Final pthreads */
13964         pthread_attr_t attr;
13965
13966         status = pthread_attr_init(&attr);
13967         if( status ) return status;
13968
13969 #if HAVE_PTHREADS < 7
13970         status = pthread_attr_setdetachstate(&attr, &detach);
13971         if( status < 0 ) status = errno;
13972 #else
13973         status = pthread_attr_setdetachstate(&attr, detach);
13974 #endif
13975         if( status ) return status;
13976         status = pthread_create( &t, &attr, task, NULL );
13977 #if HAVE_PTHREADS < 7
13978         if( status < 0 ) status = errno;
13979 #endif
13980         if( status ) return status;
13981 #else
13982         /* Draft 4 pthreads */
13983         status = pthread_create( &t, pthread_attr_default, task, NULL );
13984         if( status ) return errno;
13985
13986         /* give thread a chance to complete */
13987         /* it should remain joinable and hence detachable */
13988         sleep( 1 );
13989
13990         status = pthread_detach( &t );
13991         if( status ) return errno;
13992 #endif
13993
13994 #ifdef HAVE_LINUX_THREADS
13995         pthread_kill_other_threads_np();
13996 #endif
13997
13998         return 0;
13999
14000 ; return 0; }
14001 EOF
14002 if { (eval echo configure:14003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14003   rm -rf conftest*
14004   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14005 else
14006   echo "configure: failed program was:" >&5
14007   cat conftest.$ac_ext >&5
14008   rm -rf conftest*
14009   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14010 fi
14011 rm -f conftest*
14012 else
14013   cat > conftest.$ac_ext <<EOF
14014 #line 14015 "configure"
14015 #include "confdefs.h"
14016 /* pthread test headers */
14017 #include <pthread.h>
14018 #if HAVE_PTHREADS < 7
14019 #include <errno.h>
14020 #endif
14021 #ifndef NULL
14022 #define NULL (void*)0
14023 #endif
14024
14025 static void *task(p)
14026         void *p;
14027 {
14028         return (void *) (p == NULL);
14029 }
14030
14031
14032 int main(argc, argv)
14033         int argc;
14034         char **argv;
14035 {
14036
14037         /* pthread test function */
14038 #ifndef PTHREAD_CREATE_DETACHED
14039 #define PTHREAD_CREATE_DETACHED 1
14040 #endif
14041         pthread_t t;
14042         int status;
14043         int detach = PTHREAD_CREATE_DETACHED;
14044
14045 #if HAVE_PTHREADS > 4
14046         /* Final pthreads */
14047         pthread_attr_t attr;
14048
14049         status = pthread_attr_init(&attr);
14050         if( status ) return status;
14051
14052 #if HAVE_PTHREADS < 7
14053         status = pthread_attr_setdetachstate(&attr, &detach);
14054         if( status < 0 ) status = errno;
14055 #else
14056         status = pthread_attr_setdetachstate(&attr, detach);
14057 #endif
14058         if( status ) return status;
14059         status = pthread_create( &t, &attr, task, NULL );
14060 #if HAVE_PTHREADS < 7
14061         if( status < 0 ) status = errno;
14062 #endif
14063         if( status ) return status;
14064 #else
14065         /* Draft 4 pthreads */
14066         status = pthread_create( &t, pthread_attr_default, task, NULL );
14067         if( status ) return errno;
14068
14069         /* give thread a chance to complete */
14070         /* it should remain joinable and hence detachable */
14071         sleep( 1 );
14072
14073         status = pthread_detach( &t );
14074         if( status ) return errno;
14075 #endif
14076
14077 #ifdef HAVE_LINUX_THREADS
14078         pthread_kill_other_threads_np();
14079 #endif
14080
14081         return 0;
14082
14083 }
14084
14085 EOF
14086 if { (eval echo configure:14087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14087 then
14088   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14089 else
14090   echo "configure: failed program was:" >&5
14091   cat conftest.$ac_ext >&5
14092   rm -fr conftest*
14093   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14094 fi
14095 rm -fr conftest*
14096 fi
14097
14098
14099                 # restore the LIBS
14100                 LIBS="$ol_LIBS"
14101         
14102 fi
14103
14104 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14105
14106         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14107                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14108                 ol_link_threads=posix
14109         fi
14110 fi
14111
14112                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14113 if test "$ol_link_threads" = no ; then
14114         # try -lpthreads -lmach -lexc
14115         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14116 echo "configure:14117: checking for pthread link with -lpthreads -lmach -lexc" >&5
14117 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14118   echo $ac_n "(cached) $ac_c" 1>&6
14119 else
14120   
14121                 # save the flags
14122                 ol_LIBS="$LIBS"
14123                 LIBS="-lpthreads -lmach -lexc $LIBS"
14124
14125                 if test "$cross_compiling" = yes; then
14126   cat > conftest.$ac_ext <<EOF
14127 #line 14128 "configure"
14128 #include "confdefs.h"
14129 /* pthread test headers */
14130 #include <pthread.h>
14131 #if HAVE_PTHREADS < 7
14132 #include <errno.h>
14133 #endif
14134 #ifndef NULL
14135 #define NULL (void*)0
14136 #endif
14137
14138 static void *task(p)
14139         void *p;
14140 {
14141         return (void *) (p == NULL);
14142 }
14143
14144 int main() {
14145
14146         /* pthread test function */
14147 #ifndef PTHREAD_CREATE_DETACHED
14148 #define PTHREAD_CREATE_DETACHED 1
14149 #endif
14150         pthread_t t;
14151         int status;
14152         int detach = PTHREAD_CREATE_DETACHED;
14153
14154 #if HAVE_PTHREADS > 4
14155         /* Final pthreads */
14156         pthread_attr_t attr;
14157
14158         status = pthread_attr_init(&attr);
14159         if( status ) return status;
14160
14161 #if HAVE_PTHREADS < 7
14162         status = pthread_attr_setdetachstate(&attr, &detach);
14163         if( status < 0 ) status = errno;
14164 #else
14165         status = pthread_attr_setdetachstate(&attr, detach);
14166 #endif
14167         if( status ) return status;
14168         status = pthread_create( &t, &attr, task, NULL );
14169 #if HAVE_PTHREADS < 7
14170         if( status < 0 ) status = errno;
14171 #endif
14172         if( status ) return status;
14173 #else
14174         /* Draft 4 pthreads */
14175         status = pthread_create( &t, pthread_attr_default, task, NULL );
14176         if( status ) return errno;
14177
14178         /* give thread a chance to complete */
14179         /* it should remain joinable and hence detachable */
14180         sleep( 1 );
14181
14182         status = pthread_detach( &t );
14183         if( status ) return errno;
14184 #endif
14185
14186 #ifdef HAVE_LINUX_THREADS
14187         pthread_kill_other_threads_np();
14188 #endif
14189
14190         return 0;
14191
14192 ; return 0; }
14193 EOF
14194 if { (eval echo configure:14195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14195   rm -rf conftest*
14196   ol_cv_pthread_lpthreads_lmach_lexc=yes
14197 else
14198   echo "configure: failed program was:" >&5
14199   cat conftest.$ac_ext >&5
14200   rm -rf conftest*
14201   ol_cv_pthread_lpthreads_lmach_lexc=no
14202 fi
14203 rm -f conftest*
14204 else
14205   cat > conftest.$ac_ext <<EOF
14206 #line 14207 "configure"
14207 #include "confdefs.h"
14208 /* pthread test headers */
14209 #include <pthread.h>
14210 #if HAVE_PTHREADS < 7
14211 #include <errno.h>
14212 #endif
14213 #ifndef NULL
14214 #define NULL (void*)0
14215 #endif
14216
14217 static void *task(p)
14218         void *p;
14219 {
14220         return (void *) (p == NULL);
14221 }
14222
14223
14224 int main(argc, argv)
14225         int argc;
14226         char **argv;
14227 {
14228
14229         /* pthread test function */
14230 #ifndef PTHREAD_CREATE_DETACHED
14231 #define PTHREAD_CREATE_DETACHED 1
14232 #endif
14233         pthread_t t;
14234         int status;
14235         int detach = PTHREAD_CREATE_DETACHED;
14236
14237 #if HAVE_PTHREADS > 4
14238         /* Final pthreads */
14239         pthread_attr_t attr;
14240
14241         status = pthread_attr_init(&attr);
14242         if( status ) return status;
14243
14244 #if HAVE_PTHREADS < 7
14245         status = pthread_attr_setdetachstate(&attr, &detach);
14246         if( status < 0 ) status = errno;
14247 #else
14248         status = pthread_attr_setdetachstate(&attr, detach);
14249 #endif
14250         if( status ) return status;
14251         status = pthread_create( &t, &attr, task, NULL );
14252 #if HAVE_PTHREADS < 7
14253         if( status < 0 ) status = errno;
14254 #endif
14255         if( status ) return status;
14256 #else
14257         /* Draft 4 pthreads */
14258         status = pthread_create( &t, pthread_attr_default, task, NULL );
14259         if( status ) return errno;
14260
14261         /* give thread a chance to complete */
14262         /* it should remain joinable and hence detachable */
14263         sleep( 1 );
14264
14265         status = pthread_detach( &t );
14266         if( status ) return errno;
14267 #endif
14268
14269 #ifdef HAVE_LINUX_THREADS
14270         pthread_kill_other_threads_np();
14271 #endif
14272
14273         return 0;
14274
14275 }
14276
14277 EOF
14278 if { (eval echo configure:14279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14279 then
14280   ol_cv_pthread_lpthreads_lmach_lexc=yes
14281 else
14282   echo "configure: failed program was:" >&5
14283   cat conftest.$ac_ext >&5
14284   rm -fr conftest*
14285   ol_cv_pthread_lpthreads_lmach_lexc=no
14286 fi
14287 rm -fr conftest*
14288 fi
14289
14290
14291                 # restore the LIBS
14292                 LIBS="$ol_LIBS"
14293         
14294 fi
14295
14296 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14297
14298         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14299                 ol_link_pthreads="-lpthreads -lmach -lexc"
14300                 ol_link_threads=posix
14301         fi
14302 fi
14303
14304                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14305 if test "$ol_link_threads" = no ; then
14306         # try -lpthreads -lexc
14307         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14308 echo "configure:14309: checking for pthread link with -lpthreads -lexc" >&5
14309 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14310   echo $ac_n "(cached) $ac_c" 1>&6
14311 else
14312   
14313                 # save the flags
14314                 ol_LIBS="$LIBS"
14315                 LIBS="-lpthreads -lexc $LIBS"
14316
14317                 if test "$cross_compiling" = yes; then
14318   cat > conftest.$ac_ext <<EOF
14319 #line 14320 "configure"
14320 #include "confdefs.h"
14321 /* pthread test headers */
14322 #include <pthread.h>
14323 #if HAVE_PTHREADS < 7
14324 #include <errno.h>
14325 #endif
14326 #ifndef NULL
14327 #define NULL (void*)0
14328 #endif
14329
14330 static void *task(p)
14331         void *p;
14332 {
14333         return (void *) (p == NULL);
14334 }
14335
14336 int main() {
14337
14338         /* pthread test function */
14339 #ifndef PTHREAD_CREATE_DETACHED
14340 #define PTHREAD_CREATE_DETACHED 1
14341 #endif
14342         pthread_t t;
14343         int status;
14344         int detach = PTHREAD_CREATE_DETACHED;
14345
14346 #if HAVE_PTHREADS > 4
14347         /* Final pthreads */
14348         pthread_attr_t attr;
14349
14350         status = pthread_attr_init(&attr);
14351         if( status ) return status;
14352
14353 #if HAVE_PTHREADS < 7
14354         status = pthread_attr_setdetachstate(&attr, &detach);
14355         if( status < 0 ) status = errno;
14356 #else
14357         status = pthread_attr_setdetachstate(&attr, detach);
14358 #endif
14359         if( status ) return status;
14360         status = pthread_create( &t, &attr, task, NULL );
14361 #if HAVE_PTHREADS < 7
14362         if( status < 0 ) status = errno;
14363 #endif
14364         if( status ) return status;
14365 #else
14366         /* Draft 4 pthreads */
14367         status = pthread_create( &t, pthread_attr_default, task, NULL );
14368         if( status ) return errno;
14369
14370         /* give thread a chance to complete */
14371         /* it should remain joinable and hence detachable */
14372         sleep( 1 );
14373
14374         status = pthread_detach( &t );
14375         if( status ) return errno;
14376 #endif
14377
14378 #ifdef HAVE_LINUX_THREADS
14379         pthread_kill_other_threads_np();
14380 #endif
14381
14382         return 0;
14383
14384 ; return 0; }
14385 EOF
14386 if { (eval echo configure:14387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14387   rm -rf conftest*
14388   ol_cv_pthread_lpthreads_lexc=yes
14389 else
14390   echo "configure: failed program was:" >&5
14391   cat conftest.$ac_ext >&5
14392   rm -rf conftest*
14393   ol_cv_pthread_lpthreads_lexc=no
14394 fi
14395 rm -f conftest*
14396 else
14397   cat > conftest.$ac_ext <<EOF
14398 #line 14399 "configure"
14399 #include "confdefs.h"
14400 /* pthread test headers */
14401 #include <pthread.h>
14402 #if HAVE_PTHREADS < 7
14403 #include <errno.h>
14404 #endif
14405 #ifndef NULL
14406 #define NULL (void*)0
14407 #endif
14408
14409 static void *task(p)
14410         void *p;
14411 {
14412         return (void *) (p == NULL);
14413 }
14414
14415
14416 int main(argc, argv)
14417         int argc;
14418         char **argv;
14419 {
14420
14421         /* pthread test function */
14422 #ifndef PTHREAD_CREATE_DETACHED
14423 #define PTHREAD_CREATE_DETACHED 1
14424 #endif
14425         pthread_t t;
14426         int status;
14427         int detach = PTHREAD_CREATE_DETACHED;
14428
14429 #if HAVE_PTHREADS > 4
14430         /* Final pthreads */
14431         pthread_attr_t attr;
14432
14433         status = pthread_attr_init(&attr);
14434         if( status ) return status;
14435
14436 #if HAVE_PTHREADS < 7
14437         status = pthread_attr_setdetachstate(&attr, &detach);
14438         if( status < 0 ) status = errno;
14439 #else
14440         status = pthread_attr_setdetachstate(&attr, detach);
14441 #endif
14442         if( status ) return status;
14443         status = pthread_create( &t, &attr, task, NULL );
14444 #if HAVE_PTHREADS < 7
14445         if( status < 0 ) status = errno;
14446 #endif
14447         if( status ) return status;
14448 #else
14449         /* Draft 4 pthreads */
14450         status = pthread_create( &t, pthread_attr_default, task, NULL );
14451         if( status ) return errno;
14452
14453         /* give thread a chance to complete */
14454         /* it should remain joinable and hence detachable */
14455         sleep( 1 );
14456
14457         status = pthread_detach( &t );
14458         if( status ) return errno;
14459 #endif
14460
14461 #ifdef HAVE_LINUX_THREADS
14462         pthread_kill_other_threads_np();
14463 #endif
14464
14465         return 0;
14466
14467 }
14468
14469 EOF
14470 if { (eval echo configure:14471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14471 then
14472   ol_cv_pthread_lpthreads_lexc=yes
14473 else
14474   echo "configure: failed program was:" >&5
14475   cat conftest.$ac_ext >&5
14476   rm -fr conftest*
14477   ol_cv_pthread_lpthreads_lexc=no
14478 fi
14479 rm -fr conftest*
14480 fi
14481
14482
14483                 # restore the LIBS
14484                 LIBS="$ol_LIBS"
14485         
14486 fi
14487
14488 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14489
14490         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14491                 ol_link_pthreads="-lpthreads -lexc"
14492                 ol_link_threads=posix
14493         fi
14494 fi
14495
14496
14497                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14498 if test "$ol_link_threads" = no ; then
14499         # try -lpthreads
14500         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14501 echo "configure:14502: checking for pthread link with -lpthreads" >&5
14502 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14503   echo $ac_n "(cached) $ac_c" 1>&6
14504 else
14505   
14506                 # save the flags
14507                 ol_LIBS="$LIBS"
14508                 LIBS="-lpthreads $LIBS"
14509
14510                 if test "$cross_compiling" = yes; then
14511   cat > conftest.$ac_ext <<EOF
14512 #line 14513 "configure"
14513 #include "confdefs.h"
14514 /* pthread test headers */
14515 #include <pthread.h>
14516 #if HAVE_PTHREADS < 7
14517 #include <errno.h>
14518 #endif
14519 #ifndef NULL
14520 #define NULL (void*)0
14521 #endif
14522
14523 static void *task(p)
14524         void *p;
14525 {
14526         return (void *) (p == NULL);
14527 }
14528
14529 int main() {
14530
14531         /* pthread test function */
14532 #ifndef PTHREAD_CREATE_DETACHED
14533 #define PTHREAD_CREATE_DETACHED 1
14534 #endif
14535         pthread_t t;
14536         int status;
14537         int detach = PTHREAD_CREATE_DETACHED;
14538
14539 #if HAVE_PTHREADS > 4
14540         /* Final pthreads */
14541         pthread_attr_t attr;
14542
14543         status = pthread_attr_init(&attr);
14544         if( status ) return status;
14545
14546 #if HAVE_PTHREADS < 7
14547         status = pthread_attr_setdetachstate(&attr, &detach);
14548         if( status < 0 ) status = errno;
14549 #else
14550         status = pthread_attr_setdetachstate(&attr, detach);
14551 #endif
14552         if( status ) return status;
14553         status = pthread_create( &t, &attr, task, NULL );
14554 #if HAVE_PTHREADS < 7
14555         if( status < 0 ) status = errno;
14556 #endif
14557         if( status ) return status;
14558 #else
14559         /* Draft 4 pthreads */
14560         status = pthread_create( &t, pthread_attr_default, task, NULL );
14561         if( status ) return errno;
14562
14563         /* give thread a chance to complete */
14564         /* it should remain joinable and hence detachable */
14565         sleep( 1 );
14566
14567         status = pthread_detach( &t );
14568         if( status ) return errno;
14569 #endif
14570
14571 #ifdef HAVE_LINUX_THREADS
14572         pthread_kill_other_threads_np();
14573 #endif
14574
14575         return 0;
14576
14577 ; return 0; }
14578 EOF
14579 if { (eval echo configure:14580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14580   rm -rf conftest*
14581   ol_cv_pthread_lib_lpthreads=yes
14582 else
14583   echo "configure: failed program was:" >&5
14584   cat conftest.$ac_ext >&5
14585   rm -rf conftest*
14586   ol_cv_pthread_lib_lpthreads=no
14587 fi
14588 rm -f conftest*
14589 else
14590   cat > conftest.$ac_ext <<EOF
14591 #line 14592 "configure"
14592 #include "confdefs.h"
14593 /* pthread test headers */
14594 #include <pthread.h>
14595 #if HAVE_PTHREADS < 7
14596 #include <errno.h>
14597 #endif
14598 #ifndef NULL
14599 #define NULL (void*)0
14600 #endif
14601
14602 static void *task(p)
14603         void *p;
14604 {
14605         return (void *) (p == NULL);
14606 }
14607
14608
14609 int main(argc, argv)
14610         int argc;
14611         char **argv;
14612 {
14613
14614         /* pthread test function */
14615 #ifndef PTHREAD_CREATE_DETACHED
14616 #define PTHREAD_CREATE_DETACHED 1
14617 #endif
14618         pthread_t t;
14619         int status;
14620         int detach = PTHREAD_CREATE_DETACHED;
14621
14622 #if HAVE_PTHREADS > 4
14623         /* Final pthreads */
14624         pthread_attr_t attr;
14625
14626         status = pthread_attr_init(&attr);
14627         if( status ) return status;
14628
14629 #if HAVE_PTHREADS < 7
14630         status = pthread_attr_setdetachstate(&attr, &detach);
14631         if( status < 0 ) status = errno;
14632 #else
14633         status = pthread_attr_setdetachstate(&attr, detach);
14634 #endif
14635         if( status ) return status;
14636         status = pthread_create( &t, &attr, task, NULL );
14637 #if HAVE_PTHREADS < 7
14638         if( status < 0 ) status = errno;
14639 #endif
14640         if( status ) return status;
14641 #else
14642         /* Draft 4 pthreads */
14643         status = pthread_create( &t, pthread_attr_default, task, NULL );
14644         if( status ) return errno;
14645
14646         /* give thread a chance to complete */
14647         /* it should remain joinable and hence detachable */
14648         sleep( 1 );
14649
14650         status = pthread_detach( &t );
14651         if( status ) return errno;
14652 #endif
14653
14654 #ifdef HAVE_LINUX_THREADS
14655         pthread_kill_other_threads_np();
14656 #endif
14657
14658         return 0;
14659
14660 }
14661
14662 EOF
14663 if { (eval echo configure:14664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14664 then
14665   ol_cv_pthread_lib_lpthreads=yes
14666 else
14667   echo "configure: failed program was:" >&5
14668   cat conftest.$ac_ext >&5
14669   rm -fr conftest*
14670   ol_cv_pthread_lib_lpthreads=no
14671 fi
14672 rm -fr conftest*
14673 fi
14674
14675
14676                 # restore the LIBS
14677                 LIBS="$ol_LIBS"
14678         
14679 fi
14680
14681 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14682
14683         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14684                 ol_link_pthreads="-lpthreads"
14685                 ol_link_threads=posix
14686         fi
14687 fi
14688
14689
14690                 if test $ol_link_threads != no ; then
14691                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14692
14693                                                 save_CPPFLAGS="$CPPFLAGS"
14694                         save_LIBS="$LIBS"
14695                         LIBS="$LTHREAD_LIBS $LIBS"
14696
14697                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14698 do
14699 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14700 echo "configure:14701: checking for $ac_func" >&5
14701 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14702   echo $ac_n "(cached) $ac_c" 1>&6
14703 else
14704   cat > conftest.$ac_ext <<EOF
14705 #line 14706 "configure"
14706 #include "confdefs.h"
14707 /* System header to define __stub macros and hopefully few prototypes,
14708     which can conflict with char $ac_func(); below.  */
14709 #include <assert.h>
14710 /* Override any gcc2 internal prototype to avoid an error.  */
14711 /* We use char because int might match the return type of a gcc2
14712     builtin and then its argument prototype would still apply.  */
14713 char $ac_func();
14714 char (*f)();
14715
14716 int main() {
14717
14718 /* The GNU C library defines this for functions which it implements
14719     to always fail with ENOSYS.  Some functions are actually named
14720     something starting with __ and the normal name is an alias.  */
14721 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14722 choke me
14723 #else
14724 f = $ac_func;
14725 #endif
14726
14727 ; return 0; }
14728 EOF
14729 if { (eval echo configure:14730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14730   rm -rf conftest*
14731   eval "ac_cv_func_$ac_func=yes"
14732 else
14733   echo "configure: failed program was:" >&5
14734   cat conftest.$ac_ext >&5
14735   rm -rf conftest*
14736   eval "ac_cv_func_$ac_func=no"
14737 fi
14738 rm -f conftest*
14739 fi
14740
14741 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14742   echo "$ac_t""yes" 1>&6
14743     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14744   cat >> confdefs.h <<EOF
14745 #define $ac_tr_func 1
14746 EOF
14747  
14748 else
14749   echo "$ac_t""no" 1>&6
14750 fi
14751 done
14752
14753
14754                         if test $ac_cv_func_sched_yield = no -a \
14755                                 $ac_cv_func_pthread_yield = no -a \
14756                                 $ac_cv_func_thr_yield = no ; then
14757                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14758 echo "configure:14759: checking for sched_yield in -lrt" >&5
14759 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14760 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14761   echo $ac_n "(cached) $ac_c" 1>&6
14762 else
14763   ac_save_LIBS="$LIBS"
14764 LIBS="-lrt  $LIBS"
14765 cat > conftest.$ac_ext <<EOF
14766 #line 14767 "configure"
14767 #include "confdefs.h"
14768 /* Override any gcc2 internal prototype to avoid an error.  */
14769 /* We use char because int might match the return type of a gcc2
14770     builtin and then its argument prototype would still apply.  */
14771 char sched_yield();
14772
14773 int main() {
14774 sched_yield()
14775 ; return 0; }
14776 EOF
14777 if { (eval echo configure:14778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14778   rm -rf conftest*
14779   eval "ac_cv_lib_$ac_lib_var=yes"
14780 else
14781   echo "configure: failed program was:" >&5
14782   cat conftest.$ac_ext >&5
14783   rm -rf conftest*
14784   eval "ac_cv_lib_$ac_lib_var=no"
14785 fi
14786 rm -f conftest*
14787 LIBS="$ac_save_LIBS"
14788
14789 fi
14790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14791   echo "$ac_t""yes" 1>&6
14792   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14793                                         cat >> confdefs.h <<\EOF
14794 #define HAVE_SCHED_YIELD 1
14795 EOF
14796
14797                                         ac_cv_func_sched_yield=yes
14798 else
14799   echo "$ac_t""no" 1>&6
14800 ac_cv_func_sched_yield=no
14801 fi
14802
14803                         fi
14804                         if test $ac_cv_func_sched_yield = no -a \
14805                                 $ac_cv_func_pthread_yield = no -a \
14806                                 "$ac_cv_func_thr_yield" = no ; then
14807                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14808                         fi
14809
14810                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14811 do
14812 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14813 echo "configure:14814: checking for $ac_func" >&5
14814 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14815   echo $ac_n "(cached) $ac_c" 1>&6
14816 else
14817   cat > conftest.$ac_ext <<EOF
14818 #line 14819 "configure"
14819 #include "confdefs.h"
14820 /* System header to define __stub macros and hopefully few prototypes,
14821     which can conflict with char $ac_func(); below.  */
14822 #include <assert.h>
14823 /* Override any gcc2 internal prototype to avoid an error.  */
14824 /* We use char because int might match the return type of a gcc2
14825     builtin and then its argument prototype would still apply.  */
14826 char $ac_func();
14827 char (*f)();
14828
14829 int main() {
14830
14831 /* The GNU C library defines this for functions which it implements
14832     to always fail with ENOSYS.  Some functions are actually named
14833     something starting with __ and the normal name is an alias.  */
14834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14835 choke me
14836 #else
14837 f = $ac_func;
14838 #endif
14839
14840 ; return 0; }
14841 EOF
14842 if { (eval echo configure:14843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14843   rm -rf conftest*
14844   eval "ac_cv_func_$ac_func=yes"
14845 else
14846   echo "configure: failed program was:" >&5
14847   cat conftest.$ac_ext >&5
14848   rm -rf conftest*
14849   eval "ac_cv_func_$ac_func=no"
14850 fi
14851 rm -f conftest*
14852 fi
14853
14854 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14855   echo "$ac_t""yes" 1>&6
14856     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14857   cat >> confdefs.h <<EOF
14858 #define $ac_tr_func 1
14859 EOF
14860  
14861 else
14862   echo "$ac_t""no" 1>&6
14863 fi
14864 done
14865
14866
14867                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14868 echo "configure:14869: checking for pthread_detach with <pthread.h>" >&5
14869 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14870   echo $ac_n "(cached) $ac_c" 1>&6
14871 else
14872   
14873                                                                 cat > conftest.$ac_ext <<EOF
14874 #line 14875 "configure"
14875 #include "confdefs.h"
14876
14877 #include <pthread.h>
14878 #ifndef NULL
14879 #define NULL (void*)0
14880 #endif
14881
14882 int main() {
14883 pthread_detach(NULL);
14884 ; return 0; }
14885 EOF
14886 if { (eval echo configure:14887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14887   rm -rf conftest*
14888   ol_cv_func_pthread_detach=yes
14889 else
14890   echo "configure: failed program was:" >&5
14891   cat conftest.$ac_ext >&5
14892   rm -rf conftest*
14893   ol_cv_func_pthread_detach=no
14894 fi
14895 rm -f conftest*
14896                         
14897 fi
14898
14899 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14900
14901                         if test $ol_cv_func_pthread_detach = no ; then
14902                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14903                         fi
14904
14905                         cat >> confdefs.h <<\EOF
14906 #define HAVE_PTHREAD_DETACH 1
14907 EOF
14908
14909
14910                                                 for ac_func in \
14911                                 pthread_setconcurrency \
14912                                 pthread_getconcurrency \
14913                                 thr_setconcurrency \
14914                                 thr_getconcurrency \
14915                         
14916 do
14917 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14918 echo "configure:14919: checking for $ac_func" >&5
14919 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14920   echo $ac_n "(cached) $ac_c" 1>&6
14921 else
14922   cat > conftest.$ac_ext <<EOF
14923 #line 14924 "configure"
14924 #include "confdefs.h"
14925 /* System header to define __stub macros and hopefully few prototypes,
14926     which can conflict with char $ac_func(); below.  */
14927 #include <assert.h>
14928 /* Override any gcc2 internal prototype to avoid an error.  */
14929 /* We use char because int might match the return type of a gcc2
14930     builtin and then its argument prototype would still apply.  */
14931 char $ac_func();
14932 char (*f)();
14933
14934 int main() {
14935
14936 /* The GNU C library defines this for functions which it implements
14937     to always fail with ENOSYS.  Some functions are actually named
14938     something starting with __ and the normal name is an alias.  */
14939 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14940 choke me
14941 #else
14942 f = $ac_func;
14943 #endif
14944
14945 ; return 0; }
14946 EOF
14947 if { (eval echo configure:14948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14948   rm -rf conftest*
14949   eval "ac_cv_func_$ac_func=yes"
14950 else
14951   echo "configure: failed program was:" >&5
14952   cat conftest.$ac_ext >&5
14953   rm -rf conftest*
14954   eval "ac_cv_func_$ac_func=no"
14955 fi
14956 rm -f conftest*
14957 fi
14958
14959 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14960   echo "$ac_t""yes" 1>&6
14961     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14962   cat >> confdefs.h <<EOF
14963 #define $ac_tr_func 1
14964 EOF
14965  
14966 else
14967   echo "$ac_t""no" 1>&6
14968 fi
14969 done
14970
14971
14972                         
14973         for ac_func in pthread_kill_other_threads_np
14974 do
14975 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14976 echo "configure:14977: checking for $ac_func" >&5
14977 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14978   echo $ac_n "(cached) $ac_c" 1>&6
14979 else
14980   cat > conftest.$ac_ext <<EOF
14981 #line 14982 "configure"
14982 #include "confdefs.h"
14983 /* System header to define __stub macros and hopefully few prototypes,
14984     which can conflict with char $ac_func(); below.  */
14985 #include <assert.h>
14986 /* Override any gcc2 internal prototype to avoid an error.  */
14987 /* We use char because int might match the return type of a gcc2
14988     builtin and then its argument prototype would still apply.  */
14989 char $ac_func();
14990 char (*f)();
14991
14992 int main() {
14993
14994 /* The GNU C library defines this for functions which it implements
14995     to always fail with ENOSYS.  Some functions are actually named
14996     something starting with __ and the normal name is an alias.  */
14997 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14998 choke me
14999 #else
15000 f = $ac_func;
15001 #endif
15002
15003 ; return 0; }
15004 EOF
15005 if { (eval echo configure:15006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15006   rm -rf conftest*
15007   eval "ac_cv_func_$ac_func=yes"
15008 else
15009   echo "configure: failed program was:" >&5
15010   cat conftest.$ac_ext >&5
15011   rm -rf conftest*
15012   eval "ac_cv_func_$ac_func=no"
15013 fi
15014 rm -f conftest*
15015 fi
15016
15017 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15018   echo "$ac_t""yes" 1>&6
15019     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15020   cat >> confdefs.h <<EOF
15021 #define $ac_tr_func 1
15022 EOF
15023  
15024 else
15025   echo "$ac_t""no" 1>&6
15026 fi
15027 done
15028
15029         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15030 echo "configure:15031: checking for LinuxThreads implementation" >&5
15031 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15032   echo $ac_n "(cached) $ac_c" 1>&6
15033 else
15034   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15035 fi
15036
15037 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15038
15039                         
15040         
15041         
15042         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15043 echo "configure:15044: checking for LinuxThreads consistency" >&5
15044 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15045   echo $ac_n "(cached) $ac_c" 1>&6
15046 else
15047   
15048                 if test $ol_cv_header_linux_threads = yes -a \
15049                         $ol_cv_sys_linux_threads = yes; then
15050                         ol_cv_linux_threads=yes
15051                 elif test $ol_cv_header_linux_threads = no -a \
15052                         $ol_cv_sys_linux_threads = no; then
15053                         ol_cv_linux_threads=no
15054                 else
15055                         ol_cv_linux_threads=error
15056                 fi
15057         
15058 fi
15059
15060 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15061
15062
15063                         if test $ol_cv_linux_threads = error; then
15064                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15065                         fi
15066
15067                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15068 echo "configure:15069: checking if pthread_create() works" >&5
15069 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15070   echo $ac_n "(cached) $ac_c" 1>&6
15071 else
15072   
15073                         if test "$cross_compiling" = yes; then
15074                                 ol_cv_pthread_create_works=yes
15075 else
15076   cat > conftest.$ac_ext <<EOF
15077 #line 15078 "configure"
15078 #include "confdefs.h"
15079 /* pthread test headers */
15080 #include <pthread.h>
15081 #if HAVE_PTHREADS < 7
15082 #include <errno.h>
15083 #endif
15084 #ifndef NULL
15085 #define NULL (void*)0
15086 #endif
15087
15088 static void *task(p)
15089         void *p;
15090 {
15091         return (void *) (p == NULL);
15092 }
15093
15094
15095 int main(argc, argv)
15096         int argc;
15097         char **argv;
15098 {
15099
15100         /* pthread test function */
15101 #ifndef PTHREAD_CREATE_DETACHED
15102 #define PTHREAD_CREATE_DETACHED 1
15103 #endif
15104         pthread_t t;
15105         int status;
15106         int detach = PTHREAD_CREATE_DETACHED;
15107
15108 #if HAVE_PTHREADS > 4
15109         /* Final pthreads */
15110         pthread_attr_t attr;
15111
15112         status = pthread_attr_init(&attr);
15113         if( status ) return status;
15114
15115 #if HAVE_PTHREADS < 7
15116         status = pthread_attr_setdetachstate(&attr, &detach);
15117         if( status < 0 ) status = errno;
15118 #else
15119         status = pthread_attr_setdetachstate(&attr, detach);
15120 #endif
15121         if( status ) return status;
15122         status = pthread_create( &t, &attr, task, NULL );
15123 #if HAVE_PTHREADS < 7
15124         if( status < 0 ) status = errno;
15125 #endif
15126         if( status ) return status;
15127 #else
15128         /* Draft 4 pthreads */
15129         status = pthread_create( &t, pthread_attr_default, task, NULL );
15130         if( status ) return errno;
15131
15132         /* give thread a chance to complete */
15133         /* it should remain joinable and hence detachable */
15134         sleep( 1 );
15135
15136         status = pthread_detach( &t );
15137         if( status ) return errno;
15138 #endif
15139
15140 #ifdef HAVE_LINUX_THREADS
15141         pthread_kill_other_threads_np();
15142 #endif
15143
15144         return 0;
15145
15146 }
15147
15148 EOF
15149 if { (eval echo configure:15150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15150 then
15151   ol_cv_pthread_create_works=yes
15152 else
15153   echo "configure: failed program was:" >&5
15154   cat conftest.$ac_ext >&5
15155   rm -fr conftest*
15156   ol_cv_pthread_create_works=no
15157 fi
15158 rm -fr conftest*
15159 fi
15160
15161 fi
15162
15163 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15164
15165                         if test $ol_cv_pthread_create_works = no ; then
15166                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15167                         fi
15168
15169                                                 if test $ol_with_yielding_select = auto ; then
15170                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15171 echo "configure:15172: checking if select yields when using pthreads" >&5
15172 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15173   echo $ac_n "(cached) $ac_c" 1>&6
15174 else
15175   
15176                                 if test "$cross_compiling" = yes; then
15177   ol_cv_pthread_select_yields=cross
15178 else
15179   cat > conftest.$ac_ext <<EOF
15180 #line 15181 "configure"
15181 #include "confdefs.h"
15182
15183 #include <sys/types.h>
15184 #include <sys/time.h>
15185 #include <unistd.h>
15186 #include <pthread.h>
15187 #ifndef NULL
15188 #define NULL (void*) 0
15189 #endif
15190
15191 static int fildes[2];
15192
15193 static void *task(p)
15194         void *p;
15195 {
15196         int i;
15197         struct timeval tv;
15198
15199         fd_set rfds;
15200
15201         tv.tv_sec=10;
15202         tv.tv_usec=0;
15203
15204         FD_ZERO(&rfds);
15205         FD_SET(fildes[0], &rfds);
15206
15207         /* we're not interested in any fds */
15208         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15209
15210         if(i < 0) {
15211                 perror("select");
15212                 exit(10);
15213         }
15214
15215         exit(0); /* if we exit here, the select blocked the whole process */
15216 }
15217
15218 int main(argc, argv)
15219         int argc;
15220         char **argv;
15221 {
15222         pthread_t t;
15223
15224         /* create a pipe to select */
15225         if(pipe(&fildes[0])) {
15226                 perror("select");
15227                 exit(1);
15228         }
15229
15230 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15231         (void) pthread_setconcurrency(2);
15232 #else
15233 #ifdef HAVE_THR_SETCONCURRENCY
15234         /* Set Solaris LWP concurrency to 2 */
15235         thr_setconcurrency(2);
15236 #endif
15237 #endif
15238
15239 #if HAVE_PTHREADS < 6
15240         pthread_create(&t, pthread_attr_default, task, NULL);
15241 #else
15242         pthread_create(&t, NULL, task, NULL);
15243 #endif
15244
15245         /* make sure task runs first */
15246 #if HAVE_THR_YIELD
15247         thr_yield();
15248 #elif defined( HAVE_SCHED_YIELD )
15249         sched_yield();
15250 #elif defined( HAVE_PTHREAD_YIELD )
15251         pthread_yield();
15252 #endif
15253
15254         exit(2);
15255 }
15256 EOF
15257 if { (eval echo configure:15258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15258 then
15259   ol_cv_pthread_select_yields=no
15260 else
15261   echo "configure: failed program was:" >&5
15262   cat conftest.$ac_ext >&5
15263   rm -fr conftest*
15264   ol_cv_pthread_select_yields=yes
15265 fi
15266 rm -fr conftest*
15267 fi
15268
15269 fi
15270
15271 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15272
15273                                 if test $ol_cv_pthread_select_yields = cross ; then
15274                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15275                                 fi
15276
15277                                 if test $ol_cv_pthread_select_yields = yes ; then
15278                                         ol_with_yielding_select=yes
15279                                 fi
15280                         fi
15281
15282                                                 CPPFLAGS="$save_CPPFLAGS"
15283                         LIBS="$save_LIBS"
15284                 else
15285                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15286                 fi
15287         fi
15288
15289         if test $ol_with_threads = posix ; then
15290                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15291         fi
15292 fi
15293
15294 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15295         -o $ol_with_threads = mach ; then
15296
15297                 for ac_hdr in mach/cthreads.h cthreads.h
15298 do
15299 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15300 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15301 echo "configure:15302: checking for $ac_hdr" >&5
15302 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15303   echo $ac_n "(cached) $ac_c" 1>&6
15304 else
15305   cat > conftest.$ac_ext <<EOF
15306 #line 15307 "configure"
15307 #include "confdefs.h"
15308 #include <$ac_hdr>
15309 EOF
15310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15311 { (eval echo configure:15312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15313 if test -z "$ac_err"; then
15314   rm -rf conftest*
15315   eval "ac_cv_header_$ac_safe=yes"
15316 else
15317   echo "$ac_err" >&5
15318   echo "configure: failed program was:" >&5
15319   cat conftest.$ac_ext >&5
15320   rm -rf conftest*
15321   eval "ac_cv_header_$ac_safe=no"
15322 fi
15323 rm -f conftest*
15324 fi
15325 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15326   echo "$ac_t""yes" 1>&6
15327     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15328   cat >> confdefs.h <<EOF
15329 #define $ac_tr_hdr 1
15330 EOF
15331  
15332 else
15333   echo "$ac_t""no" 1>&6
15334 fi
15335 done
15336
15337         if test $ac_cv_header_mach_cthreads_h = yes ; then
15338                 ol_with_threads=found
15339
15340                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15341 echo "configure:15342: checking for cthread_fork" >&5
15342 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15343   echo $ac_n "(cached) $ac_c" 1>&6
15344 else
15345   cat > conftest.$ac_ext <<EOF
15346 #line 15347 "configure"
15347 #include "confdefs.h"
15348 /* System header to define __stub macros and hopefully few prototypes,
15349     which can conflict with char cthread_fork(); below.  */
15350 #include <assert.h>
15351 /* Override any gcc2 internal prototype to avoid an error.  */
15352 /* We use char because int might match the return type of a gcc2
15353     builtin and then its argument prototype would still apply.  */
15354 char cthread_fork();
15355 char (*f)();
15356
15357 int main() {
15358
15359 /* The GNU C library defines this for functions which it implements
15360     to always fail with ENOSYS.  Some functions are actually named
15361     something starting with __ and the normal name is an alias.  */
15362 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15363 choke me
15364 #else
15365 f = cthread_fork;
15366 #endif
15367
15368 ; return 0; }
15369 EOF
15370 if { (eval echo configure:15371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15371   rm -rf conftest*
15372   eval "ac_cv_func_cthread_fork=yes"
15373 else
15374   echo "configure: failed program was:" >&5
15375   cat conftest.$ac_ext >&5
15376   rm -rf conftest*
15377   eval "ac_cv_func_cthread_fork=no"
15378 fi
15379 rm -f conftest*
15380 fi
15381
15382 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15383   echo "$ac_t""yes" 1>&6
15384   ol_link_threads=yes
15385 else
15386   echo "$ac_t""no" 1>&6
15387 fi
15388
15389
15390                 if test $ol_link_threads = no ; then
15391                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15392 echo "configure:15393: checking for cthread_fork with -all_load" >&5
15393 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15394   echo $ac_n "(cached) $ac_c" 1>&6
15395 else
15396   
15397                                                                 save_LIBS="$LIBS"
15398                                 LIBS="-all_load $LIBS"
15399                                 cat > conftest.$ac_ext <<EOF
15400 #line 15401 "configure"
15401 #include "confdefs.h"
15402 #include <mach/cthreads.h>
15403 int main() {
15404
15405                                         cthread_fork((void *)0, (void *)0);
15406                                         
15407 ; return 0; }
15408 EOF
15409 if { (eval echo configure:15410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15410   rm -rf conftest*
15411   ol_cv_cthread_all_load=yes
15412 else
15413   echo "configure: failed program was:" >&5
15414   cat conftest.$ac_ext >&5
15415   rm -rf conftest*
15416   ol_cv_cthread_all_load=no
15417 fi
15418 rm -f conftest*
15419                                                                 LIBS="$save_LIBS"
15420                         
15421 fi
15422
15423 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15424
15425                         if test $ol_cv_cthread_all_load = yes ; then
15426                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15427                                 ol_link_threads=mach
15428                                 ol_with_threads=found
15429                         fi
15430                 fi
15431
15432         elif test $ac_cv_header_cthreads_h = yes ; then
15433                                 
15434                 ol_with_threads=found
15435  
15436                                 save_LIBS="$LIBS"
15437                 LIBS="$LIBS -lthreads"
15438                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15439 echo "configure:15440: checking for cthread_fork" >&5
15440 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15441   echo $ac_n "(cached) $ac_c" 1>&6
15442 else
15443   cat > conftest.$ac_ext <<EOF
15444 #line 15445 "configure"
15445 #include "confdefs.h"
15446 /* System header to define __stub macros and hopefully few prototypes,
15447     which can conflict with char cthread_fork(); below.  */
15448 #include <assert.h>
15449 /* Override any gcc2 internal prototype to avoid an error.  */
15450 /* We use char because int might match the return type of a gcc2
15451     builtin and then its argument prototype would still apply.  */
15452 char cthread_fork();
15453 char (*f)();
15454
15455 int main() {
15456
15457 /* The GNU C library defines this for functions which it implements
15458     to always fail with ENOSYS.  Some functions are actually named
15459     something starting with __ and the normal name is an alias.  */
15460 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15461 choke me
15462 #else
15463 f = cthread_fork;
15464 #endif
15465
15466 ; return 0; }
15467 EOF
15468 if { (eval echo configure:15469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15469   rm -rf conftest*
15470   eval "ac_cv_func_cthread_fork=yes"
15471 else
15472   echo "configure: failed program was:" >&5
15473   cat conftest.$ac_ext >&5
15474   rm -rf conftest*
15475   eval "ac_cv_func_cthread_fork=no"
15476 fi
15477 rm -f conftest*
15478 fi
15479
15480 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15481   echo "$ac_t""yes" 1>&6
15482   ol_link_threads=yes
15483 else
15484   echo "$ac_t""no" 1>&6
15485 fi
15486
15487                 LIBS="$save_LIBS"
15488
15489                 if test $ol_link_threads = yes ; then
15490                         LTHREAD_LIBS="-lthreads"
15491                         ol_link_threads=mach
15492                         ol_with_threads=found
15493                 else
15494                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15495                 fi
15496
15497         elif test $ol_with_threads = mach ; then
15498                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15499         fi
15500
15501         if test $ol_link_threads = mach ; then
15502                 cat >> confdefs.h <<\EOF
15503 #define HAVE_MACH_CTHREADS 1
15504 EOF
15505
15506         elif test $ol_with_threads = found ; then
15507                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15508         fi
15509 fi
15510
15511 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15512         -o $ol_with_threads = pth ; then
15513
15514         for ac_hdr in pth.h
15515 do
15516 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15517 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15518 echo "configure:15519: checking for $ac_hdr" >&5
15519 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15520   echo $ac_n "(cached) $ac_c" 1>&6
15521 else
15522   cat > conftest.$ac_ext <<EOF
15523 #line 15524 "configure"
15524 #include "confdefs.h"
15525 #include <$ac_hdr>
15526 EOF
15527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15528 { (eval echo configure:15529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15530 if test -z "$ac_err"; then
15531   rm -rf conftest*
15532   eval "ac_cv_header_$ac_safe=yes"
15533 else
15534   echo "$ac_err" >&5
15535   echo "configure: failed program was:" >&5
15536   cat conftest.$ac_ext >&5
15537   rm -rf conftest*
15538   eval "ac_cv_header_$ac_safe=no"
15539 fi
15540 rm -f conftest*
15541 fi
15542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15543   echo "$ac_t""yes" 1>&6
15544     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15545   cat >> confdefs.h <<EOF
15546 #define $ac_tr_hdr 1
15547 EOF
15548  
15549 else
15550   echo "$ac_t""no" 1>&6
15551 fi
15552 done
15553
15554
15555         if test $ac_cv_header_pth_h = yes ; then
15556                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15557 echo "configure:15558: checking for pth_version in -lpth" >&5
15558 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15559 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15560   echo $ac_n "(cached) $ac_c" 1>&6
15561 else
15562   ac_save_LIBS="$LIBS"
15563 LIBS="-lpth  $LIBS"
15564 cat > conftest.$ac_ext <<EOF
15565 #line 15566 "configure"
15566 #include "confdefs.h"
15567 /* Override any gcc2 internal prototype to avoid an error.  */
15568 /* We use char because int might match the return type of a gcc2
15569     builtin and then its argument prototype would still apply.  */
15570 char pth_version();
15571
15572 int main() {
15573 pth_version()
15574 ; return 0; }
15575 EOF
15576 if { (eval echo configure:15577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15577   rm -rf conftest*
15578   eval "ac_cv_lib_$ac_lib_var=yes"
15579 else
15580   echo "configure: failed program was:" >&5
15581   cat conftest.$ac_ext >&5
15582   rm -rf conftest*
15583   eval "ac_cv_lib_$ac_lib_var=no"
15584 fi
15585 rm -f conftest*
15586 LIBS="$ac_save_LIBS"
15587
15588 fi
15589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15590   echo "$ac_t""yes" 1>&6
15591   have_pth=yes
15592 else
15593   echo "$ac_t""no" 1>&6
15594 have_pth=no
15595 fi
15596
15597
15598                 if test $have_pth = yes ; then
15599                         cat >> confdefs.h <<\EOF
15600 #define HAVE_GNU_PTH 1
15601 EOF
15602
15603                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15604                         ol_link_threads=pth
15605                         ol_with_threads=found
15606
15607                         if test $ol_with_yielding_select = auto ; then
15608                                 ol_with_yielding_select=yes
15609                         fi
15610                 fi
15611         fi
15612 fi
15613
15614 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15615         -o $ol_with_threads = lwp ; then
15616
15617                 for ac_hdr in thread.h synch.h
15618 do
15619 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15620 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15621 echo "configure:15622: checking for $ac_hdr" >&5
15622 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15623   echo $ac_n "(cached) $ac_c" 1>&6
15624 else
15625   cat > conftest.$ac_ext <<EOF
15626 #line 15627 "configure"
15627 #include "confdefs.h"
15628 #include <$ac_hdr>
15629 EOF
15630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15631 { (eval echo configure:15632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15633 if test -z "$ac_err"; then
15634   rm -rf conftest*
15635   eval "ac_cv_header_$ac_safe=yes"
15636 else
15637   echo "$ac_err" >&5
15638   echo "configure: failed program was:" >&5
15639   cat conftest.$ac_ext >&5
15640   rm -rf conftest*
15641   eval "ac_cv_header_$ac_safe=no"
15642 fi
15643 rm -f conftest*
15644 fi
15645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15646   echo "$ac_t""yes" 1>&6
15647     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15648   cat >> confdefs.h <<EOF
15649 #define $ac_tr_hdr 1
15650 EOF
15651  
15652 else
15653   echo "$ac_t""no" 1>&6
15654 fi
15655 done
15656
15657         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15658                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15659 echo "configure:15660: checking for thr_create in -lthread" >&5
15660 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15661 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15662   echo $ac_n "(cached) $ac_c" 1>&6
15663 else
15664   ac_save_LIBS="$LIBS"
15665 LIBS="-lthread  $LIBS"
15666 cat > conftest.$ac_ext <<EOF
15667 #line 15668 "configure"
15668 #include "confdefs.h"
15669 /* Override any gcc2 internal prototype to avoid an error.  */
15670 /* We use char because int might match the return type of a gcc2
15671     builtin and then its argument prototype would still apply.  */
15672 char thr_create();
15673
15674 int main() {
15675 thr_create()
15676 ; return 0; }
15677 EOF
15678 if { (eval echo configure:15679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15679   rm -rf conftest*
15680   eval "ac_cv_lib_$ac_lib_var=yes"
15681 else
15682   echo "configure: failed program was:" >&5
15683   cat conftest.$ac_ext >&5
15684   rm -rf conftest*
15685   eval "ac_cv_lib_$ac_lib_var=no"
15686 fi
15687 rm -f conftest*
15688 LIBS="$ac_save_LIBS"
15689
15690 fi
15691 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15692   echo "$ac_t""yes" 1>&6
15693   have_thr=yes
15694 else
15695   echo "$ac_t""no" 1>&6
15696 have_thr=no
15697 fi
15698
15699
15700                 if test $have_thr = yes ; then
15701                         cat >> confdefs.h <<\EOF
15702 #define HAVE_THR 1
15703 EOF
15704
15705                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15706                         ol_link_threads=thr
15707
15708                         if test $ol_with_yielding_select = auto ; then
15709                                 ol_with_yielding_select=yes
15710                         fi
15711
15712                                                 for ac_func in \
15713                                 thr_setconcurrency \
15714                                 thr_getconcurrency \
15715                         
15716 do
15717 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15718 echo "configure:15719: checking for $ac_func" >&5
15719 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15720   echo $ac_n "(cached) $ac_c" 1>&6
15721 else
15722   cat > conftest.$ac_ext <<EOF
15723 #line 15724 "configure"
15724 #include "confdefs.h"
15725 /* System header to define __stub macros and hopefully few prototypes,
15726     which can conflict with char $ac_func(); below.  */
15727 #include <assert.h>
15728 /* Override any gcc2 internal prototype to avoid an error.  */
15729 /* We use char because int might match the return type of a gcc2
15730     builtin and then its argument prototype would still apply.  */
15731 char $ac_func();
15732 char (*f)();
15733
15734 int main() {
15735
15736 /* The GNU C library defines this for functions which it implements
15737     to always fail with ENOSYS.  Some functions are actually named
15738     something starting with __ and the normal name is an alias.  */
15739 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15740 choke me
15741 #else
15742 f = $ac_func;
15743 #endif
15744
15745 ; return 0; }
15746 EOF
15747 if { (eval echo configure:15748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15748   rm -rf conftest*
15749   eval "ac_cv_func_$ac_func=yes"
15750 else
15751   echo "configure: failed program was:" >&5
15752   cat conftest.$ac_ext >&5
15753   rm -rf conftest*
15754   eval "ac_cv_func_$ac_func=no"
15755 fi
15756 rm -f conftest*
15757 fi
15758
15759 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15760   echo "$ac_t""yes" 1>&6
15761     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15762   cat >> confdefs.h <<EOF
15763 #define $ac_tr_func 1
15764 EOF
15765  
15766 else
15767   echo "$ac_t""no" 1>&6
15768 fi
15769 done
15770
15771                 fi
15772         fi
15773
15774                 for ac_hdr in lwp/lwp.h
15775 do
15776 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15777 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15778 echo "configure:15779: checking for $ac_hdr" >&5
15779 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15780   echo $ac_n "(cached) $ac_c" 1>&6
15781 else
15782   cat > conftest.$ac_ext <<EOF
15783 #line 15784 "configure"
15784 #include "confdefs.h"
15785 #include <$ac_hdr>
15786 EOF
15787 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15788 { (eval echo configure:15789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15789 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15790 if test -z "$ac_err"; then
15791   rm -rf conftest*
15792   eval "ac_cv_header_$ac_safe=yes"
15793 else
15794   echo "$ac_err" >&5
15795   echo "configure: failed program was:" >&5
15796   cat conftest.$ac_ext >&5
15797   rm -rf conftest*
15798   eval "ac_cv_header_$ac_safe=no"
15799 fi
15800 rm -f conftest*
15801 fi
15802 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15803   echo "$ac_t""yes" 1>&6
15804     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15805   cat >> confdefs.h <<EOF
15806 #define $ac_tr_hdr 1
15807 EOF
15808  
15809 else
15810   echo "$ac_t""no" 1>&6
15811 fi
15812 done
15813
15814         if test $ac_cv_header_lwp_lwp_h = yes ; then
15815                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15816 echo "configure:15817: checking for lwp_create in -llwp" >&5
15817 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15818 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15819   echo $ac_n "(cached) $ac_c" 1>&6
15820 else
15821   ac_save_LIBS="$LIBS"
15822 LIBS="-llwp  $LIBS"
15823 cat > conftest.$ac_ext <<EOF
15824 #line 15825 "configure"
15825 #include "confdefs.h"
15826 /* Override any gcc2 internal prototype to avoid an error.  */
15827 /* We use char because int might match the return type of a gcc2
15828     builtin and then its argument prototype would still apply.  */
15829 char lwp_create();
15830
15831 int main() {
15832 lwp_create()
15833 ; return 0; }
15834 EOF
15835 if { (eval echo configure:15836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15836   rm -rf conftest*
15837   eval "ac_cv_lib_$ac_lib_var=yes"
15838 else
15839   echo "configure: failed program was:" >&5
15840   cat conftest.$ac_ext >&5
15841   rm -rf conftest*
15842   eval "ac_cv_lib_$ac_lib_var=no"
15843 fi
15844 rm -f conftest*
15845 LIBS="$ac_save_LIBS"
15846
15847 fi
15848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15849   echo "$ac_t""yes" 1>&6
15850   have_lwp=yes
15851 else
15852   echo "$ac_t""no" 1>&6
15853 have_lwp=no
15854 fi
15855
15856
15857                 if test $have_lwp = yes ; then
15858                         cat >> confdefs.h <<\EOF
15859 #define HAVE_LWP 1
15860 EOF
15861
15862                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15863                         ol_link_threads=lwp
15864
15865                         if test $ol_with_yielding_select = auto ; then
15866                                 ol_with_yielding_select=no
15867                         fi
15868                 fi
15869         fi
15870 fi
15871
15872 if test $ol_with_yielding_select = yes ; then
15873         cat >> confdefs.h <<\EOF
15874 #define HAVE_YIELDING_SELECT 1
15875 EOF
15876
15877 fi
15878
15879 if test $ol_with_threads = manual ; then
15880                 ol_link_threads=yes
15881
15882         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15883
15884         for ac_hdr in pthread.h sched.h
15885 do
15886 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15887 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15888 echo "configure:15889: checking for $ac_hdr" >&5
15889 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15890   echo $ac_n "(cached) $ac_c" 1>&6
15891 else
15892   cat > conftest.$ac_ext <<EOF
15893 #line 15894 "configure"
15894 #include "confdefs.h"
15895 #include <$ac_hdr>
15896 EOF
15897 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15898 { (eval echo configure:15899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15899 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15900 if test -z "$ac_err"; then
15901   rm -rf conftest*
15902   eval "ac_cv_header_$ac_safe=yes"
15903 else
15904   echo "$ac_err" >&5
15905   echo "configure: failed program was:" >&5
15906   cat conftest.$ac_ext >&5
15907   rm -rf conftest*
15908   eval "ac_cv_header_$ac_safe=no"
15909 fi
15910 rm -f conftest*
15911 fi
15912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15913   echo "$ac_t""yes" 1>&6
15914     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15915   cat >> confdefs.h <<EOF
15916 #define $ac_tr_hdr 1
15917 EOF
15918  
15919 else
15920   echo "$ac_t""no" 1>&6
15921 fi
15922 done
15923
15924         for ac_func in sched_yield pthread_yield
15925 do
15926 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15927 echo "configure:15928: checking for $ac_func" >&5
15928 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15929   echo $ac_n "(cached) $ac_c" 1>&6
15930 else
15931   cat > conftest.$ac_ext <<EOF
15932 #line 15933 "configure"
15933 #include "confdefs.h"
15934 /* System header to define __stub macros and hopefully few prototypes,
15935     which can conflict with char $ac_func(); below.  */
15936 #include <assert.h>
15937 /* Override any gcc2 internal prototype to avoid an error.  */
15938 /* We use char because int might match the return type of a gcc2
15939     builtin and then its argument prototype would still apply.  */
15940 char $ac_func();
15941 char (*f)();
15942
15943 int main() {
15944
15945 /* The GNU C library defines this for functions which it implements
15946     to always fail with ENOSYS.  Some functions are actually named
15947     something starting with __ and the normal name is an alias.  */
15948 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15949 choke me
15950 #else
15951 f = $ac_func;
15952 #endif
15953
15954 ; return 0; }
15955 EOF
15956 if { (eval echo configure:15957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15957   rm -rf conftest*
15958   eval "ac_cv_func_$ac_func=yes"
15959 else
15960   echo "configure: failed program was:" >&5
15961   cat conftest.$ac_ext >&5
15962   rm -rf conftest*
15963   eval "ac_cv_func_$ac_func=no"
15964 fi
15965 rm -f conftest*
15966 fi
15967
15968 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15969   echo "$ac_t""yes" 1>&6
15970     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15971   cat >> confdefs.h <<EOF
15972 #define $ac_tr_func 1
15973 EOF
15974  
15975 else
15976   echo "$ac_t""no" 1>&6
15977 fi
15978 done
15979
15980         
15981         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15982 echo "configure:15983: checking for LinuxThreads pthread.h" >&5
15983 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15984   echo $ac_n "(cached) $ac_c" 1>&6
15985 else
15986   cat > conftest.$ac_ext <<EOF
15987 #line 15988 "configure"
15988 #include "confdefs.h"
15989 #include <pthread.h>
15990 EOF
15991 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15992   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15993   rm -rf conftest*
15994   ol_cv_header_linux_threads=yes
15995 else
15996   rm -rf conftest*
15997   ol_cv_header_linux_threads=no
15998 fi
15999 rm -f conftest*
16000
16001                 
16002 fi
16003
16004 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16005         if test $ol_cv_header_linux_threads = yes; then
16006                 cat >> confdefs.h <<\EOF
16007 #define HAVE_LINUX_THREADS 1
16008 EOF
16009
16010         fi
16011
16012
16013         for ac_hdr in mach/cthreads.h
16014 do
16015 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16016 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16017 echo "configure:16018: checking for $ac_hdr" >&5
16018 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16019   echo $ac_n "(cached) $ac_c" 1>&6
16020 else
16021   cat > conftest.$ac_ext <<EOF
16022 #line 16023 "configure"
16023 #include "confdefs.h"
16024 #include <$ac_hdr>
16025 EOF
16026 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16027 { (eval echo configure:16028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16028 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16029 if test -z "$ac_err"; then
16030   rm -rf conftest*
16031   eval "ac_cv_header_$ac_safe=yes"
16032 else
16033   echo "$ac_err" >&5
16034   echo "configure: failed program was:" >&5
16035   cat conftest.$ac_ext >&5
16036   rm -rf conftest*
16037   eval "ac_cv_header_$ac_safe=no"
16038 fi
16039 rm -f conftest*
16040 fi
16041 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16042   echo "$ac_t""yes" 1>&6
16043     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16044   cat >> confdefs.h <<EOF
16045 #define $ac_tr_hdr 1
16046 EOF
16047  
16048 else
16049   echo "$ac_t""no" 1>&6
16050 fi
16051 done
16052
16053         for ac_hdr in lwp/lwp.h
16054 do
16055 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16056 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16057 echo "configure:16058: checking for $ac_hdr" >&5
16058 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16059   echo $ac_n "(cached) $ac_c" 1>&6
16060 else
16061   cat > conftest.$ac_ext <<EOF
16062 #line 16063 "configure"
16063 #include "confdefs.h"
16064 #include <$ac_hdr>
16065 EOF
16066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16067 { (eval echo configure:16068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16068 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16069 if test -z "$ac_err"; then
16070   rm -rf conftest*
16071   eval "ac_cv_header_$ac_safe=yes"
16072 else
16073   echo "$ac_err" >&5
16074   echo "configure: failed program was:" >&5
16075   cat conftest.$ac_ext >&5
16076   rm -rf conftest*
16077   eval "ac_cv_header_$ac_safe=no"
16078 fi
16079 rm -f conftest*
16080 fi
16081 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16082   echo "$ac_t""yes" 1>&6
16083     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16084   cat >> confdefs.h <<EOF
16085 #define $ac_tr_hdr 1
16086 EOF
16087  
16088 else
16089   echo "$ac_t""no" 1>&6
16090 fi
16091 done
16092
16093         for ac_hdr in thread.h synch.h
16094 do
16095 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16096 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16097 echo "configure:16098: checking for $ac_hdr" >&5
16098 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16099   echo $ac_n "(cached) $ac_c" 1>&6
16100 else
16101   cat > conftest.$ac_ext <<EOF
16102 #line 16103 "configure"
16103 #include "confdefs.h"
16104 #include <$ac_hdr>
16105 EOF
16106 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16107 { (eval echo configure:16108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16108 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16109 if test -z "$ac_err"; then
16110   rm -rf conftest*
16111   eval "ac_cv_header_$ac_safe=yes"
16112 else
16113   echo "$ac_err" >&5
16114   echo "configure: failed program was:" >&5
16115   cat conftest.$ac_ext >&5
16116   rm -rf conftest*
16117   eval "ac_cv_header_$ac_safe=no"
16118 fi
16119 rm -f conftest*
16120 fi
16121 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16122   echo "$ac_t""yes" 1>&6
16123     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16124   cat >> confdefs.h <<EOF
16125 #define $ac_tr_hdr 1
16126 EOF
16127  
16128 else
16129   echo "$ac_t""no" 1>&6
16130 fi
16131 done
16132
16133 fi
16134
16135 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16136                         cat >> confdefs.h <<\EOF
16137 #define REENTRANT 1
16138 EOF
16139
16140         cat >> confdefs.h <<\EOF
16141 #define _REENTRANT 1
16142 EOF
16143
16144         cat >> confdefs.h <<\EOF
16145 #define THREAD_SAFE 1
16146 EOF
16147
16148         cat >> confdefs.h <<\EOF
16149 #define _THREAD_SAFE 1
16150 EOF
16151
16152         cat >> confdefs.h <<\EOF
16153 #define THREADSAFE 1
16154 EOF
16155
16156         cat >> confdefs.h <<\EOF
16157 #define _THREADSAFE 1
16158 EOF
16159
16160         cat >> confdefs.h <<\EOF
16161 #define _SGI_MP_SOURCE 1
16162 EOF
16163
16164
16165                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16166 echo "configure:16167: checking for thread specific errno" >&5
16167 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16168   echo $ac_n "(cached) $ac_c" 1>&6
16169 else
16170   
16171                 cat > conftest.$ac_ext <<EOF
16172 #line 16173 "configure"
16173 #include "confdefs.h"
16174 #include <errno.h>
16175 int main() {
16176 errno = 0;
16177 ; return 0; }
16178 EOF
16179 if { (eval echo configure:16180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16180   rm -rf conftest*
16181   ol_cv_errno_thread_specific=yes
16182 else
16183   echo "configure: failed program was:" >&5
16184   cat conftest.$ac_ext >&5
16185   rm -rf conftest*
16186   ol_cv_errno_thread_specific=no
16187 fi
16188 rm -f conftest*
16189         
16190 fi
16191
16192 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16193
16194                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16195 echo "configure:16196: checking for thread specific h_errno" >&5
16196 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16197   echo $ac_n "(cached) $ac_c" 1>&6
16198 else
16199   
16200                 cat > conftest.$ac_ext <<EOF
16201 #line 16202 "configure"
16202 #include "confdefs.h"
16203 #include <netdb.h>
16204 int main() {
16205 h_errno = 0;
16206 ; return 0; }
16207 EOF
16208 if { (eval echo configure:16209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16209   rm -rf conftest*
16210   ol_cv_h_errno_thread_specific=yes
16211 else
16212   echo "configure: failed program was:" >&5
16213   cat conftest.$ac_ext >&5
16214   rm -rf conftest*
16215   ol_cv_h_errno_thread_specific=no
16216 fi
16217 rm -f conftest*
16218         
16219 fi
16220
16221 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16222
16223         if test $ol_cv_errno_thread_specific != yes \
16224                 -o $ol_cv_h_errno_thread_specific != yes ; then
16225                 LIBS="$LTHREAD_LIBS $LIBS"
16226                 LTHREAD_LIBS=""
16227         fi
16228
16229 fi  
16230
16231 if test $ol_link_threads = no ; then
16232         if test $ol_with_threads = yes ; then
16233                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16234         fi
16235
16236         if test $ol_with_threads = auto ; then
16237                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16238                 ol_with_threads=no
16239         fi
16240
16241         cat >> confdefs.h <<\EOF
16242 #define NO_THREADS 1
16243 EOF
16244
16245         LTHREAD_LIBS=""
16246 fi
16247
16248 if test $ol_link_threads != no ; then
16249         cat >> confdefs.h <<\EOF
16250 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16251 EOF
16252
16253 fi
16254
16255 for ac_func in \
16256         ctime_r                 \
16257         gethostbyname_r gethostbyaddr_r \
16258
16259 do
16260 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16261 echo "configure:16262: checking for $ac_func" >&5
16262 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16263   echo $ac_n "(cached) $ac_c" 1>&6
16264 else
16265   cat > conftest.$ac_ext <<EOF
16266 #line 16267 "configure"
16267 #include "confdefs.h"
16268 /* System header to define __stub macros and hopefully few prototypes,
16269     which can conflict with char $ac_func(); below.  */
16270 #include <assert.h>
16271 /* Override any gcc2 internal prototype to avoid an error.  */
16272 /* We use char because int might match the return type of a gcc2
16273     builtin and then its argument prototype would still apply.  */
16274 char $ac_func();
16275 char (*f)();
16276
16277 int main() {
16278
16279 /* The GNU C library defines this for functions which it implements
16280     to always fail with ENOSYS.  Some functions are actually named
16281     something starting with __ and the normal name is an alias.  */
16282 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16283 choke me
16284 #else
16285 f = $ac_func;
16286 #endif
16287
16288 ; return 0; }
16289 EOF
16290 if { (eval echo configure:16291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16291   rm -rf conftest*
16292   eval "ac_cv_func_$ac_func=yes"
16293 else
16294   echo "configure: failed program was:" >&5
16295   cat conftest.$ac_ext >&5
16296   rm -rf conftest*
16297   eval "ac_cv_func_$ac_func=no"
16298 fi
16299 rm -f conftest*
16300 fi
16301
16302 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16303   echo "$ac_t""yes" 1>&6
16304     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16305   cat >> confdefs.h <<EOF
16306 #define $ac_tr_func 1
16307 EOF
16308  
16309 else
16310   echo "$ac_t""no" 1>&6
16311 fi
16312 done
16313
16314
16315 if test "$ac_cv_func_ctime_r" = no ; then
16316         ol_cv_func_ctime_r_nargs=0
16317 else
16318         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16319 echo "configure:16320: checking number of arguments of ctime_r" >&5
16320 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16321   echo $ac_n "(cached) $ac_c" 1>&6
16322 else
16323   cat > conftest.$ac_ext <<EOF
16324 #line 16325 "configure"
16325 #include "confdefs.h"
16326 #include <time.h>
16327 int main() {
16328 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16329 ; return 0; }
16330 EOF
16331 if { (eval echo configure:16332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16332   rm -rf conftest*
16333   ol_cv_func_ctime_r_nargs3=yes
16334 else
16335   echo "configure: failed program was:" >&5
16336   cat conftest.$ac_ext >&5
16337   rm -rf conftest*
16338   ol_cv_func_ctime_r_nargs3=no
16339 fi
16340 rm -f conftest*
16341
16342         cat > conftest.$ac_ext <<EOF
16343 #line 16344 "configure"
16344 #include "confdefs.h"
16345 #include <time.h>
16346 int main() {
16347 time_t ti; char *buffer; ctime_r(&ti,buffer);
16348 ; return 0; }
16349 EOF
16350 if { (eval echo configure:16351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16351   rm -rf conftest*
16352   ol_cv_func_ctime_r_nargs2=yes
16353 else
16354   echo "configure: failed program was:" >&5
16355   cat conftest.$ac_ext >&5
16356   rm -rf conftest*
16357   ol_cv_func_ctime_r_nargs2=no
16358 fi
16359 rm -f conftest*
16360
16361         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16362                 $ol_cv_func_ctime_r_nargs2 = no ; then
16363
16364                 ol_cv_func_ctime_r_nargs=3
16365
16366         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16367                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16368
16369                 ol_cv_func_ctime_r_nargs=2
16370
16371         else
16372                 ol_cv_func_ctime_r_nargs=0
16373         fi
16374   
16375 fi
16376
16377 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16378
16379   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16380         cat >> confdefs.h <<EOF
16381 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16382 EOF
16383
16384   fi
16385
16386 fi
16387
16388 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16389         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16390 echo "configure:16391: checking number of arguments of gethostbyname_r" >&5
16391 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16392   echo $ac_n "(cached) $ac_c" 1>&6
16393 else
16394   cat > conftest.$ac_ext <<EOF
16395 #line 16396 "configure"
16396 #include "confdefs.h"
16397 #include <sys/types.h>
16398 #include <sys/socket.h>
16399 #include <netinet/in.h>
16400 #include <netdb.h>
16401 #define BUFSIZE (sizeof(struct hostent)+10)
16402 int main() {
16403 struct hostent hent; char buffer[BUFSIZE];
16404                 int bufsize=BUFSIZE;int h_errno;
16405                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16406                         buffer, bufsize, &h_errno);
16407 ; return 0; }
16408 EOF
16409 if { (eval echo configure:16410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16410   rm -rf conftest*
16411   ol_cv_func_gethostbyname_r_nargs5=yes
16412 else
16413   echo "configure: failed program was:" >&5
16414   cat conftest.$ac_ext >&5
16415   rm -rf conftest*
16416   ol_cv_func_gethostbyname_r_nargs5=no
16417 fi
16418 rm -f conftest*
16419
16420         cat > conftest.$ac_ext <<EOF
16421 #line 16422 "configure"
16422 #include "confdefs.h"
16423 #include <sys/types.h>
16424 #include <sys/socket.h>
16425 #include <netinet/in.h>
16426 #include <netdb.h>
16427 #define BUFSIZE (sizeof(struct hostent)+10)
16428 int main() {
16429 struct hostent hent;struct hostent *rhent;
16430                 char buffer[BUFSIZE];
16431                 int bufsize=BUFSIZE;int h_errno;
16432                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16433                         &rhent, &h_errno);
16434 ; return 0; }
16435 EOF
16436 if { (eval echo configure:16437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16437   rm -rf conftest*
16438   ol_cv_func_gethostbyname_r_nargs6=yes
16439 else
16440   echo "configure: failed program was:" >&5
16441   cat conftest.$ac_ext >&5
16442   rm -rf conftest*
16443   ol_cv_func_gethostbyname_r_nargs6=no
16444 fi
16445 rm -f conftest*
16446
16447         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16448                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16449
16450                 ol_cv_func_gethostbyname_r_nargs=5
16451
16452         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16453                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16454
16455                 ol_cv_func_gethostbyname_r_nargs=6
16456
16457         else
16458                 ol_cv_func_gethostbyname_r_nargs=0
16459         fi
16460   
16461 fi
16462
16463 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16464   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16465         cat >> confdefs.h <<EOF
16466 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16467 EOF
16468
16469   fi
16470
16471 else
16472         ol_cv_func_gethostbyname_r_nargs=0
16473 fi
16474  
16475 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16476         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16477 echo "configure:16478: checking number of arguments of gethostbyaddr_r" >&5
16478 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16479   echo $ac_n "(cached) $ac_c" 1>&6
16480 else
16481   cat > conftest.$ac_ext <<EOF
16482 #line 16483 "configure"
16483 #include "confdefs.h"
16484 #include <sys/types.h>
16485 #include <sys/socket.h>
16486 #include <netinet/in.h>
16487 #include <netdb.h>
16488 #define BUFSIZE (sizeof(struct hostent)+10)
16489 int main() {
16490 struct hostent hent; char buffer[BUFSIZE]; 
16491             struct in_addr add;
16492             size_t alen=sizeof(struct in_addr);
16493             int bufsize=BUFSIZE;int h_errno;
16494                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16495                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16496 ; return 0; }
16497 EOF
16498 if { (eval echo configure:16499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16499   rm -rf conftest*
16500   ol_cv_func_gethostbyaddr_r_nargs7=yes
16501 else
16502   echo "configure: failed program was:" >&5
16503   cat conftest.$ac_ext >&5
16504   rm -rf conftest*
16505   ol_cv_func_gethostbyaddr_r_nargs7=no
16506 fi
16507 rm -f conftest*
16508
16509         cat > conftest.$ac_ext <<EOF
16510 #line 16511 "configure"
16511 #include "confdefs.h"
16512 #include <sys/types.h>
16513 #include <sys/socket.h>
16514 #include <netinet/in.h>
16515 #include <netdb.h>
16516 #define BUFSIZE (sizeof(struct hostent)+10)
16517 int main() {
16518 struct hostent hent;
16519                 struct hostent *rhent; char buffer[BUFSIZE]; 
16520                 struct in_addr add;
16521                 size_t alen=sizeof(struct in_addr);
16522                 int bufsize=BUFSIZE;int h_errno;
16523                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16524                         alen, AF_INET, &hent, buffer, bufsize, 
16525                         &rhent, &h_errno);
16526 ; return 0; }
16527 EOF
16528 if { (eval echo configure:16529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16529   rm -rf conftest*
16530   ol_cv_func_gethostbyaddr_r_nargs8=yes
16531 else
16532   echo "configure: failed program was:" >&5
16533   cat conftest.$ac_ext >&5
16534   rm -rf conftest*
16535   ol_cv_func_gethostbyaddr_r_nargs8=no
16536 fi
16537 rm -f conftest*
16538
16539         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16540                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16541
16542                 ol_cv_func_gethostbyaddr_r_nargs=7
16543
16544         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16545                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16546
16547                 ol_cv_func_gethostbyaddr_r_nargs=8
16548
16549         else
16550                 ol_cv_func_gethostbyaddr_r_nargs=0
16551         fi
16552   
16553 fi
16554
16555 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16556   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16557     cat >> confdefs.h <<EOF
16558 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16559 EOF
16560
16561   fi
16562
16563 else
16564         ol_cv_func_gethostbyaddr_r_nargs=0
16565 fi
16566
16567 ol_link_ldbm=no 
16568
16569 if test $ol_with_ldbm_api = auto \
16570         -o $ol_with_ldbm_api = berkeley \
16571         -o $ol_with_ldbm_api = bcompat ; then
16572
16573         if test $ol_with_ldbm_api = bcompat; then \
16574                 for ac_hdr in db_185.h db.h
16575 do
16576 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16577 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16578 echo "configure:16579: checking for $ac_hdr" >&5
16579 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16580   echo $ac_n "(cached) $ac_c" 1>&6
16581 else
16582   cat > conftest.$ac_ext <<EOF
16583 #line 16584 "configure"
16584 #include "confdefs.h"
16585 #include <$ac_hdr>
16586 EOF
16587 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16588 { (eval echo configure:16589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16589 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16590 if test -z "$ac_err"; then
16591   rm -rf conftest*
16592   eval "ac_cv_header_$ac_safe=yes"
16593 else
16594   echo "$ac_err" >&5
16595   echo "configure: failed program was:" >&5
16596   cat conftest.$ac_ext >&5
16597   rm -rf conftest*
16598   eval "ac_cv_header_$ac_safe=no"
16599 fi
16600 rm -f conftest*
16601 fi
16602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16603   echo "$ac_t""yes" 1>&6
16604     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16605   cat >> confdefs.h <<EOF
16606 #define $ac_tr_hdr 1
16607 EOF
16608  
16609 else
16610   echo "$ac_t""no" 1>&6
16611 fi
16612 done
16613
16614 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16615         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16616 echo "configure:16617: checking if Berkeley DB header compatibility" >&5
16617 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16618   echo $ac_n "(cached) $ac_c" 1>&6
16619 else
16620   
16621                 cat > conftest.$ac_ext <<EOF
16622 #line 16623 "configure"
16623 #include "confdefs.h"
16624
16625 #if HAVE_DB_185_H
16626 #       include <db_185.h>
16627 #else
16628 #       include <db.h>
16629 #endif
16630
16631  /* this check could be improved */
16632 #ifndef DB_VERSION_MAJOR
16633 #       define DB_VERSION_MAJOR 1
16634 #endif
16635
16636 #if DB_VERSION_MAJOR == 1 
16637         __db_version_1
16638 #endif
16639
16640 EOF
16641 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16642   egrep "__db_version_1" >/dev/null 2>&1; then
16643   rm -rf conftest*
16644   ol_cv_header_db1=yes
16645 else
16646   rm -rf conftest*
16647   ol_cv_header_db1=no
16648 fi
16649 rm -f conftest*
16650
16651 fi
16652
16653 echo "$ac_t""$ol_cv_header_db1" 1>&6
16654
16655         if test $ol_cv_header_db1 = yes ; then
16656                 ol_cv_lib_db=no
16657 if test $ol_cv_lib_db = no ; then
16658         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16659 echo "configure:16660: checking for Berkeley DB link (default)" >&5
16660 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16661   echo $ac_n "(cached) $ac_c" 1>&6
16662 else
16663   
16664         ol_DB_LIB=
16665         ol_LIBS=$LIBS
16666         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16667
16668         cat > conftest.$ac_ext <<EOF
16669 #line 16670 "configure"
16670 #include "confdefs.h"
16671
16672 #ifdef HAVE_DB_185_H
16673 # include <db_185.h>
16674 #else
16675 # include <db.h>
16676 #endif
16677
16678 #ifndef DB_VERSION_MAJOR
16679 # define DB_VERSION_MAJOR 1
16680 #endif
16681
16682 #ifndef NULL
16683 #define NULL ((void*)0)
16684 #endif
16685
16686 int main() {
16687
16688 #if DB_VERSION_MAJOR > 1
16689         {
16690                 char *version;
16691                 int major, minor, patch;
16692
16693                 version = db_version( &major, &minor, &patch );
16694
16695                 if( major != DB_VERSION_MAJOR ||
16696                         minor < DB_VERSION_MINOR )
16697                 {
16698                         printf("Berkeley DB version mismatch\n"
16699                                 "\texpected: %s\n\tgot: %s\n",
16700                                 DB_VERSION_STRING, version);
16701                         return 1;
16702                 }
16703         }
16704 #endif
16705
16706 #if DB_VERSION_MAJOR > 2
16707         db_env_create( NULL, 0 );
16708 #elif DB_VERSION_MAJOR > 1
16709         db_appexit( NULL );
16710 #else
16711         (void) dbopen( NULL, 0, 0, 0, NULL);
16712 #endif
16713
16714 ; return 0; }
16715 EOF
16716 if { (eval echo configure:16717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16717   rm -rf conftest*
16718   ol_cv_db_none=yes
16719 else
16720   echo "configure: failed program was:" >&5
16721   cat conftest.$ac_ext >&5
16722   rm -rf conftest*
16723   ol_cv_db_none=no
16724 fi
16725 rm -f conftest*
16726
16727         LIBS="$ol_LIBS"
16728
16729 fi
16730
16731 echo "$ac_t""$ol_cv_db_none" 1>&6
16732
16733         if test $ol_cv_db_none = yes ; then
16734                 ol_cv_lib_db=yes
16735         fi
16736 fi
16737
16738 if test $ol_cv_lib_db = no ; then
16739         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16740 echo "configure:16741: checking for Berkeley DB link (-ldb42)" >&5
16741 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16742   echo $ac_n "(cached) $ac_c" 1>&6
16743 else
16744   
16745         ol_DB_LIB=-ldb42
16746         ol_LIBS=$LIBS
16747         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16748
16749         cat > conftest.$ac_ext <<EOF
16750 #line 16751 "configure"
16751 #include "confdefs.h"
16752
16753 #ifdef HAVE_DB_185_H
16754 # include <db_185.h>
16755 #else
16756 # include <db.h>
16757 #endif
16758
16759 #ifndef DB_VERSION_MAJOR
16760 # define DB_VERSION_MAJOR 1
16761 #endif
16762
16763 #ifndef NULL
16764 #define NULL ((void*)0)
16765 #endif
16766
16767 int main() {
16768
16769 #if DB_VERSION_MAJOR > 1
16770         {
16771                 char *version;
16772                 int major, minor, patch;
16773
16774                 version = db_version( &major, &minor, &patch );
16775
16776                 if( major != DB_VERSION_MAJOR ||
16777                         minor < DB_VERSION_MINOR )
16778                 {
16779                         printf("Berkeley DB version mismatch\n"
16780                                 "\texpected: %s\n\tgot: %s\n",
16781                                 DB_VERSION_STRING, version);
16782                         return 1;
16783                 }
16784         }
16785 #endif
16786
16787 #if DB_VERSION_MAJOR > 2
16788         db_env_create( NULL, 0 );
16789 #elif DB_VERSION_MAJOR > 1
16790         db_appexit( NULL );
16791 #else
16792         (void) dbopen( NULL, 0, 0, 0, NULL);
16793 #endif
16794
16795 ; return 0; }
16796 EOF
16797 if { (eval echo configure:16798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16798   rm -rf conftest*
16799   ol_cv_db_db42=yes
16800 else
16801   echo "configure: failed program was:" >&5
16802   cat conftest.$ac_ext >&5
16803   rm -rf conftest*
16804   ol_cv_db_db42=no
16805 fi
16806 rm -f conftest*
16807
16808         LIBS="$ol_LIBS"
16809
16810 fi
16811
16812 echo "$ac_t""$ol_cv_db_db42" 1>&6
16813
16814         if test $ol_cv_db_db42 = yes ; then
16815                 ol_cv_lib_db=-ldb42
16816         fi
16817 fi
16818
16819 if test $ol_cv_lib_db = no ; then
16820         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16821 echo "configure:16822: checking for Berkeley DB link (-ldb-42)" >&5
16822 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16823   echo $ac_n "(cached) $ac_c" 1>&6
16824 else
16825   
16826         ol_DB_LIB=-ldb-42
16827         ol_LIBS=$LIBS
16828         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16829
16830         cat > conftest.$ac_ext <<EOF
16831 #line 16832 "configure"
16832 #include "confdefs.h"
16833
16834 #ifdef HAVE_DB_185_H
16835 # include <db_185.h>
16836 #else
16837 # include <db.h>
16838 #endif
16839
16840 #ifndef DB_VERSION_MAJOR
16841 # define DB_VERSION_MAJOR 1
16842 #endif
16843
16844 #ifndef NULL
16845 #define NULL ((void*)0)
16846 #endif
16847
16848 int main() {
16849
16850 #if DB_VERSION_MAJOR > 1
16851         {
16852                 char *version;
16853                 int major, minor, patch;
16854
16855                 version = db_version( &major, &minor, &patch );
16856
16857                 if( major != DB_VERSION_MAJOR ||
16858                         minor < DB_VERSION_MINOR )
16859                 {
16860                         printf("Berkeley DB version mismatch\n"
16861                                 "\texpected: %s\n\tgot: %s\n",
16862                                 DB_VERSION_STRING, version);
16863                         return 1;
16864                 }
16865         }
16866 #endif
16867
16868 #if DB_VERSION_MAJOR > 2
16869         db_env_create( NULL, 0 );
16870 #elif DB_VERSION_MAJOR > 1
16871         db_appexit( NULL );
16872 #else
16873         (void) dbopen( NULL, 0, 0, 0, NULL);
16874 #endif
16875
16876 ; return 0; }
16877 EOF
16878 if { (eval echo configure:16879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16879   rm -rf conftest*
16880   ol_cv_db_db_42=yes
16881 else
16882   echo "configure: failed program was:" >&5
16883   cat conftest.$ac_ext >&5
16884   rm -rf conftest*
16885   ol_cv_db_db_42=no
16886 fi
16887 rm -f conftest*
16888
16889         LIBS="$ol_LIBS"
16890
16891 fi
16892
16893 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16894
16895         if test $ol_cv_db_db_42 = yes ; then
16896                 ol_cv_lib_db=-ldb-42
16897         fi
16898 fi
16899
16900 if test $ol_cv_lib_db = no ; then
16901         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16902 echo "configure:16903: checking for Berkeley DB link (-ldb-4.2)" >&5
16903 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16904   echo $ac_n "(cached) $ac_c" 1>&6
16905 else
16906   
16907         ol_DB_LIB=-ldb-4.2
16908         ol_LIBS=$LIBS
16909         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16910
16911         cat > conftest.$ac_ext <<EOF
16912 #line 16913 "configure"
16913 #include "confdefs.h"
16914
16915 #ifdef HAVE_DB_185_H
16916 # include <db_185.h>
16917 #else
16918 # include <db.h>
16919 #endif
16920
16921 #ifndef DB_VERSION_MAJOR
16922 # define DB_VERSION_MAJOR 1
16923 #endif
16924
16925 #ifndef NULL
16926 #define NULL ((void*)0)
16927 #endif
16928
16929 int main() {
16930
16931 #if DB_VERSION_MAJOR > 1
16932         {
16933                 char *version;
16934                 int major, minor, patch;
16935
16936                 version = db_version( &major, &minor, &patch );
16937
16938                 if( major != DB_VERSION_MAJOR ||
16939                         minor < DB_VERSION_MINOR )
16940                 {
16941                         printf("Berkeley DB version mismatch\n"
16942                                 "\texpected: %s\n\tgot: %s\n",
16943                                 DB_VERSION_STRING, version);
16944                         return 1;
16945                 }
16946         }
16947 #endif
16948
16949 #if DB_VERSION_MAJOR > 2
16950         db_env_create( NULL, 0 );
16951 #elif DB_VERSION_MAJOR > 1
16952         db_appexit( NULL );
16953 #else
16954         (void) dbopen( NULL, 0, 0, 0, NULL);
16955 #endif
16956
16957 ; return 0; }
16958 EOF
16959 if { (eval echo configure:16960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16960   rm -rf conftest*
16961   ol_cv_db_db_4_dot_2=yes
16962 else
16963   echo "configure: failed program was:" >&5
16964   cat conftest.$ac_ext >&5
16965   rm -rf conftest*
16966   ol_cv_db_db_4_dot_2=no
16967 fi
16968 rm -f conftest*
16969
16970         LIBS="$ol_LIBS"
16971
16972 fi
16973
16974 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16975
16976         if test $ol_cv_db_db_4_dot_2 = yes ; then
16977                 ol_cv_lib_db=-ldb-4.2
16978         fi
16979 fi
16980
16981 if test $ol_cv_lib_db = no ; then
16982         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16983 echo "configure:16984: checking for Berkeley DB link (-ldb-4-2)" >&5
16984 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16985   echo $ac_n "(cached) $ac_c" 1>&6
16986 else
16987   
16988         ol_DB_LIB=-ldb-4-2
16989         ol_LIBS=$LIBS
16990         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16991
16992         cat > conftest.$ac_ext <<EOF
16993 #line 16994 "configure"
16994 #include "confdefs.h"
16995
16996 #ifdef HAVE_DB_185_H
16997 # include <db_185.h>
16998 #else
16999 # include <db.h>
17000 #endif
17001
17002 #ifndef DB_VERSION_MAJOR
17003 # define DB_VERSION_MAJOR 1
17004 #endif
17005
17006 #ifndef NULL
17007 #define NULL ((void*)0)
17008 #endif
17009
17010 int main() {
17011
17012 #if DB_VERSION_MAJOR > 1
17013         {
17014                 char *version;
17015                 int major, minor, patch;
17016
17017                 version = db_version( &major, &minor, &patch );
17018
17019                 if( major != DB_VERSION_MAJOR ||
17020                         minor < DB_VERSION_MINOR )
17021                 {
17022                         printf("Berkeley DB version mismatch\n"
17023                                 "\texpected: %s\n\tgot: %s\n",
17024                                 DB_VERSION_STRING, version);
17025                         return 1;
17026                 }
17027         }
17028 #endif
17029
17030 #if DB_VERSION_MAJOR > 2
17031         db_env_create( NULL, 0 );
17032 #elif DB_VERSION_MAJOR > 1
17033         db_appexit( NULL );
17034 #else
17035         (void) dbopen( NULL, 0, 0, 0, NULL);
17036 #endif
17037
17038 ; return 0; }
17039 EOF
17040 if { (eval echo configure:17041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17041   rm -rf conftest*
17042   ol_cv_db_db_4_2=yes
17043 else
17044   echo "configure: failed program was:" >&5
17045   cat conftest.$ac_ext >&5
17046   rm -rf conftest*
17047   ol_cv_db_db_4_2=no
17048 fi
17049 rm -f conftest*
17050
17051         LIBS="$ol_LIBS"
17052
17053 fi
17054
17055 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17056
17057         if test $ol_cv_db_db_4_2 = yes ; then
17058                 ol_cv_lib_db=-ldb-4-2
17059         fi
17060 fi
17061
17062 if test $ol_cv_lib_db = no ; then
17063         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17064 echo "configure:17065: checking for Berkeley DB link (-ldb-4)" >&5
17065 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17066   echo $ac_n "(cached) $ac_c" 1>&6
17067 else
17068   
17069         ol_DB_LIB=-ldb-4
17070         ol_LIBS=$LIBS
17071         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17072
17073         cat > conftest.$ac_ext <<EOF
17074 #line 17075 "configure"
17075 #include "confdefs.h"
17076
17077 #ifdef HAVE_DB_185_H
17078 # include <db_185.h>
17079 #else
17080 # include <db.h>
17081 #endif
17082
17083 #ifndef DB_VERSION_MAJOR
17084 # define DB_VERSION_MAJOR 1
17085 #endif
17086
17087 #ifndef NULL
17088 #define NULL ((void*)0)
17089 #endif
17090
17091 int main() {
17092
17093 #if DB_VERSION_MAJOR > 1
17094         {
17095                 char *version;
17096                 int major, minor, patch;
17097
17098                 version = db_version( &major, &minor, &patch );
17099
17100                 if( major != DB_VERSION_MAJOR ||
17101                         minor < DB_VERSION_MINOR )
17102                 {
17103                         printf("Berkeley DB version mismatch\n"
17104                                 "\texpected: %s\n\tgot: %s\n",
17105                                 DB_VERSION_STRING, version);
17106                         return 1;
17107                 }
17108         }
17109 #endif
17110
17111 #if DB_VERSION_MAJOR > 2
17112         db_env_create( NULL, 0 );
17113 #elif DB_VERSION_MAJOR > 1
17114         db_appexit( NULL );
17115 #else
17116         (void) dbopen( NULL, 0, 0, 0, NULL);
17117 #endif
17118
17119 ; return 0; }
17120 EOF
17121 if { (eval echo configure:17122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17122   rm -rf conftest*
17123   ol_cv_db_db_4=yes
17124 else
17125   echo "configure: failed program was:" >&5
17126   cat conftest.$ac_ext >&5
17127   rm -rf conftest*
17128   ol_cv_db_db_4=no
17129 fi
17130 rm -f conftest*
17131
17132         LIBS="$ol_LIBS"
17133
17134 fi
17135
17136 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17137
17138         if test $ol_cv_db_db_4 = yes ; then
17139                 ol_cv_lib_db=-ldb-4
17140         fi
17141 fi
17142
17143 if test $ol_cv_lib_db = no ; then
17144         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17145 echo "configure:17146: checking for Berkeley DB link (-ldb4)" >&5
17146 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17147   echo $ac_n "(cached) $ac_c" 1>&6
17148 else
17149   
17150         ol_DB_LIB=-ldb4
17151         ol_LIBS=$LIBS
17152         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17153
17154         cat > conftest.$ac_ext <<EOF
17155 #line 17156 "configure"
17156 #include "confdefs.h"
17157
17158 #ifdef HAVE_DB_185_H
17159 # include <db_185.h>
17160 #else
17161 # include <db.h>
17162 #endif
17163
17164 #ifndef DB_VERSION_MAJOR
17165 # define DB_VERSION_MAJOR 1
17166 #endif
17167
17168 #ifndef NULL
17169 #define NULL ((void*)0)
17170 #endif
17171
17172 int main() {
17173
17174 #if DB_VERSION_MAJOR > 1
17175         {
17176                 char *version;
17177                 int major, minor, patch;
17178
17179                 version = db_version( &major, &minor, &patch );
17180
17181                 if( major != DB_VERSION_MAJOR ||
17182                         minor < DB_VERSION_MINOR )
17183                 {
17184                         printf("Berkeley DB version mismatch\n"
17185                                 "\texpected: %s\n\tgot: %s\n",
17186                                 DB_VERSION_STRING, version);
17187                         return 1;
17188                 }
17189         }
17190 #endif
17191
17192 #if DB_VERSION_MAJOR > 2
17193         db_env_create( NULL, 0 );
17194 #elif DB_VERSION_MAJOR > 1
17195         db_appexit( NULL );
17196 #else
17197         (void) dbopen( NULL, 0, 0, 0, NULL);
17198 #endif
17199
17200 ; return 0; }
17201 EOF
17202 if { (eval echo configure:17203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17203   rm -rf conftest*
17204   ol_cv_db_db4=yes
17205 else
17206   echo "configure: failed program was:" >&5
17207   cat conftest.$ac_ext >&5
17208   rm -rf conftest*
17209   ol_cv_db_db4=no
17210 fi
17211 rm -f conftest*
17212
17213         LIBS="$ol_LIBS"
17214
17215 fi
17216
17217 echo "$ac_t""$ol_cv_db_db4" 1>&6
17218
17219         if test $ol_cv_db_db4 = yes ; then
17220                 ol_cv_lib_db=-ldb4
17221         fi
17222 fi
17223
17224 if test $ol_cv_lib_db = no ; then
17225         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17226 echo "configure:17227: checking for Berkeley DB link (-ldb)" >&5
17227 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17228   echo $ac_n "(cached) $ac_c" 1>&6
17229 else
17230   
17231         ol_DB_LIB=-ldb
17232         ol_LIBS=$LIBS
17233         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17234
17235         cat > conftest.$ac_ext <<EOF
17236 #line 17237 "configure"
17237 #include "confdefs.h"
17238
17239 #ifdef HAVE_DB_185_H
17240 # include <db_185.h>
17241 #else
17242 # include <db.h>
17243 #endif
17244
17245 #ifndef DB_VERSION_MAJOR
17246 # define DB_VERSION_MAJOR 1
17247 #endif
17248
17249 #ifndef NULL
17250 #define NULL ((void*)0)
17251 #endif
17252
17253 int main() {
17254
17255 #if DB_VERSION_MAJOR > 1
17256         {
17257                 char *version;
17258                 int major, minor, patch;
17259
17260                 version = db_version( &major, &minor, &patch );
17261
17262                 if( major != DB_VERSION_MAJOR ||
17263                         minor < DB_VERSION_MINOR )
17264                 {
17265                         printf("Berkeley DB version mismatch\n"
17266                                 "\texpected: %s\n\tgot: %s\n",
17267                                 DB_VERSION_STRING, version);
17268                         return 1;
17269                 }
17270         }
17271 #endif
17272
17273 #if DB_VERSION_MAJOR > 2
17274         db_env_create( NULL, 0 );
17275 #elif DB_VERSION_MAJOR > 1
17276         db_appexit( NULL );
17277 #else
17278         (void) dbopen( NULL, 0, 0, 0, NULL);
17279 #endif
17280
17281 ; return 0; }
17282 EOF
17283 if { (eval echo configure:17284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17284   rm -rf conftest*
17285   ol_cv_db_db=yes
17286 else
17287   echo "configure: failed program was:" >&5
17288   cat conftest.$ac_ext >&5
17289   rm -rf conftest*
17290   ol_cv_db_db=no
17291 fi
17292 rm -f conftest*
17293
17294         LIBS="$ol_LIBS"
17295
17296 fi
17297
17298 echo "$ac_t""$ol_cv_db_db" 1>&6
17299
17300         if test $ol_cv_db_db = yes ; then
17301                 ol_cv_lib_db=-ldb
17302         fi
17303 fi
17304
17305 if test $ol_cv_lib_db = no ; then
17306         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17307 echo "configure:17308: checking for Berkeley DB link (-ldb41)" >&5
17308 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17309   echo $ac_n "(cached) $ac_c" 1>&6
17310 else
17311   
17312         ol_DB_LIB=-ldb41
17313         ol_LIBS=$LIBS
17314         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17315
17316         cat > conftest.$ac_ext <<EOF
17317 #line 17318 "configure"
17318 #include "confdefs.h"
17319
17320 #ifdef HAVE_DB_185_H
17321 # include <db_185.h>
17322 #else
17323 # include <db.h>
17324 #endif
17325
17326 #ifndef DB_VERSION_MAJOR
17327 # define DB_VERSION_MAJOR 1
17328 #endif
17329
17330 #ifndef NULL
17331 #define NULL ((void*)0)
17332 #endif
17333
17334 int main() {
17335
17336 #if DB_VERSION_MAJOR > 1
17337         {
17338                 char *version;
17339                 int major, minor, patch;
17340
17341                 version = db_version( &major, &minor, &patch );
17342
17343                 if( major != DB_VERSION_MAJOR ||
17344                         minor < DB_VERSION_MINOR )
17345                 {
17346                         printf("Berkeley DB version mismatch\n"
17347                                 "\texpected: %s\n\tgot: %s\n",
17348                                 DB_VERSION_STRING, version);
17349                         return 1;
17350                 }
17351         }
17352 #endif
17353
17354 #if DB_VERSION_MAJOR > 2
17355         db_env_create( NULL, 0 );
17356 #elif DB_VERSION_MAJOR > 1
17357         db_appexit( NULL );
17358 #else
17359         (void) dbopen( NULL, 0, 0, 0, NULL);
17360 #endif
17361
17362 ; return 0; }
17363 EOF
17364 if { (eval echo configure:17365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17365   rm -rf conftest*
17366   ol_cv_db_db41=yes
17367 else
17368   echo "configure: failed program was:" >&5
17369   cat conftest.$ac_ext >&5
17370   rm -rf conftest*
17371   ol_cv_db_db41=no
17372 fi
17373 rm -f conftest*
17374
17375         LIBS="$ol_LIBS"
17376
17377 fi
17378
17379 echo "$ac_t""$ol_cv_db_db41" 1>&6
17380
17381         if test $ol_cv_db_db41 = yes ; then
17382                 ol_cv_lib_db=-ldb41
17383         fi
17384 fi
17385
17386 if test $ol_cv_lib_db = no ; then
17387         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17388 echo "configure:17389: checking for Berkeley DB link (-ldb-41)" >&5
17389 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17390   echo $ac_n "(cached) $ac_c" 1>&6
17391 else
17392   
17393         ol_DB_LIB=-ldb-41
17394         ol_LIBS=$LIBS
17395         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17396
17397         cat > conftest.$ac_ext <<EOF
17398 #line 17399 "configure"
17399 #include "confdefs.h"
17400
17401 #ifdef HAVE_DB_185_H
17402 # include <db_185.h>
17403 #else
17404 # include <db.h>
17405 #endif
17406
17407 #ifndef DB_VERSION_MAJOR
17408 # define DB_VERSION_MAJOR 1
17409 #endif
17410
17411 #ifndef NULL
17412 #define NULL ((void*)0)
17413 #endif
17414
17415 int main() {
17416
17417 #if DB_VERSION_MAJOR > 1
17418         {
17419                 char *version;
17420                 int major, minor, patch;
17421
17422                 version = db_version( &major, &minor, &patch );
17423
17424                 if( major != DB_VERSION_MAJOR ||
17425                         minor < DB_VERSION_MINOR )
17426                 {
17427                         printf("Berkeley DB version mismatch\n"
17428                                 "\texpected: %s\n\tgot: %s\n",
17429                                 DB_VERSION_STRING, version);
17430                         return 1;
17431                 }
17432         }
17433 #endif
17434
17435 #if DB_VERSION_MAJOR > 2
17436         db_env_create( NULL, 0 );
17437 #elif DB_VERSION_MAJOR > 1
17438         db_appexit( NULL );
17439 #else
17440         (void) dbopen( NULL, 0, 0, 0, NULL);
17441 #endif
17442
17443 ; return 0; }
17444 EOF
17445 if { (eval echo configure:17446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17446   rm -rf conftest*
17447   ol_cv_db_db_41=yes
17448 else
17449   echo "configure: failed program was:" >&5
17450   cat conftest.$ac_ext >&5
17451   rm -rf conftest*
17452   ol_cv_db_db_41=no
17453 fi
17454 rm -f conftest*
17455
17456         LIBS="$ol_LIBS"
17457
17458 fi
17459
17460 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17461
17462         if test $ol_cv_db_db_41 = yes ; then
17463                 ol_cv_lib_db=-ldb-41
17464         fi
17465 fi
17466
17467 if test $ol_cv_lib_db = no ; then
17468         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17469 echo "configure:17470: checking for Berkeley DB link (-ldb-4.1)" >&5
17470 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17471   echo $ac_n "(cached) $ac_c" 1>&6
17472 else
17473   
17474         ol_DB_LIB=-ldb-4.1
17475         ol_LIBS=$LIBS
17476         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17477
17478         cat > conftest.$ac_ext <<EOF
17479 #line 17480 "configure"
17480 #include "confdefs.h"
17481
17482 #ifdef HAVE_DB_185_H
17483 # include <db_185.h>
17484 #else
17485 # include <db.h>
17486 #endif
17487
17488 #ifndef DB_VERSION_MAJOR
17489 # define DB_VERSION_MAJOR 1
17490 #endif
17491
17492 #ifndef NULL
17493 #define NULL ((void*)0)
17494 #endif
17495
17496 int main() {
17497
17498 #if DB_VERSION_MAJOR > 1
17499         {
17500                 char *version;
17501                 int major, minor, patch;
17502
17503                 version = db_version( &major, &minor, &patch );
17504
17505                 if( major != DB_VERSION_MAJOR ||
17506                         minor < DB_VERSION_MINOR )
17507                 {
17508                         printf("Berkeley DB version mismatch\n"
17509                                 "\texpected: %s\n\tgot: %s\n",
17510                                 DB_VERSION_STRING, version);
17511                         return 1;
17512                 }
17513         }
17514 #endif
17515
17516 #if DB_VERSION_MAJOR > 2
17517         db_env_create( NULL, 0 );
17518 #elif DB_VERSION_MAJOR > 1
17519         db_appexit( NULL );
17520 #else
17521         (void) dbopen( NULL, 0, 0, 0, NULL);
17522 #endif
17523
17524 ; return 0; }
17525 EOF
17526 if { (eval echo configure:17527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17527   rm -rf conftest*
17528   ol_cv_db_db_4_dot_1=yes
17529 else
17530   echo "configure: failed program was:" >&5
17531   cat conftest.$ac_ext >&5
17532   rm -rf conftest*
17533   ol_cv_db_db_4_dot_1=no
17534 fi
17535 rm -f conftest*
17536
17537         LIBS="$ol_LIBS"
17538
17539 fi
17540
17541 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17542
17543         if test $ol_cv_db_db_4_dot_1 = yes ; then
17544                 ol_cv_lib_db=-ldb-4.1
17545         fi
17546 fi
17547
17548 if test $ol_cv_lib_db = no ; then
17549         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17550 echo "configure:17551: checking for Berkeley DB link (-ldb-4-1)" >&5
17551 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17552   echo $ac_n "(cached) $ac_c" 1>&6
17553 else
17554   
17555         ol_DB_LIB=-ldb-4-1
17556         ol_LIBS=$LIBS
17557         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17558
17559         cat > conftest.$ac_ext <<EOF
17560 #line 17561 "configure"
17561 #include "confdefs.h"
17562
17563 #ifdef HAVE_DB_185_H
17564 # include <db_185.h>
17565 #else
17566 # include <db.h>
17567 #endif
17568
17569 #ifndef DB_VERSION_MAJOR
17570 # define DB_VERSION_MAJOR 1
17571 #endif
17572
17573 #ifndef NULL
17574 #define NULL ((void*)0)
17575 #endif
17576
17577 int main() {
17578
17579 #if DB_VERSION_MAJOR > 1
17580         {
17581                 char *version;
17582                 int major, minor, patch;
17583
17584                 version = db_version( &major, &minor, &patch );
17585
17586                 if( major != DB_VERSION_MAJOR ||
17587                         minor < DB_VERSION_MINOR )
17588                 {
17589                         printf("Berkeley DB version mismatch\n"
17590                                 "\texpected: %s\n\tgot: %s\n",
17591                                 DB_VERSION_STRING, version);
17592                         return 1;
17593                 }
17594         }
17595 #endif
17596
17597 #if DB_VERSION_MAJOR > 2
17598         db_env_create( NULL, 0 );
17599 #elif DB_VERSION_MAJOR > 1
17600         db_appexit( NULL );
17601 #else
17602         (void) dbopen( NULL, 0, 0, 0, NULL);
17603 #endif
17604
17605 ; return 0; }
17606 EOF
17607 if { (eval echo configure:17608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17608   rm -rf conftest*
17609   ol_cv_db_db_4_1=yes
17610 else
17611   echo "configure: failed program was:" >&5
17612   cat conftest.$ac_ext >&5
17613   rm -rf conftest*
17614   ol_cv_db_db_4_1=no
17615 fi
17616 rm -f conftest*
17617
17618         LIBS="$ol_LIBS"
17619
17620 fi
17621
17622 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17623
17624         if test $ol_cv_db_db_4_1 = yes ; then
17625                 ol_cv_lib_db=-ldb-4-1
17626         fi
17627 fi
17628
17629 if test $ol_cv_lib_db = no ; then
17630         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17631 echo "configure:17632: checking for Berkeley DB link (-ldb3)" >&5
17632 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17633   echo $ac_n "(cached) $ac_c" 1>&6
17634 else
17635   
17636         ol_DB_LIB=-ldb3
17637         ol_LIBS=$LIBS
17638         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17639
17640         cat > conftest.$ac_ext <<EOF
17641 #line 17642 "configure"
17642 #include "confdefs.h"
17643
17644 #ifdef HAVE_DB_185_H
17645 # include <db_185.h>
17646 #else
17647 # include <db.h>
17648 #endif
17649
17650 #ifndef DB_VERSION_MAJOR
17651 # define DB_VERSION_MAJOR 1
17652 #endif
17653
17654 #ifndef NULL
17655 #define NULL ((void*)0)
17656 #endif
17657
17658 int main() {
17659
17660 #if DB_VERSION_MAJOR > 1
17661         {
17662                 char *version;
17663                 int major, minor, patch;
17664
17665                 version = db_version( &major, &minor, &patch );
17666
17667                 if( major != DB_VERSION_MAJOR ||
17668                         minor < DB_VERSION_MINOR )
17669                 {
17670                         printf("Berkeley DB version mismatch\n"
17671                                 "\texpected: %s\n\tgot: %s\n",
17672                                 DB_VERSION_STRING, version);
17673                         return 1;
17674                 }
17675         }
17676 #endif
17677
17678 #if DB_VERSION_MAJOR > 2
17679         db_env_create( NULL, 0 );
17680 #elif DB_VERSION_MAJOR > 1
17681         db_appexit( NULL );
17682 #else
17683         (void) dbopen( NULL, 0, 0, 0, NULL);
17684 #endif
17685
17686 ; return 0; }
17687 EOF
17688 if { (eval echo configure:17689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17689   rm -rf conftest*
17690   ol_cv_db_db3=yes
17691 else
17692   echo "configure: failed program was:" >&5
17693   cat conftest.$ac_ext >&5
17694   rm -rf conftest*
17695   ol_cv_db_db3=no
17696 fi
17697 rm -f conftest*
17698
17699         LIBS="$ol_LIBS"
17700
17701 fi
17702
17703 echo "$ac_t""$ol_cv_db_db3" 1>&6
17704
17705         if test $ol_cv_db_db3 = yes ; then
17706                 ol_cv_lib_db=-ldb3
17707         fi
17708 fi
17709
17710 if test $ol_cv_lib_db = no ; then
17711         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17712 echo "configure:17713: checking for Berkeley DB link (-ldb-3)" >&5
17713 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17714   echo $ac_n "(cached) $ac_c" 1>&6
17715 else
17716   
17717         ol_DB_LIB=-ldb-3
17718         ol_LIBS=$LIBS
17719         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17720
17721         cat > conftest.$ac_ext <<EOF
17722 #line 17723 "configure"
17723 #include "confdefs.h"
17724
17725 #ifdef HAVE_DB_185_H
17726 # include <db_185.h>
17727 #else
17728 # include <db.h>
17729 #endif
17730
17731 #ifndef DB_VERSION_MAJOR
17732 # define DB_VERSION_MAJOR 1
17733 #endif
17734
17735 #ifndef NULL
17736 #define NULL ((void*)0)
17737 #endif
17738
17739 int main() {
17740
17741 #if DB_VERSION_MAJOR > 1
17742         {
17743                 char *version;
17744                 int major, minor, patch;
17745
17746                 version = db_version( &major, &minor, &patch );
17747
17748                 if( major != DB_VERSION_MAJOR ||
17749                         minor < DB_VERSION_MINOR )
17750                 {
17751                         printf("Berkeley DB version mismatch\n"
17752                                 "\texpected: %s\n\tgot: %s\n",
17753                                 DB_VERSION_STRING, version);
17754                         return 1;
17755                 }
17756         }
17757 #endif
17758
17759 #if DB_VERSION_MAJOR > 2
17760         db_env_create( NULL, 0 );
17761 #elif DB_VERSION_MAJOR > 1
17762         db_appexit( NULL );
17763 #else
17764         (void) dbopen( NULL, 0, 0, 0, NULL);
17765 #endif
17766
17767 ; return 0; }
17768 EOF
17769 if { (eval echo configure:17770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17770   rm -rf conftest*
17771   ol_cv_db_db_3=yes
17772 else
17773   echo "configure: failed program was:" >&5
17774   cat conftest.$ac_ext >&5
17775   rm -rf conftest*
17776   ol_cv_db_db_3=no
17777 fi
17778 rm -f conftest*
17779
17780         LIBS="$ol_LIBS"
17781
17782 fi
17783
17784 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17785
17786         if test $ol_cv_db_db_3 = yes ; then
17787                 ol_cv_lib_db=-ldb-3
17788         fi
17789 fi
17790
17791 if test $ol_cv_lib_db = no ; then
17792         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17793 echo "configure:17794: checking for Berkeley DB link (-ldb2)" >&5
17794 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17795   echo $ac_n "(cached) $ac_c" 1>&6
17796 else
17797   
17798         ol_DB_LIB=-ldb2
17799         ol_LIBS=$LIBS
17800         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17801
17802         cat > conftest.$ac_ext <<EOF
17803 #line 17804 "configure"
17804 #include "confdefs.h"
17805
17806 #ifdef HAVE_DB_185_H
17807 # include <db_185.h>
17808 #else
17809 # include <db.h>
17810 #endif
17811
17812 #ifndef DB_VERSION_MAJOR
17813 # define DB_VERSION_MAJOR 1
17814 #endif
17815
17816 #ifndef NULL
17817 #define NULL ((void*)0)
17818 #endif
17819
17820 int main() {
17821
17822 #if DB_VERSION_MAJOR > 1
17823         {
17824                 char *version;
17825                 int major, minor, patch;
17826
17827                 version = db_version( &major, &minor, &patch );
17828
17829                 if( major != DB_VERSION_MAJOR ||
17830                         minor < DB_VERSION_MINOR )
17831                 {
17832                         printf("Berkeley DB version mismatch\n"
17833                                 "\texpected: %s\n\tgot: %s\n",
17834                                 DB_VERSION_STRING, version);
17835                         return 1;
17836                 }
17837         }
17838 #endif
17839
17840 #if DB_VERSION_MAJOR > 2
17841         db_env_create( NULL, 0 );
17842 #elif DB_VERSION_MAJOR > 1
17843         db_appexit( NULL );
17844 #else
17845         (void) dbopen( NULL, 0, 0, 0, NULL);
17846 #endif
17847
17848 ; return 0; }
17849 EOF
17850 if { (eval echo configure:17851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17851   rm -rf conftest*
17852   ol_cv_db_db2=yes
17853 else
17854   echo "configure: failed program was:" >&5
17855   cat conftest.$ac_ext >&5
17856   rm -rf conftest*
17857   ol_cv_db_db2=no
17858 fi
17859 rm -f conftest*
17860
17861         LIBS="$ol_LIBS"
17862
17863 fi
17864
17865 echo "$ac_t""$ol_cv_db_db2" 1>&6
17866
17867         if test $ol_cv_db_db2 = yes ; then
17868                 ol_cv_lib_db=-ldb2
17869         fi
17870 fi
17871
17872 if test $ol_cv_lib_db = no ; then
17873         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17874 echo "configure:17875: checking for Berkeley DB link (-ldb-2)" >&5
17875 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17876   echo $ac_n "(cached) $ac_c" 1>&6
17877 else
17878   
17879         ol_DB_LIB=-ldb-2
17880         ol_LIBS=$LIBS
17881         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17882
17883         cat > conftest.$ac_ext <<EOF
17884 #line 17885 "configure"
17885 #include "confdefs.h"
17886
17887 #ifdef HAVE_DB_185_H
17888 # include <db_185.h>
17889 #else
17890 # include <db.h>
17891 #endif
17892
17893 #ifndef DB_VERSION_MAJOR
17894 # define DB_VERSION_MAJOR 1
17895 #endif
17896
17897 #ifndef NULL
17898 #define NULL ((void*)0)
17899 #endif
17900
17901 int main() {
17902
17903 #if DB_VERSION_MAJOR > 1
17904         {
17905                 char *version;
17906                 int major, minor, patch;
17907
17908                 version = db_version( &major, &minor, &patch );
17909
17910                 if( major != DB_VERSION_MAJOR ||
17911                         minor < DB_VERSION_MINOR )
17912                 {
17913                         printf("Berkeley DB version mismatch\n"
17914                                 "\texpected: %s\n\tgot: %s\n",
17915                                 DB_VERSION_STRING, version);
17916                         return 1;
17917                 }
17918         }
17919 #endif
17920
17921 #if DB_VERSION_MAJOR > 2
17922         db_env_create( NULL, 0 );
17923 #elif DB_VERSION_MAJOR > 1
17924         db_appexit( NULL );
17925 #else
17926         (void) dbopen( NULL, 0, 0, 0, NULL);
17927 #endif
17928
17929 ; return 0; }
17930 EOF
17931 if { (eval echo configure:17932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17932   rm -rf conftest*
17933   ol_cv_db_db_2=yes
17934 else
17935   echo "configure: failed program was:" >&5
17936   cat conftest.$ac_ext >&5
17937   rm -rf conftest*
17938   ol_cv_db_db_2=no
17939 fi
17940 rm -f conftest*
17941
17942         LIBS="$ol_LIBS"
17943
17944 fi
17945
17946 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17947
17948         if test $ol_cv_db_db_2 = yes ; then
17949                 ol_cv_lib_db=-ldb-2
17950         fi
17951 fi
17952
17953 if test $ol_cv_lib_db = no ; then
17954         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17955 echo "configure:17956: checking for Berkeley DB link (-ldb1)" >&5
17956 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17957   echo $ac_n "(cached) $ac_c" 1>&6
17958 else
17959   
17960         ol_DB_LIB=-ldb1
17961         ol_LIBS=$LIBS
17962         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17963
17964         cat > conftest.$ac_ext <<EOF
17965 #line 17966 "configure"
17966 #include "confdefs.h"
17967
17968 #ifdef HAVE_DB_185_H
17969 # include <db_185.h>
17970 #else
17971 # include <db.h>
17972 #endif
17973
17974 #ifndef DB_VERSION_MAJOR
17975 # define DB_VERSION_MAJOR 1
17976 #endif
17977
17978 #ifndef NULL
17979 #define NULL ((void*)0)
17980 #endif
17981
17982 int main() {
17983
17984 #if DB_VERSION_MAJOR > 1
17985         {
17986                 char *version;
17987                 int major, minor, patch;
17988
17989                 version = db_version( &major, &minor, &patch );
17990
17991                 if( major != DB_VERSION_MAJOR ||
17992                         minor < DB_VERSION_MINOR )
17993                 {
17994                         printf("Berkeley DB version mismatch\n"
17995                                 "\texpected: %s\n\tgot: %s\n",
17996                                 DB_VERSION_STRING, version);
17997                         return 1;
17998                 }
17999         }
18000 #endif
18001
18002 #if DB_VERSION_MAJOR > 2
18003         db_env_create( NULL, 0 );
18004 #elif DB_VERSION_MAJOR > 1
18005         db_appexit( NULL );
18006 #else
18007         (void) dbopen( NULL, 0, 0, 0, NULL);
18008 #endif
18009
18010 ; return 0; }
18011 EOF
18012 if { (eval echo configure:18013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18013   rm -rf conftest*
18014   ol_cv_db_db1=yes
18015 else
18016   echo "configure: failed program was:" >&5
18017   cat conftest.$ac_ext >&5
18018   rm -rf conftest*
18019   ol_cv_db_db1=no
18020 fi
18021 rm -f conftest*
18022
18023         LIBS="$ol_LIBS"
18024
18025 fi
18026
18027 echo "$ac_t""$ol_cv_db_db1" 1>&6
18028
18029         if test $ol_cv_db_db1 = yes ; then
18030                 ol_cv_lib_db=-ldb1
18031         fi
18032 fi
18033
18034 if test $ol_cv_lib_db = no ; then
18035         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18036 echo "configure:18037: checking for Berkeley DB link (-ldb-1)" >&5
18037 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18038   echo $ac_n "(cached) $ac_c" 1>&6
18039 else
18040   
18041         ol_DB_LIB=-ldb-1
18042         ol_LIBS=$LIBS
18043         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18044
18045         cat > conftest.$ac_ext <<EOF
18046 #line 18047 "configure"
18047 #include "confdefs.h"
18048
18049 #ifdef HAVE_DB_185_H
18050 # include <db_185.h>
18051 #else
18052 # include <db.h>
18053 #endif
18054
18055 #ifndef DB_VERSION_MAJOR
18056 # define DB_VERSION_MAJOR 1
18057 #endif
18058
18059 #ifndef NULL
18060 #define NULL ((void*)0)
18061 #endif
18062
18063 int main() {
18064
18065 #if DB_VERSION_MAJOR > 1
18066         {
18067                 char *version;
18068                 int major, minor, patch;
18069
18070                 version = db_version( &major, &minor, &patch );
18071
18072                 if( major != DB_VERSION_MAJOR ||
18073                         minor < DB_VERSION_MINOR )
18074                 {
18075                         printf("Berkeley DB version mismatch\n"
18076                                 "\texpected: %s\n\tgot: %s\n",
18077                                 DB_VERSION_STRING, version);
18078                         return 1;
18079                 }
18080         }
18081 #endif
18082
18083 #if DB_VERSION_MAJOR > 2
18084         db_env_create( NULL, 0 );
18085 #elif DB_VERSION_MAJOR > 1
18086         db_appexit( NULL );
18087 #else
18088         (void) dbopen( NULL, 0, 0, 0, NULL);
18089 #endif
18090
18091 ; return 0; }
18092 EOF
18093 if { (eval echo configure:18094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18094   rm -rf conftest*
18095   ol_cv_db_db_1=yes
18096 else
18097   echo "configure: failed program was:" >&5
18098   cat conftest.$ac_ext >&5
18099   rm -rf conftest*
18100   ol_cv_db_db_1=no
18101 fi
18102 rm -f conftest*
18103
18104         LIBS="$ol_LIBS"
18105
18106 fi
18107
18108 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18109
18110         if test $ol_cv_db_db_1 = yes ; then
18111                 ol_cv_lib_db=-ldb-1
18112         fi
18113 fi
18114
18115
18116                 if test "$ol_cv_lib_db" != no ; then
18117                         ol_cv_berkeley_db=yes
18118                 fi
18119         fi
18120 fi
18121
18122         else
18123                 ol_cv_berkeley_db=no
18124 for ac_hdr in db.h
18125 do
18126 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18127 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18128 echo "configure:18129: checking for $ac_hdr" >&5
18129 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18130   echo $ac_n "(cached) $ac_c" 1>&6
18131 else
18132   cat > conftest.$ac_ext <<EOF
18133 #line 18134 "configure"
18134 #include "confdefs.h"
18135 #include <$ac_hdr>
18136 EOF
18137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18138 { (eval echo configure:18139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18140 if test -z "$ac_err"; then
18141   rm -rf conftest*
18142   eval "ac_cv_header_$ac_safe=yes"
18143 else
18144   echo "$ac_err" >&5
18145   echo "configure: failed program was:" >&5
18146   cat conftest.$ac_ext >&5
18147   rm -rf conftest*
18148   eval "ac_cv_header_$ac_safe=no"
18149 fi
18150 rm -f conftest*
18151 fi
18152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18153   echo "$ac_t""yes" 1>&6
18154     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18155   cat >> confdefs.h <<EOF
18156 #define $ac_tr_hdr 1
18157 EOF
18158  
18159 else
18160   echo "$ac_t""no" 1>&6
18161 fi
18162 done
18163
18164 if test $ac_cv_header_db_h = yes; then
18165         ol_cv_lib_db=no
18166 if test $ol_cv_lib_db = no ; then
18167         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18168 echo "configure:18169: checking for Berkeley DB link (default)" >&5
18169 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18170   echo $ac_n "(cached) $ac_c" 1>&6
18171 else
18172   
18173         ol_DB_LIB=
18174         ol_LIBS=$LIBS
18175         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18176
18177         cat > conftest.$ac_ext <<EOF
18178 #line 18179 "configure"
18179 #include "confdefs.h"
18180
18181 #ifdef HAVE_DB_185_H
18182 # include <db_185.h>
18183 #else
18184 # include <db.h>
18185 #endif
18186
18187 #ifndef DB_VERSION_MAJOR
18188 # define DB_VERSION_MAJOR 1
18189 #endif
18190
18191 #ifndef NULL
18192 #define NULL ((void*)0)
18193 #endif
18194
18195 int main() {
18196
18197 #if DB_VERSION_MAJOR > 1
18198         {
18199                 char *version;
18200                 int major, minor, patch;
18201
18202                 version = db_version( &major, &minor, &patch );
18203
18204                 if( major != DB_VERSION_MAJOR ||
18205                         minor < DB_VERSION_MINOR )
18206                 {
18207                         printf("Berkeley DB version mismatch\n"
18208                                 "\texpected: %s\n\tgot: %s\n",
18209                                 DB_VERSION_STRING, version);
18210                         return 1;
18211                 }
18212         }
18213 #endif
18214
18215 #if DB_VERSION_MAJOR > 2
18216         db_env_create( NULL, 0 );
18217 #elif DB_VERSION_MAJOR > 1
18218         db_appexit( NULL );
18219 #else
18220         (void) dbopen( NULL, 0, 0, 0, NULL);
18221 #endif
18222
18223 ; return 0; }
18224 EOF
18225 if { (eval echo configure:18226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18226   rm -rf conftest*
18227   ol_cv_db_none=yes
18228 else
18229   echo "configure: failed program was:" >&5
18230   cat conftest.$ac_ext >&5
18231   rm -rf conftest*
18232   ol_cv_db_none=no
18233 fi
18234 rm -f conftest*
18235
18236         LIBS="$ol_LIBS"
18237
18238 fi
18239
18240 echo "$ac_t""$ol_cv_db_none" 1>&6
18241
18242         if test $ol_cv_db_none = yes ; then
18243                 ol_cv_lib_db=yes
18244         fi
18245 fi
18246
18247 if test $ol_cv_lib_db = no ; then
18248         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18249 echo "configure:18250: checking for Berkeley DB link (-ldb42)" >&5
18250 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18251   echo $ac_n "(cached) $ac_c" 1>&6
18252 else
18253   
18254         ol_DB_LIB=-ldb42
18255         ol_LIBS=$LIBS
18256         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18257
18258         cat > conftest.$ac_ext <<EOF
18259 #line 18260 "configure"
18260 #include "confdefs.h"
18261
18262 #ifdef HAVE_DB_185_H
18263 # include <db_185.h>
18264 #else
18265 # include <db.h>
18266 #endif
18267
18268 #ifndef DB_VERSION_MAJOR
18269 # define DB_VERSION_MAJOR 1
18270 #endif
18271
18272 #ifndef NULL
18273 #define NULL ((void*)0)
18274 #endif
18275
18276 int main() {
18277
18278 #if DB_VERSION_MAJOR > 1
18279         {
18280                 char *version;
18281                 int major, minor, patch;
18282
18283                 version = db_version( &major, &minor, &patch );
18284
18285                 if( major != DB_VERSION_MAJOR ||
18286                         minor < DB_VERSION_MINOR )
18287                 {
18288                         printf("Berkeley DB version mismatch\n"
18289                                 "\texpected: %s\n\tgot: %s\n",
18290                                 DB_VERSION_STRING, version);
18291                         return 1;
18292                 }
18293         }
18294 #endif
18295
18296 #if DB_VERSION_MAJOR > 2
18297         db_env_create( NULL, 0 );
18298 #elif DB_VERSION_MAJOR > 1
18299         db_appexit( NULL );
18300 #else
18301         (void) dbopen( NULL, 0, 0, 0, NULL);
18302 #endif
18303
18304 ; return 0; }
18305 EOF
18306 if { (eval echo configure:18307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18307   rm -rf conftest*
18308   ol_cv_db_db42=yes
18309 else
18310   echo "configure: failed program was:" >&5
18311   cat conftest.$ac_ext >&5
18312   rm -rf conftest*
18313   ol_cv_db_db42=no
18314 fi
18315 rm -f conftest*
18316
18317         LIBS="$ol_LIBS"
18318
18319 fi
18320
18321 echo "$ac_t""$ol_cv_db_db42" 1>&6
18322
18323         if test $ol_cv_db_db42 = yes ; then
18324                 ol_cv_lib_db=-ldb42
18325         fi
18326 fi
18327
18328 if test $ol_cv_lib_db = no ; then
18329         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18330 echo "configure:18331: checking for Berkeley DB link (-ldb-42)" >&5
18331 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18332   echo $ac_n "(cached) $ac_c" 1>&6
18333 else
18334   
18335         ol_DB_LIB=-ldb-42
18336         ol_LIBS=$LIBS
18337         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18338
18339         cat > conftest.$ac_ext <<EOF
18340 #line 18341 "configure"
18341 #include "confdefs.h"
18342
18343 #ifdef HAVE_DB_185_H
18344 # include <db_185.h>
18345 #else
18346 # include <db.h>
18347 #endif
18348
18349 #ifndef DB_VERSION_MAJOR
18350 # define DB_VERSION_MAJOR 1
18351 #endif
18352
18353 #ifndef NULL
18354 #define NULL ((void*)0)
18355 #endif
18356
18357 int main() {
18358
18359 #if DB_VERSION_MAJOR > 1
18360         {
18361                 char *version;
18362                 int major, minor, patch;
18363
18364                 version = db_version( &major, &minor, &patch );
18365
18366                 if( major != DB_VERSION_MAJOR ||
18367                         minor < DB_VERSION_MINOR )
18368                 {
18369                         printf("Berkeley DB version mismatch\n"
18370                                 "\texpected: %s\n\tgot: %s\n",
18371                                 DB_VERSION_STRING, version);
18372                         return 1;
18373                 }
18374         }
18375 #endif
18376
18377 #if DB_VERSION_MAJOR > 2
18378         db_env_create( NULL, 0 );
18379 #elif DB_VERSION_MAJOR > 1
18380         db_appexit( NULL );
18381 #else
18382         (void) dbopen( NULL, 0, 0, 0, NULL);
18383 #endif
18384
18385 ; return 0; }
18386 EOF
18387 if { (eval echo configure:18388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18388   rm -rf conftest*
18389   ol_cv_db_db_42=yes
18390 else
18391   echo "configure: failed program was:" >&5
18392   cat conftest.$ac_ext >&5
18393   rm -rf conftest*
18394   ol_cv_db_db_42=no
18395 fi
18396 rm -f conftest*
18397
18398         LIBS="$ol_LIBS"
18399
18400 fi
18401
18402 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18403
18404         if test $ol_cv_db_db_42 = yes ; then
18405                 ol_cv_lib_db=-ldb-42
18406         fi
18407 fi
18408
18409 if test $ol_cv_lib_db = no ; then
18410         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18411 echo "configure:18412: checking for Berkeley DB link (-ldb-4.2)" >&5
18412 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18413   echo $ac_n "(cached) $ac_c" 1>&6
18414 else
18415   
18416         ol_DB_LIB=-ldb-4.2
18417         ol_LIBS=$LIBS
18418         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18419
18420         cat > conftest.$ac_ext <<EOF
18421 #line 18422 "configure"
18422 #include "confdefs.h"
18423
18424 #ifdef HAVE_DB_185_H
18425 # include <db_185.h>
18426 #else
18427 # include <db.h>
18428 #endif
18429
18430 #ifndef DB_VERSION_MAJOR
18431 # define DB_VERSION_MAJOR 1
18432 #endif
18433
18434 #ifndef NULL
18435 #define NULL ((void*)0)
18436 #endif
18437
18438 int main() {
18439
18440 #if DB_VERSION_MAJOR > 1
18441         {
18442                 char *version;
18443                 int major, minor, patch;
18444
18445                 version = db_version( &major, &minor, &patch );
18446
18447                 if( major != DB_VERSION_MAJOR ||
18448                         minor < DB_VERSION_MINOR )
18449                 {
18450                         printf("Berkeley DB version mismatch\n"
18451                                 "\texpected: %s\n\tgot: %s\n",
18452                                 DB_VERSION_STRING, version);
18453                         return 1;
18454                 }
18455         }
18456 #endif
18457
18458 #if DB_VERSION_MAJOR > 2
18459         db_env_create( NULL, 0 );
18460 #elif DB_VERSION_MAJOR > 1
18461         db_appexit( NULL );
18462 #else
18463         (void) dbopen( NULL, 0, 0, 0, NULL);
18464 #endif
18465
18466 ; return 0; }
18467 EOF
18468 if { (eval echo configure:18469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18469   rm -rf conftest*
18470   ol_cv_db_db_4_dot_2=yes
18471 else
18472   echo "configure: failed program was:" >&5
18473   cat conftest.$ac_ext >&5
18474   rm -rf conftest*
18475   ol_cv_db_db_4_dot_2=no
18476 fi
18477 rm -f conftest*
18478
18479         LIBS="$ol_LIBS"
18480
18481 fi
18482
18483 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18484
18485         if test $ol_cv_db_db_4_dot_2 = yes ; then
18486                 ol_cv_lib_db=-ldb-4.2
18487         fi
18488 fi
18489
18490 if test $ol_cv_lib_db = no ; then
18491         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18492 echo "configure:18493: checking for Berkeley DB link (-ldb-4-2)" >&5
18493 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18494   echo $ac_n "(cached) $ac_c" 1>&6
18495 else
18496   
18497         ol_DB_LIB=-ldb-4-2
18498         ol_LIBS=$LIBS
18499         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18500
18501         cat > conftest.$ac_ext <<EOF
18502 #line 18503 "configure"
18503 #include "confdefs.h"
18504
18505 #ifdef HAVE_DB_185_H
18506 # include <db_185.h>
18507 #else
18508 # include <db.h>
18509 #endif
18510
18511 #ifndef DB_VERSION_MAJOR
18512 # define DB_VERSION_MAJOR 1
18513 #endif
18514
18515 #ifndef NULL
18516 #define NULL ((void*)0)
18517 #endif
18518
18519 int main() {
18520
18521 #if DB_VERSION_MAJOR > 1
18522         {
18523                 char *version;
18524                 int major, minor, patch;
18525
18526                 version = db_version( &major, &minor, &patch );
18527
18528                 if( major != DB_VERSION_MAJOR ||
18529                         minor < DB_VERSION_MINOR )
18530                 {
18531                         printf("Berkeley DB version mismatch\n"
18532                                 "\texpected: %s\n\tgot: %s\n",
18533                                 DB_VERSION_STRING, version);
18534                         return 1;
18535                 }
18536         }
18537 #endif
18538
18539 #if DB_VERSION_MAJOR > 2
18540         db_env_create( NULL, 0 );
18541 #elif DB_VERSION_MAJOR > 1
18542         db_appexit( NULL );
18543 #else
18544         (void) dbopen( NULL, 0, 0, 0, NULL);
18545 #endif
18546
18547 ; return 0; }
18548 EOF
18549 if { (eval echo configure:18550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18550   rm -rf conftest*
18551   ol_cv_db_db_4_2=yes
18552 else
18553   echo "configure: failed program was:" >&5
18554   cat conftest.$ac_ext >&5
18555   rm -rf conftest*
18556   ol_cv_db_db_4_2=no
18557 fi
18558 rm -f conftest*
18559
18560         LIBS="$ol_LIBS"
18561
18562 fi
18563
18564 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18565
18566         if test $ol_cv_db_db_4_2 = yes ; then
18567                 ol_cv_lib_db=-ldb-4-2
18568         fi
18569 fi
18570
18571 if test $ol_cv_lib_db = no ; then
18572         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18573 echo "configure:18574: checking for Berkeley DB link (-ldb-4)" >&5
18574 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18575   echo $ac_n "(cached) $ac_c" 1>&6
18576 else
18577   
18578         ol_DB_LIB=-ldb-4
18579         ol_LIBS=$LIBS
18580         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18581
18582         cat > conftest.$ac_ext <<EOF
18583 #line 18584 "configure"
18584 #include "confdefs.h"
18585
18586 #ifdef HAVE_DB_185_H
18587 # include <db_185.h>
18588 #else
18589 # include <db.h>
18590 #endif
18591
18592 #ifndef DB_VERSION_MAJOR
18593 # define DB_VERSION_MAJOR 1
18594 #endif
18595
18596 #ifndef NULL
18597 #define NULL ((void*)0)
18598 #endif
18599
18600 int main() {
18601
18602 #if DB_VERSION_MAJOR > 1
18603         {
18604                 char *version;
18605                 int major, minor, patch;
18606
18607                 version = db_version( &major, &minor, &patch );
18608
18609                 if( major != DB_VERSION_MAJOR ||
18610                         minor < DB_VERSION_MINOR )
18611                 {
18612                         printf("Berkeley DB version mismatch\n"
18613                                 "\texpected: %s\n\tgot: %s\n",
18614                                 DB_VERSION_STRING, version);
18615                         return 1;
18616                 }
18617         }
18618 #endif
18619
18620 #if DB_VERSION_MAJOR > 2
18621         db_env_create( NULL, 0 );
18622 #elif DB_VERSION_MAJOR > 1
18623         db_appexit( NULL );
18624 #else
18625         (void) dbopen( NULL, 0, 0, 0, NULL);
18626 #endif
18627
18628 ; return 0; }
18629 EOF
18630 if { (eval echo configure:18631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18631   rm -rf conftest*
18632   ol_cv_db_db_4=yes
18633 else
18634   echo "configure: failed program was:" >&5
18635   cat conftest.$ac_ext >&5
18636   rm -rf conftest*
18637   ol_cv_db_db_4=no
18638 fi
18639 rm -f conftest*
18640
18641         LIBS="$ol_LIBS"
18642
18643 fi
18644
18645 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18646
18647         if test $ol_cv_db_db_4 = yes ; then
18648                 ol_cv_lib_db=-ldb-4
18649         fi
18650 fi
18651
18652 if test $ol_cv_lib_db = no ; then
18653         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18654 echo "configure:18655: checking for Berkeley DB link (-ldb4)" >&5
18655 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18656   echo $ac_n "(cached) $ac_c" 1>&6
18657 else
18658   
18659         ol_DB_LIB=-ldb4
18660         ol_LIBS=$LIBS
18661         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18662
18663         cat > conftest.$ac_ext <<EOF
18664 #line 18665 "configure"
18665 #include "confdefs.h"
18666
18667 #ifdef HAVE_DB_185_H
18668 # include <db_185.h>
18669 #else
18670 # include <db.h>
18671 #endif
18672
18673 #ifndef DB_VERSION_MAJOR
18674 # define DB_VERSION_MAJOR 1
18675 #endif
18676
18677 #ifndef NULL
18678 #define NULL ((void*)0)
18679 #endif
18680
18681 int main() {
18682
18683 #if DB_VERSION_MAJOR > 1
18684         {
18685                 char *version;
18686                 int major, minor, patch;
18687
18688                 version = db_version( &major, &minor, &patch );
18689
18690                 if( major != DB_VERSION_MAJOR ||
18691                         minor < DB_VERSION_MINOR )
18692                 {
18693                         printf("Berkeley DB version mismatch\n"
18694                                 "\texpected: %s\n\tgot: %s\n",
18695                                 DB_VERSION_STRING, version);
18696                         return 1;
18697                 }
18698         }
18699 #endif
18700
18701 #if DB_VERSION_MAJOR > 2
18702         db_env_create( NULL, 0 );
18703 #elif DB_VERSION_MAJOR > 1
18704         db_appexit( NULL );
18705 #else
18706         (void) dbopen( NULL, 0, 0, 0, NULL);
18707 #endif
18708
18709 ; return 0; }
18710 EOF
18711 if { (eval echo configure:18712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18712   rm -rf conftest*
18713   ol_cv_db_db4=yes
18714 else
18715   echo "configure: failed program was:" >&5
18716   cat conftest.$ac_ext >&5
18717   rm -rf conftest*
18718   ol_cv_db_db4=no
18719 fi
18720 rm -f conftest*
18721
18722         LIBS="$ol_LIBS"
18723
18724 fi
18725
18726 echo "$ac_t""$ol_cv_db_db4" 1>&6
18727
18728         if test $ol_cv_db_db4 = yes ; then
18729                 ol_cv_lib_db=-ldb4
18730         fi
18731 fi
18732
18733 if test $ol_cv_lib_db = no ; then
18734         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18735 echo "configure:18736: checking for Berkeley DB link (-ldb)" >&5
18736 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18737   echo $ac_n "(cached) $ac_c" 1>&6
18738 else
18739   
18740         ol_DB_LIB=-ldb
18741         ol_LIBS=$LIBS
18742         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18743
18744         cat > conftest.$ac_ext <<EOF
18745 #line 18746 "configure"
18746 #include "confdefs.h"
18747
18748 #ifdef HAVE_DB_185_H
18749 # include <db_185.h>
18750 #else
18751 # include <db.h>
18752 #endif
18753
18754 #ifndef DB_VERSION_MAJOR
18755 # define DB_VERSION_MAJOR 1
18756 #endif
18757
18758 #ifndef NULL
18759 #define NULL ((void*)0)
18760 #endif
18761
18762 int main() {
18763
18764 #if DB_VERSION_MAJOR > 1
18765         {
18766                 char *version;
18767                 int major, minor, patch;
18768
18769                 version = db_version( &major, &minor, &patch );
18770
18771                 if( major != DB_VERSION_MAJOR ||
18772                         minor < DB_VERSION_MINOR )
18773                 {
18774                         printf("Berkeley DB version mismatch\n"
18775                                 "\texpected: %s\n\tgot: %s\n",
18776                                 DB_VERSION_STRING, version);
18777                         return 1;
18778                 }
18779         }
18780 #endif
18781
18782 #if DB_VERSION_MAJOR > 2
18783         db_env_create( NULL, 0 );
18784 #elif DB_VERSION_MAJOR > 1
18785         db_appexit( NULL );
18786 #else
18787         (void) dbopen( NULL, 0, 0, 0, NULL);
18788 #endif
18789
18790 ; return 0; }
18791 EOF
18792 if { (eval echo configure:18793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18793   rm -rf conftest*
18794   ol_cv_db_db=yes
18795 else
18796   echo "configure: failed program was:" >&5
18797   cat conftest.$ac_ext >&5
18798   rm -rf conftest*
18799   ol_cv_db_db=no
18800 fi
18801 rm -f conftest*
18802
18803         LIBS="$ol_LIBS"
18804
18805 fi
18806
18807 echo "$ac_t""$ol_cv_db_db" 1>&6
18808
18809         if test $ol_cv_db_db = yes ; then
18810                 ol_cv_lib_db=-ldb
18811         fi
18812 fi
18813
18814 if test $ol_cv_lib_db = no ; then
18815         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18816 echo "configure:18817: checking for Berkeley DB link (-ldb41)" >&5
18817 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18818   echo $ac_n "(cached) $ac_c" 1>&6
18819 else
18820   
18821         ol_DB_LIB=-ldb41
18822         ol_LIBS=$LIBS
18823         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18824
18825         cat > conftest.$ac_ext <<EOF
18826 #line 18827 "configure"
18827 #include "confdefs.h"
18828
18829 #ifdef HAVE_DB_185_H
18830 # include <db_185.h>
18831 #else
18832 # include <db.h>
18833 #endif
18834
18835 #ifndef DB_VERSION_MAJOR
18836 # define DB_VERSION_MAJOR 1
18837 #endif
18838
18839 #ifndef NULL
18840 #define NULL ((void*)0)
18841 #endif
18842
18843 int main() {
18844
18845 #if DB_VERSION_MAJOR > 1
18846         {
18847                 char *version;
18848                 int major, minor, patch;
18849
18850                 version = db_version( &major, &minor, &patch );
18851
18852                 if( major != DB_VERSION_MAJOR ||
18853                         minor < DB_VERSION_MINOR )
18854                 {
18855                         printf("Berkeley DB version mismatch\n"
18856                                 "\texpected: %s\n\tgot: %s\n",
18857                                 DB_VERSION_STRING, version);
18858                         return 1;
18859                 }
18860         }
18861 #endif
18862
18863 #if DB_VERSION_MAJOR > 2
18864         db_env_create( NULL, 0 );
18865 #elif DB_VERSION_MAJOR > 1
18866         db_appexit( NULL );
18867 #else
18868         (void) dbopen( NULL, 0, 0, 0, NULL);
18869 #endif
18870
18871 ; return 0; }
18872 EOF
18873 if { (eval echo configure:18874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18874   rm -rf conftest*
18875   ol_cv_db_db41=yes
18876 else
18877   echo "configure: failed program was:" >&5
18878   cat conftest.$ac_ext >&5
18879   rm -rf conftest*
18880   ol_cv_db_db41=no
18881 fi
18882 rm -f conftest*
18883
18884         LIBS="$ol_LIBS"
18885
18886 fi
18887
18888 echo "$ac_t""$ol_cv_db_db41" 1>&6
18889
18890         if test $ol_cv_db_db41 = yes ; then
18891                 ol_cv_lib_db=-ldb41
18892         fi
18893 fi
18894
18895 if test $ol_cv_lib_db = no ; then
18896         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18897 echo "configure:18898: checking for Berkeley DB link (-ldb-41)" >&5
18898 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18899   echo $ac_n "(cached) $ac_c" 1>&6
18900 else
18901   
18902         ol_DB_LIB=-ldb-41
18903         ol_LIBS=$LIBS
18904         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18905
18906         cat > conftest.$ac_ext <<EOF
18907 #line 18908 "configure"
18908 #include "confdefs.h"
18909
18910 #ifdef HAVE_DB_185_H
18911 # include <db_185.h>
18912 #else
18913 # include <db.h>
18914 #endif
18915
18916 #ifndef DB_VERSION_MAJOR
18917 # define DB_VERSION_MAJOR 1
18918 #endif
18919
18920 #ifndef NULL
18921 #define NULL ((void*)0)
18922 #endif
18923
18924 int main() {
18925
18926 #if DB_VERSION_MAJOR > 1
18927         {
18928                 char *version;
18929                 int major, minor, patch;
18930
18931                 version = db_version( &major, &minor, &patch );
18932
18933                 if( major != DB_VERSION_MAJOR ||
18934                         minor < DB_VERSION_MINOR )
18935                 {
18936                         printf("Berkeley DB version mismatch\n"
18937                                 "\texpected: %s\n\tgot: %s\n",
18938                                 DB_VERSION_STRING, version);
18939                         return 1;
18940                 }
18941         }
18942 #endif
18943
18944 #if DB_VERSION_MAJOR > 2
18945         db_env_create( NULL, 0 );
18946 #elif DB_VERSION_MAJOR > 1
18947         db_appexit( NULL );
18948 #else
18949         (void) dbopen( NULL, 0, 0, 0, NULL);
18950 #endif
18951
18952 ; return 0; }
18953 EOF
18954 if { (eval echo configure:18955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18955   rm -rf conftest*
18956   ol_cv_db_db_41=yes
18957 else
18958   echo "configure: failed program was:" >&5
18959   cat conftest.$ac_ext >&5
18960   rm -rf conftest*
18961   ol_cv_db_db_41=no
18962 fi
18963 rm -f conftest*
18964
18965         LIBS="$ol_LIBS"
18966
18967 fi
18968
18969 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18970
18971         if test $ol_cv_db_db_41 = yes ; then
18972                 ol_cv_lib_db=-ldb-41
18973         fi
18974 fi
18975
18976 if test $ol_cv_lib_db = no ; then
18977         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18978 echo "configure:18979: checking for Berkeley DB link (-ldb-4.1)" >&5
18979 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18980   echo $ac_n "(cached) $ac_c" 1>&6
18981 else
18982   
18983         ol_DB_LIB=-ldb-4.1
18984         ol_LIBS=$LIBS
18985         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18986
18987         cat > conftest.$ac_ext <<EOF
18988 #line 18989 "configure"
18989 #include "confdefs.h"
18990
18991 #ifdef HAVE_DB_185_H
18992 # include <db_185.h>
18993 #else
18994 # include <db.h>
18995 #endif
18996
18997 #ifndef DB_VERSION_MAJOR
18998 # define DB_VERSION_MAJOR 1
18999 #endif
19000
19001 #ifndef NULL
19002 #define NULL ((void*)0)
19003 #endif
19004
19005 int main() {
19006
19007 #if DB_VERSION_MAJOR > 1
19008         {
19009                 char *version;
19010                 int major, minor, patch;
19011
19012                 version = db_version( &major, &minor, &patch );
19013
19014                 if( major != DB_VERSION_MAJOR ||
19015                         minor < DB_VERSION_MINOR )
19016                 {
19017                         printf("Berkeley DB version mismatch\n"
19018                                 "\texpected: %s\n\tgot: %s\n",
19019                                 DB_VERSION_STRING, version);
19020                         return 1;
19021                 }
19022         }
19023 #endif
19024
19025 #if DB_VERSION_MAJOR > 2
19026         db_env_create( NULL, 0 );
19027 #elif DB_VERSION_MAJOR > 1
19028         db_appexit( NULL );
19029 #else
19030         (void) dbopen( NULL, 0, 0, 0, NULL);
19031 #endif
19032
19033 ; return 0; }
19034 EOF
19035 if { (eval echo configure:19036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19036   rm -rf conftest*
19037   ol_cv_db_db_4_dot_1=yes
19038 else
19039   echo "configure: failed program was:" >&5
19040   cat conftest.$ac_ext >&5
19041   rm -rf conftest*
19042   ol_cv_db_db_4_dot_1=no
19043 fi
19044 rm -f conftest*
19045
19046         LIBS="$ol_LIBS"
19047
19048 fi
19049
19050 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19051
19052         if test $ol_cv_db_db_4_dot_1 = yes ; then
19053                 ol_cv_lib_db=-ldb-4.1
19054         fi
19055 fi
19056
19057 if test $ol_cv_lib_db = no ; then
19058         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19059 echo "configure:19060: checking for Berkeley DB link (-ldb-4-1)" >&5
19060 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19061   echo $ac_n "(cached) $ac_c" 1>&6
19062 else
19063   
19064         ol_DB_LIB=-ldb-4-1
19065         ol_LIBS=$LIBS
19066         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19067
19068         cat > conftest.$ac_ext <<EOF
19069 #line 19070 "configure"
19070 #include "confdefs.h"
19071
19072 #ifdef HAVE_DB_185_H
19073 # include <db_185.h>
19074 #else
19075 # include <db.h>
19076 #endif
19077
19078 #ifndef DB_VERSION_MAJOR
19079 # define DB_VERSION_MAJOR 1
19080 #endif
19081
19082 #ifndef NULL
19083 #define NULL ((void*)0)
19084 #endif
19085
19086 int main() {
19087
19088 #if DB_VERSION_MAJOR > 1
19089         {
19090                 char *version;
19091                 int major, minor, patch;
19092
19093                 version = db_version( &major, &minor, &patch );
19094
19095                 if( major != DB_VERSION_MAJOR ||
19096                         minor < DB_VERSION_MINOR )
19097                 {
19098                         printf("Berkeley DB version mismatch\n"
19099                                 "\texpected: %s\n\tgot: %s\n",
19100                                 DB_VERSION_STRING, version);
19101                         return 1;
19102                 }
19103         }
19104 #endif
19105
19106 #if DB_VERSION_MAJOR > 2
19107         db_env_create( NULL, 0 );
19108 #elif DB_VERSION_MAJOR > 1
19109         db_appexit( NULL );
19110 #else
19111         (void) dbopen( NULL, 0, 0, 0, NULL);
19112 #endif
19113
19114 ; return 0; }
19115 EOF
19116 if { (eval echo configure:19117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19117   rm -rf conftest*
19118   ol_cv_db_db_4_1=yes
19119 else
19120   echo "configure: failed program was:" >&5
19121   cat conftest.$ac_ext >&5
19122   rm -rf conftest*
19123   ol_cv_db_db_4_1=no
19124 fi
19125 rm -f conftest*
19126
19127         LIBS="$ol_LIBS"
19128
19129 fi
19130
19131 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19132
19133         if test $ol_cv_db_db_4_1 = yes ; then
19134                 ol_cv_lib_db=-ldb-4-1
19135         fi
19136 fi
19137
19138 if test $ol_cv_lib_db = no ; then
19139         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19140 echo "configure:19141: checking for Berkeley DB link (-ldb3)" >&5
19141 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19142   echo $ac_n "(cached) $ac_c" 1>&6
19143 else
19144   
19145         ol_DB_LIB=-ldb3
19146         ol_LIBS=$LIBS
19147         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19148
19149         cat > conftest.$ac_ext <<EOF
19150 #line 19151 "configure"
19151 #include "confdefs.h"
19152
19153 #ifdef HAVE_DB_185_H
19154 # include <db_185.h>
19155 #else
19156 # include <db.h>
19157 #endif
19158
19159 #ifndef DB_VERSION_MAJOR
19160 # define DB_VERSION_MAJOR 1
19161 #endif
19162
19163 #ifndef NULL
19164 #define NULL ((void*)0)
19165 #endif
19166
19167 int main() {
19168
19169 #if DB_VERSION_MAJOR > 1
19170         {
19171                 char *version;
19172                 int major, minor, patch;
19173
19174                 version = db_version( &major, &minor, &patch );
19175
19176                 if( major != DB_VERSION_MAJOR ||
19177                         minor < DB_VERSION_MINOR )
19178                 {
19179                         printf("Berkeley DB version mismatch\n"
19180                                 "\texpected: %s\n\tgot: %s\n",
19181                                 DB_VERSION_STRING, version);
19182                         return 1;
19183                 }
19184         }
19185 #endif
19186
19187 #if DB_VERSION_MAJOR > 2
19188         db_env_create( NULL, 0 );
19189 #elif DB_VERSION_MAJOR > 1
19190         db_appexit( NULL );
19191 #else
19192         (void) dbopen( NULL, 0, 0, 0, NULL);
19193 #endif
19194
19195 ; return 0; }
19196 EOF
19197 if { (eval echo configure:19198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19198   rm -rf conftest*
19199   ol_cv_db_db3=yes
19200 else
19201   echo "configure: failed program was:" >&5
19202   cat conftest.$ac_ext >&5
19203   rm -rf conftest*
19204   ol_cv_db_db3=no
19205 fi
19206 rm -f conftest*
19207
19208         LIBS="$ol_LIBS"
19209
19210 fi
19211
19212 echo "$ac_t""$ol_cv_db_db3" 1>&6
19213
19214         if test $ol_cv_db_db3 = yes ; then
19215                 ol_cv_lib_db=-ldb3
19216         fi
19217 fi
19218
19219 if test $ol_cv_lib_db = no ; then
19220         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19221 echo "configure:19222: checking for Berkeley DB link (-ldb-3)" >&5
19222 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19223   echo $ac_n "(cached) $ac_c" 1>&6
19224 else
19225   
19226         ol_DB_LIB=-ldb-3
19227         ol_LIBS=$LIBS
19228         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19229
19230         cat > conftest.$ac_ext <<EOF
19231 #line 19232 "configure"
19232 #include "confdefs.h"
19233
19234 #ifdef HAVE_DB_185_H
19235 # include <db_185.h>
19236 #else
19237 # include <db.h>
19238 #endif
19239
19240 #ifndef DB_VERSION_MAJOR
19241 # define DB_VERSION_MAJOR 1
19242 #endif
19243
19244 #ifndef NULL
19245 #define NULL ((void*)0)
19246 #endif
19247
19248 int main() {
19249
19250 #if DB_VERSION_MAJOR > 1
19251         {
19252                 char *version;
19253                 int major, minor, patch;
19254
19255                 version = db_version( &major, &minor, &patch );
19256
19257                 if( major != DB_VERSION_MAJOR ||
19258                         minor < DB_VERSION_MINOR )
19259                 {
19260                         printf("Berkeley DB version mismatch\n"
19261                                 "\texpected: %s\n\tgot: %s\n",
19262                                 DB_VERSION_STRING, version);
19263                         return 1;
19264                 }
19265         }
19266 #endif
19267
19268 #if DB_VERSION_MAJOR > 2
19269         db_env_create( NULL, 0 );
19270 #elif DB_VERSION_MAJOR > 1
19271         db_appexit( NULL );
19272 #else
19273         (void) dbopen( NULL, 0, 0, 0, NULL);
19274 #endif
19275
19276 ; return 0; }
19277 EOF
19278 if { (eval echo configure:19279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19279   rm -rf conftest*
19280   ol_cv_db_db_3=yes
19281 else
19282   echo "configure: failed program was:" >&5
19283   cat conftest.$ac_ext >&5
19284   rm -rf conftest*
19285   ol_cv_db_db_3=no
19286 fi
19287 rm -f conftest*
19288
19289         LIBS="$ol_LIBS"
19290
19291 fi
19292
19293 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19294
19295         if test $ol_cv_db_db_3 = yes ; then
19296                 ol_cv_lib_db=-ldb-3
19297         fi
19298 fi
19299
19300 if test $ol_cv_lib_db = no ; then
19301         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19302 echo "configure:19303: checking for Berkeley DB link (-ldb2)" >&5
19303 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19304   echo $ac_n "(cached) $ac_c" 1>&6
19305 else
19306   
19307         ol_DB_LIB=-ldb2
19308         ol_LIBS=$LIBS
19309         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19310
19311         cat > conftest.$ac_ext <<EOF
19312 #line 19313 "configure"
19313 #include "confdefs.h"
19314
19315 #ifdef HAVE_DB_185_H
19316 # include <db_185.h>
19317 #else
19318 # include <db.h>
19319 #endif
19320
19321 #ifndef DB_VERSION_MAJOR
19322 # define DB_VERSION_MAJOR 1
19323 #endif
19324
19325 #ifndef NULL
19326 #define NULL ((void*)0)
19327 #endif
19328
19329 int main() {
19330
19331 #if DB_VERSION_MAJOR > 1
19332         {
19333                 char *version;
19334                 int major, minor, patch;
19335
19336                 version = db_version( &major, &minor, &patch );
19337
19338                 if( major != DB_VERSION_MAJOR ||
19339                         minor < DB_VERSION_MINOR )
19340                 {
19341                         printf("Berkeley DB version mismatch\n"
19342                                 "\texpected: %s\n\tgot: %s\n",
19343                                 DB_VERSION_STRING, version);
19344                         return 1;
19345                 }
19346         }
19347 #endif
19348
19349 #if DB_VERSION_MAJOR > 2
19350         db_env_create( NULL, 0 );
19351 #elif DB_VERSION_MAJOR > 1
19352         db_appexit( NULL );
19353 #else
19354         (void) dbopen( NULL, 0, 0, 0, NULL);
19355 #endif
19356
19357 ; return 0; }
19358 EOF
19359 if { (eval echo configure:19360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19360   rm -rf conftest*
19361   ol_cv_db_db2=yes
19362 else
19363   echo "configure: failed program was:" >&5
19364   cat conftest.$ac_ext >&5
19365   rm -rf conftest*
19366   ol_cv_db_db2=no
19367 fi
19368 rm -f conftest*
19369
19370         LIBS="$ol_LIBS"
19371
19372 fi
19373
19374 echo "$ac_t""$ol_cv_db_db2" 1>&6
19375
19376         if test $ol_cv_db_db2 = yes ; then
19377                 ol_cv_lib_db=-ldb2
19378         fi
19379 fi
19380
19381 if test $ol_cv_lib_db = no ; then
19382         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19383 echo "configure:19384: checking for Berkeley DB link (-ldb-2)" >&5
19384 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19385   echo $ac_n "(cached) $ac_c" 1>&6
19386 else
19387   
19388         ol_DB_LIB=-ldb-2
19389         ol_LIBS=$LIBS
19390         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19391
19392         cat > conftest.$ac_ext <<EOF
19393 #line 19394 "configure"
19394 #include "confdefs.h"
19395
19396 #ifdef HAVE_DB_185_H
19397 # include <db_185.h>
19398 #else
19399 # include <db.h>
19400 #endif
19401
19402 #ifndef DB_VERSION_MAJOR
19403 # define DB_VERSION_MAJOR 1
19404 #endif
19405
19406 #ifndef NULL
19407 #define NULL ((void*)0)
19408 #endif
19409
19410 int main() {
19411
19412 #if DB_VERSION_MAJOR > 1
19413         {
19414                 char *version;
19415                 int major, minor, patch;
19416
19417                 version = db_version( &major, &minor, &patch );
19418
19419                 if( major != DB_VERSION_MAJOR ||
19420                         minor < DB_VERSION_MINOR )
19421                 {
19422                         printf("Berkeley DB version mismatch\n"
19423                                 "\texpected: %s\n\tgot: %s\n",
19424                                 DB_VERSION_STRING, version);
19425                         return 1;
19426                 }
19427         }
19428 #endif
19429
19430 #if DB_VERSION_MAJOR > 2
19431         db_env_create( NULL, 0 );
19432 #elif DB_VERSION_MAJOR > 1
19433         db_appexit( NULL );
19434 #else
19435         (void) dbopen( NULL, 0, 0, 0, NULL);
19436 #endif
19437
19438 ; return 0; }
19439 EOF
19440 if { (eval echo configure:19441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19441   rm -rf conftest*
19442   ol_cv_db_db_2=yes
19443 else
19444   echo "configure: failed program was:" >&5
19445   cat conftest.$ac_ext >&5
19446   rm -rf conftest*
19447   ol_cv_db_db_2=no
19448 fi
19449 rm -f conftest*
19450
19451         LIBS="$ol_LIBS"
19452
19453 fi
19454
19455 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19456
19457         if test $ol_cv_db_db_2 = yes ; then
19458                 ol_cv_lib_db=-ldb-2
19459         fi
19460 fi
19461
19462 if test $ol_cv_lib_db = no ; then
19463         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19464 echo "configure:19465: checking for Berkeley DB link (-ldb1)" >&5
19465 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19466   echo $ac_n "(cached) $ac_c" 1>&6
19467 else
19468   
19469         ol_DB_LIB=-ldb1
19470         ol_LIBS=$LIBS
19471         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19472
19473         cat > conftest.$ac_ext <<EOF
19474 #line 19475 "configure"
19475 #include "confdefs.h"
19476
19477 #ifdef HAVE_DB_185_H
19478 # include <db_185.h>
19479 #else
19480 # include <db.h>
19481 #endif
19482
19483 #ifndef DB_VERSION_MAJOR
19484 # define DB_VERSION_MAJOR 1
19485 #endif
19486
19487 #ifndef NULL
19488 #define NULL ((void*)0)
19489 #endif
19490
19491 int main() {
19492
19493 #if DB_VERSION_MAJOR > 1
19494         {
19495                 char *version;
19496                 int major, minor, patch;
19497
19498                 version = db_version( &major, &minor, &patch );
19499
19500                 if( major != DB_VERSION_MAJOR ||
19501                         minor < DB_VERSION_MINOR )
19502                 {
19503                         printf("Berkeley DB version mismatch\n"
19504                                 "\texpected: %s\n\tgot: %s\n",
19505                                 DB_VERSION_STRING, version);
19506                         return 1;
19507                 }
19508         }
19509 #endif
19510
19511 #if DB_VERSION_MAJOR > 2
19512         db_env_create( NULL, 0 );
19513 #elif DB_VERSION_MAJOR > 1
19514         db_appexit( NULL );
19515 #else
19516         (void) dbopen( NULL, 0, 0, 0, NULL);
19517 #endif
19518
19519 ; return 0; }
19520 EOF
19521 if { (eval echo configure:19522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19522   rm -rf conftest*
19523   ol_cv_db_db1=yes
19524 else
19525   echo "configure: failed program was:" >&5
19526   cat conftest.$ac_ext >&5
19527   rm -rf conftest*
19528   ol_cv_db_db1=no
19529 fi
19530 rm -f conftest*
19531
19532         LIBS="$ol_LIBS"
19533
19534 fi
19535
19536 echo "$ac_t""$ol_cv_db_db1" 1>&6
19537
19538         if test $ol_cv_db_db1 = yes ; then
19539                 ol_cv_lib_db=-ldb1
19540         fi
19541 fi
19542
19543 if test $ol_cv_lib_db = no ; then
19544         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19545 echo "configure:19546: checking for Berkeley DB link (-ldb-1)" >&5
19546 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19547   echo $ac_n "(cached) $ac_c" 1>&6
19548 else
19549   
19550         ol_DB_LIB=-ldb-1
19551         ol_LIBS=$LIBS
19552         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19553
19554         cat > conftest.$ac_ext <<EOF
19555 #line 19556 "configure"
19556 #include "confdefs.h"
19557
19558 #ifdef HAVE_DB_185_H
19559 # include <db_185.h>
19560 #else
19561 # include <db.h>
19562 #endif
19563
19564 #ifndef DB_VERSION_MAJOR
19565 # define DB_VERSION_MAJOR 1
19566 #endif
19567
19568 #ifndef NULL
19569 #define NULL ((void*)0)
19570 #endif
19571
19572 int main() {
19573
19574 #if DB_VERSION_MAJOR > 1
19575         {
19576                 char *version;
19577                 int major, minor, patch;
19578
19579                 version = db_version( &major, &minor, &patch );
19580
19581                 if( major != DB_VERSION_MAJOR ||
19582                         minor < DB_VERSION_MINOR )
19583                 {
19584                         printf("Berkeley DB version mismatch\n"
19585                                 "\texpected: %s\n\tgot: %s\n",
19586                                 DB_VERSION_STRING, version);
19587                         return 1;
19588                 }
19589         }
19590 #endif
19591
19592 #if DB_VERSION_MAJOR > 2
19593         db_env_create( NULL, 0 );
19594 #elif DB_VERSION_MAJOR > 1
19595         db_appexit( NULL );
19596 #else
19597         (void) dbopen( NULL, 0, 0, 0, NULL);
19598 #endif
19599
19600 ; return 0; }
19601 EOF
19602 if { (eval echo configure:19603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19603   rm -rf conftest*
19604   ol_cv_db_db_1=yes
19605 else
19606   echo "configure: failed program was:" >&5
19607   cat conftest.$ac_ext >&5
19608   rm -rf conftest*
19609   ol_cv_db_db_1=no
19610 fi
19611 rm -f conftest*
19612
19613         LIBS="$ol_LIBS"
19614
19615 fi
19616
19617 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19618
19619         if test $ol_cv_db_db_1 = yes ; then
19620                 ol_cv_lib_db=-ldb-1
19621         fi
19622 fi
19623
19624
19625         if test "$ol_cv_lib_db" != no ; then
19626                 ol_cv_berkeley_db=yes
19627                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19628 echo "configure:19629: checking for Berkeley DB thread support" >&5
19629 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19630   echo $ac_n "(cached) $ac_c" 1>&6
19631 else
19632   
19633         ol_LIBS="$LIBS"
19634         LIBS="$LTHREAD_LIBS $LIBS"
19635         if test $ol_cv_lib_db != yes ; then
19636                 LIBS="$ol_cv_lib_db $LIBS"
19637         fi
19638
19639         if test "$cross_compiling" = yes; then
19640   ol_cv_berkeley_db_thread=cross
19641 else
19642   cat > conftest.$ac_ext <<EOF
19643 #line 19644 "configure"
19644 #include "confdefs.h"
19645
19646 #ifdef HAVE_DB_185_H
19647         choke me;
19648 #else
19649 #include <db.h>
19650 #endif
19651 #ifndef NULL
19652 #define NULL ((void *)0)
19653 #endif
19654 main()
19655 {
19656         int rc;
19657         u_int32_t flags = DB_CREATE |
19658 #ifdef DB_PRIVATE
19659                 DB_PRIVATE |
19660 #endif
19661                 DB_THREAD;
19662
19663 #if DB_VERSION_MAJOR > 2
19664         DB_ENV *env = NULL;
19665
19666         rc = db_env_create( &env, 0 );
19667
19668         flags |= DB_INIT_MPOOL;
19669 #ifdef DB_MPOOL_PRIVATE
19670         flags |= DB_MPOOL_PRIVATE;
19671 #endif
19672
19673         if( rc ) {
19674                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19675                 return rc;
19676         }
19677
19678 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19679         rc = env->open( env, NULL, flags, 0 );
19680 #else
19681         rc = env->open( env, NULL, NULL, flags, 0 );
19682 #endif
19683
19684         if ( rc == 0 ) {
19685                 rc = env->close( env, 0 );
19686         }
19687
19688         if( rc ) {
19689                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19690                 return rc;
19691         }
19692
19693 #else
19694         DB_ENV env;
19695         memset( &env, '\0', sizeof(env) );
19696
19697         rc = db_appinit( NULL, NULL, &env, flags );
19698
19699         if( rc == 0 ) {
19700                 db_appexit( &env );
19701         }
19702
19703         unlink("__db_mpool.share");
19704         unlink("__db_lock.share");
19705 #endif
19706
19707         return rc;
19708 }
19709 EOF
19710 if { (eval echo configure:19711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19711 then
19712   ol_cv_berkeley_db_thread=yes
19713 else
19714   echo "configure: failed program was:" >&5
19715   cat conftest.$ac_ext >&5
19716   rm -fr conftest*
19717   ol_cv_berkeley_db_thread=no
19718 fi
19719 rm -fr conftest*
19720 fi
19721
19722
19723         LIBS="$ol_LIBS"
19724
19725 fi
19726
19727 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19728
19729         if test $ol_cv_berkeley_db_thread != no ; then
19730                 cat >> confdefs.h <<\EOF
19731 #define HAVE_BERKELEY_DB_THREAD 1
19732 EOF
19733
19734         fi
19735
19736         fi
19737 fi
19738
19739         fi
19740
19741         if test $ol_cv_berkeley_db != no ; then
19742                 cat >> confdefs.h <<\EOF
19743 #define HAVE_BERKELEY_DB 1
19744 EOF
19745
19746
19747                 ol_link_ldbm=berkeley
19748                 ol_with_ldbm_api=berkeley
19749
19750                 if test $ol_with_ldbm_type = hash ; then
19751                         cat >> confdefs.h <<\EOF
19752 #define LDBM_USE_DBHASH 1
19753 EOF
19754
19755                 else
19756                         cat >> confdefs.h <<\EOF
19757 #define LDBM_USE_DBBTREE 1
19758 EOF
19759
19760                 fi
19761
19762                                                 if test $ol_cv_lib_db != yes ; then
19763                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19764                 fi
19765         fi
19766 fi
19767
19768 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19769         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19770 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19771         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19772 echo "configure:19773: checking Berkeley DB version for BDB backend" >&5
19773 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19774   echo $ac_n "(cached) $ac_c" 1>&6
19775 else
19776   
19777         cat > conftest.$ac_ext <<EOF
19778 #line 19779 "configure"
19779 #include "confdefs.h"
19780
19781 #include <db.h>
19782
19783  /* this check could be improved */
19784 #ifndef DB_VERSION_MAJOR
19785 #       define DB_VERSION_MAJOR 1
19786 #endif
19787 #ifndef DB_VERSION_MINOR
19788 #       define DB_VERSION_MINOR 0
19789 #endif
19790
19791 /* require 4.2 or later */
19792 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19793         __db_version_compat
19794 #endif
19795         
19796 EOF
19797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19798   egrep "__db_version_compat" >/dev/null 2>&1; then
19799   rm -rf conftest*
19800   ol_cv_bdb_compat=yes
19801 else
19802   rm -rf conftest*
19803   ol_cv_bdb_compat=no
19804 fi
19805 rm -f conftest*
19806
19807 fi
19808
19809 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19810
19811
19812         if test $ol_cv_bdb_compat = yes ; then
19813                 ol_enable_bdb=yes
19814         elif test $ol_enable_bdb = yes ; then
19815                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19816         else
19817                 ol_enable_bdb=no
19818         fi
19819 fi
19820 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19821         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19822 fi
19823
19824 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19825         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19826         ol_with_ldbm_api=none
19827 fi
19828
19829 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19830         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19831 echo "configure:19832: checking for MDBM library" >&5
19832 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19833   echo $ac_n "(cached) $ac_c" 1>&6
19834 else
19835         ol_LIBS="$LIBS"
19836         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19837 echo "configure:19838: checking for mdbm_set_chain" >&5
19838 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19839   echo $ac_n "(cached) $ac_c" 1>&6
19840 else
19841   cat > conftest.$ac_ext <<EOF
19842 #line 19843 "configure"
19843 #include "confdefs.h"
19844 /* System header to define __stub macros and hopefully few prototypes,
19845     which can conflict with char mdbm_set_chain(); below.  */
19846 #include <assert.h>
19847 /* Override any gcc2 internal prototype to avoid an error.  */
19848 /* We use char because int might match the return type of a gcc2
19849     builtin and then its argument prototype would still apply.  */
19850 char mdbm_set_chain();
19851 char (*f)();
19852
19853 int main() {
19854
19855 /* The GNU C library defines this for functions which it implements
19856     to always fail with ENOSYS.  Some functions are actually named
19857     something starting with __ and the normal name is an alias.  */
19858 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19859 choke me
19860 #else
19861 f = mdbm_set_chain;
19862 #endif
19863
19864 ; return 0; }
19865 EOF
19866 if { (eval echo configure:19867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19867   rm -rf conftest*
19868   eval "ac_cv_func_mdbm_set_chain=yes"
19869 else
19870   echo "configure: failed program was:" >&5
19871   cat conftest.$ac_ext >&5
19872   rm -rf conftest*
19873   eval "ac_cv_func_mdbm_set_chain=no"
19874 fi
19875 rm -f conftest*
19876 fi
19877
19878 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19879   echo "$ac_t""yes" 1>&6
19880   ol_cv_lib_mdbm=yes
19881 else
19882   echo "$ac_t""no" 1>&6
19883
19884                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19885 echo "configure:19886: checking for mdbm_set_chain in -lmdbm" >&5
19886 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19887 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19888   echo $ac_n "(cached) $ac_c" 1>&6
19889 else
19890   ac_save_LIBS="$LIBS"
19891 LIBS="-lmdbm  $LIBS"
19892 cat > conftest.$ac_ext <<EOF
19893 #line 19894 "configure"
19894 #include "confdefs.h"
19895 /* Override any gcc2 internal prototype to avoid an error.  */
19896 /* We use char because int might match the return type of a gcc2
19897     builtin and then its argument prototype would still apply.  */
19898 char mdbm_set_chain();
19899
19900 int main() {
19901 mdbm_set_chain()
19902 ; return 0; }
19903 EOF
19904 if { (eval echo configure:19905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19905   rm -rf conftest*
19906   eval "ac_cv_lib_$ac_lib_var=yes"
19907 else
19908   echo "configure: failed program was:" >&5
19909   cat conftest.$ac_ext >&5
19910   rm -rf conftest*
19911   eval "ac_cv_lib_$ac_lib_var=no"
19912 fi
19913 rm -f conftest*
19914 LIBS="$ac_save_LIBS"
19915
19916 fi
19917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19918   echo "$ac_t""yes" 1>&6
19919   ol_cv_lib_mdbm=-lmdbm
19920 else
19921   echo "$ac_t""no" 1>&6
19922 ol_cv_lib_mdbm=no
19923 fi
19924
19925         
19926 fi
19927
19928         LIBS="$ol_LIBS"
19929
19930 fi
19931
19932 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19933
19934
19935  for ac_hdr in mdbm.h
19936 do
19937 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19938 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19939 echo "configure:19940: checking for $ac_hdr" >&5
19940 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19941   echo $ac_n "(cached) $ac_c" 1>&6
19942 else
19943   cat > conftest.$ac_ext <<EOF
19944 #line 19945 "configure"
19945 #include "confdefs.h"
19946 #include <$ac_hdr>
19947 EOF
19948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19949 { (eval echo configure:19950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19951 if test -z "$ac_err"; then
19952   rm -rf conftest*
19953   eval "ac_cv_header_$ac_safe=yes"
19954 else
19955   echo "$ac_err" >&5
19956   echo "configure: failed program was:" >&5
19957   cat conftest.$ac_ext >&5
19958   rm -rf conftest*
19959   eval "ac_cv_header_$ac_safe=no"
19960 fi
19961 rm -f conftest*
19962 fi
19963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19964   echo "$ac_t""yes" 1>&6
19965     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19966   cat >> confdefs.h <<EOF
19967 #define $ac_tr_hdr 1
19968 EOF
19969  
19970 else
19971   echo "$ac_t""no" 1>&6
19972 fi
19973 done
19974
19975  echo $ac_n "checking for db""... $ac_c" 1>&6
19976 echo "configure:19977: checking for db" >&5
19977 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19978   echo $ac_n "(cached) $ac_c" 1>&6
19979 else
19980   
19981         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19982                 ol_cv_mdbm=no
19983         else
19984                 ol_cv_mdbm=yes
19985         fi
19986
19987 fi
19988
19989 echo "$ac_t""$ol_cv_mdbm" 1>&6
19990  if test $ol_cv_mdbm = yes ; then
19991         cat >> confdefs.h <<\EOF
19992 #define HAVE_MDBM 1
19993 EOF
19994
19995  fi
19996
19997
19998         if test $ol_cv_mdbm = yes ; then
19999                 ol_link_ldbm=mdbm
20000                 ol_with_ldbm_api=mdbm
20001                 if test $ol_cv_lib_mdbm != yes ; then
20002                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20003                 fi
20004         fi
20005 fi
20006
20007 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20008         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20009 echo "configure:20010: checking for GDBM library" >&5
20010 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20011   echo $ac_n "(cached) $ac_c" 1>&6
20012 else
20013         ol_LIBS="$LIBS"
20014         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20015 echo "configure:20016: checking for gdbm_open" >&5
20016 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20017   echo $ac_n "(cached) $ac_c" 1>&6
20018 else
20019   cat > conftest.$ac_ext <<EOF
20020 #line 20021 "configure"
20021 #include "confdefs.h"
20022 /* System header to define __stub macros and hopefully few prototypes,
20023     which can conflict with char gdbm_open(); below.  */
20024 #include <assert.h>
20025 /* Override any gcc2 internal prototype to avoid an error.  */
20026 /* We use char because int might match the return type of a gcc2
20027     builtin and then its argument prototype would still apply.  */
20028 char gdbm_open();
20029 char (*f)();
20030
20031 int main() {
20032
20033 /* The GNU C library defines this for functions which it implements
20034     to always fail with ENOSYS.  Some functions are actually named
20035     something starting with __ and the normal name is an alias.  */
20036 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20037 choke me
20038 #else
20039 f = gdbm_open;
20040 #endif
20041
20042 ; return 0; }
20043 EOF
20044 if { (eval echo configure:20045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20045   rm -rf conftest*
20046   eval "ac_cv_func_gdbm_open=yes"
20047 else
20048   echo "configure: failed program was:" >&5
20049   cat conftest.$ac_ext >&5
20050   rm -rf conftest*
20051   eval "ac_cv_func_gdbm_open=no"
20052 fi
20053 rm -f conftest*
20054 fi
20055
20056 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20057   echo "$ac_t""yes" 1>&6
20058   ol_cv_lib_gdbm=yes
20059 else
20060   echo "$ac_t""no" 1>&6
20061
20062                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20063 echo "configure:20064: checking for gdbm_open in -lgdbm" >&5
20064 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20065 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20066   echo $ac_n "(cached) $ac_c" 1>&6
20067 else
20068   ac_save_LIBS="$LIBS"
20069 LIBS="-lgdbm  $LIBS"
20070 cat > conftest.$ac_ext <<EOF
20071 #line 20072 "configure"
20072 #include "confdefs.h"
20073 /* Override any gcc2 internal prototype to avoid an error.  */
20074 /* We use char because int might match the return type of a gcc2
20075     builtin and then its argument prototype would still apply.  */
20076 char gdbm_open();
20077
20078 int main() {
20079 gdbm_open()
20080 ; return 0; }
20081 EOF
20082 if { (eval echo configure:20083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20083   rm -rf conftest*
20084   eval "ac_cv_lib_$ac_lib_var=yes"
20085 else
20086   echo "configure: failed program was:" >&5
20087   cat conftest.$ac_ext >&5
20088   rm -rf conftest*
20089   eval "ac_cv_lib_$ac_lib_var=no"
20090 fi
20091 rm -f conftest*
20092 LIBS="$ac_save_LIBS"
20093
20094 fi
20095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20096   echo "$ac_t""yes" 1>&6
20097   ol_cv_lib_gdbm=-lgdbm
20098 else
20099   echo "$ac_t""no" 1>&6
20100 ol_cv_lib_gdbm=no
20101 fi
20102
20103         
20104 fi
20105
20106         LIBS="$ol_LIBS"
20107
20108 fi
20109
20110 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20111
20112
20113  for ac_hdr in gdbm.h
20114 do
20115 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20116 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20117 echo "configure:20118: checking for $ac_hdr" >&5
20118 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20119   echo $ac_n "(cached) $ac_c" 1>&6
20120 else
20121   cat > conftest.$ac_ext <<EOF
20122 #line 20123 "configure"
20123 #include "confdefs.h"
20124 #include <$ac_hdr>
20125 EOF
20126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20127 { (eval echo configure:20128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20129 if test -z "$ac_err"; then
20130   rm -rf conftest*
20131   eval "ac_cv_header_$ac_safe=yes"
20132 else
20133   echo "$ac_err" >&5
20134   echo "configure: failed program was:" >&5
20135   cat conftest.$ac_ext >&5
20136   rm -rf conftest*
20137   eval "ac_cv_header_$ac_safe=no"
20138 fi
20139 rm -f conftest*
20140 fi
20141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20142   echo "$ac_t""yes" 1>&6
20143     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20144   cat >> confdefs.h <<EOF
20145 #define $ac_tr_hdr 1
20146 EOF
20147  
20148 else
20149   echo "$ac_t""no" 1>&6
20150 fi
20151 done
20152
20153  echo $ac_n "checking for db""... $ac_c" 1>&6
20154 echo "configure:20155: checking for db" >&5
20155 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20156   echo $ac_n "(cached) $ac_c" 1>&6
20157 else
20158   
20159         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20160                 ol_cv_gdbm=no
20161         else
20162                 ol_cv_gdbm=yes
20163         fi
20164
20165 fi
20166
20167 echo "$ac_t""$ol_cv_gdbm" 1>&6
20168  if test $ol_cv_gdbm = yes ; then
20169         cat >> confdefs.h <<\EOF
20170 #define HAVE_GDBM 1
20171 EOF
20172
20173  fi
20174
20175
20176         if test $ol_cv_gdbm = yes ; then
20177                 ol_link_ldbm=gdbm
20178                 ol_with_ldbm_api=gdbm
20179
20180                 if test $ol_cv_lib_gdbm != yes ; then
20181                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20182                 fi
20183         fi
20184 fi
20185
20186 if test $ol_with_ldbm_api = ndbm ; then
20187         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20188 echo "configure:20189: checking for NDBM library" >&5
20189 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20190   echo $ac_n "(cached) $ac_c" 1>&6
20191 else
20192         ol_LIBS="$LIBS"
20193         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20194 echo "configure:20195: checking for dbm_open" >&5
20195 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20196   echo $ac_n "(cached) $ac_c" 1>&6
20197 else
20198   cat > conftest.$ac_ext <<EOF
20199 #line 20200 "configure"
20200 #include "confdefs.h"
20201 /* System header to define __stub macros and hopefully few prototypes,
20202     which can conflict with char dbm_open(); below.  */
20203 #include <assert.h>
20204 /* Override any gcc2 internal prototype to avoid an error.  */
20205 /* We use char because int might match the return type of a gcc2
20206     builtin and then its argument prototype would still apply.  */
20207 char dbm_open();
20208 char (*f)();
20209
20210 int main() {
20211
20212 /* The GNU C library defines this for functions which it implements
20213     to always fail with ENOSYS.  Some functions are actually named
20214     something starting with __ and the normal name is an alias.  */
20215 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20216 choke me
20217 #else
20218 f = dbm_open;
20219 #endif
20220
20221 ; return 0; }
20222 EOF
20223 if { (eval echo configure:20224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20224   rm -rf conftest*
20225   eval "ac_cv_func_dbm_open=yes"
20226 else
20227   echo "configure: failed program was:" >&5
20228   cat conftest.$ac_ext >&5
20229   rm -rf conftest*
20230   eval "ac_cv_func_dbm_open=no"
20231 fi
20232 rm -f conftest*
20233 fi
20234
20235 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20236   echo "$ac_t""yes" 1>&6
20237   ol_cv_lib_ndbm=yes
20238 else
20239   echo "$ac_t""no" 1>&6
20240
20241                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20242 echo "configure:20243: checking for dbm_open in -lndbm" >&5
20243 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20245   echo $ac_n "(cached) $ac_c" 1>&6
20246 else
20247   ac_save_LIBS="$LIBS"
20248 LIBS="-lndbm  $LIBS"
20249 cat > conftest.$ac_ext <<EOF
20250 #line 20251 "configure"
20251 #include "confdefs.h"
20252 /* Override any gcc2 internal prototype to avoid an error.  */
20253 /* We use char because int might match the return type of a gcc2
20254     builtin and then its argument prototype would still apply.  */
20255 char dbm_open();
20256
20257 int main() {
20258 dbm_open()
20259 ; return 0; }
20260 EOF
20261 if { (eval echo configure:20262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20262   rm -rf conftest*
20263   eval "ac_cv_lib_$ac_lib_var=yes"
20264 else
20265   echo "configure: failed program was:" >&5
20266   cat conftest.$ac_ext >&5
20267   rm -rf conftest*
20268   eval "ac_cv_lib_$ac_lib_var=no"
20269 fi
20270 rm -f conftest*
20271 LIBS="$ac_save_LIBS"
20272
20273 fi
20274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20275   echo "$ac_t""yes" 1>&6
20276   ol_cv_lib_ndbm=-lndbm
20277 else
20278   echo "$ac_t""no" 1>&6
20279
20280                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20281 echo "configure:20282: checking for dbm_open in -ldbm" >&5
20282 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20283 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20284   echo $ac_n "(cached) $ac_c" 1>&6
20285 else
20286   ac_save_LIBS="$LIBS"
20287 LIBS="-ldbm  $LIBS"
20288 cat > conftest.$ac_ext <<EOF
20289 #line 20290 "configure"
20290 #include "confdefs.h"
20291 /* Override any gcc2 internal prototype to avoid an error.  */
20292 /* We use char because int might match the return type of a gcc2
20293     builtin and then its argument prototype would still apply.  */
20294 char dbm_open();
20295
20296 int main() {
20297 dbm_open()
20298 ; return 0; }
20299 EOF
20300 if { (eval echo configure:20301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20301   rm -rf conftest*
20302   eval "ac_cv_lib_$ac_lib_var=yes"
20303 else
20304   echo "configure: failed program was:" >&5
20305   cat conftest.$ac_ext >&5
20306   rm -rf conftest*
20307   eval "ac_cv_lib_$ac_lib_var=no"
20308 fi
20309 rm -f conftest*
20310 LIBS="$ac_save_LIBS"
20311
20312 fi
20313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20314   echo "$ac_t""yes" 1>&6
20315   ol_cv_lib_ndbm=-ldbm
20316 else
20317   echo "$ac_t""no" 1>&6
20318 ol_cv_lib_ndbm=no
20319 fi
20320                 
20321 fi
20322
20323         
20324 fi
20325
20326         LIBS="$ol_LIBS"
20327
20328 fi
20329
20330 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20331
20332
20333  for ac_hdr in ndbm.h
20334 do
20335 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20336 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20337 echo "configure:20338: checking for $ac_hdr" >&5
20338 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20339   echo $ac_n "(cached) $ac_c" 1>&6
20340 else
20341   cat > conftest.$ac_ext <<EOF
20342 #line 20343 "configure"
20343 #include "confdefs.h"
20344 #include <$ac_hdr>
20345 EOF
20346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20347 { (eval echo configure:20348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20349 if test -z "$ac_err"; then
20350   rm -rf conftest*
20351   eval "ac_cv_header_$ac_safe=yes"
20352 else
20353   echo "$ac_err" >&5
20354   echo "configure: failed program was:" >&5
20355   cat conftest.$ac_ext >&5
20356   rm -rf conftest*
20357   eval "ac_cv_header_$ac_safe=no"
20358 fi
20359 rm -f conftest*
20360 fi
20361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20362   echo "$ac_t""yes" 1>&6
20363     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20364   cat >> confdefs.h <<EOF
20365 #define $ac_tr_hdr 1
20366 EOF
20367  
20368 else
20369   echo "$ac_t""no" 1>&6
20370 fi
20371 done
20372
20373  echo $ac_n "checking for db""... $ac_c" 1>&6
20374 echo "configure:20375: checking for db" >&5
20375 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20376   echo $ac_n "(cached) $ac_c" 1>&6
20377 else
20378   
20379         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20380                 ol_cv_ndbm=no
20381         else
20382                 ol_cv_ndbm=yes
20383         fi
20384
20385 fi
20386
20387 echo "$ac_t""$ol_cv_ndbm" 1>&6
20388  if test $ol_cv_ndbm = yes ; then
20389         cat >> confdefs.h <<\EOF
20390 #define HAVE_NDBM 1
20391 EOF
20392
20393  fi
20394
20395
20396         if test $ol_cv_ndbm = yes ; then
20397                 ol_link_ldbm=ndbm
20398                 ol_with_ldbm_api=ndbm
20399
20400                 if test $ol_cv_lib_ndbm != yes ; then
20401                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20402                 fi
20403         fi
20404 fi
20405
20406 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20407         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20408         if test $ol_enable_ldbm = yes ; then
20409                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20410         fi
20411
20412         echo "configure: warning: disabling LDBM" 1>&2
20413         ol_enable_ldbm=no
20414 fi
20415
20416
20417 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20418         BUILD_LIBS_DYNAMIC=shared
20419         cat >> confdefs.h <<\EOF
20420 #define LDAP_LIBS_DYNAMIC 1
20421 EOF
20422
20423         LTSTATIC=""
20424 else
20425         BUILD_LIBS_DYNAMIC=static
20426         LTSTATIC="-static"
20427 fi
20428
20429 if test $ol_enable_wrappers != no ; then
20430         for ac_hdr in tcpd.h
20431 do
20432 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20433 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20434 echo "configure:20435: checking for $ac_hdr" >&5
20435 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20436   echo $ac_n "(cached) $ac_c" 1>&6
20437 else
20438   cat > conftest.$ac_ext <<EOF
20439 #line 20440 "configure"
20440 #include "confdefs.h"
20441 #include <$ac_hdr>
20442 EOF
20443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20444 { (eval echo configure:20445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20446 if test -z "$ac_err"; then
20447   rm -rf conftest*
20448   eval "ac_cv_header_$ac_safe=yes"
20449 else
20450   echo "$ac_err" >&5
20451   echo "configure: failed program was:" >&5
20452   cat conftest.$ac_ext >&5
20453   rm -rf conftest*
20454   eval "ac_cv_header_$ac_safe=no"
20455 fi
20456 rm -f conftest*
20457 fi
20458 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20459   echo "$ac_t""yes" 1>&6
20460     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20461   cat >> confdefs.h <<EOF
20462 #define $ac_tr_hdr 1
20463 EOF
20464  
20465                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20466 echo "configure:20467: checking for TCP wrappers library" >&5
20467                 save_LIBS="$LIBS"
20468                 LIBS="$LIBS -lwrap"
20469                 cat > conftest.$ac_ext <<EOF
20470 #line 20471 "configure"
20471 #include "confdefs.h"
20472
20473 #include <tcpd.h>
20474 int allow_severity = 0;
20475 int deny_severity  = 0;
20476
20477 struct request_info *req;
20478                 
20479 int main() {
20480
20481 hosts_access(req)
20482                 
20483 ; return 0; }
20484 EOF
20485 if { (eval echo configure:20486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20486   rm -rf conftest*
20487   echo "$ac_t""-lwrap" 1>&6
20488                 have_wrappers=yes
20489                 LIBS="$save_LIBS"
20490 else
20491   echo "configure: failed program was:" >&5
20492   cat conftest.$ac_ext >&5
20493   rm -rf conftest*
20494   
20495                                 LIBS="$LIBS -lnsl"
20496                 cat > conftest.$ac_ext <<EOF
20497 #line 20498 "configure"
20498 #include "confdefs.h"
20499
20500 #include <tcpd.h>
20501 int allow_severity = 0;
20502 int deny_severity  = 0;
20503
20504 struct request_info *req;
20505                 
20506 int main() {
20507
20508 hosts_access(req)
20509                 
20510 ; return 0; }
20511 EOF
20512 if { (eval echo configure:20513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20513   rm -rf conftest*
20514   echo "$ac_t""-lwrap -lnsl" 1>&6
20515                 have_wrappers=yes
20516                 LIBS="$save_LIBS -lnsl"
20517 else
20518   echo "configure: failed program was:" >&5
20519   cat conftest.$ac_ext >&5
20520   rm -rf conftest*
20521   
20522                 echo "$ac_t""no" 1>&6
20523                 have_wrappers=no
20524                 LIBS=$save_LIBS
20525 fi
20526 rm -f conftest*
20527 fi
20528 rm -f conftest*
20529 else
20530   echo "$ac_t""no" 1>&6
20531 have_wrappers=no
20532 fi
20533 done
20534
20535
20536         if test $have_wrappers = yes ; then
20537                 cat >> confdefs.h <<\EOF
20538 #define HAVE_TCPD 1
20539 EOF
20540
20541                 WRAP_LIBS="-lwrap"
20542         elif test $ol_enable_wrappers = yes ; then
20543                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20544         else
20545                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20546                 WRAP_LIBS=""
20547         fi
20548 fi
20549
20550 if test $ol_enable_syslog != no ; then
20551         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20552 echo "configure:20553: checking for openlog" >&5
20553 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20554   echo $ac_n "(cached) $ac_c" 1>&6
20555 else
20556   cat > conftest.$ac_ext <<EOF
20557 #line 20558 "configure"
20558 #include "confdefs.h"
20559 /* System header to define __stub macros and hopefully few prototypes,
20560     which can conflict with char openlog(); below.  */
20561 #include <assert.h>
20562 /* Override any gcc2 internal prototype to avoid an error.  */
20563 /* We use char because int might match the return type of a gcc2
20564     builtin and then its argument prototype would still apply.  */
20565 char openlog();
20566 char (*f)();
20567
20568 int main() {
20569
20570 /* The GNU C library defines this for functions which it implements
20571     to always fail with ENOSYS.  Some functions are actually named
20572     something starting with __ and the normal name is an alias.  */
20573 #if defined (__stub_openlog) || defined (__stub___openlog)
20574 choke me
20575 #else
20576 f = openlog;
20577 #endif
20578
20579 ; return 0; }
20580 EOF
20581 if { (eval echo configure:20582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20582   rm -rf conftest*
20583   eval "ac_cv_func_openlog=yes"
20584 else
20585   echo "configure: failed program was:" >&5
20586   cat conftest.$ac_ext >&5
20587   rm -rf conftest*
20588   eval "ac_cv_func_openlog=no"
20589 fi
20590 rm -f conftest*
20591 fi
20592
20593 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20594   echo "$ac_t""yes" 1>&6
20595   :
20596 else
20597   echo "$ac_t""no" 1>&6
20598 fi
20599
20600         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20601                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20602         fi
20603         ol_enable_syslog=$ac_cv_func_openlog
20604 fi
20605
20606
20607 ol_link_sql=no
20608 if test $ol_enable_sql != no ; then
20609         for ac_hdr in sql.h sqlext.h
20610 do
20611 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20612 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20613 echo "configure:20614: checking for $ac_hdr" >&5
20614 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20615   echo $ac_n "(cached) $ac_c" 1>&6
20616 else
20617   cat > conftest.$ac_ext <<EOF
20618 #line 20619 "configure"
20619 #include "confdefs.h"
20620 #include <$ac_hdr>
20621 EOF
20622 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20623 { (eval echo configure:20624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20624 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20625 if test -z "$ac_err"; then
20626   rm -rf conftest*
20627   eval "ac_cv_header_$ac_safe=yes"
20628 else
20629   echo "$ac_err" >&5
20630   echo "configure: failed program was:" >&5
20631   cat conftest.$ac_ext >&5
20632   rm -rf conftest*
20633   eval "ac_cv_header_$ac_safe=no"
20634 fi
20635 rm -f conftest*
20636 fi
20637 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20638   echo "$ac_t""yes" 1>&6
20639     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20640   cat >> confdefs.h <<EOF
20641 #define $ac_tr_hdr 1
20642 EOF
20643  
20644 else
20645   echo "$ac_t""no" 1>&6
20646 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20647         
20648 fi
20649 done
20650
20651
20652         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20653 echo "configure:20654: checking for SQLDriverConnect in -liodbc" >&5
20654 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20655 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20656   echo $ac_n "(cached) $ac_c" 1>&6
20657 else
20658   ac_save_LIBS="$LIBS"
20659 LIBS="-liodbc  $LIBS"
20660 cat > conftest.$ac_ext <<EOF
20661 #line 20662 "configure"
20662 #include "confdefs.h"
20663 /* Override any gcc2 internal prototype to avoid an error.  */
20664 /* We use char because int might match the return type of a gcc2
20665     builtin and then its argument prototype would still apply.  */
20666 char SQLDriverConnect();
20667
20668 int main() {
20669 SQLDriverConnect()
20670 ; return 0; }
20671 EOF
20672 if { (eval echo configure:20673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20673   rm -rf conftest*
20674   eval "ac_cv_lib_$ac_lib_var=yes"
20675 else
20676   echo "configure: failed program was:" >&5
20677   cat conftest.$ac_ext >&5
20678   rm -rf conftest*
20679   eval "ac_cv_lib_$ac_lib_var=no"
20680 fi
20681 rm -f conftest*
20682 LIBS="$ac_save_LIBS"
20683
20684 fi
20685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20686   echo "$ac_t""yes" 1>&6
20687   have_iodbc=yes
20688 else
20689   echo "$ac_t""no" 1>&6
20690 have_iodbc=no
20691 fi
20692
20693         if test $have_iodbc = yes ; then
20694                 ol_link_sql="-liodbc"
20695         else
20696                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20697 echo "configure:20698: checking for SQLDriverConnect in -lodbc" >&5
20698 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20699 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20700   echo $ac_n "(cached) $ac_c" 1>&6
20701 else
20702   ac_save_LIBS="$LIBS"
20703 LIBS="-lodbc  $LIBS"
20704 cat > conftest.$ac_ext <<EOF
20705 #line 20706 "configure"
20706 #include "confdefs.h"
20707 /* Override any gcc2 internal prototype to avoid an error.  */
20708 /* We use char because int might match the return type of a gcc2
20709     builtin and then its argument prototype would still apply.  */
20710 char SQLDriverConnect();
20711
20712 int main() {
20713 SQLDriverConnect()
20714 ; return 0; }
20715 EOF
20716 if { (eval echo configure:20717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20717   rm -rf conftest*
20718   eval "ac_cv_lib_$ac_lib_var=yes"
20719 else
20720   echo "configure: failed program was:" >&5
20721   cat conftest.$ac_ext >&5
20722   rm -rf conftest*
20723   eval "ac_cv_lib_$ac_lib_var=no"
20724 fi
20725 rm -f conftest*
20726 LIBS="$ac_save_LIBS"
20727
20728 fi
20729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20730   echo "$ac_t""yes" 1>&6
20731   have_odbc=yes
20732 else
20733   echo "$ac_t""no" 1>&6
20734 have_odbc=no
20735 fi
20736
20737                 if test $have_odbc = yes ; then
20738                         ol_link_sql="-lodbc"
20739                 fi
20740         fi
20741
20742         if test $ol_link_sql != no ; then
20743                 SLAPD_SQL_LIBS="$ol_link_sql"
20744
20745         elif test $ol_enable_sql != auto ; then
20746                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20747         fi
20748 fi
20749
20750 ol_link_sasl=no
20751 ol_link_spasswd=no
20752 if test $ol_with_cyrus_sasl != no ; then
20753         for ac_hdr in sasl/sasl.h sasl.h
20754 do
20755 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20756 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20757 echo "configure:20758: checking for $ac_hdr" >&5
20758 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20759   echo $ac_n "(cached) $ac_c" 1>&6
20760 else
20761   cat > conftest.$ac_ext <<EOF
20762 #line 20763 "configure"
20763 #include "confdefs.h"
20764 #include <$ac_hdr>
20765 EOF
20766 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20767 { (eval echo configure:20768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20768 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20769 if test -z "$ac_err"; then
20770   rm -rf conftest*
20771   eval "ac_cv_header_$ac_safe=yes"
20772 else
20773   echo "$ac_err" >&5
20774   echo "configure: failed program was:" >&5
20775   cat conftest.$ac_ext >&5
20776   rm -rf conftest*
20777   eval "ac_cv_header_$ac_safe=no"
20778 fi
20779 rm -f conftest*
20780 fi
20781 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20782   echo "$ac_t""yes" 1>&6
20783     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20784   cat >> confdefs.h <<EOF
20785 #define $ac_tr_hdr 1
20786 EOF
20787  
20788 else
20789   echo "$ac_t""no" 1>&6
20790 fi
20791 done
20792
20793
20794         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20795                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20796 echo "configure:20797: checking for sasl_client_init in -lsasl2" >&5
20797 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20798 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20799   echo $ac_n "(cached) $ac_c" 1>&6
20800 else
20801   ac_save_LIBS="$LIBS"
20802 LIBS="-lsasl2  $LIBS"
20803 cat > conftest.$ac_ext <<EOF
20804 #line 20805 "configure"
20805 #include "confdefs.h"
20806 /* Override any gcc2 internal prototype to avoid an error.  */
20807 /* We use char because int might match the return type of a gcc2
20808     builtin and then its argument prototype would still apply.  */
20809 char sasl_client_init();
20810
20811 int main() {
20812 sasl_client_init()
20813 ; return 0; }
20814 EOF
20815 if { (eval echo configure:20816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20816   rm -rf conftest*
20817   eval "ac_cv_lib_$ac_lib_var=yes"
20818 else
20819   echo "configure: failed program was:" >&5
20820   cat conftest.$ac_ext >&5
20821   rm -rf conftest*
20822   eval "ac_cv_lib_$ac_lib_var=no"
20823 fi
20824 rm -f conftest*
20825 LIBS="$ac_save_LIBS"
20826
20827 fi
20828 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20829   echo "$ac_t""yes" 1>&6
20830   ol_link_sasl="-lsasl2"
20831 else
20832   echo "$ac_t""no" 1>&6
20833 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20834 echo "configure:20835: checking for sasl_client_init in -lsasl" >&5
20835 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20836 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20837   echo $ac_n "(cached) $ac_c" 1>&6
20838 else
20839   ac_save_LIBS="$LIBS"
20840 LIBS="-lsasl  $LIBS"
20841 cat > conftest.$ac_ext <<EOF
20842 #line 20843 "configure"
20843 #include "confdefs.h"
20844 /* Override any gcc2 internal prototype to avoid an error.  */
20845 /* We use char because int might match the return type of a gcc2
20846     builtin and then its argument prototype would still apply.  */
20847 char sasl_client_init();
20848
20849 int main() {
20850 sasl_client_init()
20851 ; return 0; }
20852 EOF
20853 if { (eval echo configure:20854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20854   rm -rf conftest*
20855   eval "ac_cv_lib_$ac_lib_var=yes"
20856 else
20857   echo "configure: failed program was:" >&5
20858   cat conftest.$ac_ext >&5
20859   rm -rf conftest*
20860   eval "ac_cv_lib_$ac_lib_var=no"
20861 fi
20862 rm -f conftest*
20863 LIBS="$ac_save_LIBS"
20864
20865 fi
20866 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20867   echo "$ac_t""yes" 1>&6
20868   ol_link_sasl="-lsasl"
20869 else
20870   echo "$ac_t""no" 1>&6
20871 fi
20872
20873 fi
20874
20875         fi
20876
20877         if test $ol_link_sasl = no ; then
20878                 if test $ol_with_cyrus_sasl != auto ; then
20879                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20880                 else
20881                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20882                         echo "configure: warning: SASL authentication not supported!" 1>&2
20883                         if test $ol_link_tls = no ; then
20884                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20885                         fi
20886                 fi
20887         else
20888                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20889 echo "configure:20890: checking Cyrus SASL library version" >&5
20890 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20891   echo $ac_n "(cached) $ac_c" 1>&6
20892 else
20893   
20894         cat > conftest.$ac_ext <<EOF
20895 #line 20896 "configure"
20896 #include "confdefs.h"
20897
20898 #ifdef HAVE_SASL_SASL_H
20899 #include <sasl/sasl.h>
20900 #else
20901 #include <sasl.h>
20902 #endif
20903
20904 /* Require 2.1.15+ */
20905 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20906         char *__sasl_compat = "2.2+ or better okay (we guess)";
20907 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20908         && SASL_VERSION_STEP >=15
20909         char *__sasl_compat = "2.1.15+ or better okay";
20910 #endif
20911         
20912 EOF
20913 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20914   egrep "__sasl_compat" >/dev/null 2>&1; then
20915   rm -rf conftest*
20916   ol_cv_sasl_compat=yes
20917 else
20918   rm -rf conftest*
20919   ol_cv_sasl_compat=no
20920 fi
20921 rm -f conftest*
20922
20923 fi
20924
20925 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20926
20927                 if test $ol_cv_sasl_compat = no ; then
20928                         ol_link_sasl=no
20929                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20930                 fi
20931
20932                 cat >> confdefs.h <<\EOF
20933 #define HAVE_CYRUS_SASL 1
20934 EOF
20935
20936                 SASL_LIBS="$ol_link_sasl"
20937                 if test $ol_enable_spasswd != no ; then
20938                         ol_link_spasswd=yes
20939                 fi
20940
20941                 ac_save_LIBS="$LIBS"
20942                 LIBS="$LIBS $ol_link_sasl"
20943                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20944 echo "configure:20945: checking for sasl_version" >&5
20945 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20946   echo $ac_n "(cached) $ac_c" 1>&6
20947 else
20948   cat > conftest.$ac_ext <<EOF
20949 #line 20950 "configure"
20950 #include "confdefs.h"
20951 /* System header to define __stub macros and hopefully few prototypes,
20952     which can conflict with char sasl_version(); below.  */
20953 #include <assert.h>
20954 /* Override any gcc2 internal prototype to avoid an error.  */
20955 /* We use char because int might match the return type of a gcc2
20956     builtin and then its argument prototype would still apply.  */
20957 char sasl_version();
20958 char (*f)();
20959
20960 int main() {
20961
20962 /* The GNU C library defines this for functions which it implements
20963     to always fail with ENOSYS.  Some functions are actually named
20964     something starting with __ and the normal name is an alias.  */
20965 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20966 choke me
20967 #else
20968 f = sasl_version;
20969 #endif
20970
20971 ; return 0; }
20972 EOF
20973 if { (eval echo configure:20974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20974   rm -rf conftest*
20975   eval "ac_cv_func_sasl_version=yes"
20976 else
20977   echo "configure: failed program was:" >&5
20978   cat conftest.$ac_ext >&5
20979   rm -rf conftest*
20980   eval "ac_cv_func_sasl_version=no"
20981 fi
20982 rm -f conftest*
20983 fi
20984
20985 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20986   echo "$ac_t""yes" 1>&6
20987   cat >> confdefs.h <<\EOF
20988 #define HAVE_SASL_VERSION 1
20989 EOF
20990
20991 else
20992   echo "$ac_t""no" 1>&6
20993 fi
20994
20995                 LIBS="$ac_save_LIBS"
20996         fi
20997
20998 else
20999         echo "configure: warning: SASL authentication not supported!" 1>&2
21000         if test $ol_link_tls = no ; then
21001                 echo "configure: warning: Strong authentication not supported!" 1>&2
21002         fi
21003 fi
21004
21005 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21006         dev=no
21007         if test -r /dev/urandom ; then
21008                 dev="/dev/urandom";
21009         elif test -r /idev/urandom ; then
21010                 dev="/idev/urandom";
21011         elif test -r /dev/srandom ; then
21012                 dev="/dev/srandom";
21013         elif test -r /dev/random ; then
21014                 dev="/dev/random";
21015         elif test -r /idev/random ; then
21016                 dev="/idev/random";
21017         fi
21018
21019         if test $dev != no ; then
21020                 cat >> confdefs.h <<EOF
21021 #define URANDOM_DEVICE "$dev"
21022 EOF
21023
21024         fi
21025 fi
21026
21027 ol_link_fetch=no
21028 if test $ol_with_fetch != no ; then
21029         ol_LIBS=$LIBS
21030 LIBS="-lfetch -lcom_err $LIBS"
21031 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21032 echo "configure:21033: checking fetch(3) library" >&5
21033 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21034   echo $ac_n "(cached) $ac_c" 1>&6
21035 else
21036   
21037         cat > conftest.$ac_ext <<EOF
21038 #line 21039 "configure"
21039 #include "confdefs.h"
21040
21041 #include <sys/param.h>
21042 #include <stdio.h>
21043 #include <fetch.h>
21044 int main() {
21045 struct url *u = fetchParseURL("file:///"); 
21046 ; return 0; }
21047 EOF
21048 if { (eval echo configure:21049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21049   rm -rf conftest*
21050   ol_cv_lib_fetch=yes
21051 else
21052   echo "configure: failed program was:" >&5
21053   cat conftest.$ac_ext >&5
21054   rm -rf conftest*
21055   ol_cv_lib_fetch=no
21056 fi
21057 rm -f conftest*
21058 fi
21059
21060 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21061 LIBS=$ol_LIBS
21062 if test $ol_cv_lib_fetch != no ; then
21063         ol_link_fetch="-lfetch -lcom_err"
21064         cat >> confdefs.h <<\EOF
21065 #define HAVE_FETCH 1
21066 EOF
21067
21068 fi
21069
21070
21071         if test $ol_cv_lib_fetch != no ; then
21072                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21073                 ol_link_fetch=freebsd
21074
21075         elif test $ol_with_fetch != auto ; then
21076                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21077         fi 
21078 fi
21079
21080 if test $ol_enable_crypt != no ; then
21081         save_LIBS="$LIBS"
21082         LIBS="$TLS_LIBS $LIBS"
21083
21084         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21085 echo "configure:21086: checking for crypt" >&5
21086 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21087   echo $ac_n "(cached) $ac_c" 1>&6
21088 else
21089   cat > conftest.$ac_ext <<EOF
21090 #line 21091 "configure"
21091 #include "confdefs.h"
21092 /* System header to define __stub macros and hopefully few prototypes,
21093     which can conflict with char crypt(); below.  */
21094 #include <assert.h>
21095 /* Override any gcc2 internal prototype to avoid an error.  */
21096 /* We use char because int might match the return type of a gcc2
21097     builtin and then its argument prototype would still apply.  */
21098 char crypt();
21099 char (*f)();
21100
21101 int main() {
21102
21103 /* The GNU C library defines this for functions which it implements
21104     to always fail with ENOSYS.  Some functions are actually named
21105     something starting with __ and the normal name is an alias.  */
21106 #if defined (__stub_crypt) || defined (__stub___crypt)
21107 choke me
21108 #else
21109 f = crypt;
21110 #endif
21111
21112 ; return 0; }
21113 EOF
21114 if { (eval echo configure:21115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21115   rm -rf conftest*
21116   eval "ac_cv_func_crypt=yes"
21117 else
21118   echo "configure: failed program was:" >&5
21119   cat conftest.$ac_ext >&5
21120   rm -rf conftest*
21121   eval "ac_cv_func_crypt=no"
21122 fi
21123 rm -f conftest*
21124 fi
21125
21126 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21127   echo "$ac_t""yes" 1>&6
21128   have_crypt=yes
21129 else
21130   echo "$ac_t""no" 1>&6
21131
21132                 LIBS="$save_LIBS"
21133                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21134 echo "configure:21135: checking for crypt in -lcrypt" >&5
21135 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21136 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21137   echo $ac_n "(cached) $ac_c" 1>&6
21138 else
21139   ac_save_LIBS="$LIBS"
21140 LIBS="-lcrypt  $LIBS"
21141 cat > conftest.$ac_ext <<EOF
21142 #line 21143 "configure"
21143 #include "confdefs.h"
21144 /* Override any gcc2 internal prototype to avoid an error.  */
21145 /* We use char because int might match the return type of a gcc2
21146     builtin and then its argument prototype would still apply.  */
21147 char crypt();
21148
21149 int main() {
21150 crypt()
21151 ; return 0; }
21152 EOF
21153 if { (eval echo configure:21154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21154   rm -rf conftest*
21155   eval "ac_cv_lib_$ac_lib_var=yes"
21156 else
21157   echo "configure: failed program was:" >&5
21158   cat conftest.$ac_ext >&5
21159   rm -rf conftest*
21160   eval "ac_cv_lib_$ac_lib_var=no"
21161 fi
21162 rm -f conftest*
21163 LIBS="$ac_save_LIBS"
21164
21165 fi
21166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21167   echo "$ac_t""yes" 1>&6
21168   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21169                         have_crypt=yes
21170 else
21171   echo "$ac_t""no" 1>&6
21172 have_crypt=no
21173 fi
21174
21175 fi
21176
21177
21178         LIBS="$save_LIBS"
21179
21180         if test $have_crypt = yes ; then
21181                 cat >> confdefs.h <<\EOF
21182 #define HAVE_CRYPT 1
21183 EOF
21184
21185         else
21186                 echo "configure: warning: could not find crypt" 1>&2
21187                 if test $ol_enable_crypt = yes ; then
21188                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21189                 fi
21190
21191                 echo "configure: warning: disabling crypt support" 1>&2
21192                 ol_enable_crypt=no
21193         fi
21194 fi
21195
21196 if test $ol_enable_proctitle != no ; then
21197         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21198 echo "configure:21199: checking for setproctitle" >&5
21199 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21200   echo $ac_n "(cached) $ac_c" 1>&6
21201 else
21202   cat > conftest.$ac_ext <<EOF
21203 #line 21204 "configure"
21204 #include "confdefs.h"
21205 /* System header to define __stub macros and hopefully few prototypes,
21206     which can conflict with char setproctitle(); below.  */
21207 #include <assert.h>
21208 /* Override any gcc2 internal prototype to avoid an error.  */
21209 /* We use char because int might match the return type of a gcc2
21210     builtin and then its argument prototype would still apply.  */
21211 char setproctitle();
21212 char (*f)();
21213
21214 int main() {
21215
21216 /* The GNU C library defines this for functions which it implements
21217     to always fail with ENOSYS.  Some functions are actually named
21218     something starting with __ and the normal name is an alias.  */
21219 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21220 choke me
21221 #else
21222 f = setproctitle;
21223 #endif
21224
21225 ; return 0; }
21226 EOF
21227 if { (eval echo configure:21228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21228   rm -rf conftest*
21229   eval "ac_cv_func_setproctitle=yes"
21230 else
21231   echo "configure: failed program was:" >&5
21232   cat conftest.$ac_ext >&5
21233   rm -rf conftest*
21234   eval "ac_cv_func_setproctitle=no"
21235 fi
21236 rm -f conftest*
21237 fi
21238
21239 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21240   echo "$ac_t""yes" 1>&6
21241   have_setproctitle=yes
21242 else
21243   echo "$ac_t""no" 1>&6
21244
21245                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21246 echo "configure:21247: checking for setproctitle in -lutil" >&5
21247 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21248 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21249   echo $ac_n "(cached) $ac_c" 1>&6
21250 else
21251   ac_save_LIBS="$LIBS"
21252 LIBS="-lutil  $LIBS"
21253 cat > conftest.$ac_ext <<EOF
21254 #line 21255 "configure"
21255 #include "confdefs.h"
21256 /* Override any gcc2 internal prototype to avoid an error.  */
21257 /* We use char because int might match the return type of a gcc2
21258     builtin and then its argument prototype would still apply.  */
21259 char setproctitle();
21260
21261 int main() {
21262 setproctitle()
21263 ; return 0; }
21264 EOF
21265 if { (eval echo configure:21266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21266   rm -rf conftest*
21267   eval "ac_cv_lib_$ac_lib_var=yes"
21268 else
21269   echo "configure: failed program was:" >&5
21270   cat conftest.$ac_ext >&5
21271   rm -rf conftest*
21272   eval "ac_cv_lib_$ac_lib_var=no"
21273 fi
21274 rm -f conftest*
21275 LIBS="$ac_save_LIBS"
21276
21277 fi
21278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21279   echo "$ac_t""yes" 1>&6
21280   have_setproctitle=yes
21281                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21282 else
21283   echo "$ac_t""no" 1>&6
21284 have_setproctitle=no
21285                         LIBOBJS="$LIBOBJS setproctitle.o"
21286                         LIBSRCS="$LIBSRCS setproctitle.c"
21287 fi
21288
21289 fi
21290
21291
21292         if test $have_setproctitle = yes ; then
21293                 cat >> confdefs.h <<\EOF
21294 #define HAVE_SETPROCTITLE 1
21295 EOF
21296
21297         fi
21298 fi
21299
21300 if test $ol_enable_slp != no ; then
21301         for ac_hdr in slp.h 
21302 do
21303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21304 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21305 echo "configure:21306: checking for $ac_hdr" >&5
21306 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21307   echo $ac_n "(cached) $ac_c" 1>&6
21308 else
21309   cat > conftest.$ac_ext <<EOF
21310 #line 21311 "configure"
21311 #include "confdefs.h"
21312 #include <$ac_hdr>
21313 EOF
21314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21315 { (eval echo configure:21316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21317 if test -z "$ac_err"; then
21318   rm -rf conftest*
21319   eval "ac_cv_header_$ac_safe=yes"
21320 else
21321   echo "$ac_err" >&5
21322   echo "configure: failed program was:" >&5
21323   cat conftest.$ac_ext >&5
21324   rm -rf conftest*
21325   eval "ac_cv_header_$ac_safe=no"
21326 fi
21327 rm -f conftest*
21328 fi
21329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21330   echo "$ac_t""yes" 1>&6
21331     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21332   cat >> confdefs.h <<EOF
21333 #define $ac_tr_hdr 1
21334 EOF
21335  
21336 else
21337   echo "$ac_t""no" 1>&6
21338 fi
21339 done
21340
21341
21342         if test $ac_cv_header_slp_h = yes ; then
21343                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21344 echo "configure:21345: checking for SLPOpen in -lslp" >&5
21345 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21346 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21347   echo $ac_n "(cached) $ac_c" 1>&6
21348 else
21349   ac_save_LIBS="$LIBS"
21350 LIBS="-lslp  $LIBS"
21351 cat > conftest.$ac_ext <<EOF
21352 #line 21353 "configure"
21353 #include "confdefs.h"
21354 /* Override any gcc2 internal prototype to avoid an error.  */
21355 /* We use char because int might match the return type of a gcc2
21356     builtin and then its argument prototype would still apply.  */
21357 char SLPOpen();
21358
21359 int main() {
21360 SLPOpen()
21361 ; return 0; }
21362 EOF
21363 if { (eval echo configure:21364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21364   rm -rf conftest*
21365   eval "ac_cv_lib_$ac_lib_var=yes"
21366 else
21367   echo "configure: failed program was:" >&5
21368   cat conftest.$ac_ext >&5
21369   rm -rf conftest*
21370   eval "ac_cv_lib_$ac_lib_var=no"
21371 fi
21372 rm -f conftest*
21373 LIBS="$ac_save_LIBS"
21374
21375 fi
21376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21377   echo "$ac_t""yes" 1>&6
21378   have_slp=yes
21379 else
21380   echo "$ac_t""no" 1>&6
21381 have_slp=no
21382 fi
21383
21384                 if test $have_slp = yes ; then
21385                         cat >> confdefs.h <<\EOF
21386 #define HAVE_SLP 1
21387 EOF
21388
21389                         SLAPD_SLP_LIBS=-lslp
21390                 fi
21391
21392         elif test $ol_enable_slp = yes ; then
21393                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21394         fi
21395 fi
21396
21397
21398 echo $ac_n "checking long long""... $ac_c" 1>&6
21399 echo "configure:21400: checking long long" >&5
21400 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21401   echo $ac_n "(cached) $ac_c" 1>&6
21402 else
21403   
21404         cat > conftest.$ac_ext <<EOF
21405 #line 21406 "configure"
21406 #include "confdefs.h"
21407
21408 int main() {
21409 long long x;
21410 ; return 0; }
21411 EOF
21412 if { (eval echo configure:21413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21413   rm -rf conftest*
21414   ol_cv_type_long_long=yes
21415 else
21416   echo "configure: failed program was:" >&5
21417   cat conftest.$ac_ext >&5
21418   rm -rf conftest*
21419   ol_cv_type_long_long=no
21420 fi
21421 rm -f conftest*
21422 fi
21423
21424 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21425 if test $ol_cv_type_long_long = yes; then
21426         cat >> confdefs.h <<\EOF
21427 #define HAVE_LONG_LONG 1
21428 EOF
21429
21430 fi
21431
21432 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21433 echo "configure:21434: checking for ANSI C header files" >&5
21434 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21435   echo $ac_n "(cached) $ac_c" 1>&6
21436 else
21437   cat > conftest.$ac_ext <<EOF
21438 #line 21439 "configure"
21439 #include "confdefs.h"
21440 #include <stdlib.h>
21441 #include <stdarg.h>
21442 #include <string.h>
21443 #include <float.h>
21444 EOF
21445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21446 { (eval echo configure:21447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21448 if test -z "$ac_err"; then
21449   rm -rf conftest*
21450   ac_cv_header_stdc=yes
21451 else
21452   echo "$ac_err" >&5
21453   echo "configure: failed program was:" >&5
21454   cat conftest.$ac_ext >&5
21455   rm -rf conftest*
21456   ac_cv_header_stdc=no
21457 fi
21458 rm -f conftest*
21459
21460 if test $ac_cv_header_stdc = yes; then
21461   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21462 cat > conftest.$ac_ext <<EOF
21463 #line 21464 "configure"
21464 #include "confdefs.h"
21465 #include <string.h>
21466 EOF
21467 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21468   egrep "memchr" >/dev/null 2>&1; then
21469   :
21470 else
21471   rm -rf conftest*
21472   ac_cv_header_stdc=no
21473 fi
21474 rm -f conftest*
21475
21476 fi
21477
21478 if test $ac_cv_header_stdc = yes; then
21479   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21480 cat > conftest.$ac_ext <<EOF
21481 #line 21482 "configure"
21482 #include "confdefs.h"
21483 #include <stdlib.h>
21484 EOF
21485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21486   egrep "free" >/dev/null 2>&1; then
21487   :
21488 else
21489   rm -rf conftest*
21490   ac_cv_header_stdc=no
21491 fi
21492 rm -f conftest*
21493
21494 fi
21495
21496 if test $ac_cv_header_stdc = yes; then
21497   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21498 if test "$cross_compiling" = yes; then
21499   :
21500 else
21501   cat > conftest.$ac_ext <<EOF
21502 #line 21503 "configure"
21503 #include "confdefs.h"
21504 #include <ctype.h>
21505 #if ((' ' & 0x0FF) == 0x020)
21506 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21507 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21508 #else
21509 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21510  || ('j' <= (c) && (c) <= 'r') \
21511  || ('s' <= (c) && (c) <= 'z'))
21512 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21513 #endif
21514 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21515 int main () { int i; for (i = 0; i < 256; i++)
21516 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21517 exit (0); }
21518
21519 EOF
21520 if { (eval echo configure:21521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21521 then
21522   :
21523 else
21524   echo "configure: failed program was:" >&5
21525   cat conftest.$ac_ext >&5
21526   rm -fr conftest*
21527   ac_cv_header_stdc=no
21528 fi
21529 rm -fr conftest*
21530 fi
21531
21532 fi
21533 fi
21534
21535 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21536 if test $ac_cv_header_stdc = yes; then
21537   cat >> confdefs.h <<\EOF
21538 #define STDC_HEADERS 1
21539 EOF
21540
21541 fi
21542
21543 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21544 echo "configure:21545: checking for mode_t" >&5
21545 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21546   echo $ac_n "(cached) $ac_c" 1>&6
21547 else
21548   cat > conftest.$ac_ext <<EOF
21549 #line 21550 "configure"
21550 #include "confdefs.h"
21551 #include <sys/types.h>
21552 #if STDC_HEADERS
21553 #include <stdlib.h>
21554 #include <stddef.h>
21555 #endif
21556
21557 EOF
21558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21559   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21560   rm -rf conftest*
21561   eval "ac_cv_type_mode_t=yes"
21562 else
21563   rm -rf conftest*
21564   eval "ac_cv_type_mode_t=no"
21565 fi
21566 rm -f conftest*
21567
21568 fi
21569 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21570   echo "$ac_t""yes" 1>&6
21571 else
21572   echo "$ac_t""no" 1>&6
21573   cat >> confdefs.h <<EOF
21574 #define mode_t int
21575 EOF
21576
21577 fi
21578
21579 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21580 echo "configure:21581: checking for off_t" >&5
21581 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21582   echo $ac_n "(cached) $ac_c" 1>&6
21583 else
21584   cat > conftest.$ac_ext <<EOF
21585 #line 21586 "configure"
21586 #include "confdefs.h"
21587 #include <sys/types.h>
21588 #if STDC_HEADERS
21589 #include <stdlib.h>
21590 #include <stddef.h>
21591 #endif
21592
21593 EOF
21594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21595   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21596   rm -rf conftest*
21597   eval "ac_cv_type_off_t=yes"
21598 else
21599   rm -rf conftest*
21600   eval "ac_cv_type_off_t=no"
21601 fi
21602 rm -f conftest*
21603
21604 fi
21605 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21606   echo "$ac_t""yes" 1>&6
21607 else
21608   echo "$ac_t""no" 1>&6
21609   cat >> confdefs.h <<EOF
21610 #define off_t long
21611 EOF
21612
21613 fi
21614
21615 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21616 echo "configure:21617: checking for pid_t" >&5
21617 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21618   echo $ac_n "(cached) $ac_c" 1>&6
21619 else
21620   cat > conftest.$ac_ext <<EOF
21621 #line 21622 "configure"
21622 #include "confdefs.h"
21623 #include <sys/types.h>
21624 #if STDC_HEADERS
21625 #include <stdlib.h>
21626 #include <stddef.h>
21627 #endif
21628
21629 EOF
21630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21631   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21632   rm -rf conftest*
21633   eval "ac_cv_type_pid_t=yes"
21634 else
21635   rm -rf conftest*
21636   eval "ac_cv_type_pid_t=no"
21637 fi
21638 rm -f conftest*
21639
21640 fi
21641 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21642   echo "$ac_t""yes" 1>&6
21643 else
21644   echo "$ac_t""no" 1>&6
21645   cat >> confdefs.h <<EOF
21646 #define pid_t int
21647 EOF
21648
21649 fi
21650
21651 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21652 echo "configure:21653: checking for ptrdiff_t" >&5
21653 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21654   echo $ac_n "(cached) $ac_c" 1>&6
21655 else
21656   cat > conftest.$ac_ext <<EOF
21657 #line 21658 "configure"
21658 #include "confdefs.h"
21659 #include <stddef.h>
21660 int main() {
21661 ptrdiff_t p
21662 ; return 0; }
21663 EOF
21664 if { (eval echo configure:21665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21665   rm -rf conftest*
21666   am_cv_type_ptrdiff_t=yes
21667 else
21668   echo "configure: failed program was:" >&5
21669   cat conftest.$ac_ext >&5
21670   rm -rf conftest*
21671   am_cv_type_ptrdiff_t=no
21672 fi
21673 rm -f conftest*
21674 fi
21675
21676 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21677    if test $am_cv_type_ptrdiff_t = yes; then
21678      cat >> confdefs.h <<\EOF
21679 #define HAVE_PTRDIFF_T 1
21680 EOF
21681
21682    fi
21683
21684 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21685 echo "configure:21686: checking return type of signal handlers" >&5
21686 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21687   echo $ac_n "(cached) $ac_c" 1>&6
21688 else
21689   cat > conftest.$ac_ext <<EOF
21690 #line 21691 "configure"
21691 #include "confdefs.h"
21692 #include <sys/types.h>
21693 #include <signal.h>
21694 #ifdef signal
21695 #undef signal
21696 #endif
21697 #ifdef __cplusplus
21698 extern "C" void (*signal (int, void (*)(int)))(int);
21699 #else
21700 void (*signal ()) ();
21701 #endif
21702
21703 int main() {
21704 int i;
21705 ; return 0; }
21706 EOF
21707 if { (eval echo configure:21708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21708   rm -rf conftest*
21709   ac_cv_type_signal=void
21710 else
21711   echo "configure: failed program was:" >&5
21712   cat conftest.$ac_ext >&5
21713   rm -rf conftest*
21714   ac_cv_type_signal=int
21715 fi
21716 rm -f conftest*
21717 fi
21718
21719 echo "$ac_t""$ac_cv_type_signal" 1>&6
21720 cat >> confdefs.h <<EOF
21721 #define RETSIGTYPE $ac_cv_type_signal
21722 EOF
21723
21724
21725 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21726 echo "configure:21727: checking for size_t" >&5
21727 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21728   echo $ac_n "(cached) $ac_c" 1>&6
21729 else
21730   cat > conftest.$ac_ext <<EOF
21731 #line 21732 "configure"
21732 #include "confdefs.h"
21733 #include <sys/types.h>
21734 #if STDC_HEADERS
21735 #include <stdlib.h>
21736 #include <stddef.h>
21737 #endif
21738
21739 EOF
21740 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21741   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21742   rm -rf conftest*
21743   eval "ac_cv_type_size_t=yes"
21744 else
21745   rm -rf conftest*
21746   eval "ac_cv_type_size_t=no"
21747 fi
21748 rm -f conftest*
21749
21750 fi
21751 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21752   echo "$ac_t""yes" 1>&6
21753 else
21754   echo "$ac_t""no" 1>&6
21755   cat >> confdefs.h <<EOF
21756 #define size_t unsigned
21757 EOF
21758
21759 fi
21760
21761
21762 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21763 echo "configure:21764: checking for ssize_t" >&5
21764 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21765   echo $ac_n "(cached) $ac_c" 1>&6
21766 else
21767   cat > conftest.$ac_ext <<EOF
21768 #line 21769 "configure"
21769 #include "confdefs.h"
21770 #include <sys/types.h>
21771 #if STDC_HEADERS
21772 #include <stdlib.h>
21773 #include <stddef.h>
21774 #endif
21775
21776 EOF
21777 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21778   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21779   rm -rf conftest*
21780   eval "ac_cv_type_ssize_t=yes"
21781 else
21782   rm -rf conftest*
21783   eval "ac_cv_type_ssize_t=no"
21784 fi
21785 rm -f conftest*
21786
21787 fi
21788 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21789   echo "$ac_t""yes" 1>&6
21790 else
21791   echo "$ac_t""no" 1>&6
21792   cat >> confdefs.h <<EOF
21793 #define ssize_t signed int
21794 EOF
21795
21796 fi
21797
21798 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21799 echo "configure:21800: checking for caddr_t" >&5
21800 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21801   echo $ac_n "(cached) $ac_c" 1>&6
21802 else
21803   cat > conftest.$ac_ext <<EOF
21804 #line 21805 "configure"
21805 #include "confdefs.h"
21806 #include <sys/types.h>
21807 #if STDC_HEADERS
21808 #include <stdlib.h>
21809 #include <stddef.h>
21810 #endif
21811
21812 EOF
21813 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21814   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21815   rm -rf conftest*
21816   eval "ac_cv_type_caddr_t=yes"
21817 else
21818   rm -rf conftest*
21819   eval "ac_cv_type_caddr_t=no"
21820 fi
21821 rm -f conftest*
21822
21823 fi
21824 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21825   echo "$ac_t""yes" 1>&6
21826 else
21827   echo "$ac_t""no" 1>&6
21828   cat >> confdefs.h <<EOF
21829 #define caddr_t char *
21830 EOF
21831
21832 fi
21833
21834
21835 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21836 echo "configure:21837: checking for socklen_t" >&5
21837 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21838   echo $ac_n "(cached) $ac_c" 1>&6
21839 else
21840   cat > conftest.$ac_ext <<EOF
21841 #line 21842 "configure"
21842 #include "confdefs.h"
21843
21844 #ifdef HAVE_SYS_TYPES_H
21845 #include <sys/types.h>
21846 #endif
21847 #ifdef HAVE_SYS_SOCKET_H
21848 #include <sys/socket.h>
21849 #endif
21850
21851 int main() {
21852 socklen_t len;
21853 ; return 0; }
21854 EOF
21855 if { (eval echo configure:21856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21856   rm -rf conftest*
21857   ol_cv_type_socklen_t=yes
21858 else
21859   echo "configure: failed program was:" >&5
21860   cat conftest.$ac_ext >&5
21861   rm -rf conftest*
21862   ol_cv_type_socklen_t=no
21863 fi
21864 rm -f conftest*
21865 fi
21866
21867 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21868   if test $ol_cv_type_socklen_t = no; then
21869     cat >> confdefs.h <<\EOF
21870 #define socklen_t int
21871 EOF
21872
21873   fi
21874  
21875 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21876 echo "configure:21877: checking for member st_blksize in aggregate type struct stat" >&5
21877 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21878   echo $ac_n "(cached) $ac_c" 1>&6
21879 else
21880   cat > conftest.$ac_ext <<EOF
21881 #line 21882 "configure"
21882 #include "confdefs.h"
21883 #include <sys/types.h>
21884 #include <sys/stat.h>
21885 int main() {
21886 struct stat foo; foo.st_blksize;
21887 ; return 0; }
21888 EOF
21889 if { (eval echo configure:21890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21890   rm -rf conftest*
21891   ac_cv_c_struct_member_st_blksize=yes
21892 else
21893   echo "configure: failed program was:" >&5
21894   cat conftest.$ac_ext >&5
21895   rm -rf conftest*
21896   ac_cv_c_struct_member_st_blksize=no
21897 fi
21898 rm -f conftest*
21899 fi
21900
21901 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21902 st_blksize="$ac_cv_c_struct_member_st_blksize"
21903 if test $ac_cv_c_struct_member_st_blksize = yes; then
21904   cat >> confdefs.h <<\EOF
21905 #define HAVE_ST_BLKSIZE 1
21906 EOF
21907
21908 fi
21909
21910 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21911 echo "configure:21912: checking whether time.h and sys/time.h may both be included" >&5
21912 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21913   echo $ac_n "(cached) $ac_c" 1>&6
21914 else
21915   cat > conftest.$ac_ext <<EOF
21916 #line 21917 "configure"
21917 #include "confdefs.h"
21918 #include <sys/types.h>
21919 #include <sys/time.h>
21920 #include <time.h>
21921 int main() {
21922 struct tm *tp;
21923 ; return 0; }
21924 EOF
21925 if { (eval echo configure:21926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21926   rm -rf conftest*
21927   ac_cv_header_time=yes
21928 else
21929   echo "configure: failed program was:" >&5
21930   cat conftest.$ac_ext >&5
21931   rm -rf conftest*
21932   ac_cv_header_time=no
21933 fi
21934 rm -f conftest*
21935 fi
21936
21937 echo "$ac_t""$ac_cv_header_time" 1>&6
21938 if test $ac_cv_header_time = yes; then
21939   cat >> confdefs.h <<\EOF
21940 #define TIME_WITH_SYS_TIME 1
21941 EOF
21942
21943 fi
21944
21945 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21946 echo "configure:21947: checking whether struct tm is in sys/time.h or time.h" >&5
21947 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21948   echo $ac_n "(cached) $ac_c" 1>&6
21949 else
21950   cat > conftest.$ac_ext <<EOF
21951 #line 21952 "configure"
21952 #include "confdefs.h"
21953 #include <sys/types.h>
21954 #include <time.h>
21955 int main() {
21956 struct tm *tp; tp->tm_sec;
21957 ; return 0; }
21958 EOF
21959 if { (eval echo configure:21960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21960   rm -rf conftest*
21961   ac_cv_struct_tm=time.h
21962 else
21963   echo "configure: failed program was:" >&5
21964   cat conftest.$ac_ext >&5
21965   rm -rf conftest*
21966   ac_cv_struct_tm=sys/time.h
21967 fi
21968 rm -f conftest*
21969 fi
21970
21971 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21972 if test $ac_cv_struct_tm = sys/time.h; then
21973   cat >> confdefs.h <<\EOF
21974 #define TM_IN_SYS_TIME 1
21975 EOF
21976
21977 fi
21978
21979 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21980 echo "configure:21981: checking for uid_t in sys/types.h" >&5
21981 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21982   echo $ac_n "(cached) $ac_c" 1>&6
21983 else
21984   cat > conftest.$ac_ext <<EOF
21985 #line 21986 "configure"
21986 #include "confdefs.h"
21987 #include <sys/types.h>
21988 EOF
21989 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21990   egrep "uid_t" >/dev/null 2>&1; then
21991   rm -rf conftest*
21992   ac_cv_type_uid_t=yes
21993 else
21994   rm -rf conftest*
21995   ac_cv_type_uid_t=no
21996 fi
21997 rm -f conftest*
21998
21999 fi
22000
22001 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22002 if test $ac_cv_type_uid_t = no; then
22003   cat >> confdefs.h <<\EOF
22004 #define uid_t int
22005 EOF
22006
22007   cat >> confdefs.h <<\EOF
22008 #define gid_t int
22009 EOF
22010
22011 fi
22012
22013 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22014 echo "configure:22015: checking for sig_atomic_t" >&5
22015 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22016   echo $ac_n "(cached) $ac_c" 1>&6
22017 else
22018   cat > conftest.$ac_ext <<EOF
22019 #line 22020 "configure"
22020 #include "confdefs.h"
22021 #include <signal.h>
22022 int main() {
22023 sig_atomic_t atomic;
22024 ; return 0; }
22025 EOF
22026 if { (eval echo configure:22027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22027   rm -rf conftest*
22028   ol_cv_type_sig_atomic_t=yes
22029 else
22030   echo "configure: failed program was:" >&5
22031   cat conftest.$ac_ext >&5
22032   rm -rf conftest*
22033   ol_cv_type_sig_atomic_t=no
22034 fi
22035 rm -f conftest*
22036 fi
22037
22038 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22039   if test $ol_cv_type_sig_atomic_t = no; then
22040     cat >> confdefs.h <<\EOF
22041 #define sig_atomic_t int
22042 EOF
22043
22044   fi
22045  
22046
22047
22048 # test for pw_gecos in struct passwd
22049 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22050 echo "configure:22051: checking struct passwd for pw_gecos" >&5
22051 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22052   echo $ac_n "(cached) $ac_c" 1>&6
22053 else
22054   
22055         cat > conftest.$ac_ext <<EOF
22056 #line 22057 "configure"
22057 #include "confdefs.h"
22058 #include <pwd.h>
22059 int main() {
22060
22061         struct passwd pwd;
22062         pwd.pw_gecos = pwd.pw_name;
22063
22064 ; return 0; }
22065 EOF
22066 if { (eval echo configure:22067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22067   rm -rf conftest*
22068   ol_cv_struct_passwd_pw_gecos=yes
22069 else
22070   echo "configure: failed program was:" >&5
22071   cat conftest.$ac_ext >&5
22072   rm -rf conftest*
22073   ol_cv_struct_passwd_pw_gecos=no
22074 fi
22075 rm -f conftest*
22076 fi
22077
22078 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22079 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22080         cat >> confdefs.h <<\EOF
22081 #define HAVE_PW_GECOS 1
22082 EOF
22083
22084 fi
22085
22086 # test for pw_passwd in struct passwd
22087 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22088 echo "configure:22089: checking struct passwd for pw_passwd" >&5
22089 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22090   echo $ac_n "(cached) $ac_c" 1>&6
22091 else
22092   
22093         cat > conftest.$ac_ext <<EOF
22094 #line 22095 "configure"
22095 #include "confdefs.h"
22096 #include <pwd.h>
22097 int main() {
22098
22099         struct passwd pwd;
22100         pwd.pw_passwd = pwd.pw_name;
22101
22102 ; return 0; }
22103 EOF
22104 if { (eval echo configure:22105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22105   rm -rf conftest*
22106   ol_cv_struct_passwd_pw_passwd=yes
22107 else
22108   echo "configure: failed program was:" >&5
22109   cat conftest.$ac_ext >&5
22110   rm -rf conftest*
22111   ol_cv_struct_passwd_pw_passwd=no
22112 fi
22113 rm -f conftest*
22114 fi
22115
22116 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22117 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22118         cat >> confdefs.h <<\EOF
22119 #define HAVE_PW_PASSWD 1
22120 EOF
22121
22122 fi
22123
22124
22125 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22126 echo "configure:22127: checking if toupper() requires islower()" >&5
22127 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22128   echo $ac_n "(cached) $ac_c" 1>&6
22129 else
22130   
22131         if test "$cross_compiling" = yes; then
22132   ol_cv_c_upper_lower=safe
22133 else
22134   cat > conftest.$ac_ext <<EOF
22135 #line 22136 "configure"
22136 #include "confdefs.h"
22137
22138 #include <ctype.h>
22139 main()
22140 {
22141         if ('C' == toupper('C'))
22142                 exit(0);
22143         else
22144                 exit(1);
22145 }
22146 EOF
22147 if { (eval echo configure:22148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22148 then
22149   ol_cv_c_upper_lower=no
22150 else
22151   echo "configure: failed program was:" >&5
22152   cat conftest.$ac_ext >&5
22153   rm -fr conftest*
22154   ol_cv_c_upper_lower=yes
22155 fi
22156 rm -fr conftest*
22157 fi
22158
22159 fi
22160
22161 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22162 if test $ol_cv_c_upper_lower != no ; then
22163         cat >> confdefs.h <<\EOF
22164 #define C_UPPER_LOWER 1
22165 EOF
22166
22167 fi
22168
22169 echo $ac_n "checking for working const""... $ac_c" 1>&6
22170 echo "configure:22171: checking for working const" >&5
22171 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22172   echo $ac_n "(cached) $ac_c" 1>&6
22173 else
22174   cat > conftest.$ac_ext <<EOF
22175 #line 22176 "configure"
22176 #include "confdefs.h"
22177
22178 int main() {
22179
22180 /* Ultrix mips cc rejects this.  */
22181 typedef int charset[2]; const charset x;
22182 /* SunOS 4.1.1 cc rejects this.  */
22183 char const *const *ccp;
22184 char **p;
22185 /* NEC SVR4.0.2 mips cc rejects this.  */
22186 struct point {int x, y;};
22187 static struct point const zero = {0,0};
22188 /* AIX XL C 1.02.0.0 rejects this.
22189    It does not let you subtract one const X* pointer from another in an arm
22190    of an if-expression whose if-part is not a constant expression */
22191 const char *g = "string";
22192 ccp = &g + (g ? g-g : 0);
22193 /* HPUX 7.0 cc rejects these. */
22194 ++ccp;
22195 p = (char**) ccp;
22196 ccp = (char const *const *) p;
22197 { /* SCO 3.2v4 cc rejects this.  */
22198   char *t;
22199   char const *s = 0 ? (char *) 0 : (char const *) 0;
22200
22201   *t++ = 0;
22202 }
22203 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22204   int x[] = {25, 17};
22205   const int *foo = &x[0];
22206   ++foo;
22207 }
22208 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22209   typedef const int *iptr;
22210   iptr p = 0;
22211   ++p;
22212 }
22213 { /* AIX XL C 1.02.0.0 rejects this saying
22214      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22215   struct s { int j; const int *ap[3]; };
22216   struct s *b; b->j = 5;
22217 }
22218 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22219   const int foo = 10;
22220 }
22221
22222 ; return 0; }
22223 EOF
22224 if { (eval echo configure:22225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22225   rm -rf conftest*
22226   ac_cv_c_const=yes
22227 else
22228   echo "configure: failed program was:" >&5
22229   cat conftest.$ac_ext >&5
22230   rm -rf conftest*
22231   ac_cv_c_const=no
22232 fi
22233 rm -f conftest*
22234 fi
22235
22236 echo "$ac_t""$ac_cv_c_const" 1>&6
22237 if test $ac_cv_c_const = no; then
22238   cat >> confdefs.h <<\EOF
22239 #define const 
22240 EOF
22241
22242 fi
22243
22244 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22245 echo "configure:22246: checking if compiler understands volatile" >&5
22246 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22247   echo $ac_n "(cached) $ac_c" 1>&6
22248 else
22249   cat > conftest.$ac_ext <<EOF
22250 #line 22251 "configure"
22251 #include "confdefs.h"
22252 int x, y, z;
22253 int main() {
22254 volatile int a; int * volatile b = x ? &y : &z;
22255       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22256       *b = 0;
22257 ; return 0; }
22258 EOF
22259 if { (eval echo configure:22260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22260   rm -rf conftest*
22261   ol_cv_c_volatile=yes
22262 else
22263   echo "configure: failed program was:" >&5
22264   cat conftest.$ac_ext >&5
22265   rm -rf conftest*
22266   ol_cv_c_volatile=no
22267 fi
22268 rm -f conftest*
22269 fi
22270
22271 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22272   if test $ol_cv_c_volatile = yes; then
22273     : 
22274   else
22275     cat >> confdefs.h <<\EOF
22276 #define volatile 
22277 EOF
22278
22279   fi
22280  
22281
22282 if test $cross_compiling = yes ; then
22283         cat >> confdefs.h <<\EOF
22284 #define CROSS_COMPILING 1
22285 EOF
22286
22287 else
22288         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22289 echo "configure:22290: checking whether byte ordering is bigendian" >&5
22290 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22291   echo $ac_n "(cached) $ac_c" 1>&6
22292 else
22293   ac_cv_c_bigendian=unknown
22294 # See if sys/param.h defines the BYTE_ORDER macro.
22295 cat > conftest.$ac_ext <<EOF
22296 #line 22297 "configure"
22297 #include "confdefs.h"
22298 #include <sys/types.h>
22299 #include <sys/param.h>
22300 int main() {
22301
22302 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22303  bogus endian macros
22304 #endif
22305 ; return 0; }
22306 EOF
22307 if { (eval echo configure:22308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22308   rm -rf conftest*
22309   # It does; now see whether it defined to BIG_ENDIAN or not.
22310 cat > conftest.$ac_ext <<EOF
22311 #line 22312 "configure"
22312 #include "confdefs.h"
22313 #include <sys/types.h>
22314 #include <sys/param.h>
22315 int main() {
22316
22317 #if BYTE_ORDER != BIG_ENDIAN
22318  not big endian
22319 #endif
22320 ; return 0; }
22321 EOF
22322 if { (eval echo configure:22323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22323   rm -rf conftest*
22324   ac_cv_c_bigendian=yes
22325 else
22326   echo "configure: failed program was:" >&5
22327   cat conftest.$ac_ext >&5
22328   rm -rf conftest*
22329   ac_cv_c_bigendian=no
22330 fi
22331 rm -f conftest*
22332 else
22333   echo "configure: failed program was:" >&5
22334   cat conftest.$ac_ext >&5
22335 fi
22336 rm -f conftest*
22337 if test $ac_cv_c_bigendian = unknown; then
22338 if test "$cross_compiling" = yes; then
22339     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22340 else
22341   cat > conftest.$ac_ext <<EOF
22342 #line 22343 "configure"
22343 #include "confdefs.h"
22344 main () {
22345   /* Are we little or big endian?  From Harbison&Steele.  */
22346   union
22347   {
22348     long l;
22349     char c[sizeof (long)];
22350   } u;
22351   u.l = 1;
22352   exit (u.c[sizeof (long) - 1] == 1);
22353 }
22354 EOF
22355 if { (eval echo configure:22356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22356 then
22357   ac_cv_c_bigendian=no
22358 else
22359   echo "configure: failed program was:" >&5
22360   cat conftest.$ac_ext >&5
22361   rm -fr conftest*
22362   ac_cv_c_bigendian=yes
22363 fi
22364 rm -fr conftest*
22365 fi
22366
22367 fi
22368 fi
22369
22370 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22371 if test $ac_cv_c_bigendian = yes; then
22372   cat >> confdefs.h <<\EOF
22373 #define WORDS_BIGENDIAN 1
22374 EOF
22375
22376 fi
22377
22378 fi
22379
22380 echo $ac_n "checking size of short""... $ac_c" 1>&6
22381 echo "configure:22382: checking size of short" >&5 
22382 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22383   echo $ac_n "(cached) $ac_c" 1>&6
22384 else
22385   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22386   cat > conftest.$ac_ext <<EOF
22387 #line 22388 "configure"
22388 #include "confdefs.h"
22389 #include "confdefs.h" 
22390 #include <sys/types.h> 
22391  
22392
22393 int main() {
22394 switch (0) case 0: case (sizeof (short) == $ac_size):;
22395 ; return 0; }
22396 EOF
22397 if { (eval echo configure:22398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22398   rm -rf conftest*
22399   ac_cv_sizeof_short=$ac_size
22400 else
22401   echo "configure: failed program was:" >&5
22402   cat conftest.$ac_ext >&5
22403 fi
22404 rm -f conftest* 
22405   if test x$ac_cv_sizeof_short != x ; then break; fi 
22406 done 
22407
22408 fi
22409  
22410 if test x$ac_cv_sizeof_short = x ; then 
22411   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22412 fi 
22413 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22414 cat >> confdefs.h <<EOF
22415 #define SIZEOF_SHORT $ac_cv_sizeof_short
22416 EOF
22417  
22418  
22419 echo $ac_n "checking size of int""... $ac_c" 1>&6
22420 echo "configure:22421: checking size of int" >&5 
22421 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22422   echo $ac_n "(cached) $ac_c" 1>&6
22423 else
22424   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22425   cat > conftest.$ac_ext <<EOF
22426 #line 22427 "configure"
22427 #include "confdefs.h"
22428 #include "confdefs.h" 
22429 #include <sys/types.h> 
22430  
22431
22432 int main() {
22433 switch (0) case 0: case (sizeof (int) == $ac_size):;
22434 ; return 0; }
22435 EOF
22436 if { (eval echo configure:22437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22437   rm -rf conftest*
22438   ac_cv_sizeof_int=$ac_size
22439 else
22440   echo "configure: failed program was:" >&5
22441   cat conftest.$ac_ext >&5
22442 fi
22443 rm -f conftest* 
22444   if test x$ac_cv_sizeof_int != x ; then break; fi 
22445 done 
22446
22447 fi
22448  
22449 if test x$ac_cv_sizeof_int = x ; then 
22450   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22451 fi 
22452 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22453 cat >> confdefs.h <<EOF
22454 #define SIZEOF_INT $ac_cv_sizeof_int
22455 EOF
22456  
22457  
22458 echo $ac_n "checking size of long""... $ac_c" 1>&6
22459 echo "configure:22460: checking size of long" >&5 
22460 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22461   echo $ac_n "(cached) $ac_c" 1>&6
22462 else
22463   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22464   cat > conftest.$ac_ext <<EOF
22465 #line 22466 "configure"
22466 #include "confdefs.h"
22467 #include "confdefs.h" 
22468 #include <sys/types.h> 
22469  
22470
22471 int main() {
22472 switch (0) case 0: case (sizeof (long) == $ac_size):;
22473 ; return 0; }
22474 EOF
22475 if { (eval echo configure:22476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22476   rm -rf conftest*
22477   ac_cv_sizeof_long=$ac_size
22478 else
22479   echo "configure: failed program was:" >&5
22480   cat conftest.$ac_ext >&5
22481 fi
22482 rm -f conftest* 
22483   if test x$ac_cv_sizeof_long != x ; then break; fi 
22484 done 
22485
22486 fi
22487  
22488 if test x$ac_cv_sizeof_long = x ; then 
22489   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22490 fi 
22491 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22492 cat >> confdefs.h <<EOF
22493 #define SIZEOF_LONG $ac_cv_sizeof_long
22494 EOF
22495  
22496
22497
22498 if test "$ac_cv_sizeof_int" -lt 4 ; then
22499         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22500
22501         cat >> confdefs.h <<\EOF
22502 #define LBER_INT_T long
22503 EOF
22504
22505 else
22506         cat >> confdefs.h <<\EOF
22507 #define LBER_INT_T int
22508 EOF
22509
22510 fi
22511
22512 cat >> confdefs.h <<\EOF
22513 #define LBER_LEN_T long
22514 EOF
22515
22516 cat >> confdefs.h <<\EOF
22517 #define LBER_SOCKET_T int
22518 EOF
22519
22520 cat >> confdefs.h <<\EOF
22521 #define LBER_TAG_T long
22522 EOF
22523
22524
22525 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22526 echo "configure:22527: checking for 8-bit clean memcmp" >&5
22527 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22528   echo $ac_n "(cached) $ac_c" 1>&6
22529 else
22530   if test "$cross_compiling" = yes; then
22531   ac_cv_func_memcmp_clean=no
22532 else
22533   cat > conftest.$ac_ext <<EOF
22534 #line 22535 "configure"
22535 #include "confdefs.h"
22536
22537 main()
22538 {
22539   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22540   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22541 }
22542
22543 EOF
22544 if { (eval echo configure:22545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22545 then
22546   ac_cv_func_memcmp_clean=yes
22547 else
22548   echo "configure: failed program was:" >&5
22549   cat conftest.$ac_ext >&5
22550   rm -fr conftest*
22551   ac_cv_func_memcmp_clean=no
22552 fi
22553 rm -fr conftest*
22554 fi
22555
22556 fi
22557
22558 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22559 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22560
22561 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22562 echo "configure:22563: checking for strftime" >&5
22563 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22564   echo $ac_n "(cached) $ac_c" 1>&6
22565 else
22566   cat > conftest.$ac_ext <<EOF
22567 #line 22568 "configure"
22568 #include "confdefs.h"
22569 /* System header to define __stub macros and hopefully few prototypes,
22570     which can conflict with char strftime(); below.  */
22571 #include <assert.h>
22572 /* Override any gcc2 internal prototype to avoid an error.  */
22573 /* We use char because int might match the return type of a gcc2
22574     builtin and then its argument prototype would still apply.  */
22575 char strftime();
22576 char (*f)();
22577
22578 int main() {
22579
22580 /* The GNU C library defines this for functions which it implements
22581     to always fail with ENOSYS.  Some functions are actually named
22582     something starting with __ and the normal name is an alias.  */
22583 #if defined (__stub_strftime) || defined (__stub___strftime)
22584 choke me
22585 #else
22586 f = strftime;
22587 #endif
22588
22589 ; return 0; }
22590 EOF
22591 if { (eval echo configure:22592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22592   rm -rf conftest*
22593   eval "ac_cv_func_strftime=yes"
22594 else
22595   echo "configure: failed program was:" >&5
22596   cat conftest.$ac_ext >&5
22597   rm -rf conftest*
22598   eval "ac_cv_func_strftime=no"
22599 fi
22600 rm -f conftest*
22601 fi
22602
22603 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22604   echo "$ac_t""yes" 1>&6
22605   cat >> confdefs.h <<\EOF
22606 #define HAVE_STRFTIME 1
22607 EOF
22608
22609 else
22610   echo "$ac_t""no" 1>&6
22611 # strftime is in -lintl on SCO UNIX.
22612 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22613 echo "configure:22614: checking for strftime in -lintl" >&5
22614 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22615 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22616   echo $ac_n "(cached) $ac_c" 1>&6
22617 else
22618   ac_save_LIBS="$LIBS"
22619 LIBS="-lintl  $LIBS"
22620 cat > conftest.$ac_ext <<EOF
22621 #line 22622 "configure"
22622 #include "confdefs.h"
22623 /* Override any gcc2 internal prototype to avoid an error.  */
22624 /* We use char because int might match the return type of a gcc2
22625     builtin and then its argument prototype would still apply.  */
22626 char strftime();
22627
22628 int main() {
22629 strftime()
22630 ; return 0; }
22631 EOF
22632 if { (eval echo configure:22633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22633   rm -rf conftest*
22634   eval "ac_cv_lib_$ac_lib_var=yes"
22635 else
22636   echo "configure: failed program was:" >&5
22637   cat conftest.$ac_ext >&5
22638   rm -rf conftest*
22639   eval "ac_cv_lib_$ac_lib_var=no"
22640 fi
22641 rm -f conftest*
22642 LIBS="$ac_save_LIBS"
22643
22644 fi
22645 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22646   echo "$ac_t""yes" 1>&6
22647   cat >> confdefs.h <<\EOF
22648 #define HAVE_STRFTIME 1
22649 EOF
22650
22651 LIBS="-lintl $LIBS"
22652 else
22653   echo "$ac_t""no" 1>&6
22654 fi
22655
22656 fi
22657
22658
22659 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22660 echo "configure:22661: checking for inet_aton()" >&5
22661 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22662   echo $ac_n "(cached) $ac_c" 1>&6
22663 else
22664   cat > conftest.$ac_ext <<EOF
22665 #line 22666 "configure"
22666 #include "confdefs.h"
22667
22668 #ifdef HAVE_SYS_TYPES_H
22669 #       include <sys/types.h>
22670 #endif
22671 #ifdef HAVE_SYS_SOCKET_H
22672 #       include <sys/socket.h>
22673 #       ifdef HAVE_SYS_SELECT_H
22674 #               include <sys/select.h>
22675 #       endif
22676 #       include <netinet/in.h>
22677 #       ifdef HAVE_ARPA_INET_H
22678 #               include <arpa/inet.h>
22679 #       endif
22680 #endif
22681
22682 int main() {
22683 struct in_addr in;
22684 int rc = inet_aton( "255.255.255.255", &in );
22685 ; return 0; }
22686 EOF
22687 if { (eval echo configure:22688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22688   rm -rf conftest*
22689   ol_cv_func_inet_aton=yes
22690 else
22691   echo "configure: failed program was:" >&5
22692   cat conftest.$ac_ext >&5
22693   rm -rf conftest*
22694   ol_cv_func_inet_aton=no
22695 fi
22696 rm -f conftest*
22697 fi
22698
22699 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22700   if test $ol_cv_func_inet_aton != no; then
22701     cat >> confdefs.h <<\EOF
22702 #define HAVE_INET_ATON 1
22703 EOF
22704
22705   fi
22706  
22707
22708 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22709 echo "configure:22710: checking for _spawnlp" >&5
22710 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22711   echo $ac_n "(cached) $ac_c" 1>&6
22712 else
22713   cat > conftest.$ac_ext <<EOF
22714 #line 22715 "configure"
22715 #include "confdefs.h"
22716 /* System header to define __stub macros and hopefully few prototypes,
22717     which can conflict with char _spawnlp(); below.  */
22718 #include <assert.h>
22719 /* Override any gcc2 internal prototype to avoid an error.  */
22720 /* We use char because int might match the return type of a gcc2
22721     builtin and then its argument prototype would still apply.  */
22722 char _spawnlp();
22723 char (*f)();
22724
22725 int main() {
22726
22727 /* The GNU C library defines this for functions which it implements
22728     to always fail with ENOSYS.  Some functions are actually named
22729     something starting with __ and the normal name is an alias.  */
22730 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22731 choke me
22732 #else
22733 f = _spawnlp;
22734 #endif
22735
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_func__spawnlp=yes"
22741 else
22742   echo "configure: failed program was:" >&5
22743   cat conftest.$ac_ext >&5
22744   rm -rf conftest*
22745   eval "ac_cv_func__spawnlp=no"
22746 fi
22747 rm -f conftest*
22748 fi
22749
22750 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22751   echo "$ac_t""yes" 1>&6
22752   cat >> confdefs.h <<\EOF
22753 #define HAVE_SPAWNLP 1
22754 EOF
22755
22756 else
22757   echo "$ac_t""no" 1>&6
22758 fi
22759
22760
22761 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22762 echo "configure:22763: checking for _snprintf" >&5
22763 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22764   echo $ac_n "(cached) $ac_c" 1>&6
22765 else
22766   cat > conftest.$ac_ext <<EOF
22767 #line 22768 "configure"
22768 #include "confdefs.h"
22769 /* System header to define __stub macros and hopefully few prototypes,
22770     which can conflict with char _snprintf(); below.  */
22771 #include <assert.h>
22772 /* Override any gcc2 internal prototype to avoid an error.  */
22773 /* We use char because int might match the return type of a gcc2
22774     builtin and then its argument prototype would still apply.  */
22775 char _snprintf();
22776 char (*f)();
22777
22778 int main() {
22779
22780 /* The GNU C library defines this for functions which it implements
22781     to always fail with ENOSYS.  Some functions are actually named
22782     something starting with __ and the normal name is an alias.  */
22783 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22784 choke me
22785 #else
22786 f = _snprintf;
22787 #endif
22788
22789 ; return 0; }
22790 EOF
22791 if { (eval echo configure:22792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22792   rm -rf conftest*
22793   eval "ac_cv_func__snprintf=yes"
22794 else
22795   echo "configure: failed program was:" >&5
22796   cat conftest.$ac_ext >&5
22797   rm -rf conftest*
22798   eval "ac_cv_func__snprintf=no"
22799 fi
22800 rm -f conftest*
22801 fi
22802
22803 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22804   echo "$ac_t""yes" 1>&6
22805   ac_cv_func_snprintf=yes
22806         cat >> confdefs.h <<\EOF
22807 #define snprintf _snprintf
22808 EOF
22809
22810
22811 else
22812   echo "$ac_t""no" 1>&6
22813 fi
22814
22815
22816 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22817 echo "configure:22818: checking for _vsnprintf" >&5
22818 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22819   echo $ac_n "(cached) $ac_c" 1>&6
22820 else
22821   cat > conftest.$ac_ext <<EOF
22822 #line 22823 "configure"
22823 #include "confdefs.h"
22824 /* System header to define __stub macros and hopefully few prototypes,
22825     which can conflict with char _vsnprintf(); below.  */
22826 #include <assert.h>
22827 /* Override any gcc2 internal prototype to avoid an error.  */
22828 /* We use char because int might match the return type of a gcc2
22829     builtin and then its argument prototype would still apply.  */
22830 char _vsnprintf();
22831 char (*f)();
22832
22833 int main() {
22834
22835 /* The GNU C library defines this for functions which it implements
22836     to always fail with ENOSYS.  Some functions are actually named
22837     something starting with __ and the normal name is an alias.  */
22838 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22839 choke me
22840 #else
22841 f = _vsnprintf;
22842 #endif
22843
22844 ; return 0; }
22845 EOF
22846 if { (eval echo configure:22847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22847   rm -rf conftest*
22848   eval "ac_cv_func__vsnprintf=yes"
22849 else
22850   echo "configure: failed program was:" >&5
22851   cat conftest.$ac_ext >&5
22852   rm -rf conftest*
22853   eval "ac_cv_func__vsnprintf=no"
22854 fi
22855 rm -f conftest*
22856 fi
22857
22858 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22859   echo "$ac_t""yes" 1>&6
22860   ac_cv_func_vsnprintf=yes
22861         cat >> confdefs.h <<\EOF
22862 #define vsnprintf _vsnprintf
22863 EOF
22864
22865
22866 else
22867   echo "$ac_t""no" 1>&6
22868 fi
22869
22870
22871 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22872 echo "configure:22873: checking for vprintf" >&5
22873 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22874   echo $ac_n "(cached) $ac_c" 1>&6
22875 else
22876   cat > conftest.$ac_ext <<EOF
22877 #line 22878 "configure"
22878 #include "confdefs.h"
22879 /* System header to define __stub macros and hopefully few prototypes,
22880     which can conflict with char vprintf(); below.  */
22881 #include <assert.h>
22882 /* Override any gcc2 internal prototype to avoid an error.  */
22883 /* We use char because int might match the return type of a gcc2
22884     builtin and then its argument prototype would still apply.  */
22885 char vprintf();
22886 char (*f)();
22887
22888 int main() {
22889
22890 /* The GNU C library defines this for functions which it implements
22891     to always fail with ENOSYS.  Some functions are actually named
22892     something starting with __ and the normal name is an alias.  */
22893 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22894 choke me
22895 #else
22896 f = vprintf;
22897 #endif
22898
22899 ; return 0; }
22900 EOF
22901 if { (eval echo configure:22902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22902   rm -rf conftest*
22903   eval "ac_cv_func_vprintf=yes"
22904 else
22905   echo "configure: failed program was:" >&5
22906   cat conftest.$ac_ext >&5
22907   rm -rf conftest*
22908   eval "ac_cv_func_vprintf=no"
22909 fi
22910 rm -f conftest*
22911 fi
22912
22913 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22914   echo "$ac_t""yes" 1>&6
22915   cat >> confdefs.h <<\EOF
22916 #define HAVE_VPRINTF 1
22917 EOF
22918
22919 else
22920   echo "$ac_t""no" 1>&6
22921 fi
22922
22923 if test "$ac_cv_func_vprintf" != yes; then
22924 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22925 echo "configure:22926: checking for _doprnt" >&5
22926 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22927   echo $ac_n "(cached) $ac_c" 1>&6
22928 else
22929   cat > conftest.$ac_ext <<EOF
22930 #line 22931 "configure"
22931 #include "confdefs.h"
22932 /* System header to define __stub macros and hopefully few prototypes,
22933     which can conflict with char _doprnt(); below.  */
22934 #include <assert.h>
22935 /* Override any gcc2 internal prototype to avoid an error.  */
22936 /* We use char because int might match the return type of a gcc2
22937     builtin and then its argument prototype would still apply.  */
22938 char _doprnt();
22939 char (*f)();
22940
22941 int main() {
22942
22943 /* The GNU C library defines this for functions which it implements
22944     to always fail with ENOSYS.  Some functions are actually named
22945     something starting with __ and the normal name is an alias.  */
22946 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22947 choke me
22948 #else
22949 f = _doprnt;
22950 #endif
22951
22952 ; return 0; }
22953 EOF
22954 if { (eval echo configure:22955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22955   rm -rf conftest*
22956   eval "ac_cv_func__doprnt=yes"
22957 else
22958   echo "configure: failed program was:" >&5
22959   cat conftest.$ac_ext >&5
22960   rm -rf conftest*
22961   eval "ac_cv_func__doprnt=no"
22962 fi
22963 rm -f conftest*
22964 fi
22965
22966 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22967   echo "$ac_t""yes" 1>&6
22968   cat >> confdefs.h <<\EOF
22969 #define HAVE_DOPRNT 1
22970 EOF
22971
22972 else
22973   echo "$ac_t""no" 1>&6
22974 fi
22975
22976 fi
22977
22978
22979 if test $ac_cv_func_vprintf = yes ; then
22980                 for ac_func in snprintf vsnprintf
22981 do
22982 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22983 echo "configure:22984: checking for $ac_func" >&5
22984 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22985   echo $ac_n "(cached) $ac_c" 1>&6
22986 else
22987   cat > conftest.$ac_ext <<EOF
22988 #line 22989 "configure"
22989 #include "confdefs.h"
22990 /* System header to define __stub macros and hopefully few prototypes,
22991     which can conflict with char $ac_func(); below.  */
22992 #include <assert.h>
22993 /* Override any gcc2 internal prototype to avoid an error.  */
22994 /* We use char because int might match the return type of a gcc2
22995     builtin and then its argument prototype would still apply.  */
22996 char $ac_func();
22997 char (*f)();
22998
22999 int main() {
23000
23001 /* The GNU C library defines this for functions which it implements
23002     to always fail with ENOSYS.  Some functions are actually named
23003     something starting with __ and the normal name is an alias.  */
23004 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23005 choke me
23006 #else
23007 f = $ac_func;
23008 #endif
23009
23010 ; return 0; }
23011 EOF
23012 if { (eval echo configure:23013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23013   rm -rf conftest*
23014   eval "ac_cv_func_$ac_func=yes"
23015 else
23016   echo "configure: failed program was:" >&5
23017   cat conftest.$ac_ext >&5
23018   rm -rf conftest*
23019   eval "ac_cv_func_$ac_func=no"
23020 fi
23021 rm -f conftest*
23022 fi
23023
23024 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23025   echo "$ac_t""yes" 1>&6
23026     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23027   cat >> confdefs.h <<EOF
23028 #define $ac_tr_func 1
23029 EOF
23030  
23031 else
23032   echo "$ac_t""no" 1>&6
23033 fi
23034 done
23035
23036 fi
23037
23038 for ac_func in \
23039         bcopy                   \
23040         closesocket             \
23041         chroot                  \
23042         endgrent                \
23043         endpwent                \
23044         fcntl                   \
23045         flock                   \
23046         fstat                   \
23047         getdtablesize   \
23048         getgrgid                \
23049         gethostname             \
23050         getpass                 \
23051         getpassphrase   \
23052         getpwuid                \
23053         getpwnam                \
23054         getspnam                \
23055         gettimeofday    \
23056         initgroups              \
23057         lockf                   \
23058         memcpy                  \
23059         memmove                 \
23060         mkstemp                 \
23061         mktemp                  \
23062         pipe                    \
23063         read                    \
23064         recv                    \
23065         recvfrom                \
23066         setpwfile               \
23067         setgid                  \
23068         setegid                 \
23069         setsid                  \
23070         setuid                  \
23071         seteuid                 \
23072         sigaction               \
23073         signal                  \
23074         sigset                  \
23075         strdup                  \
23076         strerror                \
23077         strpbrk                 \
23078         strrchr                 \
23079         strsep                  \
23080         strstr                  \
23081         strtol                  \
23082         strtoul                 \
23083         strtoq                  \
23084         strtouq                 \
23085         strtoll                 \
23086         strspn                  \
23087         sysconf                 \
23088         usleep                  \
23089         waitpid                 \
23090         wait4                   \
23091         write                   \
23092         send                    \
23093         sendmsg                 \
23094         sendto                  \
23095
23096 do
23097 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23098 echo "configure:23099: checking for $ac_func" >&5
23099 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23100   echo $ac_n "(cached) $ac_c" 1>&6
23101 else
23102   cat > conftest.$ac_ext <<EOF
23103 #line 23104 "configure"
23104 #include "confdefs.h"
23105 /* System header to define __stub macros and hopefully few prototypes,
23106     which can conflict with char $ac_func(); below.  */
23107 #include <assert.h>
23108 /* Override any gcc2 internal prototype to avoid an error.  */
23109 /* We use char because int might match the return type of a gcc2
23110     builtin and then its argument prototype would still apply.  */
23111 char $ac_func();
23112 char (*f)();
23113
23114 int main() {
23115
23116 /* The GNU C library defines this for functions which it implements
23117     to always fail with ENOSYS.  Some functions are actually named
23118     something starting with __ and the normal name is an alias.  */
23119 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23120 choke me
23121 #else
23122 f = $ac_func;
23123 #endif
23124
23125 ; return 0; }
23126 EOF
23127 if { (eval echo configure:23128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23128   rm -rf conftest*
23129   eval "ac_cv_func_$ac_func=yes"
23130 else
23131   echo "configure: failed program was:" >&5
23132   cat conftest.$ac_ext >&5
23133   rm -rf conftest*
23134   eval "ac_cv_func_$ac_func=no"
23135 fi
23136 rm -f conftest*
23137 fi
23138
23139 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23140   echo "$ac_t""yes" 1>&6
23141     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23142   cat >> confdefs.h <<EOF
23143 #define $ac_tr_func 1
23144 EOF
23145  
23146 else
23147   echo "$ac_t""no" 1>&6
23148 fi
23149 done
23150
23151
23152 for ac_func in getopt getpeereid
23153 do
23154 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23155 echo "configure:23156: checking for $ac_func" >&5
23156 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23157   echo $ac_n "(cached) $ac_c" 1>&6
23158 else
23159   cat > conftest.$ac_ext <<EOF
23160 #line 23161 "configure"
23161 #include "confdefs.h"
23162 /* System header to define __stub macros and hopefully few prototypes,
23163     which can conflict with char $ac_func(); below.  */
23164 #include <assert.h>
23165 /* Override any gcc2 internal prototype to avoid an error.  */
23166 /* We use char because int might match the return type of a gcc2
23167     builtin and then its argument prototype would still apply.  */
23168 char $ac_func();
23169 char (*f)();
23170
23171 int main() {
23172
23173 /* The GNU C library defines this for functions which it implements
23174     to always fail with ENOSYS.  Some functions are actually named
23175     something starting with __ and the normal name is an alias.  */
23176 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23177 choke me
23178 #else
23179 f = $ac_func;
23180 #endif
23181
23182 ; return 0; }
23183 EOF
23184 if { (eval echo configure:23185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23185   rm -rf conftest*
23186   eval "ac_cv_func_$ac_func=yes"
23187 else
23188   echo "configure: failed program was:" >&5
23189   cat conftest.$ac_ext >&5
23190   rm -rf conftest*
23191   eval "ac_cv_func_$ac_func=no"
23192 fi
23193 rm -f conftest*
23194 fi
23195
23196 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23197   echo "$ac_t""yes" 1>&6
23198     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23199   cat >> confdefs.h <<EOF
23200 #define $ac_tr_func 1
23201 EOF
23202  
23203 else
23204   echo "$ac_t""no" 1>&6
23205 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23206 fi
23207 done
23208
23209
23210
23211 if test "$ac_cv_func_getopt" != yes; then
23212         LIBSRCS="$LIBSRCS getopt.c"
23213 fi
23214 if test "$ac_cv_func_getpeereid" != yes; then
23215         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23216 echo "configure:23217: checking for msg_accrights in msghdr" >&5
23217 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23218   echo $ac_n "(cached) $ac_c" 1>&6
23219 else
23220   cat > conftest.$ac_ext <<EOF
23221 #line 23222 "configure"
23222 #include "confdefs.h"
23223 #include <sys/socket.h>
23224 int main() {
23225 struct msghdr m; m.msg_accrightslen=0
23226 ; return 0; }
23227 EOF
23228 if { (eval echo configure:23229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23229   rm -rf conftest*
23230   ol_cv_msghdr_msg_accrights=yes
23231 else
23232   echo "configure: failed program was:" >&5
23233   cat conftest.$ac_ext >&5
23234   rm -rf conftest*
23235   ol_cv_msghdr_msg_accrights=no
23236 fi
23237 rm -f conftest*
23238         
23239 fi
23240
23241 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23242   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23243         cat >> confdefs.h <<\EOF
23244 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23245 EOF
23246
23247   fi
23248
23249         LIBSRCS="$LIBSRCS getpeereid.c"
23250 fi
23251 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23252         if test "$ac_cv_func_snprintf" != yes; then
23253                 cat >> confdefs.h <<\EOF
23254 #define snprintf ber_pvt_snprintf
23255 EOF
23256
23257         fi
23258         if test "$ac_cv_func_vsnprintf" != yes; then
23259                 cat >> confdefs.h <<\EOF
23260 #define vsnprintf ber_pvt_vsnprintf
23261 EOF
23262
23263         fi
23264 fi
23265
23266 # Check Configuration
23267 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23268 echo "configure:23269: checking declaration of sys_errlist" >&5
23269 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23270   echo $ac_n "(cached) $ac_c" 1>&6
23271 else
23272   
23273         cat > conftest.$ac_ext <<EOF
23274 #line 23275 "configure"
23275 #include "confdefs.h"
23276
23277 #include <stdio.h>
23278 #include <sys/types.h>
23279 #include <errno.h>
23280 #ifdef WINNT
23281 #include <stdlib.h>
23282 #endif 
23283 int main() {
23284 char *c = (char *) *sys_errlist
23285 ; return 0; }
23286 EOF
23287 if { (eval echo configure:23288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23288   rm -rf conftest*
23289   ol_cv_dcl_sys_errlist=yes
23290         ol_cv_have_sys_errlist=yes
23291 else
23292   echo "configure: failed program was:" >&5
23293   cat conftest.$ac_ext >&5
23294   rm -rf conftest*
23295   ol_cv_dcl_sys_errlist=no
23296 fi
23297 rm -f conftest*
23298 fi
23299
23300 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23301 #
23302 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23303 if test $ol_cv_dcl_sys_errlist = no ; then
23304         cat >> confdefs.h <<\EOF
23305 #define DECL_SYS_ERRLIST 1
23306 EOF
23307
23308
23309         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23310 echo "configure:23311: checking existence of sys_errlist" >&5
23311 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23312   echo $ac_n "(cached) $ac_c" 1>&6
23313 else
23314   
23315                 cat > conftest.$ac_ext <<EOF
23316 #line 23317 "configure"
23317 #include "confdefs.h"
23318 #include <errno.h>
23319 int main() {
23320 char *c = (char *) *sys_errlist
23321 ; return 0; }
23322 EOF
23323 if { (eval echo configure:23324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23324   rm -rf conftest*
23325   ol_cv_have_sys_errlist=yes
23326 else
23327   echo "configure: failed program was:" >&5
23328   cat conftest.$ac_ext >&5
23329   rm -rf conftest*
23330   ol_cv_have_sys_errlist=no
23331 fi
23332 rm -f conftest*
23333 fi
23334
23335 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23336 fi
23337 if test $ol_cv_have_sys_errlist = yes ; then
23338         cat >> confdefs.h <<\EOF
23339 #define HAVE_SYS_ERRLIST 1
23340 EOF
23341
23342 fi
23343
23344
23345
23346 if test "$ol_enable_slapi" != no ; then
23347                         for ac_hdr in ltdl.h
23348 do
23349 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23350 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23351 echo "configure:23352: checking for $ac_hdr" >&5
23352 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23353   echo $ac_n "(cached) $ac_c" 1>&6
23354 else
23355   cat > conftest.$ac_ext <<EOF
23356 #line 23357 "configure"
23357 #include "confdefs.h"
23358 #include <$ac_hdr>
23359 EOF
23360 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23361 { (eval echo configure:23362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23362 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23363 if test -z "$ac_err"; then
23364   rm -rf conftest*
23365   eval "ac_cv_header_$ac_safe=yes"
23366 else
23367   echo "$ac_err" >&5
23368   echo "configure: failed program was:" >&5
23369   cat conftest.$ac_ext >&5
23370   rm -rf conftest*
23371   eval "ac_cv_header_$ac_safe=no"
23372 fi
23373 rm -f conftest*
23374 fi
23375 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23376   echo "$ac_t""yes" 1>&6
23377     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23378   cat >> confdefs.h <<EOF
23379 #define $ac_tr_hdr 1
23380 EOF
23381  
23382 else
23383   echo "$ac_t""no" 1>&6
23384 fi
23385 done
23386
23387
23388         if test $ac_cv_header_ltdl_h != yes ; then
23389                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23390         fi
23391         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23392 echo "configure:23393: checking for lt_dlinit in -lltdl" >&5
23393 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23394 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23395   echo $ac_n "(cached) $ac_c" 1>&6
23396 else
23397   ac_save_LIBS="$LIBS"
23398 LIBS="-lltdl  $LIBS"
23399 cat > conftest.$ac_ext <<EOF
23400 #line 23401 "configure"
23401 #include "confdefs.h"
23402 /* Override any gcc2 internal prototype to avoid an error.  */
23403 /* We use char because int might match the return type of a gcc2
23404     builtin and then its argument prototype would still apply.  */
23405 char lt_dlinit();
23406
23407 int main() {
23408 lt_dlinit()
23409 ; return 0; }
23410 EOF
23411 if { (eval echo configure:23412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23412   rm -rf conftest*
23413   eval "ac_cv_lib_$ac_lib_var=yes"
23414 else
23415   echo "configure: failed program was:" >&5
23416   cat conftest.$ac_ext >&5
23417   rm -rf conftest*
23418   eval "ac_cv_lib_$ac_lib_var=no"
23419 fi
23420 rm -f conftest*
23421 LIBS="$ac_save_LIBS"
23422
23423 fi
23424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23425   echo "$ac_t""yes" 1>&6
23426   
23427                 SLAPI_LIBS=-lltdl
23428                 LIBSLAPI=libslapi.a
23429                 LIBSLAPITOOLS=../libslapi.a
23430                 cat >> confdefs.h <<\EOF
23431 #define HAVE_LIBLTDL 1
23432 EOF
23433
23434         
23435 else
23436   echo "$ac_t""no" 1>&6
23437 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23438 fi
23439
23440
23441         cat >> confdefs.h <<\EOF
23442 #define LDAP_SLAPI 1
23443 EOF
23444
23445 fi
23446
23447 if test "$ol_enable_debug" != no ; then
23448         cat >> confdefs.h <<\EOF
23449 #define LDAP_DEBUG 1
23450 EOF
23451
23452 fi
23453 if test "$ol_enable_syslog" = yes ; then
23454         cat >> confdefs.h <<\EOF
23455 #define LDAP_SYSLOG 1
23456 EOF
23457
23458 fi
23459 if test "$ol_link_kbind" != no ; then
23460         cat >> confdefs.h <<\EOF
23461 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23462 EOF
23463
23464 fi
23465 if test "$ol_enable_proctitle" != no ; then
23466         cat >> confdefs.h <<\EOF
23467 #define LDAP_PROCTITLE 1
23468 EOF
23469
23470 fi
23471 if test "$ol_enable_referrals" != no ; then
23472         cat >> confdefs.h <<\EOF
23473 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23474 EOF
23475
23476 fi
23477 if test "$ol_enable_local" != no; then
23478         cat >> confdefs.h <<\EOF
23479 #define LDAP_PF_LOCAL 1
23480 EOF
23481
23482 fi
23483 if test "$ol_link_ipv6" != no; then
23484         cat >> confdefs.h <<\EOF
23485 #define LDAP_PF_INET6 1
23486 EOF
23487
23488 fi
23489 if test "$ol_enable_cleartext" != no ; then
23490         cat >> confdefs.h <<\EOF
23491 #define SLAPD_CLEARTEXT 1
23492 EOF
23493
23494 fi
23495 if test "$ol_enable_crypt" != no ; then
23496         cat >> confdefs.h <<\EOF
23497 #define SLAPD_CRYPT 1
23498 EOF
23499
23500 fi
23501 if test "$ol_link_spasswd" != no ; then
23502         cat >> confdefs.h <<\EOF
23503 #define SLAPD_SPASSWD 1
23504 EOF
23505
23506 fi
23507 if test "$ol_enable_multimaster" != no ; then
23508         cat >> confdefs.h <<\EOF
23509 #define SLAPD_MULTIMASTER 1
23510 EOF
23511
23512 fi
23513 if test "$ol_enable_rlookups" != no ; then
23514         cat >> confdefs.h <<\EOF
23515 #define SLAPD_RLOOKUPS 1
23516 EOF
23517
23518 fi
23519 if test "$ol_enable_aci" != no ; then
23520         cat >> confdefs.h <<\EOF
23521 #define SLAPD_ACI_ENABLED 1
23522 EOF
23523
23524 fi
23525
23526 if test "$ol_link_modules" != no ; then
23527         cat >> confdefs.h <<\EOF
23528 #define SLAPD_MODULES 1
23529 EOF
23530
23531         BUILD_SLAPD=yes
23532         SLAPD_MODULES_LDFLAGS="-dlopen self"
23533 fi
23534
23535 cat >> confdefs.h <<\EOF
23536 #define SLAPD_MOD_STATIC 1
23537 EOF
23538
23539 cat >> confdefs.h <<\EOF
23540 #define SLAPD_MOD_DYNAMIC 2
23541 EOF
23542
23543
23544 if test "$ol_enable_bdb" != no ; then
23545         cat >> confdefs.h <<\EOF
23546 #define SLAPD_BDB 1
23547 EOF
23548
23549         BUILD_SLAPD=yes
23550         BUILD_BDB=yes
23551         if test "$ol_with_bdb_module" != static ; then
23552                 cat >> confdefs.h <<\EOF
23553 #define SLAPD_BDB_DYNAMIC 1
23554 EOF
23555
23556                 BUILD_BDB=mod
23557                 BUILD_BDB_DYNAMIC=shared
23558                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23559         else
23560                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23561         fi
23562 fi
23563
23564 if test "$ol_link_dnssrv" != no ; then
23565         cat >> confdefs.h <<\EOF
23566 #define SLAPD_DNSSRV 1
23567 EOF
23568
23569         BUILD_SLAPD=yes
23570         BUILD_DNSSRV=yes
23571         if test "$ol_with_dnssrv_module" != static ; then
23572                 cat >> confdefs.h <<\EOF
23573 #define SLAPD_DNSSRV_DYNAMIC 1
23574 EOF
23575
23576                 BUILD_DNSSRV=mod
23577                 BUILD_DNSSRV_DYNAMIC=shared
23578                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23579         else
23580                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23581         fi
23582 fi
23583
23584 if test "$ol_enable_hdb" != no ; then
23585         cat >> confdefs.h <<\EOF
23586 #define SLAPD_HDB 1
23587 EOF
23588
23589         BUILD_SLAPD=yes
23590         BUILD_HDB=yes
23591         if test "$ol_with_hdb_module" != static ; then
23592                 cat >> confdefs.h <<\EOF
23593 #define SLAPD_HDB_DYNAMIC 1
23594 EOF
23595
23596                 BUILD_HDB=mod
23597                 BUILD_HDB_DYNAMIC=shared
23598                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23599         else
23600                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23601         fi
23602 fi
23603
23604 if test "$ol_enable_ldap" != no ; then
23605         cat >> confdefs.h <<\EOF
23606 #define SLAPD_LDAP 1
23607 EOF
23608
23609         BUILD_SLAPD=yes
23610         BUILD_LDAP=yes
23611         if test "$ol_with_ldap_module" != static ; then
23612                 cat >> confdefs.h <<\EOF
23613 #define SLAPD_LDAP_DYNAMIC 1
23614 EOF
23615
23616                 BUILD_LDAP=mod
23617                 BUILD_LDAP_DYNAMIC=shared
23618                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23619         else
23620                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23621         fi
23622 fi
23623
23624 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23625         cat >> confdefs.h <<\EOF
23626 #define SLAPD_LDBM 1
23627 EOF
23628
23629         BUILD_SLAPD=yes
23630         BUILD_LDBM=yes
23631         if test "$ol_with_ldbm_module" != static ; then
23632                 cat >> confdefs.h <<\EOF
23633 #define SLAPD_LDBM_DYNAMIC 1
23634 EOF
23635
23636                 BUILD_LDBM=mod
23637                 BUILD_LDBM_DYNAMIC=shared
23638                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23639         else
23640                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23641         fi
23642 fi
23643
23644 if test "$ol_enable_meta" != no ; then
23645         if test "$ol_enable_ldap" = no ; then
23646                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23647         fi
23648         if test "$ol_enable_rewrite" = no ; then
23649                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23650         fi
23651         cat >> confdefs.h <<\EOF
23652 #define SLAPD_META 1
23653 EOF
23654
23655         BUILD_SLAPD=yes
23656         BUILD_META=yes
23657         BUILD_REWRITE=yes
23658         if test "$ol_with_meta_module" != static ; then
23659                 cat >> confdefs.h <<\EOF
23660 #define SLAPD_META_DYNAMIC 1
23661 EOF
23662
23663                 BUILD_META=mod
23664                 BUILD_META_DYNAMIC=shared
23665                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23666         else
23667                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23668         fi
23669 fi
23670
23671 if test "$ol_enable_monitor" != no ; then
23672         cat >> confdefs.h <<\EOF
23673 #define SLAPD_MONITOR 1
23674 EOF
23675
23676         BUILD_SLAPD=yes
23677         BUILD_MONITOR=yes
23678         if test "$ol_with_monitor_module" != static ; then
23679                 cat >> confdefs.h <<\EOF
23680 #define SLAPD_MONITOR_DYNAMIC 1
23681 EOF
23682
23683                 BUILD_MONITOR=mod
23684                 BUILD_MONITOR_DYNAMIC=shared
23685                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23686         else
23687                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23688         fi
23689 fi
23690
23691 if test "$ol_enable_null" != no ; then
23692         cat >> confdefs.h <<\EOF
23693 #define SLAPD_NULL 1
23694 EOF
23695
23696         BUILD_SLAPD=yes
23697         BUILD_NULL=yes
23698         if test "$ol_with_null_module" != static ; then
23699                 cat >> confdefs.h <<\EOF
23700 #define SLAPD_NULL_DYNAMIC 1
23701 EOF
23702
23703                 BUILD_NULL=mod
23704                 BUILD_NULL_DYNAMIC=shared
23705                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23706         else
23707                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23708         fi
23709 fi
23710
23711 if test "$ol_enable_passwd" != no ; then
23712         cat >> confdefs.h <<\EOF
23713 #define SLAPD_PASSWD 1
23714 EOF
23715
23716         BUILD_SLAPD=yes
23717         BUILD_PASSWD=yes
23718         if test "$ol_with_passwd_module" != static ; then
23719                 cat >> confdefs.h <<\EOF
23720 #define SLAPD_PASSWD_DYNAMIC 1
23721 EOF
23722
23723                 BUILD_PASSWD=mod
23724                 BUILD_PASSWD_DYNAMIC=shared
23725                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23726         else
23727                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23728         fi
23729 fi
23730
23731 if test "$ol_link_perl" != no ; then
23732         cat >> confdefs.h <<\EOF
23733 #define SLAPD_PERL 1
23734 EOF
23735
23736         BUILD_SLAPD=yes
23737         BUILD_PERL=yes
23738         if test "$ol_with_perl_module" != static ; then
23739                 cat >> confdefs.h <<\EOF
23740 #define SLAPD_PERL_DYNAMIC 1
23741 EOF
23742
23743                 BUILD_PERL=mod
23744                 BUILD_PERL_DYNAMIC=shared
23745                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23746         else
23747                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23748         fi
23749 fi
23750
23751 if test "$ol_enable_shell" != no ; then
23752         if test "$ol_link_thread" != no ; then
23753                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23754         fi
23755         cat >> confdefs.h <<\EOF
23756 #define SLAPD_SHELL 1
23757 EOF
23758
23759         BUILD_SLAPD=yes
23760         BUILD_SHELL=yes
23761         if test "$ol_with_shell_module" != static ; then
23762                 cat >> confdefs.h <<\EOF
23763 #define SLAPD_SHELL_DYNAMIC 1
23764 EOF
23765
23766                 BUILD_SHELL=mod
23767                 BUILD_SHELL_DYNAMIC=shared
23768                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23769         else
23770                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23771         fi
23772 fi
23773
23774 if test "$ol_link_sql" != no ; then
23775         cat >> confdefs.h <<\EOF
23776 #define SLAPD_SQL 1
23777 EOF
23778
23779         BUILD_SLAPD=yes
23780         BUILD_SQL=yes
23781         if test "$ol_with_sql_module" != static; then
23782                 cat >> confdefs.h <<\EOF
23783 #define SLAPD_SQL_DYNAMIC 1
23784 EOF
23785
23786                 BUILD_SQL=mod
23787                 BUILD_SQL_DYNAMIC=shared
23788                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23789         else
23790                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23791         fi
23792 fi
23793
23794 if test "$ol_with_dyngroup" != no ; then
23795         BUILD_DYNGROUP=$ol_with_dyngroup
23796         if test "$ol_with_dyngroup" = mod ; then
23797                 MFLAG=SLAPD_MOD_DYNAMIC
23798                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23799         else
23800                 MFLAG=SLAPD_MOD_STATIC
23801         fi
23802         cat >> confdefs.h <<EOF
23803 #define SLAPD_OVER_DYNGROUP $MFLAG
23804 EOF
23805
23806 fi
23807
23808 if test "$ol_with_proxycache" != no ; then
23809         BUILD_PROXYCACHE=$ol_with_proxycache
23810         if test "$ol_with_proxycache" = mod ; then
23811                 MFLAG=SLAPD_MOD_DYNAMIC
23812                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23813         else
23814                 MFLAG=SLAPD_MOD_STATIC
23815         fi
23816         cat >> confdefs.h <<EOF
23817 #define SLAPD_OVER_PROXYCACHE $MFLAG
23818 EOF
23819
23820 fi
23821
23822 if test "$ol_with_rwm " != no ; then
23823         BUILD_REWRITE=yes
23824         BUILD_RWM=$ol_with_rwm
23825         if test "$ol_with_rwm" = mod ; then
23826                 MFLAG=SLAPD_MOD_DYNAMIC
23827                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
23828         else
23829                 MFLAG=SLAPD_MOD_STATIC
23830         fi
23831         cat >> confdefs.h <<EOF
23832 #define SLAPD_OVER_RWM $MFLAG
23833 EOF
23834
23835 fi
23836
23837 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23838         $BUILD_SLAPD = yes ; then
23839         BUILD_SLURPD=yes
23840 fi
23841
23842 if test "$ol_enable_rewrite" != no ; then
23843         cat >> confdefs.h <<\EOF
23844 #define ENABLE_REWRITE 1
23845 EOF
23846
23847         BUILD_REWRITE=yes
23848 fi
23849
23850 if test "$ol_enable_slapi" != no ; then
23851         cat >> confdefs.h <<\EOF
23852 #define ENABLE_SLAPI 1
23853 EOF
23854
23855         BUILD_SLAPI=yes
23856         SLAPD_SLAPI_DEPEND=libslapi.a
23857 fi
23858
23859
23860
23861 if test "$ac_cv_mingw32" = yes ; then
23862         PLAT=NT
23863         SLAPD_MODULES_LDFLAGS=
23864 else
23865         PLAT=UNIX
23866 fi
23867
23868 if test -z "$SLAPD_STATIC_BACKENDS"; then
23869         SLAPD_NO_STATIC='#'
23870 else
23871         SLAPD_NO_STATIC=
23872 fi
23873
23874
23875
23876
23877
23878
23879
23880   
23881   
23882   
23883   
23884   
23885   
23886   
23887   
23888   
23889   
23890   
23891   
23892   
23893   
23894   
23895   
23896   
23897   
23898   
23899   
23900   
23901   
23902   
23903   
23904   
23905   
23906   
23907   
23908   
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947 # Check whether --with-xxinstall or --without-xxinstall was given.
23948 if test "${with_xxinstall+set}" = set; then
23949   withval="$with_xxinstall"
23950   :
23951 fi
23952
23953
23954
23955 trap '' 1 2 15
23956
23957 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23958
23959 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23960 # Let make expand exec_prefix.
23961 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23962
23963 # Any assignment to VPATH causes Sun make to only execute
23964 # the first set of double-colon rules, so remove it if not needed.
23965 # If there is a colon in the path, we need to keep it.
23966 if test "x$srcdir" = x.; then
23967   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23968 fi
23969
23970 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23971
23972 DEFS=-DHAVE_CONFIG_H
23973
23974 # Without the "./", some shells look in PATH for config.status.
23975 : ${CONFIG_STATUS=./config.status}
23976
23977 echo creating $CONFIG_STATUS
23978 rm -f $CONFIG_STATUS
23979 cat > $CONFIG_STATUS <<EOF
23980 #! /bin/sh
23981 # Generated automatically by configure.
23982 # Run this file to recreate the current configuration.
23983 # This directory was configured as follows,
23984 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23985 #
23986 # $0 $ac_configure_args
23987 #
23988 # Compiler output produced by configure, useful for debugging
23989 # configure, is in ./config.log if it exists.
23990
23991 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23992 for ac_option
23993 do
23994   case "\$ac_option" in
23995   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23996     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23997     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23998   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23999     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24000     exit 0 ;;
24001   -help | --help | --hel | --he | --h)
24002     echo "\$ac_cs_usage"; exit 0 ;;
24003   *) echo "\$ac_cs_usage"; exit 1 ;;
24004   esac
24005 done
24006
24007 ac_given_srcdir=$srcdir
24008 ac_given_INSTALL="$INSTALL"
24009
24010 trap 'rm -fr `echo "\
24011 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24012 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24013 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24014 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24015 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24016 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24017 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24018 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24019 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24020 include/Makefile:build/top.mk:include/Makefile.in \
24021 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24022 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24023 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24024 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24025 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24026 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24027 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24028 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24029 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24030 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24031 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24032 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24033 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24034 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24035 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24036 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24037 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24038 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24039 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24040 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24041 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24042 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24043 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24044 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24045 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24046 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24047 tests/run \
24048 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24049  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24050 EOF
24051 cat >> $CONFIG_STATUS <<EOF
24052
24053 # Protect against being on the right side of a sed subst in config.status.
24054 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24055  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24056 $ac_vpsub
24057 $extrasub
24058 s%@SHELL@%$SHELL%g
24059 s%@CFLAGS@%$CFLAGS%g
24060 s%@CPPFLAGS@%$CPPFLAGS%g
24061 s%@CXXFLAGS@%$CXXFLAGS%g
24062 s%@FFLAGS@%$FFLAGS%g
24063 s%@DEFS@%$DEFS%g
24064 s%@LDFLAGS@%$LDFLAGS%g
24065 s%@LIBS@%$LIBS%g
24066 s%@exec_prefix@%$exec_prefix%g
24067 s%@prefix@%$prefix%g
24068 s%@program_transform_name@%$program_transform_name%g
24069 s%@bindir@%$bindir%g
24070 s%@sbindir@%$sbindir%g
24071 s%@libexecdir@%$libexecdir%g
24072 s%@datadir@%$datadir%g
24073 s%@sysconfdir@%$sysconfdir%g
24074 s%@sharedstatedir@%$sharedstatedir%g
24075 s%@localstatedir@%$localstatedir%g
24076 s%@libdir@%$libdir%g
24077 s%@includedir@%$includedir%g
24078 s%@oldincludedir@%$oldincludedir%g
24079 s%@infodir@%$infodir%g
24080 s%@mandir@%$mandir%g
24081 s%@host@%$host%g
24082 s%@host_alias@%$host_alias%g
24083 s%@host_cpu@%$host_cpu%g
24084 s%@host_vendor@%$host_vendor%g
24085 s%@host_os@%$host_os%g
24086 s%@target@%$target%g
24087 s%@target_alias@%$target_alias%g
24088 s%@target_cpu@%$target_cpu%g
24089 s%@target_vendor@%$target_vendor%g
24090 s%@target_os@%$target_os%g
24091 s%@build@%$build%g
24092 s%@build_alias@%$build_alias%g
24093 s%@build_cpu@%$build_cpu%g
24094 s%@build_vendor@%$build_vendor%g
24095 s%@build_os@%$build_os%g
24096 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24097 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24098 s%@INSTALL_DATA@%$INSTALL_DATA%g
24099 s%@PACKAGE@%$PACKAGE%g
24100 s%@VERSION@%$VERSION%g
24101 s%@ACLOCAL@%$ACLOCAL%g
24102 s%@AUTOCONF@%$AUTOCONF%g
24103 s%@AUTOMAKE@%$AUTOMAKE%g
24104 s%@AUTOHEADER@%$AUTOHEADER%g
24105 s%@MAKEINFO@%$MAKEINFO%g
24106 s%@install_sh@%$install_sh%g
24107 s%@AMTAR@%$AMTAR%g
24108 s%@AWK@%$AWK%g
24109 s%@AMTARFLAGS@%$AMTARFLAGS%g
24110 s%@SET_MAKE@%$SET_MAKE%g
24111 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24112 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24113 s%@top_builddir@%$top_builddir%g
24114 s%@ldap_subdir@%$ldap_subdir%g
24115 s%@CC@%$CC%g
24116 s%@AR@%$AR%g
24117 s%@LN_S@%$LN_S%g
24118 s%@OBJEXT@%$OBJEXT%g
24119 s%@EXEEXT@%$EXEEXT%g
24120 s%@ECHO@%$ECHO%g
24121 s%@RANLIB@%$RANLIB%g
24122 s%@STRIP@%$STRIP%g
24123 s%@DLLTOOL@%$DLLTOOL%g
24124 s%@AS@%$AS%g
24125 s%@OBJDUMP@%$OBJDUMP%g
24126 s%@CPP@%$CPP%g
24127 s%@LIBTOOL@%$LIBTOOL%g
24128 s%@LN_H@%$LN_H%g
24129 s%@PERLBIN@%$PERLBIN%g
24130 s%@OL_MKDEP@%$OL_MKDEP%g
24131 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24132 s%@LTSTATIC@%$LTSTATIC%g
24133 s%@LIBOBJS@%$LIBOBJS%g
24134 s%@LIBSRCS@%$LIBSRCS%g
24135 s%@PLAT@%$PLAT%g
24136 s%@WITH_TLS@%$WITH_TLS%g
24137 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24138 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24139 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24140 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24141 s%@BUILD_BDB@%$BUILD_BDB%g
24142 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24143 s%@BUILD_HDB@%$BUILD_HDB%g
24144 s%@BUILD_LDAP@%$BUILD_LDAP%g
24145 s%@BUILD_LDBM@%$BUILD_LDBM%g
24146 s%@BUILD_META@%$BUILD_META%g
24147 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24148 s%@BUILD_NULL@%$BUILD_NULL%g
24149 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24150 s%@BUILD_PERL@%$BUILD_PERL%g
24151 s%@BUILD_SHELL@%$BUILD_SHELL%g
24152 s%@BUILD_SQL@%$BUILD_SQL%g
24153 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24154 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24155 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24156 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24157 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24158 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24159 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24160 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24161 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24162 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24163 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24164 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24165 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24166 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24167 s%@BUILD_RWM@%$BUILD_RWM%g
24168 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24169 s%@LDAP_LIBS@%$LDAP_LIBS%g
24170 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24171 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24172 s%@LDBM_LIBS@%$LDBM_LIBS%g
24173 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24174 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24175 s%@WRAP_LIBS@%$WRAP_LIBS%g
24176 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24177 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24178 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24179 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24180 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24181 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24182 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24183 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24184 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24185 s%@KRB4_LIBS@%$KRB4_LIBS%g
24186 s%@KRB5_LIBS@%$KRB5_LIBS%g
24187 s%@SASL_LIBS@%$SASL_LIBS%g
24188 s%@TLS_LIBS@%$TLS_LIBS%g
24189 s%@MODULES_LIBS@%$MODULES_LIBS%g
24190 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24191 s%@LIBSLAPI@%$LIBSLAPI%g
24192 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24193 s%@AUTH_LIBS@%$AUTH_LIBS%g
24194 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24195 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24196 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24197 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24198
24199 CEOF
24200 EOF
24201
24202 cat >> $CONFIG_STATUS <<\EOF
24203
24204 # Split the substitutions into bite-sized pieces for seds with
24205 # small command number limits, like on Digital OSF/1 and HP-UX.
24206 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24207 ac_file=1 # Number of current file.
24208 ac_beg=1 # First line for current file.
24209 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24210 ac_more_lines=:
24211 ac_sed_cmds=""
24212 while $ac_more_lines; do
24213   if test $ac_beg -gt 1; then
24214     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24215   else
24216     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24217   fi
24218   if test ! -s conftest.s$ac_file; then
24219     ac_more_lines=false
24220     rm -f conftest.s$ac_file
24221   else
24222     if test -z "$ac_sed_cmds"; then
24223       ac_sed_cmds="sed -f conftest.s$ac_file"
24224     else
24225       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24226     fi
24227     ac_file=`expr $ac_file + 1`
24228     ac_beg=$ac_end
24229     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24230   fi
24231 done
24232 if test -z "$ac_sed_cmds"; then
24233   ac_sed_cmds=cat
24234 fi
24235 EOF
24236
24237 cat >> $CONFIG_STATUS <<EOF
24238
24239 CONFIG_FILES=\${CONFIG_FILES-"\
24240 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24241 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24242 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24243 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24244 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24245 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24246 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24247 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24248 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24249 include/Makefile:build/top.mk:include/Makefile.in \
24250 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24251 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24252 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24253 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24254 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24255 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24256 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24257 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24258 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24259 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24260 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24261 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24262 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24263 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24264 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24265 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24266 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24267 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24268 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24269 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24270 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24271 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24272 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24273 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24274 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24275 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24276 tests/run \
24277 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24278 "}
24279 EOF
24280 cat >> $CONFIG_STATUS <<\EOF
24281 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24282   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24283   case "$ac_file" in
24284   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24285        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24286   *) ac_file_in="${ac_file}.in" ;;
24287   esac
24288
24289   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24290
24291   # Remove last slash and all that follows it.  Not all systems have dirname.
24292   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24293   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24294     # The file is in a subdirectory.
24295     test ! -d "$ac_dir" && mkdir "$ac_dir"
24296     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24297     # A "../" for each directory in $ac_dir_suffix.
24298     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24299   else
24300     ac_dir_suffix= ac_dots=
24301   fi
24302
24303   case "$ac_given_srcdir" in
24304   .)  srcdir=.
24305       if test -z "$ac_dots"; then top_srcdir=.
24306       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24307   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24308   *) # Relative path.
24309     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24310     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24311   esac
24312
24313   case "$ac_given_INSTALL" in
24314   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24315   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24316   esac
24317
24318   echo creating "$ac_file"
24319   rm -f "$ac_file"
24320   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24321   case "$ac_file" in
24322   *[Mm]akefile*) ac_comsub="1i\\
24323 # $configure_input" ;;
24324   *) ac_comsub= ;;
24325   esac
24326
24327   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24328   sed -e "$ac_comsub
24329 s%@configure_input@%$configure_input%g
24330 s%@srcdir@%$srcdir%g
24331 s%@top_srcdir@%$top_srcdir%g
24332 s%@INSTALL@%$INSTALL%g
24333 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24334 fi; done
24335 rm -f conftest.s*
24336
24337 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24338 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24339 #
24340 # ac_d sets the value in "#define NAME VALUE" lines.
24341 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24342 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24343 ac_dC='\3'
24344 ac_dD='%g'
24345 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24346 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24347 ac_uB='\([      ]\)%\1#\2define\3'
24348 ac_uC=' '
24349 ac_uD='\4%g'
24350 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24351 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24352 ac_eB='$%\1#\2define\3'
24353 ac_eC=' '
24354 ac_eD='%g'
24355
24356 if test "${CONFIG_HEADERS+set}" != set; then
24357 EOF
24358 cat >> $CONFIG_STATUS <<EOF
24359   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24360 EOF
24361 cat >> $CONFIG_STATUS <<\EOF
24362 fi
24363 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24364   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24365   case "$ac_file" in
24366   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24367        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24368   *) ac_file_in="${ac_file}.in" ;;
24369   esac
24370
24371   echo creating $ac_file
24372
24373   rm -f conftest.frag conftest.in conftest.out
24374   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24375   cat $ac_file_inputs > conftest.in
24376
24377 EOF
24378
24379 # Transform confdefs.h into a sed script conftest.vals that substitutes
24380 # the proper values into config.h.in to produce config.h.  And first:
24381 # Protect against being on the right side of a sed subst in config.status.
24382 # Protect against being in an unquoted here document in config.status.
24383 rm -f conftest.vals
24384 cat > conftest.hdr <<\EOF
24385 s/[\\&%]/\\&/g
24386 s%[\\$`]%\\&%g
24387 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24388 s%ac_d%ac_u%gp
24389 s%ac_u%ac_e%gp
24390 EOF
24391 sed -n -f conftest.hdr confdefs.h > conftest.vals
24392 rm -f conftest.hdr
24393
24394 # This sed command replaces #undef with comments.  This is necessary, for
24395 # example, in the case of _POSIX_SOURCE, which is predefined and required
24396 # on some systems where configure will not decide to define it.
24397 cat >> conftest.vals <<\EOF
24398 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24399 EOF
24400
24401 # Break up conftest.vals because some shells have a limit on
24402 # the size of here documents, and old seds have small limits too.
24403
24404 rm -f conftest.tail
24405 while :
24406 do
24407   ac_lines=`grep -c . conftest.vals`
24408   # grep -c gives empty output for an empty file on some AIX systems.
24409   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24410   # Write a limited-size here document to conftest.frag.
24411   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24412   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24413   echo 'CEOF
24414   sed -f conftest.frag conftest.in > conftest.out
24415   rm -f conftest.in
24416   mv conftest.out conftest.in
24417 ' >> $CONFIG_STATUS
24418   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24419   rm -f conftest.vals
24420   mv conftest.tail conftest.vals
24421 done
24422 rm -f conftest.vals
24423
24424 cat >> $CONFIG_STATUS <<\EOF
24425   rm -f conftest.frag conftest.h
24426   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24427   cat conftest.in >> conftest.h
24428   rm -f conftest.in
24429   if cmp -s $ac_file conftest.h 2>/dev/null; then
24430     echo "$ac_file is unchanged"
24431     rm -f conftest.h
24432   else
24433     # Remove last slash and all that follows it.  Not all systems have dirname.
24434       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24435       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24436       # The file is in a subdirectory.
24437       test ! -d "$ac_dir" && mkdir "$ac_dir"
24438     fi
24439     rm -f $ac_file
24440     mv conftest.h $ac_file
24441   fi
24442 fi; done
24443
24444 EOF
24445 cat >> $CONFIG_STATUS <<EOF
24446
24447 EOF
24448 cat >> $CONFIG_STATUS <<\EOF
24449
24450 chmod +x tests/run
24451 date > stamp-h
24452 echo Please run \"make depend\" to build dependencies
24453
24454 exit 0
24455 EOF
24456 chmod +x $CONFIG_STATUS
24457 rm -fr confdefs* $ac_clean_files
24458 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24459