]> git.sur5r.net Git - openldap/blob - configure
10ef30cdb0ebf0b3723f89bb5614482f4df93765
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.501 2003/12/06 20:37:46 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2003 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-2003 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
147 SLURPD (Replication Daemon) Options:"
148 ac_help="$ac_help
149   --enable-slurpd         enable building slurpd [auto]"
150 ac_help="$ac_help
151
152 Library Generation & Linking Options"
153 ac_help="$ac_help
154   --enable-static[=PKGS]  build static libraries [default=yes]"
155 ac_help="$ac_help
156   --enable-shared[=PKGS]  build shared libraries [default=yes]"
157 ac_help="$ac_help
158   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
159 ac_help="$ac_help
160   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
161
162 # Find the correct PATH separator.  Usually this is `:', but
163 # DJGPP uses `;' like DOS.
164 if test "X${PATH_SEPARATOR+set}" != Xset; then
165   UNAME=${UNAME-`uname 2>/dev/null`}
166   case X$UNAME in
167     *-DOS) lt_cv_sys_path_separator=';' ;;
168     *)     lt_cv_sys_path_separator=':' ;;
169   esac
170   PATH_SEPARATOR=$lt_cv_sys_path_separator
171 fi
172
173
174 # Check that we are running under the correct shell.
175 SHELL=${CONFIG_SHELL-/bin/sh}
176
177 case X$ECHO in
178 X*--fallback-echo)
179   # Remove one level of quotation (which was required for Make).
180   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
181   ;;
182 esac
183
184 echo=${ECHO-echo}
185 if test "X$1" = X--no-reexec; then
186   # Discard the --no-reexec flag, and continue.
187   shift
188 elif test "X$1" = X--fallback-echo; then
189   # Avoid inline document here, it may be left over
190   :
191 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
192   # Yippee, $echo works!
193   :
194 else
195   # Restart under the correct shell.
196   exec $SHELL "$0" --no-reexec ${1+"$@"}
197 fi
198
199 if test "X$1" = X--fallback-echo; then
200   # used as fallback echo
201   shift
202   cat <<EOF
203
204 EOF
205   exit 0
206 fi
207
208 # The HP-UX ksh and POSIX shell print the target directory to stdout
209 # if CDPATH is set.
210 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
211
212 if test -z "$ECHO"; then
213 if test "X${echo_test_string+set}" != Xset; then
214 # find a string as large as possible, as long as the shell can cope with it
215   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
216     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
217     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
218        echo_test_string="`eval $cmd`" &&
219        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
220     then
221       break
222     fi
223   done
224 fi
225
226 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
227    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
228    test "X$echo_testing_string" = "X$echo_test_string"; then
229   :
230 else
231   # The Solaris, AIX, and Digital Unix default echo programs unquote
232   # backslashes.  This makes it impossible to quote backslashes using
233   #   echo "$something" | sed 's/\\/\\\\/g'
234   #
235   # So, first we look for a working echo in the user's PATH.
236
237   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
238   for dir in $PATH /usr/ucb; do
239     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
240        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
241        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
242        test "X$echo_testing_string" = "X$echo_test_string"; then
243       echo="$dir/echo"
244       break
245     fi
246   done
247   IFS="$save_ifs"
248
249   if test "X$echo" = Xecho; then
250     # We didn't find a better echo, so look for alternatives.
251     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
252        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
253        test "X$echo_testing_string" = "X$echo_test_string"; then
254       # This shell has a builtin print -r that does the trick.
255       echo='print -r'
256     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
257          test "X$CONFIG_SHELL" != X/bin/ksh; then
258       # If we have ksh, try running configure again with it.
259       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
260       export ORIGINAL_CONFIG_SHELL
261       CONFIG_SHELL=/bin/ksh
262       export CONFIG_SHELL
263       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
264     else
265       # Try using printf.
266       echo='printf %s\n'
267       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
268          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
269          test "X$echo_testing_string" = "X$echo_test_string"; then
270         # Cool, printf works
271         :
272       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
273            test "X$echo_testing_string" = 'X\t' &&
274            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
275            test "X$echo_testing_string" = "X$echo_test_string"; then
276         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
277         export CONFIG_SHELL
278         SHELL="$CONFIG_SHELL"
279         export SHELL
280         echo="$CONFIG_SHELL $0 --fallback-echo"
281       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
282            test "X$echo_testing_string" = 'X\t' &&
283            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
284            test "X$echo_testing_string" = "X$echo_test_string"; then
285         echo="$CONFIG_SHELL $0 --fallback-echo"
286       else
287         # maybe with a smaller string...
288         prev=:
289
290         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
291           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
292           then
293             break
294           fi
295           prev="$cmd"
296         done
297
298         if test "$prev" != 'sed 50q "$0"'; then
299           echo_test_string=`eval $prev`
300           export echo_test_string
301           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
302         else
303           # Oops.  We lost completely, so just stick with echo.
304           echo=echo
305         fi
306       fi
307     fi
308   fi
309 fi
310 fi
311
312 # Copy echo and quote the copy suitably for passing to libtool from
313 # the Makefile, instead of quoting the original, which is used later.
314 ECHO=$echo
315 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
316    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
317 fi
318
319
320 ac_help="$ac_help
321   --disable-libtool-lock  avoid locking (might break parallel builds)"
322 ac_help="$ac_help
323   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
324 ac_help="$ac_help
325
326 See INSTALL file for further details."
327
328 # Initialize some variables set by options.
329 # The variables have the same names as the options, with
330 # dashes changed to underlines.
331 build=NONE
332 cache_file=./config.cache
333 exec_prefix=NONE
334 host=NONE
335 no_create=
336 nonopt=NONE
337 no_recursion=
338 prefix=NONE
339 program_prefix=NONE
340 program_suffix=NONE
341 program_transform_name=s,x,x,
342 silent=
343 site=
344 srcdir=
345 target=NONE
346 verbose=
347 x_includes=NONE
348 x_libraries=NONE
349 bindir='${exec_prefix}/bin'
350 sbindir='${exec_prefix}/sbin'
351 libexecdir='${exec_prefix}/libexec'
352 datadir='${prefix}/share'
353 sysconfdir='${prefix}/etc'
354 sharedstatedir='${prefix}/com'
355 localstatedir='${prefix}/var'
356 libdir='${exec_prefix}/lib'
357 includedir='${prefix}/include'
358 oldincludedir='/usr/include'
359 infodir='${prefix}/info'
360 mandir='${prefix}/man'
361
362 # Initialize some other variables.
363 subdirs=
364 MFLAGS= MAKEFLAGS=
365 SHELL=${CONFIG_SHELL-/bin/sh}
366 # Maximum number of lines to put in a shell here document.
367 ac_max_here_lines=12
368
369 ac_prev=
370 for ac_option
371 do
372
373   # If the previous option needs an argument, assign it.
374   if test -n "$ac_prev"; then
375     eval "$ac_prev=\$ac_option"
376     ac_prev=
377     continue
378   fi
379
380   case "$ac_option" in
381   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
382   *) ac_optarg= ;;
383   esac
384
385   # Accept the important Cygnus configure options, so we can diagnose typos.
386
387   case "$ac_option" in
388
389   -bindir | --bindir | --bindi | --bind | --bin | --bi)
390     ac_prev=bindir ;;
391   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
392     bindir="$ac_optarg" ;;
393
394   -build | --build | --buil | --bui | --bu)
395     ac_prev=build ;;
396   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
397     build="$ac_optarg" ;;
398
399   -cache-file | --cache-file | --cache-fil | --cache-fi \
400   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
401     ac_prev=cache_file ;;
402   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
403   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
404     cache_file="$ac_optarg" ;;
405
406   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
407     ac_prev=datadir ;;
408   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
409   | --da=*)
410     datadir="$ac_optarg" ;;
411
412   -disable-* | --disable-*)
413     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
414     # Reject names that are not valid shell variable names.
415     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
416       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
417     fi
418     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
419     eval "enable_${ac_feature}=no" ;;
420
421   -enable-* | --enable-*)
422     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
423     # Reject names that are not valid shell variable names.
424     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
425       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
426     fi
427     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
428     case "$ac_option" in
429       *=*) ;;
430       *) ac_optarg=yes ;;
431     esac
432     eval "enable_${ac_feature}='$ac_optarg'" ;;
433
434   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
435   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
436   | --exec | --exe | --ex)
437     ac_prev=exec_prefix ;;
438   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
439   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
440   | --exec=* | --exe=* | --ex=*)
441     exec_prefix="$ac_optarg" ;;
442
443   -gas | --gas | --ga | --g)
444     # Obsolete; use --with-gas.
445     with_gas=yes ;;
446
447   -help | --help | --hel | --he)
448     # Omit some internal or obsolete options to make the list less imposing.
449     # This message is too long to be a string in the A/UX 3.1 sh.
450     cat << EOF
451 Usage: configure [options] [host]
452 Options: [defaults in brackets after descriptions]
453 Configuration:
454   --cache-file=FILE       cache test results in FILE
455   --help                  print this message
456   --no-create             do not create output files
457   --quiet, --silent       do not print \`checking...' messages
458   --version               print the version of autoconf that created configure
459 Directory and file names:
460   --prefix=PREFIX         install architecture-independent files in PREFIX
461                           [$ac_default_prefix]
462   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
463                           [same as prefix]
464   --bindir=DIR            user executables in DIR [EPREFIX/bin]
465   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
466   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
467   --datadir=DIR           read-only architecture-independent data in DIR
468                           [PREFIX/share]
469   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
470   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
471                           [PREFIX/com]
472   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
473   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
474   --includedir=DIR        C header files in DIR [PREFIX/include]
475   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
476   --infodir=DIR           info documentation in DIR [PREFIX/info]
477   --mandir=DIR            man documentation in DIR [PREFIX/man]
478   --srcdir=DIR            find the sources in DIR [configure dir or ..]
479   --program-prefix=PREFIX prepend PREFIX to installed program names
480   --program-suffix=SUFFIX append SUFFIX to installed program names
481   --program-transform-name=PROGRAM
482                           run sed PROGRAM on installed program names
483 EOF
484     cat << EOF
485 Host type:
486   --build=BUILD           configure for building on BUILD [BUILD=HOST]
487   --host=HOST             configure for HOST [guessed]
488   --target=TARGET         configure for TARGET [TARGET=HOST]
489 Features and packages:
490   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
491   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
492   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
493   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
494   --x-includes=DIR        X include files are in DIR
495   --x-libraries=DIR       X library files are in DIR
496 EOF
497     if test -n "$ac_help"; then
498       echo "--enable and --with options recognized:$ac_help"
499     fi
500     exit 0 ;;
501
502   -host | --host | --hos | --ho)
503     ac_prev=host ;;
504   -host=* | --host=* | --hos=* | --ho=*)
505     host="$ac_optarg" ;;
506
507   -includedir | --includedir | --includedi | --included | --include \
508   | --includ | --inclu | --incl | --inc)
509     ac_prev=includedir ;;
510   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
511   | --includ=* | --inclu=* | --incl=* | --inc=*)
512     includedir="$ac_optarg" ;;
513
514   -infodir | --infodir | --infodi | --infod | --info | --inf)
515     ac_prev=infodir ;;
516   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
517     infodir="$ac_optarg" ;;
518
519   -libdir | --libdir | --libdi | --libd)
520     ac_prev=libdir ;;
521   -libdir=* | --libdir=* | --libdi=* | --libd=*)
522     libdir="$ac_optarg" ;;
523
524   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
525   | --libexe | --libex | --libe)
526     ac_prev=libexecdir ;;
527   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
528   | --libexe=* | --libex=* | --libe=*)
529     libexecdir="$ac_optarg" ;;
530
531   -localstatedir | --localstatedir | --localstatedi | --localstated \
532   | --localstate | --localstat | --localsta | --localst \
533   | --locals | --local | --loca | --loc | --lo)
534     ac_prev=localstatedir ;;
535   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
536   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
537   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
538     localstatedir="$ac_optarg" ;;
539
540   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
541     ac_prev=mandir ;;
542   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
543     mandir="$ac_optarg" ;;
544
545   -nfp | --nfp | --nf)
546     # Obsolete; use --without-fp.
547     with_fp=no ;;
548
549   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
550   | --no-cr | --no-c)
551     no_create=yes ;;
552
553   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
554   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
555     no_recursion=yes ;;
556
557   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
558   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
559   | --oldin | --oldi | --old | --ol | --o)
560     ac_prev=oldincludedir ;;
561   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
562   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
563   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
564     oldincludedir="$ac_optarg" ;;
565
566   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
567     ac_prev=prefix ;;
568   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
569     prefix="$ac_optarg" ;;
570
571   -program-prefix | --program-prefix | --program-prefi | --program-pref \
572   | --program-pre | --program-pr | --program-p)
573     ac_prev=program_prefix ;;
574   -program-prefix=* | --program-prefix=* | --program-prefi=* \
575   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
576     program_prefix="$ac_optarg" ;;
577
578   -program-suffix | --program-suffix | --program-suffi | --program-suff \
579   | --program-suf | --program-su | --program-s)
580     ac_prev=program_suffix ;;
581   -program-suffix=* | --program-suffix=* | --program-suffi=* \
582   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
583     program_suffix="$ac_optarg" ;;
584
585   -program-transform-name | --program-transform-name \
586   | --program-transform-nam | --program-transform-na \
587   | --program-transform-n | --program-transform- \
588   | --program-transform | --program-transfor \
589   | --program-transfo | --program-transf \
590   | --program-trans | --program-tran \
591   | --progr-tra | --program-tr | --program-t)
592     ac_prev=program_transform_name ;;
593   -program-transform-name=* | --program-transform-name=* \
594   | --program-transform-nam=* | --program-transform-na=* \
595   | --program-transform-n=* | --program-transform-=* \
596   | --program-transform=* | --program-transfor=* \
597   | --program-transfo=* | --program-transf=* \
598   | --program-trans=* | --program-tran=* \
599   | --progr-tra=* | --program-tr=* | --program-t=*)
600     program_transform_name="$ac_optarg" ;;
601
602   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
603   | -silent | --silent | --silen | --sile | --sil)
604     silent=yes ;;
605
606   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
607     ac_prev=sbindir ;;
608   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
609   | --sbi=* | --sb=*)
610     sbindir="$ac_optarg" ;;
611
612   -sharedstatedir | --sharedstatedir | --sharedstatedi \
613   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
614   | --sharedst | --shareds | --shared | --share | --shar \
615   | --sha | --sh)
616     ac_prev=sharedstatedir ;;
617   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
618   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
619   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
620   | --sha=* | --sh=*)
621     sharedstatedir="$ac_optarg" ;;
622
623   -site | --site | --sit)
624     ac_prev=site ;;
625   -site=* | --site=* | --sit=*)
626     site="$ac_optarg" ;;
627
628   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
629     ac_prev=srcdir ;;
630   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
631     srcdir="$ac_optarg" ;;
632
633   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
634   | --syscon | --sysco | --sysc | --sys | --sy)
635     ac_prev=sysconfdir ;;
636   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
637   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
638     sysconfdir="$ac_optarg" ;;
639
640   -target | --target | --targe | --targ | --tar | --ta | --t)
641     ac_prev=target ;;
642   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
643     target="$ac_optarg" ;;
644
645   -v | -verbose | --verbose | --verbos | --verbo | --verb)
646     verbose=yes ;;
647
648   -version | --version | --versio | --versi | --vers)
649     echo "configure generated by autoconf version 2.13.1"
650     exit 0 ;;
651
652   -with-* | --with-*)
653     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
654     # Reject names that are not valid shell variable names.
655     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
656       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
657     fi
658     ac_package=`echo $ac_package| sed 's/-/_/g'`
659     case "$ac_option" in
660       *=*) ;;
661       *) ac_optarg=yes ;;
662     esac
663     eval "with_${ac_package}='$ac_optarg'" ;;
664
665   -without-* | --without-*)
666     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
667     # Reject names that are not valid shell variable names.
668     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
669       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
670     fi
671     ac_package=`echo $ac_package| sed 's/-/_/g'`
672     eval "with_${ac_package}=no" ;;
673
674   --x)
675     # Obsolete; use --with-x.
676     with_x=yes ;;
677
678   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
679   | --x-incl | --x-inc | --x-in | --x-i)
680     ac_prev=x_includes ;;
681   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
682   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
683     x_includes="$ac_optarg" ;;
684
685   -x-libraries | --x-libraries | --x-librarie | --x-librari \
686   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
687     ac_prev=x_libraries ;;
688   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
689   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
690     x_libraries="$ac_optarg" ;;
691
692   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
693     ;;
694
695   *)
696     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
697       echo "configure: warning: $ac_option: invalid host type" 1>&2
698     fi
699     if test "x$nonopt" != xNONE; then
700       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
701     fi
702     nonopt="$ac_option"
703     ;;
704
705   esac
706 done
707
708 if test -n "$ac_prev"; then
709   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
710 fi
711
712 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
713
714 # File descriptor usage:
715 # 0 standard input
716 # 1 file creation
717 # 2 errors and warnings
718 # 3 some systems may open it to /dev/tty
719 # 4 used on the Kubota Titan
720 # 6 checking for... messages and results
721 # 5 compiler messages saved in config.log
722 if test "$silent" = yes; then
723   exec 6>/dev/null
724 else
725   exec 6>&1
726 fi
727 exec 5>./config.log
728
729 echo "\
730 This file contains any messages produced by compilers while
731 running configure, to aid debugging if configure makes a mistake.
732 " 1>&5
733
734 # Strip out --no-create and --no-recursion so they do not pile up.
735 # Also quote any args containing shell metacharacters.
736 ac_configure_args=
737 for ac_arg
738 do
739   case "$ac_arg" in
740   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
741   | --no-cr | --no-c) ;;
742   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
743   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
744   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
745   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
746   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
747   esac
748 done
749
750 # NLS nuisances.
751 # Only set these to C if already set.  These must not be set unconditionally
752 # because not all systems understand e.g. LANG=C (notably SCO).
753 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
754 # Non-C LC_CTYPE values break the ctype check.
755 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
756 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
757 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
758 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
759
760 # confdefs.h avoids OS command line length limits that DEFS can exceed.
761 rm -rf conftest* confdefs.h
762 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
763 echo > confdefs.h
764
765 # A filename unique to this package, relative to the directory that
766 # configure is in, which we can look for to find out if srcdir is correct.
767 ac_unique_file=build/version.sh
768
769 # Find the source files, if location was not specified.
770 if test -z "$srcdir"; then
771   ac_srcdir_defaulted=yes
772   # Try the directory containing this script, then its parent.
773   ac_prog=$0
774   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
775   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
776   srcdir=$ac_confdir
777   if test ! -r $srcdir/$ac_unique_file; then
778     srcdir=..
779   fi
780 else
781   ac_srcdir_defaulted=no
782 fi
783 if test ! -r $srcdir/$ac_unique_file; then
784   if test "$ac_srcdir_defaulted" = yes; then
785     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
786   else
787     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
788   fi
789 fi
790 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
791
792 # Prefer explicitly selected file to automatically selected ones.
793 if test -z "$CONFIG_SITE"; then
794   if test "x$prefix" != xNONE; then
795     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
796   else
797     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
798   fi
799 fi
800 for ac_site_file in $CONFIG_SITE; do
801   if test -r "$ac_site_file"; then
802     echo "loading site script $ac_site_file"
803     . "$ac_site_file"
804   fi
805 done
806
807
808 ac_ext=c
809 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
810 ac_cpp='$CPP $CPPFLAGS'
811 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
812 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
813 cross_compiling=$ac_cv_prog_cc_cross
814
815 ac_exeext=
816 ac_objext=o
817 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
818   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
819   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
820     ac_n= ac_c='
821 ' ac_t='        '
822   else
823     ac_n=-n ac_c= ac_t=
824   fi
825 else
826   ac_n= ac_c='\c' ac_t=
827 fi
828
829
830 # set unset (borrowed from autoconf 2.49c)
831 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
832   ol_unset=unset
833 else
834   ol_unset=false
835 fi
836 # unset CDPATH
837 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
838
839 ac_aux_dir=
840 for ac_dir in build $srcdir/build; do
841   if test -f $ac_dir/install-sh; then
842     ac_aux_dir=$ac_dir
843     ac_install_sh="$ac_aux_dir/install-sh -c"
844     break
845   elif test -f $ac_dir/install.sh; then
846     ac_aux_dir=$ac_dir
847     ac_install_sh="$ac_aux_dir/install.sh -c"
848     break
849   elif test -f $ac_dir/shtool; then
850     ac_aux_dir=$ac_dir
851     ac_install_sh="$ac_aux_dir/shtool install -c"
852     break
853   fi
854 done
855 if test -z "$ac_aux_dir"; then
856   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
857 fi
858 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
859 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
860 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
861
862 eval `$ac_aux_dir/version.sh`
863 if test -z "$OL_STRING"; then
864         { echo "configure: error: could not determine version" 1>&2; exit 1; }
865 fi
866
867 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
868         ac_cv_shtool="$ac_aux_dir/shtool"
869 else
870         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
871 fi
872
873 SHTOOL="$ac_cv_shtool"
874
875 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
876 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
877
878 OPENLDAP_CVS=""
879 if test -d $ac_aux_dir/CVS; then
880         OPENLDAP_CVS="(from CVS sources) "
881 fi
882
883 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
884
885
886 echo $ac_n "checking host system type""... $ac_c" 1>&6
887 echo "configure:888: checking host system type" >&5
888 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
889
890 # Make sure we can run config.sub.
891   if $ac_config_sub sun4 >/dev/null 2>&1; then :
892     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
893   fi
894
895   ac_cv_host_alias=$host
896   case "$ac_cv_host_alias" in
897   NONE)
898     case $nonopt in
899     NONE)
900       if ac_cv_host_alias=`$ac_config_guess`; then :
901       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
902       fi ;;
903     *) ac_cv_host_alias=$nonopt ;;
904     esac ;;
905   esac
906
907   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
908   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
909   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
910   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
911 else
912   echo $ac_n "(cached) $ac_c" 1>&6
913 fi
914
915 echo "$ac_t""$ac_cv_host" 1>&6
916
917 host=$ac_cv_host
918 host_alias=$ac_cv_host_alias
919 host_cpu=$ac_cv_host_cpu
920 host_vendor=$ac_cv_host_vendor
921 host_os=$ac_cv_host_os
922
923
924
925
926
927 echo $ac_n "checking target system type""... $ac_c" 1>&6
928 echo "configure:929: checking target system type" >&5
929 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
930
931 # Make sure we can run config.sub.
932   if $ac_config_sub sun4 >/dev/null 2>&1; then :
933     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
934   fi
935
936   ac_cv_target_alias=$target
937   case "$ac_cv_target_alias" in
938   NONE)
939     case $nonopt in
940     NONE)
941       ac_cv_target_alias=$host_alias ;;
942
943     *) ac_cv_target_alias=$nonopt ;;
944     esac ;;
945   esac
946
947   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
948   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
949   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
950   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
951 else
952   echo $ac_n "(cached) $ac_c" 1>&6
953 fi
954
955 echo "$ac_t""$ac_cv_target" 1>&6
956
957 target=$ac_cv_target
958 target_alias=$ac_cv_target_alias
959 target_cpu=$ac_cv_target_cpu
960 target_vendor=$ac_cv_target_vendor
961 target_os=$ac_cv_target_os
962
963
964
965
966
967 echo $ac_n "checking build system type""... $ac_c" 1>&6
968 echo "configure:969: checking build system type" >&5
969 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
970
971 # Make sure we can run config.sub.
972   if $ac_config_sub sun4 >/dev/null 2>&1; then :
973     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
974   fi
975
976   ac_cv_build_alias=$build
977   case "$ac_cv_build_alias" in
978   NONE)
979     case $nonopt in
980     NONE)
981       ac_cv_build_alias=$host_alias ;;
982
983     *) ac_cv_build_alias=$nonopt ;;
984     esac ;;
985   esac
986
987   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
988   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
989   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
990   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
991 else
992   echo $ac_n "(cached) $ac_c" 1>&6
993 fi
994
995 echo "$ac_t""$ac_cv_build" 1>&6
996
997 build=$ac_cv_build
998 build_alias=$ac_cv_build_alias
999 build_cpu=$ac_cv_build_cpu
1000 build_vendor=$ac_cv_build_vendor
1001 build_os=$ac_cv_build_os
1002
1003
1004
1005
1006
1007 # Do some error checking and defaulting for the host and target type.
1008 # The inputs are:
1009 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1010 #
1011 # The rules are:
1012 # 1. You are not allowed to specify --host, --target, and nonopt at the
1013 #    same time.
1014 # 2. Host defaults to nonopt.
1015 # 3. If nonopt is not specified, then host defaults to the current host,
1016 #    as determined by config.guess.
1017 # 4. Target and build default to nonopt.
1018 # 5. If nonopt is not specified, then target and build default to host.
1019
1020 # The aliases save the names the user supplied, while $host etc.
1021 # will get canonicalized.
1022 case $host---$target---$nonopt in
1023 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1024 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1025 esac
1026
1027 test "$host_alias" != "$target_alias" &&
1028   test "$program_prefix$program_suffix$program_transform_name" = \
1029     NONENONEs,x,x, &&
1030   program_prefix=${target_alias}-
1031
1032
1033 # Find a good install program.  We prefer a C program (faster),
1034 # so one script is as good as another.  But avoid the broken or
1035 # incompatible versions:
1036 # SysV /etc/install, /usr/sbin/install
1037 # SunOS /usr/etc/install
1038 # IRIX /sbin/install
1039 # AIX /bin/install
1040 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1041 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1042 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1043 # ./install, which can be erroneously created by make from ./install.sh.
1044 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1045 echo "configure:1046: checking for a BSD compatible install" >&5
1046 if test -z "$INSTALL"; then
1047 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1048   echo $ac_n "(cached) $ac_c" 1>&6
1049 else
1050     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1051   for ac_dir in $PATH; do
1052     # Account for people who put trailing slashes in PATH elements.
1053     case "$ac_dir/" in
1054     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1055     *)
1056       # OSF1 and SCO ODT 3.0 have their own names for install.
1057       # Don't use installbsd from OSF since it installs stuff as root
1058       # by default.
1059       for ac_prog in ginstall scoinst install; do
1060         if test -f $ac_dir/$ac_prog; then
1061           if test $ac_prog = install &&
1062             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1063             # AIX install.  It has an incompatible calling convention.
1064             :
1065           elif test $ac_prog = install &&
1066             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1067             # program-specific install script used by HP pwplus--don't use.
1068             :
1069           else
1070             ac_cv_path_install="$ac_dir/$ac_prog -c"
1071             break 2
1072           fi
1073         fi
1074       done
1075       ;;
1076     esac
1077   done
1078   IFS="$ac_save_IFS"
1079
1080 fi
1081   if test "${ac_cv_path_install+set}" = set; then
1082     INSTALL="$ac_cv_path_install"
1083   else
1084     # As a last resort, use the slow shell script.  We don't cache a
1085     # path for INSTALL within a source directory, because that will
1086     # break other packages using the cache if that directory is
1087     # removed, or if the path is relative.
1088     INSTALL="$ac_install_sh"
1089   fi
1090 fi
1091 echo "$ac_t""$INSTALL" 1>&6
1092
1093 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1094 # It thinks the first close brace ends the variable substitution.
1095 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1096
1097 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1098
1099 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1100
1101 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1102 echo "configure:1103: checking whether build environment is sane" >&5
1103 # Just in case
1104 sleep 1
1105 echo timestamp > conftestfile
1106 # Do `set' in a subshell so we don't clobber the current shell's
1107 # arguments.  Must try -L first in case configure is actually a
1108 # symlink; some systems play weird games with the mod time of symlinks
1109 # (eg FreeBSD returns the mod time of the symlink's containing
1110 # directory).
1111 if (
1112    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1113    if test "$*" = "X"; then
1114       # -L didn't work.
1115       set X `ls -t $srcdir/configure conftestfile`
1116    fi
1117    if test "$*" != "X $srcdir/configure conftestfile" \
1118       && test "$*" != "X conftestfile $srcdir/configure"; then
1119
1120       # If neither matched, then we have a broken ls.  This can happen
1121       # if, for instance, CONFIG_SHELL is bash and it inherits a
1122       # broken ls alias from the environment.  This has actually
1123       # happened.  Such a system could not be considered "sane".
1124       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1125 alias in your environment" 1>&2; exit 1; }
1126    fi
1127
1128    test "$2" = conftestfile
1129    )
1130 then
1131    # Ok.
1132    :
1133 else
1134    { echo "configure: error: newly created file is older than distributed files!
1135 Check your system clock" 1>&2; exit 1; }
1136 fi
1137 rm -f conftest*
1138 echo "$ac_t""yes" 1>&6
1139 if test "$program_transform_name" = s,x,x,; then
1140   program_transform_name=
1141 else
1142   # Double any \ or $.  echo might interpret backslashes.
1143   cat <<\EOF_SED > conftestsed
1144 s,\\,\\\\,g; s,\$,$$,g
1145 EOF_SED
1146   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1147   rm -f conftestsed
1148 fi
1149 test "$program_prefix" != NONE &&
1150   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1151 # Use a double $ so make ignores it.
1152 test "$program_suffix" != NONE &&
1153   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1154
1155 # sed with no file args requires a program.
1156 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1157
1158 for ac_prog in mawk gawk nawk awk
1159 do
1160 # Extract the first word of "$ac_prog", so it can be a program name with args.
1161 set dummy $ac_prog; ac_word=$2
1162 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1163 echo "configure:1164: checking for $ac_word" >&5
1164 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1165   echo $ac_n "(cached) $ac_c" 1>&6
1166 else
1167   if test -n "$AWK"; then
1168   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1169 else
1170   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1171   ac_dummy="$PATH"
1172   for ac_dir in $ac_dummy; do
1173     test -z "$ac_dir" && ac_dir=.
1174     if test -f $ac_dir/$ac_word; then
1175       ac_cv_prog_AWK="$ac_prog"
1176       break
1177     fi
1178   done
1179   IFS="$ac_save_ifs"
1180 fi
1181 fi
1182 AWK="$ac_cv_prog_AWK"
1183 if test -n "$AWK"; then
1184   echo "$ac_t""$AWK" 1>&6
1185 else
1186   echo "$ac_t""no" 1>&6
1187 fi
1188
1189 test -n "$AWK" && break
1190 done
1191
1192 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1193 echo "configure:1194: checking whether ${MAKE-make} sets \${MAKE}" >&5
1194 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1195 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1196   echo $ac_n "(cached) $ac_c" 1>&6
1197 else
1198   cat > conftestmake <<\EOF
1199 all:
1200         @echo 'ac_maketemp="${MAKE}"'
1201 EOF
1202 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1203 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1204 if test -n "$ac_maketemp"; then
1205   eval ac_cv_prog_make_${ac_make}_set=yes
1206 else
1207   eval ac_cv_prog_make_${ac_make}_set=no
1208 fi
1209 rm -f conftestmake
1210 fi
1211 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1212   echo "$ac_t""yes" 1>&6
1213   SET_MAKE=
1214 else
1215   echo "$ac_t""no" 1>&6
1216   SET_MAKE="MAKE=${MAKE-make}"
1217 fi
1218
1219
1220
1221 PACKAGE=$OL_PACKAGE
1222
1223 VERSION=$OL_VERSION
1224
1225 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1226   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1227 fi
1228
1229
1230
1231 missing_dir=`cd $ac_aux_dir && pwd`
1232 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1233 echo "configure:1234: checking for working aclocal" >&5
1234 # Run test in a subshell; some versions of sh will print an error if
1235 # an executable is not found, even if stderr is redirected.
1236 # Redirect stdin to placate older versions of autoconf.  Sigh.
1237 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1238    ACLOCAL=aclocal
1239    echo "$ac_t""found" 1>&6
1240 else
1241    ACLOCAL="$missing_dir/missing aclocal"
1242    echo "$ac_t""missing" 1>&6
1243 fi
1244
1245 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1246 echo "configure:1247: checking for working autoconf" >&5
1247 # Run test in a subshell; some versions of sh will print an error if
1248 # an executable is not found, even if stderr is redirected.
1249 # Redirect stdin to placate older versions of autoconf.  Sigh.
1250 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1251    AUTOCONF=autoconf
1252    echo "$ac_t""found" 1>&6
1253 else
1254    AUTOCONF="$missing_dir/missing autoconf"
1255    echo "$ac_t""missing" 1>&6
1256 fi
1257
1258 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1259 echo "configure:1260: checking for working automake" >&5
1260 # Run test in a subshell; some versions of sh will print an error if
1261 # an executable is not found, even if stderr is redirected.
1262 # Redirect stdin to placate older versions of autoconf.  Sigh.
1263 if (automake --version) < /dev/null > /dev/null 2>&1; then
1264    AUTOMAKE=automake
1265    echo "$ac_t""found" 1>&6
1266 else
1267    AUTOMAKE="$missing_dir/missing automake"
1268    echo "$ac_t""missing" 1>&6
1269 fi
1270
1271 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1272 echo "configure:1273: checking for working autoheader" >&5
1273 # Run test in a subshell; some versions of sh will print an error if
1274 # an executable is not found, even if stderr is redirected.
1275 # Redirect stdin to placate older versions of autoconf.  Sigh.
1276 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1277    AUTOHEADER=autoheader
1278    echo "$ac_t""found" 1>&6
1279 else
1280    AUTOHEADER="$missing_dir/missing autoheader"
1281    echo "$ac_t""missing" 1>&6
1282 fi
1283
1284 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1285 echo "configure:1286: checking for working makeinfo" >&5
1286 # Run test in a subshell; some versions of sh will print an error if
1287 # an executable is not found, even if stderr is redirected.
1288 # Redirect stdin to placate older versions of autoconf.  Sigh.
1289 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1290    MAKEINFO=makeinfo
1291    echo "$ac_t""found" 1>&6
1292 else
1293    MAKEINFO="$missing_dir/missing makeinfo"
1294    echo "$ac_t""missing" 1>&6
1295 fi
1296
1297 install_sh="$missing_dir/install-sh"
1298 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1299
1300 for ac_prog in gnutar gtar tar
1301 do
1302 # Extract the first word of "$ac_prog", so it can be a program name with args.
1303 set dummy $ac_prog; ac_word=$2
1304 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1305 echo "configure:1306: checking for $ac_word" >&5
1306 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1307   echo $ac_n "(cached) $ac_c" 1>&6
1308 else
1309   if test -n "$AMTAR"; then
1310   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1311 else
1312   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1313   ac_dummy="$PATH"
1314   for ac_dir in $ac_dummy; do
1315     test -z "$ac_dir" && ac_dir=.
1316     if test -f $ac_dir/$ac_word; then
1317       ac_cv_prog_AMTAR="$ac_prog"
1318       break
1319     fi
1320   done
1321   IFS="$ac_save_ifs"
1322 fi
1323 fi
1324 AMTAR="$ac_cv_prog_AMTAR"
1325 if test -n "$AMTAR"; then
1326   echo "$ac_t""$AMTAR" 1>&6
1327 else
1328   echo "$ac_t""no" 1>&6
1329 fi
1330
1331 test -n "$AMTAR" && break
1332 done
1333
1334
1335 AMTARFLAGS=
1336 if test -n "$AMTAR"; then
1337   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1338         AMTARFLAGS=o
1339   fi
1340 fi
1341
1342 cat >> confdefs.h <<EOF
1343 #define OPENLDAP_PACKAGE "$PACKAGE"
1344 EOF
1345
1346 cat >> confdefs.h <<EOF
1347 #define OPENLDAP_VERSION "$VERSION"
1348 EOF
1349
1350
1351 cat >> confdefs.h <<EOF
1352 #define LDAP_VENDOR_VERSION $OL_API_INC
1353 EOF
1354
1355 cat >> confdefs.h <<EOF
1356 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1357 EOF
1358
1359 cat >> confdefs.h <<EOF
1360 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1361 EOF
1362
1363 cat >> confdefs.h <<EOF
1364 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1365 EOF
1366
1367
1368 OPENLDAP_LIBVERSION=$OL_API_LIB
1369
1370 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1371
1372
1373
1374 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1375 echo "configure:1376: checking configure arguments" >&5
1376
1377
1378 top_builddir=`pwd`
1379
1380 ldap_subdir="/openldap"
1381
1382 # Check whether --with-subdir or --without-subdir was given.
1383 if test "${with_subdir+set}" = set; then
1384   withval="$with_subdir"
1385   case "$withval" in
1386         no) ldap_subdir=""
1387                 ;;
1388         yes)
1389                 ;;
1390         /*|\\*)
1391                 ldap_subdir="$withval"
1392                 ;;
1393         *)
1394                 ldap_subdir="/$withval"
1395                 ;;
1396 esac
1397
1398 fi
1399
1400
1401 # OpenLDAP --enable-debug
1402         # Check whether --enable-debug or --disable-debug was given.
1403 if test "${enable_debug+set}" = set; then
1404   enableval="$enable_debug"
1405   
1406         ol_arg=invalid
1407         for ol_val in auto yes no ; do
1408                 if test "$enableval" = "$ol_val" ; then
1409                         ol_arg="$ol_val"
1410                 fi
1411         done
1412         if test "$ol_arg" = "invalid" ; then
1413                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1414         fi
1415         ol_enable_debug="$ol_arg"
1416
1417 else
1418         ol_enable_debug="yes"
1419 fi
1420 # end --enable-debug
1421 # OpenLDAP --enable-dynamic
1422         # Check whether --enable-dynamic or --disable-dynamic was given.
1423 if test "${enable_dynamic+set}" = set; then
1424   enableval="$enable_dynamic"
1425   
1426         ol_arg=invalid
1427         for ol_val in auto yes no ; do
1428                 if test "$enableval" = "$ol_val" ; then
1429                         ol_arg="$ol_val"
1430                 fi
1431         done
1432         if test "$ol_arg" = "invalid" ; then
1433                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1434         fi
1435         ol_enable_dynamic="$ol_arg"
1436
1437 else
1438         ol_enable_dynamic="no"
1439 fi
1440 # end --enable-dynamic
1441 # OpenLDAP --enable-syslog
1442         # Check whether --enable-syslog or --disable-syslog was given.
1443 if test "${enable_syslog+set}" = set; then
1444   enableval="$enable_syslog"
1445   
1446         ol_arg=invalid
1447         for ol_val in auto yes no ; do
1448                 if test "$enableval" = "$ol_val" ; then
1449                         ol_arg="$ol_val"
1450                 fi
1451         done
1452         if test "$ol_arg" = "invalid" ; then
1453                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1454         fi
1455         ol_enable_syslog="$ol_arg"
1456
1457 else
1458         ol_enable_syslog="auto"
1459 fi
1460 # end --enable-syslog
1461 # OpenLDAP --enable-proctitle
1462         # Check whether --enable-proctitle or --disable-proctitle was given.
1463 if test "${enable_proctitle+set}" = set; then
1464   enableval="$enable_proctitle"
1465   
1466         ol_arg=invalid
1467         for ol_val in auto yes no ; do
1468                 if test "$enableval" = "$ol_val" ; then
1469                         ol_arg="$ol_val"
1470                 fi
1471         done
1472         if test "$ol_arg" = "invalid" ; then
1473                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1474         fi
1475         ol_enable_proctitle="$ol_arg"
1476
1477 else
1478         ol_enable_proctitle="yes"
1479 fi
1480 # end --enable-proctitle
1481 ol_enable_referrals=${ol_enable_referrals-no}
1482 ol_enable_kbind=${ol_enable_kbind-no}
1483 # OpenLDAP --enable-ipv6
1484         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1485 if test "${enable_ipv6+set}" = set; then
1486   enableval="$enable_ipv6"
1487   
1488         ol_arg=invalid
1489         for ol_val in auto yes no ; do
1490                 if test "$enableval" = "$ol_val" ; then
1491                         ol_arg="$ol_val"
1492                 fi
1493         done
1494         if test "$ol_arg" = "invalid" ; then
1495                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1496         fi
1497         ol_enable_ipv6="$ol_arg"
1498
1499 else
1500         ol_enable_ipv6="auto"
1501 fi
1502 # end --enable-ipv6
1503 # OpenLDAP --enable-local
1504         # Check whether --enable-local or --disable-local was given.
1505 if test "${enable_local+set}" = set; then
1506   enableval="$enable_local"
1507   
1508         ol_arg=invalid
1509         for ol_val in auto yes no ; do
1510                 if test "$enableval" = "$ol_val" ; then
1511                         ol_arg="$ol_val"
1512                 fi
1513         done
1514         if test "$ol_arg" = "invalid" ; then
1515                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1516         fi
1517         ol_enable_local="$ol_arg"
1518
1519 else
1520         ol_enable_local="auto"
1521 fi
1522 # end --enable-local
1523 # OpenLDAP --enable-x_compile
1524         # Check whether --enable-x_compile or --disable-x_compile was given.
1525 if test "${enable_x_compile+set}" = set; then
1526   enableval="$enable_x_compile"
1527   
1528         ol_arg=invalid
1529         for ol_val in yes no ; do
1530                 if test "$enableval" = "$ol_val" ; then
1531                         ol_arg="$ol_val"
1532                 fi
1533         done
1534         if test "$ol_arg" = "invalid" ; then
1535                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1536         fi
1537         ol_enable_x_compile="$ol_arg"
1538
1539 else
1540         ol_enable_x_compile="no"
1541 fi
1542 # end --enable-x_compile
1543
1544
1545 # OpenLDAP --with-cyrus_sasl
1546         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1547 if test "${with_cyrus_sasl+set}" = set; then
1548   withval="$with_cyrus_sasl"
1549   
1550         ol_arg=invalid
1551         for ol_val in auto yes no  ; do
1552                 if test "$withval" = "$ol_val" ; then
1553                         ol_arg="$ol_val"
1554                 fi
1555         done
1556         if test "$ol_arg" = "invalid" ; then
1557                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1558         fi
1559         ol_with_cyrus_sasl="$ol_arg"
1560
1561 else
1562         ol_with_cyrus_sasl="auto"
1563 fi
1564 # end --with-cyrus_sasl
1565
1566 # OpenLDAP --with-fetch
1567         # Check whether --with-fetch or --without-fetch was given.
1568 if test "${with_fetch+set}" = set; then
1569   withval="$with_fetch"
1570   
1571         ol_arg=invalid
1572         for ol_val in auto yes no  ; do
1573                 if test "$withval" = "$ol_val" ; then
1574                         ol_arg="$ol_val"
1575                 fi
1576         done
1577         if test "$ol_arg" = "invalid" ; then
1578                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1579         fi
1580         ol_with_fetch="$ol_arg"
1581
1582 else
1583         ol_with_fetch="auto"
1584 fi
1585 # end --with-fetch
1586
1587 ol_with_kerberos=${ol_with_kerberos-auto}
1588 # OpenLDAP --with-threads
1589         # Check whether --with-threads or --without-threads was given.
1590 if test "${with_threads+set}" = set; then
1591   withval="$with_threads"
1592   
1593         ol_arg=invalid
1594         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1595                 if test "$withval" = "$ol_val" ; then
1596                         ol_arg="$ol_val"
1597                 fi
1598         done
1599         if test "$ol_arg" = "invalid" ; then
1600                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1601         fi
1602         ol_with_threads="$ol_arg"
1603
1604 else
1605         ol_with_threads="auto"
1606 fi
1607 # end --with-threads
1608
1609 # OpenLDAP --with-tls
1610         # Check whether --with-tls or --without-tls was given.
1611 if test "${with_tls+set}" = set; then
1612   withval="$with_tls"
1613   
1614         ol_arg=invalid
1615         for ol_val in auto ssleay openssl yes no  ; do
1616                 if test "$withval" = "$ol_val" ; then
1617                         ol_arg="$ol_val"
1618                 fi
1619         done
1620         if test "$ol_arg" = "invalid" ; then
1621                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1622         fi
1623         ol_with_tls="$ol_arg"
1624
1625 else
1626         ol_with_tls="auto"
1627 fi
1628 # end --with-tls
1629
1630 # OpenLDAP --with-yielding_select
1631         # Check whether --with-yielding_select or --without-yielding_select was given.
1632 if test "${with_yielding_select+set}" = set; then
1633   withval="$with_yielding_select"
1634   
1635         ol_arg=invalid
1636         for ol_val in auto yes no manual  ; do
1637                 if test "$withval" = "$ol_val" ; then
1638                         ol_arg="$ol_val"
1639                 fi
1640         done
1641         if test "$ol_arg" = "invalid" ; then
1642                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1643         fi
1644         ol_with_yielding_select="$ol_arg"
1645
1646 else
1647         ol_with_yielding_select="auto"
1648 fi
1649 # end --with-yielding_select
1650
1651
1652
1653 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1654 if test "${with_xxslapdoptions+set}" = set; then
1655   withval="$with_xxslapdoptions"
1656   :
1657 fi
1658
1659 # OpenLDAP --enable-slapd
1660         # Check whether --enable-slapd or --disable-slapd was given.
1661 if test "${enable_slapd+set}" = set; then
1662   enableval="$enable_slapd"
1663   
1664         ol_arg=invalid
1665         for ol_val in auto yes no ; do
1666                 if test "$enableval" = "$ol_val" ; then
1667                         ol_arg="$ol_val"
1668                 fi
1669         done
1670         if test "$ol_arg" = "invalid" ; then
1671                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1672         fi
1673         ol_enable_slapd="$ol_arg"
1674
1675 else
1676         ol_enable_slapd="yes"
1677 fi
1678 # end --enable-slapd
1679 # OpenLDAP --enable-aci
1680         # Check whether --enable-aci or --disable-aci was given.
1681 if test "${enable_aci+set}" = set; then
1682   enableval="$enable_aci"
1683   
1684         ol_arg=invalid
1685         for ol_val in auto yes no ; do
1686                 if test "$enableval" = "$ol_val" ; then
1687                         ol_arg="$ol_val"
1688                 fi
1689         done
1690         if test "$ol_arg" = "invalid" ; then
1691                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1692         fi
1693         ol_enable_aci="$ol_arg"
1694
1695 else
1696         ol_enable_aci="no"
1697 fi
1698 # end --enable-aci
1699 # OpenLDAP --enable-cleartext
1700         # Check whether --enable-cleartext or --disable-cleartext was given.
1701 if test "${enable_cleartext+set}" = set; then
1702   enableval="$enable_cleartext"
1703   
1704         ol_arg=invalid
1705         for ol_val in auto yes no ; do
1706                 if test "$enableval" = "$ol_val" ; then
1707                         ol_arg="$ol_val"
1708                 fi
1709         done
1710         if test "$ol_arg" = "invalid" ; then
1711                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1712         fi
1713         ol_enable_cleartext="$ol_arg"
1714
1715 else
1716         ol_enable_cleartext="yes"
1717 fi
1718 # end --enable-cleartext
1719 # OpenLDAP --enable-crypt
1720         # Check whether --enable-crypt or --disable-crypt was given.
1721 if test "${enable_crypt+set}" = set; then
1722   enableval="$enable_crypt"
1723   
1724         ol_arg=invalid
1725         for ol_val in auto yes no ; do
1726                 if test "$enableval" = "$ol_val" ; then
1727                         ol_arg="$ol_val"
1728                 fi
1729         done
1730         if test "$ol_arg" = "invalid" ; then
1731                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1732         fi
1733         ol_enable_crypt="$ol_arg"
1734
1735 else
1736         ol_enable_crypt="no"
1737 fi
1738 # end --enable-crypt
1739 ol_enable_kpasswd=${ol_enable_kpasswd-no}
1740 # OpenLDAP --enable-lmpasswd
1741         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1742 if test "${enable_lmpasswd+set}" = set; then
1743   enableval="$enable_lmpasswd"
1744   
1745         ol_arg=invalid
1746         for ol_val in auto yes no ; do
1747                 if test "$enableval" = "$ol_val" ; then
1748                         ol_arg="$ol_val"
1749                 fi
1750         done
1751         if test "$ol_arg" = "invalid" ; then
1752                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1753         fi
1754         ol_enable_lmpasswd="$ol_arg"
1755
1756 else
1757         ol_enable_lmpasswd="no"
1758 fi
1759 # end --enable-lmpasswd
1760 # OpenLDAP --enable-spasswd
1761         # Check whether --enable-spasswd or --disable-spasswd was given.
1762 if test "${enable_spasswd+set}" = set; then
1763   enableval="$enable_spasswd"
1764   
1765         ol_arg=invalid
1766         for ol_val in auto yes no ; do
1767                 if test "$enableval" = "$ol_val" ; then
1768                         ol_arg="$ol_val"
1769                 fi
1770         done
1771         if test "$ol_arg" = "invalid" ; then
1772                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1773         fi
1774         ol_enable_spasswd="$ol_arg"
1775
1776 else
1777         ol_enable_spasswd="no"
1778 fi
1779 # end --enable-spasswd
1780 # OpenLDAP --enable-modules
1781         # Check whether --enable-modules or --disable-modules was given.
1782 if test "${enable_modules+set}" = set; then
1783   enableval="$enable_modules"
1784   
1785         ol_arg=invalid
1786         for ol_val in auto yes no ; do
1787                 if test "$enableval" = "$ol_val" ; then
1788                         ol_arg="$ol_val"
1789                 fi
1790         done
1791         if test "$ol_arg" = "invalid" ; then
1792                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1793         fi
1794         ol_enable_modules="$ol_arg"
1795
1796 else
1797         ol_enable_modules="no"
1798 fi
1799 # end --enable-modules
1800 ol_enable_multimaster=${ol_enable_multimaster-no}
1801 # OpenLDAP --enable-rewrite
1802         # Check whether --enable-rewrite or --disable-rewrite was given.
1803 if test "${enable_rewrite+set}" = set; then
1804   enableval="$enable_rewrite"
1805   
1806         ol_arg=invalid
1807         for ol_val in auto yes no ; do
1808                 if test "$enableval" = "$ol_val" ; then
1809                         ol_arg="$ol_val"
1810                 fi
1811         done
1812         if test "$ol_arg" = "invalid" ; then
1813                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1814         fi
1815         ol_enable_rewrite="$ol_arg"
1816
1817 else
1818         ol_enable_rewrite="no"
1819 fi
1820 # end --enable-rewrite
1821 # OpenLDAP --enable-rlookups
1822         # Check whether --enable-rlookups or --disable-rlookups was given.
1823 if test "${enable_rlookups+set}" = set; then
1824   enableval="$enable_rlookups"
1825   
1826         ol_arg=invalid
1827         for ol_val in auto yes no ; do
1828                 if test "$enableval" = "$ol_val" ; then
1829                         ol_arg="$ol_val"
1830                 fi
1831         done
1832         if test "$ol_arg" = "invalid" ; then
1833                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1834         fi
1835         ol_enable_rlookups="$ol_arg"
1836
1837 else
1838         ol_enable_rlookups="no"
1839 fi
1840 # end --enable-rlookups
1841 # OpenLDAP --enable-slapi
1842         # Check whether --enable-slapi or --disable-slapi was given.
1843 if test "${enable_slapi+set}" = set; then
1844   enableval="$enable_slapi"
1845   
1846         ol_arg=invalid
1847         for ol_val in auto yes no ; do
1848                 if test "$enableval" = "$ol_val" ; then
1849                         ol_arg="$ol_val"
1850                 fi
1851         done
1852         if test "$ol_arg" = "invalid" ; then
1853                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1854         fi
1855         ol_enable_slapi="$ol_arg"
1856
1857 else
1858         ol_enable_slapi="no"
1859 fi
1860 # end --enable-slapi
1861 # OpenLDAP --enable-slp
1862         # Check whether --enable-slp or --disable-slp was given.
1863 if test "${enable_slp+set}" = set; then
1864   enableval="$enable_slp"
1865   
1866         ol_arg=invalid
1867         for ol_val in auto yes no ; do
1868                 if test "$enableval" = "$ol_val" ; then
1869                         ol_arg="$ol_val"
1870                 fi
1871         done
1872         if test "$ol_arg" = "invalid" ; then
1873                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1874         fi
1875         ol_enable_slp="$ol_arg"
1876
1877 else
1878         ol_enable_slp="no"
1879 fi
1880 # end --enable-slp
1881 # OpenLDAP --enable-wrappers
1882         # Check whether --enable-wrappers or --disable-wrappers was given.
1883 if test "${enable_wrappers+set}" = set; then
1884   enableval="$enable_wrappers"
1885   
1886         ol_arg=invalid
1887         for ol_val in auto yes no ; do
1888                 if test "$enableval" = "$ol_val" ; then
1889                         ol_arg="$ol_val"
1890                 fi
1891         done
1892         if test "$ol_arg" = "invalid" ; then
1893                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1894         fi
1895         ol_enable_wrappers="$ol_arg"
1896
1897 else
1898         ol_enable_wrappers="no"
1899 fi
1900 # end --enable-wrappers
1901
1902
1903 # OpenLDAP --enable-bdb
1904         # Check whether --enable-bdb or --disable-bdb was given.
1905 if test "${enable_bdb+set}" = set; then
1906   enableval="$enable_bdb"
1907   
1908         ol_arg=invalid
1909         for ol_val in auto yes no ; do
1910                 if test "$enableval" = "$ol_val" ; then
1911                         ol_arg="$ol_val"
1912                 fi
1913         done
1914         if test "$ol_arg" = "invalid" ; then
1915                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1916         fi
1917         ol_enable_bdb="$ol_arg"
1918
1919 else
1920         ol_enable_bdb="yes"
1921 fi
1922 # end --enable-bdb
1923 # OpenLDAP --with-bdb_module
1924         # Check whether --with-bdb_module or --without-bdb_module was given.
1925 if test "${with_bdb_module+set}" = set; then
1926   withval="$with_bdb_module"
1927   
1928         ol_arg=invalid
1929         for ol_val in static dynamic ; do
1930                 if test "$withval" = "$ol_val" ; then
1931                         ol_arg="$ol_val"
1932                 fi
1933         done
1934         if test "$ol_arg" = "invalid" ; then
1935                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1936         fi
1937         ol_with_bdb_module="$ol_arg"
1938
1939 else
1940         ol_with_bdb_module="static"
1941 fi
1942 # end --with-bdb_module
1943
1944 # OpenLDAP --enable-dnssrv
1945         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1946 if test "${enable_dnssrv+set}" = set; then
1947   enableval="$enable_dnssrv"
1948   
1949         ol_arg=invalid
1950         for ol_val in auto yes no ; do
1951                 if test "$enableval" = "$ol_val" ; then
1952                         ol_arg="$ol_val"
1953                 fi
1954         done
1955         if test "$ol_arg" = "invalid" ; then
1956                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1957         fi
1958         ol_enable_dnssrv="$ol_arg"
1959
1960 else
1961         ol_enable_dnssrv="no"
1962 fi
1963 # end --enable-dnssrv
1964 # OpenLDAP --with-dnssrv_module
1965         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1966 if test "${with_dnssrv_module+set}" = set; then
1967   withval="$with_dnssrv_module"
1968   
1969         ol_arg=invalid
1970         for ol_val in static dynamic ; do
1971                 if test "$withval" = "$ol_val" ; then
1972                         ol_arg="$ol_val"
1973                 fi
1974         done
1975         if test "$ol_arg" = "invalid" ; then
1976                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1977         fi
1978         ol_with_dnssrv_module="$ol_arg"
1979
1980 else
1981         ol_with_dnssrv_module="static"
1982 fi
1983 # end --with-dnssrv_module
1984
1985 # OpenLDAP --enable-hdb
1986         # Check whether --enable-hdb or --disable-hdb was given.
1987 if test "${enable_hdb+set}" = set; then
1988   enableval="$enable_hdb"
1989   
1990         ol_arg=invalid
1991         for ol_val in auto yes no ; do
1992                 if test "$enableval" = "$ol_val" ; then
1993                         ol_arg="$ol_val"
1994                 fi
1995         done
1996         if test "$ol_arg" = "invalid" ; then
1997                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1998         fi
1999         ol_enable_hdb="$ol_arg"
2000
2001 else
2002         ol_enable_hdb="no"
2003 fi
2004 # end --enable-hdb
2005 # OpenLDAP --with-hdb_module
2006         # Check whether --with-hdb_module or --without-hdb_module was given.
2007 if test "${with_hdb_module+set}" = set; then
2008   withval="$with_hdb_module"
2009   
2010         ol_arg=invalid
2011         for ol_val in static dynamic ; do
2012                 if test "$withval" = "$ol_val" ; then
2013                         ol_arg="$ol_val"
2014                 fi
2015         done
2016         if test "$ol_arg" = "invalid" ; then
2017                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2018         fi
2019         ol_with_hdb_module="$ol_arg"
2020
2021 else
2022         ol_with_hdb_module="static"
2023 fi
2024 # end --with-hdb_module
2025
2026 # OpenLDAP --enable-ldap
2027         # Check whether --enable-ldap or --disable-ldap was given.
2028 if test "${enable_ldap+set}" = set; then
2029   enableval="$enable_ldap"
2030   
2031         ol_arg=invalid
2032         for ol_val in auto yes no ; do
2033                 if test "$enableval" = "$ol_val" ; then
2034                         ol_arg="$ol_val"
2035                 fi
2036         done
2037         if test "$ol_arg" = "invalid" ; then
2038                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2039         fi
2040         ol_enable_ldap="$ol_arg"
2041
2042 else
2043         ol_enable_ldap="no"
2044 fi
2045 # end --enable-ldap
2046 # OpenLDAP --with-ldap_module
2047         # Check whether --with-ldap_module or --without-ldap_module was given.
2048 if test "${with_ldap_module+set}" = set; then
2049   withval="$with_ldap_module"
2050   
2051         ol_arg=invalid
2052         for ol_val in static dynamic ; do
2053                 if test "$withval" = "$ol_val" ; then
2054                         ol_arg="$ol_val"
2055                 fi
2056         done
2057         if test "$ol_arg" = "invalid" ; then
2058                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2059         fi
2060         ol_with_ldap_module="$ol_arg"
2061
2062 else
2063         ol_with_ldap_module="static"
2064 fi
2065 # end --with-ldap_module
2066
2067 # OpenLDAP --enable-ldbm
2068         # Check whether --enable-ldbm or --disable-ldbm was given.
2069 if test "${enable_ldbm+set}" = set; then
2070   enableval="$enable_ldbm"
2071   
2072         ol_arg=invalid
2073         for ol_val in auto yes no ; do
2074                 if test "$enableval" = "$ol_val" ; then
2075                         ol_arg="$ol_val"
2076                 fi
2077         done
2078         if test "$ol_arg" = "invalid" ; then
2079                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2080         fi
2081         ol_enable_ldbm="$ol_arg"
2082
2083 else
2084         ol_enable_ldbm="no"
2085 fi
2086 # end --enable-ldbm
2087 # OpenLDAP --with-ldbm_api
2088         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2089 if test "${with_ldbm_api+set}" = set; then
2090   withval="$with_ldbm_api"
2091   
2092         ol_arg=invalid
2093         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2094                 if test "$withval" = "$ol_val" ; then
2095                         ol_arg="$ol_val"
2096                 fi
2097         done
2098         if test "$ol_arg" = "invalid" ; then
2099                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2100         fi
2101         ol_with_ldbm_api="$ol_arg"
2102
2103 else
2104         ol_with_ldbm_api="auto"
2105 fi
2106 # end --with-ldbm_api
2107
2108 # OpenLDAP --with-ldbm_module
2109         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2110 if test "${with_ldbm_module+set}" = set; then
2111   withval="$with_ldbm_module"
2112   
2113         ol_arg=invalid
2114         for ol_val in static dynamic ; do
2115                 if test "$withval" = "$ol_val" ; then
2116                         ol_arg="$ol_val"
2117                 fi
2118         done
2119         if test "$ol_arg" = "invalid" ; then
2120                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2121         fi
2122         ol_with_ldbm_module="$ol_arg"
2123
2124 else
2125         ol_with_ldbm_module="static"
2126 fi
2127 # end --with-ldbm_module
2128
2129 # OpenLDAP --with-ldbm_type
2130         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2131 if test "${with_ldbm_type+set}" = set; then
2132   withval="$with_ldbm_type"
2133   
2134         ol_arg=invalid
2135         for ol_val in auto btree hash ; do
2136                 if test "$withval" = "$ol_val" ; then
2137                         ol_arg="$ol_val"
2138                 fi
2139         done
2140         if test "$ol_arg" = "invalid" ; then
2141                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2142         fi
2143         ol_with_ldbm_type="$ol_arg"
2144
2145 else
2146         ol_with_ldbm_type="auto"
2147 fi
2148 # end --with-ldbm_type
2149
2150 # OpenLDAP --enable-meta
2151         # Check whether --enable-meta or --disable-meta was given.
2152 if test "${enable_meta+set}" = set; then
2153   enableval="$enable_meta"
2154   
2155         ol_arg=invalid
2156         for ol_val in auto yes no ; do
2157                 if test "$enableval" = "$ol_val" ; then
2158                         ol_arg="$ol_val"
2159                 fi
2160         done
2161         if test "$ol_arg" = "invalid" ; then
2162                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2163         fi
2164         ol_enable_meta="$ol_arg"
2165
2166 else
2167         ol_enable_meta="no"
2168 fi
2169 # end --enable-meta
2170 # OpenLDAP --with-meta_module
2171         # Check whether --with-meta_module or --without-meta_module was given.
2172 if test "${with_meta_module+set}" = set; then
2173   withval="$with_meta_module"
2174   
2175         ol_arg=invalid
2176         for ol_val in static dynamic ; do
2177                 if test "$withval" = "$ol_val" ; then
2178                         ol_arg="$ol_val"
2179                 fi
2180         done
2181         if test "$ol_arg" = "invalid" ; then
2182                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2183         fi
2184         ol_with_meta_module="$ol_arg"
2185
2186 else
2187         ol_with_meta_module="static"
2188 fi
2189 # end --with-meta_module
2190
2191 # OpenLDAP --enable-monitor
2192         # Check whether --enable-monitor or --disable-monitor was given.
2193 if test "${enable_monitor+set}" = set; then
2194   enableval="$enable_monitor"
2195   
2196         ol_arg=invalid
2197         for ol_val in auto yes no ; do
2198                 if test "$enableval" = "$ol_val" ; then
2199                         ol_arg="$ol_val"
2200                 fi
2201         done
2202         if test "$ol_arg" = "invalid" ; then
2203                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2204         fi
2205         ol_enable_monitor="$ol_arg"
2206
2207 else
2208         ol_enable_monitor="yes"
2209 fi
2210 # end --enable-monitor
2211 # OpenLDAP --with-monitor_module
2212         # Check whether --with-monitor_module or --without-monitor_module was given.
2213 if test "${with_monitor_module+set}" = set; then
2214   withval="$with_monitor_module"
2215   
2216         ol_arg=invalid
2217         for ol_val in static dynamic ; do
2218                 if test "$withval" = "$ol_val" ; then
2219                         ol_arg="$ol_val"
2220                 fi
2221         done
2222         if test "$ol_arg" = "invalid" ; then
2223                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2224         fi
2225         ol_with_monitor_module="$ol_arg"
2226
2227 else
2228         ol_with_monitor_module="static"
2229 fi
2230 # end --with-monitor_module
2231
2232 # OpenLDAP --enable-null
2233         # Check whether --enable-null or --disable-null was given.
2234 if test "${enable_null+set}" = set; then
2235   enableval="$enable_null"
2236   
2237         ol_arg=invalid
2238         for ol_val in auto yes no ; do
2239                 if test "$enableval" = "$ol_val" ; then
2240                         ol_arg="$ol_val"
2241                 fi
2242         done
2243         if test "$ol_arg" = "invalid" ; then
2244                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2245         fi
2246         ol_enable_null="$ol_arg"
2247
2248 else
2249         ol_enable_null="no"
2250 fi
2251 # end --enable-null
2252 # OpenLDAP --with-null_module
2253         # Check whether --with-null_module or --without-null_module was given.
2254 if test "${with_null_module+set}" = set; then
2255   withval="$with_null_module"
2256   
2257         ol_arg=invalid
2258         for ol_val in static dynamic ; do
2259                 if test "$withval" = "$ol_val" ; then
2260                         ol_arg="$ol_val"
2261                 fi
2262         done
2263         if test "$ol_arg" = "invalid" ; then
2264                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2265         fi
2266         ol_with_null_module="$ol_arg"
2267
2268 else
2269         ol_with_null_module="static"
2270 fi
2271 # end --with-null_module
2272
2273 # OpenLDAP --enable-passwd
2274         # Check whether --enable-passwd or --disable-passwd was given.
2275 if test "${enable_passwd+set}" = set; then
2276   enableval="$enable_passwd"
2277   
2278         ol_arg=invalid
2279         for ol_val in auto yes no ; do
2280                 if test "$enableval" = "$ol_val" ; then
2281                         ol_arg="$ol_val"
2282                 fi
2283         done
2284         if test "$ol_arg" = "invalid" ; then
2285                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2286         fi
2287         ol_enable_passwd="$ol_arg"
2288
2289 else
2290         ol_enable_passwd="no"
2291 fi
2292 # end --enable-passwd
2293 # OpenLDAP --with-passwd_module
2294         # Check whether --with-passwd_module or --without-passwd_module was given.
2295 if test "${with_passwd_module+set}" = set; then
2296   withval="$with_passwd_module"
2297   
2298         ol_arg=invalid
2299         for ol_val in static dynamic ; do
2300                 if test "$withval" = "$ol_val" ; then
2301                         ol_arg="$ol_val"
2302                 fi
2303         done
2304         if test "$ol_arg" = "invalid" ; then
2305                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2306         fi
2307         ol_with_passwd_module="$ol_arg"
2308
2309 else
2310         ol_with_passwd_module="static"
2311 fi
2312 # end --with-passwd_module
2313
2314 # OpenLDAP --enable-perl
2315         # Check whether --enable-perl or --disable-perl was given.
2316 if test "${enable_perl+set}" = set; then
2317   enableval="$enable_perl"
2318   
2319         ol_arg=invalid
2320         for ol_val in auto yes no ; do
2321                 if test "$enableval" = "$ol_val" ; then
2322                         ol_arg="$ol_val"
2323                 fi
2324         done
2325         if test "$ol_arg" = "invalid" ; then
2326                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2327         fi
2328         ol_enable_perl="$ol_arg"
2329
2330 else
2331         ol_enable_perl="no"
2332 fi
2333 # end --enable-perl
2334 # OpenLDAP --with-perl_module
2335         # Check whether --with-perl_module or --without-perl_module was given.
2336 if test "${with_perl_module+set}" = set; then
2337   withval="$with_perl_module"
2338   
2339         ol_arg=invalid
2340         for ol_val in static dynamic ; do
2341                 if test "$withval" = "$ol_val" ; then
2342                         ol_arg="$ol_val"
2343                 fi
2344         done
2345         if test "$ol_arg" = "invalid" ; then
2346                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2347         fi
2348         ol_with_perl_module="$ol_arg"
2349
2350 else
2351         ol_with_perl_module="static"
2352 fi
2353 # end --with-perl_module
2354
2355 # OpenLDAP --enable-shell
2356         # Check whether --enable-shell or --disable-shell was given.
2357 if test "${enable_shell+set}" = set; then
2358   enableval="$enable_shell"
2359   
2360         ol_arg=invalid
2361         for ol_val in auto yes no ; do
2362                 if test "$enableval" = "$ol_val" ; then
2363                         ol_arg="$ol_val"
2364                 fi
2365         done
2366         if test "$ol_arg" = "invalid" ; then
2367                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2368         fi
2369         ol_enable_shell="$ol_arg"
2370
2371 else
2372         ol_enable_shell="no"
2373 fi
2374 # end --enable-shell
2375 # OpenLDAP --with-shell_module
2376         # Check whether --with-shell_module or --without-shell_module was given.
2377 if test "${with_shell_module+set}" = set; then
2378   withval="$with_shell_module"
2379   
2380         ol_arg=invalid
2381         for ol_val in static dynamic ; do
2382                 if test "$withval" = "$ol_val" ; then
2383                         ol_arg="$ol_val"
2384                 fi
2385         done
2386         if test "$ol_arg" = "invalid" ; then
2387                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2388         fi
2389         ol_with_shell_module="$ol_arg"
2390
2391 else
2392         ol_with_shell_module="static"
2393 fi
2394 # end --with-shell_module
2395
2396 # OpenLDAP --enable-sql
2397         # Check whether --enable-sql or --disable-sql was given.
2398 if test "${enable_sql+set}" = set; then
2399   enableval="$enable_sql"
2400   
2401         ol_arg=invalid
2402         for ol_val in auto yes no ; do
2403                 if test "$enableval" = "$ol_val" ; then
2404                         ol_arg="$ol_val"
2405                 fi
2406         done
2407         if test "$ol_arg" = "invalid" ; then
2408                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2409         fi
2410         ol_enable_sql="$ol_arg"
2411
2412 else
2413         ol_enable_sql="no"
2414 fi
2415 # end --enable-sql
2416 # OpenLDAP --with-sql_module
2417         # Check whether --with-sql_module or --without-sql_module was given.
2418 if test "${with_sql_module+set}" = set; then
2419   withval="$with_sql_module"
2420   
2421         ol_arg=invalid
2422         for ol_val in static dynamic ; do
2423                 if test "$withval" = "$ol_val" ; then
2424                         ol_arg="$ol_val"
2425                 fi
2426         done
2427         if test "$ol_arg" = "invalid" ; then
2428                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2429         fi
2430         ol_with_sql_module="$ol_arg"
2431
2432 else
2433         ol_with_sql_module="static"
2434 fi
2435 # end --with-sql_module
2436
2437
2438 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2439 if test "${with_xxslapoverlays+set}" = set; then
2440   withval="$with_xxslapoverlays"
2441   :
2442 fi
2443
2444 # OpenLDAP --with-dyngroup
2445         # Check whether --with-dyngroup or --without-dyngroup was given.
2446 if test "${with_dyngroup+set}" = set; then
2447   withval="$with_dyngroup"
2448   
2449         ol_arg=invalid
2450         for ol_val in no yes mod ; do
2451                 if test "$withval" = "$ol_val" ; then
2452                         ol_arg="$ol_val"
2453                 fi
2454         done
2455         if test "$ol_arg" = "invalid" ; then
2456                 { echo "configure: error: bad value $withval for --with-dyngroup" 1>&2; exit 1; }
2457         fi
2458         ol_with_dyngroup="$ol_arg"
2459
2460 else
2461         ol_with_dyngroup="no"
2462 fi
2463 # end --with-dyngroup
2464
2465 # OpenLDAP --with-proxycache
2466         # Check whether --with-proxycache or --without-proxycache was given.
2467 if test "${with_proxycache+set}" = set; then
2468   withval="$with_proxycache"
2469   
2470         ol_arg=invalid
2471         for ol_val in no yes mod ; do
2472                 if test "$withval" = "$ol_val" ; then
2473                         ol_arg="$ol_val"
2474                 fi
2475         done
2476         if test "$ol_arg" = "invalid" ; then
2477                 { echo "configure: error: bad value $withval for --with-proxycache" 1>&2; exit 1; }
2478         fi
2479         ol_with_proxycache="$ol_arg"
2480
2481 else
2482         ol_with_proxycache="no"
2483 fi
2484 # end --with-proxycache
2485
2486
2487 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2488 if test "${with_xxslurpdoptions+set}" = set; then
2489   withval="$with_xxslurpdoptions"
2490   :
2491 fi
2492
2493 # OpenLDAP --enable-slurpd
2494         # Check whether --enable-slurpd or --disable-slurpd was given.
2495 if test "${enable_slurpd+set}" = set; then
2496   enableval="$enable_slurpd"
2497   
2498         ol_arg=invalid
2499         for ol_val in auto yes no ; do
2500                 if test "$enableval" = "$ol_val" ; then
2501                         ol_arg="$ol_val"
2502                 fi
2503         done
2504         if test "$ol_arg" = "invalid" ; then
2505                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2506         fi
2507         ol_enable_slurpd="$ol_arg"
2508
2509 else
2510         ol_enable_slurpd="auto"
2511 fi
2512 # end --enable-slurpd
2513
2514 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2515 if test "${with_xxliboptions+set}" = set; then
2516   withval="$with_xxliboptions"
2517   :
2518 fi
2519
2520 # Check whether --enable-static or --disable-static was given.
2521 if test "${enable_static+set}" = set; then
2522   enableval="$enable_static"
2523   p=${PACKAGE-default}
2524 case $enableval in
2525 yes) enable_static=yes ;;
2526 no) enable_static=no ;;
2527 *)
2528   enable_static=no
2529   # Look at the argument we got.  We use all the common list separators.
2530   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2531   for pkg in $enableval; do
2532     if test "X$pkg" = "X$p"; then
2533       enable_static=yes
2534     fi
2535   done
2536   IFS="$ac_save_ifs"
2537   ;;
2538 esac
2539 else
2540   enable_static=yes
2541 fi
2542
2543 # Check whether --enable-shared or --disable-shared was given.
2544 if test "${enable_shared+set}" = set; then
2545   enableval="$enable_shared"
2546   p=${PACKAGE-default}
2547 case $enableval in
2548 yes) enable_shared=yes ;;
2549 no) enable_shared=no ;;
2550 *)
2551   enable_shared=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_shared=yes
2557     fi
2558   done
2559   IFS="$ac_save_ifs"
2560   ;;
2561 esac
2562 else
2563   enable_shared=yes
2564 fi
2565
2566
2567
2568 # validate options
2569 if test $ol_enable_slapd = no ; then
2570                 if test $ol_enable_slapi = yes ; then
2571                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2572         fi
2573         if test $ol_enable_bdb = yes ; then
2574                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2575         fi
2576         if test $ol_enable_dnssrv = yes ; then
2577                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2578         fi
2579         if test $ol_enable_hdb = yes ; then
2580                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2581         fi
2582         if test $ol_enable_ldap = yes ; then
2583                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2584         fi
2585         if test $ol_enable_ldbm = yes ; then
2586                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2587         fi
2588         if test $ol_enable_meta = yes ; then
2589                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2590         fi
2591         if test $ol_enable_monitor = yes ; then
2592                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2593         fi
2594         if test $ol_enable_null = yes ; then
2595                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2596         fi
2597         if test $ol_enable_passwd = yes ; then
2598                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2599         fi
2600         if test $ol_enable_perl = yes ; then
2601                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2602         fi
2603         if test $ol_enable_shell = yes ; then
2604                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2605         fi
2606         if test $ol_enable_sql = yes ; then
2607                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2608         fi
2609         if test $ol_enable_modules = yes ; then
2610                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2611         fi
2612         if test $ol_enable_multimaster = yes ; then
2613                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2614         fi
2615         if test $ol_enable_wrappers = yes ; then
2616                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2617         fi
2618         if test $ol_enable_rlookups = yes ; then
2619                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2620         fi
2621         if test $ol_enable_aci = yes ; then
2622                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2623         fi
2624         if test $ol_with_ldbm_api != auto ; then
2625                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2626         fi
2627         if test $ol_with_ldbm_type != auto ; then
2628                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2629         fi
2630         if test $ol_with_bdb_module != static ; then
2631                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2632         fi
2633         if test $ol_with_dnssrv_module != static ; then
2634                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2635         fi
2636         if test $ol_with_hdb_module != static ; then
2637                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2638         fi
2639         if test $ol_with_ldap_module != static ; then
2640                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2641         fi
2642         if test $ol_with_ldbm_module != static ; then
2643                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2644         fi
2645         if test $ol_with_meta_module != static ; then
2646                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2647         fi
2648         if test $ol_with_monitor_module != static ; then
2649                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2650         fi
2651         if test $ol_with_null_module != static ; then
2652                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2653         fi
2654         if test $ol_with_passwd_module != static ; then
2655                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2656         fi
2657         if test $ol_with_perl_module != static ; then
2658                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2659         fi
2660         if test $ol_with_shell_module != static ; then
2661                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2662         fi
2663         if test $ol_with_sql_module != static ; then
2664                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2665         fi
2666         if test $ol_enable_slurpd = yes ; then
2667                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2668         fi
2669         if test $ol_enable_rewrite = yes ; then
2670                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2671         fi
2672         if test $ol_with_dyngroup != no ; then
2673                 echo "configure: warning: slapd disabled, ignoring --with-dyngroup argument" 1>&2
2674         fi
2675         if test $ol_with_proxycache != no ; then
2676                 echo "configure: warning: slapd disabled, ignoring --with-proxycache argument" 1>&2
2677         fi
2678
2679         # force settings to no
2680         ol_enable_slapi=no
2681         ol_enable_bdb=no
2682         ol_enable_dnssrv=no
2683         ol_enable_hdb=no
2684         ol_enable_ldap=no
2685         ol_enable_ldbm=no
2686         ol_enable_meta=no
2687         ol_enable_monitor=no
2688         ol_enable_null=no
2689         ol_enable_passwd=no
2690         ol_enable_perl=no
2691         ol_enable_shell=no
2692         ol_enable_sql=no
2693
2694         ol_enable_modules=no
2695         ol_enable_multimaster=no
2696         ol_enable_rlookups=no
2697         ol_enable_aci=no
2698         ol_enable_wrappers=no
2699         ol_enable_dynamic=no
2700
2701         ol_with_ldbm_api=no
2702         ol_with_ldbm_type=no
2703
2704         ol_with_bdb_module=static
2705         ol_with_dnssrv_module=static
2706         ol_with_hdb_module=static
2707         ol_with_ldap_module=static
2708         ol_with_ldbm_module=static
2709         ol_with_meta_module=static
2710         ol_with_monitor_module=static
2711         ol_with_null_module=static
2712         ol_with_passwd_module=static
2713         ol_with_perl_module=static
2714         ol_with_shell_module=static
2715         ol_with_sql_module=static
2716
2717         ol_enable_slurpd=no
2718
2719         ol_enable_rewrite=no
2720
2721         ol_with_dyngroup=no
2722         ol_with_proxycache=no
2723
2724 elif test $ol_enable_ldbm = no ; then
2725         
2726         if test $ol_with_ldbm_api != auto ; then
2727                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2728         fi
2729
2730         if test $ol_with_ldbm_type != auto ; then
2731                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2732         fi
2733
2734         if test $ol_with_ldbm_module != static ; then
2735                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2736         fi
2737
2738         if test $ol_enable_modules != yes -a \
2739                 $ol_enable_bdb = no -a \
2740                 $ol_enable_dnssrv = no -a \
2741                 $ol_enable_hdb = no -a \
2742                 $ol_enable_ldap = no -a \
2743                 $ol_enable_meta = no -a \
2744                 $ol_enable_monitor = no -a \
2745                 $ol_enable_null = no -a \
2746                 $ol_enable_passwd = no -a \
2747                 $ol_enable_perl = no -a \
2748                 $ol_enable_shell = no -a \
2749                 $ol_enable_sql = no ; then
2750
2751                 if test $ol_enable_slapd = yes ; then
2752                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2753                 else
2754                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2755                         ol_enable_slapd=no
2756                 fi
2757         fi
2758
2759         ol_with_ldbm_api=no
2760         ol_with_ldbm_type=no
2761         ol_with_ldbm_module=static
2762
2763         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2764                 ol_with_ldbm_api=berkeley
2765         fi
2766
2767 else
2768                 if test $ol_with_ldbm_api = gdbm -a \
2769                 $ol_with_ldbm_type = btree ; then
2770                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2771         fi
2772         if test $ol_with_ldbm_api = mdbm -a \
2773                 $ol_with_ldbm_type = btree ; then
2774                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2775         fi
2776         if test $ol_with_ldbm_api = ndbm -a \
2777                 $ol_with_ldbm_type = btree ; then
2778                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2779         fi
2780
2781         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2782                 if test $ol_with_ldbm_api = auto ; then
2783                         ol_with_ldbm_api=berkeley
2784                 elif test $ol_with_ldbm_api != berkeley ; then
2785                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2786                 fi
2787
2788         elif test $ol_enable_bdb = auto ; then
2789                 if test $ol_with_ldbm_api != berkeley \
2790                         -o $ol_with_ldbm_api != auto ; then
2791                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2792                         ol_enable_bdb=no
2793                 fi
2794         fi
2795 fi
2796
2797 if test $ol_enable_slurpd = yes ; then
2798                 if test $ol_with_threads = no ; then
2799                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2800         fi
2801 fi
2802
2803 if test $ol_enable_lmpasswd = yes ; then
2804         if test $ol_with_tls = no ; then
2805                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2806         fi
2807 fi
2808
2809 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2810         if test $ol_with_kerberos = no ; then
2811                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2812         elif test $ol_with_kerberos = auto ; then
2813                 ol_with_kerberos=yes
2814         fi
2815
2816 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2817         if test $ol_with_kerberos = auto ; then
2818                 ol_with_kerberos=no
2819         elif test $ol_with_kerberos != no ; then
2820                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2821                 ol_with_kerberos=no
2822         fi
2823 fi
2824
2825 if test $ol_enable_spasswd = yes ; then
2826         if test $ol_with_cyrus_sasl = no ; then
2827                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2828         fi
2829         ol_with_cyrus_sasl=yes
2830 fi
2831
2832 echo "$ac_t""done" 1>&6
2833
2834 LDAP_LIBS=
2835 LDBM_LIBS=
2836 LTHREAD_LIBS=
2837 LUTIL_LIBS=
2838
2839 SLAPD_LIBS=
2840 SLURPD_LIBS=
2841
2842 BUILD_SLAPD=no
2843 BUILD_SLURPD=no
2844
2845 BUILD_THREAD=no
2846
2847 BUILD_SLAPI=no
2848 SLAPD_SLAPI_DEPEND=
2849
2850 BUILD_BDB=no
2851 BUILD_DNSSRV=no
2852 BUILD_HDB=no
2853 BUILD_LDAP=no
2854 BUILD_LDBM=no
2855 BUILD_META=no
2856 BUILD_MONITOR=no
2857 BUILD_NULL=no
2858 BUILD_PASSWD=no
2859 BUILD_PERL=no
2860 BUILD_SHELL=no
2861 BUILD_SQL=no
2862
2863 BUILD_BDB_DYNAMIC=static
2864 BUILD_DNSSRV_DYNAMIC=static
2865 BUILD_HDB_DYNAMIC=static
2866 BUILD_LDAP_DYNAMIC=static
2867 BUILD_LDBM_DYNAMIC=static
2868 BUILD_META_DYNAMIC=static
2869 BUILD_MONITOR_DYNAMIC=static
2870 BUILD_NULL_DYNAMIC=static
2871 BUILD_PASSWD_DYNAMIC=static
2872 BUILD_PERL_DYNAMIC=static
2873 BUILD_SHELL_DYNAMIC=static
2874 BUILD_SQL_DYNAMIC=static
2875
2876 BUILD_DYNGROUP=no
2877 BUILD_PROXYCACHE=no
2878
2879 SLAPD_DYNAMIC_OVERLAYS=
2880
2881 SLAPD_MODULES_LDFLAGS=
2882 SLAPD_MODULES_CPPFLAGS=
2883
2884 SLAPD_STATIC_BACKENDS=
2885 SLAPD_DYNAMIC_BACKENDS=
2886
2887 SLAPD_PERL_LDFLAGS=
2888 MOD_PERL_LDFLAGS=
2889 PERL_CPPFLAGS=
2890
2891 SLAPD_SQL_LDFLAGS=
2892 SLAPD_SQL_LIBS=
2893 SLAPD_SQL_INCLUDES=
2894
2895 KRB4_LIBS=
2896 KRB5_LIBS=
2897 SASL_LIBS=
2898 TLS_LIBS=
2899 MODULES_LIBS=
2900 SLAPI_LIBS=
2901 LIBSLAPI=
2902 LIBSLAPITOOLS=
2903 AUTH_LIBS=
2904
2905 SLAPD_SLP_LIBS=
2906
2907
2908 # Find a good install program.  We prefer a C program (faster),
2909 # so one script is as good as another.  But avoid the broken or
2910 # incompatible versions:
2911 # SysV /etc/install, /usr/sbin/install
2912 # SunOS /usr/etc/install
2913 # IRIX /sbin/install
2914 # AIX /bin/install
2915 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2916 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2917 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2918 # ./install, which can be erroneously created by make from ./install.sh.
2919 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2920 echo "configure:2921: checking for a BSD compatible install" >&5
2921 if test -z "$INSTALL"; then
2922 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2923   echo $ac_n "(cached) $ac_c" 1>&6
2924 else
2925     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2926   for ac_dir in $PATH; do
2927     # Account for people who put trailing slashes in PATH elements.
2928     case "$ac_dir/" in
2929     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2930     *)
2931       # OSF1 and SCO ODT 3.0 have their own names for install.
2932       # Don't use installbsd from OSF since it installs stuff as root
2933       # by default.
2934       for ac_prog in ginstall scoinst install; do
2935         if test -f $ac_dir/$ac_prog; then
2936           if test $ac_prog = install &&
2937             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2938             # AIX install.  It has an incompatible calling convention.
2939             :
2940           elif test $ac_prog = install &&
2941             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2942             # program-specific install script used by HP pwplus--don't use.
2943             :
2944           else
2945             ac_cv_path_install="$ac_dir/$ac_prog -c"
2946             break 2
2947           fi
2948         fi
2949       done
2950       ;;
2951     esac
2952   done
2953   IFS="$ac_save_IFS"
2954
2955 fi
2956   if test "${ac_cv_path_install+set}" = set; then
2957     INSTALL="$ac_cv_path_install"
2958   else
2959     # As a last resort, use the slow shell script.  We don't cache a
2960     # path for INSTALL within a source directory, because that will
2961     # break other packages using the cache if that directory is
2962     # removed, or if the path is relative.
2963     INSTALL="$ac_install_sh"
2964   fi
2965 fi
2966 echo "$ac_t""$INSTALL" 1>&6
2967
2968 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2969 # It thinks the first close brace ends the variable substitution.
2970 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2971
2972 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2973
2974 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2975
2976
2977 cat >> confdefs.h <<\EOF
2978 #define HAVE_MKVERSION 1
2979 EOF
2980
2981
2982
2983
2984 ol_aix_threads=no
2985 case "$target" in
2986 *-*-aix*)       if test -z "$CC" ; then
2987                 case "$ol_with_threads" in
2988                 auto | yes |  posix) ol_aix_threads=yes ;;
2989                 esac
2990         fi
2991 ;;
2992 esac
2993
2994 if test $ol_aix_threads = yes ; then
2995         if test -z "${CC}" ; then
2996                 for ac_prog in cc_r xlc_r cc
2997 do
2998 # Extract the first word of "$ac_prog", so it can be a program name with args.
2999 set dummy $ac_prog; ac_word=$2
3000 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3001 echo "configure:3002: checking for $ac_word" >&5
3002 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3003   echo $ac_n "(cached) $ac_c" 1>&6
3004 else
3005   if test -n "$CC"; then
3006   ac_cv_prog_CC="$CC" # Let the user override the test.
3007 else
3008   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3009   ac_dummy="$PATH"
3010   for ac_dir in $ac_dummy; do
3011     test -z "$ac_dir" && ac_dir=.
3012     if test -f $ac_dir/$ac_word; then
3013       ac_cv_prog_CC="$ac_prog"
3014       break
3015     fi
3016   done
3017   IFS="$ac_save_ifs"
3018 fi
3019 fi
3020 CC="$ac_cv_prog_CC"
3021 if test -n "$CC"; then
3022   echo "$ac_t""$CC" 1>&6
3023 else
3024   echo "$ac_t""no" 1>&6
3025 fi
3026
3027 test -n "$CC" && break
3028 done
3029
3030
3031                 if test "$CC" = cc ; then
3032                                                 if test $ol_with_threads != auto ; then
3033                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3034                         else
3035                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3036                         fi
3037                         ol_with_threads=no
3038                 fi
3039         fi
3040
3041         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3042                 ol_with_threads=posix
3043                 ol_cv_pthread_create=yes
3044         fi
3045 fi
3046
3047 if test -z "${CC}"; then
3048         for ac_prog in cc gcc
3049 do
3050 # Extract the first word of "$ac_prog", so it can be a program name with args.
3051 set dummy $ac_prog; ac_word=$2
3052 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3053 echo "configure:3054: checking for $ac_word" >&5
3054 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3055   echo $ac_n "(cached) $ac_c" 1>&6
3056 else
3057   if test -n "$CC"; then
3058   ac_cv_prog_CC="$CC" # Let the user override the test.
3059 else
3060   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3061   ac_dummy="$PATH"
3062   for ac_dir in $ac_dummy; do
3063     test -z "$ac_dir" && ac_dir=.
3064     if test -f $ac_dir/$ac_word; then
3065       ac_cv_prog_CC="$ac_prog"
3066       break
3067     fi
3068   done
3069   IFS="$ac_save_ifs"
3070 fi
3071 fi
3072 CC="$ac_cv_prog_CC"
3073 if test -n "$CC"; then
3074   echo "$ac_t""$CC" 1>&6
3075 else
3076   echo "$ac_t""no" 1>&6
3077 fi
3078
3079 test -n "$CC" && break
3080 done
3081 test -n "$CC" || CC="missing"
3082
3083
3084         if test "${CC}" = "missing" ; then
3085                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3086         fi
3087 fi
3088
3089 if test -z "${AR}"; then
3090         for ac_prog in ar gar
3091 do
3092 # Extract the first word of "$ac_prog", so it can be a program name with args.
3093 set dummy $ac_prog; ac_word=$2
3094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3095 echo "configure:3096: checking for $ac_word" >&5
3096 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3097   echo $ac_n "(cached) $ac_c" 1>&6
3098 else
3099   if test -n "$AR"; then
3100   ac_cv_prog_AR="$AR" # Let the user override the test.
3101 else
3102   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3103   ac_dummy="$PATH"
3104   for ac_dir in $ac_dummy; do
3105     test -z "$ac_dir" && ac_dir=.
3106     if test -f $ac_dir/$ac_word; then
3107       ac_cv_prog_AR="$ac_prog"
3108       break
3109     fi
3110   done
3111   IFS="$ac_save_ifs"
3112 fi
3113 fi
3114 AR="$ac_cv_prog_AR"
3115 if test -n "$AR"; then
3116   echo "$ac_t""$AR" 1>&6
3117 else
3118   echo "$ac_t""no" 1>&6
3119 fi
3120
3121 test -n "$AR" && break
3122 done
3123 test -n "$AR" || AR="missing"
3124
3125
3126         if test "${AR}" = "missing" ; then
3127                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3128         fi
3129 fi
3130
3131
3132
3133 # Find the correct PATH separator.  Usually this is `:', but
3134 # DJGPP uses `;' like DOS.
3135 if test "X${PATH_SEPARATOR+set}" != Xset; then
3136   UNAME=${UNAME-`uname 2>/dev/null`}
3137   case X$UNAME in
3138     *-DOS) lt_cv_sys_path_separator=';' ;;
3139     *)     lt_cv_sys_path_separator=':' ;;
3140   esac
3141   PATH_SEPARATOR=$lt_cv_sys_path_separator
3142 fi
3143
3144 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3145 echo "configure:3146: checking for Cygwin environment" >&5
3146 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3147   echo $ac_n "(cached) $ac_c" 1>&6
3148 else
3149   cat > conftest.$ac_ext <<EOF
3150 #line 3151 "configure"
3151 #include "confdefs.h"
3152
3153 int main() {
3154
3155 #ifndef __CYGWIN__
3156 #define __CYGWIN__ __CYGWIN32__
3157 #endif
3158 return __CYGWIN__;
3159 ; return 0; }
3160 EOF
3161 if { (eval echo configure:3162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3162   rm -rf conftest*
3163   ac_cv_cygwin=yes
3164 else
3165   echo "configure: failed program was:" >&5
3166   cat conftest.$ac_ext >&5
3167   rm -rf conftest*
3168   ac_cv_cygwin=no
3169 fi
3170 rm -f conftest*
3171 fi
3172
3173 echo "$ac_t""$ac_cv_cygwin" 1>&6
3174 CYGWIN=
3175 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3176 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3177 echo "configure:3178: checking for mingw32 environment" >&5
3178 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3179   echo $ac_n "(cached) $ac_c" 1>&6
3180 else
3181   cat > conftest.$ac_ext <<EOF
3182 #line 3183 "configure"
3183 #include "confdefs.h"
3184
3185 int main() {
3186 return __MINGW32__;
3187 ; return 0; }
3188 EOF
3189 if { (eval echo configure:3190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3190   rm -rf conftest*
3191   ac_cv_mingw32=yes
3192 else
3193   echo "configure: failed program was:" >&5
3194   cat conftest.$ac_ext >&5
3195   rm -rf conftest*
3196   ac_cv_mingw32=no
3197 fi
3198 rm -f conftest*
3199 fi
3200
3201 echo "$ac_t""$ac_cv_mingw32" 1>&6
3202 MINGW32=
3203 test "$ac_cv_mingw32" = yes && MINGW32=yes
3204 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3205 echo "configure:3206: checking for EMX OS/2 environment" >&5
3206 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3207   echo $ac_n "(cached) $ac_c" 1>&6
3208 else
3209   cat > conftest.$ac_ext <<EOF
3210 #line 3211 "configure"
3211 #include "confdefs.h"
3212
3213 int main() {
3214 return __EMX__;
3215 ; return 0; }
3216 EOF
3217 if { (eval echo configure:3218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3218   rm -rf conftest*
3219   ac_cv_emxos2=yes
3220 else
3221   echo "configure: failed program was:" >&5
3222   cat conftest.$ac_ext >&5
3223   rm -rf conftest*
3224   ac_cv_emxos2=no
3225 fi
3226 rm -f conftest*
3227 fi
3228
3229 echo "$ac_t""$ac_cv_emxos2" 1>&6
3230 EMXOS2=
3231 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3232 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3233 echo "configure:3234: checking how to run the C preprocessor" >&5
3234 # On Suns, sometimes $CPP names a directory.
3235 if test -n "$CPP" && test -d "$CPP"; then
3236   CPP=
3237 fi
3238 if test -z "$CPP"; then
3239 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3240   echo $ac_n "(cached) $ac_c" 1>&6
3241 else
3242     # This must be in double quotes, not single quotes, because CPP may get
3243   # substituted into the Makefile and "${CC-cc}" will confuse make.
3244   CPP="${CC-cc} -E"
3245   # On the NeXT, cc -E runs the code through the compiler's parser,
3246   # not just through cpp.
3247   cat > conftest.$ac_ext <<EOF
3248 #line 3249 "configure"
3249 #include "confdefs.h"
3250 #include <assert.h>
3251 Syntax Error
3252 EOF
3253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3254 { (eval echo configure:3255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3256 if test -z "$ac_err"; then
3257   :
3258 else
3259   echo "$ac_err" >&5
3260   echo "configure: failed program was:" >&5
3261   cat conftest.$ac_ext >&5
3262   rm -rf conftest*
3263   CPP="${CC-cc} -E -traditional-cpp"
3264   cat > conftest.$ac_ext <<EOF
3265 #line 3266 "configure"
3266 #include "confdefs.h"
3267 #include <assert.h>
3268 Syntax Error
3269 EOF
3270 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3271 { (eval echo configure:3272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3272 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3273 if test -z "$ac_err"; then
3274   :
3275 else
3276   echo "$ac_err" >&5
3277   echo "configure: failed program was:" >&5
3278   cat conftest.$ac_ext >&5
3279   rm -rf conftest*
3280   CPP="${CC-cc} -nologo -E"
3281   cat > conftest.$ac_ext <<EOF
3282 #line 3283 "configure"
3283 #include "confdefs.h"
3284 #include <assert.h>
3285 Syntax Error
3286 EOF
3287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3288 { (eval echo configure:3289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3290 if test -z "$ac_err"; then
3291   :
3292 else
3293   echo "$ac_err" >&5
3294   echo "configure: failed program was:" >&5
3295   cat conftest.$ac_ext >&5
3296   rm -rf conftest*
3297   CPP=/lib/cpp
3298 fi
3299 rm -f conftest*
3300 fi
3301 rm -f conftest*
3302 fi
3303 rm -f conftest*
3304   ac_cv_prog_CPP="$CPP"
3305 fi
3306   CPP="$ac_cv_prog_CPP"
3307 else
3308   ac_cv_prog_CPP="$CPP"
3309 fi
3310 echo "$ac_t""$CPP" 1>&6
3311
3312 # Check whether --enable-fast-install or --disable-fast-install was given.
3313 if test "${enable_fast_install+set}" = set; then
3314   enableval="$enable_fast_install"
3315   p=${PACKAGE-default}
3316 case $enableval in
3317 yes) enable_fast_install=yes ;;
3318 no) enable_fast_install=no ;;
3319 *)
3320   enable_fast_install=no
3321   # Look at the argument we got.  We use all the common list separators.
3322   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3323   for pkg in $enableval; do
3324     if test "X$pkg" = "X$p"; then
3325       enable_fast_install=yes
3326     fi
3327   done
3328   IFS="$ac_save_ifs"
3329   ;;
3330 esac
3331 else
3332   enable_fast_install=yes
3333 fi
3334
3335 # Extract the first word of "gcc", so it can be a program name with args.
3336 set dummy gcc; ac_word=$2
3337 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3338 echo "configure:3339: checking for $ac_word" >&5
3339 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3340   echo $ac_n "(cached) $ac_c" 1>&6
3341 else
3342   if test -n "$CC"; then
3343   ac_cv_prog_CC="$CC" # Let the user override the test.
3344 else
3345   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3346   ac_dummy="$PATH"
3347   for ac_dir in $ac_dummy; do
3348     test -z "$ac_dir" && ac_dir=.
3349     if test -f $ac_dir/$ac_word; then
3350       ac_cv_prog_CC="gcc"
3351       break
3352     fi
3353   done
3354   IFS="$ac_save_ifs"
3355 fi
3356 fi
3357 CC="$ac_cv_prog_CC"
3358 if test -n "$CC"; then
3359   echo "$ac_t""$CC" 1>&6
3360 else
3361   echo "$ac_t""no" 1>&6
3362 fi
3363
3364 if test -z "$CC"; then
3365   # Extract the first word of "cc", so it can be a program name with args.
3366 set dummy cc; ac_word=$2
3367 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3368 echo "configure:3369: checking for $ac_word" >&5
3369 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3370   echo $ac_n "(cached) $ac_c" 1>&6
3371 else
3372   if test -n "$CC"; then
3373   ac_cv_prog_CC="$CC" # Let the user override the test.
3374 else
3375   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3376   ac_prog_rejected=no
3377   ac_dummy="$PATH"
3378   for ac_dir in $ac_dummy; do
3379     test -z "$ac_dir" && ac_dir=.
3380     if test -f $ac_dir/$ac_word; then
3381       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3382         ac_prog_rejected=yes
3383         continue
3384       fi
3385       ac_cv_prog_CC="cc"
3386       break
3387     fi
3388   done
3389   IFS="$ac_save_ifs"
3390 if test $ac_prog_rejected = yes; then
3391   # We found a bogon in the path, so make sure we never use it.
3392   set dummy $ac_cv_prog_CC
3393   shift
3394   if test $# -gt 0; then
3395     # We chose a different compiler from the bogus one.
3396     # However, it has the same basename, so the bogon will be chosen
3397     # first if we set CC to just the basename; use the full file name.
3398     shift
3399     set dummy "$ac_dir/$ac_word" "$@"
3400     shift
3401     ac_cv_prog_CC="$@"
3402   fi
3403 fi
3404 fi
3405 fi
3406 CC="$ac_cv_prog_CC"
3407 if test -n "$CC"; then
3408   echo "$ac_t""$CC" 1>&6
3409 else
3410   echo "$ac_t""no" 1>&6
3411 fi
3412
3413   if test -z "$CC"; then
3414     case "`uname -s`" in
3415     *win32* | *WIN32* | *CYGWIN*)
3416       # Extract the first word of "cl", so it can be a program name with args.
3417 set dummy cl; ac_word=$2
3418 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3419 echo "configure:3420: checking for $ac_word" >&5
3420 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3421   echo $ac_n "(cached) $ac_c" 1>&6
3422 else
3423   if test -n "$CC"; then
3424   ac_cv_prog_CC="$CC" # Let the user override the test.
3425 else
3426   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3427   ac_dummy="$PATH"
3428   for ac_dir in $ac_dummy; do
3429     test -z "$ac_dir" && ac_dir=.
3430     if test -f $ac_dir/$ac_word; then
3431       ac_cv_prog_CC="cl"
3432       break
3433     fi
3434   done
3435   IFS="$ac_save_ifs"
3436 fi
3437 fi
3438 CC="$ac_cv_prog_CC"
3439 if test -n "$CC"; then
3440   echo "$ac_t""$CC" 1>&6
3441 else
3442   echo "$ac_t""no" 1>&6
3443 fi
3444  ;;
3445     esac
3446   fi
3447   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3448 fi
3449
3450 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3451 echo "configure:3452: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3452
3453 ac_ext=c
3454 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3455 ac_cpp='$CPP $CPPFLAGS'
3456 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3457 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3458 cross_compiling=$ac_cv_prog_cc_cross
3459
3460 cat > conftest.$ac_ext << EOF
3461
3462 #line 3463 "configure"
3463 #include "confdefs.h"
3464
3465 main(){return(0);}
3466 EOF
3467 if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3468   ac_cv_prog_cc_works=yes
3469   # If we can't run a trivial program, we are probably using a cross compiler.
3470   if (./conftest; exit) 2>/dev/null; then
3471     ac_cv_prog_cc_cross=no
3472   else
3473     ac_cv_prog_cc_cross=yes
3474   fi
3475 else
3476   echo "configure: failed program was:" >&5
3477   cat conftest.$ac_ext >&5
3478   ac_cv_prog_cc_works=no
3479 fi
3480 rm -fr conftest*
3481 ac_ext=c
3482 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3483 ac_cpp='$CPP $CPPFLAGS'
3484 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3485 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3486 cross_compiling=$ac_cv_prog_cc_cross
3487
3488 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3489 if test $ac_cv_prog_cc_works = no; then
3490   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3491 fi
3492 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3493 echo "configure:3494: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3494 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3495 cross_compiling=$ac_cv_prog_cc_cross
3496
3497 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3498 echo "configure:3499: checking whether we are using GNU C" >&5
3499 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3500   echo $ac_n "(cached) $ac_c" 1>&6
3501 else
3502   cat > conftest.c <<EOF
3503 #ifdef __GNUC__
3504   yes;
3505 #endif
3506 EOF
3507 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3508   ac_cv_prog_gcc=yes
3509 else
3510   ac_cv_prog_gcc=no
3511 fi
3512 fi
3513
3514 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3515
3516 if test $ac_cv_prog_gcc = yes; then
3517   GCC=yes
3518 else
3519   GCC=
3520 fi
3521
3522 ac_test_CFLAGS="${CFLAGS+set}"
3523 ac_save_CFLAGS="$CFLAGS"
3524 CFLAGS=
3525 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3526 echo "configure:3527: checking whether ${CC-cc} accepts -g" >&5
3527 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3528   echo $ac_n "(cached) $ac_c" 1>&6
3529 else
3530   echo 'void f(){}' > conftest.c
3531 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3532   ac_cv_prog_cc_g=yes
3533 else
3534   ac_cv_prog_cc_g=no
3535 fi
3536 rm -f conftest*
3537
3538 fi
3539
3540 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3541 if test "$ac_test_CFLAGS" = set; then
3542   CFLAGS="$ac_save_CFLAGS"
3543 elif test $ac_cv_prog_cc_g = yes; then
3544   if test "$GCC" = yes; then
3545     CFLAGS="-g -O2"
3546   else
3547     CFLAGS="-g"
3548   fi
3549 else
3550   if test "$GCC" = yes; then
3551     CFLAGS="-O2"
3552   else
3553     CFLAGS=
3554   fi
3555 fi
3556
3557 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3558 if test "${with_gnu_ld+set}" = set; then
3559   withval="$with_gnu_ld"
3560   test "$withval" = no || with_gnu_ld=yes
3561 else
3562   with_gnu_ld=no
3563 fi
3564
3565 ac_prog=ld
3566 if test "$GCC" = yes; then
3567   # Check if gcc -print-prog-name=ld gives a path.
3568   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3569 echo "configure:3570: checking for ld used by GCC" >&5
3570   case $host in
3571   *-*-mingw*)
3572     # gcc leaves a trailing carriage return which upsets mingw
3573     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3574   *)
3575     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3576   esac
3577   case $ac_prog in
3578     # Accept absolute paths.
3579     [\\/]* | [A-Za-z]:[\\/]*)
3580       re_direlt='/[^/][^/]*/\.\./'
3581       # Canonicalize the path of ld
3582       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3583       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3584         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3585       done
3586       test -z "$LD" && LD="$ac_prog"
3587       ;;
3588   "")
3589     # If it fails, then pretend we aren't using GCC.
3590     ac_prog=ld
3591     ;;
3592   *)
3593     # If it is relative, then search for the first ld in PATH.
3594     with_gnu_ld=unknown
3595     ;;
3596   esac
3597 elif test "$with_gnu_ld" = yes; then
3598   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3599 echo "configure:3600: checking for GNU ld" >&5
3600 else
3601   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3602 echo "configure:3603: checking for non-GNU ld" >&5
3603 fi
3604 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   if test -z "$LD"; then
3608   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3609   for ac_dir in $PATH; do
3610     test -z "$ac_dir" && ac_dir=.
3611     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3612       lt_cv_path_LD="$ac_dir/$ac_prog"
3613       # Check to see if the program is GNU ld.  I'd rather use --version,
3614       # but apparently some GNU ld's only accept -v.
3615       # Break only if it was the GNU/non-GNU ld that we prefer.
3616       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3617         test "$with_gnu_ld" != no && break
3618       else
3619         test "$with_gnu_ld" != yes && break
3620       fi
3621     fi
3622   done
3623   IFS="$ac_save_ifs"
3624 else
3625   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3626 fi
3627 fi
3628
3629 LD="$lt_cv_path_LD"
3630 if test -n "$LD"; then
3631   echo "$ac_t""$LD" 1>&6
3632 else
3633   echo "$ac_t""no" 1>&6
3634 fi
3635 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3636 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3637 echo "configure:3638: checking if the linker ($LD) is GNU ld" >&5
3638 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3639   echo $ac_n "(cached) $ac_c" 1>&6
3640 else
3641   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3642 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3643   lt_cv_prog_gnu_ld=yes
3644 else
3645   lt_cv_prog_gnu_ld=no
3646 fi
3647 fi
3648
3649 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3650 with_gnu_ld=$lt_cv_prog_gnu_ld
3651
3652
3653 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3654 echo "configure:3655: checking for $LD option to reload object files" >&5
3655 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3656   echo $ac_n "(cached) $ac_c" 1>&6
3657 else
3658   lt_cv_ld_reload_flag='-r'
3659 fi
3660
3661 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3662 reload_flag=$lt_cv_ld_reload_flag
3663 test -n "$reload_flag" && reload_flag=" $reload_flag"
3664
3665 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3666 echo "configure:3667: checking for BSD-compatible nm" >&5
3667 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3668   echo $ac_n "(cached) $ac_c" 1>&6
3669 else
3670   if test -n "$NM"; then
3671   # Let the user override the test.
3672   lt_cv_path_NM="$NM"
3673 else
3674   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3675   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3676     test -z "$ac_dir" && ac_dir=.
3677     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3678     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3679       # Check to see if the nm accepts a BSD-compat flag.
3680       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3681       #   nm: unknown option "B" ignored
3682       # Tru64's nm complains that /dev/null is an invalid object file
3683       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3684         lt_cv_path_NM="$tmp_nm -B"
3685         break
3686       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3687         lt_cv_path_NM="$tmp_nm -p"
3688         break
3689       else
3690         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3691         continue # so that we can try to find one that supports BSD flags
3692       fi
3693     fi
3694   done
3695   IFS="$ac_save_ifs"
3696   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3697 fi
3698 fi
3699
3700 NM="$lt_cv_path_NM"
3701 echo "$ac_t""$NM" 1>&6
3702
3703 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3704 echo "configure:3705: checking for a sed that does not truncate output" >&5
3705 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3706   echo $ac_n "(cached) $ac_c" 1>&6
3707 else
3708   # Loop through the user's path and test for sed and gsed.
3709 # Then use that list of sed's as ones to test for truncation.
3710 as_executable_p="test -f"
3711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3712 for as_dir in $PATH
3713 do
3714   IFS=$as_save_IFS
3715   test -z "$as_dir" && as_dir=.
3716   for ac_prog in sed gsed; do
3717     for ac_exec_ext in '' $ac_executable_extensions; do
3718       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3719         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3720       fi
3721     done
3722   done
3723 done
3724
3725   # Create a temporary directory, and hook for its removal unless debugging.
3726 $debug ||
3727 {
3728   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3729   trap '{ (exit 1); exit 1; }' 1 2 13 15
3730 }
3731
3732 # Create a (secure) tmp directory for tmp files.
3733 : ${TMPDIR=/tmp}
3734 {
3735   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3736   test -n "$tmp" && test -d "$tmp"
3737 }  ||
3738 {
3739   tmp=$TMPDIR/sed$$-$RANDOM
3740   (umask 077 && mkdir $tmp)
3741 } ||
3742 {
3743    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3744    { (exit 1); exit 1; }
3745 }
3746   _max=0
3747   _count=0
3748   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3749   # along with /bin/sed that truncates output.
3750   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3751     test ! -f ${_sed} && break
3752     cat /dev/null > "$tmp/sed.in"
3753     _count=0
3754     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3755     # Check for GNU sed and select it if it is found.
3756     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3757       lt_cv_path_SED=${_sed}
3758       break
3759     fi
3760     while true; do
3761       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3762       mv "$tmp/sed.tmp" "$tmp/sed.in"
3763       cp "$tmp/sed.in" "$tmp/sed.nl"
3764       echo >>"$tmp/sed.nl"
3765       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3766       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3767       # 40000 chars as input seems more than enough
3768       test $_count -gt 10 && break
3769       _count=`expr $_count + 1`
3770       if test $_count -gt $_max; then
3771         _max=$_count
3772         lt_cv_path_SED=$_sed
3773       fi
3774     done
3775   done
3776   rm -rf "$tmp"
3777
3778 fi
3779
3780 if test "X$SED" != "X"; then
3781   lt_cv_path_SED=$SED
3782 else
3783   SED=$lt_cv_path_SED
3784 fi
3785 echo "$ac_t""$SED" 1>&6
3786
3787 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3788 echo "configure:3789: checking whether ln -s works" >&5
3789 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3790   echo $ac_n "(cached) $ac_c" 1>&6
3791 else
3792   rm -f conftestdata
3793 if ln -s X conftestdata 2>/dev/null
3794 then
3795   rm -f conftestdata
3796   ac_cv_prog_LN_S="ln -s"
3797 else
3798   ac_cv_prog_LN_S=ln
3799 fi
3800 fi
3801 LN_S="$ac_cv_prog_LN_S"
3802 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3803   echo "$ac_t""yes" 1>&6
3804 else
3805   echo "$ac_t""no" 1>&6
3806 fi
3807
3808 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3809 echo "configure:3810: checking how to recognise dependent libraries" >&5
3810 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3811   echo $ac_n "(cached) $ac_c" 1>&6
3812 else
3813   lt_cv_file_magic_cmd='$MAGIC_CMD'
3814 lt_cv_file_magic_test_file=
3815 lt_cv_deplibs_check_method='unknown'
3816 # Need to set the preceding variable on all platforms that support
3817 # interlibrary dependencies.
3818 # 'none' -- dependencies not supported.
3819 # `unknown' -- same as none, but documents that we really don't know.
3820 # 'pass_all' -- all dependencies passed with no checks.
3821 # 'test_compile' -- check by making test program.
3822 # 'file_magic [[regex]]' -- check by looking for files in library path
3823 # which responds to the $file_magic_cmd with a given egrep regex.
3824 # If you have `file' or equivalent on your system and you're not sure
3825 # whether `pass_all' will *always* work, you probably want this one.
3826
3827 case $host_os in
3828 aix4* | aix5*)
3829   lt_cv_deplibs_check_method=pass_all
3830   ;;
3831
3832 beos*)
3833   lt_cv_deplibs_check_method=pass_all
3834   ;;
3835
3836 bsdi4*)
3837   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3838   lt_cv_file_magic_cmd='/usr/bin/file -L'
3839   lt_cv_file_magic_test_file=/shlib/libc.so
3840   ;;
3841
3842 cygwin* | mingw* | pw32*)
3843   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3844   lt_cv_file_magic_cmd='$OBJDUMP -f'
3845   ;;
3846
3847 darwin* | rhapsody*)
3848   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3849   lt_cv_file_magic_cmd='/usr/bin/file -L'
3850   case "$host_os" in
3851   rhapsody* | darwin1.[012])
3852     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3853     ;;
3854   *) # Darwin 1.3 on
3855     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3856     ;;
3857   esac
3858   ;;
3859
3860 freebsd*)
3861   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3862     case $host_cpu in
3863     i*86 )
3864       # Not sure whether the presence of OpenBSD here was a mistake.
3865       # Let's accept both of them until this is cleared up.
3866       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3867       lt_cv_file_magic_cmd=/usr/bin/file
3868       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3869       ;;
3870     esac
3871   else
3872     lt_cv_deplibs_check_method=pass_all
3873   fi
3874   ;;
3875
3876 gnu*)
3877   lt_cv_deplibs_check_method=pass_all
3878   ;;
3879
3880 hpux10.20*|hpux11*)
3881   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3882   lt_cv_file_magic_cmd=/usr/bin/file
3883   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3884   ;;
3885
3886 irix5* | irix6* | nonstopux*)
3887   case $host_os in
3888   irix5* | nonstopux*)
3889     # this will be overridden with pass_all, but let us keep it just in case
3890     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3891     ;;
3892   *)
3893     case $LD in
3894     *-32|*"-32 ") libmagic=32-bit;;
3895     *-n32|*"-n32 ") libmagic=N32;;
3896     *-64|*"-64 ") libmagic=64-bit;;
3897     *) libmagic=never-match;;
3898     esac
3899     # this will be overridden with pass_all, but let us keep it just in case
3900     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3901     ;;
3902   esac
3903   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3904   lt_cv_deplibs_check_method=pass_all
3905   ;;
3906
3907 # This must be Linux ELF.
3908 linux-gnu*)
3909   case $host_cpu in
3910   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3911     lt_cv_deplibs_check_method=pass_all ;;
3912   *)
3913     # glibc up to 2.1.1 does not perform some relocations on ARM
3914     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3915   esac
3916   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3917   ;;
3918
3919 netbsd*)
3920   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3921     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3922   else
3923     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3924   fi
3925   ;;
3926
3927 newos6*)
3928   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3929   lt_cv_file_magic_cmd=/usr/bin/file
3930   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3931   ;;
3932
3933 openbsd*)
3934   lt_cv_file_magic_cmd=/usr/bin/file
3935   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3936   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3937     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3938   else
3939     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3940   fi
3941   ;;
3942
3943 osf3* | osf4* | osf5*)
3944   # this will be overridden with pass_all, but let us keep it just in case
3945   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3946   lt_cv_file_magic_test_file=/shlib/libc.so
3947   lt_cv_deplibs_check_method=pass_all
3948   ;;
3949
3950 sco3.2v5*)
3951   lt_cv_deplibs_check_method=pass_all
3952   ;;
3953
3954 solaris*)
3955   lt_cv_deplibs_check_method=pass_all
3956   lt_cv_file_magic_test_file=/lib/libc.so
3957   ;;
3958
3959 sysv5uw[78]* | sysv4*uw2*)
3960   lt_cv_deplibs_check_method=pass_all
3961   ;;
3962
3963 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3964   case $host_vendor in
3965   motorola)
3966     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]'
3967     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3968     ;;
3969   ncr)
3970     lt_cv_deplibs_check_method=pass_all
3971     ;;
3972   sequent)
3973     lt_cv_file_magic_cmd='/bin/file'
3974     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3975     ;;
3976   sni)
3977     lt_cv_file_magic_cmd='/bin/file'
3978     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3979     lt_cv_file_magic_test_file=/lib/libc.so
3980     ;;
3981   siemens)
3982     lt_cv_deplibs_check_method=pass_all
3983     ;;
3984   esac
3985   ;;
3986 esac
3987
3988 fi
3989
3990 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3991 file_magic_cmd=$lt_cv_file_magic_cmd
3992 deplibs_check_method=$lt_cv_deplibs_check_method
3993
3994 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3995 echo "configure:3996: checking for object suffix" >&5
3996 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3997   echo $ac_n "(cached) $ac_c" 1>&6
3998 else
3999   rm -f conftest*
4000 echo 'int i = 1;' > conftest.$ac_ext
4001 if { (eval echo configure:4002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4002   for ac_file in conftest.*; do
4003     case $ac_file in
4004     *.c) ;;
4005     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4006     esac
4007   done
4008 else
4009   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4010 fi
4011 rm -f conftest*
4012 fi
4013
4014 echo "$ac_t""$ac_cv_objext" 1>&6
4015 OBJEXT=$ac_cv_objext
4016 ac_objext=$ac_cv_objext
4017
4018
4019
4020
4021 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4022 echo "configure:4023: checking for executable suffix" >&5
4023 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4024   echo $ac_n "(cached) $ac_c" 1>&6
4025 else
4026   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4027   ac_cv_exeext=.exe
4028 else
4029   rm -f conftest*
4030   echo 'int main () { return 0; }' > conftest.$ac_ext
4031   ac_cv_exeext=
4032   if { (eval echo configure:4033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4033     for file in conftest.*; do
4034       case $file in
4035       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4036       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4037       esac
4038     done
4039   else
4040     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4041   fi
4042   rm -f conftest*
4043   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4044 fi
4045 fi
4046
4047 EXEEXT=""
4048 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4049 echo "$ac_t""${ac_cv_exeext}" 1>&6
4050 ac_exeext=$EXEEXT
4051
4052 if test $host != $build; then
4053   ac_tool_prefix=${host_alias}-
4054 else
4055   ac_tool_prefix=
4056 fi
4057
4058
4059
4060
4061 # Check for command to grab the raw symbol name followed by C symbol from nm.
4062 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4063 echo "configure:4064: checking command to parse $NM output" >&5
4064 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4065   echo $ac_n "(cached) $ac_c" 1>&6
4066 else
4067   
4068 # These are sane defaults that work on at least a few old systems.
4069 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4070
4071 # Character class describing NM global symbol codes.
4072 symcode='[BCDEGRST]'
4073
4074 # Regexp to match symbols that can be accessed directly from C.
4075 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4076
4077 # Transform the above into a raw symbol and a C symbol.
4078 symxfrm='\1 \2\3 \3'
4079
4080 # Transform an extracted symbol line into a proper C declaration
4081 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4082
4083 # Transform an extracted symbol line into symbol name and symbol address
4084 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'"
4085
4086 # Define system-specific variables.
4087 case $host_os in
4088 aix*)
4089   symcode='[BCDT]'
4090   ;;
4091 cygwin* | mingw* | pw32*)
4092   symcode='[ABCDGISTW]'
4093   ;;
4094 hpux*) # Its linker distinguishes data from code symbols
4095   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4096   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'"
4097   ;;
4098 irix* | nonstopux*)
4099   symcode='[BCDEGRST]'
4100   ;;
4101 osf*)
4102   symcode='[BCDEGQRST]'
4103   ;;
4104 solaris* | sysv5*)
4105   symcode='[BDT]'
4106   ;;
4107 sysv4)
4108   symcode='[DFNSTU]'
4109   ;;
4110 esac
4111
4112 # Handle CRLF in mingw tool chain
4113 opt_cr=
4114 case $host_os in
4115 mingw*)
4116   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4117   ;;
4118 esac
4119
4120 # If we're using GNU nm, then use its standard symbol codes.
4121 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4122   symcode='[ABCDGISTW]'
4123 fi
4124
4125 # Try without a prefix undercore, then with it.
4126 for ac_symprfx in "" "_"; do
4127
4128   # Write the raw and C identifiers.
4129 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4130
4131   # Check to see that the pipe works correctly.
4132   pipe_works=no
4133   rm -f conftest*
4134   cat > conftest.$ac_ext <<EOF
4135 #ifdef __cplusplus
4136 extern "C" {
4137 #endif
4138 char nm_test_var;
4139 void nm_test_func(){}
4140 #ifdef __cplusplus
4141 }
4142 #endif
4143 int main(){nm_test_var='a';nm_test_func();return(0);}
4144 EOF
4145
4146   if { (eval echo configure:4147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4147     # Now try to grab the symbols.
4148     nlist=conftest.nm
4149     if { (eval echo configure:4150: \"$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
4150       # Try sorting and uniquifying the output.
4151       if sort "$nlist" | uniq > "$nlist"T; then
4152         mv -f "$nlist"T "$nlist"
4153       else
4154         rm -f "$nlist"T
4155       fi
4156
4157       # Make sure that we snagged all the symbols we need.
4158       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4159         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4160           cat <<EOF > conftest.$ac_ext
4161 #ifdef __cplusplus
4162 extern "C" {
4163 #endif
4164
4165 EOF
4166           # Now generate the symbol file.
4167           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4168
4169           cat <<EOF >> conftest.$ac_ext
4170 #if defined (__STDC__) && __STDC__
4171 # define lt_ptr void *
4172 #else
4173 # define lt_ptr char *
4174 # define const
4175 #endif
4176
4177 /* The mapping between symbol names and symbols. */
4178 const struct {
4179   const char *name;
4180   lt_ptr address;
4181 }
4182 lt_preloaded_symbols[] =
4183 {
4184 EOF
4185           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4186           cat <<\EOF >> conftest.$ac_ext
4187   {0, (lt_ptr) 0}
4188 };
4189
4190 #ifdef __cplusplus
4191 }
4192 #endif
4193 EOF
4194           # Now try linking the two files.
4195           mv conftest.$ac_objext conftstm.$ac_objext
4196           save_LIBS="$LIBS"
4197           save_CFLAGS="$CFLAGS"
4198           LIBS="conftstm.$ac_objext"
4199           CFLAGS="$CFLAGS$no_builtin_flag"
4200           if { (eval echo configure:4201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4201             pipe_works=yes
4202           fi
4203           LIBS="$save_LIBS"
4204           CFLAGS="$save_CFLAGS"
4205         else
4206           echo "cannot find nm_test_func in $nlist" >&5
4207         fi
4208       else
4209         echo "cannot find nm_test_var in $nlist" >&5
4210       fi
4211     else
4212       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4213     fi
4214   else
4215     echo "$progname: failed program was:" >&5
4216     cat conftest.$ac_ext >&5
4217   fi
4218   rm -f conftest* conftst*
4219
4220   # Do not use the global_symbol_pipe unless it works.
4221   if test "$pipe_works" = yes; then
4222     break
4223   else
4224     lt_cv_sys_global_symbol_pipe=
4225   fi
4226 done
4227
4228 fi
4229
4230 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4231 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4232   global_symbol_to_cdecl=
4233   global_symbol_to_c_name_address=
4234 else
4235   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4236   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4237 fi
4238 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4239 then
4240   echo "$ac_t""failed" 1>&6
4241 else
4242   echo "$ac_t""ok" 1>&6
4243 fi
4244
4245 for ac_hdr in dlfcn.h
4246 do
4247 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4248 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4249 echo "configure:4250: checking for $ac_hdr" >&5
4250 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4251   echo $ac_n "(cached) $ac_c" 1>&6
4252 else
4253   cat > conftest.$ac_ext <<EOF
4254 #line 4255 "configure"
4255 #include "confdefs.h"
4256 #include <$ac_hdr>
4257 EOF
4258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4259 { (eval echo configure:4260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4261 if test -z "$ac_err"; then
4262   rm -rf conftest*
4263   eval "ac_cv_header_$ac_safe=yes"
4264 else
4265   echo "$ac_err" >&5
4266   echo "configure: failed program was:" >&5
4267   cat conftest.$ac_ext >&5
4268   rm -rf conftest*
4269   eval "ac_cv_header_$ac_safe=no"
4270 fi
4271 rm -f conftest*
4272 fi
4273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4274   echo "$ac_t""yes" 1>&6
4275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4276   cat >> confdefs.h <<EOF
4277 #define $ac_tr_hdr 1
4278 EOF
4279  
4280 else
4281   echo "$ac_t""no" 1>&6
4282 fi
4283 done
4284
4285
4286
4287
4288
4289
4290 # Only perform the check for file, if the check method requires it
4291 case $deplibs_check_method in
4292 file_magic*)
4293   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4294     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4295 echo "configure:4296: checking for ${ac_tool_prefix}file" >&5
4296 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4297   echo $ac_n "(cached) $ac_c" 1>&6
4298 else
4299   case $MAGIC_CMD in
4300   /*)
4301   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4302   ;;
4303   ?:/*)
4304   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4305   ;;
4306   *)
4307   ac_save_MAGIC_CMD="$MAGIC_CMD"
4308   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4309   ac_dummy="/usr/bin:$PATH"
4310   for ac_dir in $ac_dummy; do
4311     test -z "$ac_dir" && ac_dir=.
4312     if test -f $ac_dir/${ac_tool_prefix}file; then
4313       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4314       if test -n "$file_magic_test_file"; then
4315         case $deplibs_check_method in
4316         "file_magic "*)
4317           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4318           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4319           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4320             egrep "$file_magic_regex" > /dev/null; then
4321             :
4322           else
4323             cat <<EOF 1>&2
4324
4325 *** Warning: the command libtool uses to detect shared libraries,
4326 *** $file_magic_cmd, produces output that libtool cannot recognize.
4327 *** The result is that libtool may fail to recognize shared libraries
4328 *** as such.  This will affect the creation of libtool libraries that
4329 *** depend on shared libraries, but programs linked with such libtool
4330 *** libraries will work regardless of this problem.  Nevertheless, you
4331 *** may want to report the problem to your system manager and/or to
4332 *** bug-libtool@gnu.org
4333
4334 EOF
4335           fi ;;
4336         esac
4337       fi
4338       break
4339     fi
4340   done
4341   IFS="$ac_save_ifs"
4342   MAGIC_CMD="$ac_save_MAGIC_CMD"
4343   ;;
4344 esac
4345 fi
4346
4347 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4348 if test -n "$MAGIC_CMD"; then
4349   echo "$ac_t""$MAGIC_CMD" 1>&6
4350 else
4351   echo "$ac_t""no" 1>&6
4352 fi
4353
4354 if test -z "$lt_cv_path_MAGIC_CMD"; then
4355   if test -n "$ac_tool_prefix"; then
4356     echo $ac_n "checking for file""... $ac_c" 1>&6
4357 echo "configure:4358: checking for file" >&5
4358 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4359   echo $ac_n "(cached) $ac_c" 1>&6
4360 else
4361   case $MAGIC_CMD in
4362   /*)
4363   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4364   ;;
4365   ?:/*)
4366   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4367   ;;
4368   *)
4369   ac_save_MAGIC_CMD="$MAGIC_CMD"
4370   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4371   ac_dummy="/usr/bin:$PATH"
4372   for ac_dir in $ac_dummy; do
4373     test -z "$ac_dir" && ac_dir=.
4374     if test -f $ac_dir/file; then
4375       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4376       if test -n "$file_magic_test_file"; then
4377         case $deplibs_check_method in
4378         "file_magic "*)
4379           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4380           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4381           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4382             egrep "$file_magic_regex" > /dev/null; then
4383             :
4384           else
4385             cat <<EOF 1>&2
4386
4387 *** Warning: the command libtool uses to detect shared libraries,
4388 *** $file_magic_cmd, produces output that libtool cannot recognize.
4389 *** The result is that libtool may fail to recognize shared libraries
4390 *** as such.  This will affect the creation of libtool libraries that
4391 *** depend on shared libraries, but programs linked with such libtool
4392 *** libraries will work regardless of this problem.  Nevertheless, you
4393 *** may want to report the problem to your system manager and/or to
4394 *** bug-libtool@gnu.org
4395
4396 EOF
4397           fi ;;
4398         esac
4399       fi
4400       break
4401     fi
4402   done
4403   IFS="$ac_save_ifs"
4404   MAGIC_CMD="$ac_save_MAGIC_CMD"
4405   ;;
4406 esac
4407 fi
4408
4409 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4410 if test -n "$MAGIC_CMD"; then
4411   echo "$ac_t""$MAGIC_CMD" 1>&6
4412 else
4413   echo "$ac_t""no" 1>&6
4414 fi
4415
4416   else
4417     MAGIC_CMD=:
4418   fi
4419 fi
4420
4421   fi
4422   ;;
4423 esac
4424
4425 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4426 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4427 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4428 echo "configure:4429: checking for $ac_word" >&5
4429 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4430   echo $ac_n "(cached) $ac_c" 1>&6
4431 else
4432   if test -n "$RANLIB"; then
4433   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4434 else
4435   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4436   ac_dummy="$PATH"
4437   for ac_dir in $ac_dummy; do
4438     test -z "$ac_dir" && ac_dir=.
4439     if test -f $ac_dir/$ac_word; then
4440       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4441       break
4442     fi
4443   done
4444   IFS="$ac_save_ifs"
4445 fi
4446 fi
4447 RANLIB="$ac_cv_prog_RANLIB"
4448 if test -n "$RANLIB"; then
4449   echo "$ac_t""$RANLIB" 1>&6
4450 else
4451   echo "$ac_t""no" 1>&6
4452 fi
4453
4454
4455 if test -z "$ac_cv_prog_RANLIB"; then
4456 if test -n "$ac_tool_prefix"; then
4457   # Extract the first word of "ranlib", so it can be a program name with args.
4458 set dummy ranlib; ac_word=$2
4459 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4460 echo "configure:4461: checking for $ac_word" >&5
4461 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4462   echo $ac_n "(cached) $ac_c" 1>&6
4463 else
4464   if test -n "$RANLIB"; then
4465   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4466 else
4467   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4468   ac_dummy="$PATH"
4469   for ac_dir in $ac_dummy; do
4470     test -z "$ac_dir" && ac_dir=.
4471     if test -f $ac_dir/$ac_word; then
4472       ac_cv_prog_RANLIB="ranlib"
4473       break
4474     fi
4475   done
4476   IFS="$ac_save_ifs"
4477   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4478 fi
4479 fi
4480 RANLIB="$ac_cv_prog_RANLIB"
4481 if test -n "$RANLIB"; then
4482   echo "$ac_t""$RANLIB" 1>&6
4483 else
4484   echo "$ac_t""no" 1>&6
4485 fi
4486
4487 else
4488   RANLIB=":"
4489 fi
4490 fi
4491
4492 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4493 set dummy ${ac_tool_prefix}strip; ac_word=$2
4494 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4495 echo "configure:4496: checking for $ac_word" >&5
4496 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4497   echo $ac_n "(cached) $ac_c" 1>&6
4498 else
4499   if test -n "$STRIP"; then
4500   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4501 else
4502   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4503   ac_dummy="$PATH"
4504   for ac_dir in $ac_dummy; do
4505     test -z "$ac_dir" && ac_dir=.
4506     if test -f $ac_dir/$ac_word; then
4507       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4508       break
4509     fi
4510   done
4511   IFS="$ac_save_ifs"
4512 fi
4513 fi
4514 STRIP="$ac_cv_prog_STRIP"
4515 if test -n "$STRIP"; then
4516   echo "$ac_t""$STRIP" 1>&6
4517 else
4518   echo "$ac_t""no" 1>&6
4519 fi
4520
4521
4522 if test -z "$ac_cv_prog_STRIP"; then
4523 if test -n "$ac_tool_prefix"; then
4524   # Extract the first word of "strip", so it can be a program name with args.
4525 set dummy strip; ac_word=$2
4526 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4527 echo "configure:4528: checking for $ac_word" >&5
4528 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4529   echo $ac_n "(cached) $ac_c" 1>&6
4530 else
4531   if test -n "$STRIP"; then
4532   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4533 else
4534   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4535   ac_dummy="$PATH"
4536   for ac_dir in $ac_dummy; do
4537     test -z "$ac_dir" && ac_dir=.
4538     if test -f $ac_dir/$ac_word; then
4539       ac_cv_prog_STRIP="strip"
4540       break
4541     fi
4542   done
4543   IFS="$ac_save_ifs"
4544   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4545 fi
4546 fi
4547 STRIP="$ac_cv_prog_STRIP"
4548 if test -n "$STRIP"; then
4549   echo "$ac_t""$STRIP" 1>&6
4550 else
4551   echo "$ac_t""no" 1>&6
4552 fi
4553
4554 else
4555   STRIP=":"
4556 fi
4557 fi
4558
4559
4560 enable_dlopen=yes
4561 enable_win32_dll=yes
4562
4563 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4564 if test "${enable_libtool_lock+set}" = set; then
4565   enableval="$enable_libtool_lock"
4566   :
4567 fi
4568
4569 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4570
4571 # Some flags need to be propagated to the compiler or linker for good
4572 # libtool support.
4573 case $host in
4574 *-*-irix6*)
4575   # Find out which ABI we are using.
4576   echo '#line 4577 "configure"' > conftest.$ac_ext
4577   if { (eval echo configure:4578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4578     case `/usr/bin/file conftest.$ac_objext` in
4579     *32-bit*)
4580       LD="${LD-ld} -32"
4581       ;;
4582     *N32*)
4583       LD="${LD-ld} -n32"
4584       ;;
4585     *64-bit*)
4586       LD="${LD-ld} -64"
4587       ;;
4588     esac
4589   fi
4590   rm -rf conftest*
4591   ;;
4592
4593 *-*-sco3.2v5*)
4594   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4595   SAVE_CFLAGS="$CFLAGS"
4596   CFLAGS="$CFLAGS -belf"
4597   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4598 echo "configure:4599: checking whether the C compiler needs -belf" >&5
4599 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4600   echo $ac_n "(cached) $ac_c" 1>&6
4601 else
4602   
4603      ac_ext=c
4604 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4605 ac_cpp='$CPP $CPPFLAGS'
4606 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4607 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4608 cross_compiling=$ac_cv_prog_cc_cross
4609
4610      cat > conftest.$ac_ext <<EOF
4611 #line 4612 "configure"
4612 #include "confdefs.h"
4613
4614 int main() {
4615
4616 ; return 0; }
4617 EOF
4618 if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4619   rm -rf conftest*
4620   lt_cv_cc_needs_belf=yes
4621 else
4622   echo "configure: failed program was:" >&5
4623   cat conftest.$ac_ext >&5
4624   rm -rf conftest*
4625   lt_cv_cc_needs_belf=no
4626 fi
4627 rm -f conftest*
4628      ac_ext=c
4629 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4630 ac_cpp='$CPP $CPPFLAGS'
4631 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4632 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4633 cross_compiling=$ac_cv_prog_cc_cross
4634
4635 fi
4636
4637 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4638   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4639     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4640     CFLAGS="$SAVE_CFLAGS"
4641   fi
4642   ;;
4643
4644 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4645   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4646 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4647 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4648 echo "configure:4649: checking for $ac_word" >&5
4649 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4650   echo $ac_n "(cached) $ac_c" 1>&6
4651 else
4652   if test -n "$DLLTOOL"; then
4653   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4654 else
4655   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4656   ac_dummy="$PATH"
4657   for ac_dir in $ac_dummy; do
4658     test -z "$ac_dir" && ac_dir=.
4659     if test -f $ac_dir/$ac_word; then
4660       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4661       break
4662     fi
4663   done
4664   IFS="$ac_save_ifs"
4665 fi
4666 fi
4667 DLLTOOL="$ac_cv_prog_DLLTOOL"
4668 if test -n "$DLLTOOL"; then
4669   echo "$ac_t""$DLLTOOL" 1>&6
4670 else
4671   echo "$ac_t""no" 1>&6
4672 fi
4673
4674
4675 if test -z "$ac_cv_prog_DLLTOOL"; then
4676 if test -n "$ac_tool_prefix"; then
4677   # Extract the first word of "dlltool", so it can be a program name with args.
4678 set dummy dlltool; ac_word=$2
4679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4680 echo "configure:4681: checking for $ac_word" >&5
4681 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4682   echo $ac_n "(cached) $ac_c" 1>&6
4683 else
4684   if test -n "$DLLTOOL"; then
4685   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4686 else
4687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4688   ac_dummy="$PATH"
4689   for ac_dir in $ac_dummy; do
4690     test -z "$ac_dir" && ac_dir=.
4691     if test -f $ac_dir/$ac_word; then
4692       ac_cv_prog_DLLTOOL="dlltool"
4693       break
4694     fi
4695   done
4696   IFS="$ac_save_ifs"
4697   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4698 fi
4699 fi
4700 DLLTOOL="$ac_cv_prog_DLLTOOL"
4701 if test -n "$DLLTOOL"; then
4702   echo "$ac_t""$DLLTOOL" 1>&6
4703 else
4704   echo "$ac_t""no" 1>&6
4705 fi
4706
4707 else
4708   DLLTOOL="false"
4709 fi
4710 fi
4711
4712   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4713 set dummy ${ac_tool_prefix}as; ac_word=$2
4714 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4715 echo "configure:4716: checking for $ac_word" >&5
4716 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4717   echo $ac_n "(cached) $ac_c" 1>&6
4718 else
4719   if test -n "$AS"; then
4720   ac_cv_prog_AS="$AS" # Let the user override the test.
4721 else
4722   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4723   ac_dummy="$PATH"
4724   for ac_dir in $ac_dummy; do
4725     test -z "$ac_dir" && ac_dir=.
4726     if test -f $ac_dir/$ac_word; then
4727       ac_cv_prog_AS="${ac_tool_prefix}as"
4728       break
4729     fi
4730   done
4731   IFS="$ac_save_ifs"
4732 fi
4733 fi
4734 AS="$ac_cv_prog_AS"
4735 if test -n "$AS"; then
4736   echo "$ac_t""$AS" 1>&6
4737 else
4738   echo "$ac_t""no" 1>&6
4739 fi
4740
4741
4742 if test -z "$ac_cv_prog_AS"; then
4743 if test -n "$ac_tool_prefix"; then
4744   # Extract the first word of "as", so it can be a program name with args.
4745 set dummy as; ac_word=$2
4746 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4747 echo "configure:4748: checking for $ac_word" >&5
4748 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4749   echo $ac_n "(cached) $ac_c" 1>&6
4750 else
4751   if test -n "$AS"; then
4752   ac_cv_prog_AS="$AS" # Let the user override the test.
4753 else
4754   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4755   ac_dummy="$PATH"
4756   for ac_dir in $ac_dummy; do
4757     test -z "$ac_dir" && ac_dir=.
4758     if test -f $ac_dir/$ac_word; then
4759       ac_cv_prog_AS="as"
4760       break
4761     fi
4762   done
4763   IFS="$ac_save_ifs"
4764   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4765 fi
4766 fi
4767 AS="$ac_cv_prog_AS"
4768 if test -n "$AS"; then
4769   echo "$ac_t""$AS" 1>&6
4770 else
4771   echo "$ac_t""no" 1>&6
4772 fi
4773
4774 else
4775   AS="false"
4776 fi
4777 fi
4778
4779   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4780 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4781 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4782 echo "configure:4783: checking for $ac_word" >&5
4783 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4784   echo $ac_n "(cached) $ac_c" 1>&6
4785 else
4786   if test -n "$OBJDUMP"; then
4787   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4788 else
4789   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4790   ac_dummy="$PATH"
4791   for ac_dir in $ac_dummy; do
4792     test -z "$ac_dir" && ac_dir=.
4793     if test -f $ac_dir/$ac_word; then
4794       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4795       break
4796     fi
4797   done
4798   IFS="$ac_save_ifs"
4799 fi
4800 fi
4801 OBJDUMP="$ac_cv_prog_OBJDUMP"
4802 if test -n "$OBJDUMP"; then
4803   echo "$ac_t""$OBJDUMP" 1>&6
4804 else
4805   echo "$ac_t""no" 1>&6
4806 fi
4807
4808
4809 if test -z "$ac_cv_prog_OBJDUMP"; then
4810 if test -n "$ac_tool_prefix"; then
4811   # Extract the first word of "objdump", so it can be a program name with args.
4812 set dummy objdump; ac_word=$2
4813 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4814 echo "configure:4815: checking for $ac_word" >&5
4815 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4816   echo $ac_n "(cached) $ac_c" 1>&6
4817 else
4818   if test -n "$OBJDUMP"; then
4819   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4820 else
4821   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4822   ac_dummy="$PATH"
4823   for ac_dir in $ac_dummy; do
4824     test -z "$ac_dir" && ac_dir=.
4825     if test -f $ac_dir/$ac_word; then
4826       ac_cv_prog_OBJDUMP="objdump"
4827       break
4828     fi
4829   done
4830   IFS="$ac_save_ifs"
4831   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4832 fi
4833 fi
4834 OBJDUMP="$ac_cv_prog_OBJDUMP"
4835 if test -n "$OBJDUMP"; then
4836   echo "$ac_t""$OBJDUMP" 1>&6
4837 else
4838   echo "$ac_t""no" 1>&6
4839 fi
4840
4841 else
4842   OBJDUMP="false"
4843 fi
4844 fi
4845
4846
4847   # recent cygwin and mingw systems supply a stub DllMain which the user
4848   # can override, but on older systems we have to supply one
4849   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4850 echo "configure:4851: checking if libtool should supply DllMain function" >&5
4851 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4852   echo $ac_n "(cached) $ac_c" 1>&6
4853 else
4854   cat > conftest.$ac_ext <<EOF
4855 #line 4856 "configure"
4856 #include "confdefs.h"
4857
4858 int main() {
4859 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4860       DllMain (0, 0, 0);
4861 ; return 0; }
4862 EOF
4863 if { (eval echo configure:4864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4864   rm -rf conftest*
4865   lt_cv_need_dllmain=no
4866 else
4867   echo "configure: failed program was:" >&5
4868   cat conftest.$ac_ext >&5
4869   rm -rf conftest*
4870   lt_cv_need_dllmain=yes
4871 fi
4872 rm -f conftest*
4873 fi
4874
4875 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4876
4877   case $host/$CC in
4878   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4879     # old mingw systems require "-dll" to link a DLL, while more recent ones
4880     # require "-mdll"
4881     SAVE_CFLAGS="$CFLAGS"
4882     CFLAGS="$CFLAGS -mdll"
4883     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4884 echo "configure:4885: checking how to link DLLs" >&5
4885 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4886   echo $ac_n "(cached) $ac_c" 1>&6
4887 else
4888   cat > conftest.$ac_ext <<EOF
4889 #line 4890 "configure"
4890 #include "confdefs.h"
4891
4892 int main() {
4893
4894 ; return 0; }
4895 EOF
4896 if { (eval echo configure:4897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4897   rm -rf conftest*
4898   lt_cv_cc_dll_switch=-mdll
4899 else
4900   echo "configure: failed program was:" >&5
4901   cat conftest.$ac_ext >&5
4902   rm -rf conftest*
4903   lt_cv_cc_dll_switch=-dll
4904 fi
4905 rm -f conftest*
4906 fi
4907
4908 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4909     CFLAGS="$SAVE_CFLAGS" ;;
4910   *-*-cygwin* | *-*-pw32*)
4911     # cygwin systems need to pass --dll to the linker, and not link
4912     # crt.o which will require a WinMain@16 definition.
4913     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4914   esac
4915   ;;
4916   
4917 esac
4918
4919 # Sed substitution that helps us do robust quoting.  It backslashifies
4920 # metacharacters that are still active within double-quoted strings.
4921 Xsed='sed -e s/^X//'
4922 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4923
4924 # Same as above, but do not quote variable references.
4925 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4926
4927 # Sed substitution to delay expansion of an escaped shell variable in a
4928 # double_quote_subst'ed string.
4929 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4930
4931 # Constants:
4932 rm="rm -f"
4933
4934 # Global variables:
4935 default_ofile=libtool
4936 can_build_shared=yes
4937
4938 # All known linkers require a `.a' archive for static linking (except M$VC,
4939 # which needs '.lib').
4940 libext=a
4941 ltmain="$ac_aux_dir/ltmain.sh"
4942 ofile="$default_ofile"
4943 with_gnu_ld="$lt_cv_prog_gnu_ld"
4944 need_locks="$enable_libtool_lock"
4945
4946 old_CC="$CC"
4947 old_CFLAGS="$CFLAGS"
4948
4949 # Set sane defaults for various variables
4950 test -z "$AR" && AR=ar
4951 test -z "$AR_FLAGS" && AR_FLAGS=cru
4952 test -z "$AS" && AS=as
4953 test -z "$CC" && CC=cc
4954 test -z "$DLLTOOL" && DLLTOOL=dlltool
4955 test -z "$LD" && LD=ld
4956 test -z "$LN_S" && LN_S="ln -s"
4957 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4958 test -z "$NM" && NM=nm
4959 test -z "$OBJDUMP" && OBJDUMP=objdump
4960 test -z "$RANLIB" && RANLIB=:
4961 test -z "$STRIP" && STRIP=:
4962 test -z "$ac_objext" && ac_objext=o
4963
4964 if test x"$host" != x"$build"; then
4965   ac_tool_prefix=${host_alias}-
4966 else
4967   ac_tool_prefix=
4968 fi
4969
4970 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4971 case $host_os in
4972 linux-gnu*) ;;
4973 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4974 esac
4975
4976 case $host_os in
4977 aix3*)
4978   # AIX sometimes has problems with the GCC collect2 program.  For some
4979   # reason, if we set the COLLECT_NAMES environment variable, the problems
4980   # vanish in a puff of smoke.
4981   if test "X${COLLECT_NAMES+set}" != Xset; then
4982     COLLECT_NAMES=
4983     export COLLECT_NAMES
4984   fi
4985   ;;
4986 esac
4987
4988 # Determine commands to create old-style static archives.
4989 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4990 old_postinstall_cmds='chmod 644 $oldlib'
4991 old_postuninstall_cmds=
4992
4993 if test -n "$RANLIB"; then
4994   case $host_os in
4995   openbsd*)
4996     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4997     ;;
4998   *)
4999     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5000     ;;
5001   esac
5002   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5003 fi
5004
5005 # Allow CC to be a program name with arguments.
5006 set dummy $CC
5007 compiler="$2"
5008
5009 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5010 echo "configure:5011: checking for objdir" >&5
5011 rm -f .libs 2>/dev/null
5012 mkdir .libs 2>/dev/null
5013 if test -d .libs; then
5014   objdir=.libs
5015 else
5016   # MS-DOS does not allow filenames that begin with a dot.
5017   objdir=_libs
5018 fi
5019 rmdir .libs 2>/dev/null
5020 echo "$ac_t""$objdir" 1>&6
5021
5022
5023 # Check whether --with-pic or --without-pic was given.
5024 if test "${with_pic+set}" = set; then
5025   withval="$with_pic"
5026   pic_mode="$withval"
5027 else
5028   pic_mode=default
5029 fi
5030
5031 test -z "$pic_mode" && pic_mode=default
5032
5033 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5034 # in isolation, and that seeing it set (from the cache) indicates that
5035 # the associated values are set (in the cache) correctly too.
5036 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5037 echo "configure:5038: checking for $compiler option to produce PIC" >&5
5038 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5039   echo $ac_n "(cached) $ac_c" 1>&6
5040 else
5041    lt_cv_prog_cc_pic=
5042   lt_cv_prog_cc_shlib=
5043   lt_cv_prog_cc_wl=
5044   lt_cv_prog_cc_static=
5045   lt_cv_prog_cc_no_builtin=
5046   lt_cv_prog_cc_can_build_shared=$can_build_shared
5047
5048   if test "$GCC" = yes; then
5049     lt_cv_prog_cc_wl='-Wl,'
5050     lt_cv_prog_cc_static='-static'
5051
5052     case $host_os in
5053     aix*)
5054       # Below there is a dirty hack to force normal static linking with -ldl
5055       # The problem is because libdl dynamically linked with both libc and
5056       # libC (AIX C++ library), which obviously doesn't included in libraries
5057       # list by gcc. This cause undefined symbols with -static flags.
5058       # This hack allows C programs to be linked with "-static -ldl", but
5059       # not sure about C++ programs.
5060       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5061       ;;
5062     amigaos*)
5063       # FIXME: we need at least 68020 code to build shared libraries, but
5064       # adding the `-m68020' flag to GCC prevents building anything better,
5065       # like `-m68040'.
5066       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5067       ;;
5068     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5069       # PIC is the default for these OSes.
5070       ;;
5071     darwin* | rhapsody*)
5072       # PIC is the default on this platform
5073       # Common symbols not allowed in MH_DYLIB files
5074       lt_cv_prog_cc_pic='-fno-common'
5075       ;;
5076     cygwin* | mingw* | pw32* | os2*)
5077       # This hack is so that the source file can tell whether it is being
5078       # built for inclusion in a dll (and should export symbols for example).
5079       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5080       ;;
5081     sysv4*MP*)
5082       if test -d /usr/nec; then
5083          lt_cv_prog_cc_pic=-Kconform_pic
5084       fi
5085       ;;
5086     *)
5087       lt_cv_prog_cc_pic='-fPIC'
5088       ;;
5089     esac
5090   else
5091     # PORTME Check for PIC flags for the system compiler.
5092     case $host_os in
5093     aix3* | aix4* | aix5*)
5094       lt_cv_prog_cc_wl='-Wl,'
5095       # All AIX code is PIC.
5096       if test "$host_cpu" = ia64; then
5097         # AIX 5 now supports IA64 processor
5098         lt_cv_prog_cc_static='-Bstatic'
5099       else
5100         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5101       fi
5102       ;;
5103
5104     hpux9* | hpux10* | hpux11*)
5105       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5106       lt_cv_prog_cc_wl='-Wl,'
5107       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5108       lt_cv_prog_cc_pic='+Z'
5109       ;;
5110
5111     irix5* | irix6* | nonstopux*)
5112       lt_cv_prog_cc_wl='-Wl,'
5113       lt_cv_prog_cc_static='-non_shared'
5114       # PIC (with -KPIC) is the default.
5115       ;;
5116
5117     cygwin* | mingw* | pw32* | os2*)
5118       # This hack is so that the source file can tell whether it is being
5119       # built for inclusion in a dll (and should export symbols for example).
5120       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5121       ;;
5122
5123     newsos6)
5124       lt_cv_prog_cc_pic='-KPIC'
5125       lt_cv_prog_cc_static='-Bstatic'
5126       ;;
5127
5128     osf3* | osf4* | osf5*)
5129       # All OSF/1 code is PIC.
5130       lt_cv_prog_cc_wl='-Wl,'
5131       lt_cv_prog_cc_static='-non_shared'
5132       ;;
5133
5134     sco3.2v5*)
5135       lt_cv_prog_cc_pic='-Kpic'
5136       lt_cv_prog_cc_static='-dn'
5137       lt_cv_prog_cc_shlib='-belf'
5138       ;;
5139
5140     solaris*)
5141       lt_cv_prog_cc_pic='-KPIC'
5142       lt_cv_prog_cc_static='-Bstatic'
5143       lt_cv_prog_cc_wl='-Wl,'
5144       ;;
5145
5146     sunos4*)
5147       lt_cv_prog_cc_pic='-PIC'
5148       lt_cv_prog_cc_static='-Bstatic'
5149       lt_cv_prog_cc_wl='-Qoption ld '
5150       ;;
5151
5152     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5153       lt_cv_prog_cc_pic='-KPIC'
5154       lt_cv_prog_cc_static='-Bstatic'
5155       lt_cv_prog_cc_wl='-Wl,'
5156       ;;
5157
5158     uts4*)
5159       lt_cv_prog_cc_pic='-pic'
5160       lt_cv_prog_cc_static='-Bstatic'
5161       ;;
5162
5163     sysv4*MP*)
5164       if test -d /usr/nec ;then
5165         lt_cv_prog_cc_pic='-Kconform_pic'
5166         lt_cv_prog_cc_static='-Bstatic'
5167       fi
5168       ;;
5169
5170     *)
5171       lt_cv_prog_cc_can_build_shared=no
5172       ;;
5173     esac
5174   fi
5175
5176 fi
5177
5178 if test -z "$lt_cv_prog_cc_pic"; then
5179   echo "$ac_t""none" 1>&6
5180 else
5181   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5182
5183   # Check to make sure the pic_flag actually works.
5184   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5185 echo "configure:5186: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5186   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5187   echo $ac_n "(cached) $ac_c" 1>&6
5188 else
5189       save_CFLAGS="$CFLAGS"
5190     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5191     cat > conftest.$ac_ext <<EOF
5192 #line 5193 "configure"
5193 #include "confdefs.h"
5194
5195 int main() {
5196
5197 ; return 0; }
5198 EOF
5199 if { (eval echo configure:5200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5200   rm -rf conftest*
5201         case $host_os in
5202       hpux9* | hpux10* | hpux11*)
5203         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5204         # they create non-PIC objects.  So, if there were any warnings, we
5205         # assume that PIC is not supported.
5206         if test -s conftest.err; then
5207           lt_cv_prog_cc_pic_works=no
5208         else
5209           lt_cv_prog_cc_pic_works=yes
5210         fi
5211         ;;
5212       *)
5213         lt_cv_prog_cc_pic_works=yes
5214         ;;
5215       esac
5216     
5217 else
5218   echo "configure: failed program was:" >&5
5219   cat conftest.$ac_ext >&5
5220   rm -rf conftest*
5221         lt_cv_prog_cc_pic_works=no
5222     
5223 fi
5224 rm -f conftest*
5225     CFLAGS="$save_CFLAGS"
5226   
5227 fi
5228
5229
5230   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5231     lt_cv_prog_cc_pic=
5232     lt_cv_prog_cc_can_build_shared=no
5233   else
5234     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5235   fi
5236
5237   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5238 fi
5239
5240 # Check for any special shared library compilation flags.
5241 if test -n "$lt_cv_prog_cc_shlib"; then
5242   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5243   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5244   else
5245    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5246     lt_cv_prog_cc_can_build_shared=no
5247   fi
5248 fi
5249
5250 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5251 echo "configure:5252: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5252 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5253   echo $ac_n "(cached) $ac_c" 1>&6
5254 else
5255     lt_cv_prog_cc_static_works=no
5256   save_LDFLAGS="$LDFLAGS"
5257   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5258   cat > conftest.$ac_ext <<EOF
5259 #line 5260 "configure"
5260 #include "confdefs.h"
5261
5262 int main() {
5263
5264 ; return 0; }
5265 EOF
5266 if { (eval echo configure:5267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5267   rm -rf conftest*
5268   lt_cv_prog_cc_static_works=yes
5269 else
5270   echo "configure: failed program was:" >&5
5271   cat conftest.$ac_ext >&5
5272 fi
5273 rm -f conftest*
5274   LDFLAGS="$save_LDFLAGS"
5275
5276 fi
5277
5278
5279 # Belt *and* braces to stop my trousers falling down:
5280 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5281 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5282
5283 pic_flag="$lt_cv_prog_cc_pic"
5284 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5285 wl="$lt_cv_prog_cc_wl"
5286 link_static_flag="$lt_cv_prog_cc_static"
5287 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5288 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5289
5290
5291 # Check to see if options -o and -c are simultaneously supported by compiler
5292 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5293 echo "configure:5294: checking if $compiler supports -c -o file.$ac_objext" >&5
5294 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5295   echo $ac_n "(cached) $ac_c" 1>&6
5296 else
5297   
5298 $rm -r conftest 2>/dev/null
5299 mkdir conftest
5300 cd conftest
5301 echo "int some_variable = 0;" > conftest.$ac_ext
5302 mkdir out
5303 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5304 # that will create temporary files in the current directory regardless of
5305 # the output directory.  Thus, making CWD read-only will cause this test
5306 # to fail, enabling locking or at least warning the user not to do parallel
5307 # builds.
5308 chmod -w .
5309 save_CFLAGS="$CFLAGS"
5310 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5311 compiler_c_o=no
5312 if { (eval echo configure:5313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5313   # The compiler can only warn and ignore the option if not recognized
5314   # So say no if there are warnings
5315   if test -s out/conftest.err; then
5316     lt_cv_compiler_c_o=no
5317   else
5318     lt_cv_compiler_c_o=yes
5319   fi
5320 else
5321   # Append any errors to the config.log.
5322   cat out/conftest.err 1>&5
5323   lt_cv_compiler_c_o=no
5324 fi
5325 CFLAGS="$save_CFLAGS"
5326 chmod u+w .
5327 $rm conftest* out/*
5328 rmdir out
5329 cd ..
5330 rmdir conftest
5331 $rm -r conftest 2>/dev/null
5332
5333 fi
5334
5335 compiler_c_o=$lt_cv_compiler_c_o
5336 echo "$ac_t""$compiler_c_o" 1>&6
5337
5338 if test x"$compiler_c_o" = x"yes"; then
5339   # Check to see if we can write to a .lo
5340   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5341 echo "configure:5342: checking if $compiler supports -c -o file.lo" >&5
5342   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5343   echo $ac_n "(cached) $ac_c" 1>&6
5344 else
5345   
5346   lt_cv_compiler_o_lo=no
5347   save_CFLAGS="$CFLAGS"
5348   CFLAGS="$CFLAGS -c -o conftest.lo"
5349   save_objext="$ac_objext"
5350   ac_objext=lo
5351   cat > conftest.$ac_ext <<EOF
5352 #line 5353 "configure"
5353 #include "confdefs.h"
5354
5355 int main() {
5356 int some_variable = 0;
5357 ; return 0; }
5358 EOF
5359 if { (eval echo configure:5360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5360   rm -rf conftest*
5361       # The compiler can only warn and ignore the option if not recognized
5362     # So say no if there are warnings
5363     if test -s conftest.err; then
5364       lt_cv_compiler_o_lo=no
5365     else
5366       lt_cv_compiler_o_lo=yes
5367     fi
5368   
5369 else
5370   echo "configure: failed program was:" >&5
5371   cat conftest.$ac_ext >&5
5372 fi
5373 rm -f conftest*
5374   ac_objext="$save_objext"
5375   CFLAGS="$save_CFLAGS"
5376   
5377 fi
5378
5379   compiler_o_lo=$lt_cv_compiler_o_lo
5380   echo "$ac_t""$compiler_o_lo" 1>&6
5381 else
5382   compiler_o_lo=no
5383 fi
5384
5385 # Check to see if we can do hard links to lock some files if needed
5386 hard_links="nottested"
5387 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5388   # do not overwrite the value of need_locks provided by the user
5389   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5390 echo "configure:5391: checking if we can lock with hard links" >&5
5391   hard_links=yes
5392   $rm conftest*
5393   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5394   touch conftest.a
5395   ln conftest.a conftest.b 2>&5 || hard_links=no
5396   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5397   echo "$ac_t""$hard_links" 1>&6
5398   if test "$hard_links" = no; then
5399     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5400     need_locks=warn
5401   fi
5402 else
5403   need_locks=no
5404 fi
5405
5406 if test "$GCC" = yes; then
5407   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5408   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5409 echo "configure:5410: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5410   echo "int some_variable = 0;" > conftest.$ac_ext
5411   save_CFLAGS="$CFLAGS"
5412   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5413   compiler_rtti_exceptions=no
5414   cat > conftest.$ac_ext <<EOF
5415 #line 5416 "configure"
5416 #include "confdefs.h"
5417
5418 int main() {
5419 int some_variable = 0;
5420 ; return 0; }
5421 EOF
5422 if { (eval echo configure:5423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5423   rm -rf conftest*
5424       # The compiler can only warn and ignore the option if not recognized
5425     # So say no if there are warnings
5426     if test -s conftest.err; then
5427       compiler_rtti_exceptions=no
5428     else
5429       compiler_rtti_exceptions=yes
5430     fi
5431   
5432 else
5433   echo "configure: failed program was:" >&5
5434   cat conftest.$ac_ext >&5
5435 fi
5436 rm -f conftest*
5437   CFLAGS="$save_CFLAGS"
5438   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5439
5440   if test "$compiler_rtti_exceptions" = "yes"; then
5441     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5442   else
5443     no_builtin_flag=' -fno-builtin'
5444   fi
5445 fi
5446
5447 # See if the linker supports building shared libraries.
5448 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5449 echo "configure:5450: checking whether the linker ($LD) supports shared libraries" >&5
5450
5451 allow_undefined_flag=
5452 no_undefined_flag=
5453 need_lib_prefix=unknown
5454 need_version=unknown
5455 # when you set need_version to no, make sure it does not cause -set_version
5456 # flags to be left without arguments
5457 archive_cmds=
5458 archive_expsym_cmds=
5459 old_archive_from_new_cmds=
5460 old_archive_from_expsyms_cmds=
5461 export_dynamic_flag_spec=
5462 whole_archive_flag_spec=
5463 thread_safe_flag_spec=
5464 hardcode_into_libs=no
5465 hardcode_libdir_flag_spec=
5466 hardcode_libdir_separator=
5467 hardcode_direct=no
5468 hardcode_minus_L=no
5469 hardcode_shlibpath_var=unsupported
5470 runpath_var=
5471 link_all_deplibs=unknown
5472 always_export_symbols=no
5473 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5474 # include_expsyms should be a list of space-separated symbols to be *always*
5475 # included in the symbol list
5476 include_expsyms=
5477 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5478 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5479 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5480 # as well as any symbol that contains `d'.
5481 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5482 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5483 # platforms (ab)use it in PIC code, but their linkers get confused if
5484 # the symbol is explicitly referenced.  Since portable code cannot
5485 # rely on this symbol name, it's probably fine to never include it in
5486 # preloaded symbol tables.
5487 extract_expsyms_cmds=
5488
5489 case $host_os in
5490 cygwin* | mingw* | pw32*)
5491   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5492   # When not using gcc, we currently assume that we are using
5493   # Microsoft Visual C++.
5494   if test "$GCC" != yes; then
5495     with_gnu_ld=no
5496   fi
5497   ;;
5498 openbsd*)
5499   with_gnu_ld=no
5500   ;;
5501 esac
5502
5503 ld_shlibs=yes
5504 if test "$with_gnu_ld" = yes; then
5505   # If archive_cmds runs LD, not CC, wlarc should be empty
5506   wlarc='${wl}'
5507
5508   # See if GNU ld supports shared libraries.
5509   case $host_os in
5510   aix3* | aix4* | aix5*)
5511     # On AIX, the GNU linker is very broken
5512     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5513     ld_shlibs=no
5514     cat <<EOF 1>&2
5515
5516 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5517 *** to be unable to reliably create shared libraries on AIX.
5518 *** Therefore, libtool is disabling shared libraries support.  If you
5519 *** really care for shared libraries, you may want to modify your PATH
5520 *** so that a non-GNU linker is found, and then restart.
5521
5522 EOF
5523     ;;
5524
5525   amigaos*)
5526     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)'
5527     hardcode_libdir_flag_spec='-L$libdir'
5528     hardcode_minus_L=yes
5529
5530     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5531     # that the semantics of dynamic libraries on AmigaOS, at least up
5532     # to version 4, is to share data among multiple programs linked
5533     # with the same dynamic library.  Since this doesn't match the
5534     # behavior of shared libraries on other platforms, we can use
5535     # them.
5536     ld_shlibs=no
5537     ;;
5538
5539   beos*)
5540     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5541       allow_undefined_flag=unsupported
5542       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5543       # support --undefined.  This deserves some investigation.  FIXME
5544       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5545     else
5546       ld_shlibs=no
5547     fi
5548     ;;
5549
5550   cygwin* | mingw* | pw32*)
5551     # hardcode_libdir_flag_spec is actually meaningless, as there is
5552     # no search path for DLLs.
5553     hardcode_libdir_flag_spec='-L$libdir'
5554     allow_undefined_flag=unsupported
5555     always_export_symbols=yes
5556
5557     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5558       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5559       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5560       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5561       else $CC -o impgen impgen.c ; fi)~
5562       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5563
5564     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5565
5566     # cygwin and mingw dlls have different entry points and sets of symbols
5567     # to exclude.
5568     # FIXME: what about values for MSVC?
5569     dll_entry=__cygwin_dll_entry@12
5570     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5571     case $host_os in
5572     mingw*)
5573       # mingw values
5574       dll_entry=_DllMainCRTStartup@12
5575       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5576       ;;
5577     esac
5578
5579     # mingw and cygwin differ, and it's simplest to just exclude the union
5580     # of the two symbol sets.
5581     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5582
5583     # recent cygwin and mingw systems supply a stub DllMain which the user
5584     # can override, but on older systems we have to supply one (in ltdll.c)
5585     if test "x$lt_cv_need_dllmain" = "xyes"; then
5586       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5587       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~
5588         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5589     else
5590       ltdll_obj=
5591       ltdll_cmds=
5592     fi
5593
5594     # Extract the symbol export list from an `--export-all' def file,
5595     # then regenerate the def file from the symbol export list, so that
5596     # the compiled dll only exports the symbol export list.
5597     # Be careful not to strip the DATA tag left be newer dlltools.
5598     export_symbols_cmds="$ltdll_cmds"'
5599       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5600       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5601
5602     # If the export-symbols file already is a .def file (1st line
5603     # is EXPORTS), use it as is.
5604     # If DATA tags from a recent dlltool are present, honour them!
5605     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5606         cp $export_symbols $output_objdir/$soname-def;
5607       else
5608         echo EXPORTS > $output_objdir/$soname-def;
5609         _lt_hint=1;
5610         cat $export_symbols | while read symbol; do
5611          set dummy \$symbol;
5612          case \$# in
5613            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5614            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5615            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5616          esac;
5617          _lt_hint=`expr 1 + \$_lt_hint`;
5618         done;
5619       fi~
5620       '"$ltdll_cmds"'
5621       $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~
5622       $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~
5623       $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~
5624       $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~
5625       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5626     ;;
5627
5628   netbsd*)
5629     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5630       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5631       wlarc=
5632     else
5633       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5634       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5635     fi
5636     ;;
5637
5638   solaris* | sysv5*)
5639     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5640       ld_shlibs=no
5641       cat <<EOF 1>&2
5642
5643 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5644 *** create shared libraries on Solaris systems.  Therefore, libtool
5645 *** is disabling shared libraries support.  We urge you to upgrade GNU
5646 *** binutils to release 2.9.1 or newer.  Another option is to modify
5647 *** your PATH or compiler configuration so that the native linker is
5648 *** used, and then restart.
5649
5650 EOF
5651     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5652       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5653       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5654     else
5655       ld_shlibs=no
5656     fi
5657     ;;
5658
5659   sunos4*)
5660     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5661     wlarc=
5662     hardcode_direct=yes
5663     hardcode_shlibpath_var=no
5664     ;;
5665
5666   *)
5667     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5668       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5669       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5670     else
5671       ld_shlibs=no
5672     fi
5673     ;;
5674   esac
5675
5676   if test "$ld_shlibs" = yes; then
5677     runpath_var=LD_RUN_PATH
5678     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5679     export_dynamic_flag_spec='${wl}--export-dynamic'
5680     case $host_os in
5681     cygwin* | mingw* | pw32*)
5682       # dlltool doesn't understand --whole-archive et. al.
5683       whole_archive_flag_spec=
5684       ;;
5685     *)
5686       # ancient GNU ld didn't support --whole-archive et. al.
5687       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5688         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5689       else
5690         whole_archive_flag_spec=
5691       fi
5692       ;;
5693     esac
5694   fi
5695 else
5696   # PORTME fill in a description of your system's linker (not GNU ld)
5697   case $host_os in
5698   aix3*)
5699     allow_undefined_flag=unsupported
5700     always_export_symbols=yes
5701     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'
5702     # Note: this linker hardcodes the directories in LIBPATH if there
5703     # are no directories specified by -L.
5704     hardcode_minus_L=yes
5705     if test "$GCC" = yes && test -z "$link_static_flag"; then
5706       # Neither direct hardcoding nor static linking is supported with a
5707       # broken collect2.
5708       hardcode_direct=unsupported
5709     fi
5710     ;;
5711
5712   aix4* | aix5*)
5713     if test "$host_cpu" = ia64; then
5714       # On IA64, the linker does run time linking by default, so we don't
5715       # have to do anything special.
5716       aix_use_runtimelinking=no
5717       exp_sym_flag='-Bexport'
5718       no_entry_flag=""
5719     else
5720       aix_use_runtimelinking=no
5721
5722       # Test if we are trying to use run time linking or normal
5723       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5724       # need to do runtime linking.
5725       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5726         for ld_flag in $LDFLAGS; do
5727           case $ld_flag in
5728           *-brtl*)
5729             aix_use_runtimelinking=yes
5730             break
5731           ;;
5732           esac
5733         done
5734       esac
5735
5736       exp_sym_flag='-bexport'
5737       no_entry_flag='-bnoentry'
5738     fi
5739
5740     # When large executables or shared objects are built, AIX ld can
5741     # have problems creating the table of contents.  If linking a library
5742     # or program results in "error TOC overflow" add -mminimal-toc to
5743     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5744     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5745
5746     hardcode_direct=yes
5747     archive_cmds=''
5748     hardcode_libdir_separator=':'
5749     if test "$GCC" = yes; then
5750       case $host_os in aix4.[012]|aix4.[012].*)
5751         collect2name=`${CC} -print-prog-name=collect2`
5752         if test -f "$collect2name" && \
5753           strings "$collect2name" | grep resolve_lib_name >/dev/null
5754         then
5755           # We have reworked collect2
5756           hardcode_direct=yes
5757         else
5758           # We have old collect2
5759           hardcode_direct=unsupported
5760           # It fails to find uninstalled libraries when the uninstalled
5761           # path is not listed in the libpath.  Setting hardcode_minus_L
5762           # to unsupported forces relinking
5763           hardcode_minus_L=yes
5764           hardcode_libdir_flag_spec='-L$libdir'
5765           hardcode_libdir_separator=
5766         fi
5767       esac
5768
5769       shared_flag='-shared'
5770     else
5771       # not using gcc
5772       if test "$host_cpu" = ia64; then
5773         shared_flag='${wl}-G'
5774       else
5775         if test "$aix_use_runtimelinking" = yes; then
5776           shared_flag='${wl}-G'
5777         else
5778           shared_flag='${wl}-bM:SRE'
5779         fi
5780       fi
5781     fi
5782
5783     # It seems that -bexpall can do strange things, so it is better to
5784     # generate a list of symbols to export.
5785     always_export_symbols=yes
5786     if test "$aix_use_runtimelinking" = yes; then
5787       # Warning - without using the other runtime loading flags (-brtl),
5788       # -berok will link without error, but may produce a broken library.
5789       allow_undefined_flag='-berok'
5790       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5791       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"
5792     else
5793       if test "$host_cpu" = ia64; then
5794         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5795         allow_undefined_flag="-z nodefs"
5796         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"
5797       else
5798         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5799         # Warning - without using the other run time loading flags,
5800         # -berok will link without error, but may produce a broken library.
5801         allow_undefined_flag='${wl}-berok'
5802         # This is a bit strange, but is similar to how AIX traditionally builds
5803         # it's shared libraries.
5804         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'
5805       fi
5806     fi
5807     ;;
5808
5809   amigaos*)
5810     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)'
5811     hardcode_libdir_flag_spec='-L$libdir'
5812     hardcode_minus_L=yes
5813     # see comment about different semantics on the GNU ld section
5814     ld_shlibs=no
5815     ;;
5816
5817   cygwin* | mingw* | pw32*)
5818     # When not using gcc, we currently assume that we are using
5819     # Microsoft Visual C++.
5820     # hardcode_libdir_flag_spec is actually meaningless, as there is
5821     # no search path for DLLs.
5822     hardcode_libdir_flag_spec=' '
5823     allow_undefined_flag=unsupported
5824     # Tell ltmain to make .lib files, not .a files.
5825     libext=lib
5826     # FIXME: Setting linknames here is a bad hack.
5827     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5828     # The linker will automatically build a .lib file if we build a DLL.
5829     old_archive_from_new_cmds='true'
5830     # FIXME: Should let the user specify the lib program.
5831     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5832     fix_srcfile_path='`cygpath -w "$srcfile"`'
5833     ;;
5834
5835   darwin* | rhapsody*)
5836     case "$host_os" in
5837     rhapsody* | darwin1.[012])
5838       allow_undefined_flag='-undefined suppress'
5839       ;;
5840     *) # Darwin 1.3 on
5841       allow_undefined_flag='-flat_namespace -undefined suppress'
5842       ;;
5843     esac
5844     # FIXME: Relying on posixy $() will cause problems for
5845     #        cross-compilation, but unfortunately the echo tests do not
5846     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5847     #        `"' quotes if we put them in here... so don't!
5848     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)'
5849     # We need to add '_' to the symbols in $export_symbols first
5850     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5851     hardcode_direct=yes
5852     hardcode_shlibpath_var=no
5853     whole_archive_flag_spec='-all_load $convenience'
5854     ;;
5855
5856   freebsd1*)
5857     ld_shlibs=no
5858     ;;
5859
5860   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5861   # support.  Future versions do this automatically, but an explicit c++rt0.o
5862   # does not break anything, and helps significantly (at the cost of a little
5863   # extra space).
5864   freebsd2.2*)
5865     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5866     hardcode_libdir_flag_spec='-R$libdir'
5867     hardcode_direct=yes
5868     hardcode_shlibpath_var=no
5869     ;;
5870
5871   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5872   freebsd2*)
5873     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5874     hardcode_direct=yes
5875     hardcode_minus_L=yes
5876     hardcode_shlibpath_var=no
5877     ;;
5878
5879   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5880   freebsd*)
5881     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5882     hardcode_libdir_flag_spec='-R$libdir'
5883     hardcode_direct=yes
5884     hardcode_shlibpath_var=no
5885     ;;
5886
5887   hpux9* | hpux10* | hpux11*)
5888     case $host_os in
5889     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' ;;
5890     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5891     esac
5892     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5893     hardcode_libdir_separator=:
5894     hardcode_direct=yes
5895     hardcode_minus_L=yes # Not in the search PATH, but as the default
5896                          # location of the library.
5897     export_dynamic_flag_spec='${wl}-E'
5898     ;;
5899
5900   irix5* | irix6* | nonstopux*)
5901     if test "$GCC" = yes; then
5902       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'
5903       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5904     else
5905       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'
5906       hardcode_libdir_flag_spec='-rpath $libdir'
5907     fi
5908     hardcode_libdir_separator=:
5909     link_all_deplibs=yes
5910     ;;
5911
5912   netbsd*)
5913     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5914       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5915     else
5916       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5917     fi
5918     hardcode_libdir_flag_spec='-R$libdir'
5919     hardcode_direct=yes
5920     hardcode_shlibpath_var=no
5921     ;;
5922
5923   newsos6)
5924     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5925     hardcode_direct=yes
5926     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5927     hardcode_libdir_separator=:
5928     hardcode_shlibpath_var=no
5929     ;;
5930
5931   openbsd*)
5932     hardcode_direct=yes
5933     hardcode_shlibpath_var=no
5934     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5935       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5936       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5937       export_dynamic_flag_spec='${wl}-E'
5938     else
5939       case "$host_os" in
5940       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5941         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5942         hardcode_libdir_flag_spec='-R$libdir'
5943         ;;
5944       *)
5945         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5946         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5947         ;;
5948       esac
5949     fi
5950     ;;
5951
5952   os2*)
5953     hardcode_libdir_flag_spec='-L$libdir'
5954     hardcode_minus_L=yes
5955     allow_undefined_flag=unsupported
5956     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'
5957     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5958     ;;
5959
5960   osf3*)
5961     if test "$GCC" = yes; then
5962       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5963       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'
5964     else
5965       allow_undefined_flag=' -expect_unresolved \*'
5966       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'
5967     fi
5968     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5969     hardcode_libdir_separator=:
5970     ;;
5971
5972   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5973     if test "$GCC" = yes; then
5974       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5975       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'
5976       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5977     else
5978       allow_undefined_flag=' -expect_unresolved \*'
5979       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'
5980       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5981       $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'
5982
5983       #Both c and cxx compiler support -rpath directly
5984       hardcode_libdir_flag_spec='-rpath $libdir'
5985     fi
5986     hardcode_libdir_separator=:
5987     ;;
5988
5989   sco3.2v5*)
5990     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5991     hardcode_shlibpath_var=no
5992     runpath_var=LD_RUN_PATH
5993     hardcode_runpath_var=yes
5994     export_dynamic_flag_spec='${wl}-Bexport'
5995     ;;
5996
5997   solaris*)
5998     # gcc --version < 3.0 without binutils cannot create self contained
5999     # shared libraries reliably, requiring libgcc.a to resolve some of
6000     # the object symbols generated in some cases.  Libraries that use
6001     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6002     # a copy of libgcc.a into every shared library to guarantee resolving
6003     # such symbols causes other problems:  According to Tim Van Holder
6004     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6005     # (to the application) exception stack for one thing.
6006     no_undefined_flag=' -z defs'
6007     if test "$GCC" = yes; then
6008       case `$CC --version 2>/dev/null` in
6009       [12].*)
6010         cat <<EOF 1>&2
6011
6012 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6013 *** create self contained shared libraries on Solaris systems, without
6014 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6015 *** -no-undefined support, which will at least allow you to build shared
6016 *** libraries.  However, you may find that when you link such libraries
6017 *** into an application without using GCC, you have to manually add
6018 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6019 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6020 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6021
6022 EOF
6023         no_undefined_flag=
6024         ;;
6025       esac
6026     fi
6027     # $CC -shared without GNU ld will not create a library from C++
6028     # object files and a static libstdc++, better avoid it by now
6029     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6030     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6031                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6032     hardcode_libdir_flag_spec='-R$libdir'
6033     hardcode_shlibpath_var=no
6034     case $host_os in
6035     solaris2.[0-5] | solaris2.[0-5].*) ;;
6036     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6037       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6038     esac
6039     link_all_deplibs=yes
6040     ;;
6041
6042   sunos4*)
6043     if test "x$host_vendor" = xsequent; then
6044       # Use $CC to link under sequent, because it throws in some extra .o
6045       # files that make .init and .fini sections work.
6046       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6047     else
6048       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6049     fi
6050     hardcode_libdir_flag_spec='-L$libdir'
6051     hardcode_direct=yes
6052     hardcode_minus_L=yes
6053     hardcode_shlibpath_var=no
6054     ;;
6055
6056   sysv4)
6057     case $host_vendor in
6058       sni)
6059         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6060         hardcode_direct=yes # is this really true???
6061         ;;
6062       siemens)
6063         ## LD is ld it makes a PLAMLIB
6064         ## CC just makes a GrossModule.
6065         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6066         reload_cmds='$CC -r -o $output$reload_objs'
6067         hardcode_direct=no
6068         ;;
6069       motorola)
6070         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6071         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6072         ;;
6073     esac
6074     runpath_var='LD_RUN_PATH'
6075     hardcode_shlibpath_var=no
6076     ;;
6077
6078   sysv4.3*)
6079     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6080     hardcode_shlibpath_var=no
6081     export_dynamic_flag_spec='-Bexport'
6082     ;;
6083
6084   sysv5*)
6085     no_undefined_flag=' -z text'
6086     # $CC -shared without GNU ld will not create a library from C++
6087     # object files and a static libstdc++, better avoid it by now
6088     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6089     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6090                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6091     hardcode_libdir_flag_spec=
6092     hardcode_shlibpath_var=no
6093     runpath_var='LD_RUN_PATH'
6094     ;;
6095
6096   uts4*)
6097     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6098     hardcode_libdir_flag_spec='-L$libdir'
6099     hardcode_shlibpath_var=no
6100     ;;
6101
6102   dgux*)
6103     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6104     hardcode_libdir_flag_spec='-L$libdir'
6105     hardcode_shlibpath_var=no
6106     ;;
6107
6108   sysv4*MP*)
6109     if test -d /usr/nec; then
6110       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6111       hardcode_shlibpath_var=no
6112       runpath_var=LD_RUN_PATH
6113       hardcode_runpath_var=yes
6114       ld_shlibs=yes
6115     fi
6116     ;;
6117
6118   sysv4.2uw2*)
6119     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6120     hardcode_direct=yes
6121     hardcode_minus_L=no
6122     hardcode_shlibpath_var=no
6123     hardcode_runpath_var=yes
6124     runpath_var=LD_RUN_PATH
6125     ;;
6126
6127   sysv5uw7* | unixware7*)
6128     no_undefined_flag='${wl}-z ${wl}text'
6129     if test "$GCC" = yes; then
6130       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6131     else
6132       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6133     fi
6134     runpath_var='LD_RUN_PATH'
6135     hardcode_shlibpath_var=no
6136     ;;
6137
6138   *)
6139     ld_shlibs=no
6140     ;;
6141   esac
6142 fi
6143 echo "$ac_t""$ld_shlibs" 1>&6
6144 test "$ld_shlibs" = no && can_build_shared=no
6145
6146 # Check hardcoding attributes.
6147 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6148 echo "configure:6149: checking how to hardcode library paths into programs" >&5
6149 hardcode_action=
6150 if test -n "$hardcode_libdir_flag_spec" || \
6151    test -n "$runpath_var"; then
6152
6153   # We can hardcode non-existant directories.
6154   if test "$hardcode_direct" != no &&
6155      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6156      # have to relink, otherwise we might link with an installed library
6157      # when we should be linking with a yet-to-be-installed one
6158      ## test "$hardcode_shlibpath_var" != no &&
6159      test "$hardcode_minus_L" != no; then
6160     # Linking always hardcodes the temporary library directory.
6161     hardcode_action=relink
6162   else
6163     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6164     hardcode_action=immediate
6165   fi
6166 else
6167   # We cannot hardcode anything, or else we can only hardcode existing
6168   # directories.
6169   hardcode_action=unsupported
6170 fi
6171 echo "$ac_t""$hardcode_action" 1>&6
6172
6173 striplib=
6174 old_striplib=
6175 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6176 echo "configure:6177: checking whether stripping libraries is possible" >&5
6177 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6178   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6179   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6180   echo "$ac_t""yes" 1>&6
6181 else
6182   echo "$ac_t""no" 1>&6
6183 fi
6184
6185 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6186 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6187
6188 # PORTME Fill in your ld.so characteristics
6189 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6190 echo "configure:6191: checking dynamic linker characteristics" >&5
6191 library_names_spec=
6192 libname_spec='lib$name'
6193 soname_spec=
6194 postinstall_cmds=
6195 postuninstall_cmds=
6196 finish_cmds=
6197 finish_eval=
6198 shlibpath_var=
6199 shlibpath_overrides_runpath=unknown
6200 version_type=none
6201 dynamic_linker="$host_os ld.so"
6202 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6203 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6204
6205 case $host_os in
6206 aix3*)
6207   version_type=linux
6208   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6209   shlibpath_var=LIBPATH
6210
6211   # AIX has no versioning support, so we append a major version to the name.
6212   soname_spec='${libname}${release}.so$major'
6213   ;;
6214
6215 aix4* | aix5*)
6216   version_type=linux
6217   need_lib_prefix=no
6218   need_version=no
6219   hardcode_into_libs=yes
6220   if test "$host_cpu" = ia64; then
6221     # AIX 5 supports IA64
6222     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6223     shlibpath_var=LD_LIBRARY_PATH
6224   else
6225     # With GCC up to 2.95.x, collect2 would create an import file
6226     # for dependence libraries.  The import file would start with
6227     # the line `#! .'.  This would cause the generated library to
6228     # depend on `.', always an invalid library.  This was fixed in
6229     # development snapshots of GCC prior to 3.0.
6230     case $host_os in
6231       aix4 | aix4.[01] | aix4.[01].*)
6232         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6233              echo ' yes '
6234              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6235           :
6236         else
6237           can_build_shared=no
6238         fi
6239         ;;
6240     esac
6241     # AIX (on Power*) has no versioning support, so currently we can
6242     # not hardcode correct soname into executable. Probably we can
6243     # add versioning support to collect2, so additional links can
6244     # be useful in future.
6245     if test "$aix_use_runtimelinking" = yes; then
6246       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6247       # instead of lib<name>.a to let people know that these are not
6248       # typical AIX shared libraries.
6249       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6250     else
6251       # We preserve .a as extension for shared libraries through AIX4.2
6252       # and later when we are not doing run time linking.
6253       library_names_spec='${libname}${release}.a $libname.a'
6254       soname_spec='${libname}${release}.so$major'
6255     fi
6256     shlibpath_var=LIBPATH
6257   fi
6258   hardcode_into_libs=yes
6259   ;;
6260
6261 amigaos*)
6262   library_names_spec='$libname.ixlibrary $libname.a'
6263   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6264   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'
6265   ;;
6266
6267 beos*)
6268   library_names_spec='${libname}.so'
6269   dynamic_linker="$host_os ld.so"
6270   shlibpath_var=LIBRARY_PATH
6271   ;;
6272
6273 bsdi4*)
6274   version_type=linux
6275   need_version=no
6276   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6277   soname_spec='${libname}${release}.so$major'
6278   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6279   shlibpath_var=LD_LIBRARY_PATH
6280   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6281   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6282   export_dynamic_flag_spec=-rdynamic
6283   # the default ld.so.conf also contains /usr/contrib/lib and
6284   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6285   # libtool to hard-code these into programs
6286   ;;
6287
6288 cygwin* | mingw* | pw32*)
6289   version_type=windows
6290   need_version=no
6291   need_lib_prefix=no
6292   case $GCC,$host_os in
6293   yes,cygwin*)
6294     library_names_spec='$libname.dll.a'
6295     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6296     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6297       dldir=$destdir/`dirname \$dlpath`~
6298       test -d \$dldir || mkdir -p \$dldir~
6299       $install_prog .libs/$dlname \$dldir/$dlname'
6300     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6301       dlpath=$dir/\$dldll~
6302        $rm \$dlpath'
6303     ;;
6304   yes,mingw*)
6305     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6306     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6307     ;;
6308   yes,pw32*)
6309     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6310     ;;
6311   *)
6312     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6313     ;;
6314   esac
6315   dynamic_linker='Win32 ld.exe'
6316   # FIXME: first we should search . and the directory the executable is in
6317   shlibpath_var=PATH
6318   ;;
6319
6320 darwin* | rhapsody*)
6321   dynamic_linker="$host_os dyld"
6322   version_type=darwin
6323   need_lib_prefix=no
6324   need_version=no
6325   # FIXME: Relying on posixy $() will cause problems for
6326   #        cross-compilation, but unfortunately the echo tests do not
6327   #        yet detect zsh echo's removal of \ escapes.
6328   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)'
6329   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6330   shlibpath_overrides_runpath=yes
6331   shlibpath_var=DYLD_LIBRARY_PATH
6332   ;;
6333
6334 freebsd1*)
6335   dynamic_linker=no
6336   ;;
6337
6338 freebsd*)
6339   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6340   version_type=freebsd-$objformat
6341   case $version_type in
6342     freebsd-elf*)
6343       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6344       need_version=no
6345       need_lib_prefix=no
6346       ;;
6347     freebsd-*)
6348       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6349       need_version=yes
6350       ;;
6351   esac
6352   shlibpath_var=LD_LIBRARY_PATH
6353   case $host_os in
6354   freebsd2*)
6355     shlibpath_overrides_runpath=yes
6356     ;;
6357   *)
6358     shlibpath_overrides_runpath=no
6359     hardcode_into_libs=yes
6360     ;;
6361   esac
6362   ;;
6363
6364 gnu*)
6365   version_type=linux
6366   need_lib_prefix=no
6367   need_version=no
6368   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6369   soname_spec='${libname}${release}.so$major'
6370   shlibpath_var=LD_LIBRARY_PATH
6371   hardcode_into_libs=yes
6372   ;;
6373
6374 hpux9* | hpux10* | hpux11*)
6375   # Give a soname corresponding to the major version so that dld.sl refuses to
6376   # link against other versions.
6377   dynamic_linker="$host_os dld.sl"
6378   version_type=sunos
6379   need_lib_prefix=no
6380   need_version=no
6381   shlibpath_var=SHLIB_PATH
6382   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6383   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6384   soname_spec='${libname}${release}.sl$major'
6385   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6386   postinstall_cmds='chmod 555 $lib'
6387   ;;
6388
6389 irix5* | irix6* | nonstopux*)
6390   case $host_os in
6391     nonstopux*) version_type=nonstopux ;;
6392     *)          version_type=irix ;;
6393   esac
6394   need_lib_prefix=no
6395   need_version=no
6396   soname_spec='${libname}${release}.so$major'
6397   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6398   case $host_os in
6399   irix5* | nonstopux*)
6400     libsuff= shlibsuff=
6401     ;;
6402   *)
6403     case $LD in # libtool.m4 will add one of these switches to LD
6404     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6405     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6406     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6407     *) libsuff= shlibsuff= libmagic=never-match;;
6408     esac
6409     ;;
6410   esac
6411   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6412   shlibpath_overrides_runpath=no
6413   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6414   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6415   ;;
6416
6417 # No shared lib support for Linux oldld, aout, or coff.
6418 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6419   dynamic_linker=no
6420   ;;
6421
6422 # This must be Linux ELF.
6423 linux-gnu*)
6424   version_type=linux
6425   need_lib_prefix=no
6426   need_version=no
6427   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6428   soname_spec='${libname}${release}.so$major'
6429   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6430   shlibpath_var=LD_LIBRARY_PATH
6431   shlibpath_overrides_runpath=no
6432   # This implies no fast_install, which is unacceptable.
6433   # Some rework will be needed to allow for fast_install
6434   # before this can be enabled.
6435   hardcode_into_libs=yes
6436
6437   # We used to test for /lib/ld.so.1 and disable shared libraries on
6438   # powerpc, because MkLinux only supported shared libraries with the
6439   # GNU dynamic linker.  Since this was broken with cross compilers,
6440   # most powerpc-linux boxes support dynamic linking these days and
6441   # people can always --disable-shared, the test was removed, and we
6442   # assume the GNU/Linux dynamic linker is in use.
6443   dynamic_linker='GNU/Linux ld.so'
6444   ;;
6445
6446 netbsd*)
6447   version_type=sunos
6448   need_lib_prefix=no
6449   need_version=no
6450   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6451     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6452     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6453     dynamic_linker='NetBSD (a.out) ld.so'
6454   else
6455     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6456     soname_spec='${libname}${release}.so$major'
6457     dynamic_linker='NetBSD ld.elf_so'
6458   fi
6459   shlibpath_var=LD_LIBRARY_PATH
6460   shlibpath_overrides_runpath=yes
6461   hardcode_into_libs=yes
6462   ;;
6463
6464 newsos6)
6465   version_type=linux
6466   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6467   shlibpath_var=LD_LIBRARY_PATH
6468   shlibpath_overrides_runpath=yes
6469   ;;
6470
6471 openbsd*)
6472   version_type=sunos
6473   need_lib_prefix=no
6474   need_version=no
6475   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6476     case "$host_os" in
6477     openbsd2.[89] | openbsd2.[89].*)
6478       shlibpath_overrides_runpath=no
6479       ;;
6480     *)
6481       shlibpath_overrides_runpath=yes
6482       ;;
6483     esac
6484   else
6485     shlibpath_overrides_runpath=yes
6486   fi
6487   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6488   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6489   shlibpath_var=LD_LIBRARY_PATH
6490   ;;
6491
6492 os2*)
6493   libname_spec='$name'
6494   need_lib_prefix=no
6495   library_names_spec='$libname.dll $libname.a'
6496   dynamic_linker='OS/2 ld.exe'
6497   shlibpath_var=LIBPATH
6498   ;;
6499
6500 osf3* | osf4* | osf5*)
6501   version_type=osf
6502   need_version=no
6503   soname_spec='${libname}${release}.so$major'
6504   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6505   shlibpath_var=LD_LIBRARY_PATH
6506   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6507   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6508   hardcode_into_libs=yes
6509   ;;
6510
6511 sco3.2v5*)
6512   version_type=osf
6513   soname_spec='${libname}${release}.so$major'
6514   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6515   shlibpath_var=LD_LIBRARY_PATH
6516   ;;
6517
6518 solaris*)
6519   version_type=linux
6520   need_lib_prefix=no
6521   need_version=no
6522   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6523   soname_spec='${libname}${release}.so$major'
6524   shlibpath_var=LD_LIBRARY_PATH
6525   shlibpath_overrides_runpath=yes
6526   hardcode_into_libs=yes
6527   # ldd complains unless libraries are executable
6528   postinstall_cmds='chmod +x $lib'
6529   ;;
6530
6531 sunos4*)
6532   version_type=sunos
6533   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6534   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6535   shlibpath_var=LD_LIBRARY_PATH
6536   shlibpath_overrides_runpath=yes
6537   if test "$with_gnu_ld" = yes; then
6538     need_lib_prefix=no
6539   fi
6540   need_version=yes
6541   ;;
6542
6543 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6544   version_type=linux
6545   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6546   soname_spec='${libname}${release}.so$major'
6547   shlibpath_var=LD_LIBRARY_PATH
6548   case $host_vendor in
6549     sni)
6550       shlibpath_overrides_runpath=no
6551       need_lib_prefix=no
6552       export_dynamic_flag_spec='${wl}-Blargedynsym'
6553       runpath_var=LD_RUN_PATH
6554       ;;
6555     siemens)
6556       need_lib_prefix=no
6557       ;;
6558     motorola)
6559       need_lib_prefix=no
6560       need_version=no
6561       shlibpath_overrides_runpath=no
6562       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6563       ;;
6564   esac
6565   ;;
6566
6567 uts4*)
6568   version_type=linux
6569   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6570   soname_spec='${libname}${release}.so$major'
6571   shlibpath_var=LD_LIBRARY_PATH
6572   ;;
6573
6574 dgux*)
6575   version_type=linux
6576   need_lib_prefix=no
6577   need_version=no
6578   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6579   soname_spec='${libname}${release}.so$major'
6580   shlibpath_var=LD_LIBRARY_PATH
6581   ;;
6582
6583 sysv4*MP*)
6584   if test -d /usr/nec ;then
6585     version_type=linux
6586     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6587     soname_spec='$libname.so.$major'
6588     shlibpath_var=LD_LIBRARY_PATH
6589   fi
6590   ;;
6591
6592 *)
6593   dynamic_linker=no
6594   ;;
6595 esac
6596 echo "$ac_t""$dynamic_linker" 1>&6
6597 test "$dynamic_linker" = no && can_build_shared=no
6598
6599 # Report the final consequences.
6600 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6601 echo "configure:6602: checking if libtool supports shared libraries" >&5
6602 echo "$ac_t""$can_build_shared" 1>&6
6603
6604 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6605 echo "configure:6606: checking whether to build shared libraries" >&5
6606 test "$can_build_shared" = "no" && enable_shared=no
6607
6608 # On AIX, shared libraries and static libraries use the same namespace, and
6609 # are all built from PIC.
6610 case "$host_os" in
6611 aix3*)
6612   test "$enable_shared" = yes && enable_static=no
6613   if test -n "$RANLIB"; then
6614     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6615     postinstall_cmds='$RANLIB $lib'
6616   fi
6617   ;;
6618
6619 aix4*)
6620   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6621     test "$enable_shared" = yes && enable_static=no
6622   fi
6623   ;;
6624 esac
6625 echo "$ac_t""$enable_shared" 1>&6
6626
6627 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6628 echo "configure:6629: checking whether to build static libraries" >&5
6629 # Make sure either enable_shared or enable_static is yes.
6630 test "$enable_shared" = yes || enable_static=yes
6631 echo "$ac_t""$enable_static" 1>&6
6632
6633 if test "$hardcode_action" = relink; then
6634   # Fast installation is not supported
6635   enable_fast_install=no
6636 elif test "$shlibpath_overrides_runpath" = yes ||
6637      test "$enable_shared" = no; then
6638   # Fast installation is not necessary
6639   enable_fast_install=needless
6640 fi
6641
6642 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6643 if test "$GCC" = yes; then
6644   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6645 fi
6646
6647 if test "x$enable_dlopen" != xyes; then
6648   enable_dlopen=unknown
6649   enable_dlopen_self=unknown
6650   enable_dlopen_self_static=unknown
6651 else
6652   lt_cv_dlopen=no
6653   lt_cv_dlopen_libs=
6654
6655   case $host_os in
6656   beos*)
6657     lt_cv_dlopen="load_add_on"
6658     lt_cv_dlopen_libs=
6659     lt_cv_dlopen_self=yes
6660     ;;
6661
6662   cygwin* | mingw* | pw32*)
6663     lt_cv_dlopen="LoadLibrary"
6664     lt_cv_dlopen_libs=
6665    ;;
6666
6667   *)
6668     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6669 echo "configure:6670: checking for shl_load" >&5
6670 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6671   echo $ac_n "(cached) $ac_c" 1>&6
6672 else
6673   cat > conftest.$ac_ext <<EOF
6674 #line 6675 "configure"
6675 #include "confdefs.h"
6676 /* System header to define __stub macros and hopefully few prototypes,
6677     which can conflict with char shl_load(); below.  */
6678 #include <assert.h>
6679 /* Override any gcc2 internal prototype to avoid an error.  */
6680 /* We use char because int might match the return type of a gcc2
6681     builtin and then its argument prototype would still apply.  */
6682 char shl_load();
6683 char (*f)();
6684
6685 int main() {
6686
6687 /* The GNU C library defines this for functions which it implements
6688     to always fail with ENOSYS.  Some functions are actually named
6689     something starting with __ and the normal name is an alias.  */
6690 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6691 choke me
6692 #else
6693 f = shl_load;
6694 #endif
6695
6696 ; return 0; }
6697 EOF
6698 if { (eval echo configure:6699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6699   rm -rf conftest*
6700   eval "ac_cv_func_shl_load=yes"
6701 else
6702   echo "configure: failed program was:" >&5
6703   cat conftest.$ac_ext >&5
6704   rm -rf conftest*
6705   eval "ac_cv_func_shl_load=no"
6706 fi
6707 rm -f conftest*
6708 fi
6709
6710 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6711   echo "$ac_t""yes" 1>&6
6712   lt_cv_dlopen="shl_load"
6713 else
6714   echo "$ac_t""no" 1>&6
6715 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6716 echo "configure:6717: checking for shl_load in -ldld" >&5
6717 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6718 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6719   echo $ac_n "(cached) $ac_c" 1>&6
6720 else
6721   ac_save_LIBS="$LIBS"
6722 LIBS="-ldld  $LIBS"
6723 cat > conftest.$ac_ext <<EOF
6724 #line 6725 "configure"
6725 #include "confdefs.h"
6726 /* Override any gcc2 internal prototype to avoid an error.  */
6727 /* We use char because int might match the return type of a gcc2
6728     builtin and then its argument prototype would still apply.  */
6729 char shl_load();
6730
6731 int main() {
6732 shl_load()
6733 ; return 0; }
6734 EOF
6735 if { (eval echo configure:6736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6736   rm -rf conftest*
6737   eval "ac_cv_lib_$ac_lib_var=yes"
6738 else
6739   echo "configure: failed program was:" >&5
6740   cat conftest.$ac_ext >&5
6741   rm -rf conftest*
6742   eval "ac_cv_lib_$ac_lib_var=no"
6743 fi
6744 rm -f conftest*
6745 LIBS="$ac_save_LIBS"
6746
6747 fi
6748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6749   echo "$ac_t""yes" 1>&6
6750   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6751 else
6752   echo "$ac_t""no" 1>&6
6753 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6754 echo "configure:6755: checking for dlopen" >&5
6755 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6756   echo $ac_n "(cached) $ac_c" 1>&6
6757 else
6758   cat > conftest.$ac_ext <<EOF
6759 #line 6760 "configure"
6760 #include "confdefs.h"
6761 /* System header to define __stub macros and hopefully few prototypes,
6762     which can conflict with char dlopen(); below.  */
6763 #include <assert.h>
6764 /* Override any gcc2 internal prototype to avoid an error.  */
6765 /* We use char because int might match the return type of a gcc2
6766     builtin and then its argument prototype would still apply.  */
6767 char dlopen();
6768 char (*f)();
6769
6770 int main() {
6771
6772 /* The GNU C library defines this for functions which it implements
6773     to always fail with ENOSYS.  Some functions are actually named
6774     something starting with __ and the normal name is an alias.  */
6775 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6776 choke me
6777 #else
6778 f = dlopen;
6779 #endif
6780
6781 ; return 0; }
6782 EOF
6783 if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6784   rm -rf conftest*
6785   eval "ac_cv_func_dlopen=yes"
6786 else
6787   echo "configure: failed program was:" >&5
6788   cat conftest.$ac_ext >&5
6789   rm -rf conftest*
6790   eval "ac_cv_func_dlopen=no"
6791 fi
6792 rm -f conftest*
6793 fi
6794
6795 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6796   echo "$ac_t""yes" 1>&6
6797   lt_cv_dlopen="dlopen"
6798 else
6799   echo "$ac_t""no" 1>&6
6800 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6801 echo "configure:6802: checking for dlopen in -ldl" >&5
6802 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6803 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6804   echo $ac_n "(cached) $ac_c" 1>&6
6805 else
6806   ac_save_LIBS="$LIBS"
6807 LIBS="-ldl  $LIBS"
6808 cat > conftest.$ac_ext <<EOF
6809 #line 6810 "configure"
6810 #include "confdefs.h"
6811 /* Override any gcc2 internal prototype to avoid an error.  */
6812 /* We use char because int might match the return type of a gcc2
6813     builtin and then its argument prototype would still apply.  */
6814 char dlopen();
6815
6816 int main() {
6817 dlopen()
6818 ; return 0; }
6819 EOF
6820 if { (eval echo configure:6821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6821   rm -rf conftest*
6822   eval "ac_cv_lib_$ac_lib_var=yes"
6823 else
6824   echo "configure: failed program was:" >&5
6825   cat conftest.$ac_ext >&5
6826   rm -rf conftest*
6827   eval "ac_cv_lib_$ac_lib_var=no"
6828 fi
6829 rm -f conftest*
6830 LIBS="$ac_save_LIBS"
6831
6832 fi
6833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6834   echo "$ac_t""yes" 1>&6
6835   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6836 else
6837   echo "$ac_t""no" 1>&6
6838 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6839 echo "configure:6840: checking for dlopen in -lsvld" >&5
6840 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6841 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6842   echo $ac_n "(cached) $ac_c" 1>&6
6843 else
6844   ac_save_LIBS="$LIBS"
6845 LIBS="-lsvld  $LIBS"
6846 cat > conftest.$ac_ext <<EOF
6847 #line 6848 "configure"
6848 #include "confdefs.h"
6849 /* Override any gcc2 internal prototype to avoid an error.  */
6850 /* We use char because int might match the return type of a gcc2
6851     builtin and then its argument prototype would still apply.  */
6852 char dlopen();
6853
6854 int main() {
6855 dlopen()
6856 ; return 0; }
6857 EOF
6858 if { (eval echo configure:6859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6859   rm -rf conftest*
6860   eval "ac_cv_lib_$ac_lib_var=yes"
6861 else
6862   echo "configure: failed program was:" >&5
6863   cat conftest.$ac_ext >&5
6864   rm -rf conftest*
6865   eval "ac_cv_lib_$ac_lib_var=no"
6866 fi
6867 rm -f conftest*
6868 LIBS="$ac_save_LIBS"
6869
6870 fi
6871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6872   echo "$ac_t""yes" 1>&6
6873   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6874 else
6875   echo "$ac_t""no" 1>&6
6876 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6877 echo "configure:6878: checking for dld_link in -ldld" >&5
6878 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6879 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6880   echo $ac_n "(cached) $ac_c" 1>&6
6881 else
6882   ac_save_LIBS="$LIBS"
6883 LIBS="-ldld  $LIBS"
6884 cat > conftest.$ac_ext <<EOF
6885 #line 6886 "configure"
6886 #include "confdefs.h"
6887 /* Override any gcc2 internal prototype to avoid an error.  */
6888 /* We use char because int might match the return type of a gcc2
6889     builtin and then its argument prototype would still apply.  */
6890 char dld_link();
6891
6892 int main() {
6893 dld_link()
6894 ; return 0; }
6895 EOF
6896 if { (eval echo configure:6897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6897   rm -rf conftest*
6898   eval "ac_cv_lib_$ac_lib_var=yes"
6899 else
6900   echo "configure: failed program was:" >&5
6901   cat conftest.$ac_ext >&5
6902   rm -rf conftest*
6903   eval "ac_cv_lib_$ac_lib_var=no"
6904 fi
6905 rm -f conftest*
6906 LIBS="$ac_save_LIBS"
6907
6908 fi
6909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6910   echo "$ac_t""yes" 1>&6
6911   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6912 else
6913   echo "$ac_t""no" 1>&6
6914 fi
6915
6916               
6917 fi
6918
6919             
6920 fi
6921
6922           
6923 fi
6924
6925         
6926 fi
6927
6928       
6929 fi
6930
6931     ;;
6932   esac
6933
6934   if test "x$lt_cv_dlopen" != xno; then
6935     enable_dlopen=yes
6936   else
6937     enable_dlopen=no
6938   fi
6939
6940   case $lt_cv_dlopen in
6941   dlopen)
6942     save_CPPFLAGS="$CPPFLAGS"
6943         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6944
6945     save_LDFLAGS="$LDFLAGS"
6946     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6947
6948     save_LIBS="$LIBS"
6949     LIBS="$lt_cv_dlopen_libs $LIBS"
6950
6951     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6952 echo "configure:6953: checking whether a program can dlopen itself" >&5
6953 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6954   echo $ac_n "(cached) $ac_c" 1>&6
6955 else
6956           if test "$cross_compiling" = yes; then :
6957   lt_cv_dlopen_self=cross
6958 else
6959     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6960   lt_status=$lt_dlunknown
6961   cat > conftest.$ac_ext <<EOF
6962 #line 6963 "configure"
6963 #include "confdefs.h"
6964
6965 #if HAVE_DLFCN_H
6966 #include <dlfcn.h>
6967 #endif
6968
6969 #include <stdio.h>
6970
6971 #ifdef RTLD_GLOBAL
6972 #  define LT_DLGLOBAL           RTLD_GLOBAL
6973 #else
6974 #  ifdef DL_GLOBAL
6975 #    define LT_DLGLOBAL         DL_GLOBAL
6976 #  else
6977 #    define LT_DLGLOBAL         0
6978 #  endif
6979 #endif
6980
6981 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6982    find out it does not work in some platform. */
6983 #ifndef LT_DLLAZY_OR_NOW
6984 #  ifdef RTLD_LAZY
6985 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6986 #  else
6987 #    ifdef DL_LAZY
6988 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6989 #    else
6990 #      ifdef RTLD_NOW
6991 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6992 #      else
6993 #        ifdef DL_NOW
6994 #          define LT_DLLAZY_OR_NOW      DL_NOW
6995 #        else
6996 #          define LT_DLLAZY_OR_NOW      0
6997 #        endif
6998 #      endif
6999 #    endif
7000 #  endif
7001 #endif
7002
7003 #ifdef __cplusplus
7004 extern "C" void exit (int);
7005 #endif
7006
7007 void fnord() { int i=42;}
7008 int main ()
7009 {
7010   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7011   int status = $lt_dlunknown;
7012
7013   if (self)
7014     {
7015       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7016       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7017       /* dlclose (self); */
7018     }
7019
7020     exit (status);
7021 }
7022 EOF
7023   if { (eval echo configure:7024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7024     (./conftest; exit; ) 2>/dev/null
7025     lt_status=$?
7026     case x$lt_status in
7027       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7028       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7029       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7030     esac
7031   else :
7032     # compilation failed
7033     lt_cv_dlopen_self=no
7034   fi
7035 fi
7036 rm -fr conftest*
7037
7038     
7039 fi
7040
7041 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7042
7043     if test "x$lt_cv_dlopen_self" = xyes; then
7044       LDFLAGS="$LDFLAGS $link_static_flag"
7045       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7046 echo "configure:7047: checking whether a statically linked program can dlopen itself" >&5
7047 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7048   echo $ac_n "(cached) $ac_c" 1>&6
7049 else
7050           if test "$cross_compiling" = yes; then :
7051   lt_cv_dlopen_self_static=cross
7052 else
7053     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7054   lt_status=$lt_dlunknown
7055   cat > conftest.$ac_ext <<EOF
7056 #line 7057 "configure"
7057 #include "confdefs.h"
7058
7059 #if HAVE_DLFCN_H
7060 #include <dlfcn.h>
7061 #endif
7062
7063 #include <stdio.h>
7064
7065 #ifdef RTLD_GLOBAL
7066 #  define LT_DLGLOBAL           RTLD_GLOBAL
7067 #else
7068 #  ifdef DL_GLOBAL
7069 #    define LT_DLGLOBAL         DL_GLOBAL
7070 #  else
7071 #    define LT_DLGLOBAL         0
7072 #  endif
7073 #endif
7074
7075 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7076    find out it does not work in some platform. */
7077 #ifndef LT_DLLAZY_OR_NOW
7078 #  ifdef RTLD_LAZY
7079 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7080 #  else
7081 #    ifdef DL_LAZY
7082 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7083 #    else
7084 #      ifdef RTLD_NOW
7085 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7086 #      else
7087 #        ifdef DL_NOW
7088 #          define LT_DLLAZY_OR_NOW      DL_NOW
7089 #        else
7090 #          define LT_DLLAZY_OR_NOW      0
7091 #        endif
7092 #      endif
7093 #    endif
7094 #  endif
7095 #endif
7096
7097 #ifdef __cplusplus
7098 extern "C" void exit (int);
7099 #endif
7100
7101 void fnord() { int i=42;}
7102 int main ()
7103 {
7104   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7105   int status = $lt_dlunknown;
7106
7107   if (self)
7108     {
7109       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7110       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7111       /* dlclose (self); */
7112     }
7113
7114     exit (status);
7115 }
7116 EOF
7117   if { (eval echo configure:7118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7118     (./conftest; exit; ) 2>/dev/null
7119     lt_status=$?
7120     case x$lt_status in
7121       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7122       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7123       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7124     esac
7125   else :
7126     # compilation failed
7127     lt_cv_dlopen_self_static=no
7128   fi
7129 fi
7130 rm -fr conftest*
7131
7132       
7133 fi
7134
7135 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7136     fi
7137
7138     CPPFLAGS="$save_CPPFLAGS"
7139     LDFLAGS="$save_LDFLAGS"
7140     LIBS="$save_LIBS"
7141     ;;
7142   esac
7143
7144   case $lt_cv_dlopen_self in
7145   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7146   *) enable_dlopen_self=unknown ;;
7147   esac
7148
7149   case $lt_cv_dlopen_self_static in
7150   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7151   *) enable_dlopen_self_static=unknown ;;
7152   esac
7153 fi
7154
7155
7156 if test "$enable_shared" = yes && test "$GCC" = yes; then
7157   case $archive_cmds in
7158   *'~'*)
7159     # FIXME: we may have to deal with multi-command sequences.
7160     ;;
7161   '$CC '*)
7162     # Test whether the compiler implicitly links with -lc since on some
7163     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7164     # to ld, don't add -lc before -lgcc.
7165     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7166 echo "configure:7167: checking whether -lc should be explicitly linked in" >&5
7167     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7168   echo $ac_n "(cached) $ac_c" 1>&6
7169 else
7170   $rm conftest*
7171     echo 'static int dummy;' > conftest.$ac_ext
7172
7173     if { (eval echo configure:7174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7174       soname=conftest
7175       lib=conftest
7176       libobjs=conftest.$ac_objext
7177       deplibs=
7178       wl=$lt_cv_prog_cc_wl
7179       compiler_flags=-v
7180       linker_flags=-v
7181       verstring=
7182       output_objdir=.
7183       libname=conftest
7184       save_allow_undefined_flag=$allow_undefined_flag
7185       allow_undefined_flag=
7186       if { (eval echo configure:7187: \"$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; }
7187       then
7188         lt_cv_archive_cmds_need_lc=no
7189       else
7190         lt_cv_archive_cmds_need_lc=yes
7191       fi
7192       allow_undefined_flag=$save_allow_undefined_flag
7193     else
7194       cat conftest.err 1>&5
7195     fi
7196 fi
7197
7198     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7199     ;;
7200   esac
7201 fi
7202 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7203
7204 # The second clause should only fire when bootstrapping the
7205 # libtool distribution, otherwise you forgot to ship ltmain.sh
7206 # with your package, and you will get complaints that there are
7207 # no rules to generate ltmain.sh.
7208 if test -f "$ltmain"; then
7209   :
7210 else
7211   # If there is no Makefile yet, we rely on a make rule to execute
7212   # `config.status --recheck' to rerun these tests and create the
7213   # libtool script then.
7214   test -f Makefile && make "$ltmain"
7215 fi
7216
7217 if test -f "$ltmain"; then
7218   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7219   $rm -f "${ofile}T"
7220
7221   echo creating $ofile
7222
7223   # Now quote all the things that may contain metacharacters while being
7224   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7225   # variables and quote the copies for generation of the libtool script.
7226   for var in echo old_CC old_CFLAGS SED \
7227     AR AR_FLAGS CC LD LN_S NM SHELL \
7228     reload_flag reload_cmds wl \
7229     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7230     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7231     library_names_spec soname_spec \
7232     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7233     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7234     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7235     old_striplib striplib file_magic_cmd export_symbols_cmds \
7236     deplibs_check_method allow_undefined_flag no_undefined_flag \
7237     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7238     global_symbol_to_c_name_address \
7239     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7240     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7241     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7242
7243     case $var in
7244     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7245     old_postinstall_cmds | old_postuninstall_cmds | \
7246     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7247     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7248     postinstall_cmds | postuninstall_cmds | \
7249     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7250       # Double-quote double-evaled strings.
7251       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7252       ;;
7253     *)
7254       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7255       ;;
7256     esac
7257   done
7258
7259   cat <<__EOF__ > "${ofile}T"
7260 #! $SHELL
7261
7262 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7263 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7264 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7265 #
7266 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7267 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7268 #
7269 # This program is free software; you can redistribute it and/or modify
7270 # it under the terms of the GNU General Public License as published by
7271 # the Free Software Foundation; either version 2 of the License, or
7272 # (at your option) any later version.
7273 #
7274 # This program is distributed in the hope that it will be useful, but
7275 # WITHOUT ANY WARRANTY; without even the implied warranty of
7276 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7277 # General Public License for more details.
7278 #
7279 # You should have received a copy of the GNU General Public License
7280 # along with this program; if not, write to the Free Software
7281 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7282 #
7283 # As a special exception to the GNU General Public License, if you
7284 # distribute this file as part of a program that contains a
7285 # configuration script generated by Autoconf, you may include it under
7286 # the same distribution terms that you use for the rest of that program.
7287
7288 # A sed that does not truncate output.
7289 SED=$lt_SED
7290
7291 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7292 Xsed="${SED} -e s/^X//"
7293
7294 # The HP-UX ksh and POSIX shell print the target directory to stdout
7295 # if CDPATH is set.
7296 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7297
7298 # ### BEGIN LIBTOOL CONFIG
7299
7300 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7301
7302 # Shell to use when invoking shell scripts.
7303 SHELL=$lt_SHELL
7304
7305 # Whether or not to build shared libraries.
7306 build_libtool_libs=$enable_shared
7307
7308 # Whether or not to build static libraries.
7309 build_old_libs=$enable_static
7310
7311 # Whether or not to add -lc for building shared libraries.
7312 build_libtool_need_lc=$need_lc
7313
7314 # Whether or not to optimize for fast installation.
7315 fast_install=$enable_fast_install
7316
7317 # The host system.
7318 host_alias=$host_alias
7319 host=$host
7320
7321 # An echo program that does not interpret backslashes.
7322 echo=$lt_echo
7323
7324 # The archiver.
7325 AR=$lt_AR
7326 AR_FLAGS=$lt_AR_FLAGS
7327
7328 # The default C compiler.
7329 CC=$lt_CC
7330
7331 # Is the compiler the GNU C compiler?
7332 with_gcc=$GCC
7333
7334 # The linker used to build libraries.
7335 LD=$lt_LD
7336
7337 # Whether we need hard or soft links.
7338 LN_S=$lt_LN_S
7339
7340 # A BSD-compatible nm program.
7341 NM=$lt_NM
7342
7343 # A symbol stripping program
7344 STRIP=$STRIP
7345
7346 # Used to examine libraries when file_magic_cmd begins "file"
7347 MAGIC_CMD=$MAGIC_CMD
7348
7349 # Used on cygwin: DLL creation program.
7350 DLLTOOL="$DLLTOOL"
7351
7352 # Used on cygwin: object dumper.
7353 OBJDUMP="$OBJDUMP"
7354
7355 # Used on cygwin: assembler.
7356 AS="$AS"
7357
7358 # The name of the directory that contains temporary libtool files.
7359 objdir=$objdir
7360
7361 # How to create reloadable object files.
7362 reload_flag=$lt_reload_flag
7363 reload_cmds=$lt_reload_cmds
7364
7365 # How to pass a linker flag through the compiler.
7366 wl=$lt_wl
7367
7368 # Object file suffix (normally "o").
7369 objext="$ac_objext"
7370
7371 # Old archive suffix (normally "a").
7372 libext="$libext"
7373
7374 # Executable file suffix (normally "").
7375 exeext="$exeext"
7376
7377 # Additional compiler flags for building library objects.
7378 pic_flag=$lt_pic_flag
7379 pic_mode=$pic_mode
7380
7381 # Does compiler simultaneously support -c and -o options?
7382 compiler_c_o=$lt_compiler_c_o
7383
7384 # Can we write directly to a .lo ?
7385 compiler_o_lo=$lt_compiler_o_lo
7386
7387 # Must we lock files when doing compilation ?
7388 need_locks=$lt_need_locks
7389
7390 # Do we need the lib prefix for modules?
7391 need_lib_prefix=$need_lib_prefix
7392
7393 # Do we need a version for libraries?
7394 need_version=$need_version
7395
7396 # Whether dlopen is supported.
7397 dlopen_support=$enable_dlopen
7398
7399 # Whether dlopen of programs is supported.
7400 dlopen_self=$enable_dlopen_self
7401
7402 # Whether dlopen of statically linked programs is supported.
7403 dlopen_self_static=$enable_dlopen_self_static
7404
7405 # Compiler flag to prevent dynamic linking.
7406 link_static_flag=$lt_link_static_flag
7407
7408 # Compiler flag to turn off builtin functions.
7409 no_builtin_flag=$lt_no_builtin_flag
7410
7411 # Compiler flag to allow reflexive dlopens.
7412 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7413
7414 # Compiler flag to generate shared objects directly from archives.
7415 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7416
7417 # Compiler flag to generate thread-safe objects.
7418 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7419
7420 # Library versioning type.
7421 version_type=$version_type
7422
7423 # Format of library name prefix.
7424 libname_spec=$lt_libname_spec
7425
7426 # List of archive names.  First name is the real one, the rest are links.
7427 # The last name is the one that the linker finds with -lNAME.
7428 library_names_spec=$lt_library_names_spec
7429
7430 # The coded name of the library, if different from the real name.
7431 soname_spec=$lt_soname_spec
7432
7433 # Commands used to build and install an old-style archive.
7434 RANLIB=$lt_RANLIB
7435 old_archive_cmds=$lt_old_archive_cmds
7436 old_postinstall_cmds=$lt_old_postinstall_cmds
7437 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7438
7439 # Create an old-style archive from a shared archive.
7440 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7441
7442 # Create a temporary old-style archive to link instead of a shared archive.
7443 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7444
7445 # Commands used to build and install a shared archive.
7446 archive_cmds=$lt_archive_cmds
7447 archive_expsym_cmds=$lt_archive_expsym_cmds
7448 postinstall_cmds=$lt_postinstall_cmds
7449 postuninstall_cmds=$lt_postuninstall_cmds
7450
7451 # Commands to strip libraries.
7452 old_striplib=$lt_old_striplib
7453 striplib=$lt_striplib
7454
7455 # Method to check whether dependent libraries are shared objects.
7456 deplibs_check_method=$lt_deplibs_check_method
7457
7458 # Command to use when deplibs_check_method == file_magic.
7459 file_magic_cmd=$lt_file_magic_cmd
7460
7461 # Flag that allows shared libraries with undefined symbols to be built.
7462 allow_undefined_flag=$lt_allow_undefined_flag
7463
7464 # Flag that forces no undefined symbols.
7465 no_undefined_flag=$lt_no_undefined_flag
7466
7467 # Commands used to finish a libtool library installation in a directory.
7468 finish_cmds=$lt_finish_cmds
7469
7470 # Same as above, but a single script fragment to be evaled but not shown.
7471 finish_eval=$lt_finish_eval
7472
7473 # Take the output of nm and produce a listing of raw symbols and C names.
7474 global_symbol_pipe=$lt_global_symbol_pipe
7475
7476 # Transform the output of nm in a proper C declaration
7477 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7478
7479 # Transform the output of nm in a C name address pair
7480 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7481
7482 # This is the shared library runtime path variable.
7483 runpath_var=$runpath_var
7484
7485 # This is the shared library path variable.
7486 shlibpath_var=$shlibpath_var
7487
7488 # Is shlibpath searched before the hard-coded library search path?
7489 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7490
7491 # How to hardcode a shared library path into an executable.
7492 hardcode_action=$hardcode_action
7493
7494 # Whether we should hardcode library paths into libraries.
7495 hardcode_into_libs=$hardcode_into_libs
7496
7497 # Flag to hardcode \$libdir into a binary during linking.
7498 # This must work even if \$libdir does not exist.
7499 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7500
7501 # Whether we need a single -rpath flag with a separated argument.
7502 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7503
7504 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7505 # resulting binary.
7506 hardcode_direct=$hardcode_direct
7507
7508 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7509 # resulting binary.
7510 hardcode_minus_L=$hardcode_minus_L
7511
7512 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7513 # the resulting binary.
7514 hardcode_shlibpath_var=$hardcode_shlibpath_var
7515
7516 # Variables whose values should be saved in libtool wrapper scripts and
7517 # restored at relink time.
7518 variables_saved_for_relink="$variables_saved_for_relink"
7519
7520 # Whether libtool must link a program against all its dependency libraries.
7521 link_all_deplibs=$link_all_deplibs
7522
7523 # Compile-time system search path for libraries
7524 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7525
7526 # Run-time system search path for libraries
7527 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7528
7529 # Fix the shell variable \$srcfile for the compiler.
7530 fix_srcfile_path="$fix_srcfile_path"
7531
7532 # Set to yes if exported symbols are required.
7533 always_export_symbols=$always_export_symbols
7534
7535 # The commands to list exported symbols.
7536 export_symbols_cmds=$lt_export_symbols_cmds
7537
7538 # The commands to extract the exported symbol list from a shared archive.
7539 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7540
7541 # Symbols that should not be listed in the preloaded symbols.
7542 exclude_expsyms=$lt_exclude_expsyms
7543
7544 # Symbols that must always be exported.
7545 include_expsyms=$lt_include_expsyms
7546
7547 # ### END LIBTOOL CONFIG
7548
7549 __EOF__
7550
7551   case $host_os in
7552   aix3*)
7553     cat <<\EOF >> "${ofile}T"
7554
7555 # AIX sometimes has problems with the GCC collect2 program.  For some
7556 # reason, if we set the COLLECT_NAMES environment variable, the problems
7557 # vanish in a puff of smoke.
7558 if test "X${COLLECT_NAMES+set}" != Xset; then
7559   COLLECT_NAMES=
7560   export COLLECT_NAMES
7561 fi
7562 EOF
7563     ;;
7564   esac
7565
7566   case $host_os in
7567   cygwin* | mingw* | pw32* | os2*)
7568     cat <<'EOF' >> "${ofile}T"
7569       # This is a source program that is used to create dlls on Windows
7570       # Don't remove nor modify the starting and closing comments
7571 # /* ltdll.c starts here */
7572 # #define WIN32_LEAN_AND_MEAN
7573 # #include <windows.h>
7574 # #undef WIN32_LEAN_AND_MEAN
7575 # #include <stdio.h>
7576 #
7577 # #ifndef __CYGWIN__
7578 # #  ifdef __CYGWIN32__
7579 # #    define __CYGWIN__ __CYGWIN32__
7580 # #  endif
7581 # #endif
7582 #
7583 # #ifdef __cplusplus
7584 # extern "C" {
7585 # #endif
7586 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7587 # #ifdef __cplusplus
7588 # }
7589 # #endif
7590 #
7591 # #ifdef __CYGWIN__
7592 # #include <cygwin/cygwin_dll.h>
7593 # DECLARE_CYGWIN_DLL( DllMain );
7594 # #endif
7595 # HINSTANCE __hDllInstance_base;
7596 #
7597 # BOOL APIENTRY
7598 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7599 # {
7600 #   __hDllInstance_base = hInst;
7601 #   return TRUE;
7602 # }
7603 # /* ltdll.c ends here */
7604         # This is a source program that is used to create import libraries
7605         # on Windows for dlls which lack them. Don't remove nor modify the
7606         # starting and closing comments
7607 # /* impgen.c starts here */
7608 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7609 #
7610 #  This file is part of GNU libtool.
7611 #
7612 #  This program is free software; you can redistribute it and/or modify
7613 #  it under the terms of the GNU General Public License as published by
7614 #  the Free Software Foundation; either version 2 of the License, or
7615 #  (at your option) any later version.
7616 #
7617 #  This program is distributed in the hope that it will be useful,
7618 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7619 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7620 #  GNU General Public License for more details.
7621 #
7622 #  You should have received a copy of the GNU General Public License
7623 #  along with this program; if not, write to the Free Software
7624 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7625 #  */
7626 #
7627 # #include <stdio.h>            /* for printf() */
7628 # #include <unistd.h>           /* for open(), lseek(), read() */
7629 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7630 # #include <string.h>           /* for strdup() */
7631 #
7632 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7633 # #ifndef O_BINARY
7634 # #define O_BINARY 0
7635 # #endif
7636 #
7637 # static unsigned int
7638 # pe_get16 (fd, offset)
7639 #      int fd;
7640 #      int offset;
7641 # {
7642 #   unsigned char b[2];
7643 #   lseek (fd, offset, SEEK_SET);
7644 #   read (fd, b, 2);
7645 #   return b[0] + (b[1]<<8);
7646 # }
7647 #
7648 # static unsigned int
7649 # pe_get32 (fd, offset)
7650 #     int fd;
7651 #     int offset;
7652 # {
7653 #   unsigned char b[4];
7654 #   lseek (fd, offset, SEEK_SET);
7655 #   read (fd, b, 4);
7656 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7657 # }
7658 #
7659 # static unsigned int
7660 # pe_as32 (ptr)
7661 #      void *ptr;
7662 # {
7663 #   unsigned char *b = ptr;
7664 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7665 # }
7666 #
7667 # int
7668 # main (argc, argv)
7669 #     int argc;
7670 #     char *argv[];
7671 # {
7672 #     int dll;
7673 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7674 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7675 #     unsigned long name_rvas, nexp;
7676 #     unsigned char *expdata, *erva;
7677 #     char *filename, *dll_name;
7678 #
7679 #     filename = argv[1];
7680 #
7681 #     dll = open(filename, O_RDONLY|O_BINARY);
7682 #     if (dll < 1)
7683 #       return 1;
7684 #
7685 #     dll_name = filename;
7686 #
7687 #     for (i=0; filename[i]; i++)
7688 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7689 #           dll_name = filename + i +1;
7690 #
7691 #     pe_header_offset = pe_get32 (dll, 0x3c);
7692 #     opthdr_ofs = pe_header_offset + 4 + 20;
7693 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7694 #
7695 #     if (num_entries < 1) /* no exports */
7696 #       return 1;
7697 #
7698 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7699 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7700 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7701 #     secptr = (pe_header_offset + 4 + 20 +
7702 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7703 #
7704 #     expptr = 0;
7705 #     for (i = 0; i < nsections; i++)
7706 #     {
7707 #       char sname[8];
7708 #       unsigned long secptr1 = secptr + 40 * i;
7709 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7710 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7711 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7712 #       lseek(dll, secptr1, SEEK_SET);
7713 #       read(dll, sname, 8);
7714 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7715 #       {
7716 #           expptr = fptr + (export_rva - vaddr);
7717 #           if (export_rva + export_size > vaddr + vsize)
7718 #               export_size = vsize - (export_rva - vaddr);
7719 #           break;
7720 #       }
7721 #     }
7722 #
7723 #     expdata = (unsigned char*)malloc(export_size);
7724 #     lseek (dll, expptr, SEEK_SET);
7725 #     read (dll, expdata, export_size);
7726 #     erva = expdata - export_rva;
7727 #
7728 #     nexp = pe_as32 (expdata+24);
7729 #     name_rvas = pe_as32 (expdata+32);
7730 #
7731 #     printf ("EXPORTS\n");
7732 #     for (i = 0; i<nexp; i++)
7733 #     {
7734 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7735 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7736 #     }
7737 #
7738 #     return 0;
7739 # }
7740 # /* impgen.c ends here */
7741
7742 EOF
7743     ;;
7744   esac
7745
7746   # We use sed instead of cat because bash on DJGPP gets confused if
7747   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7748   # text mode, it properly converts lines to CR/LF.  This bash problem
7749   # is reportedly fixed, but why not run on old versions too?
7750   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7751
7752   mv -f "${ofile}T" "$ofile" || \
7753     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7754   chmod +x "$ofile"
7755 fi
7756
7757
7758
7759
7760
7761 # This can be used to rebuild libtool when needed
7762 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7763
7764 # Always use our own libtool.
7765 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7766
7767 # Prevent multiple expansion
7768
7769
7770
7771 # test for ln hardlink support
7772 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7773 echo "configure:7774: checking whether ln works" >&5
7774 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7775   echo $ac_n "(cached) $ac_c" 1>&6
7776 else
7777   rm -f conftest.src conftest.dst
7778 echo "conftest" > conftest.src
7779 if ln conftest.src conftest.dst 2>/dev/null
7780 then
7781   ol_cv_prog_LN_H="ln"
7782 else
7783   ol_cv_prog_LN_H="cp"
7784 fi
7785 rm -f conftest.src conftest.dst
7786
7787 fi
7788 LN_H="$ol_cv_prog_LN_H"
7789 if test "$ol_cv_prog_LN_H" = "ln"; then
7790         echo "$ac_t""yes" 1>&6
7791 else
7792         echo "$ac_t""no" 1>&6
7793 fi
7794
7795 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7796 echo "configure:7797: checking whether ln -s works" >&5
7797 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7798   echo $ac_n "(cached) $ac_c" 1>&6
7799 else
7800   rm -f conftestdata
7801 if ln -s X conftestdata 2>/dev/null
7802 then
7803   rm -f conftestdata
7804   ac_cv_prog_LN_S="ln -s"
7805 else
7806   ac_cv_prog_LN_S=ln
7807 fi
7808 fi
7809 LN_S="$ac_cv_prog_LN_S"
7810 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7811   echo "$ac_t""yes" 1>&6
7812 else
7813   echo "$ac_t""no" 1>&6
7814 fi
7815
7816
7817 ol_link_perl=no
7818 if test $ol_enable_perl != no ; then
7819         # Extract the first word of "perl", so it can be a program name with args.
7820 set dummy perl; ac_word=$2
7821 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7822 echo "configure:7823: checking for $ac_word" >&5
7823 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7824   echo $ac_n "(cached) $ac_c" 1>&6
7825 else
7826   case "$PERLBIN" in
7827   /*)
7828   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7829   ;;
7830   ?:/*)
7831   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7832   ;;
7833   *)
7834   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7835   ac_dummy="$PATH"
7836   for ac_dir in $ac_dummy; do 
7837     test -z "$ac_dir" && ac_dir=.
7838     if test -f $ac_dir/$ac_word; then
7839       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7840       break
7841     fi
7842   done
7843   IFS="$ac_save_ifs"
7844   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7845   ;;
7846 esac
7847 fi
7848 PERLBIN="$ac_cv_path_PERLBIN"
7849 if test -n "$PERLBIN"; then
7850   echo "$ac_t""$PERLBIN" 1>&6
7851 else
7852   echo "$ac_t""no" 1>&6
7853 fi
7854
7855
7856         if test "no$PERLBIN" = "no" ; then
7857                 if test $ol_enable_perl = yes ; then
7858                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7859                 fi
7860
7861         else
7862                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7863                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7864
7865                 if test x"$ol_with_perl_module" = "xstatic" ; then
7866                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7867                 else
7868                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7869                 fi
7870                                 ol_link_perl=yes
7871         fi
7872 fi
7873
7874 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7875 echo "configure:7876: checking how to run the C preprocessor" >&5
7876 # On Suns, sometimes $CPP names a directory.
7877 if test -n "$CPP" && test -d "$CPP"; then
7878   CPP=
7879 fi
7880 if test -z "$CPP"; then
7881 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7882   echo $ac_n "(cached) $ac_c" 1>&6
7883 else
7884     # This must be in double quotes, not single quotes, because CPP may get
7885   # substituted into the Makefile and "${CC-cc}" will confuse make.
7886   CPP="${CC-cc} -E"
7887   # On the NeXT, cc -E runs the code through the compiler's parser,
7888   # not just through cpp.
7889   cat > conftest.$ac_ext <<EOF
7890 #line 7891 "configure"
7891 #include "confdefs.h"
7892 #include <assert.h>
7893 Syntax Error
7894 EOF
7895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7896 { (eval echo configure:7897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7898 if test -z "$ac_err"; then
7899   :
7900 else
7901   echo "$ac_err" >&5
7902   echo "configure: failed program was:" >&5
7903   cat conftest.$ac_ext >&5
7904   rm -rf conftest*
7905   CPP="${CC-cc} -E -traditional-cpp"
7906   cat > conftest.$ac_ext <<EOF
7907 #line 7908 "configure"
7908 #include "confdefs.h"
7909 #include <assert.h>
7910 Syntax Error
7911 EOF
7912 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7913 { (eval echo configure:7914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7914 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7915 if test -z "$ac_err"; then
7916   :
7917 else
7918   echo "$ac_err" >&5
7919   echo "configure: failed program was:" >&5
7920   cat conftest.$ac_ext >&5
7921   rm -rf conftest*
7922   CPP="${CC-cc} -nologo -E"
7923   cat > conftest.$ac_ext <<EOF
7924 #line 7925 "configure"
7925 #include "confdefs.h"
7926 #include <assert.h>
7927 Syntax Error
7928 EOF
7929 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7930 { (eval echo configure:7931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7931 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7932 if test -z "$ac_err"; then
7933   :
7934 else
7935   echo "$ac_err" >&5
7936   echo "configure: failed program was:" >&5
7937   cat conftest.$ac_ext >&5
7938   rm -rf conftest*
7939   CPP=/lib/cpp
7940 fi
7941 rm -f conftest*
7942 fi
7943 rm -f conftest*
7944 fi
7945 rm -f conftest*
7946   ac_cv_prog_CPP="$CPP"
7947 fi
7948   CPP="$ac_cv_prog_CPP"
7949 else
7950   ac_cv_prog_CPP="$CPP"
7951 fi
7952 echo "$ac_t""$CPP" 1>&6
7953
7954
7955 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7956         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7957
7958 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7959         echo "configure: warning: programs compiled here do run here..." 1>&2
7960         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7961
7962 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7963         echo "configure: warning: programs compiled here do not run here..." 1>&2
7964         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7965 fi
7966
7967
7968 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7969 echo "configure:7970: checking for Cygwin environment" >&5
7970 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7971   echo $ac_n "(cached) $ac_c" 1>&6
7972 else
7973   cat > conftest.$ac_ext <<EOF
7974 #line 7975 "configure"
7975 #include "confdefs.h"
7976
7977 int main() {
7978
7979 #ifndef __CYGWIN__
7980 #define __CYGWIN__ __CYGWIN32__
7981 #endif
7982 return __CYGWIN__;
7983 ; return 0; }
7984 EOF
7985 if { (eval echo configure:7986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7986   rm -rf conftest*
7987   ac_cv_cygwin=yes
7988 else
7989   echo "configure: failed program was:" >&5
7990   cat conftest.$ac_ext >&5
7991   rm -rf conftest*
7992   ac_cv_cygwin=no
7993 fi
7994 rm -f conftest*
7995 fi
7996
7997 echo "$ac_t""$ac_cv_cygwin" 1>&6
7998 CYGWIN=
7999 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8000 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8001 echo "configure:8002: checking for mingw32 environment" >&5
8002 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8003   echo $ac_n "(cached) $ac_c" 1>&6
8004 else
8005   cat > conftest.$ac_ext <<EOF
8006 #line 8007 "configure"
8007 #include "confdefs.h"
8008
8009 int main() {
8010 return __MINGW32__;
8011 ; return 0; }
8012 EOF
8013 if { (eval echo configure:8014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8014   rm -rf conftest*
8015   ac_cv_mingw32=yes
8016 else
8017   echo "configure: failed program was:" >&5
8018   cat conftest.$ac_ext >&5
8019   rm -rf conftest*
8020   ac_cv_mingw32=no
8021 fi
8022 rm -f conftest*
8023 fi
8024
8025 echo "$ac_t""$ac_cv_mingw32" 1>&6
8026 MINGW32=
8027 test "$ac_cv_mingw32" = yes && MINGW32=yes
8028
8029
8030
8031 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8032 echo "configure:8033: checking for executable suffix" >&5
8033 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8034   echo $ac_n "(cached) $ac_c" 1>&6
8035 else
8036   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8037   ac_cv_exeext=.exe
8038 else
8039   rm -f conftest*
8040   echo 'int main () { return 0; }' > conftest.$ac_ext
8041   ac_cv_exeext=
8042   if { (eval echo configure:8043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8043     for file in conftest.*; do
8044       case $file in
8045       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8046       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8047       esac
8048     done
8049   else
8050     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8051   fi
8052   rm -f conftest*
8053   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8054 fi
8055 fi
8056
8057 EXEEXT=""
8058 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8059 echo "$ac_t""${ac_cv_exeext}" 1>&6
8060 ac_exeext=$EXEEXT
8061
8062 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8063 echo "configure:8064: checking for object suffix" >&5
8064 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8065   echo $ac_n "(cached) $ac_c" 1>&6
8066 else
8067   rm -f conftest*
8068 echo 'int i = 1;' > conftest.$ac_ext
8069 if { (eval echo configure:8070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8070   for ac_file in conftest.*; do
8071     case $ac_file in
8072     *.c) ;;
8073     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8074     esac
8075   done
8076 else
8077   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8078 fi
8079 rm -f conftest*
8080 fi
8081
8082 echo "$ac_t""$ac_cv_objext" 1>&6
8083 OBJEXT=$ac_cv_objext
8084 ac_objext=$ac_cv_objext
8085
8086
8087 cat >> confdefs.h <<EOF
8088 #define EXEEXT "${EXEEXT}"
8089 EOF
8090
8091
8092 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8093 echo "configure:8094: checking for be_app in -lbe" >&5
8094 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8095 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8096   echo $ac_n "(cached) $ac_c" 1>&6
8097 else
8098   ac_save_LIBS="$LIBS"
8099 LIBS="-lbe -lroot -lnet $LIBS"
8100 cat > conftest.$ac_ext <<EOF
8101 #line 8102 "configure"
8102 #include "confdefs.h"
8103 /* Override any gcc2 internal prototype to avoid an error.  */
8104 /* We use char because int might match the return type of a gcc2
8105     builtin and then its argument prototype would still apply.  */
8106 char be_app();
8107
8108 int main() {
8109 be_app()
8110 ; return 0; }
8111 EOF
8112 if { (eval echo configure:8113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8113   rm -rf conftest*
8114   eval "ac_cv_lib_$ac_lib_var=yes"
8115 else
8116   echo "configure: failed program was:" >&5
8117   cat conftest.$ac_ext >&5
8118   rm -rf conftest*
8119   eval "ac_cv_lib_$ac_lib_var=no"
8120 fi
8121 rm -f conftest*
8122 LIBS="$ac_save_LIBS"
8123
8124 fi
8125 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8126   echo "$ac_t""yes" 1>&6
8127   LIBS="$LIBS -lbe -lroot -lnet"
8128 else
8129   echo "$ac_t""no" 1>&6
8130 :
8131 fi
8132
8133
8134
8135
8136
8137 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8138 echo "configure:8139: checking for ${CC-cc} option to accept ANSI C" >&5
8139 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8140   echo $ac_n "(cached) $ac_c" 1>&6
8141 else
8142   am_cv_prog_cc_stdc=no
8143 ac_save_CC="$CC"
8144 # Don't try gcc -ansi; that turns off useful extensions and
8145 # breaks some systems' header files.
8146 # AIX                   -qlanglvl=ansi
8147 # Ultrix and OSF/1      -std1
8148 # HP-UX 10.20 and later -Ae
8149 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8150 # SVR4                  -Xc -D__EXTENSIONS__
8151 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8152 do
8153   CC="$ac_save_CC $ac_arg"
8154   cat > conftest.$ac_ext <<EOF
8155 #line 8156 "configure"
8156 #include "confdefs.h"
8157 #include <stdarg.h>
8158 #include <stdio.h>
8159 #include <sys/types.h>
8160 #include <sys/stat.h>
8161 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8162 struct buf { int x; };
8163 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8164 static char *e (p, i)
8165      char **p;
8166      int i;
8167 {
8168   return p[i];
8169 }
8170 static char *f (char * (*g) (char **, int), char **p, ...)
8171 {
8172   char *s;
8173   va_list v;
8174   va_start (v,p);
8175   s = g (p, va_arg (v,int));
8176   va_end (v);
8177   return s;
8178 }
8179 int test (int i, double x);
8180 struct s1 {int (*f) (int a);};
8181 struct s2 {int (*f) (double a);};
8182 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8183 int argc;
8184 char **argv;
8185
8186 int main() {
8187
8188 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8189
8190 ; return 0; }
8191 EOF
8192 if { (eval echo configure:8193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8193   rm -rf conftest*
8194   am_cv_prog_cc_stdc="$ac_arg"; break
8195 else
8196   echo "configure: failed program was:" >&5
8197   cat conftest.$ac_ext >&5
8198 fi
8199 rm -f conftest*
8200 done
8201 CC="$ac_save_CC"
8202
8203 fi
8204
8205 if test -z "$am_cv_prog_cc_stdc"; then
8206   echo "$ac_t""none needed" 1>&6
8207 else
8208   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8209 fi
8210 case "x$am_cv_prog_cc_stdc" in
8211   x|xno) ;;
8212   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8213 esac
8214
8215 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8216         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8217 fi
8218
8219 # test for make depend flag
8220 OL_MKDEP=
8221 OL_MKDEP_FLAGS=
8222 if test -z "${MKDEP}"; then
8223         OL_MKDEP="${CC-cc}"
8224         if test -z "${MKDEP_FLAGS}"; then
8225                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8226 echo "configure:8227: checking for ${OL_MKDEP} depend flag" >&5
8227 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8228   echo $ac_n "(cached) $ac_c" 1>&6
8229 else
8230   
8231                         ol_cv_mkdep=no
8232                         for flag in "-M" "-xM"; do
8233                                 cat > conftest.c <<EOF
8234  noCode;
8235 EOF
8236                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8237                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8238                                 then
8239                                         if test ! -f conftest."${ac_object}" ; then
8240                                                 ol_cv_mkdep=$flag
8241                                                 OL_MKDEP_FLAGS="$flag"
8242                                                 break
8243                                         fi
8244                                 fi
8245                         done
8246                         rm -f conftest*
8247                 
8248 fi
8249
8250 echo "$ac_t""$ol_cv_mkdep" 1>&6
8251         else
8252                 cc_cv_mkdep=yes
8253                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8254         fi
8255 else
8256         cc_cv_mkdep=yes
8257         OL_MKDEP="${MKDEP}"
8258         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8259 fi
8260
8261
8262
8263 if test "${ol_cv_mkdep}" = no ; then
8264         # this will soon become an error
8265         echo "configure: warning: do not know how to generate dependencies" 1>&2
8266 fi
8267
8268 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8269 echo "configure:8270: checking for afopen in -ls" >&5
8270 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8271 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8272   echo $ac_n "(cached) $ac_c" 1>&6
8273 else
8274   ac_save_LIBS="$LIBS"
8275 LIBS="-ls  $LIBS"
8276 cat > conftest.$ac_ext <<EOF
8277 #line 8278 "configure"
8278 #include "confdefs.h"
8279 /* Override any gcc2 internal prototype to avoid an error.  */
8280 /* We use char because int might match the return type of a gcc2
8281     builtin and then its argument prototype would still apply.  */
8282 char afopen();
8283
8284 int main() {
8285 afopen()
8286 ; return 0; }
8287 EOF
8288 if { (eval echo configure:8289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8289   rm -rf conftest*
8290   eval "ac_cv_lib_$ac_lib_var=yes"
8291 else
8292   echo "configure: failed program was:" >&5
8293   cat conftest.$ac_ext >&5
8294   rm -rf conftest*
8295   eval "ac_cv_lib_$ac_lib_var=no"
8296 fi
8297 rm -f conftest*
8298 LIBS="$ac_save_LIBS"
8299
8300 fi
8301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8302   echo "$ac_t""yes" 1>&6
8303   
8304         AUTH_LIBS=-ls
8305         cat >> confdefs.h <<\EOF
8306 #define HAVE_AIX_SECURITY 1
8307 EOF
8308
8309
8310 else
8311   echo "$ac_t""no" 1>&6
8312 fi
8313
8314
8315 case "$target" in
8316 *-ibm-openedition)
8317         ac_cv_func_getopt=no
8318         cat >> confdefs.h <<\EOF
8319 #define BOTH_STRINGS_H 1
8320 EOF
8321
8322         ;;
8323 esac
8324
8325 ol_link_modules=no
8326 if test $ol_enable_modules != no ; then
8327         for ac_hdr in ltdl.h
8328 do
8329 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8330 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8331 echo "configure:8332: checking for $ac_hdr" >&5
8332 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8333   echo $ac_n "(cached) $ac_c" 1>&6
8334 else
8335   cat > conftest.$ac_ext <<EOF
8336 #line 8337 "configure"
8337 #include "confdefs.h"
8338 #include <$ac_hdr>
8339 EOF
8340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8341 { (eval echo configure:8342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8343 if test -z "$ac_err"; then
8344   rm -rf conftest*
8345   eval "ac_cv_header_$ac_safe=yes"
8346 else
8347   echo "$ac_err" >&5
8348   echo "configure: failed program was:" >&5
8349   cat conftest.$ac_ext >&5
8350   rm -rf conftest*
8351   eval "ac_cv_header_$ac_safe=no"
8352 fi
8353 rm -f conftest*
8354 fi
8355 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8356   echo "$ac_t""yes" 1>&6
8357     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8358   cat >> confdefs.h <<EOF
8359 #define $ac_tr_hdr 1
8360 EOF
8361  
8362 else
8363   echo "$ac_t""no" 1>&6
8364 fi
8365 done
8366
8367
8368         if test $ac_cv_header_ltdl_h = no ; then
8369                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8370         fi
8371
8372         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8373 echo "configure:8374: checking for lt_dlinit in -lltdl" >&5
8374 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8375 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8376   echo $ac_n "(cached) $ac_c" 1>&6
8377 else
8378   ac_save_LIBS="$LIBS"
8379 LIBS="-lltdl  $LIBS"
8380 cat > conftest.$ac_ext <<EOF
8381 #line 8382 "configure"
8382 #include "confdefs.h"
8383 /* Override any gcc2 internal prototype to avoid an error.  */
8384 /* We use char because int might match the return type of a gcc2
8385     builtin and then its argument prototype would still apply.  */
8386 char lt_dlinit();
8387
8388 int main() {
8389 lt_dlinit()
8390 ; return 0; }
8391 EOF
8392 if { (eval echo configure:8393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8393   rm -rf conftest*
8394   eval "ac_cv_lib_$ac_lib_var=yes"
8395 else
8396   echo "configure: failed program was:" >&5
8397   cat conftest.$ac_ext >&5
8398   rm -rf conftest*
8399   eval "ac_cv_lib_$ac_lib_var=no"
8400 fi
8401 rm -f conftest*
8402 LIBS="$ac_save_LIBS"
8403
8404 fi
8405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8406   echo "$ac_t""yes" 1>&6
8407   
8408                 MODULES_LIBS=-lltdl
8409                 cat >> confdefs.h <<\EOF
8410 #define HAVE_LIBLTDL 1
8411 EOF
8412
8413         
8414 else
8415   echo "$ac_t""no" 1>&6
8416 fi
8417
8418
8419         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8420                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8421         fi
8422         ol_link_modules=yes
8423 else
8424         ol_with_bdb_module=static
8425         ol_with_dnssrv_module=static
8426         ol_with_hdb_module=static
8427         ol_with_ldap_module=static
8428         ol_with_ldbm_module=static
8429         ol_with_meta_module=static
8430         ol_with_monitor_module=static
8431         ol_with_null_module=static
8432         ol_with_passwd_module=static
8433         ol_with_perl_module=static
8434         ol_with_shell_module=static
8435         ol_with_sql_module=static
8436         if test $ol_with_dyngroup = mod ; then
8437                 echo "configure: warning: building static dyngroup overlay" 1>&2
8438                 ol_with_dyngroup = yes
8439         fi
8440         if test $ol_with_proxycache = mod ; then
8441                 echo "configure: warning: building static proxycache overlay" 1>&2
8442                 ol_with_proxycache = yes
8443         fi
8444 fi
8445
8446 # test for EBCDIC
8447 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8448 echo "configure:8449: checking for EBCDIC" >&5
8449 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8450   echo $ac_n "(cached) $ac_c" 1>&6
8451 else
8452   
8453         cat > conftest.$ac_ext <<EOF
8454 #line 8455 "configure"
8455 #include "confdefs.h"
8456
8457 #if !('M' == 0xd4)
8458 #include <__ASCII__/generate_error.h>
8459 #endif
8460
8461 EOF
8462 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8463 { (eval echo configure:8464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8464 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8465 if test -z "$ac_err"; then
8466   rm -rf conftest*
8467   ol_cv_cpp_ebcdic=yes
8468 else
8469   echo "$ac_err" >&5
8470   echo "configure: failed program was:" >&5
8471   cat conftest.$ac_ext >&5
8472   rm -rf conftest*
8473   ol_cv_cpp_ebcdic=no
8474 fi
8475 rm -f conftest*
8476 fi
8477
8478 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8479 if test $ol_cv_cpp_ebcdic = yes ; then
8480         cat >> confdefs.h <<\EOF
8481 #define HAVE_EBCDIC 1
8482 EOF
8483
8484 fi
8485
8486 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8487 echo "configure:8488: checking for ANSI C header files" >&5
8488 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8489   echo $ac_n "(cached) $ac_c" 1>&6
8490 else
8491   cat > conftest.$ac_ext <<EOF
8492 #line 8493 "configure"
8493 #include "confdefs.h"
8494 #include <stdlib.h>
8495 #include <stdarg.h>
8496 #include <string.h>
8497 #include <float.h>
8498 EOF
8499 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8500 { (eval echo configure:8501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8501 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8502 if test -z "$ac_err"; then
8503   rm -rf conftest*
8504   ol_cv_header_stdc=yes
8505 else
8506   echo "$ac_err" >&5
8507   echo "configure: failed program was:" >&5
8508   cat conftest.$ac_ext >&5
8509   rm -rf conftest*
8510   ol_cv_header_stdc=no
8511 fi
8512 rm -f conftest*
8513
8514 if test $ol_cv_header_stdc = yes; then
8515   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8516 cat > conftest.$ac_ext <<EOF
8517 #line 8518 "configure"
8518 #include "confdefs.h"
8519 #include <string.h>
8520 EOF
8521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8522   egrep "memchr" >/dev/null 2>&1; then
8523   :
8524 else
8525   rm -rf conftest*
8526   ol_cv_header_stdc=no
8527 fi
8528 rm -f conftest*
8529
8530 fi
8531
8532 if test $ol_cv_header_stdc = yes; then
8533   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8534 cat > conftest.$ac_ext <<EOF
8535 #line 8536 "configure"
8536 #include "confdefs.h"
8537 #include <stdlib.h>
8538 EOF
8539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8540   egrep "free" >/dev/null 2>&1; then
8541   :
8542 else
8543   rm -rf conftest*
8544   ol_cv_header_stdc=no
8545 fi
8546 rm -f conftest*
8547
8548 fi
8549
8550 if test $ol_cv_header_stdc = yes; then
8551   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8552 if test "$cross_compiling" = yes; then
8553   :
8554 else
8555   cat > conftest.$ac_ext <<EOF
8556 #line 8557 "configure"
8557 #include "confdefs.h"
8558 #include <ctype.h>
8559 #ifndef HAVE_EBCDIC
8560 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8561 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8562 #else
8563 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8564                 || ('j' <= (c) && (c) <= 'r') \
8565                 || ('s' <= (c) && (c) <= 'z'))
8566 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8567 #endif
8568 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8569 int main () { int i; for (i = 0; i < 256; i++)
8570 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8571 exit (0); }
8572
8573 EOF
8574 if { (eval echo configure:8575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8575 then
8576   :
8577 else
8578   echo "configure: failed program was:" >&5
8579   cat conftest.$ac_ext >&5
8580   rm -fr conftest*
8581   ol_cv_header_stdc=no
8582 fi
8583 rm -fr conftest*
8584 fi
8585
8586 fi
8587 fi
8588
8589 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8590 if test $ol_cv_header_stdc = yes; then
8591   cat >> confdefs.h <<\EOF
8592 #define STDC_HEADERS 1
8593 EOF
8594
8595 fi
8596 ac_cv_header_stdc=disable
8597
8598
8599 if test $ol_cv_header_stdc != yes; then
8600         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8601 fi
8602
8603 ac_header_dirent=no
8604 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8605 do
8606 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8607 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8608 echo "configure:8609: checking for $ac_hdr that defines DIR" >&5
8609 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8610   echo $ac_n "(cached) $ac_c" 1>&6
8611 else
8612   cat > conftest.$ac_ext <<EOF
8613 #line 8614 "configure"
8614 #include "confdefs.h"
8615 #include <sys/types.h>
8616 #include <$ac_hdr>
8617 int main() {
8618 DIR *dirp = 0;
8619 ; return 0; }
8620 EOF
8621 if { (eval echo configure:8622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8622   rm -rf conftest*
8623   eval "ac_cv_header_dirent_$ac_safe=yes"
8624 else
8625   echo "configure: failed program was:" >&5
8626   cat conftest.$ac_ext >&5
8627   rm -rf conftest*
8628   eval "ac_cv_header_dirent_$ac_safe=no"
8629 fi
8630 rm -f conftest*
8631 fi
8632 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8633   echo "$ac_t""yes" 1>&6
8634     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8635   cat >> confdefs.h <<EOF
8636 #define $ac_tr_hdr 1
8637 EOF
8638  ac_header_dirent=$ac_hdr; break
8639 else
8640   echo "$ac_t""no" 1>&6
8641 fi
8642 done
8643 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8644 if test $ac_header_dirent = dirent.h; then
8645 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8646 echo "configure:8647: checking for opendir in -ldir" >&5
8647 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8648 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8649   echo $ac_n "(cached) $ac_c" 1>&6
8650 else
8651   ac_save_LIBS="$LIBS"
8652 LIBS="-ldir  $LIBS"
8653 cat > conftest.$ac_ext <<EOF
8654 #line 8655 "configure"
8655 #include "confdefs.h"
8656 /* Override any gcc2 internal prototype to avoid an error.  */
8657 /* We use char because int might match the return type of a gcc2
8658     builtin and then its argument prototype would still apply.  */
8659 char opendir();
8660
8661 int main() {
8662 opendir()
8663 ; return 0; }
8664 EOF
8665 if { (eval echo configure:8666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8666   rm -rf conftest*
8667   eval "ac_cv_lib_$ac_lib_var=yes"
8668 else
8669   echo "configure: failed program was:" >&5
8670   cat conftest.$ac_ext >&5
8671   rm -rf conftest*
8672   eval "ac_cv_lib_$ac_lib_var=no"
8673 fi
8674 rm -f conftest*
8675 LIBS="$ac_save_LIBS"
8676
8677 fi
8678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8679   echo "$ac_t""yes" 1>&6
8680   LIBS="$LIBS -ldir"
8681 else
8682   echo "$ac_t""no" 1>&6
8683 fi
8684
8685 else
8686 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8687 echo "configure:8688: checking for opendir in -lx" >&5
8688 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8689 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8690   echo $ac_n "(cached) $ac_c" 1>&6
8691 else
8692   ac_save_LIBS="$LIBS"
8693 LIBS="-lx  $LIBS"
8694 cat > conftest.$ac_ext <<EOF
8695 #line 8696 "configure"
8696 #include "confdefs.h"
8697 /* Override any gcc2 internal prototype to avoid an error.  */
8698 /* We use char because int might match the return type of a gcc2
8699     builtin and then its argument prototype would still apply.  */
8700 char opendir();
8701
8702 int main() {
8703 opendir()
8704 ; return 0; }
8705 EOF
8706 if { (eval echo configure:8707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8707   rm -rf conftest*
8708   eval "ac_cv_lib_$ac_lib_var=yes"
8709 else
8710   echo "configure: failed program was:" >&5
8711   cat conftest.$ac_ext >&5
8712   rm -rf conftest*
8713   eval "ac_cv_lib_$ac_lib_var=no"
8714 fi
8715 rm -f conftest*
8716 LIBS="$ac_save_LIBS"
8717
8718 fi
8719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8720   echo "$ac_t""yes" 1>&6
8721   LIBS="$LIBS -lx"
8722 else
8723   echo "$ac_t""no" 1>&6
8724 fi
8725
8726 fi
8727
8728 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8729 echo "configure:8730: checking for sys/wait.h that is POSIX.1 compatible" >&5
8730 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8731   echo $ac_n "(cached) $ac_c" 1>&6
8732 else
8733   cat > conftest.$ac_ext <<EOF
8734 #line 8735 "configure"
8735 #include "confdefs.h"
8736 #include <sys/types.h>
8737 #include <sys/wait.h>
8738 #ifndef WEXITSTATUS
8739 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8740 #endif
8741 #ifndef WIFEXITED
8742 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8743 #endif
8744 int main() {
8745 int s;
8746 wait (&s);
8747 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8748 ; return 0; }
8749 EOF
8750 if { (eval echo configure:8751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8751   rm -rf conftest*
8752   ac_cv_header_sys_wait_h=yes
8753 else
8754   echo "configure: failed program was:" >&5
8755   cat conftest.$ac_ext >&5
8756   rm -rf conftest*
8757   ac_cv_header_sys_wait_h=no
8758 fi
8759 rm -f conftest*
8760 fi
8761
8762 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8763 if test $ac_cv_header_sys_wait_h = yes; then
8764   cat >> confdefs.h <<\EOF
8765 #define HAVE_SYS_WAIT_H 1
8766 EOF
8767
8768 fi
8769
8770 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8771 echo "configure:8772: checking POSIX termios" >&5
8772 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8773   echo $ac_n "(cached) $ac_c" 1>&6
8774 else
8775   cat > conftest.$ac_ext <<EOF
8776 #line 8777 "configure"
8777 #include "confdefs.h"
8778 #include <sys/types.h>
8779 #include <unistd.h>
8780 #include <termios.h>
8781 int main() {
8782 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8783    tcgetattr(0, 0);
8784 ; return 0; }
8785 EOF
8786 if { (eval echo configure:8787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8787   rm -rf conftest*
8788   am_cv_sys_posix_termios=yes
8789 else
8790   echo "configure: failed program was:" >&5
8791   cat conftest.$ac_ext >&5
8792   rm -rf conftest*
8793   am_cv_sys_posix_termios=no
8794 fi
8795 rm -f conftest*
8796 fi
8797
8798 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8799
8800
8801  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8802 echo "configure:8803: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8803 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8804   echo $ac_n "(cached) $ac_c" 1>&6
8805 else
8806   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8807
8808   gwinsz_in_termios_h=no
8809   if test $am_cv_sys_posix_termios = yes; then
8810     cat > conftest.$ac_ext <<EOF
8811 #line 8812 "configure"
8812 #include "confdefs.h"
8813 #include <sys/types.h>
8814 #     include <termios.h>
8815 #     ifdef TIOCGWINSZ
8816         yes
8817 #     endif
8818     
8819 EOF
8820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8821   egrep "yes" >/dev/null 2>&1; then
8822   rm -rf conftest*
8823   gwinsz_in_termios_h=yes
8824 fi
8825 rm -f conftest*
8826
8827   fi
8828
8829   if test $gwinsz_in_termios_h = no; then
8830     cat > conftest.$ac_ext <<EOF
8831 #line 8832 "configure"
8832 #include "confdefs.h"
8833 #include <sys/types.h>
8834 #     include <sys/ioctl.h>
8835 #     ifdef TIOCGWINSZ
8836         yes
8837 #     endif
8838     
8839 EOF
8840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8841   egrep "yes" >/dev/null 2>&1; then
8842   rm -rf conftest*
8843   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8844 fi
8845 rm -f conftest*
8846
8847   fi
8848   
8849 fi
8850
8851 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8852   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8853     cat >> confdefs.h <<\EOF
8854 #define GWINSZ_IN_SYS_IOCTL 1
8855 EOF
8856
8857   fi
8858
8859 if test $am_cv_sys_posix_termios = yes ; then
8860         cat >> confdefs.h <<\EOF
8861 #define HAVE_POSIX_TERMIOS 1
8862 EOF
8863
8864 fi
8865
8866 for ac_hdr in \
8867         arpa/inet.h             \
8868         arpa/nameser.h  \
8869         assert.h                \
8870         conio.h                 \
8871         crypt.h                 \
8872         direct.h                \
8873         errno.h                 \
8874         fcntl.h                 \
8875         filio.h                 \
8876         getopt.h                \
8877         grp.h                   \
8878         io.h                    \
8879         libutil.h               \
8880         limits.h                \
8881         locale.h                \
8882         netinet/tcp.h   \
8883         malloc.h                \
8884         memory.h                \
8885         psap.h                  \
8886         pwd.h                   \
8887         process.h               \
8888         resolv.h                \
8889         sgtty.h                 \
8890         shadow.h                \
8891         stddef.h                \
8892         string.h                \
8893         strings.h               \
8894         sysexits.h              \
8895         sys/file.h              \
8896         sys/filio.h             \
8897         sys/errno.h             \
8898         sys/ioctl.h             \
8899         sys/param.h             \
8900         sys/resource.h  \
8901         sys/select.h    \
8902         sys/socket.h    \
8903         sys/stat.h              \
8904         sys/syslog.h    \
8905         sys/time.h              \
8906         sys/types.h             \
8907         sys/ucred.h             \
8908         sys/uio.h               \
8909         syslog.h                \
8910         termios.h               \
8911         unistd.h                \
8912         winsock.h               \
8913         winsock2.h              \
8914
8915 do
8916 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8917 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8918 echo "configure:8919: checking for $ac_hdr" >&5
8919 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8920   echo $ac_n "(cached) $ac_c" 1>&6
8921 else
8922   cat > conftest.$ac_ext <<EOF
8923 #line 8924 "configure"
8924 #include "confdefs.h"
8925 #include <$ac_hdr>
8926 EOF
8927 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8928 { (eval echo configure:8929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8929 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8930 if test -z "$ac_err"; then
8931   rm -rf conftest*
8932   eval "ac_cv_header_$ac_safe=yes"
8933 else
8934   echo "$ac_err" >&5
8935   echo "configure: failed program was:" >&5
8936   cat conftest.$ac_ext >&5
8937   rm -rf conftest*
8938   eval "ac_cv_header_$ac_safe=no"
8939 fi
8940 rm -f conftest*
8941 fi
8942 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8943   echo "$ac_t""yes" 1>&6
8944     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8945   cat >> confdefs.h <<EOF
8946 #define $ac_tr_hdr 1
8947 EOF
8948  
8949 else
8950   echo "$ac_t""no" 1>&6
8951 fi
8952 done
8953
8954
8955
8956
8957 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8958 echo "configure:8959: checking for dlopen" >&5
8959 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8960   echo $ac_n "(cached) $ac_c" 1>&6
8961 else
8962   cat > conftest.$ac_ext <<EOF
8963 #line 8964 "configure"
8964 #include "confdefs.h"
8965 /* System header to define __stub macros and hopefully few prototypes,
8966     which can conflict with char dlopen(); below.  */
8967 #include <assert.h>
8968 /* Override any gcc2 internal prototype to avoid an error.  */
8969 /* We use char because int might match the return type of a gcc2
8970     builtin and then its argument prototype would still apply.  */
8971 char dlopen();
8972 char (*f)();
8973
8974 int main() {
8975
8976 /* The GNU C library defines this for functions which it implements
8977     to always fail with ENOSYS.  Some functions are actually named
8978     something starting with __ and the normal name is an alias.  */
8979 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8980 choke me
8981 #else
8982 f = dlopen;
8983 #endif
8984
8985 ; return 0; }
8986 EOF
8987 if { (eval echo configure:8988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8988   rm -rf conftest*
8989   eval "ac_cv_func_dlopen=yes"
8990 else
8991   echo "configure: failed program was:" >&5
8992   cat conftest.$ac_ext >&5
8993   rm -rf conftest*
8994   eval "ac_cv_func_dlopen=no"
8995 fi
8996 rm -f conftest*
8997 fi
8998
8999 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9000   echo "$ac_t""yes" 1>&6
9001   :
9002 else
9003   echo "$ac_t""no" 1>&6
9004 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9005 echo "configure:9006: checking for dlopen in -ldl" >&5
9006 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9007 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9008   echo $ac_n "(cached) $ac_c" 1>&6
9009 else
9010   ac_save_LIBS="$LIBS"
9011 LIBS="-ldl  $LIBS"
9012 cat > conftest.$ac_ext <<EOF
9013 #line 9014 "configure"
9014 #include "confdefs.h"
9015 /* Override any gcc2 internal prototype to avoid an error.  */
9016 /* We use char because int might match the return type of a gcc2
9017     builtin and then its argument prototype would still apply.  */
9018 char dlopen();
9019
9020 int main() {
9021 dlopen()
9022 ; return 0; }
9023 EOF
9024 if { (eval echo configure:9025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9025   rm -rf conftest*
9026   eval "ac_cv_lib_$ac_lib_var=yes"
9027 else
9028   echo "configure: failed program was:" >&5
9029   cat conftest.$ac_ext >&5
9030   rm -rf conftest*
9031   eval "ac_cv_lib_$ac_lib_var=no"
9032 fi
9033 rm -f conftest*
9034 LIBS="$ac_save_LIBS"
9035
9036 fi
9037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9038   echo "$ac_t""yes" 1>&6
9039     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9040     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9041   cat >> confdefs.h <<EOF
9042 #define $ac_tr_lib 1
9043 EOF
9044
9045   LIBS="-ldl $LIBS"
9046
9047 else
9048   echo "$ac_t""no" 1>&6
9049 fi
9050
9051 fi
9052
9053
9054 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9055 echo "configure:9056: checking for sigset in -lV3" >&5
9056 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9057 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9058   echo $ac_n "(cached) $ac_c" 1>&6
9059 else
9060   ac_save_LIBS="$LIBS"
9061 LIBS="-lV3  $LIBS"
9062 cat > conftest.$ac_ext <<EOF
9063 #line 9064 "configure"
9064 #include "confdefs.h"
9065 /* Override any gcc2 internal prototype to avoid an error.  */
9066 /* We use char because int might match the return type of a gcc2
9067     builtin and then its argument prototype would still apply.  */
9068 char sigset();
9069
9070 int main() {
9071 sigset()
9072 ; return 0; }
9073 EOF
9074 if { (eval echo configure:9075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9075   rm -rf conftest*
9076   eval "ac_cv_lib_$ac_lib_var=yes"
9077 else
9078   echo "configure: failed program was:" >&5
9079   cat conftest.$ac_ext >&5
9080   rm -rf conftest*
9081   eval "ac_cv_lib_$ac_lib_var=no"
9082 fi
9083 rm -f conftest*
9084 LIBS="$ac_save_LIBS"
9085
9086 fi
9087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9088   echo "$ac_t""yes" 1>&6
9089     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9090     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9091   cat >> confdefs.h <<EOF
9092 #define $ac_tr_lib 1
9093 EOF
9094
9095   LIBS="-lV3 $LIBS"
9096
9097 else
9098   echo "$ac_t""no" 1>&6
9099 fi
9100
9101
9102 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9103 echo "configure:9104: checking for winsock" >&5
9104 save_LIBS="$LIBS"
9105 for curlib in ws2_32 wsock32; do
9106         LIBS="$LIBS -l$curlib"
9107         cat > conftest.$ac_ext <<EOF
9108 #line 9109 "configure"
9109 #include "confdefs.h"
9110
9111                         char socket@12();
9112                         char select@20();
9113                         char closesocket@4();
9114                         char gethostname@8();
9115                         
9116 int main() {
9117
9118                         socket@12();
9119                         select@20();
9120                         closesocket@4();
9121                         gethostname@8();
9122                         
9123 ; return 0; }
9124 EOF
9125 if { (eval echo configure:9126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9126   rm -rf conftest*
9127   have_winsock=yes
9128 else
9129   echo "configure: failed program was:" >&5
9130   cat conftest.$ac_ext >&5
9131   rm -rf conftest*
9132   have_winsock=no
9133 fi
9134 rm -f conftest*
9135
9136         if test $have_winsock = yes; then
9137                 cat >> confdefs.h <<\EOF
9138 #define HAVE_WINSOCK 1
9139 EOF
9140
9141                 ac_cv_func_socket=yes
9142                 ac_cv_func_select=yes
9143                 ac_cv_func_closesocket=yes
9144                 ac_cv_func_gethostname=yes
9145                 if test $curlib = ws2_32; then
9146                         have_winsock=winsock2
9147                         cat >> confdefs.h <<\EOF
9148 #define HAVE_WINSOCK2 1
9149 EOF
9150
9151                 fi
9152                 break
9153         fi
9154         LIBS="$save_LIBS"
9155 done
9156 echo "$ac_t""$have_winsock" 1>&6
9157
9158
9159 echo $ac_n "checking for socket""... $ac_c" 1>&6
9160 echo "configure:9161: checking for socket" >&5
9161 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9162   echo $ac_n "(cached) $ac_c" 1>&6
9163 else
9164   cat > conftest.$ac_ext <<EOF
9165 #line 9166 "configure"
9166 #include "confdefs.h"
9167 /* System header to define __stub macros and hopefully few prototypes,
9168     which can conflict with char socket(); below.  */
9169 #include <assert.h>
9170 /* Override any gcc2 internal prototype to avoid an error.  */
9171 /* We use char because int might match the return type of a gcc2
9172     builtin and then its argument prototype would still apply.  */
9173 char socket();
9174 char (*f)();
9175
9176 int main() {
9177
9178 /* The GNU C library defines this for functions which it implements
9179     to always fail with ENOSYS.  Some functions are actually named
9180     something starting with __ and the normal name is an alias.  */
9181 #if defined (__stub_socket) || defined (__stub___socket)
9182 choke me
9183 #else
9184 f = socket;
9185 #endif
9186
9187 ; return 0; }
9188 EOF
9189 if { (eval echo configure:9190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9190   rm -rf conftest*
9191   eval "ac_cv_func_socket=yes"
9192 else
9193   echo "configure: failed program was:" >&5
9194   cat conftest.$ac_ext >&5
9195   rm -rf conftest*
9196   eval "ac_cv_func_socket=no"
9197 fi
9198 rm -f conftest*
9199 fi
9200
9201 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9202   echo "$ac_t""yes" 1>&6
9203   :
9204 else
9205   echo "$ac_t""no" 1>&6
9206         
9207         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9208 echo "configure:9209: checking for main in -lsocket" >&5
9209 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9210 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9211   echo $ac_n "(cached) $ac_c" 1>&6
9212 else
9213   ac_save_LIBS="$LIBS"
9214 LIBS="-lsocket  $LIBS"
9215 cat > conftest.$ac_ext <<EOF
9216 #line 9217 "configure"
9217 #include "confdefs.h"
9218
9219 int main() {
9220 main()
9221 ; return 0; }
9222 EOF
9223 if { (eval echo configure:9224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9224   rm -rf conftest*
9225   eval "ac_cv_lib_$ac_lib_var=yes"
9226 else
9227   echo "configure: failed program was:" >&5
9228   cat conftest.$ac_ext >&5
9229   rm -rf conftest*
9230   eval "ac_cv_lib_$ac_lib_var=no"
9231 fi
9232 rm -f conftest*
9233 LIBS="$ac_save_LIBS"
9234
9235 fi
9236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9237   echo "$ac_t""yes" 1>&6
9238     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9239     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9240   cat >> confdefs.h <<EOF
9241 #define $ac_tr_lib 1
9242 EOF
9243
9244   LIBS="-lsocket $LIBS"
9245
9246 else
9247   echo "$ac_t""no" 1>&6
9248 fi
9249
9250         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9251 echo "configure:9252: checking for main in -lnet" >&5
9252 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9253 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9254   echo $ac_n "(cached) $ac_c" 1>&6
9255 else
9256   ac_save_LIBS="$LIBS"
9257 LIBS="-lnet  $LIBS"
9258 cat > conftest.$ac_ext <<EOF
9259 #line 9260 "configure"
9260 #include "confdefs.h"
9261
9262 int main() {
9263 main()
9264 ; return 0; }
9265 EOF
9266 if { (eval echo configure:9267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9267   rm -rf conftest*
9268   eval "ac_cv_lib_$ac_lib_var=yes"
9269 else
9270   echo "configure: failed program was:" >&5
9271   cat conftest.$ac_ext >&5
9272   rm -rf conftest*
9273   eval "ac_cv_lib_$ac_lib_var=no"
9274 fi
9275 rm -f conftest*
9276 LIBS="$ac_save_LIBS"
9277
9278 fi
9279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9280   echo "$ac_t""yes" 1>&6
9281     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9282     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9283   cat >> confdefs.h <<EOF
9284 #define $ac_tr_lib 1
9285 EOF
9286
9287   LIBS="-lnet $LIBS"
9288
9289 else
9290   echo "$ac_t""no" 1>&6
9291 fi
9292
9293         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9294 echo "configure:9295: checking for main in -lnsl_s" >&5
9295 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9296 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9297   echo $ac_n "(cached) $ac_c" 1>&6
9298 else
9299   ac_save_LIBS="$LIBS"
9300 LIBS="-lnsl_s  $LIBS"
9301 cat > conftest.$ac_ext <<EOF
9302 #line 9303 "configure"
9303 #include "confdefs.h"
9304
9305 int main() {
9306 main()
9307 ; return 0; }
9308 EOF
9309 if { (eval echo configure:9310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9310   rm -rf conftest*
9311   eval "ac_cv_lib_$ac_lib_var=yes"
9312 else
9313   echo "configure: failed program was:" >&5
9314   cat conftest.$ac_ext >&5
9315   rm -rf conftest*
9316   eval "ac_cv_lib_$ac_lib_var=no"
9317 fi
9318 rm -f conftest*
9319 LIBS="$ac_save_LIBS"
9320
9321 fi
9322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9323   echo "$ac_t""yes" 1>&6
9324     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9325     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9326   cat >> confdefs.h <<EOF
9327 #define $ac_tr_lib 1
9328 EOF
9329
9330   LIBS="-lnsl_s $LIBS"
9331
9332 else
9333   echo "$ac_t""no" 1>&6
9334 fi
9335
9336         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9337 echo "configure:9338: checking for main in -lnsl" >&5
9338 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9339 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9340   echo $ac_n "(cached) $ac_c" 1>&6
9341 else
9342   ac_save_LIBS="$LIBS"
9343 LIBS="-lnsl  $LIBS"
9344 cat > conftest.$ac_ext <<EOF
9345 #line 9346 "configure"
9346 #include "confdefs.h"
9347
9348 int main() {
9349 main()
9350 ; return 0; }
9351 EOF
9352 if { (eval echo configure:9353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9353   rm -rf conftest*
9354   eval "ac_cv_lib_$ac_lib_var=yes"
9355 else
9356   echo "configure: failed program was:" >&5
9357   cat conftest.$ac_ext >&5
9358   rm -rf conftest*
9359   eval "ac_cv_lib_$ac_lib_var=no"
9360 fi
9361 rm -f conftest*
9362 LIBS="$ac_save_LIBS"
9363
9364 fi
9365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9366   echo "$ac_t""yes" 1>&6
9367     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9368     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9369   cat >> confdefs.h <<EOF
9370 #define $ac_tr_lib 1
9371 EOF
9372
9373   LIBS="-lnsl $LIBS"
9374
9375 else
9376   echo "$ac_t""no" 1>&6
9377 fi
9378
9379         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9380 echo "configure:9381: checking for socket in -linet" >&5
9381 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9382 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9383   echo $ac_n "(cached) $ac_c" 1>&6
9384 else
9385   ac_save_LIBS="$LIBS"
9386 LIBS="-linet  $LIBS"
9387 cat > conftest.$ac_ext <<EOF
9388 #line 9389 "configure"
9389 #include "confdefs.h"
9390 /* Override any gcc2 internal prototype to avoid an error.  */
9391 /* We use char because int might match the return type of a gcc2
9392     builtin and then its argument prototype would still apply.  */
9393 char socket();
9394
9395 int main() {
9396 socket()
9397 ; return 0; }
9398 EOF
9399 if { (eval echo configure:9400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9400   rm -rf conftest*
9401   eval "ac_cv_lib_$ac_lib_var=yes"
9402 else
9403   echo "configure: failed program was:" >&5
9404   cat conftest.$ac_ext >&5
9405   rm -rf conftest*
9406   eval "ac_cv_lib_$ac_lib_var=no"
9407 fi
9408 rm -f conftest*
9409 LIBS="$ac_save_LIBS"
9410
9411 fi
9412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9413   echo "$ac_t""yes" 1>&6
9414     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9415     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9416   cat >> confdefs.h <<EOF
9417 #define $ac_tr_lib 1
9418 EOF
9419
9420   LIBS="-linet $LIBS"
9421
9422 else
9423   echo "$ac_t""no" 1>&6
9424 fi
9425
9426         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9427 echo "configure:9428: checking for main in -lgen" >&5
9428 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9429 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9430   echo $ac_n "(cached) $ac_c" 1>&6
9431 else
9432   ac_save_LIBS="$LIBS"
9433 LIBS="-lgen  $LIBS"
9434 cat > conftest.$ac_ext <<EOF
9435 #line 9436 "configure"
9436 #include "confdefs.h"
9437
9438 int main() {
9439 main()
9440 ; return 0; }
9441 EOF
9442 if { (eval echo configure:9443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9443   rm -rf conftest*
9444   eval "ac_cv_lib_$ac_lib_var=yes"
9445 else
9446   echo "configure: failed program was:" >&5
9447   cat conftest.$ac_ext >&5
9448   rm -rf conftest*
9449   eval "ac_cv_lib_$ac_lib_var=no"
9450 fi
9451 rm -f conftest*
9452 LIBS="$ac_save_LIBS"
9453
9454 fi
9455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9456   echo "$ac_t""yes" 1>&6
9457     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9458     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9459   cat >> confdefs.h <<EOF
9460 #define $ac_tr_lib 1
9461 EOF
9462
9463   LIBS="-lgen $LIBS"
9464
9465 else
9466   echo "$ac_t""no" 1>&6
9467 fi
9468
9469
9470 fi
9471
9472
9473 echo $ac_n "checking for select""... $ac_c" 1>&6
9474 echo "configure:9475: checking for select" >&5
9475 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9476   echo $ac_n "(cached) $ac_c" 1>&6
9477 else
9478   cat > conftest.$ac_ext <<EOF
9479 #line 9480 "configure"
9480 #include "confdefs.h"
9481 /* System header to define __stub macros and hopefully few prototypes,
9482     which can conflict with char select(); below.  */
9483 #include <assert.h>
9484 /* Override any gcc2 internal prototype to avoid an error.  */
9485 /* We use char because int might match the return type of a gcc2
9486     builtin and then its argument prototype would still apply.  */
9487 char select();
9488 char (*f)();
9489
9490 int main() {
9491
9492 /* The GNU C library defines this for functions which it implements
9493     to always fail with ENOSYS.  Some functions are actually named
9494     something starting with __ and the normal name is an alias.  */
9495 #if defined (__stub_select) || defined (__stub___select)
9496 choke me
9497 #else
9498 f = select;
9499 #endif
9500
9501 ; return 0; }
9502 EOF
9503 if { (eval echo configure:9504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9504   rm -rf conftest*
9505   eval "ac_cv_func_select=yes"
9506 else
9507   echo "configure: failed program was:" >&5
9508   cat conftest.$ac_ext >&5
9509   rm -rf conftest*
9510   eval "ac_cv_func_select=no"
9511 fi
9512 rm -f conftest*
9513 fi
9514
9515 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9516   echo "$ac_t""yes" 1>&6
9517   :
9518 else
9519   echo "$ac_t""no" 1>&6
9520 { echo "configure: error: select() required." 1>&2; exit 1; }
9521 fi
9522
9523
9524 if test "${ac_cv_header_winsock_h}" != yes; then
9525                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9526 echo "configure:9527: checking types of arguments for select()" >&5
9527  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9528   echo $ac_n "(cached) $ac_c" 1>&6
9529 else
9530    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9531   echo $ac_n "(cached) $ac_c" 1>&6
9532 else
9533     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9534   echo $ac_n "(cached) $ac_c" 1>&6
9535 else
9536      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9537      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9538       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9539        cat > conftest.$ac_ext <<EOF
9540 #line 9541 "configure"
9541 #include "confdefs.h"
9542 #ifdef HAVE_SYS_TYPES_H
9543 #include <sys/types.h>
9544 #endif
9545 #ifdef HAVE_SYS_TIME_H
9546 #include <sys/time.h>
9547 #endif
9548 #ifdef HAVE_SYS_SELECT_H
9549 #include <sys/select.h>
9550 #endif
9551 #ifdef HAVE_SYS_SOCKET_H
9552 #include <sys/socket.h>
9553 #endif
9554 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);
9555 int main() {
9556
9557 ; return 0; }
9558 EOF
9559 if { (eval echo configure:9560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9560   rm -rf conftest*
9561           ac_not_found=no ; break 3
9562 else
9563   echo "configure: failed program was:" >&5
9564   cat conftest.$ac_ext >&5
9565   rm -rf conftest*
9566   ac_not_found=yes
9567 fi
9568 rm -f conftest*
9569       done
9570      done
9571     done
9572    
9573 fi
9574   
9575 fi
9576  
9577 fi
9578  if test "$ac_not_found" = yes; then
9579   ac_cv_func_select_arg1=int 
9580   ac_cv_func_select_arg234='int *' 
9581   ac_cv_func_select_arg5='struct timeval *'
9582  fi
9583  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9584  cat >> confdefs.h <<EOF
9585 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9586 EOF
9587
9588  cat >> confdefs.h <<EOF
9589 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9590 EOF
9591
9592  cat >> confdefs.h <<EOF
9593 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9594 EOF
9595
9596
9597 fi
9598
9599
9600 for ac_hdr in regex.h 
9601 do
9602 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9603 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9604 echo "configure:9605: checking for $ac_hdr" >&5
9605 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9606   echo $ac_n "(cached) $ac_c" 1>&6
9607 else
9608   cat > conftest.$ac_ext <<EOF
9609 #line 9610 "configure"
9610 #include "confdefs.h"
9611 #include <$ac_hdr>
9612 EOF
9613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9614 { (eval echo configure:9615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9616 if test -z "$ac_err"; then
9617   rm -rf conftest*
9618   eval "ac_cv_header_$ac_safe=yes"
9619 else
9620   echo "$ac_err" >&5
9621   echo "configure: failed program was:" >&5
9622   cat conftest.$ac_ext >&5
9623   rm -rf conftest*
9624   eval "ac_cv_header_$ac_safe=no"
9625 fi
9626 rm -f conftest*
9627 fi
9628 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9629   echo "$ac_t""yes" 1>&6
9630     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9631   cat >> confdefs.h <<EOF
9632 #define $ac_tr_hdr 1
9633 EOF
9634  
9635 else
9636   echo "$ac_t""no" 1>&6
9637 fi
9638 done
9639
9640 if test "$ac_cv_header_regex_h" != yes ; then
9641         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9642 fi
9643
9644 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9645 echo "configure:9646: checking for library containing regfree" >&5
9646 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9647   echo $ac_n "(cached) $ac_c" 1>&6
9648 else
9649   ac_func_search_save_LIBS="$LIBS"
9650 ac_cv_search_regfree="no"
9651 cat > conftest.$ac_ext <<EOF
9652 #line 9653 "configure"
9653 #include "confdefs.h"
9654 /* Override any gcc2 internal prototype to avoid an error.  */
9655 /* We use char because int might match the return type of a gcc2
9656     builtin and then its argument prototype would still apply.  */
9657 char regfree();
9658
9659 int main() {
9660 regfree()
9661 ; return 0; }
9662 EOF
9663 if { (eval echo configure:9664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9664   rm -rf conftest*
9665   ac_cv_search_regfree="none required"
9666 else
9667   echo "configure: failed program was:" >&5
9668   cat conftest.$ac_ext >&5
9669 fi
9670 rm -f conftest*
9671 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9672 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9673 cat > conftest.$ac_ext <<EOF
9674 #line 9675 "configure"
9675 #include "confdefs.h"
9676 /* Override any gcc2 internal prototype to avoid an error.  */
9677 /* We use char because int might match the return type of a gcc2
9678     builtin and then its argument prototype would still apply.  */
9679 char regfree();
9680
9681 int main() {
9682 regfree()
9683 ; return 0; }
9684 EOF
9685 if { (eval echo configure:9686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9686   rm -rf conftest*
9687   ac_cv_search_regfree="-l$ac_lib"
9688 break
9689 else
9690   echo "configure: failed program was:" >&5
9691   cat conftest.$ac_ext >&5
9692 fi
9693 rm -f conftest*
9694 done
9695 LIBS="$ac_func_search_save_LIBS"
9696 fi
9697
9698 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9699 if test "$ac_cv_search_regfree" != "no"; then
9700   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9701   :
9702 else :
9703   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9704 fi
9705
9706
9707 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9708 echo "configure:9709: checking for compatible POSIX regex" >&5
9709 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9710   echo $ac_n "(cached) $ac_c" 1>&6
9711 else
9712   
9713         if test "$cross_compiling" = yes; then
9714   ol_cv_c_posix_regex=cross
9715 else
9716   cat > conftest.$ac_ext <<EOF
9717 #line 9718 "configure"
9718 #include "confdefs.h"
9719
9720 #include <sys/types.h>
9721 #include <regex.h>
9722 static char *pattern, *string;
9723 main()
9724 {
9725         int rc;
9726         regex_t re;
9727
9728         pattern = "^A";
9729
9730         if(regcomp(&re, pattern, 0)) {
9731                 return -1;
9732         }
9733         
9734         string = "ALL MATCH";
9735         
9736         rc = regexec(&re, string, 0, (void*)0, 0);
9737
9738         regfree(&re);
9739
9740         return rc;
9741 }
9742 EOF
9743 if { (eval echo configure:9744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9744 then
9745   ol_cv_c_posix_regex=yes
9746 else
9747   echo "configure: failed program was:" >&5
9748   cat conftest.$ac_ext >&5
9749   rm -fr conftest*
9750   ol_cv_c_posix_regex=no
9751 fi
9752 rm -fr conftest*
9753 fi
9754
9755 fi
9756
9757 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9758
9759 if test "$ol_cv_c_posix_regex" = no ; then
9760         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9761 fi
9762
9763
9764 have_uuid=no
9765 for ac_hdr in sys/uuid.h
9766 do
9767 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9768 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9769 echo "configure:9770: checking for $ac_hdr" >&5
9770 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9771   echo $ac_n "(cached) $ac_c" 1>&6
9772 else
9773   cat > conftest.$ac_ext <<EOF
9774 #line 9775 "configure"
9775 #include "confdefs.h"
9776 #include <$ac_hdr>
9777 EOF
9778 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9779 { (eval echo configure:9780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9780 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9781 if test -z "$ac_err"; then
9782   rm -rf conftest*
9783   eval "ac_cv_header_$ac_safe=yes"
9784 else
9785   echo "$ac_err" >&5
9786   echo "configure: failed program was:" >&5
9787   cat conftest.$ac_ext >&5
9788   rm -rf conftest*
9789   eval "ac_cv_header_$ac_safe=no"
9790 fi
9791 rm -f conftest*
9792 fi
9793 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9794   echo "$ac_t""yes" 1>&6
9795     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9796   cat >> confdefs.h <<EOF
9797 #define $ac_tr_hdr 1
9798 EOF
9799  
9800 else
9801   echo "$ac_t""no" 1>&6
9802 fi
9803 done
9804
9805 if test $ac_cv_header_sys_uuid_h = yes ; then
9806         save_LIBS="$LIBS"
9807         
9808 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9809 echo "configure:9810: checking for library containing uuid_to_str" >&5
9810 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9811   echo $ac_n "(cached) $ac_c" 1>&6
9812 else
9813   ac_func_search_save_LIBS="$LIBS"
9814 ac_cv_search_uuid_to_str="no"
9815 cat > conftest.$ac_ext <<EOF
9816 #line 9817 "configure"
9817 #include "confdefs.h"
9818 /* Override any gcc2 internal prototype to avoid an error.  */
9819 /* We use char because int might match the return type of a gcc2
9820     builtin and then its argument prototype would still apply.  */
9821 char uuid_to_str();
9822
9823 int main() {
9824 uuid_to_str()
9825 ; return 0; }
9826 EOF
9827 if { (eval echo configure:9828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9828   rm -rf conftest*
9829   ac_cv_search_uuid_to_str="none required"
9830 else
9831   echo "configure: failed program was:" >&5
9832   cat conftest.$ac_ext >&5
9833 fi
9834 rm -f conftest*
9835 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9836 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9837 cat > conftest.$ac_ext <<EOF
9838 #line 9839 "configure"
9839 #include "confdefs.h"
9840 /* Override any gcc2 internal prototype to avoid an error.  */
9841 /* We use char because int might match the return type of a gcc2
9842     builtin and then its argument prototype would still apply.  */
9843 char uuid_to_str();
9844
9845 int main() {
9846 uuid_to_str()
9847 ; return 0; }
9848 EOF
9849 if { (eval echo configure:9850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9850   rm -rf conftest*
9851   ac_cv_search_uuid_to_str="-l$ac_lib"
9852 break
9853 else
9854   echo "configure: failed program was:" >&5
9855   cat conftest.$ac_ext >&5
9856 fi
9857 rm -f conftest*
9858 done
9859 LIBS="$ac_func_search_save_LIBS"
9860 fi
9861
9862 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9863 if test "$ac_cv_search_uuid_to_str" != "no"; then
9864   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9865   have_uuid=yes
9866 else :
9867   :
9868 fi
9869         LIBS="$save_LIBS"
9870
9871         if test have_uuid = yes ; then
9872                 cat >> confdefs.h <<\EOF
9873 #define HAVE_UUID_TO_STR 1
9874 EOF
9875
9876
9877                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9878                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9879         fi
9880 fi
9881
9882 if test $have_uuid = no ; then
9883         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9884 echo "configure:9885: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9885         save_LIBS="$LIBS"
9886         LIBS="$LIBS -lrpcrt4"
9887         cat > conftest.$ac_ext <<EOF
9888 #line 9889 "configure"
9889 #include "confdefs.h"
9890
9891                 char UuidCreate@4();
9892                 char UuidToStringA@8();
9893                 
9894 int main() {
9895
9896                 UuidCreate@4();
9897                 UuidToStringA@8();
9898                 
9899 ; return 0; }
9900 EOF
9901 if { (eval echo configure:9902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9902   rm -rf conftest*
9903   need_rpcrt=yes
9904 else
9905   echo "configure: failed program was:" >&5
9906   cat conftest.$ac_ext >&5
9907   rm -rf conftest*
9908   need_rpcrt=no
9909 fi
9910 rm -f conftest*
9911         if test $need_rpcrt = yes; then
9912                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9913         fi
9914         LIBS="$save_LIBS"
9915         echo "$ac_t""$need_rpcrt" 1>&6
9916 fi
9917
9918 ol_link_dnssrv=no
9919 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9920 echo "configure:9921: checking for res_query" >&5
9921 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9922   echo $ac_n "(cached) $ac_c" 1>&6
9923 else
9924   cat > conftest.$ac_ext <<EOF
9925 #line 9926 "configure"
9926 #include "confdefs.h"
9927 /* System header to define __stub macros and hopefully few prototypes,
9928     which can conflict with char res_query(); below.  */
9929 #include <assert.h>
9930 /* Override any gcc2 internal prototype to avoid an error.  */
9931 /* We use char because int might match the return type of a gcc2
9932     builtin and then its argument prototype would still apply.  */
9933 char res_query();
9934 char (*f)();
9935
9936 int main() {
9937
9938 /* The GNU C library defines this for functions which it implements
9939     to always fail with ENOSYS.  Some functions are actually named
9940     something starting with __ and the normal name is an alias.  */
9941 #if defined (__stub_res_query) || defined (__stub___res_query)
9942 choke me
9943 #else
9944 f = res_query;
9945 #endif
9946
9947 ; return 0; }
9948 EOF
9949 if { (eval echo configure:9950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9950   rm -rf conftest*
9951   eval "ac_cv_func_res_query=yes"
9952 else
9953   echo "configure: failed program was:" >&5
9954   cat conftest.$ac_ext >&5
9955   rm -rf conftest*
9956   eval "ac_cv_func_res_query=no"
9957 fi
9958 rm -f conftest*
9959 fi
9960
9961 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9962   echo "$ac_t""yes" 1>&6
9963   :
9964 else
9965   echo "$ac_t""no" 1>&6
9966 fi
9967
9968 if test $ac_cv_func_res_query = no ; then 
9969         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9970 echo "configure:9971: checking for __res_query" >&5
9971 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9972   echo $ac_n "(cached) $ac_c" 1>&6
9973 else
9974   cat > conftest.$ac_ext <<EOF
9975 #line 9976 "configure"
9976 #include "confdefs.h"
9977 /* System header to define __stub macros and hopefully few prototypes,
9978     which can conflict with char __res_query(); below.  */
9979 #include <assert.h>
9980 /* Override any gcc2 internal prototype to avoid an error.  */
9981 /* We use char because int might match the return type of a gcc2
9982     builtin and then its argument prototype would still apply.  */
9983 char __res_query();
9984 char (*f)();
9985
9986 int main() {
9987
9988 /* The GNU C library defines this for functions which it implements
9989     to always fail with ENOSYS.  Some functions are actually named
9990     something starting with __ and the normal name is an alias.  */
9991 #if defined (__stub___res_query) || defined (__stub_____res_query)
9992 choke me
9993 #else
9994 f = __res_query;
9995 #endif
9996
9997 ; return 0; }
9998 EOF
9999 if { (eval echo configure:10000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10000   rm -rf conftest*
10001   eval "ac_cv_func___res_query=yes"
10002 else
10003   echo "configure: failed program was:" >&5
10004   cat conftest.$ac_ext >&5
10005   rm -rf conftest*
10006   eval "ac_cv_func___res_query=no"
10007 fi
10008 rm -f conftest*
10009 fi
10010
10011 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10012   echo "$ac_t""yes" 1>&6
10013   :
10014 else
10015   echo "$ac_t""no" 1>&6
10016 fi
10017
10018         ac_cv_func_res_query=$ac_cv_func___res_query
10019 fi
10020
10021 if test $ac_cv_func_res_query = no ; then 
10022         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10023 echo "configure:10024: checking for res_query in -lbind" >&5
10024 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10025 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10026   echo $ac_n "(cached) $ac_c" 1>&6
10027 else
10028   ac_save_LIBS="$LIBS"
10029 LIBS="-lbind  $LIBS"
10030 cat > conftest.$ac_ext <<EOF
10031 #line 10032 "configure"
10032 #include "confdefs.h"
10033 /* Override any gcc2 internal prototype to avoid an error.  */
10034 /* We use char because int might match the return type of a gcc2
10035     builtin and then its argument prototype would still apply.  */
10036 char res_query();
10037
10038 int main() {
10039 res_query()
10040 ; return 0; }
10041 EOF
10042 if { (eval echo configure:10043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10043   rm -rf conftest*
10044   eval "ac_cv_lib_$ac_lib_var=yes"
10045 else
10046   echo "configure: failed program was:" >&5
10047   cat conftest.$ac_ext >&5
10048   rm -rf conftest*
10049   eval "ac_cv_lib_$ac_lib_var=no"
10050 fi
10051 rm -f conftest*
10052 LIBS="$ac_save_LIBS"
10053
10054 fi
10055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10056   echo "$ac_t""yes" 1>&6
10057     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10058     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10059   cat >> confdefs.h <<EOF
10060 #define $ac_tr_lib 1
10061 EOF
10062
10063   LIBS="-lbind $LIBS"
10064
10065 else
10066   echo "$ac_t""no" 1>&6
10067 fi
10068
10069         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10070 fi
10071
10072 if test $ac_cv_func_res_query = no ; then 
10073         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10074 echo "configure:10075: checking for __res_query in -lbind" >&5
10075 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10076 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10077   echo $ac_n "(cached) $ac_c" 1>&6
10078 else
10079   ac_save_LIBS="$LIBS"
10080 LIBS="-lbind  $LIBS"
10081 cat > conftest.$ac_ext <<EOF
10082 #line 10083 "configure"
10083 #include "confdefs.h"
10084 /* Override any gcc2 internal prototype to avoid an error.  */
10085 /* We use char because int might match the return type of a gcc2
10086     builtin and then its argument prototype would still apply.  */
10087 char __res_query();
10088
10089 int main() {
10090 __res_query()
10091 ; return 0; }
10092 EOF
10093 if { (eval echo configure:10094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10094   rm -rf conftest*
10095   eval "ac_cv_lib_$ac_lib_var=yes"
10096 else
10097   echo "configure: failed program was:" >&5
10098   cat conftest.$ac_ext >&5
10099   rm -rf conftest*
10100   eval "ac_cv_lib_$ac_lib_var=no"
10101 fi
10102 rm -f conftest*
10103 LIBS="$ac_save_LIBS"
10104
10105 fi
10106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10107   echo "$ac_t""yes" 1>&6
10108     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10109     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10110   cat >> confdefs.h <<EOF
10111 #define $ac_tr_lib 1
10112 EOF
10113
10114   LIBS="-lbind $LIBS"
10115
10116 else
10117   echo "$ac_t""no" 1>&6
10118 fi
10119
10120         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10121 fi
10122
10123 if test $ac_cv_func_res_query = no ; then 
10124         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10125 echo "configure:10126: checking for res_query in -lresolv" >&5
10126 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10127 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10128   echo $ac_n "(cached) $ac_c" 1>&6
10129 else
10130   ac_save_LIBS="$LIBS"
10131 LIBS="-lresolv  $LIBS"
10132 cat > conftest.$ac_ext <<EOF
10133 #line 10134 "configure"
10134 #include "confdefs.h"
10135 /* Override any gcc2 internal prototype to avoid an error.  */
10136 /* We use char because int might match the return type of a gcc2
10137     builtin and then its argument prototype would still apply.  */
10138 char res_query();
10139
10140 int main() {
10141 res_query()
10142 ; return 0; }
10143 EOF
10144 if { (eval echo configure:10145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10145   rm -rf conftest*
10146   eval "ac_cv_lib_$ac_lib_var=yes"
10147 else
10148   echo "configure: failed program was:" >&5
10149   cat conftest.$ac_ext >&5
10150   rm -rf conftest*
10151   eval "ac_cv_lib_$ac_lib_var=no"
10152 fi
10153 rm -f conftest*
10154 LIBS="$ac_save_LIBS"
10155
10156 fi
10157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10158   echo "$ac_t""yes" 1>&6
10159     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10160     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10161   cat >> confdefs.h <<EOF
10162 #define $ac_tr_lib 1
10163 EOF
10164
10165   LIBS="-lresolv $LIBS"
10166
10167 else
10168   echo "$ac_t""no" 1>&6
10169 fi
10170
10171         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10172 fi
10173
10174 if test $ac_cv_func_res_query = no ; then 
10175         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10176 echo "configure:10177: checking for __res_query in -lresolv" >&5
10177 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10178 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10179   echo $ac_n "(cached) $ac_c" 1>&6
10180 else
10181   ac_save_LIBS="$LIBS"
10182 LIBS="-lresolv  $LIBS"
10183 cat > conftest.$ac_ext <<EOF
10184 #line 10185 "configure"
10185 #include "confdefs.h"
10186 /* Override any gcc2 internal prototype to avoid an error.  */
10187 /* We use char because int might match the return type of a gcc2
10188     builtin and then its argument prototype would still apply.  */
10189 char __res_query();
10190
10191 int main() {
10192 __res_query()
10193 ; return 0; }
10194 EOF
10195 if { (eval echo configure:10196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10196   rm -rf conftest*
10197   eval "ac_cv_lib_$ac_lib_var=yes"
10198 else
10199   echo "configure: failed program was:" >&5
10200   cat conftest.$ac_ext >&5
10201   rm -rf conftest*
10202   eval "ac_cv_lib_$ac_lib_var=no"
10203 fi
10204 rm -f conftest*
10205 LIBS="$ac_save_LIBS"
10206
10207 fi
10208 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10209   echo "$ac_t""yes" 1>&6
10210     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10211     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10212   cat >> confdefs.h <<EOF
10213 #define $ac_tr_lib 1
10214 EOF
10215
10216   LIBS="-lresolv $LIBS"
10217
10218 else
10219   echo "$ac_t""no" 1>&6
10220 fi
10221
10222         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10223 fi
10224
10225 if test "$ac_cv_func_res_query" = yes ; then
10226         cat >> confdefs.h <<\EOF
10227 #define HAVE_RES_QUERY 1
10228 EOF
10229
10230
10231         if test $ol_enable_dnssrv != no ; then
10232                 ol_link_dnssrv=yes
10233         fi
10234 fi
10235
10236 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10237         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10238 fi
10239
10240 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10241 do
10242 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10243 echo "configure:10244: checking for $ac_func" >&5
10244 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10245   echo $ac_n "(cached) $ac_c" 1>&6
10246 else
10247   cat > conftest.$ac_ext <<EOF
10248 #line 10249 "configure"
10249 #include "confdefs.h"
10250 /* System header to define __stub macros and hopefully few prototypes,
10251     which can conflict with char $ac_func(); below.  */
10252 #include <assert.h>
10253 /* Override any gcc2 internal prototype to avoid an error.  */
10254 /* We use char because int might match the return type of a gcc2
10255     builtin and then its argument prototype would still apply.  */
10256 char $ac_func();
10257 char (*f)();
10258
10259 int main() {
10260
10261 /* The GNU C library defines this for functions which it implements
10262     to always fail with ENOSYS.  Some functions are actually named
10263     something starting with __ and the normal name is an alias.  */
10264 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10265 choke me
10266 #else
10267 f = $ac_func;
10268 #endif
10269
10270 ; return 0; }
10271 EOF
10272 if { (eval echo configure:10273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10273   rm -rf conftest*
10274   eval "ac_cv_func_$ac_func=yes"
10275 else
10276   echo "configure: failed program was:" >&5
10277   cat conftest.$ac_ext >&5
10278   rm -rf conftest*
10279   eval "ac_cv_func_$ac_func=no"
10280 fi
10281 rm -f conftest*
10282 fi
10283
10284 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10285   echo "$ac_t""yes" 1>&6
10286     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10287   cat >> confdefs.h <<EOF
10288 #define $ac_tr_func 1
10289 EOF
10290  
10291 else
10292   echo "$ac_t""no" 1>&6
10293 fi
10294 done
10295
10296
10297 ol_link_ipv6=no
10298 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10299         if test $ol_enable_ipv6 = yes ; then
10300                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10301         fi
10302 elif test $ol_enable_ipv6 != no ; then
10303         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10304 echo "configure:10305: checking INET6_ADDRSTRLEN" >&5
10305 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10306   echo $ac_n "(cached) $ac_c" 1>&6
10307 else
10308   
10309                 cat > conftest.$ac_ext <<EOF
10310 #line 10311 "configure"
10311 #include "confdefs.h"
10312
10313 #                       include <netinet/in.h>
10314 #                       ifdef INET6_ADDRSTRLEN
10315                                 __has_inet6_addrstrlen__;
10316 #                       endif
10317                 
10318 EOF
10319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10320   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10321   rm -rf conftest*
10322   ol_cv_inet6_addrstrlen=yes
10323 else
10324   rm -rf conftest*
10325   ol_cv_inet6_addrstrlen=no
10326 fi
10327 rm -f conftest*
10328
10329 fi
10330
10331 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10332
10333
10334         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10335 echo "configure:10336: checking struct sockaddr_storage" >&5
10336 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10337   echo $ac_n "(cached) $ac_c" 1>&6
10338 else
10339   
10340                 cat > conftest.$ac_ext <<EOF
10341 #line 10342 "configure"
10342 #include "confdefs.h"
10343
10344 #include <sys/types.h>
10345 #include <sys/socket.h>
10346
10347 int main() {
10348
10349                         struct sockaddr_storage ss;
10350
10351 ; return 0; }
10352 EOF
10353 if { (eval echo configure:10354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10354   rm -rf conftest*
10355   ol_cv_struct_sockaddr_storage=yes
10356 else
10357   echo "configure: failed program was:" >&5
10358   cat conftest.$ac_ext >&5
10359   rm -rf conftest*
10360   ol_cv_struct_sockaddr_storage=no
10361 fi
10362 rm -f conftest*
10363 fi
10364
10365 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10366
10367         if test $ol_cv_inet6_addrstrlen = yes \
10368                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10369                 ol_link_ipv6=yes
10370         elif test $ol_enable_ipv6 = yes \
10371                         -a $ol_cv_inet6_addrstrlen = no ; then
10372                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10373         elif test $ol_enable_ipv6 = yes \
10374                         -a $ol_cv_struct_sockaddr_storage = no ; then
10375                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10376         fi
10377 fi
10378
10379 if test $ol_enable_local != no ; then
10380         for ac_hdr in sys/un.h 
10381 do
10382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10384 echo "configure:10385: checking for $ac_hdr" >&5
10385 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10386   echo $ac_n "(cached) $ac_c" 1>&6
10387 else
10388   cat > conftest.$ac_ext <<EOF
10389 #line 10390 "configure"
10390 #include "confdefs.h"
10391 #include <$ac_hdr>
10392 EOF
10393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10394 { (eval echo configure:10395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10396 if test -z "$ac_err"; then
10397   rm -rf conftest*
10398   eval "ac_cv_header_$ac_safe=yes"
10399 else
10400   echo "$ac_err" >&5
10401   echo "configure: failed program was:" >&5
10402   cat conftest.$ac_ext >&5
10403   rm -rf conftest*
10404   eval "ac_cv_header_$ac_safe=no"
10405 fi
10406 rm -f conftest*
10407 fi
10408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10409   echo "$ac_t""yes" 1>&6
10410     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10411   cat >> confdefs.h <<EOF
10412 #define $ac_tr_hdr 1
10413 EOF
10414  
10415 else
10416   echo "$ac_t""no" 1>&6
10417 fi
10418 done
10419
10420
10421         if test $ol_enable_local = auto ; then
10422                 ol_enable_local=$ac_cv_header_sys_un_h
10423         elif test $ac_cv_header_sys_un_h = no ; then
10424                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10425         fi
10426 fi
10427
10428 ol_link_kbind=no
10429 ol_link_kpasswd=no
10430 ol_link_krb5=no
10431 ol_link_krb4=no
10432
10433 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10434         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10435         -o $ol_with_kerberos = k425 ; then
10436
10437         for ac_hdr in krb5.h
10438 do
10439 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10440 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10441 echo "configure:10442: checking for $ac_hdr" >&5
10442 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10443   echo $ac_n "(cached) $ac_c" 1>&6
10444 else
10445   cat > conftest.$ac_ext <<EOF
10446 #line 10447 "configure"
10447 #include "confdefs.h"
10448 #include <$ac_hdr>
10449 EOF
10450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10451 { (eval echo configure:10452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10453 if test -z "$ac_err"; then
10454   rm -rf conftest*
10455   eval "ac_cv_header_$ac_safe=yes"
10456 else
10457   echo "$ac_err" >&5
10458   echo "configure: failed program was:" >&5
10459   cat conftest.$ac_ext >&5
10460   rm -rf conftest*
10461   eval "ac_cv_header_$ac_safe=no"
10462 fi
10463 rm -f conftest*
10464 fi
10465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10466   echo "$ac_t""yes" 1>&6
10467     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10468   cat >> confdefs.h <<EOF
10469 #define $ac_tr_hdr 1
10470 EOF
10471  
10472 else
10473   echo "$ac_t""no" 1>&6
10474 fi
10475 done
10476
10477
10478         if test $ac_cv_header_krb5_h = yes ; then
10479                                 for ac_hdr in heim_err.h
10480 do
10481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10483 echo "configure:10484: checking for $ac_hdr" >&5
10484 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10485   echo $ac_n "(cached) $ac_c" 1>&6
10486 else
10487   cat > conftest.$ac_ext <<EOF
10488 #line 10489 "configure"
10489 #include "confdefs.h"
10490 #include <$ac_hdr>
10491 EOF
10492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10493 { (eval echo configure:10494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10495 if test -z "$ac_err"; then
10496   rm -rf conftest*
10497   eval "ac_cv_header_$ac_safe=yes"
10498 else
10499   echo "$ac_err" >&5
10500   echo "configure: failed program was:" >&5
10501   cat conftest.$ac_ext >&5
10502   rm -rf conftest*
10503   eval "ac_cv_header_$ac_safe=no"
10504 fi
10505 rm -f conftest*
10506 fi
10507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10508   echo "$ac_t""yes" 1>&6
10509     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10510   cat >> confdefs.h <<EOF
10511 #define $ac_tr_hdr 1
10512 EOF
10513  
10514 else
10515   echo "$ac_t""no" 1>&6
10516 fi
10517 done
10518
10519                 if test $ac_cv_header_heim_err_h = yes ; then
10520                         krb5_impl=heimdal
10521                 else
10522                         krb5_impl=mit
10523                 fi
10524
10525                 if test $krb5_impl = mit; then
10526                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10527 echo "configure:10528: checking for main in -lk5crypto" >&5
10528 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10529 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10530   echo $ac_n "(cached) $ac_c" 1>&6
10531 else
10532   ac_save_LIBS="$LIBS"
10533 LIBS="-lk5crypto  $LIBS"
10534 cat > conftest.$ac_ext <<EOF
10535 #line 10536 "configure"
10536 #include "confdefs.h"
10537
10538 int main() {
10539 main()
10540 ; return 0; }
10541 EOF
10542 if { (eval echo configure:10543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10543   rm -rf conftest*
10544   eval "ac_cv_lib_$ac_lib_var=yes"
10545 else
10546   echo "configure: failed program was:" >&5
10547   cat conftest.$ac_ext >&5
10548   rm -rf conftest*
10549   eval "ac_cv_lib_$ac_lib_var=no"
10550 fi
10551 rm -f conftest*
10552 LIBS="$ac_save_LIBS"
10553
10554 fi
10555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10556   echo "$ac_t""yes" 1>&6
10557   krb5crypto=k5crypto
10558 else
10559   echo "$ac_t""no" 1>&6
10560 krb5crypto=crypto
10561 fi
10562
10563
10564                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10565 echo "configure:10566: checking for main in -lkrb5" >&5
10566 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10567 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10568   echo $ac_n "(cached) $ac_c" 1>&6
10569 else
10570   ac_save_LIBS="$LIBS"
10571 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10572 cat > conftest.$ac_ext <<EOF
10573 #line 10574 "configure"
10574 #include "confdefs.h"
10575
10576 int main() {
10577 main()
10578 ; return 0; }
10579 EOF
10580 if { (eval echo configure:10581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10581   rm -rf conftest*
10582   eval "ac_cv_lib_$ac_lib_var=yes"
10583 else
10584   echo "configure: failed program was:" >&5
10585   cat conftest.$ac_ext >&5
10586   rm -rf conftest*
10587   eval "ac_cv_lib_$ac_lib_var=no"
10588 fi
10589 rm -f conftest*
10590 LIBS="$ac_save_LIBS"
10591
10592 fi
10593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10594   echo "$ac_t""yes" 1>&6
10595   have_krb5=yes
10596                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10597 else
10598   echo "$ac_t""no" 1>&6
10599 have_krb5=no
10600 fi
10601
10602
10603                 elif test $krb5_impl = heimdal; then
10604                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10605 echo "configure:10606: checking for main in -ldes" >&5
10606 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10607 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10608   echo $ac_n "(cached) $ac_c" 1>&6
10609 else
10610   ac_save_LIBS="$LIBS"
10611 LIBS="-ldes  $LIBS"
10612 cat > conftest.$ac_ext <<EOF
10613 #line 10614 "configure"
10614 #include "confdefs.h"
10615
10616 int main() {
10617 main()
10618 ; return 0; }
10619 EOF
10620 if { (eval echo configure:10621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10621   rm -rf conftest*
10622   eval "ac_cv_lib_$ac_lib_var=yes"
10623 else
10624   echo "configure: failed program was:" >&5
10625   cat conftest.$ac_ext >&5
10626   rm -rf conftest*
10627   eval "ac_cv_lib_$ac_lib_var=no"
10628 fi
10629 rm -f conftest*
10630 LIBS="$ac_save_LIBS"
10631
10632 fi
10633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10634   echo "$ac_t""yes" 1>&6
10635   krb5crypto=des
10636 else
10637   echo "$ac_t""no" 1>&6
10638 krb5crypto=crypto
10639 fi
10640
10641
10642                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10643 echo "configure:10644: checking for main in -lkrb5" >&5
10644 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10645 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10646   echo $ac_n "(cached) $ac_c" 1>&6
10647 else
10648   ac_save_LIBS="$LIBS"
10649 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10650 cat > conftest.$ac_ext <<EOF
10651 #line 10652 "configure"
10652 #include "confdefs.h"
10653
10654 int main() {
10655 main()
10656 ; return 0; }
10657 EOF
10658 if { (eval echo configure:10659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10659   rm -rf conftest*
10660   eval "ac_cv_lib_$ac_lib_var=yes"
10661 else
10662   echo "configure: failed program was:" >&5
10663   cat conftest.$ac_ext >&5
10664   rm -rf conftest*
10665   eval "ac_cv_lib_$ac_lib_var=no"
10666 fi
10667 rm -f conftest*
10668 LIBS="$ac_save_LIBS"
10669
10670 fi
10671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10672   echo "$ac_t""yes" 1>&6
10673   have_krb5=yes
10674                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10675 else
10676   echo "$ac_t""no" 1>&6
10677 have_krb5=no
10678 fi
10679
10680
10681                         cat >> confdefs.h <<\EOF
10682 #define HAVE_HEIMDAL_KERBEROS 1
10683 EOF
10684
10685
10686                 else
10687                         have_krb5=no
10688                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10689                 fi
10690
10691                 if test $have_krb5 = yes ; then
10692                         ol_link_krb5=yes
10693
10694                         cat >> confdefs.h <<\EOF
10695 #define HAVE_KRB5 1
10696 EOF
10697
10698
10699                         if test $ol_enable_kpasswd != no ; then
10700                                 ol_link_kpasswd=yes;
10701                         fi
10702
10703                         if test $ol_with_kerberos = k5only ; then
10704                                 ol_with_kerberos=found
10705                         fi
10706
10707                 elif test $ol_with_kerberos != auto ; then
10708                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10709                 fi
10710
10711         fi
10712 fi
10713
10714 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10715         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10716
10717         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10718 do
10719 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10720 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10721 echo "configure:10722: checking for $ac_hdr" >&5
10722 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10723   echo $ac_n "(cached) $ac_c" 1>&6
10724 else
10725   cat > conftest.$ac_ext <<EOF
10726 #line 10727 "configure"
10727 #include "confdefs.h"
10728 #include <$ac_hdr>
10729 EOF
10730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10731 { (eval echo configure:10732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10733 if test -z "$ac_err"; then
10734   rm -rf conftest*
10735   eval "ac_cv_header_$ac_safe=yes"
10736 else
10737   echo "$ac_err" >&5
10738   echo "configure: failed program was:" >&5
10739   cat conftest.$ac_ext >&5
10740   rm -rf conftest*
10741   eval "ac_cv_header_$ac_safe=no"
10742 fi
10743 rm -f conftest*
10744 fi
10745 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10746   echo "$ac_t""yes" 1>&6
10747     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10748   cat >> confdefs.h <<EOF
10749 #define $ac_tr_hdr 1
10750 EOF
10751  
10752 else
10753   echo "$ac_t""no" 1>&6
10754 fi
10755 done
10756
10757
10758         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10759                 if test $krb5_impl = mit; then
10760                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10761 echo "configure:10762: checking for main in -lkrb4" >&5
10762 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10764   echo $ac_n "(cached) $ac_c" 1>&6
10765 else
10766   ac_save_LIBS="$LIBS"
10767 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10768 cat > conftest.$ac_ext <<EOF
10769 #line 10770 "configure"
10770 #include "confdefs.h"
10771
10772 int main() {
10773 main()
10774 ; return 0; }
10775 EOF
10776 if { (eval echo configure:10777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10777   rm -rf conftest*
10778   eval "ac_cv_lib_$ac_lib_var=yes"
10779 else
10780   echo "configure: failed program was:" >&5
10781   cat conftest.$ac_ext >&5
10782   rm -rf conftest*
10783   eval "ac_cv_lib_$ac_lib_var=no"
10784 fi
10785 rm -f conftest*
10786 LIBS="$ac_save_LIBS"
10787
10788 fi
10789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10790   echo "$ac_t""yes" 1>&6
10791   have_k425=yes
10792                                 KRB4_LIBS="-lkrb4 -ldes425"
10793 else
10794   echo "$ac_t""no" 1>&6
10795 have_k425=no
10796 fi
10797
10798
10799                 elif test $krb5_impl = heimdal; then
10800                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10801 echo "configure:10802: checking for main in -lkrb4" >&5
10802 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10803 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10804   echo $ac_n "(cached) $ac_c" 1>&6
10805 else
10806   ac_save_LIBS="$LIBS"
10807 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10808 cat > conftest.$ac_ext <<EOF
10809 #line 10810 "configure"
10810 #include "confdefs.h"
10811
10812 int main() {
10813 main()
10814 ; return 0; }
10815 EOF
10816 if { (eval echo configure:10817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10817   rm -rf conftest*
10818   eval "ac_cv_lib_$ac_lib_var=yes"
10819 else
10820   echo "configure: failed program was:" >&5
10821   cat conftest.$ac_ext >&5
10822   rm -rf conftest*
10823   eval "ac_cv_lib_$ac_lib_var=no"
10824 fi
10825 rm -f conftest*
10826 LIBS="$ac_save_LIBS"
10827
10828 fi
10829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10830   echo "$ac_t""yes" 1>&6
10831   have_k425=yes
10832                                 KRB4_LIBS="-lkrb4"
10833 else
10834   echo "$ac_t""no" 1>&6
10835 have_k425=no
10836 fi
10837
10838
10839                 else
10840                         have_425=no
10841                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10842                 fi
10843
10844                 if test $have_k425 = yes ; then
10845                         ol_with_kerberos=found
10846                         ol_link_krb4=yes
10847
10848                         cat >> confdefs.h <<\EOF
10849 #define HAVE_KRB425 1
10850 EOF
10851
10852                         cat >> confdefs.h <<\EOF
10853 #define HAVE_KRB4 1
10854 EOF
10855
10856
10857                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10858 echo "configure:10859: checking for des_debug in Kerberos libraries" >&5
10859 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10860   echo $ac_n "(cached) $ac_c" 1>&6
10861 else
10862   
10863                                                                 save_LIBS="$LIBS"
10864                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10865                                 cat > conftest.$ac_ext <<EOF
10866 #line 10867 "configure"
10867 #include "confdefs.h"
10868
10869 #include <kerberosIV/krb.h>
10870 #include <kerberosIV/des.h>
10871 extern int des_debug;
10872
10873 int main() {
10874
10875 des_debug = 1;
10876
10877 ; return 0; }
10878 EOF
10879 if { (eval echo configure:10880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10880   rm -rf conftest*
10881   ol_cv_var_des_debug=yes
10882 else
10883   echo "configure: failed program was:" >&5
10884   cat conftest.$ac_ext >&5
10885   rm -rf conftest*
10886   ol_cv_var_des_debug=no
10887 fi
10888 rm -f conftest*
10889                                                                 LIBS="$save_LIBS"
10890                         
10891 fi
10892
10893 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10894
10895                         if test $ol_cv_var_des_debug = yes ; then
10896                                 cat >> confdefs.h <<\EOF
10897 #define HAVE_DES_DEBUG 1
10898 EOF
10899
10900                         fi
10901
10902                         LIBS="$save_LIBS"
10903                 fi
10904         fi
10905 fi
10906
10907 if test $ol_link_krb5 = yes ; then
10908         ol_with_kerberos=found
10909 fi
10910
10911 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10912         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10913
10914         for ac_hdr in krb.h des.h krb-archaeology.h 
10915 do
10916 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10917 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10918 echo "configure:10919: checking for $ac_hdr" >&5
10919 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10920   echo $ac_n "(cached) $ac_c" 1>&6
10921 else
10922   cat > conftest.$ac_ext <<EOF
10923 #line 10924 "configure"
10924 #include "confdefs.h"
10925 #include <$ac_hdr>
10926 EOF
10927 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10928 { (eval echo configure:10929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10929 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10930 if test -z "$ac_err"; then
10931   rm -rf conftest*
10932   eval "ac_cv_header_$ac_safe=yes"
10933 else
10934   echo "$ac_err" >&5
10935   echo "configure: failed program was:" >&5
10936   cat conftest.$ac_ext >&5
10937   rm -rf conftest*
10938   eval "ac_cv_header_$ac_safe=no"
10939 fi
10940 rm -f conftest*
10941 fi
10942 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10943   echo "$ac_t""yes" 1>&6
10944     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10945   cat >> confdefs.h <<EOF
10946 #define $ac_tr_hdr 1
10947 EOF
10948  
10949 else
10950   echo "$ac_t""no" 1>&6
10951 fi
10952 done
10953
10954
10955         if test $ac_cv_header_krb_h = yes ; then
10956                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10957 echo "configure:10958: checking for main in -lkrb" >&5
10958 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10959 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10960   echo $ac_n "(cached) $ac_c" 1>&6
10961 else
10962   ac_save_LIBS="$LIBS"
10963 LIBS="-lkrb -ldes $LIBS"
10964 cat > conftest.$ac_ext <<EOF
10965 #line 10966 "configure"
10966 #include "confdefs.h"
10967
10968 int main() {
10969 main()
10970 ; return 0; }
10971 EOF
10972 if { (eval echo configure:10973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10973   rm -rf conftest*
10974   eval "ac_cv_lib_$ac_lib_var=yes"
10975 else
10976   echo "configure: failed program was:" >&5
10977   cat conftest.$ac_ext >&5
10978   rm -rf conftest*
10979   eval "ac_cv_lib_$ac_lib_var=no"
10980 fi
10981 rm -f conftest*
10982 LIBS="$ac_save_LIBS"
10983
10984 fi
10985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10986   echo "$ac_t""yes" 1>&6
10987   have_k4=yes
10988 else
10989   echo "$ac_t""no" 1>&6
10990 have_k4=no
10991 fi
10992
10993
10994                 if test $have_k4 = yes ; then
10995                         ol_with_kerberos=found
10996                         ol_link_krb4=yes
10997
10998                         cat >> confdefs.h <<\EOF
10999 #define HAVE_KRB4 1
11000 EOF
11001
11002
11003                         KRB4_LIBS="-lkrb -ldes"
11004
11005                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11006                                 cat >> confdefs.h <<\EOF
11007 #define HAVE_KTH_KERBEROS 1
11008 EOF
11009
11010                         fi
11011                 fi
11012         fi
11013 fi
11014
11015 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11016         ol_link_kpasswd=yes
11017 fi
11018
11019 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11020         ol_link_kbind=yes
11021
11022 elif test $ol_enable_kbind = yes ; then
11023         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11024 fi
11025
11026 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11027         cat >> confdefs.h <<\EOF
11028 #define HAVE_KERBEROS 1
11029 EOF
11030
11031
11032 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11033         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11034 fi
11035
11036 ol_link_tls=no
11037 if test $ol_with_tls != no ; then
11038         for ac_hdr in openssl/ssl.h ssl.h
11039 do
11040 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11041 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11042 echo "configure:11043: checking for $ac_hdr" >&5
11043 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11044   echo $ac_n "(cached) $ac_c" 1>&6
11045 else
11046   cat > conftest.$ac_ext <<EOF
11047 #line 11048 "configure"
11048 #include "confdefs.h"
11049 #include <$ac_hdr>
11050 EOF
11051 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11052 { (eval echo configure:11053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11053 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11054 if test -z "$ac_err"; then
11055   rm -rf conftest*
11056   eval "ac_cv_header_$ac_safe=yes"
11057 else
11058   echo "$ac_err" >&5
11059   echo "configure: failed program was:" >&5
11060   cat conftest.$ac_ext >&5
11061   rm -rf conftest*
11062   eval "ac_cv_header_$ac_safe=no"
11063 fi
11064 rm -f conftest*
11065 fi
11066 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11067   echo "$ac_t""yes" 1>&6
11068     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11069   cat >> confdefs.h <<EOF
11070 #define $ac_tr_hdr 1
11071 EOF
11072  
11073 else
11074   echo "$ac_t""no" 1>&6
11075 fi
11076 done
11077
11078         
11079         if test $ac_cv_header_openssl_ssl_h = yes \
11080                 -o $ac_cv_header_ssl_h = yes ; then
11081                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11082 echo "configure:11083: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11083 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11084 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11085   echo $ac_n "(cached) $ac_c" 1>&6
11086 else
11087   ac_save_LIBS="$LIBS"
11088 LIBS="-lssl -lcrypto $LIBS"
11089 cat > conftest.$ac_ext <<EOF
11090 #line 11091 "configure"
11091 #include "confdefs.h"
11092 /* Override any gcc2 internal prototype to avoid an error.  */
11093 /* We use char because int might match the return type of a gcc2
11094     builtin and then its argument prototype would still apply.  */
11095 char SSLeay_add_ssl_algorithms();
11096
11097 int main() {
11098 SSLeay_add_ssl_algorithms()
11099 ; return 0; }
11100 EOF
11101 if { (eval echo configure:11102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11102   rm -rf conftest*
11103   eval "ac_cv_lib_$ac_lib_var=yes"
11104 else
11105   echo "configure: failed program was:" >&5
11106   cat conftest.$ac_ext >&5
11107   rm -rf conftest*
11108   eval "ac_cv_lib_$ac_lib_var=no"
11109 fi
11110 rm -f conftest*
11111 LIBS="$ac_save_LIBS"
11112
11113 fi
11114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11115   echo "$ac_t""yes" 1>&6
11116   have_ssleay=yes
11117                         need_rsaref=no
11118 else
11119   echo "$ac_t""no" 1>&6
11120 have_ssleay=no
11121 fi
11122
11123                         
11124                 if test $have_ssleay = no ; then
11125                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11126 echo "configure:11127: checking for SSL_library_init in -lssl" >&5
11127 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11128 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11129   echo $ac_n "(cached) $ac_c" 1>&6
11130 else
11131   ac_save_LIBS="$LIBS"
11132 LIBS="-lssl -lcrypto $LIBS"
11133 cat > conftest.$ac_ext <<EOF
11134 #line 11135 "configure"
11135 #include "confdefs.h"
11136 /* Override any gcc2 internal prototype to avoid an error.  */
11137 /* We use char because int might match the return type of a gcc2
11138     builtin and then its argument prototype would still apply.  */
11139 char SSL_library_init();
11140
11141 int main() {
11142 SSL_library_init()
11143 ; return 0; }
11144 EOF
11145 if { (eval echo configure:11146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11146   rm -rf conftest*
11147   eval "ac_cv_lib_$ac_lib_var=yes"
11148 else
11149   echo "configure: failed program was:" >&5
11150   cat conftest.$ac_ext >&5
11151   rm -rf conftest*
11152   eval "ac_cv_lib_$ac_lib_var=no"
11153 fi
11154 rm -f conftest*
11155 LIBS="$ac_save_LIBS"
11156
11157 fi
11158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11159   echo "$ac_t""yes" 1>&6
11160   have_ssleay=yes
11161                                 need_rsaref=no
11162 else
11163   echo "$ac_t""no" 1>&6
11164 have_ssleay=no
11165 fi
11166
11167                 fi
11168
11169                 if test $have_ssleay = no ; then
11170                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11171 echo "configure:11172: checking for ssl3_accept in -lssl" >&5
11172 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11173 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11174   echo $ac_n "(cached) $ac_c" 1>&6
11175 else
11176   ac_save_LIBS="$LIBS"
11177 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11178 cat > conftest.$ac_ext <<EOF
11179 #line 11180 "configure"
11180 #include "confdefs.h"
11181 /* Override any gcc2 internal prototype to avoid an error.  */
11182 /* We use char because int might match the return type of a gcc2
11183     builtin and then its argument prototype would still apply.  */
11184 char ssl3_accept();
11185
11186 int main() {
11187 ssl3_accept()
11188 ; return 0; }
11189 EOF
11190 if { (eval echo configure:11191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11191   rm -rf conftest*
11192   eval "ac_cv_lib_$ac_lib_var=yes"
11193 else
11194   echo "configure: failed program was:" >&5
11195   cat conftest.$ac_ext >&5
11196   rm -rf conftest*
11197   eval "ac_cv_lib_$ac_lib_var=no"
11198 fi
11199 rm -f conftest*
11200 LIBS="$ac_save_LIBS"
11201
11202 fi
11203 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11204   echo "$ac_t""yes" 1>&6
11205   have_ssleay=yes
11206                                 need_rsaref=yes
11207 else
11208   echo "$ac_t""no" 1>&6
11209 have_ssleay=no
11210 fi
11211
11212                 fi
11213
11214                 if test $have_ssleay = yes ; then
11215                         ol_with_tls=found
11216                         ol_link_tls=yes
11217
11218                         cat >> confdefs.h <<\EOF
11219 #define HAVE_SSLEAY 1
11220 EOF
11221
11222
11223                         if test $need_rsaref = yes; then
11224                                 cat >> confdefs.h <<\EOF
11225 #define HAVE_RSAREF 1
11226 EOF
11227
11228
11229                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11230                         else
11231                                 TLS_LIBS="-lssl -lcrypto"
11232                         fi
11233                 fi
11234         fi
11235
11236 else
11237         echo "configure: warning: TLS data protection not supported!" 1>&2
11238 fi
11239
11240 WITH_TLS=no
11241 if test $ol_link_tls = yes ; then
11242         cat >> confdefs.h <<\EOF
11243 #define HAVE_TLS 1
11244 EOF
11245
11246         WITH_TLS=yes
11247
11248 elif test $ol_with_tls = auto ; then
11249         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11250         echo "configure: warning: TLS data protection not supported!" 1>&2
11251
11252 elif test $ol_with_tls != no ; then
11253         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11254 fi
11255
11256 if test $ol_enable_lmpasswd != no; then
11257         if test $ol_link_tls != yes ; then
11258                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11259         fi
11260
11261         cat >> confdefs.h <<\EOF
11262 #define SLAPD_LMHASH 1
11263 EOF
11264
11265 fi
11266
11267 ol_link_threads=no
11268
11269 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11270         -o $ol_with_threads = nt ; then
11271
11272         
11273         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11274 echo "configure:11275: checking for _beginthread" >&5
11275 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11276   echo $ac_n "(cached) $ac_c" 1>&6
11277 else
11278   cat > conftest.$ac_ext <<EOF
11279 #line 11280 "configure"
11280 #include "confdefs.h"
11281 /* System header to define __stub macros and hopefully few prototypes,
11282     which can conflict with char _beginthread(); below.  */
11283 #include <assert.h>
11284 /* Override any gcc2 internal prototype to avoid an error.  */
11285 /* We use char because int might match the return type of a gcc2
11286     builtin and then its argument prototype would still apply.  */
11287 char _beginthread();
11288 char (*f)();
11289
11290 int main() {
11291
11292 /* The GNU C library defines this for functions which it implements
11293     to always fail with ENOSYS.  Some functions are actually named
11294     something starting with __ and the normal name is an alias.  */
11295 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11296 choke me
11297 #else
11298 f = _beginthread;
11299 #endif
11300
11301 ; return 0; }
11302 EOF
11303 if { (eval echo configure:11304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11304   rm -rf conftest*
11305   eval "ac_cv_func__beginthread=yes"
11306 else
11307   echo "configure: failed program was:" >&5
11308   cat conftest.$ac_ext >&5
11309   rm -rf conftest*
11310   eval "ac_cv_func__beginthread=no"
11311 fi
11312 rm -f conftest*
11313 fi
11314
11315 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11316   echo "$ac_t""yes" 1>&6
11317   :
11318 else
11319   echo "$ac_t""no" 1>&6
11320 fi
11321
11322
11323         if test $ac_cv_func__beginthread = yes ; then
11324                 cat >> confdefs.h <<\EOF
11325 #define HAVE_NT_THREADS 1
11326 EOF
11327
11328                 ol_cv_nt_threads=yes
11329         fi
11330
11331
11332         if test "$ol_cv_nt_threads" = yes ; then
11333                 ol_link_threads=nt
11334                 ol_with_threads=found
11335                 ol_with_yielding_select=yes
11336
11337                 cat >> confdefs.h <<\EOF
11338 #define HAVE_NT_SERVICE_MANAGER 1
11339 EOF
11340
11341                 cat >> confdefs.h <<\EOF
11342 #define HAVE_NT_EVENT_LOG 1
11343 EOF
11344
11345         fi
11346
11347         if test $ol_with_threads = nt ; then
11348                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11349         fi
11350 fi
11351
11352 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11353         -o $ol_with_threads = posix ; then
11354
11355         for ac_hdr in pthread.h
11356 do
11357 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11358 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11359 echo "configure:11360: checking for $ac_hdr" >&5
11360 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11361   echo $ac_n "(cached) $ac_c" 1>&6
11362 else
11363   cat > conftest.$ac_ext <<EOF
11364 #line 11365 "configure"
11365 #include "confdefs.h"
11366 #include <$ac_hdr>
11367 EOF
11368 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11369 { (eval echo configure:11370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11370 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11371 if test -z "$ac_err"; then
11372   rm -rf conftest*
11373   eval "ac_cv_header_$ac_safe=yes"
11374 else
11375   echo "$ac_err" >&5
11376   echo "configure: failed program was:" >&5
11377   cat conftest.$ac_ext >&5
11378   rm -rf conftest*
11379   eval "ac_cv_header_$ac_safe=no"
11380 fi
11381 rm -f conftest*
11382 fi
11383 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11384   echo "$ac_t""yes" 1>&6
11385     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11386   cat >> confdefs.h <<EOF
11387 #define $ac_tr_hdr 1
11388 EOF
11389  
11390 else
11391   echo "$ac_t""no" 1>&6
11392 fi
11393 done
11394
11395
11396         if test $ac_cv_header_pthread_h = yes ; then
11397                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11398 echo "configure:11399: checking POSIX thread version" >&5
11399 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11400   echo $ac_n "(cached) $ac_c" 1>&6
11401 else
11402   
11403         cat > conftest.$ac_ext <<EOF
11404 #line 11405 "configure"
11405 #include "confdefs.h"
11406
11407 #               include <pthread.h>
11408         
11409 int main() {
11410
11411                 int i = PTHREAD_CREATE_JOINABLE;
11412         
11413 ; return 0; }
11414 EOF
11415 if { (eval echo configure:11416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11416   rm -rf conftest*
11417   
11418         cat > conftest.$ac_ext <<EOF
11419 #line 11420 "configure"
11420 #include "confdefs.h"
11421 #include <pthread.h>
11422 EOF
11423 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11424   egrep "pthread_detach" >/dev/null 2>&1; then
11425   rm -rf conftest*
11426   ol_cv_pthread_version=10
11427 else
11428   rm -rf conftest*
11429   ol_cv_pthread_version=8
11430 fi
11431 rm -f conftest*
11432
11433 else
11434   echo "configure: failed program was:" >&5
11435   cat conftest.$ac_ext >&5
11436   rm -rf conftest*
11437   
11438         cat > conftest.$ac_ext <<EOF
11439 #line 11440 "configure"
11440 #include "confdefs.h"
11441
11442 #               include <pthread.h>
11443 #               ifdef PTHREAD_CREATE_UNDETACHED
11444                 draft7
11445 #               endif
11446         
11447 EOF
11448 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11449   egrep "draft7" >/dev/null 2>&1; then
11450   rm -rf conftest*
11451   ol_cv_pthread_version=7
11452 else
11453   rm -rf conftest*
11454   
11455         cat > conftest.$ac_ext <<EOF
11456 #line 11457 "configure"
11457 #include "confdefs.h"
11458 #include <pthread.h>
11459 EOF
11460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11461   egrep "pthread_attr_init" >/dev/null 2>&1; then
11462   rm -rf conftest*
11463   ol_cv_pthread_version=6
11464 else
11465   rm -rf conftest*
11466   
11467         cat > conftest.$ac_ext <<EOF
11468 #line 11469 "configure"
11469 #include "confdefs.h"
11470
11471 #               include <pthread.h>
11472 #ifdef          PTHREAD_MUTEX_INITIALIZER
11473                 draft5
11474 #endif
11475         
11476 EOF
11477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11478   egrep "draft5" >/dev/null 2>&1; then
11479   rm -rf conftest*
11480   ol_cv_pthread_version=5
11481 else
11482   rm -rf conftest*
11483   ol_cv_pthread_version=4
11484 fi
11485 rm -f conftest*
11486  
11487 fi
11488 rm -f conftest*
11489  
11490 fi
11491 rm -f conftest*
11492  
11493 fi
11494 rm -f conftest*
11495
11496 fi
11497
11498 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11499
11500
11501                 if test $ol_cv_pthread_version != 0 ; then
11502                         cat >> confdefs.h <<EOF
11503 #define HAVE_PTHREADS $ol_cv_pthread_version
11504 EOF
11505
11506                 else
11507                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11508                 fi
11509
11510                 # consider threads found
11511                 ol_with_threads=found
11512
11513                 
11514         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11515 echo "configure:11516: checking for LinuxThreads pthread.h" >&5
11516 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11517   echo $ac_n "(cached) $ac_c" 1>&6
11518 else
11519   cat > conftest.$ac_ext <<EOF
11520 #line 11521 "configure"
11521 #include "confdefs.h"
11522 #include <pthread.h>
11523 EOF
11524 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11525   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11526   rm -rf conftest*
11527   ol_cv_header_linux_threads=yes
11528 else
11529   rm -rf conftest*
11530   ol_cv_header_linux_threads=no
11531 fi
11532 rm -f conftest*
11533
11534                 
11535 fi
11536
11537 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11538         if test $ol_cv_header_linux_threads = yes; then
11539                 cat >> confdefs.h <<\EOF
11540 #define HAVE_LINUX_THREADS 1
11541 EOF
11542
11543         fi
11544
11545                 
11546         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11547 echo "configure:11548: checking for GNU Pth pthread.h" >&5
11548 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11549   echo $ac_n "(cached) $ac_c" 1>&6
11550 else
11551   cat > conftest.$ac_ext <<EOF
11552 #line 11553 "configure"
11553 #include "confdefs.h"
11554 #include <pthread.h>
11555 #ifdef _POSIX_THREAD_IS_GNU_PTH
11556         __gnu_pth__;
11557 #endif
11558
11559 EOF
11560 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11561   egrep "__gnu_pth__" >/dev/null 2>&1; then
11562   rm -rf conftest*
11563   ol_cv_header_gnu_pth_pthread_h=yes
11564 else
11565   rm -rf conftest*
11566   ol_cv_header_gnu_pth_pthread_h=no
11567 fi
11568 rm -f conftest*
11569
11570                 
11571 fi
11572
11573 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11574
11575
11576                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11577                         for ac_hdr in sched.h
11578 do
11579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11581 echo "configure:11582: checking for $ac_hdr" >&5
11582 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11583   echo $ac_n "(cached) $ac_c" 1>&6
11584 else
11585   cat > conftest.$ac_ext <<EOF
11586 #line 11587 "configure"
11587 #include "confdefs.h"
11588 #include <$ac_hdr>
11589 EOF
11590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11591 { (eval echo configure:11592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11593 if test -z "$ac_err"; then
11594   rm -rf conftest*
11595   eval "ac_cv_header_$ac_safe=yes"
11596 else
11597   echo "$ac_err" >&5
11598   echo "configure: failed program was:" >&5
11599   cat conftest.$ac_ext >&5
11600   rm -rf conftest*
11601   eval "ac_cv_header_$ac_safe=no"
11602 fi
11603 rm -f conftest*
11604 fi
11605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11606   echo "$ac_t""yes" 1>&6
11607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11608   cat >> confdefs.h <<EOF
11609 #define $ac_tr_hdr 1
11610 EOF
11611  
11612 else
11613   echo "$ac_t""no" 1>&6
11614 fi
11615 done
11616
11617                 fi
11618
11619                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11620                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11621 echo "configure:11622: checking for pthread_create in default libraries" >&5
11622 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11623   echo $ac_n "(cached) $ac_c" 1>&6
11624 else
11625   
11626                 if test "$cross_compiling" = yes; then
11627   cat > conftest.$ac_ext <<EOF
11628 #line 11629 "configure"
11629 #include "confdefs.h"
11630 /* pthread test headers */
11631 #include <pthread.h>
11632 #if HAVE_PTHREADS < 7
11633 #include <errno.h>
11634 #endif
11635 #ifndef NULL
11636 #define NULL (void*)0
11637 #endif
11638
11639 static void *task(p)
11640         void *p;
11641 {
11642         return (void *) (p == NULL);
11643 }
11644
11645 int main() {
11646
11647         /* pthread test function */
11648 #ifndef PTHREAD_CREATE_DETACHED
11649 #define PTHREAD_CREATE_DETACHED 1
11650 #endif
11651         pthread_t t;
11652         int status;
11653         int detach = PTHREAD_CREATE_DETACHED;
11654
11655 #if HAVE_PTHREADS > 4
11656         /* Final pthreads */
11657         pthread_attr_t attr;
11658
11659         status = pthread_attr_init(&attr);
11660         if( status ) return status;
11661
11662 #if HAVE_PTHREADS < 7
11663         status = pthread_attr_setdetachstate(&attr, &detach);
11664         if( status < 0 ) status = errno;
11665 #else
11666         status = pthread_attr_setdetachstate(&attr, detach);
11667 #endif
11668         if( status ) return status;
11669         status = pthread_create( &t, &attr, task, NULL );
11670 #if HAVE_PTHREADS < 7
11671         if( status < 0 ) status = errno;
11672 #endif
11673         if( status ) return status;
11674 #else
11675         /* Draft 4 pthreads */
11676         status = pthread_create( &t, pthread_attr_default, task, NULL );
11677         if( status ) return errno;
11678
11679         /* give thread a chance to complete */
11680         /* it should remain joinable and hence detachable */
11681         sleep( 1 );
11682
11683         status = pthread_detach( &t );
11684         if( status ) return errno;
11685 #endif
11686
11687 #ifdef HAVE_LINUX_THREADS
11688         pthread_kill_other_threads_np();
11689 #endif
11690
11691         return 0;
11692
11693 ; return 0; }
11694 EOF
11695 if { (eval echo configure:11696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11696   rm -rf conftest*
11697   ol_cv_pthread_create=yes
11698 else
11699   echo "configure: failed program was:" >&5
11700   cat conftest.$ac_ext >&5
11701   rm -rf conftest*
11702   ol_cv_pthread_create=no
11703 fi
11704 rm -f conftest*
11705 else
11706   cat > conftest.$ac_ext <<EOF
11707 #line 11708 "configure"
11708 #include "confdefs.h"
11709 /* pthread test headers */
11710 #include <pthread.h>
11711 #if HAVE_PTHREADS < 7
11712 #include <errno.h>
11713 #endif
11714 #ifndef NULL
11715 #define NULL (void*)0
11716 #endif
11717
11718 static void *task(p)
11719         void *p;
11720 {
11721         return (void *) (p == NULL);
11722 }
11723
11724
11725 int main(argc, argv)
11726         int argc;
11727         char **argv;
11728 {
11729
11730         /* pthread test function */
11731 #ifndef PTHREAD_CREATE_DETACHED
11732 #define PTHREAD_CREATE_DETACHED 1
11733 #endif
11734         pthread_t t;
11735         int status;
11736         int detach = PTHREAD_CREATE_DETACHED;
11737
11738 #if HAVE_PTHREADS > 4
11739         /* Final pthreads */
11740         pthread_attr_t attr;
11741
11742         status = pthread_attr_init(&attr);
11743         if( status ) return status;
11744
11745 #if HAVE_PTHREADS < 7
11746         status = pthread_attr_setdetachstate(&attr, &detach);
11747         if( status < 0 ) status = errno;
11748 #else
11749         status = pthread_attr_setdetachstate(&attr, detach);
11750 #endif
11751         if( status ) return status;
11752         status = pthread_create( &t, &attr, task, NULL );
11753 #if HAVE_PTHREADS < 7
11754         if( status < 0 ) status = errno;
11755 #endif
11756         if( status ) return status;
11757 #else
11758         /* Draft 4 pthreads */
11759         status = pthread_create( &t, pthread_attr_default, task, NULL );
11760         if( status ) return errno;
11761
11762         /* give thread a chance to complete */
11763         /* it should remain joinable and hence detachable */
11764         sleep( 1 );
11765
11766         status = pthread_detach( &t );
11767         if( status ) return errno;
11768 #endif
11769
11770 #ifdef HAVE_LINUX_THREADS
11771         pthread_kill_other_threads_np();
11772 #endif
11773
11774         return 0;
11775
11776 }
11777
11778 EOF
11779 if { (eval echo configure:11780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11780 then
11781   ol_cv_pthread_create=yes
11782 else
11783   echo "configure: failed program was:" >&5
11784   cat conftest.$ac_ext >&5
11785   rm -fr conftest*
11786   ol_cv_pthread_create=no
11787 fi
11788 rm -fr conftest*
11789 fi
11790
11791 fi
11792
11793 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11794
11795                 if test $ol_cv_pthread_create != no ; then
11796                         ol_link_threads=posix
11797                         ol_link_pthreads=""
11798                 fi
11799                 
11800                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11801 if test "$ol_link_threads" = no ; then
11802         # try -kthread
11803         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11804 echo "configure:11805: checking for pthread link with -kthread" >&5
11805 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11806   echo $ac_n "(cached) $ac_c" 1>&6
11807 else
11808   
11809                 # save the flags
11810                 ol_LIBS="$LIBS"
11811                 LIBS="-kthread $LIBS"
11812
11813                 if test "$cross_compiling" = yes; then
11814   cat > conftest.$ac_ext <<EOF
11815 #line 11816 "configure"
11816 #include "confdefs.h"
11817 /* pthread test headers */
11818 #include <pthread.h>
11819 #if HAVE_PTHREADS < 7
11820 #include <errno.h>
11821 #endif
11822 #ifndef NULL
11823 #define NULL (void*)0
11824 #endif
11825
11826 static void *task(p)
11827         void *p;
11828 {
11829         return (void *) (p == NULL);
11830 }
11831
11832 int main() {
11833
11834         /* pthread test function */
11835 #ifndef PTHREAD_CREATE_DETACHED
11836 #define PTHREAD_CREATE_DETACHED 1
11837 #endif
11838         pthread_t t;
11839         int status;
11840         int detach = PTHREAD_CREATE_DETACHED;
11841
11842 #if HAVE_PTHREADS > 4
11843         /* Final pthreads */
11844         pthread_attr_t attr;
11845
11846         status = pthread_attr_init(&attr);
11847         if( status ) return status;
11848
11849 #if HAVE_PTHREADS < 7
11850         status = pthread_attr_setdetachstate(&attr, &detach);
11851         if( status < 0 ) status = errno;
11852 #else
11853         status = pthread_attr_setdetachstate(&attr, detach);
11854 #endif
11855         if( status ) return status;
11856         status = pthread_create( &t, &attr, task, NULL );
11857 #if HAVE_PTHREADS < 7
11858         if( status < 0 ) status = errno;
11859 #endif
11860         if( status ) return status;
11861 #else
11862         /* Draft 4 pthreads */
11863         status = pthread_create( &t, pthread_attr_default, task, NULL );
11864         if( status ) return errno;
11865
11866         /* give thread a chance to complete */
11867         /* it should remain joinable and hence detachable */
11868         sleep( 1 );
11869
11870         status = pthread_detach( &t );
11871         if( status ) return errno;
11872 #endif
11873
11874 #ifdef HAVE_LINUX_THREADS
11875         pthread_kill_other_threads_np();
11876 #endif
11877
11878         return 0;
11879
11880 ; return 0; }
11881 EOF
11882 if { (eval echo configure:11883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11883   rm -rf conftest*
11884   ol_cv_pthread_kthread=yes
11885 else
11886   echo "configure: failed program was:" >&5
11887   cat conftest.$ac_ext >&5
11888   rm -rf conftest*
11889   ol_cv_pthread_kthread=no
11890 fi
11891 rm -f conftest*
11892 else
11893   cat > conftest.$ac_ext <<EOF
11894 #line 11895 "configure"
11895 #include "confdefs.h"
11896 /* pthread test headers */
11897 #include <pthread.h>
11898 #if HAVE_PTHREADS < 7
11899 #include <errno.h>
11900 #endif
11901 #ifndef NULL
11902 #define NULL (void*)0
11903 #endif
11904
11905 static void *task(p)
11906         void *p;
11907 {
11908         return (void *) (p == NULL);
11909 }
11910
11911
11912 int main(argc, argv)
11913         int argc;
11914         char **argv;
11915 {
11916
11917         /* pthread test function */
11918 #ifndef PTHREAD_CREATE_DETACHED
11919 #define PTHREAD_CREATE_DETACHED 1
11920 #endif
11921         pthread_t t;
11922         int status;
11923         int detach = PTHREAD_CREATE_DETACHED;
11924
11925 #if HAVE_PTHREADS > 4
11926         /* Final pthreads */
11927         pthread_attr_t attr;
11928
11929         status = pthread_attr_init(&attr);
11930         if( status ) return status;
11931
11932 #if HAVE_PTHREADS < 7
11933         status = pthread_attr_setdetachstate(&attr, &detach);
11934         if( status < 0 ) status = errno;
11935 #else
11936         status = pthread_attr_setdetachstate(&attr, detach);
11937 #endif
11938         if( status ) return status;
11939         status = pthread_create( &t, &attr, task, NULL );
11940 #if HAVE_PTHREADS < 7
11941         if( status < 0 ) status = errno;
11942 #endif
11943         if( status ) return status;
11944 #else
11945         /* Draft 4 pthreads */
11946         status = pthread_create( &t, pthread_attr_default, task, NULL );
11947         if( status ) return errno;
11948
11949         /* give thread a chance to complete */
11950         /* it should remain joinable and hence detachable */
11951         sleep( 1 );
11952
11953         status = pthread_detach( &t );
11954         if( status ) return errno;
11955 #endif
11956
11957 #ifdef HAVE_LINUX_THREADS
11958         pthread_kill_other_threads_np();
11959 #endif
11960
11961         return 0;
11962
11963 }
11964
11965 EOF
11966 if { (eval echo configure:11967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11967 then
11968   ol_cv_pthread_kthread=yes
11969 else
11970   echo "configure: failed program was:" >&5
11971   cat conftest.$ac_ext >&5
11972   rm -fr conftest*
11973   ol_cv_pthread_kthread=no
11974 fi
11975 rm -fr conftest*
11976 fi
11977
11978
11979                 # restore the LIBS
11980                 LIBS="$ol_LIBS"
11981         
11982 fi
11983
11984 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11985
11986         if test $ol_cv_pthread_kthread = yes ; then
11987                 ol_link_pthreads="-kthread"
11988                 ol_link_threads=posix
11989         fi
11990 fi
11991
11992                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11993 if test "$ol_link_threads" = no ; then
11994         # try -pthread
11995         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11996 echo "configure:11997: checking for pthread link with -pthread" >&5
11997 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11998   echo $ac_n "(cached) $ac_c" 1>&6
11999 else
12000   
12001                 # save the flags
12002                 ol_LIBS="$LIBS"
12003                 LIBS="-pthread $LIBS"
12004
12005                 if test "$cross_compiling" = yes; then
12006   cat > conftest.$ac_ext <<EOF
12007 #line 12008 "configure"
12008 #include "confdefs.h"
12009 /* pthread test headers */
12010 #include <pthread.h>
12011 #if HAVE_PTHREADS < 7
12012 #include <errno.h>
12013 #endif
12014 #ifndef NULL
12015 #define NULL (void*)0
12016 #endif
12017
12018 static void *task(p)
12019         void *p;
12020 {
12021         return (void *) (p == NULL);
12022 }
12023
12024 int main() {
12025
12026         /* pthread test function */
12027 #ifndef PTHREAD_CREATE_DETACHED
12028 #define PTHREAD_CREATE_DETACHED 1
12029 #endif
12030         pthread_t t;
12031         int status;
12032         int detach = PTHREAD_CREATE_DETACHED;
12033
12034 #if HAVE_PTHREADS > 4
12035         /* Final pthreads */
12036         pthread_attr_t attr;
12037
12038         status = pthread_attr_init(&attr);
12039         if( status ) return status;
12040
12041 #if HAVE_PTHREADS < 7
12042         status = pthread_attr_setdetachstate(&attr, &detach);
12043         if( status < 0 ) status = errno;
12044 #else
12045         status = pthread_attr_setdetachstate(&attr, detach);
12046 #endif
12047         if( status ) return status;
12048         status = pthread_create( &t, &attr, task, NULL );
12049 #if HAVE_PTHREADS < 7
12050         if( status < 0 ) status = errno;
12051 #endif
12052         if( status ) return status;
12053 #else
12054         /* Draft 4 pthreads */
12055         status = pthread_create( &t, pthread_attr_default, task, NULL );
12056         if( status ) return errno;
12057
12058         /* give thread a chance to complete */
12059         /* it should remain joinable and hence detachable */
12060         sleep( 1 );
12061
12062         status = pthread_detach( &t );
12063         if( status ) return errno;
12064 #endif
12065
12066 #ifdef HAVE_LINUX_THREADS
12067         pthread_kill_other_threads_np();
12068 #endif
12069
12070         return 0;
12071
12072 ; return 0; }
12073 EOF
12074 if { (eval echo configure:12075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12075   rm -rf conftest*
12076   ol_cv_pthread_pthread=yes
12077 else
12078   echo "configure: failed program was:" >&5
12079   cat conftest.$ac_ext >&5
12080   rm -rf conftest*
12081   ol_cv_pthread_pthread=no
12082 fi
12083 rm -f conftest*
12084 else
12085   cat > conftest.$ac_ext <<EOF
12086 #line 12087 "configure"
12087 #include "confdefs.h"
12088 /* pthread test headers */
12089 #include <pthread.h>
12090 #if HAVE_PTHREADS < 7
12091 #include <errno.h>
12092 #endif
12093 #ifndef NULL
12094 #define NULL (void*)0
12095 #endif
12096
12097 static void *task(p)
12098         void *p;
12099 {
12100         return (void *) (p == NULL);
12101 }
12102
12103
12104 int main(argc, argv)
12105         int argc;
12106         char **argv;
12107 {
12108
12109         /* pthread test function */
12110 #ifndef PTHREAD_CREATE_DETACHED
12111 #define PTHREAD_CREATE_DETACHED 1
12112 #endif
12113         pthread_t t;
12114         int status;
12115         int detach = PTHREAD_CREATE_DETACHED;
12116
12117 #if HAVE_PTHREADS > 4
12118         /* Final pthreads */
12119         pthread_attr_t attr;
12120
12121         status = pthread_attr_init(&attr);
12122         if( status ) return status;
12123
12124 #if HAVE_PTHREADS < 7
12125         status = pthread_attr_setdetachstate(&attr, &detach);
12126         if( status < 0 ) status = errno;
12127 #else
12128         status = pthread_attr_setdetachstate(&attr, detach);
12129 #endif
12130         if( status ) return status;
12131         status = pthread_create( &t, &attr, task, NULL );
12132 #if HAVE_PTHREADS < 7
12133         if( status < 0 ) status = errno;
12134 #endif
12135         if( status ) return status;
12136 #else
12137         /* Draft 4 pthreads */
12138         status = pthread_create( &t, pthread_attr_default, task, NULL );
12139         if( status ) return errno;
12140
12141         /* give thread a chance to complete */
12142         /* it should remain joinable and hence detachable */
12143         sleep( 1 );
12144
12145         status = pthread_detach( &t );
12146         if( status ) return errno;
12147 #endif
12148
12149 #ifdef HAVE_LINUX_THREADS
12150         pthread_kill_other_threads_np();
12151 #endif
12152
12153         return 0;
12154
12155 }
12156
12157 EOF
12158 if { (eval echo configure:12159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12159 then
12160   ol_cv_pthread_pthread=yes
12161 else
12162   echo "configure: failed program was:" >&5
12163   cat conftest.$ac_ext >&5
12164   rm -fr conftest*
12165   ol_cv_pthread_pthread=no
12166 fi
12167 rm -fr conftest*
12168 fi
12169
12170
12171                 # restore the LIBS
12172                 LIBS="$ol_LIBS"
12173         
12174 fi
12175
12176 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12177
12178         if test $ol_cv_pthread_pthread = yes ; then
12179                 ol_link_pthreads="-pthread"
12180                 ol_link_threads=posix
12181         fi
12182 fi
12183
12184                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12185 if test "$ol_link_threads" = no ; then
12186         # try -pthreads
12187         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12188 echo "configure:12189: checking for pthread link with -pthreads" >&5
12189 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12190   echo $ac_n "(cached) $ac_c" 1>&6
12191 else
12192   
12193                 # save the flags
12194                 ol_LIBS="$LIBS"
12195                 LIBS="-pthreads $LIBS"
12196
12197                 if test "$cross_compiling" = yes; then
12198   cat > conftest.$ac_ext <<EOF
12199 #line 12200 "configure"
12200 #include "confdefs.h"
12201 /* pthread test headers */
12202 #include <pthread.h>
12203 #if HAVE_PTHREADS < 7
12204 #include <errno.h>
12205 #endif
12206 #ifndef NULL
12207 #define NULL (void*)0
12208 #endif
12209
12210 static void *task(p)
12211         void *p;
12212 {
12213         return (void *) (p == NULL);
12214 }
12215
12216 int main() {
12217
12218         /* pthread test function */
12219 #ifndef PTHREAD_CREATE_DETACHED
12220 #define PTHREAD_CREATE_DETACHED 1
12221 #endif
12222         pthread_t t;
12223         int status;
12224         int detach = PTHREAD_CREATE_DETACHED;
12225
12226 #if HAVE_PTHREADS > 4
12227         /* Final pthreads */
12228         pthread_attr_t attr;
12229
12230         status = pthread_attr_init(&attr);
12231         if( status ) return status;
12232
12233 #if HAVE_PTHREADS < 7
12234         status = pthread_attr_setdetachstate(&attr, &detach);
12235         if( status < 0 ) status = errno;
12236 #else
12237         status = pthread_attr_setdetachstate(&attr, detach);
12238 #endif
12239         if( status ) return status;
12240         status = pthread_create( &t, &attr, task, NULL );
12241 #if HAVE_PTHREADS < 7
12242         if( status < 0 ) status = errno;
12243 #endif
12244         if( status ) return status;
12245 #else
12246         /* Draft 4 pthreads */
12247         status = pthread_create( &t, pthread_attr_default, task, NULL );
12248         if( status ) return errno;
12249
12250         /* give thread a chance to complete */
12251         /* it should remain joinable and hence detachable */
12252         sleep( 1 );
12253
12254         status = pthread_detach( &t );
12255         if( status ) return errno;
12256 #endif
12257
12258 #ifdef HAVE_LINUX_THREADS
12259         pthread_kill_other_threads_np();
12260 #endif
12261
12262         return 0;
12263
12264 ; return 0; }
12265 EOF
12266 if { (eval echo configure:12267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12267   rm -rf conftest*
12268   ol_cv_pthread_pthreads=yes
12269 else
12270   echo "configure: failed program was:" >&5
12271   cat conftest.$ac_ext >&5
12272   rm -rf conftest*
12273   ol_cv_pthread_pthreads=no
12274 fi
12275 rm -f conftest*
12276 else
12277   cat > conftest.$ac_ext <<EOF
12278 #line 12279 "configure"
12279 #include "confdefs.h"
12280 /* pthread test headers */
12281 #include <pthread.h>
12282 #if HAVE_PTHREADS < 7
12283 #include <errno.h>
12284 #endif
12285 #ifndef NULL
12286 #define NULL (void*)0
12287 #endif
12288
12289 static void *task(p)
12290         void *p;
12291 {
12292         return (void *) (p == NULL);
12293 }
12294
12295
12296 int main(argc, argv)
12297         int argc;
12298         char **argv;
12299 {
12300
12301         /* pthread test function */
12302 #ifndef PTHREAD_CREATE_DETACHED
12303 #define PTHREAD_CREATE_DETACHED 1
12304 #endif
12305         pthread_t t;
12306         int status;
12307         int detach = PTHREAD_CREATE_DETACHED;
12308
12309 #if HAVE_PTHREADS > 4
12310         /* Final pthreads */
12311         pthread_attr_t attr;
12312
12313         status = pthread_attr_init(&attr);
12314         if( status ) return status;
12315
12316 #if HAVE_PTHREADS < 7
12317         status = pthread_attr_setdetachstate(&attr, &detach);
12318         if( status < 0 ) status = errno;
12319 #else
12320         status = pthread_attr_setdetachstate(&attr, detach);
12321 #endif
12322         if( status ) return status;
12323         status = pthread_create( &t, &attr, task, NULL );
12324 #if HAVE_PTHREADS < 7
12325         if( status < 0 ) status = errno;
12326 #endif
12327         if( status ) return status;
12328 #else
12329         /* Draft 4 pthreads */
12330         status = pthread_create( &t, pthread_attr_default, task, NULL );
12331         if( status ) return errno;
12332
12333         /* give thread a chance to complete */
12334         /* it should remain joinable and hence detachable */
12335         sleep( 1 );
12336
12337         status = pthread_detach( &t );
12338         if( status ) return errno;
12339 #endif
12340
12341 #ifdef HAVE_LINUX_THREADS
12342         pthread_kill_other_threads_np();
12343 #endif
12344
12345         return 0;
12346
12347 }
12348
12349 EOF
12350 if { (eval echo configure:12351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12351 then
12352   ol_cv_pthread_pthreads=yes
12353 else
12354   echo "configure: failed program was:" >&5
12355   cat conftest.$ac_ext >&5
12356   rm -fr conftest*
12357   ol_cv_pthread_pthreads=no
12358 fi
12359 rm -fr conftest*
12360 fi
12361
12362
12363                 # restore the LIBS
12364                 LIBS="$ol_LIBS"
12365         
12366 fi
12367
12368 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12369
12370         if test $ol_cv_pthread_pthreads = yes ; then
12371                 ol_link_pthreads="-pthreads"
12372                 ol_link_threads=posix
12373         fi
12374 fi
12375
12376                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12377 if test "$ol_link_threads" = no ; then
12378         # try -mthreads
12379         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12380 echo "configure:12381: checking for pthread link with -mthreads" >&5
12381 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12382   echo $ac_n "(cached) $ac_c" 1>&6
12383 else
12384   
12385                 # save the flags
12386                 ol_LIBS="$LIBS"
12387                 LIBS="-mthreads $LIBS"
12388
12389                 if test "$cross_compiling" = yes; then
12390   cat > conftest.$ac_ext <<EOF
12391 #line 12392 "configure"
12392 #include "confdefs.h"
12393 /* pthread test headers */
12394 #include <pthread.h>
12395 #if HAVE_PTHREADS < 7
12396 #include <errno.h>
12397 #endif
12398 #ifndef NULL
12399 #define NULL (void*)0
12400 #endif
12401
12402 static void *task(p)
12403         void *p;
12404 {
12405         return (void *) (p == NULL);
12406 }
12407
12408 int main() {
12409
12410         /* pthread test function */
12411 #ifndef PTHREAD_CREATE_DETACHED
12412 #define PTHREAD_CREATE_DETACHED 1
12413 #endif
12414         pthread_t t;
12415         int status;
12416         int detach = PTHREAD_CREATE_DETACHED;
12417
12418 #if HAVE_PTHREADS > 4
12419         /* Final pthreads */
12420         pthread_attr_t attr;
12421
12422         status = pthread_attr_init(&attr);
12423         if( status ) return status;
12424
12425 #if HAVE_PTHREADS < 7
12426         status = pthread_attr_setdetachstate(&attr, &detach);
12427         if( status < 0 ) status = errno;
12428 #else
12429         status = pthread_attr_setdetachstate(&attr, detach);
12430 #endif
12431         if( status ) return status;
12432         status = pthread_create( &t, &attr, task, NULL );
12433 #if HAVE_PTHREADS < 7
12434         if( status < 0 ) status = errno;
12435 #endif
12436         if( status ) return status;
12437 #else
12438         /* Draft 4 pthreads */
12439         status = pthread_create( &t, pthread_attr_default, task, NULL );
12440         if( status ) return errno;
12441
12442         /* give thread a chance to complete */
12443         /* it should remain joinable and hence detachable */
12444         sleep( 1 );
12445
12446         status = pthread_detach( &t );
12447         if( status ) return errno;
12448 #endif
12449
12450 #ifdef HAVE_LINUX_THREADS
12451         pthread_kill_other_threads_np();
12452 #endif
12453
12454         return 0;
12455
12456 ; return 0; }
12457 EOF
12458 if { (eval echo configure:12459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12459   rm -rf conftest*
12460   ol_cv_pthread_mthreads=yes
12461 else
12462   echo "configure: failed program was:" >&5
12463   cat conftest.$ac_ext >&5
12464   rm -rf conftest*
12465   ol_cv_pthread_mthreads=no
12466 fi
12467 rm -f conftest*
12468 else
12469   cat > conftest.$ac_ext <<EOF
12470 #line 12471 "configure"
12471 #include "confdefs.h"
12472 /* pthread test headers */
12473 #include <pthread.h>
12474 #if HAVE_PTHREADS < 7
12475 #include <errno.h>
12476 #endif
12477 #ifndef NULL
12478 #define NULL (void*)0
12479 #endif
12480
12481 static void *task(p)
12482         void *p;
12483 {
12484         return (void *) (p == NULL);
12485 }
12486
12487
12488 int main(argc, argv)
12489         int argc;
12490         char **argv;
12491 {
12492
12493         /* pthread test function */
12494 #ifndef PTHREAD_CREATE_DETACHED
12495 #define PTHREAD_CREATE_DETACHED 1
12496 #endif
12497         pthread_t t;
12498         int status;
12499         int detach = PTHREAD_CREATE_DETACHED;
12500
12501 #if HAVE_PTHREADS > 4
12502         /* Final pthreads */
12503         pthread_attr_t attr;
12504
12505         status = pthread_attr_init(&attr);
12506         if( status ) return status;
12507
12508 #if HAVE_PTHREADS < 7
12509         status = pthread_attr_setdetachstate(&attr, &detach);
12510         if( status < 0 ) status = errno;
12511 #else
12512         status = pthread_attr_setdetachstate(&attr, detach);
12513 #endif
12514         if( status ) return status;
12515         status = pthread_create( &t, &attr, task, NULL );
12516 #if HAVE_PTHREADS < 7
12517         if( status < 0 ) status = errno;
12518 #endif
12519         if( status ) return status;
12520 #else
12521         /* Draft 4 pthreads */
12522         status = pthread_create( &t, pthread_attr_default, task, NULL );
12523         if( status ) return errno;
12524
12525         /* give thread a chance to complete */
12526         /* it should remain joinable and hence detachable */
12527         sleep( 1 );
12528
12529         status = pthread_detach( &t );
12530         if( status ) return errno;
12531 #endif
12532
12533 #ifdef HAVE_LINUX_THREADS
12534         pthread_kill_other_threads_np();
12535 #endif
12536
12537         return 0;
12538
12539 }
12540
12541 EOF
12542 if { (eval echo configure:12543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12543 then
12544   ol_cv_pthread_mthreads=yes
12545 else
12546   echo "configure: failed program was:" >&5
12547   cat conftest.$ac_ext >&5
12548   rm -fr conftest*
12549   ol_cv_pthread_mthreads=no
12550 fi
12551 rm -fr conftest*
12552 fi
12553
12554
12555                 # restore the LIBS
12556                 LIBS="$ol_LIBS"
12557         
12558 fi
12559
12560 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12561
12562         if test $ol_cv_pthread_mthreads = yes ; then
12563                 ol_link_pthreads="-mthreads"
12564                 ol_link_threads=posix
12565         fi
12566 fi
12567
12568                 # Pthread try link: -thread (ol_cv_pthread_thread)
12569 if test "$ol_link_threads" = no ; then
12570         # try -thread
12571         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12572 echo "configure:12573: checking for pthread link with -thread" >&5
12573 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12574   echo $ac_n "(cached) $ac_c" 1>&6
12575 else
12576   
12577                 # save the flags
12578                 ol_LIBS="$LIBS"
12579                 LIBS="-thread $LIBS"
12580
12581                 if test "$cross_compiling" = yes; then
12582   cat > conftest.$ac_ext <<EOF
12583 #line 12584 "configure"
12584 #include "confdefs.h"
12585 /* pthread test headers */
12586 #include <pthread.h>
12587 #if HAVE_PTHREADS < 7
12588 #include <errno.h>
12589 #endif
12590 #ifndef NULL
12591 #define NULL (void*)0
12592 #endif
12593
12594 static void *task(p)
12595         void *p;
12596 {
12597         return (void *) (p == NULL);
12598 }
12599
12600 int main() {
12601
12602         /* pthread test function */
12603 #ifndef PTHREAD_CREATE_DETACHED
12604 #define PTHREAD_CREATE_DETACHED 1
12605 #endif
12606         pthread_t t;
12607         int status;
12608         int detach = PTHREAD_CREATE_DETACHED;
12609
12610 #if HAVE_PTHREADS > 4
12611         /* Final pthreads */
12612         pthread_attr_t attr;
12613
12614         status = pthread_attr_init(&attr);
12615         if( status ) return status;
12616
12617 #if HAVE_PTHREADS < 7
12618         status = pthread_attr_setdetachstate(&attr, &detach);
12619         if( status < 0 ) status = errno;
12620 #else
12621         status = pthread_attr_setdetachstate(&attr, detach);
12622 #endif
12623         if( status ) return status;
12624         status = pthread_create( &t, &attr, task, NULL );
12625 #if HAVE_PTHREADS < 7
12626         if( status < 0 ) status = errno;
12627 #endif
12628         if( status ) return status;
12629 #else
12630         /* Draft 4 pthreads */
12631         status = pthread_create( &t, pthread_attr_default, task, NULL );
12632         if( status ) return errno;
12633
12634         /* give thread a chance to complete */
12635         /* it should remain joinable and hence detachable */
12636         sleep( 1 );
12637
12638         status = pthread_detach( &t );
12639         if( status ) return errno;
12640 #endif
12641
12642 #ifdef HAVE_LINUX_THREADS
12643         pthread_kill_other_threads_np();
12644 #endif
12645
12646         return 0;
12647
12648 ; return 0; }
12649 EOF
12650 if { (eval echo configure:12651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12651   rm -rf conftest*
12652   ol_cv_pthread_thread=yes
12653 else
12654   echo "configure: failed program was:" >&5
12655   cat conftest.$ac_ext >&5
12656   rm -rf conftest*
12657   ol_cv_pthread_thread=no
12658 fi
12659 rm -f conftest*
12660 else
12661   cat > conftest.$ac_ext <<EOF
12662 #line 12663 "configure"
12663 #include "confdefs.h"
12664 /* pthread test headers */
12665 #include <pthread.h>
12666 #if HAVE_PTHREADS < 7
12667 #include <errno.h>
12668 #endif
12669 #ifndef NULL
12670 #define NULL (void*)0
12671 #endif
12672
12673 static void *task(p)
12674         void *p;
12675 {
12676         return (void *) (p == NULL);
12677 }
12678
12679
12680 int main(argc, argv)
12681         int argc;
12682         char **argv;
12683 {
12684
12685         /* pthread test function */
12686 #ifndef PTHREAD_CREATE_DETACHED
12687 #define PTHREAD_CREATE_DETACHED 1
12688 #endif
12689         pthread_t t;
12690         int status;
12691         int detach = PTHREAD_CREATE_DETACHED;
12692
12693 #if HAVE_PTHREADS > 4
12694         /* Final pthreads */
12695         pthread_attr_t attr;
12696
12697         status = pthread_attr_init(&attr);
12698         if( status ) return status;
12699
12700 #if HAVE_PTHREADS < 7
12701         status = pthread_attr_setdetachstate(&attr, &detach);
12702         if( status < 0 ) status = errno;
12703 #else
12704         status = pthread_attr_setdetachstate(&attr, detach);
12705 #endif
12706         if( status ) return status;
12707         status = pthread_create( &t, &attr, task, NULL );
12708 #if HAVE_PTHREADS < 7
12709         if( status < 0 ) status = errno;
12710 #endif
12711         if( status ) return status;
12712 #else
12713         /* Draft 4 pthreads */
12714         status = pthread_create( &t, pthread_attr_default, task, NULL );
12715         if( status ) return errno;
12716
12717         /* give thread a chance to complete */
12718         /* it should remain joinable and hence detachable */
12719         sleep( 1 );
12720
12721         status = pthread_detach( &t );
12722         if( status ) return errno;
12723 #endif
12724
12725 #ifdef HAVE_LINUX_THREADS
12726         pthread_kill_other_threads_np();
12727 #endif
12728
12729         return 0;
12730
12731 }
12732
12733 EOF
12734 if { (eval echo configure:12735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12735 then
12736   ol_cv_pthread_thread=yes
12737 else
12738   echo "configure: failed program was:" >&5
12739   cat conftest.$ac_ext >&5
12740   rm -fr conftest*
12741   ol_cv_pthread_thread=no
12742 fi
12743 rm -fr conftest*
12744 fi
12745
12746
12747                 # restore the LIBS
12748                 LIBS="$ol_LIBS"
12749         
12750 fi
12751
12752 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12753
12754         if test $ol_cv_pthread_thread = yes ; then
12755                 ol_link_pthreads="-thread"
12756                 ol_link_threads=posix
12757         fi
12758 fi
12759
12760
12761                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12762 if test "$ol_link_threads" = no ; then
12763         # try -lpthread -lmach -lexc -lc_r
12764         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12765 echo "configure:12766: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12766 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12767   echo $ac_n "(cached) $ac_c" 1>&6
12768 else
12769   
12770                 # save the flags
12771                 ol_LIBS="$LIBS"
12772                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12773
12774                 if test "$cross_compiling" = yes; then
12775   cat > conftest.$ac_ext <<EOF
12776 #line 12777 "configure"
12777 #include "confdefs.h"
12778 /* pthread test headers */
12779 #include <pthread.h>
12780 #if HAVE_PTHREADS < 7
12781 #include <errno.h>
12782 #endif
12783 #ifndef NULL
12784 #define NULL (void*)0
12785 #endif
12786
12787 static void *task(p)
12788         void *p;
12789 {
12790         return (void *) (p == NULL);
12791 }
12792
12793 int main() {
12794
12795         /* pthread test function */
12796 #ifndef PTHREAD_CREATE_DETACHED
12797 #define PTHREAD_CREATE_DETACHED 1
12798 #endif
12799         pthread_t t;
12800         int status;
12801         int detach = PTHREAD_CREATE_DETACHED;
12802
12803 #if HAVE_PTHREADS > 4
12804         /* Final pthreads */
12805         pthread_attr_t attr;
12806
12807         status = pthread_attr_init(&attr);
12808         if( status ) return status;
12809
12810 #if HAVE_PTHREADS < 7
12811         status = pthread_attr_setdetachstate(&attr, &detach);
12812         if( status < 0 ) status = errno;
12813 #else
12814         status = pthread_attr_setdetachstate(&attr, detach);
12815 #endif
12816         if( status ) return status;
12817         status = pthread_create( &t, &attr, task, NULL );
12818 #if HAVE_PTHREADS < 7
12819         if( status < 0 ) status = errno;
12820 #endif
12821         if( status ) return status;
12822 #else
12823         /* Draft 4 pthreads */
12824         status = pthread_create( &t, pthread_attr_default, task, NULL );
12825         if( status ) return errno;
12826
12827         /* give thread a chance to complete */
12828         /* it should remain joinable and hence detachable */
12829         sleep( 1 );
12830
12831         status = pthread_detach( &t );
12832         if( status ) return errno;
12833 #endif
12834
12835 #ifdef HAVE_LINUX_THREADS
12836         pthread_kill_other_threads_np();
12837 #endif
12838
12839         return 0;
12840
12841 ; return 0; }
12842 EOF
12843 if { (eval echo configure:12844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12844   rm -rf conftest*
12845   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12846 else
12847   echo "configure: failed program was:" >&5
12848   cat conftest.$ac_ext >&5
12849   rm -rf conftest*
12850   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12851 fi
12852 rm -f conftest*
12853 else
12854   cat > conftest.$ac_ext <<EOF
12855 #line 12856 "configure"
12856 #include "confdefs.h"
12857 /* pthread test headers */
12858 #include <pthread.h>
12859 #if HAVE_PTHREADS < 7
12860 #include <errno.h>
12861 #endif
12862 #ifndef NULL
12863 #define NULL (void*)0
12864 #endif
12865
12866 static void *task(p)
12867         void *p;
12868 {
12869         return (void *) (p == NULL);
12870 }
12871
12872
12873 int main(argc, argv)
12874         int argc;
12875         char **argv;
12876 {
12877
12878         /* pthread test function */
12879 #ifndef PTHREAD_CREATE_DETACHED
12880 #define PTHREAD_CREATE_DETACHED 1
12881 #endif
12882         pthread_t t;
12883         int status;
12884         int detach = PTHREAD_CREATE_DETACHED;
12885
12886 #if HAVE_PTHREADS > 4
12887         /* Final pthreads */
12888         pthread_attr_t attr;
12889
12890         status = pthread_attr_init(&attr);
12891         if( status ) return status;
12892
12893 #if HAVE_PTHREADS < 7
12894         status = pthread_attr_setdetachstate(&attr, &detach);
12895         if( status < 0 ) status = errno;
12896 #else
12897         status = pthread_attr_setdetachstate(&attr, detach);
12898 #endif
12899         if( status ) return status;
12900         status = pthread_create( &t, &attr, task, NULL );
12901 #if HAVE_PTHREADS < 7
12902         if( status < 0 ) status = errno;
12903 #endif
12904         if( status ) return status;
12905 #else
12906         /* Draft 4 pthreads */
12907         status = pthread_create( &t, pthread_attr_default, task, NULL );
12908         if( status ) return errno;
12909
12910         /* give thread a chance to complete */
12911         /* it should remain joinable and hence detachable */
12912         sleep( 1 );
12913
12914         status = pthread_detach( &t );
12915         if( status ) return errno;
12916 #endif
12917
12918 #ifdef HAVE_LINUX_THREADS
12919         pthread_kill_other_threads_np();
12920 #endif
12921
12922         return 0;
12923
12924 }
12925
12926 EOF
12927 if { (eval echo configure:12928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12928 then
12929   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12930 else
12931   echo "configure: failed program was:" >&5
12932   cat conftest.$ac_ext >&5
12933   rm -fr conftest*
12934   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12935 fi
12936 rm -fr conftest*
12937 fi
12938
12939
12940                 # restore the LIBS
12941                 LIBS="$ol_LIBS"
12942         
12943 fi
12944
12945 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12946
12947         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12948                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12949                 ol_link_threads=posix
12950         fi
12951 fi
12952
12953                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12954 if test "$ol_link_threads" = no ; then
12955         # try -lpthread -lmach -lexc
12956         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12957 echo "configure:12958: checking for pthread link with -lpthread -lmach -lexc" >&5
12958 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12959   echo $ac_n "(cached) $ac_c" 1>&6
12960 else
12961   
12962                 # save the flags
12963                 ol_LIBS="$LIBS"
12964                 LIBS="-lpthread -lmach -lexc $LIBS"
12965
12966                 if test "$cross_compiling" = yes; then
12967   cat > conftest.$ac_ext <<EOF
12968 #line 12969 "configure"
12969 #include "confdefs.h"
12970 /* pthread test headers */
12971 #include <pthread.h>
12972 #if HAVE_PTHREADS < 7
12973 #include <errno.h>
12974 #endif
12975 #ifndef NULL
12976 #define NULL (void*)0
12977 #endif
12978
12979 static void *task(p)
12980         void *p;
12981 {
12982         return (void *) (p == NULL);
12983 }
12984
12985 int main() {
12986
12987         /* pthread test function */
12988 #ifndef PTHREAD_CREATE_DETACHED
12989 #define PTHREAD_CREATE_DETACHED 1
12990 #endif
12991         pthread_t t;
12992         int status;
12993         int detach = PTHREAD_CREATE_DETACHED;
12994
12995 #if HAVE_PTHREADS > 4
12996         /* Final pthreads */
12997         pthread_attr_t attr;
12998
12999         status = pthread_attr_init(&attr);
13000         if( status ) return status;
13001
13002 #if HAVE_PTHREADS < 7
13003         status = pthread_attr_setdetachstate(&attr, &detach);
13004         if( status < 0 ) status = errno;
13005 #else
13006         status = pthread_attr_setdetachstate(&attr, detach);
13007 #endif
13008         if( status ) return status;
13009         status = pthread_create( &t, &attr, task, NULL );
13010 #if HAVE_PTHREADS < 7
13011         if( status < 0 ) status = errno;
13012 #endif
13013         if( status ) return status;
13014 #else
13015         /* Draft 4 pthreads */
13016         status = pthread_create( &t, pthread_attr_default, task, NULL );
13017         if( status ) return errno;
13018
13019         /* give thread a chance to complete */
13020         /* it should remain joinable and hence detachable */
13021         sleep( 1 );
13022
13023         status = pthread_detach( &t );
13024         if( status ) return errno;
13025 #endif
13026
13027 #ifdef HAVE_LINUX_THREADS
13028         pthread_kill_other_threads_np();
13029 #endif
13030
13031         return 0;
13032
13033 ; return 0; }
13034 EOF
13035 if { (eval echo configure:13036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13036   rm -rf conftest*
13037   ol_cv_pthread_lpthread_lmach_lexc=yes
13038 else
13039   echo "configure: failed program was:" >&5
13040   cat conftest.$ac_ext >&5
13041   rm -rf conftest*
13042   ol_cv_pthread_lpthread_lmach_lexc=no
13043 fi
13044 rm -f conftest*
13045 else
13046   cat > conftest.$ac_ext <<EOF
13047 #line 13048 "configure"
13048 #include "confdefs.h"
13049 /* pthread test headers */
13050 #include <pthread.h>
13051 #if HAVE_PTHREADS < 7
13052 #include <errno.h>
13053 #endif
13054 #ifndef NULL
13055 #define NULL (void*)0
13056 #endif
13057
13058 static void *task(p)
13059         void *p;
13060 {
13061         return (void *) (p == NULL);
13062 }
13063
13064
13065 int main(argc, argv)
13066         int argc;
13067         char **argv;
13068 {
13069
13070         /* pthread test function */
13071 #ifndef PTHREAD_CREATE_DETACHED
13072 #define PTHREAD_CREATE_DETACHED 1
13073 #endif
13074         pthread_t t;
13075         int status;
13076         int detach = PTHREAD_CREATE_DETACHED;
13077
13078 #if HAVE_PTHREADS > 4
13079         /* Final pthreads */
13080         pthread_attr_t attr;
13081
13082         status = pthread_attr_init(&attr);
13083         if( status ) return status;
13084
13085 #if HAVE_PTHREADS < 7
13086         status = pthread_attr_setdetachstate(&attr, &detach);
13087         if( status < 0 ) status = errno;
13088 #else
13089         status = pthread_attr_setdetachstate(&attr, detach);
13090 #endif
13091         if( status ) return status;
13092         status = pthread_create( &t, &attr, task, NULL );
13093 #if HAVE_PTHREADS < 7
13094         if( status < 0 ) status = errno;
13095 #endif
13096         if( status ) return status;
13097 #else
13098         /* Draft 4 pthreads */
13099         status = pthread_create( &t, pthread_attr_default, task, NULL );
13100         if( status ) return errno;
13101
13102         /* give thread a chance to complete */
13103         /* it should remain joinable and hence detachable */
13104         sleep( 1 );
13105
13106         status = pthread_detach( &t );
13107         if( status ) return errno;
13108 #endif
13109
13110 #ifdef HAVE_LINUX_THREADS
13111         pthread_kill_other_threads_np();
13112 #endif
13113
13114         return 0;
13115
13116 }
13117
13118 EOF
13119 if { (eval echo configure:13120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13120 then
13121   ol_cv_pthread_lpthread_lmach_lexc=yes
13122 else
13123   echo "configure: failed program was:" >&5
13124   cat conftest.$ac_ext >&5
13125   rm -fr conftest*
13126   ol_cv_pthread_lpthread_lmach_lexc=no
13127 fi
13128 rm -fr conftest*
13129 fi
13130
13131
13132                 # restore the LIBS
13133                 LIBS="$ol_LIBS"
13134         
13135 fi
13136
13137 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13138
13139         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13140                 ol_link_pthreads="-lpthread -lmach -lexc"
13141                 ol_link_threads=posix
13142         fi
13143 fi
13144
13145
13146                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13147 if test "$ol_link_threads" = no ; then
13148         # try -lpthread -Wl,-woff,85
13149         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13150 echo "configure:13151: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13151 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13152   echo $ac_n "(cached) $ac_c" 1>&6
13153 else
13154   
13155                 # save the flags
13156                 ol_LIBS="$LIBS"
13157                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13158
13159                 if test "$cross_compiling" = yes; then
13160   cat > conftest.$ac_ext <<EOF
13161 #line 13162 "configure"
13162 #include "confdefs.h"
13163 /* pthread test headers */
13164 #include <pthread.h>
13165 #if HAVE_PTHREADS < 7
13166 #include <errno.h>
13167 #endif
13168 #ifndef NULL
13169 #define NULL (void*)0
13170 #endif
13171
13172 static void *task(p)
13173         void *p;
13174 {
13175         return (void *) (p == NULL);
13176 }
13177
13178 int main() {
13179
13180         /* pthread test function */
13181 #ifndef PTHREAD_CREATE_DETACHED
13182 #define PTHREAD_CREATE_DETACHED 1
13183 #endif
13184         pthread_t t;
13185         int status;
13186         int detach = PTHREAD_CREATE_DETACHED;
13187
13188 #if HAVE_PTHREADS > 4
13189         /* Final pthreads */
13190         pthread_attr_t attr;
13191
13192         status = pthread_attr_init(&attr);
13193         if( status ) return status;
13194
13195 #if HAVE_PTHREADS < 7
13196         status = pthread_attr_setdetachstate(&attr, &detach);
13197         if( status < 0 ) status = errno;
13198 #else
13199         status = pthread_attr_setdetachstate(&attr, detach);
13200 #endif
13201         if( status ) return status;
13202         status = pthread_create( &t, &attr, task, NULL );
13203 #if HAVE_PTHREADS < 7
13204         if( status < 0 ) status = errno;
13205 #endif
13206         if( status ) return status;
13207 #else
13208         /* Draft 4 pthreads */
13209         status = pthread_create( &t, pthread_attr_default, task, NULL );
13210         if( status ) return errno;
13211
13212         /* give thread a chance to complete */
13213         /* it should remain joinable and hence detachable */
13214         sleep( 1 );
13215
13216         status = pthread_detach( &t );
13217         if( status ) return errno;
13218 #endif
13219
13220 #ifdef HAVE_LINUX_THREADS
13221         pthread_kill_other_threads_np();
13222 #endif
13223
13224         return 0;
13225
13226 ; return 0; }
13227 EOF
13228 if { (eval echo configure:13229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13229   rm -rf conftest*
13230   ol_cv_pthread_lib_lpthread_woff=yes
13231 else
13232   echo "configure: failed program was:" >&5
13233   cat conftest.$ac_ext >&5
13234   rm -rf conftest*
13235   ol_cv_pthread_lib_lpthread_woff=no
13236 fi
13237 rm -f conftest*
13238 else
13239   cat > conftest.$ac_ext <<EOF
13240 #line 13241 "configure"
13241 #include "confdefs.h"
13242 /* pthread test headers */
13243 #include <pthread.h>
13244 #if HAVE_PTHREADS < 7
13245 #include <errno.h>
13246 #endif
13247 #ifndef NULL
13248 #define NULL (void*)0
13249 #endif
13250
13251 static void *task(p)
13252         void *p;
13253 {
13254         return (void *) (p == NULL);
13255 }
13256
13257
13258 int main(argc, argv)
13259         int argc;
13260         char **argv;
13261 {
13262
13263         /* pthread test function */
13264 #ifndef PTHREAD_CREATE_DETACHED
13265 #define PTHREAD_CREATE_DETACHED 1
13266 #endif
13267         pthread_t t;
13268         int status;
13269         int detach = PTHREAD_CREATE_DETACHED;
13270
13271 #if HAVE_PTHREADS > 4
13272         /* Final pthreads */
13273         pthread_attr_t attr;
13274
13275         status = pthread_attr_init(&attr);
13276         if( status ) return status;
13277
13278 #if HAVE_PTHREADS < 7
13279         status = pthread_attr_setdetachstate(&attr, &detach);
13280         if( status < 0 ) status = errno;
13281 #else
13282         status = pthread_attr_setdetachstate(&attr, detach);
13283 #endif
13284         if( status ) return status;
13285         status = pthread_create( &t, &attr, task, NULL );
13286 #if HAVE_PTHREADS < 7
13287         if( status < 0 ) status = errno;
13288 #endif
13289         if( status ) return status;
13290 #else
13291         /* Draft 4 pthreads */
13292         status = pthread_create( &t, pthread_attr_default, task, NULL );
13293         if( status ) return errno;
13294
13295         /* give thread a chance to complete */
13296         /* it should remain joinable and hence detachable */
13297         sleep( 1 );
13298
13299         status = pthread_detach( &t );
13300         if( status ) return errno;
13301 #endif
13302
13303 #ifdef HAVE_LINUX_THREADS
13304         pthread_kill_other_threads_np();
13305 #endif
13306
13307         return 0;
13308
13309 }
13310
13311 EOF
13312 if { (eval echo configure:13313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13313 then
13314   ol_cv_pthread_lib_lpthread_woff=yes
13315 else
13316   echo "configure: failed program was:" >&5
13317   cat conftest.$ac_ext >&5
13318   rm -fr conftest*
13319   ol_cv_pthread_lib_lpthread_woff=no
13320 fi
13321 rm -fr conftest*
13322 fi
13323
13324
13325                 # restore the LIBS
13326                 LIBS="$ol_LIBS"
13327         
13328 fi
13329
13330 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13331
13332         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13333                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13334                 ol_link_threads=posix
13335         fi
13336 fi
13337
13338
13339                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13340 if test "$ol_link_threads" = no ; then
13341         # try -lpthread
13342         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13343 echo "configure:13344: checking for pthread link with -lpthread" >&5
13344 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13345   echo $ac_n "(cached) $ac_c" 1>&6
13346 else
13347   
13348                 # save the flags
13349                 ol_LIBS="$LIBS"
13350                 LIBS="-lpthread $LIBS"
13351
13352                 if test "$cross_compiling" = yes; then
13353   cat > conftest.$ac_ext <<EOF
13354 #line 13355 "configure"
13355 #include "confdefs.h"
13356 /* pthread test headers */
13357 #include <pthread.h>
13358 #if HAVE_PTHREADS < 7
13359 #include <errno.h>
13360 #endif
13361 #ifndef NULL
13362 #define NULL (void*)0
13363 #endif
13364
13365 static void *task(p)
13366         void *p;
13367 {
13368         return (void *) (p == NULL);
13369 }
13370
13371 int main() {
13372
13373         /* pthread test function */
13374 #ifndef PTHREAD_CREATE_DETACHED
13375 #define PTHREAD_CREATE_DETACHED 1
13376 #endif
13377         pthread_t t;
13378         int status;
13379         int detach = PTHREAD_CREATE_DETACHED;
13380
13381 #if HAVE_PTHREADS > 4
13382         /* Final pthreads */
13383         pthread_attr_t attr;
13384
13385         status = pthread_attr_init(&attr);
13386         if( status ) return status;
13387
13388 #if HAVE_PTHREADS < 7
13389         status = pthread_attr_setdetachstate(&attr, &detach);
13390         if( status < 0 ) status = errno;
13391 #else
13392         status = pthread_attr_setdetachstate(&attr, detach);
13393 #endif
13394         if( status ) return status;
13395         status = pthread_create( &t, &attr, task, NULL );
13396 #if HAVE_PTHREADS < 7
13397         if( status < 0 ) status = errno;
13398 #endif
13399         if( status ) return status;
13400 #else
13401         /* Draft 4 pthreads */
13402         status = pthread_create( &t, pthread_attr_default, task, NULL );
13403         if( status ) return errno;
13404
13405         /* give thread a chance to complete */
13406         /* it should remain joinable and hence detachable */
13407         sleep( 1 );
13408
13409         status = pthread_detach( &t );
13410         if( status ) return errno;
13411 #endif
13412
13413 #ifdef HAVE_LINUX_THREADS
13414         pthread_kill_other_threads_np();
13415 #endif
13416
13417         return 0;
13418
13419 ; return 0; }
13420 EOF
13421 if { (eval echo configure:13422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13422   rm -rf conftest*
13423   ol_cv_pthread_lpthread=yes
13424 else
13425   echo "configure: failed program was:" >&5
13426   cat conftest.$ac_ext >&5
13427   rm -rf conftest*
13428   ol_cv_pthread_lpthread=no
13429 fi
13430 rm -f conftest*
13431 else
13432   cat > conftest.$ac_ext <<EOF
13433 #line 13434 "configure"
13434 #include "confdefs.h"
13435 /* pthread test headers */
13436 #include <pthread.h>
13437 #if HAVE_PTHREADS < 7
13438 #include <errno.h>
13439 #endif
13440 #ifndef NULL
13441 #define NULL (void*)0
13442 #endif
13443
13444 static void *task(p)
13445         void *p;
13446 {
13447         return (void *) (p == NULL);
13448 }
13449
13450
13451 int main(argc, argv)
13452         int argc;
13453         char **argv;
13454 {
13455
13456         /* pthread test function */
13457 #ifndef PTHREAD_CREATE_DETACHED
13458 #define PTHREAD_CREATE_DETACHED 1
13459 #endif
13460         pthread_t t;
13461         int status;
13462         int detach = PTHREAD_CREATE_DETACHED;
13463
13464 #if HAVE_PTHREADS > 4
13465         /* Final pthreads */
13466         pthread_attr_t attr;
13467
13468         status = pthread_attr_init(&attr);
13469         if( status ) return status;
13470
13471 #if HAVE_PTHREADS < 7
13472         status = pthread_attr_setdetachstate(&attr, &detach);
13473         if( status < 0 ) status = errno;
13474 #else
13475         status = pthread_attr_setdetachstate(&attr, detach);
13476 #endif
13477         if( status ) return status;
13478         status = pthread_create( &t, &attr, task, NULL );
13479 #if HAVE_PTHREADS < 7
13480         if( status < 0 ) status = errno;
13481 #endif
13482         if( status ) return status;
13483 #else
13484         /* Draft 4 pthreads */
13485         status = pthread_create( &t, pthread_attr_default, task, NULL );
13486         if( status ) return errno;
13487
13488         /* give thread a chance to complete */
13489         /* it should remain joinable and hence detachable */
13490         sleep( 1 );
13491
13492         status = pthread_detach( &t );
13493         if( status ) return errno;
13494 #endif
13495
13496 #ifdef HAVE_LINUX_THREADS
13497         pthread_kill_other_threads_np();
13498 #endif
13499
13500         return 0;
13501
13502 }
13503
13504 EOF
13505 if { (eval echo configure:13506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13506 then
13507   ol_cv_pthread_lpthread=yes
13508 else
13509   echo "configure: failed program was:" >&5
13510   cat conftest.$ac_ext >&5
13511   rm -fr conftest*
13512   ol_cv_pthread_lpthread=no
13513 fi
13514 rm -fr conftest*
13515 fi
13516
13517
13518                 # restore the LIBS
13519                 LIBS="$ol_LIBS"
13520         
13521 fi
13522
13523 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13524
13525         if test $ol_cv_pthread_lpthread = yes ; then
13526                 ol_link_pthreads="-lpthread"
13527                 ol_link_threads=posix
13528         fi
13529 fi
13530
13531                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13532 if test "$ol_link_threads" = no ; then
13533         # try -lc_r
13534         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13535 echo "configure:13536: checking for pthread link with -lc_r" >&5
13536 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13537   echo $ac_n "(cached) $ac_c" 1>&6
13538 else
13539   
13540                 # save the flags
13541                 ol_LIBS="$LIBS"
13542                 LIBS="-lc_r $LIBS"
13543
13544                 if test "$cross_compiling" = yes; then
13545   cat > conftest.$ac_ext <<EOF
13546 #line 13547 "configure"
13547 #include "confdefs.h"
13548 /* pthread test headers */
13549 #include <pthread.h>
13550 #if HAVE_PTHREADS < 7
13551 #include <errno.h>
13552 #endif
13553 #ifndef NULL
13554 #define NULL (void*)0
13555 #endif
13556
13557 static void *task(p)
13558         void *p;
13559 {
13560         return (void *) (p == NULL);
13561 }
13562
13563 int main() {
13564
13565         /* pthread test function */
13566 #ifndef PTHREAD_CREATE_DETACHED
13567 #define PTHREAD_CREATE_DETACHED 1
13568 #endif
13569         pthread_t t;
13570         int status;
13571         int detach = PTHREAD_CREATE_DETACHED;
13572
13573 #if HAVE_PTHREADS > 4
13574         /* Final pthreads */
13575         pthread_attr_t attr;
13576
13577         status = pthread_attr_init(&attr);
13578         if( status ) return status;
13579
13580 #if HAVE_PTHREADS < 7
13581         status = pthread_attr_setdetachstate(&attr, &detach);
13582         if( status < 0 ) status = errno;
13583 #else
13584         status = pthread_attr_setdetachstate(&attr, detach);
13585 #endif
13586         if( status ) return status;
13587         status = pthread_create( &t, &attr, task, NULL );
13588 #if HAVE_PTHREADS < 7
13589         if( status < 0 ) status = errno;
13590 #endif
13591         if( status ) return status;
13592 #else
13593         /* Draft 4 pthreads */
13594         status = pthread_create( &t, pthread_attr_default, task, NULL );
13595         if( status ) return errno;
13596
13597         /* give thread a chance to complete */
13598         /* it should remain joinable and hence detachable */
13599         sleep( 1 );
13600
13601         status = pthread_detach( &t );
13602         if( status ) return errno;
13603 #endif
13604
13605 #ifdef HAVE_LINUX_THREADS
13606         pthread_kill_other_threads_np();
13607 #endif
13608
13609         return 0;
13610
13611 ; return 0; }
13612 EOF
13613 if { (eval echo configure:13614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13614   rm -rf conftest*
13615   ol_cv_pthread_lc_r=yes
13616 else
13617   echo "configure: failed program was:" >&5
13618   cat conftest.$ac_ext >&5
13619   rm -rf conftest*
13620   ol_cv_pthread_lc_r=no
13621 fi
13622 rm -f conftest*
13623 else
13624   cat > conftest.$ac_ext <<EOF
13625 #line 13626 "configure"
13626 #include "confdefs.h"
13627 /* pthread test headers */
13628 #include <pthread.h>
13629 #if HAVE_PTHREADS < 7
13630 #include <errno.h>
13631 #endif
13632 #ifndef NULL
13633 #define NULL (void*)0
13634 #endif
13635
13636 static void *task(p)
13637         void *p;
13638 {
13639         return (void *) (p == NULL);
13640 }
13641
13642
13643 int main(argc, argv)
13644         int argc;
13645         char **argv;
13646 {
13647
13648         /* pthread test function */
13649 #ifndef PTHREAD_CREATE_DETACHED
13650 #define PTHREAD_CREATE_DETACHED 1
13651 #endif
13652         pthread_t t;
13653         int status;
13654         int detach = PTHREAD_CREATE_DETACHED;
13655
13656 #if HAVE_PTHREADS > 4
13657         /* Final pthreads */
13658         pthread_attr_t attr;
13659
13660         status = pthread_attr_init(&attr);
13661         if( status ) return status;
13662
13663 #if HAVE_PTHREADS < 7
13664         status = pthread_attr_setdetachstate(&attr, &detach);
13665         if( status < 0 ) status = errno;
13666 #else
13667         status = pthread_attr_setdetachstate(&attr, detach);
13668 #endif
13669         if( status ) return status;
13670         status = pthread_create( &t, &attr, task, NULL );
13671 #if HAVE_PTHREADS < 7
13672         if( status < 0 ) status = errno;
13673 #endif
13674         if( status ) return status;
13675 #else
13676         /* Draft 4 pthreads */
13677         status = pthread_create( &t, pthread_attr_default, task, NULL );
13678         if( status ) return errno;
13679
13680         /* give thread a chance to complete */
13681         /* it should remain joinable and hence detachable */
13682         sleep( 1 );
13683
13684         status = pthread_detach( &t );
13685         if( status ) return errno;
13686 #endif
13687
13688 #ifdef HAVE_LINUX_THREADS
13689         pthread_kill_other_threads_np();
13690 #endif
13691
13692         return 0;
13693
13694 }
13695
13696 EOF
13697 if { (eval echo configure:13698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13698 then
13699   ol_cv_pthread_lc_r=yes
13700 else
13701   echo "configure: failed program was:" >&5
13702   cat conftest.$ac_ext >&5
13703   rm -fr conftest*
13704   ol_cv_pthread_lc_r=no
13705 fi
13706 rm -fr conftest*
13707 fi
13708
13709
13710                 # restore the LIBS
13711                 LIBS="$ol_LIBS"
13712         
13713 fi
13714
13715 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13716
13717         if test $ol_cv_pthread_lc_r = yes ; then
13718                 ol_link_pthreads="-lc_r"
13719                 ol_link_threads=posix
13720         fi
13721 fi
13722
13723
13724                 # Pthread try link: -threads (ol_cv_pthread_threads)
13725 if test "$ol_link_threads" = no ; then
13726         # try -threads
13727         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13728 echo "configure:13729: checking for pthread link with -threads" >&5
13729 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13730   echo $ac_n "(cached) $ac_c" 1>&6
13731 else
13732   
13733                 # save the flags
13734                 ol_LIBS="$LIBS"
13735                 LIBS="-threads $LIBS"
13736
13737                 if test "$cross_compiling" = yes; then
13738   cat > conftest.$ac_ext <<EOF
13739 #line 13740 "configure"
13740 #include "confdefs.h"
13741 /* pthread test headers */
13742 #include <pthread.h>
13743 #if HAVE_PTHREADS < 7
13744 #include <errno.h>
13745 #endif
13746 #ifndef NULL
13747 #define NULL (void*)0
13748 #endif
13749
13750 static void *task(p)
13751         void *p;
13752 {
13753         return (void *) (p == NULL);
13754 }
13755
13756 int main() {
13757
13758         /* pthread test function */
13759 #ifndef PTHREAD_CREATE_DETACHED
13760 #define PTHREAD_CREATE_DETACHED 1
13761 #endif
13762         pthread_t t;
13763         int status;
13764         int detach = PTHREAD_CREATE_DETACHED;
13765
13766 #if HAVE_PTHREADS > 4
13767         /* Final pthreads */
13768         pthread_attr_t attr;
13769
13770         status = pthread_attr_init(&attr);
13771         if( status ) return status;
13772
13773 #if HAVE_PTHREADS < 7
13774         status = pthread_attr_setdetachstate(&attr, &detach);
13775         if( status < 0 ) status = errno;
13776 #else
13777         status = pthread_attr_setdetachstate(&attr, detach);
13778 #endif
13779         if( status ) return status;
13780         status = pthread_create( &t, &attr, task, NULL );
13781 #if HAVE_PTHREADS < 7
13782         if( status < 0 ) status = errno;
13783 #endif
13784         if( status ) return status;
13785 #else
13786         /* Draft 4 pthreads */
13787         status = pthread_create( &t, pthread_attr_default, task, NULL );
13788         if( status ) return errno;
13789
13790         /* give thread a chance to complete */
13791         /* it should remain joinable and hence detachable */
13792         sleep( 1 );
13793
13794         status = pthread_detach( &t );
13795         if( status ) return errno;
13796 #endif
13797
13798 #ifdef HAVE_LINUX_THREADS
13799         pthread_kill_other_threads_np();
13800 #endif
13801
13802         return 0;
13803
13804 ; return 0; }
13805 EOF
13806 if { (eval echo configure:13807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13807   rm -rf conftest*
13808   ol_cv_pthread_threads=yes
13809 else
13810   echo "configure: failed program was:" >&5
13811   cat conftest.$ac_ext >&5
13812   rm -rf conftest*
13813   ol_cv_pthread_threads=no
13814 fi
13815 rm -f conftest*
13816 else
13817   cat > conftest.$ac_ext <<EOF
13818 #line 13819 "configure"
13819 #include "confdefs.h"
13820 /* pthread test headers */
13821 #include <pthread.h>
13822 #if HAVE_PTHREADS < 7
13823 #include <errno.h>
13824 #endif
13825 #ifndef NULL
13826 #define NULL (void*)0
13827 #endif
13828
13829 static void *task(p)
13830         void *p;
13831 {
13832         return (void *) (p == NULL);
13833 }
13834
13835
13836 int main(argc, argv)
13837         int argc;
13838         char **argv;
13839 {
13840
13841         /* pthread test function */
13842 #ifndef PTHREAD_CREATE_DETACHED
13843 #define PTHREAD_CREATE_DETACHED 1
13844 #endif
13845         pthread_t t;
13846         int status;
13847         int detach = PTHREAD_CREATE_DETACHED;
13848
13849 #if HAVE_PTHREADS > 4
13850         /* Final pthreads */
13851         pthread_attr_t attr;
13852
13853         status = pthread_attr_init(&attr);
13854         if( status ) return status;
13855
13856 #if HAVE_PTHREADS < 7
13857         status = pthread_attr_setdetachstate(&attr, &detach);
13858         if( status < 0 ) status = errno;
13859 #else
13860         status = pthread_attr_setdetachstate(&attr, detach);
13861 #endif
13862         if( status ) return status;
13863         status = pthread_create( &t, &attr, task, NULL );
13864 #if HAVE_PTHREADS < 7
13865         if( status < 0 ) status = errno;
13866 #endif
13867         if( status ) return status;
13868 #else
13869         /* Draft 4 pthreads */
13870         status = pthread_create( &t, pthread_attr_default, task, NULL );
13871         if( status ) return errno;
13872
13873         /* give thread a chance to complete */
13874         /* it should remain joinable and hence detachable */
13875         sleep( 1 );
13876
13877         status = pthread_detach( &t );
13878         if( status ) return errno;
13879 #endif
13880
13881 #ifdef HAVE_LINUX_THREADS
13882         pthread_kill_other_threads_np();
13883 #endif
13884
13885         return 0;
13886
13887 }
13888
13889 EOF
13890 if { (eval echo configure:13891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13891 then
13892   ol_cv_pthread_threads=yes
13893 else
13894   echo "configure: failed program was:" >&5
13895   cat conftest.$ac_ext >&5
13896   rm -fr conftest*
13897   ol_cv_pthread_threads=no
13898 fi
13899 rm -fr conftest*
13900 fi
13901
13902
13903                 # restore the LIBS
13904                 LIBS="$ol_LIBS"
13905         
13906 fi
13907
13908 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13909
13910         if test $ol_cv_pthread_threads = yes ; then
13911                 ol_link_pthreads="-threads"
13912                 ol_link_threads=posix
13913         fi
13914 fi
13915
13916
13917                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13918 if test "$ol_link_threads" = no ; then
13919         # try -lpthreads -lmach -lexc -lc_r
13920         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13921 echo "configure:13922: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13922 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13923   echo $ac_n "(cached) $ac_c" 1>&6
13924 else
13925   
13926                 # save the flags
13927                 ol_LIBS="$LIBS"
13928                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13929
13930                 if test "$cross_compiling" = yes; then
13931   cat > conftest.$ac_ext <<EOF
13932 #line 13933 "configure"
13933 #include "confdefs.h"
13934 /* pthread test headers */
13935 #include <pthread.h>
13936 #if HAVE_PTHREADS < 7
13937 #include <errno.h>
13938 #endif
13939 #ifndef NULL
13940 #define NULL (void*)0
13941 #endif
13942
13943 static void *task(p)
13944         void *p;
13945 {
13946         return (void *) (p == NULL);
13947 }
13948
13949 int main() {
13950
13951         /* pthread test function */
13952 #ifndef PTHREAD_CREATE_DETACHED
13953 #define PTHREAD_CREATE_DETACHED 1
13954 #endif
13955         pthread_t t;
13956         int status;
13957         int detach = PTHREAD_CREATE_DETACHED;
13958
13959 #if HAVE_PTHREADS > 4
13960         /* Final pthreads */
13961         pthread_attr_t attr;
13962
13963         status = pthread_attr_init(&attr);
13964         if( status ) return status;
13965
13966 #if HAVE_PTHREADS < 7
13967         status = pthread_attr_setdetachstate(&attr, &detach);
13968         if( status < 0 ) status = errno;
13969 #else
13970         status = pthread_attr_setdetachstate(&attr, detach);
13971 #endif
13972         if( status ) return status;
13973         status = pthread_create( &t, &attr, task, NULL );
13974 #if HAVE_PTHREADS < 7
13975         if( status < 0 ) status = errno;
13976 #endif
13977         if( status ) return status;
13978 #else
13979         /* Draft 4 pthreads */
13980         status = pthread_create( &t, pthread_attr_default, task, NULL );
13981         if( status ) return errno;
13982
13983         /* give thread a chance to complete */
13984         /* it should remain joinable and hence detachable */
13985         sleep( 1 );
13986
13987         status = pthread_detach( &t );
13988         if( status ) return errno;
13989 #endif
13990
13991 #ifdef HAVE_LINUX_THREADS
13992         pthread_kill_other_threads_np();
13993 #endif
13994
13995         return 0;
13996
13997 ; return 0; }
13998 EOF
13999 if { (eval echo configure:14000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14000   rm -rf conftest*
14001   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14002 else
14003   echo "configure: failed program was:" >&5
14004   cat conftest.$ac_ext >&5
14005   rm -rf conftest*
14006   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14007 fi
14008 rm -f conftest*
14009 else
14010   cat > conftest.$ac_ext <<EOF
14011 #line 14012 "configure"
14012 #include "confdefs.h"
14013 /* pthread test headers */
14014 #include <pthread.h>
14015 #if HAVE_PTHREADS < 7
14016 #include <errno.h>
14017 #endif
14018 #ifndef NULL
14019 #define NULL (void*)0
14020 #endif
14021
14022 static void *task(p)
14023         void *p;
14024 {
14025         return (void *) (p == NULL);
14026 }
14027
14028
14029 int main(argc, argv)
14030         int argc;
14031         char **argv;
14032 {
14033
14034         /* pthread test function */
14035 #ifndef PTHREAD_CREATE_DETACHED
14036 #define PTHREAD_CREATE_DETACHED 1
14037 #endif
14038         pthread_t t;
14039         int status;
14040         int detach = PTHREAD_CREATE_DETACHED;
14041
14042 #if HAVE_PTHREADS > 4
14043         /* Final pthreads */
14044         pthread_attr_t attr;
14045
14046         status = pthread_attr_init(&attr);
14047         if( status ) return status;
14048
14049 #if HAVE_PTHREADS < 7
14050         status = pthread_attr_setdetachstate(&attr, &detach);
14051         if( status < 0 ) status = errno;
14052 #else
14053         status = pthread_attr_setdetachstate(&attr, detach);
14054 #endif
14055         if( status ) return status;
14056         status = pthread_create( &t, &attr, task, NULL );
14057 #if HAVE_PTHREADS < 7
14058         if( status < 0 ) status = errno;
14059 #endif
14060         if( status ) return status;
14061 #else
14062         /* Draft 4 pthreads */
14063         status = pthread_create( &t, pthread_attr_default, task, NULL );
14064         if( status ) return errno;
14065
14066         /* give thread a chance to complete */
14067         /* it should remain joinable and hence detachable */
14068         sleep( 1 );
14069
14070         status = pthread_detach( &t );
14071         if( status ) return errno;
14072 #endif
14073
14074 #ifdef HAVE_LINUX_THREADS
14075         pthread_kill_other_threads_np();
14076 #endif
14077
14078         return 0;
14079
14080 }
14081
14082 EOF
14083 if { (eval echo configure:14084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14084 then
14085   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14086 else
14087   echo "configure: failed program was:" >&5
14088   cat conftest.$ac_ext >&5
14089   rm -fr conftest*
14090   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14091 fi
14092 rm -fr conftest*
14093 fi
14094
14095
14096                 # restore the LIBS
14097                 LIBS="$ol_LIBS"
14098         
14099 fi
14100
14101 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14102
14103         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14104                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14105                 ol_link_threads=posix
14106         fi
14107 fi
14108
14109                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14110 if test "$ol_link_threads" = no ; then
14111         # try -lpthreads -lmach -lexc
14112         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14113 echo "configure:14114: checking for pthread link with -lpthreads -lmach -lexc" >&5
14114 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14115   echo $ac_n "(cached) $ac_c" 1>&6
14116 else
14117   
14118                 # save the flags
14119                 ol_LIBS="$LIBS"
14120                 LIBS="-lpthreads -lmach -lexc $LIBS"
14121
14122                 if test "$cross_compiling" = yes; then
14123   cat > conftest.$ac_ext <<EOF
14124 #line 14125 "configure"
14125 #include "confdefs.h"
14126 /* pthread test headers */
14127 #include <pthread.h>
14128 #if HAVE_PTHREADS < 7
14129 #include <errno.h>
14130 #endif
14131 #ifndef NULL
14132 #define NULL (void*)0
14133 #endif
14134
14135 static void *task(p)
14136         void *p;
14137 {
14138         return (void *) (p == NULL);
14139 }
14140
14141 int main() {
14142
14143         /* pthread test function */
14144 #ifndef PTHREAD_CREATE_DETACHED
14145 #define PTHREAD_CREATE_DETACHED 1
14146 #endif
14147         pthread_t t;
14148         int status;
14149         int detach = PTHREAD_CREATE_DETACHED;
14150
14151 #if HAVE_PTHREADS > 4
14152         /* Final pthreads */
14153         pthread_attr_t attr;
14154
14155         status = pthread_attr_init(&attr);
14156         if( status ) return status;
14157
14158 #if HAVE_PTHREADS < 7
14159         status = pthread_attr_setdetachstate(&attr, &detach);
14160         if( status < 0 ) status = errno;
14161 #else
14162         status = pthread_attr_setdetachstate(&attr, detach);
14163 #endif
14164         if( status ) return status;
14165         status = pthread_create( &t, &attr, task, NULL );
14166 #if HAVE_PTHREADS < 7
14167         if( status < 0 ) status = errno;
14168 #endif
14169         if( status ) return status;
14170 #else
14171         /* Draft 4 pthreads */
14172         status = pthread_create( &t, pthread_attr_default, task, NULL );
14173         if( status ) return errno;
14174
14175         /* give thread a chance to complete */
14176         /* it should remain joinable and hence detachable */
14177         sleep( 1 );
14178
14179         status = pthread_detach( &t );
14180         if( status ) return errno;
14181 #endif
14182
14183 #ifdef HAVE_LINUX_THREADS
14184         pthread_kill_other_threads_np();
14185 #endif
14186
14187         return 0;
14188
14189 ; return 0; }
14190 EOF
14191 if { (eval echo configure:14192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14192   rm -rf conftest*
14193   ol_cv_pthread_lpthreads_lmach_lexc=yes
14194 else
14195   echo "configure: failed program was:" >&5
14196   cat conftest.$ac_ext >&5
14197   rm -rf conftest*
14198   ol_cv_pthread_lpthreads_lmach_lexc=no
14199 fi
14200 rm -f conftest*
14201 else
14202   cat > conftest.$ac_ext <<EOF
14203 #line 14204 "configure"
14204 #include "confdefs.h"
14205 /* pthread test headers */
14206 #include <pthread.h>
14207 #if HAVE_PTHREADS < 7
14208 #include <errno.h>
14209 #endif
14210 #ifndef NULL
14211 #define NULL (void*)0
14212 #endif
14213
14214 static void *task(p)
14215         void *p;
14216 {
14217         return (void *) (p == NULL);
14218 }
14219
14220
14221 int main(argc, argv)
14222         int argc;
14223         char **argv;
14224 {
14225
14226         /* pthread test function */
14227 #ifndef PTHREAD_CREATE_DETACHED
14228 #define PTHREAD_CREATE_DETACHED 1
14229 #endif
14230         pthread_t t;
14231         int status;
14232         int detach = PTHREAD_CREATE_DETACHED;
14233
14234 #if HAVE_PTHREADS > 4
14235         /* Final pthreads */
14236         pthread_attr_t attr;
14237
14238         status = pthread_attr_init(&attr);
14239         if( status ) return status;
14240
14241 #if HAVE_PTHREADS < 7
14242         status = pthread_attr_setdetachstate(&attr, &detach);
14243         if( status < 0 ) status = errno;
14244 #else
14245         status = pthread_attr_setdetachstate(&attr, detach);
14246 #endif
14247         if( status ) return status;
14248         status = pthread_create( &t, &attr, task, NULL );
14249 #if HAVE_PTHREADS < 7
14250         if( status < 0 ) status = errno;
14251 #endif
14252         if( status ) return status;
14253 #else
14254         /* Draft 4 pthreads */
14255         status = pthread_create( &t, pthread_attr_default, task, NULL );
14256         if( status ) return errno;
14257
14258         /* give thread a chance to complete */
14259         /* it should remain joinable and hence detachable */
14260         sleep( 1 );
14261
14262         status = pthread_detach( &t );
14263         if( status ) return errno;
14264 #endif
14265
14266 #ifdef HAVE_LINUX_THREADS
14267         pthread_kill_other_threads_np();
14268 #endif
14269
14270         return 0;
14271
14272 }
14273
14274 EOF
14275 if { (eval echo configure:14276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14276 then
14277   ol_cv_pthread_lpthreads_lmach_lexc=yes
14278 else
14279   echo "configure: failed program was:" >&5
14280   cat conftest.$ac_ext >&5
14281   rm -fr conftest*
14282   ol_cv_pthread_lpthreads_lmach_lexc=no
14283 fi
14284 rm -fr conftest*
14285 fi
14286
14287
14288                 # restore the LIBS
14289                 LIBS="$ol_LIBS"
14290         
14291 fi
14292
14293 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14294
14295         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14296                 ol_link_pthreads="-lpthreads -lmach -lexc"
14297                 ol_link_threads=posix
14298         fi
14299 fi
14300
14301                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14302 if test "$ol_link_threads" = no ; then
14303         # try -lpthreads -lexc
14304         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14305 echo "configure:14306: checking for pthread link with -lpthreads -lexc" >&5
14306 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14307   echo $ac_n "(cached) $ac_c" 1>&6
14308 else
14309   
14310                 # save the flags
14311                 ol_LIBS="$LIBS"
14312                 LIBS="-lpthreads -lexc $LIBS"
14313
14314                 if test "$cross_compiling" = yes; then
14315   cat > conftest.$ac_ext <<EOF
14316 #line 14317 "configure"
14317 #include "confdefs.h"
14318 /* pthread test headers */
14319 #include <pthread.h>
14320 #if HAVE_PTHREADS < 7
14321 #include <errno.h>
14322 #endif
14323 #ifndef NULL
14324 #define NULL (void*)0
14325 #endif
14326
14327 static void *task(p)
14328         void *p;
14329 {
14330         return (void *) (p == NULL);
14331 }
14332
14333 int main() {
14334
14335         /* pthread test function */
14336 #ifndef PTHREAD_CREATE_DETACHED
14337 #define PTHREAD_CREATE_DETACHED 1
14338 #endif
14339         pthread_t t;
14340         int status;
14341         int detach = PTHREAD_CREATE_DETACHED;
14342
14343 #if HAVE_PTHREADS > 4
14344         /* Final pthreads */
14345         pthread_attr_t attr;
14346
14347         status = pthread_attr_init(&attr);
14348         if( status ) return status;
14349
14350 #if HAVE_PTHREADS < 7
14351         status = pthread_attr_setdetachstate(&attr, &detach);
14352         if( status < 0 ) status = errno;
14353 #else
14354         status = pthread_attr_setdetachstate(&attr, detach);
14355 #endif
14356         if( status ) return status;
14357         status = pthread_create( &t, &attr, task, NULL );
14358 #if HAVE_PTHREADS < 7
14359         if( status < 0 ) status = errno;
14360 #endif
14361         if( status ) return status;
14362 #else
14363         /* Draft 4 pthreads */
14364         status = pthread_create( &t, pthread_attr_default, task, NULL );
14365         if( status ) return errno;
14366
14367         /* give thread a chance to complete */
14368         /* it should remain joinable and hence detachable */
14369         sleep( 1 );
14370
14371         status = pthread_detach( &t );
14372         if( status ) return errno;
14373 #endif
14374
14375 #ifdef HAVE_LINUX_THREADS
14376         pthread_kill_other_threads_np();
14377 #endif
14378
14379         return 0;
14380
14381 ; return 0; }
14382 EOF
14383 if { (eval echo configure:14384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14384   rm -rf conftest*
14385   ol_cv_pthread_lpthreads_lexc=yes
14386 else
14387   echo "configure: failed program was:" >&5
14388   cat conftest.$ac_ext >&5
14389   rm -rf conftest*
14390   ol_cv_pthread_lpthreads_lexc=no
14391 fi
14392 rm -f conftest*
14393 else
14394   cat > conftest.$ac_ext <<EOF
14395 #line 14396 "configure"
14396 #include "confdefs.h"
14397 /* pthread test headers */
14398 #include <pthread.h>
14399 #if HAVE_PTHREADS < 7
14400 #include <errno.h>
14401 #endif
14402 #ifndef NULL
14403 #define NULL (void*)0
14404 #endif
14405
14406 static void *task(p)
14407         void *p;
14408 {
14409         return (void *) (p == NULL);
14410 }
14411
14412
14413 int main(argc, argv)
14414         int argc;
14415         char **argv;
14416 {
14417
14418         /* pthread test function */
14419 #ifndef PTHREAD_CREATE_DETACHED
14420 #define PTHREAD_CREATE_DETACHED 1
14421 #endif
14422         pthread_t t;
14423         int status;
14424         int detach = PTHREAD_CREATE_DETACHED;
14425
14426 #if HAVE_PTHREADS > 4
14427         /* Final pthreads */
14428         pthread_attr_t attr;
14429
14430         status = pthread_attr_init(&attr);
14431         if( status ) return status;
14432
14433 #if HAVE_PTHREADS < 7
14434         status = pthread_attr_setdetachstate(&attr, &detach);
14435         if( status < 0 ) status = errno;
14436 #else
14437         status = pthread_attr_setdetachstate(&attr, detach);
14438 #endif
14439         if( status ) return status;
14440         status = pthread_create( &t, &attr, task, NULL );
14441 #if HAVE_PTHREADS < 7
14442         if( status < 0 ) status = errno;
14443 #endif
14444         if( status ) return status;
14445 #else
14446         /* Draft 4 pthreads */
14447         status = pthread_create( &t, pthread_attr_default, task, NULL );
14448         if( status ) return errno;
14449
14450         /* give thread a chance to complete */
14451         /* it should remain joinable and hence detachable */
14452         sleep( 1 );
14453
14454         status = pthread_detach( &t );
14455         if( status ) return errno;
14456 #endif
14457
14458 #ifdef HAVE_LINUX_THREADS
14459         pthread_kill_other_threads_np();
14460 #endif
14461
14462         return 0;
14463
14464 }
14465
14466 EOF
14467 if { (eval echo configure:14468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14468 then
14469   ol_cv_pthread_lpthreads_lexc=yes
14470 else
14471   echo "configure: failed program was:" >&5
14472   cat conftest.$ac_ext >&5
14473   rm -fr conftest*
14474   ol_cv_pthread_lpthreads_lexc=no
14475 fi
14476 rm -fr conftest*
14477 fi
14478
14479
14480                 # restore the LIBS
14481                 LIBS="$ol_LIBS"
14482         
14483 fi
14484
14485 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14486
14487         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14488                 ol_link_pthreads="-lpthreads -lexc"
14489                 ol_link_threads=posix
14490         fi
14491 fi
14492
14493
14494                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14495 if test "$ol_link_threads" = no ; then
14496         # try -lpthreads
14497         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14498 echo "configure:14499: checking for pthread link with -lpthreads" >&5
14499 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14500   echo $ac_n "(cached) $ac_c" 1>&6
14501 else
14502   
14503                 # save the flags
14504                 ol_LIBS="$LIBS"
14505                 LIBS="-lpthreads $LIBS"
14506
14507                 if test "$cross_compiling" = yes; then
14508   cat > conftest.$ac_ext <<EOF
14509 #line 14510 "configure"
14510 #include "confdefs.h"
14511 /* pthread test headers */
14512 #include <pthread.h>
14513 #if HAVE_PTHREADS < 7
14514 #include <errno.h>
14515 #endif
14516 #ifndef NULL
14517 #define NULL (void*)0
14518 #endif
14519
14520 static void *task(p)
14521         void *p;
14522 {
14523         return (void *) (p == NULL);
14524 }
14525
14526 int main() {
14527
14528         /* pthread test function */
14529 #ifndef PTHREAD_CREATE_DETACHED
14530 #define PTHREAD_CREATE_DETACHED 1
14531 #endif
14532         pthread_t t;
14533         int status;
14534         int detach = PTHREAD_CREATE_DETACHED;
14535
14536 #if HAVE_PTHREADS > 4
14537         /* Final pthreads */
14538         pthread_attr_t attr;
14539
14540         status = pthread_attr_init(&attr);
14541         if( status ) return status;
14542
14543 #if HAVE_PTHREADS < 7
14544         status = pthread_attr_setdetachstate(&attr, &detach);
14545         if( status < 0 ) status = errno;
14546 #else
14547         status = pthread_attr_setdetachstate(&attr, detach);
14548 #endif
14549         if( status ) return status;
14550         status = pthread_create( &t, &attr, task, NULL );
14551 #if HAVE_PTHREADS < 7
14552         if( status < 0 ) status = errno;
14553 #endif
14554         if( status ) return status;
14555 #else
14556         /* Draft 4 pthreads */
14557         status = pthread_create( &t, pthread_attr_default, task, NULL );
14558         if( status ) return errno;
14559
14560         /* give thread a chance to complete */
14561         /* it should remain joinable and hence detachable */
14562         sleep( 1 );
14563
14564         status = pthread_detach( &t );
14565         if( status ) return errno;
14566 #endif
14567
14568 #ifdef HAVE_LINUX_THREADS
14569         pthread_kill_other_threads_np();
14570 #endif
14571
14572         return 0;
14573
14574 ; return 0; }
14575 EOF
14576 if { (eval echo configure:14577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14577   rm -rf conftest*
14578   ol_cv_pthread_lib_lpthreads=yes
14579 else
14580   echo "configure: failed program was:" >&5
14581   cat conftest.$ac_ext >&5
14582   rm -rf conftest*
14583   ol_cv_pthread_lib_lpthreads=no
14584 fi
14585 rm -f conftest*
14586 else
14587   cat > conftest.$ac_ext <<EOF
14588 #line 14589 "configure"
14589 #include "confdefs.h"
14590 /* pthread test headers */
14591 #include <pthread.h>
14592 #if HAVE_PTHREADS < 7
14593 #include <errno.h>
14594 #endif
14595 #ifndef NULL
14596 #define NULL (void*)0
14597 #endif
14598
14599 static void *task(p)
14600         void *p;
14601 {
14602         return (void *) (p == NULL);
14603 }
14604
14605
14606 int main(argc, argv)
14607         int argc;
14608         char **argv;
14609 {
14610
14611         /* pthread test function */
14612 #ifndef PTHREAD_CREATE_DETACHED
14613 #define PTHREAD_CREATE_DETACHED 1
14614 #endif
14615         pthread_t t;
14616         int status;
14617         int detach = PTHREAD_CREATE_DETACHED;
14618
14619 #if HAVE_PTHREADS > 4
14620         /* Final pthreads */
14621         pthread_attr_t attr;
14622
14623         status = pthread_attr_init(&attr);
14624         if( status ) return status;
14625
14626 #if HAVE_PTHREADS < 7
14627         status = pthread_attr_setdetachstate(&attr, &detach);
14628         if( status < 0 ) status = errno;
14629 #else
14630         status = pthread_attr_setdetachstate(&attr, detach);
14631 #endif
14632         if( status ) return status;
14633         status = pthread_create( &t, &attr, task, NULL );
14634 #if HAVE_PTHREADS < 7
14635         if( status < 0 ) status = errno;
14636 #endif
14637         if( status ) return status;
14638 #else
14639         /* Draft 4 pthreads */
14640         status = pthread_create( &t, pthread_attr_default, task, NULL );
14641         if( status ) return errno;
14642
14643         /* give thread a chance to complete */
14644         /* it should remain joinable and hence detachable */
14645         sleep( 1 );
14646
14647         status = pthread_detach( &t );
14648         if( status ) return errno;
14649 #endif
14650
14651 #ifdef HAVE_LINUX_THREADS
14652         pthread_kill_other_threads_np();
14653 #endif
14654
14655         return 0;
14656
14657 }
14658
14659 EOF
14660 if { (eval echo configure:14661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14661 then
14662   ol_cv_pthread_lib_lpthreads=yes
14663 else
14664   echo "configure: failed program was:" >&5
14665   cat conftest.$ac_ext >&5
14666   rm -fr conftest*
14667   ol_cv_pthread_lib_lpthreads=no
14668 fi
14669 rm -fr conftest*
14670 fi
14671
14672
14673                 # restore the LIBS
14674                 LIBS="$ol_LIBS"
14675         
14676 fi
14677
14678 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14679
14680         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14681                 ol_link_pthreads="-lpthreads"
14682                 ol_link_threads=posix
14683         fi
14684 fi
14685
14686
14687                 if test $ol_link_threads != no ; then
14688                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14689
14690                                                 save_CPPFLAGS="$CPPFLAGS"
14691                         save_LIBS="$LIBS"
14692                         LIBS="$LTHREAD_LIBS $LIBS"
14693
14694                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14695 do
14696 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14697 echo "configure:14698: checking for $ac_func" >&5
14698 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14699   echo $ac_n "(cached) $ac_c" 1>&6
14700 else
14701   cat > conftest.$ac_ext <<EOF
14702 #line 14703 "configure"
14703 #include "confdefs.h"
14704 /* System header to define __stub macros and hopefully few prototypes,
14705     which can conflict with char $ac_func(); below.  */
14706 #include <assert.h>
14707 /* Override any gcc2 internal prototype to avoid an error.  */
14708 /* We use char because int might match the return type of a gcc2
14709     builtin and then its argument prototype would still apply.  */
14710 char $ac_func();
14711 char (*f)();
14712
14713 int main() {
14714
14715 /* The GNU C library defines this for functions which it implements
14716     to always fail with ENOSYS.  Some functions are actually named
14717     something starting with __ and the normal name is an alias.  */
14718 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14719 choke me
14720 #else
14721 f = $ac_func;
14722 #endif
14723
14724 ; return 0; }
14725 EOF
14726 if { (eval echo configure:14727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14727   rm -rf conftest*
14728   eval "ac_cv_func_$ac_func=yes"
14729 else
14730   echo "configure: failed program was:" >&5
14731   cat conftest.$ac_ext >&5
14732   rm -rf conftest*
14733   eval "ac_cv_func_$ac_func=no"
14734 fi
14735 rm -f conftest*
14736 fi
14737
14738 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14739   echo "$ac_t""yes" 1>&6
14740     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14741   cat >> confdefs.h <<EOF
14742 #define $ac_tr_func 1
14743 EOF
14744  
14745 else
14746   echo "$ac_t""no" 1>&6
14747 fi
14748 done
14749
14750
14751                         if test $ac_cv_func_sched_yield = no -a \
14752                                 $ac_cv_func_pthread_yield = no -a \
14753                                 $ac_cv_func_thr_yield = no ; then
14754                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14755 echo "configure:14756: checking for sched_yield in -lrt" >&5
14756 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14757 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14758   echo $ac_n "(cached) $ac_c" 1>&6
14759 else
14760   ac_save_LIBS="$LIBS"
14761 LIBS="-lrt  $LIBS"
14762 cat > conftest.$ac_ext <<EOF
14763 #line 14764 "configure"
14764 #include "confdefs.h"
14765 /* Override any gcc2 internal prototype to avoid an error.  */
14766 /* We use char because int might match the return type of a gcc2
14767     builtin and then its argument prototype would still apply.  */
14768 char sched_yield();
14769
14770 int main() {
14771 sched_yield()
14772 ; return 0; }
14773 EOF
14774 if { (eval echo configure:14775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14775   rm -rf conftest*
14776   eval "ac_cv_lib_$ac_lib_var=yes"
14777 else
14778   echo "configure: failed program was:" >&5
14779   cat conftest.$ac_ext >&5
14780   rm -rf conftest*
14781   eval "ac_cv_lib_$ac_lib_var=no"
14782 fi
14783 rm -f conftest*
14784 LIBS="$ac_save_LIBS"
14785
14786 fi
14787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14788   echo "$ac_t""yes" 1>&6
14789   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14790                                         cat >> confdefs.h <<\EOF
14791 #define HAVE_SCHED_YIELD 1
14792 EOF
14793
14794                                         ac_cv_func_sched_yield=yes
14795 else
14796   echo "$ac_t""no" 1>&6
14797 ac_cv_func_sched_yield=no
14798 fi
14799
14800                         fi
14801                         if test $ac_cv_func_sched_yield = no -a \
14802                                 $ac_cv_func_pthread_yield = no -a \
14803                                 "$ac_cv_func_thr_yield" = no ; then
14804                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14805                         fi
14806
14807                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14808 do
14809 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14810 echo "configure:14811: checking for $ac_func" >&5
14811 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14812   echo $ac_n "(cached) $ac_c" 1>&6
14813 else
14814   cat > conftest.$ac_ext <<EOF
14815 #line 14816 "configure"
14816 #include "confdefs.h"
14817 /* System header to define __stub macros and hopefully few prototypes,
14818     which can conflict with char $ac_func(); below.  */
14819 #include <assert.h>
14820 /* Override any gcc2 internal prototype to avoid an error.  */
14821 /* We use char because int might match the return type of a gcc2
14822     builtin and then its argument prototype would still apply.  */
14823 char $ac_func();
14824 char (*f)();
14825
14826 int main() {
14827
14828 /* The GNU C library defines this for functions which it implements
14829     to always fail with ENOSYS.  Some functions are actually named
14830     something starting with __ and the normal name is an alias.  */
14831 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14832 choke me
14833 #else
14834 f = $ac_func;
14835 #endif
14836
14837 ; return 0; }
14838 EOF
14839 if { (eval echo configure:14840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14840   rm -rf conftest*
14841   eval "ac_cv_func_$ac_func=yes"
14842 else
14843   echo "configure: failed program was:" >&5
14844   cat conftest.$ac_ext >&5
14845   rm -rf conftest*
14846   eval "ac_cv_func_$ac_func=no"
14847 fi
14848 rm -f conftest*
14849 fi
14850
14851 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14852   echo "$ac_t""yes" 1>&6
14853     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14854   cat >> confdefs.h <<EOF
14855 #define $ac_tr_func 1
14856 EOF
14857  
14858 else
14859   echo "$ac_t""no" 1>&6
14860 fi
14861 done
14862
14863
14864                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14865 echo "configure:14866: checking for pthread_detach with <pthread.h>" >&5
14866 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14867   echo $ac_n "(cached) $ac_c" 1>&6
14868 else
14869   
14870                                                                 cat > conftest.$ac_ext <<EOF
14871 #line 14872 "configure"
14872 #include "confdefs.h"
14873
14874 #include <pthread.h>
14875 #ifndef NULL
14876 #define NULL (void*)0
14877 #endif
14878
14879 int main() {
14880 pthread_detach(NULL);
14881 ; return 0; }
14882 EOF
14883 if { (eval echo configure:14884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14884   rm -rf conftest*
14885   ol_cv_func_pthread_detach=yes
14886 else
14887   echo "configure: failed program was:" >&5
14888   cat conftest.$ac_ext >&5
14889   rm -rf conftest*
14890   ol_cv_func_pthread_detach=no
14891 fi
14892 rm -f conftest*
14893                         
14894 fi
14895
14896 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14897
14898                         if test $ol_cv_func_pthread_detach = no ; then
14899                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14900                         fi
14901
14902                         cat >> confdefs.h <<\EOF
14903 #define HAVE_PTHREAD_DETACH 1
14904 EOF
14905
14906
14907                                                 for ac_func in \
14908                                 pthread_setconcurrency \
14909                                 pthread_getconcurrency \
14910                                 thr_setconcurrency \
14911                                 thr_getconcurrency \
14912                         
14913 do
14914 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14915 echo "configure:14916: checking for $ac_func" >&5
14916 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14917   echo $ac_n "(cached) $ac_c" 1>&6
14918 else
14919   cat > conftest.$ac_ext <<EOF
14920 #line 14921 "configure"
14921 #include "confdefs.h"
14922 /* System header to define __stub macros and hopefully few prototypes,
14923     which can conflict with char $ac_func(); below.  */
14924 #include <assert.h>
14925 /* Override any gcc2 internal prototype to avoid an error.  */
14926 /* We use char because int might match the return type of a gcc2
14927     builtin and then its argument prototype would still apply.  */
14928 char $ac_func();
14929 char (*f)();
14930
14931 int main() {
14932
14933 /* The GNU C library defines this for functions which it implements
14934     to always fail with ENOSYS.  Some functions are actually named
14935     something starting with __ and the normal name is an alias.  */
14936 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14937 choke me
14938 #else
14939 f = $ac_func;
14940 #endif
14941
14942 ; return 0; }
14943 EOF
14944 if { (eval echo configure:14945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14945   rm -rf conftest*
14946   eval "ac_cv_func_$ac_func=yes"
14947 else
14948   echo "configure: failed program was:" >&5
14949   cat conftest.$ac_ext >&5
14950   rm -rf conftest*
14951   eval "ac_cv_func_$ac_func=no"
14952 fi
14953 rm -f conftest*
14954 fi
14955
14956 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14957   echo "$ac_t""yes" 1>&6
14958     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14959   cat >> confdefs.h <<EOF
14960 #define $ac_tr_func 1
14961 EOF
14962  
14963 else
14964   echo "$ac_t""no" 1>&6
14965 fi
14966 done
14967
14968
14969                         
14970         for ac_func in pthread_kill_other_threads_np
14971 do
14972 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14973 echo "configure:14974: checking for $ac_func" >&5
14974 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14975   echo $ac_n "(cached) $ac_c" 1>&6
14976 else
14977   cat > conftest.$ac_ext <<EOF
14978 #line 14979 "configure"
14979 #include "confdefs.h"
14980 /* System header to define __stub macros and hopefully few prototypes,
14981     which can conflict with char $ac_func(); below.  */
14982 #include <assert.h>
14983 /* Override any gcc2 internal prototype to avoid an error.  */
14984 /* We use char because int might match the return type of a gcc2
14985     builtin and then its argument prototype would still apply.  */
14986 char $ac_func();
14987 char (*f)();
14988
14989 int main() {
14990
14991 /* The GNU C library defines this for functions which it implements
14992     to always fail with ENOSYS.  Some functions are actually named
14993     something starting with __ and the normal name is an alias.  */
14994 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14995 choke me
14996 #else
14997 f = $ac_func;
14998 #endif
14999
15000 ; return 0; }
15001 EOF
15002 if { (eval echo configure:15003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15003   rm -rf conftest*
15004   eval "ac_cv_func_$ac_func=yes"
15005 else
15006   echo "configure: failed program was:" >&5
15007   cat conftest.$ac_ext >&5
15008   rm -rf conftest*
15009   eval "ac_cv_func_$ac_func=no"
15010 fi
15011 rm -f conftest*
15012 fi
15013
15014 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15015   echo "$ac_t""yes" 1>&6
15016     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15017   cat >> confdefs.h <<EOF
15018 #define $ac_tr_func 1
15019 EOF
15020  
15021 else
15022   echo "$ac_t""no" 1>&6
15023 fi
15024 done
15025
15026         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15027 echo "configure:15028: checking for LinuxThreads implementation" >&5
15028 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15029   echo $ac_n "(cached) $ac_c" 1>&6
15030 else
15031   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15032 fi
15033
15034 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15035
15036                         
15037         
15038         
15039         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15040 echo "configure:15041: checking for LinuxThreads consistency" >&5
15041 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15042   echo $ac_n "(cached) $ac_c" 1>&6
15043 else
15044   
15045                 if test $ol_cv_header_linux_threads = yes -a \
15046                         $ol_cv_sys_linux_threads = yes; then
15047                         ol_cv_linux_threads=yes
15048                 elif test $ol_cv_header_linux_threads = no -a \
15049                         $ol_cv_sys_linux_threads = no; then
15050                         ol_cv_linux_threads=no
15051                 else
15052                         ol_cv_linux_threads=error
15053                 fi
15054         
15055 fi
15056
15057 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15058
15059
15060                         if test $ol_cv_linux_threads = error; then
15061                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15062                         fi
15063
15064                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15065 echo "configure:15066: checking if pthread_create() works" >&5
15066 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15067   echo $ac_n "(cached) $ac_c" 1>&6
15068 else
15069   
15070                         if test "$cross_compiling" = yes; then
15071                                 ol_cv_pthread_create_works=yes
15072 else
15073   cat > conftest.$ac_ext <<EOF
15074 #line 15075 "configure"
15075 #include "confdefs.h"
15076 /* pthread test headers */
15077 #include <pthread.h>
15078 #if HAVE_PTHREADS < 7
15079 #include <errno.h>
15080 #endif
15081 #ifndef NULL
15082 #define NULL (void*)0
15083 #endif
15084
15085 static void *task(p)
15086         void *p;
15087 {
15088         return (void *) (p == NULL);
15089 }
15090
15091
15092 int main(argc, argv)
15093         int argc;
15094         char **argv;
15095 {
15096
15097         /* pthread test function */
15098 #ifndef PTHREAD_CREATE_DETACHED
15099 #define PTHREAD_CREATE_DETACHED 1
15100 #endif
15101         pthread_t t;
15102         int status;
15103         int detach = PTHREAD_CREATE_DETACHED;
15104
15105 #if HAVE_PTHREADS > 4
15106         /* Final pthreads */
15107         pthread_attr_t attr;
15108
15109         status = pthread_attr_init(&attr);
15110         if( status ) return status;
15111
15112 #if HAVE_PTHREADS < 7
15113         status = pthread_attr_setdetachstate(&attr, &detach);
15114         if( status < 0 ) status = errno;
15115 #else
15116         status = pthread_attr_setdetachstate(&attr, detach);
15117 #endif
15118         if( status ) return status;
15119         status = pthread_create( &t, &attr, task, NULL );
15120 #if HAVE_PTHREADS < 7
15121         if( status < 0 ) status = errno;
15122 #endif
15123         if( status ) return status;
15124 #else
15125         /* Draft 4 pthreads */
15126         status = pthread_create( &t, pthread_attr_default, task, NULL );
15127         if( status ) return errno;
15128
15129         /* give thread a chance to complete */
15130         /* it should remain joinable and hence detachable */
15131         sleep( 1 );
15132
15133         status = pthread_detach( &t );
15134         if( status ) return errno;
15135 #endif
15136
15137 #ifdef HAVE_LINUX_THREADS
15138         pthread_kill_other_threads_np();
15139 #endif
15140
15141         return 0;
15142
15143 }
15144
15145 EOF
15146 if { (eval echo configure:15147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15147 then
15148   ol_cv_pthread_create_works=yes
15149 else
15150   echo "configure: failed program was:" >&5
15151   cat conftest.$ac_ext >&5
15152   rm -fr conftest*
15153   ol_cv_pthread_create_works=no
15154 fi
15155 rm -fr conftest*
15156 fi
15157
15158 fi
15159
15160 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15161
15162                         if test $ol_cv_pthread_create_works = no ; then
15163                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15164                         fi
15165
15166                                                 if test $ol_with_yielding_select = auto ; then
15167                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15168 echo "configure:15169: checking if select yields when using pthreads" >&5
15169 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15170   echo $ac_n "(cached) $ac_c" 1>&6
15171 else
15172   
15173                                 if test "$cross_compiling" = yes; then
15174   ol_cv_pthread_select_yields=cross
15175 else
15176   cat > conftest.$ac_ext <<EOF
15177 #line 15178 "configure"
15178 #include "confdefs.h"
15179
15180 #include <sys/types.h>
15181 #include <sys/time.h>
15182 #include <unistd.h>
15183 #include <pthread.h>
15184 #ifndef NULL
15185 #define NULL (void*) 0
15186 #endif
15187
15188 static int fildes[2];
15189
15190 static void *task(p)
15191         void *p;
15192 {
15193         int i;
15194         struct timeval tv;
15195
15196         fd_set rfds;
15197
15198         tv.tv_sec=10;
15199         tv.tv_usec=0;
15200
15201         FD_ZERO(&rfds);
15202         FD_SET(fildes[0], &rfds);
15203
15204         /* we're not interested in any fds */
15205         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15206
15207         if(i < 0) {
15208                 perror("select");
15209                 exit(10);
15210         }
15211
15212         exit(0); /* if we exit here, the select blocked the whole process */
15213 }
15214
15215 int main(argc, argv)
15216         int argc;
15217         char **argv;
15218 {
15219         pthread_t t;
15220
15221         /* create a pipe to select */
15222         if(pipe(&fildes[0])) {
15223                 perror("select");
15224                 exit(1);
15225         }
15226
15227 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15228         (void) pthread_setconcurrency(2);
15229 #else
15230 #ifdef HAVE_THR_SETCONCURRENCY
15231         /* Set Solaris LWP concurrency to 2 */
15232         thr_setconcurrency(2);
15233 #endif
15234 #endif
15235
15236 #if HAVE_PTHREADS < 6
15237         pthread_create(&t, pthread_attr_default, task, NULL);
15238 #else
15239         pthread_create(&t, NULL, task, NULL);
15240 #endif
15241
15242         /* make sure task runs first */
15243 #if HAVE_THR_YIELD
15244         thr_yield();
15245 #elif defined( HAVE_SCHED_YIELD )
15246         sched_yield();
15247 #elif defined( HAVE_PTHREAD_YIELD )
15248         pthread_yield();
15249 #endif
15250
15251         exit(2);
15252 }
15253 EOF
15254 if { (eval echo configure:15255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15255 then
15256   ol_cv_pthread_select_yields=no
15257 else
15258   echo "configure: failed program was:" >&5
15259   cat conftest.$ac_ext >&5
15260   rm -fr conftest*
15261   ol_cv_pthread_select_yields=yes
15262 fi
15263 rm -fr conftest*
15264 fi
15265
15266 fi
15267
15268 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15269
15270                                 if test $ol_cv_pthread_select_yields = cross ; then
15271                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15272                                 fi
15273
15274                                 if test $ol_cv_pthread_select_yields = yes ; then
15275                                         ol_with_yielding_select=yes
15276                                 fi
15277                         fi
15278
15279                                                 CPPFLAGS="$save_CPPFLAGS"
15280                         LIBS="$save_LIBS"
15281                 else
15282                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15283                 fi
15284         fi
15285
15286         if test $ol_with_threads = posix ; then
15287                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15288         fi
15289 fi
15290
15291 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15292         -o $ol_with_threads = mach ; then
15293
15294                 for ac_hdr in mach/cthreads.h cthreads.h
15295 do
15296 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15297 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15298 echo "configure:15299: checking for $ac_hdr" >&5
15299 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15300   echo $ac_n "(cached) $ac_c" 1>&6
15301 else
15302   cat > conftest.$ac_ext <<EOF
15303 #line 15304 "configure"
15304 #include "confdefs.h"
15305 #include <$ac_hdr>
15306 EOF
15307 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15308 { (eval echo configure:15309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15309 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15310 if test -z "$ac_err"; then
15311   rm -rf conftest*
15312   eval "ac_cv_header_$ac_safe=yes"
15313 else
15314   echo "$ac_err" >&5
15315   echo "configure: failed program was:" >&5
15316   cat conftest.$ac_ext >&5
15317   rm -rf conftest*
15318   eval "ac_cv_header_$ac_safe=no"
15319 fi
15320 rm -f conftest*
15321 fi
15322 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15323   echo "$ac_t""yes" 1>&6
15324     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15325   cat >> confdefs.h <<EOF
15326 #define $ac_tr_hdr 1
15327 EOF
15328  
15329 else
15330   echo "$ac_t""no" 1>&6
15331 fi
15332 done
15333
15334         if test $ac_cv_header_mach_cthreads_h = yes ; then
15335                 ol_with_threads=found
15336
15337                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15338 echo "configure:15339: checking for cthread_fork" >&5
15339 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15340   echo $ac_n "(cached) $ac_c" 1>&6
15341 else
15342   cat > conftest.$ac_ext <<EOF
15343 #line 15344 "configure"
15344 #include "confdefs.h"
15345 /* System header to define __stub macros and hopefully few prototypes,
15346     which can conflict with char cthread_fork(); below.  */
15347 #include <assert.h>
15348 /* Override any gcc2 internal prototype to avoid an error.  */
15349 /* We use char because int might match the return type of a gcc2
15350     builtin and then its argument prototype would still apply.  */
15351 char cthread_fork();
15352 char (*f)();
15353
15354 int main() {
15355
15356 /* The GNU C library defines this for functions which it implements
15357     to always fail with ENOSYS.  Some functions are actually named
15358     something starting with __ and the normal name is an alias.  */
15359 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15360 choke me
15361 #else
15362 f = cthread_fork;
15363 #endif
15364
15365 ; return 0; }
15366 EOF
15367 if { (eval echo configure:15368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15368   rm -rf conftest*
15369   eval "ac_cv_func_cthread_fork=yes"
15370 else
15371   echo "configure: failed program was:" >&5
15372   cat conftest.$ac_ext >&5
15373   rm -rf conftest*
15374   eval "ac_cv_func_cthread_fork=no"
15375 fi
15376 rm -f conftest*
15377 fi
15378
15379 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15380   echo "$ac_t""yes" 1>&6
15381   ol_link_threads=yes
15382 else
15383   echo "$ac_t""no" 1>&6
15384 fi
15385
15386
15387                 if test $ol_link_threads = no ; then
15388                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15389 echo "configure:15390: checking for cthread_fork with -all_load" >&5
15390 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15391   echo $ac_n "(cached) $ac_c" 1>&6
15392 else
15393   
15394                                                                 save_LIBS="$LIBS"
15395                                 LIBS="-all_load $LIBS"
15396                                 cat > conftest.$ac_ext <<EOF
15397 #line 15398 "configure"
15398 #include "confdefs.h"
15399 #include <mach/cthreads.h>
15400 int main() {
15401
15402                                         cthread_fork((void *)0, (void *)0);
15403                                         
15404 ; return 0; }
15405 EOF
15406 if { (eval echo configure:15407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15407   rm -rf conftest*
15408   ol_cv_cthread_all_load=yes
15409 else
15410   echo "configure: failed program was:" >&5
15411   cat conftest.$ac_ext >&5
15412   rm -rf conftest*
15413   ol_cv_cthread_all_load=no
15414 fi
15415 rm -f conftest*
15416                                                                 LIBS="$save_LIBS"
15417                         
15418 fi
15419
15420 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15421
15422                         if test $ol_cv_cthread_all_load = yes ; then
15423                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15424                                 ol_link_threads=mach
15425                                 ol_with_threads=found
15426                         fi
15427                 fi
15428
15429         elif test $ac_cv_header_cthreads_h = yes ; then
15430                                 
15431                 ol_with_threads=found
15432  
15433                                 save_LIBS="$LIBS"
15434                 LIBS="$LIBS -lthreads"
15435                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15436 echo "configure:15437: checking for cthread_fork" >&5
15437 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15438   echo $ac_n "(cached) $ac_c" 1>&6
15439 else
15440   cat > conftest.$ac_ext <<EOF
15441 #line 15442 "configure"
15442 #include "confdefs.h"
15443 /* System header to define __stub macros and hopefully few prototypes,
15444     which can conflict with char cthread_fork(); below.  */
15445 #include <assert.h>
15446 /* Override any gcc2 internal prototype to avoid an error.  */
15447 /* We use char because int might match the return type of a gcc2
15448     builtin and then its argument prototype would still apply.  */
15449 char cthread_fork();
15450 char (*f)();
15451
15452 int main() {
15453
15454 /* The GNU C library defines this for functions which it implements
15455     to always fail with ENOSYS.  Some functions are actually named
15456     something starting with __ and the normal name is an alias.  */
15457 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15458 choke me
15459 #else
15460 f = cthread_fork;
15461 #endif
15462
15463 ; return 0; }
15464 EOF
15465 if { (eval echo configure:15466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15466   rm -rf conftest*
15467   eval "ac_cv_func_cthread_fork=yes"
15468 else
15469   echo "configure: failed program was:" >&5
15470   cat conftest.$ac_ext >&5
15471   rm -rf conftest*
15472   eval "ac_cv_func_cthread_fork=no"
15473 fi
15474 rm -f conftest*
15475 fi
15476
15477 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15478   echo "$ac_t""yes" 1>&6
15479   ol_link_threads=yes
15480 else
15481   echo "$ac_t""no" 1>&6
15482 fi
15483
15484                 LIBS="$save_LIBS"
15485
15486                 if test $ol_link_threads = yes ; then
15487                         LTHREAD_LIBS="-lthreads"
15488                         ol_link_threads=mach
15489                         ol_with_threads=found
15490                 else
15491                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15492                 fi
15493
15494         elif test $ol_with_threads = mach ; then
15495                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15496         fi
15497
15498         if test $ol_link_threads = mach ; then
15499                 cat >> confdefs.h <<\EOF
15500 #define HAVE_MACH_CTHREADS 1
15501 EOF
15502
15503         elif test $ol_with_threads = found ; then
15504                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15505         fi
15506 fi
15507
15508 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15509         -o $ol_with_threads = pth ; then
15510
15511         for ac_hdr in pth.h
15512 do
15513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15515 echo "configure:15516: checking for $ac_hdr" >&5
15516 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15517   echo $ac_n "(cached) $ac_c" 1>&6
15518 else
15519   cat > conftest.$ac_ext <<EOF
15520 #line 15521 "configure"
15521 #include "confdefs.h"
15522 #include <$ac_hdr>
15523 EOF
15524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15525 { (eval echo configure:15526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15527 if test -z "$ac_err"; then
15528   rm -rf conftest*
15529   eval "ac_cv_header_$ac_safe=yes"
15530 else
15531   echo "$ac_err" >&5
15532   echo "configure: failed program was:" >&5
15533   cat conftest.$ac_ext >&5
15534   rm -rf conftest*
15535   eval "ac_cv_header_$ac_safe=no"
15536 fi
15537 rm -f conftest*
15538 fi
15539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15540   echo "$ac_t""yes" 1>&6
15541     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15542   cat >> confdefs.h <<EOF
15543 #define $ac_tr_hdr 1
15544 EOF
15545  
15546 else
15547   echo "$ac_t""no" 1>&6
15548 fi
15549 done
15550
15551
15552         if test $ac_cv_header_pth_h = yes ; then
15553                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15554 echo "configure:15555: checking for pth_version in -lpth" >&5
15555 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15556 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15557   echo $ac_n "(cached) $ac_c" 1>&6
15558 else
15559   ac_save_LIBS="$LIBS"
15560 LIBS="-lpth  $LIBS"
15561 cat > conftest.$ac_ext <<EOF
15562 #line 15563 "configure"
15563 #include "confdefs.h"
15564 /* Override any gcc2 internal prototype to avoid an error.  */
15565 /* We use char because int might match the return type of a gcc2
15566     builtin and then its argument prototype would still apply.  */
15567 char pth_version();
15568
15569 int main() {
15570 pth_version()
15571 ; return 0; }
15572 EOF
15573 if { (eval echo configure:15574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15574   rm -rf conftest*
15575   eval "ac_cv_lib_$ac_lib_var=yes"
15576 else
15577   echo "configure: failed program was:" >&5
15578   cat conftest.$ac_ext >&5
15579   rm -rf conftest*
15580   eval "ac_cv_lib_$ac_lib_var=no"
15581 fi
15582 rm -f conftest*
15583 LIBS="$ac_save_LIBS"
15584
15585 fi
15586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15587   echo "$ac_t""yes" 1>&6
15588   have_pth=yes
15589 else
15590   echo "$ac_t""no" 1>&6
15591 have_pth=no
15592 fi
15593
15594
15595                 if test $have_pth = yes ; then
15596                         cat >> confdefs.h <<\EOF
15597 #define HAVE_GNU_PTH 1
15598 EOF
15599
15600                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15601                         ol_link_threads=pth
15602                         ol_with_threads=found
15603
15604                         if test $ol_with_yielding_select = auto ; then
15605                                 ol_with_yielding_select=yes
15606                         fi
15607                 fi
15608         fi
15609 fi
15610
15611 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15612         -o $ol_with_threads = lwp ; then
15613
15614                 for ac_hdr in thread.h synch.h
15615 do
15616 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15617 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15618 echo "configure:15619: checking for $ac_hdr" >&5
15619 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15620   echo $ac_n "(cached) $ac_c" 1>&6
15621 else
15622   cat > conftest.$ac_ext <<EOF
15623 #line 15624 "configure"
15624 #include "confdefs.h"
15625 #include <$ac_hdr>
15626 EOF
15627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15628 { (eval echo configure:15629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15630 if test -z "$ac_err"; then
15631   rm -rf conftest*
15632   eval "ac_cv_header_$ac_safe=yes"
15633 else
15634   echo "$ac_err" >&5
15635   echo "configure: failed program was:" >&5
15636   cat conftest.$ac_ext >&5
15637   rm -rf conftest*
15638   eval "ac_cv_header_$ac_safe=no"
15639 fi
15640 rm -f conftest*
15641 fi
15642 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15643   echo "$ac_t""yes" 1>&6
15644     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15645   cat >> confdefs.h <<EOF
15646 #define $ac_tr_hdr 1
15647 EOF
15648  
15649 else
15650   echo "$ac_t""no" 1>&6
15651 fi
15652 done
15653
15654         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15655                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15656 echo "configure:15657: checking for thr_create in -lthread" >&5
15657 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15658 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15659   echo $ac_n "(cached) $ac_c" 1>&6
15660 else
15661   ac_save_LIBS="$LIBS"
15662 LIBS="-lthread  $LIBS"
15663 cat > conftest.$ac_ext <<EOF
15664 #line 15665 "configure"
15665 #include "confdefs.h"
15666 /* Override any gcc2 internal prototype to avoid an error.  */
15667 /* We use char because int might match the return type of a gcc2
15668     builtin and then its argument prototype would still apply.  */
15669 char thr_create();
15670
15671 int main() {
15672 thr_create()
15673 ; return 0; }
15674 EOF
15675 if { (eval echo configure:15676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15676   rm -rf conftest*
15677   eval "ac_cv_lib_$ac_lib_var=yes"
15678 else
15679   echo "configure: failed program was:" >&5
15680   cat conftest.$ac_ext >&5
15681   rm -rf conftest*
15682   eval "ac_cv_lib_$ac_lib_var=no"
15683 fi
15684 rm -f conftest*
15685 LIBS="$ac_save_LIBS"
15686
15687 fi
15688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15689   echo "$ac_t""yes" 1>&6
15690   have_thr=yes
15691 else
15692   echo "$ac_t""no" 1>&6
15693 have_thr=no
15694 fi
15695
15696
15697                 if test $have_thr = yes ; then
15698                         cat >> confdefs.h <<\EOF
15699 #define HAVE_THR 1
15700 EOF
15701
15702                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15703                         ol_link_threads=thr
15704
15705                         if test $ol_with_yielding_select = auto ; then
15706                                 ol_with_yielding_select=yes
15707                         fi
15708
15709                                                 for ac_func in \
15710                                 thr_setconcurrency \
15711                                 thr_getconcurrency \
15712                         
15713 do
15714 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15715 echo "configure:15716: checking for $ac_func" >&5
15716 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15717   echo $ac_n "(cached) $ac_c" 1>&6
15718 else
15719   cat > conftest.$ac_ext <<EOF
15720 #line 15721 "configure"
15721 #include "confdefs.h"
15722 /* System header to define __stub macros and hopefully few prototypes,
15723     which can conflict with char $ac_func(); below.  */
15724 #include <assert.h>
15725 /* Override any gcc2 internal prototype to avoid an error.  */
15726 /* We use char because int might match the return type of a gcc2
15727     builtin and then its argument prototype would still apply.  */
15728 char $ac_func();
15729 char (*f)();
15730
15731 int main() {
15732
15733 /* The GNU C library defines this for functions which it implements
15734     to always fail with ENOSYS.  Some functions are actually named
15735     something starting with __ and the normal name is an alias.  */
15736 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15737 choke me
15738 #else
15739 f = $ac_func;
15740 #endif
15741
15742 ; return 0; }
15743 EOF
15744 if { (eval echo configure:15745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15745   rm -rf conftest*
15746   eval "ac_cv_func_$ac_func=yes"
15747 else
15748   echo "configure: failed program was:" >&5
15749   cat conftest.$ac_ext >&5
15750   rm -rf conftest*
15751   eval "ac_cv_func_$ac_func=no"
15752 fi
15753 rm -f conftest*
15754 fi
15755
15756 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15757   echo "$ac_t""yes" 1>&6
15758     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15759   cat >> confdefs.h <<EOF
15760 #define $ac_tr_func 1
15761 EOF
15762  
15763 else
15764   echo "$ac_t""no" 1>&6
15765 fi
15766 done
15767
15768                 fi
15769         fi
15770
15771                 for ac_hdr in lwp/lwp.h
15772 do
15773 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15774 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15775 echo "configure:15776: checking for $ac_hdr" >&5
15776 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15777   echo $ac_n "(cached) $ac_c" 1>&6
15778 else
15779   cat > conftest.$ac_ext <<EOF
15780 #line 15781 "configure"
15781 #include "confdefs.h"
15782 #include <$ac_hdr>
15783 EOF
15784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15785 { (eval echo configure:15786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15787 if test -z "$ac_err"; then
15788   rm -rf conftest*
15789   eval "ac_cv_header_$ac_safe=yes"
15790 else
15791   echo "$ac_err" >&5
15792   echo "configure: failed program was:" >&5
15793   cat conftest.$ac_ext >&5
15794   rm -rf conftest*
15795   eval "ac_cv_header_$ac_safe=no"
15796 fi
15797 rm -f conftest*
15798 fi
15799 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15800   echo "$ac_t""yes" 1>&6
15801     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15802   cat >> confdefs.h <<EOF
15803 #define $ac_tr_hdr 1
15804 EOF
15805  
15806 else
15807   echo "$ac_t""no" 1>&6
15808 fi
15809 done
15810
15811         if test $ac_cv_header_lwp_lwp_h = yes ; then
15812                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15813 echo "configure:15814: checking for lwp_create in -llwp" >&5
15814 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15815 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15816   echo $ac_n "(cached) $ac_c" 1>&6
15817 else
15818   ac_save_LIBS="$LIBS"
15819 LIBS="-llwp  $LIBS"
15820 cat > conftest.$ac_ext <<EOF
15821 #line 15822 "configure"
15822 #include "confdefs.h"
15823 /* Override any gcc2 internal prototype to avoid an error.  */
15824 /* We use char because int might match the return type of a gcc2
15825     builtin and then its argument prototype would still apply.  */
15826 char lwp_create();
15827
15828 int main() {
15829 lwp_create()
15830 ; return 0; }
15831 EOF
15832 if { (eval echo configure:15833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15833   rm -rf conftest*
15834   eval "ac_cv_lib_$ac_lib_var=yes"
15835 else
15836   echo "configure: failed program was:" >&5
15837   cat conftest.$ac_ext >&5
15838   rm -rf conftest*
15839   eval "ac_cv_lib_$ac_lib_var=no"
15840 fi
15841 rm -f conftest*
15842 LIBS="$ac_save_LIBS"
15843
15844 fi
15845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15846   echo "$ac_t""yes" 1>&6
15847   have_lwp=yes
15848 else
15849   echo "$ac_t""no" 1>&6
15850 have_lwp=no
15851 fi
15852
15853
15854                 if test $have_lwp = yes ; then
15855                         cat >> confdefs.h <<\EOF
15856 #define HAVE_LWP 1
15857 EOF
15858
15859                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15860                         ol_link_threads=lwp
15861
15862                         if test $ol_with_yielding_select = auto ; then
15863                                 ol_with_yielding_select=no
15864                         fi
15865                 fi
15866         fi
15867 fi
15868
15869 if test $ol_with_yielding_select = yes ; then
15870         cat >> confdefs.h <<\EOF
15871 #define HAVE_YIELDING_SELECT 1
15872 EOF
15873
15874 fi
15875
15876 if test $ol_with_threads = manual ; then
15877                 ol_link_threads=yes
15878
15879         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15880
15881         for ac_hdr in pthread.h sched.h
15882 do
15883 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15884 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15885 echo "configure:15886: checking for $ac_hdr" >&5
15886 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15887   echo $ac_n "(cached) $ac_c" 1>&6
15888 else
15889   cat > conftest.$ac_ext <<EOF
15890 #line 15891 "configure"
15891 #include "confdefs.h"
15892 #include <$ac_hdr>
15893 EOF
15894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15895 { (eval echo configure:15896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15897 if test -z "$ac_err"; then
15898   rm -rf conftest*
15899   eval "ac_cv_header_$ac_safe=yes"
15900 else
15901   echo "$ac_err" >&5
15902   echo "configure: failed program was:" >&5
15903   cat conftest.$ac_ext >&5
15904   rm -rf conftest*
15905   eval "ac_cv_header_$ac_safe=no"
15906 fi
15907 rm -f conftest*
15908 fi
15909 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15910   echo "$ac_t""yes" 1>&6
15911     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15912   cat >> confdefs.h <<EOF
15913 #define $ac_tr_hdr 1
15914 EOF
15915  
15916 else
15917   echo "$ac_t""no" 1>&6
15918 fi
15919 done
15920
15921         for ac_func in sched_yield pthread_yield
15922 do
15923 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15924 echo "configure:15925: checking for $ac_func" >&5
15925 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15926   echo $ac_n "(cached) $ac_c" 1>&6
15927 else
15928   cat > conftest.$ac_ext <<EOF
15929 #line 15930 "configure"
15930 #include "confdefs.h"
15931 /* System header to define __stub macros and hopefully few prototypes,
15932     which can conflict with char $ac_func(); below.  */
15933 #include <assert.h>
15934 /* Override any gcc2 internal prototype to avoid an error.  */
15935 /* We use char because int might match the return type of a gcc2
15936     builtin and then its argument prototype would still apply.  */
15937 char $ac_func();
15938 char (*f)();
15939
15940 int main() {
15941
15942 /* The GNU C library defines this for functions which it implements
15943     to always fail with ENOSYS.  Some functions are actually named
15944     something starting with __ and the normal name is an alias.  */
15945 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15946 choke me
15947 #else
15948 f = $ac_func;
15949 #endif
15950
15951 ; return 0; }
15952 EOF
15953 if { (eval echo configure:15954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15954   rm -rf conftest*
15955   eval "ac_cv_func_$ac_func=yes"
15956 else
15957   echo "configure: failed program was:" >&5
15958   cat conftest.$ac_ext >&5
15959   rm -rf conftest*
15960   eval "ac_cv_func_$ac_func=no"
15961 fi
15962 rm -f conftest*
15963 fi
15964
15965 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15966   echo "$ac_t""yes" 1>&6
15967     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15968   cat >> confdefs.h <<EOF
15969 #define $ac_tr_func 1
15970 EOF
15971  
15972 else
15973   echo "$ac_t""no" 1>&6
15974 fi
15975 done
15976
15977         
15978         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15979 echo "configure:15980: checking for LinuxThreads pthread.h" >&5
15980 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15981   echo $ac_n "(cached) $ac_c" 1>&6
15982 else
15983   cat > conftest.$ac_ext <<EOF
15984 #line 15985 "configure"
15985 #include "confdefs.h"
15986 #include <pthread.h>
15987 EOF
15988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15989   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15990   rm -rf conftest*
15991   ol_cv_header_linux_threads=yes
15992 else
15993   rm -rf conftest*
15994   ol_cv_header_linux_threads=no
15995 fi
15996 rm -f conftest*
15997
15998                 
15999 fi
16000
16001 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16002         if test $ol_cv_header_linux_threads = yes; then
16003                 cat >> confdefs.h <<\EOF
16004 #define HAVE_LINUX_THREADS 1
16005 EOF
16006
16007         fi
16008
16009
16010         for ac_hdr in mach/cthreads.h
16011 do
16012 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16013 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16014 echo "configure:16015: checking for $ac_hdr" >&5
16015 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16016   echo $ac_n "(cached) $ac_c" 1>&6
16017 else
16018   cat > conftest.$ac_ext <<EOF
16019 #line 16020 "configure"
16020 #include "confdefs.h"
16021 #include <$ac_hdr>
16022 EOF
16023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16024 { (eval echo configure:16025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16026 if test -z "$ac_err"; then
16027   rm -rf conftest*
16028   eval "ac_cv_header_$ac_safe=yes"
16029 else
16030   echo "$ac_err" >&5
16031   echo "configure: failed program was:" >&5
16032   cat conftest.$ac_ext >&5
16033   rm -rf conftest*
16034   eval "ac_cv_header_$ac_safe=no"
16035 fi
16036 rm -f conftest*
16037 fi
16038 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16039   echo "$ac_t""yes" 1>&6
16040     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16041   cat >> confdefs.h <<EOF
16042 #define $ac_tr_hdr 1
16043 EOF
16044  
16045 else
16046   echo "$ac_t""no" 1>&6
16047 fi
16048 done
16049
16050         for ac_hdr in lwp/lwp.h
16051 do
16052 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16053 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16054 echo "configure:16055: checking for $ac_hdr" >&5
16055 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16056   echo $ac_n "(cached) $ac_c" 1>&6
16057 else
16058   cat > conftest.$ac_ext <<EOF
16059 #line 16060 "configure"
16060 #include "confdefs.h"
16061 #include <$ac_hdr>
16062 EOF
16063 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16064 { (eval echo configure:16065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16065 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16066 if test -z "$ac_err"; then
16067   rm -rf conftest*
16068   eval "ac_cv_header_$ac_safe=yes"
16069 else
16070   echo "$ac_err" >&5
16071   echo "configure: failed program was:" >&5
16072   cat conftest.$ac_ext >&5
16073   rm -rf conftest*
16074   eval "ac_cv_header_$ac_safe=no"
16075 fi
16076 rm -f conftest*
16077 fi
16078 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16079   echo "$ac_t""yes" 1>&6
16080     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16081   cat >> confdefs.h <<EOF
16082 #define $ac_tr_hdr 1
16083 EOF
16084  
16085 else
16086   echo "$ac_t""no" 1>&6
16087 fi
16088 done
16089
16090         for ac_hdr in thread.h synch.h
16091 do
16092 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16093 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16094 echo "configure:16095: checking for $ac_hdr" >&5
16095 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16096   echo $ac_n "(cached) $ac_c" 1>&6
16097 else
16098   cat > conftest.$ac_ext <<EOF
16099 #line 16100 "configure"
16100 #include "confdefs.h"
16101 #include <$ac_hdr>
16102 EOF
16103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16104 { (eval echo configure:16105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16106 if test -z "$ac_err"; then
16107   rm -rf conftest*
16108   eval "ac_cv_header_$ac_safe=yes"
16109 else
16110   echo "$ac_err" >&5
16111   echo "configure: failed program was:" >&5
16112   cat conftest.$ac_ext >&5
16113   rm -rf conftest*
16114   eval "ac_cv_header_$ac_safe=no"
16115 fi
16116 rm -f conftest*
16117 fi
16118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16119   echo "$ac_t""yes" 1>&6
16120     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16121   cat >> confdefs.h <<EOF
16122 #define $ac_tr_hdr 1
16123 EOF
16124  
16125 else
16126   echo "$ac_t""no" 1>&6
16127 fi
16128 done
16129
16130 fi
16131
16132 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16133                         cat >> confdefs.h <<\EOF
16134 #define REENTRANT 1
16135 EOF
16136
16137         cat >> confdefs.h <<\EOF
16138 #define _REENTRANT 1
16139 EOF
16140
16141         cat >> confdefs.h <<\EOF
16142 #define THREAD_SAFE 1
16143 EOF
16144
16145         cat >> confdefs.h <<\EOF
16146 #define _THREAD_SAFE 1
16147 EOF
16148
16149         cat >> confdefs.h <<\EOF
16150 #define THREADSAFE 1
16151 EOF
16152
16153         cat >> confdefs.h <<\EOF
16154 #define _THREADSAFE 1
16155 EOF
16156
16157         cat >> confdefs.h <<\EOF
16158 #define _SGI_MP_SOURCE 1
16159 EOF
16160
16161
16162                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16163 echo "configure:16164: checking for thread specific errno" >&5
16164 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16165   echo $ac_n "(cached) $ac_c" 1>&6
16166 else
16167   
16168                 cat > conftest.$ac_ext <<EOF
16169 #line 16170 "configure"
16170 #include "confdefs.h"
16171 #include <errno.h>
16172 int main() {
16173 errno = 0;
16174 ; return 0; }
16175 EOF
16176 if { (eval echo configure:16177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16177   rm -rf conftest*
16178   ol_cv_errno_thread_specific=yes
16179 else
16180   echo "configure: failed program was:" >&5
16181   cat conftest.$ac_ext >&5
16182   rm -rf conftest*
16183   ol_cv_errno_thread_specific=no
16184 fi
16185 rm -f conftest*
16186         
16187 fi
16188
16189 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16190
16191                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16192 echo "configure:16193: checking for thread specific h_errno" >&5
16193 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16194   echo $ac_n "(cached) $ac_c" 1>&6
16195 else
16196   
16197                 cat > conftest.$ac_ext <<EOF
16198 #line 16199 "configure"
16199 #include "confdefs.h"
16200 #include <netdb.h>
16201 int main() {
16202 h_errno = 0;
16203 ; return 0; }
16204 EOF
16205 if { (eval echo configure:16206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16206   rm -rf conftest*
16207   ol_cv_h_errno_thread_specific=yes
16208 else
16209   echo "configure: failed program was:" >&5
16210   cat conftest.$ac_ext >&5
16211   rm -rf conftest*
16212   ol_cv_h_errno_thread_specific=no
16213 fi
16214 rm -f conftest*
16215         
16216 fi
16217
16218 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16219
16220         if test $ol_cv_errno_thread_specific != yes \
16221                 -o $ol_cv_h_errno_thread_specific != yes ; then
16222                 LIBS="$LTHREAD_LIBS $LIBS"
16223                 LTHREAD_LIBS=""
16224         fi
16225
16226 fi  
16227
16228 if test $ol_link_threads = no ; then
16229         if test $ol_with_threads = yes ; then
16230                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16231         fi
16232
16233         if test $ol_with_threads = auto ; then
16234                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16235                 ol_with_threads=no
16236         fi
16237
16238         cat >> confdefs.h <<\EOF
16239 #define NO_THREADS 1
16240 EOF
16241
16242         LTHREAD_LIBS=""
16243 fi
16244
16245 if test $ol_link_threads != no ; then
16246         cat >> confdefs.h <<\EOF
16247 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16248 EOF
16249
16250 fi
16251
16252 for ac_func in \
16253         ctime_r                 \
16254         gethostbyname_r gethostbyaddr_r \
16255
16256 do
16257 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16258 echo "configure:16259: checking for $ac_func" >&5
16259 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16260   echo $ac_n "(cached) $ac_c" 1>&6
16261 else
16262   cat > conftest.$ac_ext <<EOF
16263 #line 16264 "configure"
16264 #include "confdefs.h"
16265 /* System header to define __stub macros and hopefully few prototypes,
16266     which can conflict with char $ac_func(); below.  */
16267 #include <assert.h>
16268 /* Override any gcc2 internal prototype to avoid an error.  */
16269 /* We use char because int might match the return type of a gcc2
16270     builtin and then its argument prototype would still apply.  */
16271 char $ac_func();
16272 char (*f)();
16273
16274 int main() {
16275
16276 /* The GNU C library defines this for functions which it implements
16277     to always fail with ENOSYS.  Some functions are actually named
16278     something starting with __ and the normal name is an alias.  */
16279 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16280 choke me
16281 #else
16282 f = $ac_func;
16283 #endif
16284
16285 ; return 0; }
16286 EOF
16287 if { (eval echo configure:16288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16288   rm -rf conftest*
16289   eval "ac_cv_func_$ac_func=yes"
16290 else
16291   echo "configure: failed program was:" >&5
16292   cat conftest.$ac_ext >&5
16293   rm -rf conftest*
16294   eval "ac_cv_func_$ac_func=no"
16295 fi
16296 rm -f conftest*
16297 fi
16298
16299 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16300   echo "$ac_t""yes" 1>&6
16301     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16302   cat >> confdefs.h <<EOF
16303 #define $ac_tr_func 1
16304 EOF
16305  
16306 else
16307   echo "$ac_t""no" 1>&6
16308 fi
16309 done
16310
16311
16312 if test "$ac_cv_func_ctime_r" = no ; then
16313         ol_cv_func_ctime_r_nargs=0
16314 else
16315         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16316 echo "configure:16317: checking number of arguments of ctime_r" >&5
16317 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16318   echo $ac_n "(cached) $ac_c" 1>&6
16319 else
16320   cat > conftest.$ac_ext <<EOF
16321 #line 16322 "configure"
16322 #include "confdefs.h"
16323 #include <time.h>
16324 int main() {
16325 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16326 ; return 0; }
16327 EOF
16328 if { (eval echo configure:16329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16329   rm -rf conftest*
16330   ol_cv_func_ctime_r_nargs3=yes
16331 else
16332   echo "configure: failed program was:" >&5
16333   cat conftest.$ac_ext >&5
16334   rm -rf conftest*
16335   ol_cv_func_ctime_r_nargs3=no
16336 fi
16337 rm -f conftest*
16338
16339         cat > conftest.$ac_ext <<EOF
16340 #line 16341 "configure"
16341 #include "confdefs.h"
16342 #include <time.h>
16343 int main() {
16344 time_t ti; char *buffer; ctime_r(&ti,buffer);
16345 ; return 0; }
16346 EOF
16347 if { (eval echo configure:16348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16348   rm -rf conftest*
16349   ol_cv_func_ctime_r_nargs2=yes
16350 else
16351   echo "configure: failed program was:" >&5
16352   cat conftest.$ac_ext >&5
16353   rm -rf conftest*
16354   ol_cv_func_ctime_r_nargs2=no
16355 fi
16356 rm -f conftest*
16357
16358         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16359                 $ol_cv_func_ctime_r_nargs2 = no ; then
16360
16361                 ol_cv_func_ctime_r_nargs=3
16362
16363         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16364                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16365
16366                 ol_cv_func_ctime_r_nargs=2
16367
16368         else
16369                 ol_cv_func_ctime_r_nargs=0
16370         fi
16371   
16372 fi
16373
16374 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16375
16376   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16377         cat >> confdefs.h <<EOF
16378 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16379 EOF
16380
16381   fi
16382
16383 fi
16384
16385 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16386         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16387 echo "configure:16388: checking number of arguments of gethostbyname_r" >&5
16388 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16389   echo $ac_n "(cached) $ac_c" 1>&6
16390 else
16391   cat > conftest.$ac_ext <<EOF
16392 #line 16393 "configure"
16393 #include "confdefs.h"
16394 #include <sys/types.h>
16395 #include <sys/socket.h>
16396 #include <netinet/in.h>
16397 #include <netdb.h>
16398 #define BUFSIZE (sizeof(struct hostent)+10)
16399 int main() {
16400 struct hostent hent; char buffer[BUFSIZE];
16401                 int bufsize=BUFSIZE;int h_errno;
16402                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16403                         buffer, bufsize, &h_errno);
16404 ; return 0; }
16405 EOF
16406 if { (eval echo configure:16407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16407   rm -rf conftest*
16408   ol_cv_func_gethostbyname_r_nargs5=yes
16409 else
16410   echo "configure: failed program was:" >&5
16411   cat conftest.$ac_ext >&5
16412   rm -rf conftest*
16413   ol_cv_func_gethostbyname_r_nargs5=no
16414 fi
16415 rm -f conftest*
16416
16417         cat > conftest.$ac_ext <<EOF
16418 #line 16419 "configure"
16419 #include "confdefs.h"
16420 #include <sys/types.h>
16421 #include <sys/socket.h>
16422 #include <netinet/in.h>
16423 #include <netdb.h>
16424 #define BUFSIZE (sizeof(struct hostent)+10)
16425 int main() {
16426 struct hostent hent;struct hostent *rhent;
16427                 char buffer[BUFSIZE];
16428                 int bufsize=BUFSIZE;int h_errno;
16429                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16430                         &rhent, &h_errno);
16431 ; return 0; }
16432 EOF
16433 if { (eval echo configure:16434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16434   rm -rf conftest*
16435   ol_cv_func_gethostbyname_r_nargs6=yes
16436 else
16437   echo "configure: failed program was:" >&5
16438   cat conftest.$ac_ext >&5
16439   rm -rf conftest*
16440   ol_cv_func_gethostbyname_r_nargs6=no
16441 fi
16442 rm -f conftest*
16443
16444         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16445                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16446
16447                 ol_cv_func_gethostbyname_r_nargs=5
16448
16449         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16450                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16451
16452                 ol_cv_func_gethostbyname_r_nargs=6
16453
16454         else
16455                 ol_cv_func_gethostbyname_r_nargs=0
16456         fi
16457   
16458 fi
16459
16460 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16461   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16462         cat >> confdefs.h <<EOF
16463 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16464 EOF
16465
16466   fi
16467
16468 else
16469         ol_cv_func_gethostbyname_r_nargs=0
16470 fi
16471  
16472 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16473         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16474 echo "configure:16475: checking number of arguments of gethostbyaddr_r" >&5
16475 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16476   echo $ac_n "(cached) $ac_c" 1>&6
16477 else
16478   cat > conftest.$ac_ext <<EOF
16479 #line 16480 "configure"
16480 #include "confdefs.h"
16481 #include <sys/types.h>
16482 #include <sys/socket.h>
16483 #include <netinet/in.h>
16484 #include <netdb.h>
16485 #define BUFSIZE (sizeof(struct hostent)+10)
16486 int main() {
16487 struct hostent hent; char buffer[BUFSIZE]; 
16488             struct in_addr add;
16489             size_t alen=sizeof(struct in_addr);
16490             int bufsize=BUFSIZE;int h_errno;
16491                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16492                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16493 ; return 0; }
16494 EOF
16495 if { (eval echo configure:16496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16496   rm -rf conftest*
16497   ol_cv_func_gethostbyaddr_r_nargs7=yes
16498 else
16499   echo "configure: failed program was:" >&5
16500   cat conftest.$ac_ext >&5
16501   rm -rf conftest*
16502   ol_cv_func_gethostbyaddr_r_nargs7=no
16503 fi
16504 rm -f conftest*
16505
16506         cat > conftest.$ac_ext <<EOF
16507 #line 16508 "configure"
16508 #include "confdefs.h"
16509 #include <sys/types.h>
16510 #include <sys/socket.h>
16511 #include <netinet/in.h>
16512 #include <netdb.h>
16513 #define BUFSIZE (sizeof(struct hostent)+10)
16514 int main() {
16515 struct hostent hent;
16516                 struct hostent *rhent; char buffer[BUFSIZE]; 
16517                 struct in_addr add;
16518                 size_t alen=sizeof(struct in_addr);
16519                 int bufsize=BUFSIZE;int h_errno;
16520                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16521                         alen, AF_INET, &hent, buffer, bufsize, 
16522                         &rhent, &h_errno);
16523 ; return 0; }
16524 EOF
16525 if { (eval echo configure:16526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16526   rm -rf conftest*
16527   ol_cv_func_gethostbyaddr_r_nargs8=yes
16528 else
16529   echo "configure: failed program was:" >&5
16530   cat conftest.$ac_ext >&5
16531   rm -rf conftest*
16532   ol_cv_func_gethostbyaddr_r_nargs8=no
16533 fi
16534 rm -f conftest*
16535
16536         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16537                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16538
16539                 ol_cv_func_gethostbyaddr_r_nargs=7
16540
16541         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16542                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16543
16544                 ol_cv_func_gethostbyaddr_r_nargs=8
16545
16546         else
16547                 ol_cv_func_gethostbyaddr_r_nargs=0
16548         fi
16549   
16550 fi
16551
16552 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16553   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16554     cat >> confdefs.h <<EOF
16555 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16556 EOF
16557
16558   fi
16559
16560 else
16561         ol_cv_func_gethostbyaddr_r_nargs=0
16562 fi
16563
16564 ol_link_ldbm=no 
16565
16566 if test $ol_with_ldbm_api = auto \
16567         -o $ol_with_ldbm_api = berkeley \
16568         -o $ol_with_ldbm_api = bcompat ; then
16569
16570         if test $ol_with_ldbm_api = bcompat; then \
16571                 for ac_hdr in db_185.h db.h
16572 do
16573 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16574 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16575 echo "configure:16576: checking for $ac_hdr" >&5
16576 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16577   echo $ac_n "(cached) $ac_c" 1>&6
16578 else
16579   cat > conftest.$ac_ext <<EOF
16580 #line 16581 "configure"
16581 #include "confdefs.h"
16582 #include <$ac_hdr>
16583 EOF
16584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16585 { (eval echo configure:16586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16587 if test -z "$ac_err"; then
16588   rm -rf conftest*
16589   eval "ac_cv_header_$ac_safe=yes"
16590 else
16591   echo "$ac_err" >&5
16592   echo "configure: failed program was:" >&5
16593   cat conftest.$ac_ext >&5
16594   rm -rf conftest*
16595   eval "ac_cv_header_$ac_safe=no"
16596 fi
16597 rm -f conftest*
16598 fi
16599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16600   echo "$ac_t""yes" 1>&6
16601     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16602   cat >> confdefs.h <<EOF
16603 #define $ac_tr_hdr 1
16604 EOF
16605  
16606 else
16607   echo "$ac_t""no" 1>&6
16608 fi
16609 done
16610
16611 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16612         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16613 echo "configure:16614: checking if Berkeley DB header compatibility" >&5
16614 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16615   echo $ac_n "(cached) $ac_c" 1>&6
16616 else
16617   
16618                 cat > conftest.$ac_ext <<EOF
16619 #line 16620 "configure"
16620 #include "confdefs.h"
16621
16622 #if HAVE_DB_185_H
16623 #       include <db_185.h>
16624 #else
16625 #       include <db.h>
16626 #endif
16627
16628  /* this check could be improved */
16629 #ifndef DB_VERSION_MAJOR
16630 #       define DB_VERSION_MAJOR 1
16631 #endif
16632
16633 #if DB_VERSION_MAJOR == 1 
16634         __db_version_1
16635 #endif
16636
16637 EOF
16638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16639   egrep "__db_version_1" >/dev/null 2>&1; then
16640   rm -rf conftest*
16641   ol_cv_header_db1=yes
16642 else
16643   rm -rf conftest*
16644   ol_cv_header_db1=no
16645 fi
16646 rm -f conftest*
16647
16648 fi
16649
16650 echo "$ac_t""$ol_cv_header_db1" 1>&6
16651
16652         if test $ol_cv_header_db1 = yes ; then
16653                 ol_cv_lib_db=no
16654 if test $ol_cv_lib_db = no ; then
16655         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16656 echo "configure:16657: checking for Berkeley DB link (default)" >&5
16657 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16658   echo $ac_n "(cached) $ac_c" 1>&6
16659 else
16660   
16661         ol_DB_LIB=
16662         ol_LIBS=$LIBS
16663         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16664
16665         cat > conftest.$ac_ext <<EOF
16666 #line 16667 "configure"
16667 #include "confdefs.h"
16668
16669 #ifdef HAVE_DB_185_H
16670 # include <db_185.h>
16671 #else
16672 # include <db.h>
16673 #endif
16674
16675 #ifndef DB_VERSION_MAJOR
16676 # define DB_VERSION_MAJOR 1
16677 #endif
16678
16679 #ifndef NULL
16680 #define NULL ((void*)0)
16681 #endif
16682
16683 int main() {
16684
16685 #if DB_VERSION_MAJOR > 1
16686         {
16687                 char *version;
16688                 int major, minor, patch;
16689
16690                 version = db_version( &major, &minor, &patch );
16691
16692                 if( major != DB_VERSION_MAJOR ||
16693                         minor < DB_VERSION_MINOR )
16694                 {
16695                         printf("Berkeley DB version mismatch\n"
16696                                 "\texpected: %s\n\tgot: %s\n",
16697                                 DB_VERSION_STRING, version);
16698                         return 1;
16699                 }
16700         }
16701 #endif
16702
16703 #if DB_VERSION_MAJOR > 2
16704         db_env_create( NULL, 0 );
16705 #elif DB_VERSION_MAJOR > 1
16706         db_appexit( NULL );
16707 #else
16708         (void) dbopen( NULL, 0, 0, 0, NULL);
16709 #endif
16710
16711 ; return 0; }
16712 EOF
16713 if { (eval echo configure:16714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16714   rm -rf conftest*
16715   ol_cv_db_none=yes
16716 else
16717   echo "configure: failed program was:" >&5
16718   cat conftest.$ac_ext >&5
16719   rm -rf conftest*
16720   ol_cv_db_none=no
16721 fi
16722 rm -f conftest*
16723
16724         LIBS="$ol_LIBS"
16725
16726 fi
16727
16728 echo "$ac_t""$ol_cv_db_none" 1>&6
16729
16730         if test $ol_cv_db_none = yes ; then
16731                 ol_cv_lib_db=yes
16732         fi
16733 fi
16734
16735 if test $ol_cv_lib_db = no ; then
16736         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16737 echo "configure:16738: checking for Berkeley DB link (-ldb42)" >&5
16738 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16739   echo $ac_n "(cached) $ac_c" 1>&6
16740 else
16741   
16742         ol_DB_LIB=-ldb42
16743         ol_LIBS=$LIBS
16744         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16745
16746         cat > conftest.$ac_ext <<EOF
16747 #line 16748 "configure"
16748 #include "confdefs.h"
16749
16750 #ifdef HAVE_DB_185_H
16751 # include <db_185.h>
16752 #else
16753 # include <db.h>
16754 #endif
16755
16756 #ifndef DB_VERSION_MAJOR
16757 # define DB_VERSION_MAJOR 1
16758 #endif
16759
16760 #ifndef NULL
16761 #define NULL ((void*)0)
16762 #endif
16763
16764 int main() {
16765
16766 #if DB_VERSION_MAJOR > 1
16767         {
16768                 char *version;
16769                 int major, minor, patch;
16770
16771                 version = db_version( &major, &minor, &patch );
16772
16773                 if( major != DB_VERSION_MAJOR ||
16774                         minor < DB_VERSION_MINOR )
16775                 {
16776                         printf("Berkeley DB version mismatch\n"
16777                                 "\texpected: %s\n\tgot: %s\n",
16778                                 DB_VERSION_STRING, version);
16779                         return 1;
16780                 }
16781         }
16782 #endif
16783
16784 #if DB_VERSION_MAJOR > 2
16785         db_env_create( NULL, 0 );
16786 #elif DB_VERSION_MAJOR > 1
16787         db_appexit( NULL );
16788 #else
16789         (void) dbopen( NULL, 0, 0, 0, NULL);
16790 #endif
16791
16792 ; return 0; }
16793 EOF
16794 if { (eval echo configure:16795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16795   rm -rf conftest*
16796   ol_cv_db_db42=yes
16797 else
16798   echo "configure: failed program was:" >&5
16799   cat conftest.$ac_ext >&5
16800   rm -rf conftest*
16801   ol_cv_db_db42=no
16802 fi
16803 rm -f conftest*
16804
16805         LIBS="$ol_LIBS"
16806
16807 fi
16808
16809 echo "$ac_t""$ol_cv_db_db42" 1>&6
16810
16811         if test $ol_cv_db_db42 = yes ; then
16812                 ol_cv_lib_db=-ldb42
16813         fi
16814 fi
16815
16816 if test $ol_cv_lib_db = no ; then
16817         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16818 echo "configure:16819: checking for Berkeley DB link (-ldb-42)" >&5
16819 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16820   echo $ac_n "(cached) $ac_c" 1>&6
16821 else
16822   
16823         ol_DB_LIB=-ldb-42
16824         ol_LIBS=$LIBS
16825         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16826
16827         cat > conftest.$ac_ext <<EOF
16828 #line 16829 "configure"
16829 #include "confdefs.h"
16830
16831 #ifdef HAVE_DB_185_H
16832 # include <db_185.h>
16833 #else
16834 # include <db.h>
16835 #endif
16836
16837 #ifndef DB_VERSION_MAJOR
16838 # define DB_VERSION_MAJOR 1
16839 #endif
16840
16841 #ifndef NULL
16842 #define NULL ((void*)0)
16843 #endif
16844
16845 int main() {
16846
16847 #if DB_VERSION_MAJOR > 1
16848         {
16849                 char *version;
16850                 int major, minor, patch;
16851
16852                 version = db_version( &major, &minor, &patch );
16853
16854                 if( major != DB_VERSION_MAJOR ||
16855                         minor < DB_VERSION_MINOR )
16856                 {
16857                         printf("Berkeley DB version mismatch\n"
16858                                 "\texpected: %s\n\tgot: %s\n",
16859                                 DB_VERSION_STRING, version);
16860                         return 1;
16861                 }
16862         }
16863 #endif
16864
16865 #if DB_VERSION_MAJOR > 2
16866         db_env_create( NULL, 0 );
16867 #elif DB_VERSION_MAJOR > 1
16868         db_appexit( NULL );
16869 #else
16870         (void) dbopen( NULL, 0, 0, 0, NULL);
16871 #endif
16872
16873 ; return 0; }
16874 EOF
16875 if { (eval echo configure:16876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16876   rm -rf conftest*
16877   ol_cv_db_db_42=yes
16878 else
16879   echo "configure: failed program was:" >&5
16880   cat conftest.$ac_ext >&5
16881   rm -rf conftest*
16882   ol_cv_db_db_42=no
16883 fi
16884 rm -f conftest*
16885
16886         LIBS="$ol_LIBS"
16887
16888 fi
16889
16890 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16891
16892         if test $ol_cv_db_db_42 = yes ; then
16893                 ol_cv_lib_db=-ldb-42
16894         fi
16895 fi
16896
16897 if test $ol_cv_lib_db = no ; then
16898         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16899 echo "configure:16900: checking for Berkeley DB link (-ldb-4.2)" >&5
16900 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16901   echo $ac_n "(cached) $ac_c" 1>&6
16902 else
16903   
16904         ol_DB_LIB=-ldb-4.2
16905         ol_LIBS=$LIBS
16906         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16907
16908         cat > conftest.$ac_ext <<EOF
16909 #line 16910 "configure"
16910 #include "confdefs.h"
16911
16912 #ifdef HAVE_DB_185_H
16913 # include <db_185.h>
16914 #else
16915 # include <db.h>
16916 #endif
16917
16918 #ifndef DB_VERSION_MAJOR
16919 # define DB_VERSION_MAJOR 1
16920 #endif
16921
16922 #ifndef NULL
16923 #define NULL ((void*)0)
16924 #endif
16925
16926 int main() {
16927
16928 #if DB_VERSION_MAJOR > 1
16929         {
16930                 char *version;
16931                 int major, minor, patch;
16932
16933                 version = db_version( &major, &minor, &patch );
16934
16935                 if( major != DB_VERSION_MAJOR ||
16936                         minor < DB_VERSION_MINOR )
16937                 {
16938                         printf("Berkeley DB version mismatch\n"
16939                                 "\texpected: %s\n\tgot: %s\n",
16940                                 DB_VERSION_STRING, version);
16941                         return 1;
16942                 }
16943         }
16944 #endif
16945
16946 #if DB_VERSION_MAJOR > 2
16947         db_env_create( NULL, 0 );
16948 #elif DB_VERSION_MAJOR > 1
16949         db_appexit( NULL );
16950 #else
16951         (void) dbopen( NULL, 0, 0, 0, NULL);
16952 #endif
16953
16954 ; return 0; }
16955 EOF
16956 if { (eval echo configure:16957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16957   rm -rf conftest*
16958   ol_cv_db_db_4_dot_2=yes
16959 else
16960   echo "configure: failed program was:" >&5
16961   cat conftest.$ac_ext >&5
16962   rm -rf conftest*
16963   ol_cv_db_db_4_dot_2=no
16964 fi
16965 rm -f conftest*
16966
16967         LIBS="$ol_LIBS"
16968
16969 fi
16970
16971 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16972
16973         if test $ol_cv_db_db_4_dot_2 = yes ; then
16974                 ol_cv_lib_db=-ldb-4.2
16975         fi
16976 fi
16977
16978 if test $ol_cv_lib_db = no ; then
16979         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16980 echo "configure:16981: checking for Berkeley DB link (-ldb-4-2)" >&5
16981 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16982   echo $ac_n "(cached) $ac_c" 1>&6
16983 else
16984   
16985         ol_DB_LIB=-ldb-4-2
16986         ol_LIBS=$LIBS
16987         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16988
16989         cat > conftest.$ac_ext <<EOF
16990 #line 16991 "configure"
16991 #include "confdefs.h"
16992
16993 #ifdef HAVE_DB_185_H
16994 # include <db_185.h>
16995 #else
16996 # include <db.h>
16997 #endif
16998
16999 #ifndef DB_VERSION_MAJOR
17000 # define DB_VERSION_MAJOR 1
17001 #endif
17002
17003 #ifndef NULL
17004 #define NULL ((void*)0)
17005 #endif
17006
17007 int main() {
17008
17009 #if DB_VERSION_MAJOR > 1
17010         {
17011                 char *version;
17012                 int major, minor, patch;
17013
17014                 version = db_version( &major, &minor, &patch );
17015
17016                 if( major != DB_VERSION_MAJOR ||
17017                         minor < DB_VERSION_MINOR )
17018                 {
17019                         printf("Berkeley DB version mismatch\n"
17020                                 "\texpected: %s\n\tgot: %s\n",
17021                                 DB_VERSION_STRING, version);
17022                         return 1;
17023                 }
17024         }
17025 #endif
17026
17027 #if DB_VERSION_MAJOR > 2
17028         db_env_create( NULL, 0 );
17029 #elif DB_VERSION_MAJOR > 1
17030         db_appexit( NULL );
17031 #else
17032         (void) dbopen( NULL, 0, 0, 0, NULL);
17033 #endif
17034
17035 ; return 0; }
17036 EOF
17037 if { (eval echo configure:17038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17038   rm -rf conftest*
17039   ol_cv_db_db_4_2=yes
17040 else
17041   echo "configure: failed program was:" >&5
17042   cat conftest.$ac_ext >&5
17043   rm -rf conftest*
17044   ol_cv_db_db_4_2=no
17045 fi
17046 rm -f conftest*
17047
17048         LIBS="$ol_LIBS"
17049
17050 fi
17051
17052 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17053
17054         if test $ol_cv_db_db_4_2 = yes ; then
17055                 ol_cv_lib_db=-ldb-4-2
17056         fi
17057 fi
17058
17059 if test $ol_cv_lib_db = no ; then
17060         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17061 echo "configure:17062: checking for Berkeley DB link (-ldb-4)" >&5
17062 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17063   echo $ac_n "(cached) $ac_c" 1>&6
17064 else
17065   
17066         ol_DB_LIB=-ldb-4
17067         ol_LIBS=$LIBS
17068         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17069
17070         cat > conftest.$ac_ext <<EOF
17071 #line 17072 "configure"
17072 #include "confdefs.h"
17073
17074 #ifdef HAVE_DB_185_H
17075 # include <db_185.h>
17076 #else
17077 # include <db.h>
17078 #endif
17079
17080 #ifndef DB_VERSION_MAJOR
17081 # define DB_VERSION_MAJOR 1
17082 #endif
17083
17084 #ifndef NULL
17085 #define NULL ((void*)0)
17086 #endif
17087
17088 int main() {
17089
17090 #if DB_VERSION_MAJOR > 1
17091         {
17092                 char *version;
17093                 int major, minor, patch;
17094
17095                 version = db_version( &major, &minor, &patch );
17096
17097                 if( major != DB_VERSION_MAJOR ||
17098                         minor < DB_VERSION_MINOR )
17099                 {
17100                         printf("Berkeley DB version mismatch\n"
17101                                 "\texpected: %s\n\tgot: %s\n",
17102                                 DB_VERSION_STRING, version);
17103                         return 1;
17104                 }
17105         }
17106 #endif
17107
17108 #if DB_VERSION_MAJOR > 2
17109         db_env_create( NULL, 0 );
17110 #elif DB_VERSION_MAJOR > 1
17111         db_appexit( NULL );
17112 #else
17113         (void) dbopen( NULL, 0, 0, 0, NULL);
17114 #endif
17115
17116 ; return 0; }
17117 EOF
17118 if { (eval echo configure:17119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17119   rm -rf conftest*
17120   ol_cv_db_db_4=yes
17121 else
17122   echo "configure: failed program was:" >&5
17123   cat conftest.$ac_ext >&5
17124   rm -rf conftest*
17125   ol_cv_db_db_4=no
17126 fi
17127 rm -f conftest*
17128
17129         LIBS="$ol_LIBS"
17130
17131 fi
17132
17133 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17134
17135         if test $ol_cv_db_db_4 = yes ; then
17136                 ol_cv_lib_db=-ldb-4
17137         fi
17138 fi
17139
17140 if test $ol_cv_lib_db = no ; then
17141         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17142 echo "configure:17143: checking for Berkeley DB link (-ldb4)" >&5
17143 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17144   echo $ac_n "(cached) $ac_c" 1>&6
17145 else
17146   
17147         ol_DB_LIB=-ldb4
17148         ol_LIBS=$LIBS
17149         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17150
17151         cat > conftest.$ac_ext <<EOF
17152 #line 17153 "configure"
17153 #include "confdefs.h"
17154
17155 #ifdef HAVE_DB_185_H
17156 # include <db_185.h>
17157 #else
17158 # include <db.h>
17159 #endif
17160
17161 #ifndef DB_VERSION_MAJOR
17162 # define DB_VERSION_MAJOR 1
17163 #endif
17164
17165 #ifndef NULL
17166 #define NULL ((void*)0)
17167 #endif
17168
17169 int main() {
17170
17171 #if DB_VERSION_MAJOR > 1
17172         {
17173                 char *version;
17174                 int major, minor, patch;
17175
17176                 version = db_version( &major, &minor, &patch );
17177
17178                 if( major != DB_VERSION_MAJOR ||
17179                         minor < DB_VERSION_MINOR )
17180                 {
17181                         printf("Berkeley DB version mismatch\n"
17182                                 "\texpected: %s\n\tgot: %s\n",
17183                                 DB_VERSION_STRING, version);
17184                         return 1;
17185                 }
17186         }
17187 #endif
17188
17189 #if DB_VERSION_MAJOR > 2
17190         db_env_create( NULL, 0 );
17191 #elif DB_VERSION_MAJOR > 1
17192         db_appexit( NULL );
17193 #else
17194         (void) dbopen( NULL, 0, 0, 0, NULL);
17195 #endif
17196
17197 ; return 0; }
17198 EOF
17199 if { (eval echo configure:17200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17200   rm -rf conftest*
17201   ol_cv_db_db4=yes
17202 else
17203   echo "configure: failed program was:" >&5
17204   cat conftest.$ac_ext >&5
17205   rm -rf conftest*
17206   ol_cv_db_db4=no
17207 fi
17208 rm -f conftest*
17209
17210         LIBS="$ol_LIBS"
17211
17212 fi
17213
17214 echo "$ac_t""$ol_cv_db_db4" 1>&6
17215
17216         if test $ol_cv_db_db4 = yes ; then
17217                 ol_cv_lib_db=-ldb4
17218         fi
17219 fi
17220
17221 if test $ol_cv_lib_db = no ; then
17222         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17223 echo "configure:17224: checking for Berkeley DB link (-ldb)" >&5
17224 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17225   echo $ac_n "(cached) $ac_c" 1>&6
17226 else
17227   
17228         ol_DB_LIB=-ldb
17229         ol_LIBS=$LIBS
17230         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17231
17232         cat > conftest.$ac_ext <<EOF
17233 #line 17234 "configure"
17234 #include "confdefs.h"
17235
17236 #ifdef HAVE_DB_185_H
17237 # include <db_185.h>
17238 #else
17239 # include <db.h>
17240 #endif
17241
17242 #ifndef DB_VERSION_MAJOR
17243 # define DB_VERSION_MAJOR 1
17244 #endif
17245
17246 #ifndef NULL
17247 #define NULL ((void*)0)
17248 #endif
17249
17250 int main() {
17251
17252 #if DB_VERSION_MAJOR > 1
17253         {
17254                 char *version;
17255                 int major, minor, patch;
17256
17257                 version = db_version( &major, &minor, &patch );
17258
17259                 if( major != DB_VERSION_MAJOR ||
17260                         minor < DB_VERSION_MINOR )
17261                 {
17262                         printf("Berkeley DB version mismatch\n"
17263                                 "\texpected: %s\n\tgot: %s\n",
17264                                 DB_VERSION_STRING, version);
17265                         return 1;
17266                 }
17267         }
17268 #endif
17269
17270 #if DB_VERSION_MAJOR > 2
17271         db_env_create( NULL, 0 );
17272 #elif DB_VERSION_MAJOR > 1
17273         db_appexit( NULL );
17274 #else
17275         (void) dbopen( NULL, 0, 0, 0, NULL);
17276 #endif
17277
17278 ; return 0; }
17279 EOF
17280 if { (eval echo configure:17281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17281   rm -rf conftest*
17282   ol_cv_db_db=yes
17283 else
17284   echo "configure: failed program was:" >&5
17285   cat conftest.$ac_ext >&5
17286   rm -rf conftest*
17287   ol_cv_db_db=no
17288 fi
17289 rm -f conftest*
17290
17291         LIBS="$ol_LIBS"
17292
17293 fi
17294
17295 echo "$ac_t""$ol_cv_db_db" 1>&6
17296
17297         if test $ol_cv_db_db = yes ; then
17298                 ol_cv_lib_db=-ldb
17299         fi
17300 fi
17301
17302 if test $ol_cv_lib_db = no ; then
17303         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17304 echo "configure:17305: checking for Berkeley DB link (-ldb41)" >&5
17305 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17306   echo $ac_n "(cached) $ac_c" 1>&6
17307 else
17308   
17309         ol_DB_LIB=-ldb41
17310         ol_LIBS=$LIBS
17311         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17312
17313         cat > conftest.$ac_ext <<EOF
17314 #line 17315 "configure"
17315 #include "confdefs.h"
17316
17317 #ifdef HAVE_DB_185_H
17318 # include <db_185.h>
17319 #else
17320 # include <db.h>
17321 #endif
17322
17323 #ifndef DB_VERSION_MAJOR
17324 # define DB_VERSION_MAJOR 1
17325 #endif
17326
17327 #ifndef NULL
17328 #define NULL ((void*)0)
17329 #endif
17330
17331 int main() {
17332
17333 #if DB_VERSION_MAJOR > 1
17334         {
17335                 char *version;
17336                 int major, minor, patch;
17337
17338                 version = db_version( &major, &minor, &patch );
17339
17340                 if( major != DB_VERSION_MAJOR ||
17341                         minor < DB_VERSION_MINOR )
17342                 {
17343                         printf("Berkeley DB version mismatch\n"
17344                                 "\texpected: %s\n\tgot: %s\n",
17345                                 DB_VERSION_STRING, version);
17346                         return 1;
17347                 }
17348         }
17349 #endif
17350
17351 #if DB_VERSION_MAJOR > 2
17352         db_env_create( NULL, 0 );
17353 #elif DB_VERSION_MAJOR > 1
17354         db_appexit( NULL );
17355 #else
17356         (void) dbopen( NULL, 0, 0, 0, NULL);
17357 #endif
17358
17359 ; return 0; }
17360 EOF
17361 if { (eval echo configure:17362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17362   rm -rf conftest*
17363   ol_cv_db_db41=yes
17364 else
17365   echo "configure: failed program was:" >&5
17366   cat conftest.$ac_ext >&5
17367   rm -rf conftest*
17368   ol_cv_db_db41=no
17369 fi
17370 rm -f conftest*
17371
17372         LIBS="$ol_LIBS"
17373
17374 fi
17375
17376 echo "$ac_t""$ol_cv_db_db41" 1>&6
17377
17378         if test $ol_cv_db_db41 = yes ; then
17379                 ol_cv_lib_db=-ldb41
17380         fi
17381 fi
17382
17383 if test $ol_cv_lib_db = no ; then
17384         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17385 echo "configure:17386: checking for Berkeley DB link (-ldb-41)" >&5
17386 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17387   echo $ac_n "(cached) $ac_c" 1>&6
17388 else
17389   
17390         ol_DB_LIB=-ldb-41
17391         ol_LIBS=$LIBS
17392         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17393
17394         cat > conftest.$ac_ext <<EOF
17395 #line 17396 "configure"
17396 #include "confdefs.h"
17397
17398 #ifdef HAVE_DB_185_H
17399 # include <db_185.h>
17400 #else
17401 # include <db.h>
17402 #endif
17403
17404 #ifndef DB_VERSION_MAJOR
17405 # define DB_VERSION_MAJOR 1
17406 #endif
17407
17408 #ifndef NULL
17409 #define NULL ((void*)0)
17410 #endif
17411
17412 int main() {
17413
17414 #if DB_VERSION_MAJOR > 1
17415         {
17416                 char *version;
17417                 int major, minor, patch;
17418
17419                 version = db_version( &major, &minor, &patch );
17420
17421                 if( major != DB_VERSION_MAJOR ||
17422                         minor < DB_VERSION_MINOR )
17423                 {
17424                         printf("Berkeley DB version mismatch\n"
17425                                 "\texpected: %s\n\tgot: %s\n",
17426                                 DB_VERSION_STRING, version);
17427                         return 1;
17428                 }
17429         }
17430 #endif
17431
17432 #if DB_VERSION_MAJOR > 2
17433         db_env_create( NULL, 0 );
17434 #elif DB_VERSION_MAJOR > 1
17435         db_appexit( NULL );
17436 #else
17437         (void) dbopen( NULL, 0, 0, 0, NULL);
17438 #endif
17439
17440 ; return 0; }
17441 EOF
17442 if { (eval echo configure:17443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17443   rm -rf conftest*
17444   ol_cv_db_db_41=yes
17445 else
17446   echo "configure: failed program was:" >&5
17447   cat conftest.$ac_ext >&5
17448   rm -rf conftest*
17449   ol_cv_db_db_41=no
17450 fi
17451 rm -f conftest*
17452
17453         LIBS="$ol_LIBS"
17454
17455 fi
17456
17457 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17458
17459         if test $ol_cv_db_db_41 = yes ; then
17460                 ol_cv_lib_db=-ldb-41
17461         fi
17462 fi
17463
17464 if test $ol_cv_lib_db = no ; then
17465         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17466 echo "configure:17467: checking for Berkeley DB link (-ldb-4.1)" >&5
17467 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17468   echo $ac_n "(cached) $ac_c" 1>&6
17469 else
17470   
17471         ol_DB_LIB=-ldb-4.1
17472         ol_LIBS=$LIBS
17473         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17474
17475         cat > conftest.$ac_ext <<EOF
17476 #line 17477 "configure"
17477 #include "confdefs.h"
17478
17479 #ifdef HAVE_DB_185_H
17480 # include <db_185.h>
17481 #else
17482 # include <db.h>
17483 #endif
17484
17485 #ifndef DB_VERSION_MAJOR
17486 # define DB_VERSION_MAJOR 1
17487 #endif
17488
17489 #ifndef NULL
17490 #define NULL ((void*)0)
17491 #endif
17492
17493 int main() {
17494
17495 #if DB_VERSION_MAJOR > 1
17496         {
17497                 char *version;
17498                 int major, minor, patch;
17499
17500                 version = db_version( &major, &minor, &patch );
17501
17502                 if( major != DB_VERSION_MAJOR ||
17503                         minor < DB_VERSION_MINOR )
17504                 {
17505                         printf("Berkeley DB version mismatch\n"
17506                                 "\texpected: %s\n\tgot: %s\n",
17507                                 DB_VERSION_STRING, version);
17508                         return 1;
17509                 }
17510         }
17511 #endif
17512
17513 #if DB_VERSION_MAJOR > 2
17514         db_env_create( NULL, 0 );
17515 #elif DB_VERSION_MAJOR > 1
17516         db_appexit( NULL );
17517 #else
17518         (void) dbopen( NULL, 0, 0, 0, NULL);
17519 #endif
17520
17521 ; return 0; }
17522 EOF
17523 if { (eval echo configure:17524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17524   rm -rf conftest*
17525   ol_cv_db_db_4_dot_1=yes
17526 else
17527   echo "configure: failed program was:" >&5
17528   cat conftest.$ac_ext >&5
17529   rm -rf conftest*
17530   ol_cv_db_db_4_dot_1=no
17531 fi
17532 rm -f conftest*
17533
17534         LIBS="$ol_LIBS"
17535
17536 fi
17537
17538 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17539
17540         if test $ol_cv_db_db_4_dot_1 = yes ; then
17541                 ol_cv_lib_db=-ldb-4.1
17542         fi
17543 fi
17544
17545 if test $ol_cv_lib_db = no ; then
17546         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17547 echo "configure:17548: checking for Berkeley DB link (-ldb-4-1)" >&5
17548 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17549   echo $ac_n "(cached) $ac_c" 1>&6
17550 else
17551   
17552         ol_DB_LIB=-ldb-4-1
17553         ol_LIBS=$LIBS
17554         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17555
17556         cat > conftest.$ac_ext <<EOF
17557 #line 17558 "configure"
17558 #include "confdefs.h"
17559
17560 #ifdef HAVE_DB_185_H
17561 # include <db_185.h>
17562 #else
17563 # include <db.h>
17564 #endif
17565
17566 #ifndef DB_VERSION_MAJOR
17567 # define DB_VERSION_MAJOR 1
17568 #endif
17569
17570 #ifndef NULL
17571 #define NULL ((void*)0)
17572 #endif
17573
17574 int main() {
17575
17576 #if DB_VERSION_MAJOR > 1
17577         {
17578                 char *version;
17579                 int major, minor, patch;
17580
17581                 version = db_version( &major, &minor, &patch );
17582
17583                 if( major != DB_VERSION_MAJOR ||
17584                         minor < DB_VERSION_MINOR )
17585                 {
17586                         printf("Berkeley DB version mismatch\n"
17587                                 "\texpected: %s\n\tgot: %s\n",
17588                                 DB_VERSION_STRING, version);
17589                         return 1;
17590                 }
17591         }
17592 #endif
17593
17594 #if DB_VERSION_MAJOR > 2
17595         db_env_create( NULL, 0 );
17596 #elif DB_VERSION_MAJOR > 1
17597         db_appexit( NULL );
17598 #else
17599         (void) dbopen( NULL, 0, 0, 0, NULL);
17600 #endif
17601
17602 ; return 0; }
17603 EOF
17604 if { (eval echo configure:17605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17605   rm -rf conftest*
17606   ol_cv_db_db_4_1=yes
17607 else
17608   echo "configure: failed program was:" >&5
17609   cat conftest.$ac_ext >&5
17610   rm -rf conftest*
17611   ol_cv_db_db_4_1=no
17612 fi
17613 rm -f conftest*
17614
17615         LIBS="$ol_LIBS"
17616
17617 fi
17618
17619 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17620
17621         if test $ol_cv_db_db_4_1 = yes ; then
17622                 ol_cv_lib_db=-ldb-4-1
17623         fi
17624 fi
17625
17626 if test $ol_cv_lib_db = no ; then
17627         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17628 echo "configure:17629: checking for Berkeley DB link (-ldb3)" >&5
17629 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17630   echo $ac_n "(cached) $ac_c" 1>&6
17631 else
17632   
17633         ol_DB_LIB=-ldb3
17634         ol_LIBS=$LIBS
17635         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17636
17637         cat > conftest.$ac_ext <<EOF
17638 #line 17639 "configure"
17639 #include "confdefs.h"
17640
17641 #ifdef HAVE_DB_185_H
17642 # include <db_185.h>
17643 #else
17644 # include <db.h>
17645 #endif
17646
17647 #ifndef DB_VERSION_MAJOR
17648 # define DB_VERSION_MAJOR 1
17649 #endif
17650
17651 #ifndef NULL
17652 #define NULL ((void*)0)
17653 #endif
17654
17655 int main() {
17656
17657 #if DB_VERSION_MAJOR > 1
17658         {
17659                 char *version;
17660                 int major, minor, patch;
17661
17662                 version = db_version( &major, &minor, &patch );
17663
17664                 if( major != DB_VERSION_MAJOR ||
17665                         minor < DB_VERSION_MINOR )
17666                 {
17667                         printf("Berkeley DB version mismatch\n"
17668                                 "\texpected: %s\n\tgot: %s\n",
17669                                 DB_VERSION_STRING, version);
17670                         return 1;
17671                 }
17672         }
17673 #endif
17674
17675 #if DB_VERSION_MAJOR > 2
17676         db_env_create( NULL, 0 );
17677 #elif DB_VERSION_MAJOR > 1
17678         db_appexit( NULL );
17679 #else
17680         (void) dbopen( NULL, 0, 0, 0, NULL);
17681 #endif
17682
17683 ; return 0; }
17684 EOF
17685 if { (eval echo configure:17686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17686   rm -rf conftest*
17687   ol_cv_db_db3=yes
17688 else
17689   echo "configure: failed program was:" >&5
17690   cat conftest.$ac_ext >&5
17691   rm -rf conftest*
17692   ol_cv_db_db3=no
17693 fi
17694 rm -f conftest*
17695
17696         LIBS="$ol_LIBS"
17697
17698 fi
17699
17700 echo "$ac_t""$ol_cv_db_db3" 1>&6
17701
17702         if test $ol_cv_db_db3 = yes ; then
17703                 ol_cv_lib_db=-ldb3
17704         fi
17705 fi
17706
17707 if test $ol_cv_lib_db = no ; then
17708         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17709 echo "configure:17710: checking for Berkeley DB link (-ldb-3)" >&5
17710 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17711   echo $ac_n "(cached) $ac_c" 1>&6
17712 else
17713   
17714         ol_DB_LIB=-ldb-3
17715         ol_LIBS=$LIBS
17716         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17717
17718         cat > conftest.$ac_ext <<EOF
17719 #line 17720 "configure"
17720 #include "confdefs.h"
17721
17722 #ifdef HAVE_DB_185_H
17723 # include <db_185.h>
17724 #else
17725 # include <db.h>
17726 #endif
17727
17728 #ifndef DB_VERSION_MAJOR
17729 # define DB_VERSION_MAJOR 1
17730 #endif
17731
17732 #ifndef NULL
17733 #define NULL ((void*)0)
17734 #endif
17735
17736 int main() {
17737
17738 #if DB_VERSION_MAJOR > 1
17739         {
17740                 char *version;
17741                 int major, minor, patch;
17742
17743                 version = db_version( &major, &minor, &patch );
17744
17745                 if( major != DB_VERSION_MAJOR ||
17746                         minor < DB_VERSION_MINOR )
17747                 {
17748                         printf("Berkeley DB version mismatch\n"
17749                                 "\texpected: %s\n\tgot: %s\n",
17750                                 DB_VERSION_STRING, version);
17751                         return 1;
17752                 }
17753         }
17754 #endif
17755
17756 #if DB_VERSION_MAJOR > 2
17757         db_env_create( NULL, 0 );
17758 #elif DB_VERSION_MAJOR > 1
17759         db_appexit( NULL );
17760 #else
17761         (void) dbopen( NULL, 0, 0, 0, NULL);
17762 #endif
17763
17764 ; return 0; }
17765 EOF
17766 if { (eval echo configure:17767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17767   rm -rf conftest*
17768   ol_cv_db_db_3=yes
17769 else
17770   echo "configure: failed program was:" >&5
17771   cat conftest.$ac_ext >&5
17772   rm -rf conftest*
17773   ol_cv_db_db_3=no
17774 fi
17775 rm -f conftest*
17776
17777         LIBS="$ol_LIBS"
17778
17779 fi
17780
17781 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17782
17783         if test $ol_cv_db_db_3 = yes ; then
17784                 ol_cv_lib_db=-ldb-3
17785         fi
17786 fi
17787
17788 if test $ol_cv_lib_db = no ; then
17789         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17790 echo "configure:17791: checking for Berkeley DB link (-ldb2)" >&5
17791 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17792   echo $ac_n "(cached) $ac_c" 1>&6
17793 else
17794   
17795         ol_DB_LIB=-ldb2
17796         ol_LIBS=$LIBS
17797         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17798
17799         cat > conftest.$ac_ext <<EOF
17800 #line 17801 "configure"
17801 #include "confdefs.h"
17802
17803 #ifdef HAVE_DB_185_H
17804 # include <db_185.h>
17805 #else
17806 # include <db.h>
17807 #endif
17808
17809 #ifndef DB_VERSION_MAJOR
17810 # define DB_VERSION_MAJOR 1
17811 #endif
17812
17813 #ifndef NULL
17814 #define NULL ((void*)0)
17815 #endif
17816
17817 int main() {
17818
17819 #if DB_VERSION_MAJOR > 1
17820         {
17821                 char *version;
17822                 int major, minor, patch;
17823
17824                 version = db_version( &major, &minor, &patch );
17825
17826                 if( major != DB_VERSION_MAJOR ||
17827                         minor < DB_VERSION_MINOR )
17828                 {
17829                         printf("Berkeley DB version mismatch\n"
17830                                 "\texpected: %s\n\tgot: %s\n",
17831                                 DB_VERSION_STRING, version);
17832                         return 1;
17833                 }
17834         }
17835 #endif
17836
17837 #if DB_VERSION_MAJOR > 2
17838         db_env_create( NULL, 0 );
17839 #elif DB_VERSION_MAJOR > 1
17840         db_appexit( NULL );
17841 #else
17842         (void) dbopen( NULL, 0, 0, 0, NULL);
17843 #endif
17844
17845 ; return 0; }
17846 EOF
17847 if { (eval echo configure:17848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17848   rm -rf conftest*
17849   ol_cv_db_db2=yes
17850 else
17851   echo "configure: failed program was:" >&5
17852   cat conftest.$ac_ext >&5
17853   rm -rf conftest*
17854   ol_cv_db_db2=no
17855 fi
17856 rm -f conftest*
17857
17858         LIBS="$ol_LIBS"
17859
17860 fi
17861
17862 echo "$ac_t""$ol_cv_db_db2" 1>&6
17863
17864         if test $ol_cv_db_db2 = yes ; then
17865                 ol_cv_lib_db=-ldb2
17866         fi
17867 fi
17868
17869 if test $ol_cv_lib_db = no ; then
17870         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17871 echo "configure:17872: checking for Berkeley DB link (-ldb-2)" >&5
17872 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17873   echo $ac_n "(cached) $ac_c" 1>&6
17874 else
17875   
17876         ol_DB_LIB=-ldb-2
17877         ol_LIBS=$LIBS
17878         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17879
17880         cat > conftest.$ac_ext <<EOF
17881 #line 17882 "configure"
17882 #include "confdefs.h"
17883
17884 #ifdef HAVE_DB_185_H
17885 # include <db_185.h>
17886 #else
17887 # include <db.h>
17888 #endif
17889
17890 #ifndef DB_VERSION_MAJOR
17891 # define DB_VERSION_MAJOR 1
17892 #endif
17893
17894 #ifndef NULL
17895 #define NULL ((void*)0)
17896 #endif
17897
17898 int main() {
17899
17900 #if DB_VERSION_MAJOR > 1
17901         {
17902                 char *version;
17903                 int major, minor, patch;
17904
17905                 version = db_version( &major, &minor, &patch );
17906
17907                 if( major != DB_VERSION_MAJOR ||
17908                         minor < DB_VERSION_MINOR )
17909                 {
17910                         printf("Berkeley DB version mismatch\n"
17911                                 "\texpected: %s\n\tgot: %s\n",
17912                                 DB_VERSION_STRING, version);
17913                         return 1;
17914                 }
17915         }
17916 #endif
17917
17918 #if DB_VERSION_MAJOR > 2
17919         db_env_create( NULL, 0 );
17920 #elif DB_VERSION_MAJOR > 1
17921         db_appexit( NULL );
17922 #else
17923         (void) dbopen( NULL, 0, 0, 0, NULL);
17924 #endif
17925
17926 ; return 0; }
17927 EOF
17928 if { (eval echo configure:17929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17929   rm -rf conftest*
17930   ol_cv_db_db_2=yes
17931 else
17932   echo "configure: failed program was:" >&5
17933   cat conftest.$ac_ext >&5
17934   rm -rf conftest*
17935   ol_cv_db_db_2=no
17936 fi
17937 rm -f conftest*
17938
17939         LIBS="$ol_LIBS"
17940
17941 fi
17942
17943 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17944
17945         if test $ol_cv_db_db_2 = yes ; then
17946                 ol_cv_lib_db=-ldb-2
17947         fi
17948 fi
17949
17950 if test $ol_cv_lib_db = no ; then
17951         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17952 echo "configure:17953: checking for Berkeley DB link (-ldb1)" >&5
17953 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17954   echo $ac_n "(cached) $ac_c" 1>&6
17955 else
17956   
17957         ol_DB_LIB=-ldb1
17958         ol_LIBS=$LIBS
17959         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17960
17961         cat > conftest.$ac_ext <<EOF
17962 #line 17963 "configure"
17963 #include "confdefs.h"
17964
17965 #ifdef HAVE_DB_185_H
17966 # include <db_185.h>
17967 #else
17968 # include <db.h>
17969 #endif
17970
17971 #ifndef DB_VERSION_MAJOR
17972 # define DB_VERSION_MAJOR 1
17973 #endif
17974
17975 #ifndef NULL
17976 #define NULL ((void*)0)
17977 #endif
17978
17979 int main() {
17980
17981 #if DB_VERSION_MAJOR > 1
17982         {
17983                 char *version;
17984                 int major, minor, patch;
17985
17986                 version = db_version( &major, &minor, &patch );
17987
17988                 if( major != DB_VERSION_MAJOR ||
17989                         minor < DB_VERSION_MINOR )
17990                 {
17991                         printf("Berkeley DB version mismatch\n"
17992                                 "\texpected: %s\n\tgot: %s\n",
17993                                 DB_VERSION_STRING, version);
17994                         return 1;
17995                 }
17996         }
17997 #endif
17998
17999 #if DB_VERSION_MAJOR > 2
18000         db_env_create( NULL, 0 );
18001 #elif DB_VERSION_MAJOR > 1
18002         db_appexit( NULL );
18003 #else
18004         (void) dbopen( NULL, 0, 0, 0, NULL);
18005 #endif
18006
18007 ; return 0; }
18008 EOF
18009 if { (eval echo configure:18010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18010   rm -rf conftest*
18011   ol_cv_db_db1=yes
18012 else
18013   echo "configure: failed program was:" >&5
18014   cat conftest.$ac_ext >&5
18015   rm -rf conftest*
18016   ol_cv_db_db1=no
18017 fi
18018 rm -f conftest*
18019
18020         LIBS="$ol_LIBS"
18021
18022 fi
18023
18024 echo "$ac_t""$ol_cv_db_db1" 1>&6
18025
18026         if test $ol_cv_db_db1 = yes ; then
18027                 ol_cv_lib_db=-ldb1
18028         fi
18029 fi
18030
18031 if test $ol_cv_lib_db = no ; then
18032         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18033 echo "configure:18034: checking for Berkeley DB link (-ldb-1)" >&5
18034 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18035   echo $ac_n "(cached) $ac_c" 1>&6
18036 else
18037   
18038         ol_DB_LIB=-ldb-1
18039         ol_LIBS=$LIBS
18040         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18041
18042         cat > conftest.$ac_ext <<EOF
18043 #line 18044 "configure"
18044 #include "confdefs.h"
18045
18046 #ifdef HAVE_DB_185_H
18047 # include <db_185.h>
18048 #else
18049 # include <db.h>
18050 #endif
18051
18052 #ifndef DB_VERSION_MAJOR
18053 # define DB_VERSION_MAJOR 1
18054 #endif
18055
18056 #ifndef NULL
18057 #define NULL ((void*)0)
18058 #endif
18059
18060 int main() {
18061
18062 #if DB_VERSION_MAJOR > 1
18063         {
18064                 char *version;
18065                 int major, minor, patch;
18066
18067                 version = db_version( &major, &minor, &patch );
18068
18069                 if( major != DB_VERSION_MAJOR ||
18070                         minor < DB_VERSION_MINOR )
18071                 {
18072                         printf("Berkeley DB version mismatch\n"
18073                                 "\texpected: %s\n\tgot: %s\n",
18074                                 DB_VERSION_STRING, version);
18075                         return 1;
18076                 }
18077         }
18078 #endif
18079
18080 #if DB_VERSION_MAJOR > 2
18081         db_env_create( NULL, 0 );
18082 #elif DB_VERSION_MAJOR > 1
18083         db_appexit( NULL );
18084 #else
18085         (void) dbopen( NULL, 0, 0, 0, NULL);
18086 #endif
18087
18088 ; return 0; }
18089 EOF
18090 if { (eval echo configure:18091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18091   rm -rf conftest*
18092   ol_cv_db_db_1=yes
18093 else
18094   echo "configure: failed program was:" >&5
18095   cat conftest.$ac_ext >&5
18096   rm -rf conftest*
18097   ol_cv_db_db_1=no
18098 fi
18099 rm -f conftest*
18100
18101         LIBS="$ol_LIBS"
18102
18103 fi
18104
18105 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18106
18107         if test $ol_cv_db_db_1 = yes ; then
18108                 ol_cv_lib_db=-ldb-1
18109         fi
18110 fi
18111
18112
18113                 if test "$ol_cv_lib_db" != no ; then
18114                         ol_cv_berkeley_db=yes
18115                 fi
18116         fi
18117 fi
18118
18119         else
18120                 ol_cv_berkeley_db=no
18121 for ac_hdr in db.h
18122 do
18123 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18124 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18125 echo "configure:18126: checking for $ac_hdr" >&5
18126 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18127   echo $ac_n "(cached) $ac_c" 1>&6
18128 else
18129   cat > conftest.$ac_ext <<EOF
18130 #line 18131 "configure"
18131 #include "confdefs.h"
18132 #include <$ac_hdr>
18133 EOF
18134 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18135 { (eval echo configure:18136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18136 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18137 if test -z "$ac_err"; then
18138   rm -rf conftest*
18139   eval "ac_cv_header_$ac_safe=yes"
18140 else
18141   echo "$ac_err" >&5
18142   echo "configure: failed program was:" >&5
18143   cat conftest.$ac_ext >&5
18144   rm -rf conftest*
18145   eval "ac_cv_header_$ac_safe=no"
18146 fi
18147 rm -f conftest*
18148 fi
18149 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18150   echo "$ac_t""yes" 1>&6
18151     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18152   cat >> confdefs.h <<EOF
18153 #define $ac_tr_hdr 1
18154 EOF
18155  
18156 else
18157   echo "$ac_t""no" 1>&6
18158 fi
18159 done
18160
18161 if test $ac_cv_header_db_h = yes; then
18162         ol_cv_lib_db=no
18163 if test $ol_cv_lib_db = no ; then
18164         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18165 echo "configure:18166: checking for Berkeley DB link (default)" >&5
18166 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18167   echo $ac_n "(cached) $ac_c" 1>&6
18168 else
18169   
18170         ol_DB_LIB=
18171         ol_LIBS=$LIBS
18172         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18173
18174         cat > conftest.$ac_ext <<EOF
18175 #line 18176 "configure"
18176 #include "confdefs.h"
18177
18178 #ifdef HAVE_DB_185_H
18179 # include <db_185.h>
18180 #else
18181 # include <db.h>
18182 #endif
18183
18184 #ifndef DB_VERSION_MAJOR
18185 # define DB_VERSION_MAJOR 1
18186 #endif
18187
18188 #ifndef NULL
18189 #define NULL ((void*)0)
18190 #endif
18191
18192 int main() {
18193
18194 #if DB_VERSION_MAJOR > 1
18195         {
18196                 char *version;
18197                 int major, minor, patch;
18198
18199                 version = db_version( &major, &minor, &patch );
18200
18201                 if( major != DB_VERSION_MAJOR ||
18202                         minor < DB_VERSION_MINOR )
18203                 {
18204                         printf("Berkeley DB version mismatch\n"
18205                                 "\texpected: %s\n\tgot: %s\n",
18206                                 DB_VERSION_STRING, version);
18207                         return 1;
18208                 }
18209         }
18210 #endif
18211
18212 #if DB_VERSION_MAJOR > 2
18213         db_env_create( NULL, 0 );
18214 #elif DB_VERSION_MAJOR > 1
18215         db_appexit( NULL );
18216 #else
18217         (void) dbopen( NULL, 0, 0, 0, NULL);
18218 #endif
18219
18220 ; return 0; }
18221 EOF
18222 if { (eval echo configure:18223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18223   rm -rf conftest*
18224   ol_cv_db_none=yes
18225 else
18226   echo "configure: failed program was:" >&5
18227   cat conftest.$ac_ext >&5
18228   rm -rf conftest*
18229   ol_cv_db_none=no
18230 fi
18231 rm -f conftest*
18232
18233         LIBS="$ol_LIBS"
18234
18235 fi
18236
18237 echo "$ac_t""$ol_cv_db_none" 1>&6
18238
18239         if test $ol_cv_db_none = yes ; then
18240                 ol_cv_lib_db=yes
18241         fi
18242 fi
18243
18244 if test $ol_cv_lib_db = no ; then
18245         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18246 echo "configure:18247: checking for Berkeley DB link (-ldb42)" >&5
18247 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18248   echo $ac_n "(cached) $ac_c" 1>&6
18249 else
18250   
18251         ol_DB_LIB=-ldb42
18252         ol_LIBS=$LIBS
18253         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18254
18255         cat > conftest.$ac_ext <<EOF
18256 #line 18257 "configure"
18257 #include "confdefs.h"
18258
18259 #ifdef HAVE_DB_185_H
18260 # include <db_185.h>
18261 #else
18262 # include <db.h>
18263 #endif
18264
18265 #ifndef DB_VERSION_MAJOR
18266 # define DB_VERSION_MAJOR 1
18267 #endif
18268
18269 #ifndef NULL
18270 #define NULL ((void*)0)
18271 #endif
18272
18273 int main() {
18274
18275 #if DB_VERSION_MAJOR > 1
18276         {
18277                 char *version;
18278                 int major, minor, patch;
18279
18280                 version = db_version( &major, &minor, &patch );
18281
18282                 if( major != DB_VERSION_MAJOR ||
18283                         minor < DB_VERSION_MINOR )
18284                 {
18285                         printf("Berkeley DB version mismatch\n"
18286                                 "\texpected: %s\n\tgot: %s\n",
18287                                 DB_VERSION_STRING, version);
18288                         return 1;
18289                 }
18290         }
18291 #endif
18292
18293 #if DB_VERSION_MAJOR > 2
18294         db_env_create( NULL, 0 );
18295 #elif DB_VERSION_MAJOR > 1
18296         db_appexit( NULL );
18297 #else
18298         (void) dbopen( NULL, 0, 0, 0, NULL);
18299 #endif
18300
18301 ; return 0; }
18302 EOF
18303 if { (eval echo configure:18304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18304   rm -rf conftest*
18305   ol_cv_db_db42=yes
18306 else
18307   echo "configure: failed program was:" >&5
18308   cat conftest.$ac_ext >&5
18309   rm -rf conftest*
18310   ol_cv_db_db42=no
18311 fi
18312 rm -f conftest*
18313
18314         LIBS="$ol_LIBS"
18315
18316 fi
18317
18318 echo "$ac_t""$ol_cv_db_db42" 1>&6
18319
18320         if test $ol_cv_db_db42 = yes ; then
18321                 ol_cv_lib_db=-ldb42
18322         fi
18323 fi
18324
18325 if test $ol_cv_lib_db = no ; then
18326         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18327 echo "configure:18328: checking for Berkeley DB link (-ldb-42)" >&5
18328 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18329   echo $ac_n "(cached) $ac_c" 1>&6
18330 else
18331   
18332         ol_DB_LIB=-ldb-42
18333         ol_LIBS=$LIBS
18334         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18335
18336         cat > conftest.$ac_ext <<EOF
18337 #line 18338 "configure"
18338 #include "confdefs.h"
18339
18340 #ifdef HAVE_DB_185_H
18341 # include <db_185.h>
18342 #else
18343 # include <db.h>
18344 #endif
18345
18346 #ifndef DB_VERSION_MAJOR
18347 # define DB_VERSION_MAJOR 1
18348 #endif
18349
18350 #ifndef NULL
18351 #define NULL ((void*)0)
18352 #endif
18353
18354 int main() {
18355
18356 #if DB_VERSION_MAJOR > 1
18357         {
18358                 char *version;
18359                 int major, minor, patch;
18360
18361                 version = db_version( &major, &minor, &patch );
18362
18363                 if( major != DB_VERSION_MAJOR ||
18364                         minor < DB_VERSION_MINOR )
18365                 {
18366                         printf("Berkeley DB version mismatch\n"
18367                                 "\texpected: %s\n\tgot: %s\n",
18368                                 DB_VERSION_STRING, version);
18369                         return 1;
18370                 }
18371         }
18372 #endif
18373
18374 #if DB_VERSION_MAJOR > 2
18375         db_env_create( NULL, 0 );
18376 #elif DB_VERSION_MAJOR > 1
18377         db_appexit( NULL );
18378 #else
18379         (void) dbopen( NULL, 0, 0, 0, NULL);
18380 #endif
18381
18382 ; return 0; }
18383 EOF
18384 if { (eval echo configure:18385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18385   rm -rf conftest*
18386   ol_cv_db_db_42=yes
18387 else
18388   echo "configure: failed program was:" >&5
18389   cat conftest.$ac_ext >&5
18390   rm -rf conftest*
18391   ol_cv_db_db_42=no
18392 fi
18393 rm -f conftest*
18394
18395         LIBS="$ol_LIBS"
18396
18397 fi
18398
18399 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18400
18401         if test $ol_cv_db_db_42 = yes ; then
18402                 ol_cv_lib_db=-ldb-42
18403         fi
18404 fi
18405
18406 if test $ol_cv_lib_db = no ; then
18407         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18408 echo "configure:18409: checking for Berkeley DB link (-ldb-4.2)" >&5
18409 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18410   echo $ac_n "(cached) $ac_c" 1>&6
18411 else
18412   
18413         ol_DB_LIB=-ldb-4.2
18414         ol_LIBS=$LIBS
18415         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18416
18417         cat > conftest.$ac_ext <<EOF
18418 #line 18419 "configure"
18419 #include "confdefs.h"
18420
18421 #ifdef HAVE_DB_185_H
18422 # include <db_185.h>
18423 #else
18424 # include <db.h>
18425 #endif
18426
18427 #ifndef DB_VERSION_MAJOR
18428 # define DB_VERSION_MAJOR 1
18429 #endif
18430
18431 #ifndef NULL
18432 #define NULL ((void*)0)
18433 #endif
18434
18435 int main() {
18436
18437 #if DB_VERSION_MAJOR > 1
18438         {
18439                 char *version;
18440                 int major, minor, patch;
18441
18442                 version = db_version( &major, &minor, &patch );
18443
18444                 if( major != DB_VERSION_MAJOR ||
18445                         minor < DB_VERSION_MINOR )
18446                 {
18447                         printf("Berkeley DB version mismatch\n"
18448                                 "\texpected: %s\n\tgot: %s\n",
18449                                 DB_VERSION_STRING, version);
18450                         return 1;
18451                 }
18452         }
18453 #endif
18454
18455 #if DB_VERSION_MAJOR > 2
18456         db_env_create( NULL, 0 );
18457 #elif DB_VERSION_MAJOR > 1
18458         db_appexit( NULL );
18459 #else
18460         (void) dbopen( NULL, 0, 0, 0, NULL);
18461 #endif
18462
18463 ; return 0; }
18464 EOF
18465 if { (eval echo configure:18466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18466   rm -rf conftest*
18467   ol_cv_db_db_4_dot_2=yes
18468 else
18469   echo "configure: failed program was:" >&5
18470   cat conftest.$ac_ext >&5
18471   rm -rf conftest*
18472   ol_cv_db_db_4_dot_2=no
18473 fi
18474 rm -f conftest*
18475
18476         LIBS="$ol_LIBS"
18477
18478 fi
18479
18480 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18481
18482         if test $ol_cv_db_db_4_dot_2 = yes ; then
18483                 ol_cv_lib_db=-ldb-4.2
18484         fi
18485 fi
18486
18487 if test $ol_cv_lib_db = no ; then
18488         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18489 echo "configure:18490: checking for Berkeley DB link (-ldb-4-2)" >&5
18490 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18491   echo $ac_n "(cached) $ac_c" 1>&6
18492 else
18493   
18494         ol_DB_LIB=-ldb-4-2
18495         ol_LIBS=$LIBS
18496         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18497
18498         cat > conftest.$ac_ext <<EOF
18499 #line 18500 "configure"
18500 #include "confdefs.h"
18501
18502 #ifdef HAVE_DB_185_H
18503 # include <db_185.h>
18504 #else
18505 # include <db.h>
18506 #endif
18507
18508 #ifndef DB_VERSION_MAJOR
18509 # define DB_VERSION_MAJOR 1
18510 #endif
18511
18512 #ifndef NULL
18513 #define NULL ((void*)0)
18514 #endif
18515
18516 int main() {
18517
18518 #if DB_VERSION_MAJOR > 1
18519         {
18520                 char *version;
18521                 int major, minor, patch;
18522
18523                 version = db_version( &major, &minor, &patch );
18524
18525                 if( major != DB_VERSION_MAJOR ||
18526                         minor < DB_VERSION_MINOR )
18527                 {
18528                         printf("Berkeley DB version mismatch\n"
18529                                 "\texpected: %s\n\tgot: %s\n",
18530                                 DB_VERSION_STRING, version);
18531                         return 1;
18532                 }
18533         }
18534 #endif
18535
18536 #if DB_VERSION_MAJOR > 2
18537         db_env_create( NULL, 0 );
18538 #elif DB_VERSION_MAJOR > 1
18539         db_appexit( NULL );
18540 #else
18541         (void) dbopen( NULL, 0, 0, 0, NULL);
18542 #endif
18543
18544 ; return 0; }
18545 EOF
18546 if { (eval echo configure:18547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18547   rm -rf conftest*
18548   ol_cv_db_db_4_2=yes
18549 else
18550   echo "configure: failed program was:" >&5
18551   cat conftest.$ac_ext >&5
18552   rm -rf conftest*
18553   ol_cv_db_db_4_2=no
18554 fi
18555 rm -f conftest*
18556
18557         LIBS="$ol_LIBS"
18558
18559 fi
18560
18561 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18562
18563         if test $ol_cv_db_db_4_2 = yes ; then
18564                 ol_cv_lib_db=-ldb-4-2
18565         fi
18566 fi
18567
18568 if test $ol_cv_lib_db = no ; then
18569         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18570 echo "configure:18571: checking for Berkeley DB link (-ldb-4)" >&5
18571 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18572   echo $ac_n "(cached) $ac_c" 1>&6
18573 else
18574   
18575         ol_DB_LIB=-ldb-4
18576         ol_LIBS=$LIBS
18577         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18578
18579         cat > conftest.$ac_ext <<EOF
18580 #line 18581 "configure"
18581 #include "confdefs.h"
18582
18583 #ifdef HAVE_DB_185_H
18584 # include <db_185.h>
18585 #else
18586 # include <db.h>
18587 #endif
18588
18589 #ifndef DB_VERSION_MAJOR
18590 # define DB_VERSION_MAJOR 1
18591 #endif
18592
18593 #ifndef NULL
18594 #define NULL ((void*)0)
18595 #endif
18596
18597 int main() {
18598
18599 #if DB_VERSION_MAJOR > 1
18600         {
18601                 char *version;
18602                 int major, minor, patch;
18603
18604                 version = db_version( &major, &minor, &patch );
18605
18606                 if( major != DB_VERSION_MAJOR ||
18607                         minor < DB_VERSION_MINOR )
18608                 {
18609                         printf("Berkeley DB version mismatch\n"
18610                                 "\texpected: %s\n\tgot: %s\n",
18611                                 DB_VERSION_STRING, version);
18612                         return 1;
18613                 }
18614         }
18615 #endif
18616
18617 #if DB_VERSION_MAJOR > 2
18618         db_env_create( NULL, 0 );
18619 #elif DB_VERSION_MAJOR > 1
18620         db_appexit( NULL );
18621 #else
18622         (void) dbopen( NULL, 0, 0, 0, NULL);
18623 #endif
18624
18625 ; return 0; }
18626 EOF
18627 if { (eval echo configure:18628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18628   rm -rf conftest*
18629   ol_cv_db_db_4=yes
18630 else
18631   echo "configure: failed program was:" >&5
18632   cat conftest.$ac_ext >&5
18633   rm -rf conftest*
18634   ol_cv_db_db_4=no
18635 fi
18636 rm -f conftest*
18637
18638         LIBS="$ol_LIBS"
18639
18640 fi
18641
18642 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18643
18644         if test $ol_cv_db_db_4 = yes ; then
18645                 ol_cv_lib_db=-ldb-4
18646         fi
18647 fi
18648
18649 if test $ol_cv_lib_db = no ; then
18650         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18651 echo "configure:18652: checking for Berkeley DB link (-ldb4)" >&5
18652 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18653   echo $ac_n "(cached) $ac_c" 1>&6
18654 else
18655   
18656         ol_DB_LIB=-ldb4
18657         ol_LIBS=$LIBS
18658         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18659
18660         cat > conftest.$ac_ext <<EOF
18661 #line 18662 "configure"
18662 #include "confdefs.h"
18663
18664 #ifdef HAVE_DB_185_H
18665 # include <db_185.h>
18666 #else
18667 # include <db.h>
18668 #endif
18669
18670 #ifndef DB_VERSION_MAJOR
18671 # define DB_VERSION_MAJOR 1
18672 #endif
18673
18674 #ifndef NULL
18675 #define NULL ((void*)0)
18676 #endif
18677
18678 int main() {
18679
18680 #if DB_VERSION_MAJOR > 1
18681         {
18682                 char *version;
18683                 int major, minor, patch;
18684
18685                 version = db_version( &major, &minor, &patch );
18686
18687                 if( major != DB_VERSION_MAJOR ||
18688                         minor < DB_VERSION_MINOR )
18689                 {
18690                         printf("Berkeley DB version mismatch\n"
18691                                 "\texpected: %s\n\tgot: %s\n",
18692                                 DB_VERSION_STRING, version);
18693                         return 1;
18694                 }
18695         }
18696 #endif
18697
18698 #if DB_VERSION_MAJOR > 2
18699         db_env_create( NULL, 0 );
18700 #elif DB_VERSION_MAJOR > 1
18701         db_appexit( NULL );
18702 #else
18703         (void) dbopen( NULL, 0, 0, 0, NULL);
18704 #endif
18705
18706 ; return 0; }
18707 EOF
18708 if { (eval echo configure:18709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18709   rm -rf conftest*
18710   ol_cv_db_db4=yes
18711 else
18712   echo "configure: failed program was:" >&5
18713   cat conftest.$ac_ext >&5
18714   rm -rf conftest*
18715   ol_cv_db_db4=no
18716 fi
18717 rm -f conftest*
18718
18719         LIBS="$ol_LIBS"
18720
18721 fi
18722
18723 echo "$ac_t""$ol_cv_db_db4" 1>&6
18724
18725         if test $ol_cv_db_db4 = yes ; then
18726                 ol_cv_lib_db=-ldb4
18727         fi
18728 fi
18729
18730 if test $ol_cv_lib_db = no ; then
18731         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18732 echo "configure:18733: checking for Berkeley DB link (-ldb)" >&5
18733 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18734   echo $ac_n "(cached) $ac_c" 1>&6
18735 else
18736   
18737         ol_DB_LIB=-ldb
18738         ol_LIBS=$LIBS
18739         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18740
18741         cat > conftest.$ac_ext <<EOF
18742 #line 18743 "configure"
18743 #include "confdefs.h"
18744
18745 #ifdef HAVE_DB_185_H
18746 # include <db_185.h>
18747 #else
18748 # include <db.h>
18749 #endif
18750
18751 #ifndef DB_VERSION_MAJOR
18752 # define DB_VERSION_MAJOR 1
18753 #endif
18754
18755 #ifndef NULL
18756 #define NULL ((void*)0)
18757 #endif
18758
18759 int main() {
18760
18761 #if DB_VERSION_MAJOR > 1
18762         {
18763                 char *version;
18764                 int major, minor, patch;
18765
18766                 version = db_version( &major, &minor, &patch );
18767
18768                 if( major != DB_VERSION_MAJOR ||
18769                         minor < DB_VERSION_MINOR )
18770                 {
18771                         printf("Berkeley DB version mismatch\n"
18772                                 "\texpected: %s\n\tgot: %s\n",
18773                                 DB_VERSION_STRING, version);
18774                         return 1;
18775                 }
18776         }
18777 #endif
18778
18779 #if DB_VERSION_MAJOR > 2
18780         db_env_create( NULL, 0 );
18781 #elif DB_VERSION_MAJOR > 1
18782         db_appexit( NULL );
18783 #else
18784         (void) dbopen( NULL, 0, 0, 0, NULL);
18785 #endif
18786
18787 ; return 0; }
18788 EOF
18789 if { (eval echo configure:18790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18790   rm -rf conftest*
18791   ol_cv_db_db=yes
18792 else
18793   echo "configure: failed program was:" >&5
18794   cat conftest.$ac_ext >&5
18795   rm -rf conftest*
18796   ol_cv_db_db=no
18797 fi
18798 rm -f conftest*
18799
18800         LIBS="$ol_LIBS"
18801
18802 fi
18803
18804 echo "$ac_t""$ol_cv_db_db" 1>&6
18805
18806         if test $ol_cv_db_db = yes ; then
18807                 ol_cv_lib_db=-ldb
18808         fi
18809 fi
18810
18811 if test $ol_cv_lib_db = no ; then
18812         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18813 echo "configure:18814: checking for Berkeley DB link (-ldb41)" >&5
18814 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18815   echo $ac_n "(cached) $ac_c" 1>&6
18816 else
18817   
18818         ol_DB_LIB=-ldb41
18819         ol_LIBS=$LIBS
18820         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18821
18822         cat > conftest.$ac_ext <<EOF
18823 #line 18824 "configure"
18824 #include "confdefs.h"
18825
18826 #ifdef HAVE_DB_185_H
18827 # include <db_185.h>
18828 #else
18829 # include <db.h>
18830 #endif
18831
18832 #ifndef DB_VERSION_MAJOR
18833 # define DB_VERSION_MAJOR 1
18834 #endif
18835
18836 #ifndef NULL
18837 #define NULL ((void*)0)
18838 #endif
18839
18840 int main() {
18841
18842 #if DB_VERSION_MAJOR > 1
18843         {
18844                 char *version;
18845                 int major, minor, patch;
18846
18847                 version = db_version( &major, &minor, &patch );
18848
18849                 if( major != DB_VERSION_MAJOR ||
18850                         minor < DB_VERSION_MINOR )
18851                 {
18852                         printf("Berkeley DB version mismatch\n"
18853                                 "\texpected: %s\n\tgot: %s\n",
18854                                 DB_VERSION_STRING, version);
18855                         return 1;
18856                 }
18857         }
18858 #endif
18859
18860 #if DB_VERSION_MAJOR > 2
18861         db_env_create( NULL, 0 );
18862 #elif DB_VERSION_MAJOR > 1
18863         db_appexit( NULL );
18864 #else
18865         (void) dbopen( NULL, 0, 0, 0, NULL);
18866 #endif
18867
18868 ; return 0; }
18869 EOF
18870 if { (eval echo configure:18871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18871   rm -rf conftest*
18872   ol_cv_db_db41=yes
18873 else
18874   echo "configure: failed program was:" >&5
18875   cat conftest.$ac_ext >&5
18876   rm -rf conftest*
18877   ol_cv_db_db41=no
18878 fi
18879 rm -f conftest*
18880
18881         LIBS="$ol_LIBS"
18882
18883 fi
18884
18885 echo "$ac_t""$ol_cv_db_db41" 1>&6
18886
18887         if test $ol_cv_db_db41 = yes ; then
18888                 ol_cv_lib_db=-ldb41
18889         fi
18890 fi
18891
18892 if test $ol_cv_lib_db = no ; then
18893         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18894 echo "configure:18895: checking for Berkeley DB link (-ldb-41)" >&5
18895 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18896   echo $ac_n "(cached) $ac_c" 1>&6
18897 else
18898   
18899         ol_DB_LIB=-ldb-41
18900         ol_LIBS=$LIBS
18901         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18902
18903         cat > conftest.$ac_ext <<EOF
18904 #line 18905 "configure"
18905 #include "confdefs.h"
18906
18907 #ifdef HAVE_DB_185_H
18908 # include <db_185.h>
18909 #else
18910 # include <db.h>
18911 #endif
18912
18913 #ifndef DB_VERSION_MAJOR
18914 # define DB_VERSION_MAJOR 1
18915 #endif
18916
18917 #ifndef NULL
18918 #define NULL ((void*)0)
18919 #endif
18920
18921 int main() {
18922
18923 #if DB_VERSION_MAJOR > 1
18924         {
18925                 char *version;
18926                 int major, minor, patch;
18927
18928                 version = db_version( &major, &minor, &patch );
18929
18930                 if( major != DB_VERSION_MAJOR ||
18931                         minor < DB_VERSION_MINOR )
18932                 {
18933                         printf("Berkeley DB version mismatch\n"
18934                                 "\texpected: %s\n\tgot: %s\n",
18935                                 DB_VERSION_STRING, version);
18936                         return 1;
18937                 }
18938         }
18939 #endif
18940
18941 #if DB_VERSION_MAJOR > 2
18942         db_env_create( NULL, 0 );
18943 #elif DB_VERSION_MAJOR > 1
18944         db_appexit( NULL );
18945 #else
18946         (void) dbopen( NULL, 0, 0, 0, NULL);
18947 #endif
18948
18949 ; return 0; }
18950 EOF
18951 if { (eval echo configure:18952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18952   rm -rf conftest*
18953   ol_cv_db_db_41=yes
18954 else
18955   echo "configure: failed program was:" >&5
18956   cat conftest.$ac_ext >&5
18957   rm -rf conftest*
18958   ol_cv_db_db_41=no
18959 fi
18960 rm -f conftest*
18961
18962         LIBS="$ol_LIBS"
18963
18964 fi
18965
18966 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18967
18968         if test $ol_cv_db_db_41 = yes ; then
18969                 ol_cv_lib_db=-ldb-41
18970         fi
18971 fi
18972
18973 if test $ol_cv_lib_db = no ; then
18974         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18975 echo "configure:18976: checking for Berkeley DB link (-ldb-4.1)" >&5
18976 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18977   echo $ac_n "(cached) $ac_c" 1>&6
18978 else
18979   
18980         ol_DB_LIB=-ldb-4.1
18981         ol_LIBS=$LIBS
18982         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18983
18984         cat > conftest.$ac_ext <<EOF
18985 #line 18986 "configure"
18986 #include "confdefs.h"
18987
18988 #ifdef HAVE_DB_185_H
18989 # include <db_185.h>
18990 #else
18991 # include <db.h>
18992 #endif
18993
18994 #ifndef DB_VERSION_MAJOR
18995 # define DB_VERSION_MAJOR 1
18996 #endif
18997
18998 #ifndef NULL
18999 #define NULL ((void*)0)
19000 #endif
19001
19002 int main() {
19003
19004 #if DB_VERSION_MAJOR > 1
19005         {
19006                 char *version;
19007                 int major, minor, patch;
19008
19009                 version = db_version( &major, &minor, &patch );
19010
19011                 if( major != DB_VERSION_MAJOR ||
19012                         minor < DB_VERSION_MINOR )
19013                 {
19014                         printf("Berkeley DB version mismatch\n"
19015                                 "\texpected: %s\n\tgot: %s\n",
19016                                 DB_VERSION_STRING, version);
19017                         return 1;
19018                 }
19019         }
19020 #endif
19021
19022 #if DB_VERSION_MAJOR > 2
19023         db_env_create( NULL, 0 );
19024 #elif DB_VERSION_MAJOR > 1
19025         db_appexit( NULL );
19026 #else
19027         (void) dbopen( NULL, 0, 0, 0, NULL);
19028 #endif
19029
19030 ; return 0; }
19031 EOF
19032 if { (eval echo configure:19033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19033   rm -rf conftest*
19034   ol_cv_db_db_4_dot_1=yes
19035 else
19036   echo "configure: failed program was:" >&5
19037   cat conftest.$ac_ext >&5
19038   rm -rf conftest*
19039   ol_cv_db_db_4_dot_1=no
19040 fi
19041 rm -f conftest*
19042
19043         LIBS="$ol_LIBS"
19044
19045 fi
19046
19047 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19048
19049         if test $ol_cv_db_db_4_dot_1 = yes ; then
19050                 ol_cv_lib_db=-ldb-4.1
19051         fi
19052 fi
19053
19054 if test $ol_cv_lib_db = no ; then
19055         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19056 echo "configure:19057: checking for Berkeley DB link (-ldb-4-1)" >&5
19057 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19058   echo $ac_n "(cached) $ac_c" 1>&6
19059 else
19060   
19061         ol_DB_LIB=-ldb-4-1
19062         ol_LIBS=$LIBS
19063         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19064
19065         cat > conftest.$ac_ext <<EOF
19066 #line 19067 "configure"
19067 #include "confdefs.h"
19068
19069 #ifdef HAVE_DB_185_H
19070 # include <db_185.h>
19071 #else
19072 # include <db.h>
19073 #endif
19074
19075 #ifndef DB_VERSION_MAJOR
19076 # define DB_VERSION_MAJOR 1
19077 #endif
19078
19079 #ifndef NULL
19080 #define NULL ((void*)0)
19081 #endif
19082
19083 int main() {
19084
19085 #if DB_VERSION_MAJOR > 1
19086         {
19087                 char *version;
19088                 int major, minor, patch;
19089
19090                 version = db_version( &major, &minor, &patch );
19091
19092                 if( major != DB_VERSION_MAJOR ||
19093                         minor < DB_VERSION_MINOR )
19094                 {
19095                         printf("Berkeley DB version mismatch\n"
19096                                 "\texpected: %s\n\tgot: %s\n",
19097                                 DB_VERSION_STRING, version);
19098                         return 1;
19099                 }
19100         }
19101 #endif
19102
19103 #if DB_VERSION_MAJOR > 2
19104         db_env_create( NULL, 0 );
19105 #elif DB_VERSION_MAJOR > 1
19106         db_appexit( NULL );
19107 #else
19108         (void) dbopen( NULL, 0, 0, 0, NULL);
19109 #endif
19110
19111 ; return 0; }
19112 EOF
19113 if { (eval echo configure:19114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19114   rm -rf conftest*
19115   ol_cv_db_db_4_1=yes
19116 else
19117   echo "configure: failed program was:" >&5
19118   cat conftest.$ac_ext >&5
19119   rm -rf conftest*
19120   ol_cv_db_db_4_1=no
19121 fi
19122 rm -f conftest*
19123
19124         LIBS="$ol_LIBS"
19125
19126 fi
19127
19128 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19129
19130         if test $ol_cv_db_db_4_1 = yes ; then
19131                 ol_cv_lib_db=-ldb-4-1
19132         fi
19133 fi
19134
19135 if test $ol_cv_lib_db = no ; then
19136         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19137 echo "configure:19138: checking for Berkeley DB link (-ldb3)" >&5
19138 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19139   echo $ac_n "(cached) $ac_c" 1>&6
19140 else
19141   
19142         ol_DB_LIB=-ldb3
19143         ol_LIBS=$LIBS
19144         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19145
19146         cat > conftest.$ac_ext <<EOF
19147 #line 19148 "configure"
19148 #include "confdefs.h"
19149
19150 #ifdef HAVE_DB_185_H
19151 # include <db_185.h>
19152 #else
19153 # include <db.h>
19154 #endif
19155
19156 #ifndef DB_VERSION_MAJOR
19157 # define DB_VERSION_MAJOR 1
19158 #endif
19159
19160 #ifndef NULL
19161 #define NULL ((void*)0)
19162 #endif
19163
19164 int main() {
19165
19166 #if DB_VERSION_MAJOR > 1
19167         {
19168                 char *version;
19169                 int major, minor, patch;
19170
19171                 version = db_version( &major, &minor, &patch );
19172
19173                 if( major != DB_VERSION_MAJOR ||
19174                         minor < DB_VERSION_MINOR )
19175                 {
19176                         printf("Berkeley DB version mismatch\n"
19177                                 "\texpected: %s\n\tgot: %s\n",
19178                                 DB_VERSION_STRING, version);
19179                         return 1;
19180                 }
19181         }
19182 #endif
19183
19184 #if DB_VERSION_MAJOR > 2
19185         db_env_create( NULL, 0 );
19186 #elif DB_VERSION_MAJOR > 1
19187         db_appexit( NULL );
19188 #else
19189         (void) dbopen( NULL, 0, 0, 0, NULL);
19190 #endif
19191
19192 ; return 0; }
19193 EOF
19194 if { (eval echo configure:19195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19195   rm -rf conftest*
19196   ol_cv_db_db3=yes
19197 else
19198   echo "configure: failed program was:" >&5
19199   cat conftest.$ac_ext >&5
19200   rm -rf conftest*
19201   ol_cv_db_db3=no
19202 fi
19203 rm -f conftest*
19204
19205         LIBS="$ol_LIBS"
19206
19207 fi
19208
19209 echo "$ac_t""$ol_cv_db_db3" 1>&6
19210
19211         if test $ol_cv_db_db3 = yes ; then
19212                 ol_cv_lib_db=-ldb3
19213         fi
19214 fi
19215
19216 if test $ol_cv_lib_db = no ; then
19217         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19218 echo "configure:19219: checking for Berkeley DB link (-ldb-3)" >&5
19219 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19220   echo $ac_n "(cached) $ac_c" 1>&6
19221 else
19222   
19223         ol_DB_LIB=-ldb-3
19224         ol_LIBS=$LIBS
19225         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19226
19227         cat > conftest.$ac_ext <<EOF
19228 #line 19229 "configure"
19229 #include "confdefs.h"
19230
19231 #ifdef HAVE_DB_185_H
19232 # include <db_185.h>
19233 #else
19234 # include <db.h>
19235 #endif
19236
19237 #ifndef DB_VERSION_MAJOR
19238 # define DB_VERSION_MAJOR 1
19239 #endif
19240
19241 #ifndef NULL
19242 #define NULL ((void*)0)
19243 #endif
19244
19245 int main() {
19246
19247 #if DB_VERSION_MAJOR > 1
19248         {
19249                 char *version;
19250                 int major, minor, patch;
19251
19252                 version = db_version( &major, &minor, &patch );
19253
19254                 if( major != DB_VERSION_MAJOR ||
19255                         minor < DB_VERSION_MINOR )
19256                 {
19257                         printf("Berkeley DB version mismatch\n"
19258                                 "\texpected: %s\n\tgot: %s\n",
19259                                 DB_VERSION_STRING, version);
19260                         return 1;
19261                 }
19262         }
19263 #endif
19264
19265 #if DB_VERSION_MAJOR > 2
19266         db_env_create( NULL, 0 );
19267 #elif DB_VERSION_MAJOR > 1
19268         db_appexit( NULL );
19269 #else
19270         (void) dbopen( NULL, 0, 0, 0, NULL);
19271 #endif
19272
19273 ; return 0; }
19274 EOF
19275 if { (eval echo configure:19276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19276   rm -rf conftest*
19277   ol_cv_db_db_3=yes
19278 else
19279   echo "configure: failed program was:" >&5
19280   cat conftest.$ac_ext >&5
19281   rm -rf conftest*
19282   ol_cv_db_db_3=no
19283 fi
19284 rm -f conftest*
19285
19286         LIBS="$ol_LIBS"
19287
19288 fi
19289
19290 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19291
19292         if test $ol_cv_db_db_3 = yes ; then
19293                 ol_cv_lib_db=-ldb-3
19294         fi
19295 fi
19296
19297 if test $ol_cv_lib_db = no ; then
19298         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19299 echo "configure:19300: checking for Berkeley DB link (-ldb2)" >&5
19300 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19301   echo $ac_n "(cached) $ac_c" 1>&6
19302 else
19303   
19304         ol_DB_LIB=-ldb2
19305         ol_LIBS=$LIBS
19306         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19307
19308         cat > conftest.$ac_ext <<EOF
19309 #line 19310 "configure"
19310 #include "confdefs.h"
19311
19312 #ifdef HAVE_DB_185_H
19313 # include <db_185.h>
19314 #else
19315 # include <db.h>
19316 #endif
19317
19318 #ifndef DB_VERSION_MAJOR
19319 # define DB_VERSION_MAJOR 1
19320 #endif
19321
19322 #ifndef NULL
19323 #define NULL ((void*)0)
19324 #endif
19325
19326 int main() {
19327
19328 #if DB_VERSION_MAJOR > 1
19329         {
19330                 char *version;
19331                 int major, minor, patch;
19332
19333                 version = db_version( &major, &minor, &patch );
19334
19335                 if( major != DB_VERSION_MAJOR ||
19336                         minor < DB_VERSION_MINOR )
19337                 {
19338                         printf("Berkeley DB version mismatch\n"
19339                                 "\texpected: %s\n\tgot: %s\n",
19340                                 DB_VERSION_STRING, version);
19341                         return 1;
19342                 }
19343         }
19344 #endif
19345
19346 #if DB_VERSION_MAJOR > 2
19347         db_env_create( NULL, 0 );
19348 #elif DB_VERSION_MAJOR > 1
19349         db_appexit( NULL );
19350 #else
19351         (void) dbopen( NULL, 0, 0, 0, NULL);
19352 #endif
19353
19354 ; return 0; }
19355 EOF
19356 if { (eval echo configure:19357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19357   rm -rf conftest*
19358   ol_cv_db_db2=yes
19359 else
19360   echo "configure: failed program was:" >&5
19361   cat conftest.$ac_ext >&5
19362   rm -rf conftest*
19363   ol_cv_db_db2=no
19364 fi
19365 rm -f conftest*
19366
19367         LIBS="$ol_LIBS"
19368
19369 fi
19370
19371 echo "$ac_t""$ol_cv_db_db2" 1>&6
19372
19373         if test $ol_cv_db_db2 = yes ; then
19374                 ol_cv_lib_db=-ldb2
19375         fi
19376 fi
19377
19378 if test $ol_cv_lib_db = no ; then
19379         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19380 echo "configure:19381: checking for Berkeley DB link (-ldb-2)" >&5
19381 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19382   echo $ac_n "(cached) $ac_c" 1>&6
19383 else
19384   
19385         ol_DB_LIB=-ldb-2
19386         ol_LIBS=$LIBS
19387         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19388
19389         cat > conftest.$ac_ext <<EOF
19390 #line 19391 "configure"
19391 #include "confdefs.h"
19392
19393 #ifdef HAVE_DB_185_H
19394 # include <db_185.h>
19395 #else
19396 # include <db.h>
19397 #endif
19398
19399 #ifndef DB_VERSION_MAJOR
19400 # define DB_VERSION_MAJOR 1
19401 #endif
19402
19403 #ifndef NULL
19404 #define NULL ((void*)0)
19405 #endif
19406
19407 int main() {
19408
19409 #if DB_VERSION_MAJOR > 1
19410         {
19411                 char *version;
19412                 int major, minor, patch;
19413
19414                 version = db_version( &major, &minor, &patch );
19415
19416                 if( major != DB_VERSION_MAJOR ||
19417                         minor < DB_VERSION_MINOR )
19418                 {
19419                         printf("Berkeley DB version mismatch\n"
19420                                 "\texpected: %s\n\tgot: %s\n",
19421                                 DB_VERSION_STRING, version);
19422                         return 1;
19423                 }
19424         }
19425 #endif
19426
19427 #if DB_VERSION_MAJOR > 2
19428         db_env_create( NULL, 0 );
19429 #elif DB_VERSION_MAJOR > 1
19430         db_appexit( NULL );
19431 #else
19432         (void) dbopen( NULL, 0, 0, 0, NULL);
19433 #endif
19434
19435 ; return 0; }
19436 EOF
19437 if { (eval echo configure:19438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19438   rm -rf conftest*
19439   ol_cv_db_db_2=yes
19440 else
19441   echo "configure: failed program was:" >&5
19442   cat conftest.$ac_ext >&5
19443   rm -rf conftest*
19444   ol_cv_db_db_2=no
19445 fi
19446 rm -f conftest*
19447
19448         LIBS="$ol_LIBS"
19449
19450 fi
19451
19452 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19453
19454         if test $ol_cv_db_db_2 = yes ; then
19455                 ol_cv_lib_db=-ldb-2
19456         fi
19457 fi
19458
19459 if test $ol_cv_lib_db = no ; then
19460         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19461 echo "configure:19462: checking for Berkeley DB link (-ldb1)" >&5
19462 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19463   echo $ac_n "(cached) $ac_c" 1>&6
19464 else
19465   
19466         ol_DB_LIB=-ldb1
19467         ol_LIBS=$LIBS
19468         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19469
19470         cat > conftest.$ac_ext <<EOF
19471 #line 19472 "configure"
19472 #include "confdefs.h"
19473
19474 #ifdef HAVE_DB_185_H
19475 # include <db_185.h>
19476 #else
19477 # include <db.h>
19478 #endif
19479
19480 #ifndef DB_VERSION_MAJOR
19481 # define DB_VERSION_MAJOR 1
19482 #endif
19483
19484 #ifndef NULL
19485 #define NULL ((void*)0)
19486 #endif
19487
19488 int main() {
19489
19490 #if DB_VERSION_MAJOR > 1
19491         {
19492                 char *version;
19493                 int major, minor, patch;
19494
19495                 version = db_version( &major, &minor, &patch );
19496
19497                 if( major != DB_VERSION_MAJOR ||
19498                         minor < DB_VERSION_MINOR )
19499                 {
19500                         printf("Berkeley DB version mismatch\n"
19501                                 "\texpected: %s\n\tgot: %s\n",
19502                                 DB_VERSION_STRING, version);
19503                         return 1;
19504                 }
19505         }
19506 #endif
19507
19508 #if DB_VERSION_MAJOR > 2
19509         db_env_create( NULL, 0 );
19510 #elif DB_VERSION_MAJOR > 1
19511         db_appexit( NULL );
19512 #else
19513         (void) dbopen( NULL, 0, 0, 0, NULL);
19514 #endif
19515
19516 ; return 0; }
19517 EOF
19518 if { (eval echo configure:19519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19519   rm -rf conftest*
19520   ol_cv_db_db1=yes
19521 else
19522   echo "configure: failed program was:" >&5
19523   cat conftest.$ac_ext >&5
19524   rm -rf conftest*
19525   ol_cv_db_db1=no
19526 fi
19527 rm -f conftest*
19528
19529         LIBS="$ol_LIBS"
19530
19531 fi
19532
19533 echo "$ac_t""$ol_cv_db_db1" 1>&6
19534
19535         if test $ol_cv_db_db1 = yes ; then
19536                 ol_cv_lib_db=-ldb1
19537         fi
19538 fi
19539
19540 if test $ol_cv_lib_db = no ; then
19541         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19542 echo "configure:19543: checking for Berkeley DB link (-ldb-1)" >&5
19543 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19544   echo $ac_n "(cached) $ac_c" 1>&6
19545 else
19546   
19547         ol_DB_LIB=-ldb-1
19548         ol_LIBS=$LIBS
19549         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19550
19551         cat > conftest.$ac_ext <<EOF
19552 #line 19553 "configure"
19553 #include "confdefs.h"
19554
19555 #ifdef HAVE_DB_185_H
19556 # include <db_185.h>
19557 #else
19558 # include <db.h>
19559 #endif
19560
19561 #ifndef DB_VERSION_MAJOR
19562 # define DB_VERSION_MAJOR 1
19563 #endif
19564
19565 #ifndef NULL
19566 #define NULL ((void*)0)
19567 #endif
19568
19569 int main() {
19570
19571 #if DB_VERSION_MAJOR > 1
19572         {
19573                 char *version;
19574                 int major, minor, patch;
19575
19576                 version = db_version( &major, &minor, &patch );
19577
19578                 if( major != DB_VERSION_MAJOR ||
19579                         minor < DB_VERSION_MINOR )
19580                 {
19581                         printf("Berkeley DB version mismatch\n"
19582                                 "\texpected: %s\n\tgot: %s\n",
19583                                 DB_VERSION_STRING, version);
19584                         return 1;
19585                 }
19586         }
19587 #endif
19588
19589 #if DB_VERSION_MAJOR > 2
19590         db_env_create( NULL, 0 );
19591 #elif DB_VERSION_MAJOR > 1
19592         db_appexit( NULL );
19593 #else
19594         (void) dbopen( NULL, 0, 0, 0, NULL);
19595 #endif
19596
19597 ; return 0; }
19598 EOF
19599 if { (eval echo configure:19600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19600   rm -rf conftest*
19601   ol_cv_db_db_1=yes
19602 else
19603   echo "configure: failed program was:" >&5
19604   cat conftest.$ac_ext >&5
19605   rm -rf conftest*
19606   ol_cv_db_db_1=no
19607 fi
19608 rm -f conftest*
19609
19610         LIBS="$ol_LIBS"
19611
19612 fi
19613
19614 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19615
19616         if test $ol_cv_db_db_1 = yes ; then
19617                 ol_cv_lib_db=-ldb-1
19618         fi
19619 fi
19620
19621
19622         if test "$ol_cv_lib_db" != no ; then
19623                 ol_cv_berkeley_db=yes
19624                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19625 echo "configure:19626: checking for Berkeley DB thread support" >&5
19626 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19627   echo $ac_n "(cached) $ac_c" 1>&6
19628 else
19629   
19630         ol_LIBS="$LIBS"
19631         LIBS="$LTHREAD_LIBS $LIBS"
19632         if test $ol_cv_lib_db != yes ; then
19633                 LIBS="$ol_cv_lib_db $LIBS"
19634         fi
19635
19636         if test "$cross_compiling" = yes; then
19637   ol_cv_berkeley_db_thread=cross
19638 else
19639   cat > conftest.$ac_ext <<EOF
19640 #line 19641 "configure"
19641 #include "confdefs.h"
19642
19643 #ifdef HAVE_DB_185_H
19644         choke me;
19645 #else
19646 #include <db.h>
19647 #endif
19648 #ifndef NULL
19649 #define NULL ((void *)0)
19650 #endif
19651 main()
19652 {
19653         int rc;
19654         u_int32_t flags = DB_CREATE |
19655 #ifdef DB_PRIVATE
19656                 DB_PRIVATE |
19657 #endif
19658                 DB_THREAD;
19659
19660 #if DB_VERSION_MAJOR > 2
19661         DB_ENV *env = NULL;
19662
19663         rc = db_env_create( &env, 0 );
19664
19665         flags |= DB_INIT_MPOOL;
19666 #ifdef DB_MPOOL_PRIVATE
19667         flags |= DB_MPOOL_PRIVATE;
19668 #endif
19669
19670         if( rc ) {
19671                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19672                 return rc;
19673         }
19674
19675 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19676         rc = env->open( env, NULL, flags, 0 );
19677 #else
19678         rc = env->open( env, NULL, NULL, flags, 0 );
19679 #endif
19680
19681         if ( rc == 0 ) {
19682                 rc = env->close( env, 0 );
19683         }
19684
19685         if( rc ) {
19686                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19687                 return rc;
19688         }
19689
19690 #else
19691         DB_ENV env;
19692         memset( &env, '\0', sizeof(env) );
19693
19694         rc = db_appinit( NULL, NULL, &env, flags );
19695
19696         if( rc == 0 ) {
19697                 db_appexit( &env );
19698         }
19699
19700         unlink("__db_mpool.share");
19701         unlink("__db_lock.share");
19702 #endif
19703
19704         return rc;
19705 }
19706 EOF
19707 if { (eval echo configure:19708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19708 then
19709   ol_cv_berkeley_db_thread=yes
19710 else
19711   echo "configure: failed program was:" >&5
19712   cat conftest.$ac_ext >&5
19713   rm -fr conftest*
19714   ol_cv_berkeley_db_thread=no
19715 fi
19716 rm -fr conftest*
19717 fi
19718
19719
19720         LIBS="$ol_LIBS"
19721
19722 fi
19723
19724 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19725
19726         if test $ol_cv_berkeley_db_thread != no ; then
19727                 cat >> confdefs.h <<\EOF
19728 #define HAVE_BERKELEY_DB_THREAD 1
19729 EOF
19730
19731         fi
19732
19733         fi
19734 fi
19735
19736         fi
19737
19738         if test $ol_cv_berkeley_db != no ; then
19739                 cat >> confdefs.h <<\EOF
19740 #define HAVE_BERKELEY_DB 1
19741 EOF
19742
19743
19744                 ol_link_ldbm=berkeley
19745                 ol_with_ldbm_api=berkeley
19746
19747                 if test $ol_with_ldbm_type = hash ; then
19748                         cat >> confdefs.h <<\EOF
19749 #define LDBM_USE_DBHASH 1
19750 EOF
19751
19752                 else
19753                         cat >> confdefs.h <<\EOF
19754 #define LDBM_USE_DBBTREE 1
19755 EOF
19756
19757                 fi
19758
19759                                                 if test $ol_cv_lib_db != yes ; then
19760                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19761                 fi
19762         fi
19763 fi
19764
19765 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19766         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19767 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19768         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19769 echo "configure:19770: checking Berkeley DB version for BDB backend" >&5
19770 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19771   echo $ac_n "(cached) $ac_c" 1>&6
19772 else
19773   
19774         cat > conftest.$ac_ext <<EOF
19775 #line 19776 "configure"
19776 #include "confdefs.h"
19777
19778 #include <db.h>
19779
19780  /* this check could be improved */
19781 #ifndef DB_VERSION_MAJOR
19782 #       define DB_VERSION_MAJOR 1
19783 #endif
19784 #ifndef DB_VERSION_MINOR
19785 #       define DB_VERSION_MINOR 0
19786 #endif
19787
19788 /* require 4.2 or later */
19789 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19790         __db_version_compat
19791 #endif
19792         
19793 EOF
19794 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19795   egrep "__db_version_compat" >/dev/null 2>&1; then
19796   rm -rf conftest*
19797   ol_cv_bdb_compat=yes
19798 else
19799   rm -rf conftest*
19800   ol_cv_bdb_compat=no
19801 fi
19802 rm -f conftest*
19803
19804 fi
19805
19806 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19807
19808
19809         if test $ol_cv_bdb_compat = yes ; then
19810                 ol_enable_bdb=yes
19811         elif test $ol_enable_bdb = yes ; then
19812                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19813         else
19814                 ol_enable_bdb=no
19815         fi
19816 fi
19817 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19818         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19819 fi
19820
19821 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19822         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19823         ol_with_ldbm_api=none
19824 fi
19825
19826 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19827         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19828 echo "configure:19829: checking for MDBM library" >&5
19829 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19830   echo $ac_n "(cached) $ac_c" 1>&6
19831 else
19832         ol_LIBS="$LIBS"
19833         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19834 echo "configure:19835: checking for mdbm_set_chain" >&5
19835 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19836   echo $ac_n "(cached) $ac_c" 1>&6
19837 else
19838   cat > conftest.$ac_ext <<EOF
19839 #line 19840 "configure"
19840 #include "confdefs.h"
19841 /* System header to define __stub macros and hopefully few prototypes,
19842     which can conflict with char mdbm_set_chain(); below.  */
19843 #include <assert.h>
19844 /* Override any gcc2 internal prototype to avoid an error.  */
19845 /* We use char because int might match the return type of a gcc2
19846     builtin and then its argument prototype would still apply.  */
19847 char mdbm_set_chain();
19848 char (*f)();
19849
19850 int main() {
19851
19852 /* The GNU C library defines this for functions which it implements
19853     to always fail with ENOSYS.  Some functions are actually named
19854     something starting with __ and the normal name is an alias.  */
19855 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19856 choke me
19857 #else
19858 f = mdbm_set_chain;
19859 #endif
19860
19861 ; return 0; }
19862 EOF
19863 if { (eval echo configure:19864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19864   rm -rf conftest*
19865   eval "ac_cv_func_mdbm_set_chain=yes"
19866 else
19867   echo "configure: failed program was:" >&5
19868   cat conftest.$ac_ext >&5
19869   rm -rf conftest*
19870   eval "ac_cv_func_mdbm_set_chain=no"
19871 fi
19872 rm -f conftest*
19873 fi
19874
19875 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19876   echo "$ac_t""yes" 1>&6
19877   ol_cv_lib_mdbm=yes
19878 else
19879   echo "$ac_t""no" 1>&6
19880
19881                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19882 echo "configure:19883: checking for mdbm_set_chain in -lmdbm" >&5
19883 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19884 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19885   echo $ac_n "(cached) $ac_c" 1>&6
19886 else
19887   ac_save_LIBS="$LIBS"
19888 LIBS="-lmdbm  $LIBS"
19889 cat > conftest.$ac_ext <<EOF
19890 #line 19891 "configure"
19891 #include "confdefs.h"
19892 /* Override any gcc2 internal prototype to avoid an error.  */
19893 /* We use char because int might match the return type of a gcc2
19894     builtin and then its argument prototype would still apply.  */
19895 char mdbm_set_chain();
19896
19897 int main() {
19898 mdbm_set_chain()
19899 ; return 0; }
19900 EOF
19901 if { (eval echo configure:19902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19902   rm -rf conftest*
19903   eval "ac_cv_lib_$ac_lib_var=yes"
19904 else
19905   echo "configure: failed program was:" >&5
19906   cat conftest.$ac_ext >&5
19907   rm -rf conftest*
19908   eval "ac_cv_lib_$ac_lib_var=no"
19909 fi
19910 rm -f conftest*
19911 LIBS="$ac_save_LIBS"
19912
19913 fi
19914 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19915   echo "$ac_t""yes" 1>&6
19916   ol_cv_lib_mdbm=-lmdbm
19917 else
19918   echo "$ac_t""no" 1>&6
19919 ol_cv_lib_mdbm=no
19920 fi
19921
19922         
19923 fi
19924
19925         LIBS="$ol_LIBS"
19926
19927 fi
19928
19929 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19930
19931
19932  for ac_hdr in mdbm.h
19933 do
19934 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19936 echo "configure:19937: checking for $ac_hdr" >&5
19937 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19938   echo $ac_n "(cached) $ac_c" 1>&6
19939 else
19940   cat > conftest.$ac_ext <<EOF
19941 #line 19942 "configure"
19942 #include "confdefs.h"
19943 #include <$ac_hdr>
19944 EOF
19945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19946 { (eval echo configure:19947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19948 if test -z "$ac_err"; then
19949   rm -rf conftest*
19950   eval "ac_cv_header_$ac_safe=yes"
19951 else
19952   echo "$ac_err" >&5
19953   echo "configure: failed program was:" >&5
19954   cat conftest.$ac_ext >&5
19955   rm -rf conftest*
19956   eval "ac_cv_header_$ac_safe=no"
19957 fi
19958 rm -f conftest*
19959 fi
19960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19961   echo "$ac_t""yes" 1>&6
19962     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19963   cat >> confdefs.h <<EOF
19964 #define $ac_tr_hdr 1
19965 EOF
19966  
19967 else
19968   echo "$ac_t""no" 1>&6
19969 fi
19970 done
19971
19972  echo $ac_n "checking for db""... $ac_c" 1>&6
19973 echo "configure:19974: checking for db" >&5
19974 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19975   echo $ac_n "(cached) $ac_c" 1>&6
19976 else
19977   
19978         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19979                 ol_cv_mdbm=no
19980         else
19981                 ol_cv_mdbm=yes
19982         fi
19983
19984 fi
19985
19986 echo "$ac_t""$ol_cv_mdbm" 1>&6
19987  if test $ol_cv_mdbm = yes ; then
19988         cat >> confdefs.h <<\EOF
19989 #define HAVE_MDBM 1
19990 EOF
19991
19992  fi
19993
19994
19995         if test $ol_cv_mdbm = yes ; then
19996                 ol_link_ldbm=mdbm
19997                 ol_with_ldbm_api=mdbm
19998                 if test $ol_cv_lib_mdbm != yes ; then
19999                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20000                 fi
20001         fi
20002 fi
20003
20004 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20005         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20006 echo "configure:20007: checking for GDBM library" >&5
20007 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20008   echo $ac_n "(cached) $ac_c" 1>&6
20009 else
20010         ol_LIBS="$LIBS"
20011         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20012 echo "configure:20013: checking for gdbm_open" >&5
20013 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20014   echo $ac_n "(cached) $ac_c" 1>&6
20015 else
20016   cat > conftest.$ac_ext <<EOF
20017 #line 20018 "configure"
20018 #include "confdefs.h"
20019 /* System header to define __stub macros and hopefully few prototypes,
20020     which can conflict with char gdbm_open(); below.  */
20021 #include <assert.h>
20022 /* Override any gcc2 internal prototype to avoid an error.  */
20023 /* We use char because int might match the return type of a gcc2
20024     builtin and then its argument prototype would still apply.  */
20025 char gdbm_open();
20026 char (*f)();
20027
20028 int main() {
20029
20030 /* The GNU C library defines this for functions which it implements
20031     to always fail with ENOSYS.  Some functions are actually named
20032     something starting with __ and the normal name is an alias.  */
20033 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20034 choke me
20035 #else
20036 f = gdbm_open;
20037 #endif
20038
20039 ; return 0; }
20040 EOF
20041 if { (eval echo configure:20042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20042   rm -rf conftest*
20043   eval "ac_cv_func_gdbm_open=yes"
20044 else
20045   echo "configure: failed program was:" >&5
20046   cat conftest.$ac_ext >&5
20047   rm -rf conftest*
20048   eval "ac_cv_func_gdbm_open=no"
20049 fi
20050 rm -f conftest*
20051 fi
20052
20053 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20054   echo "$ac_t""yes" 1>&6
20055   ol_cv_lib_gdbm=yes
20056 else
20057   echo "$ac_t""no" 1>&6
20058
20059                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20060 echo "configure:20061: checking for gdbm_open in -lgdbm" >&5
20061 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20062 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20063   echo $ac_n "(cached) $ac_c" 1>&6
20064 else
20065   ac_save_LIBS="$LIBS"
20066 LIBS="-lgdbm  $LIBS"
20067 cat > conftest.$ac_ext <<EOF
20068 #line 20069 "configure"
20069 #include "confdefs.h"
20070 /* Override any gcc2 internal prototype to avoid an error.  */
20071 /* We use char because int might match the return type of a gcc2
20072     builtin and then its argument prototype would still apply.  */
20073 char gdbm_open();
20074
20075 int main() {
20076 gdbm_open()
20077 ; return 0; }
20078 EOF
20079 if { (eval echo configure:20080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20080   rm -rf conftest*
20081   eval "ac_cv_lib_$ac_lib_var=yes"
20082 else
20083   echo "configure: failed program was:" >&5
20084   cat conftest.$ac_ext >&5
20085   rm -rf conftest*
20086   eval "ac_cv_lib_$ac_lib_var=no"
20087 fi
20088 rm -f conftest*
20089 LIBS="$ac_save_LIBS"
20090
20091 fi
20092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20093   echo "$ac_t""yes" 1>&6
20094   ol_cv_lib_gdbm=-lgdbm
20095 else
20096   echo "$ac_t""no" 1>&6
20097 ol_cv_lib_gdbm=no
20098 fi
20099
20100         
20101 fi
20102
20103         LIBS="$ol_LIBS"
20104
20105 fi
20106
20107 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20108
20109
20110  for ac_hdr in gdbm.h
20111 do
20112 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20113 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20114 echo "configure:20115: checking for $ac_hdr" >&5
20115 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20116   echo $ac_n "(cached) $ac_c" 1>&6
20117 else
20118   cat > conftest.$ac_ext <<EOF
20119 #line 20120 "configure"
20120 #include "confdefs.h"
20121 #include <$ac_hdr>
20122 EOF
20123 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20124 { (eval echo configure:20125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20125 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20126 if test -z "$ac_err"; then
20127   rm -rf conftest*
20128   eval "ac_cv_header_$ac_safe=yes"
20129 else
20130   echo "$ac_err" >&5
20131   echo "configure: failed program was:" >&5
20132   cat conftest.$ac_ext >&5
20133   rm -rf conftest*
20134   eval "ac_cv_header_$ac_safe=no"
20135 fi
20136 rm -f conftest*
20137 fi
20138 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20139   echo "$ac_t""yes" 1>&6
20140     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20141   cat >> confdefs.h <<EOF
20142 #define $ac_tr_hdr 1
20143 EOF
20144  
20145 else
20146   echo "$ac_t""no" 1>&6
20147 fi
20148 done
20149
20150  echo $ac_n "checking for db""... $ac_c" 1>&6
20151 echo "configure:20152: checking for db" >&5
20152 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20153   echo $ac_n "(cached) $ac_c" 1>&6
20154 else
20155   
20156         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20157                 ol_cv_gdbm=no
20158         else
20159                 ol_cv_gdbm=yes
20160         fi
20161
20162 fi
20163
20164 echo "$ac_t""$ol_cv_gdbm" 1>&6
20165  if test $ol_cv_gdbm = yes ; then
20166         cat >> confdefs.h <<\EOF
20167 #define HAVE_GDBM 1
20168 EOF
20169
20170  fi
20171
20172
20173         if test $ol_cv_gdbm = yes ; then
20174                 ol_link_ldbm=gdbm
20175                 ol_with_ldbm_api=gdbm
20176
20177                 if test $ol_cv_lib_gdbm != yes ; then
20178                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20179                 fi
20180         fi
20181 fi
20182
20183 if test $ol_with_ldbm_api = ndbm ; then
20184         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20185 echo "configure:20186: checking for NDBM library" >&5
20186 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20187   echo $ac_n "(cached) $ac_c" 1>&6
20188 else
20189         ol_LIBS="$LIBS"
20190         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20191 echo "configure:20192: checking for dbm_open" >&5
20192 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20193   echo $ac_n "(cached) $ac_c" 1>&6
20194 else
20195   cat > conftest.$ac_ext <<EOF
20196 #line 20197 "configure"
20197 #include "confdefs.h"
20198 /* System header to define __stub macros and hopefully few prototypes,
20199     which can conflict with char dbm_open(); below.  */
20200 #include <assert.h>
20201 /* Override any gcc2 internal prototype to avoid an error.  */
20202 /* We use char because int might match the return type of a gcc2
20203     builtin and then its argument prototype would still apply.  */
20204 char dbm_open();
20205 char (*f)();
20206
20207 int main() {
20208
20209 /* The GNU C library defines this for functions which it implements
20210     to always fail with ENOSYS.  Some functions are actually named
20211     something starting with __ and the normal name is an alias.  */
20212 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20213 choke me
20214 #else
20215 f = dbm_open;
20216 #endif
20217
20218 ; return 0; }
20219 EOF
20220 if { (eval echo configure:20221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20221   rm -rf conftest*
20222   eval "ac_cv_func_dbm_open=yes"
20223 else
20224   echo "configure: failed program was:" >&5
20225   cat conftest.$ac_ext >&5
20226   rm -rf conftest*
20227   eval "ac_cv_func_dbm_open=no"
20228 fi
20229 rm -f conftest*
20230 fi
20231
20232 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20233   echo "$ac_t""yes" 1>&6
20234   ol_cv_lib_ndbm=yes
20235 else
20236   echo "$ac_t""no" 1>&6
20237
20238                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20239 echo "configure:20240: checking for dbm_open in -lndbm" >&5
20240 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20241 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20242   echo $ac_n "(cached) $ac_c" 1>&6
20243 else
20244   ac_save_LIBS="$LIBS"
20245 LIBS="-lndbm  $LIBS"
20246 cat > conftest.$ac_ext <<EOF
20247 #line 20248 "configure"
20248 #include "confdefs.h"
20249 /* Override any gcc2 internal prototype to avoid an error.  */
20250 /* We use char because int might match the return type of a gcc2
20251     builtin and then its argument prototype would still apply.  */
20252 char dbm_open();
20253
20254 int main() {
20255 dbm_open()
20256 ; return 0; }
20257 EOF
20258 if { (eval echo configure:20259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20259   rm -rf conftest*
20260   eval "ac_cv_lib_$ac_lib_var=yes"
20261 else
20262   echo "configure: failed program was:" >&5
20263   cat conftest.$ac_ext >&5
20264   rm -rf conftest*
20265   eval "ac_cv_lib_$ac_lib_var=no"
20266 fi
20267 rm -f conftest*
20268 LIBS="$ac_save_LIBS"
20269
20270 fi
20271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20272   echo "$ac_t""yes" 1>&6
20273   ol_cv_lib_ndbm=-lndbm
20274 else
20275   echo "$ac_t""no" 1>&6
20276
20277                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20278 echo "configure:20279: checking for dbm_open in -ldbm" >&5
20279 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20280 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20281   echo $ac_n "(cached) $ac_c" 1>&6
20282 else
20283   ac_save_LIBS="$LIBS"
20284 LIBS="-ldbm  $LIBS"
20285 cat > conftest.$ac_ext <<EOF
20286 #line 20287 "configure"
20287 #include "confdefs.h"
20288 /* Override any gcc2 internal prototype to avoid an error.  */
20289 /* We use char because int might match the return type of a gcc2
20290     builtin and then its argument prototype would still apply.  */
20291 char dbm_open();
20292
20293 int main() {
20294 dbm_open()
20295 ; return 0; }
20296 EOF
20297 if { (eval echo configure:20298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20298   rm -rf conftest*
20299   eval "ac_cv_lib_$ac_lib_var=yes"
20300 else
20301   echo "configure: failed program was:" >&5
20302   cat conftest.$ac_ext >&5
20303   rm -rf conftest*
20304   eval "ac_cv_lib_$ac_lib_var=no"
20305 fi
20306 rm -f conftest*
20307 LIBS="$ac_save_LIBS"
20308
20309 fi
20310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20311   echo "$ac_t""yes" 1>&6
20312   ol_cv_lib_ndbm=-ldbm
20313 else
20314   echo "$ac_t""no" 1>&6
20315 ol_cv_lib_ndbm=no
20316 fi
20317                 
20318 fi
20319
20320         
20321 fi
20322
20323         LIBS="$ol_LIBS"
20324
20325 fi
20326
20327 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20328
20329
20330  for ac_hdr in ndbm.h
20331 do
20332 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20333 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20334 echo "configure:20335: checking for $ac_hdr" >&5
20335 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20336   echo $ac_n "(cached) $ac_c" 1>&6
20337 else
20338   cat > conftest.$ac_ext <<EOF
20339 #line 20340 "configure"
20340 #include "confdefs.h"
20341 #include <$ac_hdr>
20342 EOF
20343 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20344 { (eval echo configure:20345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20345 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20346 if test -z "$ac_err"; then
20347   rm -rf conftest*
20348   eval "ac_cv_header_$ac_safe=yes"
20349 else
20350   echo "$ac_err" >&5
20351   echo "configure: failed program was:" >&5
20352   cat conftest.$ac_ext >&5
20353   rm -rf conftest*
20354   eval "ac_cv_header_$ac_safe=no"
20355 fi
20356 rm -f conftest*
20357 fi
20358 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20359   echo "$ac_t""yes" 1>&6
20360     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20361   cat >> confdefs.h <<EOF
20362 #define $ac_tr_hdr 1
20363 EOF
20364  
20365 else
20366   echo "$ac_t""no" 1>&6
20367 fi
20368 done
20369
20370  echo $ac_n "checking for db""... $ac_c" 1>&6
20371 echo "configure:20372: checking for db" >&5
20372 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20373   echo $ac_n "(cached) $ac_c" 1>&6
20374 else
20375   
20376         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20377                 ol_cv_ndbm=no
20378         else
20379                 ol_cv_ndbm=yes
20380         fi
20381
20382 fi
20383
20384 echo "$ac_t""$ol_cv_ndbm" 1>&6
20385  if test $ol_cv_ndbm = yes ; then
20386         cat >> confdefs.h <<\EOF
20387 #define HAVE_NDBM 1
20388 EOF
20389
20390  fi
20391
20392
20393         if test $ol_cv_ndbm = yes ; then
20394                 ol_link_ldbm=ndbm
20395                 ol_with_ldbm_api=ndbm
20396
20397                 if test $ol_cv_lib_ndbm != yes ; then
20398                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20399                 fi
20400         fi
20401 fi
20402
20403 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20404         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20405         if test $ol_enable_ldbm = yes ; then
20406                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20407         fi
20408
20409         echo "configure: warning: disabling LDBM" 1>&2
20410         ol_enable_ldbm=no
20411 fi
20412
20413
20414 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20415         BUILD_LIBS_DYNAMIC=shared
20416         cat >> confdefs.h <<\EOF
20417 #define LDAP_LIBS_DYNAMIC 1
20418 EOF
20419
20420         LTSTATIC=""
20421 else
20422         BUILD_LIBS_DYNAMIC=static
20423         LTSTATIC="-static"
20424 fi
20425
20426 if test $ol_enable_wrappers != no ; then
20427         for ac_hdr in tcpd.h
20428 do
20429 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20430 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20431 echo "configure:20432: checking for $ac_hdr" >&5
20432 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20433   echo $ac_n "(cached) $ac_c" 1>&6
20434 else
20435   cat > conftest.$ac_ext <<EOF
20436 #line 20437 "configure"
20437 #include "confdefs.h"
20438 #include <$ac_hdr>
20439 EOF
20440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20441 { (eval echo configure:20442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20443 if test -z "$ac_err"; then
20444   rm -rf conftest*
20445   eval "ac_cv_header_$ac_safe=yes"
20446 else
20447   echo "$ac_err" >&5
20448   echo "configure: failed program was:" >&5
20449   cat conftest.$ac_ext >&5
20450   rm -rf conftest*
20451   eval "ac_cv_header_$ac_safe=no"
20452 fi
20453 rm -f conftest*
20454 fi
20455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20456   echo "$ac_t""yes" 1>&6
20457     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20458   cat >> confdefs.h <<EOF
20459 #define $ac_tr_hdr 1
20460 EOF
20461  
20462                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20463 echo "configure:20464: checking for TCP wrappers library" >&5
20464                 save_LIBS="$LIBS"
20465                 LIBS="$LIBS -lwrap"
20466                 cat > conftest.$ac_ext <<EOF
20467 #line 20468 "configure"
20468 #include "confdefs.h"
20469
20470 #include <tcpd.h>
20471 int allow_severity = 0;
20472 int deny_severity  = 0;
20473
20474 struct request_info *req;
20475                 
20476 int main() {
20477
20478 hosts_access(req)
20479                 
20480 ; return 0; }
20481 EOF
20482 if { (eval echo configure:20483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20483   rm -rf conftest*
20484   echo "$ac_t""-lwrap" 1>&6
20485                 have_wrappers=yes
20486                 LIBS="$save_LIBS"
20487 else
20488   echo "configure: failed program was:" >&5
20489   cat conftest.$ac_ext >&5
20490   rm -rf conftest*
20491   
20492                                 LIBS="$LIBS -lnsl"
20493                 cat > conftest.$ac_ext <<EOF
20494 #line 20495 "configure"
20495 #include "confdefs.h"
20496
20497 #include <tcpd.h>
20498 int allow_severity = 0;
20499 int deny_severity  = 0;
20500
20501 struct request_info *req;
20502                 
20503 int main() {
20504
20505 hosts_access(req)
20506                 
20507 ; return 0; }
20508 EOF
20509 if { (eval echo configure:20510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20510   rm -rf conftest*
20511   echo "$ac_t""-lwrap -lnsl" 1>&6
20512                 have_wrappers=yes
20513                 LIBS="$save_LIBS -lnsl"
20514 else
20515   echo "configure: failed program was:" >&5
20516   cat conftest.$ac_ext >&5
20517   rm -rf conftest*
20518   
20519                 echo "$ac_t""no" 1>&6
20520                 have_wrappers=no
20521                 LIBS=$save_LIBS
20522 fi
20523 rm -f conftest*
20524 fi
20525 rm -f conftest*
20526 else
20527   echo "$ac_t""no" 1>&6
20528 have_wrappers=no
20529 fi
20530 done
20531
20532
20533         if test $have_wrappers = yes ; then
20534                 cat >> confdefs.h <<\EOF
20535 #define HAVE_TCPD 1
20536 EOF
20537
20538                 WRAP_LIBS="-lwrap"
20539         elif test $ol_enable_wrappers = yes ; then
20540                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20541         else
20542                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20543                 WRAP_LIBS=""
20544         fi
20545 fi
20546
20547 if test $ol_enable_syslog != no ; then
20548         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20549 echo "configure:20550: checking for openlog" >&5
20550 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20551   echo $ac_n "(cached) $ac_c" 1>&6
20552 else
20553   cat > conftest.$ac_ext <<EOF
20554 #line 20555 "configure"
20555 #include "confdefs.h"
20556 /* System header to define __stub macros and hopefully few prototypes,
20557     which can conflict with char openlog(); below.  */
20558 #include <assert.h>
20559 /* Override any gcc2 internal prototype to avoid an error.  */
20560 /* We use char because int might match the return type of a gcc2
20561     builtin and then its argument prototype would still apply.  */
20562 char openlog();
20563 char (*f)();
20564
20565 int main() {
20566
20567 /* The GNU C library defines this for functions which it implements
20568     to always fail with ENOSYS.  Some functions are actually named
20569     something starting with __ and the normal name is an alias.  */
20570 #if defined (__stub_openlog) || defined (__stub___openlog)
20571 choke me
20572 #else
20573 f = openlog;
20574 #endif
20575
20576 ; return 0; }
20577 EOF
20578 if { (eval echo configure:20579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20579   rm -rf conftest*
20580   eval "ac_cv_func_openlog=yes"
20581 else
20582   echo "configure: failed program was:" >&5
20583   cat conftest.$ac_ext >&5
20584   rm -rf conftest*
20585   eval "ac_cv_func_openlog=no"
20586 fi
20587 rm -f conftest*
20588 fi
20589
20590 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20591   echo "$ac_t""yes" 1>&6
20592   :
20593 else
20594   echo "$ac_t""no" 1>&6
20595 fi
20596
20597         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20598                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20599         fi
20600         ol_enable_syslog=$ac_cv_func_openlog
20601 fi
20602
20603
20604 ol_link_sql=no
20605 if test $ol_enable_sql != no ; then
20606         for ac_hdr in sql.h sqlext.h
20607 do
20608 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20609 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20610 echo "configure:20611: checking for $ac_hdr" >&5
20611 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20612   echo $ac_n "(cached) $ac_c" 1>&6
20613 else
20614   cat > conftest.$ac_ext <<EOF
20615 #line 20616 "configure"
20616 #include "confdefs.h"
20617 #include <$ac_hdr>
20618 EOF
20619 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20620 { (eval echo configure:20621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20621 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20622 if test -z "$ac_err"; then
20623   rm -rf conftest*
20624   eval "ac_cv_header_$ac_safe=yes"
20625 else
20626   echo "$ac_err" >&5
20627   echo "configure: failed program was:" >&5
20628   cat conftest.$ac_ext >&5
20629   rm -rf conftest*
20630   eval "ac_cv_header_$ac_safe=no"
20631 fi
20632 rm -f conftest*
20633 fi
20634 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20635   echo "$ac_t""yes" 1>&6
20636     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20637   cat >> confdefs.h <<EOF
20638 #define $ac_tr_hdr 1
20639 EOF
20640  
20641 else
20642   echo "$ac_t""no" 1>&6
20643 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20644         
20645 fi
20646 done
20647
20648
20649         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20650 echo "configure:20651: checking for SQLDriverConnect in -liodbc" >&5
20651 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20652 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20653   echo $ac_n "(cached) $ac_c" 1>&6
20654 else
20655   ac_save_LIBS="$LIBS"
20656 LIBS="-liodbc  $LIBS"
20657 cat > conftest.$ac_ext <<EOF
20658 #line 20659 "configure"
20659 #include "confdefs.h"
20660 /* Override any gcc2 internal prototype to avoid an error.  */
20661 /* We use char because int might match the return type of a gcc2
20662     builtin and then its argument prototype would still apply.  */
20663 char SQLDriverConnect();
20664
20665 int main() {
20666 SQLDriverConnect()
20667 ; return 0; }
20668 EOF
20669 if { (eval echo configure:20670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20670   rm -rf conftest*
20671   eval "ac_cv_lib_$ac_lib_var=yes"
20672 else
20673   echo "configure: failed program was:" >&5
20674   cat conftest.$ac_ext >&5
20675   rm -rf conftest*
20676   eval "ac_cv_lib_$ac_lib_var=no"
20677 fi
20678 rm -f conftest*
20679 LIBS="$ac_save_LIBS"
20680
20681 fi
20682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20683   echo "$ac_t""yes" 1>&6
20684   have_iodbc=yes
20685 else
20686   echo "$ac_t""no" 1>&6
20687 have_iodbc=no
20688 fi
20689
20690         if test $have_iodbc = yes ; then
20691                 ol_link_sql="-liodbc"
20692         else
20693                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20694 echo "configure:20695: checking for SQLDriverConnect in -lodbc" >&5
20695 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20696 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20697   echo $ac_n "(cached) $ac_c" 1>&6
20698 else
20699   ac_save_LIBS="$LIBS"
20700 LIBS="-lodbc  $LIBS"
20701 cat > conftest.$ac_ext <<EOF
20702 #line 20703 "configure"
20703 #include "confdefs.h"
20704 /* Override any gcc2 internal prototype to avoid an error.  */
20705 /* We use char because int might match the return type of a gcc2
20706     builtin and then its argument prototype would still apply.  */
20707 char SQLDriverConnect();
20708
20709 int main() {
20710 SQLDriverConnect()
20711 ; return 0; }
20712 EOF
20713 if { (eval echo configure:20714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20714   rm -rf conftest*
20715   eval "ac_cv_lib_$ac_lib_var=yes"
20716 else
20717   echo "configure: failed program was:" >&5
20718   cat conftest.$ac_ext >&5
20719   rm -rf conftest*
20720   eval "ac_cv_lib_$ac_lib_var=no"
20721 fi
20722 rm -f conftest*
20723 LIBS="$ac_save_LIBS"
20724
20725 fi
20726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20727   echo "$ac_t""yes" 1>&6
20728   have_odbc=yes
20729 else
20730   echo "$ac_t""no" 1>&6
20731 have_odbc=no
20732 fi
20733
20734                 if test $have_odbc = yes ; then
20735                         ol_link_sql="-lodbc"
20736                 fi
20737         fi
20738
20739         if test $ol_link_sql != no ; then
20740                 SLAPD_SQL_LIBS="$ol_link_sql"
20741
20742         elif test $ol_enable_sql != auto ; then
20743                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20744         fi
20745 fi
20746
20747 ol_link_sasl=no
20748 ol_link_spasswd=no
20749 if test $ol_with_cyrus_sasl != no ; then
20750         for ac_hdr in sasl/sasl.h sasl.h
20751 do
20752 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20753 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20754 echo "configure:20755: checking for $ac_hdr" >&5
20755 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20756   echo $ac_n "(cached) $ac_c" 1>&6
20757 else
20758   cat > conftest.$ac_ext <<EOF
20759 #line 20760 "configure"
20760 #include "confdefs.h"
20761 #include <$ac_hdr>
20762 EOF
20763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20764 { (eval echo configure:20765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20766 if test -z "$ac_err"; then
20767   rm -rf conftest*
20768   eval "ac_cv_header_$ac_safe=yes"
20769 else
20770   echo "$ac_err" >&5
20771   echo "configure: failed program was:" >&5
20772   cat conftest.$ac_ext >&5
20773   rm -rf conftest*
20774   eval "ac_cv_header_$ac_safe=no"
20775 fi
20776 rm -f conftest*
20777 fi
20778 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20779   echo "$ac_t""yes" 1>&6
20780     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20781   cat >> confdefs.h <<EOF
20782 #define $ac_tr_hdr 1
20783 EOF
20784  
20785 else
20786   echo "$ac_t""no" 1>&6
20787 fi
20788 done
20789
20790
20791         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20792                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20793 echo "configure:20794: checking for sasl_client_init in -lsasl2" >&5
20794 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20796   echo $ac_n "(cached) $ac_c" 1>&6
20797 else
20798   ac_save_LIBS="$LIBS"
20799 LIBS="-lsasl2  $LIBS"
20800 cat > conftest.$ac_ext <<EOF
20801 #line 20802 "configure"
20802 #include "confdefs.h"
20803 /* Override any gcc2 internal prototype to avoid an error.  */
20804 /* We use char because int might match the return type of a gcc2
20805     builtin and then its argument prototype would still apply.  */
20806 char sasl_client_init();
20807
20808 int main() {
20809 sasl_client_init()
20810 ; return 0; }
20811 EOF
20812 if { (eval echo configure:20813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20813   rm -rf conftest*
20814   eval "ac_cv_lib_$ac_lib_var=yes"
20815 else
20816   echo "configure: failed program was:" >&5
20817   cat conftest.$ac_ext >&5
20818   rm -rf conftest*
20819   eval "ac_cv_lib_$ac_lib_var=no"
20820 fi
20821 rm -f conftest*
20822 LIBS="$ac_save_LIBS"
20823
20824 fi
20825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20826   echo "$ac_t""yes" 1>&6
20827   ol_link_sasl="-lsasl2"
20828 else
20829   echo "$ac_t""no" 1>&6
20830 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20831 echo "configure:20832: checking for sasl_client_init in -lsasl" >&5
20832 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20833 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20834   echo $ac_n "(cached) $ac_c" 1>&6
20835 else
20836   ac_save_LIBS="$LIBS"
20837 LIBS="-lsasl  $LIBS"
20838 cat > conftest.$ac_ext <<EOF
20839 #line 20840 "configure"
20840 #include "confdefs.h"
20841 /* Override any gcc2 internal prototype to avoid an error.  */
20842 /* We use char because int might match the return type of a gcc2
20843     builtin and then its argument prototype would still apply.  */
20844 char sasl_client_init();
20845
20846 int main() {
20847 sasl_client_init()
20848 ; return 0; }
20849 EOF
20850 if { (eval echo configure:20851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20851   rm -rf conftest*
20852   eval "ac_cv_lib_$ac_lib_var=yes"
20853 else
20854   echo "configure: failed program was:" >&5
20855   cat conftest.$ac_ext >&5
20856   rm -rf conftest*
20857   eval "ac_cv_lib_$ac_lib_var=no"
20858 fi
20859 rm -f conftest*
20860 LIBS="$ac_save_LIBS"
20861
20862 fi
20863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20864   echo "$ac_t""yes" 1>&6
20865   ol_link_sasl="-lsasl"
20866 else
20867   echo "$ac_t""no" 1>&6
20868 fi
20869
20870 fi
20871
20872         fi
20873
20874         if test $ol_link_sasl = no ; then
20875                 if test $ol_with_cyrus_sasl != auto ; then
20876                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20877                 else
20878                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20879                         echo "configure: warning: SASL authentication not supported!" 1>&2
20880                         if test $ol_link_tls = no ; then
20881                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20882                         fi
20883                 fi
20884         else
20885                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20886 echo "configure:20887: checking Cyrus SASL library version" >&5
20887 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20888   echo $ac_n "(cached) $ac_c" 1>&6
20889 else
20890   
20891         cat > conftest.$ac_ext <<EOF
20892 #line 20893 "configure"
20893 #include "confdefs.h"
20894
20895 #ifdef HAVE_SASL_SASL_H
20896 #include <sasl/sasl.h>
20897 #else
20898 #include <sasl.h>
20899 #endif
20900
20901 /* require 2.1.3 or later */
20902 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20903         char *__sasl_compat = "2.2+ or better okay (we guess)";
20904 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20905         && SASL_VERSION_STEP >=3
20906         char *__sasl_compat = "2.1.3+ or better okay";
20907 #endif
20908         
20909 EOF
20910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20911   egrep "__sasl_compat" >/dev/null 2>&1; then
20912   rm -rf conftest*
20913   ol_cv_sasl_compat=yes
20914 else
20915   rm -rf conftest*
20916   ol_cv_sasl_compat=no
20917 fi
20918 rm -f conftest*
20919
20920 fi
20921
20922 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20923
20924                 if test $ol_cv_sasl_compat = no ; then
20925                         ol_link_sasl=no
20926                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20927                 fi
20928
20929                 cat >> confdefs.h <<\EOF
20930 #define HAVE_CYRUS_SASL 1
20931 EOF
20932
20933                 SASL_LIBS="$ol_link_sasl"
20934                 if test $ol_enable_spasswd != no ; then
20935                         ol_link_spasswd=yes
20936                 fi
20937
20938                 ac_save_LIBS="$LIBS"
20939                 LIBS="$LIBS $ol_link_sasl"
20940                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20941 echo "configure:20942: checking for sasl_version" >&5
20942 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20943   echo $ac_n "(cached) $ac_c" 1>&6
20944 else
20945   cat > conftest.$ac_ext <<EOF
20946 #line 20947 "configure"
20947 #include "confdefs.h"
20948 /* System header to define __stub macros and hopefully few prototypes,
20949     which can conflict with char sasl_version(); below.  */
20950 #include <assert.h>
20951 /* Override any gcc2 internal prototype to avoid an error.  */
20952 /* We use char because int might match the return type of a gcc2
20953     builtin and then its argument prototype would still apply.  */
20954 char sasl_version();
20955 char (*f)();
20956
20957 int main() {
20958
20959 /* The GNU C library defines this for functions which it implements
20960     to always fail with ENOSYS.  Some functions are actually named
20961     something starting with __ and the normal name is an alias.  */
20962 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20963 choke me
20964 #else
20965 f = sasl_version;
20966 #endif
20967
20968 ; return 0; }
20969 EOF
20970 if { (eval echo configure:20971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20971   rm -rf conftest*
20972   eval "ac_cv_func_sasl_version=yes"
20973 else
20974   echo "configure: failed program was:" >&5
20975   cat conftest.$ac_ext >&5
20976   rm -rf conftest*
20977   eval "ac_cv_func_sasl_version=no"
20978 fi
20979 rm -f conftest*
20980 fi
20981
20982 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20983   echo "$ac_t""yes" 1>&6
20984   cat >> confdefs.h <<\EOF
20985 #define HAVE_SASL_VERSION 1
20986 EOF
20987
20988 else
20989   echo "$ac_t""no" 1>&6
20990 fi
20991
20992                 LIBS="$ac_save_LIBS"
20993         fi
20994
20995 else
20996         echo "configure: warning: SASL authentication not supported!" 1>&2
20997         if test $ol_link_tls = no ; then
20998                 echo "configure: warning: Strong authentication not supported!" 1>&2
20999         fi
21000 fi
21001
21002 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21003         dev=no
21004         if test -r /dev/urandom ; then
21005                 dev="/dev/urandom";
21006         elif test -r /idev/urandom ; then
21007                 dev="/idev/urandom";
21008         elif test -r /dev/srandom ; then
21009                 dev="/dev/srandom";
21010         elif test -r /dev/random ; then
21011                 dev="/dev/random";
21012         elif test -r /idev/random ; then
21013                 dev="/idev/random";
21014         fi
21015
21016         if test $dev != no ; then
21017                 cat >> confdefs.h <<EOF
21018 #define URANDOM_DEVICE "$dev"
21019 EOF
21020
21021         fi
21022 fi
21023
21024 ol_link_fetch=no
21025 if test $ol_with_fetch != no ; then
21026         ol_LIBS=$LIBS
21027 LIBS="-lfetch -lcom_err $LIBS"
21028 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21029 echo "configure:21030: checking fetch(3) library" >&5
21030 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21031   echo $ac_n "(cached) $ac_c" 1>&6
21032 else
21033   
21034         cat > conftest.$ac_ext <<EOF
21035 #line 21036 "configure"
21036 #include "confdefs.h"
21037
21038 #include <sys/param.h>
21039 #include <stdio.h>
21040 #include <fetch.h>
21041 int main() {
21042 struct url *u = fetchParseURL("file:///"); 
21043 ; return 0; }
21044 EOF
21045 if { (eval echo configure:21046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21046   rm -rf conftest*
21047   ol_cv_lib_fetch=yes
21048 else
21049   echo "configure: failed program was:" >&5
21050   cat conftest.$ac_ext >&5
21051   rm -rf conftest*
21052   ol_cv_lib_fetch=no
21053 fi
21054 rm -f conftest*
21055 fi
21056
21057 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21058 LIBS=$ol_LIBS
21059 if test $ol_cv_lib_fetch != no ; then
21060         ol_link_fetch="-lfetch -lcom_err"
21061         cat >> confdefs.h <<\EOF
21062 #define HAVE_FETCH 1
21063 EOF
21064
21065 fi
21066
21067
21068         if test $ol_cv_lib_fetch != no ; then
21069                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21070                 ol_link_fetch=freebsd
21071
21072         elif test $ol_with_fetch != auto ; then
21073                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21074         fi 
21075 fi
21076
21077 if test $ol_enable_crypt != no ; then
21078         save_LIBS="$LIBS"
21079         LIBS="$TLS_LIBS $LIBS"
21080
21081         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21082 echo "configure:21083: checking for crypt" >&5
21083 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21084   echo $ac_n "(cached) $ac_c" 1>&6
21085 else
21086   cat > conftest.$ac_ext <<EOF
21087 #line 21088 "configure"
21088 #include "confdefs.h"
21089 /* System header to define __stub macros and hopefully few prototypes,
21090     which can conflict with char crypt(); below.  */
21091 #include <assert.h>
21092 /* Override any gcc2 internal prototype to avoid an error.  */
21093 /* We use char because int might match the return type of a gcc2
21094     builtin and then its argument prototype would still apply.  */
21095 char crypt();
21096 char (*f)();
21097
21098 int main() {
21099
21100 /* The GNU C library defines this for functions which it implements
21101     to always fail with ENOSYS.  Some functions are actually named
21102     something starting with __ and the normal name is an alias.  */
21103 #if defined (__stub_crypt) || defined (__stub___crypt)
21104 choke me
21105 #else
21106 f = crypt;
21107 #endif
21108
21109 ; return 0; }
21110 EOF
21111 if { (eval echo configure:21112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21112   rm -rf conftest*
21113   eval "ac_cv_func_crypt=yes"
21114 else
21115   echo "configure: failed program was:" >&5
21116   cat conftest.$ac_ext >&5
21117   rm -rf conftest*
21118   eval "ac_cv_func_crypt=no"
21119 fi
21120 rm -f conftest*
21121 fi
21122
21123 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21124   echo "$ac_t""yes" 1>&6
21125   have_crypt=yes
21126 else
21127   echo "$ac_t""no" 1>&6
21128
21129                 LIBS="$save_LIBS"
21130                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21131 echo "configure:21132: checking for crypt in -lcrypt" >&5
21132 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21133 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21134   echo $ac_n "(cached) $ac_c" 1>&6
21135 else
21136   ac_save_LIBS="$LIBS"
21137 LIBS="-lcrypt  $LIBS"
21138 cat > conftest.$ac_ext <<EOF
21139 #line 21140 "configure"
21140 #include "confdefs.h"
21141 /* Override any gcc2 internal prototype to avoid an error.  */
21142 /* We use char because int might match the return type of a gcc2
21143     builtin and then its argument prototype would still apply.  */
21144 char crypt();
21145
21146 int main() {
21147 crypt()
21148 ; return 0; }
21149 EOF
21150 if { (eval echo configure:21151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21151   rm -rf conftest*
21152   eval "ac_cv_lib_$ac_lib_var=yes"
21153 else
21154   echo "configure: failed program was:" >&5
21155   cat conftest.$ac_ext >&5
21156   rm -rf conftest*
21157   eval "ac_cv_lib_$ac_lib_var=no"
21158 fi
21159 rm -f conftest*
21160 LIBS="$ac_save_LIBS"
21161
21162 fi
21163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21164   echo "$ac_t""yes" 1>&6
21165   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21166                         have_crypt=yes
21167 else
21168   echo "$ac_t""no" 1>&6
21169 have_crypt=no
21170 fi
21171
21172 fi
21173
21174
21175         LIBS="$save_LIBS"
21176
21177         if test $have_crypt = yes ; then
21178                 cat >> confdefs.h <<\EOF
21179 #define HAVE_CRYPT 1
21180 EOF
21181
21182         else
21183                 echo "configure: warning: could not find crypt" 1>&2
21184                 if test $ol_enable_crypt = yes ; then
21185                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21186                 fi
21187
21188                 echo "configure: warning: disabling crypt support" 1>&2
21189                 ol_enable_crypt=no
21190         fi
21191 fi
21192
21193 if test $ol_enable_proctitle != no ; then
21194         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21195 echo "configure:21196: checking for setproctitle" >&5
21196 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21197   echo $ac_n "(cached) $ac_c" 1>&6
21198 else
21199   cat > conftest.$ac_ext <<EOF
21200 #line 21201 "configure"
21201 #include "confdefs.h"
21202 /* System header to define __stub macros and hopefully few prototypes,
21203     which can conflict with char setproctitle(); below.  */
21204 #include <assert.h>
21205 /* Override any gcc2 internal prototype to avoid an error.  */
21206 /* We use char because int might match the return type of a gcc2
21207     builtin and then its argument prototype would still apply.  */
21208 char setproctitle();
21209 char (*f)();
21210
21211 int main() {
21212
21213 /* The GNU C library defines this for functions which it implements
21214     to always fail with ENOSYS.  Some functions are actually named
21215     something starting with __ and the normal name is an alias.  */
21216 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21217 choke me
21218 #else
21219 f = setproctitle;
21220 #endif
21221
21222 ; return 0; }
21223 EOF
21224 if { (eval echo configure:21225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21225   rm -rf conftest*
21226   eval "ac_cv_func_setproctitle=yes"
21227 else
21228   echo "configure: failed program was:" >&5
21229   cat conftest.$ac_ext >&5
21230   rm -rf conftest*
21231   eval "ac_cv_func_setproctitle=no"
21232 fi
21233 rm -f conftest*
21234 fi
21235
21236 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21237   echo "$ac_t""yes" 1>&6
21238   have_setproctitle=yes
21239 else
21240   echo "$ac_t""no" 1>&6
21241
21242                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21243 echo "configure:21244: checking for setproctitle in -lutil" >&5
21244 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21245 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21246   echo $ac_n "(cached) $ac_c" 1>&6
21247 else
21248   ac_save_LIBS="$LIBS"
21249 LIBS="-lutil  $LIBS"
21250 cat > conftest.$ac_ext <<EOF
21251 #line 21252 "configure"
21252 #include "confdefs.h"
21253 /* Override any gcc2 internal prototype to avoid an error.  */
21254 /* We use char because int might match the return type of a gcc2
21255     builtin and then its argument prototype would still apply.  */
21256 char setproctitle();
21257
21258 int main() {
21259 setproctitle()
21260 ; return 0; }
21261 EOF
21262 if { (eval echo configure:21263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21263   rm -rf conftest*
21264   eval "ac_cv_lib_$ac_lib_var=yes"
21265 else
21266   echo "configure: failed program was:" >&5
21267   cat conftest.$ac_ext >&5
21268   rm -rf conftest*
21269   eval "ac_cv_lib_$ac_lib_var=no"
21270 fi
21271 rm -f conftest*
21272 LIBS="$ac_save_LIBS"
21273
21274 fi
21275 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21276   echo "$ac_t""yes" 1>&6
21277   have_setproctitle=yes
21278                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21279 else
21280   echo "$ac_t""no" 1>&6
21281 have_setproctitle=no
21282                         LIBOBJS="$LIBOBJS setproctitle.o"
21283                         LIBSRCS="$LIBSRCS setproctitle.c"
21284 fi
21285
21286 fi
21287
21288
21289         if test $have_setproctitle = yes ; then
21290                 cat >> confdefs.h <<\EOF
21291 #define HAVE_SETPROCTITLE 1
21292 EOF
21293
21294         fi
21295 fi
21296
21297 if test $ol_enable_slp != no ; then
21298         for ac_hdr in slp.h 
21299 do
21300 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21301 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21302 echo "configure:21303: checking for $ac_hdr" >&5
21303 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21304   echo $ac_n "(cached) $ac_c" 1>&6
21305 else
21306   cat > conftest.$ac_ext <<EOF
21307 #line 21308 "configure"
21308 #include "confdefs.h"
21309 #include <$ac_hdr>
21310 EOF
21311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21312 { (eval echo configure:21313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21314 if test -z "$ac_err"; then
21315   rm -rf conftest*
21316   eval "ac_cv_header_$ac_safe=yes"
21317 else
21318   echo "$ac_err" >&5
21319   echo "configure: failed program was:" >&5
21320   cat conftest.$ac_ext >&5
21321   rm -rf conftest*
21322   eval "ac_cv_header_$ac_safe=no"
21323 fi
21324 rm -f conftest*
21325 fi
21326 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21327   echo "$ac_t""yes" 1>&6
21328     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21329   cat >> confdefs.h <<EOF
21330 #define $ac_tr_hdr 1
21331 EOF
21332  
21333 else
21334   echo "$ac_t""no" 1>&6
21335 fi
21336 done
21337
21338
21339         if test $ac_cv_header_slp_h = yes ; then
21340                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21341 echo "configure:21342: checking for SLPOpen in -lslp" >&5
21342 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21343 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21344   echo $ac_n "(cached) $ac_c" 1>&6
21345 else
21346   ac_save_LIBS="$LIBS"
21347 LIBS="-lslp  $LIBS"
21348 cat > conftest.$ac_ext <<EOF
21349 #line 21350 "configure"
21350 #include "confdefs.h"
21351 /* Override any gcc2 internal prototype to avoid an error.  */
21352 /* We use char because int might match the return type of a gcc2
21353     builtin and then its argument prototype would still apply.  */
21354 char SLPOpen();
21355
21356 int main() {
21357 SLPOpen()
21358 ; return 0; }
21359 EOF
21360 if { (eval echo configure:21361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21361   rm -rf conftest*
21362   eval "ac_cv_lib_$ac_lib_var=yes"
21363 else
21364   echo "configure: failed program was:" >&5
21365   cat conftest.$ac_ext >&5
21366   rm -rf conftest*
21367   eval "ac_cv_lib_$ac_lib_var=no"
21368 fi
21369 rm -f conftest*
21370 LIBS="$ac_save_LIBS"
21371
21372 fi
21373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21374   echo "$ac_t""yes" 1>&6
21375   have_slp=yes
21376 else
21377   echo "$ac_t""no" 1>&6
21378 have_slp=no
21379 fi
21380
21381                 if test $have_slp = yes ; then
21382                         cat >> confdefs.h <<\EOF
21383 #define HAVE_SLP 1
21384 EOF
21385
21386                         SLAPD_SLP_LIBS=-lslp
21387                 fi
21388
21389         elif test $ol_enable_slp = yes ; then
21390                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21391         fi
21392 fi
21393
21394
21395 echo $ac_n "checking long long""... $ac_c" 1>&6
21396 echo "configure:21397: checking long long" >&5
21397 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21398   echo $ac_n "(cached) $ac_c" 1>&6
21399 else
21400   
21401         cat > conftest.$ac_ext <<EOF
21402 #line 21403 "configure"
21403 #include "confdefs.h"
21404
21405 int main() {
21406 long long x;
21407 ; return 0; }
21408 EOF
21409 if { (eval echo configure:21410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21410   rm -rf conftest*
21411   ol_cv_type_long_long=yes
21412 else
21413   echo "configure: failed program was:" >&5
21414   cat conftest.$ac_ext >&5
21415   rm -rf conftest*
21416   ol_cv_type_long_long=no
21417 fi
21418 rm -f conftest*
21419 fi
21420
21421 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21422 if test $ol_cv_type_long_long = yes; then
21423         cat >> confdefs.h <<\EOF
21424 #define HAVE_LONG_LONG 1
21425 EOF
21426
21427 fi
21428
21429 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21430 echo "configure:21431: checking for ANSI C header files" >&5
21431 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21432   echo $ac_n "(cached) $ac_c" 1>&6
21433 else
21434   cat > conftest.$ac_ext <<EOF
21435 #line 21436 "configure"
21436 #include "confdefs.h"
21437 #include <stdlib.h>
21438 #include <stdarg.h>
21439 #include <string.h>
21440 #include <float.h>
21441 EOF
21442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21443 { (eval echo configure:21444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21445 if test -z "$ac_err"; then
21446   rm -rf conftest*
21447   ac_cv_header_stdc=yes
21448 else
21449   echo "$ac_err" >&5
21450   echo "configure: failed program was:" >&5
21451   cat conftest.$ac_ext >&5
21452   rm -rf conftest*
21453   ac_cv_header_stdc=no
21454 fi
21455 rm -f conftest*
21456
21457 if test $ac_cv_header_stdc = yes; then
21458   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21459 cat > conftest.$ac_ext <<EOF
21460 #line 21461 "configure"
21461 #include "confdefs.h"
21462 #include <string.h>
21463 EOF
21464 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21465   egrep "memchr" >/dev/null 2>&1; then
21466   :
21467 else
21468   rm -rf conftest*
21469   ac_cv_header_stdc=no
21470 fi
21471 rm -f conftest*
21472
21473 fi
21474
21475 if test $ac_cv_header_stdc = yes; then
21476   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21477 cat > conftest.$ac_ext <<EOF
21478 #line 21479 "configure"
21479 #include "confdefs.h"
21480 #include <stdlib.h>
21481 EOF
21482 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21483   egrep "free" >/dev/null 2>&1; then
21484   :
21485 else
21486   rm -rf conftest*
21487   ac_cv_header_stdc=no
21488 fi
21489 rm -f conftest*
21490
21491 fi
21492
21493 if test $ac_cv_header_stdc = yes; then
21494   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21495 if test "$cross_compiling" = yes; then
21496   :
21497 else
21498   cat > conftest.$ac_ext <<EOF
21499 #line 21500 "configure"
21500 #include "confdefs.h"
21501 #include <ctype.h>
21502 #if ((' ' & 0x0FF) == 0x020)
21503 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21504 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21505 #else
21506 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21507  || ('j' <= (c) && (c) <= 'r') \
21508  || ('s' <= (c) && (c) <= 'z'))
21509 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21510 #endif
21511 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21512 int main () { int i; for (i = 0; i < 256; i++)
21513 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21514 exit (0); }
21515
21516 EOF
21517 if { (eval echo configure:21518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21518 then
21519   :
21520 else
21521   echo "configure: failed program was:" >&5
21522   cat conftest.$ac_ext >&5
21523   rm -fr conftest*
21524   ac_cv_header_stdc=no
21525 fi
21526 rm -fr conftest*
21527 fi
21528
21529 fi
21530 fi
21531
21532 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21533 if test $ac_cv_header_stdc = yes; then
21534   cat >> confdefs.h <<\EOF
21535 #define STDC_HEADERS 1
21536 EOF
21537
21538 fi
21539
21540 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21541 echo "configure:21542: checking for mode_t" >&5
21542 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21543   echo $ac_n "(cached) $ac_c" 1>&6
21544 else
21545   cat > conftest.$ac_ext <<EOF
21546 #line 21547 "configure"
21547 #include "confdefs.h"
21548 #include <sys/types.h>
21549 #if STDC_HEADERS
21550 #include <stdlib.h>
21551 #include <stddef.h>
21552 #endif
21553
21554 EOF
21555 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21556   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21557   rm -rf conftest*
21558   eval "ac_cv_type_mode_t=yes"
21559 else
21560   rm -rf conftest*
21561   eval "ac_cv_type_mode_t=no"
21562 fi
21563 rm -f conftest*
21564
21565 fi
21566 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21567   echo "$ac_t""yes" 1>&6
21568 else
21569   echo "$ac_t""no" 1>&6
21570   cat >> confdefs.h <<EOF
21571 #define mode_t int
21572 EOF
21573
21574 fi
21575
21576 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21577 echo "configure:21578: checking for off_t" >&5
21578 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21579   echo $ac_n "(cached) $ac_c" 1>&6
21580 else
21581   cat > conftest.$ac_ext <<EOF
21582 #line 21583 "configure"
21583 #include "confdefs.h"
21584 #include <sys/types.h>
21585 #if STDC_HEADERS
21586 #include <stdlib.h>
21587 #include <stddef.h>
21588 #endif
21589
21590 EOF
21591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21592   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21593   rm -rf conftest*
21594   eval "ac_cv_type_off_t=yes"
21595 else
21596   rm -rf conftest*
21597   eval "ac_cv_type_off_t=no"
21598 fi
21599 rm -f conftest*
21600
21601 fi
21602 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21603   echo "$ac_t""yes" 1>&6
21604 else
21605   echo "$ac_t""no" 1>&6
21606   cat >> confdefs.h <<EOF
21607 #define off_t long
21608 EOF
21609
21610 fi
21611
21612 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21613 echo "configure:21614: checking for pid_t" >&5
21614 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21615   echo $ac_n "(cached) $ac_c" 1>&6
21616 else
21617   cat > conftest.$ac_ext <<EOF
21618 #line 21619 "configure"
21619 #include "confdefs.h"
21620 #include <sys/types.h>
21621 #if STDC_HEADERS
21622 #include <stdlib.h>
21623 #include <stddef.h>
21624 #endif
21625
21626 EOF
21627 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21628   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21629   rm -rf conftest*
21630   eval "ac_cv_type_pid_t=yes"
21631 else
21632   rm -rf conftest*
21633   eval "ac_cv_type_pid_t=no"
21634 fi
21635 rm -f conftest*
21636
21637 fi
21638 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21639   echo "$ac_t""yes" 1>&6
21640 else
21641   echo "$ac_t""no" 1>&6
21642   cat >> confdefs.h <<EOF
21643 #define pid_t int
21644 EOF
21645
21646 fi
21647
21648 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21649 echo "configure:21650: checking for ptrdiff_t" >&5
21650 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21651   echo $ac_n "(cached) $ac_c" 1>&6
21652 else
21653   cat > conftest.$ac_ext <<EOF
21654 #line 21655 "configure"
21655 #include "confdefs.h"
21656 #include <stddef.h>
21657 int main() {
21658 ptrdiff_t p
21659 ; return 0; }
21660 EOF
21661 if { (eval echo configure:21662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21662   rm -rf conftest*
21663   am_cv_type_ptrdiff_t=yes
21664 else
21665   echo "configure: failed program was:" >&5
21666   cat conftest.$ac_ext >&5
21667   rm -rf conftest*
21668   am_cv_type_ptrdiff_t=no
21669 fi
21670 rm -f conftest*
21671 fi
21672
21673 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21674    if test $am_cv_type_ptrdiff_t = yes; then
21675      cat >> confdefs.h <<\EOF
21676 #define HAVE_PTRDIFF_T 1
21677 EOF
21678
21679    fi
21680
21681 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21682 echo "configure:21683: checking return type of signal handlers" >&5
21683 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21684   echo $ac_n "(cached) $ac_c" 1>&6
21685 else
21686   cat > conftest.$ac_ext <<EOF
21687 #line 21688 "configure"
21688 #include "confdefs.h"
21689 #include <sys/types.h>
21690 #include <signal.h>
21691 #ifdef signal
21692 #undef signal
21693 #endif
21694 #ifdef __cplusplus
21695 extern "C" void (*signal (int, void (*)(int)))(int);
21696 #else
21697 void (*signal ()) ();
21698 #endif
21699
21700 int main() {
21701 int i;
21702 ; return 0; }
21703 EOF
21704 if { (eval echo configure:21705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21705   rm -rf conftest*
21706   ac_cv_type_signal=void
21707 else
21708   echo "configure: failed program was:" >&5
21709   cat conftest.$ac_ext >&5
21710   rm -rf conftest*
21711   ac_cv_type_signal=int
21712 fi
21713 rm -f conftest*
21714 fi
21715
21716 echo "$ac_t""$ac_cv_type_signal" 1>&6
21717 cat >> confdefs.h <<EOF
21718 #define RETSIGTYPE $ac_cv_type_signal
21719 EOF
21720
21721
21722 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21723 echo "configure:21724: checking for size_t" >&5
21724 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21725   echo $ac_n "(cached) $ac_c" 1>&6
21726 else
21727   cat > conftest.$ac_ext <<EOF
21728 #line 21729 "configure"
21729 #include "confdefs.h"
21730 #include <sys/types.h>
21731 #if STDC_HEADERS
21732 #include <stdlib.h>
21733 #include <stddef.h>
21734 #endif
21735
21736 EOF
21737 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21738   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21739   rm -rf conftest*
21740   eval "ac_cv_type_size_t=yes"
21741 else
21742   rm -rf conftest*
21743   eval "ac_cv_type_size_t=no"
21744 fi
21745 rm -f conftest*
21746
21747 fi
21748 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21749   echo "$ac_t""yes" 1>&6
21750 else
21751   echo "$ac_t""no" 1>&6
21752   cat >> confdefs.h <<EOF
21753 #define size_t unsigned
21754 EOF
21755
21756 fi
21757
21758
21759 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21760 echo "configure:21761: checking for ssize_t" >&5
21761 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21762   echo $ac_n "(cached) $ac_c" 1>&6
21763 else
21764   cat > conftest.$ac_ext <<EOF
21765 #line 21766 "configure"
21766 #include "confdefs.h"
21767 #include <sys/types.h>
21768 #if STDC_HEADERS
21769 #include <stdlib.h>
21770 #include <stddef.h>
21771 #endif
21772
21773 EOF
21774 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21775   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21776   rm -rf conftest*
21777   eval "ac_cv_type_ssize_t=yes"
21778 else
21779   rm -rf conftest*
21780   eval "ac_cv_type_ssize_t=no"
21781 fi
21782 rm -f conftest*
21783
21784 fi
21785 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21786   echo "$ac_t""yes" 1>&6
21787 else
21788   echo "$ac_t""no" 1>&6
21789   cat >> confdefs.h <<EOF
21790 #define ssize_t signed int
21791 EOF
21792
21793 fi
21794
21795 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21796 echo "configure:21797: checking for caddr_t" >&5
21797 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21798   echo $ac_n "(cached) $ac_c" 1>&6
21799 else
21800   cat > conftest.$ac_ext <<EOF
21801 #line 21802 "configure"
21802 #include "confdefs.h"
21803 #include <sys/types.h>
21804 #if STDC_HEADERS
21805 #include <stdlib.h>
21806 #include <stddef.h>
21807 #endif
21808
21809 EOF
21810 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21811   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21812   rm -rf conftest*
21813   eval "ac_cv_type_caddr_t=yes"
21814 else
21815   rm -rf conftest*
21816   eval "ac_cv_type_caddr_t=no"
21817 fi
21818 rm -f conftest*
21819
21820 fi
21821 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21822   echo "$ac_t""yes" 1>&6
21823 else
21824   echo "$ac_t""no" 1>&6
21825   cat >> confdefs.h <<EOF
21826 #define caddr_t char *
21827 EOF
21828
21829 fi
21830
21831
21832 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21833 echo "configure:21834: checking for socklen_t" >&5
21834 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21835   echo $ac_n "(cached) $ac_c" 1>&6
21836 else
21837   cat > conftest.$ac_ext <<EOF
21838 #line 21839 "configure"
21839 #include "confdefs.h"
21840
21841 #ifdef HAVE_SYS_TYPES_H
21842 #include <sys/types.h>
21843 #endif
21844 #ifdef HAVE_SYS_SOCKET_H
21845 #include <sys/socket.h>
21846 #endif
21847
21848 int main() {
21849 socklen_t len;
21850 ; return 0; }
21851 EOF
21852 if { (eval echo configure:21853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21853   rm -rf conftest*
21854   ol_cv_type_socklen_t=yes
21855 else
21856   echo "configure: failed program was:" >&5
21857   cat conftest.$ac_ext >&5
21858   rm -rf conftest*
21859   ol_cv_type_socklen_t=no
21860 fi
21861 rm -f conftest*
21862 fi
21863
21864 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21865   if test $ol_cv_type_socklen_t = no; then
21866     cat >> confdefs.h <<\EOF
21867 #define socklen_t int
21868 EOF
21869
21870   fi
21871  
21872 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21873 echo "configure:21874: checking for member st_blksize in aggregate type struct stat" >&5
21874 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21875   echo $ac_n "(cached) $ac_c" 1>&6
21876 else
21877   cat > conftest.$ac_ext <<EOF
21878 #line 21879 "configure"
21879 #include "confdefs.h"
21880 #include <sys/types.h>
21881 #include <sys/stat.h>
21882 int main() {
21883 struct stat foo; foo.st_blksize;
21884 ; return 0; }
21885 EOF
21886 if { (eval echo configure:21887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21887   rm -rf conftest*
21888   ac_cv_c_struct_member_st_blksize=yes
21889 else
21890   echo "configure: failed program was:" >&5
21891   cat conftest.$ac_ext >&5
21892   rm -rf conftest*
21893   ac_cv_c_struct_member_st_blksize=no
21894 fi
21895 rm -f conftest*
21896 fi
21897
21898 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21899 st_blksize="$ac_cv_c_struct_member_st_blksize"
21900 if test $ac_cv_c_struct_member_st_blksize = yes; then
21901   cat >> confdefs.h <<\EOF
21902 #define HAVE_ST_BLKSIZE 1
21903 EOF
21904
21905 fi
21906
21907 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21908 echo "configure:21909: checking whether time.h and sys/time.h may both be included" >&5
21909 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21910   echo $ac_n "(cached) $ac_c" 1>&6
21911 else
21912   cat > conftest.$ac_ext <<EOF
21913 #line 21914 "configure"
21914 #include "confdefs.h"
21915 #include <sys/types.h>
21916 #include <sys/time.h>
21917 #include <time.h>
21918 int main() {
21919 struct tm *tp;
21920 ; return 0; }
21921 EOF
21922 if { (eval echo configure:21923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21923   rm -rf conftest*
21924   ac_cv_header_time=yes
21925 else
21926   echo "configure: failed program was:" >&5
21927   cat conftest.$ac_ext >&5
21928   rm -rf conftest*
21929   ac_cv_header_time=no
21930 fi
21931 rm -f conftest*
21932 fi
21933
21934 echo "$ac_t""$ac_cv_header_time" 1>&6
21935 if test $ac_cv_header_time = yes; then
21936   cat >> confdefs.h <<\EOF
21937 #define TIME_WITH_SYS_TIME 1
21938 EOF
21939
21940 fi
21941
21942 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21943 echo "configure:21944: checking whether struct tm is in sys/time.h or time.h" >&5
21944 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21945   echo $ac_n "(cached) $ac_c" 1>&6
21946 else
21947   cat > conftest.$ac_ext <<EOF
21948 #line 21949 "configure"
21949 #include "confdefs.h"
21950 #include <sys/types.h>
21951 #include <time.h>
21952 int main() {
21953 struct tm *tp; tp->tm_sec;
21954 ; return 0; }
21955 EOF
21956 if { (eval echo configure:21957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21957   rm -rf conftest*
21958   ac_cv_struct_tm=time.h
21959 else
21960   echo "configure: failed program was:" >&5
21961   cat conftest.$ac_ext >&5
21962   rm -rf conftest*
21963   ac_cv_struct_tm=sys/time.h
21964 fi
21965 rm -f conftest*
21966 fi
21967
21968 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21969 if test $ac_cv_struct_tm = sys/time.h; then
21970   cat >> confdefs.h <<\EOF
21971 #define TM_IN_SYS_TIME 1
21972 EOF
21973
21974 fi
21975
21976 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21977 echo "configure:21978: checking for uid_t in sys/types.h" >&5
21978 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21979   echo $ac_n "(cached) $ac_c" 1>&6
21980 else
21981   cat > conftest.$ac_ext <<EOF
21982 #line 21983 "configure"
21983 #include "confdefs.h"
21984 #include <sys/types.h>
21985 EOF
21986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21987   egrep "uid_t" >/dev/null 2>&1; then
21988   rm -rf conftest*
21989   ac_cv_type_uid_t=yes
21990 else
21991   rm -rf conftest*
21992   ac_cv_type_uid_t=no
21993 fi
21994 rm -f conftest*
21995
21996 fi
21997
21998 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21999 if test $ac_cv_type_uid_t = no; then
22000   cat >> confdefs.h <<\EOF
22001 #define uid_t int
22002 EOF
22003
22004   cat >> confdefs.h <<\EOF
22005 #define gid_t int
22006 EOF
22007
22008 fi
22009
22010 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22011 echo "configure:22012: checking for sig_atomic_t" >&5
22012 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22013   echo $ac_n "(cached) $ac_c" 1>&6
22014 else
22015   cat > conftest.$ac_ext <<EOF
22016 #line 22017 "configure"
22017 #include "confdefs.h"
22018 #include <signal.h>
22019 int main() {
22020 sig_atomic_t atomic;
22021 ; return 0; }
22022 EOF
22023 if { (eval echo configure:22024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22024   rm -rf conftest*
22025   ol_cv_type_sig_atomic_t=yes
22026 else
22027   echo "configure: failed program was:" >&5
22028   cat conftest.$ac_ext >&5
22029   rm -rf conftest*
22030   ol_cv_type_sig_atomic_t=no
22031 fi
22032 rm -f conftest*
22033 fi
22034
22035 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22036   if test $ol_cv_type_sig_atomic_t = no; then
22037     cat >> confdefs.h <<\EOF
22038 #define sig_atomic_t int
22039 EOF
22040
22041   fi
22042  
22043
22044
22045 # test for pw_gecos in struct passwd
22046 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22047 echo "configure:22048: checking struct passwd for pw_gecos" >&5
22048 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22049   echo $ac_n "(cached) $ac_c" 1>&6
22050 else
22051   
22052         cat > conftest.$ac_ext <<EOF
22053 #line 22054 "configure"
22054 #include "confdefs.h"
22055 #include <pwd.h>
22056 int main() {
22057
22058         struct passwd pwd;
22059         pwd.pw_gecos = pwd.pw_name;
22060
22061 ; return 0; }
22062 EOF
22063 if { (eval echo configure:22064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22064   rm -rf conftest*
22065   ol_cv_struct_passwd_pw_gecos=yes
22066 else
22067   echo "configure: failed program was:" >&5
22068   cat conftest.$ac_ext >&5
22069   rm -rf conftest*
22070   ol_cv_struct_passwd_pw_gecos=no
22071 fi
22072 rm -f conftest*
22073 fi
22074
22075 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22076 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22077         cat >> confdefs.h <<\EOF
22078 #define HAVE_PW_GECOS 1
22079 EOF
22080
22081 fi
22082
22083 # test for pw_passwd in struct passwd
22084 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22085 echo "configure:22086: checking struct passwd for pw_passwd" >&5
22086 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22087   echo $ac_n "(cached) $ac_c" 1>&6
22088 else
22089   
22090         cat > conftest.$ac_ext <<EOF
22091 #line 22092 "configure"
22092 #include "confdefs.h"
22093 #include <pwd.h>
22094 int main() {
22095
22096         struct passwd pwd;
22097         pwd.pw_passwd = pwd.pw_name;
22098
22099 ; return 0; }
22100 EOF
22101 if { (eval echo configure:22102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22102   rm -rf conftest*
22103   ol_cv_struct_passwd_pw_passwd=yes
22104 else
22105   echo "configure: failed program was:" >&5
22106   cat conftest.$ac_ext >&5
22107   rm -rf conftest*
22108   ol_cv_struct_passwd_pw_passwd=no
22109 fi
22110 rm -f conftest*
22111 fi
22112
22113 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22114 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22115         cat >> confdefs.h <<\EOF
22116 #define HAVE_PW_PASSWD 1
22117 EOF
22118
22119 fi
22120
22121
22122 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22123 echo "configure:22124: checking if toupper() requires islower()" >&5
22124 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22125   echo $ac_n "(cached) $ac_c" 1>&6
22126 else
22127   
22128         if test "$cross_compiling" = yes; then
22129   ol_cv_c_upper_lower=safe
22130 else
22131   cat > conftest.$ac_ext <<EOF
22132 #line 22133 "configure"
22133 #include "confdefs.h"
22134
22135 #include <ctype.h>
22136 main()
22137 {
22138         if ('C' == toupper('C'))
22139                 exit(0);
22140         else
22141                 exit(1);
22142 }
22143 EOF
22144 if { (eval echo configure:22145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22145 then
22146   ol_cv_c_upper_lower=no
22147 else
22148   echo "configure: failed program was:" >&5
22149   cat conftest.$ac_ext >&5
22150   rm -fr conftest*
22151   ol_cv_c_upper_lower=yes
22152 fi
22153 rm -fr conftest*
22154 fi
22155
22156 fi
22157
22158 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22159 if test $ol_cv_c_upper_lower != no ; then
22160         cat >> confdefs.h <<\EOF
22161 #define C_UPPER_LOWER 1
22162 EOF
22163
22164 fi
22165
22166 echo $ac_n "checking for working const""... $ac_c" 1>&6
22167 echo "configure:22168: checking for working const" >&5
22168 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22169   echo $ac_n "(cached) $ac_c" 1>&6
22170 else
22171   cat > conftest.$ac_ext <<EOF
22172 #line 22173 "configure"
22173 #include "confdefs.h"
22174
22175 int main() {
22176
22177 /* Ultrix mips cc rejects this.  */
22178 typedef int charset[2]; const charset x;
22179 /* SunOS 4.1.1 cc rejects this.  */
22180 char const *const *ccp;
22181 char **p;
22182 /* NEC SVR4.0.2 mips cc rejects this.  */
22183 struct point {int x, y;};
22184 static struct point const zero = {0,0};
22185 /* AIX XL C 1.02.0.0 rejects this.
22186    It does not let you subtract one const X* pointer from another in an arm
22187    of an if-expression whose if-part is not a constant expression */
22188 const char *g = "string";
22189 ccp = &g + (g ? g-g : 0);
22190 /* HPUX 7.0 cc rejects these. */
22191 ++ccp;
22192 p = (char**) ccp;
22193 ccp = (char const *const *) p;
22194 { /* SCO 3.2v4 cc rejects this.  */
22195   char *t;
22196   char const *s = 0 ? (char *) 0 : (char const *) 0;
22197
22198   *t++ = 0;
22199 }
22200 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22201   int x[] = {25, 17};
22202   const int *foo = &x[0];
22203   ++foo;
22204 }
22205 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22206   typedef const int *iptr;
22207   iptr p = 0;
22208   ++p;
22209 }
22210 { /* AIX XL C 1.02.0.0 rejects this saying
22211      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22212   struct s { int j; const int *ap[3]; };
22213   struct s *b; b->j = 5;
22214 }
22215 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22216   const int foo = 10;
22217 }
22218
22219 ; return 0; }
22220 EOF
22221 if { (eval echo configure:22222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22222   rm -rf conftest*
22223   ac_cv_c_const=yes
22224 else
22225   echo "configure: failed program was:" >&5
22226   cat conftest.$ac_ext >&5
22227   rm -rf conftest*
22228   ac_cv_c_const=no
22229 fi
22230 rm -f conftest*
22231 fi
22232
22233 echo "$ac_t""$ac_cv_c_const" 1>&6
22234 if test $ac_cv_c_const = no; then
22235   cat >> confdefs.h <<\EOF
22236 #define const 
22237 EOF
22238
22239 fi
22240
22241 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22242 echo "configure:22243: checking if compiler understands volatile" >&5
22243 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22244   echo $ac_n "(cached) $ac_c" 1>&6
22245 else
22246   cat > conftest.$ac_ext <<EOF
22247 #line 22248 "configure"
22248 #include "confdefs.h"
22249 int x, y, z;
22250 int main() {
22251 volatile int a; int * volatile b = x ? &y : &z;
22252       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22253       *b = 0;
22254 ; return 0; }
22255 EOF
22256 if { (eval echo configure:22257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22257   rm -rf conftest*
22258   ol_cv_c_volatile=yes
22259 else
22260   echo "configure: failed program was:" >&5
22261   cat conftest.$ac_ext >&5
22262   rm -rf conftest*
22263   ol_cv_c_volatile=no
22264 fi
22265 rm -f conftest*
22266 fi
22267
22268 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22269   if test $ol_cv_c_volatile = yes; then
22270     : 
22271   else
22272     cat >> confdefs.h <<\EOF
22273 #define volatile 
22274 EOF
22275
22276   fi
22277  
22278
22279 if test $cross_compiling = yes ; then
22280         cat >> confdefs.h <<\EOF
22281 #define CROSS_COMPILING 1
22282 EOF
22283
22284 else
22285         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22286 echo "configure:22287: checking whether byte ordering is bigendian" >&5
22287 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22288   echo $ac_n "(cached) $ac_c" 1>&6
22289 else
22290   ac_cv_c_bigendian=unknown
22291 # See if sys/param.h defines the BYTE_ORDER macro.
22292 cat > conftest.$ac_ext <<EOF
22293 #line 22294 "configure"
22294 #include "confdefs.h"
22295 #include <sys/types.h>
22296 #include <sys/param.h>
22297 int main() {
22298
22299 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22300  bogus endian macros
22301 #endif
22302 ; return 0; }
22303 EOF
22304 if { (eval echo configure:22305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22305   rm -rf conftest*
22306   # It does; now see whether it defined to BIG_ENDIAN or not.
22307 cat > conftest.$ac_ext <<EOF
22308 #line 22309 "configure"
22309 #include "confdefs.h"
22310 #include <sys/types.h>
22311 #include <sys/param.h>
22312 int main() {
22313
22314 #if BYTE_ORDER != BIG_ENDIAN
22315  not big endian
22316 #endif
22317 ; return 0; }
22318 EOF
22319 if { (eval echo configure:22320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22320   rm -rf conftest*
22321   ac_cv_c_bigendian=yes
22322 else
22323   echo "configure: failed program was:" >&5
22324   cat conftest.$ac_ext >&5
22325   rm -rf conftest*
22326   ac_cv_c_bigendian=no
22327 fi
22328 rm -f conftest*
22329 else
22330   echo "configure: failed program was:" >&5
22331   cat conftest.$ac_ext >&5
22332 fi
22333 rm -f conftest*
22334 if test $ac_cv_c_bigendian = unknown; then
22335 if test "$cross_compiling" = yes; then
22336     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22337 else
22338   cat > conftest.$ac_ext <<EOF
22339 #line 22340 "configure"
22340 #include "confdefs.h"
22341 main () {
22342   /* Are we little or big endian?  From Harbison&Steele.  */
22343   union
22344   {
22345     long l;
22346     char c[sizeof (long)];
22347   } u;
22348   u.l = 1;
22349   exit (u.c[sizeof (long) - 1] == 1);
22350 }
22351 EOF
22352 if { (eval echo configure:22353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22353 then
22354   ac_cv_c_bigendian=no
22355 else
22356   echo "configure: failed program was:" >&5
22357   cat conftest.$ac_ext >&5
22358   rm -fr conftest*
22359   ac_cv_c_bigendian=yes
22360 fi
22361 rm -fr conftest*
22362 fi
22363
22364 fi
22365 fi
22366
22367 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22368 if test $ac_cv_c_bigendian = yes; then
22369   cat >> confdefs.h <<\EOF
22370 #define WORDS_BIGENDIAN 1
22371 EOF
22372
22373 fi
22374
22375 fi
22376
22377 echo $ac_n "checking size of short""... $ac_c" 1>&6
22378 echo "configure:22379: checking size of short" >&5 
22379 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22380   echo $ac_n "(cached) $ac_c" 1>&6
22381 else
22382   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22383   cat > conftest.$ac_ext <<EOF
22384 #line 22385 "configure"
22385 #include "confdefs.h"
22386 #include "confdefs.h" 
22387 #include <sys/types.h> 
22388  
22389
22390 int main() {
22391 switch (0) case 0: case (sizeof (short) == $ac_size):;
22392 ; return 0; }
22393 EOF
22394 if { (eval echo configure:22395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22395   rm -rf conftest*
22396   ac_cv_sizeof_short=$ac_size
22397 else
22398   echo "configure: failed program was:" >&5
22399   cat conftest.$ac_ext >&5
22400 fi
22401 rm -f conftest* 
22402   if test x$ac_cv_sizeof_short != x ; then break; fi 
22403 done 
22404
22405 fi
22406  
22407 if test x$ac_cv_sizeof_short = x ; then 
22408   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22409 fi 
22410 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22411 cat >> confdefs.h <<EOF
22412 #define SIZEOF_SHORT $ac_cv_sizeof_short
22413 EOF
22414  
22415  
22416 echo $ac_n "checking size of int""... $ac_c" 1>&6
22417 echo "configure:22418: checking size of int" >&5 
22418 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22419   echo $ac_n "(cached) $ac_c" 1>&6
22420 else
22421   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22422   cat > conftest.$ac_ext <<EOF
22423 #line 22424 "configure"
22424 #include "confdefs.h"
22425 #include "confdefs.h" 
22426 #include <sys/types.h> 
22427  
22428
22429 int main() {
22430 switch (0) case 0: case (sizeof (int) == $ac_size):;
22431 ; return 0; }
22432 EOF
22433 if { (eval echo configure:22434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22434   rm -rf conftest*
22435   ac_cv_sizeof_int=$ac_size
22436 else
22437   echo "configure: failed program was:" >&5
22438   cat conftest.$ac_ext >&5
22439 fi
22440 rm -f conftest* 
22441   if test x$ac_cv_sizeof_int != x ; then break; fi 
22442 done 
22443
22444 fi
22445  
22446 if test x$ac_cv_sizeof_int = x ; then 
22447   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22448 fi 
22449 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22450 cat >> confdefs.h <<EOF
22451 #define SIZEOF_INT $ac_cv_sizeof_int
22452 EOF
22453  
22454  
22455 echo $ac_n "checking size of long""... $ac_c" 1>&6
22456 echo "configure:22457: checking size of long" >&5 
22457 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22458   echo $ac_n "(cached) $ac_c" 1>&6
22459 else
22460   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22461   cat > conftest.$ac_ext <<EOF
22462 #line 22463 "configure"
22463 #include "confdefs.h"
22464 #include "confdefs.h" 
22465 #include <sys/types.h> 
22466  
22467
22468 int main() {
22469 switch (0) case 0: case (sizeof (long) == $ac_size):;
22470 ; return 0; }
22471 EOF
22472 if { (eval echo configure:22473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22473   rm -rf conftest*
22474   ac_cv_sizeof_long=$ac_size
22475 else
22476   echo "configure: failed program was:" >&5
22477   cat conftest.$ac_ext >&5
22478 fi
22479 rm -f conftest* 
22480   if test x$ac_cv_sizeof_long != x ; then break; fi 
22481 done 
22482
22483 fi
22484  
22485 if test x$ac_cv_sizeof_long = x ; then 
22486   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22487 fi 
22488 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22489 cat >> confdefs.h <<EOF
22490 #define SIZEOF_LONG $ac_cv_sizeof_long
22491 EOF
22492  
22493
22494
22495 if test "$ac_cv_sizeof_int" -lt 4 ; then
22496         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22497
22498         cat >> confdefs.h <<\EOF
22499 #define LBER_INT_T long
22500 EOF
22501
22502 else
22503         cat >> confdefs.h <<\EOF
22504 #define LBER_INT_T int
22505 EOF
22506
22507 fi
22508
22509 cat >> confdefs.h <<\EOF
22510 #define LBER_LEN_T long
22511 EOF
22512
22513 cat >> confdefs.h <<\EOF
22514 #define LBER_SOCKET_T int
22515 EOF
22516
22517 cat >> confdefs.h <<\EOF
22518 #define LBER_TAG_T long
22519 EOF
22520
22521
22522 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22523 echo "configure:22524: checking for 8-bit clean memcmp" >&5
22524 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22525   echo $ac_n "(cached) $ac_c" 1>&6
22526 else
22527   if test "$cross_compiling" = yes; then
22528   ac_cv_func_memcmp_clean=no
22529 else
22530   cat > conftest.$ac_ext <<EOF
22531 #line 22532 "configure"
22532 #include "confdefs.h"
22533
22534 main()
22535 {
22536   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22537   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22538 }
22539
22540 EOF
22541 if { (eval echo configure:22542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22542 then
22543   ac_cv_func_memcmp_clean=yes
22544 else
22545   echo "configure: failed program was:" >&5
22546   cat conftest.$ac_ext >&5
22547   rm -fr conftest*
22548   ac_cv_func_memcmp_clean=no
22549 fi
22550 rm -fr conftest*
22551 fi
22552
22553 fi
22554
22555 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22556 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22557
22558 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22559 echo "configure:22560: checking for strftime" >&5
22560 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22561   echo $ac_n "(cached) $ac_c" 1>&6
22562 else
22563   cat > conftest.$ac_ext <<EOF
22564 #line 22565 "configure"
22565 #include "confdefs.h"
22566 /* System header to define __stub macros and hopefully few prototypes,
22567     which can conflict with char strftime(); below.  */
22568 #include <assert.h>
22569 /* Override any gcc2 internal prototype to avoid an error.  */
22570 /* We use char because int might match the return type of a gcc2
22571     builtin and then its argument prototype would still apply.  */
22572 char strftime();
22573 char (*f)();
22574
22575 int main() {
22576
22577 /* The GNU C library defines this for functions which it implements
22578     to always fail with ENOSYS.  Some functions are actually named
22579     something starting with __ and the normal name is an alias.  */
22580 #if defined (__stub_strftime) || defined (__stub___strftime)
22581 choke me
22582 #else
22583 f = strftime;
22584 #endif
22585
22586 ; return 0; }
22587 EOF
22588 if { (eval echo configure:22589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22589   rm -rf conftest*
22590   eval "ac_cv_func_strftime=yes"
22591 else
22592   echo "configure: failed program was:" >&5
22593   cat conftest.$ac_ext >&5
22594   rm -rf conftest*
22595   eval "ac_cv_func_strftime=no"
22596 fi
22597 rm -f conftest*
22598 fi
22599
22600 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22601   echo "$ac_t""yes" 1>&6
22602   cat >> confdefs.h <<\EOF
22603 #define HAVE_STRFTIME 1
22604 EOF
22605
22606 else
22607   echo "$ac_t""no" 1>&6
22608 # strftime is in -lintl on SCO UNIX.
22609 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22610 echo "configure:22611: checking for strftime in -lintl" >&5
22611 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22612 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22613   echo $ac_n "(cached) $ac_c" 1>&6
22614 else
22615   ac_save_LIBS="$LIBS"
22616 LIBS="-lintl  $LIBS"
22617 cat > conftest.$ac_ext <<EOF
22618 #line 22619 "configure"
22619 #include "confdefs.h"
22620 /* Override any gcc2 internal prototype to avoid an error.  */
22621 /* We use char because int might match the return type of a gcc2
22622     builtin and then its argument prototype would still apply.  */
22623 char strftime();
22624
22625 int main() {
22626 strftime()
22627 ; return 0; }
22628 EOF
22629 if { (eval echo configure:22630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22630   rm -rf conftest*
22631   eval "ac_cv_lib_$ac_lib_var=yes"
22632 else
22633   echo "configure: failed program was:" >&5
22634   cat conftest.$ac_ext >&5
22635   rm -rf conftest*
22636   eval "ac_cv_lib_$ac_lib_var=no"
22637 fi
22638 rm -f conftest*
22639 LIBS="$ac_save_LIBS"
22640
22641 fi
22642 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22643   echo "$ac_t""yes" 1>&6
22644   cat >> confdefs.h <<\EOF
22645 #define HAVE_STRFTIME 1
22646 EOF
22647
22648 LIBS="-lintl $LIBS"
22649 else
22650   echo "$ac_t""no" 1>&6
22651 fi
22652
22653 fi
22654
22655
22656 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22657 echo "configure:22658: checking for inet_aton()" >&5
22658 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22659   echo $ac_n "(cached) $ac_c" 1>&6
22660 else
22661   cat > conftest.$ac_ext <<EOF
22662 #line 22663 "configure"
22663 #include "confdefs.h"
22664
22665 #ifdef HAVE_SYS_TYPES_H
22666 #       include <sys/types.h>
22667 #endif
22668 #ifdef HAVE_SYS_SOCKET_H
22669 #       include <sys/socket.h>
22670 #       ifdef HAVE_SYS_SELECT_H
22671 #               include <sys/select.h>
22672 #       endif
22673 #       include <netinet/in.h>
22674 #       ifdef HAVE_ARPA_INET_H
22675 #               include <arpa/inet.h>
22676 #       endif
22677 #endif
22678
22679 int main() {
22680 struct in_addr in;
22681 int rc = inet_aton( "255.255.255.255", &in );
22682 ; return 0; }
22683 EOF
22684 if { (eval echo configure:22685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22685   rm -rf conftest*
22686   ol_cv_func_inet_aton=yes
22687 else
22688   echo "configure: failed program was:" >&5
22689   cat conftest.$ac_ext >&5
22690   rm -rf conftest*
22691   ol_cv_func_inet_aton=no
22692 fi
22693 rm -f conftest*
22694 fi
22695
22696 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22697   if test $ol_cv_func_inet_aton != no; then
22698     cat >> confdefs.h <<\EOF
22699 #define HAVE_INET_ATON 1
22700 EOF
22701
22702   fi
22703  
22704
22705 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22706 echo "configure:22707: checking for _spawnlp" >&5
22707 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22708   echo $ac_n "(cached) $ac_c" 1>&6
22709 else
22710   cat > conftest.$ac_ext <<EOF
22711 #line 22712 "configure"
22712 #include "confdefs.h"
22713 /* System header to define __stub macros and hopefully few prototypes,
22714     which can conflict with char _spawnlp(); below.  */
22715 #include <assert.h>
22716 /* Override any gcc2 internal prototype to avoid an error.  */
22717 /* We use char because int might match the return type of a gcc2
22718     builtin and then its argument prototype would still apply.  */
22719 char _spawnlp();
22720 char (*f)();
22721
22722 int main() {
22723
22724 /* The GNU C library defines this for functions which it implements
22725     to always fail with ENOSYS.  Some functions are actually named
22726     something starting with __ and the normal name is an alias.  */
22727 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22728 choke me
22729 #else
22730 f = _spawnlp;
22731 #endif
22732
22733 ; return 0; }
22734 EOF
22735 if { (eval echo configure:22736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22736   rm -rf conftest*
22737   eval "ac_cv_func__spawnlp=yes"
22738 else
22739   echo "configure: failed program was:" >&5
22740   cat conftest.$ac_ext >&5
22741   rm -rf conftest*
22742   eval "ac_cv_func__spawnlp=no"
22743 fi
22744 rm -f conftest*
22745 fi
22746
22747 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22748   echo "$ac_t""yes" 1>&6
22749   cat >> confdefs.h <<\EOF
22750 #define HAVE_SPAWNLP 1
22751 EOF
22752
22753 else
22754   echo "$ac_t""no" 1>&6
22755 fi
22756
22757
22758 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22759 echo "configure:22760: checking for _snprintf" >&5
22760 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22761   echo $ac_n "(cached) $ac_c" 1>&6
22762 else
22763   cat > conftest.$ac_ext <<EOF
22764 #line 22765 "configure"
22765 #include "confdefs.h"
22766 /* System header to define __stub macros and hopefully few prototypes,
22767     which can conflict with char _snprintf(); below.  */
22768 #include <assert.h>
22769 /* Override any gcc2 internal prototype to avoid an error.  */
22770 /* We use char because int might match the return type of a gcc2
22771     builtin and then its argument prototype would still apply.  */
22772 char _snprintf();
22773 char (*f)();
22774
22775 int main() {
22776
22777 /* The GNU C library defines this for functions which it implements
22778     to always fail with ENOSYS.  Some functions are actually named
22779     something starting with __ and the normal name is an alias.  */
22780 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22781 choke me
22782 #else
22783 f = _snprintf;
22784 #endif
22785
22786 ; return 0; }
22787 EOF
22788 if { (eval echo configure:22789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22789   rm -rf conftest*
22790   eval "ac_cv_func__snprintf=yes"
22791 else
22792   echo "configure: failed program was:" >&5
22793   cat conftest.$ac_ext >&5
22794   rm -rf conftest*
22795   eval "ac_cv_func__snprintf=no"
22796 fi
22797 rm -f conftest*
22798 fi
22799
22800 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22801   echo "$ac_t""yes" 1>&6
22802   ac_cv_func_snprintf=yes
22803         cat >> confdefs.h <<\EOF
22804 #define snprintf _snprintf
22805 EOF
22806
22807
22808 else
22809   echo "$ac_t""no" 1>&6
22810 fi
22811
22812
22813 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22814 echo "configure:22815: checking for _vsnprintf" >&5
22815 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22816   echo $ac_n "(cached) $ac_c" 1>&6
22817 else
22818   cat > conftest.$ac_ext <<EOF
22819 #line 22820 "configure"
22820 #include "confdefs.h"
22821 /* System header to define __stub macros and hopefully few prototypes,
22822     which can conflict with char _vsnprintf(); below.  */
22823 #include <assert.h>
22824 /* Override any gcc2 internal prototype to avoid an error.  */
22825 /* We use char because int might match the return type of a gcc2
22826     builtin and then its argument prototype would still apply.  */
22827 char _vsnprintf();
22828 char (*f)();
22829
22830 int main() {
22831
22832 /* The GNU C library defines this for functions which it implements
22833     to always fail with ENOSYS.  Some functions are actually named
22834     something starting with __ and the normal name is an alias.  */
22835 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22836 choke me
22837 #else
22838 f = _vsnprintf;
22839 #endif
22840
22841 ; return 0; }
22842 EOF
22843 if { (eval echo configure:22844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22844   rm -rf conftest*
22845   eval "ac_cv_func__vsnprintf=yes"
22846 else
22847   echo "configure: failed program was:" >&5
22848   cat conftest.$ac_ext >&5
22849   rm -rf conftest*
22850   eval "ac_cv_func__vsnprintf=no"
22851 fi
22852 rm -f conftest*
22853 fi
22854
22855 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22856   echo "$ac_t""yes" 1>&6
22857   ac_cv_func_vsnprintf=yes
22858         cat >> confdefs.h <<\EOF
22859 #define vsnprintf _vsnprintf
22860 EOF
22861
22862
22863 else
22864   echo "$ac_t""no" 1>&6
22865 fi
22866
22867
22868 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22869 echo "configure:22870: checking for vprintf" >&5
22870 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22871   echo $ac_n "(cached) $ac_c" 1>&6
22872 else
22873   cat > conftest.$ac_ext <<EOF
22874 #line 22875 "configure"
22875 #include "confdefs.h"
22876 /* System header to define __stub macros and hopefully few prototypes,
22877     which can conflict with char vprintf(); below.  */
22878 #include <assert.h>
22879 /* Override any gcc2 internal prototype to avoid an error.  */
22880 /* We use char because int might match the return type of a gcc2
22881     builtin and then its argument prototype would still apply.  */
22882 char vprintf();
22883 char (*f)();
22884
22885 int main() {
22886
22887 /* The GNU C library defines this for functions which it implements
22888     to always fail with ENOSYS.  Some functions are actually named
22889     something starting with __ and the normal name is an alias.  */
22890 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22891 choke me
22892 #else
22893 f = vprintf;
22894 #endif
22895
22896 ; return 0; }
22897 EOF
22898 if { (eval echo configure:22899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22899   rm -rf conftest*
22900   eval "ac_cv_func_vprintf=yes"
22901 else
22902   echo "configure: failed program was:" >&5
22903   cat conftest.$ac_ext >&5
22904   rm -rf conftest*
22905   eval "ac_cv_func_vprintf=no"
22906 fi
22907 rm -f conftest*
22908 fi
22909
22910 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22911   echo "$ac_t""yes" 1>&6
22912   cat >> confdefs.h <<\EOF
22913 #define HAVE_VPRINTF 1
22914 EOF
22915
22916 else
22917   echo "$ac_t""no" 1>&6
22918 fi
22919
22920 if test "$ac_cv_func_vprintf" != yes; then
22921 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22922 echo "configure:22923: checking for _doprnt" >&5
22923 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22924   echo $ac_n "(cached) $ac_c" 1>&6
22925 else
22926   cat > conftest.$ac_ext <<EOF
22927 #line 22928 "configure"
22928 #include "confdefs.h"
22929 /* System header to define __stub macros and hopefully few prototypes,
22930     which can conflict with char _doprnt(); below.  */
22931 #include <assert.h>
22932 /* Override any gcc2 internal prototype to avoid an error.  */
22933 /* We use char because int might match the return type of a gcc2
22934     builtin and then its argument prototype would still apply.  */
22935 char _doprnt();
22936 char (*f)();
22937
22938 int main() {
22939
22940 /* The GNU C library defines this for functions which it implements
22941     to always fail with ENOSYS.  Some functions are actually named
22942     something starting with __ and the normal name is an alias.  */
22943 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22944 choke me
22945 #else
22946 f = _doprnt;
22947 #endif
22948
22949 ; return 0; }
22950 EOF
22951 if { (eval echo configure:22952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22952   rm -rf conftest*
22953   eval "ac_cv_func__doprnt=yes"
22954 else
22955   echo "configure: failed program was:" >&5
22956   cat conftest.$ac_ext >&5
22957   rm -rf conftest*
22958   eval "ac_cv_func__doprnt=no"
22959 fi
22960 rm -f conftest*
22961 fi
22962
22963 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22964   echo "$ac_t""yes" 1>&6
22965   cat >> confdefs.h <<\EOF
22966 #define HAVE_DOPRNT 1
22967 EOF
22968
22969 else
22970   echo "$ac_t""no" 1>&6
22971 fi
22972
22973 fi
22974
22975
22976 if test $ac_cv_func_vprintf = yes ; then
22977                 for ac_func in snprintf vsnprintf
22978 do
22979 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22980 echo "configure:22981: checking for $ac_func" >&5
22981 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22982   echo $ac_n "(cached) $ac_c" 1>&6
22983 else
22984   cat > conftest.$ac_ext <<EOF
22985 #line 22986 "configure"
22986 #include "confdefs.h"
22987 /* System header to define __stub macros and hopefully few prototypes,
22988     which can conflict with char $ac_func(); below.  */
22989 #include <assert.h>
22990 /* Override any gcc2 internal prototype to avoid an error.  */
22991 /* We use char because int might match the return type of a gcc2
22992     builtin and then its argument prototype would still apply.  */
22993 char $ac_func();
22994 char (*f)();
22995
22996 int main() {
22997
22998 /* The GNU C library defines this for functions which it implements
22999     to always fail with ENOSYS.  Some functions are actually named
23000     something starting with __ and the normal name is an alias.  */
23001 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23002 choke me
23003 #else
23004 f = $ac_func;
23005 #endif
23006
23007 ; return 0; }
23008 EOF
23009 if { (eval echo configure:23010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23010   rm -rf conftest*
23011   eval "ac_cv_func_$ac_func=yes"
23012 else
23013   echo "configure: failed program was:" >&5
23014   cat conftest.$ac_ext >&5
23015   rm -rf conftest*
23016   eval "ac_cv_func_$ac_func=no"
23017 fi
23018 rm -f conftest*
23019 fi
23020
23021 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23022   echo "$ac_t""yes" 1>&6
23023     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23024   cat >> confdefs.h <<EOF
23025 #define $ac_tr_func 1
23026 EOF
23027  
23028 else
23029   echo "$ac_t""no" 1>&6
23030 fi
23031 done
23032
23033 fi
23034
23035 for ac_func in \
23036         bcopy                   \
23037         closesocket             \
23038         chroot                  \
23039         endgrent                \
23040         endpwent                \
23041         fcntl                   \
23042         flock                   \
23043         fstat                   \
23044         getdtablesize   \
23045         getgrgid                \
23046         gethostname             \
23047         getpass                 \
23048         getpassphrase   \
23049         getpwuid                \
23050         getpwnam                \
23051         getspnam                \
23052         gettimeofday    \
23053         initgroups              \
23054         lockf                   \
23055         memcpy                  \
23056         memmove                 \
23057         mkstemp                 \
23058         mktemp                  \
23059         pipe                    \
23060         read                    \
23061         recv                    \
23062         recvfrom                \
23063         setpwfile               \
23064         setgid                  \
23065         setegid                 \
23066         setsid                  \
23067         setuid                  \
23068         seteuid                 \
23069         sigaction               \
23070         signal                  \
23071         sigset                  \
23072         strdup                  \
23073         strerror                \
23074         strpbrk                 \
23075         strrchr                 \
23076         strsep                  \
23077         strstr                  \
23078         strtol                  \
23079         strtoul                 \
23080         strtoq                  \
23081         strtouq                 \
23082         strtoll                 \
23083         strspn                  \
23084         sysconf                 \
23085         usleep                  \
23086         waitpid                 \
23087         wait4                   \
23088         write                   \
23089         send                    \
23090         sendmsg                 \
23091         sendto                  \
23092
23093 do
23094 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23095 echo "configure:23096: checking for $ac_func" >&5
23096 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23097   echo $ac_n "(cached) $ac_c" 1>&6
23098 else
23099   cat > conftest.$ac_ext <<EOF
23100 #line 23101 "configure"
23101 #include "confdefs.h"
23102 /* System header to define __stub macros and hopefully few prototypes,
23103     which can conflict with char $ac_func(); below.  */
23104 #include <assert.h>
23105 /* Override any gcc2 internal prototype to avoid an error.  */
23106 /* We use char because int might match the return type of a gcc2
23107     builtin and then its argument prototype would still apply.  */
23108 char $ac_func();
23109 char (*f)();
23110
23111 int main() {
23112
23113 /* The GNU C library defines this for functions which it implements
23114     to always fail with ENOSYS.  Some functions are actually named
23115     something starting with __ and the normal name is an alias.  */
23116 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23117 choke me
23118 #else
23119 f = $ac_func;
23120 #endif
23121
23122 ; return 0; }
23123 EOF
23124 if { (eval echo configure:23125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23125   rm -rf conftest*
23126   eval "ac_cv_func_$ac_func=yes"
23127 else
23128   echo "configure: failed program was:" >&5
23129   cat conftest.$ac_ext >&5
23130   rm -rf conftest*
23131   eval "ac_cv_func_$ac_func=no"
23132 fi
23133 rm -f conftest*
23134 fi
23135
23136 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23137   echo "$ac_t""yes" 1>&6
23138     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23139   cat >> confdefs.h <<EOF
23140 #define $ac_tr_func 1
23141 EOF
23142  
23143 else
23144   echo "$ac_t""no" 1>&6
23145 fi
23146 done
23147
23148
23149 for ac_func in getopt getpeereid
23150 do
23151 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23152 echo "configure:23153: checking for $ac_func" >&5
23153 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23154   echo $ac_n "(cached) $ac_c" 1>&6
23155 else
23156   cat > conftest.$ac_ext <<EOF
23157 #line 23158 "configure"
23158 #include "confdefs.h"
23159 /* System header to define __stub macros and hopefully few prototypes,
23160     which can conflict with char $ac_func(); below.  */
23161 #include <assert.h>
23162 /* Override any gcc2 internal prototype to avoid an error.  */
23163 /* We use char because int might match the return type of a gcc2
23164     builtin and then its argument prototype would still apply.  */
23165 char $ac_func();
23166 char (*f)();
23167
23168 int main() {
23169
23170 /* The GNU C library defines this for functions which it implements
23171     to always fail with ENOSYS.  Some functions are actually named
23172     something starting with __ and the normal name is an alias.  */
23173 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23174 choke me
23175 #else
23176 f = $ac_func;
23177 #endif
23178
23179 ; return 0; }
23180 EOF
23181 if { (eval echo configure:23182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23182   rm -rf conftest*
23183   eval "ac_cv_func_$ac_func=yes"
23184 else
23185   echo "configure: failed program was:" >&5
23186   cat conftest.$ac_ext >&5
23187   rm -rf conftest*
23188   eval "ac_cv_func_$ac_func=no"
23189 fi
23190 rm -f conftest*
23191 fi
23192
23193 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23194   echo "$ac_t""yes" 1>&6
23195     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23196   cat >> confdefs.h <<EOF
23197 #define $ac_tr_func 1
23198 EOF
23199  
23200 else
23201   echo "$ac_t""no" 1>&6
23202 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23203 fi
23204 done
23205
23206
23207
23208 if test "$ac_cv_func_getopt" != yes; then
23209         LIBSRCS="$LIBSRCS getopt.c"
23210 fi
23211 if test "$ac_cv_func_getpeereid" != yes; then
23212         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23213 echo "configure:23214: checking for msg_accrights in msghdr" >&5
23214 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23215   echo $ac_n "(cached) $ac_c" 1>&6
23216 else
23217   cat > conftest.$ac_ext <<EOF
23218 #line 23219 "configure"
23219 #include "confdefs.h"
23220 #include <sys/socket.h>
23221 int main() {
23222 struct msghdr m; m.msg_accrightslen=0
23223 ; return 0; }
23224 EOF
23225 if { (eval echo configure:23226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23226   rm -rf conftest*
23227   ol_cv_msghdr_msg_accrights=yes
23228 else
23229   echo "configure: failed program was:" >&5
23230   cat conftest.$ac_ext >&5
23231   rm -rf conftest*
23232   ol_cv_msghdr_msg_accrights=no
23233 fi
23234 rm -f conftest*
23235         
23236 fi
23237
23238 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23239   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23240         cat >> confdefs.h <<\EOF
23241 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23242 EOF
23243
23244   fi
23245
23246         LIBSRCS="$LIBSRCS getpeereid.c"
23247 fi
23248 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23249         if test "$ac_cv_func_snprintf" != yes; then
23250                 cat >> confdefs.h <<\EOF
23251 #define snprintf ber_pvt_snprintf
23252 EOF
23253
23254         fi
23255         if test "$ac_cv_func_vsnprintf" != yes; then
23256                 cat >> confdefs.h <<\EOF
23257 #define vsnprintf ber_pvt_vsnprintf
23258 EOF
23259
23260         fi
23261 fi
23262
23263 # Check Configuration
23264 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23265 echo "configure:23266: checking declaration of sys_errlist" >&5
23266 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23267   echo $ac_n "(cached) $ac_c" 1>&6
23268 else
23269   
23270         cat > conftest.$ac_ext <<EOF
23271 #line 23272 "configure"
23272 #include "confdefs.h"
23273
23274 #include <stdio.h>
23275 #include <sys/types.h>
23276 #include <errno.h>
23277 #ifdef WINNT
23278 #include <stdlib.h>
23279 #endif 
23280 int main() {
23281 char *c = (char *) *sys_errlist
23282 ; return 0; }
23283 EOF
23284 if { (eval echo configure:23285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23285   rm -rf conftest*
23286   ol_cv_dcl_sys_errlist=yes
23287         ol_cv_have_sys_errlist=yes
23288 else
23289   echo "configure: failed program was:" >&5
23290   cat conftest.$ac_ext >&5
23291   rm -rf conftest*
23292   ol_cv_dcl_sys_errlist=no
23293 fi
23294 rm -f conftest*
23295 fi
23296
23297 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23298 #
23299 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23300 if test $ol_cv_dcl_sys_errlist = no ; then
23301         cat >> confdefs.h <<\EOF
23302 #define DECL_SYS_ERRLIST 1
23303 EOF
23304
23305
23306         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23307 echo "configure:23308: checking existence of sys_errlist" >&5
23308 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23309   echo $ac_n "(cached) $ac_c" 1>&6
23310 else
23311   
23312                 cat > conftest.$ac_ext <<EOF
23313 #line 23314 "configure"
23314 #include "confdefs.h"
23315 #include <errno.h>
23316 int main() {
23317 char *c = (char *) *sys_errlist
23318 ; return 0; }
23319 EOF
23320 if { (eval echo configure:23321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23321   rm -rf conftest*
23322   ol_cv_have_sys_errlist=yes
23323 else
23324   echo "configure: failed program was:" >&5
23325   cat conftest.$ac_ext >&5
23326   rm -rf conftest*
23327   ol_cv_have_sys_errlist=no
23328 fi
23329 rm -f conftest*
23330 fi
23331
23332 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23333 fi
23334 if test $ol_cv_have_sys_errlist = yes ; then
23335         cat >> confdefs.h <<\EOF
23336 #define HAVE_SYS_ERRLIST 1
23337 EOF
23338
23339 fi
23340
23341
23342
23343 if test "$ol_enable_slapi" != no ; then
23344                         for ac_hdr in ltdl.h
23345 do
23346 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23347 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23348 echo "configure:23349: checking for $ac_hdr" >&5
23349 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23350   echo $ac_n "(cached) $ac_c" 1>&6
23351 else
23352   cat > conftest.$ac_ext <<EOF
23353 #line 23354 "configure"
23354 #include "confdefs.h"
23355 #include <$ac_hdr>
23356 EOF
23357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23358 { (eval echo configure:23359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23360 if test -z "$ac_err"; then
23361   rm -rf conftest*
23362   eval "ac_cv_header_$ac_safe=yes"
23363 else
23364   echo "$ac_err" >&5
23365   echo "configure: failed program was:" >&5
23366   cat conftest.$ac_ext >&5
23367   rm -rf conftest*
23368   eval "ac_cv_header_$ac_safe=no"
23369 fi
23370 rm -f conftest*
23371 fi
23372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23373   echo "$ac_t""yes" 1>&6
23374     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23375   cat >> confdefs.h <<EOF
23376 #define $ac_tr_hdr 1
23377 EOF
23378  
23379 else
23380   echo "$ac_t""no" 1>&6
23381 fi
23382 done
23383
23384
23385         if test $ac_cv_header_ltdl_h != yes ; then
23386                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23387         fi
23388         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23389 echo "configure:23390: checking for lt_dlinit in -lltdl" >&5
23390 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23391 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23392   echo $ac_n "(cached) $ac_c" 1>&6
23393 else
23394   ac_save_LIBS="$LIBS"
23395 LIBS="-lltdl  $LIBS"
23396 cat > conftest.$ac_ext <<EOF
23397 #line 23398 "configure"
23398 #include "confdefs.h"
23399 /* Override any gcc2 internal prototype to avoid an error.  */
23400 /* We use char because int might match the return type of a gcc2
23401     builtin and then its argument prototype would still apply.  */
23402 char lt_dlinit();
23403
23404 int main() {
23405 lt_dlinit()
23406 ; return 0; }
23407 EOF
23408 if { (eval echo configure:23409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23409   rm -rf conftest*
23410   eval "ac_cv_lib_$ac_lib_var=yes"
23411 else
23412   echo "configure: failed program was:" >&5
23413   cat conftest.$ac_ext >&5
23414   rm -rf conftest*
23415   eval "ac_cv_lib_$ac_lib_var=no"
23416 fi
23417 rm -f conftest*
23418 LIBS="$ac_save_LIBS"
23419
23420 fi
23421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23422   echo "$ac_t""yes" 1>&6
23423   
23424                 SLAPI_LIBS=-lltdl
23425                 LIBSLAPI=libslapi.a
23426                 LIBSLAPITOOLS=../libslapi.a
23427                 cat >> confdefs.h <<\EOF
23428 #define HAVE_LIBLTDL 1
23429 EOF
23430
23431         
23432 else
23433   echo "$ac_t""no" 1>&6
23434 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23435 fi
23436
23437
23438         cat >> confdefs.h <<\EOF
23439 #define LDAP_SLAPI 1
23440 EOF
23441
23442 fi
23443
23444 if test "$ol_enable_debug" != no ; then
23445         cat >> confdefs.h <<\EOF
23446 #define LDAP_DEBUG 1
23447 EOF
23448
23449 fi
23450 if test "$ol_enable_syslog" = yes ; then
23451         cat >> confdefs.h <<\EOF
23452 #define LDAP_SYSLOG 1
23453 EOF
23454
23455 fi
23456 if test "$ol_link_kbind" != no ; then
23457         cat >> confdefs.h <<\EOF
23458 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23459 EOF
23460
23461 fi
23462 if test "$ol_enable_proctitle" != no ; then
23463         cat >> confdefs.h <<\EOF
23464 #define LDAP_PROCTITLE 1
23465 EOF
23466
23467 fi
23468 if test "$ol_enable_referrals" != no ; then
23469         cat >> confdefs.h <<\EOF
23470 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23471 EOF
23472
23473 fi
23474 if test "$ol_enable_local" != no; then
23475         cat >> confdefs.h <<\EOF
23476 #define LDAP_PF_LOCAL 1
23477 EOF
23478
23479 fi
23480 if test "$ol_link_ipv6" != no; then
23481         cat >> confdefs.h <<\EOF
23482 #define LDAP_PF_INET6 1
23483 EOF
23484
23485 fi
23486 if test "$ol_enable_cleartext" != no ; then
23487         cat >> confdefs.h <<\EOF
23488 #define SLAPD_CLEARTEXT 1
23489 EOF
23490
23491 fi
23492 if test "$ol_enable_crypt" != no ; then
23493         cat >> confdefs.h <<\EOF
23494 #define SLAPD_CRYPT 1
23495 EOF
23496
23497 fi
23498 if test "$ol_link_kpasswd" != no ; then
23499         cat >> confdefs.h <<\EOF
23500 #define SLAPD_KPASSWD 1
23501 EOF
23502
23503 fi
23504 if test "$ol_link_spasswd" != no ; then
23505         cat >> confdefs.h <<\EOF
23506 #define SLAPD_SPASSWD 1
23507 EOF
23508
23509 fi
23510 if test "$ol_enable_multimaster" != no ; then
23511         cat >> confdefs.h <<\EOF
23512 #define SLAPD_MULTIMASTER 1
23513 EOF
23514
23515 fi
23516 if test "$ol_enable_rlookups" != no ; then
23517         cat >> confdefs.h <<\EOF
23518 #define SLAPD_RLOOKUPS 1
23519 EOF
23520
23521 fi
23522 if test "$ol_enable_aci" != no ; then
23523         cat >> confdefs.h <<\EOF
23524 #define SLAPD_ACI_ENABLED 1
23525 EOF
23526
23527 fi
23528
23529 if test "$ol_link_modules" != no ; then
23530         cat >> confdefs.h <<\EOF
23531 #define SLAPD_MODULES 1
23532 EOF
23533
23534         BUILD_SLAPD=yes
23535         SLAPD_MODULES_LDFLAGS="-dlopen self"
23536 fi
23537
23538 cat >> confdefs.h <<\EOF
23539 #define SLAPD_MOD_STATIC 1
23540 EOF
23541
23542 cat >> confdefs.h <<\EOF
23543 #define SLAPD_MOD_DYNAMIC 2
23544 EOF
23545
23546
23547 if test "$ol_enable_bdb" != no ; then
23548         cat >> confdefs.h <<\EOF
23549 #define SLAPD_BDB 1
23550 EOF
23551
23552         BUILD_SLAPD=yes
23553         BUILD_BDB=yes
23554         if test "$ol_with_bdb_module" != static ; then
23555                 cat >> confdefs.h <<\EOF
23556 #define SLAPD_BDB_DYNAMIC 1
23557 EOF
23558
23559                 BUILD_BDB=mod
23560                 BUILD_BDB_DYNAMIC=shared
23561                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23562         else
23563                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23564         fi
23565 fi
23566
23567 if test "$ol_link_dnssrv" != no ; then
23568         cat >> confdefs.h <<\EOF
23569 #define SLAPD_DNSSRV 1
23570 EOF
23571
23572         BUILD_SLAPD=yes
23573         BUILD_DNSSRV=yes
23574         if test "$ol_with_dnssrv_module" != static ; then
23575                 cat >> confdefs.h <<\EOF
23576 #define SLAPD_DNSSRV_DYNAMIC 1
23577 EOF
23578
23579                 BUILD_DNSSRV=mod
23580                 BUILD_DNSSRV_DYNAMIC=shared
23581                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23582         else
23583                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23584         fi
23585 fi
23586
23587 if test "$ol_enable_hdb" != no ; then
23588         cat >> confdefs.h <<\EOF
23589 #define SLAPD_HDB 1
23590 EOF
23591
23592         BUILD_SLAPD=yes
23593         BUILD_HDB=yes
23594         if test "$ol_with_hdb_module" != static ; then
23595                 cat >> confdefs.h <<\EOF
23596 #define SLAPD_HDB_DYNAMIC 1
23597 EOF
23598
23599                 BUILD_HDB=mod
23600                 BUILD_HDB_DYNAMIC=shared
23601                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23602         else
23603                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23604         fi
23605 fi
23606
23607 if test "$ol_enable_ldap" != no ; then
23608         cat >> confdefs.h <<\EOF
23609 #define SLAPD_LDAP 1
23610 EOF
23611
23612         BUILD_SLAPD=yes
23613         BUILD_LDAP=yes
23614         if test "$ol_with_ldap_module" != static ; then
23615                 cat >> confdefs.h <<\EOF
23616 #define SLAPD_LDAP_DYNAMIC 1
23617 EOF
23618
23619                 BUILD_LDAP=mod
23620                 BUILD_LDAP_DYNAMIC=shared
23621                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23622         else
23623                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23624         fi
23625 fi
23626
23627 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23628         cat >> confdefs.h <<\EOF
23629 #define SLAPD_LDBM 1
23630 EOF
23631
23632         BUILD_SLAPD=yes
23633         BUILD_LDBM=yes
23634         if test "$ol_with_ldbm_module" != static ; then
23635                 cat >> confdefs.h <<\EOF
23636 #define SLAPD_LDBM_DYNAMIC 1
23637 EOF
23638
23639                 BUILD_LDBM=mod
23640                 BUILD_LDBM_DYNAMIC=shared
23641                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23642         else
23643                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23644         fi
23645 fi
23646
23647 if test "$ol_enable_meta" != no ; then
23648         if test "$ol_enable_ldap" = no ; then
23649                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23650         fi
23651         if test "$ol_enable_rewrite" = no ; then
23652                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23653         fi
23654         cat >> confdefs.h <<\EOF
23655 #define SLAPD_META 1
23656 EOF
23657
23658         BUILD_SLAPD=yes
23659         BUILD_META=yes
23660         BUILD_REWRITE=yes
23661         if test "$ol_with_meta_module" != static ; then
23662                 cat >> confdefs.h <<\EOF
23663 #define SLAPD_META_DYNAMIC 1
23664 EOF
23665
23666                 BUILD_META=mod
23667                 BUILD_META_DYNAMIC=shared
23668                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23669         else
23670                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23671         fi
23672 fi
23673
23674 if test "$ol_enable_monitor" != no ; then
23675         cat >> confdefs.h <<\EOF
23676 #define SLAPD_MONITOR 1
23677 EOF
23678
23679         BUILD_SLAPD=yes
23680         BUILD_MONITOR=yes
23681         if test "$ol_with_monitor_module" != static ; then
23682                 cat >> confdefs.h <<\EOF
23683 #define SLAPD_MONITOR_DYNAMIC 1
23684 EOF
23685
23686                 BUILD_MONITOR=mod
23687                 BUILD_MONITOR_DYNAMIC=shared
23688                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23689         else
23690                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23691         fi
23692 fi
23693
23694 if test "$ol_enable_null" != no ; then
23695         cat >> confdefs.h <<\EOF
23696 #define SLAPD_NULL 1
23697 EOF
23698
23699         BUILD_SLAPD=yes
23700         BUILD_NULL=yes
23701         if test "$ol_with_null_module" != static ; then
23702                 cat >> confdefs.h <<\EOF
23703 #define SLAPD_NULL_DYNAMIC 1
23704 EOF
23705
23706                 BUILD_NULL=mod
23707                 BUILD_NULL_DYNAMIC=shared
23708                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23709         else
23710                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23711         fi
23712 fi
23713
23714 if test "$ol_enable_passwd" != no ; then
23715         cat >> confdefs.h <<\EOF
23716 #define SLAPD_PASSWD 1
23717 EOF
23718
23719         BUILD_SLAPD=yes
23720         BUILD_PASSWD=yes
23721         if test "$ol_with_passwd_module" != static ; then
23722                 cat >> confdefs.h <<\EOF
23723 #define SLAPD_PASSWD_DYNAMIC 1
23724 EOF
23725
23726                 BUILD_PASSWD=mod
23727                 BUILD_PASSWD_DYNAMIC=shared
23728                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23729         else
23730                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23731         fi
23732 fi
23733
23734 if test "$ol_link_perl" != no ; then
23735         cat >> confdefs.h <<\EOF
23736 #define SLAPD_PERL 1
23737 EOF
23738
23739         BUILD_SLAPD=yes
23740         BUILD_PERL=yes
23741         if test "$ol_with_perl_module" != static ; then
23742                 cat >> confdefs.h <<\EOF
23743 #define SLAPD_PERL_DYNAMIC 1
23744 EOF
23745
23746                 BUILD_PERL=mod
23747                 BUILD_PERL_DYNAMIC=shared
23748                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23749         else
23750                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23751         fi
23752 fi
23753
23754 if test "$ol_enable_shell" != no ; then
23755         if test "$ol_link_thread" != no ; then
23756                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23757         fi
23758         cat >> confdefs.h <<\EOF
23759 #define SLAPD_SHELL 1
23760 EOF
23761
23762         BUILD_SLAPD=yes
23763         BUILD_SHELL=yes
23764         if test "$ol_with_shell_module" != static ; then
23765                 cat >> confdefs.h <<\EOF
23766 #define SLAPD_SHELL_DYNAMIC 1
23767 EOF
23768
23769                 BUILD_SHELL=mod
23770                 BUILD_SHELL_DYNAMIC=shared
23771                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23772         else
23773                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23774         fi
23775 fi
23776
23777 if test "$ol_link_sql" != no ; then
23778         cat >> confdefs.h <<\EOF
23779 #define SLAPD_SQL 1
23780 EOF
23781
23782         BUILD_SLAPD=yes
23783         BUILD_SQL=yes
23784         if test "$ol_with_sql_module" != static; then
23785                 cat >> confdefs.h <<\EOF
23786 #define SLAPD_SQL_DYNAMIC 1
23787 EOF
23788
23789                 BUILD_SQL=mod
23790                 BUILD_SQL_DYNAMIC=shared
23791                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23792         else
23793                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23794         fi
23795 fi
23796
23797 if test "$ol_with_dyngroup" != no ; then
23798         BUILD_DYNGROUP=$ol_with_dyngroup
23799         if test "$ol_with_dyngroup" = mod ; then
23800                 MFLAG=SLAPD_MOD_DYNAMIC
23801                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23802         else
23803                 MFLAG=SLAPD_MOD_STATIC
23804         fi
23805         cat >> confdefs.h <<EOF
23806 #define SLAPD_OVER_DYNGROUP $MFLAG
23807 EOF
23808
23809 fi
23810
23811 if test "$ol_with_proxycache" != no ; then
23812         BUILD_PROXYCACHE=$ol_with_proxycache
23813         if test "$ol_with_proxycache" = mod ; then
23814                 MFLAG=SLAPD_MOD_DYNAMIC
23815                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23816         else
23817                 MFLAG=SLAPD_MOD_STATIC
23818         fi
23819         cat >> confdefs.h <<EOF
23820 #define SLAPD_OVER_PROXYCACHE $MFLAG
23821 EOF
23822
23823 fi
23824
23825 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23826         $BUILD_SLAPD = yes ; then
23827         BUILD_SLURPD=yes
23828 fi
23829
23830 if test "$ol_enable_rewrite" != no ; then
23831         cat >> confdefs.h <<\EOF
23832 #define ENABLE_REWRITE 1
23833 EOF
23834
23835         BUILD_REWRITE=yes
23836 fi
23837
23838 if test "$ol_enable_slapi" != no ; then
23839         cat >> confdefs.h <<\EOF
23840 #define ENABLE_SLAPI 1
23841 EOF
23842
23843         BUILD_SLAPI=yes
23844         SLAPD_SLAPI_DEPEND=libslapi.a
23845 fi
23846
23847
23848
23849 if test "$ac_cv_mingw32" = yes ; then
23850         PLAT=NT
23851         SLAPD_MODULES_LDFLAGS=
23852 else
23853         PLAT=UNIX
23854 fi
23855
23856 if test -z "$SLAPD_STATIC_BACKENDS"; then
23857         SLAPD_NO_STATIC='#'
23858 else
23859         SLAPD_NO_STATIC=
23860 fi
23861
23862
23863
23864
23865
23866
23867
23868   
23869   
23870   
23871   
23872   
23873   
23874   
23875   
23876   
23877   
23878   
23879   
23880   
23881   
23882   
23883   
23884   
23885   
23886   
23887   
23888   
23889   
23890   
23891   
23892   
23893   
23894   
23895   
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934 # Check whether --with-xxinstall or --without-xxinstall was given.
23935 if test "${with_xxinstall+set}" = set; then
23936   withval="$with_xxinstall"
23937   :
23938 fi
23939
23940
23941
23942 trap '' 1 2 15
23943
23944 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23945
23946 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23947 # Let make expand exec_prefix.
23948 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23949
23950 # Any assignment to VPATH causes Sun make to only execute
23951 # the first set of double-colon rules, so remove it if not needed.
23952 # If there is a colon in the path, we need to keep it.
23953 if test "x$srcdir" = x.; then
23954   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23955 fi
23956
23957 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23958
23959 DEFS=-DHAVE_CONFIG_H
23960
23961 # Without the "./", some shells look in PATH for config.status.
23962 : ${CONFIG_STATUS=./config.status}
23963
23964 echo creating $CONFIG_STATUS
23965 rm -f $CONFIG_STATUS
23966 cat > $CONFIG_STATUS <<EOF
23967 #! /bin/sh
23968 # Generated automatically by configure.
23969 # Run this file to recreate the current configuration.
23970 # This directory was configured as follows,
23971 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23972 #
23973 # $0 $ac_configure_args
23974 #
23975 # Compiler output produced by configure, useful for debugging
23976 # configure, is in ./config.log if it exists.
23977
23978 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23979 for ac_option
23980 do
23981   case "\$ac_option" in
23982   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23983     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23984     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23985   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23986     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23987     exit 0 ;;
23988   -help | --help | --hel | --he | --h)
23989     echo "\$ac_cs_usage"; exit 0 ;;
23990   *) echo "\$ac_cs_usage"; exit 1 ;;
23991   esac
23992 done
23993
23994 ac_given_srcdir=$srcdir
23995 ac_given_INSTALL="$INSTALL"
23996
23997 trap 'rm -fr `echo "\
23998 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23999 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24000 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24001 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24002 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24003 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24004 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24005 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24006 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24007 include/Makefile:build/top.mk:include/Makefile.in \
24008 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24009 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24010 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24011 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24012 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24013 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24014 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24015 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24016 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24017 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24018 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24019 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24020 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24021 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24022 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24023 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24024 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24025 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24026 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24027 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24028 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24029 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24030 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24031 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24032 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24033 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24034 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24035 tests/run \
24036 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24037  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24038 EOF
24039 cat >> $CONFIG_STATUS <<EOF
24040
24041 # Protect against being on the right side of a sed subst in config.status.
24042 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24043  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24044 $ac_vpsub
24045 $extrasub
24046 s%@SHELL@%$SHELL%g
24047 s%@CFLAGS@%$CFLAGS%g
24048 s%@CPPFLAGS@%$CPPFLAGS%g
24049 s%@CXXFLAGS@%$CXXFLAGS%g
24050 s%@FFLAGS@%$FFLAGS%g
24051 s%@DEFS@%$DEFS%g
24052 s%@LDFLAGS@%$LDFLAGS%g
24053 s%@LIBS@%$LIBS%g
24054 s%@exec_prefix@%$exec_prefix%g
24055 s%@prefix@%$prefix%g
24056 s%@program_transform_name@%$program_transform_name%g
24057 s%@bindir@%$bindir%g
24058 s%@sbindir@%$sbindir%g
24059 s%@libexecdir@%$libexecdir%g
24060 s%@datadir@%$datadir%g
24061 s%@sysconfdir@%$sysconfdir%g
24062 s%@sharedstatedir@%$sharedstatedir%g
24063 s%@localstatedir@%$localstatedir%g
24064 s%@libdir@%$libdir%g
24065 s%@includedir@%$includedir%g
24066 s%@oldincludedir@%$oldincludedir%g
24067 s%@infodir@%$infodir%g
24068 s%@mandir@%$mandir%g
24069 s%@host@%$host%g
24070 s%@host_alias@%$host_alias%g
24071 s%@host_cpu@%$host_cpu%g
24072 s%@host_vendor@%$host_vendor%g
24073 s%@host_os@%$host_os%g
24074 s%@target@%$target%g
24075 s%@target_alias@%$target_alias%g
24076 s%@target_cpu@%$target_cpu%g
24077 s%@target_vendor@%$target_vendor%g
24078 s%@target_os@%$target_os%g
24079 s%@build@%$build%g
24080 s%@build_alias@%$build_alias%g
24081 s%@build_cpu@%$build_cpu%g
24082 s%@build_vendor@%$build_vendor%g
24083 s%@build_os@%$build_os%g
24084 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24085 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24086 s%@INSTALL_DATA@%$INSTALL_DATA%g
24087 s%@PACKAGE@%$PACKAGE%g
24088 s%@VERSION@%$VERSION%g
24089 s%@ACLOCAL@%$ACLOCAL%g
24090 s%@AUTOCONF@%$AUTOCONF%g
24091 s%@AUTOMAKE@%$AUTOMAKE%g
24092 s%@AUTOHEADER@%$AUTOHEADER%g
24093 s%@MAKEINFO@%$MAKEINFO%g
24094 s%@install_sh@%$install_sh%g
24095 s%@AMTAR@%$AMTAR%g
24096 s%@AWK@%$AWK%g
24097 s%@AMTARFLAGS@%$AMTARFLAGS%g
24098 s%@SET_MAKE@%$SET_MAKE%g
24099 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24100 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24101 s%@top_builddir@%$top_builddir%g
24102 s%@ldap_subdir@%$ldap_subdir%g
24103 s%@CC@%$CC%g
24104 s%@AR@%$AR%g
24105 s%@LN_S@%$LN_S%g
24106 s%@OBJEXT@%$OBJEXT%g
24107 s%@EXEEXT@%$EXEEXT%g
24108 s%@ECHO@%$ECHO%g
24109 s%@RANLIB@%$RANLIB%g
24110 s%@STRIP@%$STRIP%g
24111 s%@DLLTOOL@%$DLLTOOL%g
24112 s%@AS@%$AS%g
24113 s%@OBJDUMP@%$OBJDUMP%g
24114 s%@CPP@%$CPP%g
24115 s%@LIBTOOL@%$LIBTOOL%g
24116 s%@LN_H@%$LN_H%g
24117 s%@PERLBIN@%$PERLBIN%g
24118 s%@OL_MKDEP@%$OL_MKDEP%g
24119 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24120 s%@LTSTATIC@%$LTSTATIC%g
24121 s%@LIBOBJS@%$LIBOBJS%g
24122 s%@LIBSRCS@%$LIBSRCS%g
24123 s%@PLAT@%$PLAT%g
24124 s%@WITH_TLS@%$WITH_TLS%g
24125 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24126 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24127 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24128 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24129 s%@BUILD_BDB@%$BUILD_BDB%g
24130 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24131 s%@BUILD_HDB@%$BUILD_HDB%g
24132 s%@BUILD_LDAP@%$BUILD_LDAP%g
24133 s%@BUILD_LDBM@%$BUILD_LDBM%g
24134 s%@BUILD_META@%$BUILD_META%g
24135 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24136 s%@BUILD_NULL@%$BUILD_NULL%g
24137 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24138 s%@BUILD_PERL@%$BUILD_PERL%g
24139 s%@BUILD_SHELL@%$BUILD_SHELL%g
24140 s%@BUILD_SQL@%$BUILD_SQL%g
24141 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24142 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24143 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24144 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24145 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24146 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24147 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24148 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24149 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24150 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24151 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24152 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24153 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24154 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24155 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24156 s%@LDAP_LIBS@%$LDAP_LIBS%g
24157 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24158 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24159 s%@LDBM_LIBS@%$LDBM_LIBS%g
24160 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24161 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24162 s%@WRAP_LIBS@%$WRAP_LIBS%g
24163 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24164 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24165 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24166 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24167 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24168 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24169 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24170 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24171 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24172 s%@KRB4_LIBS@%$KRB4_LIBS%g
24173 s%@KRB5_LIBS@%$KRB5_LIBS%g
24174 s%@SASL_LIBS@%$SASL_LIBS%g
24175 s%@TLS_LIBS@%$TLS_LIBS%g
24176 s%@MODULES_LIBS@%$MODULES_LIBS%g
24177 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24178 s%@LIBSLAPI@%$LIBSLAPI%g
24179 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24180 s%@AUTH_LIBS@%$AUTH_LIBS%g
24181 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24182 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24183 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24184 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24185
24186 CEOF
24187 EOF
24188
24189 cat >> $CONFIG_STATUS <<\EOF
24190
24191 # Split the substitutions into bite-sized pieces for seds with
24192 # small command number limits, like on Digital OSF/1 and HP-UX.
24193 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24194 ac_file=1 # Number of current file.
24195 ac_beg=1 # First line for current file.
24196 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24197 ac_more_lines=:
24198 ac_sed_cmds=""
24199 while $ac_more_lines; do
24200   if test $ac_beg -gt 1; then
24201     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24202   else
24203     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24204   fi
24205   if test ! -s conftest.s$ac_file; then
24206     ac_more_lines=false
24207     rm -f conftest.s$ac_file
24208   else
24209     if test -z "$ac_sed_cmds"; then
24210       ac_sed_cmds="sed -f conftest.s$ac_file"
24211     else
24212       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24213     fi
24214     ac_file=`expr $ac_file + 1`
24215     ac_beg=$ac_end
24216     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24217   fi
24218 done
24219 if test -z "$ac_sed_cmds"; then
24220   ac_sed_cmds=cat
24221 fi
24222 EOF
24223
24224 cat >> $CONFIG_STATUS <<EOF
24225
24226 CONFIG_FILES=\${CONFIG_FILES-"\
24227 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24228 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24229 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24230 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24231 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24232 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24233 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24234 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24235 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24236 include/Makefile:build/top.mk:include/Makefile.in \
24237 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24238 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24239 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24240 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24241 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24242 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24243 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24244 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24245 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24246 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24247 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24248 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24249 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24250 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24251 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24252 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24253 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24254 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24255 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24256 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24257 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24258 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24259 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24260 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24261 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24262 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24263 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24264 tests/run \
24265 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24266 "}
24267 EOF
24268 cat >> $CONFIG_STATUS <<\EOF
24269 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24270   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24271   case "$ac_file" in
24272   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24273        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24274   *) ac_file_in="${ac_file}.in" ;;
24275   esac
24276
24277   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24278
24279   # Remove last slash and all that follows it.  Not all systems have dirname.
24280   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24281   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24282     # The file is in a subdirectory.
24283     test ! -d "$ac_dir" && mkdir "$ac_dir"
24284     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24285     # A "../" for each directory in $ac_dir_suffix.
24286     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24287   else
24288     ac_dir_suffix= ac_dots=
24289   fi
24290
24291   case "$ac_given_srcdir" in
24292   .)  srcdir=.
24293       if test -z "$ac_dots"; then top_srcdir=.
24294       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24295   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24296   *) # Relative path.
24297     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24298     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24299   esac
24300
24301   case "$ac_given_INSTALL" in
24302   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24303   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24304   esac
24305
24306   echo creating "$ac_file"
24307   rm -f "$ac_file"
24308   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24309   case "$ac_file" in
24310   *[Mm]akefile*) ac_comsub="1i\\
24311 # $configure_input" ;;
24312   *) ac_comsub= ;;
24313   esac
24314
24315   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24316   sed -e "$ac_comsub
24317 s%@configure_input@%$configure_input%g
24318 s%@srcdir@%$srcdir%g
24319 s%@top_srcdir@%$top_srcdir%g
24320 s%@INSTALL@%$INSTALL%g
24321 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24322 fi; done
24323 rm -f conftest.s*
24324
24325 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24326 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24327 #
24328 # ac_d sets the value in "#define NAME VALUE" lines.
24329 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24330 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24331 ac_dC='\3'
24332 ac_dD='%g'
24333 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24334 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24335 ac_uB='\([      ]\)%\1#\2define\3'
24336 ac_uC=' '
24337 ac_uD='\4%g'
24338 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24339 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24340 ac_eB='$%\1#\2define\3'
24341 ac_eC=' '
24342 ac_eD='%g'
24343
24344 if test "${CONFIG_HEADERS+set}" != set; then
24345 EOF
24346 cat >> $CONFIG_STATUS <<EOF
24347   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24348 EOF
24349 cat >> $CONFIG_STATUS <<\EOF
24350 fi
24351 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24352   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24353   case "$ac_file" in
24354   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24355        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24356   *) ac_file_in="${ac_file}.in" ;;
24357   esac
24358
24359   echo creating $ac_file
24360
24361   rm -f conftest.frag conftest.in conftest.out
24362   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24363   cat $ac_file_inputs > conftest.in
24364
24365 EOF
24366
24367 # Transform confdefs.h into a sed script conftest.vals that substitutes
24368 # the proper values into config.h.in to produce config.h.  And first:
24369 # Protect against being on the right side of a sed subst in config.status.
24370 # Protect against being in an unquoted here document in config.status.
24371 rm -f conftest.vals
24372 cat > conftest.hdr <<\EOF
24373 s/[\\&%]/\\&/g
24374 s%[\\$`]%\\&%g
24375 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24376 s%ac_d%ac_u%gp
24377 s%ac_u%ac_e%gp
24378 EOF
24379 sed -n -f conftest.hdr confdefs.h > conftest.vals
24380 rm -f conftest.hdr
24381
24382 # This sed command replaces #undef with comments.  This is necessary, for
24383 # example, in the case of _POSIX_SOURCE, which is predefined and required
24384 # on some systems where configure will not decide to define it.
24385 cat >> conftest.vals <<\EOF
24386 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24387 EOF
24388
24389 # Break up conftest.vals because some shells have a limit on
24390 # the size of here documents, and old seds have small limits too.
24391
24392 rm -f conftest.tail
24393 while :
24394 do
24395   ac_lines=`grep -c . conftest.vals`
24396   # grep -c gives empty output for an empty file on some AIX systems.
24397   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24398   # Write a limited-size here document to conftest.frag.
24399   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24400   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24401   echo 'CEOF
24402   sed -f conftest.frag conftest.in > conftest.out
24403   rm -f conftest.in
24404   mv conftest.out conftest.in
24405 ' >> $CONFIG_STATUS
24406   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24407   rm -f conftest.vals
24408   mv conftest.tail conftest.vals
24409 done
24410 rm -f conftest.vals
24411
24412 cat >> $CONFIG_STATUS <<\EOF
24413   rm -f conftest.frag conftest.h
24414   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24415   cat conftest.in >> conftest.h
24416   rm -f conftest.in
24417   if cmp -s $ac_file conftest.h 2>/dev/null; then
24418     echo "$ac_file is unchanged"
24419     rm -f conftest.h
24420   else
24421     # Remove last slash and all that follows it.  Not all systems have dirname.
24422       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24423       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24424       # The file is in a subdirectory.
24425       test ! -d "$ac_dir" && mkdir "$ac_dir"
24426     fi
24427     rm -f $ac_file
24428     mv conftest.h $ac_file
24429   fi
24430 fi; done
24431
24432 EOF
24433 cat >> $CONFIG_STATUS <<EOF
24434
24435 EOF
24436 cat >> $CONFIG_STATUS <<\EOF
24437
24438 chmod +x tests/run
24439 date > stamp-h
24440 echo Please run \"make depend\" to build dependencies
24441
24442 exit 0
24443 EOF
24444 chmod +x $CONFIG_STATUS
24445 rm -fr confdefs* $ac_clean_files
24446 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24447