]> git.sur5r.net Git - openldap/blob - configure
57660f8af108b5d1b6b45398cf01a0358f2dba59
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.511 2004/01/17 00:38:14 hyc Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --enable-x-compile      enable cross compiling [no]"
49 ac_help="$ac_help
50   --with-cyrus-sasl       with Cyrus SASL support [auto]"
51 ac_help="$ac_help
52   --with-fetch            with fetch(3) URL support [auto]"
53 ac_help="$ac_help
54   --with-threads          with threads [auto]"
55 ac_help="$ac_help
56   --with-tls              with TLS/SSL support [auto]"
57 ac_help="$ac_help
58   --with-yielding-select  with implicitly yielding select [auto]"
59 ac_help="$ac_help
60
61 SLAPD (Standalone LDAP Daemon) Options:"
62 ac_help="$ac_help
63   --enable-slapd          enable building slapd [yes]"
64 ac_help="$ac_help
65     --enable-aci          enable per-object ACIs (experimental) [no]"
66 ac_help="$ac_help
67     --enable-cleartext    enable cleartext passwords [yes]"
68 ac_help="$ac_help
69     --enable-crypt        enable crypt(3) passwords [no]"
70 ac_help="$ac_help
71     --enable-lmpasswd     enable LAN Manager passwords [no]"
72 ac_help="$ac_help
73     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
74 ac_help="$ac_help
75     --enable-modules      enable dynamic module support [no]"
76 ac_help="$ac_help
77     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
78 ac_help="$ac_help
79     --enable-rlookups     enable reverse lookups of client hostnames [no]"
80 ac_help="$ac_help
81     --enable-slapi        enable SLAPI support (experimental) [no]"
82 ac_help="$ac_help
83     --enable-slp          enable SLPv2 support [no]"
84 ac_help="$ac_help
85     --enable-wrappers     enable tcp wrapper support [no]"
86 ac_help="$ac_help
87     --enable-bdb          enable Berkeley DB backend [yes]"
88 ac_help="$ac_help
89     --with-bdb-module     module type static|dynamic [static]"
90 ac_help="$ac_help
91     --enable-dnssrv       enable dnssrv backend [no]"
92 ac_help="$ac_help
93     --with-dnssrv-module  module type static|dynamic [static]"
94 ac_help="$ac_help
95     --enable-hdb          enable Hierarchical DB backend [no]"
96 ac_help="$ac_help
97     --with-hdb-module     module type static|dynamic [static]"
98 ac_help="$ac_help
99     --enable-ldap         enable ldap backend [no]"
100 ac_help="$ac_help
101     --with-ldap-module    module type static|dynamic [static]"
102 ac_help="$ac_help
103     --enable-ldbm         enable ldbm backend [no]"
104 ac_help="$ac_help
105     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
106 ac_help="$ac_help
107     --with-ldbm-module    module type static|dynamic [static]"
108 ac_help="$ac_help
109     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
110 ac_help="$ac_help
111     --enable-meta         enable metadirectory backend [no]"
112 ac_help="$ac_help
113     --with-meta-module    module type static|dynamic [static]"
114 ac_help="$ac_help
115     --enable-monitor      enable monitor backend [yes]"
116 ac_help="$ac_help
117     --with-monitor-module module type static|dynamic [static]"
118 ac_help="$ac_help
119     --enable-null         enable null backend [no]"
120 ac_help="$ac_help
121     --with-null-module    module type static|dynamic [static]"
122 ac_help="$ac_help
123     --enable-passwd       enable passwd backend [no]"
124 ac_help="$ac_help
125     --with-passwd-module  module type static|dynamic [static]"
126 ac_help="$ac_help
127     --enable-perl         enable perl backend [no]"
128 ac_help="$ac_help
129     --with-perl-module    module type static|dynamic [static]"
130 ac_help="$ac_help
131     --enable-shell        enable shell backend [no]"
132 ac_help="$ac_help
133     --with-shell-module   module type static|dynamic [static]"
134 ac_help="$ac_help
135     --enable-sql          enable sql backend [no]"
136 ac_help="$ac_help
137     --with-sql-module     module type static|dynamic [static]"
138 ac_help="$ac_help
139
140 SLAPD Overlay Options:"
141 ac_help="$ac_help
142     --with-dyngroup       Dynamic Group overlay no|yes|mod [no]"
143 ac_help="$ac_help
144     --with-proxycache     Proxy Cache overlay no|yes|mod [no]"
145 ac_help="$ac_help
146     --with-rwm            Rewrite/Remap overlay no|yes|mod [no]"
147 ac_help="$ac_help
148
149 SLURPD (Replication Daemon) Options:"
150 ac_help="$ac_help
151   --enable-slurpd         enable building slurpd [auto]"
152 ac_help="$ac_help
153
154 Library Generation & Linking Options"
155 ac_help="$ac_help
156   --enable-static[=PKGS]  build static libraries [default=yes]"
157 ac_help="$ac_help
158   --enable-shared[=PKGS]  build shared libraries [default=yes]"
159 ac_help="$ac_help
160   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
161 ac_help="$ac_help
162   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
163
164 # Find the correct PATH separator.  Usually this is `:', but
165 # DJGPP uses `;' like DOS.
166 if test "X${PATH_SEPARATOR+set}" != Xset; then
167   UNAME=${UNAME-`uname 2>/dev/null`}
168   case X$UNAME in
169     *-DOS) lt_cv_sys_path_separator=';' ;;
170     *)     lt_cv_sys_path_separator=':' ;;
171   esac
172   PATH_SEPARATOR=$lt_cv_sys_path_separator
173 fi
174
175
176 # Check that we are running under the correct shell.
177 SHELL=${CONFIG_SHELL-/bin/sh}
178
179 case X$ECHO in
180 X*--fallback-echo)
181   # Remove one level of quotation (which was required for Make).
182   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
183   ;;
184 esac
185
186 echo=${ECHO-echo}
187 if test "X$1" = X--no-reexec; then
188   # Discard the --no-reexec flag, and continue.
189   shift
190 elif test "X$1" = X--fallback-echo; then
191   # Avoid inline document here, it may be left over
192   :
193 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
194   # Yippee, $echo works!
195   :
196 else
197   # Restart under the correct shell.
198   exec $SHELL "$0" --no-reexec ${1+"$@"}
199 fi
200
201 if test "X$1" = X--fallback-echo; then
202   # used as fallback echo
203   shift
204   cat <<EOF
205
206 EOF
207   exit 0
208 fi
209
210 # The HP-UX ksh and POSIX shell print the target directory to stdout
211 # if CDPATH is set.
212 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
213
214 if test -z "$ECHO"; then
215 if test "X${echo_test_string+set}" != Xset; then
216 # find a string as large as possible, as long as the shell can cope with it
217   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
218     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
219     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
220        echo_test_string="`eval $cmd`" &&
221        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
222     then
223       break
224     fi
225   done
226 fi
227
228 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
229    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
230    test "X$echo_testing_string" = "X$echo_test_string"; then
231   :
232 else
233   # The Solaris, AIX, and Digital Unix default echo programs unquote
234   # backslashes.  This makes it impossible to quote backslashes using
235   #   echo "$something" | sed 's/\\/\\\\/g'
236   #
237   # So, first we look for a working echo in the user's PATH.
238
239   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
240   for dir in $PATH /usr/ucb; do
241     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
242        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
243        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
244        test "X$echo_testing_string" = "X$echo_test_string"; then
245       echo="$dir/echo"
246       break
247     fi
248   done
249   IFS="$save_ifs"
250
251   if test "X$echo" = Xecho; then
252     # We didn't find a better echo, so look for alternatives.
253     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
254        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
255        test "X$echo_testing_string" = "X$echo_test_string"; then
256       # This shell has a builtin print -r that does the trick.
257       echo='print -r'
258     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
259          test "X$CONFIG_SHELL" != X/bin/ksh; then
260       # If we have ksh, try running configure again with it.
261       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
262       export ORIGINAL_CONFIG_SHELL
263       CONFIG_SHELL=/bin/ksh
264       export CONFIG_SHELL
265       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
266     else
267       # Try using printf.
268       echo='printf %s\n'
269       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
270          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
271          test "X$echo_testing_string" = "X$echo_test_string"; then
272         # Cool, printf works
273         :
274       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
275            test "X$echo_testing_string" = 'X\t' &&
276            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
277            test "X$echo_testing_string" = "X$echo_test_string"; then
278         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
279         export CONFIG_SHELL
280         SHELL="$CONFIG_SHELL"
281         export SHELL
282         echo="$CONFIG_SHELL $0 --fallback-echo"
283       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
284            test "X$echo_testing_string" = 'X\t' &&
285            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
286            test "X$echo_testing_string" = "X$echo_test_string"; then
287         echo="$CONFIG_SHELL $0 --fallback-echo"
288       else
289         # maybe with a smaller string...
290         prev=:
291
292         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
293           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
294           then
295             break
296           fi
297           prev="$cmd"
298         done
299
300         if test "$prev" != 'sed 50q "$0"'; then
301           echo_test_string=`eval $prev`
302           export echo_test_string
303           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
304         else
305           # Oops.  We lost completely, so just stick with echo.
306           echo=echo
307         fi
308       fi
309     fi
310   fi
311 fi
312 fi
313
314 # Copy echo and quote the copy suitably for passing to libtool from
315 # the Makefile, instead of quoting the original, which is used later.
316 ECHO=$echo
317 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
318    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
319 fi
320
321
322 ac_help="$ac_help
323   --disable-libtool-lock  avoid locking (might break parallel builds)"
324 ac_help="$ac_help
325   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
326 ac_help="$ac_help
327
328 See INSTALL file for further details."
329
330 # Initialize some variables set by options.
331 # The variables have the same names as the options, with
332 # dashes changed to underlines.
333 build=NONE
334 cache_file=./config.cache
335 exec_prefix=NONE
336 host=NONE
337 no_create=
338 nonopt=NONE
339 no_recursion=
340 prefix=NONE
341 program_prefix=NONE
342 program_suffix=NONE
343 program_transform_name=s,x,x,
344 silent=
345 site=
346 srcdir=
347 target=NONE
348 verbose=
349 x_includes=NONE
350 x_libraries=NONE
351 bindir='${exec_prefix}/bin'
352 sbindir='${exec_prefix}/sbin'
353 libexecdir='${exec_prefix}/libexec'
354 datadir='${prefix}/share'
355 sysconfdir='${prefix}/etc'
356 sharedstatedir='${prefix}/com'
357 localstatedir='${prefix}/var'
358 libdir='${exec_prefix}/lib'
359 includedir='${prefix}/include'
360 oldincludedir='/usr/include'
361 infodir='${prefix}/info'
362 mandir='${prefix}/man'
363
364 # Initialize some other variables.
365 subdirs=
366 MFLAGS= MAKEFLAGS=
367 SHELL=${CONFIG_SHELL-/bin/sh}
368 # Maximum number of lines to put in a shell here document.
369 ac_max_here_lines=12
370
371 ac_prev=
372 for ac_option
373 do
374
375   # If the previous option needs an argument, assign it.
376   if test -n "$ac_prev"; then
377     eval "$ac_prev=\$ac_option"
378     ac_prev=
379     continue
380   fi
381
382   case "$ac_option" in
383   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
384   *) ac_optarg= ;;
385   esac
386
387   # Accept the important Cygnus configure options, so we can diagnose typos.
388
389   case "$ac_option" in
390
391   -bindir | --bindir | --bindi | --bind | --bin | --bi)
392     ac_prev=bindir ;;
393   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
394     bindir="$ac_optarg" ;;
395
396   -build | --build | --buil | --bui | --bu)
397     ac_prev=build ;;
398   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
399     build="$ac_optarg" ;;
400
401   -cache-file | --cache-file | --cache-fil | --cache-fi \
402   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
403     ac_prev=cache_file ;;
404   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
405   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
406     cache_file="$ac_optarg" ;;
407
408   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
409     ac_prev=datadir ;;
410   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
411   | --da=*)
412     datadir="$ac_optarg" ;;
413
414   -disable-* | --disable-*)
415     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
416     # Reject names that are not valid shell variable names.
417     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
418       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
419     fi
420     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
421     eval "enable_${ac_feature}=no" ;;
422
423   -enable-* | --enable-*)
424     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
425     # Reject names that are not valid shell variable names.
426     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
427       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
428     fi
429     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
430     case "$ac_option" in
431       *=*) ;;
432       *) ac_optarg=yes ;;
433     esac
434     eval "enable_${ac_feature}='$ac_optarg'" ;;
435
436   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
437   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
438   | --exec | --exe | --ex)
439     ac_prev=exec_prefix ;;
440   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
441   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
442   | --exec=* | --exe=* | --ex=*)
443     exec_prefix="$ac_optarg" ;;
444
445   -gas | --gas | --ga | --g)
446     # Obsolete; use --with-gas.
447     with_gas=yes ;;
448
449   -help | --help | --hel | --he)
450     # Omit some internal or obsolete options to make the list less imposing.
451     # This message is too long to be a string in the A/UX 3.1 sh.
452     cat << EOF
453 Usage: configure [options] [host]
454 Options: [defaults in brackets after descriptions]
455 Configuration:
456   --cache-file=FILE       cache test results in FILE
457   --help                  print this message
458   --no-create             do not create output files
459   --quiet, --silent       do not print \`checking...' messages
460   --version               print the version of autoconf that created configure
461 Directory and file names:
462   --prefix=PREFIX         install architecture-independent files in PREFIX
463                           [$ac_default_prefix]
464   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
465                           [same as prefix]
466   --bindir=DIR            user executables in DIR [EPREFIX/bin]
467   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
468   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
469   --datadir=DIR           read-only architecture-independent data in DIR
470                           [PREFIX/share]
471   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
472   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
473                           [PREFIX/com]
474   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
475   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
476   --includedir=DIR        C header files in DIR [PREFIX/include]
477   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
478   --infodir=DIR           info documentation in DIR [PREFIX/info]
479   --mandir=DIR            man documentation in DIR [PREFIX/man]
480   --srcdir=DIR            find the sources in DIR [configure dir or ..]
481   --program-prefix=PREFIX prepend PREFIX to installed program names
482   --program-suffix=SUFFIX append SUFFIX to installed program names
483   --program-transform-name=PROGRAM
484                           run sed PROGRAM on installed program names
485 EOF
486     cat << EOF
487 Host type:
488   --build=BUILD           configure for building on BUILD [BUILD=HOST]
489   --host=HOST             configure for HOST [guessed]
490   --target=TARGET         configure for TARGET [TARGET=HOST]
491 Features and packages:
492   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
493   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
494   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
495   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
496   --x-includes=DIR        X include files are in DIR
497   --x-libraries=DIR       X library files are in DIR
498 EOF
499     if test -n "$ac_help"; then
500       echo "--enable and --with options recognized:$ac_help"
501     fi
502     exit 0 ;;
503
504   -host | --host | --hos | --ho)
505     ac_prev=host ;;
506   -host=* | --host=* | --hos=* | --ho=*)
507     host="$ac_optarg" ;;
508
509   -includedir | --includedir | --includedi | --included | --include \
510   | --includ | --inclu | --incl | --inc)
511     ac_prev=includedir ;;
512   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
513   | --includ=* | --inclu=* | --incl=* | --inc=*)
514     includedir="$ac_optarg" ;;
515
516   -infodir | --infodir | --infodi | --infod | --info | --inf)
517     ac_prev=infodir ;;
518   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
519     infodir="$ac_optarg" ;;
520
521   -libdir | --libdir | --libdi | --libd)
522     ac_prev=libdir ;;
523   -libdir=* | --libdir=* | --libdi=* | --libd=*)
524     libdir="$ac_optarg" ;;
525
526   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
527   | --libexe | --libex | --libe)
528     ac_prev=libexecdir ;;
529   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
530   | --libexe=* | --libex=* | --libe=*)
531     libexecdir="$ac_optarg" ;;
532
533   -localstatedir | --localstatedir | --localstatedi | --localstated \
534   | --localstate | --localstat | --localsta | --localst \
535   | --locals | --local | --loca | --loc | --lo)
536     ac_prev=localstatedir ;;
537   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
538   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
539   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
540     localstatedir="$ac_optarg" ;;
541
542   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
543     ac_prev=mandir ;;
544   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
545     mandir="$ac_optarg" ;;
546
547   -nfp | --nfp | --nf)
548     # Obsolete; use --without-fp.
549     with_fp=no ;;
550
551   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
552   | --no-cr | --no-c)
553     no_create=yes ;;
554
555   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
556   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
557     no_recursion=yes ;;
558
559   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
560   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
561   | --oldin | --oldi | --old | --ol | --o)
562     ac_prev=oldincludedir ;;
563   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
564   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
565   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
566     oldincludedir="$ac_optarg" ;;
567
568   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
569     ac_prev=prefix ;;
570   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
571     prefix="$ac_optarg" ;;
572
573   -program-prefix | --program-prefix | --program-prefi | --program-pref \
574   | --program-pre | --program-pr | --program-p)
575     ac_prev=program_prefix ;;
576   -program-prefix=* | --program-prefix=* | --program-prefi=* \
577   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
578     program_prefix="$ac_optarg" ;;
579
580   -program-suffix | --program-suffix | --program-suffi | --program-suff \
581   | --program-suf | --program-su | --program-s)
582     ac_prev=program_suffix ;;
583   -program-suffix=* | --program-suffix=* | --program-suffi=* \
584   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
585     program_suffix="$ac_optarg" ;;
586
587   -program-transform-name | --program-transform-name \
588   | --program-transform-nam | --program-transform-na \
589   | --program-transform-n | --program-transform- \
590   | --program-transform | --program-transfor \
591   | --program-transfo | --program-transf \
592   | --program-trans | --program-tran \
593   | --progr-tra | --program-tr | --program-t)
594     ac_prev=program_transform_name ;;
595   -program-transform-name=* | --program-transform-name=* \
596   | --program-transform-nam=* | --program-transform-na=* \
597   | --program-transform-n=* | --program-transform-=* \
598   | --program-transform=* | --program-transfor=* \
599   | --program-transfo=* | --program-transf=* \
600   | --program-trans=* | --program-tran=* \
601   | --progr-tra=* | --program-tr=* | --program-t=*)
602     program_transform_name="$ac_optarg" ;;
603
604   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
605   | -silent | --silent | --silen | --sile | --sil)
606     silent=yes ;;
607
608   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
609     ac_prev=sbindir ;;
610   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
611   | --sbi=* | --sb=*)
612     sbindir="$ac_optarg" ;;
613
614   -sharedstatedir | --sharedstatedir | --sharedstatedi \
615   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
616   | --sharedst | --shareds | --shared | --share | --shar \
617   | --sha | --sh)
618     ac_prev=sharedstatedir ;;
619   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
620   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
621   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
622   | --sha=* | --sh=*)
623     sharedstatedir="$ac_optarg" ;;
624
625   -site | --site | --sit)
626     ac_prev=site ;;
627   -site=* | --site=* | --sit=*)
628     site="$ac_optarg" ;;
629
630   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
631     ac_prev=srcdir ;;
632   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
633     srcdir="$ac_optarg" ;;
634
635   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
636   | --syscon | --sysco | --sysc | --sys | --sy)
637     ac_prev=sysconfdir ;;
638   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
639   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
640     sysconfdir="$ac_optarg" ;;
641
642   -target | --target | --targe | --targ | --tar | --ta | --t)
643     ac_prev=target ;;
644   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
645     target="$ac_optarg" ;;
646
647   -v | -verbose | --verbose | --verbos | --verbo | --verb)
648     verbose=yes ;;
649
650   -version | --version | --versio | --versi | --vers)
651     echo "configure generated by autoconf version 2.13.1"
652     exit 0 ;;
653
654   -with-* | --with-*)
655     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
656     # Reject names that are not valid shell variable names.
657     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
658       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
659     fi
660     ac_package=`echo $ac_package| sed 's/-/_/g'`
661     case "$ac_option" in
662       *=*) ;;
663       *) ac_optarg=yes ;;
664     esac
665     eval "with_${ac_package}='$ac_optarg'" ;;
666
667   -without-* | --without-*)
668     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
669     # Reject names that are not valid shell variable names.
670     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
671       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
672     fi
673     ac_package=`echo $ac_package| sed 's/-/_/g'`
674     eval "with_${ac_package}=no" ;;
675
676   --x)
677     # Obsolete; use --with-x.
678     with_x=yes ;;
679
680   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
681   | --x-incl | --x-inc | --x-in | --x-i)
682     ac_prev=x_includes ;;
683   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
684   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
685     x_includes="$ac_optarg" ;;
686
687   -x-libraries | --x-libraries | --x-librarie | --x-librari \
688   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
689     ac_prev=x_libraries ;;
690   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
691   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
692     x_libraries="$ac_optarg" ;;
693
694   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
695     ;;
696
697   *)
698     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
699       echo "configure: warning: $ac_option: invalid host type" 1>&2
700     fi
701     if test "x$nonopt" != xNONE; then
702       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
703     fi
704     nonopt="$ac_option"
705     ;;
706
707   esac
708 done
709
710 if test -n "$ac_prev"; then
711   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
712 fi
713
714 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
715
716 # File descriptor usage:
717 # 0 standard input
718 # 1 file creation
719 # 2 errors and warnings
720 # 3 some systems may open it to /dev/tty
721 # 4 used on the Kubota Titan
722 # 6 checking for... messages and results
723 # 5 compiler messages saved in config.log
724 if test "$silent" = yes; then
725   exec 6>/dev/null
726 else
727   exec 6>&1
728 fi
729 exec 5>./config.log
730
731 echo "\
732 This file contains any messages produced by compilers while
733 running configure, to aid debugging if configure makes a mistake.
734 " 1>&5
735
736 # Strip out --no-create and --no-recursion so they do not pile up.
737 # Also quote any args containing shell metacharacters.
738 ac_configure_args=
739 for ac_arg
740 do
741   case "$ac_arg" in
742   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
743   | --no-cr | --no-c) ;;
744   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
745   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
746   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
747   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
748   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
749   esac
750 done
751
752 # NLS nuisances.
753 # Only set these to C if already set.  These must not be set unconditionally
754 # because not all systems understand e.g. LANG=C (notably SCO).
755 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
756 # Non-C LC_CTYPE values break the ctype check.
757 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
758 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
759 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
760 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
761
762 # confdefs.h avoids OS command line length limits that DEFS can exceed.
763 rm -rf conftest* confdefs.h
764 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
765 echo > confdefs.h
766
767 # A filename unique to this package, relative to the directory that
768 # configure is in, which we can look for to find out if srcdir is correct.
769 ac_unique_file=build/version.sh
770
771 # Find the source files, if location was not specified.
772 if test -z "$srcdir"; then
773   ac_srcdir_defaulted=yes
774   # Try the directory containing this script, then its parent.
775   ac_prog=$0
776   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
777   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
778   srcdir=$ac_confdir
779   if test ! -r $srcdir/$ac_unique_file; then
780     srcdir=..
781   fi
782 else
783   ac_srcdir_defaulted=no
784 fi
785 if test ! -r $srcdir/$ac_unique_file; then
786   if test "$ac_srcdir_defaulted" = yes; then
787     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
788   else
789     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
790   fi
791 fi
792 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
793
794 # Prefer explicitly selected file to automatically selected ones.
795 if test -z "$CONFIG_SITE"; then
796   if test "x$prefix" != xNONE; then
797     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
798   else
799     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
800   fi
801 fi
802 for ac_site_file in $CONFIG_SITE; do
803   if test -r "$ac_site_file"; then
804     echo "loading site script $ac_site_file"
805     . "$ac_site_file"
806   fi
807 done
808
809
810 ac_ext=c
811 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
812 ac_cpp='$CPP $CPPFLAGS'
813 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
814 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
815 cross_compiling=$ac_cv_prog_cc_cross
816
817 ac_exeext=
818 ac_objext=o
819 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
820   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
821   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
822     ac_n= ac_c='
823 ' ac_t='        '
824   else
825     ac_n=-n ac_c= ac_t=
826   fi
827 else
828   ac_n= ac_c='\c' ac_t=
829 fi
830
831
832 # set unset (borrowed from autoconf 2.49c)
833 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
834   ol_unset=unset
835 else
836   ol_unset=false
837 fi
838 # unset CDPATH
839 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
840
841 ac_aux_dir=
842 for ac_dir in build $srcdir/build; do
843   if test -f $ac_dir/install-sh; then
844     ac_aux_dir=$ac_dir
845     ac_install_sh="$ac_aux_dir/install-sh -c"
846     break
847   elif test -f $ac_dir/install.sh; then
848     ac_aux_dir=$ac_dir
849     ac_install_sh="$ac_aux_dir/install.sh -c"
850     break
851   elif test -f $ac_dir/shtool; then
852     ac_aux_dir=$ac_dir
853     ac_install_sh="$ac_aux_dir/shtool install -c"
854     break
855   fi
856 done
857 if test -z "$ac_aux_dir"; then
858   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
859 fi
860 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
861 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
862 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
863
864 eval `$ac_aux_dir/version.sh`
865 if test -z "$OL_STRING"; then
866         { echo "configure: error: could not determine version" 1>&2; exit 1; }
867 fi
868
869 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
870         ac_cv_shtool="$ac_aux_dir/shtool"
871 else
872         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
873 fi
874
875 SHTOOL="$ac_cv_shtool"
876
877 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
878 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
879
880 OPENLDAP_CVS=""
881 if test -d $ac_aux_dir/CVS; then
882         OPENLDAP_CVS="(from CVS sources) "
883 fi
884
885 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
886
887
888 echo $ac_n "checking host system type""... $ac_c" 1>&6
889 echo "configure:890: checking host system type" >&5
890 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
891
892 # Make sure we can run config.sub.
893   if $ac_config_sub sun4 >/dev/null 2>&1; then :
894     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
895   fi
896
897   ac_cv_host_alias=$host
898   case "$ac_cv_host_alias" in
899   NONE)
900     case $nonopt in
901     NONE)
902       if ac_cv_host_alias=`$ac_config_guess`; then :
903       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
904       fi ;;
905     *) ac_cv_host_alias=$nonopt ;;
906     esac ;;
907   esac
908
909   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
910   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
911   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
912   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
913 else
914   echo $ac_n "(cached) $ac_c" 1>&6
915 fi
916
917 echo "$ac_t""$ac_cv_host" 1>&6
918
919 host=$ac_cv_host
920 host_alias=$ac_cv_host_alias
921 host_cpu=$ac_cv_host_cpu
922 host_vendor=$ac_cv_host_vendor
923 host_os=$ac_cv_host_os
924
925
926
927
928
929 echo $ac_n "checking target system type""... $ac_c" 1>&6
930 echo "configure:931: checking target system type" >&5
931 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
932
933 # Make sure we can run config.sub.
934   if $ac_config_sub sun4 >/dev/null 2>&1; then :
935     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
936   fi
937
938   ac_cv_target_alias=$target
939   case "$ac_cv_target_alias" in
940   NONE)
941     case $nonopt in
942     NONE)
943       ac_cv_target_alias=$host_alias ;;
944
945     *) ac_cv_target_alias=$nonopt ;;
946     esac ;;
947   esac
948
949   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
950   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
951   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
952   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
953 else
954   echo $ac_n "(cached) $ac_c" 1>&6
955 fi
956
957 echo "$ac_t""$ac_cv_target" 1>&6
958
959 target=$ac_cv_target
960 target_alias=$ac_cv_target_alias
961 target_cpu=$ac_cv_target_cpu
962 target_vendor=$ac_cv_target_vendor
963 target_os=$ac_cv_target_os
964
965
966
967
968
969 echo $ac_n "checking build system type""... $ac_c" 1>&6
970 echo "configure:971: checking build system type" >&5
971 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
972
973 # Make sure we can run config.sub.
974   if $ac_config_sub sun4 >/dev/null 2>&1; then :
975     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
976   fi
977
978   ac_cv_build_alias=$build
979   case "$ac_cv_build_alias" in
980   NONE)
981     case $nonopt in
982     NONE)
983       ac_cv_build_alias=$host_alias ;;
984
985     *) ac_cv_build_alias=$nonopt ;;
986     esac ;;
987   esac
988
989   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
990   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
991   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
992   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
993 else
994   echo $ac_n "(cached) $ac_c" 1>&6
995 fi
996
997 echo "$ac_t""$ac_cv_build" 1>&6
998
999 build=$ac_cv_build
1000 build_alias=$ac_cv_build_alias
1001 build_cpu=$ac_cv_build_cpu
1002 build_vendor=$ac_cv_build_vendor
1003 build_os=$ac_cv_build_os
1004
1005
1006
1007
1008
1009 # Do some error checking and defaulting for the host and target type.
1010 # The inputs are:
1011 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1012 #
1013 # The rules are:
1014 # 1. You are not allowed to specify --host, --target, and nonopt at the
1015 #    same time.
1016 # 2. Host defaults to nonopt.
1017 # 3. If nonopt is not specified, then host defaults to the current host,
1018 #    as determined by config.guess.
1019 # 4. Target and build default to nonopt.
1020 # 5. If nonopt is not specified, then target and build default to host.
1021
1022 # The aliases save the names the user supplied, while $host etc.
1023 # will get canonicalized.
1024 case $host---$target---$nonopt in
1025 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1026 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1027 esac
1028
1029 test "$host_alias" != "$target_alias" &&
1030   test "$program_prefix$program_suffix$program_transform_name" = \
1031     NONENONEs,x,x, &&
1032   program_prefix=${target_alias}-
1033
1034
1035 # Find a good install program.  We prefer a C program (faster),
1036 # so one script is as good as another.  But avoid the broken or
1037 # incompatible versions:
1038 # SysV /etc/install, /usr/sbin/install
1039 # SunOS /usr/etc/install
1040 # IRIX /sbin/install
1041 # AIX /bin/install
1042 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1043 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1044 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1045 # ./install, which can be erroneously created by make from ./install.sh.
1046 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1047 echo "configure:1048: checking for a BSD compatible install" >&5
1048 if test -z "$INSTALL"; then
1049 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1050   echo $ac_n "(cached) $ac_c" 1>&6
1051 else
1052     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1053   for ac_dir in $PATH; do
1054     # Account for people who put trailing slashes in PATH elements.
1055     case "$ac_dir/" in
1056     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1057     *)
1058       # OSF1 and SCO ODT 3.0 have their own names for install.
1059       # Don't use installbsd from OSF since it installs stuff as root
1060       # by default.
1061       for ac_prog in ginstall scoinst install; do
1062         if test -f $ac_dir/$ac_prog; then
1063           if test $ac_prog = install &&
1064             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1065             # AIX install.  It has an incompatible calling convention.
1066             :
1067           elif test $ac_prog = install &&
1068             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1069             # program-specific install script used by HP pwplus--don't use.
1070             :
1071           else
1072             ac_cv_path_install="$ac_dir/$ac_prog -c"
1073             break 2
1074           fi
1075         fi
1076       done
1077       ;;
1078     esac
1079   done
1080   IFS="$ac_save_IFS"
1081
1082 fi
1083   if test "${ac_cv_path_install+set}" = set; then
1084     INSTALL="$ac_cv_path_install"
1085   else
1086     # As a last resort, use the slow shell script.  We don't cache a
1087     # path for INSTALL within a source directory, because that will
1088     # break other packages using the cache if that directory is
1089     # removed, or if the path is relative.
1090     INSTALL="$ac_install_sh"
1091   fi
1092 fi
1093 echo "$ac_t""$INSTALL" 1>&6
1094
1095 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1096 # It thinks the first close brace ends the variable substitution.
1097 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1098
1099 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1100
1101 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1102
1103 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1104 echo "configure:1105: checking whether build environment is sane" >&5
1105 # Just in case
1106 sleep 1
1107 echo timestamp > conftestfile
1108 # Do `set' in a subshell so we don't clobber the current shell's
1109 # arguments.  Must try -L first in case configure is actually a
1110 # symlink; some systems play weird games with the mod time of symlinks
1111 # (eg FreeBSD returns the mod time of the symlink's containing
1112 # directory).
1113 if (
1114    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1115    if test "$*" = "X"; then
1116       # -L didn't work.
1117       set X `ls -t $srcdir/configure conftestfile`
1118    fi
1119    if test "$*" != "X $srcdir/configure conftestfile" \
1120       && test "$*" != "X conftestfile $srcdir/configure"; then
1121
1122       # If neither matched, then we have a broken ls.  This can happen
1123       # if, for instance, CONFIG_SHELL is bash and it inherits a
1124       # broken ls alias from the environment.  This has actually
1125       # happened.  Such a system could not be considered "sane".
1126       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1127 alias in your environment" 1>&2; exit 1; }
1128    fi
1129
1130    test "$2" = conftestfile
1131    )
1132 then
1133    # Ok.
1134    :
1135 else
1136    { echo "configure: error: newly created file is older than distributed files!
1137 Check your system clock" 1>&2; exit 1; }
1138 fi
1139 rm -f conftest*
1140 echo "$ac_t""yes" 1>&6
1141 if test "$program_transform_name" = s,x,x,; then
1142   program_transform_name=
1143 else
1144   # Double any \ or $.  echo might interpret backslashes.
1145   cat <<\EOF_SED > conftestsed
1146 s,\\,\\\\,g; s,\$,$$,g
1147 EOF_SED
1148   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1149   rm -f conftestsed
1150 fi
1151 test "$program_prefix" != NONE &&
1152   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1153 # Use a double $ so make ignores it.
1154 test "$program_suffix" != NONE &&
1155   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1156
1157 # sed with no file args requires a program.
1158 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1159
1160 for ac_prog in mawk gawk nawk awk
1161 do
1162 # Extract the first word of "$ac_prog", so it can be a program name with args.
1163 set dummy $ac_prog; ac_word=$2
1164 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1165 echo "configure:1166: checking for $ac_word" >&5
1166 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1167   echo $ac_n "(cached) $ac_c" 1>&6
1168 else
1169   if test -n "$AWK"; then
1170   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1171 else
1172   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1173   ac_dummy="$PATH"
1174   for ac_dir in $ac_dummy; do
1175     test -z "$ac_dir" && ac_dir=.
1176     if test -f $ac_dir/$ac_word; then
1177       ac_cv_prog_AWK="$ac_prog"
1178       break
1179     fi
1180   done
1181   IFS="$ac_save_ifs"
1182 fi
1183 fi
1184 AWK="$ac_cv_prog_AWK"
1185 if test -n "$AWK"; then
1186   echo "$ac_t""$AWK" 1>&6
1187 else
1188   echo "$ac_t""no" 1>&6
1189 fi
1190
1191 test -n "$AWK" && break
1192 done
1193
1194 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1195 echo "configure:1196: checking whether ${MAKE-make} sets \${MAKE}" >&5
1196 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1197 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1198   echo $ac_n "(cached) $ac_c" 1>&6
1199 else
1200   cat > conftestmake <<\EOF
1201 all:
1202         @echo 'ac_maketemp="${MAKE}"'
1203 EOF
1204 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1205 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1206 if test -n "$ac_maketemp"; then
1207   eval ac_cv_prog_make_${ac_make}_set=yes
1208 else
1209   eval ac_cv_prog_make_${ac_make}_set=no
1210 fi
1211 rm -f conftestmake
1212 fi
1213 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1214   echo "$ac_t""yes" 1>&6
1215   SET_MAKE=
1216 else
1217   echo "$ac_t""no" 1>&6
1218   SET_MAKE="MAKE=${MAKE-make}"
1219 fi
1220
1221
1222
1223 PACKAGE=$OL_PACKAGE
1224
1225 VERSION=$OL_VERSION
1226
1227 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1228   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1229 fi
1230
1231
1232
1233 missing_dir=`cd $ac_aux_dir && pwd`
1234 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1235 echo "configure:1236: checking for working aclocal" >&5
1236 # Run test in a subshell; some versions of sh will print an error if
1237 # an executable is not found, even if stderr is redirected.
1238 # Redirect stdin to placate older versions of autoconf.  Sigh.
1239 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1240    ACLOCAL=aclocal
1241    echo "$ac_t""found" 1>&6
1242 else
1243    ACLOCAL="$missing_dir/missing aclocal"
1244    echo "$ac_t""missing" 1>&6
1245 fi
1246
1247 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1248 echo "configure:1249: checking for working autoconf" >&5
1249 # Run test in a subshell; some versions of sh will print an error if
1250 # an executable is not found, even if stderr is redirected.
1251 # Redirect stdin to placate older versions of autoconf.  Sigh.
1252 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1253    AUTOCONF=autoconf
1254    echo "$ac_t""found" 1>&6
1255 else
1256    AUTOCONF="$missing_dir/missing autoconf"
1257    echo "$ac_t""missing" 1>&6
1258 fi
1259
1260 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1261 echo "configure:1262: checking for working automake" >&5
1262 # Run test in a subshell; some versions of sh will print an error if
1263 # an executable is not found, even if stderr is redirected.
1264 # Redirect stdin to placate older versions of autoconf.  Sigh.
1265 if (automake --version) < /dev/null > /dev/null 2>&1; then
1266    AUTOMAKE=automake
1267    echo "$ac_t""found" 1>&6
1268 else
1269    AUTOMAKE="$missing_dir/missing automake"
1270    echo "$ac_t""missing" 1>&6
1271 fi
1272
1273 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1274 echo "configure:1275: checking for working autoheader" >&5
1275 # Run test in a subshell; some versions of sh will print an error if
1276 # an executable is not found, even if stderr is redirected.
1277 # Redirect stdin to placate older versions of autoconf.  Sigh.
1278 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1279    AUTOHEADER=autoheader
1280    echo "$ac_t""found" 1>&6
1281 else
1282    AUTOHEADER="$missing_dir/missing autoheader"
1283    echo "$ac_t""missing" 1>&6
1284 fi
1285
1286 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1287 echo "configure:1288: checking for working makeinfo" >&5
1288 # Run test in a subshell; some versions of sh will print an error if
1289 # an executable is not found, even if stderr is redirected.
1290 # Redirect stdin to placate older versions of autoconf.  Sigh.
1291 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1292    MAKEINFO=makeinfo
1293    echo "$ac_t""found" 1>&6
1294 else
1295    MAKEINFO="$missing_dir/missing makeinfo"
1296    echo "$ac_t""missing" 1>&6
1297 fi
1298
1299 install_sh="$missing_dir/install-sh"
1300 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1301
1302 for ac_prog in gnutar gtar tar
1303 do
1304 # Extract the first word of "$ac_prog", so it can be a program name with args.
1305 set dummy $ac_prog; ac_word=$2
1306 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1307 echo "configure:1308: checking for $ac_word" >&5
1308 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1309   echo $ac_n "(cached) $ac_c" 1>&6
1310 else
1311   if test -n "$AMTAR"; then
1312   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1313 else
1314   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1315   ac_dummy="$PATH"
1316   for ac_dir in $ac_dummy; do
1317     test -z "$ac_dir" && ac_dir=.
1318     if test -f $ac_dir/$ac_word; then
1319       ac_cv_prog_AMTAR="$ac_prog"
1320       break
1321     fi
1322   done
1323   IFS="$ac_save_ifs"
1324 fi
1325 fi
1326 AMTAR="$ac_cv_prog_AMTAR"
1327 if test -n "$AMTAR"; then
1328   echo "$ac_t""$AMTAR" 1>&6
1329 else
1330   echo "$ac_t""no" 1>&6
1331 fi
1332
1333 test -n "$AMTAR" && break
1334 done
1335
1336
1337 AMTARFLAGS=
1338 if test -n "$AMTAR"; then
1339   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1340         AMTARFLAGS=o
1341   fi
1342 fi
1343
1344 cat >> confdefs.h <<EOF
1345 #define OPENLDAP_PACKAGE "$PACKAGE"
1346 EOF
1347
1348 cat >> confdefs.h <<EOF
1349 #define OPENLDAP_VERSION "$VERSION"
1350 EOF
1351
1352
1353 cat >> confdefs.h <<EOF
1354 #define LDAP_VENDOR_VERSION $OL_API_INC
1355 EOF
1356
1357 cat >> confdefs.h <<EOF
1358 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1359 EOF
1360
1361 cat >> confdefs.h <<EOF
1362 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1363 EOF
1364
1365 cat >> confdefs.h <<EOF
1366 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1367 EOF
1368
1369
1370 OPENLDAP_LIBVERSION=$OL_API_LIB
1371
1372 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1373
1374
1375
1376 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1377 echo "configure:1378: checking configure arguments" >&5
1378
1379
1380 top_builddir=`pwd`
1381
1382 ldap_subdir="/openldap"
1383
1384 # Check whether --with-subdir or --without-subdir was given.
1385 if test "${with_subdir+set}" = set; then
1386   withval="$with_subdir"
1387   case "$withval" in
1388         no) ldap_subdir=""
1389                 ;;
1390         yes)
1391                 ;;
1392         /*|\\*)
1393                 ldap_subdir="$withval"
1394                 ;;
1395         *)
1396                 ldap_subdir="/$withval"
1397                 ;;
1398 esac
1399
1400 fi
1401
1402
1403 # OpenLDAP --enable-debug
1404         # Check whether --enable-debug or --disable-debug was given.
1405 if test "${enable_debug+set}" = set; then
1406   enableval="$enable_debug"
1407   
1408         ol_arg=invalid
1409         for ol_val in auto yes no ; do
1410                 if test "$enableval" = "$ol_val" ; then
1411                         ol_arg="$ol_val"
1412                 fi
1413         done
1414         if test "$ol_arg" = "invalid" ; then
1415                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1416         fi
1417         ol_enable_debug="$ol_arg"
1418
1419 else
1420         ol_enable_debug="yes"
1421 fi
1422 # end --enable-debug
1423 # OpenLDAP --enable-dynamic
1424         # Check whether --enable-dynamic or --disable-dynamic was given.
1425 if test "${enable_dynamic+set}" = set; then
1426   enableval="$enable_dynamic"
1427   
1428         ol_arg=invalid
1429         for ol_val in auto yes no ; do
1430                 if test "$enableval" = "$ol_val" ; then
1431                         ol_arg="$ol_val"
1432                 fi
1433         done
1434         if test "$ol_arg" = "invalid" ; then
1435                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1436         fi
1437         ol_enable_dynamic="$ol_arg"
1438
1439 else
1440         ol_enable_dynamic="no"
1441 fi
1442 # end --enable-dynamic
1443 # OpenLDAP --enable-syslog
1444         # Check whether --enable-syslog or --disable-syslog was given.
1445 if test "${enable_syslog+set}" = set; then
1446   enableval="$enable_syslog"
1447   
1448         ol_arg=invalid
1449         for ol_val in auto yes no ; do
1450                 if test "$enableval" = "$ol_val" ; then
1451                         ol_arg="$ol_val"
1452                 fi
1453         done
1454         if test "$ol_arg" = "invalid" ; then
1455                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1456         fi
1457         ol_enable_syslog="$ol_arg"
1458
1459 else
1460         ol_enable_syslog="auto"
1461 fi
1462 # end --enable-syslog
1463 # OpenLDAP --enable-proctitle
1464         # Check whether --enable-proctitle or --disable-proctitle was given.
1465 if test "${enable_proctitle+set}" = set; then
1466   enableval="$enable_proctitle"
1467   
1468         ol_arg=invalid
1469         for ol_val in auto yes no ; do
1470                 if test "$enableval" = "$ol_val" ; then
1471                         ol_arg="$ol_val"
1472                 fi
1473         done
1474         if test "$ol_arg" = "invalid" ; then
1475                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1476         fi
1477         ol_enable_proctitle="$ol_arg"
1478
1479 else
1480         ol_enable_proctitle="yes"
1481 fi
1482 # end --enable-proctitle
1483 ol_enable_referrals=${ol_enable_referrals-no}
1484 ol_enable_kbind=${ol_enable_kbind-no}
1485 # OpenLDAP --enable-ipv6
1486         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1487 if test "${enable_ipv6+set}" = set; then
1488   enableval="$enable_ipv6"
1489   
1490         ol_arg=invalid
1491         for ol_val in auto yes no ; do
1492                 if test "$enableval" = "$ol_val" ; then
1493                         ol_arg="$ol_val"
1494                 fi
1495         done
1496         if test "$ol_arg" = "invalid" ; then
1497                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1498         fi
1499         ol_enable_ipv6="$ol_arg"
1500
1501 else
1502         ol_enable_ipv6="auto"
1503 fi
1504 # end --enable-ipv6
1505 # OpenLDAP --enable-local
1506         # Check whether --enable-local or --disable-local was given.
1507 if test "${enable_local+set}" = set; then
1508   enableval="$enable_local"
1509   
1510         ol_arg=invalid
1511         for ol_val in auto yes no ; do
1512                 if test "$enableval" = "$ol_val" ; then
1513                         ol_arg="$ol_val"
1514                 fi
1515         done
1516         if test "$ol_arg" = "invalid" ; then
1517                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1518         fi
1519         ol_enable_local="$ol_arg"
1520
1521 else
1522         ol_enable_local="auto"
1523 fi
1524 # end --enable-local
1525 # OpenLDAP --enable-x_compile
1526         # Check whether --enable-x_compile or --disable-x_compile was given.
1527 if test "${enable_x_compile+set}" = set; then
1528   enableval="$enable_x_compile"
1529   
1530         ol_arg=invalid
1531         for ol_val in yes no ; do
1532                 if test "$enableval" = "$ol_val" ; then
1533                         ol_arg="$ol_val"
1534                 fi
1535         done
1536         if test "$ol_arg" = "invalid" ; then
1537                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1538         fi
1539         ol_enable_x_compile="$ol_arg"
1540
1541 else
1542         ol_enable_x_compile="no"
1543 fi
1544 # end --enable-x_compile
1545
1546
1547 # OpenLDAP --with-cyrus_sasl
1548         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1549 if test "${with_cyrus_sasl+set}" = set; then
1550   withval="$with_cyrus_sasl"
1551   
1552         ol_arg=invalid
1553         for ol_val in auto yes no  ; do
1554                 if test "$withval" = "$ol_val" ; then
1555                         ol_arg="$ol_val"
1556                 fi
1557         done
1558         if test "$ol_arg" = "invalid" ; then
1559                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1560         fi
1561         ol_with_cyrus_sasl="$ol_arg"
1562
1563 else
1564         ol_with_cyrus_sasl="auto"
1565 fi
1566 # end --with-cyrus_sasl
1567
1568 # OpenLDAP --with-fetch
1569         # Check whether --with-fetch or --without-fetch was given.
1570 if test "${with_fetch+set}" = set; then
1571   withval="$with_fetch"
1572   
1573         ol_arg=invalid
1574         for ol_val in auto yes no  ; do
1575                 if test "$withval" = "$ol_val" ; then
1576                         ol_arg="$ol_val"
1577                 fi
1578         done
1579         if test "$ol_arg" = "invalid" ; then
1580                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1581         fi
1582         ol_with_fetch="$ol_arg"
1583
1584 else
1585         ol_with_fetch="auto"
1586 fi
1587 # end --with-fetch
1588
1589 ol_with_kerberos=${ol_with_kerberos-auto}
1590 # OpenLDAP --with-threads
1591         # Check whether --with-threads or --without-threads was given.
1592 if test "${with_threads+set}" = set; then
1593   withval="$with_threads"
1594   
1595         ol_arg=invalid
1596         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1597                 if test "$withval" = "$ol_val" ; then
1598                         ol_arg="$ol_val"
1599                 fi
1600         done
1601         if test "$ol_arg" = "invalid" ; then
1602                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1603         fi
1604         ol_with_threads="$ol_arg"
1605
1606 else
1607         ol_with_threads="auto"
1608 fi
1609 # end --with-threads
1610
1611 # OpenLDAP --with-tls
1612         # Check whether --with-tls or --without-tls was given.
1613 if test "${with_tls+set}" = set; then
1614   withval="$with_tls"
1615   
1616         ol_arg=invalid
1617         for ol_val in auto ssleay openssl yes no  ; do
1618                 if test "$withval" = "$ol_val" ; then
1619                         ol_arg="$ol_val"
1620                 fi
1621         done
1622         if test "$ol_arg" = "invalid" ; then
1623                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1624         fi
1625         ol_with_tls="$ol_arg"
1626
1627 else
1628         ol_with_tls="auto"
1629 fi
1630 # end --with-tls
1631
1632 # OpenLDAP --with-yielding_select
1633         # Check whether --with-yielding_select or --without-yielding_select was given.
1634 if test "${with_yielding_select+set}" = set; then
1635   withval="$with_yielding_select"
1636   
1637         ol_arg=invalid
1638         for ol_val in auto yes no manual  ; do
1639                 if test "$withval" = "$ol_val" ; then
1640                         ol_arg="$ol_val"
1641                 fi
1642         done
1643         if test "$ol_arg" = "invalid" ; then
1644                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1645         fi
1646         ol_with_yielding_select="$ol_arg"
1647
1648 else
1649         ol_with_yielding_select="auto"
1650 fi
1651 # end --with-yielding_select
1652
1653
1654
1655 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1656 if test "${with_xxslapdoptions+set}" = set; then
1657   withval="$with_xxslapdoptions"
1658   :
1659 fi
1660
1661 # OpenLDAP --enable-slapd
1662         # Check whether --enable-slapd or --disable-slapd was given.
1663 if test "${enable_slapd+set}" = set; then
1664   enableval="$enable_slapd"
1665   
1666         ol_arg=invalid
1667         for ol_val in auto yes no ; do
1668                 if test "$enableval" = "$ol_val" ; then
1669                         ol_arg="$ol_val"
1670                 fi
1671         done
1672         if test "$ol_arg" = "invalid" ; then
1673                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1674         fi
1675         ol_enable_slapd="$ol_arg"
1676
1677 else
1678         ol_enable_slapd="yes"
1679 fi
1680 # end --enable-slapd
1681 # OpenLDAP --enable-aci
1682         # Check whether --enable-aci or --disable-aci was given.
1683 if test "${enable_aci+set}" = set; then
1684   enableval="$enable_aci"
1685   
1686         ol_arg=invalid
1687         for ol_val in auto yes no ; do
1688                 if test "$enableval" = "$ol_val" ; then
1689                         ol_arg="$ol_val"
1690                 fi
1691         done
1692         if test "$ol_arg" = "invalid" ; then
1693                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1694         fi
1695         ol_enable_aci="$ol_arg"
1696
1697 else
1698         ol_enable_aci="no"
1699 fi
1700 # end --enable-aci
1701 # OpenLDAP --enable-cleartext
1702         # Check whether --enable-cleartext or --disable-cleartext was given.
1703 if test "${enable_cleartext+set}" = set; then
1704   enableval="$enable_cleartext"
1705   
1706         ol_arg=invalid
1707         for ol_val in auto yes no ; do
1708                 if test "$enableval" = "$ol_val" ; then
1709                         ol_arg="$ol_val"
1710                 fi
1711         done
1712         if test "$ol_arg" = "invalid" ; then
1713                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1714         fi
1715         ol_enable_cleartext="$ol_arg"
1716
1717 else
1718         ol_enable_cleartext="yes"
1719 fi
1720 # end --enable-cleartext
1721 # OpenLDAP --enable-crypt
1722         # Check whether --enable-crypt or --disable-crypt was given.
1723 if test "${enable_crypt+set}" = set; then
1724   enableval="$enable_crypt"
1725   
1726         ol_arg=invalid
1727         for ol_val in auto yes no ; do
1728                 if test "$enableval" = "$ol_val" ; then
1729                         ol_arg="$ol_val"
1730                 fi
1731         done
1732         if test "$ol_arg" = "invalid" ; then
1733                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1734         fi
1735         ol_enable_crypt="$ol_arg"
1736
1737 else
1738         ol_enable_crypt="no"
1739 fi
1740 # end --enable-crypt
1741 ol_enable_kpasswd=${ol_enable_kpasswd-no}
1742 # OpenLDAP --enable-lmpasswd
1743         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1744 if test "${enable_lmpasswd+set}" = set; then
1745   enableval="$enable_lmpasswd"
1746   
1747         ol_arg=invalid
1748         for ol_val in auto yes no ; do
1749                 if test "$enableval" = "$ol_val" ; then
1750                         ol_arg="$ol_val"
1751                 fi
1752         done
1753         if test "$ol_arg" = "invalid" ; then
1754                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1755         fi
1756         ol_enable_lmpasswd="$ol_arg"
1757
1758 else
1759         ol_enable_lmpasswd="no"
1760 fi
1761 # end --enable-lmpasswd
1762 # OpenLDAP --enable-spasswd
1763         # Check whether --enable-spasswd or --disable-spasswd was given.
1764 if test "${enable_spasswd+set}" = set; then
1765   enableval="$enable_spasswd"
1766   
1767         ol_arg=invalid
1768         for ol_val in auto yes no ; do
1769                 if test "$enableval" = "$ol_val" ; then
1770                         ol_arg="$ol_val"
1771                 fi
1772         done
1773         if test "$ol_arg" = "invalid" ; then
1774                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1775         fi
1776         ol_enable_spasswd="$ol_arg"
1777
1778 else
1779         ol_enable_spasswd="no"
1780 fi
1781 # end --enable-spasswd
1782 # OpenLDAP --enable-modules
1783         # Check whether --enable-modules or --disable-modules was given.
1784 if test "${enable_modules+set}" = set; then
1785   enableval="$enable_modules"
1786   
1787         ol_arg=invalid
1788         for ol_val in auto yes no ; do
1789                 if test "$enableval" = "$ol_val" ; then
1790                         ol_arg="$ol_val"
1791                 fi
1792         done
1793         if test "$ol_arg" = "invalid" ; then
1794                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1795         fi
1796         ol_enable_modules="$ol_arg"
1797
1798 else
1799         ol_enable_modules="no"
1800 fi
1801 # end --enable-modules
1802 ol_enable_multimaster=${ol_enable_multimaster-no}
1803 # OpenLDAP --enable-rewrite
1804         # Check whether --enable-rewrite or --disable-rewrite was given.
1805 if test "${enable_rewrite+set}" = set; then
1806   enableval="$enable_rewrite"
1807   
1808         ol_arg=invalid
1809         for ol_val in auto yes no ; do
1810                 if test "$enableval" = "$ol_val" ; then
1811                         ol_arg="$ol_val"
1812                 fi
1813         done
1814         if test "$ol_arg" = "invalid" ; then
1815                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1816         fi
1817         ol_enable_rewrite="$ol_arg"
1818
1819 else
1820         ol_enable_rewrite="no"
1821 fi
1822 # end --enable-rewrite
1823 # OpenLDAP --enable-rlookups
1824         # Check whether --enable-rlookups or --disable-rlookups was given.
1825 if test "${enable_rlookups+set}" = set; then
1826   enableval="$enable_rlookups"
1827   
1828         ol_arg=invalid
1829         for ol_val in auto yes no ; do
1830                 if test "$enableval" = "$ol_val" ; then
1831                         ol_arg="$ol_val"
1832                 fi
1833         done
1834         if test "$ol_arg" = "invalid" ; then
1835                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1836         fi
1837         ol_enable_rlookups="$ol_arg"
1838
1839 else
1840         ol_enable_rlookups="no"
1841 fi
1842 # end --enable-rlookups
1843 # OpenLDAP --enable-slapi
1844         # Check whether --enable-slapi or --disable-slapi was given.
1845 if test "${enable_slapi+set}" = set; then
1846   enableval="$enable_slapi"
1847   
1848         ol_arg=invalid
1849         for ol_val in auto yes no ; do
1850                 if test "$enableval" = "$ol_val" ; then
1851                         ol_arg="$ol_val"
1852                 fi
1853         done
1854         if test "$ol_arg" = "invalid" ; then
1855                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1856         fi
1857         ol_enable_slapi="$ol_arg"
1858
1859 else
1860         ol_enable_slapi="no"
1861 fi
1862 # end --enable-slapi
1863 # OpenLDAP --enable-slp
1864         # Check whether --enable-slp or --disable-slp was given.
1865 if test "${enable_slp+set}" = set; then
1866   enableval="$enable_slp"
1867   
1868         ol_arg=invalid
1869         for ol_val in auto yes no ; do
1870                 if test "$enableval" = "$ol_val" ; then
1871                         ol_arg="$ol_val"
1872                 fi
1873         done
1874         if test "$ol_arg" = "invalid" ; then
1875                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1876         fi
1877         ol_enable_slp="$ol_arg"
1878
1879 else
1880         ol_enable_slp="no"
1881 fi
1882 # end --enable-slp
1883 # OpenLDAP --enable-wrappers
1884         # Check whether --enable-wrappers or --disable-wrappers was given.
1885 if test "${enable_wrappers+set}" = set; then
1886   enableval="$enable_wrappers"
1887   
1888         ol_arg=invalid
1889         for ol_val in auto yes no ; do
1890                 if test "$enableval" = "$ol_val" ; then
1891                         ol_arg="$ol_val"
1892                 fi
1893         done
1894         if test "$ol_arg" = "invalid" ; then
1895                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1896         fi
1897         ol_enable_wrappers="$ol_arg"
1898
1899 else
1900         ol_enable_wrappers="no"
1901 fi
1902 # end --enable-wrappers
1903
1904
1905 # OpenLDAP --enable-bdb
1906         # Check whether --enable-bdb or --disable-bdb was given.
1907 if test "${enable_bdb+set}" = set; then
1908   enableval="$enable_bdb"
1909   
1910         ol_arg=invalid
1911         for ol_val in auto yes no ; do
1912                 if test "$enableval" = "$ol_val" ; then
1913                         ol_arg="$ol_val"
1914                 fi
1915         done
1916         if test "$ol_arg" = "invalid" ; then
1917                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1918         fi
1919         ol_enable_bdb="$ol_arg"
1920
1921 else
1922         ol_enable_bdb="yes"
1923 fi
1924 # end --enable-bdb
1925 # OpenLDAP --with-bdb_module
1926         # Check whether --with-bdb_module or --without-bdb_module was given.
1927 if test "${with_bdb_module+set}" = set; then
1928   withval="$with_bdb_module"
1929   
1930         ol_arg=invalid
1931         for ol_val in static dynamic ; do
1932                 if test "$withval" = "$ol_val" ; then
1933                         ol_arg="$ol_val"
1934                 fi
1935         done
1936         if test "$ol_arg" = "invalid" ; then
1937                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1938         fi
1939         ol_with_bdb_module="$ol_arg"
1940
1941 else
1942         ol_with_bdb_module="static"
1943 fi
1944 # end --with-bdb_module
1945
1946 # OpenLDAP --enable-dnssrv
1947         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1948 if test "${enable_dnssrv+set}" = set; then
1949   enableval="$enable_dnssrv"
1950   
1951         ol_arg=invalid
1952         for ol_val in auto yes no ; do
1953                 if test "$enableval" = "$ol_val" ; then
1954                         ol_arg="$ol_val"
1955                 fi
1956         done
1957         if test "$ol_arg" = "invalid" ; then
1958                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1959         fi
1960         ol_enable_dnssrv="$ol_arg"
1961
1962 else
1963         ol_enable_dnssrv="no"
1964 fi
1965 # end --enable-dnssrv
1966 # OpenLDAP --with-dnssrv_module
1967         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1968 if test "${with_dnssrv_module+set}" = set; then
1969   withval="$with_dnssrv_module"
1970   
1971         ol_arg=invalid
1972         for ol_val in static dynamic ; do
1973                 if test "$withval" = "$ol_val" ; then
1974                         ol_arg="$ol_val"
1975                 fi
1976         done
1977         if test "$ol_arg" = "invalid" ; then
1978                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1979         fi
1980         ol_with_dnssrv_module="$ol_arg"
1981
1982 else
1983         ol_with_dnssrv_module="static"
1984 fi
1985 # end --with-dnssrv_module
1986
1987 # OpenLDAP --enable-hdb
1988         # Check whether --enable-hdb or --disable-hdb was given.
1989 if test "${enable_hdb+set}" = set; then
1990   enableval="$enable_hdb"
1991   
1992         ol_arg=invalid
1993         for ol_val in auto yes no ; do
1994                 if test "$enableval" = "$ol_val" ; then
1995                         ol_arg="$ol_val"
1996                 fi
1997         done
1998         if test "$ol_arg" = "invalid" ; then
1999                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
2000         fi
2001         ol_enable_hdb="$ol_arg"
2002
2003 else
2004         ol_enable_hdb="no"
2005 fi
2006 # end --enable-hdb
2007 # OpenLDAP --with-hdb_module
2008         # Check whether --with-hdb_module or --without-hdb_module was given.
2009 if test "${with_hdb_module+set}" = set; then
2010   withval="$with_hdb_module"
2011   
2012         ol_arg=invalid
2013         for ol_val in static dynamic ; do
2014                 if test "$withval" = "$ol_val" ; then
2015                         ol_arg="$ol_val"
2016                 fi
2017         done
2018         if test "$ol_arg" = "invalid" ; then
2019                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2020         fi
2021         ol_with_hdb_module="$ol_arg"
2022
2023 else
2024         ol_with_hdb_module="static"
2025 fi
2026 # end --with-hdb_module
2027
2028 # OpenLDAP --enable-ldap
2029         # Check whether --enable-ldap or --disable-ldap was given.
2030 if test "${enable_ldap+set}" = set; then
2031   enableval="$enable_ldap"
2032   
2033         ol_arg=invalid
2034         for ol_val in auto yes no ; do
2035                 if test "$enableval" = "$ol_val" ; then
2036                         ol_arg="$ol_val"
2037                 fi
2038         done
2039         if test "$ol_arg" = "invalid" ; then
2040                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2041         fi
2042         ol_enable_ldap="$ol_arg"
2043
2044 else
2045         ol_enable_ldap="no"
2046 fi
2047 # end --enable-ldap
2048 # OpenLDAP --with-ldap_module
2049         # Check whether --with-ldap_module or --without-ldap_module was given.
2050 if test "${with_ldap_module+set}" = set; then
2051   withval="$with_ldap_module"
2052   
2053         ol_arg=invalid
2054         for ol_val in static dynamic ; do
2055                 if test "$withval" = "$ol_val" ; then
2056                         ol_arg="$ol_val"
2057                 fi
2058         done
2059         if test "$ol_arg" = "invalid" ; then
2060                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2061         fi
2062         ol_with_ldap_module="$ol_arg"
2063
2064 else
2065         ol_with_ldap_module="static"
2066 fi
2067 # end --with-ldap_module
2068
2069 # OpenLDAP --enable-ldbm
2070         # Check whether --enable-ldbm or --disable-ldbm was given.
2071 if test "${enable_ldbm+set}" = set; then
2072   enableval="$enable_ldbm"
2073   
2074         ol_arg=invalid
2075         for ol_val in auto yes no ; do
2076                 if test "$enableval" = "$ol_val" ; then
2077                         ol_arg="$ol_val"
2078                 fi
2079         done
2080         if test "$ol_arg" = "invalid" ; then
2081                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2082         fi
2083         ol_enable_ldbm="$ol_arg"
2084
2085 else
2086         ol_enable_ldbm="no"
2087 fi
2088 # end --enable-ldbm
2089 # OpenLDAP --with-ldbm_api
2090         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2091 if test "${with_ldbm_api+set}" = set; then
2092   withval="$with_ldbm_api"
2093   
2094         ol_arg=invalid
2095         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2096                 if test "$withval" = "$ol_val" ; then
2097                         ol_arg="$ol_val"
2098                 fi
2099         done
2100         if test "$ol_arg" = "invalid" ; then
2101                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2102         fi
2103         ol_with_ldbm_api="$ol_arg"
2104
2105 else
2106         ol_with_ldbm_api="auto"
2107 fi
2108 # end --with-ldbm_api
2109
2110 # OpenLDAP --with-ldbm_module
2111         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2112 if test "${with_ldbm_module+set}" = set; then
2113   withval="$with_ldbm_module"
2114   
2115         ol_arg=invalid
2116         for ol_val in static dynamic ; do
2117                 if test "$withval" = "$ol_val" ; then
2118                         ol_arg="$ol_val"
2119                 fi
2120         done
2121         if test "$ol_arg" = "invalid" ; then
2122                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2123         fi
2124         ol_with_ldbm_module="$ol_arg"
2125
2126 else
2127         ol_with_ldbm_module="static"
2128 fi
2129 # end --with-ldbm_module
2130
2131 # OpenLDAP --with-ldbm_type
2132         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2133 if test "${with_ldbm_type+set}" = set; then
2134   withval="$with_ldbm_type"
2135   
2136         ol_arg=invalid
2137         for ol_val in auto btree hash ; do
2138                 if test "$withval" = "$ol_val" ; then
2139                         ol_arg="$ol_val"
2140                 fi
2141         done
2142         if test "$ol_arg" = "invalid" ; then
2143                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2144         fi
2145         ol_with_ldbm_type="$ol_arg"
2146
2147 else
2148         ol_with_ldbm_type="auto"
2149 fi
2150 # end --with-ldbm_type
2151
2152 # OpenLDAP --enable-meta
2153         # Check whether --enable-meta or --disable-meta was given.
2154 if test "${enable_meta+set}" = set; then
2155   enableval="$enable_meta"
2156   
2157         ol_arg=invalid
2158         for ol_val in auto yes no ; do
2159                 if test "$enableval" = "$ol_val" ; then
2160                         ol_arg="$ol_val"
2161                 fi
2162         done
2163         if test "$ol_arg" = "invalid" ; then
2164                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2165         fi
2166         ol_enable_meta="$ol_arg"
2167
2168 else
2169         ol_enable_meta="no"
2170 fi
2171 # end --enable-meta
2172 # OpenLDAP --with-meta_module
2173         # Check whether --with-meta_module or --without-meta_module was given.
2174 if test "${with_meta_module+set}" = set; then
2175   withval="$with_meta_module"
2176   
2177         ol_arg=invalid
2178         for ol_val in static dynamic ; do
2179                 if test "$withval" = "$ol_val" ; then
2180                         ol_arg="$ol_val"
2181                 fi
2182         done
2183         if test "$ol_arg" = "invalid" ; then
2184                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2185         fi
2186         ol_with_meta_module="$ol_arg"
2187
2188 else
2189         ol_with_meta_module="static"
2190 fi
2191 # end --with-meta_module
2192
2193 # OpenLDAP --enable-monitor
2194         # Check whether --enable-monitor or --disable-monitor was given.
2195 if test "${enable_monitor+set}" = set; then
2196   enableval="$enable_monitor"
2197   
2198         ol_arg=invalid
2199         for ol_val in auto yes no ; do
2200                 if test "$enableval" = "$ol_val" ; then
2201                         ol_arg="$ol_val"
2202                 fi
2203         done
2204         if test "$ol_arg" = "invalid" ; then
2205                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2206         fi
2207         ol_enable_monitor="$ol_arg"
2208
2209 else
2210         ol_enable_monitor="yes"
2211 fi
2212 # end --enable-monitor
2213 # OpenLDAP --with-monitor_module
2214         # Check whether --with-monitor_module or --without-monitor_module was given.
2215 if test "${with_monitor_module+set}" = set; then
2216   withval="$with_monitor_module"
2217   
2218         ol_arg=invalid
2219         for ol_val in static dynamic ; do
2220                 if test "$withval" = "$ol_val" ; then
2221                         ol_arg="$ol_val"
2222                 fi
2223         done
2224         if test "$ol_arg" = "invalid" ; then
2225                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2226         fi
2227         ol_with_monitor_module="$ol_arg"
2228
2229 else
2230         ol_with_monitor_module="static"
2231 fi
2232 # end --with-monitor_module
2233
2234 # OpenLDAP --enable-null
2235         # Check whether --enable-null or --disable-null was given.
2236 if test "${enable_null+set}" = set; then
2237   enableval="$enable_null"
2238   
2239         ol_arg=invalid
2240         for ol_val in auto yes no ; do
2241                 if test "$enableval" = "$ol_val" ; then
2242                         ol_arg="$ol_val"
2243                 fi
2244         done
2245         if test "$ol_arg" = "invalid" ; then
2246                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2247         fi
2248         ol_enable_null="$ol_arg"
2249
2250 else
2251         ol_enable_null="no"
2252 fi
2253 # end --enable-null
2254 # OpenLDAP --with-null_module
2255         # Check whether --with-null_module or --without-null_module was given.
2256 if test "${with_null_module+set}" = set; then
2257   withval="$with_null_module"
2258   
2259         ol_arg=invalid
2260         for ol_val in static dynamic ; do
2261                 if test "$withval" = "$ol_val" ; then
2262                         ol_arg="$ol_val"
2263                 fi
2264         done
2265         if test "$ol_arg" = "invalid" ; then
2266                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2267         fi
2268         ol_with_null_module="$ol_arg"
2269
2270 else
2271         ol_with_null_module="static"
2272 fi
2273 # end --with-null_module
2274
2275 # OpenLDAP --enable-passwd
2276         # Check whether --enable-passwd or --disable-passwd was given.
2277 if test "${enable_passwd+set}" = set; then
2278   enableval="$enable_passwd"
2279   
2280         ol_arg=invalid
2281         for ol_val in auto yes no ; do
2282                 if test "$enableval" = "$ol_val" ; then
2283                         ol_arg="$ol_val"
2284                 fi
2285         done
2286         if test "$ol_arg" = "invalid" ; then
2287                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2288         fi
2289         ol_enable_passwd="$ol_arg"
2290
2291 else
2292         ol_enable_passwd="no"
2293 fi
2294 # end --enable-passwd
2295 # OpenLDAP --with-passwd_module
2296         # Check whether --with-passwd_module or --without-passwd_module was given.
2297 if test "${with_passwd_module+set}" = set; then
2298   withval="$with_passwd_module"
2299   
2300         ol_arg=invalid
2301         for ol_val in static dynamic ; do
2302                 if test "$withval" = "$ol_val" ; then
2303                         ol_arg="$ol_val"
2304                 fi
2305         done
2306         if test "$ol_arg" = "invalid" ; then
2307                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2308         fi
2309         ol_with_passwd_module="$ol_arg"
2310
2311 else
2312         ol_with_passwd_module="static"
2313 fi
2314 # end --with-passwd_module
2315
2316 # OpenLDAP --enable-perl
2317         # Check whether --enable-perl or --disable-perl was given.
2318 if test "${enable_perl+set}" = set; then
2319   enableval="$enable_perl"
2320   
2321         ol_arg=invalid
2322         for ol_val in auto yes no ; do
2323                 if test "$enableval" = "$ol_val" ; then
2324                         ol_arg="$ol_val"
2325                 fi
2326         done
2327         if test "$ol_arg" = "invalid" ; then
2328                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2329         fi
2330         ol_enable_perl="$ol_arg"
2331
2332 else
2333         ol_enable_perl="no"
2334 fi
2335 # end --enable-perl
2336 # OpenLDAP --with-perl_module
2337         # Check whether --with-perl_module or --without-perl_module was given.
2338 if test "${with_perl_module+set}" = set; then
2339   withval="$with_perl_module"
2340   
2341         ol_arg=invalid
2342         for ol_val in static dynamic ; do
2343                 if test "$withval" = "$ol_val" ; then
2344                         ol_arg="$ol_val"
2345                 fi
2346         done
2347         if test "$ol_arg" = "invalid" ; then
2348                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2349         fi
2350         ol_with_perl_module="$ol_arg"
2351
2352 else
2353         ol_with_perl_module="static"
2354 fi
2355 # end --with-perl_module
2356
2357 # OpenLDAP --enable-shell
2358         # Check whether --enable-shell or --disable-shell was given.
2359 if test "${enable_shell+set}" = set; then
2360   enableval="$enable_shell"
2361   
2362         ol_arg=invalid
2363         for ol_val in auto yes no ; do
2364                 if test "$enableval" = "$ol_val" ; then
2365                         ol_arg="$ol_val"
2366                 fi
2367         done
2368         if test "$ol_arg" = "invalid" ; then
2369                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2370         fi
2371         ol_enable_shell="$ol_arg"
2372
2373 else
2374         ol_enable_shell="no"
2375 fi
2376 # end --enable-shell
2377 # OpenLDAP --with-shell_module
2378         # Check whether --with-shell_module or --without-shell_module was given.
2379 if test "${with_shell_module+set}" = set; then
2380   withval="$with_shell_module"
2381   
2382         ol_arg=invalid
2383         for ol_val in static dynamic ; do
2384                 if test "$withval" = "$ol_val" ; then
2385                         ol_arg="$ol_val"
2386                 fi
2387         done
2388         if test "$ol_arg" = "invalid" ; then
2389                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2390         fi
2391         ol_with_shell_module="$ol_arg"
2392
2393 else
2394         ol_with_shell_module="static"
2395 fi
2396 # end --with-shell_module
2397
2398 # OpenLDAP --enable-sql
2399         # Check whether --enable-sql or --disable-sql was given.
2400 if test "${enable_sql+set}" = set; then
2401   enableval="$enable_sql"
2402   
2403         ol_arg=invalid
2404         for ol_val in auto yes no ; do
2405                 if test "$enableval" = "$ol_val" ; then
2406                         ol_arg="$ol_val"
2407                 fi
2408         done
2409         if test "$ol_arg" = "invalid" ; then
2410                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2411         fi
2412         ol_enable_sql="$ol_arg"
2413
2414 else
2415         ol_enable_sql="no"
2416 fi
2417 # end --enable-sql
2418 # OpenLDAP --with-sql_module
2419         # Check whether --with-sql_module or --without-sql_module was given.
2420 if test "${with_sql_module+set}" = set; then
2421   withval="$with_sql_module"
2422   
2423         ol_arg=invalid
2424         for ol_val in static dynamic ; do
2425                 if test "$withval" = "$ol_val" ; then
2426                         ol_arg="$ol_val"
2427                 fi
2428         done
2429         if test "$ol_arg" = "invalid" ; then
2430                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2431         fi
2432         ol_with_sql_module="$ol_arg"
2433
2434 else
2435         ol_with_sql_module="static"
2436 fi
2437 # end --with-sql_module
2438
2439
2440 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2441 if test "${with_xxslapoverlays+set}" = set; then
2442   withval="$with_xxslapoverlays"
2443   :
2444 fi
2445
2446 # OpenLDAP --with-dyngroup
2447         # Check whether --with-dyngroup or --without-dyngroup was given.
2448 if test "${with_dyngroup+set}" = set; then
2449   withval="$with_dyngroup"
2450   
2451         ol_arg=invalid
2452         for ol_val in no yes mod ; do
2453                 if test "$withval" = "$ol_val" ; then
2454                         ol_arg="$ol_val"
2455                 fi
2456         done
2457         if test "$ol_arg" = "invalid" ; then
2458                 { echo "configure: error: bad value $withval for --with-dyngroup" 1>&2; exit 1; }
2459         fi
2460         ol_with_dyngroup="$ol_arg"
2461
2462 else
2463         ol_with_dyngroup="no"
2464 fi
2465 # end --with-dyngroup
2466
2467 # OpenLDAP --with-proxycache
2468         # Check whether --with-proxycache or --without-proxycache was given.
2469 if test "${with_proxycache+set}" = set; then
2470   withval="$with_proxycache"
2471   
2472         ol_arg=invalid
2473         for ol_val in no yes mod ; do
2474                 if test "$withval" = "$ol_val" ; then
2475                         ol_arg="$ol_val"
2476                 fi
2477         done
2478         if test "$ol_arg" = "invalid" ; then
2479                 { echo "configure: error: bad value $withval for --with-proxycache" 1>&2; exit 1; }
2480         fi
2481         ol_with_proxycache="$ol_arg"
2482
2483 else
2484         ol_with_proxycache="no"
2485 fi
2486 # end --with-proxycache
2487
2488 # OpenLDAP --with-rwm
2489         # Check whether --with-rwm or --without-rwm was given.
2490 if test "${with_rwm+set}" = set; then
2491   withval="$with_rwm"
2492   
2493         ol_arg=invalid
2494         for ol_val in no yes mod ; do
2495                 if test "$withval" = "$ol_val" ; then
2496                         ol_arg="$ol_val"
2497                 fi
2498         done
2499         if test "$ol_arg" = "invalid" ; then
2500                 { echo "configure: error: bad value $withval for --with-rwm" 1>&2; exit 1; }
2501         fi
2502         ol_with_rwm="$ol_arg"
2503
2504 else
2505         ol_with_rwm="no"
2506 fi
2507 # end --with-rwm
2508
2509
2510 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2511 if test "${with_xxslurpdoptions+set}" = set; then
2512   withval="$with_xxslurpdoptions"
2513   :
2514 fi
2515
2516 # OpenLDAP --enable-slurpd
2517         # Check whether --enable-slurpd or --disable-slurpd was given.
2518 if test "${enable_slurpd+set}" = set; then
2519   enableval="$enable_slurpd"
2520   
2521         ol_arg=invalid
2522         for ol_val in auto yes no ; do
2523                 if test "$enableval" = "$ol_val" ; then
2524                         ol_arg="$ol_val"
2525                 fi
2526         done
2527         if test "$ol_arg" = "invalid" ; then
2528                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2529         fi
2530         ol_enable_slurpd="$ol_arg"
2531
2532 else
2533         ol_enable_slurpd="auto"
2534 fi
2535 # end --enable-slurpd
2536
2537 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2538 if test "${with_xxliboptions+set}" = set; then
2539   withval="$with_xxliboptions"
2540   :
2541 fi
2542
2543 # Check whether --enable-static or --disable-static was given.
2544 if test "${enable_static+set}" = set; then
2545   enableval="$enable_static"
2546   p=${PACKAGE-default}
2547 case $enableval in
2548 yes) enable_static=yes ;;
2549 no) enable_static=no ;;
2550 *)
2551   enable_static=no
2552   # Look at the argument we got.  We use all the common list separators.
2553   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2554   for pkg in $enableval; do
2555     if test "X$pkg" = "X$p"; then
2556       enable_static=yes
2557     fi
2558   done
2559   IFS="$ac_save_ifs"
2560   ;;
2561 esac
2562 else
2563   enable_static=yes
2564 fi
2565
2566 # Check whether --enable-shared or --disable-shared was given.
2567 if test "${enable_shared+set}" = set; then
2568   enableval="$enable_shared"
2569   p=${PACKAGE-default}
2570 case $enableval in
2571 yes) enable_shared=yes ;;
2572 no) enable_shared=no ;;
2573 *)
2574   enable_shared=no
2575   # Look at the argument we got.  We use all the common list separators.
2576   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2577   for pkg in $enableval; do
2578     if test "X$pkg" = "X$p"; then
2579       enable_shared=yes
2580     fi
2581   done
2582   IFS="$ac_save_ifs"
2583   ;;
2584 esac
2585 else
2586   enable_shared=yes
2587 fi
2588
2589
2590
2591 # validate options
2592 if test $ol_enable_slapd = no ; then
2593                 if test $ol_enable_slapi = yes ; then
2594                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2595         fi
2596         if test $ol_enable_bdb = yes ; then
2597                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2598         fi
2599         if test $ol_enable_dnssrv = yes ; then
2600                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2601         fi
2602         if test $ol_enable_hdb = yes ; then
2603                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2604         fi
2605         if test $ol_enable_ldap = yes ; then
2606                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2607         fi
2608         if test $ol_enable_ldbm = yes ; then
2609                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2610         fi
2611         if test $ol_enable_meta = yes ; then
2612                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2613         fi
2614         if test $ol_enable_monitor = yes ; then
2615                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2616         fi
2617         if test $ol_enable_null = yes ; then
2618                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2619         fi
2620         if test $ol_enable_passwd = yes ; then
2621                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2622         fi
2623         if test $ol_enable_perl = yes ; then
2624                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2625         fi
2626         if test $ol_enable_shell = yes ; then
2627                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2628         fi
2629         if test $ol_enable_sql = yes ; then
2630                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2631         fi
2632         if test $ol_enable_modules = yes ; then
2633                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2634         fi
2635         if test $ol_enable_multimaster = yes ; then
2636                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2637         fi
2638         if test $ol_enable_wrappers = yes ; then
2639                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2640         fi
2641         if test $ol_enable_rlookups = yes ; then
2642                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2643         fi
2644         if test $ol_enable_aci = yes ; then
2645                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2646         fi
2647         if test $ol_with_ldbm_api != auto ; then
2648                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2649         fi
2650         if test $ol_with_ldbm_type != auto ; then
2651                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2652         fi
2653         if test $ol_with_bdb_module != static ; then
2654                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2655         fi
2656         if test $ol_with_dnssrv_module != static ; then
2657                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2658         fi
2659         if test $ol_with_hdb_module != static ; then
2660                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2661         fi
2662         if test $ol_with_ldap_module != static ; then
2663                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2664         fi
2665         if test $ol_with_ldbm_module != static ; then
2666                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2667         fi
2668         if test $ol_with_meta_module != static ; then
2669                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2670         fi
2671         if test $ol_with_monitor_module != static ; then
2672                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2673         fi
2674         if test $ol_with_null_module != static ; then
2675                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2676         fi
2677         if test $ol_with_passwd_module != static ; then
2678                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2679         fi
2680         if test $ol_with_perl_module != static ; then
2681                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2682         fi
2683         if test $ol_with_shell_module != static ; then
2684                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2685         fi
2686         if test $ol_with_sql_module != static ; then
2687                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2688         fi
2689         if test $ol_enable_slurpd = yes ; then
2690                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2691         fi
2692         if test $ol_enable_rewrite = yes ; then
2693                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2694         fi
2695         if test $ol_with_dyngroup != no ; then
2696                 echo "configure: warning: slapd disabled, ignoring --with-dyngroup argument" 1>&2
2697         fi
2698         if test $ol_with_proxycache != no ; then
2699                 echo "configure: warning: slapd disabled, ignoring --with-proxycache argument" 1>&2
2700         fi
2701         if test $ol_with_rwm != no ; then
2702                 echo "configure: warning: slapd disabled, ignoring --with-rwm argument" 1>&2
2703         fi
2704
2705         # force settings to no
2706         ol_enable_slapi=no
2707         ol_enable_bdb=no
2708         ol_enable_dnssrv=no
2709         ol_enable_hdb=no
2710         ol_enable_ldap=no
2711         ol_enable_ldbm=no
2712         ol_enable_meta=no
2713         ol_enable_monitor=no
2714         ol_enable_null=no
2715         ol_enable_passwd=no
2716         ol_enable_perl=no
2717         ol_enable_shell=no
2718         ol_enable_sql=no
2719
2720         ol_enable_modules=no
2721         ol_enable_multimaster=no
2722         ol_enable_rlookups=no
2723         ol_enable_aci=no
2724         ol_enable_wrappers=no
2725
2726         ol_with_ldbm_api=no
2727         ol_with_ldbm_type=no
2728
2729         ol_with_bdb_module=static
2730         ol_with_dnssrv_module=static
2731         ol_with_hdb_module=static
2732         ol_with_ldap_module=static
2733         ol_with_ldbm_module=static
2734         ol_with_meta_module=static
2735         ol_with_monitor_module=static
2736         ol_with_null_module=static
2737         ol_with_passwd_module=static
2738         ol_with_perl_module=static
2739         ol_with_shell_module=static
2740         ol_with_sql_module=static
2741
2742         ol_enable_slurpd=no
2743
2744         ol_enable_rewrite=no
2745
2746         ol_with_dyngroup=no
2747         ol_with_proxycache=no
2748         ol_with_rwm=no
2749
2750 elif test $ol_enable_ldbm = no ; then
2751         
2752         if test $ol_with_ldbm_api != auto ; then
2753                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2754         fi
2755
2756         if test $ol_with_ldbm_type != auto ; then
2757                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2758         fi
2759
2760         if test $ol_with_ldbm_module != static ; then
2761                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2762         fi
2763
2764         if test $ol_enable_modules != yes -a \
2765                 $ol_enable_bdb = no -a \
2766                 $ol_enable_dnssrv = no -a \
2767                 $ol_enable_hdb = no -a \
2768                 $ol_enable_ldap = no -a \
2769                 $ol_enable_meta = no -a \
2770                 $ol_enable_monitor = no -a \
2771                 $ol_enable_null = no -a \
2772                 $ol_enable_passwd = no -a \
2773                 $ol_enable_perl = no -a \
2774                 $ol_enable_shell = no -a \
2775                 $ol_enable_sql = no ; then
2776
2777                 if test $ol_enable_slapd = yes ; then
2778                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2779                 else
2780                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2781                         ol_enable_slapd=no
2782                 fi
2783         fi
2784
2785         ol_with_ldbm_api=no
2786         ol_with_ldbm_type=no
2787         ol_with_ldbm_module=static
2788
2789         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2790                 ol_with_ldbm_api=berkeley
2791         fi
2792
2793 else
2794                 if test $ol_with_ldbm_api = gdbm -a \
2795                 $ol_with_ldbm_type = btree ; then
2796                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2797         fi
2798         if test $ol_with_ldbm_api = mdbm -a \
2799                 $ol_with_ldbm_type = btree ; then
2800                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2801         fi
2802         if test $ol_with_ldbm_api = ndbm -a \
2803                 $ol_with_ldbm_type = btree ; then
2804                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2805         fi
2806
2807         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2808                 if test $ol_with_ldbm_api = auto ; then
2809                         ol_with_ldbm_api=berkeley
2810                 elif test $ol_with_ldbm_api != berkeley ; then
2811                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2812                 fi
2813
2814         elif test $ol_enable_bdb = auto ; then
2815                 if test $ol_with_ldbm_api != berkeley \
2816                         -o $ol_with_ldbm_api != auto ; then
2817                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2818                         ol_enable_bdb=no
2819                 fi
2820         fi
2821 fi
2822
2823 if test $ol_enable_slurpd = yes ; then
2824                 if test $ol_with_threads = no ; then
2825                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2826         fi
2827 fi
2828
2829 if test $ol_enable_lmpasswd = yes ; then
2830         if test $ol_with_tls = no ; then
2831                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2832         fi
2833 fi
2834
2835 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2836         if test $ol_with_kerberos = no ; then
2837                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2838         elif test $ol_with_kerberos = auto ; then
2839                 ol_with_kerberos=yes
2840         fi
2841
2842 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2843         if test $ol_with_kerberos = auto ; then
2844                 ol_with_kerberos=no
2845         elif test $ol_with_kerberos != no ; then
2846                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2847                 ol_with_kerberos=no
2848         fi
2849 fi
2850
2851 if test $ol_enable_spasswd = yes ; then
2852         if test $ol_with_cyrus_sasl = no ; then
2853                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2854         fi
2855         ol_with_cyrus_sasl=yes
2856 fi
2857
2858 echo "$ac_t""done" 1>&6
2859
2860 LDAP_LIBS=
2861 LDBM_LIBS=
2862 LTHREAD_LIBS=
2863 LUTIL_LIBS=
2864
2865 SLAPD_LIBS=
2866 SLURPD_LIBS=
2867
2868 BUILD_SLAPD=no
2869 BUILD_SLURPD=no
2870
2871 BUILD_THREAD=no
2872
2873 BUILD_SLAPI=no
2874 SLAPD_SLAPI_DEPEND=
2875
2876 BUILD_BDB=no
2877 BUILD_DNSSRV=no
2878 BUILD_HDB=no
2879 BUILD_LDAP=no
2880 BUILD_LDBM=no
2881 BUILD_META=no
2882 BUILD_MONITOR=no
2883 BUILD_NULL=no
2884 BUILD_PASSWD=no
2885 BUILD_PERL=no
2886 BUILD_SHELL=no
2887 BUILD_SQL=no
2888
2889 BUILD_BDB_DYNAMIC=static
2890 BUILD_DNSSRV_DYNAMIC=static
2891 BUILD_HDB_DYNAMIC=static
2892 BUILD_LDAP_DYNAMIC=static
2893 BUILD_LDBM_DYNAMIC=static
2894 BUILD_META_DYNAMIC=static
2895 BUILD_MONITOR_DYNAMIC=static
2896 BUILD_NULL_DYNAMIC=static
2897 BUILD_PASSWD_DYNAMIC=static
2898 BUILD_PERL_DYNAMIC=static
2899 BUILD_SHELL_DYNAMIC=static
2900 BUILD_SQL_DYNAMIC=static
2901
2902 BUILD_DYNGROUP=no
2903 BUILD_PROXYCACHE=no
2904 BUILD_RWM=no
2905
2906 SLAPD_DYNAMIC_OVERLAYS=
2907
2908 SLAPD_MODULES_LDFLAGS=
2909 SLAPD_MODULES_CPPFLAGS=
2910
2911 SLAPD_STATIC_BACKENDS=
2912 SLAPD_DYNAMIC_BACKENDS=
2913
2914 SLAPD_PERL_LDFLAGS=
2915 MOD_PERL_LDFLAGS=
2916 PERL_CPPFLAGS=
2917
2918 SLAPD_SQL_LDFLAGS=
2919 SLAPD_SQL_LIBS=
2920 SLAPD_SQL_INCLUDES=
2921
2922 KRB4_LIBS=
2923 KRB5_LIBS=
2924 SASL_LIBS=
2925 TLS_LIBS=
2926 MODULES_LIBS=
2927 SLAPI_LIBS=
2928 LIBSLAPI=
2929 LIBSLAPITOOLS=
2930 AUTH_LIBS=
2931
2932 SLAPD_SLP_LIBS=
2933
2934
2935 # Find a good install program.  We prefer a C program (faster),
2936 # so one script is as good as another.  But avoid the broken or
2937 # incompatible versions:
2938 # SysV /etc/install, /usr/sbin/install
2939 # SunOS /usr/etc/install
2940 # IRIX /sbin/install
2941 # AIX /bin/install
2942 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2943 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2944 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2945 # ./install, which can be erroneously created by make from ./install.sh.
2946 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2947 echo "configure:2948: checking for a BSD compatible install" >&5
2948 if test -z "$INSTALL"; then
2949 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2950   echo $ac_n "(cached) $ac_c" 1>&6
2951 else
2952     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2953   for ac_dir in $PATH; do
2954     # Account for people who put trailing slashes in PATH elements.
2955     case "$ac_dir/" in
2956     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2957     *)
2958       # OSF1 and SCO ODT 3.0 have their own names for install.
2959       # Don't use installbsd from OSF since it installs stuff as root
2960       # by default.
2961       for ac_prog in ginstall scoinst install; do
2962         if test -f $ac_dir/$ac_prog; then
2963           if test $ac_prog = install &&
2964             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2965             # AIX install.  It has an incompatible calling convention.
2966             :
2967           elif test $ac_prog = install &&
2968             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2969             # program-specific install script used by HP pwplus--don't use.
2970             :
2971           else
2972             ac_cv_path_install="$ac_dir/$ac_prog -c"
2973             break 2
2974           fi
2975         fi
2976       done
2977       ;;
2978     esac
2979   done
2980   IFS="$ac_save_IFS"
2981
2982 fi
2983   if test "${ac_cv_path_install+set}" = set; then
2984     INSTALL="$ac_cv_path_install"
2985   else
2986     # As a last resort, use the slow shell script.  We don't cache a
2987     # path for INSTALL within a source directory, because that will
2988     # break other packages using the cache if that directory is
2989     # removed, or if the path is relative.
2990     INSTALL="$ac_install_sh"
2991   fi
2992 fi
2993 echo "$ac_t""$INSTALL" 1>&6
2994
2995 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2996 # It thinks the first close brace ends the variable substitution.
2997 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2998
2999 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3000
3001 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3002
3003
3004 cat >> confdefs.h <<\EOF
3005 #define HAVE_MKVERSION 1
3006 EOF
3007
3008
3009
3010
3011 ol_aix_threads=no
3012 case "$target" in
3013 *-*-aix*)       if test -z "$CC" ; then
3014                 case "$ol_with_threads" in
3015                 auto | yes |  posix) ol_aix_threads=yes ;;
3016                 esac
3017         fi
3018 ;;
3019 esac
3020
3021 if test $ol_aix_threads = yes ; then
3022         if test -z "${CC}" ; then
3023                 for ac_prog in cc_r xlc_r cc
3024 do
3025 # Extract the first word of "$ac_prog", so it can be a program name with args.
3026 set dummy $ac_prog; ac_word=$2
3027 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3028 echo "configure:3029: checking for $ac_word" >&5
3029 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3030   echo $ac_n "(cached) $ac_c" 1>&6
3031 else
3032   if test -n "$CC"; then
3033   ac_cv_prog_CC="$CC" # Let the user override the test.
3034 else
3035   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3036   ac_dummy="$PATH"
3037   for ac_dir in $ac_dummy; do
3038     test -z "$ac_dir" && ac_dir=.
3039     if test -f $ac_dir/$ac_word; then
3040       ac_cv_prog_CC="$ac_prog"
3041       break
3042     fi
3043   done
3044   IFS="$ac_save_ifs"
3045 fi
3046 fi
3047 CC="$ac_cv_prog_CC"
3048 if test -n "$CC"; then
3049   echo "$ac_t""$CC" 1>&6
3050 else
3051   echo "$ac_t""no" 1>&6
3052 fi
3053
3054 test -n "$CC" && break
3055 done
3056
3057
3058                 if test "$CC" = cc ; then
3059                                                 if test $ol_with_threads != auto ; then
3060                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3061                         else
3062                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3063                         fi
3064                         ol_with_threads=no
3065                 fi
3066         fi
3067
3068         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3069                 ol_with_threads=posix
3070                 ol_cv_pthread_create=yes
3071         fi
3072 fi
3073
3074 if test -z "${CC}"; then
3075         for ac_prog in cc gcc
3076 do
3077 # Extract the first word of "$ac_prog", so it can be a program name with args.
3078 set dummy $ac_prog; ac_word=$2
3079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3080 echo "configure:3081: checking for $ac_word" >&5
3081 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   if test -n "$CC"; then
3085   ac_cv_prog_CC="$CC" # Let the user override the test.
3086 else
3087   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3088   ac_dummy="$PATH"
3089   for ac_dir in $ac_dummy; do
3090     test -z "$ac_dir" && ac_dir=.
3091     if test -f $ac_dir/$ac_word; then
3092       ac_cv_prog_CC="$ac_prog"
3093       break
3094     fi
3095   done
3096   IFS="$ac_save_ifs"
3097 fi
3098 fi
3099 CC="$ac_cv_prog_CC"
3100 if test -n "$CC"; then
3101   echo "$ac_t""$CC" 1>&6
3102 else
3103   echo "$ac_t""no" 1>&6
3104 fi
3105
3106 test -n "$CC" && break
3107 done
3108 test -n "$CC" || CC="missing"
3109
3110
3111         if test "${CC}" = "missing" ; then
3112                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3113         fi
3114 fi
3115
3116 if test -z "${AR}"; then
3117         for ac_prog in ar gar
3118 do
3119 # Extract the first word of "$ac_prog", so it can be a program name with args.
3120 set dummy $ac_prog; ac_word=$2
3121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3122 echo "configure:3123: checking for $ac_word" >&5
3123 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3124   echo $ac_n "(cached) $ac_c" 1>&6
3125 else
3126   if test -n "$AR"; then
3127   ac_cv_prog_AR="$AR" # Let the user override the test.
3128 else
3129   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3130   ac_dummy="$PATH"
3131   for ac_dir in $ac_dummy; do
3132     test -z "$ac_dir" && ac_dir=.
3133     if test -f $ac_dir/$ac_word; then
3134       ac_cv_prog_AR="$ac_prog"
3135       break
3136     fi
3137   done
3138   IFS="$ac_save_ifs"
3139 fi
3140 fi
3141 AR="$ac_cv_prog_AR"
3142 if test -n "$AR"; then
3143   echo "$ac_t""$AR" 1>&6
3144 else
3145   echo "$ac_t""no" 1>&6
3146 fi
3147
3148 test -n "$AR" && break
3149 done
3150 test -n "$AR" || AR="missing"
3151
3152
3153         if test "${AR}" = "missing" ; then
3154                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3155         fi
3156 fi
3157
3158
3159
3160 # Find the correct PATH separator.  Usually this is `:', but
3161 # DJGPP uses `;' like DOS.
3162 if test "X${PATH_SEPARATOR+set}" != Xset; then
3163   UNAME=${UNAME-`uname 2>/dev/null`}
3164   case X$UNAME in
3165     *-DOS) lt_cv_sys_path_separator=';' ;;
3166     *)     lt_cv_sys_path_separator=':' ;;
3167   esac
3168   PATH_SEPARATOR=$lt_cv_sys_path_separator
3169 fi
3170
3171 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3172 echo "configure:3173: checking for Cygwin environment" >&5
3173 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3174   echo $ac_n "(cached) $ac_c" 1>&6
3175 else
3176   cat > conftest.$ac_ext <<EOF
3177 #line 3178 "configure"
3178 #include "confdefs.h"
3179
3180 int main() {
3181
3182 #ifndef __CYGWIN__
3183 #define __CYGWIN__ __CYGWIN32__
3184 #endif
3185 return __CYGWIN__;
3186 ; return 0; }
3187 EOF
3188 if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189   rm -rf conftest*
3190   ac_cv_cygwin=yes
3191 else
3192   echo "configure: failed program was:" >&5
3193   cat conftest.$ac_ext >&5
3194   rm -rf conftest*
3195   ac_cv_cygwin=no
3196 fi
3197 rm -f conftest*
3198 fi
3199
3200 echo "$ac_t""$ac_cv_cygwin" 1>&6
3201 CYGWIN=
3202 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3203 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3204 echo "configure:3205: checking for mingw32 environment" >&5
3205 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3206   echo $ac_n "(cached) $ac_c" 1>&6
3207 else
3208   cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211
3212 int main() {
3213 return __MINGW32__;
3214 ; return 0; }
3215 EOF
3216 if { (eval echo configure:3217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3217   rm -rf conftest*
3218   ac_cv_mingw32=yes
3219 else
3220   echo "configure: failed program was:" >&5
3221   cat conftest.$ac_ext >&5
3222   rm -rf conftest*
3223   ac_cv_mingw32=no
3224 fi
3225 rm -f conftest*
3226 fi
3227
3228 echo "$ac_t""$ac_cv_mingw32" 1>&6
3229 MINGW32=
3230 test "$ac_cv_mingw32" = yes && MINGW32=yes
3231 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3232 echo "configure:3233: checking for EMX OS/2 environment" >&5
3233 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3234   echo $ac_n "(cached) $ac_c" 1>&6
3235 else
3236   cat > conftest.$ac_ext <<EOF
3237 #line 3238 "configure"
3238 #include "confdefs.h"
3239
3240 int main() {
3241 return __EMX__;
3242 ; return 0; }
3243 EOF
3244 if { (eval echo configure:3245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3245   rm -rf conftest*
3246   ac_cv_emxos2=yes
3247 else
3248   echo "configure: failed program was:" >&5
3249   cat conftest.$ac_ext >&5
3250   rm -rf conftest*
3251   ac_cv_emxos2=no
3252 fi
3253 rm -f conftest*
3254 fi
3255
3256 echo "$ac_t""$ac_cv_emxos2" 1>&6
3257 EMXOS2=
3258 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3259 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3260 echo "configure:3261: checking how to run the C preprocessor" >&5
3261 # On Suns, sometimes $CPP names a directory.
3262 if test -n "$CPP" && test -d "$CPP"; then
3263   CPP=
3264 fi
3265 if test -z "$CPP"; then
3266 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3267   echo $ac_n "(cached) $ac_c" 1>&6
3268 else
3269     # This must be in double quotes, not single quotes, because CPP may get
3270   # substituted into the Makefile and "${CC-cc}" will confuse make.
3271   CPP="${CC-cc} -E"
3272   # On the NeXT, cc -E runs the code through the compiler's parser,
3273   # not just through cpp.
3274   cat > conftest.$ac_ext <<EOF
3275 #line 3276 "configure"
3276 #include "confdefs.h"
3277 #include <assert.h>
3278 Syntax Error
3279 EOF
3280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3281 { (eval echo configure:3282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3283 if test -z "$ac_err"; then
3284   :
3285 else
3286   echo "$ac_err" >&5
3287   echo "configure: failed program was:" >&5
3288   cat conftest.$ac_ext >&5
3289   rm -rf conftest*
3290   CPP="${CC-cc} -E -traditional-cpp"
3291   cat > conftest.$ac_ext <<EOF
3292 #line 3293 "configure"
3293 #include "confdefs.h"
3294 #include <assert.h>
3295 Syntax Error
3296 EOF
3297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3298 { (eval echo configure:3299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3300 if test -z "$ac_err"; then
3301   :
3302 else
3303   echo "$ac_err" >&5
3304   echo "configure: failed program was:" >&5
3305   cat conftest.$ac_ext >&5
3306   rm -rf conftest*
3307   CPP="${CC-cc} -nologo -E"
3308   cat > conftest.$ac_ext <<EOF
3309 #line 3310 "configure"
3310 #include "confdefs.h"
3311 #include <assert.h>
3312 Syntax Error
3313 EOF
3314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3315 { (eval echo configure:3316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3317 if test -z "$ac_err"; then
3318   :
3319 else
3320   echo "$ac_err" >&5
3321   echo "configure: failed program was:" >&5
3322   cat conftest.$ac_ext >&5
3323   rm -rf conftest*
3324   CPP=/lib/cpp
3325 fi
3326 rm -f conftest*
3327 fi
3328 rm -f conftest*
3329 fi
3330 rm -f conftest*
3331   ac_cv_prog_CPP="$CPP"
3332 fi
3333   CPP="$ac_cv_prog_CPP"
3334 else
3335   ac_cv_prog_CPP="$CPP"
3336 fi
3337 echo "$ac_t""$CPP" 1>&6
3338
3339 # Check whether --enable-fast-install or --disable-fast-install was given.
3340 if test "${enable_fast_install+set}" = set; then
3341   enableval="$enable_fast_install"
3342   p=${PACKAGE-default}
3343 case $enableval in
3344 yes) enable_fast_install=yes ;;
3345 no) enable_fast_install=no ;;
3346 *)
3347   enable_fast_install=no
3348   # Look at the argument we got.  We use all the common list separators.
3349   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3350   for pkg in $enableval; do
3351     if test "X$pkg" = "X$p"; then
3352       enable_fast_install=yes
3353     fi
3354   done
3355   IFS="$ac_save_ifs"
3356   ;;
3357 esac
3358 else
3359   enable_fast_install=yes
3360 fi
3361
3362 # Extract the first word of "gcc", so it can be a program name with args.
3363 set dummy gcc; ac_word=$2
3364 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3365 echo "configure:3366: checking for $ac_word" >&5
3366 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3367   echo $ac_n "(cached) $ac_c" 1>&6
3368 else
3369   if test -n "$CC"; then
3370   ac_cv_prog_CC="$CC" # Let the user override the test.
3371 else
3372   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3373   ac_dummy="$PATH"
3374   for ac_dir in $ac_dummy; do
3375     test -z "$ac_dir" && ac_dir=.
3376     if test -f $ac_dir/$ac_word; then
3377       ac_cv_prog_CC="gcc"
3378       break
3379     fi
3380   done
3381   IFS="$ac_save_ifs"
3382 fi
3383 fi
3384 CC="$ac_cv_prog_CC"
3385 if test -n "$CC"; then
3386   echo "$ac_t""$CC" 1>&6
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390
3391 if test -z "$CC"; then
3392   # Extract the first word of "cc", so it can be a program name with args.
3393 set dummy cc; ac_word=$2
3394 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3395 echo "configure:3396: checking for $ac_word" >&5
3396 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3397   echo $ac_n "(cached) $ac_c" 1>&6
3398 else
3399   if test -n "$CC"; then
3400   ac_cv_prog_CC="$CC" # Let the user override the test.
3401 else
3402   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3403   ac_prog_rejected=no
3404   ac_dummy="$PATH"
3405   for ac_dir in $ac_dummy; do
3406     test -z "$ac_dir" && ac_dir=.
3407     if test -f $ac_dir/$ac_word; then
3408       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3409         ac_prog_rejected=yes
3410         continue
3411       fi
3412       ac_cv_prog_CC="cc"
3413       break
3414     fi
3415   done
3416   IFS="$ac_save_ifs"
3417 if test $ac_prog_rejected = yes; then
3418   # We found a bogon in the path, so make sure we never use it.
3419   set dummy $ac_cv_prog_CC
3420   shift
3421   if test $# -gt 0; then
3422     # We chose a different compiler from the bogus one.
3423     # However, it has the same basename, so the bogon will be chosen
3424     # first if we set CC to just the basename; use the full file name.
3425     shift
3426     set dummy "$ac_dir/$ac_word" "$@"
3427     shift
3428     ac_cv_prog_CC="$@"
3429   fi
3430 fi
3431 fi
3432 fi
3433 CC="$ac_cv_prog_CC"
3434 if test -n "$CC"; then
3435   echo "$ac_t""$CC" 1>&6
3436 else
3437   echo "$ac_t""no" 1>&6
3438 fi
3439
3440   if test -z "$CC"; then
3441     case "`uname -s`" in
3442     *win32* | *WIN32* | *CYGWIN*)
3443       # Extract the first word of "cl", so it can be a program name with args.
3444 set dummy cl; ac_word=$2
3445 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3446 echo "configure:3447: checking for $ac_word" >&5
3447 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3448   echo $ac_n "(cached) $ac_c" 1>&6
3449 else
3450   if test -n "$CC"; then
3451   ac_cv_prog_CC="$CC" # Let the user override the test.
3452 else
3453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3454   ac_dummy="$PATH"
3455   for ac_dir in $ac_dummy; do
3456     test -z "$ac_dir" && ac_dir=.
3457     if test -f $ac_dir/$ac_word; then
3458       ac_cv_prog_CC="cl"
3459       break
3460     fi
3461   done
3462   IFS="$ac_save_ifs"
3463 fi
3464 fi
3465 CC="$ac_cv_prog_CC"
3466 if test -n "$CC"; then
3467   echo "$ac_t""$CC" 1>&6
3468 else
3469   echo "$ac_t""no" 1>&6
3470 fi
3471  ;;
3472     esac
3473   fi
3474   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3475 fi
3476
3477 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3478 echo "configure:3479: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3479
3480 ac_ext=c
3481 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3482 ac_cpp='$CPP $CPPFLAGS'
3483 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3484 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3485 cross_compiling=$ac_cv_prog_cc_cross
3486
3487 cat > conftest.$ac_ext << EOF
3488
3489 #line 3490 "configure"
3490 #include "confdefs.h"
3491
3492 main(){return(0);}
3493 EOF
3494 if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3495   ac_cv_prog_cc_works=yes
3496   # If we can't run a trivial program, we are probably using a cross compiler.
3497   if (./conftest; exit) 2>/dev/null; then
3498     ac_cv_prog_cc_cross=no
3499   else
3500     ac_cv_prog_cc_cross=yes
3501   fi
3502 else
3503   echo "configure: failed program was:" >&5
3504   cat conftest.$ac_ext >&5
3505   ac_cv_prog_cc_works=no
3506 fi
3507 rm -fr conftest*
3508 ac_ext=c
3509 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3510 ac_cpp='$CPP $CPPFLAGS'
3511 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3512 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3513 cross_compiling=$ac_cv_prog_cc_cross
3514
3515 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3516 if test $ac_cv_prog_cc_works = no; then
3517   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3518 fi
3519 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3520 echo "configure:3521: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3521 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3522 cross_compiling=$ac_cv_prog_cc_cross
3523
3524 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3525 echo "configure:3526: checking whether we are using GNU C" >&5
3526 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   cat > conftest.c <<EOF
3530 #ifdef __GNUC__
3531   yes;
3532 #endif
3533 EOF
3534 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3535   ac_cv_prog_gcc=yes
3536 else
3537   ac_cv_prog_gcc=no
3538 fi
3539 fi
3540
3541 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3542
3543 if test $ac_cv_prog_gcc = yes; then
3544   GCC=yes
3545 else
3546   GCC=
3547 fi
3548
3549 ac_test_CFLAGS="${CFLAGS+set}"
3550 ac_save_CFLAGS="$CFLAGS"
3551 CFLAGS=
3552 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3553 echo "configure:3554: checking whether ${CC-cc} accepts -g" >&5
3554 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3555   echo $ac_n "(cached) $ac_c" 1>&6
3556 else
3557   echo 'void f(){}' > conftest.c
3558 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3559   ac_cv_prog_cc_g=yes
3560 else
3561   ac_cv_prog_cc_g=no
3562 fi
3563 rm -f conftest*
3564
3565 fi
3566
3567 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3568 if test "$ac_test_CFLAGS" = set; then
3569   CFLAGS="$ac_save_CFLAGS"
3570 elif test $ac_cv_prog_cc_g = yes; then
3571   if test "$GCC" = yes; then
3572     CFLAGS="-g -O2"
3573   else
3574     CFLAGS="-g"
3575   fi
3576 else
3577   if test "$GCC" = yes; then
3578     CFLAGS="-O2"
3579   else
3580     CFLAGS=
3581   fi
3582 fi
3583
3584 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3585 if test "${with_gnu_ld+set}" = set; then
3586   withval="$with_gnu_ld"
3587   test "$withval" = no || with_gnu_ld=yes
3588 else
3589   with_gnu_ld=no
3590 fi
3591
3592 ac_prog=ld
3593 if test "$GCC" = yes; then
3594   # Check if gcc -print-prog-name=ld gives a path.
3595   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3596 echo "configure:3597: checking for ld used by GCC" >&5
3597   case $host in
3598   *-*-mingw*)
3599     # gcc leaves a trailing carriage return which upsets mingw
3600     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3601   *)
3602     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3603   esac
3604   case $ac_prog in
3605     # Accept absolute paths.
3606     [\\/]* | [A-Za-z]:[\\/]*)
3607       re_direlt='/[^/][^/]*/\.\./'
3608       # Canonicalize the path of ld
3609       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3610       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3611         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3612       done
3613       test -z "$LD" && LD="$ac_prog"
3614       ;;
3615   "")
3616     # If it fails, then pretend we aren't using GCC.
3617     ac_prog=ld
3618     ;;
3619   *)
3620     # If it is relative, then search for the first ld in PATH.
3621     with_gnu_ld=unknown
3622     ;;
3623   esac
3624 elif test "$with_gnu_ld" = yes; then
3625   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3626 echo "configure:3627: checking for GNU ld" >&5
3627 else
3628   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3629 echo "configure:3630: checking for non-GNU ld" >&5
3630 fi
3631 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3632   echo $ac_n "(cached) $ac_c" 1>&6
3633 else
3634   if test -z "$LD"; then
3635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3636   for ac_dir in $PATH; do
3637     test -z "$ac_dir" && ac_dir=.
3638     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3639       lt_cv_path_LD="$ac_dir/$ac_prog"
3640       # Check to see if the program is GNU ld.  I'd rather use --version,
3641       # but apparently some GNU ld's only accept -v.
3642       # Break only if it was the GNU/non-GNU ld that we prefer.
3643       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3644         test "$with_gnu_ld" != no && break
3645       else
3646         test "$with_gnu_ld" != yes && break
3647       fi
3648     fi
3649   done
3650   IFS="$ac_save_ifs"
3651 else
3652   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3653 fi
3654 fi
3655
3656 LD="$lt_cv_path_LD"
3657 if test -n "$LD"; then
3658   echo "$ac_t""$LD" 1>&6
3659 else
3660   echo "$ac_t""no" 1>&6
3661 fi
3662 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3663 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3664 echo "configure:3665: checking if the linker ($LD) is GNU ld" >&5
3665 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3666   echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3669 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3670   lt_cv_prog_gnu_ld=yes
3671 else
3672   lt_cv_prog_gnu_ld=no
3673 fi
3674 fi
3675
3676 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3677 with_gnu_ld=$lt_cv_prog_gnu_ld
3678
3679
3680 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3681 echo "configure:3682: checking for $LD option to reload object files" >&5
3682 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3683   echo $ac_n "(cached) $ac_c" 1>&6
3684 else
3685   lt_cv_ld_reload_flag='-r'
3686 fi
3687
3688 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3689 reload_flag=$lt_cv_ld_reload_flag
3690 test -n "$reload_flag" && reload_flag=" $reload_flag"
3691
3692 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3693 echo "configure:3694: checking for BSD-compatible nm" >&5
3694 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3695   echo $ac_n "(cached) $ac_c" 1>&6
3696 else
3697   if test -n "$NM"; then
3698   # Let the user override the test.
3699   lt_cv_path_NM="$NM"
3700 else
3701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3702   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3703     test -z "$ac_dir" && ac_dir=.
3704     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3705     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3706       # Check to see if the nm accepts a BSD-compat flag.
3707       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3708       #   nm: unknown option "B" ignored
3709       # Tru64's nm complains that /dev/null is an invalid object file
3710       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3711         lt_cv_path_NM="$tmp_nm -B"
3712         break
3713       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3714         lt_cv_path_NM="$tmp_nm -p"
3715         break
3716       else
3717         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3718         continue # so that we can try to find one that supports BSD flags
3719       fi
3720     fi
3721   done
3722   IFS="$ac_save_ifs"
3723   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3724 fi
3725 fi
3726
3727 NM="$lt_cv_path_NM"
3728 echo "$ac_t""$NM" 1>&6
3729
3730 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3731 echo "configure:3732: checking for a sed that does not truncate output" >&5
3732 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3733   echo $ac_n "(cached) $ac_c" 1>&6
3734 else
3735   # Loop through the user's path and test for sed and gsed.
3736 # Then use that list of sed's as ones to test for truncation.
3737 as_executable_p="test -f"
3738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3739 for as_dir in $PATH
3740 do
3741   IFS=$as_save_IFS
3742   test -z "$as_dir" && as_dir=.
3743   for ac_prog in sed gsed; do
3744     for ac_exec_ext in '' $ac_executable_extensions; do
3745       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3746         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3747       fi
3748     done
3749   done
3750 done
3751
3752   # Create a temporary directory, and hook for its removal unless debugging.
3753 $debug ||
3754 {
3755   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3756   trap '{ (exit 1); exit 1; }' 1 2 13 15
3757 }
3758
3759 # Create a (secure) tmp directory for tmp files.
3760 : ${TMPDIR=/tmp}
3761 {
3762   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3763   test -n "$tmp" && test -d "$tmp"
3764 }  ||
3765 {
3766   tmp=$TMPDIR/sed$$-$RANDOM
3767   (umask 077 && mkdir $tmp)
3768 } ||
3769 {
3770    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3771    { (exit 1); exit 1; }
3772 }
3773   _max=0
3774   _count=0
3775   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3776   # along with /bin/sed that truncates output.
3777   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3778     test ! -f ${_sed} && break
3779     cat /dev/null > "$tmp/sed.in"
3780     _count=0
3781     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3782     # Check for GNU sed and select it if it is found.
3783     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3784       lt_cv_path_SED=${_sed}
3785       break
3786     fi
3787     while true; do
3788       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3789       mv "$tmp/sed.tmp" "$tmp/sed.in"
3790       cp "$tmp/sed.in" "$tmp/sed.nl"
3791       echo >>"$tmp/sed.nl"
3792       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3793       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3794       # 40000 chars as input seems more than enough
3795       test $_count -gt 10 && break
3796       _count=`expr $_count + 1`
3797       if test $_count -gt $_max; then
3798         _max=$_count
3799         lt_cv_path_SED=$_sed
3800       fi
3801     done
3802   done
3803   rm -rf "$tmp"
3804
3805 fi
3806
3807 if test "X$SED" != "X"; then
3808   lt_cv_path_SED=$SED
3809 else
3810   SED=$lt_cv_path_SED
3811 fi
3812 echo "$ac_t""$SED" 1>&6
3813
3814 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3815 echo "configure:3816: checking whether ln -s works" >&5
3816 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3817   echo $ac_n "(cached) $ac_c" 1>&6
3818 else
3819   rm -f conftestdata
3820 if ln -s X conftestdata 2>/dev/null
3821 then
3822   rm -f conftestdata
3823   ac_cv_prog_LN_S="ln -s"
3824 else
3825   ac_cv_prog_LN_S=ln
3826 fi
3827 fi
3828 LN_S="$ac_cv_prog_LN_S"
3829 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3830   echo "$ac_t""yes" 1>&6
3831 else
3832   echo "$ac_t""no" 1>&6
3833 fi
3834
3835 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3836 echo "configure:3837: checking how to recognise dependent libraries" >&5
3837 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3838   echo $ac_n "(cached) $ac_c" 1>&6
3839 else
3840   lt_cv_file_magic_cmd='$MAGIC_CMD'
3841 lt_cv_file_magic_test_file=
3842 lt_cv_deplibs_check_method='unknown'
3843 # Need to set the preceding variable on all platforms that support
3844 # interlibrary dependencies.
3845 # 'none' -- dependencies not supported.
3846 # `unknown' -- same as none, but documents that we really don't know.
3847 # 'pass_all' -- all dependencies passed with no checks.
3848 # 'test_compile' -- check by making test program.
3849 # 'file_magic [[regex]]' -- check by looking for files in library path
3850 # which responds to the $file_magic_cmd with a given egrep regex.
3851 # If you have `file' or equivalent on your system and you're not sure
3852 # whether `pass_all' will *always* work, you probably want this one.
3853
3854 case $host_os in
3855 aix4* | aix5*)
3856   lt_cv_deplibs_check_method=pass_all
3857   ;;
3858
3859 beos*)
3860   lt_cv_deplibs_check_method=pass_all
3861   ;;
3862
3863 bsdi4*)
3864   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3865   lt_cv_file_magic_cmd='/usr/bin/file -L'
3866   lt_cv_file_magic_test_file=/shlib/libc.so
3867   ;;
3868
3869 cygwin* | mingw* | pw32*)
3870   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3871   lt_cv_file_magic_cmd='$OBJDUMP -f'
3872   ;;
3873
3874 darwin* | rhapsody*)
3875   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3876   lt_cv_file_magic_cmd='/usr/bin/file -L'
3877   case "$host_os" in
3878   rhapsody* | darwin1.[012])
3879     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3880     ;;
3881   *) # Darwin 1.3 on
3882     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3883     ;;
3884   esac
3885   ;;
3886
3887 freebsd*)
3888   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3889     case $host_cpu in
3890     i*86 )
3891       # Not sure whether the presence of OpenBSD here was a mistake.
3892       # Let's accept both of them until this is cleared up.
3893       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3894       lt_cv_file_magic_cmd=/usr/bin/file
3895       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3896       ;;
3897     esac
3898   else
3899     lt_cv_deplibs_check_method=pass_all
3900   fi
3901   ;;
3902
3903 gnu*)
3904   lt_cv_deplibs_check_method=pass_all
3905   ;;
3906
3907 hpux10.20*|hpux11*)
3908   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3909   lt_cv_file_magic_cmd=/usr/bin/file
3910   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3911   ;;
3912
3913 irix5* | irix6* | nonstopux*)
3914   case $host_os in
3915   irix5* | nonstopux*)
3916     # this will be overridden with pass_all, but let us keep it just in case
3917     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3918     ;;
3919   *)
3920     case $LD in
3921     *-32|*"-32 ") libmagic=32-bit;;
3922     *-n32|*"-n32 ") libmagic=N32;;
3923     *-64|*"-64 ") libmagic=64-bit;;
3924     *) libmagic=never-match;;
3925     esac
3926     # this will be overridden with pass_all, but let us keep it just in case
3927     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3928     ;;
3929   esac
3930   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3931   lt_cv_deplibs_check_method=pass_all
3932   ;;
3933
3934 # This must be Linux ELF.
3935 linux-gnu*)
3936   case $host_cpu in
3937   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3938     lt_cv_deplibs_check_method=pass_all ;;
3939   *)
3940     # glibc up to 2.1.1 does not perform some relocations on ARM
3941     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3942   esac
3943   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3944   ;;
3945
3946 netbsd*)
3947   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3948     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3949   else
3950     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3951   fi
3952   ;;
3953
3954 newos6*)
3955   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3956   lt_cv_file_magic_cmd=/usr/bin/file
3957   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3958   ;;
3959
3960 openbsd*)
3961   lt_cv_file_magic_cmd=/usr/bin/file
3962   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3963   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3964     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3965   else
3966     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3967   fi
3968   ;;
3969
3970 openedition*)
3971   lt_cv_deplibs_check_method=pass_all
3972   ;;
3973
3974 osf3* | osf4* | osf5*)
3975   # this will be overridden with pass_all, but let us keep it just in case
3976   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3977   lt_cv_file_magic_test_file=/shlib/libc.so
3978   lt_cv_deplibs_check_method=pass_all
3979   ;;
3980
3981 sco3.2v5*)
3982   lt_cv_deplibs_check_method=pass_all
3983   ;;
3984
3985 solaris*)
3986   lt_cv_deplibs_check_method=pass_all
3987   lt_cv_file_magic_test_file=/lib/libc.so
3988   ;;
3989
3990 sysv5uw[78]* | sysv4*uw2*)
3991   lt_cv_deplibs_check_method=pass_all
3992   ;;
3993
3994 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3995   case $host_vendor in
3996   motorola)
3997     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
3998     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3999     ;;
4000   ncr)
4001     lt_cv_deplibs_check_method=pass_all
4002     ;;
4003   sequent)
4004     lt_cv_file_magic_cmd='/bin/file'
4005     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4006     ;;
4007   sni)
4008     lt_cv_file_magic_cmd='/bin/file'
4009     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4010     lt_cv_file_magic_test_file=/lib/libc.so
4011     ;;
4012   siemens)
4013     lt_cv_deplibs_check_method=pass_all
4014     ;;
4015   esac
4016   ;;
4017 esac
4018
4019 fi
4020
4021 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
4022 file_magic_cmd=$lt_cv_file_magic_cmd
4023 deplibs_check_method=$lt_cv_deplibs_check_method
4024
4025 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4026 echo "configure:4027: checking for object suffix" >&5
4027 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4028   echo $ac_n "(cached) $ac_c" 1>&6
4029 else
4030   rm -f conftest*
4031 echo 'int i = 1;' > conftest.$ac_ext
4032 if { (eval echo configure:4033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4033   for ac_file in conftest.*; do
4034     case $ac_file in
4035     *.c) ;;
4036     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4037     esac
4038   done
4039 else
4040   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4041 fi
4042 rm -f conftest*
4043 fi
4044
4045 echo "$ac_t""$ac_cv_objext" 1>&6
4046 OBJEXT=$ac_cv_objext
4047 ac_objext=$ac_cv_objext
4048
4049
4050
4051
4052 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4053 echo "configure:4054: checking for executable suffix" >&5
4054 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4055   echo $ac_n "(cached) $ac_c" 1>&6
4056 else
4057   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4058   ac_cv_exeext=.exe
4059 else
4060   rm -f conftest*
4061   echo 'int main () { return 0; }' > conftest.$ac_ext
4062   ac_cv_exeext=
4063   if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4064     for file in conftest.*; do
4065       case $file in
4066       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4067       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4068       esac
4069     done
4070   else
4071     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4072   fi
4073   rm -f conftest*
4074   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4075 fi
4076 fi
4077
4078 EXEEXT=""
4079 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4080 echo "$ac_t""${ac_cv_exeext}" 1>&6
4081 ac_exeext=$EXEEXT
4082
4083 if test $host != $build; then
4084   ac_tool_prefix=${host_alias}-
4085 else
4086   ac_tool_prefix=
4087 fi
4088
4089
4090
4091
4092 # Check for command to grab the raw symbol name followed by C symbol from nm.
4093 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4094 echo "configure:4095: checking command to parse $NM output" >&5
4095 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4096   echo $ac_n "(cached) $ac_c" 1>&6
4097 else
4098   
4099 # These are sane defaults that work on at least a few old systems.
4100 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4101
4102 # Character class describing NM global symbol codes.
4103 symcode='[BCDEGRST]'
4104
4105 # Regexp to match symbols that can be accessed directly from C.
4106 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4107
4108 # Transform the above into a raw symbol and a C symbol.
4109 symxfrm='\1 \2\3 \3'
4110
4111 # Transform an extracted symbol line into a proper C declaration
4112 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4113
4114 # Transform an extracted symbol line into symbol name and symbol address
4115 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4116
4117 # Define system-specific variables.
4118 case $host_os in
4119 aix*)
4120   symcode='[BCDT]'
4121   ;;
4122 cygwin* | mingw* | pw32*)
4123   symcode='[ABCDGISTW]'
4124   ;;
4125 hpux*) # Its linker distinguishes data from code symbols
4126   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4127   lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4128   ;;
4129 irix* | nonstopux*)
4130   symcode='[BCDEGRST]'
4131   ;;
4132 osf*)
4133   symcode='[BCDEGQRST]'
4134   ;;
4135 solaris* | sysv5*)
4136   symcode='[BDT]'
4137   ;;
4138 sysv4)
4139   symcode='[DFNSTU]'
4140   ;;
4141 esac
4142
4143 # Handle CRLF in mingw tool chain
4144 opt_cr=
4145 case $host_os in
4146 mingw*)
4147   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4148   ;;
4149 esac
4150
4151 # If we're using GNU nm, then use its standard symbol codes.
4152 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4153   symcode='[ABCDGISTW]'
4154 fi
4155
4156 # Try without a prefix undercore, then with it.
4157 for ac_symprfx in "" "_"; do
4158
4159   # Write the raw and C identifiers.
4160 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4161
4162   # Check to see that the pipe works correctly.
4163   pipe_works=no
4164   rm -f conftest*
4165   cat > conftest.$ac_ext <<EOF
4166 #ifdef __cplusplus
4167 extern "C" {
4168 #endif
4169 char nm_test_var;
4170 void nm_test_func(){}
4171 #ifdef __cplusplus
4172 }
4173 #endif
4174 int main(){nm_test_var='a';nm_test_func();return(0);}
4175 EOF
4176
4177   if { (eval echo configure:4178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4178     # Now try to grab the symbols.
4179     nlist=conftest.nm
4180     if { (eval echo configure:4181: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
4181       # Try sorting and uniquifying the output.
4182       if sort "$nlist" | uniq > "$nlist"T; then
4183         mv -f "$nlist"T "$nlist"
4184       else
4185         rm -f "$nlist"T
4186       fi
4187
4188       # Make sure that we snagged all the symbols we need.
4189       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4190         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4191           cat <<EOF > conftest.$ac_ext
4192 #ifdef __cplusplus
4193 extern "C" {
4194 #endif
4195
4196 EOF
4197           # Now generate the symbol file.
4198           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4199
4200           cat <<EOF >> conftest.$ac_ext
4201 #if defined (__STDC__) && __STDC__
4202 # define lt_ptr void *
4203 #else
4204 # define lt_ptr char *
4205 # define const
4206 #endif
4207
4208 /* The mapping between symbol names and symbols. */
4209 const struct {
4210   const char *name;
4211   lt_ptr address;
4212 }
4213 lt_preloaded_symbols[] =
4214 {
4215 EOF
4216           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4217           cat <<\EOF >> conftest.$ac_ext
4218   {0, (lt_ptr) 0}
4219 };
4220
4221 #ifdef __cplusplus
4222 }
4223 #endif
4224 EOF
4225           # Now try linking the two files.
4226           mv conftest.$ac_objext conftstm.$ac_objext
4227           save_LIBS="$LIBS"
4228           save_CFLAGS="$CFLAGS"
4229           LIBS="conftstm.$ac_objext"
4230           CFLAGS="$CFLAGS$no_builtin_flag"
4231           if { (eval echo configure:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4232             pipe_works=yes
4233           fi
4234           LIBS="$save_LIBS"
4235           CFLAGS="$save_CFLAGS"
4236         else
4237           echo "cannot find nm_test_func in $nlist" >&5
4238         fi
4239       else
4240         echo "cannot find nm_test_var in $nlist" >&5
4241       fi
4242     else
4243       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4244     fi
4245   else
4246     echo "$progname: failed program was:" >&5
4247     cat conftest.$ac_ext >&5
4248   fi
4249   rm -f conftest* conftst*
4250
4251   # Do not use the global_symbol_pipe unless it works.
4252   if test "$pipe_works" = yes; then
4253     break
4254   else
4255     lt_cv_sys_global_symbol_pipe=
4256   fi
4257 done
4258
4259 fi
4260
4261 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4262 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4263   global_symbol_to_cdecl=
4264   global_symbol_to_c_name_address=
4265 else
4266   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4267   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4268 fi
4269 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4270 then
4271   echo "$ac_t""failed" 1>&6
4272 else
4273   echo "$ac_t""ok" 1>&6
4274 fi
4275
4276 for ac_hdr in dlfcn.h
4277 do
4278 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4279 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4280 echo "configure:4281: checking for $ac_hdr" >&5
4281 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4282   echo $ac_n "(cached) $ac_c" 1>&6
4283 else
4284   cat > conftest.$ac_ext <<EOF
4285 #line 4286 "configure"
4286 #include "confdefs.h"
4287 #include <$ac_hdr>
4288 EOF
4289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4290 { (eval echo configure:4291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4292 if test -z "$ac_err"; then
4293   rm -rf conftest*
4294   eval "ac_cv_header_$ac_safe=yes"
4295 else
4296   echo "$ac_err" >&5
4297   echo "configure: failed program was:" >&5
4298   cat conftest.$ac_ext >&5
4299   rm -rf conftest*
4300   eval "ac_cv_header_$ac_safe=no"
4301 fi
4302 rm -f conftest*
4303 fi
4304 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4305   echo "$ac_t""yes" 1>&6
4306     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4307   cat >> confdefs.h <<EOF
4308 #define $ac_tr_hdr 1
4309 EOF
4310  
4311 else
4312   echo "$ac_t""no" 1>&6
4313 fi
4314 done
4315
4316
4317
4318
4319
4320
4321 # Only perform the check for file, if the check method requires it
4322 case $deplibs_check_method in
4323 file_magic*)
4324   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4325     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4326 echo "configure:4327: checking for ${ac_tool_prefix}file" >&5
4327 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4328   echo $ac_n "(cached) $ac_c" 1>&6
4329 else
4330   case $MAGIC_CMD in
4331   /*)
4332   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4333   ;;
4334   ?:/*)
4335   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4336   ;;
4337   *)
4338   ac_save_MAGIC_CMD="$MAGIC_CMD"
4339   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4340   ac_dummy="/usr/bin:$PATH"
4341   for ac_dir in $ac_dummy; do
4342     test -z "$ac_dir" && ac_dir=.
4343     if test -f $ac_dir/${ac_tool_prefix}file; then
4344       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4345       if test -n "$file_magic_test_file"; then
4346         case $deplibs_check_method in
4347         "file_magic "*)
4348           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4349           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4350           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4351             egrep "$file_magic_regex" > /dev/null; then
4352             :
4353           else
4354             cat <<EOF 1>&2
4355
4356 *** Warning: the command libtool uses to detect shared libraries,
4357 *** $file_magic_cmd, produces output that libtool cannot recognize.
4358 *** The result is that libtool may fail to recognize shared libraries
4359 *** as such.  This will affect the creation of libtool libraries that
4360 *** depend on shared libraries, but programs linked with such libtool
4361 *** libraries will work regardless of this problem.  Nevertheless, you
4362 *** may want to report the problem to your system manager and/or to
4363 *** bug-libtool@gnu.org
4364
4365 EOF
4366           fi ;;
4367         esac
4368       fi
4369       break
4370     fi
4371   done
4372   IFS="$ac_save_ifs"
4373   MAGIC_CMD="$ac_save_MAGIC_CMD"
4374   ;;
4375 esac
4376 fi
4377
4378 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4379 if test -n "$MAGIC_CMD"; then
4380   echo "$ac_t""$MAGIC_CMD" 1>&6
4381 else
4382   echo "$ac_t""no" 1>&6
4383 fi
4384
4385 if test -z "$lt_cv_path_MAGIC_CMD"; then
4386   if test -n "$ac_tool_prefix"; then
4387     echo $ac_n "checking for file""... $ac_c" 1>&6
4388 echo "configure:4389: checking for file" >&5
4389 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4390   echo $ac_n "(cached) $ac_c" 1>&6
4391 else
4392   case $MAGIC_CMD in
4393   /*)
4394   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4395   ;;
4396   ?:/*)
4397   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4398   ;;
4399   *)
4400   ac_save_MAGIC_CMD="$MAGIC_CMD"
4401   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4402   ac_dummy="/usr/bin:$PATH"
4403   for ac_dir in $ac_dummy; do
4404     test -z "$ac_dir" && ac_dir=.
4405     if test -f $ac_dir/file; then
4406       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4407       if test -n "$file_magic_test_file"; then
4408         case $deplibs_check_method in
4409         "file_magic "*)
4410           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4411           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4412           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4413             egrep "$file_magic_regex" > /dev/null; then
4414             :
4415           else
4416             cat <<EOF 1>&2
4417
4418 *** Warning: the command libtool uses to detect shared libraries,
4419 *** $file_magic_cmd, produces output that libtool cannot recognize.
4420 *** The result is that libtool may fail to recognize shared libraries
4421 *** as such.  This will affect the creation of libtool libraries that
4422 *** depend on shared libraries, but programs linked with such libtool
4423 *** libraries will work regardless of this problem.  Nevertheless, you
4424 *** may want to report the problem to your system manager and/or to
4425 *** bug-libtool@gnu.org
4426
4427 EOF
4428           fi ;;
4429         esac
4430       fi
4431       break
4432     fi
4433   done
4434   IFS="$ac_save_ifs"
4435   MAGIC_CMD="$ac_save_MAGIC_CMD"
4436   ;;
4437 esac
4438 fi
4439
4440 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4441 if test -n "$MAGIC_CMD"; then
4442   echo "$ac_t""$MAGIC_CMD" 1>&6
4443 else
4444   echo "$ac_t""no" 1>&6
4445 fi
4446
4447   else
4448     MAGIC_CMD=:
4449   fi
4450 fi
4451
4452   fi
4453   ;;
4454 esac
4455
4456 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4457 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4459 echo "configure:4460: checking for $ac_word" >&5
4460 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4461   echo $ac_n "(cached) $ac_c" 1>&6
4462 else
4463   if test -n "$RANLIB"; then
4464   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4465 else
4466   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4467   ac_dummy="$PATH"
4468   for ac_dir in $ac_dummy; do
4469     test -z "$ac_dir" && ac_dir=.
4470     if test -f $ac_dir/$ac_word; then
4471       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4472       break
4473     fi
4474   done
4475   IFS="$ac_save_ifs"
4476 fi
4477 fi
4478 RANLIB="$ac_cv_prog_RANLIB"
4479 if test -n "$RANLIB"; then
4480   echo "$ac_t""$RANLIB" 1>&6
4481 else
4482   echo "$ac_t""no" 1>&6
4483 fi
4484
4485
4486 if test -z "$ac_cv_prog_RANLIB"; then
4487 if test -n "$ac_tool_prefix"; then
4488   # Extract the first word of "ranlib", so it can be a program name with args.
4489 set dummy ranlib; ac_word=$2
4490 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4491 echo "configure:4492: checking for $ac_word" >&5
4492 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4493   echo $ac_n "(cached) $ac_c" 1>&6
4494 else
4495   if test -n "$RANLIB"; then
4496   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4497 else
4498   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4499   ac_dummy="$PATH"
4500   for ac_dir in $ac_dummy; do
4501     test -z "$ac_dir" && ac_dir=.
4502     if test -f $ac_dir/$ac_word; then
4503       ac_cv_prog_RANLIB="ranlib"
4504       break
4505     fi
4506   done
4507   IFS="$ac_save_ifs"
4508   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4509 fi
4510 fi
4511 RANLIB="$ac_cv_prog_RANLIB"
4512 if test -n "$RANLIB"; then
4513   echo "$ac_t""$RANLIB" 1>&6
4514 else
4515   echo "$ac_t""no" 1>&6
4516 fi
4517
4518 else
4519   RANLIB=":"
4520 fi
4521 fi
4522
4523 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4524 set dummy ${ac_tool_prefix}strip; ac_word=$2
4525 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4526 echo "configure:4527: checking for $ac_word" >&5
4527 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   if test -n "$STRIP"; then
4531   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4532 else
4533   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4534   ac_dummy="$PATH"
4535   for ac_dir in $ac_dummy; do
4536     test -z "$ac_dir" && ac_dir=.
4537     if test -f $ac_dir/$ac_word; then
4538       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4539       break
4540     fi
4541   done
4542   IFS="$ac_save_ifs"
4543 fi
4544 fi
4545 STRIP="$ac_cv_prog_STRIP"
4546 if test -n "$STRIP"; then
4547   echo "$ac_t""$STRIP" 1>&6
4548 else
4549   echo "$ac_t""no" 1>&6
4550 fi
4551
4552
4553 if test -z "$ac_cv_prog_STRIP"; then
4554 if test -n "$ac_tool_prefix"; then
4555   # Extract the first word of "strip", so it can be a program name with args.
4556 set dummy strip; ac_word=$2
4557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4558 echo "configure:4559: checking for $ac_word" >&5
4559 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4560   echo $ac_n "(cached) $ac_c" 1>&6
4561 else
4562   if test -n "$STRIP"; then
4563   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4564 else
4565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4566   ac_dummy="$PATH"
4567   for ac_dir in $ac_dummy; do
4568     test -z "$ac_dir" && ac_dir=.
4569     if test -f $ac_dir/$ac_word; then
4570       ac_cv_prog_STRIP="strip"
4571       break
4572     fi
4573   done
4574   IFS="$ac_save_ifs"
4575   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4576 fi
4577 fi
4578 STRIP="$ac_cv_prog_STRIP"
4579 if test -n "$STRIP"; then
4580   echo "$ac_t""$STRIP" 1>&6
4581 else
4582   echo "$ac_t""no" 1>&6
4583 fi
4584
4585 else
4586   STRIP=":"
4587 fi
4588 fi
4589
4590
4591 enable_dlopen=yes
4592 enable_win32_dll=yes
4593
4594 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4595 if test "${enable_libtool_lock+set}" = set; then
4596   enableval="$enable_libtool_lock"
4597   :
4598 fi
4599
4600 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4601
4602 # Some flags need to be propagated to the compiler or linker for good
4603 # libtool support.
4604 case $host in
4605 *-*-irix6*)
4606   # Find out which ABI we are using.
4607   echo '#line 4608 "configure"' > conftest.$ac_ext
4608   if { (eval echo configure:4609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4609     case `/usr/bin/file conftest.$ac_objext` in
4610     *32-bit*)
4611       LD="${LD-ld} -32"
4612       ;;
4613     *N32*)
4614       LD="${LD-ld} -n32"
4615       ;;
4616     *64-bit*)
4617       LD="${LD-ld} -64"
4618       ;;
4619     esac
4620   fi
4621   rm -rf conftest*
4622   ;;
4623
4624 *-*-sco3.2v5*)
4625   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4626   SAVE_CFLAGS="$CFLAGS"
4627   CFLAGS="$CFLAGS -belf"
4628   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4629 echo "configure:4630: checking whether the C compiler needs -belf" >&5
4630 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4631   echo $ac_n "(cached) $ac_c" 1>&6
4632 else
4633   
4634      ac_ext=c
4635 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4636 ac_cpp='$CPP $CPPFLAGS'
4637 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4638 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4639 cross_compiling=$ac_cv_prog_cc_cross
4640
4641      cat > conftest.$ac_ext <<EOF
4642 #line 4643 "configure"
4643 #include "confdefs.h"
4644
4645 int main() {
4646
4647 ; return 0; }
4648 EOF
4649 if { (eval echo configure:4650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4650   rm -rf conftest*
4651   lt_cv_cc_needs_belf=yes
4652 else
4653   echo "configure: failed program was:" >&5
4654   cat conftest.$ac_ext >&5
4655   rm -rf conftest*
4656   lt_cv_cc_needs_belf=no
4657 fi
4658 rm -f conftest*
4659      ac_ext=c
4660 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4661 ac_cpp='$CPP $CPPFLAGS'
4662 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4663 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4664 cross_compiling=$ac_cv_prog_cc_cross
4665
4666 fi
4667
4668 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4669   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4670     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4671     CFLAGS="$SAVE_CFLAGS"
4672   fi
4673   ;;
4674
4675 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4676   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4677 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4678 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4679 echo "configure:4680: checking for $ac_word" >&5
4680 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4681   echo $ac_n "(cached) $ac_c" 1>&6
4682 else
4683   if test -n "$DLLTOOL"; then
4684   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4685 else
4686   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4687   ac_dummy="$PATH"
4688   for ac_dir in $ac_dummy; do
4689     test -z "$ac_dir" && ac_dir=.
4690     if test -f $ac_dir/$ac_word; then
4691       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4692       break
4693     fi
4694   done
4695   IFS="$ac_save_ifs"
4696 fi
4697 fi
4698 DLLTOOL="$ac_cv_prog_DLLTOOL"
4699 if test -n "$DLLTOOL"; then
4700   echo "$ac_t""$DLLTOOL" 1>&6
4701 else
4702   echo "$ac_t""no" 1>&6
4703 fi
4704
4705
4706 if test -z "$ac_cv_prog_DLLTOOL"; then
4707 if test -n "$ac_tool_prefix"; then
4708   # Extract the first word of "dlltool", so it can be a program name with args.
4709 set dummy dlltool; ac_word=$2
4710 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4711 echo "configure:4712: checking for $ac_word" >&5
4712 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4713   echo $ac_n "(cached) $ac_c" 1>&6
4714 else
4715   if test -n "$DLLTOOL"; then
4716   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4717 else
4718   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4719   ac_dummy="$PATH"
4720   for ac_dir in $ac_dummy; do
4721     test -z "$ac_dir" && ac_dir=.
4722     if test -f $ac_dir/$ac_word; then
4723       ac_cv_prog_DLLTOOL="dlltool"
4724       break
4725     fi
4726   done
4727   IFS="$ac_save_ifs"
4728   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4729 fi
4730 fi
4731 DLLTOOL="$ac_cv_prog_DLLTOOL"
4732 if test -n "$DLLTOOL"; then
4733   echo "$ac_t""$DLLTOOL" 1>&6
4734 else
4735   echo "$ac_t""no" 1>&6
4736 fi
4737
4738 else
4739   DLLTOOL="false"
4740 fi
4741 fi
4742
4743   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4744 set dummy ${ac_tool_prefix}as; ac_word=$2
4745 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4746 echo "configure:4747: checking for $ac_word" >&5
4747 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4748   echo $ac_n "(cached) $ac_c" 1>&6
4749 else
4750   if test -n "$AS"; then
4751   ac_cv_prog_AS="$AS" # Let the user override the test.
4752 else
4753   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4754   ac_dummy="$PATH"
4755   for ac_dir in $ac_dummy; do
4756     test -z "$ac_dir" && ac_dir=.
4757     if test -f $ac_dir/$ac_word; then
4758       ac_cv_prog_AS="${ac_tool_prefix}as"
4759       break
4760     fi
4761   done
4762   IFS="$ac_save_ifs"
4763 fi
4764 fi
4765 AS="$ac_cv_prog_AS"
4766 if test -n "$AS"; then
4767   echo "$ac_t""$AS" 1>&6
4768 else
4769   echo "$ac_t""no" 1>&6
4770 fi
4771
4772
4773 if test -z "$ac_cv_prog_AS"; then
4774 if test -n "$ac_tool_prefix"; then
4775   # Extract the first word of "as", so it can be a program name with args.
4776 set dummy as; ac_word=$2
4777 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4778 echo "configure:4779: checking for $ac_word" >&5
4779 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4780   echo $ac_n "(cached) $ac_c" 1>&6
4781 else
4782   if test -n "$AS"; then
4783   ac_cv_prog_AS="$AS" # Let the user override the test.
4784 else
4785   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4786   ac_dummy="$PATH"
4787   for ac_dir in $ac_dummy; do
4788     test -z "$ac_dir" && ac_dir=.
4789     if test -f $ac_dir/$ac_word; then
4790       ac_cv_prog_AS="as"
4791       break
4792     fi
4793   done
4794   IFS="$ac_save_ifs"
4795   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4796 fi
4797 fi
4798 AS="$ac_cv_prog_AS"
4799 if test -n "$AS"; then
4800   echo "$ac_t""$AS" 1>&6
4801 else
4802   echo "$ac_t""no" 1>&6
4803 fi
4804
4805 else
4806   AS="false"
4807 fi
4808 fi
4809
4810   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4811 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4812 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4813 echo "configure:4814: checking for $ac_word" >&5
4814 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4815   echo $ac_n "(cached) $ac_c" 1>&6
4816 else
4817   if test -n "$OBJDUMP"; then
4818   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4819 else
4820   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4821   ac_dummy="$PATH"
4822   for ac_dir in $ac_dummy; do
4823     test -z "$ac_dir" && ac_dir=.
4824     if test -f $ac_dir/$ac_word; then
4825       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4826       break
4827     fi
4828   done
4829   IFS="$ac_save_ifs"
4830 fi
4831 fi
4832 OBJDUMP="$ac_cv_prog_OBJDUMP"
4833 if test -n "$OBJDUMP"; then
4834   echo "$ac_t""$OBJDUMP" 1>&6
4835 else
4836   echo "$ac_t""no" 1>&6
4837 fi
4838
4839
4840 if test -z "$ac_cv_prog_OBJDUMP"; then
4841 if test -n "$ac_tool_prefix"; then
4842   # Extract the first word of "objdump", so it can be a program name with args.
4843 set dummy objdump; ac_word=$2
4844 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4845 echo "configure:4846: checking for $ac_word" >&5
4846 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4847   echo $ac_n "(cached) $ac_c" 1>&6
4848 else
4849   if test -n "$OBJDUMP"; then
4850   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4851 else
4852   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4853   ac_dummy="$PATH"
4854   for ac_dir in $ac_dummy; do
4855     test -z "$ac_dir" && ac_dir=.
4856     if test -f $ac_dir/$ac_word; then
4857       ac_cv_prog_OBJDUMP="objdump"
4858       break
4859     fi
4860   done
4861   IFS="$ac_save_ifs"
4862   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4863 fi
4864 fi
4865 OBJDUMP="$ac_cv_prog_OBJDUMP"
4866 if test -n "$OBJDUMP"; then
4867   echo "$ac_t""$OBJDUMP" 1>&6
4868 else
4869   echo "$ac_t""no" 1>&6
4870 fi
4871
4872 else
4873   OBJDUMP="false"
4874 fi
4875 fi
4876
4877
4878   # recent cygwin and mingw systems supply a stub DllMain which the user
4879   # can override, but on older systems we have to supply one
4880   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4881 echo "configure:4882: checking if libtool should supply DllMain function" >&5
4882 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4883   echo $ac_n "(cached) $ac_c" 1>&6
4884 else
4885   cat > conftest.$ac_ext <<EOF
4886 #line 4887 "configure"
4887 #include "confdefs.h"
4888
4889 int main() {
4890 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4891       DllMain (0, 0, 0);
4892 ; return 0; }
4893 EOF
4894 if { (eval echo configure:4895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4895   rm -rf conftest*
4896   lt_cv_need_dllmain=no
4897 else
4898   echo "configure: failed program was:" >&5
4899   cat conftest.$ac_ext >&5
4900   rm -rf conftest*
4901   lt_cv_need_dllmain=yes
4902 fi
4903 rm -f conftest*
4904 fi
4905
4906 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4907
4908   case $host/$CC in
4909   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4910     # old mingw systems require "-dll" to link a DLL, while more recent ones
4911     # require "-mdll"
4912     SAVE_CFLAGS="$CFLAGS"
4913     CFLAGS="$CFLAGS -mdll"
4914     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4915 echo "configure:4916: checking how to link DLLs" >&5
4916 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4917   echo $ac_n "(cached) $ac_c" 1>&6
4918 else
4919   cat > conftest.$ac_ext <<EOF
4920 #line 4921 "configure"
4921 #include "confdefs.h"
4922
4923 int main() {
4924
4925 ; return 0; }
4926 EOF
4927 if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4928   rm -rf conftest*
4929   lt_cv_cc_dll_switch=-mdll
4930 else
4931   echo "configure: failed program was:" >&5
4932   cat conftest.$ac_ext >&5
4933   rm -rf conftest*
4934   lt_cv_cc_dll_switch=-dll
4935 fi
4936 rm -f conftest*
4937 fi
4938
4939 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4940     CFLAGS="$SAVE_CFLAGS" ;;
4941   *-*-cygwin* | *-*-pw32*)
4942     # cygwin systems need to pass --dll to the linker, and not link
4943     # crt.o which will require a WinMain@16 definition.
4944     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4945   esac
4946   ;;
4947   
4948 esac
4949
4950 # Sed substitution that helps us do robust quoting.  It backslashifies
4951 # metacharacters that are still active within double-quoted strings.
4952 Xsed='sed -e s/^X//'
4953 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4954
4955 # Same as above, but do not quote variable references.
4956 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4957
4958 # Sed substitution to delay expansion of an escaped shell variable in a
4959 # double_quote_subst'ed string.
4960 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4961
4962 # Constants:
4963 rm="rm -f"
4964
4965 # Global variables:
4966 default_ofile=libtool
4967 can_build_shared=yes
4968
4969 # All known linkers require a `.a' archive for static linking (except M$VC,
4970 # which needs '.lib').
4971 libext=a
4972 ltmain="$ac_aux_dir/ltmain.sh"
4973 ofile="$default_ofile"
4974 with_gnu_ld="$lt_cv_prog_gnu_ld"
4975 need_locks="$enable_libtool_lock"
4976
4977 old_CC="$CC"
4978 old_CFLAGS="$CFLAGS"
4979
4980 # Set sane defaults for various variables
4981 test -z "$AR" && AR=ar
4982 test -z "$AR_FLAGS" && AR_FLAGS=cru
4983 test -z "$AS" && AS=as
4984 test -z "$CC" && CC=cc
4985 test -z "$DLLTOOL" && DLLTOOL=dlltool
4986 test -z "$LD" && LD=ld
4987 test -z "$LN_S" && LN_S="ln -s"
4988 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4989 test -z "$NM" && NM=nm
4990 test -z "$OBJDUMP" && OBJDUMP=objdump
4991 test -z "$RANLIB" && RANLIB=:
4992 test -z "$STRIP" && STRIP=:
4993 test -z "$ac_objext" && ac_objext=o
4994
4995 if test x"$host" != x"$build"; then
4996   ac_tool_prefix=${host_alias}-
4997 else
4998   ac_tool_prefix=
4999 fi
5000
5001 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
5002 case $host_os in
5003 linux-gnu*) ;;
5004 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5005 esac
5006
5007 case $host_os in
5008 aix3*)
5009   # AIX sometimes has problems with the GCC collect2 program.  For some
5010   # reason, if we set the COLLECT_NAMES environment variable, the problems
5011   # vanish in a puff of smoke.
5012   if test "X${COLLECT_NAMES+set}" != Xset; then
5013     COLLECT_NAMES=
5014     export COLLECT_NAMES
5015   fi
5016   ;;
5017 esac
5018
5019 # Determine commands to create old-style static archives.
5020 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5021 old_postinstall_cmds='chmod 644 $oldlib'
5022 old_postuninstall_cmds=
5023
5024 if test -n "$RANLIB"; then
5025   case $host_os in
5026   openbsd*)
5027     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5028     ;;
5029   *)
5030     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5031     ;;
5032   esac
5033   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5034 fi
5035
5036 # Allow CC to be a program name with arguments.
5037 set dummy $CC
5038 compiler="$2"
5039
5040 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5041 echo "configure:5042: checking for objdir" >&5
5042 rm -f .libs 2>/dev/null
5043 mkdir .libs 2>/dev/null
5044 if test -d .libs; then
5045   objdir=.libs
5046 else
5047   # MS-DOS does not allow filenames that begin with a dot.
5048   objdir=_libs
5049 fi
5050 rmdir .libs 2>/dev/null
5051 echo "$ac_t""$objdir" 1>&6
5052
5053
5054 # Check whether --with-pic or --without-pic was given.
5055 if test "${with_pic+set}" = set; then
5056   withval="$with_pic"
5057   pic_mode="$withval"
5058 else
5059   pic_mode=default
5060 fi
5061
5062 test -z "$pic_mode" && pic_mode=default
5063
5064 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5065 # in isolation, and that seeing it set (from the cache) indicates that
5066 # the associated values are set (in the cache) correctly too.
5067 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5068 echo "configure:5069: checking for $compiler option to produce PIC" >&5
5069 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5070   echo $ac_n "(cached) $ac_c" 1>&6
5071 else
5072    lt_cv_prog_cc_pic=
5073   lt_cv_prog_cc_shlib=
5074   lt_cv_prog_cc_wl=
5075   lt_cv_prog_cc_static=
5076   lt_cv_prog_cc_no_builtin=
5077   lt_cv_prog_cc_can_build_shared=$can_build_shared
5078
5079   if test "$GCC" = yes; then
5080     lt_cv_prog_cc_wl='-Wl,'
5081     lt_cv_prog_cc_static='-static'
5082
5083     case $host_os in
5084     aix*)
5085       # Below there is a dirty hack to force normal static linking with -ldl
5086       # The problem is because libdl dynamically linked with both libc and
5087       # libC (AIX C++ library), which obviously doesn't included in libraries
5088       # list by gcc. This cause undefined symbols with -static flags.
5089       # This hack allows C programs to be linked with "-static -ldl", but
5090       # not sure about C++ programs.
5091       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5092       ;;
5093     amigaos*)
5094       # FIXME: we need at least 68020 code to build shared libraries, but
5095       # adding the `-m68020' flag to GCC prevents building anything better,
5096       # like `-m68040'.
5097       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5098       ;;
5099     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5100       # PIC is the default for these OSes.
5101       ;;
5102     darwin* | rhapsody*)
5103       # PIC is the default on this platform
5104       # Common symbols not allowed in MH_DYLIB files
5105       lt_cv_prog_cc_pic='-fno-common'
5106       ;;
5107     cygwin* | mingw* | pw32* | os2*)
5108       # This hack is so that the source file can tell whether it is being
5109       # built for inclusion in a dll (and should export symbols for example).
5110       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5111       ;;
5112     sysv4*MP*)
5113       if test -d /usr/nec; then
5114          lt_cv_prog_cc_pic=-Kconform_pic
5115       fi
5116       ;;
5117     *)
5118       lt_cv_prog_cc_pic='-fPIC'
5119       ;;
5120     esac
5121   else
5122     # PORTME Check for PIC flags for the system compiler.
5123     case $host_os in
5124     aix3* | aix4* | aix5*)
5125       lt_cv_prog_cc_wl='-Wl,'
5126       # All AIX code is PIC.
5127       if test "$host_cpu" = ia64; then
5128         # AIX 5 now supports IA64 processor
5129         lt_cv_prog_cc_static='-Bstatic'
5130       else
5131         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5132       fi
5133       ;;
5134
5135     hpux9* | hpux10* | hpux11*)
5136       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5137       lt_cv_prog_cc_wl='-Wl,'
5138       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5139       lt_cv_prog_cc_pic='+Z'
5140       ;;
5141
5142     irix5* | irix6* | nonstopux*)
5143       lt_cv_prog_cc_wl='-Wl,'
5144       lt_cv_prog_cc_static='-non_shared'
5145       # PIC (with -KPIC) is the default.
5146       ;;
5147
5148     cygwin* | mingw* | pw32* | os2*)
5149       # This hack is so that the source file can tell whether it is being
5150       # built for inclusion in a dll (and should export symbols for example).
5151       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5152       ;;
5153
5154     newsos6)
5155       lt_cv_prog_cc_pic='-KPIC'
5156       lt_cv_prog_cc_static='-Bstatic'
5157       ;;
5158     
5159     openedition)
5160       # XPLINK code is PIC by default
5161       ;;
5162
5163     osf3* | osf4* | osf5*)
5164       # All OSF/1 code is PIC.
5165       lt_cv_prog_cc_wl='-Wl,'
5166       lt_cv_prog_cc_static='-non_shared'
5167       ;;
5168
5169     sco3.2v5*)
5170       lt_cv_prog_cc_pic='-Kpic'
5171       lt_cv_prog_cc_static='-dn'
5172       lt_cv_prog_cc_shlib='-belf'
5173       ;;
5174
5175     solaris*)
5176       lt_cv_prog_cc_pic='-KPIC'
5177       lt_cv_prog_cc_static='-Bstatic'
5178       lt_cv_prog_cc_wl='-Wl,'
5179       ;;
5180
5181     sunos4*)
5182       lt_cv_prog_cc_pic='-PIC'
5183       lt_cv_prog_cc_static='-Bstatic'
5184       lt_cv_prog_cc_wl='-Qoption ld '
5185       ;;
5186
5187     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5188       lt_cv_prog_cc_pic='-KPIC'
5189       lt_cv_prog_cc_static='-Bstatic'
5190       lt_cv_prog_cc_wl='-Wl,'
5191       ;;
5192
5193     uts4*)
5194       lt_cv_prog_cc_pic='-pic'
5195       lt_cv_prog_cc_static='-Bstatic'
5196       ;;
5197
5198     sysv4*MP*)
5199       if test -d /usr/nec ;then
5200         lt_cv_prog_cc_pic='-Kconform_pic'
5201         lt_cv_prog_cc_static='-Bstatic'
5202       fi
5203       ;;
5204
5205     *)
5206       lt_cv_prog_cc_can_build_shared=no
5207       ;;
5208     esac
5209   fi
5210
5211 fi
5212
5213 if test -z "$lt_cv_prog_cc_pic"; then
5214   echo "$ac_t""none" 1>&6
5215 else
5216   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5217
5218   # Check to make sure the pic_flag actually works.
5219   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5220 echo "configure:5221: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5221   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5222   echo $ac_n "(cached) $ac_c" 1>&6
5223 else
5224       save_CFLAGS="$CFLAGS"
5225     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5226     cat > conftest.$ac_ext <<EOF
5227 #line 5228 "configure"
5228 #include "confdefs.h"
5229
5230 int main() {
5231
5232 ; return 0; }
5233 EOF
5234 if { (eval echo configure:5235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5235   rm -rf conftest*
5236         case $host_os in
5237       hpux9* | hpux10* | hpux11*)
5238         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5239         # they create non-PIC objects.  So, if there were any warnings, we
5240         # assume that PIC is not supported.
5241         if test -s conftest.err; then
5242           lt_cv_prog_cc_pic_works=no
5243         else
5244           lt_cv_prog_cc_pic_works=yes
5245         fi
5246         ;;
5247       *)
5248         lt_cv_prog_cc_pic_works=yes
5249         ;;
5250       esac
5251     
5252 else
5253   echo "configure: failed program was:" >&5
5254   cat conftest.$ac_ext >&5
5255   rm -rf conftest*
5256         lt_cv_prog_cc_pic_works=no
5257     
5258 fi
5259 rm -f conftest*
5260     CFLAGS="$save_CFLAGS"
5261   
5262 fi
5263
5264
5265   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5266     lt_cv_prog_cc_pic=
5267     lt_cv_prog_cc_can_build_shared=no
5268   else
5269     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5270   fi
5271
5272   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5273 fi
5274
5275 # Check for any special shared library compilation flags.
5276 if test -n "$lt_cv_prog_cc_shlib"; then
5277   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5278   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5279   else
5280    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5281     lt_cv_prog_cc_can_build_shared=no
5282   fi
5283 fi
5284
5285 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5286 echo "configure:5287: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5287 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5288   echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290     lt_cv_prog_cc_static_works=no
5291   save_LDFLAGS="$LDFLAGS"
5292   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5293   cat > conftest.$ac_ext <<EOF
5294 #line 5295 "configure"
5295 #include "confdefs.h"
5296
5297 int main() {
5298
5299 ; return 0; }
5300 EOF
5301 if { (eval echo configure:5302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5302   rm -rf conftest*
5303   lt_cv_prog_cc_static_works=yes
5304 else
5305   echo "configure: failed program was:" >&5
5306   cat conftest.$ac_ext >&5
5307 fi
5308 rm -f conftest*
5309   LDFLAGS="$save_LDFLAGS"
5310
5311 fi
5312
5313
5314 # Belt *and* braces to stop my trousers falling down:
5315 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5316 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5317
5318 pic_flag="$lt_cv_prog_cc_pic"
5319 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5320 wl="$lt_cv_prog_cc_wl"
5321 link_static_flag="$lt_cv_prog_cc_static"
5322 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5323 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5324
5325
5326 # Check to see if options -o and -c are simultaneously supported by compiler
5327 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5328 echo "configure:5329: checking if $compiler supports -c -o file.$ac_objext" >&5
5329 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5330   echo $ac_n "(cached) $ac_c" 1>&6
5331 else
5332   
5333 $rm -r conftest 2>/dev/null
5334 mkdir conftest
5335 cd conftest
5336 echo "int some_variable = 0;" > conftest.$ac_ext
5337 mkdir out
5338 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5339 # that will create temporary files in the current directory regardless of
5340 # the output directory.  Thus, making CWD read-only will cause this test
5341 # to fail, enabling locking or at least warning the user not to do parallel
5342 # builds.
5343 chmod -w .
5344 save_CFLAGS="$CFLAGS"
5345 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5346 compiler_c_o=no
5347 if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5348   # The compiler can only warn and ignore the option if not recognized
5349   # So say no if there are warnings
5350   if test -s out/conftest.err; then
5351     lt_cv_compiler_c_o=no
5352   else
5353     lt_cv_compiler_c_o=yes
5354   fi
5355 else
5356   # Append any errors to the config.log.
5357   cat out/conftest.err 1>&5
5358   lt_cv_compiler_c_o=no
5359 fi
5360 CFLAGS="$save_CFLAGS"
5361 chmod u+w .
5362 $rm conftest* out/*
5363 rmdir out
5364 cd ..
5365 rmdir conftest
5366 $rm -r conftest 2>/dev/null
5367
5368 fi
5369
5370 compiler_c_o=$lt_cv_compiler_c_o
5371 echo "$ac_t""$compiler_c_o" 1>&6
5372
5373 if test x"$compiler_c_o" = x"yes"; then
5374   # Check to see if we can write to a .lo
5375   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5376 echo "configure:5377: checking if $compiler supports -c -o file.lo" >&5
5377   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5378   echo $ac_n "(cached) $ac_c" 1>&6
5379 else
5380   
5381   lt_cv_compiler_o_lo=no
5382   save_CFLAGS="$CFLAGS"
5383   CFLAGS="$CFLAGS -c -o conftest.lo"
5384   save_objext="$ac_objext"
5385   ac_objext=lo
5386   cat > conftest.$ac_ext <<EOF
5387 #line 5388 "configure"
5388 #include "confdefs.h"
5389
5390 int main() {
5391 int some_variable = 0;
5392 ; return 0; }
5393 EOF
5394 if { (eval echo configure:5395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5395   rm -rf conftest*
5396       # The compiler can only warn and ignore the option if not recognized
5397     # So say no if there are warnings
5398     if test -s conftest.err; then
5399       lt_cv_compiler_o_lo=no
5400     else
5401       lt_cv_compiler_o_lo=yes
5402     fi
5403   
5404 else
5405   echo "configure: failed program was:" >&5
5406   cat conftest.$ac_ext >&5
5407 fi
5408 rm -f conftest*
5409   ac_objext="$save_objext"
5410   CFLAGS="$save_CFLAGS"
5411   
5412 fi
5413
5414   compiler_o_lo=$lt_cv_compiler_o_lo
5415   echo "$ac_t""$compiler_o_lo" 1>&6
5416 else
5417   compiler_o_lo=no
5418 fi
5419
5420 # Check to see if we can do hard links to lock some files if needed
5421 hard_links="nottested"
5422 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5423   # do not overwrite the value of need_locks provided by the user
5424   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5425 echo "configure:5426: checking if we can lock with hard links" >&5
5426   hard_links=yes
5427   $rm conftest*
5428   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5429   touch conftest.a
5430   ln conftest.a conftest.b 2>&5 || hard_links=no
5431   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5432   echo "$ac_t""$hard_links" 1>&6
5433   if test "$hard_links" = no; then
5434     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5435     need_locks=warn
5436   fi
5437 else
5438   need_locks=no
5439 fi
5440
5441 if test "$GCC" = yes; then
5442   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5443   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5444 echo "configure:5445: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5445   echo "int some_variable = 0;" > conftest.$ac_ext
5446   save_CFLAGS="$CFLAGS"
5447   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5448   compiler_rtti_exceptions=no
5449   cat > conftest.$ac_ext <<EOF
5450 #line 5451 "configure"
5451 #include "confdefs.h"
5452
5453 int main() {
5454 int some_variable = 0;
5455 ; return 0; }
5456 EOF
5457 if { (eval echo configure:5458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5458   rm -rf conftest*
5459       # The compiler can only warn and ignore the option if not recognized
5460     # So say no if there are warnings
5461     if test -s conftest.err; then
5462       compiler_rtti_exceptions=no
5463     else
5464       compiler_rtti_exceptions=yes
5465     fi
5466   
5467 else
5468   echo "configure: failed program was:" >&5
5469   cat conftest.$ac_ext >&5
5470 fi
5471 rm -f conftest*
5472   CFLAGS="$save_CFLAGS"
5473   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5474
5475   if test "$compiler_rtti_exceptions" = "yes"; then
5476     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5477   else
5478     no_builtin_flag=' -fno-builtin'
5479   fi
5480 fi
5481
5482 # See if the linker supports building shared libraries.
5483 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5484 echo "configure:5485: checking whether the linker ($LD) supports shared libraries" >&5
5485
5486 allow_undefined_flag=
5487 no_undefined_flag=
5488 need_lib_prefix=unknown
5489 need_version=unknown
5490 # when you set need_version to no, make sure it does not cause -set_version
5491 # flags to be left without arguments
5492 archive_cmds=
5493 archive_expsym_cmds=
5494 old_archive_from_new_cmds=
5495 old_archive_from_expsyms_cmds=
5496 export_dynamic_flag_spec=
5497 whole_archive_flag_spec=
5498 thread_safe_flag_spec=
5499 hardcode_into_libs=no
5500 hardcode_libdir_flag_spec=
5501 hardcode_libdir_separator=
5502 hardcode_direct=no
5503 hardcode_minus_L=no
5504 hardcode_shlibpath_var=unsupported
5505 runpath_var=
5506 link_all_deplibs=unknown
5507 always_export_symbols=no
5508 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5509 # include_expsyms should be a list of space-separated symbols to be *always*
5510 # included in the symbol list
5511 include_expsyms=
5512 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5513 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5514 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5515 # as well as any symbol that contains `d'.
5516 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5517 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5518 # platforms (ab)use it in PIC code, but their linkers get confused if
5519 # the symbol is explicitly referenced.  Since portable code cannot
5520 # rely on this symbol name, it's probably fine to never include it in
5521 # preloaded symbol tables.
5522 extract_expsyms_cmds=
5523
5524 case $host_os in
5525 cygwin* | mingw* | pw32*)
5526   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5527   # When not using gcc, we currently assume that we are using
5528   # Microsoft Visual C++.
5529   if test "$GCC" != yes; then
5530     with_gnu_ld=no
5531   fi
5532   ;;
5533 openbsd*)
5534   with_gnu_ld=no
5535   ;;
5536 esac
5537
5538 ld_shlibs=yes
5539 if test "$with_gnu_ld" = yes; then
5540   # If archive_cmds runs LD, not CC, wlarc should be empty
5541   wlarc='${wl}'
5542
5543   # See if GNU ld supports shared libraries.
5544   case $host_os in
5545   aix3* | aix4* | aix5*)
5546     # On AIX, the GNU linker is very broken
5547     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5548     ld_shlibs=no
5549     cat <<EOF 1>&2
5550
5551 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5552 *** to be unable to reliably create shared libraries on AIX.
5553 *** Therefore, libtool is disabling shared libraries support.  If you
5554 *** really care for shared libraries, you may want to modify your PATH
5555 *** so that a non-GNU linker is found, and then restart.
5556
5557 EOF
5558     ;;
5559
5560   amigaos*)
5561     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5562     hardcode_libdir_flag_spec='-L$libdir'
5563     hardcode_minus_L=yes
5564
5565     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5566     # that the semantics of dynamic libraries on AmigaOS, at least up
5567     # to version 4, is to share data among multiple programs linked
5568     # with the same dynamic library.  Since this doesn't match the
5569     # behavior of shared libraries on other platforms, we can use
5570     # them.
5571     ld_shlibs=no
5572     ;;
5573
5574   beos*)
5575     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5576       allow_undefined_flag=unsupported
5577       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5578       # support --undefined.  This deserves some investigation.  FIXME
5579       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5580     else
5581       ld_shlibs=no
5582     fi
5583     ;;
5584
5585   cygwin* | mingw* | pw32*)
5586     # hardcode_libdir_flag_spec is actually meaningless, as there is
5587     # no search path for DLLs.
5588     hardcode_libdir_flag_spec='-L$libdir'
5589     allow_undefined_flag=unsupported
5590     always_export_symbols=yes
5591
5592     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5593       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5594       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5595       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5596       else $CC -o impgen impgen.c ; fi)~
5597       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5598
5599     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5600
5601     # cygwin and mingw dlls have different entry points and sets of symbols
5602     # to exclude.
5603     # FIXME: what about values for MSVC?
5604     dll_entry=__cygwin_dll_entry@12
5605     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5606     case $host_os in
5607     mingw*)
5608       # mingw values
5609       dll_entry=_DllMainCRTStartup@12
5610       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5611       ;;
5612     esac
5613
5614     # mingw and cygwin differ, and it's simplest to just exclude the union
5615     # of the two symbol sets.
5616     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5617
5618     # recent cygwin and mingw systems supply a stub DllMain which the user
5619     # can override, but on older systems we have to supply one (in ltdll.c)
5620     if test "x$lt_cv_need_dllmain" = "xyes"; then
5621       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5622       ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
5623         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5624     else
5625       ltdll_obj=
5626       ltdll_cmds=
5627     fi
5628
5629     # Extract the symbol export list from an `--export-all' def file,
5630     # then regenerate the def file from the symbol export list, so that
5631     # the compiled dll only exports the symbol export list.
5632     # Be careful not to strip the DATA tag left be newer dlltools.
5633     export_symbols_cmds="$ltdll_cmds"'
5634       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5635       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5636
5637     # If the export-symbols file already is a .def file (1st line
5638     # is EXPORTS), use it as is.
5639     # If DATA tags from a recent dlltool are present, honour them!
5640     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5641         cp $export_symbols $output_objdir/$soname-def;
5642       else
5643         echo EXPORTS > $output_objdir/$soname-def;
5644         _lt_hint=1;
5645         cat $export_symbols | while read symbol; do
5646          set dummy \$symbol;
5647          case \$# in
5648            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5649            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5650            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5651          esac;
5652          _lt_hint=`expr 1 + \$_lt_hint`;
5653         done;
5654       fi~
5655       '"$ltdll_cmds"'
5656       $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
5657       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
5658       $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
5659       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
5660       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5661     ;;
5662
5663   netbsd*)
5664     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5665       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5666       wlarc=
5667     else
5668       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5669       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5670     fi
5671     ;;
5672
5673   solaris* | sysv5*)
5674     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5675       ld_shlibs=no
5676       cat <<EOF 1>&2
5677
5678 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5679 *** create shared libraries on Solaris systems.  Therefore, libtool
5680 *** is disabling shared libraries support.  We urge you to upgrade GNU
5681 *** binutils to release 2.9.1 or newer.  Another option is to modify
5682 *** your PATH or compiler configuration so that the native linker is
5683 *** used, and then restart.
5684
5685 EOF
5686     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5687       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5688       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5689     else
5690       ld_shlibs=no
5691     fi
5692     ;;
5693
5694   sunos4*)
5695     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5696     wlarc=
5697     hardcode_direct=yes
5698     hardcode_shlibpath_var=no
5699     ;;
5700
5701   *)
5702     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5703       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5704       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5705     else
5706       ld_shlibs=no
5707     fi
5708     ;;
5709   esac
5710
5711   if test "$ld_shlibs" = yes; then
5712     runpath_var=LD_RUN_PATH
5713     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5714     export_dynamic_flag_spec='${wl}--export-dynamic'
5715     case $host_os in
5716     cygwin* | mingw* | pw32*)
5717       # dlltool doesn't understand --whole-archive et. al.
5718       whole_archive_flag_spec=
5719       ;;
5720     *)
5721       # ancient GNU ld didn't support --whole-archive et. al.
5722       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5723         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5724       else
5725         whole_archive_flag_spec=
5726       fi
5727       ;;
5728     esac
5729   fi
5730 else
5731   # PORTME fill in a description of your system's linker (not GNU ld)
5732   case $host_os in
5733   aix3*)
5734     allow_undefined_flag=unsupported
5735     always_export_symbols=yes
5736     archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5737     # Note: this linker hardcodes the directories in LIBPATH if there
5738     # are no directories specified by -L.
5739     hardcode_minus_L=yes
5740     if test "$GCC" = yes && test -z "$link_static_flag"; then
5741       # Neither direct hardcoding nor static linking is supported with a
5742       # broken collect2.
5743       hardcode_direct=unsupported
5744     fi
5745     ;;
5746
5747   aix4* | aix5*)
5748     if test "$host_cpu" = ia64; then
5749       # On IA64, the linker does run time linking by default, so we don't
5750       # have to do anything special.
5751       aix_use_runtimelinking=no
5752       exp_sym_flag='-Bexport'
5753       no_entry_flag=""
5754     else
5755       aix_use_runtimelinking=no
5756
5757       # Test if we are trying to use run time linking or normal
5758       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5759       # need to do runtime linking.
5760       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5761         for ld_flag in $LDFLAGS; do
5762           case $ld_flag in
5763           *-brtl*)
5764             aix_use_runtimelinking=yes
5765             break
5766           ;;
5767           esac
5768         done
5769       esac
5770
5771       exp_sym_flag='-bexport'
5772       no_entry_flag='-bnoentry'
5773     fi
5774
5775     # When large executables or shared objects are built, AIX ld can
5776     # have problems creating the table of contents.  If linking a library
5777     # or program results in "error TOC overflow" add -mminimal-toc to
5778     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5779     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5780
5781     hardcode_direct=yes
5782     archive_cmds=''
5783     hardcode_libdir_separator=':'
5784     if test "$GCC" = yes; then
5785       case $host_os in aix4.[012]|aix4.[012].*)
5786         collect2name=`${CC} -print-prog-name=collect2`
5787         if test -f "$collect2name" && \
5788           strings "$collect2name" | grep resolve_lib_name >/dev/null
5789         then
5790           # We have reworked collect2
5791           hardcode_direct=yes
5792         else
5793           # We have old collect2
5794           hardcode_direct=unsupported
5795           # It fails to find uninstalled libraries when the uninstalled
5796           # path is not listed in the libpath.  Setting hardcode_minus_L
5797           # to unsupported forces relinking
5798           hardcode_minus_L=yes
5799           hardcode_libdir_flag_spec='-L$libdir'
5800           hardcode_libdir_separator=
5801         fi
5802       esac
5803
5804       shared_flag='-shared'
5805     else
5806       # not using gcc
5807       if test "$host_cpu" = ia64; then
5808         shared_flag='${wl}-G'
5809       else
5810         if test "$aix_use_runtimelinking" = yes; then
5811           shared_flag='${wl}-G'
5812         else
5813           shared_flag='${wl}-bM:SRE'
5814         fi
5815       fi
5816     fi
5817
5818     # It seems that -bexpall can do strange things, so it is better to
5819     # generate a list of symbols to export.
5820     always_export_symbols=yes
5821     if test "$aix_use_runtimelinking" = yes; then
5822       # Warning - without using the other runtime loading flags (-brtl),
5823       # -berok will link without error, but may produce a broken library.
5824       allow_undefined_flag='-berok'
5825       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5826       archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5827     else
5828       if test "$host_cpu" = ia64; then
5829         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5830         allow_undefined_flag="-z nodefs"
5831         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5832       else
5833         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5834         # Warning - without using the other run time loading flags,
5835         # -berok will link without error, but may produce a broken library.
5836         allow_undefined_flag='${wl}-berok'
5837         # This is a bit strange, but is similar to how AIX traditionally builds
5838         # it's shared libraries.
5839         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
5840       fi
5841     fi
5842     ;;
5843
5844   amigaos*)
5845     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5846     hardcode_libdir_flag_spec='-L$libdir'
5847     hardcode_minus_L=yes
5848     # see comment about different semantics on the GNU ld section
5849     ld_shlibs=no
5850     ;;
5851
5852   cygwin* | mingw* | pw32*)
5853     # When not using gcc, we currently assume that we are using
5854     # Microsoft Visual C++.
5855     # hardcode_libdir_flag_spec is actually meaningless, as there is
5856     # no search path for DLLs.
5857     hardcode_libdir_flag_spec=' '
5858     allow_undefined_flag=unsupported
5859     # Tell ltmain to make .lib files, not .a files.
5860     libext=lib
5861     # FIXME: Setting linknames here is a bad hack.
5862     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5863     # The linker will automatically build a .lib file if we build a DLL.
5864     old_archive_from_new_cmds='true'
5865     # FIXME: Should let the user specify the lib program.
5866     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5867     fix_srcfile_path='`cygpath -w "$srcfile"`'
5868     ;;
5869
5870   darwin* | rhapsody*)
5871     case "$host_os" in
5872     rhapsody* | darwin1.[012])
5873       allow_undefined_flag='-undefined suppress'
5874       ;;
5875     *) # Darwin 1.3 on
5876       allow_undefined_flag='-flat_namespace -undefined suppress'
5877       ;;
5878     esac
5879     # FIXME: Relying on posixy $() will cause problems for
5880     #        cross-compilation, but unfortunately the echo tests do not
5881     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5882     #        `"' quotes if we put them in here... so don't!
5883     archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
5884     # We need to add '_' to the symbols in $export_symbols first
5885     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5886     hardcode_direct=yes
5887     hardcode_shlibpath_var=no
5888     whole_archive_flag_spec='-all_load $convenience'
5889     ;;
5890
5891   freebsd1*)
5892     ld_shlibs=no
5893     ;;
5894
5895   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5896   # support.  Future versions do this automatically, but an explicit c++rt0.o
5897   # does not break anything, and helps significantly (at the cost of a little
5898   # extra space).
5899   freebsd2.2*)
5900     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5901     hardcode_libdir_flag_spec='-R$libdir'
5902     hardcode_direct=yes
5903     hardcode_shlibpath_var=no
5904     ;;
5905
5906   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5907   freebsd2*)
5908     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5909     hardcode_direct=yes
5910     hardcode_minus_L=yes
5911     hardcode_shlibpath_var=no
5912     ;;
5913
5914   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5915   freebsd*)
5916     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5917     hardcode_libdir_flag_spec='-R$libdir'
5918     hardcode_direct=yes
5919     hardcode_shlibpath_var=no
5920     ;;
5921
5922   hpux9* | hpux10* | hpux11*)
5923     case $host_os in
5924     hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
5925     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5926     esac
5927     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5928     hardcode_libdir_separator=:
5929     hardcode_direct=yes
5930     hardcode_minus_L=yes # Not in the search PATH, but as the default
5931                          # location of the library.
5932     export_dynamic_flag_spec='${wl}-E'
5933     ;;
5934
5935   irix5* | irix6* | nonstopux*)
5936     if test "$GCC" = yes; then
5937       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5938       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5939     else
5940       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5941       hardcode_libdir_flag_spec='-rpath $libdir'
5942     fi
5943     hardcode_libdir_separator=:
5944     link_all_deplibs=yes
5945     ;;
5946
5947   netbsd*)
5948     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5949       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5950     else
5951       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5952     fi
5953     hardcode_libdir_flag_spec='-R$libdir'
5954     hardcode_direct=yes
5955     hardcode_shlibpath_var=no
5956     ;;
5957
5958   newsos6)
5959     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5960     hardcode_direct=yes
5961     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5962     hardcode_libdir_separator=:
5963     hardcode_shlibpath_var=no
5964     ;;
5965
5966   openbsd*)
5967     hardcode_direct=yes
5968     hardcode_shlibpath_var=no
5969     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5970       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5971       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5972       export_dynamic_flag_spec='${wl}-E'
5973     else
5974       case "$host_os" in
5975       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5976         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5977         hardcode_libdir_flag_spec='-R$libdir'
5978         ;;
5979       *)
5980         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5981         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5982         ;;
5983       esac
5984     fi
5985     ;;
5986
5987   openedition*)
5988     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5989         cp \$linknames \$output_objdir && linknames=''"
5990     export_dynamic_flag_spec="-Wl,DLL"
5991     ;;
5992
5993   os2*)
5994     hardcode_libdir_flag_spec='-L$libdir'
5995     hardcode_minus_L=yes
5996     allow_undefined_flag=unsupported
5997     archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5998     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5999     ;;
6000
6001   osf3*)
6002     if test "$GCC" = yes; then
6003       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6004       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6005     else
6006       allow_undefined_flag=' -expect_unresolved \*'
6007       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6008     fi
6009     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6010     hardcode_libdir_separator=:
6011     ;;
6012
6013   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6014     if test "$GCC" = yes; then
6015       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6016       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6017       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6018     else
6019       allow_undefined_flag=' -expect_unresolved \*'
6020       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6021       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6022       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
6023
6024       #Both c and cxx compiler support -rpath directly
6025       hardcode_libdir_flag_spec='-rpath $libdir'
6026     fi
6027     hardcode_libdir_separator=:
6028     ;;
6029
6030   sco3.2v5*)
6031     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6032     hardcode_shlibpath_var=no
6033     runpath_var=LD_RUN_PATH
6034     hardcode_runpath_var=yes
6035     export_dynamic_flag_spec='${wl}-Bexport'
6036     ;;
6037
6038   solaris*)
6039     # gcc --version < 3.0 without binutils cannot create self contained
6040     # shared libraries reliably, requiring libgcc.a to resolve some of
6041     # the object symbols generated in some cases.  Libraries that use
6042     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6043     # a copy of libgcc.a into every shared library to guarantee resolving
6044     # such symbols causes other problems:  According to Tim Van Holder
6045     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6046     # (to the application) exception stack for one thing.
6047     no_undefined_flag=' -z defs'
6048     if test "$GCC" = yes; then
6049       case `$CC --version 2>/dev/null` in
6050       [12].*)
6051         cat <<EOF 1>&2
6052
6053 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6054 *** create self contained shared libraries on Solaris systems, without
6055 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6056 *** -no-undefined support, which will at least allow you to build shared
6057 *** libraries.  However, you may find that when you link such libraries
6058 *** into an application without using GCC, you have to manually add
6059 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6060 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6061 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6062
6063 EOF
6064         no_undefined_flag=
6065         ;;
6066       esac
6067     fi
6068     # $CC -shared without GNU ld will not create a library from C++
6069     # object files and a static libstdc++, better avoid it by now
6070     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6071     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6072                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6073     hardcode_libdir_flag_spec='-R$libdir'
6074     hardcode_shlibpath_var=no
6075     case $host_os in
6076     solaris2.[0-5] | solaris2.[0-5].*) ;;
6077     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6078       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6079     esac
6080     link_all_deplibs=yes
6081     ;;
6082
6083   sunos4*)
6084     if test "x$host_vendor" = xsequent; then
6085       # Use $CC to link under sequent, because it throws in some extra .o
6086       # files that make .init and .fini sections work.
6087       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6088     else
6089       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6090     fi
6091     hardcode_libdir_flag_spec='-L$libdir'
6092     hardcode_direct=yes
6093     hardcode_minus_L=yes
6094     hardcode_shlibpath_var=no
6095     ;;
6096
6097   sysv4)
6098     case $host_vendor in
6099       sni)
6100         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6101         hardcode_direct=yes # is this really true???
6102         ;;
6103       siemens)
6104         ## LD is ld it makes a PLAMLIB
6105         ## CC just makes a GrossModule.
6106         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6107         reload_cmds='$CC -r -o $output$reload_objs'
6108         hardcode_direct=no
6109         ;;
6110       motorola)
6111         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6112         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6113         ;;
6114     esac
6115     runpath_var='LD_RUN_PATH'
6116     hardcode_shlibpath_var=no
6117     ;;
6118
6119   sysv4.3*)
6120     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6121     hardcode_shlibpath_var=no
6122     export_dynamic_flag_spec='-Bexport'
6123     ;;
6124
6125   sysv5*)
6126     no_undefined_flag=' -z text'
6127     # $CC -shared without GNU ld will not create a library from C++
6128     # object files and a static libstdc++, better avoid it by now
6129     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6130     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6131                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6132     hardcode_libdir_flag_spec=
6133     hardcode_shlibpath_var=no
6134     runpath_var='LD_RUN_PATH'
6135     ;;
6136
6137   uts4*)
6138     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6139     hardcode_libdir_flag_spec='-L$libdir'
6140     hardcode_shlibpath_var=no
6141     ;;
6142
6143   dgux*)
6144     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6145     hardcode_libdir_flag_spec='-L$libdir'
6146     hardcode_shlibpath_var=no
6147     ;;
6148
6149   sysv4*MP*)
6150     if test -d /usr/nec; then
6151       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6152       hardcode_shlibpath_var=no
6153       runpath_var=LD_RUN_PATH
6154       hardcode_runpath_var=yes
6155       ld_shlibs=yes
6156     fi
6157     ;;
6158
6159   sysv4.2uw2*)
6160     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6161     hardcode_direct=yes
6162     hardcode_minus_L=no
6163     hardcode_shlibpath_var=no
6164     hardcode_runpath_var=yes
6165     runpath_var=LD_RUN_PATH
6166     ;;
6167
6168   sysv5uw7* | unixware7*)
6169     no_undefined_flag='${wl}-z ${wl}text'
6170     if test "$GCC" = yes; then
6171       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6172     else
6173       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6174     fi
6175     runpath_var='LD_RUN_PATH'
6176     hardcode_shlibpath_var=no
6177     ;;
6178
6179   *)
6180     ld_shlibs=no
6181     ;;
6182   esac
6183 fi
6184 echo "$ac_t""$ld_shlibs" 1>&6
6185 test "$ld_shlibs" = no && can_build_shared=no
6186
6187 # Check hardcoding attributes.
6188 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6189 echo "configure:6190: checking how to hardcode library paths into programs" >&5
6190 hardcode_action=
6191 if test -n "$hardcode_libdir_flag_spec" || \
6192    test -n "$runpath_var"; then
6193
6194   # We can hardcode non-existant directories.
6195   if test "$hardcode_direct" != no &&
6196      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6197      # have to relink, otherwise we might link with an installed library
6198      # when we should be linking with a yet-to-be-installed one
6199      ## test "$hardcode_shlibpath_var" != no &&
6200      test "$hardcode_minus_L" != no; then
6201     # Linking always hardcodes the temporary library directory.
6202     hardcode_action=relink
6203   else
6204     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6205     hardcode_action=immediate
6206   fi
6207 else
6208   # We cannot hardcode anything, or else we can only hardcode existing
6209   # directories.
6210   hardcode_action=unsupported
6211 fi
6212 echo "$ac_t""$hardcode_action" 1>&6
6213
6214 striplib=
6215 old_striplib=
6216 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6217 echo "configure:6218: checking whether stripping libraries is possible" >&5
6218 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6219   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6220   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6221   echo "$ac_t""yes" 1>&6
6222 else
6223   echo "$ac_t""no" 1>&6
6224 fi
6225
6226 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6227 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6228
6229 # PORTME Fill in your ld.so characteristics
6230 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6231 echo "configure:6232: checking dynamic linker characteristics" >&5
6232 library_names_spec=
6233 libname_spec='lib$name'
6234 soname_spec=
6235 postinstall_cmds=
6236 postuninstall_cmds=
6237 finish_cmds=
6238 finish_eval=
6239 shlibpath_var=
6240 shlibpath_overrides_runpath=unknown
6241 version_type=none
6242 dynamic_linker="$host_os ld.so"
6243 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6244 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6245
6246 case $host_os in
6247 aix3*)
6248   version_type=linux
6249   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6250   shlibpath_var=LIBPATH
6251
6252   # AIX has no versioning support, so we append a major version to the name.
6253   soname_spec='${libname}${release}.so$major'
6254   ;;
6255
6256 aix4* | aix5*)
6257   version_type=linux
6258   need_lib_prefix=no
6259   need_version=no
6260   hardcode_into_libs=yes
6261   if test "$host_cpu" = ia64; then
6262     # AIX 5 supports IA64
6263     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6264     shlibpath_var=LD_LIBRARY_PATH
6265   else
6266     # With GCC up to 2.95.x, collect2 would create an import file
6267     # for dependence libraries.  The import file would start with
6268     # the line `#! .'.  This would cause the generated library to
6269     # depend on `.', always an invalid library.  This was fixed in
6270     # development snapshots of GCC prior to 3.0.
6271     case $host_os in
6272       aix4 | aix4.[01] | aix4.[01].*)
6273         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6274              echo ' yes '
6275              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6276           :
6277         else
6278           can_build_shared=no
6279         fi
6280         ;;
6281     esac
6282     # AIX (on Power*) has no versioning support, so currently we can
6283     # not hardcode correct soname into executable. Probably we can
6284     # add versioning support to collect2, so additional links can
6285     # be useful in future.
6286     if test "$aix_use_runtimelinking" = yes; then
6287       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6288       # instead of lib<name>.a to let people know that these are not
6289       # typical AIX shared libraries.
6290       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6291     else
6292       # We preserve .a as extension for shared libraries through AIX4.2
6293       # and later when we are not doing run time linking.
6294       library_names_spec='${libname}${release}.a $libname.a'
6295       soname_spec='${libname}${release}.so$major'
6296     fi
6297     shlibpath_var=LIBPATH
6298   fi
6299   hardcode_into_libs=yes
6300   ;;
6301
6302 amigaos*)
6303   library_names_spec='$libname.ixlibrary $libname.a'
6304   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6305   finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
6306   ;;
6307
6308 beos*)
6309   library_names_spec='${libname}.so'
6310   dynamic_linker="$host_os ld.so"
6311   shlibpath_var=LIBRARY_PATH
6312   ;;
6313
6314 bsdi4*)
6315   version_type=linux
6316   need_version=no
6317   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6318   soname_spec='${libname}${release}.so$major'
6319   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6320   shlibpath_var=LD_LIBRARY_PATH
6321   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6322   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6323   export_dynamic_flag_spec=-rdynamic
6324   # the default ld.so.conf also contains /usr/contrib/lib and
6325   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6326   # libtool to hard-code these into programs
6327   ;;
6328
6329 cygwin* | mingw* | pw32*)
6330   version_type=windows
6331   need_version=no
6332   need_lib_prefix=no
6333   case $GCC,$host_os in
6334   yes,cygwin*)
6335     library_names_spec='$libname.dll.a'
6336     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6337     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6338       dldir=$destdir/`dirname \$dlpath`~
6339       test -d \$dldir || mkdir -p \$dldir~
6340       $install_prog .libs/$dlname \$dldir/$dlname'
6341     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6342       dlpath=$dir/\$dldll~
6343        $rm \$dlpath'
6344     ;;
6345   yes,mingw*)
6346     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6347     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6348     ;;
6349   yes,pw32*)
6350     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6351     ;;
6352   *)
6353     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6354     ;;
6355   esac
6356   dynamic_linker='Win32 ld.exe'
6357   # FIXME: first we should search . and the directory the executable is in
6358   shlibpath_var=PATH
6359   ;;
6360
6361 darwin* | rhapsody*)
6362   dynamic_linker="$host_os dyld"
6363   version_type=darwin
6364   need_lib_prefix=no
6365   need_version=no
6366   # FIXME: Relying on posixy $() will cause problems for
6367   #        cross-compilation, but unfortunately the echo tests do not
6368   #        yet detect zsh echo's removal of \ escapes.
6369   library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
6370   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6371   shlibpath_overrides_runpath=yes
6372   shlibpath_var=DYLD_LIBRARY_PATH
6373   ;;
6374
6375 freebsd1*)
6376   dynamic_linker=no
6377   ;;
6378
6379 freebsd*)
6380   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6381   version_type=freebsd-$objformat
6382   case $version_type in
6383     freebsd-elf*)
6384       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6385       need_version=no
6386       need_lib_prefix=no
6387       ;;
6388     freebsd-*)
6389       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6390       need_version=yes
6391       ;;
6392   esac
6393   shlibpath_var=LD_LIBRARY_PATH
6394   case $host_os in
6395   freebsd2*)
6396     shlibpath_overrides_runpath=yes
6397     ;;
6398   *)
6399     shlibpath_overrides_runpath=no
6400     hardcode_into_libs=yes
6401     ;;
6402   esac
6403   ;;
6404
6405 gnu*)
6406   version_type=linux
6407   need_lib_prefix=no
6408   need_version=no
6409   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6410   soname_spec='${libname}${release}.so$major'
6411   shlibpath_var=LD_LIBRARY_PATH
6412   hardcode_into_libs=yes
6413   ;;
6414
6415 hpux9* | hpux10* | hpux11*)
6416   # Give a soname corresponding to the major version so that dld.sl refuses to
6417   # link against other versions.
6418   dynamic_linker="$host_os dld.sl"
6419   version_type=sunos
6420   need_lib_prefix=no
6421   need_version=no
6422   shlibpath_var=SHLIB_PATH
6423   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6424   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6425   soname_spec='${libname}${release}.sl$major'
6426   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6427   postinstall_cmds='chmod 555 $lib'
6428   ;;
6429
6430 irix5* | irix6* | nonstopux*)
6431   case $host_os in
6432     nonstopux*) version_type=nonstopux ;;
6433     *)          version_type=irix ;;
6434   esac
6435   need_lib_prefix=no
6436   need_version=no
6437   soname_spec='${libname}${release}.so$major'
6438   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6439   case $host_os in
6440   irix5* | nonstopux*)
6441     libsuff= shlibsuff=
6442     ;;
6443   *)
6444     case $LD in # libtool.m4 will add one of these switches to LD
6445     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6446     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6447     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6448     *) libsuff= shlibsuff= libmagic=never-match;;
6449     esac
6450     ;;
6451   esac
6452   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6453   shlibpath_overrides_runpath=no
6454   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6455   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6456   ;;
6457
6458 # No shared lib support for Linux oldld, aout, or coff.
6459 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6460   dynamic_linker=no
6461   ;;
6462
6463 # This must be Linux ELF.
6464 linux-gnu*)
6465   version_type=linux
6466   need_lib_prefix=no
6467   need_version=no
6468   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6469   soname_spec='${libname}${release}.so$major'
6470   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6471   shlibpath_var=LD_LIBRARY_PATH
6472   shlibpath_overrides_runpath=no
6473   # This implies no fast_install, which is unacceptable.
6474   # Some rework will be needed to allow for fast_install
6475   # before this can be enabled.
6476   hardcode_into_libs=yes
6477
6478   # We used to test for /lib/ld.so.1 and disable shared libraries on
6479   # powerpc, because MkLinux only supported shared libraries with the
6480   # GNU dynamic linker.  Since this was broken with cross compilers,
6481   # most powerpc-linux boxes support dynamic linking these days and
6482   # people can always --disable-shared, the test was removed, and we
6483   # assume the GNU/Linux dynamic linker is in use.
6484   dynamic_linker='GNU/Linux ld.so'
6485   ;;
6486
6487 netbsd*)
6488   version_type=sunos
6489   need_lib_prefix=no
6490   need_version=no
6491   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6492     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6493     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6494     dynamic_linker='NetBSD (a.out) ld.so'
6495   else
6496     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6497     soname_spec='${libname}${release}.so$major'
6498     dynamic_linker='NetBSD ld.elf_so'
6499   fi
6500   shlibpath_var=LD_LIBRARY_PATH
6501   shlibpath_overrides_runpath=yes
6502   hardcode_into_libs=yes
6503   ;;
6504
6505 newsos6)
6506   version_type=linux
6507   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6508   shlibpath_var=LD_LIBRARY_PATH
6509   shlibpath_overrides_runpath=yes
6510   ;;
6511
6512 openbsd*)
6513   version_type=sunos
6514   need_lib_prefix=no
6515   need_version=no
6516   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6517     case "$host_os" in
6518     openbsd2.[89] | openbsd2.[89].*)
6519       shlibpath_overrides_runpath=no
6520       ;;
6521     *)
6522       shlibpath_overrides_runpath=yes
6523       ;;
6524     esac
6525   else
6526     shlibpath_overrides_runpath=yes
6527   fi
6528   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6529   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6530   shlibpath_var=LD_LIBRARY_PATH
6531   ;;
6532
6533 openedition*)
6534   need_lib_prefix=no
6535   need_version=no
6536   shlibpath_overrides_runpath=yes
6537   shlibpath_var=LIBPATH
6538   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir"
6539   # the library's exports are in libname.x; this is the file that must
6540   # actually be linked with to use a DLL.
6541   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6542   ;;
6543
6544 os2*)
6545   libname_spec='$name'
6546   need_lib_prefix=no
6547   library_names_spec='$libname.dll $libname.a'
6548   dynamic_linker='OS/2 ld.exe'
6549   shlibpath_var=LIBPATH
6550   ;;
6551
6552 osf3* | osf4* | osf5*)
6553   version_type=osf
6554   need_version=no
6555   soname_spec='${libname}${release}.so$major'
6556   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6557   shlibpath_var=LD_LIBRARY_PATH
6558   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6559   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6560   hardcode_into_libs=yes
6561   ;;
6562
6563 sco3.2v5*)
6564   version_type=osf
6565   soname_spec='${libname}${release}.so$major'
6566   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6567   shlibpath_var=LD_LIBRARY_PATH
6568   ;;
6569
6570 solaris*)
6571   version_type=linux
6572   need_lib_prefix=no
6573   need_version=no
6574   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6575   soname_spec='${libname}${release}.so$major'
6576   shlibpath_var=LD_LIBRARY_PATH
6577   shlibpath_overrides_runpath=yes
6578   hardcode_into_libs=yes
6579   # ldd complains unless libraries are executable
6580   postinstall_cmds='chmod +x $lib'
6581   ;;
6582
6583 sunos4*)
6584   version_type=sunos
6585   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6586   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6587   shlibpath_var=LD_LIBRARY_PATH
6588   shlibpath_overrides_runpath=yes
6589   if test "$with_gnu_ld" = yes; then
6590     need_lib_prefix=no
6591   fi
6592   need_version=yes
6593   ;;
6594
6595 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6596   version_type=linux
6597   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6598   soname_spec='${libname}${release}.so$major'
6599   shlibpath_var=LD_LIBRARY_PATH
6600   case $host_vendor in
6601     sni)
6602       shlibpath_overrides_runpath=no
6603       need_lib_prefix=no
6604       export_dynamic_flag_spec='${wl}-Blargedynsym'
6605       runpath_var=LD_RUN_PATH
6606       ;;
6607     siemens)
6608       need_lib_prefix=no
6609       ;;
6610     motorola)
6611       need_lib_prefix=no
6612       need_version=no
6613       shlibpath_overrides_runpath=no
6614       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6615       ;;
6616   esac
6617   ;;
6618
6619 uts4*)
6620   version_type=linux
6621   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6622   soname_spec='${libname}${release}.so$major'
6623   shlibpath_var=LD_LIBRARY_PATH
6624   ;;
6625
6626 dgux*)
6627   version_type=linux
6628   need_lib_prefix=no
6629   need_version=no
6630   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6631   soname_spec='${libname}${release}.so$major'
6632   shlibpath_var=LD_LIBRARY_PATH
6633   ;;
6634
6635 sysv4*MP*)
6636   if test -d /usr/nec ;then
6637     version_type=linux
6638     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6639     soname_spec='$libname.so.$major'
6640     shlibpath_var=LD_LIBRARY_PATH
6641   fi
6642   ;;
6643
6644 *)
6645   dynamic_linker=no
6646   ;;
6647 esac
6648 echo "$ac_t""$dynamic_linker" 1>&6
6649 test "$dynamic_linker" = no && can_build_shared=no
6650
6651 # Report the final consequences.
6652 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6653 echo "configure:6654: checking if libtool supports shared libraries" >&5
6654 echo "$ac_t""$can_build_shared" 1>&6
6655
6656 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6657 echo "configure:6658: checking whether to build shared libraries" >&5
6658 test "$can_build_shared" = "no" && enable_shared=no
6659
6660 # On AIX, shared libraries and static libraries use the same namespace, and
6661 # are all built from PIC.
6662 case "$host_os" in
6663 aix3*)
6664   test "$enable_shared" = yes && enable_static=no
6665   if test -n "$RANLIB"; then
6666     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6667     postinstall_cmds='$RANLIB $lib'
6668   fi
6669   ;;
6670
6671 aix4*)
6672   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6673     test "$enable_shared" = yes && enable_static=no
6674   fi
6675   ;;
6676 esac
6677 echo "$ac_t""$enable_shared" 1>&6
6678
6679 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6680 echo "configure:6681: checking whether to build static libraries" >&5
6681 # Make sure either enable_shared or enable_static is yes.
6682 test "$enable_shared" = yes || enable_static=yes
6683 echo "$ac_t""$enable_static" 1>&6
6684
6685 if test "$hardcode_action" = relink; then
6686   # Fast installation is not supported
6687   enable_fast_install=no
6688 elif test "$shlibpath_overrides_runpath" = yes ||
6689      test "$enable_shared" = no; then
6690   # Fast installation is not necessary
6691   enable_fast_install=needless
6692 fi
6693
6694 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6695 if test "$GCC" = yes; then
6696   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6697 fi
6698
6699 if test "x$enable_dlopen" != xyes; then
6700   enable_dlopen=unknown
6701   enable_dlopen_self=unknown
6702   enable_dlopen_self_static=unknown
6703 else
6704   lt_cv_dlopen=no
6705   lt_cv_dlopen_libs=
6706
6707   case $host_os in
6708   beos*)
6709     lt_cv_dlopen="load_add_on"
6710     lt_cv_dlopen_libs=
6711     lt_cv_dlopen_self=yes
6712     ;;
6713
6714   cygwin* | mingw* | pw32*)
6715     lt_cv_dlopen="LoadLibrary"
6716     lt_cv_dlopen_libs=
6717    ;;
6718
6719   *)
6720     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6721 echo "configure:6722: checking for dllload" >&5
6722 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6723   echo $ac_n "(cached) $ac_c" 1>&6
6724 else
6725   cat > conftest.$ac_ext <<EOF
6726 #line 6727 "configure"
6727 #include "confdefs.h"
6728 /* System header to define __stub macros and hopefully few prototypes,
6729     which can conflict with char dllload(); below.  */
6730 #include <assert.h>
6731 /* Override any gcc2 internal prototype to avoid an error.  */
6732 /* We use char because int might match the return type of a gcc2
6733     builtin and then its argument prototype would still apply.  */
6734 char dllload();
6735 char (*f)();
6736
6737 int main() {
6738
6739 /* The GNU C library defines this for functions which it implements
6740     to always fail with ENOSYS.  Some functions are actually named
6741     something starting with __ and the normal name is an alias.  */
6742 #if defined (__stub_dllload) || defined (__stub___dllload)
6743 choke me
6744 #else
6745 f = dllload;
6746 #endif
6747
6748 ; return 0; }
6749 EOF
6750 if { (eval echo configure:6751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6751   rm -rf conftest*
6752   eval "ac_cv_func_dllload=yes"
6753 else
6754   echo "configure: failed program was:" >&5
6755   cat conftest.$ac_ext >&5
6756   rm -rf conftest*
6757   eval "ac_cv_func_dllload=no"
6758 fi
6759 rm -f conftest*
6760 fi
6761
6762 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6763   echo "$ac_t""yes" 1>&6
6764   lt_cv_dlopen="dllload"
6765 else
6766   echo "$ac_t""no" 1>&6
6767 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6768 echo "configure:6769: checking for shl_load" >&5
6769 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6770   echo $ac_n "(cached) $ac_c" 1>&6
6771 else
6772   cat > conftest.$ac_ext <<EOF
6773 #line 6774 "configure"
6774 #include "confdefs.h"
6775 /* System header to define __stub macros and hopefully few prototypes,
6776     which can conflict with char shl_load(); below.  */
6777 #include <assert.h>
6778 /* Override any gcc2 internal prototype to avoid an error.  */
6779 /* We use char because int might match the return type of a gcc2
6780     builtin and then its argument prototype would still apply.  */
6781 char shl_load();
6782 char (*f)();
6783
6784 int main() {
6785
6786 /* The GNU C library defines this for functions which it implements
6787     to always fail with ENOSYS.  Some functions are actually named
6788     something starting with __ and the normal name is an alias.  */
6789 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6790 choke me
6791 #else
6792 f = shl_load;
6793 #endif
6794
6795 ; return 0; }
6796 EOF
6797 if { (eval echo configure:6798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6798   rm -rf conftest*
6799   eval "ac_cv_func_shl_load=yes"
6800 else
6801   echo "configure: failed program was:" >&5
6802   cat conftest.$ac_ext >&5
6803   rm -rf conftest*
6804   eval "ac_cv_func_shl_load=no"
6805 fi
6806 rm -f conftest*
6807 fi
6808
6809 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6810   echo "$ac_t""yes" 1>&6
6811   lt_cv_dlopen="shl_load"
6812 else
6813   echo "$ac_t""no" 1>&6
6814 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6815 echo "configure:6816: checking for shl_load in -ldld" >&5
6816 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6817 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6818   echo $ac_n "(cached) $ac_c" 1>&6
6819 else
6820   ac_save_LIBS="$LIBS"
6821 LIBS="-ldld  $LIBS"
6822 cat > conftest.$ac_ext <<EOF
6823 #line 6824 "configure"
6824 #include "confdefs.h"
6825 /* Override any gcc2 internal prototype to avoid an error.  */
6826 /* We use char because int might match the return type of a gcc2
6827     builtin and then its argument prototype would still apply.  */
6828 char shl_load();
6829
6830 int main() {
6831 shl_load()
6832 ; return 0; }
6833 EOF
6834 if { (eval echo configure:6835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6835   rm -rf conftest*
6836   eval "ac_cv_lib_$ac_lib_var=yes"
6837 else
6838   echo "configure: failed program was:" >&5
6839   cat conftest.$ac_ext >&5
6840   rm -rf conftest*
6841   eval "ac_cv_lib_$ac_lib_var=no"
6842 fi
6843 rm -f conftest*
6844 LIBS="$ac_save_LIBS"
6845
6846 fi
6847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6848   echo "$ac_t""yes" 1>&6
6849   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6850 else
6851   echo "$ac_t""no" 1>&6
6852 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6853 echo "configure:6854: checking for dlopen" >&5
6854 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6855   echo $ac_n "(cached) $ac_c" 1>&6
6856 else
6857   cat > conftest.$ac_ext <<EOF
6858 #line 6859 "configure"
6859 #include "confdefs.h"
6860 /* System header to define __stub macros and hopefully few prototypes,
6861     which can conflict with char dlopen(); below.  */
6862 #include <assert.h>
6863 /* Override any gcc2 internal prototype to avoid an error.  */
6864 /* We use char because int might match the return type of a gcc2
6865     builtin and then its argument prototype would still apply.  */
6866 char dlopen();
6867 char (*f)();
6868
6869 int main() {
6870
6871 /* The GNU C library defines this for functions which it implements
6872     to always fail with ENOSYS.  Some functions are actually named
6873     something starting with __ and the normal name is an alias.  */
6874 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6875 choke me
6876 #else
6877 f = dlopen;
6878 #endif
6879
6880 ; return 0; }
6881 EOF
6882 if { (eval echo configure:6883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6883   rm -rf conftest*
6884   eval "ac_cv_func_dlopen=yes"
6885 else
6886   echo "configure: failed program was:" >&5
6887   cat conftest.$ac_ext >&5
6888   rm -rf conftest*
6889   eval "ac_cv_func_dlopen=no"
6890 fi
6891 rm -f conftest*
6892 fi
6893
6894 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6895   echo "$ac_t""yes" 1>&6
6896   lt_cv_dlopen="dlopen"
6897 else
6898   echo "$ac_t""no" 1>&6
6899 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6900 echo "configure:6901: checking for dlopen in -ldl" >&5
6901 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6902 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6903   echo $ac_n "(cached) $ac_c" 1>&6
6904 else
6905   ac_save_LIBS="$LIBS"
6906 LIBS="-ldl  $LIBS"
6907 cat > conftest.$ac_ext <<EOF
6908 #line 6909 "configure"
6909 #include "confdefs.h"
6910 /* Override any gcc2 internal prototype to avoid an error.  */
6911 /* We use char because int might match the return type of a gcc2
6912     builtin and then its argument prototype would still apply.  */
6913 char dlopen();
6914
6915 int main() {
6916 dlopen()
6917 ; return 0; }
6918 EOF
6919 if { (eval echo configure:6920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6920   rm -rf conftest*
6921   eval "ac_cv_lib_$ac_lib_var=yes"
6922 else
6923   echo "configure: failed program was:" >&5
6924   cat conftest.$ac_ext >&5
6925   rm -rf conftest*
6926   eval "ac_cv_lib_$ac_lib_var=no"
6927 fi
6928 rm -f conftest*
6929 LIBS="$ac_save_LIBS"
6930
6931 fi
6932 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6933   echo "$ac_t""yes" 1>&6
6934   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6935 else
6936   echo "$ac_t""no" 1>&6
6937 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6938 echo "configure:6939: checking for dlopen in -lsvld" >&5
6939 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6940 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6941   echo $ac_n "(cached) $ac_c" 1>&6
6942 else
6943   ac_save_LIBS="$LIBS"
6944 LIBS="-lsvld  $LIBS"
6945 cat > conftest.$ac_ext <<EOF
6946 #line 6947 "configure"
6947 #include "confdefs.h"
6948 /* Override any gcc2 internal prototype to avoid an error.  */
6949 /* We use char because int might match the return type of a gcc2
6950     builtin and then its argument prototype would still apply.  */
6951 char dlopen();
6952
6953 int main() {
6954 dlopen()
6955 ; return 0; }
6956 EOF
6957 if { (eval echo configure:6958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6958   rm -rf conftest*
6959   eval "ac_cv_lib_$ac_lib_var=yes"
6960 else
6961   echo "configure: failed program was:" >&5
6962   cat conftest.$ac_ext >&5
6963   rm -rf conftest*
6964   eval "ac_cv_lib_$ac_lib_var=no"
6965 fi
6966 rm -f conftest*
6967 LIBS="$ac_save_LIBS"
6968
6969 fi
6970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6971   echo "$ac_t""yes" 1>&6
6972   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6973 else
6974   echo "$ac_t""no" 1>&6
6975 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6976 echo "configure:6977: checking for dld_link in -ldld" >&5
6977 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6978 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6979   echo $ac_n "(cached) $ac_c" 1>&6
6980 else
6981   ac_save_LIBS="$LIBS"
6982 LIBS="-ldld  $LIBS"
6983 cat > conftest.$ac_ext <<EOF
6984 #line 6985 "configure"
6985 #include "confdefs.h"
6986 /* Override any gcc2 internal prototype to avoid an error.  */
6987 /* We use char because int might match the return type of a gcc2
6988     builtin and then its argument prototype would still apply.  */
6989 char dld_link();
6990
6991 int main() {
6992 dld_link()
6993 ; return 0; }
6994 EOF
6995 if { (eval echo configure:6996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6996   rm -rf conftest*
6997   eval "ac_cv_lib_$ac_lib_var=yes"
6998 else
6999   echo "configure: failed program was:" >&5
7000   cat conftest.$ac_ext >&5
7001   rm -rf conftest*
7002   eval "ac_cv_lib_$ac_lib_var=no"
7003 fi
7004 rm -f conftest*
7005 LIBS="$ac_save_LIBS"
7006
7007 fi
7008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7009   echo "$ac_t""yes" 1>&6
7010   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
7011 else
7012   echo "$ac_t""no" 1>&6
7013 fi
7014
7015               
7016 fi
7017
7018             
7019 fi
7020
7021           
7022 fi
7023
7024         
7025 fi
7026
7027       
7028 fi
7029
7030     
7031 fi
7032
7033     ;;
7034   esac
7035
7036   if test "x$lt_cv_dlopen" != xno; then
7037     enable_dlopen=yes
7038   else
7039     enable_dlopen=no
7040   fi
7041
7042   case $lt_cv_dlopen in
7043   dlopen)
7044     save_CPPFLAGS="$CPPFLAGS"
7045         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
7046
7047     save_LDFLAGS="$LDFLAGS"
7048     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7049
7050     save_LIBS="$LIBS"
7051     LIBS="$lt_cv_dlopen_libs $LIBS"
7052
7053     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
7054 echo "configure:7055: checking whether a program can dlopen itself" >&5
7055 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
7056   echo $ac_n "(cached) $ac_c" 1>&6
7057 else
7058           if test "$cross_compiling" = yes; then :
7059   lt_cv_dlopen_self=cross
7060 else
7061     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7062   lt_status=$lt_dlunknown
7063   cat > conftest.$ac_ext <<EOF
7064 #line 7065 "configure"
7065 #include "confdefs.h"
7066
7067 #if HAVE_DLFCN_H
7068 #include <dlfcn.h>
7069 #endif
7070
7071 #include <stdio.h>
7072
7073 #ifdef RTLD_GLOBAL
7074 #  define LT_DLGLOBAL           RTLD_GLOBAL
7075 #else
7076 #  ifdef DL_GLOBAL
7077 #    define LT_DLGLOBAL         DL_GLOBAL
7078 #  else
7079 #    define LT_DLGLOBAL         0
7080 #  endif
7081 #endif
7082
7083 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7084    find out it does not work in some platform. */
7085 #ifndef LT_DLLAZY_OR_NOW
7086 #  ifdef RTLD_LAZY
7087 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7088 #  else
7089 #    ifdef DL_LAZY
7090 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7091 #    else
7092 #      ifdef RTLD_NOW
7093 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7094 #      else
7095 #        ifdef DL_NOW
7096 #          define LT_DLLAZY_OR_NOW      DL_NOW
7097 #        else
7098 #          define LT_DLLAZY_OR_NOW      0
7099 #        endif
7100 #      endif
7101 #    endif
7102 #  endif
7103 #endif
7104
7105 #ifdef __cplusplus
7106 extern "C" void exit (int);
7107 #endif
7108
7109 void fnord() { int i=42;}
7110 int main ()
7111 {
7112   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7113   int status = $lt_dlunknown;
7114
7115   if (self)
7116     {
7117       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7118       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7119       /* dlclose (self); */
7120     }
7121
7122     exit (status);
7123 }
7124 EOF
7125   if { (eval echo configure:7126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7126     (./conftest; exit; ) 2>/dev/null
7127     lt_status=$?
7128     case x$lt_status in
7129       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7130       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7131       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7132     esac
7133   else :
7134     # compilation failed
7135     lt_cv_dlopen_self=no
7136   fi
7137 fi
7138 rm -fr conftest*
7139
7140     
7141 fi
7142
7143 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7144
7145     if test "x$lt_cv_dlopen_self" = xyes; then
7146       LDFLAGS="$LDFLAGS $link_static_flag"
7147       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7148 echo "configure:7149: checking whether a statically linked program can dlopen itself" >&5
7149 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7150   echo $ac_n "(cached) $ac_c" 1>&6
7151 else
7152           if test "$cross_compiling" = yes; then :
7153   lt_cv_dlopen_self_static=cross
7154 else
7155     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7156   lt_status=$lt_dlunknown
7157   cat > conftest.$ac_ext <<EOF
7158 #line 7159 "configure"
7159 #include "confdefs.h"
7160
7161 #if HAVE_DLFCN_H
7162 #include <dlfcn.h>
7163 #endif
7164
7165 #include <stdio.h>
7166
7167 #ifdef RTLD_GLOBAL
7168 #  define LT_DLGLOBAL           RTLD_GLOBAL
7169 #else
7170 #  ifdef DL_GLOBAL
7171 #    define LT_DLGLOBAL         DL_GLOBAL
7172 #  else
7173 #    define LT_DLGLOBAL         0
7174 #  endif
7175 #endif
7176
7177 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7178    find out it does not work in some platform. */
7179 #ifndef LT_DLLAZY_OR_NOW
7180 #  ifdef RTLD_LAZY
7181 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7182 #  else
7183 #    ifdef DL_LAZY
7184 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7185 #    else
7186 #      ifdef RTLD_NOW
7187 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7188 #      else
7189 #        ifdef DL_NOW
7190 #          define LT_DLLAZY_OR_NOW      DL_NOW
7191 #        else
7192 #          define LT_DLLAZY_OR_NOW      0
7193 #        endif
7194 #      endif
7195 #    endif
7196 #  endif
7197 #endif
7198
7199 #ifdef __cplusplus
7200 extern "C" void exit (int);
7201 #endif
7202
7203 void fnord() { int i=42;}
7204 int main ()
7205 {
7206   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7207   int status = $lt_dlunknown;
7208
7209   if (self)
7210     {
7211       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7212       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7213       /* dlclose (self); */
7214     }
7215
7216     exit (status);
7217 }
7218 EOF
7219   if { (eval echo configure:7220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7220     (./conftest; exit; ) 2>/dev/null
7221     lt_status=$?
7222     case x$lt_status in
7223       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7224       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7225       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7226     esac
7227   else :
7228     # compilation failed
7229     lt_cv_dlopen_self_static=no
7230   fi
7231 fi
7232 rm -fr conftest*
7233
7234       
7235 fi
7236
7237 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7238     fi
7239
7240     CPPFLAGS="$save_CPPFLAGS"
7241     LDFLAGS="$save_LDFLAGS"
7242     LIBS="$save_LIBS"
7243     ;;
7244   esac
7245
7246   case $lt_cv_dlopen_self in
7247   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7248   *) enable_dlopen_self=unknown ;;
7249   esac
7250
7251   case $lt_cv_dlopen_self_static in
7252   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7253   *) enable_dlopen_self_static=unknown ;;
7254   esac
7255 fi
7256
7257
7258 if test "$enable_shared" = yes && test "$GCC" = yes; then
7259   case $archive_cmds in
7260   *'~'*)
7261     # FIXME: we may have to deal with multi-command sequences.
7262     ;;
7263   '$CC '*)
7264     # Test whether the compiler implicitly links with -lc since on some
7265     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7266     # to ld, don't add -lc before -lgcc.
7267     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7268 echo "configure:7269: checking whether -lc should be explicitly linked in" >&5
7269     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7270   echo $ac_n "(cached) $ac_c" 1>&6
7271 else
7272   $rm conftest*
7273     echo 'static int dummy;' > conftest.$ac_ext
7274
7275     if { (eval echo configure:7276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7276       soname=conftest
7277       lib=conftest
7278       libobjs=conftest.$ac_objext
7279       deplibs=
7280       wl=$lt_cv_prog_cc_wl
7281       compiler_flags=-v
7282       linker_flags=-v
7283       verstring=
7284       output_objdir=.
7285       libname=conftest
7286       save_allow_undefined_flag=$allow_undefined_flag
7287       allow_undefined_flag=
7288       if { (eval echo configure:7289: \"$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; }
7289       then
7290         lt_cv_archive_cmds_need_lc=no
7291       else
7292         lt_cv_archive_cmds_need_lc=yes
7293       fi
7294       allow_undefined_flag=$save_allow_undefined_flag
7295     else
7296       cat conftest.err 1>&5
7297     fi
7298 fi
7299
7300     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7301     ;;
7302   esac
7303 fi
7304 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7305
7306 # The second clause should only fire when bootstrapping the
7307 # libtool distribution, otherwise you forgot to ship ltmain.sh
7308 # with your package, and you will get complaints that there are
7309 # no rules to generate ltmain.sh.
7310 if test -f "$ltmain"; then
7311   :
7312 else
7313   # If there is no Makefile yet, we rely on a make rule to execute
7314   # `config.status --recheck' to rerun these tests and create the
7315   # libtool script then.
7316   test -f Makefile && make "$ltmain"
7317 fi
7318
7319 if test -f "$ltmain"; then
7320   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7321   $rm -f "${ofile}T"
7322
7323   echo creating $ofile
7324
7325   # Now quote all the things that may contain metacharacters while being
7326   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7327   # variables and quote the copies for generation of the libtool script.
7328   for var in echo old_CC old_CFLAGS SED \
7329     AR AR_FLAGS CC LD LN_S NM SHELL \
7330     reload_flag reload_cmds wl \
7331     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7332     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7333     library_names_spec soname_spec \
7334     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7335     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7336     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7337     old_striplib striplib file_magic_cmd export_symbols_cmds \
7338     deplibs_check_method allow_undefined_flag no_undefined_flag \
7339     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7340     global_symbol_to_c_name_address \
7341     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7342     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7343     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7344
7345     case $var in
7346     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7347     old_postinstall_cmds | old_postuninstall_cmds | \
7348     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7349     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7350     postinstall_cmds | postuninstall_cmds | \
7351     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7352       # Double-quote double-evaled strings.
7353       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7354       ;;
7355     *)
7356       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7357       ;;
7358     esac
7359   done
7360
7361   cat <<__EOF__ > "${ofile}T"
7362 #! $SHELL
7363
7364 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7365 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7366 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7367 #
7368 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7369 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7370 #
7371 # This program is free software; you can redistribute it and/or modify
7372 # it under the terms of the GNU General Public License as published by
7373 # the Free Software Foundation; either version 2 of the License, or
7374 # (at your option) any later version.
7375 #
7376 # This program is distributed in the hope that it will be useful, but
7377 # WITHOUT ANY WARRANTY; without even the implied warranty of
7378 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7379 # General Public License for more details.
7380 #
7381 # You should have received a copy of the GNU General Public License
7382 # along with this program; if not, write to the Free Software
7383 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7384 #
7385 # As a special exception to the GNU General Public License, if you
7386 # distribute this file as part of a program that contains a
7387 # configuration script generated by Autoconf, you may include it under
7388 # the same distribution terms that you use for the rest of that program.
7389
7390 # A sed that does not truncate output.
7391 SED=$lt_SED
7392
7393 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7394 Xsed="${SED} -e s/^X//"
7395
7396 # The HP-UX ksh and POSIX shell print the target directory to stdout
7397 # if CDPATH is set.
7398 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7399
7400 # ### BEGIN LIBTOOL CONFIG
7401
7402 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7403
7404 # Shell to use when invoking shell scripts.
7405 SHELL=$lt_SHELL
7406
7407 # Whether or not to build shared libraries.
7408 build_libtool_libs=$enable_shared
7409
7410 # Whether or not to build static libraries.
7411 build_old_libs=$enable_static
7412
7413 # Whether or not to add -lc for building shared libraries.
7414 build_libtool_need_lc=$need_lc
7415
7416 # Whether or not to optimize for fast installation.
7417 fast_install=$enable_fast_install
7418
7419 # The host system.
7420 host_alias=$host_alias
7421 host=$host
7422
7423 # An echo program that does not interpret backslashes.
7424 echo=$lt_echo
7425
7426 # The archiver.
7427 AR=$lt_AR
7428 AR_FLAGS=$lt_AR_FLAGS
7429
7430 # The default C compiler.
7431 CC=$lt_CC
7432
7433 # Is the compiler the GNU C compiler?
7434 with_gcc=$GCC
7435
7436 # The linker used to build libraries.
7437 LD=$lt_LD
7438
7439 # Whether we need hard or soft links.
7440 LN_S=$lt_LN_S
7441
7442 # A BSD-compatible nm program.
7443 NM=$lt_NM
7444
7445 # A symbol stripping program
7446 STRIP=$STRIP
7447
7448 # Used to examine libraries when file_magic_cmd begins "file"
7449 MAGIC_CMD=$MAGIC_CMD
7450
7451 # Used on cygwin: DLL creation program.
7452 DLLTOOL="$DLLTOOL"
7453
7454 # Used on cygwin: object dumper.
7455 OBJDUMP="$OBJDUMP"
7456
7457 # Used on cygwin: assembler.
7458 AS="$AS"
7459
7460 # The name of the directory that contains temporary libtool files.
7461 objdir=$objdir
7462
7463 # How to create reloadable object files.
7464 reload_flag=$lt_reload_flag
7465 reload_cmds=$lt_reload_cmds
7466
7467 # How to pass a linker flag through the compiler.
7468 wl=$lt_wl
7469
7470 # Object file suffix (normally "o").
7471 objext="$ac_objext"
7472
7473 # Old archive suffix (normally "a").
7474 libext="$libext"
7475
7476 # Executable file suffix (normally "").
7477 exeext="$exeext"
7478
7479 # Additional compiler flags for building library objects.
7480 pic_flag=$lt_pic_flag
7481 pic_mode=$pic_mode
7482
7483 # Does compiler simultaneously support -c and -o options?
7484 compiler_c_o=$lt_compiler_c_o
7485
7486 # Can we write directly to a .lo ?
7487 compiler_o_lo=$lt_compiler_o_lo
7488
7489 # Must we lock files when doing compilation ?
7490 need_locks=$lt_need_locks
7491
7492 # Do we need the lib prefix for modules?
7493 need_lib_prefix=$need_lib_prefix
7494
7495 # Do we need a version for libraries?
7496 need_version=$need_version
7497
7498 # Whether dlopen is supported.
7499 dlopen_support=$enable_dlopen
7500
7501 # Whether dlopen of programs is supported.
7502 dlopen_self=$enable_dlopen_self
7503
7504 # Whether dlopen of statically linked programs is supported.
7505 dlopen_self_static=$enable_dlopen_self_static
7506
7507 # Compiler flag to prevent dynamic linking.
7508 link_static_flag=$lt_link_static_flag
7509
7510 # Compiler flag to turn off builtin functions.
7511 no_builtin_flag=$lt_no_builtin_flag
7512
7513 # Compiler flag to allow reflexive dlopens.
7514 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7515
7516 # Compiler flag to generate shared objects directly from archives.
7517 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7518
7519 # Compiler flag to generate thread-safe objects.
7520 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7521
7522 # Library versioning type.
7523 version_type=$version_type
7524
7525 # Format of library name prefix.
7526 libname_spec=$lt_libname_spec
7527
7528 # List of archive names.  First name is the real one, the rest are links.
7529 # The last name is the one that the linker finds with -lNAME.
7530 library_names_spec=$lt_library_names_spec
7531
7532 # The coded name of the library, if different from the real name.
7533 soname_spec=$lt_soname_spec
7534
7535 # Commands used to build and install an old-style archive.
7536 RANLIB=$lt_RANLIB
7537 old_archive_cmds=$lt_old_archive_cmds
7538 old_postinstall_cmds=$lt_old_postinstall_cmds
7539 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7540
7541 # Create an old-style archive from a shared archive.
7542 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7543
7544 # Create a temporary old-style archive to link instead of a shared archive.
7545 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7546
7547 # Commands used to build and install a shared archive.
7548 archive_cmds=$lt_archive_cmds
7549 archive_expsym_cmds=$lt_archive_expsym_cmds
7550 postinstall_cmds=$lt_postinstall_cmds
7551 postuninstall_cmds=$lt_postuninstall_cmds
7552
7553 # Commands to strip libraries.
7554 old_striplib=$lt_old_striplib
7555 striplib=$lt_striplib
7556
7557 # Method to check whether dependent libraries are shared objects.
7558 deplibs_check_method=$lt_deplibs_check_method
7559
7560 # Command to use when deplibs_check_method == file_magic.
7561 file_magic_cmd=$lt_file_magic_cmd
7562
7563 # Flag that allows shared libraries with undefined symbols to be built.
7564 allow_undefined_flag=$lt_allow_undefined_flag
7565
7566 # Flag that forces no undefined symbols.
7567 no_undefined_flag=$lt_no_undefined_flag
7568
7569 # Commands used to finish a libtool library installation in a directory.
7570 finish_cmds=$lt_finish_cmds
7571
7572 # Same as above, but a single script fragment to be evaled but not shown.
7573 finish_eval=$lt_finish_eval
7574
7575 # Take the output of nm and produce a listing of raw symbols and C names.
7576 global_symbol_pipe=$lt_global_symbol_pipe
7577
7578 # Transform the output of nm in a proper C declaration
7579 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7580
7581 # Transform the output of nm in a C name address pair
7582 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7583
7584 # This is the shared library runtime path variable.
7585 runpath_var=$runpath_var
7586
7587 # This is the shared library path variable.
7588 shlibpath_var=$shlibpath_var
7589
7590 # Is shlibpath searched before the hard-coded library search path?
7591 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7592
7593 # How to hardcode a shared library path into an executable.
7594 hardcode_action=$hardcode_action
7595
7596 # Whether we should hardcode library paths into libraries.
7597 hardcode_into_libs=$hardcode_into_libs
7598
7599 # Flag to hardcode \$libdir into a binary during linking.
7600 # This must work even if \$libdir does not exist.
7601 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7602
7603 # Whether we need a single -rpath flag with a separated argument.
7604 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7605
7606 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7607 # resulting binary.
7608 hardcode_direct=$hardcode_direct
7609
7610 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7611 # resulting binary.
7612 hardcode_minus_L=$hardcode_minus_L
7613
7614 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7615 # the resulting binary.
7616 hardcode_shlibpath_var=$hardcode_shlibpath_var
7617
7618 # Variables whose values should be saved in libtool wrapper scripts and
7619 # restored at relink time.
7620 variables_saved_for_relink="$variables_saved_for_relink"
7621
7622 # Whether libtool must link a program against all its dependency libraries.
7623 link_all_deplibs=$link_all_deplibs
7624
7625 # Compile-time system search path for libraries
7626 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7627
7628 # Run-time system search path for libraries
7629 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7630
7631 # Fix the shell variable \$srcfile for the compiler.
7632 fix_srcfile_path="$fix_srcfile_path"
7633
7634 # Set to yes if exported symbols are required.
7635 always_export_symbols=$always_export_symbols
7636
7637 # The commands to list exported symbols.
7638 export_symbols_cmds=$lt_export_symbols_cmds
7639
7640 # The commands to extract the exported symbol list from a shared archive.
7641 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7642
7643 # Symbols that should not be listed in the preloaded symbols.
7644 exclude_expsyms=$lt_exclude_expsyms
7645
7646 # Symbols that must always be exported.
7647 include_expsyms=$lt_include_expsyms
7648
7649 # ### END LIBTOOL CONFIG
7650
7651 __EOF__
7652
7653   case $host_os in
7654   aix3*)
7655     cat <<\EOF >> "${ofile}T"
7656
7657 # AIX sometimes has problems with the GCC collect2 program.  For some
7658 # reason, if we set the COLLECT_NAMES environment variable, the problems
7659 # vanish in a puff of smoke.
7660 if test "X${COLLECT_NAMES+set}" != Xset; then
7661   COLLECT_NAMES=
7662   export COLLECT_NAMES
7663 fi
7664 EOF
7665     ;;
7666   esac
7667
7668   case $host_os in
7669   cygwin* | mingw* | pw32* | os2*)
7670     cat <<'EOF' >> "${ofile}T"
7671       # This is a source program that is used to create dlls on Windows
7672       # Don't remove nor modify the starting and closing comments
7673 # /* ltdll.c starts here */
7674 # #define WIN32_LEAN_AND_MEAN
7675 # #include <windows.h>
7676 # #undef WIN32_LEAN_AND_MEAN
7677 # #include <stdio.h>
7678 #
7679 # #ifndef __CYGWIN__
7680 # #  ifdef __CYGWIN32__
7681 # #    define __CYGWIN__ __CYGWIN32__
7682 # #  endif
7683 # #endif
7684 #
7685 # #ifdef __cplusplus
7686 # extern "C" {
7687 # #endif
7688 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7689 # #ifdef __cplusplus
7690 # }
7691 # #endif
7692 #
7693 # #ifdef __CYGWIN__
7694 # #include <cygwin/cygwin_dll.h>
7695 # DECLARE_CYGWIN_DLL( DllMain );
7696 # #endif
7697 # HINSTANCE __hDllInstance_base;
7698 #
7699 # BOOL APIENTRY
7700 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7701 # {
7702 #   __hDllInstance_base = hInst;
7703 #   return TRUE;
7704 # }
7705 # /* ltdll.c ends here */
7706         # This is a source program that is used to create import libraries
7707         # on Windows for dlls which lack them. Don't remove nor modify the
7708         # starting and closing comments
7709 # /* impgen.c starts here */
7710 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7711 #
7712 #  This file is part of GNU libtool.
7713 #
7714 #  This program is free software; you can redistribute it and/or modify
7715 #  it under the terms of the GNU General Public License as published by
7716 #  the Free Software Foundation; either version 2 of the License, or
7717 #  (at your option) any later version.
7718 #
7719 #  This program is distributed in the hope that it will be useful,
7720 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7721 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7722 #  GNU General Public License for more details.
7723 #
7724 #  You should have received a copy of the GNU General Public License
7725 #  along with this program; if not, write to the Free Software
7726 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7727 #  */
7728 #
7729 # #include <stdio.h>            /* for printf() */
7730 # #include <unistd.h>           /* for open(), lseek(), read() */
7731 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7732 # #include <string.h>           /* for strdup() */
7733 #
7734 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7735 # #ifndef O_BINARY
7736 # #define O_BINARY 0
7737 # #endif
7738 #
7739 # static unsigned int
7740 # pe_get16 (fd, offset)
7741 #      int fd;
7742 #      int offset;
7743 # {
7744 #   unsigned char b[2];
7745 #   lseek (fd, offset, SEEK_SET);
7746 #   read (fd, b, 2);
7747 #   return b[0] + (b[1]<<8);
7748 # }
7749 #
7750 # static unsigned int
7751 # pe_get32 (fd, offset)
7752 #     int fd;
7753 #     int offset;
7754 # {
7755 #   unsigned char b[4];
7756 #   lseek (fd, offset, SEEK_SET);
7757 #   read (fd, b, 4);
7758 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7759 # }
7760 #
7761 # static unsigned int
7762 # pe_as32 (ptr)
7763 #      void *ptr;
7764 # {
7765 #   unsigned char *b = ptr;
7766 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7767 # }
7768 #
7769 # int
7770 # main (argc, argv)
7771 #     int argc;
7772 #     char *argv[];
7773 # {
7774 #     int dll;
7775 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7776 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7777 #     unsigned long name_rvas, nexp;
7778 #     unsigned char *expdata, *erva;
7779 #     char *filename, *dll_name;
7780 #
7781 #     filename = argv[1];
7782 #
7783 #     dll = open(filename, O_RDONLY|O_BINARY);
7784 #     if (dll < 1)
7785 #       return 1;
7786 #
7787 #     dll_name = filename;
7788 #
7789 #     for (i=0; filename[i]; i++)
7790 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7791 #           dll_name = filename + i +1;
7792 #
7793 #     pe_header_offset = pe_get32 (dll, 0x3c);
7794 #     opthdr_ofs = pe_header_offset + 4 + 20;
7795 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7796 #
7797 #     if (num_entries < 1) /* no exports */
7798 #       return 1;
7799 #
7800 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7801 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7802 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7803 #     secptr = (pe_header_offset + 4 + 20 +
7804 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7805 #
7806 #     expptr = 0;
7807 #     for (i = 0; i < nsections; i++)
7808 #     {
7809 #       char sname[8];
7810 #       unsigned long secptr1 = secptr + 40 * i;
7811 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7812 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7813 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7814 #       lseek(dll, secptr1, SEEK_SET);
7815 #       read(dll, sname, 8);
7816 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7817 #       {
7818 #           expptr = fptr + (export_rva - vaddr);
7819 #           if (export_rva + export_size > vaddr + vsize)
7820 #               export_size = vsize - (export_rva - vaddr);
7821 #           break;
7822 #       }
7823 #     }
7824 #
7825 #     expdata = (unsigned char*)malloc(export_size);
7826 #     lseek (dll, expptr, SEEK_SET);
7827 #     read (dll, expdata, export_size);
7828 #     erva = expdata - export_rva;
7829 #
7830 #     nexp = pe_as32 (expdata+24);
7831 #     name_rvas = pe_as32 (expdata+32);
7832 #
7833 #     printf ("EXPORTS\n");
7834 #     for (i = 0; i<nexp; i++)
7835 #     {
7836 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7837 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7838 #     }
7839 #
7840 #     return 0;
7841 # }
7842 # /* impgen.c ends here */
7843
7844 EOF
7845     ;;
7846   esac
7847
7848   # We use sed instead of cat because bash on DJGPP gets confused if
7849   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7850   # text mode, it properly converts lines to CR/LF.  This bash problem
7851   # is reportedly fixed, but why not run on old versions too?
7852   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7853
7854   mv -f "${ofile}T" "$ofile" || \
7855     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7856   chmod +x "$ofile"
7857 fi
7858
7859
7860
7861
7862
7863 # This can be used to rebuild libtool when needed
7864 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7865
7866 # Always use our own libtool.
7867 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7868
7869 # Prevent multiple expansion
7870
7871
7872
7873 # test for ln hardlink support
7874 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7875 echo "configure:7876: checking whether ln works" >&5
7876 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7877   echo $ac_n "(cached) $ac_c" 1>&6
7878 else
7879   rm -f conftest.src conftest.dst
7880 echo "conftest" > conftest.src
7881 if ln conftest.src conftest.dst 2>/dev/null
7882 then
7883   ol_cv_prog_LN_H="ln"
7884 else
7885   ol_cv_prog_LN_H="cp"
7886 fi
7887 rm -f conftest.src conftest.dst
7888
7889 fi
7890 LN_H="$ol_cv_prog_LN_H"
7891 if test "$ol_cv_prog_LN_H" = "ln"; then
7892         echo "$ac_t""yes" 1>&6
7893 else
7894         echo "$ac_t""no" 1>&6
7895 fi
7896
7897 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7898 echo "configure:7899: checking whether ln -s works" >&5
7899 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7900   echo $ac_n "(cached) $ac_c" 1>&6
7901 else
7902   rm -f conftestdata
7903 if ln -s X conftestdata 2>/dev/null
7904 then
7905   rm -f conftestdata
7906   ac_cv_prog_LN_S="ln -s"
7907 else
7908   ac_cv_prog_LN_S=ln
7909 fi
7910 fi
7911 LN_S="$ac_cv_prog_LN_S"
7912 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7913   echo "$ac_t""yes" 1>&6
7914 else
7915   echo "$ac_t""no" 1>&6
7916 fi
7917
7918
7919 ol_link_perl=no
7920 if test $ol_enable_perl != no ; then
7921         # Extract the first word of "perl", so it can be a program name with args.
7922 set dummy perl; ac_word=$2
7923 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7924 echo "configure:7925: checking for $ac_word" >&5
7925 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7926   echo $ac_n "(cached) $ac_c" 1>&6
7927 else
7928   case "$PERLBIN" in
7929   /*)
7930   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7931   ;;
7932   ?:/*)
7933   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7934   ;;
7935   *)
7936   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7937   ac_dummy="$PATH"
7938   for ac_dir in $ac_dummy; do 
7939     test -z "$ac_dir" && ac_dir=.
7940     if test -f $ac_dir/$ac_word; then
7941       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7942       break
7943     fi
7944   done
7945   IFS="$ac_save_ifs"
7946   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7947   ;;
7948 esac
7949 fi
7950 PERLBIN="$ac_cv_path_PERLBIN"
7951 if test -n "$PERLBIN"; then
7952   echo "$ac_t""$PERLBIN" 1>&6
7953 else
7954   echo "$ac_t""no" 1>&6
7955 fi
7956
7957
7958         if test "no$PERLBIN" = "no" ; then
7959                 if test $ol_enable_perl = yes ; then
7960                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7961                 fi
7962
7963         else
7964                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7965                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7966
7967                 if test x"$ol_with_perl_module" = "xstatic" ; then
7968                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7969                 else
7970                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7971                 fi
7972                                 ol_link_perl=yes
7973         fi
7974 fi
7975
7976 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7977 echo "configure:7978: checking how to run the C preprocessor" >&5
7978 # On Suns, sometimes $CPP names a directory.
7979 if test -n "$CPP" && test -d "$CPP"; then
7980   CPP=
7981 fi
7982 if test -z "$CPP"; then
7983 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7984   echo $ac_n "(cached) $ac_c" 1>&6
7985 else
7986     # This must be in double quotes, not single quotes, because CPP may get
7987   # substituted into the Makefile and "${CC-cc}" will confuse make.
7988   CPP="${CC-cc} -E"
7989   # On the NeXT, cc -E runs the code through the compiler's parser,
7990   # not just through cpp.
7991   cat > conftest.$ac_ext <<EOF
7992 #line 7993 "configure"
7993 #include "confdefs.h"
7994 #include <assert.h>
7995 Syntax Error
7996 EOF
7997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7998 { (eval echo configure:7999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7999 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8000 if test -z "$ac_err"; then
8001   :
8002 else
8003   echo "$ac_err" >&5
8004   echo "configure: failed program was:" >&5
8005   cat conftest.$ac_ext >&5
8006   rm -rf conftest*
8007   CPP="${CC-cc} -E -traditional-cpp"
8008   cat > conftest.$ac_ext <<EOF
8009 #line 8010 "configure"
8010 #include "confdefs.h"
8011 #include <assert.h>
8012 Syntax Error
8013 EOF
8014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8015 { (eval echo configure:8016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8017 if test -z "$ac_err"; then
8018   :
8019 else
8020   echo "$ac_err" >&5
8021   echo "configure: failed program was:" >&5
8022   cat conftest.$ac_ext >&5
8023   rm -rf conftest*
8024   CPP="${CC-cc} -nologo -E"
8025   cat > conftest.$ac_ext <<EOF
8026 #line 8027 "configure"
8027 #include "confdefs.h"
8028 #include <assert.h>
8029 Syntax Error
8030 EOF
8031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8032 { (eval echo configure:8033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8034 if test -z "$ac_err"; then
8035   :
8036 else
8037   echo "$ac_err" >&5
8038   echo "configure: failed program was:" >&5
8039   cat conftest.$ac_ext >&5
8040   rm -rf conftest*
8041   CPP=/lib/cpp
8042 fi
8043 rm -f conftest*
8044 fi
8045 rm -f conftest*
8046 fi
8047 rm -f conftest*
8048   ac_cv_prog_CPP="$CPP"
8049 fi
8050   CPP="$ac_cv_prog_CPP"
8051 else
8052   ac_cv_prog_CPP="$CPP"
8053 fi
8054 echo "$ac_t""$CPP" 1>&6
8055
8056
8057 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
8058         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
8059
8060 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
8061         echo "configure: warning: programs compiled here do run here..." 1>&2
8062         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
8063
8064 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
8065         echo "configure: warning: programs compiled here do not run here..." 1>&2
8066         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
8067 fi
8068
8069
8070 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8071 echo "configure:8072: checking for Cygwin environment" >&5
8072 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
8073   echo $ac_n "(cached) $ac_c" 1>&6
8074 else
8075   cat > conftest.$ac_ext <<EOF
8076 #line 8077 "configure"
8077 #include "confdefs.h"
8078
8079 int main() {
8080
8081 #ifndef __CYGWIN__
8082 #define __CYGWIN__ __CYGWIN32__
8083 #endif
8084 return __CYGWIN__;
8085 ; return 0; }
8086 EOF
8087 if { (eval echo configure:8088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8088   rm -rf conftest*
8089   ac_cv_cygwin=yes
8090 else
8091   echo "configure: failed program was:" >&5
8092   cat conftest.$ac_ext >&5
8093   rm -rf conftest*
8094   ac_cv_cygwin=no
8095 fi
8096 rm -f conftest*
8097 fi
8098
8099 echo "$ac_t""$ac_cv_cygwin" 1>&6
8100 CYGWIN=
8101 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8102 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8103 echo "configure:8104: checking for mingw32 environment" >&5
8104 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8105   echo $ac_n "(cached) $ac_c" 1>&6
8106 else
8107   cat > conftest.$ac_ext <<EOF
8108 #line 8109 "configure"
8109 #include "confdefs.h"
8110
8111 int main() {
8112 return __MINGW32__;
8113 ; return 0; }
8114 EOF
8115 if { (eval echo configure:8116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8116   rm -rf conftest*
8117   ac_cv_mingw32=yes
8118 else
8119   echo "configure: failed program was:" >&5
8120   cat conftest.$ac_ext >&5
8121   rm -rf conftest*
8122   ac_cv_mingw32=no
8123 fi
8124 rm -f conftest*
8125 fi
8126
8127 echo "$ac_t""$ac_cv_mingw32" 1>&6
8128 MINGW32=
8129 test "$ac_cv_mingw32" = yes && MINGW32=yes
8130
8131
8132
8133 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8134 echo "configure:8135: checking for executable suffix" >&5
8135 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8136   echo $ac_n "(cached) $ac_c" 1>&6
8137 else
8138   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8139   ac_cv_exeext=.exe
8140 else
8141   rm -f conftest*
8142   echo 'int main () { return 0; }' > conftest.$ac_ext
8143   ac_cv_exeext=
8144   if { (eval echo configure:8145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8145     for file in conftest.*; do
8146       case $file in
8147       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8148       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8149       esac
8150     done
8151   else
8152     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8153   fi
8154   rm -f conftest*
8155   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8156 fi
8157 fi
8158
8159 EXEEXT=""
8160 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8161 echo "$ac_t""${ac_cv_exeext}" 1>&6
8162 ac_exeext=$EXEEXT
8163
8164 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8165 echo "configure:8166: checking for object suffix" >&5
8166 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8167   echo $ac_n "(cached) $ac_c" 1>&6
8168 else
8169   rm -f conftest*
8170 echo 'int i = 1;' > conftest.$ac_ext
8171 if { (eval echo configure:8172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8172   for ac_file in conftest.*; do
8173     case $ac_file in
8174     *.c) ;;
8175     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8176     esac
8177   done
8178 else
8179   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8180 fi
8181 rm -f conftest*
8182 fi
8183
8184 echo "$ac_t""$ac_cv_objext" 1>&6
8185 OBJEXT=$ac_cv_objext
8186 ac_objext=$ac_cv_objext
8187
8188
8189 cat >> confdefs.h <<EOF
8190 #define EXEEXT "${EXEEXT}"
8191 EOF
8192
8193
8194 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8195 echo "configure:8196: checking for be_app in -lbe" >&5
8196 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8197 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8198   echo $ac_n "(cached) $ac_c" 1>&6
8199 else
8200   ac_save_LIBS="$LIBS"
8201 LIBS="-lbe -lroot -lnet $LIBS"
8202 cat > conftest.$ac_ext <<EOF
8203 #line 8204 "configure"
8204 #include "confdefs.h"
8205 /* Override any gcc2 internal prototype to avoid an error.  */
8206 /* We use char because int might match the return type of a gcc2
8207     builtin and then its argument prototype would still apply.  */
8208 char be_app();
8209
8210 int main() {
8211 be_app()
8212 ; return 0; }
8213 EOF
8214 if { (eval echo configure:8215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8215   rm -rf conftest*
8216   eval "ac_cv_lib_$ac_lib_var=yes"
8217 else
8218   echo "configure: failed program was:" >&5
8219   cat conftest.$ac_ext >&5
8220   rm -rf conftest*
8221   eval "ac_cv_lib_$ac_lib_var=no"
8222 fi
8223 rm -f conftest*
8224 LIBS="$ac_save_LIBS"
8225
8226 fi
8227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8228   echo "$ac_t""yes" 1>&6
8229   LIBS="$LIBS -lbe -lroot -lnet"
8230 else
8231   echo "$ac_t""no" 1>&6
8232 :
8233 fi
8234
8235
8236
8237
8238
8239 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8240 echo "configure:8241: checking for ${CC-cc} option to accept ANSI C" >&5
8241 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8242   echo $ac_n "(cached) $ac_c" 1>&6
8243 else
8244   am_cv_prog_cc_stdc=no
8245 ac_save_CC="$CC"
8246 # Don't try gcc -ansi; that turns off useful extensions and
8247 # breaks some systems' header files.
8248 # AIX                   -qlanglvl=ansi
8249 # Ultrix and OSF/1      -std1
8250 # HP-UX 10.20 and later -Ae
8251 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8252 # SVR4                  -Xc -D__EXTENSIONS__
8253 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8254 do
8255   CC="$ac_save_CC $ac_arg"
8256   cat > conftest.$ac_ext <<EOF
8257 #line 8258 "configure"
8258 #include "confdefs.h"
8259 #include <stdarg.h>
8260 #include <stdio.h>
8261 #include <sys/types.h>
8262 #include <sys/stat.h>
8263 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8264 struct buf { int x; };
8265 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8266 static char *e (p, i)
8267      char **p;
8268      int i;
8269 {
8270   return p[i];
8271 }
8272 static char *f (char * (*g) (char **, int), char **p, ...)
8273 {
8274   char *s;
8275   va_list v;
8276   va_start (v,p);
8277   s = g (p, va_arg (v,int));
8278   va_end (v);
8279   return s;
8280 }
8281 int test (int i, double x);
8282 struct s1 {int (*f) (int a);};
8283 struct s2 {int (*f) (double a);};
8284 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8285 int argc;
8286 char **argv;
8287
8288 int main() {
8289
8290 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8291
8292 ; return 0; }
8293 EOF
8294 if { (eval echo configure:8295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8295   rm -rf conftest*
8296   am_cv_prog_cc_stdc="$ac_arg"; break
8297 else
8298   echo "configure: failed program was:" >&5
8299   cat conftest.$ac_ext >&5
8300 fi
8301 rm -f conftest*
8302 done
8303 CC="$ac_save_CC"
8304
8305 fi
8306
8307 if test -z "$am_cv_prog_cc_stdc"; then
8308   echo "$ac_t""none needed" 1>&6
8309 else
8310   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8311 fi
8312 case "x$am_cv_prog_cc_stdc" in
8313   x|xno) ;;
8314   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8315 esac
8316
8317 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8318         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8319 fi
8320
8321 # test for make depend flag
8322 OL_MKDEP=
8323 OL_MKDEP_FLAGS=
8324 if test -z "${MKDEP}"; then
8325         OL_MKDEP="${CC-cc}"
8326         if test -z "${MKDEP_FLAGS}"; then
8327                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8328 echo "configure:8329: checking for ${OL_MKDEP} depend flag" >&5
8329 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8330   echo $ac_n "(cached) $ac_c" 1>&6
8331 else
8332   
8333                         ol_cv_mkdep=no
8334                         for flag in "-M" "-xM"; do
8335                                 cat > conftest.c <<EOF
8336  noCode;
8337 EOF
8338                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8339                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8340                                 then
8341                                         if test ! -f conftest."${ac_object}" ; then
8342                                                 ol_cv_mkdep=$flag
8343                                                 OL_MKDEP_FLAGS="$flag"
8344                                                 break
8345                                         fi
8346                                 fi
8347                         done
8348                         rm -f conftest*
8349                 
8350 fi
8351
8352 echo "$ac_t""$ol_cv_mkdep" 1>&6
8353         else
8354                 cc_cv_mkdep=yes
8355                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8356         fi
8357 else
8358         cc_cv_mkdep=yes
8359         OL_MKDEP="${MKDEP}"
8360         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8361 fi
8362
8363
8364
8365 if test "${ol_cv_mkdep}" = no ; then
8366         # this will soon become an error
8367         echo "configure: warning: do not know how to generate dependencies" 1>&2
8368 fi
8369
8370 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8371 echo "configure:8372: checking for afopen in -ls" >&5
8372 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8373 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8374   echo $ac_n "(cached) $ac_c" 1>&6
8375 else
8376   ac_save_LIBS="$LIBS"
8377 LIBS="-ls  $LIBS"
8378 cat > conftest.$ac_ext <<EOF
8379 #line 8380 "configure"
8380 #include "confdefs.h"
8381 /* Override any gcc2 internal prototype to avoid an error.  */
8382 /* We use char because int might match the return type of a gcc2
8383     builtin and then its argument prototype would still apply.  */
8384 char afopen();
8385
8386 int main() {
8387 afopen()
8388 ; return 0; }
8389 EOF
8390 if { (eval echo configure:8391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8391   rm -rf conftest*
8392   eval "ac_cv_lib_$ac_lib_var=yes"
8393 else
8394   echo "configure: failed program was:" >&5
8395   cat conftest.$ac_ext >&5
8396   rm -rf conftest*
8397   eval "ac_cv_lib_$ac_lib_var=no"
8398 fi
8399 rm -f conftest*
8400 LIBS="$ac_save_LIBS"
8401
8402 fi
8403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8404   echo "$ac_t""yes" 1>&6
8405   
8406         AUTH_LIBS=-ls
8407         cat >> confdefs.h <<\EOF
8408 #define HAVE_AIX_SECURITY 1
8409 EOF
8410
8411
8412 else
8413   echo "$ac_t""no" 1>&6
8414 fi
8415
8416
8417 case "$target" in
8418 *-ibm-openedition)
8419         ac_cv_func_getopt=no
8420         cat >> confdefs.h <<\EOF
8421 #define BOTH_STRINGS_H 1
8422 EOF
8423
8424         ;;
8425 esac
8426
8427 ol_link_modules=no
8428 if test $ol_enable_modules != no ; then
8429         for ac_hdr in ltdl.h
8430 do
8431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8433 echo "configure:8434: checking for $ac_hdr" >&5
8434 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8435   echo $ac_n "(cached) $ac_c" 1>&6
8436 else
8437   cat > conftest.$ac_ext <<EOF
8438 #line 8439 "configure"
8439 #include "confdefs.h"
8440 #include <$ac_hdr>
8441 EOF
8442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8443 { (eval echo configure:8444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8445 if test -z "$ac_err"; then
8446   rm -rf conftest*
8447   eval "ac_cv_header_$ac_safe=yes"
8448 else
8449   echo "$ac_err" >&5
8450   echo "configure: failed program was:" >&5
8451   cat conftest.$ac_ext >&5
8452   rm -rf conftest*
8453   eval "ac_cv_header_$ac_safe=no"
8454 fi
8455 rm -f conftest*
8456 fi
8457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8458   echo "$ac_t""yes" 1>&6
8459     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8460   cat >> confdefs.h <<EOF
8461 #define $ac_tr_hdr 1
8462 EOF
8463  
8464 else
8465   echo "$ac_t""no" 1>&6
8466 fi
8467 done
8468
8469
8470         if test $ac_cv_header_ltdl_h = no ; then
8471                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8472         fi
8473
8474         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8475 echo "configure:8476: checking for lt_dlinit in -lltdl" >&5
8476 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8477 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8478   echo $ac_n "(cached) $ac_c" 1>&6
8479 else
8480   ac_save_LIBS="$LIBS"
8481 LIBS="-lltdl  $LIBS"
8482 cat > conftest.$ac_ext <<EOF
8483 #line 8484 "configure"
8484 #include "confdefs.h"
8485 /* Override any gcc2 internal prototype to avoid an error.  */
8486 /* We use char because int might match the return type of a gcc2
8487     builtin and then its argument prototype would still apply.  */
8488 char lt_dlinit();
8489
8490 int main() {
8491 lt_dlinit()
8492 ; return 0; }
8493 EOF
8494 if { (eval echo configure:8495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8495   rm -rf conftest*
8496   eval "ac_cv_lib_$ac_lib_var=yes"
8497 else
8498   echo "configure: failed program was:" >&5
8499   cat conftest.$ac_ext >&5
8500   rm -rf conftest*
8501   eval "ac_cv_lib_$ac_lib_var=no"
8502 fi
8503 rm -f conftest*
8504 LIBS="$ac_save_LIBS"
8505
8506 fi
8507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8508   echo "$ac_t""yes" 1>&6
8509   
8510                 MODULES_LIBS=-lltdl
8511                 cat >> confdefs.h <<\EOF
8512 #define HAVE_LIBLTDL 1
8513 EOF
8514
8515         
8516 else
8517   echo "$ac_t""no" 1>&6
8518 fi
8519
8520
8521         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8522                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8523         fi
8524         ol_link_modules=yes
8525 else
8526         ol_with_bdb_module=static
8527         ol_with_dnssrv_module=static
8528         ol_with_hdb_module=static
8529         ol_with_ldap_module=static
8530         ol_with_ldbm_module=static
8531         ol_with_meta_module=static
8532         ol_with_monitor_module=static
8533         ol_with_null_module=static
8534         ol_with_passwd_module=static
8535         ol_with_perl_module=static
8536         ol_with_shell_module=static
8537         ol_with_sql_module=static
8538         if test $ol_with_dyngroup = mod ; then
8539                 echo "configure: warning: building static dyngroup overlay" 1>&2
8540                 ol_with_dyngroup = yes
8541         fi
8542         if test $ol_with_proxycache = mod ; then
8543                 echo "configure: warning: building static proxycache overlay" 1>&2
8544                 ol_with_proxycache = yes
8545         fi
8546         if test $ol_with_rwm = mod ; then
8547                 echo "configure: warning: building static rwm overlay" 1>&2
8548                 ol_with_rwm = yes
8549         fi
8550 fi
8551
8552 # test for EBCDIC
8553 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8554 echo "configure:8555: checking for EBCDIC" >&5
8555 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8556   echo $ac_n "(cached) $ac_c" 1>&6
8557 else
8558   
8559         cat > conftest.$ac_ext <<EOF
8560 #line 8561 "configure"
8561 #include "confdefs.h"
8562
8563 #if !('M' == 0xd4)
8564 #include <__ASCII__/generate_error.h>
8565 #endif
8566
8567 EOF
8568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8569 { (eval echo configure:8570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8571 if test -z "$ac_err"; then
8572   rm -rf conftest*
8573   ol_cv_cpp_ebcdic=yes
8574 else
8575   echo "$ac_err" >&5
8576   echo "configure: failed program was:" >&5
8577   cat conftest.$ac_ext >&5
8578   rm -rf conftest*
8579   ol_cv_cpp_ebcdic=no
8580 fi
8581 rm -f conftest*
8582 fi
8583
8584 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8585 if test $ol_cv_cpp_ebcdic = yes ; then
8586         cat >> confdefs.h <<\EOF
8587 #define HAVE_EBCDIC 1
8588 EOF
8589
8590 fi
8591
8592 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8593 echo "configure:8594: checking for ANSI C header files" >&5
8594 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8595   echo $ac_n "(cached) $ac_c" 1>&6
8596 else
8597   cat > conftest.$ac_ext <<EOF
8598 #line 8599 "configure"
8599 #include "confdefs.h"
8600 #include <stdlib.h>
8601 #include <stdarg.h>
8602 #include <string.h>
8603 #include <float.h>
8604 EOF
8605 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8606 { (eval echo configure:8607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8607 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8608 if test -z "$ac_err"; then
8609   rm -rf conftest*
8610   ol_cv_header_stdc=yes
8611 else
8612   echo "$ac_err" >&5
8613   echo "configure: failed program was:" >&5
8614   cat conftest.$ac_ext >&5
8615   rm -rf conftest*
8616   ol_cv_header_stdc=no
8617 fi
8618 rm -f conftest*
8619
8620 if test $ol_cv_header_stdc = yes; then
8621   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8622 cat > conftest.$ac_ext <<EOF
8623 #line 8624 "configure"
8624 #include "confdefs.h"
8625 #include <string.h>
8626 EOF
8627 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8628   egrep "memchr" >/dev/null 2>&1; then
8629   :
8630 else
8631   rm -rf conftest*
8632   ol_cv_header_stdc=no
8633 fi
8634 rm -f conftest*
8635
8636 fi
8637
8638 if test $ol_cv_header_stdc = yes; then
8639   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8640 cat > conftest.$ac_ext <<EOF
8641 #line 8642 "configure"
8642 #include "confdefs.h"
8643 #include <stdlib.h>
8644 EOF
8645 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8646   egrep "free" >/dev/null 2>&1; then
8647   :
8648 else
8649   rm -rf conftest*
8650   ol_cv_header_stdc=no
8651 fi
8652 rm -f conftest*
8653
8654 fi
8655
8656 if test $ol_cv_header_stdc = yes; then
8657   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8658 if test "$cross_compiling" = yes; then
8659   :
8660 else
8661   cat > conftest.$ac_ext <<EOF
8662 #line 8663 "configure"
8663 #include "confdefs.h"
8664 #include <ctype.h>
8665 #ifndef HAVE_EBCDIC
8666 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8667 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8668 #else
8669 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8670                 || ('j' <= (c) && (c) <= 'r') \
8671                 || ('s' <= (c) && (c) <= 'z'))
8672 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8673 #endif
8674 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8675 int main () { int i; for (i = 0; i < 256; i++)
8676 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8677 exit (0); }
8678
8679 EOF
8680 if { (eval echo configure:8681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8681 then
8682   :
8683 else
8684   echo "configure: failed program was:" >&5
8685   cat conftest.$ac_ext >&5
8686   rm -fr conftest*
8687   ol_cv_header_stdc=no
8688 fi
8689 rm -fr conftest*
8690 fi
8691
8692 fi
8693 fi
8694
8695 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8696 if test $ol_cv_header_stdc = yes; then
8697   cat >> confdefs.h <<\EOF
8698 #define STDC_HEADERS 1
8699 EOF
8700
8701 fi
8702 ac_cv_header_stdc=disable
8703
8704
8705 if test $ol_cv_header_stdc != yes; then
8706         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8707 fi
8708
8709 ac_header_dirent=no
8710 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8711 do
8712 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8713 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8714 echo "configure:8715: checking for $ac_hdr that defines DIR" >&5
8715 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8716   echo $ac_n "(cached) $ac_c" 1>&6
8717 else
8718   cat > conftest.$ac_ext <<EOF
8719 #line 8720 "configure"
8720 #include "confdefs.h"
8721 #include <sys/types.h>
8722 #include <$ac_hdr>
8723 int main() {
8724 DIR *dirp = 0;
8725 ; return 0; }
8726 EOF
8727 if { (eval echo configure:8728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8728   rm -rf conftest*
8729   eval "ac_cv_header_dirent_$ac_safe=yes"
8730 else
8731   echo "configure: failed program was:" >&5
8732   cat conftest.$ac_ext >&5
8733   rm -rf conftest*
8734   eval "ac_cv_header_dirent_$ac_safe=no"
8735 fi
8736 rm -f conftest*
8737 fi
8738 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8739   echo "$ac_t""yes" 1>&6
8740     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8741   cat >> confdefs.h <<EOF
8742 #define $ac_tr_hdr 1
8743 EOF
8744  ac_header_dirent=$ac_hdr; break
8745 else
8746   echo "$ac_t""no" 1>&6
8747 fi
8748 done
8749 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8750 if test $ac_header_dirent = dirent.h; then
8751 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8752 echo "configure:8753: checking for opendir in -ldir" >&5
8753 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8754 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8755   echo $ac_n "(cached) $ac_c" 1>&6
8756 else
8757   ac_save_LIBS="$LIBS"
8758 LIBS="-ldir  $LIBS"
8759 cat > conftest.$ac_ext <<EOF
8760 #line 8761 "configure"
8761 #include "confdefs.h"
8762 /* Override any gcc2 internal prototype to avoid an error.  */
8763 /* We use char because int might match the return type of a gcc2
8764     builtin and then its argument prototype would still apply.  */
8765 char opendir();
8766
8767 int main() {
8768 opendir()
8769 ; return 0; }
8770 EOF
8771 if { (eval echo configure:8772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8772   rm -rf conftest*
8773   eval "ac_cv_lib_$ac_lib_var=yes"
8774 else
8775   echo "configure: failed program was:" >&5
8776   cat conftest.$ac_ext >&5
8777   rm -rf conftest*
8778   eval "ac_cv_lib_$ac_lib_var=no"
8779 fi
8780 rm -f conftest*
8781 LIBS="$ac_save_LIBS"
8782
8783 fi
8784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8785   echo "$ac_t""yes" 1>&6
8786   LIBS="$LIBS -ldir"
8787 else
8788   echo "$ac_t""no" 1>&6
8789 fi
8790
8791 else
8792 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8793 echo "configure:8794: checking for opendir in -lx" >&5
8794 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8796   echo $ac_n "(cached) $ac_c" 1>&6
8797 else
8798   ac_save_LIBS="$LIBS"
8799 LIBS="-lx  $LIBS"
8800 cat > conftest.$ac_ext <<EOF
8801 #line 8802 "configure"
8802 #include "confdefs.h"
8803 /* Override any gcc2 internal prototype to avoid an error.  */
8804 /* We use char because int might match the return type of a gcc2
8805     builtin and then its argument prototype would still apply.  */
8806 char opendir();
8807
8808 int main() {
8809 opendir()
8810 ; return 0; }
8811 EOF
8812 if { (eval echo configure:8813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8813   rm -rf conftest*
8814   eval "ac_cv_lib_$ac_lib_var=yes"
8815 else
8816   echo "configure: failed program was:" >&5
8817   cat conftest.$ac_ext >&5
8818   rm -rf conftest*
8819   eval "ac_cv_lib_$ac_lib_var=no"
8820 fi
8821 rm -f conftest*
8822 LIBS="$ac_save_LIBS"
8823
8824 fi
8825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8826   echo "$ac_t""yes" 1>&6
8827   LIBS="$LIBS -lx"
8828 else
8829   echo "$ac_t""no" 1>&6
8830 fi
8831
8832 fi
8833
8834 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8835 echo "configure:8836: checking for sys/wait.h that is POSIX.1 compatible" >&5
8836 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8837   echo $ac_n "(cached) $ac_c" 1>&6
8838 else
8839   cat > conftest.$ac_ext <<EOF
8840 #line 8841 "configure"
8841 #include "confdefs.h"
8842 #include <sys/types.h>
8843 #include <sys/wait.h>
8844 #ifndef WEXITSTATUS
8845 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8846 #endif
8847 #ifndef WIFEXITED
8848 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8849 #endif
8850 int main() {
8851 int s;
8852 wait (&s);
8853 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8854 ; return 0; }
8855 EOF
8856 if { (eval echo configure:8857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8857   rm -rf conftest*
8858   ac_cv_header_sys_wait_h=yes
8859 else
8860   echo "configure: failed program was:" >&5
8861   cat conftest.$ac_ext >&5
8862   rm -rf conftest*
8863   ac_cv_header_sys_wait_h=no
8864 fi
8865 rm -f conftest*
8866 fi
8867
8868 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8869 if test $ac_cv_header_sys_wait_h = yes; then
8870   cat >> confdefs.h <<\EOF
8871 #define HAVE_SYS_WAIT_H 1
8872 EOF
8873
8874 fi
8875
8876 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8877 echo "configure:8878: checking POSIX termios" >&5
8878 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8879   echo $ac_n "(cached) $ac_c" 1>&6
8880 else
8881   cat > conftest.$ac_ext <<EOF
8882 #line 8883 "configure"
8883 #include "confdefs.h"
8884 #include <sys/types.h>
8885 #include <unistd.h>
8886 #include <termios.h>
8887 int main() {
8888 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8889    tcgetattr(0, 0);
8890 ; return 0; }
8891 EOF
8892 if { (eval echo configure:8893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8893   rm -rf conftest*
8894   am_cv_sys_posix_termios=yes
8895 else
8896   echo "configure: failed program was:" >&5
8897   cat conftest.$ac_ext >&5
8898   rm -rf conftest*
8899   am_cv_sys_posix_termios=no
8900 fi
8901 rm -f conftest*
8902 fi
8903
8904 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8905
8906
8907  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8908 echo "configure:8909: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8909 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8910   echo $ac_n "(cached) $ac_c" 1>&6
8911 else
8912   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8913
8914   gwinsz_in_termios_h=no
8915   if test $am_cv_sys_posix_termios = yes; then
8916     cat > conftest.$ac_ext <<EOF
8917 #line 8918 "configure"
8918 #include "confdefs.h"
8919 #include <sys/types.h>
8920 #     include <termios.h>
8921 #     ifdef TIOCGWINSZ
8922         yes
8923 #     endif
8924     
8925 EOF
8926 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8927   egrep "yes" >/dev/null 2>&1; then
8928   rm -rf conftest*
8929   gwinsz_in_termios_h=yes
8930 fi
8931 rm -f conftest*
8932
8933   fi
8934
8935   if test $gwinsz_in_termios_h = no; then
8936     cat > conftest.$ac_ext <<EOF
8937 #line 8938 "configure"
8938 #include "confdefs.h"
8939 #include <sys/types.h>
8940 #     include <sys/ioctl.h>
8941 #     ifdef TIOCGWINSZ
8942         yes
8943 #     endif
8944     
8945 EOF
8946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8947   egrep "yes" >/dev/null 2>&1; then
8948   rm -rf conftest*
8949   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8950 fi
8951 rm -f conftest*
8952
8953   fi
8954   
8955 fi
8956
8957 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8958   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8959     cat >> confdefs.h <<\EOF
8960 #define GWINSZ_IN_SYS_IOCTL 1
8961 EOF
8962
8963   fi
8964
8965 if test $am_cv_sys_posix_termios = yes ; then
8966         cat >> confdefs.h <<\EOF
8967 #define HAVE_POSIX_TERMIOS 1
8968 EOF
8969
8970 fi
8971
8972 for ac_hdr in \
8973         arpa/inet.h             \
8974         arpa/nameser.h  \
8975         assert.h                \
8976         bits/types.h    \
8977         conio.h                 \
8978         crypt.h                 \
8979         direct.h                \
8980         errno.h                 \
8981         fcntl.h                 \
8982         filio.h                 \
8983         getopt.h                \
8984         grp.h                   \
8985         io.h                    \
8986         libutil.h               \
8987         limits.h                \
8988         locale.h                \
8989         netinet/tcp.h   \
8990         malloc.h                \
8991         memory.h                \
8992         psap.h                  \
8993         pwd.h                   \
8994         process.h               \
8995         resolv.h                \
8996         sgtty.h                 \
8997         shadow.h                \
8998         stddef.h                \
8999         string.h                \
9000         strings.h               \
9001         sysexits.h              \
9002         sys/file.h              \
9003         sys/filio.h             \
9004         sys/errno.h             \
9005         sys/ioctl.h             \
9006         sys/param.h             \
9007         sys/resource.h  \
9008         sys/select.h    \
9009         sys/socket.h    \
9010         sys/stat.h              \
9011         sys/syslog.h    \
9012         sys/time.h              \
9013         sys/types.h             \
9014         sys/ucred.h             \
9015         sys/uio.h               \
9016         syslog.h                \
9017         termios.h               \
9018         unistd.h                \
9019         winsock.h               \
9020         winsock2.h              \
9021
9022 do
9023 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9024 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9025 echo "configure:9026: checking for $ac_hdr" >&5
9026 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9027   echo $ac_n "(cached) $ac_c" 1>&6
9028 else
9029   cat > conftest.$ac_ext <<EOF
9030 #line 9031 "configure"
9031 #include "confdefs.h"
9032 #include <$ac_hdr>
9033 EOF
9034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9035 { (eval echo configure:9036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9037 if test -z "$ac_err"; then
9038   rm -rf conftest*
9039   eval "ac_cv_header_$ac_safe=yes"
9040 else
9041   echo "$ac_err" >&5
9042   echo "configure: failed program was:" >&5
9043   cat conftest.$ac_ext >&5
9044   rm -rf conftest*
9045   eval "ac_cv_header_$ac_safe=no"
9046 fi
9047 rm -f conftest*
9048 fi
9049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9050   echo "$ac_t""yes" 1>&6
9051     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9052   cat >> confdefs.h <<EOF
9053 #define $ac_tr_hdr 1
9054 EOF
9055  
9056 else
9057   echo "$ac_t""no" 1>&6
9058 fi
9059 done
9060
9061
9062
9063
9064 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9065 echo "configure:9066: checking for sigset in -lV3" >&5
9066 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9067 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9068   echo $ac_n "(cached) $ac_c" 1>&6
9069 else
9070   ac_save_LIBS="$LIBS"
9071 LIBS="-lV3  $LIBS"
9072 cat > conftest.$ac_ext <<EOF
9073 #line 9074 "configure"
9074 #include "confdefs.h"
9075 /* Override any gcc2 internal prototype to avoid an error.  */
9076 /* We use char because int might match the return type of a gcc2
9077     builtin and then its argument prototype would still apply.  */
9078 char sigset();
9079
9080 int main() {
9081 sigset()
9082 ; return 0; }
9083 EOF
9084 if { (eval echo configure:9085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9085   rm -rf conftest*
9086   eval "ac_cv_lib_$ac_lib_var=yes"
9087 else
9088   echo "configure: failed program was:" >&5
9089   cat conftest.$ac_ext >&5
9090   rm -rf conftest*
9091   eval "ac_cv_lib_$ac_lib_var=no"
9092 fi
9093 rm -f conftest*
9094 LIBS="$ac_save_LIBS"
9095
9096 fi
9097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9098   echo "$ac_t""yes" 1>&6
9099     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9100     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9101   cat >> confdefs.h <<EOF
9102 #define $ac_tr_lib 1
9103 EOF
9104
9105   LIBS="-lV3 $LIBS"
9106
9107 else
9108   echo "$ac_t""no" 1>&6
9109 fi
9110
9111
9112 if test "$ac_cv_header_winsock_h" = yes; then
9113 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9114 echo "configure:9115: checking for winsock" >&5
9115 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9116   echo $ac_n "(cached) $ac_c" 1>&6
9117 else
9118   save_LIBS="$LIBS"
9119 for curlib in ws2_32 wsock32; do
9120         LIBS="$LIBS -l$curlib"
9121         cat > conftest.$ac_ext <<EOF
9122 #line 9123 "configure"
9123 #include "confdefs.h"
9124 #include <winsock.h>
9125                         
9126 int main() {
9127
9128                         socket(0,0,0);
9129                         select(0,NULL,NULL,NULL,NULL);
9130                         closesocket(0);
9131                         gethostname(NULL,0);
9132                         
9133 ; return 0; }
9134 EOF
9135 if { (eval echo configure:9136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9136   rm -rf conftest*
9137   ol_cv_winsock=yes
9138 else
9139   echo "configure: failed program was:" >&5
9140   cat conftest.$ac_ext >&5
9141   rm -rf conftest*
9142   ol_cv_winsock=no
9143 fi
9144 rm -f conftest*
9145
9146         if test $ol_cv_winsock = yes; then
9147                 cat >> confdefs.h <<\EOF
9148 #define HAVE_WINSOCK 1
9149 EOF
9150
9151                 ac_cv_func_socket=yes
9152                 ac_cv_func_select=yes
9153                 ac_cv_func_closesocket=yes
9154                 ac_cv_func_gethostname=yes
9155                 if test $curlib = ws2_32; then
9156                         ol_cv_winsock=winsock2
9157                         cat >> confdefs.h <<\EOF
9158 #define HAVE_WINSOCK2 1
9159 EOF
9160
9161                 fi
9162                 break
9163         fi
9164         LIBS="$save_LIBS"
9165 done
9166 fi
9167
9168 echo "$ac_t""$ol_cv_winsock" 1>&6
9169 fi
9170
9171
9172 echo $ac_n "checking for socket""... $ac_c" 1>&6
9173 echo "configure:9174: checking for socket" >&5
9174 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9175   echo $ac_n "(cached) $ac_c" 1>&6
9176 else
9177   cat > conftest.$ac_ext <<EOF
9178 #line 9179 "configure"
9179 #include "confdefs.h"
9180 /* System header to define __stub macros and hopefully few prototypes,
9181     which can conflict with char socket(); below.  */
9182 #include <assert.h>
9183 /* Override any gcc2 internal prototype to avoid an error.  */
9184 /* We use char because int might match the return type of a gcc2
9185     builtin and then its argument prototype would still apply.  */
9186 char socket();
9187 char (*f)();
9188
9189 int main() {
9190
9191 /* The GNU C library defines this for functions which it implements
9192     to always fail with ENOSYS.  Some functions are actually named
9193     something starting with __ and the normal name is an alias.  */
9194 #if defined (__stub_socket) || defined (__stub___socket)
9195 choke me
9196 #else
9197 f = socket;
9198 #endif
9199
9200 ; return 0; }
9201 EOF
9202 if { (eval echo configure:9203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9203   rm -rf conftest*
9204   eval "ac_cv_func_socket=yes"
9205 else
9206   echo "configure: failed program was:" >&5
9207   cat conftest.$ac_ext >&5
9208   rm -rf conftest*
9209   eval "ac_cv_func_socket=no"
9210 fi
9211 rm -f conftest*
9212 fi
9213
9214 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9215   echo "$ac_t""yes" 1>&6
9216   :
9217 else
9218   echo "$ac_t""no" 1>&6
9219         
9220         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9221 echo "configure:9222: checking for main in -lsocket" >&5
9222 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9224   echo $ac_n "(cached) $ac_c" 1>&6
9225 else
9226   ac_save_LIBS="$LIBS"
9227 LIBS="-lsocket  $LIBS"
9228 cat > conftest.$ac_ext <<EOF
9229 #line 9230 "configure"
9230 #include "confdefs.h"
9231
9232 int main() {
9233 main()
9234 ; return 0; }
9235 EOF
9236 if { (eval echo configure:9237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9237   rm -rf conftest*
9238   eval "ac_cv_lib_$ac_lib_var=yes"
9239 else
9240   echo "configure: failed program was:" >&5
9241   cat conftest.$ac_ext >&5
9242   rm -rf conftest*
9243   eval "ac_cv_lib_$ac_lib_var=no"
9244 fi
9245 rm -f conftest*
9246 LIBS="$ac_save_LIBS"
9247
9248 fi
9249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9250   echo "$ac_t""yes" 1>&6
9251     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9252     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9253   cat >> confdefs.h <<EOF
9254 #define $ac_tr_lib 1
9255 EOF
9256
9257   LIBS="-lsocket $LIBS"
9258
9259 else
9260   echo "$ac_t""no" 1>&6
9261 fi
9262
9263         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9264 echo "configure:9265: checking for main in -lnet" >&5
9265 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9266 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9267   echo $ac_n "(cached) $ac_c" 1>&6
9268 else
9269   ac_save_LIBS="$LIBS"
9270 LIBS="-lnet  $LIBS"
9271 cat > conftest.$ac_ext <<EOF
9272 #line 9273 "configure"
9273 #include "confdefs.h"
9274
9275 int main() {
9276 main()
9277 ; return 0; }
9278 EOF
9279 if { (eval echo configure:9280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9280   rm -rf conftest*
9281   eval "ac_cv_lib_$ac_lib_var=yes"
9282 else
9283   echo "configure: failed program was:" >&5
9284   cat conftest.$ac_ext >&5
9285   rm -rf conftest*
9286   eval "ac_cv_lib_$ac_lib_var=no"
9287 fi
9288 rm -f conftest*
9289 LIBS="$ac_save_LIBS"
9290
9291 fi
9292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9293   echo "$ac_t""yes" 1>&6
9294     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9295     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9296   cat >> confdefs.h <<EOF
9297 #define $ac_tr_lib 1
9298 EOF
9299
9300   LIBS="-lnet $LIBS"
9301
9302 else
9303   echo "$ac_t""no" 1>&6
9304 fi
9305
9306         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9307 echo "configure:9308: checking for main in -lnsl_s" >&5
9308 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9309 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9310   echo $ac_n "(cached) $ac_c" 1>&6
9311 else
9312   ac_save_LIBS="$LIBS"
9313 LIBS="-lnsl_s  $LIBS"
9314 cat > conftest.$ac_ext <<EOF
9315 #line 9316 "configure"
9316 #include "confdefs.h"
9317
9318 int main() {
9319 main()
9320 ; return 0; }
9321 EOF
9322 if { (eval echo configure:9323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9323   rm -rf conftest*
9324   eval "ac_cv_lib_$ac_lib_var=yes"
9325 else
9326   echo "configure: failed program was:" >&5
9327   cat conftest.$ac_ext >&5
9328   rm -rf conftest*
9329   eval "ac_cv_lib_$ac_lib_var=no"
9330 fi
9331 rm -f conftest*
9332 LIBS="$ac_save_LIBS"
9333
9334 fi
9335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9336   echo "$ac_t""yes" 1>&6
9337     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9338     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9339   cat >> confdefs.h <<EOF
9340 #define $ac_tr_lib 1
9341 EOF
9342
9343   LIBS="-lnsl_s $LIBS"
9344
9345 else
9346   echo "$ac_t""no" 1>&6
9347 fi
9348
9349         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9350 echo "configure:9351: checking for main in -lnsl" >&5
9351 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9352 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9353   echo $ac_n "(cached) $ac_c" 1>&6
9354 else
9355   ac_save_LIBS="$LIBS"
9356 LIBS="-lnsl  $LIBS"
9357 cat > conftest.$ac_ext <<EOF
9358 #line 9359 "configure"
9359 #include "confdefs.h"
9360
9361 int main() {
9362 main()
9363 ; return 0; }
9364 EOF
9365 if { (eval echo configure:9366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9366   rm -rf conftest*
9367   eval "ac_cv_lib_$ac_lib_var=yes"
9368 else
9369   echo "configure: failed program was:" >&5
9370   cat conftest.$ac_ext >&5
9371   rm -rf conftest*
9372   eval "ac_cv_lib_$ac_lib_var=no"
9373 fi
9374 rm -f conftest*
9375 LIBS="$ac_save_LIBS"
9376
9377 fi
9378 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9379   echo "$ac_t""yes" 1>&6
9380     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9381     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9382   cat >> confdefs.h <<EOF
9383 #define $ac_tr_lib 1
9384 EOF
9385
9386   LIBS="-lnsl $LIBS"
9387
9388 else
9389   echo "$ac_t""no" 1>&6
9390 fi
9391
9392         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9393 echo "configure:9394: checking for socket in -linet" >&5
9394 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9395 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9396   echo $ac_n "(cached) $ac_c" 1>&6
9397 else
9398   ac_save_LIBS="$LIBS"
9399 LIBS="-linet  $LIBS"
9400 cat > conftest.$ac_ext <<EOF
9401 #line 9402 "configure"
9402 #include "confdefs.h"
9403 /* Override any gcc2 internal prototype to avoid an error.  */
9404 /* We use char because int might match the return type of a gcc2
9405     builtin and then its argument prototype would still apply.  */
9406 char socket();
9407
9408 int main() {
9409 socket()
9410 ; return 0; }
9411 EOF
9412 if { (eval echo configure:9413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9413   rm -rf conftest*
9414   eval "ac_cv_lib_$ac_lib_var=yes"
9415 else
9416   echo "configure: failed program was:" >&5
9417   cat conftest.$ac_ext >&5
9418   rm -rf conftest*
9419   eval "ac_cv_lib_$ac_lib_var=no"
9420 fi
9421 rm -f conftest*
9422 LIBS="$ac_save_LIBS"
9423
9424 fi
9425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9426   echo "$ac_t""yes" 1>&6
9427     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9428     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9429   cat >> confdefs.h <<EOF
9430 #define $ac_tr_lib 1
9431 EOF
9432
9433   LIBS="-linet $LIBS"
9434
9435 else
9436   echo "$ac_t""no" 1>&6
9437 fi
9438
9439         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9440 echo "configure:9441: checking for main in -lgen" >&5
9441 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9442 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9443   echo $ac_n "(cached) $ac_c" 1>&6
9444 else
9445   ac_save_LIBS="$LIBS"
9446 LIBS="-lgen  $LIBS"
9447 cat > conftest.$ac_ext <<EOF
9448 #line 9449 "configure"
9449 #include "confdefs.h"
9450
9451 int main() {
9452 main()
9453 ; return 0; }
9454 EOF
9455 if { (eval echo configure:9456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9456   rm -rf conftest*
9457   eval "ac_cv_lib_$ac_lib_var=yes"
9458 else
9459   echo "configure: failed program was:" >&5
9460   cat conftest.$ac_ext >&5
9461   rm -rf conftest*
9462   eval "ac_cv_lib_$ac_lib_var=no"
9463 fi
9464 rm -f conftest*
9465 LIBS="$ac_save_LIBS"
9466
9467 fi
9468 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9469   echo "$ac_t""yes" 1>&6
9470     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9471     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9472   cat >> confdefs.h <<EOF
9473 #define $ac_tr_lib 1
9474 EOF
9475
9476   LIBS="-lgen $LIBS"
9477
9478 else
9479   echo "$ac_t""no" 1>&6
9480 fi
9481
9482
9483 fi
9484
9485
9486 echo $ac_n "checking for select""... $ac_c" 1>&6
9487 echo "configure:9488: checking for select" >&5
9488 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9489   echo $ac_n "(cached) $ac_c" 1>&6
9490 else
9491   cat > conftest.$ac_ext <<EOF
9492 #line 9493 "configure"
9493 #include "confdefs.h"
9494 /* System header to define __stub macros and hopefully few prototypes,
9495     which can conflict with char select(); below.  */
9496 #include <assert.h>
9497 /* Override any gcc2 internal prototype to avoid an error.  */
9498 /* We use char because int might match the return type of a gcc2
9499     builtin and then its argument prototype would still apply.  */
9500 char select();
9501 char (*f)();
9502
9503 int main() {
9504
9505 /* The GNU C library defines this for functions which it implements
9506     to always fail with ENOSYS.  Some functions are actually named
9507     something starting with __ and the normal name is an alias.  */
9508 #if defined (__stub_select) || defined (__stub___select)
9509 choke me
9510 #else
9511 f = select;
9512 #endif
9513
9514 ; return 0; }
9515 EOF
9516 if { (eval echo configure:9517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9517   rm -rf conftest*
9518   eval "ac_cv_func_select=yes"
9519 else
9520   echo "configure: failed program was:" >&5
9521   cat conftest.$ac_ext >&5
9522   rm -rf conftest*
9523   eval "ac_cv_func_select=no"
9524 fi
9525 rm -f conftest*
9526 fi
9527
9528 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9529   echo "$ac_t""yes" 1>&6
9530   :
9531 else
9532   echo "$ac_t""no" 1>&6
9533 { echo "configure: error: select() required." 1>&2; exit 1; }
9534 fi
9535
9536
9537 if test "${ac_cv_header_winsock_h}" != yes; then
9538                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9539 echo "configure:9540: checking types of arguments for select()" >&5
9540  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9541   echo $ac_n "(cached) $ac_c" 1>&6
9542 else
9543    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9544   echo $ac_n "(cached) $ac_c" 1>&6
9545 else
9546     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9547   echo $ac_n "(cached) $ac_c" 1>&6
9548 else
9549      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9550      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9551       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9552        cat > conftest.$ac_ext <<EOF
9553 #line 9554 "configure"
9554 #include "confdefs.h"
9555 #ifdef HAVE_SYS_TYPES_H
9556 #include <sys/types.h>
9557 #endif
9558 #ifdef HAVE_SYS_TIME_H
9559 #include <sys/time.h>
9560 #endif
9561 #ifdef HAVE_SYS_SELECT_H
9562 #include <sys/select.h>
9563 #endif
9564 #ifdef HAVE_SYS_SOCKET_H
9565 #include <sys/socket.h>
9566 #endif
9567 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);
9568 int main() {
9569
9570 ; return 0; }
9571 EOF
9572 if { (eval echo configure:9573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9573   rm -rf conftest*
9574           ac_not_found=no ; break 3
9575 else
9576   echo "configure: failed program was:" >&5
9577   cat conftest.$ac_ext >&5
9578   rm -rf conftest*
9579   ac_not_found=yes
9580 fi
9581 rm -f conftest*
9582       done
9583      done
9584     done
9585    
9586 fi
9587   
9588 fi
9589  
9590 fi
9591  if test "$ac_not_found" = yes; then
9592   ac_cv_func_select_arg1=int 
9593   ac_cv_func_select_arg234='int *' 
9594   ac_cv_func_select_arg5='struct timeval *'
9595  fi
9596  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9597  cat >> confdefs.h <<EOF
9598 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9599 EOF
9600
9601  cat >> confdefs.h <<EOF
9602 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9603 EOF
9604
9605  cat >> confdefs.h <<EOF
9606 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9607 EOF
9608
9609
9610 fi
9611
9612
9613 for ac_hdr in regex.h 
9614 do
9615 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9616 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9617 echo "configure:9618: checking for $ac_hdr" >&5
9618 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9619   echo $ac_n "(cached) $ac_c" 1>&6
9620 else
9621   cat > conftest.$ac_ext <<EOF
9622 #line 9623 "configure"
9623 #include "confdefs.h"
9624 #include <$ac_hdr>
9625 EOF
9626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9627 { (eval echo configure:9628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9629 if test -z "$ac_err"; then
9630   rm -rf conftest*
9631   eval "ac_cv_header_$ac_safe=yes"
9632 else
9633   echo "$ac_err" >&5
9634   echo "configure: failed program was:" >&5
9635   cat conftest.$ac_ext >&5
9636   rm -rf conftest*
9637   eval "ac_cv_header_$ac_safe=no"
9638 fi
9639 rm -f conftest*
9640 fi
9641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9642   echo "$ac_t""yes" 1>&6
9643     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9644   cat >> confdefs.h <<EOF
9645 #define $ac_tr_hdr 1
9646 EOF
9647  
9648 else
9649   echo "$ac_t""no" 1>&6
9650 fi
9651 done
9652
9653 if test "$ac_cv_header_regex_h" != yes ; then
9654         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9655 fi
9656
9657 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9658 echo "configure:9659: checking for library containing regfree" >&5
9659 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9660   echo $ac_n "(cached) $ac_c" 1>&6
9661 else
9662   ac_func_search_save_LIBS="$LIBS"
9663 ac_cv_search_regfree="no"
9664 cat > conftest.$ac_ext <<EOF
9665 #line 9666 "configure"
9666 #include "confdefs.h"
9667 /* Override any gcc2 internal prototype to avoid an error.  */
9668 /* We use char because int might match the return type of a gcc2
9669     builtin and then its argument prototype would still apply.  */
9670 char regfree();
9671
9672 int main() {
9673 regfree()
9674 ; return 0; }
9675 EOF
9676 if { (eval echo configure:9677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9677   rm -rf conftest*
9678   ac_cv_search_regfree="none required"
9679 else
9680   echo "configure: failed program was:" >&5
9681   cat conftest.$ac_ext >&5
9682 fi
9683 rm -f conftest*
9684 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9685 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9686 cat > conftest.$ac_ext <<EOF
9687 #line 9688 "configure"
9688 #include "confdefs.h"
9689 /* Override any gcc2 internal prototype to avoid an error.  */
9690 /* We use char because int might match the return type of a gcc2
9691     builtin and then its argument prototype would still apply.  */
9692 char regfree();
9693
9694 int main() {
9695 regfree()
9696 ; return 0; }
9697 EOF
9698 if { (eval echo configure:9699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9699   rm -rf conftest*
9700   ac_cv_search_regfree="-l$ac_lib"
9701 break
9702 else
9703   echo "configure: failed program was:" >&5
9704   cat conftest.$ac_ext >&5
9705 fi
9706 rm -f conftest*
9707 done
9708 LIBS="$ac_func_search_save_LIBS"
9709 fi
9710
9711 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9712 if test "$ac_cv_search_regfree" != "no"; then
9713   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9714   :
9715 else :
9716   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9717 fi
9718
9719
9720 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9721 echo "configure:9722: checking for compatible POSIX regex" >&5
9722 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9723   echo $ac_n "(cached) $ac_c" 1>&6
9724 else
9725   
9726         if test "$cross_compiling" = yes; then
9727   ol_cv_c_posix_regex=cross
9728 else
9729   cat > conftest.$ac_ext <<EOF
9730 #line 9731 "configure"
9731 #include "confdefs.h"
9732
9733 #include <sys/types.h>
9734 #include <regex.h>
9735 static char *pattern, *string;
9736 main()
9737 {
9738         int rc;
9739         regex_t re;
9740
9741         pattern = "^A";
9742
9743         if(regcomp(&re, pattern, 0)) {
9744                 return -1;
9745         }
9746         
9747         string = "ALL MATCH";
9748         
9749         rc = regexec(&re, string, 0, (void*)0, 0);
9750
9751         regfree(&re);
9752
9753         return rc;
9754 }
9755 EOF
9756 if { (eval echo configure:9757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9757 then
9758   ol_cv_c_posix_regex=yes
9759 else
9760   echo "configure: failed program was:" >&5
9761   cat conftest.$ac_ext >&5
9762   rm -fr conftest*
9763   ol_cv_c_posix_regex=no
9764 fi
9765 rm -fr conftest*
9766 fi
9767
9768 fi
9769
9770 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9771
9772 if test "$ol_cv_c_posix_regex" = no ; then
9773         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9774 fi
9775
9776
9777 have_uuid=no
9778 for ac_hdr in sys/uuid.h
9779 do
9780 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9781 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9782 echo "configure:9783: checking for $ac_hdr" >&5
9783 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9784   echo $ac_n "(cached) $ac_c" 1>&6
9785 else
9786   cat > conftest.$ac_ext <<EOF
9787 #line 9788 "configure"
9788 #include "confdefs.h"
9789 #include <$ac_hdr>
9790 EOF
9791 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9792 { (eval echo configure:9793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9793 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9794 if test -z "$ac_err"; then
9795   rm -rf conftest*
9796   eval "ac_cv_header_$ac_safe=yes"
9797 else
9798   echo "$ac_err" >&5
9799   echo "configure: failed program was:" >&5
9800   cat conftest.$ac_ext >&5
9801   rm -rf conftest*
9802   eval "ac_cv_header_$ac_safe=no"
9803 fi
9804 rm -f conftest*
9805 fi
9806 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9807   echo "$ac_t""yes" 1>&6
9808     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9809   cat >> confdefs.h <<EOF
9810 #define $ac_tr_hdr 1
9811 EOF
9812  
9813 else
9814   echo "$ac_t""no" 1>&6
9815 fi
9816 done
9817
9818 if test $ac_cv_header_sys_uuid_h = yes ; then
9819         save_LIBS="$LIBS"
9820         
9821 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9822 echo "configure:9823: checking for library containing uuid_to_str" >&5
9823 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9824   echo $ac_n "(cached) $ac_c" 1>&6
9825 else
9826   ac_func_search_save_LIBS="$LIBS"
9827 ac_cv_search_uuid_to_str="no"
9828 cat > conftest.$ac_ext <<EOF
9829 #line 9830 "configure"
9830 #include "confdefs.h"
9831 /* Override any gcc2 internal prototype to avoid an error.  */
9832 /* We use char because int might match the return type of a gcc2
9833     builtin and then its argument prototype would still apply.  */
9834 char uuid_to_str();
9835
9836 int main() {
9837 uuid_to_str()
9838 ; return 0; }
9839 EOF
9840 if { (eval echo configure:9841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9841   rm -rf conftest*
9842   ac_cv_search_uuid_to_str="none required"
9843 else
9844   echo "configure: failed program was:" >&5
9845   cat conftest.$ac_ext >&5
9846 fi
9847 rm -f conftest*
9848 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9849 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9850 cat > conftest.$ac_ext <<EOF
9851 #line 9852 "configure"
9852 #include "confdefs.h"
9853 /* Override any gcc2 internal prototype to avoid an error.  */
9854 /* We use char because int might match the return type of a gcc2
9855     builtin and then its argument prototype would still apply.  */
9856 char uuid_to_str();
9857
9858 int main() {
9859 uuid_to_str()
9860 ; return 0; }
9861 EOF
9862 if { (eval echo configure:9863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9863   rm -rf conftest*
9864   ac_cv_search_uuid_to_str="-l$ac_lib"
9865 break
9866 else
9867   echo "configure: failed program was:" >&5
9868   cat conftest.$ac_ext >&5
9869 fi
9870 rm -f conftest*
9871 done
9872 LIBS="$ac_func_search_save_LIBS"
9873 fi
9874
9875 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9876 if test "$ac_cv_search_uuid_to_str" != "no"; then
9877   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9878   have_uuid=yes
9879 else :
9880   :
9881 fi
9882         LIBS="$save_LIBS"
9883
9884         if test have_uuid = yes ; then
9885                 cat >> confdefs.h <<\EOF
9886 #define HAVE_UUID_TO_STR 1
9887 EOF
9888
9889
9890                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9891                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9892         fi
9893 fi
9894
9895 if test $have_uuid = no ; then
9896         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9897 echo "configure:9898: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9898         save_LIBS="$LIBS"
9899         LIBS="$LIBS -lrpcrt4"
9900         cat > conftest.$ac_ext <<EOF
9901 #line 9902 "configure"
9902 #include "confdefs.h"
9903
9904                 int __stdcall UuidCreate(void *);
9905                 int __stdcall UuidToStringA(void *,void **);
9906                 
9907 int main() {
9908
9909                 UuidCreate(0);
9910                 UuidToStringA(0,0);
9911                 
9912 ; return 0; }
9913 EOF
9914 if { (eval echo configure:9915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9915   rm -rf conftest*
9916   need_rpcrt=yes
9917 else
9918   echo "configure: failed program was:" >&5
9919   cat conftest.$ac_ext >&5
9920   rm -rf conftest*
9921   need_rpcrt=no
9922 fi
9923 rm -f conftest*
9924         if test $need_rpcrt = yes; then
9925                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9926         fi
9927         LIBS="$save_LIBS"
9928         echo "$ac_t""$need_rpcrt" 1>&6
9929 fi
9930
9931 ol_link_dnssrv=no
9932 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9933 echo "configure:9934: checking for res_query" >&5
9934 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9935   echo $ac_n "(cached) $ac_c" 1>&6
9936 else
9937   cat > conftest.$ac_ext <<EOF
9938 #line 9939 "configure"
9939 #include "confdefs.h"
9940 /* System header to define __stub macros and hopefully few prototypes,
9941     which can conflict with char res_query(); below.  */
9942 #include <assert.h>
9943 /* Override any gcc2 internal prototype to avoid an error.  */
9944 /* We use char because int might match the return type of a gcc2
9945     builtin and then its argument prototype would still apply.  */
9946 char res_query();
9947 char (*f)();
9948
9949 int main() {
9950
9951 /* The GNU C library defines this for functions which it implements
9952     to always fail with ENOSYS.  Some functions are actually named
9953     something starting with __ and the normal name is an alias.  */
9954 #if defined (__stub_res_query) || defined (__stub___res_query)
9955 choke me
9956 #else
9957 f = res_query;
9958 #endif
9959
9960 ; return 0; }
9961 EOF
9962 if { (eval echo configure:9963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9963   rm -rf conftest*
9964   eval "ac_cv_func_res_query=yes"
9965 else
9966   echo "configure: failed program was:" >&5
9967   cat conftest.$ac_ext >&5
9968   rm -rf conftest*
9969   eval "ac_cv_func_res_query=no"
9970 fi
9971 rm -f conftest*
9972 fi
9973
9974 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9975   echo "$ac_t""yes" 1>&6
9976   :
9977 else
9978   echo "$ac_t""no" 1>&6
9979 fi
9980
9981 if test $ac_cv_func_res_query = no ; then 
9982         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9983 echo "configure:9984: checking for __res_query" >&5
9984 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9985   echo $ac_n "(cached) $ac_c" 1>&6
9986 else
9987   cat > conftest.$ac_ext <<EOF
9988 #line 9989 "configure"
9989 #include "confdefs.h"
9990 /* System header to define __stub macros and hopefully few prototypes,
9991     which can conflict with char __res_query(); below.  */
9992 #include <assert.h>
9993 /* Override any gcc2 internal prototype to avoid an error.  */
9994 /* We use char because int might match the return type of a gcc2
9995     builtin and then its argument prototype would still apply.  */
9996 char __res_query();
9997 char (*f)();
9998
9999 int main() {
10000
10001 /* The GNU C library defines this for functions which it implements
10002     to always fail with ENOSYS.  Some functions are actually named
10003     something starting with __ and the normal name is an alias.  */
10004 #if defined (__stub___res_query) || defined (__stub_____res_query)
10005 choke me
10006 #else
10007 f = __res_query;
10008 #endif
10009
10010 ; return 0; }
10011 EOF
10012 if { (eval echo configure:10013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10013   rm -rf conftest*
10014   eval "ac_cv_func___res_query=yes"
10015 else
10016   echo "configure: failed program was:" >&5
10017   cat conftest.$ac_ext >&5
10018   rm -rf conftest*
10019   eval "ac_cv_func___res_query=no"
10020 fi
10021 rm -f conftest*
10022 fi
10023
10024 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10025   echo "$ac_t""yes" 1>&6
10026   :
10027 else
10028   echo "$ac_t""no" 1>&6
10029 fi
10030
10031         ac_cv_func_res_query=$ac_cv_func___res_query
10032 fi
10033
10034 if test $ac_cv_func_res_query = no ; then 
10035         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10036 echo "configure:10037: checking for res_query in -lbind" >&5
10037 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10038 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10039   echo $ac_n "(cached) $ac_c" 1>&6
10040 else
10041   ac_save_LIBS="$LIBS"
10042 LIBS="-lbind  $LIBS"
10043 cat > conftest.$ac_ext <<EOF
10044 #line 10045 "configure"
10045 #include "confdefs.h"
10046 /* Override any gcc2 internal prototype to avoid an error.  */
10047 /* We use char because int might match the return type of a gcc2
10048     builtin and then its argument prototype would still apply.  */
10049 char res_query();
10050
10051 int main() {
10052 res_query()
10053 ; return 0; }
10054 EOF
10055 if { (eval echo configure:10056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10056   rm -rf conftest*
10057   eval "ac_cv_lib_$ac_lib_var=yes"
10058 else
10059   echo "configure: failed program was:" >&5
10060   cat conftest.$ac_ext >&5
10061   rm -rf conftest*
10062   eval "ac_cv_lib_$ac_lib_var=no"
10063 fi
10064 rm -f conftest*
10065 LIBS="$ac_save_LIBS"
10066
10067 fi
10068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10069   echo "$ac_t""yes" 1>&6
10070     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10071     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10072   cat >> confdefs.h <<EOF
10073 #define $ac_tr_lib 1
10074 EOF
10075
10076   LIBS="-lbind $LIBS"
10077
10078 else
10079   echo "$ac_t""no" 1>&6
10080 fi
10081
10082         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10083 fi
10084
10085 if test $ac_cv_func_res_query = no ; then 
10086         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10087 echo "configure:10088: checking for __res_query in -lbind" >&5
10088 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10089 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10090   echo $ac_n "(cached) $ac_c" 1>&6
10091 else
10092   ac_save_LIBS="$LIBS"
10093 LIBS="-lbind  $LIBS"
10094 cat > conftest.$ac_ext <<EOF
10095 #line 10096 "configure"
10096 #include "confdefs.h"
10097 /* Override any gcc2 internal prototype to avoid an error.  */
10098 /* We use char because int might match the return type of a gcc2
10099     builtin and then its argument prototype would still apply.  */
10100 char __res_query();
10101
10102 int main() {
10103 __res_query()
10104 ; return 0; }
10105 EOF
10106 if { (eval echo configure:10107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10107   rm -rf conftest*
10108   eval "ac_cv_lib_$ac_lib_var=yes"
10109 else
10110   echo "configure: failed program was:" >&5
10111   cat conftest.$ac_ext >&5
10112   rm -rf conftest*
10113   eval "ac_cv_lib_$ac_lib_var=no"
10114 fi
10115 rm -f conftest*
10116 LIBS="$ac_save_LIBS"
10117
10118 fi
10119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10120   echo "$ac_t""yes" 1>&6
10121     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10122     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10123   cat >> confdefs.h <<EOF
10124 #define $ac_tr_lib 1
10125 EOF
10126
10127   LIBS="-lbind $LIBS"
10128
10129 else
10130   echo "$ac_t""no" 1>&6
10131 fi
10132
10133         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10134 fi
10135
10136 if test $ac_cv_func_res_query = no ; then 
10137         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10138 echo "configure:10139: checking for res_query in -lresolv" >&5
10139 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10140 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10141   echo $ac_n "(cached) $ac_c" 1>&6
10142 else
10143   ac_save_LIBS="$LIBS"
10144 LIBS="-lresolv  $LIBS"
10145 cat > conftest.$ac_ext <<EOF
10146 #line 10147 "configure"
10147 #include "confdefs.h"
10148 /* Override any gcc2 internal prototype to avoid an error.  */
10149 /* We use char because int might match the return type of a gcc2
10150     builtin and then its argument prototype would still apply.  */
10151 char res_query();
10152
10153 int main() {
10154 res_query()
10155 ; return 0; }
10156 EOF
10157 if { (eval echo configure:10158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10158   rm -rf conftest*
10159   eval "ac_cv_lib_$ac_lib_var=yes"
10160 else
10161   echo "configure: failed program was:" >&5
10162   cat conftest.$ac_ext >&5
10163   rm -rf conftest*
10164   eval "ac_cv_lib_$ac_lib_var=no"
10165 fi
10166 rm -f conftest*
10167 LIBS="$ac_save_LIBS"
10168
10169 fi
10170 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10171   echo "$ac_t""yes" 1>&6
10172     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10173     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10174   cat >> confdefs.h <<EOF
10175 #define $ac_tr_lib 1
10176 EOF
10177
10178   LIBS="-lresolv $LIBS"
10179
10180 else
10181   echo "$ac_t""no" 1>&6
10182 fi
10183
10184         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10185 fi
10186
10187 if test $ac_cv_func_res_query = no ; then 
10188         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10189 echo "configure:10190: checking for __res_query in -lresolv" >&5
10190 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10191 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10192   echo $ac_n "(cached) $ac_c" 1>&6
10193 else
10194   ac_save_LIBS="$LIBS"
10195 LIBS="-lresolv  $LIBS"
10196 cat > conftest.$ac_ext <<EOF
10197 #line 10198 "configure"
10198 #include "confdefs.h"
10199 /* Override any gcc2 internal prototype to avoid an error.  */
10200 /* We use char because int might match the return type of a gcc2
10201     builtin and then its argument prototype would still apply.  */
10202 char __res_query();
10203
10204 int main() {
10205 __res_query()
10206 ; return 0; }
10207 EOF
10208 if { (eval echo configure:10209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10209   rm -rf conftest*
10210   eval "ac_cv_lib_$ac_lib_var=yes"
10211 else
10212   echo "configure: failed program was:" >&5
10213   cat conftest.$ac_ext >&5
10214   rm -rf conftest*
10215   eval "ac_cv_lib_$ac_lib_var=no"
10216 fi
10217 rm -f conftest*
10218 LIBS="$ac_save_LIBS"
10219
10220 fi
10221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10222   echo "$ac_t""yes" 1>&6
10223     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10224     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10225   cat >> confdefs.h <<EOF
10226 #define $ac_tr_lib 1
10227 EOF
10228
10229   LIBS="-lresolv $LIBS"
10230
10231 else
10232   echo "$ac_t""no" 1>&6
10233 fi
10234
10235         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10236 fi
10237
10238 if test "$ac_cv_func_res_query" = yes ; then
10239         cat >> confdefs.h <<\EOF
10240 #define HAVE_RES_QUERY 1
10241 EOF
10242
10243
10244         if test $ol_enable_dnssrv != no ; then
10245                 ol_link_dnssrv=yes
10246         fi
10247 fi
10248
10249 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10250         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10251 fi
10252
10253 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10254 do
10255 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10256 echo "configure:10257: checking for $ac_func" >&5
10257 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10258   echo $ac_n "(cached) $ac_c" 1>&6
10259 else
10260   cat > conftest.$ac_ext <<EOF
10261 #line 10262 "configure"
10262 #include "confdefs.h"
10263 /* System header to define __stub macros and hopefully few prototypes,
10264     which can conflict with char $ac_func(); below.  */
10265 #include <assert.h>
10266 /* Override any gcc2 internal prototype to avoid an error.  */
10267 /* We use char because int might match the return type of a gcc2
10268     builtin and then its argument prototype would still apply.  */
10269 char $ac_func();
10270 char (*f)();
10271
10272 int main() {
10273
10274 /* The GNU C library defines this for functions which it implements
10275     to always fail with ENOSYS.  Some functions are actually named
10276     something starting with __ and the normal name is an alias.  */
10277 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10278 choke me
10279 #else
10280 f = $ac_func;
10281 #endif
10282
10283 ; return 0; }
10284 EOF
10285 if { (eval echo configure:10286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10286   rm -rf conftest*
10287   eval "ac_cv_func_$ac_func=yes"
10288 else
10289   echo "configure: failed program was:" >&5
10290   cat conftest.$ac_ext >&5
10291   rm -rf conftest*
10292   eval "ac_cv_func_$ac_func=no"
10293 fi
10294 rm -f conftest*
10295 fi
10296
10297 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10298   echo "$ac_t""yes" 1>&6
10299     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10300   cat >> confdefs.h <<EOF
10301 #define $ac_tr_func 1
10302 EOF
10303  
10304 else
10305   echo "$ac_t""no" 1>&6
10306 fi
10307 done
10308
10309
10310 ol_link_ipv6=no
10311 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10312         if test $ol_enable_ipv6 = yes ; then
10313                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10314         fi
10315 elif test $ol_enable_ipv6 != no ; then
10316         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10317 echo "configure:10318: checking INET6_ADDRSTRLEN" >&5
10318 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10319   echo $ac_n "(cached) $ac_c" 1>&6
10320 else
10321   
10322                 cat > conftest.$ac_ext <<EOF
10323 #line 10324 "configure"
10324 #include "confdefs.h"
10325
10326 #                       include <netinet/in.h>
10327 #                       ifdef INET6_ADDRSTRLEN
10328                                 __has_inet6_addrstrlen__;
10329 #                       endif
10330                 
10331 EOF
10332 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10333   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10334   rm -rf conftest*
10335   ol_cv_inet6_addrstrlen=yes
10336 else
10337   rm -rf conftest*
10338   ol_cv_inet6_addrstrlen=no
10339 fi
10340 rm -f conftest*
10341
10342 fi
10343
10344 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10345
10346
10347         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10348 echo "configure:10349: checking struct sockaddr_storage" >&5
10349 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10350   echo $ac_n "(cached) $ac_c" 1>&6
10351 else
10352   
10353                 cat > conftest.$ac_ext <<EOF
10354 #line 10355 "configure"
10355 #include "confdefs.h"
10356
10357 #include <sys/types.h>
10358 #include <sys/socket.h>
10359
10360 int main() {
10361
10362                         struct sockaddr_storage ss;
10363
10364 ; return 0; }
10365 EOF
10366 if { (eval echo configure:10367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10367   rm -rf conftest*
10368   ol_cv_struct_sockaddr_storage=yes
10369 else
10370   echo "configure: failed program was:" >&5
10371   cat conftest.$ac_ext >&5
10372   rm -rf conftest*
10373   ol_cv_struct_sockaddr_storage=no
10374 fi
10375 rm -f conftest*
10376 fi
10377
10378 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10379
10380         if test $ol_cv_inet6_addrstrlen = yes \
10381                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10382                 ol_link_ipv6=yes
10383         elif test $ol_enable_ipv6 = yes \
10384                         -a $ol_cv_inet6_addrstrlen = no ; then
10385                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10386         elif test $ol_enable_ipv6 = yes \
10387                         -a $ol_cv_struct_sockaddr_storage = no ; then
10388                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10389         fi
10390 fi
10391
10392 if test $ol_enable_local != no ; then
10393         for ac_hdr in sys/un.h 
10394 do
10395 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10396 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10397 echo "configure:10398: checking for $ac_hdr" >&5
10398 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10399   echo $ac_n "(cached) $ac_c" 1>&6
10400 else
10401   cat > conftest.$ac_ext <<EOF
10402 #line 10403 "configure"
10403 #include "confdefs.h"
10404 #include <$ac_hdr>
10405 EOF
10406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10407 { (eval echo configure:10408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10409 if test -z "$ac_err"; then
10410   rm -rf conftest*
10411   eval "ac_cv_header_$ac_safe=yes"
10412 else
10413   echo "$ac_err" >&5
10414   echo "configure: failed program was:" >&5
10415   cat conftest.$ac_ext >&5
10416   rm -rf conftest*
10417   eval "ac_cv_header_$ac_safe=no"
10418 fi
10419 rm -f conftest*
10420 fi
10421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10422   echo "$ac_t""yes" 1>&6
10423     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10424   cat >> confdefs.h <<EOF
10425 #define $ac_tr_hdr 1
10426 EOF
10427  
10428 else
10429   echo "$ac_t""no" 1>&6
10430 fi
10431 done
10432
10433
10434         if test $ol_enable_local = auto ; then
10435                 ol_enable_local=$ac_cv_header_sys_un_h
10436         elif test $ac_cv_header_sys_un_h = no ; then
10437                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10438         fi
10439 fi
10440
10441 ol_link_kbind=no
10442 ol_link_kpasswd=no
10443 ol_link_krb5=no
10444 ol_link_krb4=no
10445
10446 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10447         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10448         -o $ol_with_kerberos = k425 ; then
10449
10450         for ac_hdr in krb5.h
10451 do
10452 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10453 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10454 echo "configure:10455: checking for $ac_hdr" >&5
10455 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10456   echo $ac_n "(cached) $ac_c" 1>&6
10457 else
10458   cat > conftest.$ac_ext <<EOF
10459 #line 10460 "configure"
10460 #include "confdefs.h"
10461 #include <$ac_hdr>
10462 EOF
10463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10464 { (eval echo configure:10465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10466 if test -z "$ac_err"; then
10467   rm -rf conftest*
10468   eval "ac_cv_header_$ac_safe=yes"
10469 else
10470   echo "$ac_err" >&5
10471   echo "configure: failed program was:" >&5
10472   cat conftest.$ac_ext >&5
10473   rm -rf conftest*
10474   eval "ac_cv_header_$ac_safe=no"
10475 fi
10476 rm -f conftest*
10477 fi
10478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10479   echo "$ac_t""yes" 1>&6
10480     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10481   cat >> confdefs.h <<EOF
10482 #define $ac_tr_hdr 1
10483 EOF
10484  
10485 else
10486   echo "$ac_t""no" 1>&6
10487 fi
10488 done
10489
10490
10491         if test $ac_cv_header_krb5_h = yes ; then
10492                                 for ac_hdr in heim_err.h
10493 do
10494 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10495 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10496 echo "configure:10497: checking for $ac_hdr" >&5
10497 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10498   echo $ac_n "(cached) $ac_c" 1>&6
10499 else
10500   cat > conftest.$ac_ext <<EOF
10501 #line 10502 "configure"
10502 #include "confdefs.h"
10503 #include <$ac_hdr>
10504 EOF
10505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10506 { (eval echo configure:10507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10508 if test -z "$ac_err"; then
10509   rm -rf conftest*
10510   eval "ac_cv_header_$ac_safe=yes"
10511 else
10512   echo "$ac_err" >&5
10513   echo "configure: failed program was:" >&5
10514   cat conftest.$ac_ext >&5
10515   rm -rf conftest*
10516   eval "ac_cv_header_$ac_safe=no"
10517 fi
10518 rm -f conftest*
10519 fi
10520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10521   echo "$ac_t""yes" 1>&6
10522     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10523   cat >> confdefs.h <<EOF
10524 #define $ac_tr_hdr 1
10525 EOF
10526  
10527 else
10528   echo "$ac_t""no" 1>&6
10529 fi
10530 done
10531
10532                 if test $ac_cv_header_heim_err_h = yes ; then
10533                         krb5_impl=heimdal
10534                 else
10535                         krb5_impl=mit
10536                 fi
10537
10538                 if test $krb5_impl = mit; then
10539                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10540 echo "configure:10541: checking for main in -lk5crypto" >&5
10541 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10542 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10543   echo $ac_n "(cached) $ac_c" 1>&6
10544 else
10545   ac_save_LIBS="$LIBS"
10546 LIBS="-lk5crypto  $LIBS"
10547 cat > conftest.$ac_ext <<EOF
10548 #line 10549 "configure"
10549 #include "confdefs.h"
10550
10551 int main() {
10552 main()
10553 ; return 0; }
10554 EOF
10555 if { (eval echo configure:10556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10556   rm -rf conftest*
10557   eval "ac_cv_lib_$ac_lib_var=yes"
10558 else
10559   echo "configure: failed program was:" >&5
10560   cat conftest.$ac_ext >&5
10561   rm -rf conftest*
10562   eval "ac_cv_lib_$ac_lib_var=no"
10563 fi
10564 rm -f conftest*
10565 LIBS="$ac_save_LIBS"
10566
10567 fi
10568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10569   echo "$ac_t""yes" 1>&6
10570   krb5crypto=k5crypto
10571 else
10572   echo "$ac_t""no" 1>&6
10573 krb5crypto=crypto
10574 fi
10575
10576
10577                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10578 echo "configure:10579: checking for main in -lkrb5" >&5
10579 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10580 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10581   echo $ac_n "(cached) $ac_c" 1>&6
10582 else
10583   ac_save_LIBS="$LIBS"
10584 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10585 cat > conftest.$ac_ext <<EOF
10586 #line 10587 "configure"
10587 #include "confdefs.h"
10588
10589 int main() {
10590 main()
10591 ; return 0; }
10592 EOF
10593 if { (eval echo configure:10594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10594   rm -rf conftest*
10595   eval "ac_cv_lib_$ac_lib_var=yes"
10596 else
10597   echo "configure: failed program was:" >&5
10598   cat conftest.$ac_ext >&5
10599   rm -rf conftest*
10600   eval "ac_cv_lib_$ac_lib_var=no"
10601 fi
10602 rm -f conftest*
10603 LIBS="$ac_save_LIBS"
10604
10605 fi
10606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10607   echo "$ac_t""yes" 1>&6
10608   have_krb5=yes
10609                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10610 else
10611   echo "$ac_t""no" 1>&6
10612 have_krb5=no
10613 fi
10614
10615
10616                 elif test $krb5_impl = heimdal; then
10617                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10618 echo "configure:10619: checking for main in -ldes" >&5
10619 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10620 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10621   echo $ac_n "(cached) $ac_c" 1>&6
10622 else
10623   ac_save_LIBS="$LIBS"
10624 LIBS="-ldes  $LIBS"
10625 cat > conftest.$ac_ext <<EOF
10626 #line 10627 "configure"
10627 #include "confdefs.h"
10628
10629 int main() {
10630 main()
10631 ; return 0; }
10632 EOF
10633 if { (eval echo configure:10634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10634   rm -rf conftest*
10635   eval "ac_cv_lib_$ac_lib_var=yes"
10636 else
10637   echo "configure: failed program was:" >&5
10638   cat conftest.$ac_ext >&5
10639   rm -rf conftest*
10640   eval "ac_cv_lib_$ac_lib_var=no"
10641 fi
10642 rm -f conftest*
10643 LIBS="$ac_save_LIBS"
10644
10645 fi
10646 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10647   echo "$ac_t""yes" 1>&6
10648   krb5crypto=des
10649 else
10650   echo "$ac_t""no" 1>&6
10651 krb5crypto=crypto
10652 fi
10653
10654
10655                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10656 echo "configure:10657: checking for main in -lkrb5" >&5
10657 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10658 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10659   echo $ac_n "(cached) $ac_c" 1>&6
10660 else
10661   ac_save_LIBS="$LIBS"
10662 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10663 cat > conftest.$ac_ext <<EOF
10664 #line 10665 "configure"
10665 #include "confdefs.h"
10666
10667 int main() {
10668 main()
10669 ; return 0; }
10670 EOF
10671 if { (eval echo configure:10672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10672   rm -rf conftest*
10673   eval "ac_cv_lib_$ac_lib_var=yes"
10674 else
10675   echo "configure: failed program was:" >&5
10676   cat conftest.$ac_ext >&5
10677   rm -rf conftest*
10678   eval "ac_cv_lib_$ac_lib_var=no"
10679 fi
10680 rm -f conftest*
10681 LIBS="$ac_save_LIBS"
10682
10683 fi
10684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10685   echo "$ac_t""yes" 1>&6
10686   have_krb5=yes
10687                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10688 else
10689   echo "$ac_t""no" 1>&6
10690 have_krb5=no
10691 fi
10692
10693
10694                         cat >> confdefs.h <<\EOF
10695 #define HAVE_HEIMDAL_KERBEROS 1
10696 EOF
10697
10698
10699                 else
10700                         have_krb5=no
10701                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10702                 fi
10703
10704                 if test $have_krb5 = yes ; then
10705                         ol_link_krb5=yes
10706
10707                         cat >> confdefs.h <<\EOF
10708 #define HAVE_KRB5 1
10709 EOF
10710
10711
10712                         if test $ol_enable_kpasswd != no ; then
10713                                 ol_link_kpasswd=yes;
10714                         fi
10715
10716                         if test $ol_with_kerberos = k5only ; then
10717                                 ol_with_kerberos=found
10718                         fi
10719
10720                 elif test $ol_with_kerberos != auto ; then
10721                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10722                 fi
10723
10724         fi
10725 fi
10726
10727 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10728         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10729
10730         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10731 do
10732 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10733 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10734 echo "configure:10735: checking for $ac_hdr" >&5
10735 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10736   echo $ac_n "(cached) $ac_c" 1>&6
10737 else
10738   cat > conftest.$ac_ext <<EOF
10739 #line 10740 "configure"
10740 #include "confdefs.h"
10741 #include <$ac_hdr>
10742 EOF
10743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10744 { (eval echo configure:10745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10746 if test -z "$ac_err"; then
10747   rm -rf conftest*
10748   eval "ac_cv_header_$ac_safe=yes"
10749 else
10750   echo "$ac_err" >&5
10751   echo "configure: failed program was:" >&5
10752   cat conftest.$ac_ext >&5
10753   rm -rf conftest*
10754   eval "ac_cv_header_$ac_safe=no"
10755 fi
10756 rm -f conftest*
10757 fi
10758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10759   echo "$ac_t""yes" 1>&6
10760     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10761   cat >> confdefs.h <<EOF
10762 #define $ac_tr_hdr 1
10763 EOF
10764  
10765 else
10766   echo "$ac_t""no" 1>&6
10767 fi
10768 done
10769
10770
10771         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10772                 if test $krb5_impl = mit; then
10773                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10774 echo "configure:10775: checking for main in -lkrb4" >&5
10775 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10776 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10777   echo $ac_n "(cached) $ac_c" 1>&6
10778 else
10779   ac_save_LIBS="$LIBS"
10780 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10781 cat > conftest.$ac_ext <<EOF
10782 #line 10783 "configure"
10783 #include "confdefs.h"
10784
10785 int main() {
10786 main()
10787 ; return 0; }
10788 EOF
10789 if { (eval echo configure:10790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10790   rm -rf conftest*
10791   eval "ac_cv_lib_$ac_lib_var=yes"
10792 else
10793   echo "configure: failed program was:" >&5
10794   cat conftest.$ac_ext >&5
10795   rm -rf conftest*
10796   eval "ac_cv_lib_$ac_lib_var=no"
10797 fi
10798 rm -f conftest*
10799 LIBS="$ac_save_LIBS"
10800
10801 fi
10802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10803   echo "$ac_t""yes" 1>&6
10804   have_k425=yes
10805                                 KRB4_LIBS="-lkrb4 -ldes425"
10806 else
10807   echo "$ac_t""no" 1>&6
10808 have_k425=no
10809 fi
10810
10811
10812                 elif test $krb5_impl = heimdal; then
10813                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10814 echo "configure:10815: checking for main in -lkrb4" >&5
10815 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10816 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10817   echo $ac_n "(cached) $ac_c" 1>&6
10818 else
10819   ac_save_LIBS="$LIBS"
10820 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10821 cat > conftest.$ac_ext <<EOF
10822 #line 10823 "configure"
10823 #include "confdefs.h"
10824
10825 int main() {
10826 main()
10827 ; return 0; }
10828 EOF
10829 if { (eval echo configure:10830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10830   rm -rf conftest*
10831   eval "ac_cv_lib_$ac_lib_var=yes"
10832 else
10833   echo "configure: failed program was:" >&5
10834   cat conftest.$ac_ext >&5
10835   rm -rf conftest*
10836   eval "ac_cv_lib_$ac_lib_var=no"
10837 fi
10838 rm -f conftest*
10839 LIBS="$ac_save_LIBS"
10840
10841 fi
10842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10843   echo "$ac_t""yes" 1>&6
10844   have_k425=yes
10845                                 KRB4_LIBS="-lkrb4"
10846 else
10847   echo "$ac_t""no" 1>&6
10848 have_k425=no
10849 fi
10850
10851
10852                 else
10853                         have_425=no
10854                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10855                 fi
10856
10857                 if test $have_k425 = yes ; then
10858                         ol_with_kerberos=found
10859                         ol_link_krb4=yes
10860
10861                         cat >> confdefs.h <<\EOF
10862 #define HAVE_KRB425 1
10863 EOF
10864
10865                         cat >> confdefs.h <<\EOF
10866 #define HAVE_KRB4 1
10867 EOF
10868
10869
10870                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10871 echo "configure:10872: checking for des_debug in Kerberos libraries" >&5
10872 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10873   echo $ac_n "(cached) $ac_c" 1>&6
10874 else
10875   
10876                                                                 save_LIBS="$LIBS"
10877                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10878                                 cat > conftest.$ac_ext <<EOF
10879 #line 10880 "configure"
10880 #include "confdefs.h"
10881
10882 #include <kerberosIV/krb.h>
10883 #include <kerberosIV/des.h>
10884 extern int des_debug;
10885
10886 int main() {
10887
10888 des_debug = 1;
10889
10890 ; return 0; }
10891 EOF
10892 if { (eval echo configure:10893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10893   rm -rf conftest*
10894   ol_cv_var_des_debug=yes
10895 else
10896   echo "configure: failed program was:" >&5
10897   cat conftest.$ac_ext >&5
10898   rm -rf conftest*
10899   ol_cv_var_des_debug=no
10900 fi
10901 rm -f conftest*
10902                                                                 LIBS="$save_LIBS"
10903                         
10904 fi
10905
10906 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10907
10908                         if test $ol_cv_var_des_debug = yes ; then
10909                                 cat >> confdefs.h <<\EOF
10910 #define HAVE_DES_DEBUG 1
10911 EOF
10912
10913                         fi
10914
10915                         LIBS="$save_LIBS"
10916                 fi
10917         fi
10918 fi
10919
10920 if test $ol_link_krb5 = yes ; then
10921         ol_with_kerberos=found
10922 fi
10923
10924 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10925         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10926
10927         for ac_hdr in krb.h des.h krb-archaeology.h 
10928 do
10929 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10930 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10931 echo "configure:10932: checking for $ac_hdr" >&5
10932 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10933   echo $ac_n "(cached) $ac_c" 1>&6
10934 else
10935   cat > conftest.$ac_ext <<EOF
10936 #line 10937 "configure"
10937 #include "confdefs.h"
10938 #include <$ac_hdr>
10939 EOF
10940 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10941 { (eval echo configure:10942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10942 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10943 if test -z "$ac_err"; then
10944   rm -rf conftest*
10945   eval "ac_cv_header_$ac_safe=yes"
10946 else
10947   echo "$ac_err" >&5
10948   echo "configure: failed program was:" >&5
10949   cat conftest.$ac_ext >&5
10950   rm -rf conftest*
10951   eval "ac_cv_header_$ac_safe=no"
10952 fi
10953 rm -f conftest*
10954 fi
10955 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10956   echo "$ac_t""yes" 1>&6
10957     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10958   cat >> confdefs.h <<EOF
10959 #define $ac_tr_hdr 1
10960 EOF
10961  
10962 else
10963   echo "$ac_t""no" 1>&6
10964 fi
10965 done
10966
10967
10968         if test $ac_cv_header_krb_h = yes ; then
10969                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10970 echo "configure:10971: checking for main in -lkrb" >&5
10971 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10972 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10973   echo $ac_n "(cached) $ac_c" 1>&6
10974 else
10975   ac_save_LIBS="$LIBS"
10976 LIBS="-lkrb -ldes $LIBS"
10977 cat > conftest.$ac_ext <<EOF
10978 #line 10979 "configure"
10979 #include "confdefs.h"
10980
10981 int main() {
10982 main()
10983 ; return 0; }
10984 EOF
10985 if { (eval echo configure:10986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10986   rm -rf conftest*
10987   eval "ac_cv_lib_$ac_lib_var=yes"
10988 else
10989   echo "configure: failed program was:" >&5
10990   cat conftest.$ac_ext >&5
10991   rm -rf conftest*
10992   eval "ac_cv_lib_$ac_lib_var=no"
10993 fi
10994 rm -f conftest*
10995 LIBS="$ac_save_LIBS"
10996
10997 fi
10998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10999   echo "$ac_t""yes" 1>&6
11000   have_k4=yes
11001 else
11002   echo "$ac_t""no" 1>&6
11003 have_k4=no
11004 fi
11005
11006
11007                 if test $have_k4 = yes ; then
11008                         ol_with_kerberos=found
11009                         ol_link_krb4=yes
11010
11011                         cat >> confdefs.h <<\EOF
11012 #define HAVE_KRB4 1
11013 EOF
11014
11015
11016                         KRB4_LIBS="-lkrb -ldes"
11017
11018                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11019                                 cat >> confdefs.h <<\EOF
11020 #define HAVE_KTH_KERBEROS 1
11021 EOF
11022
11023                         fi
11024                 fi
11025         fi
11026 fi
11027
11028 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11029         ol_link_kpasswd=yes
11030 fi
11031
11032 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11033         ol_link_kbind=yes
11034
11035 elif test $ol_enable_kbind = yes ; then
11036         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11037 fi
11038
11039 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11040         cat >> confdefs.h <<\EOF
11041 #define HAVE_KERBEROS 1
11042 EOF
11043
11044
11045 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11046         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11047 fi
11048
11049 ol_link_tls=no
11050 if test $ol_with_tls != no ; then
11051         for ac_hdr in openssl/ssl.h ssl.h
11052 do
11053 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11054 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11055 echo "configure:11056: checking for $ac_hdr" >&5
11056 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11057   echo $ac_n "(cached) $ac_c" 1>&6
11058 else
11059   cat > conftest.$ac_ext <<EOF
11060 #line 11061 "configure"
11061 #include "confdefs.h"
11062 #include <$ac_hdr>
11063 EOF
11064 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11065 { (eval echo configure:11066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11066 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11067 if test -z "$ac_err"; then
11068   rm -rf conftest*
11069   eval "ac_cv_header_$ac_safe=yes"
11070 else
11071   echo "$ac_err" >&5
11072   echo "configure: failed program was:" >&5
11073   cat conftest.$ac_ext >&5
11074   rm -rf conftest*
11075   eval "ac_cv_header_$ac_safe=no"
11076 fi
11077 rm -f conftest*
11078 fi
11079 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11080   echo "$ac_t""yes" 1>&6
11081     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11082   cat >> confdefs.h <<EOF
11083 #define $ac_tr_hdr 1
11084 EOF
11085  
11086 else
11087   echo "$ac_t""no" 1>&6
11088 fi
11089 done
11090
11091         
11092         if test $ac_cv_header_openssl_ssl_h = yes \
11093                 -o $ac_cv_header_ssl_h = yes ; then
11094                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11095 echo "configure:11096: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11096 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11097 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11098   echo $ac_n "(cached) $ac_c" 1>&6
11099 else
11100   ac_save_LIBS="$LIBS"
11101 LIBS="-lssl -lcrypto $LIBS"
11102 cat > conftest.$ac_ext <<EOF
11103 #line 11104 "configure"
11104 #include "confdefs.h"
11105 /* Override any gcc2 internal prototype to avoid an error.  */
11106 /* We use char because int might match the return type of a gcc2
11107     builtin and then its argument prototype would still apply.  */
11108 char SSLeay_add_ssl_algorithms();
11109
11110 int main() {
11111 SSLeay_add_ssl_algorithms()
11112 ; return 0; }
11113 EOF
11114 if { (eval echo configure:11115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11115   rm -rf conftest*
11116   eval "ac_cv_lib_$ac_lib_var=yes"
11117 else
11118   echo "configure: failed program was:" >&5
11119   cat conftest.$ac_ext >&5
11120   rm -rf conftest*
11121   eval "ac_cv_lib_$ac_lib_var=no"
11122 fi
11123 rm -f conftest*
11124 LIBS="$ac_save_LIBS"
11125
11126 fi
11127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11128   echo "$ac_t""yes" 1>&6
11129   have_ssleay=yes
11130                         need_rsaref=no
11131 else
11132   echo "$ac_t""no" 1>&6
11133 have_ssleay=no
11134 fi
11135
11136                         
11137                 if test $have_ssleay = no ; then
11138                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11139 echo "configure:11140: checking for SSL_library_init in -lssl" >&5
11140 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11141 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11142   echo $ac_n "(cached) $ac_c" 1>&6
11143 else
11144   ac_save_LIBS="$LIBS"
11145 LIBS="-lssl -lcrypto $LIBS"
11146 cat > conftest.$ac_ext <<EOF
11147 #line 11148 "configure"
11148 #include "confdefs.h"
11149 /* Override any gcc2 internal prototype to avoid an error.  */
11150 /* We use char because int might match the return type of a gcc2
11151     builtin and then its argument prototype would still apply.  */
11152 char SSL_library_init();
11153
11154 int main() {
11155 SSL_library_init()
11156 ; return 0; }
11157 EOF
11158 if { (eval echo configure:11159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11159   rm -rf conftest*
11160   eval "ac_cv_lib_$ac_lib_var=yes"
11161 else
11162   echo "configure: failed program was:" >&5
11163   cat conftest.$ac_ext >&5
11164   rm -rf conftest*
11165   eval "ac_cv_lib_$ac_lib_var=no"
11166 fi
11167 rm -f conftest*
11168 LIBS="$ac_save_LIBS"
11169
11170 fi
11171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11172   echo "$ac_t""yes" 1>&6
11173   have_ssleay=yes
11174                                 need_rsaref=no
11175 else
11176   echo "$ac_t""no" 1>&6
11177 have_ssleay=no
11178 fi
11179
11180                 fi
11181
11182                 if test $have_ssleay = no ; then
11183                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11184 echo "configure:11185: checking for ssl3_accept in -lssl" >&5
11185 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11186 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11187   echo $ac_n "(cached) $ac_c" 1>&6
11188 else
11189   ac_save_LIBS="$LIBS"
11190 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11191 cat > conftest.$ac_ext <<EOF
11192 #line 11193 "configure"
11193 #include "confdefs.h"
11194 /* Override any gcc2 internal prototype to avoid an error.  */
11195 /* We use char because int might match the return type of a gcc2
11196     builtin and then its argument prototype would still apply.  */
11197 char ssl3_accept();
11198
11199 int main() {
11200 ssl3_accept()
11201 ; return 0; }
11202 EOF
11203 if { (eval echo configure:11204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11204   rm -rf conftest*
11205   eval "ac_cv_lib_$ac_lib_var=yes"
11206 else
11207   echo "configure: failed program was:" >&5
11208   cat conftest.$ac_ext >&5
11209   rm -rf conftest*
11210   eval "ac_cv_lib_$ac_lib_var=no"
11211 fi
11212 rm -f conftest*
11213 LIBS="$ac_save_LIBS"
11214
11215 fi
11216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11217   echo "$ac_t""yes" 1>&6
11218   have_ssleay=yes
11219                                 need_rsaref=yes
11220 else
11221   echo "$ac_t""no" 1>&6
11222 have_ssleay=no
11223 fi
11224
11225                 fi
11226
11227                 if test $have_ssleay = yes ; then
11228                         ol_with_tls=found
11229                         ol_link_tls=yes
11230
11231                         cat >> confdefs.h <<\EOF
11232 #define HAVE_SSLEAY 1
11233 EOF
11234
11235
11236                         if test $need_rsaref = yes; then
11237                                 cat >> confdefs.h <<\EOF
11238 #define HAVE_RSAREF 1
11239 EOF
11240
11241
11242                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11243                         else
11244                                 TLS_LIBS="-lssl -lcrypto"
11245                         fi
11246                 fi
11247         fi
11248
11249 else
11250         echo "configure: warning: TLS data protection not supported!" 1>&2
11251 fi
11252
11253 WITH_TLS=no
11254 if test $ol_link_tls = yes ; then
11255         cat >> confdefs.h <<\EOF
11256 #define HAVE_TLS 1
11257 EOF
11258
11259         WITH_TLS=yes
11260
11261 elif test $ol_with_tls = auto ; then
11262         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11263         echo "configure: warning: TLS data protection not supported!" 1>&2
11264
11265 elif test $ol_with_tls != no ; then
11266         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11267 fi
11268
11269 if test $ol_enable_lmpasswd != no; then
11270         if test $ol_link_tls != yes ; then
11271                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11272         fi
11273
11274         cat >> confdefs.h <<\EOF
11275 #define SLAPD_LMHASH 1
11276 EOF
11277
11278 fi
11279
11280 ol_link_threads=no
11281
11282 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11283         -o $ol_with_threads = nt ; then
11284
11285         
11286         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11287 echo "configure:11288: checking for _beginthread" >&5
11288 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11289   echo $ac_n "(cached) $ac_c" 1>&6
11290 else
11291   cat > conftest.$ac_ext <<EOF
11292 #line 11293 "configure"
11293 #include "confdefs.h"
11294 /* System header to define __stub macros and hopefully few prototypes,
11295     which can conflict with char _beginthread(); below.  */
11296 #include <assert.h>
11297 /* Override any gcc2 internal prototype to avoid an error.  */
11298 /* We use char because int might match the return type of a gcc2
11299     builtin and then its argument prototype would still apply.  */
11300 char _beginthread();
11301 char (*f)();
11302
11303 int main() {
11304
11305 /* The GNU C library defines this for functions which it implements
11306     to always fail with ENOSYS.  Some functions are actually named
11307     something starting with __ and the normal name is an alias.  */
11308 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11309 choke me
11310 #else
11311 f = _beginthread;
11312 #endif
11313
11314 ; return 0; }
11315 EOF
11316 if { (eval echo configure:11317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11317   rm -rf conftest*
11318   eval "ac_cv_func__beginthread=yes"
11319 else
11320   echo "configure: failed program was:" >&5
11321   cat conftest.$ac_ext >&5
11322   rm -rf conftest*
11323   eval "ac_cv_func__beginthread=no"
11324 fi
11325 rm -f conftest*
11326 fi
11327
11328 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11329   echo "$ac_t""yes" 1>&6
11330   :
11331 else
11332   echo "$ac_t""no" 1>&6
11333 fi
11334
11335
11336         if test $ac_cv_func__beginthread = yes ; then
11337                 cat >> confdefs.h <<\EOF
11338 #define HAVE_NT_THREADS 1
11339 EOF
11340
11341                 ol_cv_nt_threads=yes
11342         fi
11343
11344
11345         if test "$ol_cv_nt_threads" = yes ; then
11346                 ol_link_threads=nt
11347                 ol_with_threads=found
11348                 ol_with_yielding_select=yes
11349
11350                 cat >> confdefs.h <<\EOF
11351 #define HAVE_NT_SERVICE_MANAGER 1
11352 EOF
11353
11354                 cat >> confdefs.h <<\EOF
11355 #define HAVE_NT_EVENT_LOG 1
11356 EOF
11357
11358         fi
11359
11360         if test $ol_with_threads = nt ; then
11361                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11362         fi
11363 fi
11364
11365 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11366         -o $ol_with_threads = posix ; then
11367
11368         for ac_hdr in pthread.h
11369 do
11370 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11371 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11372 echo "configure:11373: checking for $ac_hdr" >&5
11373 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11374   echo $ac_n "(cached) $ac_c" 1>&6
11375 else
11376   cat > conftest.$ac_ext <<EOF
11377 #line 11378 "configure"
11378 #include "confdefs.h"
11379 #include <$ac_hdr>
11380 EOF
11381 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11382 { (eval echo configure:11383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11383 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11384 if test -z "$ac_err"; then
11385   rm -rf conftest*
11386   eval "ac_cv_header_$ac_safe=yes"
11387 else
11388   echo "$ac_err" >&5
11389   echo "configure: failed program was:" >&5
11390   cat conftest.$ac_ext >&5
11391   rm -rf conftest*
11392   eval "ac_cv_header_$ac_safe=no"
11393 fi
11394 rm -f conftest*
11395 fi
11396 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11397   echo "$ac_t""yes" 1>&6
11398     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11399   cat >> confdefs.h <<EOF
11400 #define $ac_tr_hdr 1
11401 EOF
11402  
11403 else
11404   echo "$ac_t""no" 1>&6
11405 fi
11406 done
11407
11408
11409         if test $ac_cv_header_pthread_h = yes ; then
11410                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11411 echo "configure:11412: checking POSIX thread version" >&5
11412 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11413   echo $ac_n "(cached) $ac_c" 1>&6
11414 else
11415   
11416         cat > conftest.$ac_ext <<EOF
11417 #line 11418 "configure"
11418 #include "confdefs.h"
11419
11420 #               include <pthread.h>
11421         
11422 int main() {
11423
11424                 int i = PTHREAD_CREATE_JOINABLE;
11425         
11426 ; return 0; }
11427 EOF
11428 if { (eval echo configure:11429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11429   rm -rf conftest*
11430   
11431         cat > conftest.$ac_ext <<EOF
11432 #line 11433 "configure"
11433 #include "confdefs.h"
11434 #include <pthread.h>
11435 EOF
11436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11437   egrep "pthread_detach" >/dev/null 2>&1; then
11438   rm -rf conftest*
11439   ol_cv_pthread_version=10
11440 else
11441   rm -rf conftest*
11442   ol_cv_pthread_version=8
11443 fi
11444 rm -f conftest*
11445
11446 else
11447   echo "configure: failed program was:" >&5
11448   cat conftest.$ac_ext >&5
11449   rm -rf conftest*
11450   
11451         cat > conftest.$ac_ext <<EOF
11452 #line 11453 "configure"
11453 #include "confdefs.h"
11454
11455 #               include <pthread.h>
11456 #               ifdef PTHREAD_CREATE_UNDETACHED
11457                 draft7
11458 #               endif
11459         
11460 EOF
11461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11462   egrep "draft7" >/dev/null 2>&1; then
11463   rm -rf conftest*
11464   ol_cv_pthread_version=7
11465 else
11466   rm -rf conftest*
11467   
11468         cat > conftest.$ac_ext <<EOF
11469 #line 11470 "configure"
11470 #include "confdefs.h"
11471 #include <pthread.h>
11472 EOF
11473 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11474   egrep "pthread_attr_init" >/dev/null 2>&1; then
11475   rm -rf conftest*
11476   ol_cv_pthread_version=6
11477 else
11478   rm -rf conftest*
11479   
11480         cat > conftest.$ac_ext <<EOF
11481 #line 11482 "configure"
11482 #include "confdefs.h"
11483
11484 #               include <pthread.h>
11485 #ifdef          PTHREAD_MUTEX_INITIALIZER
11486                 draft5
11487 #endif
11488         
11489 EOF
11490 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11491   egrep "draft5" >/dev/null 2>&1; then
11492   rm -rf conftest*
11493   ol_cv_pthread_version=5
11494 else
11495   rm -rf conftest*
11496   ol_cv_pthread_version=4
11497 fi
11498 rm -f conftest*
11499  
11500 fi
11501 rm -f conftest*
11502  
11503 fi
11504 rm -f conftest*
11505  
11506 fi
11507 rm -f conftest*
11508
11509 fi
11510
11511 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11512
11513
11514                 if test $ol_cv_pthread_version != 0 ; then
11515                         cat >> confdefs.h <<EOF
11516 #define HAVE_PTHREADS $ol_cv_pthread_version
11517 EOF
11518
11519                 else
11520                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11521                 fi
11522
11523                 # consider threads found
11524                 ol_with_threads=found
11525
11526                 
11527         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11528 echo "configure:11529: checking for LinuxThreads pthread.h" >&5
11529 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11530   echo $ac_n "(cached) $ac_c" 1>&6
11531 else
11532   cat > conftest.$ac_ext <<EOF
11533 #line 11534 "configure"
11534 #include "confdefs.h"
11535 #include <pthread.h>
11536 EOF
11537 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11538   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11539   rm -rf conftest*
11540   ol_cv_header_linux_threads=yes
11541 else
11542   rm -rf conftest*
11543   ol_cv_header_linux_threads=no
11544 fi
11545 rm -f conftest*
11546
11547                 
11548 fi
11549
11550 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11551         if test $ol_cv_header_linux_threads = yes; then
11552                 cat >> confdefs.h <<\EOF
11553 #define HAVE_LINUX_THREADS 1
11554 EOF
11555
11556         fi
11557
11558                 
11559         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11560 echo "configure:11561: checking for GNU Pth pthread.h" >&5
11561 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11562   echo $ac_n "(cached) $ac_c" 1>&6
11563 else
11564   cat > conftest.$ac_ext <<EOF
11565 #line 11566 "configure"
11566 #include "confdefs.h"
11567 #include <pthread.h>
11568 #ifdef _POSIX_THREAD_IS_GNU_PTH
11569         __gnu_pth__;
11570 #endif
11571
11572 EOF
11573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11574   egrep "__gnu_pth__" >/dev/null 2>&1; then
11575   rm -rf conftest*
11576   ol_cv_header_gnu_pth_pthread_h=yes
11577 else
11578   rm -rf conftest*
11579   ol_cv_header_gnu_pth_pthread_h=no
11580 fi
11581 rm -f conftest*
11582
11583                 
11584 fi
11585
11586 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11587
11588
11589                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11590                         for ac_hdr in sched.h
11591 do
11592 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11593 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11594 echo "configure:11595: checking for $ac_hdr" >&5
11595 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11596   echo $ac_n "(cached) $ac_c" 1>&6
11597 else
11598   cat > conftest.$ac_ext <<EOF
11599 #line 11600 "configure"
11600 #include "confdefs.h"
11601 #include <$ac_hdr>
11602 EOF
11603 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11604 { (eval echo configure:11605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11605 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11606 if test -z "$ac_err"; then
11607   rm -rf conftest*
11608   eval "ac_cv_header_$ac_safe=yes"
11609 else
11610   echo "$ac_err" >&5
11611   echo "configure: failed program was:" >&5
11612   cat conftest.$ac_ext >&5
11613   rm -rf conftest*
11614   eval "ac_cv_header_$ac_safe=no"
11615 fi
11616 rm -f conftest*
11617 fi
11618 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11619   echo "$ac_t""yes" 1>&6
11620     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11621   cat >> confdefs.h <<EOF
11622 #define $ac_tr_hdr 1
11623 EOF
11624  
11625 else
11626   echo "$ac_t""no" 1>&6
11627 fi
11628 done
11629
11630                 fi
11631
11632                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11633                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11634 echo "configure:11635: checking for pthread_create in default libraries" >&5
11635 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11636   echo $ac_n "(cached) $ac_c" 1>&6
11637 else
11638   
11639                 if test "$cross_compiling" = yes; then
11640   cat > conftest.$ac_ext <<EOF
11641 #line 11642 "configure"
11642 #include "confdefs.h"
11643 /* pthread test headers */
11644 #include <pthread.h>
11645 #if HAVE_PTHREADS < 7
11646 #include <errno.h>
11647 #endif
11648 #ifndef NULL
11649 #define NULL (void*)0
11650 #endif
11651
11652 static void *task(p)
11653         void *p;
11654 {
11655         return (void *) (p == NULL);
11656 }
11657
11658 int main() {
11659
11660         /* pthread test function */
11661 #ifndef PTHREAD_CREATE_DETACHED
11662 #define PTHREAD_CREATE_DETACHED 1
11663 #endif
11664         pthread_t t;
11665         int status;
11666         int detach = PTHREAD_CREATE_DETACHED;
11667
11668 #if HAVE_PTHREADS > 4
11669         /* Final pthreads */
11670         pthread_attr_t attr;
11671
11672         status = pthread_attr_init(&attr);
11673         if( status ) return status;
11674
11675 #if HAVE_PTHREADS < 7
11676         status = pthread_attr_setdetachstate(&attr, &detach);
11677         if( status < 0 ) status = errno;
11678 #else
11679         status = pthread_attr_setdetachstate(&attr, detach);
11680 #endif
11681         if( status ) return status;
11682         status = pthread_create( &t, &attr, task, NULL );
11683 #if HAVE_PTHREADS < 7
11684         if( status < 0 ) status = errno;
11685 #endif
11686         if( status ) return status;
11687 #else
11688         /* Draft 4 pthreads */
11689         status = pthread_create( &t, pthread_attr_default, task, NULL );
11690         if( status ) return errno;
11691
11692         /* give thread a chance to complete */
11693         /* it should remain joinable and hence detachable */
11694         sleep( 1 );
11695
11696         status = pthread_detach( &t );
11697         if( status ) return errno;
11698 #endif
11699
11700 #ifdef HAVE_LINUX_THREADS
11701         pthread_kill_other_threads_np();
11702 #endif
11703
11704         return 0;
11705
11706 ; return 0; }
11707 EOF
11708 if { (eval echo configure:11709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11709   rm -rf conftest*
11710   ol_cv_pthread_create=yes
11711 else
11712   echo "configure: failed program was:" >&5
11713   cat conftest.$ac_ext >&5
11714   rm -rf conftest*
11715   ol_cv_pthread_create=no
11716 fi
11717 rm -f conftest*
11718 else
11719   cat > conftest.$ac_ext <<EOF
11720 #line 11721 "configure"
11721 #include "confdefs.h"
11722 /* pthread test headers */
11723 #include <pthread.h>
11724 #if HAVE_PTHREADS < 7
11725 #include <errno.h>
11726 #endif
11727 #ifndef NULL
11728 #define NULL (void*)0
11729 #endif
11730
11731 static void *task(p)
11732         void *p;
11733 {
11734         return (void *) (p == NULL);
11735 }
11736
11737
11738 int main(argc, argv)
11739         int argc;
11740         char **argv;
11741 {
11742
11743         /* pthread test function */
11744 #ifndef PTHREAD_CREATE_DETACHED
11745 #define PTHREAD_CREATE_DETACHED 1
11746 #endif
11747         pthread_t t;
11748         int status;
11749         int detach = PTHREAD_CREATE_DETACHED;
11750
11751 #if HAVE_PTHREADS > 4
11752         /* Final pthreads */
11753         pthread_attr_t attr;
11754
11755         status = pthread_attr_init(&attr);
11756         if( status ) return status;
11757
11758 #if HAVE_PTHREADS < 7
11759         status = pthread_attr_setdetachstate(&attr, &detach);
11760         if( status < 0 ) status = errno;
11761 #else
11762         status = pthread_attr_setdetachstate(&attr, detach);
11763 #endif
11764         if( status ) return status;
11765         status = pthread_create( &t, &attr, task, NULL );
11766 #if HAVE_PTHREADS < 7
11767         if( status < 0 ) status = errno;
11768 #endif
11769         if( status ) return status;
11770 #else
11771         /* Draft 4 pthreads */
11772         status = pthread_create( &t, pthread_attr_default, task, NULL );
11773         if( status ) return errno;
11774
11775         /* give thread a chance to complete */
11776         /* it should remain joinable and hence detachable */
11777         sleep( 1 );
11778
11779         status = pthread_detach( &t );
11780         if( status ) return errno;
11781 #endif
11782
11783 #ifdef HAVE_LINUX_THREADS
11784         pthread_kill_other_threads_np();
11785 #endif
11786
11787         return 0;
11788
11789 }
11790
11791 EOF
11792 if { (eval echo configure:11793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11793 then
11794   ol_cv_pthread_create=yes
11795 else
11796   echo "configure: failed program was:" >&5
11797   cat conftest.$ac_ext >&5
11798   rm -fr conftest*
11799   ol_cv_pthread_create=no
11800 fi
11801 rm -fr conftest*
11802 fi
11803
11804 fi
11805
11806 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11807
11808                 if test $ol_cv_pthread_create != no ; then
11809                         ol_link_threads=posix
11810                         ol_link_pthreads=""
11811                 fi
11812                 
11813                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11814 if test "$ol_link_threads" = no ; then
11815         # try -kthread
11816         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11817 echo "configure:11818: checking for pthread link with -kthread" >&5
11818 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11819   echo $ac_n "(cached) $ac_c" 1>&6
11820 else
11821   
11822                 # save the flags
11823                 ol_LIBS="$LIBS"
11824                 LIBS="-kthread $LIBS"
11825
11826                 if test "$cross_compiling" = yes; then
11827   cat > conftest.$ac_ext <<EOF
11828 #line 11829 "configure"
11829 #include "confdefs.h"
11830 /* pthread test headers */
11831 #include <pthread.h>
11832 #if HAVE_PTHREADS < 7
11833 #include <errno.h>
11834 #endif
11835 #ifndef NULL
11836 #define NULL (void*)0
11837 #endif
11838
11839 static void *task(p)
11840         void *p;
11841 {
11842         return (void *) (p == NULL);
11843 }
11844
11845 int main() {
11846
11847         /* pthread test function */
11848 #ifndef PTHREAD_CREATE_DETACHED
11849 #define PTHREAD_CREATE_DETACHED 1
11850 #endif
11851         pthread_t t;
11852         int status;
11853         int detach = PTHREAD_CREATE_DETACHED;
11854
11855 #if HAVE_PTHREADS > 4
11856         /* Final pthreads */
11857         pthread_attr_t attr;
11858
11859         status = pthread_attr_init(&attr);
11860         if( status ) return status;
11861
11862 #if HAVE_PTHREADS < 7
11863         status = pthread_attr_setdetachstate(&attr, &detach);
11864         if( status < 0 ) status = errno;
11865 #else
11866         status = pthread_attr_setdetachstate(&attr, detach);
11867 #endif
11868         if( status ) return status;
11869         status = pthread_create( &t, &attr, task, NULL );
11870 #if HAVE_PTHREADS < 7
11871         if( status < 0 ) status = errno;
11872 #endif
11873         if( status ) return status;
11874 #else
11875         /* Draft 4 pthreads */
11876         status = pthread_create( &t, pthread_attr_default, task, NULL );
11877         if( status ) return errno;
11878
11879         /* give thread a chance to complete */
11880         /* it should remain joinable and hence detachable */
11881         sleep( 1 );
11882
11883         status = pthread_detach( &t );
11884         if( status ) return errno;
11885 #endif
11886
11887 #ifdef HAVE_LINUX_THREADS
11888         pthread_kill_other_threads_np();
11889 #endif
11890
11891         return 0;
11892
11893 ; return 0; }
11894 EOF
11895 if { (eval echo configure:11896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11896   rm -rf conftest*
11897   ol_cv_pthread_kthread=yes
11898 else
11899   echo "configure: failed program was:" >&5
11900   cat conftest.$ac_ext >&5
11901   rm -rf conftest*
11902   ol_cv_pthread_kthread=no
11903 fi
11904 rm -f conftest*
11905 else
11906   cat > conftest.$ac_ext <<EOF
11907 #line 11908 "configure"
11908 #include "confdefs.h"
11909 /* pthread test headers */
11910 #include <pthread.h>
11911 #if HAVE_PTHREADS < 7
11912 #include <errno.h>
11913 #endif
11914 #ifndef NULL
11915 #define NULL (void*)0
11916 #endif
11917
11918 static void *task(p)
11919         void *p;
11920 {
11921         return (void *) (p == NULL);
11922 }
11923
11924
11925 int main(argc, argv)
11926         int argc;
11927         char **argv;
11928 {
11929
11930         /* pthread test function */
11931 #ifndef PTHREAD_CREATE_DETACHED
11932 #define PTHREAD_CREATE_DETACHED 1
11933 #endif
11934         pthread_t t;
11935         int status;
11936         int detach = PTHREAD_CREATE_DETACHED;
11937
11938 #if HAVE_PTHREADS > 4
11939         /* Final pthreads */
11940         pthread_attr_t attr;
11941
11942         status = pthread_attr_init(&attr);
11943         if( status ) return status;
11944
11945 #if HAVE_PTHREADS < 7
11946         status = pthread_attr_setdetachstate(&attr, &detach);
11947         if( status < 0 ) status = errno;
11948 #else
11949         status = pthread_attr_setdetachstate(&attr, detach);
11950 #endif
11951         if( status ) return status;
11952         status = pthread_create( &t, &attr, task, NULL );
11953 #if HAVE_PTHREADS < 7
11954         if( status < 0 ) status = errno;
11955 #endif
11956         if( status ) return status;
11957 #else
11958         /* Draft 4 pthreads */
11959         status = pthread_create( &t, pthread_attr_default, task, NULL );
11960         if( status ) return errno;
11961
11962         /* give thread a chance to complete */
11963         /* it should remain joinable and hence detachable */
11964         sleep( 1 );
11965
11966         status = pthread_detach( &t );
11967         if( status ) return errno;
11968 #endif
11969
11970 #ifdef HAVE_LINUX_THREADS
11971         pthread_kill_other_threads_np();
11972 #endif
11973
11974         return 0;
11975
11976 }
11977
11978 EOF
11979 if { (eval echo configure:11980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11980 then
11981   ol_cv_pthread_kthread=yes
11982 else
11983   echo "configure: failed program was:" >&5
11984   cat conftest.$ac_ext >&5
11985   rm -fr conftest*
11986   ol_cv_pthread_kthread=no
11987 fi
11988 rm -fr conftest*
11989 fi
11990
11991
11992                 # restore the LIBS
11993                 LIBS="$ol_LIBS"
11994         
11995 fi
11996
11997 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11998
11999         if test $ol_cv_pthread_kthread = yes ; then
12000                 ol_link_pthreads="-kthread"
12001                 ol_link_threads=posix
12002         fi
12003 fi
12004
12005                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12006 if test "$ol_link_threads" = no ; then
12007         # try -pthread
12008         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12009 echo "configure:12010: checking for pthread link with -pthread" >&5
12010 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12011   echo $ac_n "(cached) $ac_c" 1>&6
12012 else
12013   
12014                 # save the flags
12015                 ol_LIBS="$LIBS"
12016                 LIBS="-pthread $LIBS"
12017
12018                 if test "$cross_compiling" = yes; then
12019   cat > conftest.$ac_ext <<EOF
12020 #line 12021 "configure"
12021 #include "confdefs.h"
12022 /* pthread test headers */
12023 #include <pthread.h>
12024 #if HAVE_PTHREADS < 7
12025 #include <errno.h>
12026 #endif
12027 #ifndef NULL
12028 #define NULL (void*)0
12029 #endif
12030
12031 static void *task(p)
12032         void *p;
12033 {
12034         return (void *) (p == NULL);
12035 }
12036
12037 int main() {
12038
12039         /* pthread test function */
12040 #ifndef PTHREAD_CREATE_DETACHED
12041 #define PTHREAD_CREATE_DETACHED 1
12042 #endif
12043         pthread_t t;
12044         int status;
12045         int detach = PTHREAD_CREATE_DETACHED;
12046
12047 #if HAVE_PTHREADS > 4
12048         /* Final pthreads */
12049         pthread_attr_t attr;
12050
12051         status = pthread_attr_init(&attr);
12052         if( status ) return status;
12053
12054 #if HAVE_PTHREADS < 7
12055         status = pthread_attr_setdetachstate(&attr, &detach);
12056         if( status < 0 ) status = errno;
12057 #else
12058         status = pthread_attr_setdetachstate(&attr, detach);
12059 #endif
12060         if( status ) return status;
12061         status = pthread_create( &t, &attr, task, NULL );
12062 #if HAVE_PTHREADS < 7
12063         if( status < 0 ) status = errno;
12064 #endif
12065         if( status ) return status;
12066 #else
12067         /* Draft 4 pthreads */
12068         status = pthread_create( &t, pthread_attr_default, task, NULL );
12069         if( status ) return errno;
12070
12071         /* give thread a chance to complete */
12072         /* it should remain joinable and hence detachable */
12073         sleep( 1 );
12074
12075         status = pthread_detach( &t );
12076         if( status ) return errno;
12077 #endif
12078
12079 #ifdef HAVE_LINUX_THREADS
12080         pthread_kill_other_threads_np();
12081 #endif
12082
12083         return 0;
12084
12085 ; return 0; }
12086 EOF
12087 if { (eval echo configure:12088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12088   rm -rf conftest*
12089   ol_cv_pthread_pthread=yes
12090 else
12091   echo "configure: failed program was:" >&5
12092   cat conftest.$ac_ext >&5
12093   rm -rf conftest*
12094   ol_cv_pthread_pthread=no
12095 fi
12096 rm -f conftest*
12097 else
12098   cat > conftest.$ac_ext <<EOF
12099 #line 12100 "configure"
12100 #include "confdefs.h"
12101 /* pthread test headers */
12102 #include <pthread.h>
12103 #if HAVE_PTHREADS < 7
12104 #include <errno.h>
12105 #endif
12106 #ifndef NULL
12107 #define NULL (void*)0
12108 #endif
12109
12110 static void *task(p)
12111         void *p;
12112 {
12113         return (void *) (p == NULL);
12114 }
12115
12116
12117 int main(argc, argv)
12118         int argc;
12119         char **argv;
12120 {
12121
12122         /* pthread test function */
12123 #ifndef PTHREAD_CREATE_DETACHED
12124 #define PTHREAD_CREATE_DETACHED 1
12125 #endif
12126         pthread_t t;
12127         int status;
12128         int detach = PTHREAD_CREATE_DETACHED;
12129
12130 #if HAVE_PTHREADS > 4
12131         /* Final pthreads */
12132         pthread_attr_t attr;
12133
12134         status = pthread_attr_init(&attr);
12135         if( status ) return status;
12136
12137 #if HAVE_PTHREADS < 7
12138         status = pthread_attr_setdetachstate(&attr, &detach);
12139         if( status < 0 ) status = errno;
12140 #else
12141         status = pthread_attr_setdetachstate(&attr, detach);
12142 #endif
12143         if( status ) return status;
12144         status = pthread_create( &t, &attr, task, NULL );
12145 #if HAVE_PTHREADS < 7
12146         if( status < 0 ) status = errno;
12147 #endif
12148         if( status ) return status;
12149 #else
12150         /* Draft 4 pthreads */
12151         status = pthread_create( &t, pthread_attr_default, task, NULL );
12152         if( status ) return errno;
12153
12154         /* give thread a chance to complete */
12155         /* it should remain joinable and hence detachable */
12156         sleep( 1 );
12157
12158         status = pthread_detach( &t );
12159         if( status ) return errno;
12160 #endif
12161
12162 #ifdef HAVE_LINUX_THREADS
12163         pthread_kill_other_threads_np();
12164 #endif
12165
12166         return 0;
12167
12168 }
12169
12170 EOF
12171 if { (eval echo configure:12172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12172 then
12173   ol_cv_pthread_pthread=yes
12174 else
12175   echo "configure: failed program was:" >&5
12176   cat conftest.$ac_ext >&5
12177   rm -fr conftest*
12178   ol_cv_pthread_pthread=no
12179 fi
12180 rm -fr conftest*
12181 fi
12182
12183
12184                 # restore the LIBS
12185                 LIBS="$ol_LIBS"
12186         
12187 fi
12188
12189 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12190
12191         if test $ol_cv_pthread_pthread = yes ; then
12192                 ol_link_pthreads="-pthread"
12193                 ol_link_threads=posix
12194         fi
12195 fi
12196
12197                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12198 if test "$ol_link_threads" = no ; then
12199         # try -pthreads
12200         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12201 echo "configure:12202: checking for pthread link with -pthreads" >&5
12202 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12203   echo $ac_n "(cached) $ac_c" 1>&6
12204 else
12205   
12206                 # save the flags
12207                 ol_LIBS="$LIBS"
12208                 LIBS="-pthreads $LIBS"
12209
12210                 if test "$cross_compiling" = yes; then
12211   cat > conftest.$ac_ext <<EOF
12212 #line 12213 "configure"
12213 #include "confdefs.h"
12214 /* pthread test headers */
12215 #include <pthread.h>
12216 #if HAVE_PTHREADS < 7
12217 #include <errno.h>
12218 #endif
12219 #ifndef NULL
12220 #define NULL (void*)0
12221 #endif
12222
12223 static void *task(p)
12224         void *p;
12225 {
12226         return (void *) (p == NULL);
12227 }
12228
12229 int main() {
12230
12231         /* pthread test function */
12232 #ifndef PTHREAD_CREATE_DETACHED
12233 #define PTHREAD_CREATE_DETACHED 1
12234 #endif
12235         pthread_t t;
12236         int status;
12237         int detach = PTHREAD_CREATE_DETACHED;
12238
12239 #if HAVE_PTHREADS > 4
12240         /* Final pthreads */
12241         pthread_attr_t attr;
12242
12243         status = pthread_attr_init(&attr);
12244         if( status ) return status;
12245
12246 #if HAVE_PTHREADS < 7
12247         status = pthread_attr_setdetachstate(&attr, &detach);
12248         if( status < 0 ) status = errno;
12249 #else
12250         status = pthread_attr_setdetachstate(&attr, detach);
12251 #endif
12252         if( status ) return status;
12253         status = pthread_create( &t, &attr, task, NULL );
12254 #if HAVE_PTHREADS < 7
12255         if( status < 0 ) status = errno;
12256 #endif
12257         if( status ) return status;
12258 #else
12259         /* Draft 4 pthreads */
12260         status = pthread_create( &t, pthread_attr_default, task, NULL );
12261         if( status ) return errno;
12262
12263         /* give thread a chance to complete */
12264         /* it should remain joinable and hence detachable */
12265         sleep( 1 );
12266
12267         status = pthread_detach( &t );
12268         if( status ) return errno;
12269 #endif
12270
12271 #ifdef HAVE_LINUX_THREADS
12272         pthread_kill_other_threads_np();
12273 #endif
12274
12275         return 0;
12276
12277 ; return 0; }
12278 EOF
12279 if { (eval echo configure:12280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12280   rm -rf conftest*
12281   ol_cv_pthread_pthreads=yes
12282 else
12283   echo "configure: failed program was:" >&5
12284   cat conftest.$ac_ext >&5
12285   rm -rf conftest*
12286   ol_cv_pthread_pthreads=no
12287 fi
12288 rm -f conftest*
12289 else
12290   cat > conftest.$ac_ext <<EOF
12291 #line 12292 "configure"
12292 #include "confdefs.h"
12293 /* pthread test headers */
12294 #include <pthread.h>
12295 #if HAVE_PTHREADS < 7
12296 #include <errno.h>
12297 #endif
12298 #ifndef NULL
12299 #define NULL (void*)0
12300 #endif
12301
12302 static void *task(p)
12303         void *p;
12304 {
12305         return (void *) (p == NULL);
12306 }
12307
12308
12309 int main(argc, argv)
12310         int argc;
12311         char **argv;
12312 {
12313
12314         /* pthread test function */
12315 #ifndef PTHREAD_CREATE_DETACHED
12316 #define PTHREAD_CREATE_DETACHED 1
12317 #endif
12318         pthread_t t;
12319         int status;
12320         int detach = PTHREAD_CREATE_DETACHED;
12321
12322 #if HAVE_PTHREADS > 4
12323         /* Final pthreads */
12324         pthread_attr_t attr;
12325
12326         status = pthread_attr_init(&attr);
12327         if( status ) return status;
12328
12329 #if HAVE_PTHREADS < 7
12330         status = pthread_attr_setdetachstate(&attr, &detach);
12331         if( status < 0 ) status = errno;
12332 #else
12333         status = pthread_attr_setdetachstate(&attr, detach);
12334 #endif
12335         if( status ) return status;
12336         status = pthread_create( &t, &attr, task, NULL );
12337 #if HAVE_PTHREADS < 7
12338         if( status < 0 ) status = errno;
12339 #endif
12340         if( status ) return status;
12341 #else
12342         /* Draft 4 pthreads */
12343         status = pthread_create( &t, pthread_attr_default, task, NULL );
12344         if( status ) return errno;
12345
12346         /* give thread a chance to complete */
12347         /* it should remain joinable and hence detachable */
12348         sleep( 1 );
12349
12350         status = pthread_detach( &t );
12351         if( status ) return errno;
12352 #endif
12353
12354 #ifdef HAVE_LINUX_THREADS
12355         pthread_kill_other_threads_np();
12356 #endif
12357
12358         return 0;
12359
12360 }
12361
12362 EOF
12363 if { (eval echo configure:12364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12364 then
12365   ol_cv_pthread_pthreads=yes
12366 else
12367   echo "configure: failed program was:" >&5
12368   cat conftest.$ac_ext >&5
12369   rm -fr conftest*
12370   ol_cv_pthread_pthreads=no
12371 fi
12372 rm -fr conftest*
12373 fi
12374
12375
12376                 # restore the LIBS
12377                 LIBS="$ol_LIBS"
12378         
12379 fi
12380
12381 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12382
12383         if test $ol_cv_pthread_pthreads = yes ; then
12384                 ol_link_pthreads="-pthreads"
12385                 ol_link_threads=posix
12386         fi
12387 fi
12388
12389                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12390 if test "$ol_link_threads" = no ; then
12391         # try -mthreads
12392         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12393 echo "configure:12394: checking for pthread link with -mthreads" >&5
12394 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12395   echo $ac_n "(cached) $ac_c" 1>&6
12396 else
12397   
12398                 # save the flags
12399                 ol_LIBS="$LIBS"
12400                 LIBS="-mthreads $LIBS"
12401
12402                 if test "$cross_compiling" = yes; then
12403   cat > conftest.$ac_ext <<EOF
12404 #line 12405 "configure"
12405 #include "confdefs.h"
12406 /* pthread test headers */
12407 #include <pthread.h>
12408 #if HAVE_PTHREADS < 7
12409 #include <errno.h>
12410 #endif
12411 #ifndef NULL
12412 #define NULL (void*)0
12413 #endif
12414
12415 static void *task(p)
12416         void *p;
12417 {
12418         return (void *) (p == NULL);
12419 }
12420
12421 int main() {
12422
12423         /* pthread test function */
12424 #ifndef PTHREAD_CREATE_DETACHED
12425 #define PTHREAD_CREATE_DETACHED 1
12426 #endif
12427         pthread_t t;
12428         int status;
12429         int detach = PTHREAD_CREATE_DETACHED;
12430
12431 #if HAVE_PTHREADS > 4
12432         /* Final pthreads */
12433         pthread_attr_t attr;
12434
12435         status = pthread_attr_init(&attr);
12436         if( status ) return status;
12437
12438 #if HAVE_PTHREADS < 7
12439         status = pthread_attr_setdetachstate(&attr, &detach);
12440         if( status < 0 ) status = errno;
12441 #else
12442         status = pthread_attr_setdetachstate(&attr, detach);
12443 #endif
12444         if( status ) return status;
12445         status = pthread_create( &t, &attr, task, NULL );
12446 #if HAVE_PTHREADS < 7
12447         if( status < 0 ) status = errno;
12448 #endif
12449         if( status ) return status;
12450 #else
12451         /* Draft 4 pthreads */
12452         status = pthread_create( &t, pthread_attr_default, task, NULL );
12453         if( status ) return errno;
12454
12455         /* give thread a chance to complete */
12456         /* it should remain joinable and hence detachable */
12457         sleep( 1 );
12458
12459         status = pthread_detach( &t );
12460         if( status ) return errno;
12461 #endif
12462
12463 #ifdef HAVE_LINUX_THREADS
12464         pthread_kill_other_threads_np();
12465 #endif
12466
12467         return 0;
12468
12469 ; return 0; }
12470 EOF
12471 if { (eval echo configure:12472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12472   rm -rf conftest*
12473   ol_cv_pthread_mthreads=yes
12474 else
12475   echo "configure: failed program was:" >&5
12476   cat conftest.$ac_ext >&5
12477   rm -rf conftest*
12478   ol_cv_pthread_mthreads=no
12479 fi
12480 rm -f conftest*
12481 else
12482   cat > conftest.$ac_ext <<EOF
12483 #line 12484 "configure"
12484 #include "confdefs.h"
12485 /* pthread test headers */
12486 #include <pthread.h>
12487 #if HAVE_PTHREADS < 7
12488 #include <errno.h>
12489 #endif
12490 #ifndef NULL
12491 #define NULL (void*)0
12492 #endif
12493
12494 static void *task(p)
12495         void *p;
12496 {
12497         return (void *) (p == NULL);
12498 }
12499
12500
12501 int main(argc, argv)
12502         int argc;
12503         char **argv;
12504 {
12505
12506         /* pthread test function */
12507 #ifndef PTHREAD_CREATE_DETACHED
12508 #define PTHREAD_CREATE_DETACHED 1
12509 #endif
12510         pthread_t t;
12511         int status;
12512         int detach = PTHREAD_CREATE_DETACHED;
12513
12514 #if HAVE_PTHREADS > 4
12515         /* Final pthreads */
12516         pthread_attr_t attr;
12517
12518         status = pthread_attr_init(&attr);
12519         if( status ) return status;
12520
12521 #if HAVE_PTHREADS < 7
12522         status = pthread_attr_setdetachstate(&attr, &detach);
12523         if( status < 0 ) status = errno;
12524 #else
12525         status = pthread_attr_setdetachstate(&attr, detach);
12526 #endif
12527         if( status ) return status;
12528         status = pthread_create( &t, &attr, task, NULL );
12529 #if HAVE_PTHREADS < 7
12530         if( status < 0 ) status = errno;
12531 #endif
12532         if( status ) return status;
12533 #else
12534         /* Draft 4 pthreads */
12535         status = pthread_create( &t, pthread_attr_default, task, NULL );
12536         if( status ) return errno;
12537
12538         /* give thread a chance to complete */
12539         /* it should remain joinable and hence detachable */
12540         sleep( 1 );
12541
12542         status = pthread_detach( &t );
12543         if( status ) return errno;
12544 #endif
12545
12546 #ifdef HAVE_LINUX_THREADS
12547         pthread_kill_other_threads_np();
12548 #endif
12549
12550         return 0;
12551
12552 }
12553
12554 EOF
12555 if { (eval echo configure:12556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12556 then
12557   ol_cv_pthread_mthreads=yes
12558 else
12559   echo "configure: failed program was:" >&5
12560   cat conftest.$ac_ext >&5
12561   rm -fr conftest*
12562   ol_cv_pthread_mthreads=no
12563 fi
12564 rm -fr conftest*
12565 fi
12566
12567
12568                 # restore the LIBS
12569                 LIBS="$ol_LIBS"
12570         
12571 fi
12572
12573 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12574
12575         if test $ol_cv_pthread_mthreads = yes ; then
12576                 ol_link_pthreads="-mthreads"
12577                 ol_link_threads=posix
12578         fi
12579 fi
12580
12581                 # Pthread try link: -thread (ol_cv_pthread_thread)
12582 if test "$ol_link_threads" = no ; then
12583         # try -thread
12584         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12585 echo "configure:12586: checking for pthread link with -thread" >&5
12586 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12587   echo $ac_n "(cached) $ac_c" 1>&6
12588 else
12589   
12590                 # save the flags
12591                 ol_LIBS="$LIBS"
12592                 LIBS="-thread $LIBS"
12593
12594                 if test "$cross_compiling" = yes; then
12595   cat > conftest.$ac_ext <<EOF
12596 #line 12597 "configure"
12597 #include "confdefs.h"
12598 /* pthread test headers */
12599 #include <pthread.h>
12600 #if HAVE_PTHREADS < 7
12601 #include <errno.h>
12602 #endif
12603 #ifndef NULL
12604 #define NULL (void*)0
12605 #endif
12606
12607 static void *task(p)
12608         void *p;
12609 {
12610         return (void *) (p == NULL);
12611 }
12612
12613 int main() {
12614
12615         /* pthread test function */
12616 #ifndef PTHREAD_CREATE_DETACHED
12617 #define PTHREAD_CREATE_DETACHED 1
12618 #endif
12619         pthread_t t;
12620         int status;
12621         int detach = PTHREAD_CREATE_DETACHED;
12622
12623 #if HAVE_PTHREADS > 4
12624         /* Final pthreads */
12625         pthread_attr_t attr;
12626
12627         status = pthread_attr_init(&attr);
12628         if( status ) return status;
12629
12630 #if HAVE_PTHREADS < 7
12631         status = pthread_attr_setdetachstate(&attr, &detach);
12632         if( status < 0 ) status = errno;
12633 #else
12634         status = pthread_attr_setdetachstate(&attr, detach);
12635 #endif
12636         if( status ) return status;
12637         status = pthread_create( &t, &attr, task, NULL );
12638 #if HAVE_PTHREADS < 7
12639         if( status < 0 ) status = errno;
12640 #endif
12641         if( status ) return status;
12642 #else
12643         /* Draft 4 pthreads */
12644         status = pthread_create( &t, pthread_attr_default, task, NULL );
12645         if( status ) return errno;
12646
12647         /* give thread a chance to complete */
12648         /* it should remain joinable and hence detachable */
12649         sleep( 1 );
12650
12651         status = pthread_detach( &t );
12652         if( status ) return errno;
12653 #endif
12654
12655 #ifdef HAVE_LINUX_THREADS
12656         pthread_kill_other_threads_np();
12657 #endif
12658
12659         return 0;
12660
12661 ; return 0; }
12662 EOF
12663 if { (eval echo configure:12664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12664   rm -rf conftest*
12665   ol_cv_pthread_thread=yes
12666 else
12667   echo "configure: failed program was:" >&5
12668   cat conftest.$ac_ext >&5
12669   rm -rf conftest*
12670   ol_cv_pthread_thread=no
12671 fi
12672 rm -f conftest*
12673 else
12674   cat > conftest.$ac_ext <<EOF
12675 #line 12676 "configure"
12676 #include "confdefs.h"
12677 /* pthread test headers */
12678 #include <pthread.h>
12679 #if HAVE_PTHREADS < 7
12680 #include <errno.h>
12681 #endif
12682 #ifndef NULL
12683 #define NULL (void*)0
12684 #endif
12685
12686 static void *task(p)
12687         void *p;
12688 {
12689         return (void *) (p == NULL);
12690 }
12691
12692
12693 int main(argc, argv)
12694         int argc;
12695         char **argv;
12696 {
12697
12698         /* pthread test function */
12699 #ifndef PTHREAD_CREATE_DETACHED
12700 #define PTHREAD_CREATE_DETACHED 1
12701 #endif
12702         pthread_t t;
12703         int status;
12704         int detach = PTHREAD_CREATE_DETACHED;
12705
12706 #if HAVE_PTHREADS > 4
12707         /* Final pthreads */
12708         pthread_attr_t attr;
12709
12710         status = pthread_attr_init(&attr);
12711         if( status ) return status;
12712
12713 #if HAVE_PTHREADS < 7
12714         status = pthread_attr_setdetachstate(&attr, &detach);
12715         if( status < 0 ) status = errno;
12716 #else
12717         status = pthread_attr_setdetachstate(&attr, detach);
12718 #endif
12719         if( status ) return status;
12720         status = pthread_create( &t, &attr, task, NULL );
12721 #if HAVE_PTHREADS < 7
12722         if( status < 0 ) status = errno;
12723 #endif
12724         if( status ) return status;
12725 #else
12726         /* Draft 4 pthreads */
12727         status = pthread_create( &t, pthread_attr_default, task, NULL );
12728         if( status ) return errno;
12729
12730         /* give thread a chance to complete */
12731         /* it should remain joinable and hence detachable */
12732         sleep( 1 );
12733
12734         status = pthread_detach( &t );
12735         if( status ) return errno;
12736 #endif
12737
12738 #ifdef HAVE_LINUX_THREADS
12739         pthread_kill_other_threads_np();
12740 #endif
12741
12742         return 0;
12743
12744 }
12745
12746 EOF
12747 if { (eval echo configure:12748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12748 then
12749   ol_cv_pthread_thread=yes
12750 else
12751   echo "configure: failed program was:" >&5
12752   cat conftest.$ac_ext >&5
12753   rm -fr conftest*
12754   ol_cv_pthread_thread=no
12755 fi
12756 rm -fr conftest*
12757 fi
12758
12759
12760                 # restore the LIBS
12761                 LIBS="$ol_LIBS"
12762         
12763 fi
12764
12765 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12766
12767         if test $ol_cv_pthread_thread = yes ; then
12768                 ol_link_pthreads="-thread"
12769                 ol_link_threads=posix
12770         fi
12771 fi
12772
12773
12774                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12775 if test "$ol_link_threads" = no ; then
12776         # try -lpthread -lmach -lexc -lc_r
12777         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12778 echo "configure:12779: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12779 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12780   echo $ac_n "(cached) $ac_c" 1>&6
12781 else
12782   
12783                 # save the flags
12784                 ol_LIBS="$LIBS"
12785                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12786
12787                 if test "$cross_compiling" = yes; then
12788   cat > conftest.$ac_ext <<EOF
12789 #line 12790 "configure"
12790 #include "confdefs.h"
12791 /* pthread test headers */
12792 #include <pthread.h>
12793 #if HAVE_PTHREADS < 7
12794 #include <errno.h>
12795 #endif
12796 #ifndef NULL
12797 #define NULL (void*)0
12798 #endif
12799
12800 static void *task(p)
12801         void *p;
12802 {
12803         return (void *) (p == NULL);
12804 }
12805
12806 int main() {
12807
12808         /* pthread test function */
12809 #ifndef PTHREAD_CREATE_DETACHED
12810 #define PTHREAD_CREATE_DETACHED 1
12811 #endif
12812         pthread_t t;
12813         int status;
12814         int detach = PTHREAD_CREATE_DETACHED;
12815
12816 #if HAVE_PTHREADS > 4
12817         /* Final pthreads */
12818         pthread_attr_t attr;
12819
12820         status = pthread_attr_init(&attr);
12821         if( status ) return status;
12822
12823 #if HAVE_PTHREADS < 7
12824         status = pthread_attr_setdetachstate(&attr, &detach);
12825         if( status < 0 ) status = errno;
12826 #else
12827         status = pthread_attr_setdetachstate(&attr, detach);
12828 #endif
12829         if( status ) return status;
12830         status = pthread_create( &t, &attr, task, NULL );
12831 #if HAVE_PTHREADS < 7
12832         if( status < 0 ) status = errno;
12833 #endif
12834         if( status ) return status;
12835 #else
12836         /* Draft 4 pthreads */
12837         status = pthread_create( &t, pthread_attr_default, task, NULL );
12838         if( status ) return errno;
12839
12840         /* give thread a chance to complete */
12841         /* it should remain joinable and hence detachable */
12842         sleep( 1 );
12843
12844         status = pthread_detach( &t );
12845         if( status ) return errno;
12846 #endif
12847
12848 #ifdef HAVE_LINUX_THREADS
12849         pthread_kill_other_threads_np();
12850 #endif
12851
12852         return 0;
12853
12854 ; return 0; }
12855 EOF
12856 if { (eval echo configure:12857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12857   rm -rf conftest*
12858   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12859 else
12860   echo "configure: failed program was:" >&5
12861   cat conftest.$ac_ext >&5
12862   rm -rf conftest*
12863   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12864 fi
12865 rm -f conftest*
12866 else
12867   cat > conftest.$ac_ext <<EOF
12868 #line 12869 "configure"
12869 #include "confdefs.h"
12870 /* pthread test headers */
12871 #include <pthread.h>
12872 #if HAVE_PTHREADS < 7
12873 #include <errno.h>
12874 #endif
12875 #ifndef NULL
12876 #define NULL (void*)0
12877 #endif
12878
12879 static void *task(p)
12880         void *p;
12881 {
12882         return (void *) (p == NULL);
12883 }
12884
12885
12886 int main(argc, argv)
12887         int argc;
12888         char **argv;
12889 {
12890
12891         /* pthread test function */
12892 #ifndef PTHREAD_CREATE_DETACHED
12893 #define PTHREAD_CREATE_DETACHED 1
12894 #endif
12895         pthread_t t;
12896         int status;
12897         int detach = PTHREAD_CREATE_DETACHED;
12898
12899 #if HAVE_PTHREADS > 4
12900         /* Final pthreads */
12901         pthread_attr_t attr;
12902
12903         status = pthread_attr_init(&attr);
12904         if( status ) return status;
12905
12906 #if HAVE_PTHREADS < 7
12907         status = pthread_attr_setdetachstate(&attr, &detach);
12908         if( status < 0 ) status = errno;
12909 #else
12910         status = pthread_attr_setdetachstate(&attr, detach);
12911 #endif
12912         if( status ) return status;
12913         status = pthread_create( &t, &attr, task, NULL );
12914 #if HAVE_PTHREADS < 7
12915         if( status < 0 ) status = errno;
12916 #endif
12917         if( status ) return status;
12918 #else
12919         /* Draft 4 pthreads */
12920         status = pthread_create( &t, pthread_attr_default, task, NULL );
12921         if( status ) return errno;
12922
12923         /* give thread a chance to complete */
12924         /* it should remain joinable and hence detachable */
12925         sleep( 1 );
12926
12927         status = pthread_detach( &t );
12928         if( status ) return errno;
12929 #endif
12930
12931 #ifdef HAVE_LINUX_THREADS
12932         pthread_kill_other_threads_np();
12933 #endif
12934
12935         return 0;
12936
12937 }
12938
12939 EOF
12940 if { (eval echo configure:12941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12941 then
12942   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12943 else
12944   echo "configure: failed program was:" >&5
12945   cat conftest.$ac_ext >&5
12946   rm -fr conftest*
12947   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12948 fi
12949 rm -fr conftest*
12950 fi
12951
12952
12953                 # restore the LIBS
12954                 LIBS="$ol_LIBS"
12955         
12956 fi
12957
12958 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12959
12960         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12961                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12962                 ol_link_threads=posix
12963         fi
12964 fi
12965
12966                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12967 if test "$ol_link_threads" = no ; then
12968         # try -lpthread -lmach -lexc
12969         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12970 echo "configure:12971: checking for pthread link with -lpthread -lmach -lexc" >&5
12971 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12972   echo $ac_n "(cached) $ac_c" 1>&6
12973 else
12974   
12975                 # save the flags
12976                 ol_LIBS="$LIBS"
12977                 LIBS="-lpthread -lmach -lexc $LIBS"
12978
12979                 if test "$cross_compiling" = yes; then
12980   cat > conftest.$ac_ext <<EOF
12981 #line 12982 "configure"
12982 #include "confdefs.h"
12983 /* pthread test headers */
12984 #include <pthread.h>
12985 #if HAVE_PTHREADS < 7
12986 #include <errno.h>
12987 #endif
12988 #ifndef NULL
12989 #define NULL (void*)0
12990 #endif
12991
12992 static void *task(p)
12993         void *p;
12994 {
12995         return (void *) (p == NULL);
12996 }
12997
12998 int main() {
12999
13000         /* pthread test function */
13001 #ifndef PTHREAD_CREATE_DETACHED
13002 #define PTHREAD_CREATE_DETACHED 1
13003 #endif
13004         pthread_t t;
13005         int status;
13006         int detach = PTHREAD_CREATE_DETACHED;
13007
13008 #if HAVE_PTHREADS > 4
13009         /* Final pthreads */
13010         pthread_attr_t attr;
13011
13012         status = pthread_attr_init(&attr);
13013         if( status ) return status;
13014
13015 #if HAVE_PTHREADS < 7
13016         status = pthread_attr_setdetachstate(&attr, &detach);
13017         if( status < 0 ) status = errno;
13018 #else
13019         status = pthread_attr_setdetachstate(&attr, detach);
13020 #endif
13021         if( status ) return status;
13022         status = pthread_create( &t, &attr, task, NULL );
13023 #if HAVE_PTHREADS < 7
13024         if( status < 0 ) status = errno;
13025 #endif
13026         if( status ) return status;
13027 #else
13028         /* Draft 4 pthreads */
13029         status = pthread_create( &t, pthread_attr_default, task, NULL );
13030         if( status ) return errno;
13031
13032         /* give thread a chance to complete */
13033         /* it should remain joinable and hence detachable */
13034         sleep( 1 );
13035
13036         status = pthread_detach( &t );
13037         if( status ) return errno;
13038 #endif
13039
13040 #ifdef HAVE_LINUX_THREADS
13041         pthread_kill_other_threads_np();
13042 #endif
13043
13044         return 0;
13045
13046 ; return 0; }
13047 EOF
13048 if { (eval echo configure:13049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13049   rm -rf conftest*
13050   ol_cv_pthread_lpthread_lmach_lexc=yes
13051 else
13052   echo "configure: failed program was:" >&5
13053   cat conftest.$ac_ext >&5
13054   rm -rf conftest*
13055   ol_cv_pthread_lpthread_lmach_lexc=no
13056 fi
13057 rm -f conftest*
13058 else
13059   cat > conftest.$ac_ext <<EOF
13060 #line 13061 "configure"
13061 #include "confdefs.h"
13062 /* pthread test headers */
13063 #include <pthread.h>
13064 #if HAVE_PTHREADS < 7
13065 #include <errno.h>
13066 #endif
13067 #ifndef NULL
13068 #define NULL (void*)0
13069 #endif
13070
13071 static void *task(p)
13072         void *p;
13073 {
13074         return (void *) (p == NULL);
13075 }
13076
13077
13078 int main(argc, argv)
13079         int argc;
13080         char **argv;
13081 {
13082
13083         /* pthread test function */
13084 #ifndef PTHREAD_CREATE_DETACHED
13085 #define PTHREAD_CREATE_DETACHED 1
13086 #endif
13087         pthread_t t;
13088         int status;
13089         int detach = PTHREAD_CREATE_DETACHED;
13090
13091 #if HAVE_PTHREADS > 4
13092         /* Final pthreads */
13093         pthread_attr_t attr;
13094
13095         status = pthread_attr_init(&attr);
13096         if( status ) return status;
13097
13098 #if HAVE_PTHREADS < 7
13099         status = pthread_attr_setdetachstate(&attr, &detach);
13100         if( status < 0 ) status = errno;
13101 #else
13102         status = pthread_attr_setdetachstate(&attr, detach);
13103 #endif
13104         if( status ) return status;
13105         status = pthread_create( &t, &attr, task, NULL );
13106 #if HAVE_PTHREADS < 7
13107         if( status < 0 ) status = errno;
13108 #endif
13109         if( status ) return status;
13110 #else
13111         /* Draft 4 pthreads */
13112         status = pthread_create( &t, pthread_attr_default, task, NULL );
13113         if( status ) return errno;
13114
13115         /* give thread a chance to complete */
13116         /* it should remain joinable and hence detachable */
13117         sleep( 1 );
13118
13119         status = pthread_detach( &t );
13120         if( status ) return errno;
13121 #endif
13122
13123 #ifdef HAVE_LINUX_THREADS
13124         pthread_kill_other_threads_np();
13125 #endif
13126
13127         return 0;
13128
13129 }
13130
13131 EOF
13132 if { (eval echo configure:13133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13133 then
13134   ol_cv_pthread_lpthread_lmach_lexc=yes
13135 else
13136   echo "configure: failed program was:" >&5
13137   cat conftest.$ac_ext >&5
13138   rm -fr conftest*
13139   ol_cv_pthread_lpthread_lmach_lexc=no
13140 fi
13141 rm -fr conftest*
13142 fi
13143
13144
13145                 # restore the LIBS
13146                 LIBS="$ol_LIBS"
13147         
13148 fi
13149
13150 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13151
13152         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13153                 ol_link_pthreads="-lpthread -lmach -lexc"
13154                 ol_link_threads=posix
13155         fi
13156 fi
13157
13158
13159                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13160 if test "$ol_link_threads" = no ; then
13161         # try -lpthread -Wl,-woff,85
13162         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13163 echo "configure:13164: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13164 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13165   echo $ac_n "(cached) $ac_c" 1>&6
13166 else
13167   
13168                 # save the flags
13169                 ol_LIBS="$LIBS"
13170                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13171
13172                 if test "$cross_compiling" = yes; then
13173   cat > conftest.$ac_ext <<EOF
13174 #line 13175 "configure"
13175 #include "confdefs.h"
13176 /* pthread test headers */
13177 #include <pthread.h>
13178 #if HAVE_PTHREADS < 7
13179 #include <errno.h>
13180 #endif
13181 #ifndef NULL
13182 #define NULL (void*)0
13183 #endif
13184
13185 static void *task(p)
13186         void *p;
13187 {
13188         return (void *) (p == NULL);
13189 }
13190
13191 int main() {
13192
13193         /* pthread test function */
13194 #ifndef PTHREAD_CREATE_DETACHED
13195 #define PTHREAD_CREATE_DETACHED 1
13196 #endif
13197         pthread_t t;
13198         int status;
13199         int detach = PTHREAD_CREATE_DETACHED;
13200
13201 #if HAVE_PTHREADS > 4
13202         /* Final pthreads */
13203         pthread_attr_t attr;
13204
13205         status = pthread_attr_init(&attr);
13206         if( status ) return status;
13207
13208 #if HAVE_PTHREADS < 7
13209         status = pthread_attr_setdetachstate(&attr, &detach);
13210         if( status < 0 ) status = errno;
13211 #else
13212         status = pthread_attr_setdetachstate(&attr, detach);
13213 #endif
13214         if( status ) return status;
13215         status = pthread_create( &t, &attr, task, NULL );
13216 #if HAVE_PTHREADS < 7
13217         if( status < 0 ) status = errno;
13218 #endif
13219         if( status ) return status;
13220 #else
13221         /* Draft 4 pthreads */
13222         status = pthread_create( &t, pthread_attr_default, task, NULL );
13223         if( status ) return errno;
13224
13225         /* give thread a chance to complete */
13226         /* it should remain joinable and hence detachable */
13227         sleep( 1 );
13228
13229         status = pthread_detach( &t );
13230         if( status ) return errno;
13231 #endif
13232
13233 #ifdef HAVE_LINUX_THREADS
13234         pthread_kill_other_threads_np();
13235 #endif
13236
13237         return 0;
13238
13239 ; return 0; }
13240 EOF
13241 if { (eval echo configure:13242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13242   rm -rf conftest*
13243   ol_cv_pthread_lib_lpthread_woff=yes
13244 else
13245   echo "configure: failed program was:" >&5
13246   cat conftest.$ac_ext >&5
13247   rm -rf conftest*
13248   ol_cv_pthread_lib_lpthread_woff=no
13249 fi
13250 rm -f conftest*
13251 else
13252   cat > conftest.$ac_ext <<EOF
13253 #line 13254 "configure"
13254 #include "confdefs.h"
13255 /* pthread test headers */
13256 #include <pthread.h>
13257 #if HAVE_PTHREADS < 7
13258 #include <errno.h>
13259 #endif
13260 #ifndef NULL
13261 #define NULL (void*)0
13262 #endif
13263
13264 static void *task(p)
13265         void *p;
13266 {
13267         return (void *) (p == NULL);
13268 }
13269
13270
13271 int main(argc, argv)
13272         int argc;
13273         char **argv;
13274 {
13275
13276         /* pthread test function */
13277 #ifndef PTHREAD_CREATE_DETACHED
13278 #define PTHREAD_CREATE_DETACHED 1
13279 #endif
13280         pthread_t t;
13281         int status;
13282         int detach = PTHREAD_CREATE_DETACHED;
13283
13284 #if HAVE_PTHREADS > 4
13285         /* Final pthreads */
13286         pthread_attr_t attr;
13287
13288         status = pthread_attr_init(&attr);
13289         if( status ) return status;
13290
13291 #if HAVE_PTHREADS < 7
13292         status = pthread_attr_setdetachstate(&attr, &detach);
13293         if( status < 0 ) status = errno;
13294 #else
13295         status = pthread_attr_setdetachstate(&attr, detach);
13296 #endif
13297         if( status ) return status;
13298         status = pthread_create( &t, &attr, task, NULL );
13299 #if HAVE_PTHREADS < 7
13300         if( status < 0 ) status = errno;
13301 #endif
13302         if( status ) return status;
13303 #else
13304         /* Draft 4 pthreads */
13305         status = pthread_create( &t, pthread_attr_default, task, NULL );
13306         if( status ) return errno;
13307
13308         /* give thread a chance to complete */
13309         /* it should remain joinable and hence detachable */
13310         sleep( 1 );
13311
13312         status = pthread_detach( &t );
13313         if( status ) return errno;
13314 #endif
13315
13316 #ifdef HAVE_LINUX_THREADS
13317         pthread_kill_other_threads_np();
13318 #endif
13319
13320         return 0;
13321
13322 }
13323
13324 EOF
13325 if { (eval echo configure:13326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13326 then
13327   ol_cv_pthread_lib_lpthread_woff=yes
13328 else
13329   echo "configure: failed program was:" >&5
13330   cat conftest.$ac_ext >&5
13331   rm -fr conftest*
13332   ol_cv_pthread_lib_lpthread_woff=no
13333 fi
13334 rm -fr conftest*
13335 fi
13336
13337
13338                 # restore the LIBS
13339                 LIBS="$ol_LIBS"
13340         
13341 fi
13342
13343 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13344
13345         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13346                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13347                 ol_link_threads=posix
13348         fi
13349 fi
13350
13351
13352                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13353 if test "$ol_link_threads" = no ; then
13354         # try -lpthread
13355         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13356 echo "configure:13357: checking for pthread link with -lpthread" >&5
13357 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13358   echo $ac_n "(cached) $ac_c" 1>&6
13359 else
13360   
13361                 # save the flags
13362                 ol_LIBS="$LIBS"
13363                 LIBS="-lpthread $LIBS"
13364
13365                 if test "$cross_compiling" = yes; then
13366   cat > conftest.$ac_ext <<EOF
13367 #line 13368 "configure"
13368 #include "confdefs.h"
13369 /* pthread test headers */
13370 #include <pthread.h>
13371 #if HAVE_PTHREADS < 7
13372 #include <errno.h>
13373 #endif
13374 #ifndef NULL
13375 #define NULL (void*)0
13376 #endif
13377
13378 static void *task(p)
13379         void *p;
13380 {
13381         return (void *) (p == NULL);
13382 }
13383
13384 int main() {
13385
13386         /* pthread test function */
13387 #ifndef PTHREAD_CREATE_DETACHED
13388 #define PTHREAD_CREATE_DETACHED 1
13389 #endif
13390         pthread_t t;
13391         int status;
13392         int detach = PTHREAD_CREATE_DETACHED;
13393
13394 #if HAVE_PTHREADS > 4
13395         /* Final pthreads */
13396         pthread_attr_t attr;
13397
13398         status = pthread_attr_init(&attr);
13399         if( status ) return status;
13400
13401 #if HAVE_PTHREADS < 7
13402         status = pthread_attr_setdetachstate(&attr, &detach);
13403         if( status < 0 ) status = errno;
13404 #else
13405         status = pthread_attr_setdetachstate(&attr, detach);
13406 #endif
13407         if( status ) return status;
13408         status = pthread_create( &t, &attr, task, NULL );
13409 #if HAVE_PTHREADS < 7
13410         if( status < 0 ) status = errno;
13411 #endif
13412         if( status ) return status;
13413 #else
13414         /* Draft 4 pthreads */
13415         status = pthread_create( &t, pthread_attr_default, task, NULL );
13416         if( status ) return errno;
13417
13418         /* give thread a chance to complete */
13419         /* it should remain joinable and hence detachable */
13420         sleep( 1 );
13421
13422         status = pthread_detach( &t );
13423         if( status ) return errno;
13424 #endif
13425
13426 #ifdef HAVE_LINUX_THREADS
13427         pthread_kill_other_threads_np();
13428 #endif
13429
13430         return 0;
13431
13432 ; return 0; }
13433 EOF
13434 if { (eval echo configure:13435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13435   rm -rf conftest*
13436   ol_cv_pthread_lpthread=yes
13437 else
13438   echo "configure: failed program was:" >&5
13439   cat conftest.$ac_ext >&5
13440   rm -rf conftest*
13441   ol_cv_pthread_lpthread=no
13442 fi
13443 rm -f conftest*
13444 else
13445   cat > conftest.$ac_ext <<EOF
13446 #line 13447 "configure"
13447 #include "confdefs.h"
13448 /* pthread test headers */
13449 #include <pthread.h>
13450 #if HAVE_PTHREADS < 7
13451 #include <errno.h>
13452 #endif
13453 #ifndef NULL
13454 #define NULL (void*)0
13455 #endif
13456
13457 static void *task(p)
13458         void *p;
13459 {
13460         return (void *) (p == NULL);
13461 }
13462
13463
13464 int main(argc, argv)
13465         int argc;
13466         char **argv;
13467 {
13468
13469         /* pthread test function */
13470 #ifndef PTHREAD_CREATE_DETACHED
13471 #define PTHREAD_CREATE_DETACHED 1
13472 #endif
13473         pthread_t t;
13474         int status;
13475         int detach = PTHREAD_CREATE_DETACHED;
13476
13477 #if HAVE_PTHREADS > 4
13478         /* Final pthreads */
13479         pthread_attr_t attr;
13480
13481         status = pthread_attr_init(&attr);
13482         if( status ) return status;
13483
13484 #if HAVE_PTHREADS < 7
13485         status = pthread_attr_setdetachstate(&attr, &detach);
13486         if( status < 0 ) status = errno;
13487 #else
13488         status = pthread_attr_setdetachstate(&attr, detach);
13489 #endif
13490         if( status ) return status;
13491         status = pthread_create( &t, &attr, task, NULL );
13492 #if HAVE_PTHREADS < 7
13493         if( status < 0 ) status = errno;
13494 #endif
13495         if( status ) return status;
13496 #else
13497         /* Draft 4 pthreads */
13498         status = pthread_create( &t, pthread_attr_default, task, NULL );
13499         if( status ) return errno;
13500
13501         /* give thread a chance to complete */
13502         /* it should remain joinable and hence detachable */
13503         sleep( 1 );
13504
13505         status = pthread_detach( &t );
13506         if( status ) return errno;
13507 #endif
13508
13509 #ifdef HAVE_LINUX_THREADS
13510         pthread_kill_other_threads_np();
13511 #endif
13512
13513         return 0;
13514
13515 }
13516
13517 EOF
13518 if { (eval echo configure:13519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13519 then
13520   ol_cv_pthread_lpthread=yes
13521 else
13522   echo "configure: failed program was:" >&5
13523   cat conftest.$ac_ext >&5
13524   rm -fr conftest*
13525   ol_cv_pthread_lpthread=no
13526 fi
13527 rm -fr conftest*
13528 fi
13529
13530
13531                 # restore the LIBS
13532                 LIBS="$ol_LIBS"
13533         
13534 fi
13535
13536 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13537
13538         if test $ol_cv_pthread_lpthread = yes ; then
13539                 ol_link_pthreads="-lpthread"
13540                 ol_link_threads=posix
13541         fi
13542 fi
13543
13544                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13545 if test "$ol_link_threads" = no ; then
13546         # try -lc_r
13547         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13548 echo "configure:13549: checking for pthread link with -lc_r" >&5
13549 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13550   echo $ac_n "(cached) $ac_c" 1>&6
13551 else
13552   
13553                 # save the flags
13554                 ol_LIBS="$LIBS"
13555                 LIBS="-lc_r $LIBS"
13556
13557                 if test "$cross_compiling" = yes; then
13558   cat > conftest.$ac_ext <<EOF
13559 #line 13560 "configure"
13560 #include "confdefs.h"
13561 /* pthread test headers */
13562 #include <pthread.h>
13563 #if HAVE_PTHREADS < 7
13564 #include <errno.h>
13565 #endif
13566 #ifndef NULL
13567 #define NULL (void*)0
13568 #endif
13569
13570 static void *task(p)
13571         void *p;
13572 {
13573         return (void *) (p == NULL);
13574 }
13575
13576 int main() {
13577
13578         /* pthread test function */
13579 #ifndef PTHREAD_CREATE_DETACHED
13580 #define PTHREAD_CREATE_DETACHED 1
13581 #endif
13582         pthread_t t;
13583         int status;
13584         int detach = PTHREAD_CREATE_DETACHED;
13585
13586 #if HAVE_PTHREADS > 4
13587         /* Final pthreads */
13588         pthread_attr_t attr;
13589
13590         status = pthread_attr_init(&attr);
13591         if( status ) return status;
13592
13593 #if HAVE_PTHREADS < 7
13594         status = pthread_attr_setdetachstate(&attr, &detach);
13595         if( status < 0 ) status = errno;
13596 #else
13597         status = pthread_attr_setdetachstate(&attr, detach);
13598 #endif
13599         if( status ) return status;
13600         status = pthread_create( &t, &attr, task, NULL );
13601 #if HAVE_PTHREADS < 7
13602         if( status < 0 ) status = errno;
13603 #endif
13604         if( status ) return status;
13605 #else
13606         /* Draft 4 pthreads */
13607         status = pthread_create( &t, pthread_attr_default, task, NULL );
13608         if( status ) return errno;
13609
13610         /* give thread a chance to complete */
13611         /* it should remain joinable and hence detachable */
13612         sleep( 1 );
13613
13614         status = pthread_detach( &t );
13615         if( status ) return errno;
13616 #endif
13617
13618 #ifdef HAVE_LINUX_THREADS
13619         pthread_kill_other_threads_np();
13620 #endif
13621
13622         return 0;
13623
13624 ; return 0; }
13625 EOF
13626 if { (eval echo configure:13627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13627   rm -rf conftest*
13628   ol_cv_pthread_lc_r=yes
13629 else
13630   echo "configure: failed program was:" >&5
13631   cat conftest.$ac_ext >&5
13632   rm -rf conftest*
13633   ol_cv_pthread_lc_r=no
13634 fi
13635 rm -f conftest*
13636 else
13637   cat > conftest.$ac_ext <<EOF
13638 #line 13639 "configure"
13639 #include "confdefs.h"
13640 /* pthread test headers */
13641 #include <pthread.h>
13642 #if HAVE_PTHREADS < 7
13643 #include <errno.h>
13644 #endif
13645 #ifndef NULL
13646 #define NULL (void*)0
13647 #endif
13648
13649 static void *task(p)
13650         void *p;
13651 {
13652         return (void *) (p == NULL);
13653 }
13654
13655
13656 int main(argc, argv)
13657         int argc;
13658         char **argv;
13659 {
13660
13661         /* pthread test function */
13662 #ifndef PTHREAD_CREATE_DETACHED
13663 #define PTHREAD_CREATE_DETACHED 1
13664 #endif
13665         pthread_t t;
13666         int status;
13667         int detach = PTHREAD_CREATE_DETACHED;
13668
13669 #if HAVE_PTHREADS > 4
13670         /* Final pthreads */
13671         pthread_attr_t attr;
13672
13673         status = pthread_attr_init(&attr);
13674         if( status ) return status;
13675
13676 #if HAVE_PTHREADS < 7
13677         status = pthread_attr_setdetachstate(&attr, &detach);
13678         if( status < 0 ) status = errno;
13679 #else
13680         status = pthread_attr_setdetachstate(&attr, detach);
13681 #endif
13682         if( status ) return status;
13683         status = pthread_create( &t, &attr, task, NULL );
13684 #if HAVE_PTHREADS < 7
13685         if( status < 0 ) status = errno;
13686 #endif
13687         if( status ) return status;
13688 #else
13689         /* Draft 4 pthreads */
13690         status = pthread_create( &t, pthread_attr_default, task, NULL );
13691         if( status ) return errno;
13692
13693         /* give thread a chance to complete */
13694         /* it should remain joinable and hence detachable */
13695         sleep( 1 );
13696
13697         status = pthread_detach( &t );
13698         if( status ) return errno;
13699 #endif
13700
13701 #ifdef HAVE_LINUX_THREADS
13702         pthread_kill_other_threads_np();
13703 #endif
13704
13705         return 0;
13706
13707 }
13708
13709 EOF
13710 if { (eval echo configure:13711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13711 then
13712   ol_cv_pthread_lc_r=yes
13713 else
13714   echo "configure: failed program was:" >&5
13715   cat conftest.$ac_ext >&5
13716   rm -fr conftest*
13717   ol_cv_pthread_lc_r=no
13718 fi
13719 rm -fr conftest*
13720 fi
13721
13722
13723                 # restore the LIBS
13724                 LIBS="$ol_LIBS"
13725         
13726 fi
13727
13728 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13729
13730         if test $ol_cv_pthread_lc_r = yes ; then
13731                 ol_link_pthreads="-lc_r"
13732                 ol_link_threads=posix
13733         fi
13734 fi
13735
13736
13737                 # Pthread try link: -threads (ol_cv_pthread_threads)
13738 if test "$ol_link_threads" = no ; then
13739         # try -threads
13740         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13741 echo "configure:13742: checking for pthread link with -threads" >&5
13742 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13743   echo $ac_n "(cached) $ac_c" 1>&6
13744 else
13745   
13746                 # save the flags
13747                 ol_LIBS="$LIBS"
13748                 LIBS="-threads $LIBS"
13749
13750                 if test "$cross_compiling" = yes; then
13751   cat > conftest.$ac_ext <<EOF
13752 #line 13753 "configure"
13753 #include "confdefs.h"
13754 /* pthread test headers */
13755 #include <pthread.h>
13756 #if HAVE_PTHREADS < 7
13757 #include <errno.h>
13758 #endif
13759 #ifndef NULL
13760 #define NULL (void*)0
13761 #endif
13762
13763 static void *task(p)
13764         void *p;
13765 {
13766         return (void *) (p == NULL);
13767 }
13768
13769 int main() {
13770
13771         /* pthread test function */
13772 #ifndef PTHREAD_CREATE_DETACHED
13773 #define PTHREAD_CREATE_DETACHED 1
13774 #endif
13775         pthread_t t;
13776         int status;
13777         int detach = PTHREAD_CREATE_DETACHED;
13778
13779 #if HAVE_PTHREADS > 4
13780         /* Final pthreads */
13781         pthread_attr_t attr;
13782
13783         status = pthread_attr_init(&attr);
13784         if( status ) return status;
13785
13786 #if HAVE_PTHREADS < 7
13787         status = pthread_attr_setdetachstate(&attr, &detach);
13788         if( status < 0 ) status = errno;
13789 #else
13790         status = pthread_attr_setdetachstate(&attr, detach);
13791 #endif
13792         if( status ) return status;
13793         status = pthread_create( &t, &attr, task, NULL );
13794 #if HAVE_PTHREADS < 7
13795         if( status < 0 ) status = errno;
13796 #endif
13797         if( status ) return status;
13798 #else
13799         /* Draft 4 pthreads */
13800         status = pthread_create( &t, pthread_attr_default, task, NULL );
13801         if( status ) return errno;
13802
13803         /* give thread a chance to complete */
13804         /* it should remain joinable and hence detachable */
13805         sleep( 1 );
13806
13807         status = pthread_detach( &t );
13808         if( status ) return errno;
13809 #endif
13810
13811 #ifdef HAVE_LINUX_THREADS
13812         pthread_kill_other_threads_np();
13813 #endif
13814
13815         return 0;
13816
13817 ; return 0; }
13818 EOF
13819 if { (eval echo configure:13820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13820   rm -rf conftest*
13821   ol_cv_pthread_threads=yes
13822 else
13823   echo "configure: failed program was:" >&5
13824   cat conftest.$ac_ext >&5
13825   rm -rf conftest*
13826   ol_cv_pthread_threads=no
13827 fi
13828 rm -f conftest*
13829 else
13830   cat > conftest.$ac_ext <<EOF
13831 #line 13832 "configure"
13832 #include "confdefs.h"
13833 /* pthread test headers */
13834 #include <pthread.h>
13835 #if HAVE_PTHREADS < 7
13836 #include <errno.h>
13837 #endif
13838 #ifndef NULL
13839 #define NULL (void*)0
13840 #endif
13841
13842 static void *task(p)
13843         void *p;
13844 {
13845         return (void *) (p == NULL);
13846 }
13847
13848
13849 int main(argc, argv)
13850         int argc;
13851         char **argv;
13852 {
13853
13854         /* pthread test function */
13855 #ifndef PTHREAD_CREATE_DETACHED
13856 #define PTHREAD_CREATE_DETACHED 1
13857 #endif
13858         pthread_t t;
13859         int status;
13860         int detach = PTHREAD_CREATE_DETACHED;
13861
13862 #if HAVE_PTHREADS > 4
13863         /* Final pthreads */
13864         pthread_attr_t attr;
13865
13866         status = pthread_attr_init(&attr);
13867         if( status ) return status;
13868
13869 #if HAVE_PTHREADS < 7
13870         status = pthread_attr_setdetachstate(&attr, &detach);
13871         if( status < 0 ) status = errno;
13872 #else
13873         status = pthread_attr_setdetachstate(&attr, detach);
13874 #endif
13875         if( status ) return status;
13876         status = pthread_create( &t, &attr, task, NULL );
13877 #if HAVE_PTHREADS < 7
13878         if( status < 0 ) status = errno;
13879 #endif
13880         if( status ) return status;
13881 #else
13882         /* Draft 4 pthreads */
13883         status = pthread_create( &t, pthread_attr_default, task, NULL );
13884         if( status ) return errno;
13885
13886         /* give thread a chance to complete */
13887         /* it should remain joinable and hence detachable */
13888         sleep( 1 );
13889
13890         status = pthread_detach( &t );
13891         if( status ) return errno;
13892 #endif
13893
13894 #ifdef HAVE_LINUX_THREADS
13895         pthread_kill_other_threads_np();
13896 #endif
13897
13898         return 0;
13899
13900 }
13901
13902 EOF
13903 if { (eval echo configure:13904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13904 then
13905   ol_cv_pthread_threads=yes
13906 else
13907   echo "configure: failed program was:" >&5
13908   cat conftest.$ac_ext >&5
13909   rm -fr conftest*
13910   ol_cv_pthread_threads=no
13911 fi
13912 rm -fr conftest*
13913 fi
13914
13915
13916                 # restore the LIBS
13917                 LIBS="$ol_LIBS"
13918         
13919 fi
13920
13921 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13922
13923         if test $ol_cv_pthread_threads = yes ; then
13924                 ol_link_pthreads="-threads"
13925                 ol_link_threads=posix
13926         fi
13927 fi
13928
13929
13930                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13931 if test "$ol_link_threads" = no ; then
13932         # try -lpthreads -lmach -lexc -lc_r
13933         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13934 echo "configure:13935: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13935 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13936   echo $ac_n "(cached) $ac_c" 1>&6
13937 else
13938   
13939                 # save the flags
13940                 ol_LIBS="$LIBS"
13941                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13942
13943                 if test "$cross_compiling" = yes; then
13944   cat > conftest.$ac_ext <<EOF
13945 #line 13946 "configure"
13946 #include "confdefs.h"
13947 /* pthread test headers */
13948 #include <pthread.h>
13949 #if HAVE_PTHREADS < 7
13950 #include <errno.h>
13951 #endif
13952 #ifndef NULL
13953 #define NULL (void*)0
13954 #endif
13955
13956 static void *task(p)
13957         void *p;
13958 {
13959         return (void *) (p == NULL);
13960 }
13961
13962 int main() {
13963
13964         /* pthread test function */
13965 #ifndef PTHREAD_CREATE_DETACHED
13966 #define PTHREAD_CREATE_DETACHED 1
13967 #endif
13968         pthread_t t;
13969         int status;
13970         int detach = PTHREAD_CREATE_DETACHED;
13971
13972 #if HAVE_PTHREADS > 4
13973         /* Final pthreads */
13974         pthread_attr_t attr;
13975
13976         status = pthread_attr_init(&attr);
13977         if( status ) return status;
13978
13979 #if HAVE_PTHREADS < 7
13980         status = pthread_attr_setdetachstate(&attr, &detach);
13981         if( status < 0 ) status = errno;
13982 #else
13983         status = pthread_attr_setdetachstate(&attr, detach);
13984 #endif
13985         if( status ) return status;
13986         status = pthread_create( &t, &attr, task, NULL );
13987 #if HAVE_PTHREADS < 7
13988         if( status < 0 ) status = errno;
13989 #endif
13990         if( status ) return status;
13991 #else
13992         /* Draft 4 pthreads */
13993         status = pthread_create( &t, pthread_attr_default, task, NULL );
13994         if( status ) return errno;
13995
13996         /* give thread a chance to complete */
13997         /* it should remain joinable and hence detachable */
13998         sleep( 1 );
13999
14000         status = pthread_detach( &t );
14001         if( status ) return errno;
14002 #endif
14003
14004 #ifdef HAVE_LINUX_THREADS
14005         pthread_kill_other_threads_np();
14006 #endif
14007
14008         return 0;
14009
14010 ; return 0; }
14011 EOF
14012 if { (eval echo configure:14013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14013   rm -rf conftest*
14014   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14015 else
14016   echo "configure: failed program was:" >&5
14017   cat conftest.$ac_ext >&5
14018   rm -rf conftest*
14019   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14020 fi
14021 rm -f conftest*
14022 else
14023   cat > conftest.$ac_ext <<EOF
14024 #line 14025 "configure"
14025 #include "confdefs.h"
14026 /* pthread test headers */
14027 #include <pthread.h>
14028 #if HAVE_PTHREADS < 7
14029 #include <errno.h>
14030 #endif
14031 #ifndef NULL
14032 #define NULL (void*)0
14033 #endif
14034
14035 static void *task(p)
14036         void *p;
14037 {
14038         return (void *) (p == NULL);
14039 }
14040
14041
14042 int main(argc, argv)
14043         int argc;
14044         char **argv;
14045 {
14046
14047         /* pthread test function */
14048 #ifndef PTHREAD_CREATE_DETACHED
14049 #define PTHREAD_CREATE_DETACHED 1
14050 #endif
14051         pthread_t t;
14052         int status;
14053         int detach = PTHREAD_CREATE_DETACHED;
14054
14055 #if HAVE_PTHREADS > 4
14056         /* Final pthreads */
14057         pthread_attr_t attr;
14058
14059         status = pthread_attr_init(&attr);
14060         if( status ) return status;
14061
14062 #if HAVE_PTHREADS < 7
14063         status = pthread_attr_setdetachstate(&attr, &detach);
14064         if( status < 0 ) status = errno;
14065 #else
14066         status = pthread_attr_setdetachstate(&attr, detach);
14067 #endif
14068         if( status ) return status;
14069         status = pthread_create( &t, &attr, task, NULL );
14070 #if HAVE_PTHREADS < 7
14071         if( status < 0 ) status = errno;
14072 #endif
14073         if( status ) return status;
14074 #else
14075         /* Draft 4 pthreads */
14076         status = pthread_create( &t, pthread_attr_default, task, NULL );
14077         if( status ) return errno;
14078
14079         /* give thread a chance to complete */
14080         /* it should remain joinable and hence detachable */
14081         sleep( 1 );
14082
14083         status = pthread_detach( &t );
14084         if( status ) return errno;
14085 #endif
14086
14087 #ifdef HAVE_LINUX_THREADS
14088         pthread_kill_other_threads_np();
14089 #endif
14090
14091         return 0;
14092
14093 }
14094
14095 EOF
14096 if { (eval echo configure:14097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14097 then
14098   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14099 else
14100   echo "configure: failed program was:" >&5
14101   cat conftest.$ac_ext >&5
14102   rm -fr conftest*
14103   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14104 fi
14105 rm -fr conftest*
14106 fi
14107
14108
14109                 # restore the LIBS
14110                 LIBS="$ol_LIBS"
14111         
14112 fi
14113
14114 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14115
14116         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14117                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14118                 ol_link_threads=posix
14119         fi
14120 fi
14121
14122                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14123 if test "$ol_link_threads" = no ; then
14124         # try -lpthreads -lmach -lexc
14125         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14126 echo "configure:14127: checking for pthread link with -lpthreads -lmach -lexc" >&5
14127 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14128   echo $ac_n "(cached) $ac_c" 1>&6
14129 else
14130   
14131                 # save the flags
14132                 ol_LIBS="$LIBS"
14133                 LIBS="-lpthreads -lmach -lexc $LIBS"
14134
14135                 if test "$cross_compiling" = yes; then
14136   cat > conftest.$ac_ext <<EOF
14137 #line 14138 "configure"
14138 #include "confdefs.h"
14139 /* pthread test headers */
14140 #include <pthread.h>
14141 #if HAVE_PTHREADS < 7
14142 #include <errno.h>
14143 #endif
14144 #ifndef NULL
14145 #define NULL (void*)0
14146 #endif
14147
14148 static void *task(p)
14149         void *p;
14150 {
14151         return (void *) (p == NULL);
14152 }
14153
14154 int main() {
14155
14156         /* pthread test function */
14157 #ifndef PTHREAD_CREATE_DETACHED
14158 #define PTHREAD_CREATE_DETACHED 1
14159 #endif
14160         pthread_t t;
14161         int status;
14162         int detach = PTHREAD_CREATE_DETACHED;
14163
14164 #if HAVE_PTHREADS > 4
14165         /* Final pthreads */
14166         pthread_attr_t attr;
14167
14168         status = pthread_attr_init(&attr);
14169         if( status ) return status;
14170
14171 #if HAVE_PTHREADS < 7
14172         status = pthread_attr_setdetachstate(&attr, &detach);
14173         if( status < 0 ) status = errno;
14174 #else
14175         status = pthread_attr_setdetachstate(&attr, detach);
14176 #endif
14177         if( status ) return status;
14178         status = pthread_create( &t, &attr, task, NULL );
14179 #if HAVE_PTHREADS < 7
14180         if( status < 0 ) status = errno;
14181 #endif
14182         if( status ) return status;
14183 #else
14184         /* Draft 4 pthreads */
14185         status = pthread_create( &t, pthread_attr_default, task, NULL );
14186         if( status ) return errno;
14187
14188         /* give thread a chance to complete */
14189         /* it should remain joinable and hence detachable */
14190         sleep( 1 );
14191
14192         status = pthread_detach( &t );
14193         if( status ) return errno;
14194 #endif
14195
14196 #ifdef HAVE_LINUX_THREADS
14197         pthread_kill_other_threads_np();
14198 #endif
14199
14200         return 0;
14201
14202 ; return 0; }
14203 EOF
14204 if { (eval echo configure:14205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14205   rm -rf conftest*
14206   ol_cv_pthread_lpthreads_lmach_lexc=yes
14207 else
14208   echo "configure: failed program was:" >&5
14209   cat conftest.$ac_ext >&5
14210   rm -rf conftest*
14211   ol_cv_pthread_lpthreads_lmach_lexc=no
14212 fi
14213 rm -f conftest*
14214 else
14215   cat > conftest.$ac_ext <<EOF
14216 #line 14217 "configure"
14217 #include "confdefs.h"
14218 /* pthread test headers */
14219 #include <pthread.h>
14220 #if HAVE_PTHREADS < 7
14221 #include <errno.h>
14222 #endif
14223 #ifndef NULL
14224 #define NULL (void*)0
14225 #endif
14226
14227 static void *task(p)
14228         void *p;
14229 {
14230         return (void *) (p == NULL);
14231 }
14232
14233
14234 int main(argc, argv)
14235         int argc;
14236         char **argv;
14237 {
14238
14239         /* pthread test function */
14240 #ifndef PTHREAD_CREATE_DETACHED
14241 #define PTHREAD_CREATE_DETACHED 1
14242 #endif
14243         pthread_t t;
14244         int status;
14245         int detach = PTHREAD_CREATE_DETACHED;
14246
14247 #if HAVE_PTHREADS > 4
14248         /* Final pthreads */
14249         pthread_attr_t attr;
14250
14251         status = pthread_attr_init(&attr);
14252         if( status ) return status;
14253
14254 #if HAVE_PTHREADS < 7
14255         status = pthread_attr_setdetachstate(&attr, &detach);
14256         if( status < 0 ) status = errno;
14257 #else
14258         status = pthread_attr_setdetachstate(&attr, detach);
14259 #endif
14260         if( status ) return status;
14261         status = pthread_create( &t, &attr, task, NULL );
14262 #if HAVE_PTHREADS < 7
14263         if( status < 0 ) status = errno;
14264 #endif
14265         if( status ) return status;
14266 #else
14267         /* Draft 4 pthreads */
14268         status = pthread_create( &t, pthread_attr_default, task, NULL );
14269         if( status ) return errno;
14270
14271         /* give thread a chance to complete */
14272         /* it should remain joinable and hence detachable */
14273         sleep( 1 );
14274
14275         status = pthread_detach( &t );
14276         if( status ) return errno;
14277 #endif
14278
14279 #ifdef HAVE_LINUX_THREADS
14280         pthread_kill_other_threads_np();
14281 #endif
14282
14283         return 0;
14284
14285 }
14286
14287 EOF
14288 if { (eval echo configure:14289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14289 then
14290   ol_cv_pthread_lpthreads_lmach_lexc=yes
14291 else
14292   echo "configure: failed program was:" >&5
14293   cat conftest.$ac_ext >&5
14294   rm -fr conftest*
14295   ol_cv_pthread_lpthreads_lmach_lexc=no
14296 fi
14297 rm -fr conftest*
14298 fi
14299
14300
14301                 # restore the LIBS
14302                 LIBS="$ol_LIBS"
14303         
14304 fi
14305
14306 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14307
14308         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14309                 ol_link_pthreads="-lpthreads -lmach -lexc"
14310                 ol_link_threads=posix
14311         fi
14312 fi
14313
14314                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14315 if test "$ol_link_threads" = no ; then
14316         # try -lpthreads -lexc
14317         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14318 echo "configure:14319: checking for pthread link with -lpthreads -lexc" >&5
14319 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14320   echo $ac_n "(cached) $ac_c" 1>&6
14321 else
14322   
14323                 # save the flags
14324                 ol_LIBS="$LIBS"
14325                 LIBS="-lpthreads -lexc $LIBS"
14326
14327                 if test "$cross_compiling" = yes; then
14328   cat > conftest.$ac_ext <<EOF
14329 #line 14330 "configure"
14330 #include "confdefs.h"
14331 /* pthread test headers */
14332 #include <pthread.h>
14333 #if HAVE_PTHREADS < 7
14334 #include <errno.h>
14335 #endif
14336 #ifndef NULL
14337 #define NULL (void*)0
14338 #endif
14339
14340 static void *task(p)
14341         void *p;
14342 {
14343         return (void *) (p == NULL);
14344 }
14345
14346 int main() {
14347
14348         /* pthread test function */
14349 #ifndef PTHREAD_CREATE_DETACHED
14350 #define PTHREAD_CREATE_DETACHED 1
14351 #endif
14352         pthread_t t;
14353         int status;
14354         int detach = PTHREAD_CREATE_DETACHED;
14355
14356 #if HAVE_PTHREADS > 4
14357         /* Final pthreads */
14358         pthread_attr_t attr;
14359
14360         status = pthread_attr_init(&attr);
14361         if( status ) return status;
14362
14363 #if HAVE_PTHREADS < 7
14364         status = pthread_attr_setdetachstate(&attr, &detach);
14365         if( status < 0 ) status = errno;
14366 #else
14367         status = pthread_attr_setdetachstate(&attr, detach);
14368 #endif
14369         if( status ) return status;
14370         status = pthread_create( &t, &attr, task, NULL );
14371 #if HAVE_PTHREADS < 7
14372         if( status < 0 ) status = errno;
14373 #endif
14374         if( status ) return status;
14375 #else
14376         /* Draft 4 pthreads */
14377         status = pthread_create( &t, pthread_attr_default, task, NULL );
14378         if( status ) return errno;
14379
14380         /* give thread a chance to complete */
14381         /* it should remain joinable and hence detachable */
14382         sleep( 1 );
14383
14384         status = pthread_detach( &t );
14385         if( status ) return errno;
14386 #endif
14387
14388 #ifdef HAVE_LINUX_THREADS
14389         pthread_kill_other_threads_np();
14390 #endif
14391
14392         return 0;
14393
14394 ; return 0; }
14395 EOF
14396 if { (eval echo configure:14397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14397   rm -rf conftest*
14398   ol_cv_pthread_lpthreads_lexc=yes
14399 else
14400   echo "configure: failed program was:" >&5
14401   cat conftest.$ac_ext >&5
14402   rm -rf conftest*
14403   ol_cv_pthread_lpthreads_lexc=no
14404 fi
14405 rm -f conftest*
14406 else
14407   cat > conftest.$ac_ext <<EOF
14408 #line 14409 "configure"
14409 #include "confdefs.h"
14410 /* pthread test headers */
14411 #include <pthread.h>
14412 #if HAVE_PTHREADS < 7
14413 #include <errno.h>
14414 #endif
14415 #ifndef NULL
14416 #define NULL (void*)0
14417 #endif
14418
14419 static void *task(p)
14420         void *p;
14421 {
14422         return (void *) (p == NULL);
14423 }
14424
14425
14426 int main(argc, argv)
14427         int argc;
14428         char **argv;
14429 {
14430
14431         /* pthread test function */
14432 #ifndef PTHREAD_CREATE_DETACHED
14433 #define PTHREAD_CREATE_DETACHED 1
14434 #endif
14435         pthread_t t;
14436         int status;
14437         int detach = PTHREAD_CREATE_DETACHED;
14438
14439 #if HAVE_PTHREADS > 4
14440         /* Final pthreads */
14441         pthread_attr_t attr;
14442
14443         status = pthread_attr_init(&attr);
14444         if( status ) return status;
14445
14446 #if HAVE_PTHREADS < 7
14447         status = pthread_attr_setdetachstate(&attr, &detach);
14448         if( status < 0 ) status = errno;
14449 #else
14450         status = pthread_attr_setdetachstate(&attr, detach);
14451 #endif
14452         if( status ) return status;
14453         status = pthread_create( &t, &attr, task, NULL );
14454 #if HAVE_PTHREADS < 7
14455         if( status < 0 ) status = errno;
14456 #endif
14457         if( status ) return status;
14458 #else
14459         /* Draft 4 pthreads */
14460         status = pthread_create( &t, pthread_attr_default, task, NULL );
14461         if( status ) return errno;
14462
14463         /* give thread a chance to complete */
14464         /* it should remain joinable and hence detachable */
14465         sleep( 1 );
14466
14467         status = pthread_detach( &t );
14468         if( status ) return errno;
14469 #endif
14470
14471 #ifdef HAVE_LINUX_THREADS
14472         pthread_kill_other_threads_np();
14473 #endif
14474
14475         return 0;
14476
14477 }
14478
14479 EOF
14480 if { (eval echo configure:14481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14481 then
14482   ol_cv_pthread_lpthreads_lexc=yes
14483 else
14484   echo "configure: failed program was:" >&5
14485   cat conftest.$ac_ext >&5
14486   rm -fr conftest*
14487   ol_cv_pthread_lpthreads_lexc=no
14488 fi
14489 rm -fr conftest*
14490 fi
14491
14492
14493                 # restore the LIBS
14494                 LIBS="$ol_LIBS"
14495         
14496 fi
14497
14498 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14499
14500         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14501                 ol_link_pthreads="-lpthreads -lexc"
14502                 ol_link_threads=posix
14503         fi
14504 fi
14505
14506
14507                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14508 if test "$ol_link_threads" = no ; then
14509         # try -lpthreads
14510         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14511 echo "configure:14512: checking for pthread link with -lpthreads" >&5
14512 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14513   echo $ac_n "(cached) $ac_c" 1>&6
14514 else
14515   
14516                 # save the flags
14517                 ol_LIBS="$LIBS"
14518                 LIBS="-lpthreads $LIBS"
14519
14520                 if test "$cross_compiling" = yes; then
14521   cat > conftest.$ac_ext <<EOF
14522 #line 14523 "configure"
14523 #include "confdefs.h"
14524 /* pthread test headers */
14525 #include <pthread.h>
14526 #if HAVE_PTHREADS < 7
14527 #include <errno.h>
14528 #endif
14529 #ifndef NULL
14530 #define NULL (void*)0
14531 #endif
14532
14533 static void *task(p)
14534         void *p;
14535 {
14536         return (void *) (p == NULL);
14537 }
14538
14539 int main() {
14540
14541         /* pthread test function */
14542 #ifndef PTHREAD_CREATE_DETACHED
14543 #define PTHREAD_CREATE_DETACHED 1
14544 #endif
14545         pthread_t t;
14546         int status;
14547         int detach = PTHREAD_CREATE_DETACHED;
14548
14549 #if HAVE_PTHREADS > 4
14550         /* Final pthreads */
14551         pthread_attr_t attr;
14552
14553         status = pthread_attr_init(&attr);
14554         if( status ) return status;
14555
14556 #if HAVE_PTHREADS < 7
14557         status = pthread_attr_setdetachstate(&attr, &detach);
14558         if( status < 0 ) status = errno;
14559 #else
14560         status = pthread_attr_setdetachstate(&attr, detach);
14561 #endif
14562         if( status ) return status;
14563         status = pthread_create( &t, &attr, task, NULL );
14564 #if HAVE_PTHREADS < 7
14565         if( status < 0 ) status = errno;
14566 #endif
14567         if( status ) return status;
14568 #else
14569         /* Draft 4 pthreads */
14570         status = pthread_create( &t, pthread_attr_default, task, NULL );
14571         if( status ) return errno;
14572
14573         /* give thread a chance to complete */
14574         /* it should remain joinable and hence detachable */
14575         sleep( 1 );
14576
14577         status = pthread_detach( &t );
14578         if( status ) return errno;
14579 #endif
14580
14581 #ifdef HAVE_LINUX_THREADS
14582         pthread_kill_other_threads_np();
14583 #endif
14584
14585         return 0;
14586
14587 ; return 0; }
14588 EOF
14589 if { (eval echo configure:14590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14590   rm -rf conftest*
14591   ol_cv_pthread_lib_lpthreads=yes
14592 else
14593   echo "configure: failed program was:" >&5
14594   cat conftest.$ac_ext >&5
14595   rm -rf conftest*
14596   ol_cv_pthread_lib_lpthreads=no
14597 fi
14598 rm -f conftest*
14599 else
14600   cat > conftest.$ac_ext <<EOF
14601 #line 14602 "configure"
14602 #include "confdefs.h"
14603 /* pthread test headers */
14604 #include <pthread.h>
14605 #if HAVE_PTHREADS < 7
14606 #include <errno.h>
14607 #endif
14608 #ifndef NULL
14609 #define NULL (void*)0
14610 #endif
14611
14612 static void *task(p)
14613         void *p;
14614 {
14615         return (void *) (p == NULL);
14616 }
14617
14618
14619 int main(argc, argv)
14620         int argc;
14621         char **argv;
14622 {
14623
14624         /* pthread test function */
14625 #ifndef PTHREAD_CREATE_DETACHED
14626 #define PTHREAD_CREATE_DETACHED 1
14627 #endif
14628         pthread_t t;
14629         int status;
14630         int detach = PTHREAD_CREATE_DETACHED;
14631
14632 #if HAVE_PTHREADS > 4
14633         /* Final pthreads */
14634         pthread_attr_t attr;
14635
14636         status = pthread_attr_init(&attr);
14637         if( status ) return status;
14638
14639 #if HAVE_PTHREADS < 7
14640         status = pthread_attr_setdetachstate(&attr, &detach);
14641         if( status < 0 ) status = errno;
14642 #else
14643         status = pthread_attr_setdetachstate(&attr, detach);
14644 #endif
14645         if( status ) return status;
14646         status = pthread_create( &t, &attr, task, NULL );
14647 #if HAVE_PTHREADS < 7
14648         if( status < 0 ) status = errno;
14649 #endif
14650         if( status ) return status;
14651 #else
14652         /* Draft 4 pthreads */
14653         status = pthread_create( &t, pthread_attr_default, task, NULL );
14654         if( status ) return errno;
14655
14656         /* give thread a chance to complete */
14657         /* it should remain joinable and hence detachable */
14658         sleep( 1 );
14659
14660         status = pthread_detach( &t );
14661         if( status ) return errno;
14662 #endif
14663
14664 #ifdef HAVE_LINUX_THREADS
14665         pthread_kill_other_threads_np();
14666 #endif
14667
14668         return 0;
14669
14670 }
14671
14672 EOF
14673 if { (eval echo configure:14674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14674 then
14675   ol_cv_pthread_lib_lpthreads=yes
14676 else
14677   echo "configure: failed program was:" >&5
14678   cat conftest.$ac_ext >&5
14679   rm -fr conftest*
14680   ol_cv_pthread_lib_lpthreads=no
14681 fi
14682 rm -fr conftest*
14683 fi
14684
14685
14686                 # restore the LIBS
14687                 LIBS="$ol_LIBS"
14688         
14689 fi
14690
14691 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14692
14693         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14694                 ol_link_pthreads="-lpthreads"
14695                 ol_link_threads=posix
14696         fi
14697 fi
14698
14699
14700                 if test $ol_link_threads != no ; then
14701                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14702
14703                                                 save_CPPFLAGS="$CPPFLAGS"
14704                         save_LIBS="$LIBS"
14705                         LIBS="$LTHREAD_LIBS $LIBS"
14706
14707                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14708 do
14709 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14710 echo "configure:14711: checking for $ac_func" >&5
14711 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14712   echo $ac_n "(cached) $ac_c" 1>&6
14713 else
14714   cat > conftest.$ac_ext <<EOF
14715 #line 14716 "configure"
14716 #include "confdefs.h"
14717 /* System header to define __stub macros and hopefully few prototypes,
14718     which can conflict with char $ac_func(); below.  */
14719 #include <assert.h>
14720 /* Override any gcc2 internal prototype to avoid an error.  */
14721 /* We use char because int might match the return type of a gcc2
14722     builtin and then its argument prototype would still apply.  */
14723 char $ac_func();
14724 char (*f)();
14725
14726 int main() {
14727
14728 /* The GNU C library defines this for functions which it implements
14729     to always fail with ENOSYS.  Some functions are actually named
14730     something starting with __ and the normal name is an alias.  */
14731 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14732 choke me
14733 #else
14734 f = $ac_func;
14735 #endif
14736
14737 ; return 0; }
14738 EOF
14739 if { (eval echo configure:14740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14740   rm -rf conftest*
14741   eval "ac_cv_func_$ac_func=yes"
14742 else
14743   echo "configure: failed program was:" >&5
14744   cat conftest.$ac_ext >&5
14745   rm -rf conftest*
14746   eval "ac_cv_func_$ac_func=no"
14747 fi
14748 rm -f conftest*
14749 fi
14750
14751 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14752   echo "$ac_t""yes" 1>&6
14753     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14754   cat >> confdefs.h <<EOF
14755 #define $ac_tr_func 1
14756 EOF
14757  
14758 else
14759   echo "$ac_t""no" 1>&6
14760 fi
14761 done
14762
14763
14764                         if test $ac_cv_func_sched_yield = no -a \
14765                                 $ac_cv_func_pthread_yield = no -a \
14766                                 $ac_cv_func_thr_yield = no ; then
14767                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14768 echo "configure:14769: checking for sched_yield in -lrt" >&5
14769 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14770 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14771   echo $ac_n "(cached) $ac_c" 1>&6
14772 else
14773   ac_save_LIBS="$LIBS"
14774 LIBS="-lrt  $LIBS"
14775 cat > conftest.$ac_ext <<EOF
14776 #line 14777 "configure"
14777 #include "confdefs.h"
14778 /* Override any gcc2 internal prototype to avoid an error.  */
14779 /* We use char because int might match the return type of a gcc2
14780     builtin and then its argument prototype would still apply.  */
14781 char sched_yield();
14782
14783 int main() {
14784 sched_yield()
14785 ; return 0; }
14786 EOF
14787 if { (eval echo configure:14788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14788   rm -rf conftest*
14789   eval "ac_cv_lib_$ac_lib_var=yes"
14790 else
14791   echo "configure: failed program was:" >&5
14792   cat conftest.$ac_ext >&5
14793   rm -rf conftest*
14794   eval "ac_cv_lib_$ac_lib_var=no"
14795 fi
14796 rm -f conftest*
14797 LIBS="$ac_save_LIBS"
14798
14799 fi
14800 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14801   echo "$ac_t""yes" 1>&6
14802   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14803                                         cat >> confdefs.h <<\EOF
14804 #define HAVE_SCHED_YIELD 1
14805 EOF
14806
14807                                         ac_cv_func_sched_yield=yes
14808 else
14809   echo "$ac_t""no" 1>&6
14810 ac_cv_func_sched_yield=no
14811 fi
14812
14813                         fi
14814                         if test $ac_cv_func_sched_yield = no -a \
14815                                 $ac_cv_func_pthread_yield = no -a \
14816                                 "$ac_cv_func_thr_yield" = no ; then
14817                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14818                         fi
14819
14820                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14821 do
14822 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14823 echo "configure:14824: checking for $ac_func" >&5
14824 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14825   echo $ac_n "(cached) $ac_c" 1>&6
14826 else
14827   cat > conftest.$ac_ext <<EOF
14828 #line 14829 "configure"
14829 #include "confdefs.h"
14830 /* System header to define __stub macros and hopefully few prototypes,
14831     which can conflict with char $ac_func(); below.  */
14832 #include <assert.h>
14833 /* Override any gcc2 internal prototype to avoid an error.  */
14834 /* We use char because int might match the return type of a gcc2
14835     builtin and then its argument prototype would still apply.  */
14836 char $ac_func();
14837 char (*f)();
14838
14839 int main() {
14840
14841 /* The GNU C library defines this for functions which it implements
14842     to always fail with ENOSYS.  Some functions are actually named
14843     something starting with __ and the normal name is an alias.  */
14844 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14845 choke me
14846 #else
14847 f = $ac_func;
14848 #endif
14849
14850 ; return 0; }
14851 EOF
14852 if { (eval echo configure:14853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14853   rm -rf conftest*
14854   eval "ac_cv_func_$ac_func=yes"
14855 else
14856   echo "configure: failed program was:" >&5
14857   cat conftest.$ac_ext >&5
14858   rm -rf conftest*
14859   eval "ac_cv_func_$ac_func=no"
14860 fi
14861 rm -f conftest*
14862 fi
14863
14864 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14865   echo "$ac_t""yes" 1>&6
14866     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14867   cat >> confdefs.h <<EOF
14868 #define $ac_tr_func 1
14869 EOF
14870  
14871 else
14872   echo "$ac_t""no" 1>&6
14873 fi
14874 done
14875
14876
14877                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14878 echo "configure:14879: checking for pthread_detach with <pthread.h>" >&5
14879 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14880   echo $ac_n "(cached) $ac_c" 1>&6
14881 else
14882   
14883                                                                 cat > conftest.$ac_ext <<EOF
14884 #line 14885 "configure"
14885 #include "confdefs.h"
14886
14887 #include <pthread.h>
14888 #ifndef NULL
14889 #define NULL (void*)0
14890 #endif
14891
14892 int main() {
14893 pthread_detach(NULL);
14894 ; return 0; }
14895 EOF
14896 if { (eval echo configure:14897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14897   rm -rf conftest*
14898   ol_cv_func_pthread_detach=yes
14899 else
14900   echo "configure: failed program was:" >&5
14901   cat conftest.$ac_ext >&5
14902   rm -rf conftest*
14903   ol_cv_func_pthread_detach=no
14904 fi
14905 rm -f conftest*
14906                         
14907 fi
14908
14909 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14910
14911                         if test $ol_cv_func_pthread_detach = no ; then
14912                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14913                         fi
14914
14915                         cat >> confdefs.h <<\EOF
14916 #define HAVE_PTHREAD_DETACH 1
14917 EOF
14918
14919
14920                                                 for ac_func in \
14921                                 pthread_setconcurrency \
14922                                 pthread_getconcurrency \
14923                                 thr_setconcurrency \
14924                                 thr_getconcurrency \
14925                         
14926 do
14927 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14928 echo "configure:14929: checking for $ac_func" >&5
14929 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14930   echo $ac_n "(cached) $ac_c" 1>&6
14931 else
14932   cat > conftest.$ac_ext <<EOF
14933 #line 14934 "configure"
14934 #include "confdefs.h"
14935 /* System header to define __stub macros and hopefully few prototypes,
14936     which can conflict with char $ac_func(); below.  */
14937 #include <assert.h>
14938 /* Override any gcc2 internal prototype to avoid an error.  */
14939 /* We use char because int might match the return type of a gcc2
14940     builtin and then its argument prototype would still apply.  */
14941 char $ac_func();
14942 char (*f)();
14943
14944 int main() {
14945
14946 /* The GNU C library defines this for functions which it implements
14947     to always fail with ENOSYS.  Some functions are actually named
14948     something starting with __ and the normal name is an alias.  */
14949 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14950 choke me
14951 #else
14952 f = $ac_func;
14953 #endif
14954
14955 ; return 0; }
14956 EOF
14957 if { (eval echo configure:14958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14958   rm -rf conftest*
14959   eval "ac_cv_func_$ac_func=yes"
14960 else
14961   echo "configure: failed program was:" >&5
14962   cat conftest.$ac_ext >&5
14963   rm -rf conftest*
14964   eval "ac_cv_func_$ac_func=no"
14965 fi
14966 rm -f conftest*
14967 fi
14968
14969 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14970   echo "$ac_t""yes" 1>&6
14971     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14972   cat >> confdefs.h <<EOF
14973 #define $ac_tr_func 1
14974 EOF
14975  
14976 else
14977   echo "$ac_t""no" 1>&6
14978 fi
14979 done
14980
14981
14982                         
14983         for ac_func in pthread_kill_other_threads_np
14984 do
14985 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14986 echo "configure:14987: checking for $ac_func" >&5
14987 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14988   echo $ac_n "(cached) $ac_c" 1>&6
14989 else
14990   cat > conftest.$ac_ext <<EOF
14991 #line 14992 "configure"
14992 #include "confdefs.h"
14993 /* System header to define __stub macros and hopefully few prototypes,
14994     which can conflict with char $ac_func(); below.  */
14995 #include <assert.h>
14996 /* Override any gcc2 internal prototype to avoid an error.  */
14997 /* We use char because int might match the return type of a gcc2
14998     builtin and then its argument prototype would still apply.  */
14999 char $ac_func();
15000 char (*f)();
15001
15002 int main() {
15003
15004 /* The GNU C library defines this for functions which it implements
15005     to always fail with ENOSYS.  Some functions are actually named
15006     something starting with __ and the normal name is an alias.  */
15007 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15008 choke me
15009 #else
15010 f = $ac_func;
15011 #endif
15012
15013 ; return 0; }
15014 EOF
15015 if { (eval echo configure:15016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15016   rm -rf conftest*
15017   eval "ac_cv_func_$ac_func=yes"
15018 else
15019   echo "configure: failed program was:" >&5
15020   cat conftest.$ac_ext >&5
15021   rm -rf conftest*
15022   eval "ac_cv_func_$ac_func=no"
15023 fi
15024 rm -f conftest*
15025 fi
15026
15027 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15028   echo "$ac_t""yes" 1>&6
15029     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15030   cat >> confdefs.h <<EOF
15031 #define $ac_tr_func 1
15032 EOF
15033  
15034 else
15035   echo "$ac_t""no" 1>&6
15036 fi
15037 done
15038
15039         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15040 echo "configure:15041: checking for LinuxThreads implementation" >&5
15041 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15042   echo $ac_n "(cached) $ac_c" 1>&6
15043 else
15044   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15045 fi
15046
15047 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15048
15049                         
15050         
15051         
15052         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15053 echo "configure:15054: checking for LinuxThreads consistency" >&5
15054 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15055   echo $ac_n "(cached) $ac_c" 1>&6
15056 else
15057   
15058                 if test $ol_cv_header_linux_threads = yes -a \
15059                         $ol_cv_sys_linux_threads = yes; then
15060                         ol_cv_linux_threads=yes
15061                 elif test $ol_cv_header_linux_threads = no -a \
15062                         $ol_cv_sys_linux_threads = no; then
15063                         ol_cv_linux_threads=no
15064                 else
15065                         ol_cv_linux_threads=error
15066                 fi
15067         
15068 fi
15069
15070 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15071
15072
15073                         if test $ol_cv_linux_threads = error; then
15074                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15075                         fi
15076
15077                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15078 echo "configure:15079: checking if pthread_create() works" >&5
15079 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15080   echo $ac_n "(cached) $ac_c" 1>&6
15081 else
15082   
15083                         if test "$cross_compiling" = yes; then
15084                                 ol_cv_pthread_create_works=yes
15085 else
15086   cat > conftest.$ac_ext <<EOF
15087 #line 15088 "configure"
15088 #include "confdefs.h"
15089 /* pthread test headers */
15090 #include <pthread.h>
15091 #if HAVE_PTHREADS < 7
15092 #include <errno.h>
15093 #endif
15094 #ifndef NULL
15095 #define NULL (void*)0
15096 #endif
15097
15098 static void *task(p)
15099         void *p;
15100 {
15101         return (void *) (p == NULL);
15102 }
15103
15104
15105 int main(argc, argv)
15106         int argc;
15107         char **argv;
15108 {
15109
15110         /* pthread test function */
15111 #ifndef PTHREAD_CREATE_DETACHED
15112 #define PTHREAD_CREATE_DETACHED 1
15113 #endif
15114         pthread_t t;
15115         int status;
15116         int detach = PTHREAD_CREATE_DETACHED;
15117
15118 #if HAVE_PTHREADS > 4
15119         /* Final pthreads */
15120         pthread_attr_t attr;
15121
15122         status = pthread_attr_init(&attr);
15123         if( status ) return status;
15124
15125 #if HAVE_PTHREADS < 7
15126         status = pthread_attr_setdetachstate(&attr, &detach);
15127         if( status < 0 ) status = errno;
15128 #else
15129         status = pthread_attr_setdetachstate(&attr, detach);
15130 #endif
15131         if( status ) return status;
15132         status = pthread_create( &t, &attr, task, NULL );
15133 #if HAVE_PTHREADS < 7
15134         if( status < 0 ) status = errno;
15135 #endif
15136         if( status ) return status;
15137 #else
15138         /* Draft 4 pthreads */
15139         status = pthread_create( &t, pthread_attr_default, task, NULL );
15140         if( status ) return errno;
15141
15142         /* give thread a chance to complete */
15143         /* it should remain joinable and hence detachable */
15144         sleep( 1 );
15145
15146         status = pthread_detach( &t );
15147         if( status ) return errno;
15148 #endif
15149
15150 #ifdef HAVE_LINUX_THREADS
15151         pthread_kill_other_threads_np();
15152 #endif
15153
15154         return 0;
15155
15156 }
15157
15158 EOF
15159 if { (eval echo configure:15160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15160 then
15161   ol_cv_pthread_create_works=yes
15162 else
15163   echo "configure: failed program was:" >&5
15164   cat conftest.$ac_ext >&5
15165   rm -fr conftest*
15166   ol_cv_pthread_create_works=no
15167 fi
15168 rm -fr conftest*
15169 fi
15170
15171 fi
15172
15173 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15174
15175                         if test $ol_cv_pthread_create_works = no ; then
15176                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15177                         fi
15178
15179                                                 if test $ol_with_yielding_select = auto ; then
15180                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15181 echo "configure:15182: checking if select yields when using pthreads" >&5
15182 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15183   echo $ac_n "(cached) $ac_c" 1>&6
15184 else
15185   
15186                                 if test "$cross_compiling" = yes; then
15187   ol_cv_pthread_select_yields=cross
15188 else
15189   cat > conftest.$ac_ext <<EOF
15190 #line 15191 "configure"
15191 #include "confdefs.h"
15192
15193 #include <sys/types.h>
15194 #include <sys/time.h>
15195 #include <unistd.h>
15196 #include <pthread.h>
15197 #ifndef NULL
15198 #define NULL (void*) 0
15199 #endif
15200
15201 static int fildes[2];
15202
15203 static void *task(p)
15204         void *p;
15205 {
15206         int i;
15207         struct timeval tv;
15208
15209         fd_set rfds;
15210
15211         tv.tv_sec=10;
15212         tv.tv_usec=0;
15213
15214         FD_ZERO(&rfds);
15215         FD_SET(fildes[0], &rfds);
15216
15217         /* we're not interested in any fds */
15218         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15219
15220         if(i < 0) {
15221                 perror("select");
15222                 exit(10);
15223         }
15224
15225         exit(0); /* if we exit here, the select blocked the whole process */
15226 }
15227
15228 int main(argc, argv)
15229         int argc;
15230         char **argv;
15231 {
15232         pthread_t t;
15233
15234         /* create a pipe to select */
15235         if(pipe(&fildes[0])) {
15236                 perror("select");
15237                 exit(1);
15238         }
15239
15240 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15241         (void) pthread_setconcurrency(2);
15242 #else
15243 #ifdef HAVE_THR_SETCONCURRENCY
15244         /* Set Solaris LWP concurrency to 2 */
15245         thr_setconcurrency(2);
15246 #endif
15247 #endif
15248
15249 #if HAVE_PTHREADS < 6
15250         pthread_create(&t, pthread_attr_default, task, NULL);
15251 #else
15252         pthread_create(&t, NULL, task, NULL);
15253 #endif
15254
15255         /* make sure task runs first */
15256 #if HAVE_THR_YIELD
15257         thr_yield();
15258 #elif defined( HAVE_SCHED_YIELD )
15259         sched_yield();
15260 #elif defined( HAVE_PTHREAD_YIELD )
15261         pthread_yield();
15262 #endif
15263
15264         exit(2);
15265 }
15266 EOF
15267 if { (eval echo configure:15268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15268 then
15269   ol_cv_pthread_select_yields=no
15270 else
15271   echo "configure: failed program was:" >&5
15272   cat conftest.$ac_ext >&5
15273   rm -fr conftest*
15274   ol_cv_pthread_select_yields=yes
15275 fi
15276 rm -fr conftest*
15277 fi
15278
15279 fi
15280
15281 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15282
15283                                 if test $ol_cv_pthread_select_yields = cross ; then
15284                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15285                                 fi
15286
15287                                 if test $ol_cv_pthread_select_yields = yes ; then
15288                                         ol_with_yielding_select=yes
15289                                 fi
15290                         fi
15291
15292                                                 CPPFLAGS="$save_CPPFLAGS"
15293                         LIBS="$save_LIBS"
15294                 else
15295                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15296                 fi
15297         fi
15298
15299         if test $ol_with_threads = posix ; then
15300                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15301         fi
15302 fi
15303
15304 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15305         -o $ol_with_threads = mach ; then
15306
15307                 for ac_hdr in mach/cthreads.h cthreads.h
15308 do
15309 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15310 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15311 echo "configure:15312: checking for $ac_hdr" >&5
15312 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15313   echo $ac_n "(cached) $ac_c" 1>&6
15314 else
15315   cat > conftest.$ac_ext <<EOF
15316 #line 15317 "configure"
15317 #include "confdefs.h"
15318 #include <$ac_hdr>
15319 EOF
15320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15321 { (eval echo configure:15322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15323 if test -z "$ac_err"; then
15324   rm -rf conftest*
15325   eval "ac_cv_header_$ac_safe=yes"
15326 else
15327   echo "$ac_err" >&5
15328   echo "configure: failed program was:" >&5
15329   cat conftest.$ac_ext >&5
15330   rm -rf conftest*
15331   eval "ac_cv_header_$ac_safe=no"
15332 fi
15333 rm -f conftest*
15334 fi
15335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15336   echo "$ac_t""yes" 1>&6
15337     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15338   cat >> confdefs.h <<EOF
15339 #define $ac_tr_hdr 1
15340 EOF
15341  
15342 else
15343   echo "$ac_t""no" 1>&6
15344 fi
15345 done
15346
15347         if test $ac_cv_header_mach_cthreads_h = yes ; then
15348                 ol_with_threads=found
15349
15350                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15351 echo "configure:15352: checking for cthread_fork" >&5
15352 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15353   echo $ac_n "(cached) $ac_c" 1>&6
15354 else
15355   cat > conftest.$ac_ext <<EOF
15356 #line 15357 "configure"
15357 #include "confdefs.h"
15358 /* System header to define __stub macros and hopefully few prototypes,
15359     which can conflict with char cthread_fork(); below.  */
15360 #include <assert.h>
15361 /* Override any gcc2 internal prototype to avoid an error.  */
15362 /* We use char because int might match the return type of a gcc2
15363     builtin and then its argument prototype would still apply.  */
15364 char cthread_fork();
15365 char (*f)();
15366
15367 int main() {
15368
15369 /* The GNU C library defines this for functions which it implements
15370     to always fail with ENOSYS.  Some functions are actually named
15371     something starting with __ and the normal name is an alias.  */
15372 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15373 choke me
15374 #else
15375 f = cthread_fork;
15376 #endif
15377
15378 ; return 0; }
15379 EOF
15380 if { (eval echo configure:15381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15381   rm -rf conftest*
15382   eval "ac_cv_func_cthread_fork=yes"
15383 else
15384   echo "configure: failed program was:" >&5
15385   cat conftest.$ac_ext >&5
15386   rm -rf conftest*
15387   eval "ac_cv_func_cthread_fork=no"
15388 fi
15389 rm -f conftest*
15390 fi
15391
15392 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15393   echo "$ac_t""yes" 1>&6
15394   ol_link_threads=yes
15395 else
15396   echo "$ac_t""no" 1>&6
15397 fi
15398
15399
15400                 if test $ol_link_threads = no ; then
15401                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15402 echo "configure:15403: checking for cthread_fork with -all_load" >&5
15403 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15404   echo $ac_n "(cached) $ac_c" 1>&6
15405 else
15406   
15407                                                                 save_LIBS="$LIBS"
15408                                 LIBS="-all_load $LIBS"
15409                                 cat > conftest.$ac_ext <<EOF
15410 #line 15411 "configure"
15411 #include "confdefs.h"
15412 #include <mach/cthreads.h>
15413 int main() {
15414
15415                                         cthread_fork((void *)0, (void *)0);
15416                                         
15417 ; return 0; }
15418 EOF
15419 if { (eval echo configure:15420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15420   rm -rf conftest*
15421   ol_cv_cthread_all_load=yes
15422 else
15423   echo "configure: failed program was:" >&5
15424   cat conftest.$ac_ext >&5
15425   rm -rf conftest*
15426   ol_cv_cthread_all_load=no
15427 fi
15428 rm -f conftest*
15429                                                                 LIBS="$save_LIBS"
15430                         
15431 fi
15432
15433 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15434
15435                         if test $ol_cv_cthread_all_load = yes ; then
15436                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15437                                 ol_link_threads=mach
15438                                 ol_with_threads=found
15439                         fi
15440                 fi
15441
15442         elif test $ac_cv_header_cthreads_h = yes ; then
15443                                 
15444                 ol_with_threads=found
15445  
15446                                 save_LIBS="$LIBS"
15447                 LIBS="$LIBS -lthreads"
15448                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15449 echo "configure:15450: checking for cthread_fork" >&5
15450 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15451   echo $ac_n "(cached) $ac_c" 1>&6
15452 else
15453   cat > conftest.$ac_ext <<EOF
15454 #line 15455 "configure"
15455 #include "confdefs.h"
15456 /* System header to define __stub macros and hopefully few prototypes,
15457     which can conflict with char cthread_fork(); below.  */
15458 #include <assert.h>
15459 /* Override any gcc2 internal prototype to avoid an error.  */
15460 /* We use char because int might match the return type of a gcc2
15461     builtin and then its argument prototype would still apply.  */
15462 char cthread_fork();
15463 char (*f)();
15464
15465 int main() {
15466
15467 /* The GNU C library defines this for functions which it implements
15468     to always fail with ENOSYS.  Some functions are actually named
15469     something starting with __ and the normal name is an alias.  */
15470 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15471 choke me
15472 #else
15473 f = cthread_fork;
15474 #endif
15475
15476 ; return 0; }
15477 EOF
15478 if { (eval echo configure:15479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15479   rm -rf conftest*
15480   eval "ac_cv_func_cthread_fork=yes"
15481 else
15482   echo "configure: failed program was:" >&5
15483   cat conftest.$ac_ext >&5
15484   rm -rf conftest*
15485   eval "ac_cv_func_cthread_fork=no"
15486 fi
15487 rm -f conftest*
15488 fi
15489
15490 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15491   echo "$ac_t""yes" 1>&6
15492   ol_link_threads=yes
15493 else
15494   echo "$ac_t""no" 1>&6
15495 fi
15496
15497                 LIBS="$save_LIBS"
15498
15499                 if test $ol_link_threads = yes ; then
15500                         LTHREAD_LIBS="-lthreads"
15501                         ol_link_threads=mach
15502                         ol_with_threads=found
15503                 else
15504                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15505                 fi
15506
15507         elif test $ol_with_threads = mach ; then
15508                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15509         fi
15510
15511         if test $ol_link_threads = mach ; then
15512                 cat >> confdefs.h <<\EOF
15513 #define HAVE_MACH_CTHREADS 1
15514 EOF
15515
15516         elif test $ol_with_threads = found ; then
15517                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15518         fi
15519 fi
15520
15521 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15522         -o $ol_with_threads = pth ; then
15523
15524         for ac_hdr in pth.h
15525 do
15526 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15527 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15528 echo "configure:15529: checking for $ac_hdr" >&5
15529 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15530   echo $ac_n "(cached) $ac_c" 1>&6
15531 else
15532   cat > conftest.$ac_ext <<EOF
15533 #line 15534 "configure"
15534 #include "confdefs.h"
15535 #include <$ac_hdr>
15536 EOF
15537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15538 { (eval echo configure:15539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15540 if test -z "$ac_err"; then
15541   rm -rf conftest*
15542   eval "ac_cv_header_$ac_safe=yes"
15543 else
15544   echo "$ac_err" >&5
15545   echo "configure: failed program was:" >&5
15546   cat conftest.$ac_ext >&5
15547   rm -rf conftest*
15548   eval "ac_cv_header_$ac_safe=no"
15549 fi
15550 rm -f conftest*
15551 fi
15552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15553   echo "$ac_t""yes" 1>&6
15554     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15555   cat >> confdefs.h <<EOF
15556 #define $ac_tr_hdr 1
15557 EOF
15558  
15559 else
15560   echo "$ac_t""no" 1>&6
15561 fi
15562 done
15563
15564
15565         if test $ac_cv_header_pth_h = yes ; then
15566                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15567 echo "configure:15568: checking for pth_version in -lpth" >&5
15568 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15569 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15570   echo $ac_n "(cached) $ac_c" 1>&6
15571 else
15572   ac_save_LIBS="$LIBS"
15573 LIBS="-lpth  $LIBS"
15574 cat > conftest.$ac_ext <<EOF
15575 #line 15576 "configure"
15576 #include "confdefs.h"
15577 /* Override any gcc2 internal prototype to avoid an error.  */
15578 /* We use char because int might match the return type of a gcc2
15579     builtin and then its argument prototype would still apply.  */
15580 char pth_version();
15581
15582 int main() {
15583 pth_version()
15584 ; return 0; }
15585 EOF
15586 if { (eval echo configure:15587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15587   rm -rf conftest*
15588   eval "ac_cv_lib_$ac_lib_var=yes"
15589 else
15590   echo "configure: failed program was:" >&5
15591   cat conftest.$ac_ext >&5
15592   rm -rf conftest*
15593   eval "ac_cv_lib_$ac_lib_var=no"
15594 fi
15595 rm -f conftest*
15596 LIBS="$ac_save_LIBS"
15597
15598 fi
15599 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15600   echo "$ac_t""yes" 1>&6
15601   have_pth=yes
15602 else
15603   echo "$ac_t""no" 1>&6
15604 have_pth=no
15605 fi
15606
15607
15608                 if test $have_pth = yes ; then
15609                         cat >> confdefs.h <<\EOF
15610 #define HAVE_GNU_PTH 1
15611 EOF
15612
15613                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15614                         ol_link_threads=pth
15615                         ol_with_threads=found
15616
15617                         if test $ol_with_yielding_select = auto ; then
15618                                 ol_with_yielding_select=yes
15619                         fi
15620                 fi
15621         fi
15622 fi
15623
15624 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15625         -o $ol_with_threads = lwp ; then
15626
15627                 for ac_hdr in thread.h synch.h
15628 do
15629 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15630 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15631 echo "configure:15632: checking for $ac_hdr" >&5
15632 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15633   echo $ac_n "(cached) $ac_c" 1>&6
15634 else
15635   cat > conftest.$ac_ext <<EOF
15636 #line 15637 "configure"
15637 #include "confdefs.h"
15638 #include <$ac_hdr>
15639 EOF
15640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15641 { (eval echo configure:15642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15643 if test -z "$ac_err"; then
15644   rm -rf conftest*
15645   eval "ac_cv_header_$ac_safe=yes"
15646 else
15647   echo "$ac_err" >&5
15648   echo "configure: failed program was:" >&5
15649   cat conftest.$ac_ext >&5
15650   rm -rf conftest*
15651   eval "ac_cv_header_$ac_safe=no"
15652 fi
15653 rm -f conftest*
15654 fi
15655 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15656   echo "$ac_t""yes" 1>&6
15657     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15658   cat >> confdefs.h <<EOF
15659 #define $ac_tr_hdr 1
15660 EOF
15661  
15662 else
15663   echo "$ac_t""no" 1>&6
15664 fi
15665 done
15666
15667         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15668                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15669 echo "configure:15670: checking for thr_create in -lthread" >&5
15670 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15671 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15672   echo $ac_n "(cached) $ac_c" 1>&6
15673 else
15674   ac_save_LIBS="$LIBS"
15675 LIBS="-lthread  $LIBS"
15676 cat > conftest.$ac_ext <<EOF
15677 #line 15678 "configure"
15678 #include "confdefs.h"
15679 /* Override any gcc2 internal prototype to avoid an error.  */
15680 /* We use char because int might match the return type of a gcc2
15681     builtin and then its argument prototype would still apply.  */
15682 char thr_create();
15683
15684 int main() {
15685 thr_create()
15686 ; return 0; }
15687 EOF
15688 if { (eval echo configure:15689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15689   rm -rf conftest*
15690   eval "ac_cv_lib_$ac_lib_var=yes"
15691 else
15692   echo "configure: failed program was:" >&5
15693   cat conftest.$ac_ext >&5
15694   rm -rf conftest*
15695   eval "ac_cv_lib_$ac_lib_var=no"
15696 fi
15697 rm -f conftest*
15698 LIBS="$ac_save_LIBS"
15699
15700 fi
15701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15702   echo "$ac_t""yes" 1>&6
15703   have_thr=yes
15704 else
15705   echo "$ac_t""no" 1>&6
15706 have_thr=no
15707 fi
15708
15709
15710                 if test $have_thr = yes ; then
15711                         cat >> confdefs.h <<\EOF
15712 #define HAVE_THR 1
15713 EOF
15714
15715                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15716                         ol_link_threads=thr
15717
15718                         if test $ol_with_yielding_select = auto ; then
15719                                 ol_with_yielding_select=yes
15720                         fi
15721
15722                                                 for ac_func in \
15723                                 thr_setconcurrency \
15724                                 thr_getconcurrency \
15725                         
15726 do
15727 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15728 echo "configure:15729: checking for $ac_func" >&5
15729 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15730   echo $ac_n "(cached) $ac_c" 1>&6
15731 else
15732   cat > conftest.$ac_ext <<EOF
15733 #line 15734 "configure"
15734 #include "confdefs.h"
15735 /* System header to define __stub macros and hopefully few prototypes,
15736     which can conflict with char $ac_func(); below.  */
15737 #include <assert.h>
15738 /* Override any gcc2 internal prototype to avoid an error.  */
15739 /* We use char because int might match the return type of a gcc2
15740     builtin and then its argument prototype would still apply.  */
15741 char $ac_func();
15742 char (*f)();
15743
15744 int main() {
15745
15746 /* The GNU C library defines this for functions which it implements
15747     to always fail with ENOSYS.  Some functions are actually named
15748     something starting with __ and the normal name is an alias.  */
15749 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15750 choke me
15751 #else
15752 f = $ac_func;
15753 #endif
15754
15755 ; return 0; }
15756 EOF
15757 if { (eval echo configure:15758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15758   rm -rf conftest*
15759   eval "ac_cv_func_$ac_func=yes"
15760 else
15761   echo "configure: failed program was:" >&5
15762   cat conftest.$ac_ext >&5
15763   rm -rf conftest*
15764   eval "ac_cv_func_$ac_func=no"
15765 fi
15766 rm -f conftest*
15767 fi
15768
15769 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15770   echo "$ac_t""yes" 1>&6
15771     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15772   cat >> confdefs.h <<EOF
15773 #define $ac_tr_func 1
15774 EOF
15775  
15776 else
15777   echo "$ac_t""no" 1>&6
15778 fi
15779 done
15780
15781                 fi
15782         fi
15783
15784                 for ac_hdr in lwp/lwp.h
15785 do
15786 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15787 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15788 echo "configure:15789: checking for $ac_hdr" >&5
15789 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15790   echo $ac_n "(cached) $ac_c" 1>&6
15791 else
15792   cat > conftest.$ac_ext <<EOF
15793 #line 15794 "configure"
15794 #include "confdefs.h"
15795 #include <$ac_hdr>
15796 EOF
15797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15798 { (eval echo configure:15799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15800 if test -z "$ac_err"; then
15801   rm -rf conftest*
15802   eval "ac_cv_header_$ac_safe=yes"
15803 else
15804   echo "$ac_err" >&5
15805   echo "configure: failed program was:" >&5
15806   cat conftest.$ac_ext >&5
15807   rm -rf conftest*
15808   eval "ac_cv_header_$ac_safe=no"
15809 fi
15810 rm -f conftest*
15811 fi
15812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15813   echo "$ac_t""yes" 1>&6
15814     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15815   cat >> confdefs.h <<EOF
15816 #define $ac_tr_hdr 1
15817 EOF
15818  
15819 else
15820   echo "$ac_t""no" 1>&6
15821 fi
15822 done
15823
15824         if test $ac_cv_header_lwp_lwp_h = yes ; then
15825                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15826 echo "configure:15827: checking for lwp_create in -llwp" >&5
15827 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15828 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15829   echo $ac_n "(cached) $ac_c" 1>&6
15830 else
15831   ac_save_LIBS="$LIBS"
15832 LIBS="-llwp  $LIBS"
15833 cat > conftest.$ac_ext <<EOF
15834 #line 15835 "configure"
15835 #include "confdefs.h"
15836 /* Override any gcc2 internal prototype to avoid an error.  */
15837 /* We use char because int might match the return type of a gcc2
15838     builtin and then its argument prototype would still apply.  */
15839 char lwp_create();
15840
15841 int main() {
15842 lwp_create()
15843 ; return 0; }
15844 EOF
15845 if { (eval echo configure:15846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15846   rm -rf conftest*
15847   eval "ac_cv_lib_$ac_lib_var=yes"
15848 else
15849   echo "configure: failed program was:" >&5
15850   cat conftest.$ac_ext >&5
15851   rm -rf conftest*
15852   eval "ac_cv_lib_$ac_lib_var=no"
15853 fi
15854 rm -f conftest*
15855 LIBS="$ac_save_LIBS"
15856
15857 fi
15858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15859   echo "$ac_t""yes" 1>&6
15860   have_lwp=yes
15861 else
15862   echo "$ac_t""no" 1>&6
15863 have_lwp=no
15864 fi
15865
15866
15867                 if test $have_lwp = yes ; then
15868                         cat >> confdefs.h <<\EOF
15869 #define HAVE_LWP 1
15870 EOF
15871
15872                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15873                         ol_link_threads=lwp
15874
15875                         if test $ol_with_yielding_select = auto ; then
15876                                 ol_with_yielding_select=no
15877                         fi
15878                 fi
15879         fi
15880 fi
15881
15882 if test $ol_with_yielding_select = yes ; then
15883         cat >> confdefs.h <<\EOF
15884 #define HAVE_YIELDING_SELECT 1
15885 EOF
15886
15887 fi
15888
15889 if test $ol_with_threads = manual ; then
15890                 ol_link_threads=yes
15891
15892         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15893
15894         for ac_hdr in pthread.h sched.h
15895 do
15896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15898 echo "configure:15899: checking for $ac_hdr" >&5
15899 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15900   echo $ac_n "(cached) $ac_c" 1>&6
15901 else
15902   cat > conftest.$ac_ext <<EOF
15903 #line 15904 "configure"
15904 #include "confdefs.h"
15905 #include <$ac_hdr>
15906 EOF
15907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15908 { (eval echo configure:15909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15910 if test -z "$ac_err"; then
15911   rm -rf conftest*
15912   eval "ac_cv_header_$ac_safe=yes"
15913 else
15914   echo "$ac_err" >&5
15915   echo "configure: failed program was:" >&5
15916   cat conftest.$ac_ext >&5
15917   rm -rf conftest*
15918   eval "ac_cv_header_$ac_safe=no"
15919 fi
15920 rm -f conftest*
15921 fi
15922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15923   echo "$ac_t""yes" 1>&6
15924     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15925   cat >> confdefs.h <<EOF
15926 #define $ac_tr_hdr 1
15927 EOF
15928  
15929 else
15930   echo "$ac_t""no" 1>&6
15931 fi
15932 done
15933
15934         for ac_func in sched_yield pthread_yield
15935 do
15936 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15937 echo "configure:15938: checking for $ac_func" >&5
15938 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15939   echo $ac_n "(cached) $ac_c" 1>&6
15940 else
15941   cat > conftest.$ac_ext <<EOF
15942 #line 15943 "configure"
15943 #include "confdefs.h"
15944 /* System header to define __stub macros and hopefully few prototypes,
15945     which can conflict with char $ac_func(); below.  */
15946 #include <assert.h>
15947 /* Override any gcc2 internal prototype to avoid an error.  */
15948 /* We use char because int might match the return type of a gcc2
15949     builtin and then its argument prototype would still apply.  */
15950 char $ac_func();
15951 char (*f)();
15952
15953 int main() {
15954
15955 /* The GNU C library defines this for functions which it implements
15956     to always fail with ENOSYS.  Some functions are actually named
15957     something starting with __ and the normal name is an alias.  */
15958 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15959 choke me
15960 #else
15961 f = $ac_func;
15962 #endif
15963
15964 ; return 0; }
15965 EOF
15966 if { (eval echo configure:15967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15967   rm -rf conftest*
15968   eval "ac_cv_func_$ac_func=yes"
15969 else
15970   echo "configure: failed program was:" >&5
15971   cat conftest.$ac_ext >&5
15972   rm -rf conftest*
15973   eval "ac_cv_func_$ac_func=no"
15974 fi
15975 rm -f conftest*
15976 fi
15977
15978 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15979   echo "$ac_t""yes" 1>&6
15980     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15981   cat >> confdefs.h <<EOF
15982 #define $ac_tr_func 1
15983 EOF
15984  
15985 else
15986   echo "$ac_t""no" 1>&6
15987 fi
15988 done
15989
15990         
15991         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15992 echo "configure:15993: checking for LinuxThreads pthread.h" >&5
15993 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15994   echo $ac_n "(cached) $ac_c" 1>&6
15995 else
15996   cat > conftest.$ac_ext <<EOF
15997 #line 15998 "configure"
15998 #include "confdefs.h"
15999 #include <pthread.h>
16000 EOF
16001 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16002   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16003   rm -rf conftest*
16004   ol_cv_header_linux_threads=yes
16005 else
16006   rm -rf conftest*
16007   ol_cv_header_linux_threads=no
16008 fi
16009 rm -f conftest*
16010
16011                 
16012 fi
16013
16014 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16015         if test $ol_cv_header_linux_threads = yes; then
16016                 cat >> confdefs.h <<\EOF
16017 #define HAVE_LINUX_THREADS 1
16018 EOF
16019
16020         fi
16021
16022
16023         for ac_hdr in mach/cthreads.h
16024 do
16025 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16026 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16027 echo "configure:16028: checking for $ac_hdr" >&5
16028 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16029   echo $ac_n "(cached) $ac_c" 1>&6
16030 else
16031   cat > conftest.$ac_ext <<EOF
16032 #line 16033 "configure"
16033 #include "confdefs.h"
16034 #include <$ac_hdr>
16035 EOF
16036 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16037 { (eval echo configure:16038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16038 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16039 if test -z "$ac_err"; then
16040   rm -rf conftest*
16041   eval "ac_cv_header_$ac_safe=yes"
16042 else
16043   echo "$ac_err" >&5
16044   echo "configure: failed program was:" >&5
16045   cat conftest.$ac_ext >&5
16046   rm -rf conftest*
16047   eval "ac_cv_header_$ac_safe=no"
16048 fi
16049 rm -f conftest*
16050 fi
16051 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16052   echo "$ac_t""yes" 1>&6
16053     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16054   cat >> confdefs.h <<EOF
16055 #define $ac_tr_hdr 1
16056 EOF
16057  
16058 else
16059   echo "$ac_t""no" 1>&6
16060 fi
16061 done
16062
16063         for ac_hdr in lwp/lwp.h
16064 do
16065 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16066 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16067 echo "configure:16068: checking for $ac_hdr" >&5
16068 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16069   echo $ac_n "(cached) $ac_c" 1>&6
16070 else
16071   cat > conftest.$ac_ext <<EOF
16072 #line 16073 "configure"
16073 #include "confdefs.h"
16074 #include <$ac_hdr>
16075 EOF
16076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16077 { (eval echo configure:16078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16078 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16079 if test -z "$ac_err"; then
16080   rm -rf conftest*
16081   eval "ac_cv_header_$ac_safe=yes"
16082 else
16083   echo "$ac_err" >&5
16084   echo "configure: failed program was:" >&5
16085   cat conftest.$ac_ext >&5
16086   rm -rf conftest*
16087   eval "ac_cv_header_$ac_safe=no"
16088 fi
16089 rm -f conftest*
16090 fi
16091 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16092   echo "$ac_t""yes" 1>&6
16093     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16094   cat >> confdefs.h <<EOF
16095 #define $ac_tr_hdr 1
16096 EOF
16097  
16098 else
16099   echo "$ac_t""no" 1>&6
16100 fi
16101 done
16102
16103         for ac_hdr in thread.h synch.h
16104 do
16105 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16106 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16107 echo "configure:16108: checking for $ac_hdr" >&5
16108 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16109   echo $ac_n "(cached) $ac_c" 1>&6
16110 else
16111   cat > conftest.$ac_ext <<EOF
16112 #line 16113 "configure"
16113 #include "confdefs.h"
16114 #include <$ac_hdr>
16115 EOF
16116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16117 { (eval echo configure:16118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16118 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16119 if test -z "$ac_err"; then
16120   rm -rf conftest*
16121   eval "ac_cv_header_$ac_safe=yes"
16122 else
16123   echo "$ac_err" >&5
16124   echo "configure: failed program was:" >&5
16125   cat conftest.$ac_ext >&5
16126   rm -rf conftest*
16127   eval "ac_cv_header_$ac_safe=no"
16128 fi
16129 rm -f conftest*
16130 fi
16131 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16132   echo "$ac_t""yes" 1>&6
16133     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16134   cat >> confdefs.h <<EOF
16135 #define $ac_tr_hdr 1
16136 EOF
16137  
16138 else
16139   echo "$ac_t""no" 1>&6
16140 fi
16141 done
16142
16143 fi
16144
16145 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16146                         cat >> confdefs.h <<\EOF
16147 #define REENTRANT 1
16148 EOF
16149
16150         cat >> confdefs.h <<\EOF
16151 #define _REENTRANT 1
16152 EOF
16153
16154         cat >> confdefs.h <<\EOF
16155 #define THREAD_SAFE 1
16156 EOF
16157
16158         cat >> confdefs.h <<\EOF
16159 #define _THREAD_SAFE 1
16160 EOF
16161
16162         cat >> confdefs.h <<\EOF
16163 #define THREADSAFE 1
16164 EOF
16165
16166         cat >> confdefs.h <<\EOF
16167 #define _THREADSAFE 1
16168 EOF
16169
16170         cat >> confdefs.h <<\EOF
16171 #define _SGI_MP_SOURCE 1
16172 EOF
16173
16174
16175                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16176 echo "configure:16177: checking for thread specific errno" >&5
16177 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16178   echo $ac_n "(cached) $ac_c" 1>&6
16179 else
16180   
16181                 cat > conftest.$ac_ext <<EOF
16182 #line 16183 "configure"
16183 #include "confdefs.h"
16184 #include <errno.h>
16185 int main() {
16186 errno = 0;
16187 ; return 0; }
16188 EOF
16189 if { (eval echo configure:16190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16190   rm -rf conftest*
16191   ol_cv_errno_thread_specific=yes
16192 else
16193   echo "configure: failed program was:" >&5
16194   cat conftest.$ac_ext >&5
16195   rm -rf conftest*
16196   ol_cv_errno_thread_specific=no
16197 fi
16198 rm -f conftest*
16199         
16200 fi
16201
16202 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16203
16204                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16205 echo "configure:16206: checking for thread specific h_errno" >&5
16206 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16207   echo $ac_n "(cached) $ac_c" 1>&6
16208 else
16209   
16210                 cat > conftest.$ac_ext <<EOF
16211 #line 16212 "configure"
16212 #include "confdefs.h"
16213 #include <netdb.h>
16214 int main() {
16215 h_errno = 0;
16216 ; return 0; }
16217 EOF
16218 if { (eval echo configure:16219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16219   rm -rf conftest*
16220   ol_cv_h_errno_thread_specific=yes
16221 else
16222   echo "configure: failed program was:" >&5
16223   cat conftest.$ac_ext >&5
16224   rm -rf conftest*
16225   ol_cv_h_errno_thread_specific=no
16226 fi
16227 rm -f conftest*
16228         
16229 fi
16230
16231 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16232
16233         if test $ol_cv_errno_thread_specific != yes \
16234                 -o $ol_cv_h_errno_thread_specific != yes ; then
16235                 LIBS="$LTHREAD_LIBS $LIBS"
16236                 LTHREAD_LIBS=""
16237         fi
16238
16239 fi  
16240
16241 if test $ol_link_threads = no ; then
16242         if test $ol_with_threads = yes ; then
16243                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16244         fi
16245
16246         if test $ol_with_threads = auto ; then
16247                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16248                 ol_with_threads=no
16249         fi
16250
16251         cat >> confdefs.h <<\EOF
16252 #define NO_THREADS 1
16253 EOF
16254
16255         LTHREAD_LIBS=""
16256 fi
16257
16258 if test $ol_link_threads != no ; then
16259         cat >> confdefs.h <<\EOF
16260 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16261 EOF
16262
16263 fi
16264
16265 for ac_func in \
16266         ctime_r                 \
16267         gethostbyname_r gethostbyaddr_r \
16268
16269 do
16270 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16271 echo "configure:16272: checking for $ac_func" >&5
16272 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16273   echo $ac_n "(cached) $ac_c" 1>&6
16274 else
16275   cat > conftest.$ac_ext <<EOF
16276 #line 16277 "configure"
16277 #include "confdefs.h"
16278 /* System header to define __stub macros and hopefully few prototypes,
16279     which can conflict with char $ac_func(); below.  */
16280 #include <assert.h>
16281 /* Override any gcc2 internal prototype to avoid an error.  */
16282 /* We use char because int might match the return type of a gcc2
16283     builtin and then its argument prototype would still apply.  */
16284 char $ac_func();
16285 char (*f)();
16286
16287 int main() {
16288
16289 /* The GNU C library defines this for functions which it implements
16290     to always fail with ENOSYS.  Some functions are actually named
16291     something starting with __ and the normal name is an alias.  */
16292 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16293 choke me
16294 #else
16295 f = $ac_func;
16296 #endif
16297
16298 ; return 0; }
16299 EOF
16300 if { (eval echo configure:16301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16301   rm -rf conftest*
16302   eval "ac_cv_func_$ac_func=yes"
16303 else
16304   echo "configure: failed program was:" >&5
16305   cat conftest.$ac_ext >&5
16306   rm -rf conftest*
16307   eval "ac_cv_func_$ac_func=no"
16308 fi
16309 rm -f conftest*
16310 fi
16311
16312 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16313   echo "$ac_t""yes" 1>&6
16314     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16315   cat >> confdefs.h <<EOF
16316 #define $ac_tr_func 1
16317 EOF
16318  
16319 else
16320   echo "$ac_t""no" 1>&6
16321 fi
16322 done
16323
16324
16325 if test "$ac_cv_func_ctime_r" = no ; then
16326         ol_cv_func_ctime_r_nargs=0
16327 else
16328         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16329 echo "configure:16330: checking number of arguments of ctime_r" >&5
16330 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16331   echo $ac_n "(cached) $ac_c" 1>&6
16332 else
16333   cat > conftest.$ac_ext <<EOF
16334 #line 16335 "configure"
16335 #include "confdefs.h"
16336 #include <time.h>
16337 int main() {
16338 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16339 ; return 0; }
16340 EOF
16341 if { (eval echo configure:16342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16342   rm -rf conftest*
16343   ol_cv_func_ctime_r_nargs3=yes
16344 else
16345   echo "configure: failed program was:" >&5
16346   cat conftest.$ac_ext >&5
16347   rm -rf conftest*
16348   ol_cv_func_ctime_r_nargs3=no
16349 fi
16350 rm -f conftest*
16351
16352         cat > conftest.$ac_ext <<EOF
16353 #line 16354 "configure"
16354 #include "confdefs.h"
16355 #include <time.h>
16356 int main() {
16357 time_t ti; char *buffer; ctime_r(&ti,buffer);
16358 ; return 0; }
16359 EOF
16360 if { (eval echo configure:16361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16361   rm -rf conftest*
16362   ol_cv_func_ctime_r_nargs2=yes
16363 else
16364   echo "configure: failed program was:" >&5
16365   cat conftest.$ac_ext >&5
16366   rm -rf conftest*
16367   ol_cv_func_ctime_r_nargs2=no
16368 fi
16369 rm -f conftest*
16370
16371         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16372                 $ol_cv_func_ctime_r_nargs2 = no ; then
16373
16374                 ol_cv_func_ctime_r_nargs=3
16375
16376         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16377                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16378
16379                 ol_cv_func_ctime_r_nargs=2
16380
16381         else
16382                 ol_cv_func_ctime_r_nargs=0
16383         fi
16384   
16385 fi
16386
16387 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16388
16389   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16390         cat >> confdefs.h <<EOF
16391 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16392 EOF
16393
16394   fi
16395
16396 fi
16397
16398 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16399         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16400 echo "configure:16401: checking number of arguments of gethostbyname_r" >&5
16401 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16402   echo $ac_n "(cached) $ac_c" 1>&6
16403 else
16404   cat > conftest.$ac_ext <<EOF
16405 #line 16406 "configure"
16406 #include "confdefs.h"
16407 #include <sys/types.h>
16408 #include <sys/socket.h>
16409 #include <netinet/in.h>
16410 #include <netdb.h>
16411 #define BUFSIZE (sizeof(struct hostent)+10)
16412 int main() {
16413 struct hostent hent; char buffer[BUFSIZE];
16414                 int bufsize=BUFSIZE;int h_errno;
16415                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16416                         buffer, bufsize, &h_errno);
16417 ; return 0; }
16418 EOF
16419 if { (eval echo configure:16420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16420   rm -rf conftest*
16421   ol_cv_func_gethostbyname_r_nargs5=yes
16422 else
16423   echo "configure: failed program was:" >&5
16424   cat conftest.$ac_ext >&5
16425   rm -rf conftest*
16426   ol_cv_func_gethostbyname_r_nargs5=no
16427 fi
16428 rm -f conftest*
16429
16430         cat > conftest.$ac_ext <<EOF
16431 #line 16432 "configure"
16432 #include "confdefs.h"
16433 #include <sys/types.h>
16434 #include <sys/socket.h>
16435 #include <netinet/in.h>
16436 #include <netdb.h>
16437 #define BUFSIZE (sizeof(struct hostent)+10)
16438 int main() {
16439 struct hostent hent;struct hostent *rhent;
16440                 char buffer[BUFSIZE];
16441                 int bufsize=BUFSIZE;int h_errno;
16442                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16443                         &rhent, &h_errno);
16444 ; return 0; }
16445 EOF
16446 if { (eval echo configure:16447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16447   rm -rf conftest*
16448   ol_cv_func_gethostbyname_r_nargs6=yes
16449 else
16450   echo "configure: failed program was:" >&5
16451   cat conftest.$ac_ext >&5
16452   rm -rf conftest*
16453   ol_cv_func_gethostbyname_r_nargs6=no
16454 fi
16455 rm -f conftest*
16456
16457         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16458                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16459
16460                 ol_cv_func_gethostbyname_r_nargs=5
16461
16462         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16463                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16464
16465                 ol_cv_func_gethostbyname_r_nargs=6
16466
16467         else
16468                 ol_cv_func_gethostbyname_r_nargs=0
16469         fi
16470   
16471 fi
16472
16473 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16474   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16475         cat >> confdefs.h <<EOF
16476 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16477 EOF
16478
16479   fi
16480
16481 else
16482         ol_cv_func_gethostbyname_r_nargs=0
16483 fi
16484  
16485 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16486         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16487 echo "configure:16488: checking number of arguments of gethostbyaddr_r" >&5
16488 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16489   echo $ac_n "(cached) $ac_c" 1>&6
16490 else
16491   cat > conftest.$ac_ext <<EOF
16492 #line 16493 "configure"
16493 #include "confdefs.h"
16494 #include <sys/types.h>
16495 #include <sys/socket.h>
16496 #include <netinet/in.h>
16497 #include <netdb.h>
16498 #define BUFSIZE (sizeof(struct hostent)+10)
16499 int main() {
16500 struct hostent hent; char buffer[BUFSIZE]; 
16501             struct in_addr add;
16502             size_t alen=sizeof(struct in_addr);
16503             int bufsize=BUFSIZE;int h_errno;
16504                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16505                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16506 ; return 0; }
16507 EOF
16508 if { (eval echo configure:16509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16509   rm -rf conftest*
16510   ol_cv_func_gethostbyaddr_r_nargs7=yes
16511 else
16512   echo "configure: failed program was:" >&5
16513   cat conftest.$ac_ext >&5
16514   rm -rf conftest*
16515   ol_cv_func_gethostbyaddr_r_nargs7=no
16516 fi
16517 rm -f conftest*
16518
16519         cat > conftest.$ac_ext <<EOF
16520 #line 16521 "configure"
16521 #include "confdefs.h"
16522 #include <sys/types.h>
16523 #include <sys/socket.h>
16524 #include <netinet/in.h>
16525 #include <netdb.h>
16526 #define BUFSIZE (sizeof(struct hostent)+10)
16527 int main() {
16528 struct hostent hent;
16529                 struct hostent *rhent; char buffer[BUFSIZE]; 
16530                 struct in_addr add;
16531                 size_t alen=sizeof(struct in_addr);
16532                 int bufsize=BUFSIZE;int h_errno;
16533                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16534                         alen, AF_INET, &hent, buffer, bufsize, 
16535                         &rhent, &h_errno);
16536 ; return 0; }
16537 EOF
16538 if { (eval echo configure:16539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16539   rm -rf conftest*
16540   ol_cv_func_gethostbyaddr_r_nargs8=yes
16541 else
16542   echo "configure: failed program was:" >&5
16543   cat conftest.$ac_ext >&5
16544   rm -rf conftest*
16545   ol_cv_func_gethostbyaddr_r_nargs8=no
16546 fi
16547 rm -f conftest*
16548
16549         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16550                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16551
16552                 ol_cv_func_gethostbyaddr_r_nargs=7
16553
16554         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16555                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16556
16557                 ol_cv_func_gethostbyaddr_r_nargs=8
16558
16559         else
16560                 ol_cv_func_gethostbyaddr_r_nargs=0
16561         fi
16562   
16563 fi
16564
16565 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16566   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16567     cat >> confdefs.h <<EOF
16568 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16569 EOF
16570
16571   fi
16572
16573 else
16574         ol_cv_func_gethostbyaddr_r_nargs=0
16575 fi
16576
16577 ol_link_ldbm=no 
16578
16579 if test $ol_with_ldbm_api = auto \
16580         -o $ol_with_ldbm_api = berkeley \
16581         -o $ol_with_ldbm_api = bcompat ; then
16582
16583         if test $ol_with_ldbm_api = bcompat; then \
16584                 for ac_hdr in db_185.h db.h
16585 do
16586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16587 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16588 echo "configure:16589: checking for $ac_hdr" >&5
16589 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16590   echo $ac_n "(cached) $ac_c" 1>&6
16591 else
16592   cat > conftest.$ac_ext <<EOF
16593 #line 16594 "configure"
16594 #include "confdefs.h"
16595 #include <$ac_hdr>
16596 EOF
16597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16598 { (eval echo configure:16599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16600 if test -z "$ac_err"; then
16601   rm -rf conftest*
16602   eval "ac_cv_header_$ac_safe=yes"
16603 else
16604   echo "$ac_err" >&5
16605   echo "configure: failed program was:" >&5
16606   cat conftest.$ac_ext >&5
16607   rm -rf conftest*
16608   eval "ac_cv_header_$ac_safe=no"
16609 fi
16610 rm -f conftest*
16611 fi
16612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16613   echo "$ac_t""yes" 1>&6
16614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16615   cat >> confdefs.h <<EOF
16616 #define $ac_tr_hdr 1
16617 EOF
16618  
16619 else
16620   echo "$ac_t""no" 1>&6
16621 fi
16622 done
16623
16624 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16625         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16626 echo "configure:16627: checking if Berkeley DB header compatibility" >&5
16627 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16628   echo $ac_n "(cached) $ac_c" 1>&6
16629 else
16630   
16631                 cat > conftest.$ac_ext <<EOF
16632 #line 16633 "configure"
16633 #include "confdefs.h"
16634
16635 #if HAVE_DB_185_H
16636 #       include <db_185.h>
16637 #else
16638 #       include <db.h>
16639 #endif
16640
16641  /* this check could be improved */
16642 #ifndef DB_VERSION_MAJOR
16643 #       define DB_VERSION_MAJOR 1
16644 #endif
16645
16646 #if DB_VERSION_MAJOR == 1 
16647         __db_version_1
16648 #endif
16649
16650 EOF
16651 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16652   egrep "__db_version_1" >/dev/null 2>&1; then
16653   rm -rf conftest*
16654   ol_cv_header_db1=yes
16655 else
16656   rm -rf conftest*
16657   ol_cv_header_db1=no
16658 fi
16659 rm -f conftest*
16660
16661 fi
16662
16663 echo "$ac_t""$ol_cv_header_db1" 1>&6
16664
16665         if test $ol_cv_header_db1 = yes ; then
16666                 ol_cv_lib_db=no
16667 if test $ol_cv_lib_db = no ; then
16668         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16669 echo "configure:16670: checking for Berkeley DB link (default)" >&5
16670 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16671   echo $ac_n "(cached) $ac_c" 1>&6
16672 else
16673   
16674         ol_DB_LIB=
16675         ol_LIBS=$LIBS
16676         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16677
16678         cat > conftest.$ac_ext <<EOF
16679 #line 16680 "configure"
16680 #include "confdefs.h"
16681
16682 #ifdef HAVE_DB_185_H
16683 # include <db_185.h>
16684 #else
16685 # include <db.h>
16686 #endif
16687
16688 #ifndef DB_VERSION_MAJOR
16689 # define DB_VERSION_MAJOR 1
16690 #endif
16691
16692 #ifndef NULL
16693 #define NULL ((void*)0)
16694 #endif
16695
16696 int main() {
16697
16698 #if DB_VERSION_MAJOR > 1
16699         {
16700                 char *version;
16701                 int major, minor, patch;
16702
16703                 version = db_version( &major, &minor, &patch );
16704
16705                 if( major != DB_VERSION_MAJOR ||
16706                         minor < DB_VERSION_MINOR )
16707                 {
16708                         printf("Berkeley DB version mismatch\n"
16709                                 "\texpected: %s\n\tgot: %s\n",
16710                                 DB_VERSION_STRING, version);
16711                         return 1;
16712                 }
16713         }
16714 #endif
16715
16716 #if DB_VERSION_MAJOR > 2
16717         db_env_create( NULL, 0 );
16718 #elif DB_VERSION_MAJOR > 1
16719         db_appexit( NULL );
16720 #else
16721         (void) dbopen( NULL, 0, 0, 0, NULL);
16722 #endif
16723
16724 ; return 0; }
16725 EOF
16726 if { (eval echo configure:16727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16727   rm -rf conftest*
16728   ol_cv_db_none=yes
16729 else
16730   echo "configure: failed program was:" >&5
16731   cat conftest.$ac_ext >&5
16732   rm -rf conftest*
16733   ol_cv_db_none=no
16734 fi
16735 rm -f conftest*
16736
16737         LIBS="$ol_LIBS"
16738
16739 fi
16740
16741 echo "$ac_t""$ol_cv_db_none" 1>&6
16742
16743         if test $ol_cv_db_none = yes ; then
16744                 ol_cv_lib_db=yes
16745         fi
16746 fi
16747
16748 if test $ol_cv_lib_db = no ; then
16749         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16750 echo "configure:16751: checking for Berkeley DB link (-ldb42)" >&5
16751 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16752   echo $ac_n "(cached) $ac_c" 1>&6
16753 else
16754   
16755         ol_DB_LIB=-ldb42
16756         ol_LIBS=$LIBS
16757         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16758
16759         cat > conftest.$ac_ext <<EOF
16760 #line 16761 "configure"
16761 #include "confdefs.h"
16762
16763 #ifdef HAVE_DB_185_H
16764 # include <db_185.h>
16765 #else
16766 # include <db.h>
16767 #endif
16768
16769 #ifndef DB_VERSION_MAJOR
16770 # define DB_VERSION_MAJOR 1
16771 #endif
16772
16773 #ifndef NULL
16774 #define NULL ((void*)0)
16775 #endif
16776
16777 int main() {
16778
16779 #if DB_VERSION_MAJOR > 1
16780         {
16781                 char *version;
16782                 int major, minor, patch;
16783
16784                 version = db_version( &major, &minor, &patch );
16785
16786                 if( major != DB_VERSION_MAJOR ||
16787                         minor < DB_VERSION_MINOR )
16788                 {
16789                         printf("Berkeley DB version mismatch\n"
16790                                 "\texpected: %s\n\tgot: %s\n",
16791                                 DB_VERSION_STRING, version);
16792                         return 1;
16793                 }
16794         }
16795 #endif
16796
16797 #if DB_VERSION_MAJOR > 2
16798         db_env_create( NULL, 0 );
16799 #elif DB_VERSION_MAJOR > 1
16800         db_appexit( NULL );
16801 #else
16802         (void) dbopen( NULL, 0, 0, 0, NULL);
16803 #endif
16804
16805 ; return 0; }
16806 EOF
16807 if { (eval echo configure:16808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16808   rm -rf conftest*
16809   ol_cv_db_db42=yes
16810 else
16811   echo "configure: failed program was:" >&5
16812   cat conftest.$ac_ext >&5
16813   rm -rf conftest*
16814   ol_cv_db_db42=no
16815 fi
16816 rm -f conftest*
16817
16818         LIBS="$ol_LIBS"
16819
16820 fi
16821
16822 echo "$ac_t""$ol_cv_db_db42" 1>&6
16823
16824         if test $ol_cv_db_db42 = yes ; then
16825                 ol_cv_lib_db=-ldb42
16826         fi
16827 fi
16828
16829 if test $ol_cv_lib_db = no ; then
16830         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16831 echo "configure:16832: checking for Berkeley DB link (-ldb-42)" >&5
16832 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16833   echo $ac_n "(cached) $ac_c" 1>&6
16834 else
16835   
16836         ol_DB_LIB=-ldb-42
16837         ol_LIBS=$LIBS
16838         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16839
16840         cat > conftest.$ac_ext <<EOF
16841 #line 16842 "configure"
16842 #include "confdefs.h"
16843
16844 #ifdef HAVE_DB_185_H
16845 # include <db_185.h>
16846 #else
16847 # include <db.h>
16848 #endif
16849
16850 #ifndef DB_VERSION_MAJOR
16851 # define DB_VERSION_MAJOR 1
16852 #endif
16853
16854 #ifndef NULL
16855 #define NULL ((void*)0)
16856 #endif
16857
16858 int main() {
16859
16860 #if DB_VERSION_MAJOR > 1
16861         {
16862                 char *version;
16863                 int major, minor, patch;
16864
16865                 version = db_version( &major, &minor, &patch );
16866
16867                 if( major != DB_VERSION_MAJOR ||
16868                         minor < DB_VERSION_MINOR )
16869                 {
16870                         printf("Berkeley DB version mismatch\n"
16871                                 "\texpected: %s\n\tgot: %s\n",
16872                                 DB_VERSION_STRING, version);
16873                         return 1;
16874                 }
16875         }
16876 #endif
16877
16878 #if DB_VERSION_MAJOR > 2
16879         db_env_create( NULL, 0 );
16880 #elif DB_VERSION_MAJOR > 1
16881         db_appexit( NULL );
16882 #else
16883         (void) dbopen( NULL, 0, 0, 0, NULL);
16884 #endif
16885
16886 ; return 0; }
16887 EOF
16888 if { (eval echo configure:16889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16889   rm -rf conftest*
16890   ol_cv_db_db_42=yes
16891 else
16892   echo "configure: failed program was:" >&5
16893   cat conftest.$ac_ext >&5
16894   rm -rf conftest*
16895   ol_cv_db_db_42=no
16896 fi
16897 rm -f conftest*
16898
16899         LIBS="$ol_LIBS"
16900
16901 fi
16902
16903 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16904
16905         if test $ol_cv_db_db_42 = yes ; then
16906                 ol_cv_lib_db=-ldb-42
16907         fi
16908 fi
16909
16910 if test $ol_cv_lib_db = no ; then
16911         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16912 echo "configure:16913: checking for Berkeley DB link (-ldb-4.2)" >&5
16913 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16914   echo $ac_n "(cached) $ac_c" 1>&6
16915 else
16916   
16917         ol_DB_LIB=-ldb-4.2
16918         ol_LIBS=$LIBS
16919         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16920
16921         cat > conftest.$ac_ext <<EOF
16922 #line 16923 "configure"
16923 #include "confdefs.h"
16924
16925 #ifdef HAVE_DB_185_H
16926 # include <db_185.h>
16927 #else
16928 # include <db.h>
16929 #endif
16930
16931 #ifndef DB_VERSION_MAJOR
16932 # define DB_VERSION_MAJOR 1
16933 #endif
16934
16935 #ifndef NULL
16936 #define NULL ((void*)0)
16937 #endif
16938
16939 int main() {
16940
16941 #if DB_VERSION_MAJOR > 1
16942         {
16943                 char *version;
16944                 int major, minor, patch;
16945
16946                 version = db_version( &major, &minor, &patch );
16947
16948                 if( major != DB_VERSION_MAJOR ||
16949                         minor < DB_VERSION_MINOR )
16950                 {
16951                         printf("Berkeley DB version mismatch\n"
16952                                 "\texpected: %s\n\tgot: %s\n",
16953                                 DB_VERSION_STRING, version);
16954                         return 1;
16955                 }
16956         }
16957 #endif
16958
16959 #if DB_VERSION_MAJOR > 2
16960         db_env_create( NULL, 0 );
16961 #elif DB_VERSION_MAJOR > 1
16962         db_appexit( NULL );
16963 #else
16964         (void) dbopen( NULL, 0, 0, 0, NULL);
16965 #endif
16966
16967 ; return 0; }
16968 EOF
16969 if { (eval echo configure:16970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16970   rm -rf conftest*
16971   ol_cv_db_db_4_dot_2=yes
16972 else
16973   echo "configure: failed program was:" >&5
16974   cat conftest.$ac_ext >&5
16975   rm -rf conftest*
16976   ol_cv_db_db_4_dot_2=no
16977 fi
16978 rm -f conftest*
16979
16980         LIBS="$ol_LIBS"
16981
16982 fi
16983
16984 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16985
16986         if test $ol_cv_db_db_4_dot_2 = yes ; then
16987                 ol_cv_lib_db=-ldb-4.2
16988         fi
16989 fi
16990
16991 if test $ol_cv_lib_db = no ; then
16992         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16993 echo "configure:16994: checking for Berkeley DB link (-ldb-4-2)" >&5
16994 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16995   echo $ac_n "(cached) $ac_c" 1>&6
16996 else
16997   
16998         ol_DB_LIB=-ldb-4-2
16999         ol_LIBS=$LIBS
17000         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17001
17002         cat > conftest.$ac_ext <<EOF
17003 #line 17004 "configure"
17004 #include "confdefs.h"
17005
17006 #ifdef HAVE_DB_185_H
17007 # include <db_185.h>
17008 #else
17009 # include <db.h>
17010 #endif
17011
17012 #ifndef DB_VERSION_MAJOR
17013 # define DB_VERSION_MAJOR 1
17014 #endif
17015
17016 #ifndef NULL
17017 #define NULL ((void*)0)
17018 #endif
17019
17020 int main() {
17021
17022 #if DB_VERSION_MAJOR > 1
17023         {
17024                 char *version;
17025                 int major, minor, patch;
17026
17027                 version = db_version( &major, &minor, &patch );
17028
17029                 if( major != DB_VERSION_MAJOR ||
17030                         minor < DB_VERSION_MINOR )
17031                 {
17032                         printf("Berkeley DB version mismatch\n"
17033                                 "\texpected: %s\n\tgot: %s\n",
17034                                 DB_VERSION_STRING, version);
17035                         return 1;
17036                 }
17037         }
17038 #endif
17039
17040 #if DB_VERSION_MAJOR > 2
17041         db_env_create( NULL, 0 );
17042 #elif DB_VERSION_MAJOR > 1
17043         db_appexit( NULL );
17044 #else
17045         (void) dbopen( NULL, 0, 0, 0, NULL);
17046 #endif
17047
17048 ; return 0; }
17049 EOF
17050 if { (eval echo configure:17051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17051   rm -rf conftest*
17052   ol_cv_db_db_4_2=yes
17053 else
17054   echo "configure: failed program was:" >&5
17055   cat conftest.$ac_ext >&5
17056   rm -rf conftest*
17057   ol_cv_db_db_4_2=no
17058 fi
17059 rm -f conftest*
17060
17061         LIBS="$ol_LIBS"
17062
17063 fi
17064
17065 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17066
17067         if test $ol_cv_db_db_4_2 = yes ; then
17068                 ol_cv_lib_db=-ldb-4-2
17069         fi
17070 fi
17071
17072 if test $ol_cv_lib_db = no ; then
17073         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17074 echo "configure:17075: checking for Berkeley DB link (-ldb-4)" >&5
17075 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17076   echo $ac_n "(cached) $ac_c" 1>&6
17077 else
17078   
17079         ol_DB_LIB=-ldb-4
17080         ol_LIBS=$LIBS
17081         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17082
17083         cat > conftest.$ac_ext <<EOF
17084 #line 17085 "configure"
17085 #include "confdefs.h"
17086
17087 #ifdef HAVE_DB_185_H
17088 # include <db_185.h>
17089 #else
17090 # include <db.h>
17091 #endif
17092
17093 #ifndef DB_VERSION_MAJOR
17094 # define DB_VERSION_MAJOR 1
17095 #endif
17096
17097 #ifndef NULL
17098 #define NULL ((void*)0)
17099 #endif
17100
17101 int main() {
17102
17103 #if DB_VERSION_MAJOR > 1
17104         {
17105                 char *version;
17106                 int major, minor, patch;
17107
17108                 version = db_version( &major, &minor, &patch );
17109
17110                 if( major != DB_VERSION_MAJOR ||
17111                         minor < DB_VERSION_MINOR )
17112                 {
17113                         printf("Berkeley DB version mismatch\n"
17114                                 "\texpected: %s\n\tgot: %s\n",
17115                                 DB_VERSION_STRING, version);
17116                         return 1;
17117                 }
17118         }
17119 #endif
17120
17121 #if DB_VERSION_MAJOR > 2
17122         db_env_create( NULL, 0 );
17123 #elif DB_VERSION_MAJOR > 1
17124         db_appexit( NULL );
17125 #else
17126         (void) dbopen( NULL, 0, 0, 0, NULL);
17127 #endif
17128
17129 ; return 0; }
17130 EOF
17131 if { (eval echo configure:17132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17132   rm -rf conftest*
17133   ol_cv_db_db_4=yes
17134 else
17135   echo "configure: failed program was:" >&5
17136   cat conftest.$ac_ext >&5
17137   rm -rf conftest*
17138   ol_cv_db_db_4=no
17139 fi
17140 rm -f conftest*
17141
17142         LIBS="$ol_LIBS"
17143
17144 fi
17145
17146 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17147
17148         if test $ol_cv_db_db_4 = yes ; then
17149                 ol_cv_lib_db=-ldb-4
17150         fi
17151 fi
17152
17153 if test $ol_cv_lib_db = no ; then
17154         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17155 echo "configure:17156: checking for Berkeley DB link (-ldb4)" >&5
17156 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17157   echo $ac_n "(cached) $ac_c" 1>&6
17158 else
17159   
17160         ol_DB_LIB=-ldb4
17161         ol_LIBS=$LIBS
17162         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17163
17164         cat > conftest.$ac_ext <<EOF
17165 #line 17166 "configure"
17166 #include "confdefs.h"
17167
17168 #ifdef HAVE_DB_185_H
17169 # include <db_185.h>
17170 #else
17171 # include <db.h>
17172 #endif
17173
17174 #ifndef DB_VERSION_MAJOR
17175 # define DB_VERSION_MAJOR 1
17176 #endif
17177
17178 #ifndef NULL
17179 #define NULL ((void*)0)
17180 #endif
17181
17182 int main() {
17183
17184 #if DB_VERSION_MAJOR > 1
17185         {
17186                 char *version;
17187                 int major, minor, patch;
17188
17189                 version = db_version( &major, &minor, &patch );
17190
17191                 if( major != DB_VERSION_MAJOR ||
17192                         minor < DB_VERSION_MINOR )
17193                 {
17194                         printf("Berkeley DB version mismatch\n"
17195                                 "\texpected: %s\n\tgot: %s\n",
17196                                 DB_VERSION_STRING, version);
17197                         return 1;
17198                 }
17199         }
17200 #endif
17201
17202 #if DB_VERSION_MAJOR > 2
17203         db_env_create( NULL, 0 );
17204 #elif DB_VERSION_MAJOR > 1
17205         db_appexit( NULL );
17206 #else
17207         (void) dbopen( NULL, 0, 0, 0, NULL);
17208 #endif
17209
17210 ; return 0; }
17211 EOF
17212 if { (eval echo configure:17213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17213   rm -rf conftest*
17214   ol_cv_db_db4=yes
17215 else
17216   echo "configure: failed program was:" >&5
17217   cat conftest.$ac_ext >&5
17218   rm -rf conftest*
17219   ol_cv_db_db4=no
17220 fi
17221 rm -f conftest*
17222
17223         LIBS="$ol_LIBS"
17224
17225 fi
17226
17227 echo "$ac_t""$ol_cv_db_db4" 1>&6
17228
17229         if test $ol_cv_db_db4 = yes ; then
17230                 ol_cv_lib_db=-ldb4
17231         fi
17232 fi
17233
17234 if test $ol_cv_lib_db = no ; then
17235         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17236 echo "configure:17237: checking for Berkeley DB link (-ldb)" >&5
17237 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17238   echo $ac_n "(cached) $ac_c" 1>&6
17239 else
17240   
17241         ol_DB_LIB=-ldb
17242         ol_LIBS=$LIBS
17243         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17244
17245         cat > conftest.$ac_ext <<EOF
17246 #line 17247 "configure"
17247 #include "confdefs.h"
17248
17249 #ifdef HAVE_DB_185_H
17250 # include <db_185.h>
17251 #else
17252 # include <db.h>
17253 #endif
17254
17255 #ifndef DB_VERSION_MAJOR
17256 # define DB_VERSION_MAJOR 1
17257 #endif
17258
17259 #ifndef NULL
17260 #define NULL ((void*)0)
17261 #endif
17262
17263 int main() {
17264
17265 #if DB_VERSION_MAJOR > 1
17266         {
17267                 char *version;
17268                 int major, minor, patch;
17269
17270                 version = db_version( &major, &minor, &patch );
17271
17272                 if( major != DB_VERSION_MAJOR ||
17273                         minor < DB_VERSION_MINOR )
17274                 {
17275                         printf("Berkeley DB version mismatch\n"
17276                                 "\texpected: %s\n\tgot: %s\n",
17277                                 DB_VERSION_STRING, version);
17278                         return 1;
17279                 }
17280         }
17281 #endif
17282
17283 #if DB_VERSION_MAJOR > 2
17284         db_env_create( NULL, 0 );
17285 #elif DB_VERSION_MAJOR > 1
17286         db_appexit( NULL );
17287 #else
17288         (void) dbopen( NULL, 0, 0, 0, NULL);
17289 #endif
17290
17291 ; return 0; }
17292 EOF
17293 if { (eval echo configure:17294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17294   rm -rf conftest*
17295   ol_cv_db_db=yes
17296 else
17297   echo "configure: failed program was:" >&5
17298   cat conftest.$ac_ext >&5
17299   rm -rf conftest*
17300   ol_cv_db_db=no
17301 fi
17302 rm -f conftest*
17303
17304         LIBS="$ol_LIBS"
17305
17306 fi
17307
17308 echo "$ac_t""$ol_cv_db_db" 1>&6
17309
17310         if test $ol_cv_db_db = yes ; then
17311                 ol_cv_lib_db=-ldb
17312         fi
17313 fi
17314
17315 if test $ol_cv_lib_db = no ; then
17316         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17317 echo "configure:17318: checking for Berkeley DB link (-ldb41)" >&5
17318 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17319   echo $ac_n "(cached) $ac_c" 1>&6
17320 else
17321   
17322         ol_DB_LIB=-ldb41
17323         ol_LIBS=$LIBS
17324         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17325
17326         cat > conftest.$ac_ext <<EOF
17327 #line 17328 "configure"
17328 #include "confdefs.h"
17329
17330 #ifdef HAVE_DB_185_H
17331 # include <db_185.h>
17332 #else
17333 # include <db.h>
17334 #endif
17335
17336 #ifndef DB_VERSION_MAJOR
17337 # define DB_VERSION_MAJOR 1
17338 #endif
17339
17340 #ifndef NULL
17341 #define NULL ((void*)0)
17342 #endif
17343
17344 int main() {
17345
17346 #if DB_VERSION_MAJOR > 1
17347         {
17348                 char *version;
17349                 int major, minor, patch;
17350
17351                 version = db_version( &major, &minor, &patch );
17352
17353                 if( major != DB_VERSION_MAJOR ||
17354                         minor < DB_VERSION_MINOR )
17355                 {
17356                         printf("Berkeley DB version mismatch\n"
17357                                 "\texpected: %s\n\tgot: %s\n",
17358                                 DB_VERSION_STRING, version);
17359                         return 1;
17360                 }
17361         }
17362 #endif
17363
17364 #if DB_VERSION_MAJOR > 2
17365         db_env_create( NULL, 0 );
17366 #elif DB_VERSION_MAJOR > 1
17367         db_appexit( NULL );
17368 #else
17369         (void) dbopen( NULL, 0, 0, 0, NULL);
17370 #endif
17371
17372 ; return 0; }
17373 EOF
17374 if { (eval echo configure:17375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17375   rm -rf conftest*
17376   ol_cv_db_db41=yes
17377 else
17378   echo "configure: failed program was:" >&5
17379   cat conftest.$ac_ext >&5
17380   rm -rf conftest*
17381   ol_cv_db_db41=no
17382 fi
17383 rm -f conftest*
17384
17385         LIBS="$ol_LIBS"
17386
17387 fi
17388
17389 echo "$ac_t""$ol_cv_db_db41" 1>&6
17390
17391         if test $ol_cv_db_db41 = yes ; then
17392                 ol_cv_lib_db=-ldb41
17393         fi
17394 fi
17395
17396 if test $ol_cv_lib_db = no ; then
17397         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17398 echo "configure:17399: checking for Berkeley DB link (-ldb-41)" >&5
17399 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17400   echo $ac_n "(cached) $ac_c" 1>&6
17401 else
17402   
17403         ol_DB_LIB=-ldb-41
17404         ol_LIBS=$LIBS
17405         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17406
17407         cat > conftest.$ac_ext <<EOF
17408 #line 17409 "configure"
17409 #include "confdefs.h"
17410
17411 #ifdef HAVE_DB_185_H
17412 # include <db_185.h>
17413 #else
17414 # include <db.h>
17415 #endif
17416
17417 #ifndef DB_VERSION_MAJOR
17418 # define DB_VERSION_MAJOR 1
17419 #endif
17420
17421 #ifndef NULL
17422 #define NULL ((void*)0)
17423 #endif
17424
17425 int main() {
17426
17427 #if DB_VERSION_MAJOR > 1
17428         {
17429                 char *version;
17430                 int major, minor, patch;
17431
17432                 version = db_version( &major, &minor, &patch );
17433
17434                 if( major != DB_VERSION_MAJOR ||
17435                         minor < DB_VERSION_MINOR )
17436                 {
17437                         printf("Berkeley DB version mismatch\n"
17438                                 "\texpected: %s\n\tgot: %s\n",
17439                                 DB_VERSION_STRING, version);
17440                         return 1;
17441                 }
17442         }
17443 #endif
17444
17445 #if DB_VERSION_MAJOR > 2
17446         db_env_create( NULL, 0 );
17447 #elif DB_VERSION_MAJOR > 1
17448         db_appexit( NULL );
17449 #else
17450         (void) dbopen( NULL, 0, 0, 0, NULL);
17451 #endif
17452
17453 ; return 0; }
17454 EOF
17455 if { (eval echo configure:17456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17456   rm -rf conftest*
17457   ol_cv_db_db_41=yes
17458 else
17459   echo "configure: failed program was:" >&5
17460   cat conftest.$ac_ext >&5
17461   rm -rf conftest*
17462   ol_cv_db_db_41=no
17463 fi
17464 rm -f conftest*
17465
17466         LIBS="$ol_LIBS"
17467
17468 fi
17469
17470 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17471
17472         if test $ol_cv_db_db_41 = yes ; then
17473                 ol_cv_lib_db=-ldb-41
17474         fi
17475 fi
17476
17477 if test $ol_cv_lib_db = no ; then
17478         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17479 echo "configure:17480: checking for Berkeley DB link (-ldb-4.1)" >&5
17480 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17481   echo $ac_n "(cached) $ac_c" 1>&6
17482 else
17483   
17484         ol_DB_LIB=-ldb-4.1
17485         ol_LIBS=$LIBS
17486         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17487
17488         cat > conftest.$ac_ext <<EOF
17489 #line 17490 "configure"
17490 #include "confdefs.h"
17491
17492 #ifdef HAVE_DB_185_H
17493 # include <db_185.h>
17494 #else
17495 # include <db.h>
17496 #endif
17497
17498 #ifndef DB_VERSION_MAJOR
17499 # define DB_VERSION_MAJOR 1
17500 #endif
17501
17502 #ifndef NULL
17503 #define NULL ((void*)0)
17504 #endif
17505
17506 int main() {
17507
17508 #if DB_VERSION_MAJOR > 1
17509         {
17510                 char *version;
17511                 int major, minor, patch;
17512
17513                 version = db_version( &major, &minor, &patch );
17514
17515                 if( major != DB_VERSION_MAJOR ||
17516                         minor < DB_VERSION_MINOR )
17517                 {
17518                         printf("Berkeley DB version mismatch\n"
17519                                 "\texpected: %s\n\tgot: %s\n",
17520                                 DB_VERSION_STRING, version);
17521                         return 1;
17522                 }
17523         }
17524 #endif
17525
17526 #if DB_VERSION_MAJOR > 2
17527         db_env_create( NULL, 0 );
17528 #elif DB_VERSION_MAJOR > 1
17529         db_appexit( NULL );
17530 #else
17531         (void) dbopen( NULL, 0, 0, 0, NULL);
17532 #endif
17533
17534 ; return 0; }
17535 EOF
17536 if { (eval echo configure:17537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17537   rm -rf conftest*
17538   ol_cv_db_db_4_dot_1=yes
17539 else
17540   echo "configure: failed program was:" >&5
17541   cat conftest.$ac_ext >&5
17542   rm -rf conftest*
17543   ol_cv_db_db_4_dot_1=no
17544 fi
17545 rm -f conftest*
17546
17547         LIBS="$ol_LIBS"
17548
17549 fi
17550
17551 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17552
17553         if test $ol_cv_db_db_4_dot_1 = yes ; then
17554                 ol_cv_lib_db=-ldb-4.1
17555         fi
17556 fi
17557
17558 if test $ol_cv_lib_db = no ; then
17559         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17560 echo "configure:17561: checking for Berkeley DB link (-ldb-4-1)" >&5
17561 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17562   echo $ac_n "(cached) $ac_c" 1>&6
17563 else
17564   
17565         ol_DB_LIB=-ldb-4-1
17566         ol_LIBS=$LIBS
17567         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17568
17569         cat > conftest.$ac_ext <<EOF
17570 #line 17571 "configure"
17571 #include "confdefs.h"
17572
17573 #ifdef HAVE_DB_185_H
17574 # include <db_185.h>
17575 #else
17576 # include <db.h>
17577 #endif
17578
17579 #ifndef DB_VERSION_MAJOR
17580 # define DB_VERSION_MAJOR 1
17581 #endif
17582
17583 #ifndef NULL
17584 #define NULL ((void*)0)
17585 #endif
17586
17587 int main() {
17588
17589 #if DB_VERSION_MAJOR > 1
17590         {
17591                 char *version;
17592                 int major, minor, patch;
17593
17594                 version = db_version( &major, &minor, &patch );
17595
17596                 if( major != DB_VERSION_MAJOR ||
17597                         minor < DB_VERSION_MINOR )
17598                 {
17599                         printf("Berkeley DB version mismatch\n"
17600                                 "\texpected: %s\n\tgot: %s\n",
17601                                 DB_VERSION_STRING, version);
17602                         return 1;
17603                 }
17604         }
17605 #endif
17606
17607 #if DB_VERSION_MAJOR > 2
17608         db_env_create( NULL, 0 );
17609 #elif DB_VERSION_MAJOR > 1
17610         db_appexit( NULL );
17611 #else
17612         (void) dbopen( NULL, 0, 0, 0, NULL);
17613 #endif
17614
17615 ; return 0; }
17616 EOF
17617 if { (eval echo configure:17618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17618   rm -rf conftest*
17619   ol_cv_db_db_4_1=yes
17620 else
17621   echo "configure: failed program was:" >&5
17622   cat conftest.$ac_ext >&5
17623   rm -rf conftest*
17624   ol_cv_db_db_4_1=no
17625 fi
17626 rm -f conftest*
17627
17628         LIBS="$ol_LIBS"
17629
17630 fi
17631
17632 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17633
17634         if test $ol_cv_db_db_4_1 = yes ; then
17635                 ol_cv_lib_db=-ldb-4-1
17636         fi
17637 fi
17638
17639 if test $ol_cv_lib_db = no ; then
17640         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17641 echo "configure:17642: checking for Berkeley DB link (-ldb3)" >&5
17642 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17643   echo $ac_n "(cached) $ac_c" 1>&6
17644 else
17645   
17646         ol_DB_LIB=-ldb3
17647         ol_LIBS=$LIBS
17648         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17649
17650         cat > conftest.$ac_ext <<EOF
17651 #line 17652 "configure"
17652 #include "confdefs.h"
17653
17654 #ifdef HAVE_DB_185_H
17655 # include <db_185.h>
17656 #else
17657 # include <db.h>
17658 #endif
17659
17660 #ifndef DB_VERSION_MAJOR
17661 # define DB_VERSION_MAJOR 1
17662 #endif
17663
17664 #ifndef NULL
17665 #define NULL ((void*)0)
17666 #endif
17667
17668 int main() {
17669
17670 #if DB_VERSION_MAJOR > 1
17671         {
17672                 char *version;
17673                 int major, minor, patch;
17674
17675                 version = db_version( &major, &minor, &patch );
17676
17677                 if( major != DB_VERSION_MAJOR ||
17678                         minor < DB_VERSION_MINOR )
17679                 {
17680                         printf("Berkeley DB version mismatch\n"
17681                                 "\texpected: %s\n\tgot: %s\n",
17682                                 DB_VERSION_STRING, version);
17683                         return 1;
17684                 }
17685         }
17686 #endif
17687
17688 #if DB_VERSION_MAJOR > 2
17689         db_env_create( NULL, 0 );
17690 #elif DB_VERSION_MAJOR > 1
17691         db_appexit( NULL );
17692 #else
17693         (void) dbopen( NULL, 0, 0, 0, NULL);
17694 #endif
17695
17696 ; return 0; }
17697 EOF
17698 if { (eval echo configure:17699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17699   rm -rf conftest*
17700   ol_cv_db_db3=yes
17701 else
17702   echo "configure: failed program was:" >&5
17703   cat conftest.$ac_ext >&5
17704   rm -rf conftest*
17705   ol_cv_db_db3=no
17706 fi
17707 rm -f conftest*
17708
17709         LIBS="$ol_LIBS"
17710
17711 fi
17712
17713 echo "$ac_t""$ol_cv_db_db3" 1>&6
17714
17715         if test $ol_cv_db_db3 = yes ; then
17716                 ol_cv_lib_db=-ldb3
17717         fi
17718 fi
17719
17720 if test $ol_cv_lib_db = no ; then
17721         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17722 echo "configure:17723: checking for Berkeley DB link (-ldb-3)" >&5
17723 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17724   echo $ac_n "(cached) $ac_c" 1>&6
17725 else
17726   
17727         ol_DB_LIB=-ldb-3
17728         ol_LIBS=$LIBS
17729         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17730
17731         cat > conftest.$ac_ext <<EOF
17732 #line 17733 "configure"
17733 #include "confdefs.h"
17734
17735 #ifdef HAVE_DB_185_H
17736 # include <db_185.h>
17737 #else
17738 # include <db.h>
17739 #endif
17740
17741 #ifndef DB_VERSION_MAJOR
17742 # define DB_VERSION_MAJOR 1
17743 #endif
17744
17745 #ifndef NULL
17746 #define NULL ((void*)0)
17747 #endif
17748
17749 int main() {
17750
17751 #if DB_VERSION_MAJOR > 1
17752         {
17753                 char *version;
17754                 int major, minor, patch;
17755
17756                 version = db_version( &major, &minor, &patch );
17757
17758                 if( major != DB_VERSION_MAJOR ||
17759                         minor < DB_VERSION_MINOR )
17760                 {
17761                         printf("Berkeley DB version mismatch\n"
17762                                 "\texpected: %s\n\tgot: %s\n",
17763                                 DB_VERSION_STRING, version);
17764                         return 1;
17765                 }
17766         }
17767 #endif
17768
17769 #if DB_VERSION_MAJOR > 2
17770         db_env_create( NULL, 0 );
17771 #elif DB_VERSION_MAJOR > 1
17772         db_appexit( NULL );
17773 #else
17774         (void) dbopen( NULL, 0, 0, 0, NULL);
17775 #endif
17776
17777 ; return 0; }
17778 EOF
17779 if { (eval echo configure:17780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17780   rm -rf conftest*
17781   ol_cv_db_db_3=yes
17782 else
17783   echo "configure: failed program was:" >&5
17784   cat conftest.$ac_ext >&5
17785   rm -rf conftest*
17786   ol_cv_db_db_3=no
17787 fi
17788 rm -f conftest*
17789
17790         LIBS="$ol_LIBS"
17791
17792 fi
17793
17794 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17795
17796         if test $ol_cv_db_db_3 = yes ; then
17797                 ol_cv_lib_db=-ldb-3
17798         fi
17799 fi
17800
17801 if test $ol_cv_lib_db = no ; then
17802         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17803 echo "configure:17804: checking for Berkeley DB link (-ldb2)" >&5
17804 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17805   echo $ac_n "(cached) $ac_c" 1>&6
17806 else
17807   
17808         ol_DB_LIB=-ldb2
17809         ol_LIBS=$LIBS
17810         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17811
17812         cat > conftest.$ac_ext <<EOF
17813 #line 17814 "configure"
17814 #include "confdefs.h"
17815
17816 #ifdef HAVE_DB_185_H
17817 # include <db_185.h>
17818 #else
17819 # include <db.h>
17820 #endif
17821
17822 #ifndef DB_VERSION_MAJOR
17823 # define DB_VERSION_MAJOR 1
17824 #endif
17825
17826 #ifndef NULL
17827 #define NULL ((void*)0)
17828 #endif
17829
17830 int main() {
17831
17832 #if DB_VERSION_MAJOR > 1
17833         {
17834                 char *version;
17835                 int major, minor, patch;
17836
17837                 version = db_version( &major, &minor, &patch );
17838
17839                 if( major != DB_VERSION_MAJOR ||
17840                         minor < DB_VERSION_MINOR )
17841                 {
17842                         printf("Berkeley DB version mismatch\n"
17843                                 "\texpected: %s\n\tgot: %s\n",
17844                                 DB_VERSION_STRING, version);
17845                         return 1;
17846                 }
17847         }
17848 #endif
17849
17850 #if DB_VERSION_MAJOR > 2
17851         db_env_create( NULL, 0 );
17852 #elif DB_VERSION_MAJOR > 1
17853         db_appexit( NULL );
17854 #else
17855         (void) dbopen( NULL, 0, 0, 0, NULL);
17856 #endif
17857
17858 ; return 0; }
17859 EOF
17860 if { (eval echo configure:17861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17861   rm -rf conftest*
17862   ol_cv_db_db2=yes
17863 else
17864   echo "configure: failed program was:" >&5
17865   cat conftest.$ac_ext >&5
17866   rm -rf conftest*
17867   ol_cv_db_db2=no
17868 fi
17869 rm -f conftest*
17870
17871         LIBS="$ol_LIBS"
17872
17873 fi
17874
17875 echo "$ac_t""$ol_cv_db_db2" 1>&6
17876
17877         if test $ol_cv_db_db2 = yes ; then
17878                 ol_cv_lib_db=-ldb2
17879         fi
17880 fi
17881
17882 if test $ol_cv_lib_db = no ; then
17883         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17884 echo "configure:17885: checking for Berkeley DB link (-ldb-2)" >&5
17885 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17886   echo $ac_n "(cached) $ac_c" 1>&6
17887 else
17888   
17889         ol_DB_LIB=-ldb-2
17890         ol_LIBS=$LIBS
17891         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17892
17893         cat > conftest.$ac_ext <<EOF
17894 #line 17895 "configure"
17895 #include "confdefs.h"
17896
17897 #ifdef HAVE_DB_185_H
17898 # include <db_185.h>
17899 #else
17900 # include <db.h>
17901 #endif
17902
17903 #ifndef DB_VERSION_MAJOR
17904 # define DB_VERSION_MAJOR 1
17905 #endif
17906
17907 #ifndef NULL
17908 #define NULL ((void*)0)
17909 #endif
17910
17911 int main() {
17912
17913 #if DB_VERSION_MAJOR > 1
17914         {
17915                 char *version;
17916                 int major, minor, patch;
17917
17918                 version = db_version( &major, &minor, &patch );
17919
17920                 if( major != DB_VERSION_MAJOR ||
17921                         minor < DB_VERSION_MINOR )
17922                 {
17923                         printf("Berkeley DB version mismatch\n"
17924                                 "\texpected: %s\n\tgot: %s\n",
17925                                 DB_VERSION_STRING, version);
17926                         return 1;
17927                 }
17928         }
17929 #endif
17930
17931 #if DB_VERSION_MAJOR > 2
17932         db_env_create( NULL, 0 );
17933 #elif DB_VERSION_MAJOR > 1
17934         db_appexit( NULL );
17935 #else
17936         (void) dbopen( NULL, 0, 0, 0, NULL);
17937 #endif
17938
17939 ; return 0; }
17940 EOF
17941 if { (eval echo configure:17942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17942   rm -rf conftest*
17943   ol_cv_db_db_2=yes
17944 else
17945   echo "configure: failed program was:" >&5
17946   cat conftest.$ac_ext >&5
17947   rm -rf conftest*
17948   ol_cv_db_db_2=no
17949 fi
17950 rm -f conftest*
17951
17952         LIBS="$ol_LIBS"
17953
17954 fi
17955
17956 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17957
17958         if test $ol_cv_db_db_2 = yes ; then
17959                 ol_cv_lib_db=-ldb-2
17960         fi
17961 fi
17962
17963 if test $ol_cv_lib_db = no ; then
17964         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17965 echo "configure:17966: checking for Berkeley DB link (-ldb1)" >&5
17966 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17967   echo $ac_n "(cached) $ac_c" 1>&6
17968 else
17969   
17970         ol_DB_LIB=-ldb1
17971         ol_LIBS=$LIBS
17972         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17973
17974         cat > conftest.$ac_ext <<EOF
17975 #line 17976 "configure"
17976 #include "confdefs.h"
17977
17978 #ifdef HAVE_DB_185_H
17979 # include <db_185.h>
17980 #else
17981 # include <db.h>
17982 #endif
17983
17984 #ifndef DB_VERSION_MAJOR
17985 # define DB_VERSION_MAJOR 1
17986 #endif
17987
17988 #ifndef NULL
17989 #define NULL ((void*)0)
17990 #endif
17991
17992 int main() {
17993
17994 #if DB_VERSION_MAJOR > 1
17995         {
17996                 char *version;
17997                 int major, minor, patch;
17998
17999                 version = db_version( &major, &minor, &patch );
18000
18001                 if( major != DB_VERSION_MAJOR ||
18002                         minor < DB_VERSION_MINOR )
18003                 {
18004                         printf("Berkeley DB version mismatch\n"
18005                                 "\texpected: %s\n\tgot: %s\n",
18006                                 DB_VERSION_STRING, version);
18007                         return 1;
18008                 }
18009         }
18010 #endif
18011
18012 #if DB_VERSION_MAJOR > 2
18013         db_env_create( NULL, 0 );
18014 #elif DB_VERSION_MAJOR > 1
18015         db_appexit( NULL );
18016 #else
18017         (void) dbopen( NULL, 0, 0, 0, NULL);
18018 #endif
18019
18020 ; return 0; }
18021 EOF
18022 if { (eval echo configure:18023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18023   rm -rf conftest*
18024   ol_cv_db_db1=yes
18025 else
18026   echo "configure: failed program was:" >&5
18027   cat conftest.$ac_ext >&5
18028   rm -rf conftest*
18029   ol_cv_db_db1=no
18030 fi
18031 rm -f conftest*
18032
18033         LIBS="$ol_LIBS"
18034
18035 fi
18036
18037 echo "$ac_t""$ol_cv_db_db1" 1>&6
18038
18039         if test $ol_cv_db_db1 = yes ; then
18040                 ol_cv_lib_db=-ldb1
18041         fi
18042 fi
18043
18044 if test $ol_cv_lib_db = no ; then
18045         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18046 echo "configure:18047: checking for Berkeley DB link (-ldb-1)" >&5
18047 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18048   echo $ac_n "(cached) $ac_c" 1>&6
18049 else
18050   
18051         ol_DB_LIB=-ldb-1
18052         ol_LIBS=$LIBS
18053         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18054
18055         cat > conftest.$ac_ext <<EOF
18056 #line 18057 "configure"
18057 #include "confdefs.h"
18058
18059 #ifdef HAVE_DB_185_H
18060 # include <db_185.h>
18061 #else
18062 # include <db.h>
18063 #endif
18064
18065 #ifndef DB_VERSION_MAJOR
18066 # define DB_VERSION_MAJOR 1
18067 #endif
18068
18069 #ifndef NULL
18070 #define NULL ((void*)0)
18071 #endif
18072
18073 int main() {
18074
18075 #if DB_VERSION_MAJOR > 1
18076         {
18077                 char *version;
18078                 int major, minor, patch;
18079
18080                 version = db_version( &major, &minor, &patch );
18081
18082                 if( major != DB_VERSION_MAJOR ||
18083                         minor < DB_VERSION_MINOR )
18084                 {
18085                         printf("Berkeley DB version mismatch\n"
18086                                 "\texpected: %s\n\tgot: %s\n",
18087                                 DB_VERSION_STRING, version);
18088                         return 1;
18089                 }
18090         }
18091 #endif
18092
18093 #if DB_VERSION_MAJOR > 2
18094         db_env_create( NULL, 0 );
18095 #elif DB_VERSION_MAJOR > 1
18096         db_appexit( NULL );
18097 #else
18098         (void) dbopen( NULL, 0, 0, 0, NULL);
18099 #endif
18100
18101 ; return 0; }
18102 EOF
18103 if { (eval echo configure:18104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18104   rm -rf conftest*
18105   ol_cv_db_db_1=yes
18106 else
18107   echo "configure: failed program was:" >&5
18108   cat conftest.$ac_ext >&5
18109   rm -rf conftest*
18110   ol_cv_db_db_1=no
18111 fi
18112 rm -f conftest*
18113
18114         LIBS="$ol_LIBS"
18115
18116 fi
18117
18118 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18119
18120         if test $ol_cv_db_db_1 = yes ; then
18121                 ol_cv_lib_db=-ldb-1
18122         fi
18123 fi
18124
18125
18126                 if test "$ol_cv_lib_db" != no ; then
18127                         ol_cv_berkeley_db=yes
18128                 fi
18129         fi
18130 fi
18131
18132         else
18133                 ol_cv_berkeley_db=no
18134 for ac_hdr in db.h
18135 do
18136 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18137 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18138 echo "configure:18139: checking for $ac_hdr" >&5
18139 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18140   echo $ac_n "(cached) $ac_c" 1>&6
18141 else
18142   cat > conftest.$ac_ext <<EOF
18143 #line 18144 "configure"
18144 #include "confdefs.h"
18145 #include <$ac_hdr>
18146 EOF
18147 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18148 { (eval echo configure:18149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18149 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18150 if test -z "$ac_err"; then
18151   rm -rf conftest*
18152   eval "ac_cv_header_$ac_safe=yes"
18153 else
18154   echo "$ac_err" >&5
18155   echo "configure: failed program was:" >&5
18156   cat conftest.$ac_ext >&5
18157   rm -rf conftest*
18158   eval "ac_cv_header_$ac_safe=no"
18159 fi
18160 rm -f conftest*
18161 fi
18162 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18163   echo "$ac_t""yes" 1>&6
18164     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18165   cat >> confdefs.h <<EOF
18166 #define $ac_tr_hdr 1
18167 EOF
18168  
18169 else
18170   echo "$ac_t""no" 1>&6
18171 fi
18172 done
18173
18174 if test $ac_cv_header_db_h = yes; then
18175         ol_cv_lib_db=no
18176 if test $ol_cv_lib_db = no ; then
18177         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18178 echo "configure:18179: checking for Berkeley DB link (default)" >&5
18179 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18180   echo $ac_n "(cached) $ac_c" 1>&6
18181 else
18182   
18183         ol_DB_LIB=
18184         ol_LIBS=$LIBS
18185         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18186
18187         cat > conftest.$ac_ext <<EOF
18188 #line 18189 "configure"
18189 #include "confdefs.h"
18190
18191 #ifdef HAVE_DB_185_H
18192 # include <db_185.h>
18193 #else
18194 # include <db.h>
18195 #endif
18196
18197 #ifndef DB_VERSION_MAJOR
18198 # define DB_VERSION_MAJOR 1
18199 #endif
18200
18201 #ifndef NULL
18202 #define NULL ((void*)0)
18203 #endif
18204
18205 int main() {
18206
18207 #if DB_VERSION_MAJOR > 1
18208         {
18209                 char *version;
18210                 int major, minor, patch;
18211
18212                 version = db_version( &major, &minor, &patch );
18213
18214                 if( major != DB_VERSION_MAJOR ||
18215                         minor < DB_VERSION_MINOR )
18216                 {
18217                         printf("Berkeley DB version mismatch\n"
18218                                 "\texpected: %s\n\tgot: %s\n",
18219                                 DB_VERSION_STRING, version);
18220                         return 1;
18221                 }
18222         }
18223 #endif
18224
18225 #if DB_VERSION_MAJOR > 2
18226         db_env_create( NULL, 0 );
18227 #elif DB_VERSION_MAJOR > 1
18228         db_appexit( NULL );
18229 #else
18230         (void) dbopen( NULL, 0, 0, 0, NULL);
18231 #endif
18232
18233 ; return 0; }
18234 EOF
18235 if { (eval echo configure:18236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18236   rm -rf conftest*
18237   ol_cv_db_none=yes
18238 else
18239   echo "configure: failed program was:" >&5
18240   cat conftest.$ac_ext >&5
18241   rm -rf conftest*
18242   ol_cv_db_none=no
18243 fi
18244 rm -f conftest*
18245
18246         LIBS="$ol_LIBS"
18247
18248 fi
18249
18250 echo "$ac_t""$ol_cv_db_none" 1>&6
18251
18252         if test $ol_cv_db_none = yes ; then
18253                 ol_cv_lib_db=yes
18254         fi
18255 fi
18256
18257 if test $ol_cv_lib_db = no ; then
18258         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18259 echo "configure:18260: checking for Berkeley DB link (-ldb42)" >&5
18260 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18261   echo $ac_n "(cached) $ac_c" 1>&6
18262 else
18263   
18264         ol_DB_LIB=-ldb42
18265         ol_LIBS=$LIBS
18266         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18267
18268         cat > conftest.$ac_ext <<EOF
18269 #line 18270 "configure"
18270 #include "confdefs.h"
18271
18272 #ifdef HAVE_DB_185_H
18273 # include <db_185.h>
18274 #else
18275 # include <db.h>
18276 #endif
18277
18278 #ifndef DB_VERSION_MAJOR
18279 # define DB_VERSION_MAJOR 1
18280 #endif
18281
18282 #ifndef NULL
18283 #define NULL ((void*)0)
18284 #endif
18285
18286 int main() {
18287
18288 #if DB_VERSION_MAJOR > 1
18289         {
18290                 char *version;
18291                 int major, minor, patch;
18292
18293                 version = db_version( &major, &minor, &patch );
18294
18295                 if( major != DB_VERSION_MAJOR ||
18296                         minor < DB_VERSION_MINOR )
18297                 {
18298                         printf("Berkeley DB version mismatch\n"
18299                                 "\texpected: %s\n\tgot: %s\n",
18300                                 DB_VERSION_STRING, version);
18301                         return 1;
18302                 }
18303         }
18304 #endif
18305
18306 #if DB_VERSION_MAJOR > 2
18307         db_env_create( NULL, 0 );
18308 #elif DB_VERSION_MAJOR > 1
18309         db_appexit( NULL );
18310 #else
18311         (void) dbopen( NULL, 0, 0, 0, NULL);
18312 #endif
18313
18314 ; return 0; }
18315 EOF
18316 if { (eval echo configure:18317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18317   rm -rf conftest*
18318   ol_cv_db_db42=yes
18319 else
18320   echo "configure: failed program was:" >&5
18321   cat conftest.$ac_ext >&5
18322   rm -rf conftest*
18323   ol_cv_db_db42=no
18324 fi
18325 rm -f conftest*
18326
18327         LIBS="$ol_LIBS"
18328
18329 fi
18330
18331 echo "$ac_t""$ol_cv_db_db42" 1>&6
18332
18333         if test $ol_cv_db_db42 = yes ; then
18334                 ol_cv_lib_db=-ldb42
18335         fi
18336 fi
18337
18338 if test $ol_cv_lib_db = no ; then
18339         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18340 echo "configure:18341: checking for Berkeley DB link (-ldb-42)" >&5
18341 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18342   echo $ac_n "(cached) $ac_c" 1>&6
18343 else
18344   
18345         ol_DB_LIB=-ldb-42
18346         ol_LIBS=$LIBS
18347         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18348
18349         cat > conftest.$ac_ext <<EOF
18350 #line 18351 "configure"
18351 #include "confdefs.h"
18352
18353 #ifdef HAVE_DB_185_H
18354 # include <db_185.h>
18355 #else
18356 # include <db.h>
18357 #endif
18358
18359 #ifndef DB_VERSION_MAJOR
18360 # define DB_VERSION_MAJOR 1
18361 #endif
18362
18363 #ifndef NULL
18364 #define NULL ((void*)0)
18365 #endif
18366
18367 int main() {
18368
18369 #if DB_VERSION_MAJOR > 1
18370         {
18371                 char *version;
18372                 int major, minor, patch;
18373
18374                 version = db_version( &major, &minor, &patch );
18375
18376                 if( major != DB_VERSION_MAJOR ||
18377                         minor < DB_VERSION_MINOR )
18378                 {
18379                         printf("Berkeley DB version mismatch\n"
18380                                 "\texpected: %s\n\tgot: %s\n",
18381                                 DB_VERSION_STRING, version);
18382                         return 1;
18383                 }
18384         }
18385 #endif
18386
18387 #if DB_VERSION_MAJOR > 2
18388         db_env_create( NULL, 0 );
18389 #elif DB_VERSION_MAJOR > 1
18390         db_appexit( NULL );
18391 #else
18392         (void) dbopen( NULL, 0, 0, 0, NULL);
18393 #endif
18394
18395 ; return 0; }
18396 EOF
18397 if { (eval echo configure:18398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18398   rm -rf conftest*
18399   ol_cv_db_db_42=yes
18400 else
18401   echo "configure: failed program was:" >&5
18402   cat conftest.$ac_ext >&5
18403   rm -rf conftest*
18404   ol_cv_db_db_42=no
18405 fi
18406 rm -f conftest*
18407
18408         LIBS="$ol_LIBS"
18409
18410 fi
18411
18412 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18413
18414         if test $ol_cv_db_db_42 = yes ; then
18415                 ol_cv_lib_db=-ldb-42
18416         fi
18417 fi
18418
18419 if test $ol_cv_lib_db = no ; then
18420         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18421 echo "configure:18422: checking for Berkeley DB link (-ldb-4.2)" >&5
18422 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18423   echo $ac_n "(cached) $ac_c" 1>&6
18424 else
18425   
18426         ol_DB_LIB=-ldb-4.2
18427         ol_LIBS=$LIBS
18428         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18429
18430         cat > conftest.$ac_ext <<EOF
18431 #line 18432 "configure"
18432 #include "confdefs.h"
18433
18434 #ifdef HAVE_DB_185_H
18435 # include <db_185.h>
18436 #else
18437 # include <db.h>
18438 #endif
18439
18440 #ifndef DB_VERSION_MAJOR
18441 # define DB_VERSION_MAJOR 1
18442 #endif
18443
18444 #ifndef NULL
18445 #define NULL ((void*)0)
18446 #endif
18447
18448 int main() {
18449
18450 #if DB_VERSION_MAJOR > 1
18451         {
18452                 char *version;
18453                 int major, minor, patch;
18454
18455                 version = db_version( &major, &minor, &patch );
18456
18457                 if( major != DB_VERSION_MAJOR ||
18458                         minor < DB_VERSION_MINOR )
18459                 {
18460                         printf("Berkeley DB version mismatch\n"
18461                                 "\texpected: %s\n\tgot: %s\n",
18462                                 DB_VERSION_STRING, version);
18463                         return 1;
18464                 }
18465         }
18466 #endif
18467
18468 #if DB_VERSION_MAJOR > 2
18469         db_env_create( NULL, 0 );
18470 #elif DB_VERSION_MAJOR > 1
18471         db_appexit( NULL );
18472 #else
18473         (void) dbopen( NULL, 0, 0, 0, NULL);
18474 #endif
18475
18476 ; return 0; }
18477 EOF
18478 if { (eval echo configure:18479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18479   rm -rf conftest*
18480   ol_cv_db_db_4_dot_2=yes
18481 else
18482   echo "configure: failed program was:" >&5
18483   cat conftest.$ac_ext >&5
18484   rm -rf conftest*
18485   ol_cv_db_db_4_dot_2=no
18486 fi
18487 rm -f conftest*
18488
18489         LIBS="$ol_LIBS"
18490
18491 fi
18492
18493 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18494
18495         if test $ol_cv_db_db_4_dot_2 = yes ; then
18496                 ol_cv_lib_db=-ldb-4.2
18497         fi
18498 fi
18499
18500 if test $ol_cv_lib_db = no ; then
18501         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18502 echo "configure:18503: checking for Berkeley DB link (-ldb-4-2)" >&5
18503 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18504   echo $ac_n "(cached) $ac_c" 1>&6
18505 else
18506   
18507         ol_DB_LIB=-ldb-4-2
18508         ol_LIBS=$LIBS
18509         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18510
18511         cat > conftest.$ac_ext <<EOF
18512 #line 18513 "configure"
18513 #include "confdefs.h"
18514
18515 #ifdef HAVE_DB_185_H
18516 # include <db_185.h>
18517 #else
18518 # include <db.h>
18519 #endif
18520
18521 #ifndef DB_VERSION_MAJOR
18522 # define DB_VERSION_MAJOR 1
18523 #endif
18524
18525 #ifndef NULL
18526 #define NULL ((void*)0)
18527 #endif
18528
18529 int main() {
18530
18531 #if DB_VERSION_MAJOR > 1
18532         {
18533                 char *version;
18534                 int major, minor, patch;
18535
18536                 version = db_version( &major, &minor, &patch );
18537
18538                 if( major != DB_VERSION_MAJOR ||
18539                         minor < DB_VERSION_MINOR )
18540                 {
18541                         printf("Berkeley DB version mismatch\n"
18542                                 "\texpected: %s\n\tgot: %s\n",
18543                                 DB_VERSION_STRING, version);
18544                         return 1;
18545                 }
18546         }
18547 #endif
18548
18549 #if DB_VERSION_MAJOR > 2
18550         db_env_create( NULL, 0 );
18551 #elif DB_VERSION_MAJOR > 1
18552         db_appexit( NULL );
18553 #else
18554         (void) dbopen( NULL, 0, 0, 0, NULL);
18555 #endif
18556
18557 ; return 0; }
18558 EOF
18559 if { (eval echo configure:18560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18560   rm -rf conftest*
18561   ol_cv_db_db_4_2=yes
18562 else
18563   echo "configure: failed program was:" >&5
18564   cat conftest.$ac_ext >&5
18565   rm -rf conftest*
18566   ol_cv_db_db_4_2=no
18567 fi
18568 rm -f conftest*
18569
18570         LIBS="$ol_LIBS"
18571
18572 fi
18573
18574 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18575
18576         if test $ol_cv_db_db_4_2 = yes ; then
18577                 ol_cv_lib_db=-ldb-4-2
18578         fi
18579 fi
18580
18581 if test $ol_cv_lib_db = no ; then
18582         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18583 echo "configure:18584: checking for Berkeley DB link (-ldb-4)" >&5
18584 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18585   echo $ac_n "(cached) $ac_c" 1>&6
18586 else
18587   
18588         ol_DB_LIB=-ldb-4
18589         ol_LIBS=$LIBS
18590         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18591
18592         cat > conftest.$ac_ext <<EOF
18593 #line 18594 "configure"
18594 #include "confdefs.h"
18595
18596 #ifdef HAVE_DB_185_H
18597 # include <db_185.h>
18598 #else
18599 # include <db.h>
18600 #endif
18601
18602 #ifndef DB_VERSION_MAJOR
18603 # define DB_VERSION_MAJOR 1
18604 #endif
18605
18606 #ifndef NULL
18607 #define NULL ((void*)0)
18608 #endif
18609
18610 int main() {
18611
18612 #if DB_VERSION_MAJOR > 1
18613         {
18614                 char *version;
18615                 int major, minor, patch;
18616
18617                 version = db_version( &major, &minor, &patch );
18618
18619                 if( major != DB_VERSION_MAJOR ||
18620                         minor < DB_VERSION_MINOR )
18621                 {
18622                         printf("Berkeley DB version mismatch\n"
18623                                 "\texpected: %s\n\tgot: %s\n",
18624                                 DB_VERSION_STRING, version);
18625                         return 1;
18626                 }
18627         }
18628 #endif
18629
18630 #if DB_VERSION_MAJOR > 2
18631         db_env_create( NULL, 0 );
18632 #elif DB_VERSION_MAJOR > 1
18633         db_appexit( NULL );
18634 #else
18635         (void) dbopen( NULL, 0, 0, 0, NULL);
18636 #endif
18637
18638 ; return 0; }
18639 EOF
18640 if { (eval echo configure:18641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18641   rm -rf conftest*
18642   ol_cv_db_db_4=yes
18643 else
18644   echo "configure: failed program was:" >&5
18645   cat conftest.$ac_ext >&5
18646   rm -rf conftest*
18647   ol_cv_db_db_4=no
18648 fi
18649 rm -f conftest*
18650
18651         LIBS="$ol_LIBS"
18652
18653 fi
18654
18655 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18656
18657         if test $ol_cv_db_db_4 = yes ; then
18658                 ol_cv_lib_db=-ldb-4
18659         fi
18660 fi
18661
18662 if test $ol_cv_lib_db = no ; then
18663         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18664 echo "configure:18665: checking for Berkeley DB link (-ldb4)" >&5
18665 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18666   echo $ac_n "(cached) $ac_c" 1>&6
18667 else
18668   
18669         ol_DB_LIB=-ldb4
18670         ol_LIBS=$LIBS
18671         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18672
18673         cat > conftest.$ac_ext <<EOF
18674 #line 18675 "configure"
18675 #include "confdefs.h"
18676
18677 #ifdef HAVE_DB_185_H
18678 # include <db_185.h>
18679 #else
18680 # include <db.h>
18681 #endif
18682
18683 #ifndef DB_VERSION_MAJOR
18684 # define DB_VERSION_MAJOR 1
18685 #endif
18686
18687 #ifndef NULL
18688 #define NULL ((void*)0)
18689 #endif
18690
18691 int main() {
18692
18693 #if DB_VERSION_MAJOR > 1
18694         {
18695                 char *version;
18696                 int major, minor, patch;
18697
18698                 version = db_version( &major, &minor, &patch );
18699
18700                 if( major != DB_VERSION_MAJOR ||
18701                         minor < DB_VERSION_MINOR )
18702                 {
18703                         printf("Berkeley DB version mismatch\n"
18704                                 "\texpected: %s\n\tgot: %s\n",
18705                                 DB_VERSION_STRING, version);
18706                         return 1;
18707                 }
18708         }
18709 #endif
18710
18711 #if DB_VERSION_MAJOR > 2
18712         db_env_create( NULL, 0 );
18713 #elif DB_VERSION_MAJOR > 1
18714         db_appexit( NULL );
18715 #else
18716         (void) dbopen( NULL, 0, 0, 0, NULL);
18717 #endif
18718
18719 ; return 0; }
18720 EOF
18721 if { (eval echo configure:18722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18722   rm -rf conftest*
18723   ol_cv_db_db4=yes
18724 else
18725   echo "configure: failed program was:" >&5
18726   cat conftest.$ac_ext >&5
18727   rm -rf conftest*
18728   ol_cv_db_db4=no
18729 fi
18730 rm -f conftest*
18731
18732         LIBS="$ol_LIBS"
18733
18734 fi
18735
18736 echo "$ac_t""$ol_cv_db_db4" 1>&6
18737
18738         if test $ol_cv_db_db4 = yes ; then
18739                 ol_cv_lib_db=-ldb4
18740         fi
18741 fi
18742
18743 if test $ol_cv_lib_db = no ; then
18744         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18745 echo "configure:18746: checking for Berkeley DB link (-ldb)" >&5
18746 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18747   echo $ac_n "(cached) $ac_c" 1>&6
18748 else
18749   
18750         ol_DB_LIB=-ldb
18751         ol_LIBS=$LIBS
18752         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18753
18754         cat > conftest.$ac_ext <<EOF
18755 #line 18756 "configure"
18756 #include "confdefs.h"
18757
18758 #ifdef HAVE_DB_185_H
18759 # include <db_185.h>
18760 #else
18761 # include <db.h>
18762 #endif
18763
18764 #ifndef DB_VERSION_MAJOR
18765 # define DB_VERSION_MAJOR 1
18766 #endif
18767
18768 #ifndef NULL
18769 #define NULL ((void*)0)
18770 #endif
18771
18772 int main() {
18773
18774 #if DB_VERSION_MAJOR > 1
18775         {
18776                 char *version;
18777                 int major, minor, patch;
18778
18779                 version = db_version( &major, &minor, &patch );
18780
18781                 if( major != DB_VERSION_MAJOR ||
18782                         minor < DB_VERSION_MINOR )
18783                 {
18784                         printf("Berkeley DB version mismatch\n"
18785                                 "\texpected: %s\n\tgot: %s\n",
18786                                 DB_VERSION_STRING, version);
18787                         return 1;
18788                 }
18789         }
18790 #endif
18791
18792 #if DB_VERSION_MAJOR > 2
18793         db_env_create( NULL, 0 );
18794 #elif DB_VERSION_MAJOR > 1
18795         db_appexit( NULL );
18796 #else
18797         (void) dbopen( NULL, 0, 0, 0, NULL);
18798 #endif
18799
18800 ; return 0; }
18801 EOF
18802 if { (eval echo configure:18803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18803   rm -rf conftest*
18804   ol_cv_db_db=yes
18805 else
18806   echo "configure: failed program was:" >&5
18807   cat conftest.$ac_ext >&5
18808   rm -rf conftest*
18809   ol_cv_db_db=no
18810 fi
18811 rm -f conftest*
18812
18813         LIBS="$ol_LIBS"
18814
18815 fi
18816
18817 echo "$ac_t""$ol_cv_db_db" 1>&6
18818
18819         if test $ol_cv_db_db = yes ; then
18820                 ol_cv_lib_db=-ldb
18821         fi
18822 fi
18823
18824 if test $ol_cv_lib_db = no ; then
18825         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18826 echo "configure:18827: checking for Berkeley DB link (-ldb41)" >&5
18827 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18828   echo $ac_n "(cached) $ac_c" 1>&6
18829 else
18830   
18831         ol_DB_LIB=-ldb41
18832         ol_LIBS=$LIBS
18833         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18834
18835         cat > conftest.$ac_ext <<EOF
18836 #line 18837 "configure"
18837 #include "confdefs.h"
18838
18839 #ifdef HAVE_DB_185_H
18840 # include <db_185.h>
18841 #else
18842 # include <db.h>
18843 #endif
18844
18845 #ifndef DB_VERSION_MAJOR
18846 # define DB_VERSION_MAJOR 1
18847 #endif
18848
18849 #ifndef NULL
18850 #define NULL ((void*)0)
18851 #endif
18852
18853 int main() {
18854
18855 #if DB_VERSION_MAJOR > 1
18856         {
18857                 char *version;
18858                 int major, minor, patch;
18859
18860                 version = db_version( &major, &minor, &patch );
18861
18862                 if( major != DB_VERSION_MAJOR ||
18863                         minor < DB_VERSION_MINOR )
18864                 {
18865                         printf("Berkeley DB version mismatch\n"
18866                                 "\texpected: %s\n\tgot: %s\n",
18867                                 DB_VERSION_STRING, version);
18868                         return 1;
18869                 }
18870         }
18871 #endif
18872
18873 #if DB_VERSION_MAJOR > 2
18874         db_env_create( NULL, 0 );
18875 #elif DB_VERSION_MAJOR > 1
18876         db_appexit( NULL );
18877 #else
18878         (void) dbopen( NULL, 0, 0, 0, NULL);
18879 #endif
18880
18881 ; return 0; }
18882 EOF
18883 if { (eval echo configure:18884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18884   rm -rf conftest*
18885   ol_cv_db_db41=yes
18886 else
18887   echo "configure: failed program was:" >&5
18888   cat conftest.$ac_ext >&5
18889   rm -rf conftest*
18890   ol_cv_db_db41=no
18891 fi
18892 rm -f conftest*
18893
18894         LIBS="$ol_LIBS"
18895
18896 fi
18897
18898 echo "$ac_t""$ol_cv_db_db41" 1>&6
18899
18900         if test $ol_cv_db_db41 = yes ; then
18901                 ol_cv_lib_db=-ldb41
18902         fi
18903 fi
18904
18905 if test $ol_cv_lib_db = no ; then
18906         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18907 echo "configure:18908: checking for Berkeley DB link (-ldb-41)" >&5
18908 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18909   echo $ac_n "(cached) $ac_c" 1>&6
18910 else
18911   
18912         ol_DB_LIB=-ldb-41
18913         ol_LIBS=$LIBS
18914         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18915
18916         cat > conftest.$ac_ext <<EOF
18917 #line 18918 "configure"
18918 #include "confdefs.h"
18919
18920 #ifdef HAVE_DB_185_H
18921 # include <db_185.h>
18922 #else
18923 # include <db.h>
18924 #endif
18925
18926 #ifndef DB_VERSION_MAJOR
18927 # define DB_VERSION_MAJOR 1
18928 #endif
18929
18930 #ifndef NULL
18931 #define NULL ((void*)0)
18932 #endif
18933
18934 int main() {
18935
18936 #if DB_VERSION_MAJOR > 1
18937         {
18938                 char *version;
18939                 int major, minor, patch;
18940
18941                 version = db_version( &major, &minor, &patch );
18942
18943                 if( major != DB_VERSION_MAJOR ||
18944                         minor < DB_VERSION_MINOR )
18945                 {
18946                         printf("Berkeley DB version mismatch\n"
18947                                 "\texpected: %s\n\tgot: %s\n",
18948                                 DB_VERSION_STRING, version);
18949                         return 1;
18950                 }
18951         }
18952 #endif
18953
18954 #if DB_VERSION_MAJOR > 2
18955         db_env_create( NULL, 0 );
18956 #elif DB_VERSION_MAJOR > 1
18957         db_appexit( NULL );
18958 #else
18959         (void) dbopen( NULL, 0, 0, 0, NULL);
18960 #endif
18961
18962 ; return 0; }
18963 EOF
18964 if { (eval echo configure:18965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18965   rm -rf conftest*
18966   ol_cv_db_db_41=yes
18967 else
18968   echo "configure: failed program was:" >&5
18969   cat conftest.$ac_ext >&5
18970   rm -rf conftest*
18971   ol_cv_db_db_41=no
18972 fi
18973 rm -f conftest*
18974
18975         LIBS="$ol_LIBS"
18976
18977 fi
18978
18979 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18980
18981         if test $ol_cv_db_db_41 = yes ; then
18982                 ol_cv_lib_db=-ldb-41
18983         fi
18984 fi
18985
18986 if test $ol_cv_lib_db = no ; then
18987         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18988 echo "configure:18989: checking for Berkeley DB link (-ldb-4.1)" >&5
18989 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18990   echo $ac_n "(cached) $ac_c" 1>&6
18991 else
18992   
18993         ol_DB_LIB=-ldb-4.1
18994         ol_LIBS=$LIBS
18995         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18996
18997         cat > conftest.$ac_ext <<EOF
18998 #line 18999 "configure"
18999 #include "confdefs.h"
19000
19001 #ifdef HAVE_DB_185_H
19002 # include <db_185.h>
19003 #else
19004 # include <db.h>
19005 #endif
19006
19007 #ifndef DB_VERSION_MAJOR
19008 # define DB_VERSION_MAJOR 1
19009 #endif
19010
19011 #ifndef NULL
19012 #define NULL ((void*)0)
19013 #endif
19014
19015 int main() {
19016
19017 #if DB_VERSION_MAJOR > 1
19018         {
19019                 char *version;
19020                 int major, minor, patch;
19021
19022                 version = db_version( &major, &minor, &patch );
19023
19024                 if( major != DB_VERSION_MAJOR ||
19025                         minor < DB_VERSION_MINOR )
19026                 {
19027                         printf("Berkeley DB version mismatch\n"
19028                                 "\texpected: %s\n\tgot: %s\n",
19029                                 DB_VERSION_STRING, version);
19030                         return 1;
19031                 }
19032         }
19033 #endif
19034
19035 #if DB_VERSION_MAJOR > 2
19036         db_env_create( NULL, 0 );
19037 #elif DB_VERSION_MAJOR > 1
19038         db_appexit( NULL );
19039 #else
19040         (void) dbopen( NULL, 0, 0, 0, NULL);
19041 #endif
19042
19043 ; return 0; }
19044 EOF
19045 if { (eval echo configure:19046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19046   rm -rf conftest*
19047   ol_cv_db_db_4_dot_1=yes
19048 else
19049   echo "configure: failed program was:" >&5
19050   cat conftest.$ac_ext >&5
19051   rm -rf conftest*
19052   ol_cv_db_db_4_dot_1=no
19053 fi
19054 rm -f conftest*
19055
19056         LIBS="$ol_LIBS"
19057
19058 fi
19059
19060 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19061
19062         if test $ol_cv_db_db_4_dot_1 = yes ; then
19063                 ol_cv_lib_db=-ldb-4.1
19064         fi
19065 fi
19066
19067 if test $ol_cv_lib_db = no ; then
19068         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19069 echo "configure:19070: checking for Berkeley DB link (-ldb-4-1)" >&5
19070 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19071   echo $ac_n "(cached) $ac_c" 1>&6
19072 else
19073   
19074         ol_DB_LIB=-ldb-4-1
19075         ol_LIBS=$LIBS
19076         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19077
19078         cat > conftest.$ac_ext <<EOF
19079 #line 19080 "configure"
19080 #include "confdefs.h"
19081
19082 #ifdef HAVE_DB_185_H
19083 # include <db_185.h>
19084 #else
19085 # include <db.h>
19086 #endif
19087
19088 #ifndef DB_VERSION_MAJOR
19089 # define DB_VERSION_MAJOR 1
19090 #endif
19091
19092 #ifndef NULL
19093 #define NULL ((void*)0)
19094 #endif
19095
19096 int main() {
19097
19098 #if DB_VERSION_MAJOR > 1
19099         {
19100                 char *version;
19101                 int major, minor, patch;
19102
19103                 version = db_version( &major, &minor, &patch );
19104
19105                 if( major != DB_VERSION_MAJOR ||
19106                         minor < DB_VERSION_MINOR )
19107                 {
19108                         printf("Berkeley DB version mismatch\n"
19109                                 "\texpected: %s\n\tgot: %s\n",
19110                                 DB_VERSION_STRING, version);
19111                         return 1;
19112                 }
19113         }
19114 #endif
19115
19116 #if DB_VERSION_MAJOR > 2
19117         db_env_create( NULL, 0 );
19118 #elif DB_VERSION_MAJOR > 1
19119         db_appexit( NULL );
19120 #else
19121         (void) dbopen( NULL, 0, 0, 0, NULL);
19122 #endif
19123
19124 ; return 0; }
19125 EOF
19126 if { (eval echo configure:19127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19127   rm -rf conftest*
19128   ol_cv_db_db_4_1=yes
19129 else
19130   echo "configure: failed program was:" >&5
19131   cat conftest.$ac_ext >&5
19132   rm -rf conftest*
19133   ol_cv_db_db_4_1=no
19134 fi
19135 rm -f conftest*
19136
19137         LIBS="$ol_LIBS"
19138
19139 fi
19140
19141 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19142
19143         if test $ol_cv_db_db_4_1 = yes ; then
19144                 ol_cv_lib_db=-ldb-4-1
19145         fi
19146 fi
19147
19148 if test $ol_cv_lib_db = no ; then
19149         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19150 echo "configure:19151: checking for Berkeley DB link (-ldb3)" >&5
19151 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19152   echo $ac_n "(cached) $ac_c" 1>&6
19153 else
19154   
19155         ol_DB_LIB=-ldb3
19156         ol_LIBS=$LIBS
19157         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19158
19159         cat > conftest.$ac_ext <<EOF
19160 #line 19161 "configure"
19161 #include "confdefs.h"
19162
19163 #ifdef HAVE_DB_185_H
19164 # include <db_185.h>
19165 #else
19166 # include <db.h>
19167 #endif
19168
19169 #ifndef DB_VERSION_MAJOR
19170 # define DB_VERSION_MAJOR 1
19171 #endif
19172
19173 #ifndef NULL
19174 #define NULL ((void*)0)
19175 #endif
19176
19177 int main() {
19178
19179 #if DB_VERSION_MAJOR > 1
19180         {
19181                 char *version;
19182                 int major, minor, patch;
19183
19184                 version = db_version( &major, &minor, &patch );
19185
19186                 if( major != DB_VERSION_MAJOR ||
19187                         minor < DB_VERSION_MINOR )
19188                 {
19189                         printf("Berkeley DB version mismatch\n"
19190                                 "\texpected: %s\n\tgot: %s\n",
19191                                 DB_VERSION_STRING, version);
19192                         return 1;
19193                 }
19194         }
19195 #endif
19196
19197 #if DB_VERSION_MAJOR > 2
19198         db_env_create( NULL, 0 );
19199 #elif DB_VERSION_MAJOR > 1
19200         db_appexit( NULL );
19201 #else
19202         (void) dbopen( NULL, 0, 0, 0, NULL);
19203 #endif
19204
19205 ; return 0; }
19206 EOF
19207 if { (eval echo configure:19208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19208   rm -rf conftest*
19209   ol_cv_db_db3=yes
19210 else
19211   echo "configure: failed program was:" >&5
19212   cat conftest.$ac_ext >&5
19213   rm -rf conftest*
19214   ol_cv_db_db3=no
19215 fi
19216 rm -f conftest*
19217
19218         LIBS="$ol_LIBS"
19219
19220 fi
19221
19222 echo "$ac_t""$ol_cv_db_db3" 1>&6
19223
19224         if test $ol_cv_db_db3 = yes ; then
19225                 ol_cv_lib_db=-ldb3
19226         fi
19227 fi
19228
19229 if test $ol_cv_lib_db = no ; then
19230         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19231 echo "configure:19232: checking for Berkeley DB link (-ldb-3)" >&5
19232 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19233   echo $ac_n "(cached) $ac_c" 1>&6
19234 else
19235   
19236         ol_DB_LIB=-ldb-3
19237         ol_LIBS=$LIBS
19238         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19239
19240         cat > conftest.$ac_ext <<EOF
19241 #line 19242 "configure"
19242 #include "confdefs.h"
19243
19244 #ifdef HAVE_DB_185_H
19245 # include <db_185.h>
19246 #else
19247 # include <db.h>
19248 #endif
19249
19250 #ifndef DB_VERSION_MAJOR
19251 # define DB_VERSION_MAJOR 1
19252 #endif
19253
19254 #ifndef NULL
19255 #define NULL ((void*)0)
19256 #endif
19257
19258 int main() {
19259
19260 #if DB_VERSION_MAJOR > 1
19261         {
19262                 char *version;
19263                 int major, minor, patch;
19264
19265                 version = db_version( &major, &minor, &patch );
19266
19267                 if( major != DB_VERSION_MAJOR ||
19268                         minor < DB_VERSION_MINOR )
19269                 {
19270                         printf("Berkeley DB version mismatch\n"
19271                                 "\texpected: %s\n\tgot: %s\n",
19272                                 DB_VERSION_STRING, version);
19273                         return 1;
19274                 }
19275         }
19276 #endif
19277
19278 #if DB_VERSION_MAJOR > 2
19279         db_env_create( NULL, 0 );
19280 #elif DB_VERSION_MAJOR > 1
19281         db_appexit( NULL );
19282 #else
19283         (void) dbopen( NULL, 0, 0, 0, NULL);
19284 #endif
19285
19286 ; return 0; }
19287 EOF
19288 if { (eval echo configure:19289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19289   rm -rf conftest*
19290   ol_cv_db_db_3=yes
19291 else
19292   echo "configure: failed program was:" >&5
19293   cat conftest.$ac_ext >&5
19294   rm -rf conftest*
19295   ol_cv_db_db_3=no
19296 fi
19297 rm -f conftest*
19298
19299         LIBS="$ol_LIBS"
19300
19301 fi
19302
19303 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19304
19305         if test $ol_cv_db_db_3 = yes ; then
19306                 ol_cv_lib_db=-ldb-3
19307         fi
19308 fi
19309
19310 if test $ol_cv_lib_db = no ; then
19311         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19312 echo "configure:19313: checking for Berkeley DB link (-ldb2)" >&5
19313 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19314   echo $ac_n "(cached) $ac_c" 1>&6
19315 else
19316   
19317         ol_DB_LIB=-ldb2
19318         ol_LIBS=$LIBS
19319         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19320
19321         cat > conftest.$ac_ext <<EOF
19322 #line 19323 "configure"
19323 #include "confdefs.h"
19324
19325 #ifdef HAVE_DB_185_H
19326 # include <db_185.h>
19327 #else
19328 # include <db.h>
19329 #endif
19330
19331 #ifndef DB_VERSION_MAJOR
19332 # define DB_VERSION_MAJOR 1
19333 #endif
19334
19335 #ifndef NULL
19336 #define NULL ((void*)0)
19337 #endif
19338
19339 int main() {
19340
19341 #if DB_VERSION_MAJOR > 1
19342         {
19343                 char *version;
19344                 int major, minor, patch;
19345
19346                 version = db_version( &major, &minor, &patch );
19347
19348                 if( major != DB_VERSION_MAJOR ||
19349                         minor < DB_VERSION_MINOR )
19350                 {
19351                         printf("Berkeley DB version mismatch\n"
19352                                 "\texpected: %s\n\tgot: %s\n",
19353                                 DB_VERSION_STRING, version);
19354                         return 1;
19355                 }
19356         }
19357 #endif
19358
19359 #if DB_VERSION_MAJOR > 2
19360         db_env_create( NULL, 0 );
19361 #elif DB_VERSION_MAJOR > 1
19362         db_appexit( NULL );
19363 #else
19364         (void) dbopen( NULL, 0, 0, 0, NULL);
19365 #endif
19366
19367 ; return 0; }
19368 EOF
19369 if { (eval echo configure:19370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19370   rm -rf conftest*
19371   ol_cv_db_db2=yes
19372 else
19373   echo "configure: failed program was:" >&5
19374   cat conftest.$ac_ext >&5
19375   rm -rf conftest*
19376   ol_cv_db_db2=no
19377 fi
19378 rm -f conftest*
19379
19380         LIBS="$ol_LIBS"
19381
19382 fi
19383
19384 echo "$ac_t""$ol_cv_db_db2" 1>&6
19385
19386         if test $ol_cv_db_db2 = yes ; then
19387                 ol_cv_lib_db=-ldb2
19388         fi
19389 fi
19390
19391 if test $ol_cv_lib_db = no ; then
19392         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19393 echo "configure:19394: checking for Berkeley DB link (-ldb-2)" >&5
19394 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19395   echo $ac_n "(cached) $ac_c" 1>&6
19396 else
19397   
19398         ol_DB_LIB=-ldb-2
19399         ol_LIBS=$LIBS
19400         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19401
19402         cat > conftest.$ac_ext <<EOF
19403 #line 19404 "configure"
19404 #include "confdefs.h"
19405
19406 #ifdef HAVE_DB_185_H
19407 # include <db_185.h>
19408 #else
19409 # include <db.h>
19410 #endif
19411
19412 #ifndef DB_VERSION_MAJOR
19413 # define DB_VERSION_MAJOR 1
19414 #endif
19415
19416 #ifndef NULL
19417 #define NULL ((void*)0)
19418 #endif
19419
19420 int main() {
19421
19422 #if DB_VERSION_MAJOR > 1
19423         {
19424                 char *version;
19425                 int major, minor, patch;
19426
19427                 version = db_version( &major, &minor, &patch );
19428
19429                 if( major != DB_VERSION_MAJOR ||
19430                         minor < DB_VERSION_MINOR )
19431                 {
19432                         printf("Berkeley DB version mismatch\n"
19433                                 "\texpected: %s\n\tgot: %s\n",
19434                                 DB_VERSION_STRING, version);
19435                         return 1;
19436                 }
19437         }
19438 #endif
19439
19440 #if DB_VERSION_MAJOR > 2
19441         db_env_create( NULL, 0 );
19442 #elif DB_VERSION_MAJOR > 1
19443         db_appexit( NULL );
19444 #else
19445         (void) dbopen( NULL, 0, 0, 0, NULL);
19446 #endif
19447
19448 ; return 0; }
19449 EOF
19450 if { (eval echo configure:19451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19451   rm -rf conftest*
19452   ol_cv_db_db_2=yes
19453 else
19454   echo "configure: failed program was:" >&5
19455   cat conftest.$ac_ext >&5
19456   rm -rf conftest*
19457   ol_cv_db_db_2=no
19458 fi
19459 rm -f conftest*
19460
19461         LIBS="$ol_LIBS"
19462
19463 fi
19464
19465 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19466
19467         if test $ol_cv_db_db_2 = yes ; then
19468                 ol_cv_lib_db=-ldb-2
19469         fi
19470 fi
19471
19472 if test $ol_cv_lib_db = no ; then
19473         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19474 echo "configure:19475: checking for Berkeley DB link (-ldb1)" >&5
19475 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19476   echo $ac_n "(cached) $ac_c" 1>&6
19477 else
19478   
19479         ol_DB_LIB=-ldb1
19480         ol_LIBS=$LIBS
19481         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19482
19483         cat > conftest.$ac_ext <<EOF
19484 #line 19485 "configure"
19485 #include "confdefs.h"
19486
19487 #ifdef HAVE_DB_185_H
19488 # include <db_185.h>
19489 #else
19490 # include <db.h>
19491 #endif
19492
19493 #ifndef DB_VERSION_MAJOR
19494 # define DB_VERSION_MAJOR 1
19495 #endif
19496
19497 #ifndef NULL
19498 #define NULL ((void*)0)
19499 #endif
19500
19501 int main() {
19502
19503 #if DB_VERSION_MAJOR > 1
19504         {
19505                 char *version;
19506                 int major, minor, patch;
19507
19508                 version = db_version( &major, &minor, &patch );
19509
19510                 if( major != DB_VERSION_MAJOR ||
19511                         minor < DB_VERSION_MINOR )
19512                 {
19513                         printf("Berkeley DB version mismatch\n"
19514                                 "\texpected: %s\n\tgot: %s\n",
19515                                 DB_VERSION_STRING, version);
19516                         return 1;
19517                 }
19518         }
19519 #endif
19520
19521 #if DB_VERSION_MAJOR > 2
19522         db_env_create( NULL, 0 );
19523 #elif DB_VERSION_MAJOR > 1
19524         db_appexit( NULL );
19525 #else
19526         (void) dbopen( NULL, 0, 0, 0, NULL);
19527 #endif
19528
19529 ; return 0; }
19530 EOF
19531 if { (eval echo configure:19532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19532   rm -rf conftest*
19533   ol_cv_db_db1=yes
19534 else
19535   echo "configure: failed program was:" >&5
19536   cat conftest.$ac_ext >&5
19537   rm -rf conftest*
19538   ol_cv_db_db1=no
19539 fi
19540 rm -f conftest*
19541
19542         LIBS="$ol_LIBS"
19543
19544 fi
19545
19546 echo "$ac_t""$ol_cv_db_db1" 1>&6
19547
19548         if test $ol_cv_db_db1 = yes ; then
19549                 ol_cv_lib_db=-ldb1
19550         fi
19551 fi
19552
19553 if test $ol_cv_lib_db = no ; then
19554         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19555 echo "configure:19556: checking for Berkeley DB link (-ldb-1)" >&5
19556 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19557   echo $ac_n "(cached) $ac_c" 1>&6
19558 else
19559   
19560         ol_DB_LIB=-ldb-1
19561         ol_LIBS=$LIBS
19562         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19563
19564         cat > conftest.$ac_ext <<EOF
19565 #line 19566 "configure"
19566 #include "confdefs.h"
19567
19568 #ifdef HAVE_DB_185_H
19569 # include <db_185.h>
19570 #else
19571 # include <db.h>
19572 #endif
19573
19574 #ifndef DB_VERSION_MAJOR
19575 # define DB_VERSION_MAJOR 1
19576 #endif
19577
19578 #ifndef NULL
19579 #define NULL ((void*)0)
19580 #endif
19581
19582 int main() {
19583
19584 #if DB_VERSION_MAJOR > 1
19585         {
19586                 char *version;
19587                 int major, minor, patch;
19588
19589                 version = db_version( &major, &minor, &patch );
19590
19591                 if( major != DB_VERSION_MAJOR ||
19592                         minor < DB_VERSION_MINOR )
19593                 {
19594                         printf("Berkeley DB version mismatch\n"
19595                                 "\texpected: %s\n\tgot: %s\n",
19596                                 DB_VERSION_STRING, version);
19597                         return 1;
19598                 }
19599         }
19600 #endif
19601
19602 #if DB_VERSION_MAJOR > 2
19603         db_env_create( NULL, 0 );
19604 #elif DB_VERSION_MAJOR > 1
19605         db_appexit( NULL );
19606 #else
19607         (void) dbopen( NULL, 0, 0, 0, NULL);
19608 #endif
19609
19610 ; return 0; }
19611 EOF
19612 if { (eval echo configure:19613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19613   rm -rf conftest*
19614   ol_cv_db_db_1=yes
19615 else
19616   echo "configure: failed program was:" >&5
19617   cat conftest.$ac_ext >&5
19618   rm -rf conftest*
19619   ol_cv_db_db_1=no
19620 fi
19621 rm -f conftest*
19622
19623         LIBS="$ol_LIBS"
19624
19625 fi
19626
19627 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19628
19629         if test $ol_cv_db_db_1 = yes ; then
19630                 ol_cv_lib_db=-ldb-1
19631         fi
19632 fi
19633
19634
19635         if test "$ol_cv_lib_db" != no ; then
19636                 ol_cv_berkeley_db=yes
19637                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19638 echo "configure:19639: checking for Berkeley DB thread support" >&5
19639 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19640   echo $ac_n "(cached) $ac_c" 1>&6
19641 else
19642   
19643         ol_LIBS="$LIBS"
19644         LIBS="$LTHREAD_LIBS $LIBS"
19645         if test $ol_cv_lib_db != yes ; then
19646                 LIBS="$ol_cv_lib_db $LIBS"
19647         fi
19648
19649         if test "$cross_compiling" = yes; then
19650   ol_cv_berkeley_db_thread=cross
19651 else
19652   cat > conftest.$ac_ext <<EOF
19653 #line 19654 "configure"
19654 #include "confdefs.h"
19655
19656 #ifdef HAVE_DB_185_H
19657         choke me;
19658 #else
19659 #include <db.h>
19660 #endif
19661 #ifndef NULL
19662 #define NULL ((void *)0)
19663 #endif
19664 main()
19665 {
19666         int rc;
19667         u_int32_t flags = DB_CREATE |
19668 #ifdef DB_PRIVATE
19669                 DB_PRIVATE |
19670 #endif
19671                 DB_THREAD;
19672
19673 #if DB_VERSION_MAJOR > 2
19674         DB_ENV *env = NULL;
19675
19676         rc = db_env_create( &env, 0 );
19677
19678         flags |= DB_INIT_MPOOL;
19679 #ifdef DB_MPOOL_PRIVATE
19680         flags |= DB_MPOOL_PRIVATE;
19681 #endif
19682
19683         if( rc ) {
19684                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19685                 return rc;
19686         }
19687
19688 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19689         rc = env->open( env, NULL, flags, 0 );
19690 #else
19691         rc = env->open( env, NULL, NULL, flags, 0 );
19692 #endif
19693
19694         if ( rc == 0 ) {
19695                 rc = env->close( env, 0 );
19696         }
19697
19698         if( rc ) {
19699                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19700                 return rc;
19701         }
19702
19703 #else
19704         DB_ENV env;
19705         memset( &env, '\0', sizeof(env) );
19706
19707         rc = db_appinit( NULL, NULL, &env, flags );
19708
19709         if( rc == 0 ) {
19710                 db_appexit( &env );
19711         }
19712
19713         unlink("__db_mpool.share");
19714         unlink("__db_lock.share");
19715 #endif
19716
19717         return rc;
19718 }
19719 EOF
19720 if { (eval echo configure:19721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19721 then
19722   ol_cv_berkeley_db_thread=yes
19723 else
19724   echo "configure: failed program was:" >&5
19725   cat conftest.$ac_ext >&5
19726   rm -fr conftest*
19727   ol_cv_berkeley_db_thread=no
19728 fi
19729 rm -fr conftest*
19730 fi
19731
19732
19733         LIBS="$ol_LIBS"
19734
19735 fi
19736
19737 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19738
19739         if test $ol_cv_berkeley_db_thread != no ; then
19740                 cat >> confdefs.h <<\EOF
19741 #define HAVE_BERKELEY_DB_THREAD 1
19742 EOF
19743
19744         fi
19745
19746         fi
19747 fi
19748
19749         fi
19750
19751         if test $ol_cv_berkeley_db != no ; then
19752                 cat >> confdefs.h <<\EOF
19753 #define HAVE_BERKELEY_DB 1
19754 EOF
19755
19756
19757                 ol_link_ldbm=berkeley
19758                 ol_with_ldbm_api=berkeley
19759
19760                 if test $ol_with_ldbm_type = hash ; then
19761                         cat >> confdefs.h <<\EOF
19762 #define LDBM_USE_DBHASH 1
19763 EOF
19764
19765                 else
19766                         cat >> confdefs.h <<\EOF
19767 #define LDBM_USE_DBBTREE 1
19768 EOF
19769
19770                 fi
19771
19772                                                 if test $ol_cv_lib_db != yes ; then
19773                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19774                 fi
19775         fi
19776 fi
19777
19778 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19779         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19780 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19781         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19782 echo "configure:19783: checking Berkeley DB version for BDB backend" >&5
19783 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19784   echo $ac_n "(cached) $ac_c" 1>&6
19785 else
19786   
19787         cat > conftest.$ac_ext <<EOF
19788 #line 19789 "configure"
19789 #include "confdefs.h"
19790
19791 #include <db.h>
19792
19793  /* this check could be improved */
19794 #ifndef DB_VERSION_MAJOR
19795 #       define DB_VERSION_MAJOR 1
19796 #endif
19797 #ifndef DB_VERSION_MINOR
19798 #       define DB_VERSION_MINOR 0
19799 #endif
19800
19801 /* require 4.2 or later */
19802 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19803         __db_version_compat
19804 #endif
19805         
19806 EOF
19807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19808   egrep "__db_version_compat" >/dev/null 2>&1; then
19809   rm -rf conftest*
19810   ol_cv_bdb_compat=yes
19811 else
19812   rm -rf conftest*
19813   ol_cv_bdb_compat=no
19814 fi
19815 rm -f conftest*
19816
19817 fi
19818
19819 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19820
19821
19822         if test $ol_cv_bdb_compat = yes ; then
19823                 ol_enable_bdb=yes
19824         elif test $ol_enable_bdb = yes ; then
19825                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19826         else
19827                 ol_enable_bdb=no
19828         fi
19829 fi
19830 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19831         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19832 fi
19833
19834 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19835         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19836         ol_with_ldbm_api=none
19837 fi
19838
19839 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19840         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19841 echo "configure:19842: checking for MDBM library" >&5
19842 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19843   echo $ac_n "(cached) $ac_c" 1>&6
19844 else
19845         ol_LIBS="$LIBS"
19846         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19847 echo "configure:19848: checking for mdbm_set_chain" >&5
19848 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19849   echo $ac_n "(cached) $ac_c" 1>&6
19850 else
19851   cat > conftest.$ac_ext <<EOF
19852 #line 19853 "configure"
19853 #include "confdefs.h"
19854 /* System header to define __stub macros and hopefully few prototypes,
19855     which can conflict with char mdbm_set_chain(); below.  */
19856 #include <assert.h>
19857 /* Override any gcc2 internal prototype to avoid an error.  */
19858 /* We use char because int might match the return type of a gcc2
19859     builtin and then its argument prototype would still apply.  */
19860 char mdbm_set_chain();
19861 char (*f)();
19862
19863 int main() {
19864
19865 /* The GNU C library defines this for functions which it implements
19866     to always fail with ENOSYS.  Some functions are actually named
19867     something starting with __ and the normal name is an alias.  */
19868 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19869 choke me
19870 #else
19871 f = mdbm_set_chain;
19872 #endif
19873
19874 ; return 0; }
19875 EOF
19876 if { (eval echo configure:19877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19877   rm -rf conftest*
19878   eval "ac_cv_func_mdbm_set_chain=yes"
19879 else
19880   echo "configure: failed program was:" >&5
19881   cat conftest.$ac_ext >&5
19882   rm -rf conftest*
19883   eval "ac_cv_func_mdbm_set_chain=no"
19884 fi
19885 rm -f conftest*
19886 fi
19887
19888 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19889   echo "$ac_t""yes" 1>&6
19890   ol_cv_lib_mdbm=yes
19891 else
19892   echo "$ac_t""no" 1>&6
19893
19894                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19895 echo "configure:19896: checking for mdbm_set_chain in -lmdbm" >&5
19896 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19897 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19898   echo $ac_n "(cached) $ac_c" 1>&6
19899 else
19900   ac_save_LIBS="$LIBS"
19901 LIBS="-lmdbm  $LIBS"
19902 cat > conftest.$ac_ext <<EOF
19903 #line 19904 "configure"
19904 #include "confdefs.h"
19905 /* Override any gcc2 internal prototype to avoid an error.  */
19906 /* We use char because int might match the return type of a gcc2
19907     builtin and then its argument prototype would still apply.  */
19908 char mdbm_set_chain();
19909
19910 int main() {
19911 mdbm_set_chain()
19912 ; return 0; }
19913 EOF
19914 if { (eval echo configure:19915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19915   rm -rf conftest*
19916   eval "ac_cv_lib_$ac_lib_var=yes"
19917 else
19918   echo "configure: failed program was:" >&5
19919   cat conftest.$ac_ext >&5
19920   rm -rf conftest*
19921   eval "ac_cv_lib_$ac_lib_var=no"
19922 fi
19923 rm -f conftest*
19924 LIBS="$ac_save_LIBS"
19925
19926 fi
19927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19928   echo "$ac_t""yes" 1>&6
19929   ol_cv_lib_mdbm=-lmdbm
19930 else
19931   echo "$ac_t""no" 1>&6
19932 ol_cv_lib_mdbm=no
19933 fi
19934
19935         
19936 fi
19937
19938         LIBS="$ol_LIBS"
19939
19940 fi
19941
19942 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19943
19944
19945  for ac_hdr in mdbm.h
19946 do
19947 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19948 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19949 echo "configure:19950: checking for $ac_hdr" >&5
19950 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19951   echo $ac_n "(cached) $ac_c" 1>&6
19952 else
19953   cat > conftest.$ac_ext <<EOF
19954 #line 19955 "configure"
19955 #include "confdefs.h"
19956 #include <$ac_hdr>
19957 EOF
19958 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19959 { (eval echo configure:19960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19960 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19961 if test -z "$ac_err"; then
19962   rm -rf conftest*
19963   eval "ac_cv_header_$ac_safe=yes"
19964 else
19965   echo "$ac_err" >&5
19966   echo "configure: failed program was:" >&5
19967   cat conftest.$ac_ext >&5
19968   rm -rf conftest*
19969   eval "ac_cv_header_$ac_safe=no"
19970 fi
19971 rm -f conftest*
19972 fi
19973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19974   echo "$ac_t""yes" 1>&6
19975     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19976   cat >> confdefs.h <<EOF
19977 #define $ac_tr_hdr 1
19978 EOF
19979  
19980 else
19981   echo "$ac_t""no" 1>&6
19982 fi
19983 done
19984
19985  echo $ac_n "checking for db""... $ac_c" 1>&6
19986 echo "configure:19987: checking for db" >&5
19987 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19988   echo $ac_n "(cached) $ac_c" 1>&6
19989 else
19990   
19991         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19992                 ol_cv_mdbm=no
19993         else
19994                 ol_cv_mdbm=yes
19995         fi
19996
19997 fi
19998
19999 echo "$ac_t""$ol_cv_mdbm" 1>&6
20000  if test $ol_cv_mdbm = yes ; then
20001         cat >> confdefs.h <<\EOF
20002 #define HAVE_MDBM 1
20003 EOF
20004
20005  fi
20006
20007
20008         if test $ol_cv_mdbm = yes ; then
20009                 ol_link_ldbm=mdbm
20010                 ol_with_ldbm_api=mdbm
20011                 if test $ol_cv_lib_mdbm != yes ; then
20012                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20013                 fi
20014         fi
20015 fi
20016
20017 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20018         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20019 echo "configure:20020: checking for GDBM library" >&5
20020 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20021   echo $ac_n "(cached) $ac_c" 1>&6
20022 else
20023         ol_LIBS="$LIBS"
20024         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20025 echo "configure:20026: checking for gdbm_open" >&5
20026 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20027   echo $ac_n "(cached) $ac_c" 1>&6
20028 else
20029   cat > conftest.$ac_ext <<EOF
20030 #line 20031 "configure"
20031 #include "confdefs.h"
20032 /* System header to define __stub macros and hopefully few prototypes,
20033     which can conflict with char gdbm_open(); below.  */
20034 #include <assert.h>
20035 /* Override any gcc2 internal prototype to avoid an error.  */
20036 /* We use char because int might match the return type of a gcc2
20037     builtin and then its argument prototype would still apply.  */
20038 char gdbm_open();
20039 char (*f)();
20040
20041 int main() {
20042
20043 /* The GNU C library defines this for functions which it implements
20044     to always fail with ENOSYS.  Some functions are actually named
20045     something starting with __ and the normal name is an alias.  */
20046 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20047 choke me
20048 #else
20049 f = gdbm_open;
20050 #endif
20051
20052 ; return 0; }
20053 EOF
20054 if { (eval echo configure:20055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20055   rm -rf conftest*
20056   eval "ac_cv_func_gdbm_open=yes"
20057 else
20058   echo "configure: failed program was:" >&5
20059   cat conftest.$ac_ext >&5
20060   rm -rf conftest*
20061   eval "ac_cv_func_gdbm_open=no"
20062 fi
20063 rm -f conftest*
20064 fi
20065
20066 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20067   echo "$ac_t""yes" 1>&6
20068   ol_cv_lib_gdbm=yes
20069 else
20070   echo "$ac_t""no" 1>&6
20071
20072                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20073 echo "configure:20074: checking for gdbm_open in -lgdbm" >&5
20074 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20076   echo $ac_n "(cached) $ac_c" 1>&6
20077 else
20078   ac_save_LIBS="$LIBS"
20079 LIBS="-lgdbm  $LIBS"
20080 cat > conftest.$ac_ext <<EOF
20081 #line 20082 "configure"
20082 #include "confdefs.h"
20083 /* Override any gcc2 internal prototype to avoid an error.  */
20084 /* We use char because int might match the return type of a gcc2
20085     builtin and then its argument prototype would still apply.  */
20086 char gdbm_open();
20087
20088 int main() {
20089 gdbm_open()
20090 ; return 0; }
20091 EOF
20092 if { (eval echo configure:20093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20093   rm -rf conftest*
20094   eval "ac_cv_lib_$ac_lib_var=yes"
20095 else
20096   echo "configure: failed program was:" >&5
20097   cat conftest.$ac_ext >&5
20098   rm -rf conftest*
20099   eval "ac_cv_lib_$ac_lib_var=no"
20100 fi
20101 rm -f conftest*
20102 LIBS="$ac_save_LIBS"
20103
20104 fi
20105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20106   echo "$ac_t""yes" 1>&6
20107   ol_cv_lib_gdbm=-lgdbm
20108 else
20109   echo "$ac_t""no" 1>&6
20110 ol_cv_lib_gdbm=no
20111 fi
20112
20113         
20114 fi
20115
20116         LIBS="$ol_LIBS"
20117
20118 fi
20119
20120 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20121
20122
20123  for ac_hdr in gdbm.h
20124 do
20125 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20126 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20127 echo "configure:20128: checking for $ac_hdr" >&5
20128 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20129   echo $ac_n "(cached) $ac_c" 1>&6
20130 else
20131   cat > conftest.$ac_ext <<EOF
20132 #line 20133 "configure"
20133 #include "confdefs.h"
20134 #include <$ac_hdr>
20135 EOF
20136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20137 { (eval echo configure:20138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20139 if test -z "$ac_err"; then
20140   rm -rf conftest*
20141   eval "ac_cv_header_$ac_safe=yes"
20142 else
20143   echo "$ac_err" >&5
20144   echo "configure: failed program was:" >&5
20145   cat conftest.$ac_ext >&5
20146   rm -rf conftest*
20147   eval "ac_cv_header_$ac_safe=no"
20148 fi
20149 rm -f conftest*
20150 fi
20151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20152   echo "$ac_t""yes" 1>&6
20153     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20154   cat >> confdefs.h <<EOF
20155 #define $ac_tr_hdr 1
20156 EOF
20157  
20158 else
20159   echo "$ac_t""no" 1>&6
20160 fi
20161 done
20162
20163  echo $ac_n "checking for db""... $ac_c" 1>&6
20164 echo "configure:20165: checking for db" >&5
20165 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20166   echo $ac_n "(cached) $ac_c" 1>&6
20167 else
20168   
20169         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20170                 ol_cv_gdbm=no
20171         else
20172                 ol_cv_gdbm=yes
20173         fi
20174
20175 fi
20176
20177 echo "$ac_t""$ol_cv_gdbm" 1>&6
20178  if test $ol_cv_gdbm = yes ; then
20179         cat >> confdefs.h <<\EOF
20180 #define HAVE_GDBM 1
20181 EOF
20182
20183  fi
20184
20185
20186         if test $ol_cv_gdbm = yes ; then
20187                 ol_link_ldbm=gdbm
20188                 ol_with_ldbm_api=gdbm
20189
20190                 if test $ol_cv_lib_gdbm != yes ; then
20191                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20192                 fi
20193         fi
20194 fi
20195
20196 if test $ol_with_ldbm_api = ndbm ; then
20197         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20198 echo "configure:20199: checking for NDBM library" >&5
20199 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20200   echo $ac_n "(cached) $ac_c" 1>&6
20201 else
20202         ol_LIBS="$LIBS"
20203         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20204 echo "configure:20205: checking for dbm_open" >&5
20205 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20206   echo $ac_n "(cached) $ac_c" 1>&6
20207 else
20208   cat > conftest.$ac_ext <<EOF
20209 #line 20210 "configure"
20210 #include "confdefs.h"
20211 /* System header to define __stub macros and hopefully few prototypes,
20212     which can conflict with char dbm_open(); below.  */
20213 #include <assert.h>
20214 /* Override any gcc2 internal prototype to avoid an error.  */
20215 /* We use char because int might match the return type of a gcc2
20216     builtin and then its argument prototype would still apply.  */
20217 char dbm_open();
20218 char (*f)();
20219
20220 int main() {
20221
20222 /* The GNU C library defines this for functions which it implements
20223     to always fail with ENOSYS.  Some functions are actually named
20224     something starting with __ and the normal name is an alias.  */
20225 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20226 choke me
20227 #else
20228 f = dbm_open;
20229 #endif
20230
20231 ; return 0; }
20232 EOF
20233 if { (eval echo configure:20234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20234   rm -rf conftest*
20235   eval "ac_cv_func_dbm_open=yes"
20236 else
20237   echo "configure: failed program was:" >&5
20238   cat conftest.$ac_ext >&5
20239   rm -rf conftest*
20240   eval "ac_cv_func_dbm_open=no"
20241 fi
20242 rm -f conftest*
20243 fi
20244
20245 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20246   echo "$ac_t""yes" 1>&6
20247   ol_cv_lib_ndbm=yes
20248 else
20249   echo "$ac_t""no" 1>&6
20250
20251                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20252 echo "configure:20253: checking for dbm_open in -lndbm" >&5
20253 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20254 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20255   echo $ac_n "(cached) $ac_c" 1>&6
20256 else
20257   ac_save_LIBS="$LIBS"
20258 LIBS="-lndbm  $LIBS"
20259 cat > conftest.$ac_ext <<EOF
20260 #line 20261 "configure"
20261 #include "confdefs.h"
20262 /* Override any gcc2 internal prototype to avoid an error.  */
20263 /* We use char because int might match the return type of a gcc2
20264     builtin and then its argument prototype would still apply.  */
20265 char dbm_open();
20266
20267 int main() {
20268 dbm_open()
20269 ; return 0; }
20270 EOF
20271 if { (eval echo configure:20272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20272   rm -rf conftest*
20273   eval "ac_cv_lib_$ac_lib_var=yes"
20274 else
20275   echo "configure: failed program was:" >&5
20276   cat conftest.$ac_ext >&5
20277   rm -rf conftest*
20278   eval "ac_cv_lib_$ac_lib_var=no"
20279 fi
20280 rm -f conftest*
20281 LIBS="$ac_save_LIBS"
20282
20283 fi
20284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20285   echo "$ac_t""yes" 1>&6
20286   ol_cv_lib_ndbm=-lndbm
20287 else
20288   echo "$ac_t""no" 1>&6
20289
20290                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20291 echo "configure:20292: checking for dbm_open in -ldbm" >&5
20292 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20293 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20294   echo $ac_n "(cached) $ac_c" 1>&6
20295 else
20296   ac_save_LIBS="$LIBS"
20297 LIBS="-ldbm  $LIBS"
20298 cat > conftest.$ac_ext <<EOF
20299 #line 20300 "configure"
20300 #include "confdefs.h"
20301 /* Override any gcc2 internal prototype to avoid an error.  */
20302 /* We use char because int might match the return type of a gcc2
20303     builtin and then its argument prototype would still apply.  */
20304 char dbm_open();
20305
20306 int main() {
20307 dbm_open()
20308 ; return 0; }
20309 EOF
20310 if { (eval echo configure:20311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20311   rm -rf conftest*
20312   eval "ac_cv_lib_$ac_lib_var=yes"
20313 else
20314   echo "configure: failed program was:" >&5
20315   cat conftest.$ac_ext >&5
20316   rm -rf conftest*
20317   eval "ac_cv_lib_$ac_lib_var=no"
20318 fi
20319 rm -f conftest*
20320 LIBS="$ac_save_LIBS"
20321
20322 fi
20323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20324   echo "$ac_t""yes" 1>&6
20325   ol_cv_lib_ndbm=-ldbm
20326 else
20327   echo "$ac_t""no" 1>&6
20328 ol_cv_lib_ndbm=no
20329 fi
20330                 
20331 fi
20332
20333         
20334 fi
20335
20336         LIBS="$ol_LIBS"
20337
20338 fi
20339
20340 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20341
20342
20343  for ac_hdr in ndbm.h
20344 do
20345 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20346 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20347 echo "configure:20348: checking for $ac_hdr" >&5
20348 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20349   echo $ac_n "(cached) $ac_c" 1>&6
20350 else
20351   cat > conftest.$ac_ext <<EOF
20352 #line 20353 "configure"
20353 #include "confdefs.h"
20354 #include <$ac_hdr>
20355 EOF
20356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20357 { (eval echo configure:20358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20359 if test -z "$ac_err"; then
20360   rm -rf conftest*
20361   eval "ac_cv_header_$ac_safe=yes"
20362 else
20363   echo "$ac_err" >&5
20364   echo "configure: failed program was:" >&5
20365   cat conftest.$ac_ext >&5
20366   rm -rf conftest*
20367   eval "ac_cv_header_$ac_safe=no"
20368 fi
20369 rm -f conftest*
20370 fi
20371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20372   echo "$ac_t""yes" 1>&6
20373     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20374   cat >> confdefs.h <<EOF
20375 #define $ac_tr_hdr 1
20376 EOF
20377  
20378 else
20379   echo "$ac_t""no" 1>&6
20380 fi
20381 done
20382
20383  echo $ac_n "checking for db""... $ac_c" 1>&6
20384 echo "configure:20385: checking for db" >&5
20385 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20386   echo $ac_n "(cached) $ac_c" 1>&6
20387 else
20388   
20389         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20390                 ol_cv_ndbm=no
20391         else
20392                 ol_cv_ndbm=yes
20393         fi
20394
20395 fi
20396
20397 echo "$ac_t""$ol_cv_ndbm" 1>&6
20398  if test $ol_cv_ndbm = yes ; then
20399         cat >> confdefs.h <<\EOF
20400 #define HAVE_NDBM 1
20401 EOF
20402
20403  fi
20404
20405
20406         if test $ol_cv_ndbm = yes ; then
20407                 ol_link_ldbm=ndbm
20408                 ol_with_ldbm_api=ndbm
20409
20410                 if test $ol_cv_lib_ndbm != yes ; then
20411                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20412                 fi
20413         fi
20414 fi
20415
20416 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20417         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20418         if test $ol_enable_ldbm = yes ; then
20419                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20420         fi
20421
20422         echo "configure: warning: disabling LDBM" 1>&2
20423         ol_enable_ldbm=no
20424 fi
20425
20426
20427 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20428         BUILD_LIBS_DYNAMIC=shared
20429         cat >> confdefs.h <<\EOF
20430 #define LDAP_LIBS_DYNAMIC 1
20431 EOF
20432
20433         LTSTATIC=""
20434 else
20435         BUILD_LIBS_DYNAMIC=static
20436         LTSTATIC="-static"
20437 fi
20438
20439 if test $ol_enable_wrappers != no ; then
20440         for ac_hdr in tcpd.h
20441 do
20442 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20443 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20444 echo "configure:20445: checking for $ac_hdr" >&5
20445 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20446   echo $ac_n "(cached) $ac_c" 1>&6
20447 else
20448   cat > conftest.$ac_ext <<EOF
20449 #line 20450 "configure"
20450 #include "confdefs.h"
20451 #include <$ac_hdr>
20452 EOF
20453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20454 { (eval echo configure:20455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20456 if test -z "$ac_err"; then
20457   rm -rf conftest*
20458   eval "ac_cv_header_$ac_safe=yes"
20459 else
20460   echo "$ac_err" >&5
20461   echo "configure: failed program was:" >&5
20462   cat conftest.$ac_ext >&5
20463   rm -rf conftest*
20464   eval "ac_cv_header_$ac_safe=no"
20465 fi
20466 rm -f conftest*
20467 fi
20468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20469   echo "$ac_t""yes" 1>&6
20470     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20471   cat >> confdefs.h <<EOF
20472 #define $ac_tr_hdr 1
20473 EOF
20474  
20475                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20476 echo "configure:20477: checking for TCP wrappers library" >&5
20477                 save_LIBS="$LIBS"
20478                 LIBS="$LIBS -lwrap"
20479                 cat > conftest.$ac_ext <<EOF
20480 #line 20481 "configure"
20481 #include "confdefs.h"
20482
20483 #include <tcpd.h>
20484 int allow_severity = 0;
20485 int deny_severity  = 0;
20486
20487 struct request_info *req;
20488                 
20489 int main() {
20490
20491 hosts_access(req)
20492                 
20493 ; return 0; }
20494 EOF
20495 if { (eval echo configure:20496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20496   rm -rf conftest*
20497   echo "$ac_t""-lwrap" 1>&6
20498                 have_wrappers=yes
20499                 LIBS="$save_LIBS"
20500 else
20501   echo "configure: failed program was:" >&5
20502   cat conftest.$ac_ext >&5
20503   rm -rf conftest*
20504   
20505                                 LIBS="$LIBS -lnsl"
20506                 cat > conftest.$ac_ext <<EOF
20507 #line 20508 "configure"
20508 #include "confdefs.h"
20509
20510 #include <tcpd.h>
20511 int allow_severity = 0;
20512 int deny_severity  = 0;
20513
20514 struct request_info *req;
20515                 
20516 int main() {
20517
20518 hosts_access(req)
20519                 
20520 ; return 0; }
20521 EOF
20522 if { (eval echo configure:20523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20523   rm -rf conftest*
20524   echo "$ac_t""-lwrap -lnsl" 1>&6
20525                 have_wrappers=yes
20526                 LIBS="$save_LIBS -lnsl"
20527 else
20528   echo "configure: failed program was:" >&5
20529   cat conftest.$ac_ext >&5
20530   rm -rf conftest*
20531   
20532                 echo "$ac_t""no" 1>&6
20533                 have_wrappers=no
20534                 LIBS=$save_LIBS
20535 fi
20536 rm -f conftest*
20537 fi
20538 rm -f conftest*
20539 else
20540   echo "$ac_t""no" 1>&6
20541 have_wrappers=no
20542 fi
20543 done
20544
20545
20546         if test $have_wrappers = yes ; then
20547                 cat >> confdefs.h <<\EOF
20548 #define HAVE_TCPD 1
20549 EOF
20550
20551                 WRAP_LIBS="-lwrap"
20552         elif test $ol_enable_wrappers = yes ; then
20553                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20554         else
20555                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20556                 WRAP_LIBS=""
20557         fi
20558 fi
20559
20560 if test $ol_enable_syslog != no ; then
20561         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20562 echo "configure:20563: checking for openlog" >&5
20563 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20564   echo $ac_n "(cached) $ac_c" 1>&6
20565 else
20566   cat > conftest.$ac_ext <<EOF
20567 #line 20568 "configure"
20568 #include "confdefs.h"
20569 /* System header to define __stub macros and hopefully few prototypes,
20570     which can conflict with char openlog(); below.  */
20571 #include <assert.h>
20572 /* Override any gcc2 internal prototype to avoid an error.  */
20573 /* We use char because int might match the return type of a gcc2
20574     builtin and then its argument prototype would still apply.  */
20575 char openlog();
20576 char (*f)();
20577
20578 int main() {
20579
20580 /* The GNU C library defines this for functions which it implements
20581     to always fail with ENOSYS.  Some functions are actually named
20582     something starting with __ and the normal name is an alias.  */
20583 #if defined (__stub_openlog) || defined (__stub___openlog)
20584 choke me
20585 #else
20586 f = openlog;
20587 #endif
20588
20589 ; return 0; }
20590 EOF
20591 if { (eval echo configure:20592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20592   rm -rf conftest*
20593   eval "ac_cv_func_openlog=yes"
20594 else
20595   echo "configure: failed program was:" >&5
20596   cat conftest.$ac_ext >&5
20597   rm -rf conftest*
20598   eval "ac_cv_func_openlog=no"
20599 fi
20600 rm -f conftest*
20601 fi
20602
20603 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20604   echo "$ac_t""yes" 1>&6
20605   :
20606 else
20607   echo "$ac_t""no" 1>&6
20608 fi
20609
20610         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20611                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20612         fi
20613         ol_enable_syslog=$ac_cv_func_openlog
20614 fi
20615
20616
20617 ol_link_sql=no
20618 if test $ol_enable_sql != no ; then
20619         for ac_hdr in sql.h sqlext.h
20620 do
20621 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20622 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20623 echo "configure:20624: checking for $ac_hdr" >&5
20624 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20625   echo $ac_n "(cached) $ac_c" 1>&6
20626 else
20627   cat > conftest.$ac_ext <<EOF
20628 #line 20629 "configure"
20629 #include "confdefs.h"
20630 #include <$ac_hdr>
20631 EOF
20632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20633 { (eval echo configure:20634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20635 if test -z "$ac_err"; then
20636   rm -rf conftest*
20637   eval "ac_cv_header_$ac_safe=yes"
20638 else
20639   echo "$ac_err" >&5
20640   echo "configure: failed program was:" >&5
20641   cat conftest.$ac_ext >&5
20642   rm -rf conftest*
20643   eval "ac_cv_header_$ac_safe=no"
20644 fi
20645 rm -f conftest*
20646 fi
20647 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20648   echo "$ac_t""yes" 1>&6
20649     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20650   cat >> confdefs.h <<EOF
20651 #define $ac_tr_hdr 1
20652 EOF
20653  
20654 else
20655   echo "$ac_t""no" 1>&6
20656 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20657         
20658 fi
20659 done
20660
20661
20662         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20663 echo "configure:20664: checking for SQLDriverConnect in -liodbc" >&5
20664 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20665 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20666   echo $ac_n "(cached) $ac_c" 1>&6
20667 else
20668   ac_save_LIBS="$LIBS"
20669 LIBS="-liodbc  $LIBS"
20670 cat > conftest.$ac_ext <<EOF
20671 #line 20672 "configure"
20672 #include "confdefs.h"
20673 /* Override any gcc2 internal prototype to avoid an error.  */
20674 /* We use char because int might match the return type of a gcc2
20675     builtin and then its argument prototype would still apply.  */
20676 char SQLDriverConnect();
20677
20678 int main() {
20679 SQLDriverConnect()
20680 ; return 0; }
20681 EOF
20682 if { (eval echo configure:20683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20683   rm -rf conftest*
20684   eval "ac_cv_lib_$ac_lib_var=yes"
20685 else
20686   echo "configure: failed program was:" >&5
20687   cat conftest.$ac_ext >&5
20688   rm -rf conftest*
20689   eval "ac_cv_lib_$ac_lib_var=no"
20690 fi
20691 rm -f conftest*
20692 LIBS="$ac_save_LIBS"
20693
20694 fi
20695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20696   echo "$ac_t""yes" 1>&6
20697   have_iodbc=yes
20698 else
20699   echo "$ac_t""no" 1>&6
20700 have_iodbc=no
20701 fi
20702
20703         if test $have_iodbc = yes ; then
20704                 ol_link_sql="-liodbc"
20705         else
20706                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20707 echo "configure:20708: checking for SQLDriverConnect in -lodbc" >&5
20708 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20709 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20710   echo $ac_n "(cached) $ac_c" 1>&6
20711 else
20712   ac_save_LIBS="$LIBS"
20713 LIBS="-lodbc  $LIBS"
20714 cat > conftest.$ac_ext <<EOF
20715 #line 20716 "configure"
20716 #include "confdefs.h"
20717 /* Override any gcc2 internal prototype to avoid an error.  */
20718 /* We use char because int might match the return type of a gcc2
20719     builtin and then its argument prototype would still apply.  */
20720 char SQLDriverConnect();
20721
20722 int main() {
20723 SQLDriverConnect()
20724 ; return 0; }
20725 EOF
20726 if { (eval echo configure:20727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20727   rm -rf conftest*
20728   eval "ac_cv_lib_$ac_lib_var=yes"
20729 else
20730   echo "configure: failed program was:" >&5
20731   cat conftest.$ac_ext >&5
20732   rm -rf conftest*
20733   eval "ac_cv_lib_$ac_lib_var=no"
20734 fi
20735 rm -f conftest*
20736 LIBS="$ac_save_LIBS"
20737
20738 fi
20739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20740   echo "$ac_t""yes" 1>&6
20741   have_odbc=yes
20742 else
20743   echo "$ac_t""no" 1>&6
20744 have_odbc=no
20745 fi
20746
20747                 if test $have_odbc = yes ; then
20748                         ol_link_sql="-lodbc"
20749                 fi
20750         fi
20751
20752         if test $ol_link_sql != no ; then
20753                 SLAPD_SQL_LIBS="$ol_link_sql"
20754
20755         elif test $ol_enable_sql != auto ; then
20756                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20757         fi
20758 fi
20759
20760 ol_link_sasl=no
20761 ol_link_spasswd=no
20762 if test $ol_with_cyrus_sasl != no ; then
20763         for ac_hdr in sasl/sasl.h sasl.h
20764 do
20765 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20766 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20767 echo "configure:20768: checking for $ac_hdr" >&5
20768 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20769   echo $ac_n "(cached) $ac_c" 1>&6
20770 else
20771   cat > conftest.$ac_ext <<EOF
20772 #line 20773 "configure"
20773 #include "confdefs.h"
20774 #include <$ac_hdr>
20775 EOF
20776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20777 { (eval echo configure:20778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20778 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20779 if test -z "$ac_err"; then
20780   rm -rf conftest*
20781   eval "ac_cv_header_$ac_safe=yes"
20782 else
20783   echo "$ac_err" >&5
20784   echo "configure: failed program was:" >&5
20785   cat conftest.$ac_ext >&5
20786   rm -rf conftest*
20787   eval "ac_cv_header_$ac_safe=no"
20788 fi
20789 rm -f conftest*
20790 fi
20791 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20792   echo "$ac_t""yes" 1>&6
20793     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20794   cat >> confdefs.h <<EOF
20795 #define $ac_tr_hdr 1
20796 EOF
20797  
20798 else
20799   echo "$ac_t""no" 1>&6
20800 fi
20801 done
20802
20803
20804         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20805                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20806 echo "configure:20807: checking for sasl_client_init in -lsasl2" >&5
20807 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20808 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20809   echo $ac_n "(cached) $ac_c" 1>&6
20810 else
20811   ac_save_LIBS="$LIBS"
20812 LIBS="-lsasl2  $LIBS"
20813 cat > conftest.$ac_ext <<EOF
20814 #line 20815 "configure"
20815 #include "confdefs.h"
20816 /* Override any gcc2 internal prototype to avoid an error.  */
20817 /* We use char because int might match the return type of a gcc2
20818     builtin and then its argument prototype would still apply.  */
20819 char sasl_client_init();
20820
20821 int main() {
20822 sasl_client_init()
20823 ; return 0; }
20824 EOF
20825 if { (eval echo configure:20826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20826   rm -rf conftest*
20827   eval "ac_cv_lib_$ac_lib_var=yes"
20828 else
20829   echo "configure: failed program was:" >&5
20830   cat conftest.$ac_ext >&5
20831   rm -rf conftest*
20832   eval "ac_cv_lib_$ac_lib_var=no"
20833 fi
20834 rm -f conftest*
20835 LIBS="$ac_save_LIBS"
20836
20837 fi
20838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20839   echo "$ac_t""yes" 1>&6
20840   ol_link_sasl="-lsasl2"
20841 else
20842   echo "$ac_t""no" 1>&6
20843 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20844 echo "configure:20845: checking for sasl_client_init in -lsasl" >&5
20845 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20846 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20847   echo $ac_n "(cached) $ac_c" 1>&6
20848 else
20849   ac_save_LIBS="$LIBS"
20850 LIBS="-lsasl  $LIBS"
20851 cat > conftest.$ac_ext <<EOF
20852 #line 20853 "configure"
20853 #include "confdefs.h"
20854 /* Override any gcc2 internal prototype to avoid an error.  */
20855 /* We use char because int might match the return type of a gcc2
20856     builtin and then its argument prototype would still apply.  */
20857 char sasl_client_init();
20858
20859 int main() {
20860 sasl_client_init()
20861 ; return 0; }
20862 EOF
20863 if { (eval echo configure:20864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20864   rm -rf conftest*
20865   eval "ac_cv_lib_$ac_lib_var=yes"
20866 else
20867   echo "configure: failed program was:" >&5
20868   cat conftest.$ac_ext >&5
20869   rm -rf conftest*
20870   eval "ac_cv_lib_$ac_lib_var=no"
20871 fi
20872 rm -f conftest*
20873 LIBS="$ac_save_LIBS"
20874
20875 fi
20876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20877   echo "$ac_t""yes" 1>&6
20878   ol_link_sasl="-lsasl"
20879 else
20880   echo "$ac_t""no" 1>&6
20881 fi
20882
20883 fi
20884
20885         fi
20886
20887         if test $ol_link_sasl = no ; then
20888                 if test $ol_with_cyrus_sasl != auto ; then
20889                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20890                 else
20891                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20892                         echo "configure: warning: SASL authentication not supported!" 1>&2
20893                         if test $ol_link_tls = no ; then
20894                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20895                         fi
20896                 fi
20897         else
20898                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20899 echo "configure:20900: checking Cyrus SASL library version" >&5
20900 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20901   echo $ac_n "(cached) $ac_c" 1>&6
20902 else
20903   
20904         cat > conftest.$ac_ext <<EOF
20905 #line 20906 "configure"
20906 #include "confdefs.h"
20907
20908 #ifdef HAVE_SASL_SASL_H
20909 #include <sasl/sasl.h>
20910 #else
20911 #include <sasl.h>
20912 #endif
20913
20914 /* Require 2.1.15+ */
20915 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20916         char *__sasl_compat = "2.2+ or better okay (we guess)";
20917 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20918         && SASL_VERSION_STEP >=15
20919         char *__sasl_compat = "2.1.15+ or better okay";
20920 #endif
20921         
20922 EOF
20923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20924   egrep "__sasl_compat" >/dev/null 2>&1; then
20925   rm -rf conftest*
20926   ol_cv_sasl_compat=yes
20927 else
20928   rm -rf conftest*
20929   ol_cv_sasl_compat=no
20930 fi
20931 rm -f conftest*
20932
20933 fi
20934
20935 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20936
20937                 if test $ol_cv_sasl_compat = no ; then
20938                         ol_link_sasl=no
20939                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20940                 fi
20941
20942                 cat >> confdefs.h <<\EOF
20943 #define HAVE_CYRUS_SASL 1
20944 EOF
20945
20946                 SASL_LIBS="$ol_link_sasl"
20947                 if test $ol_enable_spasswd != no ; then
20948                         ol_link_spasswd=yes
20949                 fi
20950
20951                 ac_save_LIBS="$LIBS"
20952                 LIBS="$LIBS $ol_link_sasl"
20953                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20954 echo "configure:20955: checking for sasl_version" >&5
20955 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20956   echo $ac_n "(cached) $ac_c" 1>&6
20957 else
20958   cat > conftest.$ac_ext <<EOF
20959 #line 20960 "configure"
20960 #include "confdefs.h"
20961 /* System header to define __stub macros and hopefully few prototypes,
20962     which can conflict with char sasl_version(); below.  */
20963 #include <assert.h>
20964 /* Override any gcc2 internal prototype to avoid an error.  */
20965 /* We use char because int might match the return type of a gcc2
20966     builtin and then its argument prototype would still apply.  */
20967 char sasl_version();
20968 char (*f)();
20969
20970 int main() {
20971
20972 /* The GNU C library defines this for functions which it implements
20973     to always fail with ENOSYS.  Some functions are actually named
20974     something starting with __ and the normal name is an alias.  */
20975 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20976 choke me
20977 #else
20978 f = sasl_version;
20979 #endif
20980
20981 ; return 0; }
20982 EOF
20983 if { (eval echo configure:20984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20984   rm -rf conftest*
20985   eval "ac_cv_func_sasl_version=yes"
20986 else
20987   echo "configure: failed program was:" >&5
20988   cat conftest.$ac_ext >&5
20989   rm -rf conftest*
20990   eval "ac_cv_func_sasl_version=no"
20991 fi
20992 rm -f conftest*
20993 fi
20994
20995 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20996   echo "$ac_t""yes" 1>&6
20997   cat >> confdefs.h <<\EOF
20998 #define HAVE_SASL_VERSION 1
20999 EOF
21000
21001 else
21002   echo "$ac_t""no" 1>&6
21003 fi
21004
21005                 LIBS="$ac_save_LIBS"
21006         fi
21007
21008 else
21009         echo "configure: warning: SASL authentication not supported!" 1>&2
21010         if test $ol_link_tls = no ; then
21011                 echo "configure: warning: Strong authentication not supported!" 1>&2
21012         fi
21013 fi
21014
21015 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21016         dev=no
21017         if test -r /dev/urandom ; then
21018                 dev="/dev/urandom";
21019         elif test -r /idev/urandom ; then
21020                 dev="/idev/urandom";
21021         elif test -r /dev/srandom ; then
21022                 dev="/dev/srandom";
21023         elif test -r /dev/random ; then
21024                 dev="/dev/random";
21025         elif test -r /idev/random ; then
21026                 dev="/idev/random";
21027         fi
21028
21029         if test $dev != no ; then
21030                 cat >> confdefs.h <<EOF
21031 #define URANDOM_DEVICE "$dev"
21032 EOF
21033
21034         fi
21035 fi
21036
21037 ol_link_fetch=no
21038 if test $ol_with_fetch != no ; then
21039         ol_LIBS=$LIBS
21040 LIBS="-lfetch -lcom_err $LIBS"
21041 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21042 echo "configure:21043: checking fetch(3) library" >&5
21043 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21044   echo $ac_n "(cached) $ac_c" 1>&6
21045 else
21046   
21047         cat > conftest.$ac_ext <<EOF
21048 #line 21049 "configure"
21049 #include "confdefs.h"
21050
21051 #include <sys/param.h>
21052 #include <stdio.h>
21053 #include <fetch.h>
21054 int main() {
21055 struct url *u = fetchParseURL("file:///"); 
21056 ; return 0; }
21057 EOF
21058 if { (eval echo configure:21059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21059   rm -rf conftest*
21060   ol_cv_lib_fetch=yes
21061 else
21062   echo "configure: failed program was:" >&5
21063   cat conftest.$ac_ext >&5
21064   rm -rf conftest*
21065   ol_cv_lib_fetch=no
21066 fi
21067 rm -f conftest*
21068 fi
21069
21070 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21071 LIBS=$ol_LIBS
21072 if test $ol_cv_lib_fetch != no ; then
21073         ol_link_fetch="-lfetch -lcom_err"
21074         cat >> confdefs.h <<\EOF
21075 #define HAVE_FETCH 1
21076 EOF
21077
21078 fi
21079
21080
21081         if test $ol_cv_lib_fetch != no ; then
21082                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21083                 ol_link_fetch=freebsd
21084
21085         elif test $ol_with_fetch != auto ; then
21086                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21087         fi 
21088 fi
21089
21090 if test $ol_enable_crypt != no ; then
21091         save_LIBS="$LIBS"
21092         LIBS="$TLS_LIBS $LIBS"
21093
21094         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21095 echo "configure:21096: checking for crypt" >&5
21096 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21097   echo $ac_n "(cached) $ac_c" 1>&6
21098 else
21099   cat > conftest.$ac_ext <<EOF
21100 #line 21101 "configure"
21101 #include "confdefs.h"
21102 /* System header to define __stub macros and hopefully few prototypes,
21103     which can conflict with char crypt(); below.  */
21104 #include <assert.h>
21105 /* Override any gcc2 internal prototype to avoid an error.  */
21106 /* We use char because int might match the return type of a gcc2
21107     builtin and then its argument prototype would still apply.  */
21108 char crypt();
21109 char (*f)();
21110
21111 int main() {
21112
21113 /* The GNU C library defines this for functions which it implements
21114     to always fail with ENOSYS.  Some functions are actually named
21115     something starting with __ and the normal name is an alias.  */
21116 #if defined (__stub_crypt) || defined (__stub___crypt)
21117 choke me
21118 #else
21119 f = crypt;
21120 #endif
21121
21122 ; return 0; }
21123 EOF
21124 if { (eval echo configure:21125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21125   rm -rf conftest*
21126   eval "ac_cv_func_crypt=yes"
21127 else
21128   echo "configure: failed program was:" >&5
21129   cat conftest.$ac_ext >&5
21130   rm -rf conftest*
21131   eval "ac_cv_func_crypt=no"
21132 fi
21133 rm -f conftest*
21134 fi
21135
21136 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21137   echo "$ac_t""yes" 1>&6
21138   have_crypt=yes
21139 else
21140   echo "$ac_t""no" 1>&6
21141
21142                 LIBS="$save_LIBS"
21143                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21144 echo "configure:21145: checking for crypt in -lcrypt" >&5
21145 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21146 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21147   echo $ac_n "(cached) $ac_c" 1>&6
21148 else
21149   ac_save_LIBS="$LIBS"
21150 LIBS="-lcrypt  $LIBS"
21151 cat > conftest.$ac_ext <<EOF
21152 #line 21153 "configure"
21153 #include "confdefs.h"
21154 /* Override any gcc2 internal prototype to avoid an error.  */
21155 /* We use char because int might match the return type of a gcc2
21156     builtin and then its argument prototype would still apply.  */
21157 char crypt();
21158
21159 int main() {
21160 crypt()
21161 ; return 0; }
21162 EOF
21163 if { (eval echo configure:21164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21164   rm -rf conftest*
21165   eval "ac_cv_lib_$ac_lib_var=yes"
21166 else
21167   echo "configure: failed program was:" >&5
21168   cat conftest.$ac_ext >&5
21169   rm -rf conftest*
21170   eval "ac_cv_lib_$ac_lib_var=no"
21171 fi
21172 rm -f conftest*
21173 LIBS="$ac_save_LIBS"
21174
21175 fi
21176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21177   echo "$ac_t""yes" 1>&6
21178   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21179                         have_crypt=yes
21180 else
21181   echo "$ac_t""no" 1>&6
21182 have_crypt=no
21183 fi
21184
21185 fi
21186
21187
21188         LIBS="$save_LIBS"
21189
21190         if test $have_crypt = yes ; then
21191                 cat >> confdefs.h <<\EOF
21192 #define HAVE_CRYPT 1
21193 EOF
21194
21195         else
21196                 echo "configure: warning: could not find crypt" 1>&2
21197                 if test $ol_enable_crypt = yes ; then
21198                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21199                 fi
21200
21201                 echo "configure: warning: disabling crypt support" 1>&2
21202                 ol_enable_crypt=no
21203         fi
21204 fi
21205
21206 if test $ol_enable_proctitle != no ; then
21207         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21208 echo "configure:21209: checking for setproctitle" >&5
21209 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21210   echo $ac_n "(cached) $ac_c" 1>&6
21211 else
21212   cat > conftest.$ac_ext <<EOF
21213 #line 21214 "configure"
21214 #include "confdefs.h"
21215 /* System header to define __stub macros and hopefully few prototypes,
21216     which can conflict with char setproctitle(); below.  */
21217 #include <assert.h>
21218 /* Override any gcc2 internal prototype to avoid an error.  */
21219 /* We use char because int might match the return type of a gcc2
21220     builtin and then its argument prototype would still apply.  */
21221 char setproctitle();
21222 char (*f)();
21223
21224 int main() {
21225
21226 /* The GNU C library defines this for functions which it implements
21227     to always fail with ENOSYS.  Some functions are actually named
21228     something starting with __ and the normal name is an alias.  */
21229 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21230 choke me
21231 #else
21232 f = setproctitle;
21233 #endif
21234
21235 ; return 0; }
21236 EOF
21237 if { (eval echo configure:21238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21238   rm -rf conftest*
21239   eval "ac_cv_func_setproctitle=yes"
21240 else
21241   echo "configure: failed program was:" >&5
21242   cat conftest.$ac_ext >&5
21243   rm -rf conftest*
21244   eval "ac_cv_func_setproctitle=no"
21245 fi
21246 rm -f conftest*
21247 fi
21248
21249 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21250   echo "$ac_t""yes" 1>&6
21251   have_setproctitle=yes
21252 else
21253   echo "$ac_t""no" 1>&6
21254
21255                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21256 echo "configure:21257: checking for setproctitle in -lutil" >&5
21257 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21258 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21259   echo $ac_n "(cached) $ac_c" 1>&6
21260 else
21261   ac_save_LIBS="$LIBS"
21262 LIBS="-lutil  $LIBS"
21263 cat > conftest.$ac_ext <<EOF
21264 #line 21265 "configure"
21265 #include "confdefs.h"
21266 /* Override any gcc2 internal prototype to avoid an error.  */
21267 /* We use char because int might match the return type of a gcc2
21268     builtin and then its argument prototype would still apply.  */
21269 char setproctitle();
21270
21271 int main() {
21272 setproctitle()
21273 ; return 0; }
21274 EOF
21275 if { (eval echo configure:21276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21276   rm -rf conftest*
21277   eval "ac_cv_lib_$ac_lib_var=yes"
21278 else
21279   echo "configure: failed program was:" >&5
21280   cat conftest.$ac_ext >&5
21281   rm -rf conftest*
21282   eval "ac_cv_lib_$ac_lib_var=no"
21283 fi
21284 rm -f conftest*
21285 LIBS="$ac_save_LIBS"
21286
21287 fi
21288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21289   echo "$ac_t""yes" 1>&6
21290   have_setproctitle=yes
21291                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21292 else
21293   echo "$ac_t""no" 1>&6
21294 have_setproctitle=no
21295                         LIBOBJS="$LIBOBJS setproctitle.o"
21296                         LIBSRCS="$LIBSRCS setproctitle.c"
21297 fi
21298
21299 fi
21300
21301
21302         if test $have_setproctitle = yes ; then
21303                 cat >> confdefs.h <<\EOF
21304 #define HAVE_SETPROCTITLE 1
21305 EOF
21306
21307         fi
21308 fi
21309
21310 if test $ol_enable_slp != no ; then
21311         for ac_hdr in slp.h 
21312 do
21313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21315 echo "configure:21316: checking for $ac_hdr" >&5
21316 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21317   echo $ac_n "(cached) $ac_c" 1>&6
21318 else
21319   cat > conftest.$ac_ext <<EOF
21320 #line 21321 "configure"
21321 #include "confdefs.h"
21322 #include <$ac_hdr>
21323 EOF
21324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21325 { (eval echo configure:21326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21327 if test -z "$ac_err"; then
21328   rm -rf conftest*
21329   eval "ac_cv_header_$ac_safe=yes"
21330 else
21331   echo "$ac_err" >&5
21332   echo "configure: failed program was:" >&5
21333   cat conftest.$ac_ext >&5
21334   rm -rf conftest*
21335   eval "ac_cv_header_$ac_safe=no"
21336 fi
21337 rm -f conftest*
21338 fi
21339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21340   echo "$ac_t""yes" 1>&6
21341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21342   cat >> confdefs.h <<EOF
21343 #define $ac_tr_hdr 1
21344 EOF
21345  
21346 else
21347   echo "$ac_t""no" 1>&6
21348 fi
21349 done
21350
21351
21352         if test $ac_cv_header_slp_h = yes ; then
21353                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21354 echo "configure:21355: checking for SLPOpen in -lslp" >&5
21355 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21356 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21357   echo $ac_n "(cached) $ac_c" 1>&6
21358 else
21359   ac_save_LIBS="$LIBS"
21360 LIBS="-lslp  $LIBS"
21361 cat > conftest.$ac_ext <<EOF
21362 #line 21363 "configure"
21363 #include "confdefs.h"
21364 /* Override any gcc2 internal prototype to avoid an error.  */
21365 /* We use char because int might match the return type of a gcc2
21366     builtin and then its argument prototype would still apply.  */
21367 char SLPOpen();
21368
21369 int main() {
21370 SLPOpen()
21371 ; return 0; }
21372 EOF
21373 if { (eval echo configure:21374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21374   rm -rf conftest*
21375   eval "ac_cv_lib_$ac_lib_var=yes"
21376 else
21377   echo "configure: failed program was:" >&5
21378   cat conftest.$ac_ext >&5
21379   rm -rf conftest*
21380   eval "ac_cv_lib_$ac_lib_var=no"
21381 fi
21382 rm -f conftest*
21383 LIBS="$ac_save_LIBS"
21384
21385 fi
21386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21387   echo "$ac_t""yes" 1>&6
21388   have_slp=yes
21389 else
21390   echo "$ac_t""no" 1>&6
21391 have_slp=no
21392 fi
21393
21394                 if test $have_slp = yes ; then
21395                         cat >> confdefs.h <<\EOF
21396 #define HAVE_SLP 1
21397 EOF
21398
21399                         SLAPD_SLP_LIBS=-lslp
21400                 fi
21401
21402         elif test $ol_enable_slp = yes ; then
21403                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21404         fi
21405 fi
21406
21407
21408 echo $ac_n "checking long long""... $ac_c" 1>&6
21409 echo "configure:21410: checking long long" >&5
21410 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21411   echo $ac_n "(cached) $ac_c" 1>&6
21412 else
21413   
21414         cat > conftest.$ac_ext <<EOF
21415 #line 21416 "configure"
21416 #include "confdefs.h"
21417
21418 int main() {
21419 long long x;
21420 ; return 0; }
21421 EOF
21422 if { (eval echo configure:21423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21423   rm -rf conftest*
21424   ol_cv_type_long_long=yes
21425 else
21426   echo "configure: failed program was:" >&5
21427   cat conftest.$ac_ext >&5
21428   rm -rf conftest*
21429   ol_cv_type_long_long=no
21430 fi
21431 rm -f conftest*
21432 fi
21433
21434 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21435 if test $ol_cv_type_long_long = yes; then
21436         cat >> confdefs.h <<\EOF
21437 #define HAVE_LONG_LONG 1
21438 EOF
21439
21440 fi
21441
21442 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21443 echo "configure:21444: checking for ANSI C header files" >&5
21444 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21445   echo $ac_n "(cached) $ac_c" 1>&6
21446 else
21447   cat > conftest.$ac_ext <<EOF
21448 #line 21449 "configure"
21449 #include "confdefs.h"
21450 #include <stdlib.h>
21451 #include <stdarg.h>
21452 #include <string.h>
21453 #include <float.h>
21454 EOF
21455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21456 { (eval echo configure:21457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21458 if test -z "$ac_err"; then
21459   rm -rf conftest*
21460   ac_cv_header_stdc=yes
21461 else
21462   echo "$ac_err" >&5
21463   echo "configure: failed program was:" >&5
21464   cat conftest.$ac_ext >&5
21465   rm -rf conftest*
21466   ac_cv_header_stdc=no
21467 fi
21468 rm -f conftest*
21469
21470 if test $ac_cv_header_stdc = yes; then
21471   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21472 cat > conftest.$ac_ext <<EOF
21473 #line 21474 "configure"
21474 #include "confdefs.h"
21475 #include <string.h>
21476 EOF
21477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21478   egrep "memchr" >/dev/null 2>&1; then
21479   :
21480 else
21481   rm -rf conftest*
21482   ac_cv_header_stdc=no
21483 fi
21484 rm -f conftest*
21485
21486 fi
21487
21488 if test $ac_cv_header_stdc = yes; then
21489   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21490 cat > conftest.$ac_ext <<EOF
21491 #line 21492 "configure"
21492 #include "confdefs.h"
21493 #include <stdlib.h>
21494 EOF
21495 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21496   egrep "free" >/dev/null 2>&1; then
21497   :
21498 else
21499   rm -rf conftest*
21500   ac_cv_header_stdc=no
21501 fi
21502 rm -f conftest*
21503
21504 fi
21505
21506 if test $ac_cv_header_stdc = yes; then
21507   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21508 if test "$cross_compiling" = yes; then
21509   :
21510 else
21511   cat > conftest.$ac_ext <<EOF
21512 #line 21513 "configure"
21513 #include "confdefs.h"
21514 #include <ctype.h>
21515 #if ((' ' & 0x0FF) == 0x020)
21516 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21517 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21518 #else
21519 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21520  || ('j' <= (c) && (c) <= 'r') \
21521  || ('s' <= (c) && (c) <= 'z'))
21522 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21523 #endif
21524 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21525 int main () { int i; for (i = 0; i < 256; i++)
21526 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21527 exit (0); }
21528
21529 EOF
21530 if { (eval echo configure:21531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21531 then
21532   :
21533 else
21534   echo "configure: failed program was:" >&5
21535   cat conftest.$ac_ext >&5
21536   rm -fr conftest*
21537   ac_cv_header_stdc=no
21538 fi
21539 rm -fr conftest*
21540 fi
21541
21542 fi
21543 fi
21544
21545 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21546 if test $ac_cv_header_stdc = yes; then
21547   cat >> confdefs.h <<\EOF
21548 #define STDC_HEADERS 1
21549 EOF
21550
21551 fi
21552
21553 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21554 echo "configure:21555: checking for mode_t" >&5
21555 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21556   echo $ac_n "(cached) $ac_c" 1>&6
21557 else
21558   cat > conftest.$ac_ext <<EOF
21559 #line 21560 "configure"
21560 #include "confdefs.h"
21561 #include <sys/types.h>
21562 #if STDC_HEADERS
21563 #include <stdlib.h>
21564 #include <stddef.h>
21565 #endif
21566
21567 EOF
21568 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21569   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21570   rm -rf conftest*
21571   eval "ac_cv_type_mode_t=yes"
21572 else
21573   rm -rf conftest*
21574   eval "ac_cv_type_mode_t=no"
21575 fi
21576 rm -f conftest*
21577
21578 fi
21579 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21580   echo "$ac_t""yes" 1>&6
21581 else
21582   echo "$ac_t""no" 1>&6
21583   cat >> confdefs.h <<EOF
21584 #define mode_t int
21585 EOF
21586
21587 fi
21588
21589 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21590 echo "configure:21591: checking for off_t" >&5
21591 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21592   echo $ac_n "(cached) $ac_c" 1>&6
21593 else
21594   cat > conftest.$ac_ext <<EOF
21595 #line 21596 "configure"
21596 #include "confdefs.h"
21597 #include <sys/types.h>
21598 #if STDC_HEADERS
21599 #include <stdlib.h>
21600 #include <stddef.h>
21601 #endif
21602
21603 EOF
21604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21605   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21606   rm -rf conftest*
21607   eval "ac_cv_type_off_t=yes"
21608 else
21609   rm -rf conftest*
21610   eval "ac_cv_type_off_t=no"
21611 fi
21612 rm -f conftest*
21613
21614 fi
21615 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21616   echo "$ac_t""yes" 1>&6
21617 else
21618   echo "$ac_t""no" 1>&6
21619   cat >> confdefs.h <<EOF
21620 #define off_t long
21621 EOF
21622
21623 fi
21624
21625 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21626 echo "configure:21627: checking for pid_t" >&5
21627 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21628   echo $ac_n "(cached) $ac_c" 1>&6
21629 else
21630   cat > conftest.$ac_ext <<EOF
21631 #line 21632 "configure"
21632 #include "confdefs.h"
21633 #include <sys/types.h>
21634 #if STDC_HEADERS
21635 #include <stdlib.h>
21636 #include <stddef.h>
21637 #endif
21638
21639 EOF
21640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21641   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21642   rm -rf conftest*
21643   eval "ac_cv_type_pid_t=yes"
21644 else
21645   rm -rf conftest*
21646   eval "ac_cv_type_pid_t=no"
21647 fi
21648 rm -f conftest*
21649
21650 fi
21651 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21652   echo "$ac_t""yes" 1>&6
21653 else
21654   echo "$ac_t""no" 1>&6
21655   cat >> confdefs.h <<EOF
21656 #define pid_t int
21657 EOF
21658
21659 fi
21660
21661 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21662 echo "configure:21663: checking for ptrdiff_t" >&5
21663 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21664   echo $ac_n "(cached) $ac_c" 1>&6
21665 else
21666   cat > conftest.$ac_ext <<EOF
21667 #line 21668 "configure"
21668 #include "confdefs.h"
21669 #include <stddef.h>
21670 int main() {
21671 ptrdiff_t p
21672 ; return 0; }
21673 EOF
21674 if { (eval echo configure:21675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21675   rm -rf conftest*
21676   am_cv_type_ptrdiff_t=yes
21677 else
21678   echo "configure: failed program was:" >&5
21679   cat conftest.$ac_ext >&5
21680   rm -rf conftest*
21681   am_cv_type_ptrdiff_t=no
21682 fi
21683 rm -f conftest*
21684 fi
21685
21686 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21687    if test $am_cv_type_ptrdiff_t = yes; then
21688      cat >> confdefs.h <<\EOF
21689 #define HAVE_PTRDIFF_T 1
21690 EOF
21691
21692    fi
21693
21694 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21695 echo "configure:21696: checking return type of signal handlers" >&5
21696 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21697   echo $ac_n "(cached) $ac_c" 1>&6
21698 else
21699   cat > conftest.$ac_ext <<EOF
21700 #line 21701 "configure"
21701 #include "confdefs.h"
21702 #include <sys/types.h>
21703 #include <signal.h>
21704 #ifdef signal
21705 #undef signal
21706 #endif
21707 #ifdef __cplusplus
21708 extern "C" void (*signal (int, void (*)(int)))(int);
21709 #else
21710 void (*signal ()) ();
21711 #endif
21712
21713 int main() {
21714 int i;
21715 ; return 0; }
21716 EOF
21717 if { (eval echo configure:21718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21718   rm -rf conftest*
21719   ac_cv_type_signal=void
21720 else
21721   echo "configure: failed program was:" >&5
21722   cat conftest.$ac_ext >&5
21723   rm -rf conftest*
21724   ac_cv_type_signal=int
21725 fi
21726 rm -f conftest*
21727 fi
21728
21729 echo "$ac_t""$ac_cv_type_signal" 1>&6
21730 cat >> confdefs.h <<EOF
21731 #define RETSIGTYPE $ac_cv_type_signal
21732 EOF
21733
21734
21735 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21736 echo "configure:21737: checking for size_t" >&5
21737 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21738   echo $ac_n "(cached) $ac_c" 1>&6
21739 else
21740   cat > conftest.$ac_ext <<EOF
21741 #line 21742 "configure"
21742 #include "confdefs.h"
21743 #include <sys/types.h>
21744 #if STDC_HEADERS
21745 #include <stdlib.h>
21746 #include <stddef.h>
21747 #endif
21748
21749 EOF
21750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21751   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21752   rm -rf conftest*
21753   eval "ac_cv_type_size_t=yes"
21754 else
21755   rm -rf conftest*
21756   eval "ac_cv_type_size_t=no"
21757 fi
21758 rm -f conftest*
21759
21760 fi
21761 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21762   echo "$ac_t""yes" 1>&6
21763 else
21764   echo "$ac_t""no" 1>&6
21765   cat >> confdefs.h <<EOF
21766 #define size_t unsigned
21767 EOF
21768
21769 fi
21770
21771
21772 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21773 echo "configure:21774: checking for ssize_t" >&5
21774 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21775   echo $ac_n "(cached) $ac_c" 1>&6
21776 else
21777   cat > conftest.$ac_ext <<EOF
21778 #line 21779 "configure"
21779 #include "confdefs.h"
21780 #include <sys/types.h>
21781 #if STDC_HEADERS
21782 #include <stdlib.h>
21783 #include <stddef.h>
21784 #endif
21785
21786 EOF
21787 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21788   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21789   rm -rf conftest*
21790   eval "ac_cv_type_ssize_t=yes"
21791 else
21792   rm -rf conftest*
21793   eval "ac_cv_type_ssize_t=no"
21794 fi
21795 rm -f conftest*
21796
21797 fi
21798 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21799   echo "$ac_t""yes" 1>&6
21800 else
21801   echo "$ac_t""no" 1>&6
21802   cat >> confdefs.h <<EOF
21803 #define ssize_t signed int
21804 EOF
21805
21806 fi
21807
21808 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21809 echo "configure:21810: checking for caddr_t" >&5
21810 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21811   echo $ac_n "(cached) $ac_c" 1>&6
21812 else
21813   cat > conftest.$ac_ext <<EOF
21814 #line 21815 "configure"
21815 #include "confdefs.h"
21816 #include <sys/types.h>
21817 #if STDC_HEADERS
21818 #include <stdlib.h>
21819 #include <stddef.h>
21820 #endif
21821
21822 EOF
21823 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21824   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21825   rm -rf conftest*
21826   eval "ac_cv_type_caddr_t=yes"
21827 else
21828   rm -rf conftest*
21829   eval "ac_cv_type_caddr_t=no"
21830 fi
21831 rm -f conftest*
21832
21833 fi
21834 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21835   echo "$ac_t""yes" 1>&6
21836 else
21837   echo "$ac_t""no" 1>&6
21838   cat >> confdefs.h <<EOF
21839 #define caddr_t char *
21840 EOF
21841
21842 fi
21843
21844
21845 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21846 echo "configure:21847: checking for socklen_t" >&5
21847 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21848   echo $ac_n "(cached) $ac_c" 1>&6
21849 else
21850   cat > conftest.$ac_ext <<EOF
21851 #line 21852 "configure"
21852 #include "confdefs.h"
21853
21854 #ifdef HAVE_SYS_TYPES_H
21855 #include <sys/types.h>
21856 #endif
21857 #ifdef HAVE_SYS_SOCKET_H
21858 #include <sys/socket.h>
21859 #endif
21860
21861 int main() {
21862 socklen_t len;
21863 ; return 0; }
21864 EOF
21865 if { (eval echo configure:21866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21866   rm -rf conftest*
21867   ol_cv_type_socklen_t=yes
21868 else
21869   echo "configure: failed program was:" >&5
21870   cat conftest.$ac_ext >&5
21871   rm -rf conftest*
21872   ol_cv_type_socklen_t=no
21873 fi
21874 rm -f conftest*
21875 fi
21876
21877 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21878   if test $ol_cv_type_socklen_t = no; then
21879     cat >> confdefs.h <<\EOF
21880 #define socklen_t int
21881 EOF
21882
21883   fi
21884  
21885 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21886 echo "configure:21887: checking for member st_blksize in aggregate type struct stat" >&5
21887 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21888   echo $ac_n "(cached) $ac_c" 1>&6
21889 else
21890   cat > conftest.$ac_ext <<EOF
21891 #line 21892 "configure"
21892 #include "confdefs.h"
21893 #include <sys/types.h>
21894 #include <sys/stat.h>
21895 int main() {
21896 struct stat foo; foo.st_blksize;
21897 ; return 0; }
21898 EOF
21899 if { (eval echo configure:21900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21900   rm -rf conftest*
21901   ac_cv_c_struct_member_st_blksize=yes
21902 else
21903   echo "configure: failed program was:" >&5
21904   cat conftest.$ac_ext >&5
21905   rm -rf conftest*
21906   ac_cv_c_struct_member_st_blksize=no
21907 fi
21908 rm -f conftest*
21909 fi
21910
21911 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21912 st_blksize="$ac_cv_c_struct_member_st_blksize"
21913 if test $ac_cv_c_struct_member_st_blksize = yes; then
21914   cat >> confdefs.h <<\EOF
21915 #define HAVE_ST_BLKSIZE 1
21916 EOF
21917
21918 fi
21919
21920 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21921 echo "configure:21922: checking whether time.h and sys/time.h may both be included" >&5
21922 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21923   echo $ac_n "(cached) $ac_c" 1>&6
21924 else
21925   cat > conftest.$ac_ext <<EOF
21926 #line 21927 "configure"
21927 #include "confdefs.h"
21928 #include <sys/types.h>
21929 #include <sys/time.h>
21930 #include <time.h>
21931 int main() {
21932 struct tm *tp;
21933 ; return 0; }
21934 EOF
21935 if { (eval echo configure:21936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21936   rm -rf conftest*
21937   ac_cv_header_time=yes
21938 else
21939   echo "configure: failed program was:" >&5
21940   cat conftest.$ac_ext >&5
21941   rm -rf conftest*
21942   ac_cv_header_time=no
21943 fi
21944 rm -f conftest*
21945 fi
21946
21947 echo "$ac_t""$ac_cv_header_time" 1>&6
21948 if test $ac_cv_header_time = yes; then
21949   cat >> confdefs.h <<\EOF
21950 #define TIME_WITH_SYS_TIME 1
21951 EOF
21952
21953 fi
21954
21955 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21956 echo "configure:21957: checking whether struct tm is in sys/time.h or time.h" >&5
21957 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21958   echo $ac_n "(cached) $ac_c" 1>&6
21959 else
21960   cat > conftest.$ac_ext <<EOF
21961 #line 21962 "configure"
21962 #include "confdefs.h"
21963 #include <sys/types.h>
21964 #include <time.h>
21965 int main() {
21966 struct tm *tp; tp->tm_sec;
21967 ; return 0; }
21968 EOF
21969 if { (eval echo configure:21970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21970   rm -rf conftest*
21971   ac_cv_struct_tm=time.h
21972 else
21973   echo "configure: failed program was:" >&5
21974   cat conftest.$ac_ext >&5
21975   rm -rf conftest*
21976   ac_cv_struct_tm=sys/time.h
21977 fi
21978 rm -f conftest*
21979 fi
21980
21981 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21982 if test $ac_cv_struct_tm = sys/time.h; then
21983   cat >> confdefs.h <<\EOF
21984 #define TM_IN_SYS_TIME 1
21985 EOF
21986
21987 fi
21988
21989 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21990 echo "configure:21991: checking for uid_t in sys/types.h" >&5
21991 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21992   echo $ac_n "(cached) $ac_c" 1>&6
21993 else
21994   cat > conftest.$ac_ext <<EOF
21995 #line 21996 "configure"
21996 #include "confdefs.h"
21997 #include <sys/types.h>
21998 EOF
21999 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22000   egrep "uid_t" >/dev/null 2>&1; then
22001   rm -rf conftest*
22002   ac_cv_type_uid_t=yes
22003 else
22004   rm -rf conftest*
22005   ac_cv_type_uid_t=no
22006 fi
22007 rm -f conftest*
22008
22009 fi
22010
22011 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22012 if test $ac_cv_type_uid_t = no; then
22013   cat >> confdefs.h <<\EOF
22014 #define uid_t int
22015 EOF
22016
22017   cat >> confdefs.h <<\EOF
22018 #define gid_t int
22019 EOF
22020
22021 fi
22022
22023 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22024 echo "configure:22025: checking for sig_atomic_t" >&5
22025 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22026   echo $ac_n "(cached) $ac_c" 1>&6
22027 else
22028   cat > conftest.$ac_ext <<EOF
22029 #line 22030 "configure"
22030 #include "confdefs.h"
22031 #include <signal.h>
22032 int main() {
22033 sig_atomic_t atomic;
22034 ; return 0; }
22035 EOF
22036 if { (eval echo configure:22037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22037   rm -rf conftest*
22038   ol_cv_type_sig_atomic_t=yes
22039 else
22040   echo "configure: failed program was:" >&5
22041   cat conftest.$ac_ext >&5
22042   rm -rf conftest*
22043   ol_cv_type_sig_atomic_t=no
22044 fi
22045 rm -f conftest*
22046 fi
22047
22048 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22049   if test $ol_cv_type_sig_atomic_t = no; then
22050     cat >> confdefs.h <<\EOF
22051 #define sig_atomic_t int
22052 EOF
22053
22054   fi
22055  
22056
22057
22058 # test for pw_gecos in struct passwd
22059 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22060 echo "configure:22061: checking struct passwd for pw_gecos" >&5
22061 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22062   echo $ac_n "(cached) $ac_c" 1>&6
22063 else
22064   
22065         cat > conftest.$ac_ext <<EOF
22066 #line 22067 "configure"
22067 #include "confdefs.h"
22068 #include <pwd.h>
22069 int main() {
22070
22071         struct passwd pwd;
22072         pwd.pw_gecos = pwd.pw_name;
22073
22074 ; return 0; }
22075 EOF
22076 if { (eval echo configure:22077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22077   rm -rf conftest*
22078   ol_cv_struct_passwd_pw_gecos=yes
22079 else
22080   echo "configure: failed program was:" >&5
22081   cat conftest.$ac_ext >&5
22082   rm -rf conftest*
22083   ol_cv_struct_passwd_pw_gecos=no
22084 fi
22085 rm -f conftest*
22086 fi
22087
22088 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22089 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22090         cat >> confdefs.h <<\EOF
22091 #define HAVE_PW_GECOS 1
22092 EOF
22093
22094 fi
22095
22096 # test for pw_passwd in struct passwd
22097 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22098 echo "configure:22099: checking struct passwd for pw_passwd" >&5
22099 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22100   echo $ac_n "(cached) $ac_c" 1>&6
22101 else
22102   
22103         cat > conftest.$ac_ext <<EOF
22104 #line 22105 "configure"
22105 #include "confdefs.h"
22106 #include <pwd.h>
22107 int main() {
22108
22109         struct passwd pwd;
22110         pwd.pw_passwd = pwd.pw_name;
22111
22112 ; return 0; }
22113 EOF
22114 if { (eval echo configure:22115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22115   rm -rf conftest*
22116   ol_cv_struct_passwd_pw_passwd=yes
22117 else
22118   echo "configure: failed program was:" >&5
22119   cat conftest.$ac_ext >&5
22120   rm -rf conftest*
22121   ol_cv_struct_passwd_pw_passwd=no
22122 fi
22123 rm -f conftest*
22124 fi
22125
22126 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22127 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22128         cat >> confdefs.h <<\EOF
22129 #define HAVE_PW_PASSWD 1
22130 EOF
22131
22132 fi
22133
22134
22135 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22136 echo "configure:22137: checking if toupper() requires islower()" >&5
22137 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22138   echo $ac_n "(cached) $ac_c" 1>&6
22139 else
22140   
22141         if test "$cross_compiling" = yes; then
22142   ol_cv_c_upper_lower=safe
22143 else
22144   cat > conftest.$ac_ext <<EOF
22145 #line 22146 "configure"
22146 #include "confdefs.h"
22147
22148 #include <ctype.h>
22149 main()
22150 {
22151         if ('C' == toupper('C'))
22152                 exit(0);
22153         else
22154                 exit(1);
22155 }
22156 EOF
22157 if { (eval echo configure:22158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22158 then
22159   ol_cv_c_upper_lower=no
22160 else
22161   echo "configure: failed program was:" >&5
22162   cat conftest.$ac_ext >&5
22163   rm -fr conftest*
22164   ol_cv_c_upper_lower=yes
22165 fi
22166 rm -fr conftest*
22167 fi
22168
22169 fi
22170
22171 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22172 if test $ol_cv_c_upper_lower != no ; then
22173         cat >> confdefs.h <<\EOF
22174 #define C_UPPER_LOWER 1
22175 EOF
22176
22177 fi
22178
22179 echo $ac_n "checking for working const""... $ac_c" 1>&6
22180 echo "configure:22181: checking for working const" >&5
22181 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22182   echo $ac_n "(cached) $ac_c" 1>&6
22183 else
22184   cat > conftest.$ac_ext <<EOF
22185 #line 22186 "configure"
22186 #include "confdefs.h"
22187
22188 int main() {
22189
22190 /* Ultrix mips cc rejects this.  */
22191 typedef int charset[2]; const charset x;
22192 /* SunOS 4.1.1 cc rejects this.  */
22193 char const *const *ccp;
22194 char **p;
22195 /* NEC SVR4.0.2 mips cc rejects this.  */
22196 struct point {int x, y;};
22197 static struct point const zero = {0,0};
22198 /* AIX XL C 1.02.0.0 rejects this.
22199    It does not let you subtract one const X* pointer from another in an arm
22200    of an if-expression whose if-part is not a constant expression */
22201 const char *g = "string";
22202 ccp = &g + (g ? g-g : 0);
22203 /* HPUX 7.0 cc rejects these. */
22204 ++ccp;
22205 p = (char**) ccp;
22206 ccp = (char const *const *) p;
22207 { /* SCO 3.2v4 cc rejects this.  */
22208   char *t;
22209   char const *s = 0 ? (char *) 0 : (char const *) 0;
22210
22211   *t++ = 0;
22212 }
22213 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22214   int x[] = {25, 17};
22215   const int *foo = &x[0];
22216   ++foo;
22217 }
22218 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22219   typedef const int *iptr;
22220   iptr p = 0;
22221   ++p;
22222 }
22223 { /* AIX XL C 1.02.0.0 rejects this saying
22224      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22225   struct s { int j; const int *ap[3]; };
22226   struct s *b; b->j = 5;
22227 }
22228 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22229   const int foo = 10;
22230 }
22231
22232 ; return 0; }
22233 EOF
22234 if { (eval echo configure:22235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22235   rm -rf conftest*
22236   ac_cv_c_const=yes
22237 else
22238   echo "configure: failed program was:" >&5
22239   cat conftest.$ac_ext >&5
22240   rm -rf conftest*
22241   ac_cv_c_const=no
22242 fi
22243 rm -f conftest*
22244 fi
22245
22246 echo "$ac_t""$ac_cv_c_const" 1>&6
22247 if test $ac_cv_c_const = no; then
22248   cat >> confdefs.h <<\EOF
22249 #define const 
22250 EOF
22251
22252 fi
22253
22254 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22255 echo "configure:22256: checking if compiler understands volatile" >&5
22256 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22257   echo $ac_n "(cached) $ac_c" 1>&6
22258 else
22259   cat > conftest.$ac_ext <<EOF
22260 #line 22261 "configure"
22261 #include "confdefs.h"
22262 int x, y, z;
22263 int main() {
22264 volatile int a; int * volatile b = x ? &y : &z;
22265       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22266       *b = 0;
22267 ; return 0; }
22268 EOF
22269 if { (eval echo configure:22270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22270   rm -rf conftest*
22271   ol_cv_c_volatile=yes
22272 else
22273   echo "configure: failed program was:" >&5
22274   cat conftest.$ac_ext >&5
22275   rm -rf conftest*
22276   ol_cv_c_volatile=no
22277 fi
22278 rm -f conftest*
22279 fi
22280
22281 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22282   if test $ol_cv_c_volatile = yes; then
22283     : 
22284   else
22285     cat >> confdefs.h <<\EOF
22286 #define volatile 
22287 EOF
22288
22289   fi
22290  
22291
22292 if test $cross_compiling = yes ; then
22293         cat >> confdefs.h <<\EOF
22294 #define CROSS_COMPILING 1
22295 EOF
22296
22297 else
22298         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22299 echo "configure:22300: checking whether byte ordering is bigendian" >&5
22300 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22301   echo $ac_n "(cached) $ac_c" 1>&6
22302 else
22303   ac_cv_c_bigendian=unknown
22304 # See if sys/param.h defines the BYTE_ORDER macro.
22305 cat > conftest.$ac_ext <<EOF
22306 #line 22307 "configure"
22307 #include "confdefs.h"
22308 #include <sys/types.h>
22309 #include <sys/param.h>
22310 int main() {
22311
22312 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22313  bogus endian macros
22314 #endif
22315 ; return 0; }
22316 EOF
22317 if { (eval echo configure:22318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22318   rm -rf conftest*
22319   # It does; now see whether it defined to BIG_ENDIAN or not.
22320 cat > conftest.$ac_ext <<EOF
22321 #line 22322 "configure"
22322 #include "confdefs.h"
22323 #include <sys/types.h>
22324 #include <sys/param.h>
22325 int main() {
22326
22327 #if BYTE_ORDER != BIG_ENDIAN
22328  not big endian
22329 #endif
22330 ; return 0; }
22331 EOF
22332 if { (eval echo configure:22333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22333   rm -rf conftest*
22334   ac_cv_c_bigendian=yes
22335 else
22336   echo "configure: failed program was:" >&5
22337   cat conftest.$ac_ext >&5
22338   rm -rf conftest*
22339   ac_cv_c_bigendian=no
22340 fi
22341 rm -f conftest*
22342 else
22343   echo "configure: failed program was:" >&5
22344   cat conftest.$ac_ext >&5
22345 fi
22346 rm -f conftest*
22347 if test $ac_cv_c_bigendian = unknown; then
22348 if test "$cross_compiling" = yes; then
22349     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22350 else
22351   cat > conftest.$ac_ext <<EOF
22352 #line 22353 "configure"
22353 #include "confdefs.h"
22354 main () {
22355   /* Are we little or big endian?  From Harbison&Steele.  */
22356   union
22357   {
22358     long l;
22359     char c[sizeof (long)];
22360   } u;
22361   u.l = 1;
22362   exit (u.c[sizeof (long) - 1] == 1);
22363 }
22364 EOF
22365 if { (eval echo configure:22366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22366 then
22367   ac_cv_c_bigendian=no
22368 else
22369   echo "configure: failed program was:" >&5
22370   cat conftest.$ac_ext >&5
22371   rm -fr conftest*
22372   ac_cv_c_bigendian=yes
22373 fi
22374 rm -fr conftest*
22375 fi
22376
22377 fi
22378 fi
22379
22380 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22381 if test $ac_cv_c_bigendian = yes; then
22382   cat >> confdefs.h <<\EOF
22383 #define WORDS_BIGENDIAN 1
22384 EOF
22385
22386 fi
22387
22388 fi
22389
22390 echo $ac_n "checking size of short""... $ac_c" 1>&6
22391 echo "configure:22392: checking size of short" >&5 
22392 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22393   echo $ac_n "(cached) $ac_c" 1>&6
22394 else
22395   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22396   cat > conftest.$ac_ext <<EOF
22397 #line 22398 "configure"
22398 #include "confdefs.h"
22399 #include "confdefs.h" 
22400 #include <sys/types.h> 
22401  
22402
22403 int main() {
22404 switch (0) case 0: case (sizeof (short) == $ac_size):;
22405 ; return 0; }
22406 EOF
22407 if { (eval echo configure:22408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22408   rm -rf conftest*
22409   ac_cv_sizeof_short=$ac_size
22410 else
22411   echo "configure: failed program was:" >&5
22412   cat conftest.$ac_ext >&5
22413 fi
22414 rm -f conftest* 
22415   if test x$ac_cv_sizeof_short != x ; then break; fi 
22416 done 
22417
22418 fi
22419  
22420 if test x$ac_cv_sizeof_short = x ; then 
22421   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22422 fi 
22423 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22424 cat >> confdefs.h <<EOF
22425 #define SIZEOF_SHORT $ac_cv_sizeof_short
22426 EOF
22427  
22428  
22429 echo $ac_n "checking size of int""... $ac_c" 1>&6
22430 echo "configure:22431: checking size of int" >&5 
22431 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22432   echo $ac_n "(cached) $ac_c" 1>&6
22433 else
22434   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22435   cat > conftest.$ac_ext <<EOF
22436 #line 22437 "configure"
22437 #include "confdefs.h"
22438 #include "confdefs.h" 
22439 #include <sys/types.h> 
22440  
22441
22442 int main() {
22443 switch (0) case 0: case (sizeof (int) == $ac_size):;
22444 ; return 0; }
22445 EOF
22446 if { (eval echo configure:22447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22447   rm -rf conftest*
22448   ac_cv_sizeof_int=$ac_size
22449 else
22450   echo "configure: failed program was:" >&5
22451   cat conftest.$ac_ext >&5
22452 fi
22453 rm -f conftest* 
22454   if test x$ac_cv_sizeof_int != x ; then break; fi 
22455 done 
22456
22457 fi
22458  
22459 if test x$ac_cv_sizeof_int = x ; then 
22460   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22461 fi 
22462 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22463 cat >> confdefs.h <<EOF
22464 #define SIZEOF_INT $ac_cv_sizeof_int
22465 EOF
22466  
22467  
22468 echo $ac_n "checking size of long""... $ac_c" 1>&6
22469 echo "configure:22470: checking size of long" >&5 
22470 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22471   echo $ac_n "(cached) $ac_c" 1>&6
22472 else
22473   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22474   cat > conftest.$ac_ext <<EOF
22475 #line 22476 "configure"
22476 #include "confdefs.h"
22477 #include "confdefs.h" 
22478 #include <sys/types.h> 
22479  
22480
22481 int main() {
22482 switch (0) case 0: case (sizeof (long) == $ac_size):;
22483 ; return 0; }
22484 EOF
22485 if { (eval echo configure:22486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22486   rm -rf conftest*
22487   ac_cv_sizeof_long=$ac_size
22488 else
22489   echo "configure: failed program was:" >&5
22490   cat conftest.$ac_ext >&5
22491 fi
22492 rm -f conftest* 
22493   if test x$ac_cv_sizeof_long != x ; then break; fi 
22494 done 
22495
22496 fi
22497  
22498 if test x$ac_cv_sizeof_long = x ; then 
22499   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22500 fi 
22501 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22502 cat >> confdefs.h <<EOF
22503 #define SIZEOF_LONG $ac_cv_sizeof_long
22504 EOF
22505  
22506
22507
22508 if test "$ac_cv_sizeof_int" -lt 4 ; then
22509         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22510
22511         cat >> confdefs.h <<\EOF
22512 #define LBER_INT_T long
22513 EOF
22514
22515 else
22516         cat >> confdefs.h <<\EOF
22517 #define LBER_INT_T int
22518 EOF
22519
22520 fi
22521
22522 cat >> confdefs.h <<\EOF
22523 #define LBER_LEN_T long
22524 EOF
22525
22526 cat >> confdefs.h <<\EOF
22527 #define LBER_SOCKET_T int
22528 EOF
22529
22530 cat >> confdefs.h <<\EOF
22531 #define LBER_TAG_T long
22532 EOF
22533
22534
22535 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22536 echo "configure:22537: checking for 8-bit clean memcmp" >&5
22537 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22538   echo $ac_n "(cached) $ac_c" 1>&6
22539 else
22540   if test "$cross_compiling" = yes; then
22541   ac_cv_func_memcmp_clean=no
22542 else
22543   cat > conftest.$ac_ext <<EOF
22544 #line 22545 "configure"
22545 #include "confdefs.h"
22546
22547 main()
22548 {
22549   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22550   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22551 }
22552
22553 EOF
22554 if { (eval echo configure:22555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22555 then
22556   ac_cv_func_memcmp_clean=yes
22557 else
22558   echo "configure: failed program was:" >&5
22559   cat conftest.$ac_ext >&5
22560   rm -fr conftest*
22561   ac_cv_func_memcmp_clean=no
22562 fi
22563 rm -fr conftest*
22564 fi
22565
22566 fi
22567
22568 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22569 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22570
22571 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22572 echo "configure:22573: checking for strftime" >&5
22573 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22574   echo $ac_n "(cached) $ac_c" 1>&6
22575 else
22576   cat > conftest.$ac_ext <<EOF
22577 #line 22578 "configure"
22578 #include "confdefs.h"
22579 /* System header to define __stub macros and hopefully few prototypes,
22580     which can conflict with char strftime(); below.  */
22581 #include <assert.h>
22582 /* Override any gcc2 internal prototype to avoid an error.  */
22583 /* We use char because int might match the return type of a gcc2
22584     builtin and then its argument prototype would still apply.  */
22585 char strftime();
22586 char (*f)();
22587
22588 int main() {
22589
22590 /* The GNU C library defines this for functions which it implements
22591     to always fail with ENOSYS.  Some functions are actually named
22592     something starting with __ and the normal name is an alias.  */
22593 #if defined (__stub_strftime) || defined (__stub___strftime)
22594 choke me
22595 #else
22596 f = strftime;
22597 #endif
22598
22599 ; return 0; }
22600 EOF
22601 if { (eval echo configure:22602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22602   rm -rf conftest*
22603   eval "ac_cv_func_strftime=yes"
22604 else
22605   echo "configure: failed program was:" >&5
22606   cat conftest.$ac_ext >&5
22607   rm -rf conftest*
22608   eval "ac_cv_func_strftime=no"
22609 fi
22610 rm -f conftest*
22611 fi
22612
22613 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22614   echo "$ac_t""yes" 1>&6
22615   cat >> confdefs.h <<\EOF
22616 #define HAVE_STRFTIME 1
22617 EOF
22618
22619 else
22620   echo "$ac_t""no" 1>&6
22621 # strftime is in -lintl on SCO UNIX.
22622 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22623 echo "configure:22624: checking for strftime in -lintl" >&5
22624 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22625 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22626   echo $ac_n "(cached) $ac_c" 1>&6
22627 else
22628   ac_save_LIBS="$LIBS"
22629 LIBS="-lintl  $LIBS"
22630 cat > conftest.$ac_ext <<EOF
22631 #line 22632 "configure"
22632 #include "confdefs.h"
22633 /* Override any gcc2 internal prototype to avoid an error.  */
22634 /* We use char because int might match the return type of a gcc2
22635     builtin and then its argument prototype would still apply.  */
22636 char strftime();
22637
22638 int main() {
22639 strftime()
22640 ; return 0; }
22641 EOF
22642 if { (eval echo configure:22643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22643   rm -rf conftest*
22644   eval "ac_cv_lib_$ac_lib_var=yes"
22645 else
22646   echo "configure: failed program was:" >&5
22647   cat conftest.$ac_ext >&5
22648   rm -rf conftest*
22649   eval "ac_cv_lib_$ac_lib_var=no"
22650 fi
22651 rm -f conftest*
22652 LIBS="$ac_save_LIBS"
22653
22654 fi
22655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22656   echo "$ac_t""yes" 1>&6
22657   cat >> confdefs.h <<\EOF
22658 #define HAVE_STRFTIME 1
22659 EOF
22660
22661 LIBS="-lintl $LIBS"
22662 else
22663   echo "$ac_t""no" 1>&6
22664 fi
22665
22666 fi
22667
22668
22669 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22670 echo "configure:22671: checking for inet_aton()" >&5
22671 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22672   echo $ac_n "(cached) $ac_c" 1>&6
22673 else
22674   cat > conftest.$ac_ext <<EOF
22675 #line 22676 "configure"
22676 #include "confdefs.h"
22677
22678 #ifdef HAVE_SYS_TYPES_H
22679 #       include <sys/types.h>
22680 #endif
22681 #ifdef HAVE_SYS_SOCKET_H
22682 #       include <sys/socket.h>
22683 #       ifdef HAVE_SYS_SELECT_H
22684 #               include <sys/select.h>
22685 #       endif
22686 #       include <netinet/in.h>
22687 #       ifdef HAVE_ARPA_INET_H
22688 #               include <arpa/inet.h>
22689 #       endif
22690 #endif
22691
22692 int main() {
22693 struct in_addr in;
22694 int rc = inet_aton( "255.255.255.255", &in );
22695 ; return 0; }
22696 EOF
22697 if { (eval echo configure:22698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22698   rm -rf conftest*
22699   ol_cv_func_inet_aton=yes
22700 else
22701   echo "configure: failed program was:" >&5
22702   cat conftest.$ac_ext >&5
22703   rm -rf conftest*
22704   ol_cv_func_inet_aton=no
22705 fi
22706 rm -f conftest*
22707 fi
22708
22709 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22710   if test $ol_cv_func_inet_aton != no; then
22711     cat >> confdefs.h <<\EOF
22712 #define HAVE_INET_ATON 1
22713 EOF
22714
22715   fi
22716  
22717
22718 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22719 echo "configure:22720: checking for _spawnlp" >&5
22720 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22721   echo $ac_n "(cached) $ac_c" 1>&6
22722 else
22723   cat > conftest.$ac_ext <<EOF
22724 #line 22725 "configure"
22725 #include "confdefs.h"
22726 /* System header to define __stub macros and hopefully few prototypes,
22727     which can conflict with char _spawnlp(); below.  */
22728 #include <assert.h>
22729 /* Override any gcc2 internal prototype to avoid an error.  */
22730 /* We use char because int might match the return type of a gcc2
22731     builtin and then its argument prototype would still apply.  */
22732 char _spawnlp();
22733 char (*f)();
22734
22735 int main() {
22736
22737 /* The GNU C library defines this for functions which it implements
22738     to always fail with ENOSYS.  Some functions are actually named
22739     something starting with __ and the normal name is an alias.  */
22740 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22741 choke me
22742 #else
22743 f = _spawnlp;
22744 #endif
22745
22746 ; return 0; }
22747 EOF
22748 if { (eval echo configure:22749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22749   rm -rf conftest*
22750   eval "ac_cv_func__spawnlp=yes"
22751 else
22752   echo "configure: failed program was:" >&5
22753   cat conftest.$ac_ext >&5
22754   rm -rf conftest*
22755   eval "ac_cv_func__spawnlp=no"
22756 fi
22757 rm -f conftest*
22758 fi
22759
22760 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22761   echo "$ac_t""yes" 1>&6
22762   cat >> confdefs.h <<\EOF
22763 #define HAVE_SPAWNLP 1
22764 EOF
22765
22766 else
22767   echo "$ac_t""no" 1>&6
22768 fi
22769
22770
22771 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22772 echo "configure:22773: checking for _snprintf" >&5
22773 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22774   echo $ac_n "(cached) $ac_c" 1>&6
22775 else
22776   cat > conftest.$ac_ext <<EOF
22777 #line 22778 "configure"
22778 #include "confdefs.h"
22779 /* System header to define __stub macros and hopefully few prototypes,
22780     which can conflict with char _snprintf(); below.  */
22781 #include <assert.h>
22782 /* Override any gcc2 internal prototype to avoid an error.  */
22783 /* We use char because int might match the return type of a gcc2
22784     builtin and then its argument prototype would still apply.  */
22785 char _snprintf();
22786 char (*f)();
22787
22788 int main() {
22789
22790 /* The GNU C library defines this for functions which it implements
22791     to always fail with ENOSYS.  Some functions are actually named
22792     something starting with __ and the normal name is an alias.  */
22793 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22794 choke me
22795 #else
22796 f = _snprintf;
22797 #endif
22798
22799 ; return 0; }
22800 EOF
22801 if { (eval echo configure:22802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22802   rm -rf conftest*
22803   eval "ac_cv_func__snprintf=yes"
22804 else
22805   echo "configure: failed program was:" >&5
22806   cat conftest.$ac_ext >&5
22807   rm -rf conftest*
22808   eval "ac_cv_func__snprintf=no"
22809 fi
22810 rm -f conftest*
22811 fi
22812
22813 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22814   echo "$ac_t""yes" 1>&6
22815   ac_cv_func_snprintf=yes
22816         cat >> confdefs.h <<\EOF
22817 #define snprintf _snprintf
22818 EOF
22819
22820
22821 else
22822   echo "$ac_t""no" 1>&6
22823 fi
22824
22825
22826 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22827 echo "configure:22828: checking for _vsnprintf" >&5
22828 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22829   echo $ac_n "(cached) $ac_c" 1>&6
22830 else
22831   cat > conftest.$ac_ext <<EOF
22832 #line 22833 "configure"
22833 #include "confdefs.h"
22834 /* System header to define __stub macros and hopefully few prototypes,
22835     which can conflict with char _vsnprintf(); below.  */
22836 #include <assert.h>
22837 /* Override any gcc2 internal prototype to avoid an error.  */
22838 /* We use char because int might match the return type of a gcc2
22839     builtin and then its argument prototype would still apply.  */
22840 char _vsnprintf();
22841 char (*f)();
22842
22843 int main() {
22844
22845 /* The GNU C library defines this for functions which it implements
22846     to always fail with ENOSYS.  Some functions are actually named
22847     something starting with __ and the normal name is an alias.  */
22848 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22849 choke me
22850 #else
22851 f = _vsnprintf;
22852 #endif
22853
22854 ; return 0; }
22855 EOF
22856 if { (eval echo configure:22857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22857   rm -rf conftest*
22858   eval "ac_cv_func__vsnprintf=yes"
22859 else
22860   echo "configure: failed program was:" >&5
22861   cat conftest.$ac_ext >&5
22862   rm -rf conftest*
22863   eval "ac_cv_func__vsnprintf=no"
22864 fi
22865 rm -f conftest*
22866 fi
22867
22868 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22869   echo "$ac_t""yes" 1>&6
22870   ac_cv_func_vsnprintf=yes
22871         cat >> confdefs.h <<\EOF
22872 #define vsnprintf _vsnprintf
22873 EOF
22874
22875
22876 else
22877   echo "$ac_t""no" 1>&6
22878 fi
22879
22880
22881 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22882 echo "configure:22883: checking for vprintf" >&5
22883 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22884   echo $ac_n "(cached) $ac_c" 1>&6
22885 else
22886   cat > conftest.$ac_ext <<EOF
22887 #line 22888 "configure"
22888 #include "confdefs.h"
22889 /* System header to define __stub macros and hopefully few prototypes,
22890     which can conflict with char vprintf(); below.  */
22891 #include <assert.h>
22892 /* Override any gcc2 internal prototype to avoid an error.  */
22893 /* We use char because int might match the return type of a gcc2
22894     builtin and then its argument prototype would still apply.  */
22895 char vprintf();
22896 char (*f)();
22897
22898 int main() {
22899
22900 /* The GNU C library defines this for functions which it implements
22901     to always fail with ENOSYS.  Some functions are actually named
22902     something starting with __ and the normal name is an alias.  */
22903 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22904 choke me
22905 #else
22906 f = vprintf;
22907 #endif
22908
22909 ; return 0; }
22910 EOF
22911 if { (eval echo configure:22912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22912   rm -rf conftest*
22913   eval "ac_cv_func_vprintf=yes"
22914 else
22915   echo "configure: failed program was:" >&5
22916   cat conftest.$ac_ext >&5
22917   rm -rf conftest*
22918   eval "ac_cv_func_vprintf=no"
22919 fi
22920 rm -f conftest*
22921 fi
22922
22923 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22924   echo "$ac_t""yes" 1>&6
22925   cat >> confdefs.h <<\EOF
22926 #define HAVE_VPRINTF 1
22927 EOF
22928
22929 else
22930   echo "$ac_t""no" 1>&6
22931 fi
22932
22933 if test "$ac_cv_func_vprintf" != yes; then
22934 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22935 echo "configure:22936: checking for _doprnt" >&5
22936 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22937   echo $ac_n "(cached) $ac_c" 1>&6
22938 else
22939   cat > conftest.$ac_ext <<EOF
22940 #line 22941 "configure"
22941 #include "confdefs.h"
22942 /* System header to define __stub macros and hopefully few prototypes,
22943     which can conflict with char _doprnt(); below.  */
22944 #include <assert.h>
22945 /* Override any gcc2 internal prototype to avoid an error.  */
22946 /* We use char because int might match the return type of a gcc2
22947     builtin and then its argument prototype would still apply.  */
22948 char _doprnt();
22949 char (*f)();
22950
22951 int main() {
22952
22953 /* The GNU C library defines this for functions which it implements
22954     to always fail with ENOSYS.  Some functions are actually named
22955     something starting with __ and the normal name is an alias.  */
22956 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22957 choke me
22958 #else
22959 f = _doprnt;
22960 #endif
22961
22962 ; return 0; }
22963 EOF
22964 if { (eval echo configure:22965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22965   rm -rf conftest*
22966   eval "ac_cv_func__doprnt=yes"
22967 else
22968   echo "configure: failed program was:" >&5
22969   cat conftest.$ac_ext >&5
22970   rm -rf conftest*
22971   eval "ac_cv_func__doprnt=no"
22972 fi
22973 rm -f conftest*
22974 fi
22975
22976 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22977   echo "$ac_t""yes" 1>&6
22978   cat >> confdefs.h <<\EOF
22979 #define HAVE_DOPRNT 1
22980 EOF
22981
22982 else
22983   echo "$ac_t""no" 1>&6
22984 fi
22985
22986 fi
22987
22988
22989 if test $ac_cv_func_vprintf = yes ; then
22990                 for ac_func in snprintf vsnprintf
22991 do
22992 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22993 echo "configure:22994: checking for $ac_func" >&5
22994 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22995   echo $ac_n "(cached) $ac_c" 1>&6
22996 else
22997   cat > conftest.$ac_ext <<EOF
22998 #line 22999 "configure"
22999 #include "confdefs.h"
23000 /* System header to define __stub macros and hopefully few prototypes,
23001     which can conflict with char $ac_func(); below.  */
23002 #include <assert.h>
23003 /* Override any gcc2 internal prototype to avoid an error.  */
23004 /* We use char because int might match the return type of a gcc2
23005     builtin and then its argument prototype would still apply.  */
23006 char $ac_func();
23007 char (*f)();
23008
23009 int main() {
23010
23011 /* The GNU C library defines this for functions which it implements
23012     to always fail with ENOSYS.  Some functions are actually named
23013     something starting with __ and the normal name is an alias.  */
23014 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23015 choke me
23016 #else
23017 f = $ac_func;
23018 #endif
23019
23020 ; return 0; }
23021 EOF
23022 if { (eval echo configure:23023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23023   rm -rf conftest*
23024   eval "ac_cv_func_$ac_func=yes"
23025 else
23026   echo "configure: failed program was:" >&5
23027   cat conftest.$ac_ext >&5
23028   rm -rf conftest*
23029   eval "ac_cv_func_$ac_func=no"
23030 fi
23031 rm -f conftest*
23032 fi
23033
23034 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23035   echo "$ac_t""yes" 1>&6
23036     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23037   cat >> confdefs.h <<EOF
23038 #define $ac_tr_func 1
23039 EOF
23040  
23041 else
23042   echo "$ac_t""no" 1>&6
23043 fi
23044 done
23045
23046 fi
23047
23048 for ac_func in \
23049         bcopy                   \
23050         closesocket             \
23051         chroot                  \
23052         endgrent                \
23053         endpwent                \
23054         fcntl                   \
23055         flock                   \
23056         fstat                   \
23057         getdtablesize   \
23058         getgrgid                \
23059         gethostname             \
23060         getpass                 \
23061         getpassphrase   \
23062         getpwuid                \
23063         getpwnam                \
23064         getspnam                \
23065         gettimeofday    \
23066         initgroups              \
23067         lockf                   \
23068         memcpy                  \
23069         memmove                 \
23070         mkstemp                 \
23071         mktemp                  \
23072         pipe                    \
23073         read                    \
23074         recv                    \
23075         recvfrom                \
23076         setpwfile               \
23077         setgid                  \
23078         setegid                 \
23079         setsid                  \
23080         setuid                  \
23081         seteuid                 \
23082         sigaction               \
23083         signal                  \
23084         sigset                  \
23085         strdup                  \
23086         strerror                \
23087         strpbrk                 \
23088         strrchr                 \
23089         strsep                  \
23090         strstr                  \
23091         strtol                  \
23092         strtoul                 \
23093         strtoq                  \
23094         strtouq                 \
23095         strtoll                 \
23096         strspn                  \
23097         sysconf                 \
23098         usleep                  \
23099         waitpid                 \
23100         wait4                   \
23101         write                   \
23102         send                    \
23103         sendmsg                 \
23104         sendto                  \
23105
23106 do
23107 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23108 echo "configure:23109: checking for $ac_func" >&5
23109 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23110   echo $ac_n "(cached) $ac_c" 1>&6
23111 else
23112   cat > conftest.$ac_ext <<EOF
23113 #line 23114 "configure"
23114 #include "confdefs.h"
23115 /* System header to define __stub macros and hopefully few prototypes,
23116     which can conflict with char $ac_func(); below.  */
23117 #include <assert.h>
23118 /* Override any gcc2 internal prototype to avoid an error.  */
23119 /* We use char because int might match the return type of a gcc2
23120     builtin and then its argument prototype would still apply.  */
23121 char $ac_func();
23122 char (*f)();
23123
23124 int main() {
23125
23126 /* The GNU C library defines this for functions which it implements
23127     to always fail with ENOSYS.  Some functions are actually named
23128     something starting with __ and the normal name is an alias.  */
23129 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23130 choke me
23131 #else
23132 f = $ac_func;
23133 #endif
23134
23135 ; return 0; }
23136 EOF
23137 if { (eval echo configure:23138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23138   rm -rf conftest*
23139   eval "ac_cv_func_$ac_func=yes"
23140 else
23141   echo "configure: failed program was:" >&5
23142   cat conftest.$ac_ext >&5
23143   rm -rf conftest*
23144   eval "ac_cv_func_$ac_func=no"
23145 fi
23146 rm -f conftest*
23147 fi
23148
23149 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23150   echo "$ac_t""yes" 1>&6
23151     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23152   cat >> confdefs.h <<EOF
23153 #define $ac_tr_func 1
23154 EOF
23155  
23156 else
23157   echo "$ac_t""no" 1>&6
23158 fi
23159 done
23160
23161
23162 for ac_func in getopt getpeereid
23163 do
23164 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23165 echo "configure:23166: checking for $ac_func" >&5
23166 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23167   echo $ac_n "(cached) $ac_c" 1>&6
23168 else
23169   cat > conftest.$ac_ext <<EOF
23170 #line 23171 "configure"
23171 #include "confdefs.h"
23172 /* System header to define __stub macros and hopefully few prototypes,
23173     which can conflict with char $ac_func(); below.  */
23174 #include <assert.h>
23175 /* Override any gcc2 internal prototype to avoid an error.  */
23176 /* We use char because int might match the return type of a gcc2
23177     builtin and then its argument prototype would still apply.  */
23178 char $ac_func();
23179 char (*f)();
23180
23181 int main() {
23182
23183 /* The GNU C library defines this for functions which it implements
23184     to always fail with ENOSYS.  Some functions are actually named
23185     something starting with __ and the normal name is an alias.  */
23186 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23187 choke me
23188 #else
23189 f = $ac_func;
23190 #endif
23191
23192 ; return 0; }
23193 EOF
23194 if { (eval echo configure:23195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23195   rm -rf conftest*
23196   eval "ac_cv_func_$ac_func=yes"
23197 else
23198   echo "configure: failed program was:" >&5
23199   cat conftest.$ac_ext >&5
23200   rm -rf conftest*
23201   eval "ac_cv_func_$ac_func=no"
23202 fi
23203 rm -f conftest*
23204 fi
23205
23206 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23207   echo "$ac_t""yes" 1>&6
23208     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23209   cat >> confdefs.h <<EOF
23210 #define $ac_tr_func 1
23211 EOF
23212  
23213 else
23214   echo "$ac_t""no" 1>&6
23215 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23216 fi
23217 done
23218
23219
23220
23221 if test "$ac_cv_func_getopt" != yes; then
23222         LIBSRCS="$LIBSRCS getopt.c"
23223 fi
23224 if test "$ac_cv_func_getpeereid" != yes; then
23225         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23226 echo "configure:23227: checking for msg_accrights in msghdr" >&5
23227 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23228   echo $ac_n "(cached) $ac_c" 1>&6
23229 else
23230   cat > conftest.$ac_ext <<EOF
23231 #line 23232 "configure"
23232 #include "confdefs.h"
23233 #include <sys/socket.h>
23234 int main() {
23235 struct msghdr m; m.msg_accrightslen=0
23236 ; return 0; }
23237 EOF
23238 if { (eval echo configure:23239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23239   rm -rf conftest*
23240   ol_cv_msghdr_msg_accrights=yes
23241 else
23242   echo "configure: failed program was:" >&5
23243   cat conftest.$ac_ext >&5
23244   rm -rf conftest*
23245   ol_cv_msghdr_msg_accrights=no
23246 fi
23247 rm -f conftest*
23248         
23249 fi
23250
23251 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23252   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23253         cat >> confdefs.h <<\EOF
23254 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23255 EOF
23256
23257   fi
23258
23259         LIBSRCS="$LIBSRCS getpeereid.c"
23260 fi
23261 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23262         if test "$ac_cv_func_snprintf" != yes; then
23263                 cat >> confdefs.h <<\EOF
23264 #define snprintf ber_pvt_snprintf
23265 EOF
23266
23267         fi
23268         if test "$ac_cv_func_vsnprintf" != yes; then
23269                 cat >> confdefs.h <<\EOF
23270 #define vsnprintf ber_pvt_vsnprintf
23271 EOF
23272
23273         fi
23274 fi
23275
23276 # Check Configuration
23277 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23278 echo "configure:23279: checking declaration of sys_errlist" >&5
23279 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23280   echo $ac_n "(cached) $ac_c" 1>&6
23281 else
23282   
23283         cat > conftest.$ac_ext <<EOF
23284 #line 23285 "configure"
23285 #include "confdefs.h"
23286
23287 #include <stdio.h>
23288 #include <sys/types.h>
23289 #include <errno.h>
23290 #ifdef WINNT
23291 #include <stdlib.h>
23292 #endif 
23293 int main() {
23294 char *c = (char *) *sys_errlist
23295 ; return 0; }
23296 EOF
23297 if { (eval echo configure:23298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23298   rm -rf conftest*
23299   ol_cv_dcl_sys_errlist=yes
23300         ol_cv_have_sys_errlist=yes
23301 else
23302   echo "configure: failed program was:" >&5
23303   cat conftest.$ac_ext >&5
23304   rm -rf conftest*
23305   ol_cv_dcl_sys_errlist=no
23306 fi
23307 rm -f conftest*
23308 fi
23309
23310 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23311 #
23312 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23313 if test $ol_cv_dcl_sys_errlist = no ; then
23314         cat >> confdefs.h <<\EOF
23315 #define DECL_SYS_ERRLIST 1
23316 EOF
23317
23318
23319         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23320 echo "configure:23321: checking existence of sys_errlist" >&5
23321 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23322   echo $ac_n "(cached) $ac_c" 1>&6
23323 else
23324   
23325                 cat > conftest.$ac_ext <<EOF
23326 #line 23327 "configure"
23327 #include "confdefs.h"
23328 #include <errno.h>
23329 int main() {
23330 char *c = (char *) *sys_errlist
23331 ; return 0; }
23332 EOF
23333 if { (eval echo configure:23334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23334   rm -rf conftest*
23335   ol_cv_have_sys_errlist=yes
23336 else
23337   echo "configure: failed program was:" >&5
23338   cat conftest.$ac_ext >&5
23339   rm -rf conftest*
23340   ol_cv_have_sys_errlist=no
23341 fi
23342 rm -f conftest*
23343 fi
23344
23345 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23346 fi
23347 if test $ol_cv_have_sys_errlist = yes ; then
23348         cat >> confdefs.h <<\EOF
23349 #define HAVE_SYS_ERRLIST 1
23350 EOF
23351
23352 fi
23353
23354
23355
23356 if test "$ol_enable_slapi" != no ; then
23357                         for ac_hdr in ltdl.h
23358 do
23359 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23360 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23361 echo "configure:23362: checking for $ac_hdr" >&5
23362 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23363   echo $ac_n "(cached) $ac_c" 1>&6
23364 else
23365   cat > conftest.$ac_ext <<EOF
23366 #line 23367 "configure"
23367 #include "confdefs.h"
23368 #include <$ac_hdr>
23369 EOF
23370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23371 { (eval echo configure:23372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23373 if test -z "$ac_err"; then
23374   rm -rf conftest*
23375   eval "ac_cv_header_$ac_safe=yes"
23376 else
23377   echo "$ac_err" >&5
23378   echo "configure: failed program was:" >&5
23379   cat conftest.$ac_ext >&5
23380   rm -rf conftest*
23381   eval "ac_cv_header_$ac_safe=no"
23382 fi
23383 rm -f conftest*
23384 fi
23385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23386   echo "$ac_t""yes" 1>&6
23387     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23388   cat >> confdefs.h <<EOF
23389 #define $ac_tr_hdr 1
23390 EOF
23391  
23392 else
23393   echo "$ac_t""no" 1>&6
23394 fi
23395 done
23396
23397
23398         if test $ac_cv_header_ltdl_h != yes ; then
23399                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23400         fi
23401         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23402 echo "configure:23403: checking for lt_dlinit in -lltdl" >&5
23403 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23404 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23405   echo $ac_n "(cached) $ac_c" 1>&6
23406 else
23407   ac_save_LIBS="$LIBS"
23408 LIBS="-lltdl  $LIBS"
23409 cat > conftest.$ac_ext <<EOF
23410 #line 23411 "configure"
23411 #include "confdefs.h"
23412 /* Override any gcc2 internal prototype to avoid an error.  */
23413 /* We use char because int might match the return type of a gcc2
23414     builtin and then its argument prototype would still apply.  */
23415 char lt_dlinit();
23416
23417 int main() {
23418 lt_dlinit()
23419 ; return 0; }
23420 EOF
23421 if { (eval echo configure:23422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23422   rm -rf conftest*
23423   eval "ac_cv_lib_$ac_lib_var=yes"
23424 else
23425   echo "configure: failed program was:" >&5
23426   cat conftest.$ac_ext >&5
23427   rm -rf conftest*
23428   eval "ac_cv_lib_$ac_lib_var=no"
23429 fi
23430 rm -f conftest*
23431 LIBS="$ac_save_LIBS"
23432
23433 fi
23434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23435   echo "$ac_t""yes" 1>&6
23436   
23437                 SLAPI_LIBS=-lltdl
23438                 LIBSLAPI=libslapi.a
23439                 LIBSLAPITOOLS=../libslapi.a
23440                 cat >> confdefs.h <<\EOF
23441 #define HAVE_LIBLTDL 1
23442 EOF
23443
23444         
23445 else
23446   echo "$ac_t""no" 1>&6
23447 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23448 fi
23449
23450
23451         cat >> confdefs.h <<\EOF
23452 #define LDAP_SLAPI 1
23453 EOF
23454
23455 fi
23456
23457 if test "$ol_enable_debug" != no ; then
23458         cat >> confdefs.h <<\EOF
23459 #define LDAP_DEBUG 1
23460 EOF
23461
23462 fi
23463 if test "$ol_enable_syslog" = yes ; then
23464         cat >> confdefs.h <<\EOF
23465 #define LDAP_SYSLOG 1
23466 EOF
23467
23468 fi
23469 if test "$ol_link_kbind" != no ; then
23470         cat >> confdefs.h <<\EOF
23471 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23472 EOF
23473
23474 fi
23475 if test "$ol_enable_proctitle" != no ; then
23476         cat >> confdefs.h <<\EOF
23477 #define LDAP_PROCTITLE 1
23478 EOF
23479
23480 fi
23481 if test "$ol_enable_referrals" != no ; then
23482         cat >> confdefs.h <<\EOF
23483 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23484 EOF
23485
23486 fi
23487 if test "$ol_enable_local" != no; then
23488         cat >> confdefs.h <<\EOF
23489 #define LDAP_PF_LOCAL 1
23490 EOF
23491
23492 fi
23493 if test "$ol_link_ipv6" != no; then
23494         cat >> confdefs.h <<\EOF
23495 #define LDAP_PF_INET6 1
23496 EOF
23497
23498 fi
23499 if test "$ol_enable_cleartext" != no ; then
23500         cat >> confdefs.h <<\EOF
23501 #define SLAPD_CLEARTEXT 1
23502 EOF
23503
23504 fi
23505 if test "$ol_enable_crypt" != no ; then
23506         cat >> confdefs.h <<\EOF
23507 #define SLAPD_CRYPT 1
23508 EOF
23509
23510 fi
23511 if test "$ol_link_kpasswd" != no ; then
23512         cat >> confdefs.h <<\EOF
23513 #define SLAPD_KPASSWD 1
23514 EOF
23515
23516 fi
23517 if test "$ol_link_spasswd" != no ; then
23518         cat >> confdefs.h <<\EOF
23519 #define SLAPD_SPASSWD 1
23520 EOF
23521
23522 fi
23523 if test "$ol_enable_multimaster" != no ; then
23524         cat >> confdefs.h <<\EOF
23525 #define SLAPD_MULTIMASTER 1
23526 EOF
23527
23528 fi
23529 if test "$ol_enable_rlookups" != no ; then
23530         cat >> confdefs.h <<\EOF
23531 #define SLAPD_RLOOKUPS 1
23532 EOF
23533
23534 fi
23535 if test "$ol_enable_aci" != no ; then
23536         cat >> confdefs.h <<\EOF
23537 #define SLAPD_ACI_ENABLED 1
23538 EOF
23539
23540 fi
23541
23542 if test "$ol_link_modules" != no ; then
23543         cat >> confdefs.h <<\EOF
23544 #define SLAPD_MODULES 1
23545 EOF
23546
23547         BUILD_SLAPD=yes
23548         SLAPD_MODULES_LDFLAGS="-dlopen self"
23549 fi
23550
23551 cat >> confdefs.h <<\EOF
23552 #define SLAPD_MOD_STATIC 1
23553 EOF
23554
23555 cat >> confdefs.h <<\EOF
23556 #define SLAPD_MOD_DYNAMIC 2
23557 EOF
23558
23559
23560 if test "$ol_enable_bdb" != no ; then
23561         cat >> confdefs.h <<\EOF
23562 #define SLAPD_BDB 1
23563 EOF
23564
23565         BUILD_SLAPD=yes
23566         BUILD_BDB=yes
23567         if test "$ol_with_bdb_module" != static ; then
23568                 cat >> confdefs.h <<\EOF
23569 #define SLAPD_BDB_DYNAMIC 1
23570 EOF
23571
23572                 BUILD_BDB=mod
23573                 BUILD_BDB_DYNAMIC=shared
23574                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23575         else
23576                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23577         fi
23578 fi
23579
23580 if test "$ol_link_dnssrv" != no ; then
23581         cat >> confdefs.h <<\EOF
23582 #define SLAPD_DNSSRV 1
23583 EOF
23584
23585         BUILD_SLAPD=yes
23586         BUILD_DNSSRV=yes
23587         if test "$ol_with_dnssrv_module" != static ; then
23588                 cat >> confdefs.h <<\EOF
23589 #define SLAPD_DNSSRV_DYNAMIC 1
23590 EOF
23591
23592                 BUILD_DNSSRV=mod
23593                 BUILD_DNSSRV_DYNAMIC=shared
23594                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23595         else
23596                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23597         fi
23598 fi
23599
23600 if test "$ol_enable_hdb" != no ; then
23601         cat >> confdefs.h <<\EOF
23602 #define SLAPD_HDB 1
23603 EOF
23604
23605         BUILD_SLAPD=yes
23606         BUILD_HDB=yes
23607         if test "$ol_with_hdb_module" != static ; then
23608                 cat >> confdefs.h <<\EOF
23609 #define SLAPD_HDB_DYNAMIC 1
23610 EOF
23611
23612                 BUILD_HDB=mod
23613                 BUILD_HDB_DYNAMIC=shared
23614                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23615         else
23616                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23617         fi
23618 fi
23619
23620 if test "$ol_enable_ldap" != no ; then
23621         cat >> confdefs.h <<\EOF
23622 #define SLAPD_LDAP 1
23623 EOF
23624
23625         BUILD_SLAPD=yes
23626         BUILD_LDAP=yes
23627         if test "$ol_with_ldap_module" != static ; then
23628                 cat >> confdefs.h <<\EOF
23629 #define SLAPD_LDAP_DYNAMIC 1
23630 EOF
23631
23632                 BUILD_LDAP=mod
23633                 BUILD_LDAP_DYNAMIC=shared
23634                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23635         else
23636                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23637         fi
23638 fi
23639
23640 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23641         cat >> confdefs.h <<\EOF
23642 #define SLAPD_LDBM 1
23643 EOF
23644
23645         BUILD_SLAPD=yes
23646         BUILD_LDBM=yes
23647         if test "$ol_with_ldbm_module" != static ; then
23648                 cat >> confdefs.h <<\EOF
23649 #define SLAPD_LDBM_DYNAMIC 1
23650 EOF
23651
23652                 BUILD_LDBM=mod
23653                 BUILD_LDBM_DYNAMIC=shared
23654                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23655         else
23656                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23657         fi
23658 fi
23659
23660 if test "$ol_enable_meta" != no ; then
23661         if test "$ol_enable_ldap" = no ; then
23662                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23663         fi
23664         if test "$ol_enable_rewrite" = no ; then
23665                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23666         fi
23667         cat >> confdefs.h <<\EOF
23668 #define SLAPD_META 1
23669 EOF
23670
23671         BUILD_SLAPD=yes
23672         BUILD_META=yes
23673         BUILD_REWRITE=yes
23674         if test "$ol_with_meta_module" != static ; then
23675                 cat >> confdefs.h <<\EOF
23676 #define SLAPD_META_DYNAMIC 1
23677 EOF
23678
23679                 BUILD_META=mod
23680                 BUILD_META_DYNAMIC=shared
23681                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23682         else
23683                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23684         fi
23685 fi
23686
23687 if test "$ol_enable_monitor" != no ; then
23688         cat >> confdefs.h <<\EOF
23689 #define SLAPD_MONITOR 1
23690 EOF
23691
23692         BUILD_SLAPD=yes
23693         BUILD_MONITOR=yes
23694         if test "$ol_with_monitor_module" != static ; then
23695                 cat >> confdefs.h <<\EOF
23696 #define SLAPD_MONITOR_DYNAMIC 1
23697 EOF
23698
23699                 BUILD_MONITOR=mod
23700                 BUILD_MONITOR_DYNAMIC=shared
23701                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23702         else
23703                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23704         fi
23705 fi
23706
23707 if test "$ol_enable_null" != no ; then
23708         cat >> confdefs.h <<\EOF
23709 #define SLAPD_NULL 1
23710 EOF
23711
23712         BUILD_SLAPD=yes
23713         BUILD_NULL=yes
23714         if test "$ol_with_null_module" != static ; then
23715                 cat >> confdefs.h <<\EOF
23716 #define SLAPD_NULL_DYNAMIC 1
23717 EOF
23718
23719                 BUILD_NULL=mod
23720                 BUILD_NULL_DYNAMIC=shared
23721                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23722         else
23723                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23724         fi
23725 fi
23726
23727 if test "$ol_enable_passwd" != no ; then
23728         cat >> confdefs.h <<\EOF
23729 #define SLAPD_PASSWD 1
23730 EOF
23731
23732         BUILD_SLAPD=yes
23733         BUILD_PASSWD=yes
23734         if test "$ol_with_passwd_module" != static ; then
23735                 cat >> confdefs.h <<\EOF
23736 #define SLAPD_PASSWD_DYNAMIC 1
23737 EOF
23738
23739                 BUILD_PASSWD=mod
23740                 BUILD_PASSWD_DYNAMIC=shared
23741                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23742         else
23743                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23744         fi
23745 fi
23746
23747 if test "$ol_link_perl" != no ; then
23748         cat >> confdefs.h <<\EOF
23749 #define SLAPD_PERL 1
23750 EOF
23751
23752         BUILD_SLAPD=yes
23753         BUILD_PERL=yes
23754         if test "$ol_with_perl_module" != static ; then
23755                 cat >> confdefs.h <<\EOF
23756 #define SLAPD_PERL_DYNAMIC 1
23757 EOF
23758
23759                 BUILD_PERL=mod
23760                 BUILD_PERL_DYNAMIC=shared
23761                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23762         else
23763                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23764         fi
23765 fi
23766
23767 if test "$ol_enable_shell" != no ; then
23768         if test "$ol_link_thread" != no ; then
23769                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23770         fi
23771         cat >> confdefs.h <<\EOF
23772 #define SLAPD_SHELL 1
23773 EOF
23774
23775         BUILD_SLAPD=yes
23776         BUILD_SHELL=yes
23777         if test "$ol_with_shell_module" != static ; then
23778                 cat >> confdefs.h <<\EOF
23779 #define SLAPD_SHELL_DYNAMIC 1
23780 EOF
23781
23782                 BUILD_SHELL=mod
23783                 BUILD_SHELL_DYNAMIC=shared
23784                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23785         else
23786                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23787         fi
23788 fi
23789
23790 if test "$ol_link_sql" != no ; then
23791         cat >> confdefs.h <<\EOF
23792 #define SLAPD_SQL 1
23793 EOF
23794
23795         BUILD_SLAPD=yes
23796         BUILD_SQL=yes
23797         if test "$ol_with_sql_module" != static; then
23798                 cat >> confdefs.h <<\EOF
23799 #define SLAPD_SQL_DYNAMIC 1
23800 EOF
23801
23802                 BUILD_SQL=mod
23803                 BUILD_SQL_DYNAMIC=shared
23804                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23805         else
23806                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23807         fi
23808 fi
23809
23810 if test "$ol_with_dyngroup" != no ; then
23811         BUILD_DYNGROUP=$ol_with_dyngroup
23812         if test "$ol_with_dyngroup" = mod ; then
23813                 MFLAG=SLAPD_MOD_DYNAMIC
23814                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23815         else
23816                 MFLAG=SLAPD_MOD_STATIC
23817         fi
23818         cat >> confdefs.h <<EOF
23819 #define SLAPD_OVER_DYNGROUP $MFLAG
23820 EOF
23821
23822 fi
23823
23824 if test "$ol_with_proxycache" != no ; then
23825         BUILD_PROXYCACHE=$ol_with_proxycache
23826         if test "$ol_with_proxycache" = mod ; then
23827                 MFLAG=SLAPD_MOD_DYNAMIC
23828                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23829         else
23830                 MFLAG=SLAPD_MOD_STATIC
23831         fi
23832         cat >> confdefs.h <<EOF
23833 #define SLAPD_OVER_PROXYCACHE $MFLAG
23834 EOF
23835
23836 fi
23837
23838 if test "$ol_with_rwm " != no ; then
23839         BUILD_REWRITE=yes
23840         BUILD_RWM=$ol_with_rwm
23841         if test "$ol_with_rwm" = mod ; then
23842                 MFLAG=SLAPD_MOD_DYNAMIC
23843                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
23844         else
23845                 MFLAG=SLAPD_MOD_STATIC
23846         fi
23847         cat >> confdefs.h <<EOF
23848 #define SLAPD_OVER_RWM $MFLAG
23849 EOF
23850
23851 fi
23852
23853 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23854         $BUILD_SLAPD = yes ; then
23855         BUILD_SLURPD=yes
23856 fi
23857
23858 if test "$ol_enable_rewrite" != no ; then
23859         cat >> confdefs.h <<\EOF
23860 #define ENABLE_REWRITE 1
23861 EOF
23862
23863         BUILD_REWRITE=yes
23864 fi
23865
23866 if test "$ol_enable_slapi" != no ; then
23867         cat >> confdefs.h <<\EOF
23868 #define ENABLE_SLAPI 1
23869 EOF
23870
23871         BUILD_SLAPI=yes
23872         SLAPD_SLAPI_DEPEND=libslapi.a
23873 fi
23874
23875
23876
23877 if test "$ac_cv_mingw32" = yes ; then
23878         PLAT=NT
23879         SLAPD_MODULES_LDFLAGS=
23880 else
23881         PLAT=UNIX
23882 fi
23883
23884 if test -z "$SLAPD_STATIC_BACKENDS"; then
23885         SLAPD_NO_STATIC='#'
23886 else
23887         SLAPD_NO_STATIC=
23888 fi
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
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963 # Check whether --with-xxinstall or --without-xxinstall was given.
23964 if test "${with_xxinstall+set}" = set; then
23965   withval="$with_xxinstall"
23966   :
23967 fi
23968
23969
23970
23971 trap '' 1 2 15
23972
23973 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23974
23975 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23976 # Let make expand exec_prefix.
23977 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23978
23979 # Any assignment to VPATH causes Sun make to only execute
23980 # the first set of double-colon rules, so remove it if not needed.
23981 # If there is a colon in the path, we need to keep it.
23982 if test "x$srcdir" = x.; then
23983   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23984 fi
23985
23986 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23987
23988 DEFS=-DHAVE_CONFIG_H
23989
23990 # Without the "./", some shells look in PATH for config.status.
23991 : ${CONFIG_STATUS=./config.status}
23992
23993 echo creating $CONFIG_STATUS
23994 rm -f $CONFIG_STATUS
23995 cat > $CONFIG_STATUS <<EOF
23996 #! /bin/sh
23997 # Generated automatically by configure.
23998 # Run this file to recreate the current configuration.
23999 # This directory was configured as follows,
24000 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24001 #
24002 # $0 $ac_configure_args
24003 #
24004 # Compiler output produced by configure, useful for debugging
24005 # configure, is in ./config.log if it exists.
24006
24007 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24008 for ac_option
24009 do
24010   case "\$ac_option" in
24011   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24012     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24013     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24014   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24015     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24016     exit 0 ;;
24017   -help | --help | --hel | --he | --h)
24018     echo "\$ac_cs_usage"; exit 0 ;;
24019   *) echo "\$ac_cs_usage"; exit 1 ;;
24020   esac
24021 done
24022
24023 ac_given_srcdir=$srcdir
24024 ac_given_INSTALL="$INSTALL"
24025
24026 trap 'rm -fr `echo "\
24027 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24028 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24029 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24030 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24031 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24032 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24033 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24034 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24035 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24036 include/Makefile:build/top.mk:include/Makefile.in \
24037 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24038 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24039 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24040 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24041 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24042 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24043 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24044 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24045 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24046 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24047 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24048 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24049 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24050 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24051 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24052 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24053 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24054 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24055 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24056 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24057 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24058 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24059 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24060 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24061 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24062 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24063 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24064 tests/run \
24065 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24066  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24067 EOF
24068 cat >> $CONFIG_STATUS <<EOF
24069
24070 # Protect against being on the right side of a sed subst in config.status.
24071 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24072  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24073 $ac_vpsub
24074 $extrasub
24075 s%@SHELL@%$SHELL%g
24076 s%@CFLAGS@%$CFLAGS%g
24077 s%@CPPFLAGS@%$CPPFLAGS%g
24078 s%@CXXFLAGS@%$CXXFLAGS%g
24079 s%@FFLAGS@%$FFLAGS%g
24080 s%@DEFS@%$DEFS%g
24081 s%@LDFLAGS@%$LDFLAGS%g
24082 s%@LIBS@%$LIBS%g
24083 s%@exec_prefix@%$exec_prefix%g
24084 s%@prefix@%$prefix%g
24085 s%@program_transform_name@%$program_transform_name%g
24086 s%@bindir@%$bindir%g
24087 s%@sbindir@%$sbindir%g
24088 s%@libexecdir@%$libexecdir%g
24089 s%@datadir@%$datadir%g
24090 s%@sysconfdir@%$sysconfdir%g
24091 s%@sharedstatedir@%$sharedstatedir%g
24092 s%@localstatedir@%$localstatedir%g
24093 s%@libdir@%$libdir%g
24094 s%@includedir@%$includedir%g
24095 s%@oldincludedir@%$oldincludedir%g
24096 s%@infodir@%$infodir%g
24097 s%@mandir@%$mandir%g
24098 s%@host@%$host%g
24099 s%@host_alias@%$host_alias%g
24100 s%@host_cpu@%$host_cpu%g
24101 s%@host_vendor@%$host_vendor%g
24102 s%@host_os@%$host_os%g
24103 s%@target@%$target%g
24104 s%@target_alias@%$target_alias%g
24105 s%@target_cpu@%$target_cpu%g
24106 s%@target_vendor@%$target_vendor%g
24107 s%@target_os@%$target_os%g
24108 s%@build@%$build%g
24109 s%@build_alias@%$build_alias%g
24110 s%@build_cpu@%$build_cpu%g
24111 s%@build_vendor@%$build_vendor%g
24112 s%@build_os@%$build_os%g
24113 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24114 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24115 s%@INSTALL_DATA@%$INSTALL_DATA%g
24116 s%@PACKAGE@%$PACKAGE%g
24117 s%@VERSION@%$VERSION%g
24118 s%@ACLOCAL@%$ACLOCAL%g
24119 s%@AUTOCONF@%$AUTOCONF%g
24120 s%@AUTOMAKE@%$AUTOMAKE%g
24121 s%@AUTOHEADER@%$AUTOHEADER%g
24122 s%@MAKEINFO@%$MAKEINFO%g
24123 s%@install_sh@%$install_sh%g
24124 s%@AMTAR@%$AMTAR%g
24125 s%@AWK@%$AWK%g
24126 s%@AMTARFLAGS@%$AMTARFLAGS%g
24127 s%@SET_MAKE@%$SET_MAKE%g
24128 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24129 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24130 s%@top_builddir@%$top_builddir%g
24131 s%@ldap_subdir@%$ldap_subdir%g
24132 s%@CC@%$CC%g
24133 s%@AR@%$AR%g
24134 s%@LN_S@%$LN_S%g
24135 s%@OBJEXT@%$OBJEXT%g
24136 s%@EXEEXT@%$EXEEXT%g
24137 s%@ECHO@%$ECHO%g
24138 s%@RANLIB@%$RANLIB%g
24139 s%@STRIP@%$STRIP%g
24140 s%@DLLTOOL@%$DLLTOOL%g
24141 s%@AS@%$AS%g
24142 s%@OBJDUMP@%$OBJDUMP%g
24143 s%@CPP@%$CPP%g
24144 s%@LIBTOOL@%$LIBTOOL%g
24145 s%@LN_H@%$LN_H%g
24146 s%@PERLBIN@%$PERLBIN%g
24147 s%@OL_MKDEP@%$OL_MKDEP%g
24148 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24149 s%@LTSTATIC@%$LTSTATIC%g
24150 s%@LIBOBJS@%$LIBOBJS%g
24151 s%@LIBSRCS@%$LIBSRCS%g
24152 s%@PLAT@%$PLAT%g
24153 s%@WITH_TLS@%$WITH_TLS%g
24154 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24155 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24156 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24157 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24158 s%@BUILD_BDB@%$BUILD_BDB%g
24159 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24160 s%@BUILD_HDB@%$BUILD_HDB%g
24161 s%@BUILD_LDAP@%$BUILD_LDAP%g
24162 s%@BUILD_LDBM@%$BUILD_LDBM%g
24163 s%@BUILD_META@%$BUILD_META%g
24164 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24165 s%@BUILD_NULL@%$BUILD_NULL%g
24166 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24167 s%@BUILD_PERL@%$BUILD_PERL%g
24168 s%@BUILD_SHELL@%$BUILD_SHELL%g
24169 s%@BUILD_SQL@%$BUILD_SQL%g
24170 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24171 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24172 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24173 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24174 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24175 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24176 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24177 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24178 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24179 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24180 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24181 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24182 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24183 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24184 s%@BUILD_RWM@%$BUILD_RWM%g
24185 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24186 s%@LDAP_LIBS@%$LDAP_LIBS%g
24187 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24188 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24189 s%@LDBM_LIBS@%$LDBM_LIBS%g
24190 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24191 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24192 s%@WRAP_LIBS@%$WRAP_LIBS%g
24193 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24194 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24195 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24196 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24197 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24198 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24199 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24200 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24201 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24202 s%@KRB4_LIBS@%$KRB4_LIBS%g
24203 s%@KRB5_LIBS@%$KRB5_LIBS%g
24204 s%@SASL_LIBS@%$SASL_LIBS%g
24205 s%@TLS_LIBS@%$TLS_LIBS%g
24206 s%@MODULES_LIBS@%$MODULES_LIBS%g
24207 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24208 s%@LIBSLAPI@%$LIBSLAPI%g
24209 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24210 s%@AUTH_LIBS@%$AUTH_LIBS%g
24211 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24212 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24213 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24214 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24215
24216 CEOF
24217 EOF
24218
24219 cat >> $CONFIG_STATUS <<\EOF
24220
24221 # Split the substitutions into bite-sized pieces for seds with
24222 # small command number limits, like on Digital OSF/1 and HP-UX.
24223 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24224 ac_file=1 # Number of current file.
24225 ac_beg=1 # First line for current file.
24226 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24227 ac_more_lines=:
24228 ac_sed_cmds=""
24229 while $ac_more_lines; do
24230   if test $ac_beg -gt 1; then
24231     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24232   else
24233     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24234   fi
24235   if test ! -s conftest.s$ac_file; then
24236     ac_more_lines=false
24237     rm -f conftest.s$ac_file
24238   else
24239     if test -z "$ac_sed_cmds"; then
24240       ac_sed_cmds="sed -f conftest.s$ac_file"
24241     else
24242       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24243     fi
24244     ac_file=`expr $ac_file + 1`
24245     ac_beg=$ac_end
24246     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24247   fi
24248 done
24249 if test -z "$ac_sed_cmds"; then
24250   ac_sed_cmds=cat
24251 fi
24252 EOF
24253
24254 cat >> $CONFIG_STATUS <<EOF
24255
24256 CONFIG_FILES=\${CONFIG_FILES-"\
24257 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24258 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24259 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24260 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24261 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24262 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24263 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24264 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24265 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24266 include/Makefile:build/top.mk:include/Makefile.in \
24267 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24268 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24269 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24270 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24271 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24272 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24273 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24274 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24275 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24276 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24277 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24278 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24279 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24280 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24281 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24282 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24283 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24284 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24285 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24286 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24287 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24288 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24289 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24290 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24291 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24292 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24293 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24294 tests/run \
24295 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24296 "}
24297 EOF
24298 cat >> $CONFIG_STATUS <<\EOF
24299 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24300   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24301   case "$ac_file" in
24302   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24303        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24304   *) ac_file_in="${ac_file}.in" ;;
24305   esac
24306
24307   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24308
24309   # Remove last slash and all that follows it.  Not all systems have dirname.
24310   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24311   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24312     # The file is in a subdirectory.
24313     test ! -d "$ac_dir" && mkdir "$ac_dir"
24314     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24315     # A "../" for each directory in $ac_dir_suffix.
24316     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24317   else
24318     ac_dir_suffix= ac_dots=
24319   fi
24320
24321   case "$ac_given_srcdir" in
24322   .)  srcdir=.
24323       if test -z "$ac_dots"; then top_srcdir=.
24324       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24325   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24326   *) # Relative path.
24327     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24328     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24329   esac
24330
24331   case "$ac_given_INSTALL" in
24332   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24333   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24334   esac
24335
24336   echo creating "$ac_file"
24337   rm -f "$ac_file"
24338   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24339   case "$ac_file" in
24340   *[Mm]akefile*) ac_comsub="1i\\
24341 # $configure_input" ;;
24342   *) ac_comsub= ;;
24343   esac
24344
24345   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24346   sed -e "$ac_comsub
24347 s%@configure_input@%$configure_input%g
24348 s%@srcdir@%$srcdir%g
24349 s%@top_srcdir@%$top_srcdir%g
24350 s%@INSTALL@%$INSTALL%g
24351 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24352 fi; done
24353 rm -f conftest.s*
24354
24355 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24356 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24357 #
24358 # ac_d sets the value in "#define NAME VALUE" lines.
24359 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24360 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24361 ac_dC='\3'
24362 ac_dD='%g'
24363 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24364 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24365 ac_uB='\([      ]\)%\1#\2define\3'
24366 ac_uC=' '
24367 ac_uD='\4%g'
24368 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24369 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24370 ac_eB='$%\1#\2define\3'
24371 ac_eC=' '
24372 ac_eD='%g'
24373
24374 if test "${CONFIG_HEADERS+set}" != set; then
24375 EOF
24376 cat >> $CONFIG_STATUS <<EOF
24377   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24378 EOF
24379 cat >> $CONFIG_STATUS <<\EOF
24380 fi
24381 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24382   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24383   case "$ac_file" in
24384   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24385        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24386   *) ac_file_in="${ac_file}.in" ;;
24387   esac
24388
24389   echo creating $ac_file
24390
24391   rm -f conftest.frag conftest.in conftest.out
24392   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24393   cat $ac_file_inputs > conftest.in
24394
24395 EOF
24396
24397 # Transform confdefs.h into a sed script conftest.vals that substitutes
24398 # the proper values into config.h.in to produce config.h.  And first:
24399 # Protect against being on the right side of a sed subst in config.status.
24400 # Protect against being in an unquoted here document in config.status.
24401 rm -f conftest.vals
24402 cat > conftest.hdr <<\EOF
24403 s/[\\&%]/\\&/g
24404 s%[\\$`]%\\&%g
24405 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24406 s%ac_d%ac_u%gp
24407 s%ac_u%ac_e%gp
24408 EOF
24409 sed -n -f conftest.hdr confdefs.h > conftest.vals
24410 rm -f conftest.hdr
24411
24412 # This sed command replaces #undef with comments.  This is necessary, for
24413 # example, in the case of _POSIX_SOURCE, which is predefined and required
24414 # on some systems where configure will not decide to define it.
24415 cat >> conftest.vals <<\EOF
24416 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24417 EOF
24418
24419 # Break up conftest.vals because some shells have a limit on
24420 # the size of here documents, and old seds have small limits too.
24421
24422 rm -f conftest.tail
24423 while :
24424 do
24425   ac_lines=`grep -c . conftest.vals`
24426   # grep -c gives empty output for an empty file on some AIX systems.
24427   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24428   # Write a limited-size here document to conftest.frag.
24429   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24430   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24431   echo 'CEOF
24432   sed -f conftest.frag conftest.in > conftest.out
24433   rm -f conftest.in
24434   mv conftest.out conftest.in
24435 ' >> $CONFIG_STATUS
24436   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24437   rm -f conftest.vals
24438   mv conftest.tail conftest.vals
24439 done
24440 rm -f conftest.vals
24441
24442 cat >> $CONFIG_STATUS <<\EOF
24443   rm -f conftest.frag conftest.h
24444   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24445   cat conftest.in >> conftest.h
24446   rm -f conftest.in
24447   if cmp -s $ac_file conftest.h 2>/dev/null; then
24448     echo "$ac_file is unchanged"
24449     rm -f conftest.h
24450   else
24451     # Remove last slash and all that follows it.  Not all systems have dirname.
24452       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24453       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24454       # The file is in a subdirectory.
24455       test ! -d "$ac_dir" && mkdir "$ac_dir"
24456     fi
24457     rm -f $ac_file
24458     mv conftest.h $ac_file
24459   fi
24460 fi; done
24461
24462 EOF
24463 cat >> $CONFIG_STATUS <<EOF
24464
24465 EOF
24466 cat >> $CONFIG_STATUS <<\EOF
24467
24468 chmod +x tests/run
24469 date > stamp-h
24470 echo Please run \"make depend\" to build dependencies
24471
24472 exit 0
24473 EOF
24474 chmod +x $CONFIG_STATUS
24475 rm -fr confdefs* $ac_clean_files
24476 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24477