]> git.sur5r.net Git - openldap/blob - configure
Import updatedn clarification from HEAD.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.478.2.12 2004/01/17 18:36:41 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --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
2700         ol_with_ldbm_api=no
2701         ol_with_ldbm_type=no
2702
2703         ol_with_bdb_module=static
2704         ol_with_dnssrv_module=static
2705         ol_with_hdb_module=static
2706         ol_with_ldap_module=static
2707         ol_with_ldbm_module=static
2708         ol_with_meta_module=static
2709         ol_with_monitor_module=static
2710         ol_with_null_module=static
2711         ol_with_passwd_module=static
2712         ol_with_perl_module=static
2713         ol_with_shell_module=static
2714         ol_with_sql_module=static
2715
2716         ol_enable_slurpd=no
2717
2718         ol_enable_rewrite=no
2719
2720         ol_with_dyngroup=no
2721         ol_with_proxycache=no
2722
2723 elif test $ol_enable_ldbm = no ; then
2724         
2725         if test $ol_with_ldbm_api != auto ; then
2726                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2727         fi
2728
2729         if test $ol_with_ldbm_type != auto ; then
2730                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2731         fi
2732
2733         if test $ol_with_ldbm_module != static ; then
2734                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2735         fi
2736
2737         if test $ol_enable_modules != yes -a \
2738                 $ol_enable_bdb = no -a \
2739                 $ol_enable_dnssrv = no -a \
2740                 $ol_enable_hdb = no -a \
2741                 $ol_enable_ldap = no -a \
2742                 $ol_enable_meta = no -a \
2743                 $ol_enable_monitor = no -a \
2744                 $ol_enable_null = no -a \
2745                 $ol_enable_passwd = no -a \
2746                 $ol_enable_perl = no -a \
2747                 $ol_enable_shell = no -a \
2748                 $ol_enable_sql = no ; then
2749
2750                 if test $ol_enable_slapd = yes ; then
2751                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2752                 else
2753                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2754                         ol_enable_slapd=no
2755                 fi
2756         fi
2757
2758         ol_with_ldbm_api=no
2759         ol_with_ldbm_type=no
2760         ol_with_ldbm_module=static
2761
2762         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2763                 ol_with_ldbm_api=berkeley
2764         fi
2765
2766 else
2767                 if test $ol_with_ldbm_api = gdbm -a \
2768                 $ol_with_ldbm_type = btree ; then
2769                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2770         fi
2771         if test $ol_with_ldbm_api = mdbm -a \
2772                 $ol_with_ldbm_type = btree ; then
2773                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2774         fi
2775         if test $ol_with_ldbm_api = ndbm -a \
2776                 $ol_with_ldbm_type = btree ; then
2777                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2778         fi
2779
2780         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2781                 if test $ol_with_ldbm_api = auto ; then
2782                         ol_with_ldbm_api=berkeley
2783                 elif test $ol_with_ldbm_api != berkeley ; then
2784                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2785                 fi
2786
2787         elif test $ol_enable_bdb = auto ; then
2788                 if test $ol_with_ldbm_api != berkeley \
2789                         -o $ol_with_ldbm_api != auto ; then
2790                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2791                         ol_enable_bdb=no
2792                 fi
2793         fi
2794 fi
2795
2796 if test $ol_enable_slurpd = yes ; then
2797                 if test $ol_with_threads = no ; then
2798                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2799         fi
2800 fi
2801
2802 if test $ol_enable_lmpasswd = yes ; then
2803         if test $ol_with_tls = no ; then
2804                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2805         fi
2806 fi
2807
2808 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2809         if test $ol_with_kerberos = no ; then
2810                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2811         elif test $ol_with_kerberos = auto ; then
2812                 ol_with_kerberos=yes
2813         fi
2814
2815 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2816         if test $ol_with_kerberos = auto ; then
2817                 ol_with_kerberos=no
2818         elif test $ol_with_kerberos != no ; then
2819                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2820                 ol_with_kerberos=no
2821         fi
2822 fi
2823
2824 if test $ol_enable_spasswd = yes ; then
2825         if test $ol_with_cyrus_sasl = no ; then
2826                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2827         fi
2828         ol_with_cyrus_sasl=yes
2829 fi
2830
2831 echo "$ac_t""done" 1>&6
2832
2833 LDAP_LIBS=
2834 LDBM_LIBS=
2835 LTHREAD_LIBS=
2836 LUTIL_LIBS=
2837
2838 SLAPD_LIBS=
2839 SLURPD_LIBS=
2840
2841 BUILD_SLAPD=no
2842 BUILD_SLURPD=no
2843
2844 BUILD_THREAD=no
2845
2846 BUILD_SLAPI=no
2847 SLAPD_SLAPI_DEPEND=
2848
2849 BUILD_BDB=no
2850 BUILD_DNSSRV=no
2851 BUILD_HDB=no
2852 BUILD_LDAP=no
2853 BUILD_LDBM=no
2854 BUILD_META=no
2855 BUILD_MONITOR=no
2856 BUILD_NULL=no
2857 BUILD_PASSWD=no
2858 BUILD_PERL=no
2859 BUILD_SHELL=no
2860 BUILD_SQL=no
2861
2862 BUILD_BDB_DYNAMIC=static
2863 BUILD_DNSSRV_DYNAMIC=static
2864 BUILD_HDB_DYNAMIC=static
2865 BUILD_LDAP_DYNAMIC=static
2866 BUILD_LDBM_DYNAMIC=static
2867 BUILD_META_DYNAMIC=static
2868 BUILD_MONITOR_DYNAMIC=static
2869 BUILD_NULL_DYNAMIC=static
2870 BUILD_PASSWD_DYNAMIC=static
2871 BUILD_PERL_DYNAMIC=static
2872 BUILD_SHELL_DYNAMIC=static
2873 BUILD_SQL_DYNAMIC=static
2874
2875 BUILD_DYNGROUP=no
2876 BUILD_PROXYCACHE=no
2877
2878 SLAPD_DYNAMIC_OVERLAYS=
2879
2880 SLAPD_MODULES_LDFLAGS=
2881 SLAPD_MODULES_CPPFLAGS=
2882
2883 SLAPD_STATIC_BACKENDS=
2884 SLAPD_DYNAMIC_BACKENDS=
2885
2886 SLAPD_PERL_LDFLAGS=
2887 MOD_PERL_LDFLAGS=
2888 PERL_CPPFLAGS=
2889
2890 SLAPD_SQL_LDFLAGS=
2891 SLAPD_SQL_LIBS=
2892 SLAPD_SQL_INCLUDES=
2893
2894 KRB4_LIBS=
2895 KRB5_LIBS=
2896 SASL_LIBS=
2897 TLS_LIBS=
2898 MODULES_LIBS=
2899 SLAPI_LIBS=
2900 LIBSLAPI=
2901 LIBSLAPITOOLS=
2902 AUTH_LIBS=
2903
2904 SLAPD_SLP_LIBS=
2905
2906
2907 # Find a good install program.  We prefer a C program (faster),
2908 # so one script is as good as another.  But avoid the broken or
2909 # incompatible versions:
2910 # SysV /etc/install, /usr/sbin/install
2911 # SunOS /usr/etc/install
2912 # IRIX /sbin/install
2913 # AIX /bin/install
2914 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2915 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2916 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2917 # ./install, which can be erroneously created by make from ./install.sh.
2918 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2919 echo "configure:2920: checking for a BSD compatible install" >&5
2920 if test -z "$INSTALL"; then
2921 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2922   echo $ac_n "(cached) $ac_c" 1>&6
2923 else
2924     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2925   for ac_dir in $PATH; do
2926     # Account for people who put trailing slashes in PATH elements.
2927     case "$ac_dir/" in
2928     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2929     *)
2930       # OSF1 and SCO ODT 3.0 have their own names for install.
2931       # Don't use installbsd from OSF since it installs stuff as root
2932       # by default.
2933       for ac_prog in ginstall scoinst install; do
2934         if test -f $ac_dir/$ac_prog; then
2935           if test $ac_prog = install &&
2936             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2937             # AIX install.  It has an incompatible calling convention.
2938             :
2939           elif test $ac_prog = install &&
2940             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2941             # program-specific install script used by HP pwplus--don't use.
2942             :
2943           else
2944             ac_cv_path_install="$ac_dir/$ac_prog -c"
2945             break 2
2946           fi
2947         fi
2948       done
2949       ;;
2950     esac
2951   done
2952   IFS="$ac_save_IFS"
2953
2954 fi
2955   if test "${ac_cv_path_install+set}" = set; then
2956     INSTALL="$ac_cv_path_install"
2957   else
2958     # As a last resort, use the slow shell script.  We don't cache a
2959     # path for INSTALL within a source directory, because that will
2960     # break other packages using the cache if that directory is
2961     # removed, or if the path is relative.
2962     INSTALL="$ac_install_sh"
2963   fi
2964 fi
2965 echo "$ac_t""$INSTALL" 1>&6
2966
2967 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2968 # It thinks the first close brace ends the variable substitution.
2969 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2970
2971 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2972
2973 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2974
2975
2976 cat >> confdefs.h <<\EOF
2977 #define HAVE_MKVERSION 1
2978 EOF
2979
2980
2981
2982
2983 ol_aix_threads=no
2984 case "$target" in
2985 *-*-aix*)       if test -z "$CC" ; then
2986                 case "$ol_with_threads" in
2987                 auto | yes |  posix) ol_aix_threads=yes ;;
2988                 esac
2989         fi
2990 ;;
2991 esac
2992
2993 if test $ol_aix_threads = yes ; then
2994         if test -z "${CC}" ; then
2995                 for ac_prog in cc_r xlc_r cc
2996 do
2997 # Extract the first word of "$ac_prog", so it can be a program name with args.
2998 set dummy $ac_prog; ac_word=$2
2999 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3000 echo "configure:3001: checking for $ac_word" >&5
3001 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3002   echo $ac_n "(cached) $ac_c" 1>&6
3003 else
3004   if test -n "$CC"; then
3005   ac_cv_prog_CC="$CC" # Let the user override the test.
3006 else
3007   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3008   ac_dummy="$PATH"
3009   for ac_dir in $ac_dummy; do
3010     test -z "$ac_dir" && ac_dir=.
3011     if test -f $ac_dir/$ac_word; then
3012       ac_cv_prog_CC="$ac_prog"
3013       break
3014     fi
3015   done
3016   IFS="$ac_save_ifs"
3017 fi
3018 fi
3019 CC="$ac_cv_prog_CC"
3020 if test -n "$CC"; then
3021   echo "$ac_t""$CC" 1>&6
3022 else
3023   echo "$ac_t""no" 1>&6
3024 fi
3025
3026 test -n "$CC" && break
3027 done
3028
3029
3030                 if test "$CC" = cc ; then
3031                                                 if test $ol_with_threads != auto ; then
3032                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3033                         else
3034                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3035                         fi
3036                         ol_with_threads=no
3037                 fi
3038         fi
3039
3040         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3041                 ol_with_threads=posix
3042                 ol_cv_pthread_create=yes
3043         fi
3044 fi
3045
3046 if test -z "${CC}"; then
3047         for ac_prog in cc gcc
3048 do
3049 # Extract the first word of "$ac_prog", so it can be a program name with args.
3050 set dummy $ac_prog; ac_word=$2
3051 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3052 echo "configure:3053: checking for $ac_word" >&5
3053 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3054   echo $ac_n "(cached) $ac_c" 1>&6
3055 else
3056   if test -n "$CC"; then
3057   ac_cv_prog_CC="$CC" # Let the user override the test.
3058 else
3059   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3060   ac_dummy="$PATH"
3061   for ac_dir in $ac_dummy; do
3062     test -z "$ac_dir" && ac_dir=.
3063     if test -f $ac_dir/$ac_word; then
3064       ac_cv_prog_CC="$ac_prog"
3065       break
3066     fi
3067   done
3068   IFS="$ac_save_ifs"
3069 fi
3070 fi
3071 CC="$ac_cv_prog_CC"
3072 if test -n "$CC"; then
3073   echo "$ac_t""$CC" 1>&6
3074 else
3075   echo "$ac_t""no" 1>&6
3076 fi
3077
3078 test -n "$CC" && break
3079 done
3080 test -n "$CC" || CC="missing"
3081
3082
3083         if test "${CC}" = "missing" ; then
3084                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3085         fi
3086 fi
3087
3088 if test -z "${AR}"; then
3089         for ac_prog in ar gar
3090 do
3091 # Extract the first word of "$ac_prog", so it can be a program name with args.
3092 set dummy $ac_prog; ac_word=$2
3093 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3094 echo "configure:3095: checking for $ac_word" >&5
3095 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3096   echo $ac_n "(cached) $ac_c" 1>&6
3097 else
3098   if test -n "$AR"; then
3099   ac_cv_prog_AR="$AR" # Let the user override the test.
3100 else
3101   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3102   ac_dummy="$PATH"
3103   for ac_dir in $ac_dummy; do
3104     test -z "$ac_dir" && ac_dir=.
3105     if test -f $ac_dir/$ac_word; then
3106       ac_cv_prog_AR="$ac_prog"
3107       break
3108     fi
3109   done
3110   IFS="$ac_save_ifs"
3111 fi
3112 fi
3113 AR="$ac_cv_prog_AR"
3114 if test -n "$AR"; then
3115   echo "$ac_t""$AR" 1>&6
3116 else
3117   echo "$ac_t""no" 1>&6
3118 fi
3119
3120 test -n "$AR" && break
3121 done
3122 test -n "$AR" || AR="missing"
3123
3124
3125         if test "${AR}" = "missing" ; then
3126                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3127         fi
3128 fi
3129
3130
3131
3132 # Find the correct PATH separator.  Usually this is `:', but
3133 # DJGPP uses `;' like DOS.
3134 if test "X${PATH_SEPARATOR+set}" != Xset; then
3135   UNAME=${UNAME-`uname 2>/dev/null`}
3136   case X$UNAME in
3137     *-DOS) lt_cv_sys_path_separator=';' ;;
3138     *)     lt_cv_sys_path_separator=':' ;;
3139   esac
3140   PATH_SEPARATOR=$lt_cv_sys_path_separator
3141 fi
3142
3143 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3144 echo "configure:3145: checking for Cygwin environment" >&5
3145 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3146   echo $ac_n "(cached) $ac_c" 1>&6
3147 else
3148   cat > conftest.$ac_ext <<EOF
3149 #line 3150 "configure"
3150 #include "confdefs.h"
3151
3152 int main() {
3153
3154 #ifndef __CYGWIN__
3155 #define __CYGWIN__ __CYGWIN32__
3156 #endif
3157 return __CYGWIN__;
3158 ; return 0; }
3159 EOF
3160 if { (eval echo configure:3161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3161   rm -rf conftest*
3162   ac_cv_cygwin=yes
3163 else
3164   echo "configure: failed program was:" >&5
3165   cat conftest.$ac_ext >&5
3166   rm -rf conftest*
3167   ac_cv_cygwin=no
3168 fi
3169 rm -f conftest*
3170 fi
3171
3172 echo "$ac_t""$ac_cv_cygwin" 1>&6
3173 CYGWIN=
3174 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3175 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3176 echo "configure:3177: checking for mingw32 environment" >&5
3177 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183
3184 int main() {
3185 return __MINGW32__;
3186 ; return 0; }
3187 EOF
3188 if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189   rm -rf conftest*
3190   ac_cv_mingw32=yes
3191 else
3192   echo "configure: failed program was:" >&5
3193   cat conftest.$ac_ext >&5
3194   rm -rf conftest*
3195   ac_cv_mingw32=no
3196 fi
3197 rm -f conftest*
3198 fi
3199
3200 echo "$ac_t""$ac_cv_mingw32" 1>&6
3201 MINGW32=
3202 test "$ac_cv_mingw32" = yes && MINGW32=yes
3203 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3204 echo "configure:3205: checking for EMX OS/2 environment" >&5
3205 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3206   echo $ac_n "(cached) $ac_c" 1>&6
3207 else
3208   cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211
3212 int main() {
3213 return __EMX__;
3214 ; return 0; }
3215 EOF
3216 if { (eval echo configure:3217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3217   rm -rf conftest*
3218   ac_cv_emxos2=yes
3219 else
3220   echo "configure: failed program was:" >&5
3221   cat conftest.$ac_ext >&5
3222   rm -rf conftest*
3223   ac_cv_emxos2=no
3224 fi
3225 rm -f conftest*
3226 fi
3227
3228 echo "$ac_t""$ac_cv_emxos2" 1>&6
3229 EMXOS2=
3230 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3231 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3232 echo "configure:3233: checking how to run the C preprocessor" >&5
3233 # On Suns, sometimes $CPP names a directory.
3234 if test -n "$CPP" && test -d "$CPP"; then
3235   CPP=
3236 fi
3237 if test -z "$CPP"; then
3238 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3239   echo $ac_n "(cached) $ac_c" 1>&6
3240 else
3241     # This must be in double quotes, not single quotes, because CPP may get
3242   # substituted into the Makefile and "${CC-cc}" will confuse make.
3243   CPP="${CC-cc} -E"
3244   # On the NeXT, cc -E runs the code through the compiler's parser,
3245   # not just through cpp.
3246   cat > conftest.$ac_ext <<EOF
3247 #line 3248 "configure"
3248 #include "confdefs.h"
3249 #include <assert.h>
3250 Syntax Error
3251 EOF
3252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3253 { (eval echo configure:3254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3255 if test -z "$ac_err"; then
3256   :
3257 else
3258   echo "$ac_err" >&5
3259   echo "configure: failed program was:" >&5
3260   cat conftest.$ac_ext >&5
3261   rm -rf conftest*
3262   CPP="${CC-cc} -E -traditional-cpp"
3263   cat > conftest.$ac_ext <<EOF
3264 #line 3265 "configure"
3265 #include "confdefs.h"
3266 #include <assert.h>
3267 Syntax Error
3268 EOF
3269 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3270 { (eval echo configure:3271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3271 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3272 if test -z "$ac_err"; then
3273   :
3274 else
3275   echo "$ac_err" >&5
3276   echo "configure: failed program was:" >&5
3277   cat conftest.$ac_ext >&5
3278   rm -rf conftest*
3279   CPP="${CC-cc} -nologo -E"
3280   cat > conftest.$ac_ext <<EOF
3281 #line 3282 "configure"
3282 #include "confdefs.h"
3283 #include <assert.h>
3284 Syntax Error
3285 EOF
3286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3287 { (eval echo configure:3288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3289 if test -z "$ac_err"; then
3290   :
3291 else
3292   echo "$ac_err" >&5
3293   echo "configure: failed program was:" >&5
3294   cat conftest.$ac_ext >&5
3295   rm -rf conftest*
3296   CPP=/lib/cpp
3297 fi
3298 rm -f conftest*
3299 fi
3300 rm -f conftest*
3301 fi
3302 rm -f conftest*
3303   ac_cv_prog_CPP="$CPP"
3304 fi
3305   CPP="$ac_cv_prog_CPP"
3306 else
3307   ac_cv_prog_CPP="$CPP"
3308 fi
3309 echo "$ac_t""$CPP" 1>&6
3310
3311 # Check whether --enable-fast-install or --disable-fast-install was given.
3312 if test "${enable_fast_install+set}" = set; then
3313   enableval="$enable_fast_install"
3314   p=${PACKAGE-default}
3315 case $enableval in
3316 yes) enable_fast_install=yes ;;
3317 no) enable_fast_install=no ;;
3318 *)
3319   enable_fast_install=no
3320   # Look at the argument we got.  We use all the common list separators.
3321   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3322   for pkg in $enableval; do
3323     if test "X$pkg" = "X$p"; then
3324       enable_fast_install=yes
3325     fi
3326   done
3327   IFS="$ac_save_ifs"
3328   ;;
3329 esac
3330 else
3331   enable_fast_install=yes
3332 fi
3333
3334 # Extract the first word of "gcc", so it can be a program name with args.
3335 set dummy gcc; ac_word=$2
3336 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3337 echo "configure:3338: checking for $ac_word" >&5
3338 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3339   echo $ac_n "(cached) $ac_c" 1>&6
3340 else
3341   if test -n "$CC"; then
3342   ac_cv_prog_CC="$CC" # Let the user override the test.
3343 else
3344   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3345   ac_dummy="$PATH"
3346   for ac_dir in $ac_dummy; do
3347     test -z "$ac_dir" && ac_dir=.
3348     if test -f $ac_dir/$ac_word; then
3349       ac_cv_prog_CC="gcc"
3350       break
3351     fi
3352   done
3353   IFS="$ac_save_ifs"
3354 fi
3355 fi
3356 CC="$ac_cv_prog_CC"
3357 if test -n "$CC"; then
3358   echo "$ac_t""$CC" 1>&6
3359 else
3360   echo "$ac_t""no" 1>&6
3361 fi
3362
3363 if test -z "$CC"; then
3364   # Extract the first word of "cc", so it can be a program name with args.
3365 set dummy cc; ac_word=$2
3366 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3367 echo "configure:3368: checking for $ac_word" >&5
3368 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3369   echo $ac_n "(cached) $ac_c" 1>&6
3370 else
3371   if test -n "$CC"; then
3372   ac_cv_prog_CC="$CC" # Let the user override the test.
3373 else
3374   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3375   ac_prog_rejected=no
3376   ac_dummy="$PATH"
3377   for ac_dir in $ac_dummy; do
3378     test -z "$ac_dir" && ac_dir=.
3379     if test -f $ac_dir/$ac_word; then
3380       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3381         ac_prog_rejected=yes
3382         continue
3383       fi
3384       ac_cv_prog_CC="cc"
3385       break
3386     fi
3387   done
3388   IFS="$ac_save_ifs"
3389 if test $ac_prog_rejected = yes; then
3390   # We found a bogon in the path, so make sure we never use it.
3391   set dummy $ac_cv_prog_CC
3392   shift
3393   if test $# -gt 0; then
3394     # We chose a different compiler from the bogus one.
3395     # However, it has the same basename, so the bogon will be chosen
3396     # first if we set CC to just the basename; use the full file name.
3397     shift
3398     set dummy "$ac_dir/$ac_word" "$@"
3399     shift
3400     ac_cv_prog_CC="$@"
3401   fi
3402 fi
3403 fi
3404 fi
3405 CC="$ac_cv_prog_CC"
3406 if test -n "$CC"; then
3407   echo "$ac_t""$CC" 1>&6
3408 else
3409   echo "$ac_t""no" 1>&6
3410 fi
3411
3412   if test -z "$CC"; then
3413     case "`uname -s`" in
3414     *win32* | *WIN32* | *CYGWIN*)
3415       # Extract the first word of "cl", so it can be a program name with args.
3416 set dummy cl; ac_word=$2
3417 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3418 echo "configure:3419: checking for $ac_word" >&5
3419 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3420   echo $ac_n "(cached) $ac_c" 1>&6
3421 else
3422   if test -n "$CC"; then
3423   ac_cv_prog_CC="$CC" # Let the user override the test.
3424 else
3425   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3426   ac_dummy="$PATH"
3427   for ac_dir in $ac_dummy; do
3428     test -z "$ac_dir" && ac_dir=.
3429     if test -f $ac_dir/$ac_word; then
3430       ac_cv_prog_CC="cl"
3431       break
3432     fi
3433   done
3434   IFS="$ac_save_ifs"
3435 fi
3436 fi
3437 CC="$ac_cv_prog_CC"
3438 if test -n "$CC"; then
3439   echo "$ac_t""$CC" 1>&6
3440 else
3441   echo "$ac_t""no" 1>&6
3442 fi
3443  ;;
3444     esac
3445   fi
3446   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3447 fi
3448
3449 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3450 echo "configure:3451: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3451
3452 ac_ext=c
3453 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3454 ac_cpp='$CPP $CPPFLAGS'
3455 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3456 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3457 cross_compiling=$ac_cv_prog_cc_cross
3458
3459 cat > conftest.$ac_ext << EOF
3460
3461 #line 3462 "configure"
3462 #include "confdefs.h"
3463
3464 main(){return(0);}
3465 EOF
3466 if { (eval echo configure:3467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3467   ac_cv_prog_cc_works=yes
3468   # If we can't run a trivial program, we are probably using a cross compiler.
3469   if (./conftest; exit) 2>/dev/null; then
3470     ac_cv_prog_cc_cross=no
3471   else
3472     ac_cv_prog_cc_cross=yes
3473   fi
3474 else
3475   echo "configure: failed program was:" >&5
3476   cat conftest.$ac_ext >&5
3477   ac_cv_prog_cc_works=no
3478 fi
3479 rm -fr conftest*
3480 ac_ext=c
3481 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3482 ac_cpp='$CPP $CPPFLAGS'
3483 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3484 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3485 cross_compiling=$ac_cv_prog_cc_cross
3486
3487 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3488 if test $ac_cv_prog_cc_works = no; then
3489   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3490 fi
3491 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3492 echo "configure:3493: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3493 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3494 cross_compiling=$ac_cv_prog_cc_cross
3495
3496 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3497 echo "configure:3498: checking whether we are using GNU C" >&5
3498 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3499   echo $ac_n "(cached) $ac_c" 1>&6
3500 else
3501   cat > conftest.c <<EOF
3502 #ifdef __GNUC__
3503   yes;
3504 #endif
3505 EOF
3506 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3507   ac_cv_prog_gcc=yes
3508 else
3509   ac_cv_prog_gcc=no
3510 fi
3511 fi
3512
3513 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3514
3515 if test $ac_cv_prog_gcc = yes; then
3516   GCC=yes
3517 else
3518   GCC=
3519 fi
3520
3521 ac_test_CFLAGS="${CFLAGS+set}"
3522 ac_save_CFLAGS="$CFLAGS"
3523 CFLAGS=
3524 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3525 echo "configure:3526: checking whether ${CC-cc} accepts -g" >&5
3526 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   echo 'void f(){}' > conftest.c
3530 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3531   ac_cv_prog_cc_g=yes
3532 else
3533   ac_cv_prog_cc_g=no
3534 fi
3535 rm -f conftest*
3536
3537 fi
3538
3539 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3540 if test "$ac_test_CFLAGS" = set; then
3541   CFLAGS="$ac_save_CFLAGS"
3542 elif test $ac_cv_prog_cc_g = yes; then
3543   if test "$GCC" = yes; then
3544     CFLAGS="-g -O2"
3545   else
3546     CFLAGS="-g"
3547   fi
3548 else
3549   if test "$GCC" = yes; then
3550     CFLAGS="-O2"
3551   else
3552     CFLAGS=
3553   fi
3554 fi
3555
3556 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3557 if test "${with_gnu_ld+set}" = set; then
3558   withval="$with_gnu_ld"
3559   test "$withval" = no || with_gnu_ld=yes
3560 else
3561   with_gnu_ld=no
3562 fi
3563
3564 ac_prog=ld
3565 if test "$GCC" = yes; then
3566   # Check if gcc -print-prog-name=ld gives a path.
3567   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3568 echo "configure:3569: checking for ld used by GCC" >&5
3569   case $host in
3570   *-*-mingw*)
3571     # gcc leaves a trailing carriage return which upsets mingw
3572     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3573   *)
3574     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3575   esac
3576   case $ac_prog in
3577     # Accept absolute paths.
3578     [\\/]* | [A-Za-z]:[\\/]*)
3579       re_direlt='/[^/][^/]*/\.\./'
3580       # Canonicalize the path of ld
3581       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3582       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3583         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3584       done
3585       test -z "$LD" && LD="$ac_prog"
3586       ;;
3587   "")
3588     # If it fails, then pretend we aren't using GCC.
3589     ac_prog=ld
3590     ;;
3591   *)
3592     # If it is relative, then search for the first ld in PATH.
3593     with_gnu_ld=unknown
3594     ;;
3595   esac
3596 elif test "$with_gnu_ld" = yes; then
3597   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3598 echo "configure:3599: checking for GNU ld" >&5
3599 else
3600   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3601 echo "configure:3602: checking for non-GNU ld" >&5
3602 fi
3603 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3604   echo $ac_n "(cached) $ac_c" 1>&6
3605 else
3606   if test -z "$LD"; then
3607   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3608   for ac_dir in $PATH; do
3609     test -z "$ac_dir" && ac_dir=.
3610     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3611       lt_cv_path_LD="$ac_dir/$ac_prog"
3612       # Check to see if the program is GNU ld.  I'd rather use --version,
3613       # but apparently some GNU ld's only accept -v.
3614       # Break only if it was the GNU/non-GNU ld that we prefer.
3615       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3616         test "$with_gnu_ld" != no && break
3617       else
3618         test "$with_gnu_ld" != yes && break
3619       fi
3620     fi
3621   done
3622   IFS="$ac_save_ifs"
3623 else
3624   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3625 fi
3626 fi
3627
3628 LD="$lt_cv_path_LD"
3629 if test -n "$LD"; then
3630   echo "$ac_t""$LD" 1>&6
3631 else
3632   echo "$ac_t""no" 1>&6
3633 fi
3634 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3635 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3636 echo "configure:3637: checking if the linker ($LD) is GNU ld" >&5
3637 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3638   echo $ac_n "(cached) $ac_c" 1>&6
3639 else
3640   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3641 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3642   lt_cv_prog_gnu_ld=yes
3643 else
3644   lt_cv_prog_gnu_ld=no
3645 fi
3646 fi
3647
3648 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3649 with_gnu_ld=$lt_cv_prog_gnu_ld
3650
3651
3652 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3653 echo "configure:3654: checking for $LD option to reload object files" >&5
3654 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3655   echo $ac_n "(cached) $ac_c" 1>&6
3656 else
3657   lt_cv_ld_reload_flag='-r'
3658 fi
3659
3660 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3661 reload_flag=$lt_cv_ld_reload_flag
3662 test -n "$reload_flag" && reload_flag=" $reload_flag"
3663
3664 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3665 echo "configure:3666: checking for BSD-compatible nm" >&5
3666 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3667   echo $ac_n "(cached) $ac_c" 1>&6
3668 else
3669   if test -n "$NM"; then
3670   # Let the user override the test.
3671   lt_cv_path_NM="$NM"
3672 else
3673   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3674   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3675     test -z "$ac_dir" && ac_dir=.
3676     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3677     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3678       # Check to see if the nm accepts a BSD-compat flag.
3679       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3680       #   nm: unknown option "B" ignored
3681       # Tru64's nm complains that /dev/null is an invalid object file
3682       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3683         lt_cv_path_NM="$tmp_nm -B"
3684         break
3685       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3686         lt_cv_path_NM="$tmp_nm -p"
3687         break
3688       else
3689         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3690         continue # so that we can try to find one that supports BSD flags
3691       fi
3692     fi
3693   done
3694   IFS="$ac_save_ifs"
3695   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3696 fi
3697 fi
3698
3699 NM="$lt_cv_path_NM"
3700 echo "$ac_t""$NM" 1>&6
3701
3702 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3703 echo "configure:3704: checking for a sed that does not truncate output" >&5
3704 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3705   echo $ac_n "(cached) $ac_c" 1>&6
3706 else
3707   # Loop through the user's path and test for sed and gsed.
3708 # Then use that list of sed's as ones to test for truncation.
3709 as_executable_p="test -f"
3710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3711 for as_dir in $PATH
3712 do
3713   IFS=$as_save_IFS
3714   test -z "$as_dir" && as_dir=.
3715   for ac_prog in sed gsed; do
3716     for ac_exec_ext in '' $ac_executable_extensions; do
3717       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3718         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3719       fi
3720     done
3721   done
3722 done
3723
3724   # Create a temporary directory, and hook for its removal unless debugging.
3725 $debug ||
3726 {
3727   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3728   trap '{ (exit 1); exit 1; }' 1 2 13 15
3729 }
3730
3731 # Create a (secure) tmp directory for tmp files.
3732 : ${TMPDIR=/tmp}
3733 {
3734   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3735   test -n "$tmp" && test -d "$tmp"
3736 }  ||
3737 {
3738   tmp=$TMPDIR/sed$$-$RANDOM
3739   (umask 077 && mkdir $tmp)
3740 } ||
3741 {
3742    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3743    { (exit 1); exit 1; }
3744 }
3745   _max=0
3746   _count=0
3747   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3748   # along with /bin/sed that truncates output.
3749   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3750     test ! -f ${_sed} && break
3751     cat /dev/null > "$tmp/sed.in"
3752     _count=0
3753     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3754     # Check for GNU sed and select it if it is found.
3755     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3756       lt_cv_path_SED=${_sed}
3757       break
3758     fi
3759     while true; do
3760       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3761       mv "$tmp/sed.tmp" "$tmp/sed.in"
3762       cp "$tmp/sed.in" "$tmp/sed.nl"
3763       echo >>"$tmp/sed.nl"
3764       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3765       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3766       # 40000 chars as input seems more than enough
3767       test $_count -gt 10 && break
3768       _count=`expr $_count + 1`
3769       if test $_count -gt $_max; then
3770         _max=$_count
3771         lt_cv_path_SED=$_sed
3772       fi
3773     done
3774   done
3775   rm -rf "$tmp"
3776
3777 fi
3778
3779 if test "X$SED" != "X"; then
3780   lt_cv_path_SED=$SED
3781 else
3782   SED=$lt_cv_path_SED
3783 fi
3784 echo "$ac_t""$SED" 1>&6
3785
3786 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3787 echo "configure:3788: checking whether ln -s works" >&5
3788 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3789   echo $ac_n "(cached) $ac_c" 1>&6
3790 else
3791   rm -f conftestdata
3792 if ln -s X conftestdata 2>/dev/null
3793 then
3794   rm -f conftestdata
3795   ac_cv_prog_LN_S="ln -s"
3796 else
3797   ac_cv_prog_LN_S=ln
3798 fi
3799 fi
3800 LN_S="$ac_cv_prog_LN_S"
3801 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3802   echo "$ac_t""yes" 1>&6
3803 else
3804   echo "$ac_t""no" 1>&6
3805 fi
3806
3807 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3808 echo "configure:3809: checking how to recognise dependent libraries" >&5
3809 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3810   echo $ac_n "(cached) $ac_c" 1>&6
3811 else
3812   lt_cv_file_magic_cmd='$MAGIC_CMD'
3813 lt_cv_file_magic_test_file=
3814 lt_cv_deplibs_check_method='unknown'
3815 # Need to set the preceding variable on all platforms that support
3816 # interlibrary dependencies.
3817 # 'none' -- dependencies not supported.
3818 # `unknown' -- same as none, but documents that we really don't know.
3819 # 'pass_all' -- all dependencies passed with no checks.
3820 # 'test_compile' -- check by making test program.
3821 # 'file_magic [[regex]]' -- check by looking for files in library path
3822 # which responds to the $file_magic_cmd with a given egrep regex.
3823 # If you have `file' or equivalent on your system and you're not sure
3824 # whether `pass_all' will *always* work, you probably want this one.
3825
3826 case $host_os in
3827 aix4* | aix5*)
3828   lt_cv_deplibs_check_method=pass_all
3829   ;;
3830
3831 beos*)
3832   lt_cv_deplibs_check_method=pass_all
3833   ;;
3834
3835 bsdi4*)
3836   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3837   lt_cv_file_magic_cmd='/usr/bin/file -L'
3838   lt_cv_file_magic_test_file=/shlib/libc.so
3839   ;;
3840
3841 cygwin* | mingw* | pw32*)
3842   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3843   lt_cv_file_magic_cmd='$OBJDUMP -f'
3844   ;;
3845
3846 darwin* | rhapsody*)
3847   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3848   lt_cv_file_magic_cmd='/usr/bin/file -L'
3849   case "$host_os" in
3850   rhapsody* | darwin1.[012])
3851     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3852     ;;
3853   *) # Darwin 1.3 on
3854     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3855     ;;
3856   esac
3857   ;;
3858
3859 freebsd*)
3860   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3861     case $host_cpu in
3862     i*86 )
3863       # Not sure whether the presence of OpenBSD here was a mistake.
3864       # Let's accept both of them until this is cleared up.
3865       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3866       lt_cv_file_magic_cmd=/usr/bin/file
3867       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3868       ;;
3869     esac
3870   else
3871     lt_cv_deplibs_check_method=pass_all
3872   fi
3873   ;;
3874
3875 gnu*)
3876   lt_cv_deplibs_check_method=pass_all
3877   ;;
3878
3879 hpux10.20*|hpux11*)
3880   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3881   lt_cv_file_magic_cmd=/usr/bin/file
3882   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3883   ;;
3884
3885 irix5* | irix6* | nonstopux*)
3886   case $host_os in
3887   irix5* | nonstopux*)
3888     # this will be overridden with pass_all, but let us keep it just in case
3889     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3890     ;;
3891   *)
3892     case $LD in
3893     *-32|*"-32 ") libmagic=32-bit;;
3894     *-n32|*"-n32 ") libmagic=N32;;
3895     *-64|*"-64 ") libmagic=64-bit;;
3896     *) libmagic=never-match;;
3897     esac
3898     # this will be overridden with pass_all, but let us keep it just in case
3899     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3900     ;;
3901   esac
3902   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3903   lt_cv_deplibs_check_method=pass_all
3904   ;;
3905
3906 # This must be Linux ELF.
3907 linux-gnu*)
3908   case $host_cpu in
3909   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3910     lt_cv_deplibs_check_method=pass_all ;;
3911   *)
3912     # glibc up to 2.1.1 does not perform some relocations on ARM
3913     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3914   esac
3915   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3916   ;;
3917
3918 netbsd*)
3919   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3920     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3921   else
3922     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3923   fi
3924   ;;
3925
3926 newos6*)
3927   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3928   lt_cv_file_magic_cmd=/usr/bin/file
3929   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3930   ;;
3931
3932 openbsd*)
3933   lt_cv_file_magic_cmd=/usr/bin/file
3934   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3935   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3936     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3937   else
3938     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3939   fi
3940   ;;
3941
3942 openedition*)
3943   lt_cv_deplibs_check_method=pass_all
3944   ;;
3945
3946 osf3* | osf4* | osf5*)
3947   # this will be overridden with pass_all, but let us keep it just in case
3948   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3949   lt_cv_file_magic_test_file=/shlib/libc.so
3950   lt_cv_deplibs_check_method=pass_all
3951   ;;
3952
3953 sco3.2v5*)
3954   lt_cv_deplibs_check_method=pass_all
3955   ;;
3956
3957 solaris*)
3958   lt_cv_deplibs_check_method=pass_all
3959   lt_cv_file_magic_test_file=/lib/libc.so
3960   ;;
3961
3962 sysv5uw[78]* | sysv4*uw2*)
3963   lt_cv_deplibs_check_method=pass_all
3964   ;;
3965
3966 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3967   case $host_vendor in
3968   motorola)
3969     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]'
3970     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3971     ;;
3972   ncr)
3973     lt_cv_deplibs_check_method=pass_all
3974     ;;
3975   sequent)
3976     lt_cv_file_magic_cmd='/bin/file'
3977     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3978     ;;
3979   sni)
3980     lt_cv_file_magic_cmd='/bin/file'
3981     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3982     lt_cv_file_magic_test_file=/lib/libc.so
3983     ;;
3984   siemens)
3985     lt_cv_deplibs_check_method=pass_all
3986     ;;
3987   esac
3988   ;;
3989 esac
3990
3991 fi
3992
3993 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3994 file_magic_cmd=$lt_cv_file_magic_cmd
3995 deplibs_check_method=$lt_cv_deplibs_check_method
3996
3997 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3998 echo "configure:3999: checking for object suffix" >&5
3999 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4000   echo $ac_n "(cached) $ac_c" 1>&6
4001 else
4002   rm -f conftest*
4003 echo 'int i = 1;' > conftest.$ac_ext
4004 if { (eval echo configure:4005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4005   for ac_file in conftest.*; do
4006     case $ac_file in
4007     *.c) ;;
4008     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4009     esac
4010   done
4011 else
4012   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4013 fi
4014 rm -f conftest*
4015 fi
4016
4017 echo "$ac_t""$ac_cv_objext" 1>&6
4018 OBJEXT=$ac_cv_objext
4019 ac_objext=$ac_cv_objext
4020
4021
4022
4023
4024 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4025 echo "configure:4026: checking for executable suffix" >&5
4026 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4027   echo $ac_n "(cached) $ac_c" 1>&6
4028 else
4029   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4030   ac_cv_exeext=.exe
4031 else
4032   rm -f conftest*
4033   echo 'int main () { return 0; }' > conftest.$ac_ext
4034   ac_cv_exeext=
4035   if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4036     for file in conftest.*; do
4037       case $file in
4038       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4039       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4040       esac
4041     done
4042   else
4043     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4044   fi
4045   rm -f conftest*
4046   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4047 fi
4048 fi
4049
4050 EXEEXT=""
4051 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4052 echo "$ac_t""${ac_cv_exeext}" 1>&6
4053 ac_exeext=$EXEEXT
4054
4055 if test $host != $build; then
4056   ac_tool_prefix=${host_alias}-
4057 else
4058   ac_tool_prefix=
4059 fi
4060
4061
4062
4063
4064 # Check for command to grab the raw symbol name followed by C symbol from nm.
4065 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4066 echo "configure:4067: checking command to parse $NM output" >&5
4067 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4068   echo $ac_n "(cached) $ac_c" 1>&6
4069 else
4070   
4071 # These are sane defaults that work on at least a few old systems.
4072 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4073
4074 # Character class describing NM global symbol codes.
4075 symcode='[BCDEGRST]'
4076
4077 # Regexp to match symbols that can be accessed directly from C.
4078 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4079
4080 # Transform the above into a raw symbol and a C symbol.
4081 symxfrm='\1 \2\3 \3'
4082
4083 # Transform an extracted symbol line into a proper C declaration
4084 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4085
4086 # Transform an extracted symbol line into symbol name and symbol address
4087 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'"
4088
4089 # Define system-specific variables.
4090 case $host_os in
4091 aix*)
4092   symcode='[BCDT]'
4093   ;;
4094 cygwin* | mingw* | pw32*)
4095   symcode='[ABCDGISTW]'
4096   ;;
4097 hpux*) # Its linker distinguishes data from code symbols
4098   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4099   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'"
4100   ;;
4101 irix* | nonstopux*)
4102   symcode='[BCDEGRST]'
4103   ;;
4104 osf*)
4105   symcode='[BCDEGQRST]'
4106   ;;
4107 solaris* | sysv5*)
4108   symcode='[BDT]'
4109   ;;
4110 sysv4)
4111   symcode='[DFNSTU]'
4112   ;;
4113 esac
4114
4115 # Handle CRLF in mingw tool chain
4116 opt_cr=
4117 case $host_os in
4118 mingw*)
4119   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4120   ;;
4121 esac
4122
4123 # If we're using GNU nm, then use its standard symbol codes.
4124 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4125   symcode='[ABCDGISTW]'
4126 fi
4127
4128 # Try without a prefix undercore, then with it.
4129 for ac_symprfx in "" "_"; do
4130
4131   # Write the raw and C identifiers.
4132 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4133
4134   # Check to see that the pipe works correctly.
4135   pipe_works=no
4136   rm -f conftest*
4137   cat > conftest.$ac_ext <<EOF
4138 #ifdef __cplusplus
4139 extern "C" {
4140 #endif
4141 char nm_test_var;
4142 void nm_test_func(){}
4143 #ifdef __cplusplus
4144 }
4145 #endif
4146 int main(){nm_test_var='a';nm_test_func();return(0);}
4147 EOF
4148
4149   if { (eval echo configure:4150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4150     # Now try to grab the symbols.
4151     nlist=conftest.nm
4152     if { (eval echo configure:4153: \"$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
4153       # Try sorting and uniquifying the output.
4154       if sort "$nlist" | uniq > "$nlist"T; then
4155         mv -f "$nlist"T "$nlist"
4156       else
4157         rm -f "$nlist"T
4158       fi
4159
4160       # Make sure that we snagged all the symbols we need.
4161       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4162         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4163           cat <<EOF > conftest.$ac_ext
4164 #ifdef __cplusplus
4165 extern "C" {
4166 #endif
4167
4168 EOF
4169           # Now generate the symbol file.
4170           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4171
4172           cat <<EOF >> conftest.$ac_ext
4173 #if defined (__STDC__) && __STDC__
4174 # define lt_ptr void *
4175 #else
4176 # define lt_ptr char *
4177 # define const
4178 #endif
4179
4180 /* The mapping between symbol names and symbols. */
4181 const struct {
4182   const char *name;
4183   lt_ptr address;
4184 }
4185 lt_preloaded_symbols[] =
4186 {
4187 EOF
4188           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4189           cat <<\EOF >> conftest.$ac_ext
4190   {0, (lt_ptr) 0}
4191 };
4192
4193 #ifdef __cplusplus
4194 }
4195 #endif
4196 EOF
4197           # Now try linking the two files.
4198           mv conftest.$ac_objext conftstm.$ac_objext
4199           save_LIBS="$LIBS"
4200           save_CFLAGS="$CFLAGS"
4201           LIBS="conftstm.$ac_objext"
4202           CFLAGS="$CFLAGS$no_builtin_flag"
4203           if { (eval echo configure:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4204             pipe_works=yes
4205           fi
4206           LIBS="$save_LIBS"
4207           CFLAGS="$save_CFLAGS"
4208         else
4209           echo "cannot find nm_test_func in $nlist" >&5
4210         fi
4211       else
4212         echo "cannot find nm_test_var in $nlist" >&5
4213       fi
4214     else
4215       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4216     fi
4217   else
4218     echo "$progname: failed program was:" >&5
4219     cat conftest.$ac_ext >&5
4220   fi
4221   rm -f conftest* conftst*
4222
4223   # Do not use the global_symbol_pipe unless it works.
4224   if test "$pipe_works" = yes; then
4225     break
4226   else
4227     lt_cv_sys_global_symbol_pipe=
4228   fi
4229 done
4230
4231 fi
4232
4233 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4234 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4235   global_symbol_to_cdecl=
4236   global_symbol_to_c_name_address=
4237 else
4238   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4239   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4240 fi
4241 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4242 then
4243   echo "$ac_t""failed" 1>&6
4244 else
4245   echo "$ac_t""ok" 1>&6
4246 fi
4247
4248 for ac_hdr in dlfcn.h
4249 do
4250 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4251 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4252 echo "configure:4253: checking for $ac_hdr" >&5
4253 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4254   echo $ac_n "(cached) $ac_c" 1>&6
4255 else
4256   cat > conftest.$ac_ext <<EOF
4257 #line 4258 "configure"
4258 #include "confdefs.h"
4259 #include <$ac_hdr>
4260 EOF
4261 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4262 { (eval echo configure:4263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4263 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4264 if test -z "$ac_err"; then
4265   rm -rf conftest*
4266   eval "ac_cv_header_$ac_safe=yes"
4267 else
4268   echo "$ac_err" >&5
4269   echo "configure: failed program was:" >&5
4270   cat conftest.$ac_ext >&5
4271   rm -rf conftest*
4272   eval "ac_cv_header_$ac_safe=no"
4273 fi
4274 rm -f conftest*
4275 fi
4276 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4277   echo "$ac_t""yes" 1>&6
4278     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4279   cat >> confdefs.h <<EOF
4280 #define $ac_tr_hdr 1
4281 EOF
4282  
4283 else
4284   echo "$ac_t""no" 1>&6
4285 fi
4286 done
4287
4288
4289
4290
4291
4292
4293 # Only perform the check for file, if the check method requires it
4294 case $deplibs_check_method in
4295 file_magic*)
4296   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4297     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4298 echo "configure:4299: checking for ${ac_tool_prefix}file" >&5
4299 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4300   echo $ac_n "(cached) $ac_c" 1>&6
4301 else
4302   case $MAGIC_CMD in
4303   /*)
4304   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4305   ;;
4306   ?:/*)
4307   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4308   ;;
4309   *)
4310   ac_save_MAGIC_CMD="$MAGIC_CMD"
4311   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4312   ac_dummy="/usr/bin:$PATH"
4313   for ac_dir in $ac_dummy; do
4314     test -z "$ac_dir" && ac_dir=.
4315     if test -f $ac_dir/${ac_tool_prefix}file; then
4316       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4317       if test -n "$file_magic_test_file"; then
4318         case $deplibs_check_method in
4319         "file_magic "*)
4320           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4321           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4322           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4323             egrep "$file_magic_regex" > /dev/null; then
4324             :
4325           else
4326             cat <<EOF 1>&2
4327
4328 *** Warning: the command libtool uses to detect shared libraries,
4329 *** $file_magic_cmd, produces output that libtool cannot recognize.
4330 *** The result is that libtool may fail to recognize shared libraries
4331 *** as such.  This will affect the creation of libtool libraries that
4332 *** depend on shared libraries, but programs linked with such libtool
4333 *** libraries will work regardless of this problem.  Nevertheless, you
4334 *** may want to report the problem to your system manager and/or to
4335 *** bug-libtool@gnu.org
4336
4337 EOF
4338           fi ;;
4339         esac
4340       fi
4341       break
4342     fi
4343   done
4344   IFS="$ac_save_ifs"
4345   MAGIC_CMD="$ac_save_MAGIC_CMD"
4346   ;;
4347 esac
4348 fi
4349
4350 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4351 if test -n "$MAGIC_CMD"; then
4352   echo "$ac_t""$MAGIC_CMD" 1>&6
4353 else
4354   echo "$ac_t""no" 1>&6
4355 fi
4356
4357 if test -z "$lt_cv_path_MAGIC_CMD"; then
4358   if test -n "$ac_tool_prefix"; then
4359     echo $ac_n "checking for file""... $ac_c" 1>&6
4360 echo "configure:4361: checking for file" >&5
4361 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4362   echo $ac_n "(cached) $ac_c" 1>&6
4363 else
4364   case $MAGIC_CMD in
4365   /*)
4366   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4367   ;;
4368   ?:/*)
4369   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4370   ;;
4371   *)
4372   ac_save_MAGIC_CMD="$MAGIC_CMD"
4373   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4374   ac_dummy="/usr/bin:$PATH"
4375   for ac_dir in $ac_dummy; do
4376     test -z "$ac_dir" && ac_dir=.
4377     if test -f $ac_dir/file; then
4378       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4379       if test -n "$file_magic_test_file"; then
4380         case $deplibs_check_method in
4381         "file_magic "*)
4382           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4383           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4384           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4385             egrep "$file_magic_regex" > /dev/null; then
4386             :
4387           else
4388             cat <<EOF 1>&2
4389
4390 *** Warning: the command libtool uses to detect shared libraries,
4391 *** $file_magic_cmd, produces output that libtool cannot recognize.
4392 *** The result is that libtool may fail to recognize shared libraries
4393 *** as such.  This will affect the creation of libtool libraries that
4394 *** depend on shared libraries, but programs linked with such libtool
4395 *** libraries will work regardless of this problem.  Nevertheless, you
4396 *** may want to report the problem to your system manager and/or to
4397 *** bug-libtool@gnu.org
4398
4399 EOF
4400           fi ;;
4401         esac
4402       fi
4403       break
4404     fi
4405   done
4406   IFS="$ac_save_ifs"
4407   MAGIC_CMD="$ac_save_MAGIC_CMD"
4408   ;;
4409 esac
4410 fi
4411
4412 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4413 if test -n "$MAGIC_CMD"; then
4414   echo "$ac_t""$MAGIC_CMD" 1>&6
4415 else
4416   echo "$ac_t""no" 1>&6
4417 fi
4418
4419   else
4420     MAGIC_CMD=:
4421   fi
4422 fi
4423
4424   fi
4425   ;;
4426 esac
4427
4428 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4429 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4430 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4431 echo "configure:4432: checking for $ac_word" >&5
4432 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4433   echo $ac_n "(cached) $ac_c" 1>&6
4434 else
4435   if test -n "$RANLIB"; then
4436   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4437 else
4438   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4439   ac_dummy="$PATH"
4440   for ac_dir in $ac_dummy; do
4441     test -z "$ac_dir" && ac_dir=.
4442     if test -f $ac_dir/$ac_word; then
4443       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4444       break
4445     fi
4446   done
4447   IFS="$ac_save_ifs"
4448 fi
4449 fi
4450 RANLIB="$ac_cv_prog_RANLIB"
4451 if test -n "$RANLIB"; then
4452   echo "$ac_t""$RANLIB" 1>&6
4453 else
4454   echo "$ac_t""no" 1>&6
4455 fi
4456
4457
4458 if test -z "$ac_cv_prog_RANLIB"; then
4459 if test -n "$ac_tool_prefix"; then
4460   # Extract the first word of "ranlib", so it can be a program name with args.
4461 set dummy ranlib; ac_word=$2
4462 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4463 echo "configure:4464: checking for $ac_word" >&5
4464 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4465   echo $ac_n "(cached) $ac_c" 1>&6
4466 else
4467   if test -n "$RANLIB"; then
4468   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4469 else
4470   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4471   ac_dummy="$PATH"
4472   for ac_dir in $ac_dummy; do
4473     test -z "$ac_dir" && ac_dir=.
4474     if test -f $ac_dir/$ac_word; then
4475       ac_cv_prog_RANLIB="ranlib"
4476       break
4477     fi
4478   done
4479   IFS="$ac_save_ifs"
4480   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4481 fi
4482 fi
4483 RANLIB="$ac_cv_prog_RANLIB"
4484 if test -n "$RANLIB"; then
4485   echo "$ac_t""$RANLIB" 1>&6
4486 else
4487   echo "$ac_t""no" 1>&6
4488 fi
4489
4490 else
4491   RANLIB=":"
4492 fi
4493 fi
4494
4495 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4496 set dummy ${ac_tool_prefix}strip; ac_word=$2
4497 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4498 echo "configure:4499: checking for $ac_word" >&5
4499 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4500   echo $ac_n "(cached) $ac_c" 1>&6
4501 else
4502   if test -n "$STRIP"; then
4503   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4504 else
4505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4506   ac_dummy="$PATH"
4507   for ac_dir in $ac_dummy; do
4508     test -z "$ac_dir" && ac_dir=.
4509     if test -f $ac_dir/$ac_word; then
4510       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4511       break
4512     fi
4513   done
4514   IFS="$ac_save_ifs"
4515 fi
4516 fi
4517 STRIP="$ac_cv_prog_STRIP"
4518 if test -n "$STRIP"; then
4519   echo "$ac_t""$STRIP" 1>&6
4520 else
4521   echo "$ac_t""no" 1>&6
4522 fi
4523
4524
4525 if test -z "$ac_cv_prog_STRIP"; then
4526 if test -n "$ac_tool_prefix"; then
4527   # Extract the first word of "strip", so it can be a program name with args.
4528 set dummy strip; ac_word=$2
4529 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4530 echo "configure:4531: checking for $ac_word" >&5
4531 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4532   echo $ac_n "(cached) $ac_c" 1>&6
4533 else
4534   if test -n "$STRIP"; then
4535   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4536 else
4537   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4538   ac_dummy="$PATH"
4539   for ac_dir in $ac_dummy; do
4540     test -z "$ac_dir" && ac_dir=.
4541     if test -f $ac_dir/$ac_word; then
4542       ac_cv_prog_STRIP="strip"
4543       break
4544     fi
4545   done
4546   IFS="$ac_save_ifs"
4547   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4548 fi
4549 fi
4550 STRIP="$ac_cv_prog_STRIP"
4551 if test -n "$STRIP"; then
4552   echo "$ac_t""$STRIP" 1>&6
4553 else
4554   echo "$ac_t""no" 1>&6
4555 fi
4556
4557 else
4558   STRIP=":"
4559 fi
4560 fi
4561
4562
4563 enable_dlopen=yes
4564 enable_win32_dll=yes
4565
4566 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4567 if test "${enable_libtool_lock+set}" = set; then
4568   enableval="$enable_libtool_lock"
4569   :
4570 fi
4571
4572 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4573
4574 # Some flags need to be propagated to the compiler or linker for good
4575 # libtool support.
4576 case $host in
4577 *-*-irix6*)
4578   # Find out which ABI we are using.
4579   echo '#line 4580 "configure"' > conftest.$ac_ext
4580   if { (eval echo configure:4581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4581     case `/usr/bin/file conftest.$ac_objext` in
4582     *32-bit*)
4583       LD="${LD-ld} -32"
4584       ;;
4585     *N32*)
4586       LD="${LD-ld} -n32"
4587       ;;
4588     *64-bit*)
4589       LD="${LD-ld} -64"
4590       ;;
4591     esac
4592   fi
4593   rm -rf conftest*
4594   ;;
4595
4596 *-*-sco3.2v5*)
4597   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4598   SAVE_CFLAGS="$CFLAGS"
4599   CFLAGS="$CFLAGS -belf"
4600   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4601 echo "configure:4602: checking whether the C compiler needs -belf" >&5
4602 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4603   echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605   
4606      ac_ext=c
4607 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4608 ac_cpp='$CPP $CPPFLAGS'
4609 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4610 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4611 cross_compiling=$ac_cv_prog_cc_cross
4612
4613      cat > conftest.$ac_ext <<EOF
4614 #line 4615 "configure"
4615 #include "confdefs.h"
4616
4617 int main() {
4618
4619 ; return 0; }
4620 EOF
4621 if { (eval echo configure:4622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4622   rm -rf conftest*
4623   lt_cv_cc_needs_belf=yes
4624 else
4625   echo "configure: failed program was:" >&5
4626   cat conftest.$ac_ext >&5
4627   rm -rf conftest*
4628   lt_cv_cc_needs_belf=no
4629 fi
4630 rm -f conftest*
4631      ac_ext=c
4632 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4633 ac_cpp='$CPP $CPPFLAGS'
4634 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4635 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4636 cross_compiling=$ac_cv_prog_cc_cross
4637
4638 fi
4639
4640 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4641   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4642     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4643     CFLAGS="$SAVE_CFLAGS"
4644   fi
4645   ;;
4646
4647 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4648   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4649 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4650 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4651 echo "configure:4652: checking for $ac_word" >&5
4652 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4653   echo $ac_n "(cached) $ac_c" 1>&6
4654 else
4655   if test -n "$DLLTOOL"; then
4656   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4657 else
4658   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4659   ac_dummy="$PATH"
4660   for ac_dir in $ac_dummy; do
4661     test -z "$ac_dir" && ac_dir=.
4662     if test -f $ac_dir/$ac_word; then
4663       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4664       break
4665     fi
4666   done
4667   IFS="$ac_save_ifs"
4668 fi
4669 fi
4670 DLLTOOL="$ac_cv_prog_DLLTOOL"
4671 if test -n "$DLLTOOL"; then
4672   echo "$ac_t""$DLLTOOL" 1>&6
4673 else
4674   echo "$ac_t""no" 1>&6
4675 fi
4676
4677
4678 if test -z "$ac_cv_prog_DLLTOOL"; then
4679 if test -n "$ac_tool_prefix"; then
4680   # Extract the first word of "dlltool", so it can be a program name with args.
4681 set dummy dlltool; ac_word=$2
4682 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4683 echo "configure:4684: checking for $ac_word" >&5
4684 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4685   echo $ac_n "(cached) $ac_c" 1>&6
4686 else
4687   if test -n "$DLLTOOL"; then
4688   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4689 else
4690   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4691   ac_dummy="$PATH"
4692   for ac_dir in $ac_dummy; do
4693     test -z "$ac_dir" && ac_dir=.
4694     if test -f $ac_dir/$ac_word; then
4695       ac_cv_prog_DLLTOOL="dlltool"
4696       break
4697     fi
4698   done
4699   IFS="$ac_save_ifs"
4700   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4701 fi
4702 fi
4703 DLLTOOL="$ac_cv_prog_DLLTOOL"
4704 if test -n "$DLLTOOL"; then
4705   echo "$ac_t""$DLLTOOL" 1>&6
4706 else
4707   echo "$ac_t""no" 1>&6
4708 fi
4709
4710 else
4711   DLLTOOL="false"
4712 fi
4713 fi
4714
4715   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4716 set dummy ${ac_tool_prefix}as; ac_word=$2
4717 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4718 echo "configure:4719: checking for $ac_word" >&5
4719 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4720   echo $ac_n "(cached) $ac_c" 1>&6
4721 else
4722   if test -n "$AS"; then
4723   ac_cv_prog_AS="$AS" # Let the user override the test.
4724 else
4725   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4726   ac_dummy="$PATH"
4727   for ac_dir in $ac_dummy; do
4728     test -z "$ac_dir" && ac_dir=.
4729     if test -f $ac_dir/$ac_word; then
4730       ac_cv_prog_AS="${ac_tool_prefix}as"
4731       break
4732     fi
4733   done
4734   IFS="$ac_save_ifs"
4735 fi
4736 fi
4737 AS="$ac_cv_prog_AS"
4738 if test -n "$AS"; then
4739   echo "$ac_t""$AS" 1>&6
4740 else
4741   echo "$ac_t""no" 1>&6
4742 fi
4743
4744
4745 if test -z "$ac_cv_prog_AS"; then
4746 if test -n "$ac_tool_prefix"; then
4747   # Extract the first word of "as", so it can be a program name with args.
4748 set dummy as; ac_word=$2
4749 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4750 echo "configure:4751: checking for $ac_word" >&5
4751 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4752   echo $ac_n "(cached) $ac_c" 1>&6
4753 else
4754   if test -n "$AS"; then
4755   ac_cv_prog_AS="$AS" # Let the user override the test.
4756 else
4757   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4758   ac_dummy="$PATH"
4759   for ac_dir in $ac_dummy; do
4760     test -z "$ac_dir" && ac_dir=.
4761     if test -f $ac_dir/$ac_word; then
4762       ac_cv_prog_AS="as"
4763       break
4764     fi
4765   done
4766   IFS="$ac_save_ifs"
4767   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4768 fi
4769 fi
4770 AS="$ac_cv_prog_AS"
4771 if test -n "$AS"; then
4772   echo "$ac_t""$AS" 1>&6
4773 else
4774   echo "$ac_t""no" 1>&6
4775 fi
4776
4777 else
4778   AS="false"
4779 fi
4780 fi
4781
4782   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4783 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4784 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4785 echo "configure:4786: checking for $ac_word" >&5
4786 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4787   echo $ac_n "(cached) $ac_c" 1>&6
4788 else
4789   if test -n "$OBJDUMP"; then
4790   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4791 else
4792   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4793   ac_dummy="$PATH"
4794   for ac_dir in $ac_dummy; do
4795     test -z "$ac_dir" && ac_dir=.
4796     if test -f $ac_dir/$ac_word; then
4797       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4798       break
4799     fi
4800   done
4801   IFS="$ac_save_ifs"
4802 fi
4803 fi
4804 OBJDUMP="$ac_cv_prog_OBJDUMP"
4805 if test -n "$OBJDUMP"; then
4806   echo "$ac_t""$OBJDUMP" 1>&6
4807 else
4808   echo "$ac_t""no" 1>&6
4809 fi
4810
4811
4812 if test -z "$ac_cv_prog_OBJDUMP"; then
4813 if test -n "$ac_tool_prefix"; then
4814   # Extract the first word of "objdump", so it can be a program name with args.
4815 set dummy objdump; ac_word=$2
4816 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4817 echo "configure:4818: checking for $ac_word" >&5
4818 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4819   echo $ac_n "(cached) $ac_c" 1>&6
4820 else
4821   if test -n "$OBJDUMP"; then
4822   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4823 else
4824   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4825   ac_dummy="$PATH"
4826   for ac_dir in $ac_dummy; do
4827     test -z "$ac_dir" && ac_dir=.
4828     if test -f $ac_dir/$ac_word; then
4829       ac_cv_prog_OBJDUMP="objdump"
4830       break
4831     fi
4832   done
4833   IFS="$ac_save_ifs"
4834   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4835 fi
4836 fi
4837 OBJDUMP="$ac_cv_prog_OBJDUMP"
4838 if test -n "$OBJDUMP"; then
4839   echo "$ac_t""$OBJDUMP" 1>&6
4840 else
4841   echo "$ac_t""no" 1>&6
4842 fi
4843
4844 else
4845   OBJDUMP="false"
4846 fi
4847 fi
4848
4849
4850   # recent cygwin and mingw systems supply a stub DllMain which the user
4851   # can override, but on older systems we have to supply one
4852   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4853 echo "configure:4854: checking if libtool should supply DllMain function" >&5
4854 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4855   echo $ac_n "(cached) $ac_c" 1>&6
4856 else
4857   cat > conftest.$ac_ext <<EOF
4858 #line 4859 "configure"
4859 #include "confdefs.h"
4860
4861 int main() {
4862 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4863       DllMain (0, 0, 0);
4864 ; return 0; }
4865 EOF
4866 if { (eval echo configure:4867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4867   rm -rf conftest*
4868   lt_cv_need_dllmain=no
4869 else
4870   echo "configure: failed program was:" >&5
4871   cat conftest.$ac_ext >&5
4872   rm -rf conftest*
4873   lt_cv_need_dllmain=yes
4874 fi
4875 rm -f conftest*
4876 fi
4877
4878 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4879
4880   case $host/$CC in
4881   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4882     # old mingw systems require "-dll" to link a DLL, while more recent ones
4883     # require "-mdll"
4884     SAVE_CFLAGS="$CFLAGS"
4885     CFLAGS="$CFLAGS -mdll"
4886     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4887 echo "configure:4888: checking how to link DLLs" >&5
4888 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4889   echo $ac_n "(cached) $ac_c" 1>&6
4890 else
4891   cat > conftest.$ac_ext <<EOF
4892 #line 4893 "configure"
4893 #include "confdefs.h"
4894
4895 int main() {
4896
4897 ; return 0; }
4898 EOF
4899 if { (eval echo configure:4900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4900   rm -rf conftest*
4901   lt_cv_cc_dll_switch=-mdll
4902 else
4903   echo "configure: failed program was:" >&5
4904   cat conftest.$ac_ext >&5
4905   rm -rf conftest*
4906   lt_cv_cc_dll_switch=-dll
4907 fi
4908 rm -f conftest*
4909 fi
4910
4911 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4912     CFLAGS="$SAVE_CFLAGS" ;;
4913   *-*-cygwin* | *-*-pw32*)
4914     # cygwin systems need to pass --dll to the linker, and not link
4915     # crt.o which will require a WinMain@16 definition.
4916     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4917   esac
4918   ;;
4919   
4920 esac
4921
4922 # Sed substitution that helps us do robust quoting.  It backslashifies
4923 # metacharacters that are still active within double-quoted strings.
4924 Xsed='sed -e s/^X//'
4925 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4926
4927 # Same as above, but do not quote variable references.
4928 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4929
4930 # Sed substitution to delay expansion of an escaped shell variable in a
4931 # double_quote_subst'ed string.
4932 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4933
4934 # Constants:
4935 rm="rm -f"
4936
4937 # Global variables:
4938 default_ofile=libtool
4939 can_build_shared=yes
4940
4941 # All known linkers require a `.a' archive for static linking (except M$VC,
4942 # which needs '.lib').
4943 libext=a
4944 ltmain="$ac_aux_dir/ltmain.sh"
4945 ofile="$default_ofile"
4946 with_gnu_ld="$lt_cv_prog_gnu_ld"
4947 need_locks="$enable_libtool_lock"
4948
4949 old_CC="$CC"
4950 old_CFLAGS="$CFLAGS"
4951
4952 # Set sane defaults for various variables
4953 test -z "$AR" && AR=ar
4954 test -z "$AR_FLAGS" && AR_FLAGS=cru
4955 test -z "$AS" && AS=as
4956 test -z "$CC" && CC=cc
4957 test -z "$DLLTOOL" && DLLTOOL=dlltool
4958 test -z "$LD" && LD=ld
4959 test -z "$LN_S" && LN_S="ln -s"
4960 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4961 test -z "$NM" && NM=nm
4962 test -z "$OBJDUMP" && OBJDUMP=objdump
4963 test -z "$RANLIB" && RANLIB=:
4964 test -z "$STRIP" && STRIP=:
4965 test -z "$ac_objext" && ac_objext=o
4966
4967 if test x"$host" != x"$build"; then
4968   ac_tool_prefix=${host_alias}-
4969 else
4970   ac_tool_prefix=
4971 fi
4972
4973 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4974 case $host_os in
4975 linux-gnu*) ;;
4976 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4977 esac
4978
4979 case $host_os in
4980 aix3*)
4981   # AIX sometimes has problems with the GCC collect2 program.  For some
4982   # reason, if we set the COLLECT_NAMES environment variable, the problems
4983   # vanish in a puff of smoke.
4984   if test "X${COLLECT_NAMES+set}" != Xset; then
4985     COLLECT_NAMES=
4986     export COLLECT_NAMES
4987   fi
4988   ;;
4989 esac
4990
4991 # Determine commands to create old-style static archives.
4992 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4993 old_postinstall_cmds='chmod 644 $oldlib'
4994 old_postuninstall_cmds=
4995
4996 if test -n "$RANLIB"; then
4997   case $host_os in
4998   openbsd*)
4999     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5000     ;;
5001   *)
5002     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5003     ;;
5004   esac
5005   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5006 fi
5007
5008 # Allow CC to be a program name with arguments.
5009 set dummy $CC
5010 compiler="$2"
5011
5012 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5013 echo "configure:5014: checking for objdir" >&5
5014 rm -f .libs 2>/dev/null
5015 mkdir .libs 2>/dev/null
5016 if test -d .libs; then
5017   objdir=.libs
5018 else
5019   # MS-DOS does not allow filenames that begin with a dot.
5020   objdir=_libs
5021 fi
5022 rmdir .libs 2>/dev/null
5023 echo "$ac_t""$objdir" 1>&6
5024
5025
5026 # Check whether --with-pic or --without-pic was given.
5027 if test "${with_pic+set}" = set; then
5028   withval="$with_pic"
5029   pic_mode="$withval"
5030 else
5031   pic_mode=default
5032 fi
5033
5034 test -z "$pic_mode" && pic_mode=default
5035
5036 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5037 # in isolation, and that seeing it set (from the cache) indicates that
5038 # the associated values are set (in the cache) correctly too.
5039 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5040 echo "configure:5041: checking for $compiler option to produce PIC" >&5
5041 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5042   echo $ac_n "(cached) $ac_c" 1>&6
5043 else
5044    lt_cv_prog_cc_pic=
5045   lt_cv_prog_cc_shlib=
5046   lt_cv_prog_cc_wl=
5047   lt_cv_prog_cc_static=
5048   lt_cv_prog_cc_no_builtin=
5049   lt_cv_prog_cc_can_build_shared=$can_build_shared
5050
5051   if test "$GCC" = yes; then
5052     lt_cv_prog_cc_wl='-Wl,'
5053     lt_cv_prog_cc_static='-static'
5054
5055     case $host_os in
5056     aix*)
5057       # Below there is a dirty hack to force normal static linking with -ldl
5058       # The problem is because libdl dynamically linked with both libc and
5059       # libC (AIX C++ library), which obviously doesn't included in libraries
5060       # list by gcc. This cause undefined symbols with -static flags.
5061       # This hack allows C programs to be linked with "-static -ldl", but
5062       # not sure about C++ programs.
5063       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5064       ;;
5065     amigaos*)
5066       # FIXME: we need at least 68020 code to build shared libraries, but
5067       # adding the `-m68020' flag to GCC prevents building anything better,
5068       # like `-m68040'.
5069       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5070       ;;
5071     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5072       # PIC is the default for these OSes.
5073       ;;
5074     darwin* | rhapsody*)
5075       # PIC is the default on this platform
5076       # Common symbols not allowed in MH_DYLIB files
5077       lt_cv_prog_cc_pic='-fno-common'
5078       ;;
5079     cygwin* | mingw* | pw32* | os2*)
5080       # This hack is so that the source file can tell whether it is being
5081       # built for inclusion in a dll (and should export symbols for example).
5082       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5083       ;;
5084     sysv4*MP*)
5085       if test -d /usr/nec; then
5086          lt_cv_prog_cc_pic=-Kconform_pic
5087       fi
5088       ;;
5089     *)
5090       lt_cv_prog_cc_pic='-fPIC'
5091       ;;
5092     esac
5093   else
5094     # PORTME Check for PIC flags for the system compiler.
5095     case $host_os in
5096     aix3* | aix4* | aix5*)
5097       lt_cv_prog_cc_wl='-Wl,'
5098       # All AIX code is PIC.
5099       if test "$host_cpu" = ia64; then
5100         # AIX 5 now supports IA64 processor
5101         lt_cv_prog_cc_static='-Bstatic'
5102       else
5103         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5104       fi
5105       ;;
5106
5107     hpux9* | hpux10* | hpux11*)
5108       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5109       lt_cv_prog_cc_wl='-Wl,'
5110       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5111       lt_cv_prog_cc_pic='+Z'
5112       ;;
5113
5114     irix5* | irix6* | nonstopux*)
5115       lt_cv_prog_cc_wl='-Wl,'
5116       lt_cv_prog_cc_static='-non_shared'
5117       # PIC (with -KPIC) is the default.
5118       ;;
5119
5120     cygwin* | mingw* | pw32* | os2*)
5121       # This hack is so that the source file can tell whether it is being
5122       # built for inclusion in a dll (and should export symbols for example).
5123       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5124       ;;
5125
5126     newsos6)
5127       lt_cv_prog_cc_pic='-KPIC'
5128       lt_cv_prog_cc_static='-Bstatic'
5129       ;;
5130     
5131     openedition)
5132       # XPLINK code is PIC by default
5133       ;;
5134
5135     osf3* | osf4* | osf5*)
5136       # All OSF/1 code is PIC.
5137       lt_cv_prog_cc_wl='-Wl,'
5138       lt_cv_prog_cc_static='-non_shared'
5139       ;;
5140
5141     sco3.2v5*)
5142       lt_cv_prog_cc_pic='-Kpic'
5143       lt_cv_prog_cc_static='-dn'
5144       lt_cv_prog_cc_shlib='-belf'
5145       ;;
5146
5147     solaris*)
5148       lt_cv_prog_cc_pic='-KPIC'
5149       lt_cv_prog_cc_static='-Bstatic'
5150       lt_cv_prog_cc_wl='-Wl,'
5151       ;;
5152
5153     sunos4*)
5154       lt_cv_prog_cc_pic='-PIC'
5155       lt_cv_prog_cc_static='-Bstatic'
5156       lt_cv_prog_cc_wl='-Qoption ld '
5157       ;;
5158
5159     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5160       lt_cv_prog_cc_pic='-KPIC'
5161       lt_cv_prog_cc_static='-Bstatic'
5162       lt_cv_prog_cc_wl='-Wl,'
5163       ;;
5164
5165     uts4*)
5166       lt_cv_prog_cc_pic='-pic'
5167       lt_cv_prog_cc_static='-Bstatic'
5168       ;;
5169
5170     sysv4*MP*)
5171       if test -d /usr/nec ;then
5172         lt_cv_prog_cc_pic='-Kconform_pic'
5173         lt_cv_prog_cc_static='-Bstatic'
5174       fi
5175       ;;
5176
5177     *)
5178       lt_cv_prog_cc_can_build_shared=no
5179       ;;
5180     esac
5181   fi
5182
5183 fi
5184
5185 if test -z "$lt_cv_prog_cc_pic"; then
5186   echo "$ac_t""none" 1>&6
5187 else
5188   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5189
5190   # Check to make sure the pic_flag actually works.
5191   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5192 echo "configure:5193: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5193   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5194   echo $ac_n "(cached) $ac_c" 1>&6
5195 else
5196       save_CFLAGS="$CFLAGS"
5197     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5198     cat > conftest.$ac_ext <<EOF
5199 #line 5200 "configure"
5200 #include "confdefs.h"
5201
5202 int main() {
5203
5204 ; return 0; }
5205 EOF
5206 if { (eval echo configure:5207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5207   rm -rf conftest*
5208         case $host_os in
5209       hpux9* | hpux10* | hpux11*)
5210         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5211         # they create non-PIC objects.  So, if there were any warnings, we
5212         # assume that PIC is not supported.
5213         if test -s conftest.err; then
5214           lt_cv_prog_cc_pic_works=no
5215         else
5216           lt_cv_prog_cc_pic_works=yes
5217         fi
5218         ;;
5219       *)
5220         lt_cv_prog_cc_pic_works=yes
5221         ;;
5222       esac
5223     
5224 else
5225   echo "configure: failed program was:" >&5
5226   cat conftest.$ac_ext >&5
5227   rm -rf conftest*
5228         lt_cv_prog_cc_pic_works=no
5229     
5230 fi
5231 rm -f conftest*
5232     CFLAGS="$save_CFLAGS"
5233   
5234 fi
5235
5236
5237   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5238     lt_cv_prog_cc_pic=
5239     lt_cv_prog_cc_can_build_shared=no
5240   else
5241     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5242   fi
5243
5244   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5245 fi
5246
5247 # Check for any special shared library compilation flags.
5248 if test -n "$lt_cv_prog_cc_shlib"; then
5249   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5250   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5251   else
5252    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5253     lt_cv_prog_cc_can_build_shared=no
5254   fi
5255 fi
5256
5257 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5258 echo "configure:5259: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5259 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5260   echo $ac_n "(cached) $ac_c" 1>&6
5261 else
5262     lt_cv_prog_cc_static_works=no
5263   save_LDFLAGS="$LDFLAGS"
5264   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5265   cat > conftest.$ac_ext <<EOF
5266 #line 5267 "configure"
5267 #include "confdefs.h"
5268
5269 int main() {
5270
5271 ; return 0; }
5272 EOF
5273 if { (eval echo configure:5274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5274   rm -rf conftest*
5275   lt_cv_prog_cc_static_works=yes
5276 else
5277   echo "configure: failed program was:" >&5
5278   cat conftest.$ac_ext >&5
5279 fi
5280 rm -f conftest*
5281   LDFLAGS="$save_LDFLAGS"
5282
5283 fi
5284
5285
5286 # Belt *and* braces to stop my trousers falling down:
5287 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5288 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5289
5290 pic_flag="$lt_cv_prog_cc_pic"
5291 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5292 wl="$lt_cv_prog_cc_wl"
5293 link_static_flag="$lt_cv_prog_cc_static"
5294 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5295 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5296
5297
5298 # Check to see if options -o and -c are simultaneously supported by compiler
5299 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5300 echo "configure:5301: checking if $compiler supports -c -o file.$ac_objext" >&5
5301 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5302   echo $ac_n "(cached) $ac_c" 1>&6
5303 else
5304   
5305 $rm -r conftest 2>/dev/null
5306 mkdir conftest
5307 cd conftest
5308 echo "int some_variable = 0;" > conftest.$ac_ext
5309 mkdir out
5310 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5311 # that will create temporary files in the current directory regardless of
5312 # the output directory.  Thus, making CWD read-only will cause this test
5313 # to fail, enabling locking or at least warning the user not to do parallel
5314 # builds.
5315 chmod -w .
5316 save_CFLAGS="$CFLAGS"
5317 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5318 compiler_c_o=no
5319 if { (eval echo configure:5320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5320   # The compiler can only warn and ignore the option if not recognized
5321   # So say no if there are warnings
5322   if test -s out/conftest.err; then
5323     lt_cv_compiler_c_o=no
5324   else
5325     lt_cv_compiler_c_o=yes
5326   fi
5327 else
5328   # Append any errors to the config.log.
5329   cat out/conftest.err 1>&5
5330   lt_cv_compiler_c_o=no
5331 fi
5332 CFLAGS="$save_CFLAGS"
5333 chmod u+w .
5334 $rm conftest* out/*
5335 rmdir out
5336 cd ..
5337 rmdir conftest
5338 $rm -r conftest 2>/dev/null
5339
5340 fi
5341
5342 compiler_c_o=$lt_cv_compiler_c_o
5343 echo "$ac_t""$compiler_c_o" 1>&6
5344
5345 if test x"$compiler_c_o" = x"yes"; then
5346   # Check to see if we can write to a .lo
5347   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5348 echo "configure:5349: checking if $compiler supports -c -o file.lo" >&5
5349   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5350   echo $ac_n "(cached) $ac_c" 1>&6
5351 else
5352   
5353   lt_cv_compiler_o_lo=no
5354   save_CFLAGS="$CFLAGS"
5355   CFLAGS="$CFLAGS -c -o conftest.lo"
5356   save_objext="$ac_objext"
5357   ac_objext=lo
5358   cat > conftest.$ac_ext <<EOF
5359 #line 5360 "configure"
5360 #include "confdefs.h"
5361
5362 int main() {
5363 int some_variable = 0;
5364 ; return 0; }
5365 EOF
5366 if { (eval echo configure:5367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5367   rm -rf conftest*
5368       # The compiler can only warn and ignore the option if not recognized
5369     # So say no if there are warnings
5370     if test -s conftest.err; then
5371       lt_cv_compiler_o_lo=no
5372     else
5373       lt_cv_compiler_o_lo=yes
5374     fi
5375   
5376 else
5377   echo "configure: failed program was:" >&5
5378   cat conftest.$ac_ext >&5
5379 fi
5380 rm -f conftest*
5381   ac_objext="$save_objext"
5382   CFLAGS="$save_CFLAGS"
5383   
5384 fi
5385
5386   compiler_o_lo=$lt_cv_compiler_o_lo
5387   echo "$ac_t""$compiler_o_lo" 1>&6
5388 else
5389   compiler_o_lo=no
5390 fi
5391
5392 # Check to see if we can do hard links to lock some files if needed
5393 hard_links="nottested"
5394 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5395   # do not overwrite the value of need_locks provided by the user
5396   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5397 echo "configure:5398: checking if we can lock with hard links" >&5
5398   hard_links=yes
5399   $rm conftest*
5400   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5401   touch conftest.a
5402   ln conftest.a conftest.b 2>&5 || hard_links=no
5403   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5404   echo "$ac_t""$hard_links" 1>&6
5405   if test "$hard_links" = no; then
5406     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5407     need_locks=warn
5408   fi
5409 else
5410   need_locks=no
5411 fi
5412
5413 if test "$GCC" = yes; then
5414   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5415   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5416 echo "configure:5417: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5417   echo "int some_variable = 0;" > conftest.$ac_ext
5418   save_CFLAGS="$CFLAGS"
5419   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5420   compiler_rtti_exceptions=no
5421   cat > conftest.$ac_ext <<EOF
5422 #line 5423 "configure"
5423 #include "confdefs.h"
5424
5425 int main() {
5426 int some_variable = 0;
5427 ; return 0; }
5428 EOF
5429 if { (eval echo configure:5430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5430   rm -rf conftest*
5431       # The compiler can only warn and ignore the option if not recognized
5432     # So say no if there are warnings
5433     if test -s conftest.err; then
5434       compiler_rtti_exceptions=no
5435     else
5436       compiler_rtti_exceptions=yes
5437     fi
5438   
5439 else
5440   echo "configure: failed program was:" >&5
5441   cat conftest.$ac_ext >&5
5442 fi
5443 rm -f conftest*
5444   CFLAGS="$save_CFLAGS"
5445   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5446
5447   if test "$compiler_rtti_exceptions" = "yes"; then
5448     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5449   else
5450     no_builtin_flag=' -fno-builtin'
5451   fi
5452 fi
5453
5454 # See if the linker supports building shared libraries.
5455 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5456 echo "configure:5457: checking whether the linker ($LD) supports shared libraries" >&5
5457
5458 allow_undefined_flag=
5459 no_undefined_flag=
5460 need_lib_prefix=unknown
5461 need_version=unknown
5462 # when you set need_version to no, make sure it does not cause -set_version
5463 # flags to be left without arguments
5464 archive_cmds=
5465 archive_expsym_cmds=
5466 old_archive_from_new_cmds=
5467 old_archive_from_expsyms_cmds=
5468 export_dynamic_flag_spec=
5469 whole_archive_flag_spec=
5470 thread_safe_flag_spec=
5471 hardcode_into_libs=no
5472 hardcode_libdir_flag_spec=
5473 hardcode_libdir_separator=
5474 hardcode_direct=no
5475 hardcode_minus_L=no
5476 hardcode_shlibpath_var=unsupported
5477 runpath_var=
5478 link_all_deplibs=unknown
5479 always_export_symbols=no
5480 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5481 # include_expsyms should be a list of space-separated symbols to be *always*
5482 # included in the symbol list
5483 include_expsyms=
5484 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5485 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5486 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5487 # as well as any symbol that contains `d'.
5488 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5489 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5490 # platforms (ab)use it in PIC code, but their linkers get confused if
5491 # the symbol is explicitly referenced.  Since portable code cannot
5492 # rely on this symbol name, it's probably fine to never include it in
5493 # preloaded symbol tables.
5494 extract_expsyms_cmds=
5495
5496 case $host_os in
5497 cygwin* | mingw* | pw32*)
5498   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5499   # When not using gcc, we currently assume that we are using
5500   # Microsoft Visual C++.
5501   if test "$GCC" != yes; then
5502     with_gnu_ld=no
5503   fi
5504   ;;
5505 openbsd*)
5506   with_gnu_ld=no
5507   ;;
5508 esac
5509
5510 ld_shlibs=yes
5511 if test "$with_gnu_ld" = yes; then
5512   # If archive_cmds runs LD, not CC, wlarc should be empty
5513   wlarc='${wl}'
5514
5515   # See if GNU ld supports shared libraries.
5516   case $host_os in
5517   aix3* | aix4* | aix5*)
5518     # On AIX, the GNU linker is very broken
5519     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5520     ld_shlibs=no
5521     cat <<EOF 1>&2
5522
5523 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5524 *** to be unable to reliably create shared libraries on AIX.
5525 *** Therefore, libtool is disabling shared libraries support.  If you
5526 *** really care for shared libraries, you may want to modify your PATH
5527 *** so that a non-GNU linker is found, and then restart.
5528
5529 EOF
5530     ;;
5531
5532   amigaos*)
5533     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)'
5534     hardcode_libdir_flag_spec='-L$libdir'
5535     hardcode_minus_L=yes
5536
5537     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5538     # that the semantics of dynamic libraries on AmigaOS, at least up
5539     # to version 4, is to share data among multiple programs linked
5540     # with the same dynamic library.  Since this doesn't match the
5541     # behavior of shared libraries on other platforms, we can use
5542     # them.
5543     ld_shlibs=no
5544     ;;
5545
5546   beos*)
5547     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5548       allow_undefined_flag=unsupported
5549       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5550       # support --undefined.  This deserves some investigation.  FIXME
5551       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5552     else
5553       ld_shlibs=no
5554     fi
5555     ;;
5556
5557   cygwin* | mingw* | pw32*)
5558     # hardcode_libdir_flag_spec is actually meaningless, as there is
5559     # no search path for DLLs.
5560     hardcode_libdir_flag_spec='-L$libdir'
5561     allow_undefined_flag=unsupported
5562     always_export_symbols=yes
5563
5564     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5565       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5566       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5567       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5568       else $CC -o impgen impgen.c ; fi)~
5569       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5570
5571     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5572
5573     # cygwin and mingw dlls have different entry points and sets of symbols
5574     # to exclude.
5575     # FIXME: what about values for MSVC?
5576     dll_entry=__cygwin_dll_entry@12
5577     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5578     case $host_os in
5579     mingw*)
5580       # mingw values
5581       dll_entry=_DllMainCRTStartup@12
5582       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5583       ;;
5584     esac
5585
5586     # mingw and cygwin differ, and it's simplest to just exclude the union
5587     # of the two symbol sets.
5588     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5589
5590     # recent cygwin and mingw systems supply a stub DllMain which the user
5591     # can override, but on older systems we have to supply one (in ltdll.c)
5592     if test "x$lt_cv_need_dllmain" = "xyes"; then
5593       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5594       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~
5595         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5596     else
5597       ltdll_obj=
5598       ltdll_cmds=
5599     fi
5600
5601     # Extract the symbol export list from an `--export-all' def file,
5602     # then regenerate the def file from the symbol export list, so that
5603     # the compiled dll only exports the symbol export list.
5604     # Be careful not to strip the DATA tag left be newer dlltools.
5605     export_symbols_cmds="$ltdll_cmds"'
5606       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5607       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5608
5609     # If the export-symbols file already is a .def file (1st line
5610     # is EXPORTS), use it as is.
5611     # If DATA tags from a recent dlltool are present, honour them!
5612     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5613         cp $export_symbols $output_objdir/$soname-def;
5614       else
5615         echo EXPORTS > $output_objdir/$soname-def;
5616         _lt_hint=1;
5617         cat $export_symbols | while read symbol; do
5618          set dummy \$symbol;
5619          case \$# in
5620            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5621            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5622            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5623          esac;
5624          _lt_hint=`expr 1 + \$_lt_hint`;
5625         done;
5626       fi~
5627       '"$ltdll_cmds"'
5628       $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~
5629       $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~
5630       $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~
5631       $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~
5632       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5633     ;;
5634
5635   netbsd*)
5636     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5637       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5638       wlarc=
5639     else
5640       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5641       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5642     fi
5643     ;;
5644
5645   solaris* | sysv5*)
5646     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5647       ld_shlibs=no
5648       cat <<EOF 1>&2
5649
5650 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5651 *** create shared libraries on Solaris systems.  Therefore, libtool
5652 *** is disabling shared libraries support.  We urge you to upgrade GNU
5653 *** binutils to release 2.9.1 or newer.  Another option is to modify
5654 *** your PATH or compiler configuration so that the native linker is
5655 *** used, and then restart.
5656
5657 EOF
5658     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5659       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5660       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5661     else
5662       ld_shlibs=no
5663     fi
5664     ;;
5665
5666   sunos4*)
5667     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5668     wlarc=
5669     hardcode_direct=yes
5670     hardcode_shlibpath_var=no
5671     ;;
5672
5673   *)
5674     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5675       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5676       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5677     else
5678       ld_shlibs=no
5679     fi
5680     ;;
5681   esac
5682
5683   if test "$ld_shlibs" = yes; then
5684     runpath_var=LD_RUN_PATH
5685     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5686     export_dynamic_flag_spec='${wl}--export-dynamic'
5687     case $host_os in
5688     cygwin* | mingw* | pw32*)
5689       # dlltool doesn't understand --whole-archive et. al.
5690       whole_archive_flag_spec=
5691       ;;
5692     *)
5693       # ancient GNU ld didn't support --whole-archive et. al.
5694       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5695         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5696       else
5697         whole_archive_flag_spec=
5698       fi
5699       ;;
5700     esac
5701   fi
5702 else
5703   # PORTME fill in a description of your system's linker (not GNU ld)
5704   case $host_os in
5705   aix3*)
5706     allow_undefined_flag=unsupported
5707     always_export_symbols=yes
5708     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'
5709     # Note: this linker hardcodes the directories in LIBPATH if there
5710     # are no directories specified by -L.
5711     hardcode_minus_L=yes
5712     if test "$GCC" = yes && test -z "$link_static_flag"; then
5713       # Neither direct hardcoding nor static linking is supported with a
5714       # broken collect2.
5715       hardcode_direct=unsupported
5716     fi
5717     ;;
5718
5719   aix4* | aix5*)
5720     if test "$host_cpu" = ia64; then
5721       # On IA64, the linker does run time linking by default, so we don't
5722       # have to do anything special.
5723       aix_use_runtimelinking=no
5724       exp_sym_flag='-Bexport'
5725       no_entry_flag=""
5726     else
5727       aix_use_runtimelinking=no
5728
5729       # Test if we are trying to use run time linking or normal
5730       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5731       # need to do runtime linking.
5732       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5733         for ld_flag in $LDFLAGS; do
5734           case $ld_flag in
5735           *-brtl*)
5736             aix_use_runtimelinking=yes
5737             break
5738           ;;
5739           esac
5740         done
5741       esac
5742
5743       exp_sym_flag='-bexport'
5744       no_entry_flag='-bnoentry'
5745     fi
5746
5747     # When large executables or shared objects are built, AIX ld can
5748     # have problems creating the table of contents.  If linking a library
5749     # or program results in "error TOC overflow" add -mminimal-toc to
5750     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5751     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5752
5753     hardcode_direct=yes
5754     archive_cmds=''
5755     hardcode_libdir_separator=':'
5756     if test "$GCC" = yes; then
5757       case $host_os in aix4.[012]|aix4.[012].*)
5758         collect2name=`${CC} -print-prog-name=collect2`
5759         if test -f "$collect2name" && \
5760           strings "$collect2name" | grep resolve_lib_name >/dev/null
5761         then
5762           # We have reworked collect2
5763           hardcode_direct=yes
5764         else
5765           # We have old collect2
5766           hardcode_direct=unsupported
5767           # It fails to find uninstalled libraries when the uninstalled
5768           # path is not listed in the libpath.  Setting hardcode_minus_L
5769           # to unsupported forces relinking
5770           hardcode_minus_L=yes
5771           hardcode_libdir_flag_spec='-L$libdir'
5772           hardcode_libdir_separator=
5773         fi
5774       esac
5775
5776       shared_flag='-shared'
5777     else
5778       # not using gcc
5779       if test "$host_cpu" = ia64; then
5780         shared_flag='${wl}-G'
5781       else
5782         if test "$aix_use_runtimelinking" = yes; then
5783           shared_flag='${wl}-G'
5784         else
5785           shared_flag='${wl}-bM:SRE'
5786         fi
5787       fi
5788     fi
5789
5790     # It seems that -bexpall can do strange things, so it is better to
5791     # generate a list of symbols to export.
5792     always_export_symbols=yes
5793     if test "$aix_use_runtimelinking" = yes; then
5794       # Warning - without using the other runtime loading flags (-brtl),
5795       # -berok will link without error, but may produce a broken library.
5796       allow_undefined_flag='-berok'
5797       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5798       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"
5799     else
5800       if test "$host_cpu" = ia64; then
5801         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5802         allow_undefined_flag="-z nodefs"
5803         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"
5804       else
5805         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5806         # Warning - without using the other run time loading flags,
5807         # -berok will link without error, but may produce a broken library.
5808         allow_undefined_flag='${wl}-berok'
5809         # This is a bit strange, but is similar to how AIX traditionally builds
5810         # it's shared libraries.
5811         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'
5812       fi
5813     fi
5814     ;;
5815
5816   amigaos*)
5817     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)'
5818     hardcode_libdir_flag_spec='-L$libdir'
5819     hardcode_minus_L=yes
5820     # see comment about different semantics on the GNU ld section
5821     ld_shlibs=no
5822     ;;
5823
5824   cygwin* | mingw* | pw32*)
5825     # When not using gcc, we currently assume that we are using
5826     # Microsoft Visual C++.
5827     # hardcode_libdir_flag_spec is actually meaningless, as there is
5828     # no search path for DLLs.
5829     hardcode_libdir_flag_spec=' '
5830     allow_undefined_flag=unsupported
5831     # Tell ltmain to make .lib files, not .a files.
5832     libext=lib
5833     # FIXME: Setting linknames here is a bad hack.
5834     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5835     # The linker will automatically build a .lib file if we build a DLL.
5836     old_archive_from_new_cmds='true'
5837     # FIXME: Should let the user specify the lib program.
5838     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5839     fix_srcfile_path='`cygpath -w "$srcfile"`'
5840     ;;
5841
5842   darwin* | rhapsody*)
5843     case "$host_os" in
5844     rhapsody* | darwin1.[012])
5845       allow_undefined_flag='-undefined suppress'
5846       ;;
5847     *) # Darwin 1.3 on
5848       allow_undefined_flag='-flat_namespace -undefined suppress'
5849       ;;
5850     esac
5851     # FIXME: Relying on posixy $() will cause problems for
5852     #        cross-compilation, but unfortunately the echo tests do not
5853     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5854     #        `"' quotes if we put them in here... so don't!
5855     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)'
5856     # We need to add '_' to the symbols in $export_symbols first
5857     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5858     hardcode_direct=yes
5859     hardcode_shlibpath_var=no
5860     whole_archive_flag_spec='-all_load $convenience'
5861     ;;
5862
5863   freebsd1*)
5864     ld_shlibs=no
5865     ;;
5866
5867   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5868   # support.  Future versions do this automatically, but an explicit c++rt0.o
5869   # does not break anything, and helps significantly (at the cost of a little
5870   # extra space).
5871   freebsd2.2*)
5872     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5873     hardcode_libdir_flag_spec='-R$libdir'
5874     hardcode_direct=yes
5875     hardcode_shlibpath_var=no
5876     ;;
5877
5878   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5879   freebsd2*)
5880     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5881     hardcode_direct=yes
5882     hardcode_minus_L=yes
5883     hardcode_shlibpath_var=no
5884     ;;
5885
5886   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5887   freebsd*)
5888     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5889     hardcode_libdir_flag_spec='-R$libdir'
5890     hardcode_direct=yes
5891     hardcode_shlibpath_var=no
5892     ;;
5893
5894   hpux9* | hpux10* | hpux11*)
5895     case $host_os in
5896     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' ;;
5897     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5898     esac
5899     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5900     hardcode_libdir_separator=:
5901     hardcode_direct=yes
5902     hardcode_minus_L=yes # Not in the search PATH, but as the default
5903                          # location of the library.
5904     export_dynamic_flag_spec='${wl}-E'
5905     ;;
5906
5907   irix5* | irix6* | nonstopux*)
5908     if test "$GCC" = yes; then
5909       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'
5910       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5911     else
5912       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'
5913       hardcode_libdir_flag_spec='-rpath $libdir'
5914     fi
5915     hardcode_libdir_separator=:
5916     link_all_deplibs=yes
5917     ;;
5918
5919   netbsd*)
5920     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5921       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5922     else
5923       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5924     fi
5925     hardcode_libdir_flag_spec='-R$libdir'
5926     hardcode_direct=yes
5927     hardcode_shlibpath_var=no
5928     ;;
5929
5930   newsos6)
5931     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5932     hardcode_direct=yes
5933     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5934     hardcode_libdir_separator=:
5935     hardcode_shlibpath_var=no
5936     ;;
5937
5938   openbsd*)
5939     hardcode_direct=yes
5940     hardcode_shlibpath_var=no
5941     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5942       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5943       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5944       export_dynamic_flag_spec='${wl}-E'
5945     else
5946       case "$host_os" in
5947       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5948         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5949         hardcode_libdir_flag_spec='-R$libdir'
5950         ;;
5951       *)
5952         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5953         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5954         ;;
5955       esac
5956     fi
5957     ;;
5958
5959   openedition*)
5960     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5961         cp \$linknames \$output_objdir && linknames=''"
5962     export_dynamic_flag_spec="-Wl,DLL"
5963     ;;
5964
5965   os2*)
5966     hardcode_libdir_flag_spec='-L$libdir'
5967     hardcode_minus_L=yes
5968     allow_undefined_flag=unsupported
5969     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'
5970     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5971     ;;
5972
5973   osf3*)
5974     if test "$GCC" = yes; then
5975       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5976       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'
5977     else
5978       allow_undefined_flag=' -expect_unresolved \*'
5979       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'
5980     fi
5981     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5982     hardcode_libdir_separator=:
5983     ;;
5984
5985   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5986     if test "$GCC" = yes; then
5987       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5988       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'
5989       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5990     else
5991       allow_undefined_flag=' -expect_unresolved \*'
5992       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'
5993       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5994       $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'
5995
5996       #Both c and cxx compiler support -rpath directly
5997       hardcode_libdir_flag_spec='-rpath $libdir'
5998     fi
5999     hardcode_libdir_separator=:
6000     ;;
6001
6002   sco3.2v5*)
6003     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6004     hardcode_shlibpath_var=no
6005     runpath_var=LD_RUN_PATH
6006     hardcode_runpath_var=yes
6007     export_dynamic_flag_spec='${wl}-Bexport'
6008     ;;
6009
6010   solaris*)
6011     # gcc --version < 3.0 without binutils cannot create self contained
6012     # shared libraries reliably, requiring libgcc.a to resolve some of
6013     # the object symbols generated in some cases.  Libraries that use
6014     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6015     # a copy of libgcc.a into every shared library to guarantee resolving
6016     # such symbols causes other problems:  According to Tim Van Holder
6017     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6018     # (to the application) exception stack for one thing.
6019     no_undefined_flag=' -z defs'
6020     if test "$GCC" = yes; then
6021       case `$CC --version 2>/dev/null` in
6022       [12].*)
6023         cat <<EOF 1>&2
6024
6025 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6026 *** create self contained shared libraries on Solaris systems, without
6027 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6028 *** -no-undefined support, which will at least allow you to build shared
6029 *** libraries.  However, you may find that when you link such libraries
6030 *** into an application without using GCC, you have to manually add
6031 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6032 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6033 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6034
6035 EOF
6036         no_undefined_flag=
6037         ;;
6038       esac
6039     fi
6040     # $CC -shared without GNU ld will not create a library from C++
6041     # object files and a static libstdc++, better avoid it by now
6042     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6043     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6044                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6045     hardcode_libdir_flag_spec='-R$libdir'
6046     hardcode_shlibpath_var=no
6047     case $host_os in
6048     solaris2.[0-5] | solaris2.[0-5].*) ;;
6049     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6050       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6051     esac
6052     link_all_deplibs=yes
6053     ;;
6054
6055   sunos4*)
6056     if test "x$host_vendor" = xsequent; then
6057       # Use $CC to link under sequent, because it throws in some extra .o
6058       # files that make .init and .fini sections work.
6059       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6060     else
6061       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6062     fi
6063     hardcode_libdir_flag_spec='-L$libdir'
6064     hardcode_direct=yes
6065     hardcode_minus_L=yes
6066     hardcode_shlibpath_var=no
6067     ;;
6068
6069   sysv4)
6070     case $host_vendor in
6071       sni)
6072         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6073         hardcode_direct=yes # is this really true???
6074         ;;
6075       siemens)
6076         ## LD is ld it makes a PLAMLIB
6077         ## CC just makes a GrossModule.
6078         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6079         reload_cmds='$CC -r -o $output$reload_objs'
6080         hardcode_direct=no
6081         ;;
6082       motorola)
6083         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6084         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6085         ;;
6086     esac
6087     runpath_var='LD_RUN_PATH'
6088     hardcode_shlibpath_var=no
6089     ;;
6090
6091   sysv4.3*)
6092     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6093     hardcode_shlibpath_var=no
6094     export_dynamic_flag_spec='-Bexport'
6095     ;;
6096
6097   sysv5*)
6098     no_undefined_flag=' -z text'
6099     # $CC -shared without GNU ld will not create a library from C++
6100     # object files and a static libstdc++, better avoid it by now
6101     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6102     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6103                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6104     hardcode_libdir_flag_spec=
6105     hardcode_shlibpath_var=no
6106     runpath_var='LD_RUN_PATH'
6107     ;;
6108
6109   uts4*)
6110     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6111     hardcode_libdir_flag_spec='-L$libdir'
6112     hardcode_shlibpath_var=no
6113     ;;
6114
6115   dgux*)
6116     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6117     hardcode_libdir_flag_spec='-L$libdir'
6118     hardcode_shlibpath_var=no
6119     ;;
6120
6121   sysv4*MP*)
6122     if test -d /usr/nec; then
6123       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6124       hardcode_shlibpath_var=no
6125       runpath_var=LD_RUN_PATH
6126       hardcode_runpath_var=yes
6127       ld_shlibs=yes
6128     fi
6129     ;;
6130
6131   sysv4.2uw2*)
6132     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6133     hardcode_direct=yes
6134     hardcode_minus_L=no
6135     hardcode_shlibpath_var=no
6136     hardcode_runpath_var=yes
6137     runpath_var=LD_RUN_PATH
6138     ;;
6139
6140   sysv5uw7* | unixware7*)
6141     no_undefined_flag='${wl}-z ${wl}text'
6142     if test "$GCC" = yes; then
6143       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6144     else
6145       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6146     fi
6147     runpath_var='LD_RUN_PATH'
6148     hardcode_shlibpath_var=no
6149     ;;
6150
6151   *)
6152     ld_shlibs=no
6153     ;;
6154   esac
6155 fi
6156 echo "$ac_t""$ld_shlibs" 1>&6
6157 test "$ld_shlibs" = no && can_build_shared=no
6158
6159 # Check hardcoding attributes.
6160 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6161 echo "configure:6162: checking how to hardcode library paths into programs" >&5
6162 hardcode_action=
6163 if test -n "$hardcode_libdir_flag_spec" || \
6164    test -n "$runpath_var"; then
6165
6166   # We can hardcode non-existant directories.
6167   if test "$hardcode_direct" != no &&
6168      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6169      # have to relink, otherwise we might link with an installed library
6170      # when we should be linking with a yet-to-be-installed one
6171      ## test "$hardcode_shlibpath_var" != no &&
6172      test "$hardcode_minus_L" != no; then
6173     # Linking always hardcodes the temporary library directory.
6174     hardcode_action=relink
6175   else
6176     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6177     hardcode_action=immediate
6178   fi
6179 else
6180   # We cannot hardcode anything, or else we can only hardcode existing
6181   # directories.
6182   hardcode_action=unsupported
6183 fi
6184 echo "$ac_t""$hardcode_action" 1>&6
6185
6186 striplib=
6187 old_striplib=
6188 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6189 echo "configure:6190: checking whether stripping libraries is possible" >&5
6190 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6191   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6192   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6193   echo "$ac_t""yes" 1>&6
6194 else
6195   echo "$ac_t""no" 1>&6
6196 fi
6197
6198 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6199 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6200
6201 # PORTME Fill in your ld.so characteristics
6202 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6203 echo "configure:6204: checking dynamic linker characteristics" >&5
6204 library_names_spec=
6205 libname_spec='lib$name'
6206 soname_spec=
6207 postinstall_cmds=
6208 postuninstall_cmds=
6209 finish_cmds=
6210 finish_eval=
6211 shlibpath_var=
6212 shlibpath_overrides_runpath=unknown
6213 version_type=none
6214 dynamic_linker="$host_os ld.so"
6215 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6216 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6217
6218 case $host_os in
6219 aix3*)
6220   version_type=linux
6221   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6222   shlibpath_var=LIBPATH
6223
6224   # AIX has no versioning support, so we append a major version to the name.
6225   soname_spec='${libname}${release}.so$major'
6226   ;;
6227
6228 aix4* | aix5*)
6229   version_type=linux
6230   need_lib_prefix=no
6231   need_version=no
6232   hardcode_into_libs=yes
6233   if test "$host_cpu" = ia64; then
6234     # AIX 5 supports IA64
6235     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6236     shlibpath_var=LD_LIBRARY_PATH
6237   else
6238     # With GCC up to 2.95.x, collect2 would create an import file
6239     # for dependence libraries.  The import file would start with
6240     # the line `#! .'.  This would cause the generated library to
6241     # depend on `.', always an invalid library.  This was fixed in
6242     # development snapshots of GCC prior to 3.0.
6243     case $host_os in
6244       aix4 | aix4.[01] | aix4.[01].*)
6245         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6246              echo ' yes '
6247              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6248           :
6249         else
6250           can_build_shared=no
6251         fi
6252         ;;
6253     esac
6254     # AIX (on Power*) has no versioning support, so currently we can
6255     # not hardcode correct soname into executable. Probably we can
6256     # add versioning support to collect2, so additional links can
6257     # be useful in future.
6258     if test "$aix_use_runtimelinking" = yes; then
6259       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6260       # instead of lib<name>.a to let people know that these are not
6261       # typical AIX shared libraries.
6262       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6263     else
6264       # We preserve .a as extension for shared libraries through AIX4.2
6265       # and later when we are not doing run time linking.
6266       library_names_spec='${libname}${release}.a $libname.a'
6267       soname_spec='${libname}${release}.so$major'
6268     fi
6269     shlibpath_var=LIBPATH
6270   fi
6271   hardcode_into_libs=yes
6272   ;;
6273
6274 amigaos*)
6275   library_names_spec='$libname.ixlibrary $libname.a'
6276   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6277   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'
6278   ;;
6279
6280 beos*)
6281   library_names_spec='${libname}.so'
6282   dynamic_linker="$host_os ld.so"
6283   shlibpath_var=LIBRARY_PATH
6284   ;;
6285
6286 bsdi4*)
6287   version_type=linux
6288   need_version=no
6289   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6290   soname_spec='${libname}${release}.so$major'
6291   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6292   shlibpath_var=LD_LIBRARY_PATH
6293   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6294   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6295   export_dynamic_flag_spec=-rdynamic
6296   # the default ld.so.conf also contains /usr/contrib/lib and
6297   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6298   # libtool to hard-code these into programs
6299   ;;
6300
6301 cygwin* | mingw* | pw32*)
6302   version_type=windows
6303   need_version=no
6304   need_lib_prefix=no
6305   case $GCC,$host_os in
6306   yes,cygwin*)
6307     library_names_spec='$libname.dll.a'
6308     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6309     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6310       dldir=$destdir/`dirname \$dlpath`~
6311       test -d \$dldir || mkdir -p \$dldir~
6312       $install_prog .libs/$dlname \$dldir/$dlname'
6313     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6314       dlpath=$dir/\$dldll~
6315        $rm \$dlpath'
6316     ;;
6317   yes,mingw*)
6318     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6319     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6320     ;;
6321   yes,pw32*)
6322     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6323     ;;
6324   *)
6325     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6326     ;;
6327   esac
6328   dynamic_linker='Win32 ld.exe'
6329   # FIXME: first we should search . and the directory the executable is in
6330   shlibpath_var=PATH
6331   ;;
6332
6333 darwin* | rhapsody*)
6334   dynamic_linker="$host_os dyld"
6335   version_type=darwin
6336   need_lib_prefix=no
6337   need_version=no
6338   # FIXME: Relying on posixy $() will cause problems for
6339   #        cross-compilation, but unfortunately the echo tests do not
6340   #        yet detect zsh echo's removal of \ escapes.
6341   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)'
6342   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6343   shlibpath_overrides_runpath=yes
6344   shlibpath_var=DYLD_LIBRARY_PATH
6345   ;;
6346
6347 freebsd1*)
6348   dynamic_linker=no
6349   ;;
6350
6351 freebsd*)
6352   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6353   version_type=freebsd-$objformat
6354   case $version_type in
6355     freebsd-elf*)
6356       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6357       need_version=no
6358       need_lib_prefix=no
6359       ;;
6360     freebsd-*)
6361       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6362       need_version=yes
6363       ;;
6364   esac
6365   shlibpath_var=LD_LIBRARY_PATH
6366   case $host_os in
6367   freebsd2*)
6368     shlibpath_overrides_runpath=yes
6369     ;;
6370   *)
6371     shlibpath_overrides_runpath=no
6372     hardcode_into_libs=yes
6373     ;;
6374   esac
6375   ;;
6376
6377 gnu*)
6378   version_type=linux
6379   need_lib_prefix=no
6380   need_version=no
6381   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6382   soname_spec='${libname}${release}.so$major'
6383   shlibpath_var=LD_LIBRARY_PATH
6384   hardcode_into_libs=yes
6385   ;;
6386
6387 hpux9* | hpux10* | hpux11*)
6388   # Give a soname corresponding to the major version so that dld.sl refuses to
6389   # link against other versions.
6390   dynamic_linker="$host_os dld.sl"
6391   version_type=sunos
6392   need_lib_prefix=no
6393   need_version=no
6394   shlibpath_var=SHLIB_PATH
6395   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6396   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6397   soname_spec='${libname}${release}.sl$major'
6398   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6399   postinstall_cmds='chmod 555 $lib'
6400   ;;
6401
6402 irix5* | irix6* | nonstopux*)
6403   case $host_os in
6404     nonstopux*) version_type=nonstopux ;;
6405     *)          version_type=irix ;;
6406   esac
6407   need_lib_prefix=no
6408   need_version=no
6409   soname_spec='${libname}${release}.so$major'
6410   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6411   case $host_os in
6412   irix5* | nonstopux*)
6413     libsuff= shlibsuff=
6414     ;;
6415   *)
6416     case $LD in # libtool.m4 will add one of these switches to LD
6417     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6418     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6419     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6420     *) libsuff= shlibsuff= libmagic=never-match;;
6421     esac
6422     ;;
6423   esac
6424   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6425   shlibpath_overrides_runpath=no
6426   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6427   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6428   ;;
6429
6430 # No shared lib support for Linux oldld, aout, or coff.
6431 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6432   dynamic_linker=no
6433   ;;
6434
6435 # This must be Linux ELF.
6436 linux-gnu*)
6437   version_type=linux
6438   need_lib_prefix=no
6439   need_version=no
6440   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6441   soname_spec='${libname}${release}.so$major'
6442   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6443   shlibpath_var=LD_LIBRARY_PATH
6444   shlibpath_overrides_runpath=no
6445   # This implies no fast_install, which is unacceptable.
6446   # Some rework will be needed to allow for fast_install
6447   # before this can be enabled.
6448   hardcode_into_libs=yes
6449
6450   # We used to test for /lib/ld.so.1 and disable shared libraries on
6451   # powerpc, because MkLinux only supported shared libraries with the
6452   # GNU dynamic linker.  Since this was broken with cross compilers,
6453   # most powerpc-linux boxes support dynamic linking these days and
6454   # people can always --disable-shared, the test was removed, and we
6455   # assume the GNU/Linux dynamic linker is in use.
6456   dynamic_linker='GNU/Linux ld.so'
6457   ;;
6458
6459 netbsd*)
6460   version_type=sunos
6461   need_lib_prefix=no
6462   need_version=no
6463   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6464     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6465     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6466     dynamic_linker='NetBSD (a.out) ld.so'
6467   else
6468     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6469     soname_spec='${libname}${release}.so$major'
6470     dynamic_linker='NetBSD ld.elf_so'
6471   fi
6472   shlibpath_var=LD_LIBRARY_PATH
6473   shlibpath_overrides_runpath=yes
6474   hardcode_into_libs=yes
6475   ;;
6476
6477 newsos6)
6478   version_type=linux
6479   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6480   shlibpath_var=LD_LIBRARY_PATH
6481   shlibpath_overrides_runpath=yes
6482   ;;
6483
6484 openbsd*)
6485   version_type=sunos
6486   need_lib_prefix=no
6487   need_version=no
6488   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6489     case "$host_os" in
6490     openbsd2.[89] | openbsd2.[89].*)
6491       shlibpath_overrides_runpath=no
6492       ;;
6493     *)
6494       shlibpath_overrides_runpath=yes
6495       ;;
6496     esac
6497   else
6498     shlibpath_overrides_runpath=yes
6499   fi
6500   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6501   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6502   shlibpath_var=LD_LIBRARY_PATH
6503   ;;
6504
6505 openedition*)
6506   need_lib_prefix=no
6507   need_version=no
6508   shlibpath_overrides_runpath=yes
6509   shlibpath_var=LIBPATH
6510   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6511   # the library's exports are in libname.x; this is the file that must
6512   # actually be linked with to use a DLL.
6513   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6514   ;;
6515
6516 os2*)
6517   libname_spec='$name'
6518   need_lib_prefix=no
6519   library_names_spec='$libname.dll $libname.a'
6520   dynamic_linker='OS/2 ld.exe'
6521   shlibpath_var=LIBPATH
6522   ;;
6523
6524 osf3* | osf4* | osf5*)
6525   version_type=osf
6526   need_version=no
6527   soname_spec='${libname}${release}.so$major'
6528   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6529   shlibpath_var=LD_LIBRARY_PATH
6530   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6531   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6532   hardcode_into_libs=yes
6533   ;;
6534
6535 sco3.2v5*)
6536   version_type=osf
6537   soname_spec='${libname}${release}.so$major'
6538   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6539   shlibpath_var=LD_LIBRARY_PATH
6540   ;;
6541
6542 solaris*)
6543   version_type=linux
6544   need_lib_prefix=no
6545   need_version=no
6546   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6547   soname_spec='${libname}${release}.so$major'
6548   shlibpath_var=LD_LIBRARY_PATH
6549   shlibpath_overrides_runpath=yes
6550   hardcode_into_libs=yes
6551   # ldd complains unless libraries are executable
6552   postinstall_cmds='chmod +x $lib'
6553   ;;
6554
6555 sunos4*)
6556   version_type=sunos
6557   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6558   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6559   shlibpath_var=LD_LIBRARY_PATH
6560   shlibpath_overrides_runpath=yes
6561   if test "$with_gnu_ld" = yes; then
6562     need_lib_prefix=no
6563   fi
6564   need_version=yes
6565   ;;
6566
6567 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
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   case $host_vendor in
6573     sni)
6574       shlibpath_overrides_runpath=no
6575       need_lib_prefix=no
6576       export_dynamic_flag_spec='${wl}-Blargedynsym'
6577       runpath_var=LD_RUN_PATH
6578       ;;
6579     siemens)
6580       need_lib_prefix=no
6581       ;;
6582     motorola)
6583       need_lib_prefix=no
6584       need_version=no
6585       shlibpath_overrides_runpath=no
6586       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6587       ;;
6588   esac
6589   ;;
6590
6591 uts4*)
6592   version_type=linux
6593   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6594   soname_spec='${libname}${release}.so$major'
6595   shlibpath_var=LD_LIBRARY_PATH
6596   ;;
6597
6598 dgux*)
6599   version_type=linux
6600   need_lib_prefix=no
6601   need_version=no
6602   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6603   soname_spec='${libname}${release}.so$major'
6604   shlibpath_var=LD_LIBRARY_PATH
6605   ;;
6606
6607 sysv4*MP*)
6608   if test -d /usr/nec ;then
6609     version_type=linux
6610     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6611     soname_spec='$libname.so.$major'
6612     shlibpath_var=LD_LIBRARY_PATH
6613   fi
6614   ;;
6615
6616 *)
6617   dynamic_linker=no
6618   ;;
6619 esac
6620 echo "$ac_t""$dynamic_linker" 1>&6
6621 test "$dynamic_linker" = no && can_build_shared=no
6622
6623 # Report the final consequences.
6624 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6625 echo "configure:6626: checking if libtool supports shared libraries" >&5
6626 echo "$ac_t""$can_build_shared" 1>&6
6627
6628 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6629 echo "configure:6630: checking whether to build shared libraries" >&5
6630 test "$can_build_shared" = "no" && enable_shared=no
6631
6632 # On AIX, shared libraries and static libraries use the same namespace, and
6633 # are all built from PIC.
6634 case "$host_os" in
6635 aix3*)
6636   test "$enable_shared" = yes && enable_static=no
6637   if test -n "$RANLIB"; then
6638     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6639     postinstall_cmds='$RANLIB $lib'
6640   fi
6641   ;;
6642
6643 aix4*)
6644   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6645     test "$enable_shared" = yes && enable_static=no
6646   fi
6647   ;;
6648 esac
6649 echo "$ac_t""$enable_shared" 1>&6
6650
6651 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6652 echo "configure:6653: checking whether to build static libraries" >&5
6653 # Make sure either enable_shared or enable_static is yes.
6654 test "$enable_shared" = yes || enable_static=yes
6655 echo "$ac_t""$enable_static" 1>&6
6656
6657 if test "$hardcode_action" = relink; then
6658   # Fast installation is not supported
6659   enable_fast_install=no
6660 elif test "$shlibpath_overrides_runpath" = yes ||
6661      test "$enable_shared" = no; then
6662   # Fast installation is not necessary
6663   enable_fast_install=needless
6664 fi
6665
6666 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6667 if test "$GCC" = yes; then
6668   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6669 fi
6670
6671 if test "x$enable_dlopen" != xyes; then
6672   enable_dlopen=unknown
6673   enable_dlopen_self=unknown
6674   enable_dlopen_self_static=unknown
6675 else
6676   lt_cv_dlopen=no
6677   lt_cv_dlopen_libs=
6678
6679   case $host_os in
6680   beos*)
6681     lt_cv_dlopen="load_add_on"
6682     lt_cv_dlopen_libs=
6683     lt_cv_dlopen_self=yes
6684     ;;
6685
6686   cygwin* | mingw* | pw32*)
6687     lt_cv_dlopen="LoadLibrary"
6688     lt_cv_dlopen_libs=
6689    ;;
6690
6691   *)
6692     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6693 echo "configure:6694: checking for dllload" >&5
6694 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6695   echo $ac_n "(cached) $ac_c" 1>&6
6696 else
6697   cat > conftest.$ac_ext <<EOF
6698 #line 6699 "configure"
6699 #include "confdefs.h"
6700 /* System header to define __stub macros and hopefully few prototypes,
6701     which can conflict with char dllload(); below.  */
6702 #include <assert.h>
6703 /* Override any gcc2 internal prototype to avoid an error.  */
6704 /* We use char because int might match the return type of a gcc2
6705     builtin and then its argument prototype would still apply.  */
6706 char dllload();
6707 char (*f)();
6708
6709 int main() {
6710
6711 /* The GNU C library defines this for functions which it implements
6712     to always fail with ENOSYS.  Some functions are actually named
6713     something starting with __ and the normal name is an alias.  */
6714 #if defined (__stub_dllload) || defined (__stub___dllload)
6715 choke me
6716 #else
6717 f = dllload;
6718 #endif
6719
6720 ; return 0; }
6721 EOF
6722 if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6723   rm -rf conftest*
6724   eval "ac_cv_func_dllload=yes"
6725 else
6726   echo "configure: failed program was:" >&5
6727   cat conftest.$ac_ext >&5
6728   rm -rf conftest*
6729   eval "ac_cv_func_dllload=no"
6730 fi
6731 rm -f conftest*
6732 fi
6733
6734 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6735   echo "$ac_t""yes" 1>&6
6736   lt_cv_dlopen="dllload"
6737 else
6738   echo "$ac_t""no" 1>&6
6739 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6740 echo "configure:6741: checking for shl_load" >&5
6741 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6742   echo $ac_n "(cached) $ac_c" 1>&6
6743 else
6744   cat > conftest.$ac_ext <<EOF
6745 #line 6746 "configure"
6746 #include "confdefs.h"
6747 /* System header to define __stub macros and hopefully few prototypes,
6748     which can conflict with char shl_load(); below.  */
6749 #include <assert.h>
6750 /* Override any gcc2 internal prototype to avoid an error.  */
6751 /* We use char because int might match the return type of a gcc2
6752     builtin and then its argument prototype would still apply.  */
6753 char shl_load();
6754 char (*f)();
6755
6756 int main() {
6757
6758 /* The GNU C library defines this for functions which it implements
6759     to always fail with ENOSYS.  Some functions are actually named
6760     something starting with __ and the normal name is an alias.  */
6761 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6762 choke me
6763 #else
6764 f = shl_load;
6765 #endif
6766
6767 ; return 0; }
6768 EOF
6769 if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6770   rm -rf conftest*
6771   eval "ac_cv_func_shl_load=yes"
6772 else
6773   echo "configure: failed program was:" >&5
6774   cat conftest.$ac_ext >&5
6775   rm -rf conftest*
6776   eval "ac_cv_func_shl_load=no"
6777 fi
6778 rm -f conftest*
6779 fi
6780
6781 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6782   echo "$ac_t""yes" 1>&6
6783   lt_cv_dlopen="shl_load"
6784 else
6785   echo "$ac_t""no" 1>&6
6786 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6787 echo "configure:6788: checking for shl_load in -ldld" >&5
6788 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6789 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6790   echo $ac_n "(cached) $ac_c" 1>&6
6791 else
6792   ac_save_LIBS="$LIBS"
6793 LIBS="-ldld  $LIBS"
6794 cat > conftest.$ac_ext <<EOF
6795 #line 6796 "configure"
6796 #include "confdefs.h"
6797 /* Override any gcc2 internal prototype to avoid an error.  */
6798 /* We use char because int might match the return type of a gcc2
6799     builtin and then its argument prototype would still apply.  */
6800 char shl_load();
6801
6802 int main() {
6803 shl_load()
6804 ; return 0; }
6805 EOF
6806 if { (eval echo configure:6807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6807   rm -rf conftest*
6808   eval "ac_cv_lib_$ac_lib_var=yes"
6809 else
6810   echo "configure: failed program was:" >&5
6811   cat conftest.$ac_ext >&5
6812   rm -rf conftest*
6813   eval "ac_cv_lib_$ac_lib_var=no"
6814 fi
6815 rm -f conftest*
6816 LIBS="$ac_save_LIBS"
6817
6818 fi
6819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6820   echo "$ac_t""yes" 1>&6
6821   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6822 else
6823   echo "$ac_t""no" 1>&6
6824 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6825 echo "configure:6826: checking for dlopen" >&5
6826 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6827   echo $ac_n "(cached) $ac_c" 1>&6
6828 else
6829   cat > conftest.$ac_ext <<EOF
6830 #line 6831 "configure"
6831 #include "confdefs.h"
6832 /* System header to define __stub macros and hopefully few prototypes,
6833     which can conflict with char dlopen(); below.  */
6834 #include <assert.h>
6835 /* Override any gcc2 internal prototype to avoid an error.  */
6836 /* We use char because int might match the return type of a gcc2
6837     builtin and then its argument prototype would still apply.  */
6838 char dlopen();
6839 char (*f)();
6840
6841 int main() {
6842
6843 /* The GNU C library defines this for functions which it implements
6844     to always fail with ENOSYS.  Some functions are actually named
6845     something starting with __ and the normal name is an alias.  */
6846 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6847 choke me
6848 #else
6849 f = dlopen;
6850 #endif
6851
6852 ; return 0; }
6853 EOF
6854 if { (eval echo configure:6855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6855   rm -rf conftest*
6856   eval "ac_cv_func_dlopen=yes"
6857 else
6858   echo "configure: failed program was:" >&5
6859   cat conftest.$ac_ext >&5
6860   rm -rf conftest*
6861   eval "ac_cv_func_dlopen=no"
6862 fi
6863 rm -f conftest*
6864 fi
6865
6866 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6867   echo "$ac_t""yes" 1>&6
6868   lt_cv_dlopen="dlopen"
6869 else
6870   echo "$ac_t""no" 1>&6
6871 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6872 echo "configure:6873: checking for dlopen in -ldl" >&5
6873 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6874 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6875   echo $ac_n "(cached) $ac_c" 1>&6
6876 else
6877   ac_save_LIBS="$LIBS"
6878 LIBS="-ldl  $LIBS"
6879 cat > conftest.$ac_ext <<EOF
6880 #line 6881 "configure"
6881 #include "confdefs.h"
6882 /* Override any gcc2 internal prototype to avoid an error.  */
6883 /* We use char because int might match the return type of a gcc2
6884     builtin and then its argument prototype would still apply.  */
6885 char dlopen();
6886
6887 int main() {
6888 dlopen()
6889 ; return 0; }
6890 EOF
6891 if { (eval echo configure:6892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6892   rm -rf conftest*
6893   eval "ac_cv_lib_$ac_lib_var=yes"
6894 else
6895   echo "configure: failed program was:" >&5
6896   cat conftest.$ac_ext >&5
6897   rm -rf conftest*
6898   eval "ac_cv_lib_$ac_lib_var=no"
6899 fi
6900 rm -f conftest*
6901 LIBS="$ac_save_LIBS"
6902
6903 fi
6904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6905   echo "$ac_t""yes" 1>&6
6906   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6907 else
6908   echo "$ac_t""no" 1>&6
6909 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6910 echo "configure:6911: checking for dlopen in -lsvld" >&5
6911 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6912 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6913   echo $ac_n "(cached) $ac_c" 1>&6
6914 else
6915   ac_save_LIBS="$LIBS"
6916 LIBS="-lsvld  $LIBS"
6917 cat > conftest.$ac_ext <<EOF
6918 #line 6919 "configure"
6919 #include "confdefs.h"
6920 /* Override any gcc2 internal prototype to avoid an error.  */
6921 /* We use char because int might match the return type of a gcc2
6922     builtin and then its argument prototype would still apply.  */
6923 char dlopen();
6924
6925 int main() {
6926 dlopen()
6927 ; return 0; }
6928 EOF
6929 if { (eval echo configure:6930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6930   rm -rf conftest*
6931   eval "ac_cv_lib_$ac_lib_var=yes"
6932 else
6933   echo "configure: failed program was:" >&5
6934   cat conftest.$ac_ext >&5
6935   rm -rf conftest*
6936   eval "ac_cv_lib_$ac_lib_var=no"
6937 fi
6938 rm -f conftest*
6939 LIBS="$ac_save_LIBS"
6940
6941 fi
6942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6943   echo "$ac_t""yes" 1>&6
6944   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6945 else
6946   echo "$ac_t""no" 1>&6
6947 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6948 echo "configure:6949: checking for dld_link in -ldld" >&5
6949 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6950 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6951   echo $ac_n "(cached) $ac_c" 1>&6
6952 else
6953   ac_save_LIBS="$LIBS"
6954 LIBS="-ldld  $LIBS"
6955 cat > conftest.$ac_ext <<EOF
6956 #line 6957 "configure"
6957 #include "confdefs.h"
6958 /* Override any gcc2 internal prototype to avoid an error.  */
6959 /* We use char because int might match the return type of a gcc2
6960     builtin and then its argument prototype would still apply.  */
6961 char dld_link();
6962
6963 int main() {
6964 dld_link()
6965 ; return 0; }
6966 EOF
6967 if { (eval echo configure:6968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6968   rm -rf conftest*
6969   eval "ac_cv_lib_$ac_lib_var=yes"
6970 else
6971   echo "configure: failed program was:" >&5
6972   cat conftest.$ac_ext >&5
6973   rm -rf conftest*
6974   eval "ac_cv_lib_$ac_lib_var=no"
6975 fi
6976 rm -f conftest*
6977 LIBS="$ac_save_LIBS"
6978
6979 fi
6980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6981   echo "$ac_t""yes" 1>&6
6982   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6983 else
6984   echo "$ac_t""no" 1>&6
6985 fi
6986
6987               
6988 fi
6989
6990             
6991 fi
6992
6993           
6994 fi
6995
6996         
6997 fi
6998
6999       
7000 fi
7001
7002     
7003 fi
7004
7005     ;;
7006   esac
7007
7008   if test "x$lt_cv_dlopen" != xno; then
7009     enable_dlopen=yes
7010   else
7011     enable_dlopen=no
7012   fi
7013
7014   case $lt_cv_dlopen in
7015   dlopen)
7016     save_CPPFLAGS="$CPPFLAGS"
7017         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
7018
7019     save_LDFLAGS="$LDFLAGS"
7020     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7021
7022     save_LIBS="$LIBS"
7023     LIBS="$lt_cv_dlopen_libs $LIBS"
7024
7025     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
7026 echo "configure:7027: checking whether a program can dlopen itself" >&5
7027 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
7028   echo $ac_n "(cached) $ac_c" 1>&6
7029 else
7030           if test "$cross_compiling" = yes; then :
7031   lt_cv_dlopen_self=cross
7032 else
7033     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7034   lt_status=$lt_dlunknown
7035   cat > conftest.$ac_ext <<EOF
7036 #line 7037 "configure"
7037 #include "confdefs.h"
7038
7039 #if HAVE_DLFCN_H
7040 #include <dlfcn.h>
7041 #endif
7042
7043 #include <stdio.h>
7044
7045 #ifdef RTLD_GLOBAL
7046 #  define LT_DLGLOBAL           RTLD_GLOBAL
7047 #else
7048 #  ifdef DL_GLOBAL
7049 #    define LT_DLGLOBAL         DL_GLOBAL
7050 #  else
7051 #    define LT_DLGLOBAL         0
7052 #  endif
7053 #endif
7054
7055 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7056    find out it does not work in some platform. */
7057 #ifndef LT_DLLAZY_OR_NOW
7058 #  ifdef RTLD_LAZY
7059 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7060 #  else
7061 #    ifdef DL_LAZY
7062 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7063 #    else
7064 #      ifdef RTLD_NOW
7065 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7066 #      else
7067 #        ifdef DL_NOW
7068 #          define LT_DLLAZY_OR_NOW      DL_NOW
7069 #        else
7070 #          define LT_DLLAZY_OR_NOW      0
7071 #        endif
7072 #      endif
7073 #    endif
7074 #  endif
7075 #endif
7076
7077 #ifdef __cplusplus
7078 extern "C" void exit (int);
7079 #endif
7080
7081 void fnord() { int i=42;}
7082 int main ()
7083 {
7084   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7085   int status = $lt_dlunknown;
7086
7087   if (self)
7088     {
7089       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7090       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7091       /* dlclose (self); */
7092     }
7093
7094     exit (status);
7095 }
7096 EOF
7097   if { (eval echo configure:7098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7098     (./conftest; exit; ) 2>/dev/null
7099     lt_status=$?
7100     case x$lt_status in
7101       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7102       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7103       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7104     esac
7105   else :
7106     # compilation failed
7107     lt_cv_dlopen_self=no
7108   fi
7109 fi
7110 rm -fr conftest*
7111
7112     
7113 fi
7114
7115 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7116
7117     if test "x$lt_cv_dlopen_self" = xyes; then
7118       LDFLAGS="$LDFLAGS $link_static_flag"
7119       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7120 echo "configure:7121: checking whether a statically linked program can dlopen itself" >&5
7121 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7122   echo $ac_n "(cached) $ac_c" 1>&6
7123 else
7124           if test "$cross_compiling" = yes; then :
7125   lt_cv_dlopen_self_static=cross
7126 else
7127     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7128   lt_status=$lt_dlunknown
7129   cat > conftest.$ac_ext <<EOF
7130 #line 7131 "configure"
7131 #include "confdefs.h"
7132
7133 #if HAVE_DLFCN_H
7134 #include <dlfcn.h>
7135 #endif
7136
7137 #include <stdio.h>
7138
7139 #ifdef RTLD_GLOBAL
7140 #  define LT_DLGLOBAL           RTLD_GLOBAL
7141 #else
7142 #  ifdef DL_GLOBAL
7143 #    define LT_DLGLOBAL         DL_GLOBAL
7144 #  else
7145 #    define LT_DLGLOBAL         0
7146 #  endif
7147 #endif
7148
7149 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7150    find out it does not work in some platform. */
7151 #ifndef LT_DLLAZY_OR_NOW
7152 #  ifdef RTLD_LAZY
7153 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7154 #  else
7155 #    ifdef DL_LAZY
7156 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7157 #    else
7158 #      ifdef RTLD_NOW
7159 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7160 #      else
7161 #        ifdef DL_NOW
7162 #          define LT_DLLAZY_OR_NOW      DL_NOW
7163 #        else
7164 #          define LT_DLLAZY_OR_NOW      0
7165 #        endif
7166 #      endif
7167 #    endif
7168 #  endif
7169 #endif
7170
7171 #ifdef __cplusplus
7172 extern "C" void exit (int);
7173 #endif
7174
7175 void fnord() { int i=42;}
7176 int main ()
7177 {
7178   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7179   int status = $lt_dlunknown;
7180
7181   if (self)
7182     {
7183       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7184       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7185       /* dlclose (self); */
7186     }
7187
7188     exit (status);
7189 }
7190 EOF
7191   if { (eval echo configure:7192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7192     (./conftest; exit; ) 2>/dev/null
7193     lt_status=$?
7194     case x$lt_status in
7195       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7196       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7197       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7198     esac
7199   else :
7200     # compilation failed
7201     lt_cv_dlopen_self_static=no
7202   fi
7203 fi
7204 rm -fr conftest*
7205
7206       
7207 fi
7208
7209 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7210     fi
7211
7212     CPPFLAGS="$save_CPPFLAGS"
7213     LDFLAGS="$save_LDFLAGS"
7214     LIBS="$save_LIBS"
7215     ;;
7216   esac
7217
7218   case $lt_cv_dlopen_self in
7219   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7220   *) enable_dlopen_self=unknown ;;
7221   esac
7222
7223   case $lt_cv_dlopen_self_static in
7224   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7225   *) enable_dlopen_self_static=unknown ;;
7226   esac
7227 fi
7228
7229
7230 if test "$enable_shared" = yes && test "$GCC" = yes; then
7231   case $archive_cmds in
7232   *'~'*)
7233     # FIXME: we may have to deal with multi-command sequences.
7234     ;;
7235   '$CC '*)
7236     # Test whether the compiler implicitly links with -lc since on some
7237     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7238     # to ld, don't add -lc before -lgcc.
7239     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7240 echo "configure:7241: checking whether -lc should be explicitly linked in" >&5
7241     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7242   echo $ac_n "(cached) $ac_c" 1>&6
7243 else
7244   $rm conftest*
7245     echo 'static int dummy;' > conftest.$ac_ext
7246
7247     if { (eval echo configure:7248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7248       soname=conftest
7249       lib=conftest
7250       libobjs=conftest.$ac_objext
7251       deplibs=
7252       wl=$lt_cv_prog_cc_wl
7253       compiler_flags=-v
7254       linker_flags=-v
7255       verstring=
7256       output_objdir=.
7257       libname=conftest
7258       save_allow_undefined_flag=$allow_undefined_flag
7259       allow_undefined_flag=
7260       if { (eval echo configure:7261: \"$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; }
7261       then
7262         lt_cv_archive_cmds_need_lc=no
7263       else
7264         lt_cv_archive_cmds_need_lc=yes
7265       fi
7266       allow_undefined_flag=$save_allow_undefined_flag
7267     else
7268       cat conftest.err 1>&5
7269     fi
7270 fi
7271
7272     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7273     ;;
7274   esac
7275 fi
7276 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7277
7278 # The second clause should only fire when bootstrapping the
7279 # libtool distribution, otherwise you forgot to ship ltmain.sh
7280 # with your package, and you will get complaints that there are
7281 # no rules to generate ltmain.sh.
7282 if test -f "$ltmain"; then
7283   :
7284 else
7285   # If there is no Makefile yet, we rely on a make rule to execute
7286   # `config.status --recheck' to rerun these tests and create the
7287   # libtool script then.
7288   test -f Makefile && make "$ltmain"
7289 fi
7290
7291 if test -f "$ltmain"; then
7292   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7293   $rm -f "${ofile}T"
7294
7295   echo creating $ofile
7296
7297   # Now quote all the things that may contain metacharacters while being
7298   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7299   # variables and quote the copies for generation of the libtool script.
7300   for var in echo old_CC old_CFLAGS SED \
7301     AR AR_FLAGS CC LD LN_S NM SHELL \
7302     reload_flag reload_cmds wl \
7303     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7304     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7305     library_names_spec soname_spec \
7306     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7307     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7308     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7309     old_striplib striplib file_magic_cmd export_symbols_cmds \
7310     deplibs_check_method allow_undefined_flag no_undefined_flag \
7311     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7312     global_symbol_to_c_name_address \
7313     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7314     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7315     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7316
7317     case $var in
7318     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7319     old_postinstall_cmds | old_postuninstall_cmds | \
7320     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7321     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7322     postinstall_cmds | postuninstall_cmds | \
7323     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7324       # Double-quote double-evaled strings.
7325       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7326       ;;
7327     *)
7328       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7329       ;;
7330     esac
7331   done
7332
7333   cat <<__EOF__ > "${ofile}T"
7334 #! $SHELL
7335
7336 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7337 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7338 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7339 #
7340 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7341 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7342 #
7343 # This program is free software; you can redistribute it and/or modify
7344 # it under the terms of the GNU General Public License as published by
7345 # the Free Software Foundation; either version 2 of the License, or
7346 # (at your option) any later version.
7347 #
7348 # This program is distributed in the hope that it will be useful, but
7349 # WITHOUT ANY WARRANTY; without even the implied warranty of
7350 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7351 # General Public License for more details.
7352 #
7353 # You should have received a copy of the GNU General Public License
7354 # along with this program; if not, write to the Free Software
7355 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7356 #
7357 # As a special exception to the GNU General Public License, if you
7358 # distribute this file as part of a program that contains a
7359 # configuration script generated by Autoconf, you may include it under
7360 # the same distribution terms that you use for the rest of that program.
7361
7362 # A sed that does not truncate output.
7363 SED=$lt_SED
7364
7365 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7366 Xsed="${SED} -e s/^X//"
7367
7368 # The HP-UX ksh and POSIX shell print the target directory to stdout
7369 # if CDPATH is set.
7370 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7371
7372 # ### BEGIN LIBTOOL CONFIG
7373
7374 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7375
7376 # Shell to use when invoking shell scripts.
7377 SHELL=$lt_SHELL
7378
7379 # Whether or not to build shared libraries.
7380 build_libtool_libs=$enable_shared
7381
7382 # Whether or not to build static libraries.
7383 build_old_libs=$enable_static
7384
7385 # Whether or not to add -lc for building shared libraries.
7386 build_libtool_need_lc=$need_lc
7387
7388 # Whether or not to optimize for fast installation.
7389 fast_install=$enable_fast_install
7390
7391 # The host system.
7392 host_alias=$host_alias
7393 host=$host
7394
7395 # An echo program that does not interpret backslashes.
7396 echo=$lt_echo
7397
7398 # The archiver.
7399 AR=$lt_AR
7400 AR_FLAGS=$lt_AR_FLAGS
7401
7402 # The default C compiler.
7403 CC=$lt_CC
7404
7405 # Is the compiler the GNU C compiler?
7406 with_gcc=$GCC
7407
7408 # The linker used to build libraries.
7409 LD=$lt_LD
7410
7411 # Whether we need hard or soft links.
7412 LN_S=$lt_LN_S
7413
7414 # A BSD-compatible nm program.
7415 NM=$lt_NM
7416
7417 # A symbol stripping program
7418 STRIP=$STRIP
7419
7420 # Used to examine libraries when file_magic_cmd begins "file"
7421 MAGIC_CMD=$MAGIC_CMD
7422
7423 # Used on cygwin: DLL creation program.
7424 DLLTOOL="$DLLTOOL"
7425
7426 # Used on cygwin: object dumper.
7427 OBJDUMP="$OBJDUMP"
7428
7429 # Used on cygwin: assembler.
7430 AS="$AS"
7431
7432 # The name of the directory that contains temporary libtool files.
7433 objdir=$objdir
7434
7435 # How to create reloadable object files.
7436 reload_flag=$lt_reload_flag
7437 reload_cmds=$lt_reload_cmds
7438
7439 # How to pass a linker flag through the compiler.
7440 wl=$lt_wl
7441
7442 # Object file suffix (normally "o").
7443 objext="$ac_objext"
7444
7445 # Old archive suffix (normally "a").
7446 libext="$libext"
7447
7448 # Executable file suffix (normally "").
7449 exeext="$exeext"
7450
7451 # Additional compiler flags for building library objects.
7452 pic_flag=$lt_pic_flag
7453 pic_mode=$pic_mode
7454
7455 # Does compiler simultaneously support -c and -o options?
7456 compiler_c_o=$lt_compiler_c_o
7457
7458 # Can we write directly to a .lo ?
7459 compiler_o_lo=$lt_compiler_o_lo
7460
7461 # Must we lock files when doing compilation ?
7462 need_locks=$lt_need_locks
7463
7464 # Do we need the lib prefix for modules?
7465 need_lib_prefix=$need_lib_prefix
7466
7467 # Do we need a version for libraries?
7468 need_version=$need_version
7469
7470 # Whether dlopen is supported.
7471 dlopen_support=$enable_dlopen
7472
7473 # Whether dlopen of programs is supported.
7474 dlopen_self=$enable_dlopen_self
7475
7476 # Whether dlopen of statically linked programs is supported.
7477 dlopen_self_static=$enable_dlopen_self_static
7478
7479 # Compiler flag to prevent dynamic linking.
7480 link_static_flag=$lt_link_static_flag
7481
7482 # Compiler flag to turn off builtin functions.
7483 no_builtin_flag=$lt_no_builtin_flag
7484
7485 # Compiler flag to allow reflexive dlopens.
7486 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7487
7488 # Compiler flag to generate shared objects directly from archives.
7489 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7490
7491 # Compiler flag to generate thread-safe objects.
7492 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7493
7494 # Library versioning type.
7495 version_type=$version_type
7496
7497 # Format of library name prefix.
7498 libname_spec=$lt_libname_spec
7499
7500 # List of archive names.  First name is the real one, the rest are links.
7501 # The last name is the one that the linker finds with -lNAME.
7502 library_names_spec=$lt_library_names_spec
7503
7504 # The coded name of the library, if different from the real name.
7505 soname_spec=$lt_soname_spec
7506
7507 # Commands used to build and install an old-style archive.
7508 RANLIB=$lt_RANLIB
7509 old_archive_cmds=$lt_old_archive_cmds
7510 old_postinstall_cmds=$lt_old_postinstall_cmds
7511 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7512
7513 # Create an old-style archive from a shared archive.
7514 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7515
7516 # Create a temporary old-style archive to link instead of a shared archive.
7517 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7518
7519 # Commands used to build and install a shared archive.
7520 archive_cmds=$lt_archive_cmds
7521 archive_expsym_cmds=$lt_archive_expsym_cmds
7522 postinstall_cmds=$lt_postinstall_cmds
7523 postuninstall_cmds=$lt_postuninstall_cmds
7524
7525 # Commands to strip libraries.
7526 old_striplib=$lt_old_striplib
7527 striplib=$lt_striplib
7528
7529 # Method to check whether dependent libraries are shared objects.
7530 deplibs_check_method=$lt_deplibs_check_method
7531
7532 # Command to use when deplibs_check_method == file_magic.
7533 file_magic_cmd=$lt_file_magic_cmd
7534
7535 # Flag that allows shared libraries with undefined symbols to be built.
7536 allow_undefined_flag=$lt_allow_undefined_flag
7537
7538 # Flag that forces no undefined symbols.
7539 no_undefined_flag=$lt_no_undefined_flag
7540
7541 # Commands used to finish a libtool library installation in a directory.
7542 finish_cmds=$lt_finish_cmds
7543
7544 # Same as above, but a single script fragment to be evaled but not shown.
7545 finish_eval=$lt_finish_eval
7546
7547 # Take the output of nm and produce a listing of raw symbols and C names.
7548 global_symbol_pipe=$lt_global_symbol_pipe
7549
7550 # Transform the output of nm in a proper C declaration
7551 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7552
7553 # Transform the output of nm in a C name address pair
7554 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7555
7556 # This is the shared library runtime path variable.
7557 runpath_var=$runpath_var
7558
7559 # This is the shared library path variable.
7560 shlibpath_var=$shlibpath_var
7561
7562 # Is shlibpath searched before the hard-coded library search path?
7563 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7564
7565 # How to hardcode a shared library path into an executable.
7566 hardcode_action=$hardcode_action
7567
7568 # Whether we should hardcode library paths into libraries.
7569 hardcode_into_libs=$hardcode_into_libs
7570
7571 # Flag to hardcode \$libdir into a binary during linking.
7572 # This must work even if \$libdir does not exist.
7573 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7574
7575 # Whether we need a single -rpath flag with a separated argument.
7576 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7577
7578 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7579 # resulting binary.
7580 hardcode_direct=$hardcode_direct
7581
7582 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7583 # resulting binary.
7584 hardcode_minus_L=$hardcode_minus_L
7585
7586 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7587 # the resulting binary.
7588 hardcode_shlibpath_var=$hardcode_shlibpath_var
7589
7590 # Variables whose values should be saved in libtool wrapper scripts and
7591 # restored at relink time.
7592 variables_saved_for_relink="$variables_saved_for_relink"
7593
7594 # Whether libtool must link a program against all its dependency libraries.
7595 link_all_deplibs=$link_all_deplibs
7596
7597 # Compile-time system search path for libraries
7598 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7599
7600 # Run-time system search path for libraries
7601 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7602
7603 # Fix the shell variable \$srcfile for the compiler.
7604 fix_srcfile_path="$fix_srcfile_path"
7605
7606 # Set to yes if exported symbols are required.
7607 always_export_symbols=$always_export_symbols
7608
7609 # The commands to list exported symbols.
7610 export_symbols_cmds=$lt_export_symbols_cmds
7611
7612 # The commands to extract the exported symbol list from a shared archive.
7613 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7614
7615 # Symbols that should not be listed in the preloaded symbols.
7616 exclude_expsyms=$lt_exclude_expsyms
7617
7618 # Symbols that must always be exported.
7619 include_expsyms=$lt_include_expsyms
7620
7621 # ### END LIBTOOL CONFIG
7622
7623 __EOF__
7624
7625   case $host_os in
7626   aix3*)
7627     cat <<\EOF >> "${ofile}T"
7628
7629 # AIX sometimes has problems with the GCC collect2 program.  For some
7630 # reason, if we set the COLLECT_NAMES environment variable, the problems
7631 # vanish in a puff of smoke.
7632 if test "X${COLLECT_NAMES+set}" != Xset; then
7633   COLLECT_NAMES=
7634   export COLLECT_NAMES
7635 fi
7636 EOF
7637     ;;
7638   esac
7639
7640   case $host_os in
7641   cygwin* | mingw* | pw32* | os2*)
7642     cat <<'EOF' >> "${ofile}T"
7643       # This is a source program that is used to create dlls on Windows
7644       # Don't remove nor modify the starting and closing comments
7645 # /* ltdll.c starts here */
7646 # #define WIN32_LEAN_AND_MEAN
7647 # #include <windows.h>
7648 # #undef WIN32_LEAN_AND_MEAN
7649 # #include <stdio.h>
7650 #
7651 # #ifndef __CYGWIN__
7652 # #  ifdef __CYGWIN32__
7653 # #    define __CYGWIN__ __CYGWIN32__
7654 # #  endif
7655 # #endif
7656 #
7657 # #ifdef __cplusplus
7658 # extern "C" {
7659 # #endif
7660 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7661 # #ifdef __cplusplus
7662 # }
7663 # #endif
7664 #
7665 # #ifdef __CYGWIN__
7666 # #include <cygwin/cygwin_dll.h>
7667 # DECLARE_CYGWIN_DLL( DllMain );
7668 # #endif
7669 # HINSTANCE __hDllInstance_base;
7670 #
7671 # BOOL APIENTRY
7672 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7673 # {
7674 #   __hDllInstance_base = hInst;
7675 #   return TRUE;
7676 # }
7677 # /* ltdll.c ends here */
7678         # This is a source program that is used to create import libraries
7679         # on Windows for dlls which lack them. Don't remove nor modify the
7680         # starting and closing comments
7681 # /* impgen.c starts here */
7682 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7683 #
7684 #  This file is part of GNU libtool.
7685 #
7686 #  This program is free software; you can redistribute it and/or modify
7687 #  it under the terms of the GNU General Public License as published by
7688 #  the Free Software Foundation; either version 2 of the License, or
7689 #  (at your option) any later version.
7690 #
7691 #  This program is distributed in the hope that it will be useful,
7692 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7693 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7694 #  GNU General Public License for more details.
7695 #
7696 #  You should have received a copy of the GNU General Public License
7697 #  along with this program; if not, write to the Free Software
7698 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7699 #  */
7700 #
7701 # #include <stdio.h>            /* for printf() */
7702 # #include <unistd.h>           /* for open(), lseek(), read() */
7703 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7704 # #include <string.h>           /* for strdup() */
7705 #
7706 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7707 # #ifndef O_BINARY
7708 # #define O_BINARY 0
7709 # #endif
7710 #
7711 # static unsigned int
7712 # pe_get16 (fd, offset)
7713 #      int fd;
7714 #      int offset;
7715 # {
7716 #   unsigned char b[2];
7717 #   lseek (fd, offset, SEEK_SET);
7718 #   read (fd, b, 2);
7719 #   return b[0] + (b[1]<<8);
7720 # }
7721 #
7722 # static unsigned int
7723 # pe_get32 (fd, offset)
7724 #     int fd;
7725 #     int offset;
7726 # {
7727 #   unsigned char b[4];
7728 #   lseek (fd, offset, SEEK_SET);
7729 #   read (fd, b, 4);
7730 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7731 # }
7732 #
7733 # static unsigned int
7734 # pe_as32 (ptr)
7735 #      void *ptr;
7736 # {
7737 #   unsigned char *b = ptr;
7738 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7739 # }
7740 #
7741 # int
7742 # main (argc, argv)
7743 #     int argc;
7744 #     char *argv[];
7745 # {
7746 #     int dll;
7747 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7748 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7749 #     unsigned long name_rvas, nexp;
7750 #     unsigned char *expdata, *erva;
7751 #     char *filename, *dll_name;
7752 #
7753 #     filename = argv[1];
7754 #
7755 #     dll = open(filename, O_RDONLY|O_BINARY);
7756 #     if (dll < 1)
7757 #       return 1;
7758 #
7759 #     dll_name = filename;
7760 #
7761 #     for (i=0; filename[i]; i++)
7762 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7763 #           dll_name = filename + i +1;
7764 #
7765 #     pe_header_offset = pe_get32 (dll, 0x3c);
7766 #     opthdr_ofs = pe_header_offset + 4 + 20;
7767 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7768 #
7769 #     if (num_entries < 1) /* no exports */
7770 #       return 1;
7771 #
7772 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7773 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7774 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7775 #     secptr = (pe_header_offset + 4 + 20 +
7776 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7777 #
7778 #     expptr = 0;
7779 #     for (i = 0; i < nsections; i++)
7780 #     {
7781 #       char sname[8];
7782 #       unsigned long secptr1 = secptr + 40 * i;
7783 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7784 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7785 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7786 #       lseek(dll, secptr1, SEEK_SET);
7787 #       read(dll, sname, 8);
7788 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7789 #       {
7790 #           expptr = fptr + (export_rva - vaddr);
7791 #           if (export_rva + export_size > vaddr + vsize)
7792 #               export_size = vsize - (export_rva - vaddr);
7793 #           break;
7794 #       }
7795 #     }
7796 #
7797 #     expdata = (unsigned char*)malloc(export_size);
7798 #     lseek (dll, expptr, SEEK_SET);
7799 #     read (dll, expdata, export_size);
7800 #     erva = expdata - export_rva;
7801 #
7802 #     nexp = pe_as32 (expdata+24);
7803 #     name_rvas = pe_as32 (expdata+32);
7804 #
7805 #     printf ("EXPORTS\n");
7806 #     for (i = 0; i<nexp; i++)
7807 #     {
7808 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7809 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7810 #     }
7811 #
7812 #     return 0;
7813 # }
7814 # /* impgen.c ends here */
7815
7816 EOF
7817     ;;
7818   esac
7819
7820   # We use sed instead of cat because bash on DJGPP gets confused if
7821   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7822   # text mode, it properly converts lines to CR/LF.  This bash problem
7823   # is reportedly fixed, but why not run on old versions too?
7824   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7825
7826   mv -f "${ofile}T" "$ofile" || \
7827     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7828   chmod +x "$ofile"
7829 fi
7830
7831
7832
7833
7834
7835 # This can be used to rebuild libtool when needed
7836 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7837
7838 # Always use our own libtool.
7839 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7840
7841 # Prevent multiple expansion
7842
7843
7844
7845 # test for ln hardlink support
7846 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7847 echo "configure:7848: checking whether ln works" >&5
7848 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7849   echo $ac_n "(cached) $ac_c" 1>&6
7850 else
7851   rm -f conftest.src conftest.dst
7852 echo "conftest" > conftest.src
7853 if ln conftest.src conftest.dst 2>/dev/null
7854 then
7855   ol_cv_prog_LN_H="ln"
7856 else
7857   ol_cv_prog_LN_H="cp"
7858 fi
7859 rm -f conftest.src conftest.dst
7860
7861 fi
7862 LN_H="$ol_cv_prog_LN_H"
7863 if test "$ol_cv_prog_LN_H" = "ln"; then
7864         echo "$ac_t""yes" 1>&6
7865 else
7866         echo "$ac_t""no" 1>&6
7867 fi
7868
7869 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7870 echo "configure:7871: checking whether ln -s works" >&5
7871 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7872   echo $ac_n "(cached) $ac_c" 1>&6
7873 else
7874   rm -f conftestdata
7875 if ln -s X conftestdata 2>/dev/null
7876 then
7877   rm -f conftestdata
7878   ac_cv_prog_LN_S="ln -s"
7879 else
7880   ac_cv_prog_LN_S=ln
7881 fi
7882 fi
7883 LN_S="$ac_cv_prog_LN_S"
7884 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7885   echo "$ac_t""yes" 1>&6
7886 else
7887   echo "$ac_t""no" 1>&6
7888 fi
7889
7890
7891 ol_link_perl=no
7892 if test $ol_enable_perl != no ; then
7893         # Extract the first word of "perl", so it can be a program name with args.
7894 set dummy perl; ac_word=$2
7895 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7896 echo "configure:7897: checking for $ac_word" >&5
7897 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7898   echo $ac_n "(cached) $ac_c" 1>&6
7899 else
7900   case "$PERLBIN" in
7901   /*)
7902   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7903   ;;
7904   ?:/*)
7905   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7906   ;;
7907   *)
7908   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7909   ac_dummy="$PATH"
7910   for ac_dir in $ac_dummy; do 
7911     test -z "$ac_dir" && ac_dir=.
7912     if test -f $ac_dir/$ac_word; then
7913       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7914       break
7915     fi
7916   done
7917   IFS="$ac_save_ifs"
7918   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7919   ;;
7920 esac
7921 fi
7922 PERLBIN="$ac_cv_path_PERLBIN"
7923 if test -n "$PERLBIN"; then
7924   echo "$ac_t""$PERLBIN" 1>&6
7925 else
7926   echo "$ac_t""no" 1>&6
7927 fi
7928
7929
7930         if test "no$PERLBIN" = "no" ; then
7931                 if test $ol_enable_perl = yes ; then
7932                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7933                 fi
7934
7935         else
7936                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7937                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7938
7939                 if test x"$ol_with_perl_module" = "xstatic" ; then
7940                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7941                 else
7942                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7943                 fi
7944                                 ol_link_perl=yes
7945         fi
7946 fi
7947
7948 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7949 echo "configure:7950: checking how to run the C preprocessor" >&5
7950 # On Suns, sometimes $CPP names a directory.
7951 if test -n "$CPP" && test -d "$CPP"; then
7952   CPP=
7953 fi
7954 if test -z "$CPP"; then
7955 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7956   echo $ac_n "(cached) $ac_c" 1>&6
7957 else
7958     # This must be in double quotes, not single quotes, because CPP may get
7959   # substituted into the Makefile and "${CC-cc}" will confuse make.
7960   CPP="${CC-cc} -E"
7961   # On the NeXT, cc -E runs the code through the compiler's parser,
7962   # not just through cpp.
7963   cat > conftest.$ac_ext <<EOF
7964 #line 7965 "configure"
7965 #include "confdefs.h"
7966 #include <assert.h>
7967 Syntax Error
7968 EOF
7969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7970 { (eval echo configure:7971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7972 if test -z "$ac_err"; then
7973   :
7974 else
7975   echo "$ac_err" >&5
7976   echo "configure: failed program was:" >&5
7977   cat conftest.$ac_ext >&5
7978   rm -rf conftest*
7979   CPP="${CC-cc} -E -traditional-cpp"
7980   cat > conftest.$ac_ext <<EOF
7981 #line 7982 "configure"
7982 #include "confdefs.h"
7983 #include <assert.h>
7984 Syntax Error
7985 EOF
7986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7987 { (eval echo configure:7988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7989 if test -z "$ac_err"; then
7990   :
7991 else
7992   echo "$ac_err" >&5
7993   echo "configure: failed program was:" >&5
7994   cat conftest.$ac_ext >&5
7995   rm -rf conftest*
7996   CPP="${CC-cc} -nologo -E"
7997   cat > conftest.$ac_ext <<EOF
7998 #line 7999 "configure"
7999 #include "confdefs.h"
8000 #include <assert.h>
8001 Syntax Error
8002 EOF
8003 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8004 { (eval echo configure:8005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8005 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8006 if test -z "$ac_err"; then
8007   :
8008 else
8009   echo "$ac_err" >&5
8010   echo "configure: failed program was:" >&5
8011   cat conftest.$ac_ext >&5
8012   rm -rf conftest*
8013   CPP=/lib/cpp
8014 fi
8015 rm -f conftest*
8016 fi
8017 rm -f conftest*
8018 fi
8019 rm -f conftest*
8020   ac_cv_prog_CPP="$CPP"
8021 fi
8022   CPP="$ac_cv_prog_CPP"
8023 else
8024   ac_cv_prog_CPP="$CPP"
8025 fi
8026 echo "$ac_t""$CPP" 1>&6
8027
8028
8029 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
8030         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
8031
8032 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
8033         echo "configure: warning: programs compiled here do run here..." 1>&2
8034         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
8035
8036 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
8037         echo "configure: warning: programs compiled here do not run here..." 1>&2
8038         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
8039 fi
8040
8041
8042 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8043 echo "configure:8044: checking for Cygwin environment" >&5
8044 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
8045   echo $ac_n "(cached) $ac_c" 1>&6
8046 else
8047   cat > conftest.$ac_ext <<EOF
8048 #line 8049 "configure"
8049 #include "confdefs.h"
8050
8051 int main() {
8052
8053 #ifndef __CYGWIN__
8054 #define __CYGWIN__ __CYGWIN32__
8055 #endif
8056 return __CYGWIN__;
8057 ; return 0; }
8058 EOF
8059 if { (eval echo configure:8060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8060   rm -rf conftest*
8061   ac_cv_cygwin=yes
8062 else
8063   echo "configure: failed program was:" >&5
8064   cat conftest.$ac_ext >&5
8065   rm -rf conftest*
8066   ac_cv_cygwin=no
8067 fi
8068 rm -f conftest*
8069 fi
8070
8071 echo "$ac_t""$ac_cv_cygwin" 1>&6
8072 CYGWIN=
8073 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8074 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8075 echo "configure:8076: checking for mingw32 environment" >&5
8076 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8077   echo $ac_n "(cached) $ac_c" 1>&6
8078 else
8079   cat > conftest.$ac_ext <<EOF
8080 #line 8081 "configure"
8081 #include "confdefs.h"
8082
8083 int main() {
8084 return __MINGW32__;
8085 ; return 0; }
8086 EOF
8087 if { (eval echo configure:8088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8088   rm -rf conftest*
8089   ac_cv_mingw32=yes
8090 else
8091   echo "configure: failed program was:" >&5
8092   cat conftest.$ac_ext >&5
8093   rm -rf conftest*
8094   ac_cv_mingw32=no
8095 fi
8096 rm -f conftest*
8097 fi
8098
8099 echo "$ac_t""$ac_cv_mingw32" 1>&6
8100 MINGW32=
8101 test "$ac_cv_mingw32" = yes && MINGW32=yes
8102
8103
8104
8105 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8106 echo "configure:8107: checking for executable suffix" >&5
8107 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8108   echo $ac_n "(cached) $ac_c" 1>&6
8109 else
8110   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8111   ac_cv_exeext=.exe
8112 else
8113   rm -f conftest*
8114   echo 'int main () { return 0; }' > conftest.$ac_ext
8115   ac_cv_exeext=
8116   if { (eval echo configure:8117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8117     for file in conftest.*; do
8118       case $file in
8119       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8120       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8121       esac
8122     done
8123   else
8124     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8125   fi
8126   rm -f conftest*
8127   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8128 fi
8129 fi
8130
8131 EXEEXT=""
8132 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8133 echo "$ac_t""${ac_cv_exeext}" 1>&6
8134 ac_exeext=$EXEEXT
8135
8136 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8137 echo "configure:8138: checking for object suffix" >&5
8138 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8139   echo $ac_n "(cached) $ac_c" 1>&6
8140 else
8141   rm -f conftest*
8142 echo 'int i = 1;' > conftest.$ac_ext
8143 if { (eval echo configure:8144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8144   for ac_file in conftest.*; do
8145     case $ac_file in
8146     *.c) ;;
8147     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8148     esac
8149   done
8150 else
8151   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8152 fi
8153 rm -f conftest*
8154 fi
8155
8156 echo "$ac_t""$ac_cv_objext" 1>&6
8157 OBJEXT=$ac_cv_objext
8158 ac_objext=$ac_cv_objext
8159
8160
8161 cat >> confdefs.h <<EOF
8162 #define EXEEXT "${EXEEXT}"
8163 EOF
8164
8165
8166 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8167 echo "configure:8168: checking for be_app in -lbe" >&5
8168 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8169 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8170   echo $ac_n "(cached) $ac_c" 1>&6
8171 else
8172   ac_save_LIBS="$LIBS"
8173 LIBS="-lbe -lroot -lnet $LIBS"
8174 cat > conftest.$ac_ext <<EOF
8175 #line 8176 "configure"
8176 #include "confdefs.h"
8177 /* Override any gcc2 internal prototype to avoid an error.  */
8178 /* We use char because int might match the return type of a gcc2
8179     builtin and then its argument prototype would still apply.  */
8180 char be_app();
8181
8182 int main() {
8183 be_app()
8184 ; return 0; }
8185 EOF
8186 if { (eval echo configure:8187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8187   rm -rf conftest*
8188   eval "ac_cv_lib_$ac_lib_var=yes"
8189 else
8190   echo "configure: failed program was:" >&5
8191   cat conftest.$ac_ext >&5
8192   rm -rf conftest*
8193   eval "ac_cv_lib_$ac_lib_var=no"
8194 fi
8195 rm -f conftest*
8196 LIBS="$ac_save_LIBS"
8197
8198 fi
8199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8200   echo "$ac_t""yes" 1>&6
8201   LIBS="$LIBS -lbe -lroot -lnet"
8202 else
8203   echo "$ac_t""no" 1>&6
8204 :
8205 fi
8206
8207
8208
8209
8210
8211 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8212 echo "configure:8213: checking for ${CC-cc} option to accept ANSI C" >&5
8213 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8214   echo $ac_n "(cached) $ac_c" 1>&6
8215 else
8216   am_cv_prog_cc_stdc=no
8217 ac_save_CC="$CC"
8218 # Don't try gcc -ansi; that turns off useful extensions and
8219 # breaks some systems' header files.
8220 # AIX                   -qlanglvl=ansi
8221 # Ultrix and OSF/1      -std1
8222 # HP-UX 10.20 and later -Ae
8223 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8224 # SVR4                  -Xc -D__EXTENSIONS__
8225 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8226 do
8227   CC="$ac_save_CC $ac_arg"
8228   cat > conftest.$ac_ext <<EOF
8229 #line 8230 "configure"
8230 #include "confdefs.h"
8231 #include <stdarg.h>
8232 #include <stdio.h>
8233 #include <sys/types.h>
8234 #include <sys/stat.h>
8235 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8236 struct buf { int x; };
8237 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8238 static char *e (p, i)
8239      char **p;
8240      int i;
8241 {
8242   return p[i];
8243 }
8244 static char *f (char * (*g) (char **, int), char **p, ...)
8245 {
8246   char *s;
8247   va_list v;
8248   va_start (v,p);
8249   s = g (p, va_arg (v,int));
8250   va_end (v);
8251   return s;
8252 }
8253 int test (int i, double x);
8254 struct s1 {int (*f) (int a);};
8255 struct s2 {int (*f) (double a);};
8256 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8257 int argc;
8258 char **argv;
8259
8260 int main() {
8261
8262 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8263
8264 ; return 0; }
8265 EOF
8266 if { (eval echo configure:8267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8267   rm -rf conftest*
8268   am_cv_prog_cc_stdc="$ac_arg"; break
8269 else
8270   echo "configure: failed program was:" >&5
8271   cat conftest.$ac_ext >&5
8272 fi
8273 rm -f conftest*
8274 done
8275 CC="$ac_save_CC"
8276
8277 fi
8278
8279 if test -z "$am_cv_prog_cc_stdc"; then
8280   echo "$ac_t""none needed" 1>&6
8281 else
8282   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8283 fi
8284 case "x$am_cv_prog_cc_stdc" in
8285   x|xno) ;;
8286   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8287 esac
8288
8289 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8290         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8291 fi
8292
8293 # test for make depend flag
8294 OL_MKDEP=
8295 OL_MKDEP_FLAGS=
8296 if test -z "${MKDEP}"; then
8297         OL_MKDEP="${CC-cc}"
8298         if test -z "${MKDEP_FLAGS}"; then
8299                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8300 echo "configure:8301: checking for ${OL_MKDEP} depend flag" >&5
8301 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8302   echo $ac_n "(cached) $ac_c" 1>&6
8303 else
8304   
8305                         ol_cv_mkdep=no
8306                         for flag in "-M" "-xM"; do
8307                                 cat > conftest.c <<EOF
8308  noCode;
8309 EOF
8310                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8311                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8312                                 then
8313                                         if test ! -f conftest."${ac_object}" ; then
8314                                                 ol_cv_mkdep=$flag
8315                                                 OL_MKDEP_FLAGS="$flag"
8316                                                 break
8317                                         fi
8318                                 fi
8319                         done
8320                         rm -f conftest*
8321                 
8322 fi
8323
8324 echo "$ac_t""$ol_cv_mkdep" 1>&6
8325         else
8326                 cc_cv_mkdep=yes
8327                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8328         fi
8329 else
8330         cc_cv_mkdep=yes
8331         OL_MKDEP="${MKDEP}"
8332         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8333 fi
8334
8335
8336
8337 if test "${ol_cv_mkdep}" = no ; then
8338         # this will soon become an error
8339         echo "configure: warning: do not know how to generate dependencies" 1>&2
8340 fi
8341
8342 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8343 echo "configure:8344: checking for afopen in -ls" >&5
8344 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8345 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8346   echo $ac_n "(cached) $ac_c" 1>&6
8347 else
8348   ac_save_LIBS="$LIBS"
8349 LIBS="-ls  $LIBS"
8350 cat > conftest.$ac_ext <<EOF
8351 #line 8352 "configure"
8352 #include "confdefs.h"
8353 /* Override any gcc2 internal prototype to avoid an error.  */
8354 /* We use char because int might match the return type of a gcc2
8355     builtin and then its argument prototype would still apply.  */
8356 char afopen();
8357
8358 int main() {
8359 afopen()
8360 ; return 0; }
8361 EOF
8362 if { (eval echo configure:8363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8363   rm -rf conftest*
8364   eval "ac_cv_lib_$ac_lib_var=yes"
8365 else
8366   echo "configure: failed program was:" >&5
8367   cat conftest.$ac_ext >&5
8368   rm -rf conftest*
8369   eval "ac_cv_lib_$ac_lib_var=no"
8370 fi
8371 rm -f conftest*
8372 LIBS="$ac_save_LIBS"
8373
8374 fi
8375 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8376   echo "$ac_t""yes" 1>&6
8377   
8378         AUTH_LIBS=-ls
8379         cat >> confdefs.h <<\EOF
8380 #define HAVE_AIX_SECURITY 1
8381 EOF
8382
8383
8384 else
8385   echo "$ac_t""no" 1>&6
8386 fi
8387
8388
8389 case "$target" in
8390 *-ibm-openedition)
8391         ac_cv_func_getopt=no
8392         cat >> confdefs.h <<\EOF
8393 #define BOTH_STRINGS_H 1
8394 EOF
8395
8396         ;;
8397 esac
8398
8399 ol_link_modules=no
8400 if test $ol_enable_modules != no ; then
8401         for ac_hdr in ltdl.h
8402 do
8403 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8404 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8405 echo "configure:8406: checking for $ac_hdr" >&5
8406 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8407   echo $ac_n "(cached) $ac_c" 1>&6
8408 else
8409   cat > conftest.$ac_ext <<EOF
8410 #line 8411 "configure"
8411 #include "confdefs.h"
8412 #include <$ac_hdr>
8413 EOF
8414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8415 { (eval echo configure:8416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8417 if test -z "$ac_err"; then
8418   rm -rf conftest*
8419   eval "ac_cv_header_$ac_safe=yes"
8420 else
8421   echo "$ac_err" >&5
8422   echo "configure: failed program was:" >&5
8423   cat conftest.$ac_ext >&5
8424   rm -rf conftest*
8425   eval "ac_cv_header_$ac_safe=no"
8426 fi
8427 rm -f conftest*
8428 fi
8429 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8430   echo "$ac_t""yes" 1>&6
8431     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8432   cat >> confdefs.h <<EOF
8433 #define $ac_tr_hdr 1
8434 EOF
8435  
8436 else
8437   echo "$ac_t""no" 1>&6
8438 fi
8439 done
8440
8441
8442         if test $ac_cv_header_ltdl_h = no ; then
8443                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8444         fi
8445
8446         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8447 echo "configure:8448: checking for lt_dlinit in -lltdl" >&5
8448 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8449 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8450   echo $ac_n "(cached) $ac_c" 1>&6
8451 else
8452   ac_save_LIBS="$LIBS"
8453 LIBS="-lltdl  $LIBS"
8454 cat > conftest.$ac_ext <<EOF
8455 #line 8456 "configure"
8456 #include "confdefs.h"
8457 /* Override any gcc2 internal prototype to avoid an error.  */
8458 /* We use char because int might match the return type of a gcc2
8459     builtin and then its argument prototype would still apply.  */
8460 char lt_dlinit();
8461
8462 int main() {
8463 lt_dlinit()
8464 ; return 0; }
8465 EOF
8466 if { (eval echo configure:8467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8467   rm -rf conftest*
8468   eval "ac_cv_lib_$ac_lib_var=yes"
8469 else
8470   echo "configure: failed program was:" >&5
8471   cat conftest.$ac_ext >&5
8472   rm -rf conftest*
8473   eval "ac_cv_lib_$ac_lib_var=no"
8474 fi
8475 rm -f conftest*
8476 LIBS="$ac_save_LIBS"
8477
8478 fi
8479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8480   echo "$ac_t""yes" 1>&6
8481   
8482                 MODULES_LIBS=-lltdl
8483                 cat >> confdefs.h <<\EOF
8484 #define HAVE_LIBLTDL 1
8485 EOF
8486
8487         
8488 else
8489   echo "$ac_t""no" 1>&6
8490 fi
8491
8492
8493         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8494                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8495         fi
8496         ol_link_modules=yes
8497 else
8498         ol_with_bdb_module=static
8499         ol_with_dnssrv_module=static
8500         ol_with_hdb_module=static
8501         ol_with_ldap_module=static
8502         ol_with_ldbm_module=static
8503         ol_with_meta_module=static
8504         ol_with_monitor_module=static
8505         ol_with_null_module=static
8506         ol_with_passwd_module=static
8507         ol_with_perl_module=static
8508         ol_with_shell_module=static
8509         ol_with_sql_module=static
8510         if test $ol_with_dyngroup = mod ; then
8511                 echo "configure: warning: building static dyngroup overlay" 1>&2
8512                 ol_with_dyngroup=yes
8513         fi
8514         if test $ol_with_proxycache = mod ; then
8515                 echo "configure: warning: building static proxycache overlay" 1>&2
8516                 ol_with_proxycache=yes
8517         fi
8518 fi
8519
8520 # test for EBCDIC
8521 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8522 echo "configure:8523: checking for EBCDIC" >&5
8523 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8524   echo $ac_n "(cached) $ac_c" 1>&6
8525 else
8526   
8527         cat > conftest.$ac_ext <<EOF
8528 #line 8529 "configure"
8529 #include "confdefs.h"
8530
8531 #if !('M' == 0xd4)
8532 #include <__ASCII__/generate_error.h>
8533 #endif
8534
8535 EOF
8536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8537 { (eval echo configure:8538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8539 if test -z "$ac_err"; then
8540   rm -rf conftest*
8541   ol_cv_cpp_ebcdic=yes
8542 else
8543   echo "$ac_err" >&5
8544   echo "configure: failed program was:" >&5
8545   cat conftest.$ac_ext >&5
8546   rm -rf conftest*
8547   ol_cv_cpp_ebcdic=no
8548 fi
8549 rm -f conftest*
8550 fi
8551
8552 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8553 if test $ol_cv_cpp_ebcdic = yes ; then
8554         cat >> confdefs.h <<\EOF
8555 #define HAVE_EBCDIC 1
8556 EOF
8557
8558 fi
8559
8560 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8561 echo "configure:8562: checking for ANSI C header files" >&5
8562 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8563   echo $ac_n "(cached) $ac_c" 1>&6
8564 else
8565   cat > conftest.$ac_ext <<EOF
8566 #line 8567 "configure"
8567 #include "confdefs.h"
8568 #include <stdlib.h>
8569 #include <stdarg.h>
8570 #include <string.h>
8571 #include <float.h>
8572 EOF
8573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8574 { (eval echo configure:8575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8576 if test -z "$ac_err"; then
8577   rm -rf conftest*
8578   ol_cv_header_stdc=yes
8579 else
8580   echo "$ac_err" >&5
8581   echo "configure: failed program was:" >&5
8582   cat conftest.$ac_ext >&5
8583   rm -rf conftest*
8584   ol_cv_header_stdc=no
8585 fi
8586 rm -f conftest*
8587
8588 if test $ol_cv_header_stdc = yes; then
8589   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8590 cat > conftest.$ac_ext <<EOF
8591 #line 8592 "configure"
8592 #include "confdefs.h"
8593 #include <string.h>
8594 EOF
8595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8596   egrep "memchr" >/dev/null 2>&1; then
8597   :
8598 else
8599   rm -rf conftest*
8600   ol_cv_header_stdc=no
8601 fi
8602 rm -f conftest*
8603
8604 fi
8605
8606 if test $ol_cv_header_stdc = yes; then
8607   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8608 cat > conftest.$ac_ext <<EOF
8609 #line 8610 "configure"
8610 #include "confdefs.h"
8611 #include <stdlib.h>
8612 EOF
8613 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8614   egrep "free" >/dev/null 2>&1; then
8615   :
8616 else
8617   rm -rf conftest*
8618   ol_cv_header_stdc=no
8619 fi
8620 rm -f conftest*
8621
8622 fi
8623
8624 if test $ol_cv_header_stdc = yes; then
8625   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8626 if test "$cross_compiling" = yes; then
8627   :
8628 else
8629   cat > conftest.$ac_ext <<EOF
8630 #line 8631 "configure"
8631 #include "confdefs.h"
8632 #include <ctype.h>
8633 #ifndef HAVE_EBCDIC
8634 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8635 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8636 #else
8637 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8638                 || ('j' <= (c) && (c) <= 'r') \
8639                 || ('s' <= (c) && (c) <= 'z'))
8640 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8641 #endif
8642 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8643 int main () { int i; for (i = 0; i < 256; i++)
8644 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8645 exit (0); }
8646
8647 EOF
8648 if { (eval echo configure:8649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8649 then
8650   :
8651 else
8652   echo "configure: failed program was:" >&5
8653   cat conftest.$ac_ext >&5
8654   rm -fr conftest*
8655   ol_cv_header_stdc=no
8656 fi
8657 rm -fr conftest*
8658 fi
8659
8660 fi
8661 fi
8662
8663 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8664 if test $ol_cv_header_stdc = yes; then
8665   cat >> confdefs.h <<\EOF
8666 #define STDC_HEADERS 1
8667 EOF
8668
8669 fi
8670 ac_cv_header_stdc=disable
8671
8672
8673 if test $ol_cv_header_stdc != yes; then
8674         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8675 fi
8676
8677 ac_header_dirent=no
8678 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8679 do
8680 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8681 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8682 echo "configure:8683: checking for $ac_hdr that defines DIR" >&5
8683 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8684   echo $ac_n "(cached) $ac_c" 1>&6
8685 else
8686   cat > conftest.$ac_ext <<EOF
8687 #line 8688 "configure"
8688 #include "confdefs.h"
8689 #include <sys/types.h>
8690 #include <$ac_hdr>
8691 int main() {
8692 DIR *dirp = 0;
8693 ; return 0; }
8694 EOF
8695 if { (eval echo configure:8696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8696   rm -rf conftest*
8697   eval "ac_cv_header_dirent_$ac_safe=yes"
8698 else
8699   echo "configure: failed program was:" >&5
8700   cat conftest.$ac_ext >&5
8701   rm -rf conftest*
8702   eval "ac_cv_header_dirent_$ac_safe=no"
8703 fi
8704 rm -f conftest*
8705 fi
8706 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8707   echo "$ac_t""yes" 1>&6
8708     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8709   cat >> confdefs.h <<EOF
8710 #define $ac_tr_hdr 1
8711 EOF
8712  ac_header_dirent=$ac_hdr; break
8713 else
8714   echo "$ac_t""no" 1>&6
8715 fi
8716 done
8717 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8718 if test $ac_header_dirent = dirent.h; then
8719 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8720 echo "configure:8721: checking for opendir in -ldir" >&5
8721 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8722 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8723   echo $ac_n "(cached) $ac_c" 1>&6
8724 else
8725   ac_save_LIBS="$LIBS"
8726 LIBS="-ldir  $LIBS"
8727 cat > conftest.$ac_ext <<EOF
8728 #line 8729 "configure"
8729 #include "confdefs.h"
8730 /* Override any gcc2 internal prototype to avoid an error.  */
8731 /* We use char because int might match the return type of a gcc2
8732     builtin and then its argument prototype would still apply.  */
8733 char opendir();
8734
8735 int main() {
8736 opendir()
8737 ; return 0; }
8738 EOF
8739 if { (eval echo configure:8740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8740   rm -rf conftest*
8741   eval "ac_cv_lib_$ac_lib_var=yes"
8742 else
8743   echo "configure: failed program was:" >&5
8744   cat conftest.$ac_ext >&5
8745   rm -rf conftest*
8746   eval "ac_cv_lib_$ac_lib_var=no"
8747 fi
8748 rm -f conftest*
8749 LIBS="$ac_save_LIBS"
8750
8751 fi
8752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8753   echo "$ac_t""yes" 1>&6
8754   LIBS="$LIBS -ldir"
8755 else
8756   echo "$ac_t""no" 1>&6
8757 fi
8758
8759 else
8760 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8761 echo "configure:8762: checking for opendir in -lx" >&5
8762 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8764   echo $ac_n "(cached) $ac_c" 1>&6
8765 else
8766   ac_save_LIBS="$LIBS"
8767 LIBS="-lx  $LIBS"
8768 cat > conftest.$ac_ext <<EOF
8769 #line 8770 "configure"
8770 #include "confdefs.h"
8771 /* Override any gcc2 internal prototype to avoid an error.  */
8772 /* We use char because int might match the return type of a gcc2
8773     builtin and then its argument prototype would still apply.  */
8774 char opendir();
8775
8776 int main() {
8777 opendir()
8778 ; return 0; }
8779 EOF
8780 if { (eval echo configure:8781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8781   rm -rf conftest*
8782   eval "ac_cv_lib_$ac_lib_var=yes"
8783 else
8784   echo "configure: failed program was:" >&5
8785   cat conftest.$ac_ext >&5
8786   rm -rf conftest*
8787   eval "ac_cv_lib_$ac_lib_var=no"
8788 fi
8789 rm -f conftest*
8790 LIBS="$ac_save_LIBS"
8791
8792 fi
8793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8794   echo "$ac_t""yes" 1>&6
8795   LIBS="$LIBS -lx"
8796 else
8797   echo "$ac_t""no" 1>&6
8798 fi
8799
8800 fi
8801
8802 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8803 echo "configure:8804: checking for sys/wait.h that is POSIX.1 compatible" >&5
8804 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8805   echo $ac_n "(cached) $ac_c" 1>&6
8806 else
8807   cat > conftest.$ac_ext <<EOF
8808 #line 8809 "configure"
8809 #include "confdefs.h"
8810 #include <sys/types.h>
8811 #include <sys/wait.h>
8812 #ifndef WEXITSTATUS
8813 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8814 #endif
8815 #ifndef WIFEXITED
8816 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8817 #endif
8818 int main() {
8819 int s;
8820 wait (&s);
8821 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8822 ; return 0; }
8823 EOF
8824 if { (eval echo configure:8825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8825   rm -rf conftest*
8826   ac_cv_header_sys_wait_h=yes
8827 else
8828   echo "configure: failed program was:" >&5
8829   cat conftest.$ac_ext >&5
8830   rm -rf conftest*
8831   ac_cv_header_sys_wait_h=no
8832 fi
8833 rm -f conftest*
8834 fi
8835
8836 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8837 if test $ac_cv_header_sys_wait_h = yes; then
8838   cat >> confdefs.h <<\EOF
8839 #define HAVE_SYS_WAIT_H 1
8840 EOF
8841
8842 fi
8843
8844 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8845 echo "configure:8846: checking POSIX termios" >&5
8846 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8847   echo $ac_n "(cached) $ac_c" 1>&6
8848 else
8849   cat > conftest.$ac_ext <<EOF
8850 #line 8851 "configure"
8851 #include "confdefs.h"
8852 #include <sys/types.h>
8853 #include <unistd.h>
8854 #include <termios.h>
8855 int main() {
8856 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8857    tcgetattr(0, 0);
8858 ; return 0; }
8859 EOF
8860 if { (eval echo configure:8861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8861   rm -rf conftest*
8862   am_cv_sys_posix_termios=yes
8863 else
8864   echo "configure: failed program was:" >&5
8865   cat conftest.$ac_ext >&5
8866   rm -rf conftest*
8867   am_cv_sys_posix_termios=no
8868 fi
8869 rm -f conftest*
8870 fi
8871
8872 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8873
8874
8875  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8876 echo "configure:8877: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8877 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8878   echo $ac_n "(cached) $ac_c" 1>&6
8879 else
8880   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8881
8882   gwinsz_in_termios_h=no
8883   if test $am_cv_sys_posix_termios = yes; then
8884     cat > conftest.$ac_ext <<EOF
8885 #line 8886 "configure"
8886 #include "confdefs.h"
8887 #include <sys/types.h>
8888 #     include <termios.h>
8889 #     ifdef TIOCGWINSZ
8890         yes
8891 #     endif
8892     
8893 EOF
8894 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8895   egrep "yes" >/dev/null 2>&1; then
8896   rm -rf conftest*
8897   gwinsz_in_termios_h=yes
8898 fi
8899 rm -f conftest*
8900
8901   fi
8902
8903   if test $gwinsz_in_termios_h = no; then
8904     cat > conftest.$ac_ext <<EOF
8905 #line 8906 "configure"
8906 #include "confdefs.h"
8907 #include <sys/types.h>
8908 #     include <sys/ioctl.h>
8909 #     ifdef TIOCGWINSZ
8910         yes
8911 #     endif
8912     
8913 EOF
8914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8915   egrep "yes" >/dev/null 2>&1; then
8916   rm -rf conftest*
8917   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8918 fi
8919 rm -f conftest*
8920
8921   fi
8922   
8923 fi
8924
8925 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8926   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8927     cat >> confdefs.h <<\EOF
8928 #define GWINSZ_IN_SYS_IOCTL 1
8929 EOF
8930
8931   fi
8932
8933 if test $am_cv_sys_posix_termios = yes ; then
8934         cat >> confdefs.h <<\EOF
8935 #define HAVE_POSIX_TERMIOS 1
8936 EOF
8937
8938 fi
8939
8940 for ac_hdr in \
8941         arpa/inet.h             \
8942         arpa/nameser.h  \
8943         assert.h                \
8944         bits/types.h    \
8945         conio.h                 \
8946         crypt.h                 \
8947         direct.h                \
8948         errno.h                 \
8949         fcntl.h                 \
8950         filio.h                 \
8951         getopt.h                \
8952         grp.h                   \
8953         io.h                    \
8954         libutil.h               \
8955         limits.h                \
8956         locale.h                \
8957         netinet/tcp.h   \
8958         malloc.h                \
8959         memory.h                \
8960         psap.h                  \
8961         pwd.h                   \
8962         process.h               \
8963         resolv.h                \
8964         sgtty.h                 \
8965         shadow.h                \
8966         stddef.h                \
8967         string.h                \
8968         strings.h               \
8969         sysexits.h              \
8970         sys/file.h              \
8971         sys/filio.h             \
8972         sys/errno.h             \
8973         sys/ioctl.h             \
8974         sys/param.h             \
8975         sys/resource.h  \
8976         sys/select.h    \
8977         sys/socket.h    \
8978         sys/stat.h              \
8979         sys/syslog.h    \
8980         sys/time.h              \
8981         sys/types.h             \
8982         sys/ucred.h             \
8983         sys/uio.h               \
8984         syslog.h                \
8985         termios.h               \
8986         unistd.h                \
8987         winsock.h               \
8988         winsock2.h              \
8989
8990 do
8991 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8992 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8993 echo "configure:8994: checking for $ac_hdr" >&5
8994 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8995   echo $ac_n "(cached) $ac_c" 1>&6
8996 else
8997   cat > conftest.$ac_ext <<EOF
8998 #line 8999 "configure"
8999 #include "confdefs.h"
9000 #include <$ac_hdr>
9001 EOF
9002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9003 { (eval echo configure:9004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9005 if test -z "$ac_err"; then
9006   rm -rf conftest*
9007   eval "ac_cv_header_$ac_safe=yes"
9008 else
9009   echo "$ac_err" >&5
9010   echo "configure: failed program was:" >&5
9011   cat conftest.$ac_ext >&5
9012   rm -rf conftest*
9013   eval "ac_cv_header_$ac_safe=no"
9014 fi
9015 rm -f conftest*
9016 fi
9017 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9018   echo "$ac_t""yes" 1>&6
9019     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9020   cat >> confdefs.h <<EOF
9021 #define $ac_tr_hdr 1
9022 EOF
9023  
9024 else
9025   echo "$ac_t""no" 1>&6
9026 fi
9027 done
9028
9029
9030
9031
9032 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9033 echo "configure:9034: checking for sigset in -lV3" >&5
9034 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9035 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9036   echo $ac_n "(cached) $ac_c" 1>&6
9037 else
9038   ac_save_LIBS="$LIBS"
9039 LIBS="-lV3  $LIBS"
9040 cat > conftest.$ac_ext <<EOF
9041 #line 9042 "configure"
9042 #include "confdefs.h"
9043 /* Override any gcc2 internal prototype to avoid an error.  */
9044 /* We use char because int might match the return type of a gcc2
9045     builtin and then its argument prototype would still apply.  */
9046 char sigset();
9047
9048 int main() {
9049 sigset()
9050 ; return 0; }
9051 EOF
9052 if { (eval echo configure:9053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9053   rm -rf conftest*
9054   eval "ac_cv_lib_$ac_lib_var=yes"
9055 else
9056   echo "configure: failed program was:" >&5
9057   cat conftest.$ac_ext >&5
9058   rm -rf conftest*
9059   eval "ac_cv_lib_$ac_lib_var=no"
9060 fi
9061 rm -f conftest*
9062 LIBS="$ac_save_LIBS"
9063
9064 fi
9065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9066   echo "$ac_t""yes" 1>&6
9067     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9068     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9069   cat >> confdefs.h <<EOF
9070 #define $ac_tr_lib 1
9071 EOF
9072
9073   LIBS="-lV3 $LIBS"
9074
9075 else
9076   echo "$ac_t""no" 1>&6
9077 fi
9078
9079
9080 if test "$ac_cv_header_winsock_h" = yes; then
9081 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9082 echo "configure:9083: checking for winsock" >&5
9083 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9084   echo $ac_n "(cached) $ac_c" 1>&6
9085 else
9086   save_LIBS="$LIBS"
9087 for curlib in ws2_32 wsock32; do
9088         LIBS="$LIBS -l$curlib"
9089         cat > conftest.$ac_ext <<EOF
9090 #line 9091 "configure"
9091 #include "confdefs.h"
9092 #include <winsock.h>
9093                         
9094 int main() {
9095
9096                         socket(0,0,0);
9097                         select(0,NULL,NULL,NULL,NULL);
9098                         closesocket(0);
9099                         gethostname(NULL,0);
9100                         
9101 ; return 0; }
9102 EOF
9103 if { (eval echo configure:9104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9104   rm -rf conftest*
9105   ol_cv_winsock=yes
9106 else
9107   echo "configure: failed program was:" >&5
9108   cat conftest.$ac_ext >&5
9109   rm -rf conftest*
9110   ol_cv_winsock=no
9111 fi
9112 rm -f conftest*
9113
9114         if test $ol_cv_winsock = yes; then
9115                 cat >> confdefs.h <<\EOF
9116 #define HAVE_WINSOCK 1
9117 EOF
9118
9119                 ac_cv_func_socket=yes
9120                 ac_cv_func_select=yes
9121                 ac_cv_func_closesocket=yes
9122                 ac_cv_func_gethostname=yes
9123                 if test $curlib = ws2_32; then
9124                         ol_cv_winsock=winsock2
9125                         cat >> confdefs.h <<\EOF
9126 #define HAVE_WINSOCK2 1
9127 EOF
9128
9129                 fi
9130                 break
9131         fi
9132         LIBS="$save_LIBS"
9133 done
9134 fi
9135
9136 echo "$ac_t""$ol_cv_winsock" 1>&6
9137 fi
9138
9139
9140 echo $ac_n "checking for socket""... $ac_c" 1>&6
9141 echo "configure:9142: checking for socket" >&5
9142 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9143   echo $ac_n "(cached) $ac_c" 1>&6
9144 else
9145   cat > conftest.$ac_ext <<EOF
9146 #line 9147 "configure"
9147 #include "confdefs.h"
9148 /* System header to define __stub macros and hopefully few prototypes,
9149     which can conflict with char socket(); below.  */
9150 #include <assert.h>
9151 /* Override any gcc2 internal prototype to avoid an error.  */
9152 /* We use char because int might match the return type of a gcc2
9153     builtin and then its argument prototype would still apply.  */
9154 char socket();
9155 char (*f)();
9156
9157 int main() {
9158
9159 /* The GNU C library defines this for functions which it implements
9160     to always fail with ENOSYS.  Some functions are actually named
9161     something starting with __ and the normal name is an alias.  */
9162 #if defined (__stub_socket) || defined (__stub___socket)
9163 choke me
9164 #else
9165 f = socket;
9166 #endif
9167
9168 ; return 0; }
9169 EOF
9170 if { (eval echo configure:9171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9171   rm -rf conftest*
9172   eval "ac_cv_func_socket=yes"
9173 else
9174   echo "configure: failed program was:" >&5
9175   cat conftest.$ac_ext >&5
9176   rm -rf conftest*
9177   eval "ac_cv_func_socket=no"
9178 fi
9179 rm -f conftest*
9180 fi
9181
9182 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9183   echo "$ac_t""yes" 1>&6
9184   :
9185 else
9186   echo "$ac_t""no" 1>&6
9187         
9188         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9189 echo "configure:9190: checking for main in -lsocket" >&5
9190 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9191 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9192   echo $ac_n "(cached) $ac_c" 1>&6
9193 else
9194   ac_save_LIBS="$LIBS"
9195 LIBS="-lsocket  $LIBS"
9196 cat > conftest.$ac_ext <<EOF
9197 #line 9198 "configure"
9198 #include "confdefs.h"
9199
9200 int main() {
9201 main()
9202 ; return 0; }
9203 EOF
9204 if { (eval echo configure:9205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9205   rm -rf conftest*
9206   eval "ac_cv_lib_$ac_lib_var=yes"
9207 else
9208   echo "configure: failed program was:" >&5
9209   cat conftest.$ac_ext >&5
9210   rm -rf conftest*
9211   eval "ac_cv_lib_$ac_lib_var=no"
9212 fi
9213 rm -f conftest*
9214 LIBS="$ac_save_LIBS"
9215
9216 fi
9217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9218   echo "$ac_t""yes" 1>&6
9219     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9220     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9221   cat >> confdefs.h <<EOF
9222 #define $ac_tr_lib 1
9223 EOF
9224
9225   LIBS="-lsocket $LIBS"
9226
9227 else
9228   echo "$ac_t""no" 1>&6
9229 fi
9230
9231         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9232 echo "configure:9233: checking for main in -lnet" >&5
9233 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9234 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9235   echo $ac_n "(cached) $ac_c" 1>&6
9236 else
9237   ac_save_LIBS="$LIBS"
9238 LIBS="-lnet  $LIBS"
9239 cat > conftest.$ac_ext <<EOF
9240 #line 9241 "configure"
9241 #include "confdefs.h"
9242
9243 int main() {
9244 main()
9245 ; return 0; }
9246 EOF
9247 if { (eval echo configure:9248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9248   rm -rf conftest*
9249   eval "ac_cv_lib_$ac_lib_var=yes"
9250 else
9251   echo "configure: failed program was:" >&5
9252   cat conftest.$ac_ext >&5
9253   rm -rf conftest*
9254   eval "ac_cv_lib_$ac_lib_var=no"
9255 fi
9256 rm -f conftest*
9257 LIBS="$ac_save_LIBS"
9258
9259 fi
9260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9261   echo "$ac_t""yes" 1>&6
9262     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9263     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9264   cat >> confdefs.h <<EOF
9265 #define $ac_tr_lib 1
9266 EOF
9267
9268   LIBS="-lnet $LIBS"
9269
9270 else
9271   echo "$ac_t""no" 1>&6
9272 fi
9273
9274         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9275 echo "configure:9276: checking for main in -lnsl_s" >&5
9276 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9277 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9278   echo $ac_n "(cached) $ac_c" 1>&6
9279 else
9280   ac_save_LIBS="$LIBS"
9281 LIBS="-lnsl_s  $LIBS"
9282 cat > conftest.$ac_ext <<EOF
9283 #line 9284 "configure"
9284 #include "confdefs.h"
9285
9286 int main() {
9287 main()
9288 ; return 0; }
9289 EOF
9290 if { (eval echo configure:9291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9291   rm -rf conftest*
9292   eval "ac_cv_lib_$ac_lib_var=yes"
9293 else
9294   echo "configure: failed program was:" >&5
9295   cat conftest.$ac_ext >&5
9296   rm -rf conftest*
9297   eval "ac_cv_lib_$ac_lib_var=no"
9298 fi
9299 rm -f conftest*
9300 LIBS="$ac_save_LIBS"
9301
9302 fi
9303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9304   echo "$ac_t""yes" 1>&6
9305     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9306     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9307   cat >> confdefs.h <<EOF
9308 #define $ac_tr_lib 1
9309 EOF
9310
9311   LIBS="-lnsl_s $LIBS"
9312
9313 else
9314   echo "$ac_t""no" 1>&6
9315 fi
9316
9317         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9318 echo "configure:9319: checking for main in -lnsl" >&5
9319 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9320 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9321   echo $ac_n "(cached) $ac_c" 1>&6
9322 else
9323   ac_save_LIBS="$LIBS"
9324 LIBS="-lnsl  $LIBS"
9325 cat > conftest.$ac_ext <<EOF
9326 #line 9327 "configure"
9327 #include "confdefs.h"
9328
9329 int main() {
9330 main()
9331 ; return 0; }
9332 EOF
9333 if { (eval echo configure:9334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9334   rm -rf conftest*
9335   eval "ac_cv_lib_$ac_lib_var=yes"
9336 else
9337   echo "configure: failed program was:" >&5
9338   cat conftest.$ac_ext >&5
9339   rm -rf conftest*
9340   eval "ac_cv_lib_$ac_lib_var=no"
9341 fi
9342 rm -f conftest*
9343 LIBS="$ac_save_LIBS"
9344
9345 fi
9346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9347   echo "$ac_t""yes" 1>&6
9348     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9349     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9350   cat >> confdefs.h <<EOF
9351 #define $ac_tr_lib 1
9352 EOF
9353
9354   LIBS="-lnsl $LIBS"
9355
9356 else
9357   echo "$ac_t""no" 1>&6
9358 fi
9359
9360         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9361 echo "configure:9362: checking for socket in -linet" >&5
9362 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9363 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9364   echo $ac_n "(cached) $ac_c" 1>&6
9365 else
9366   ac_save_LIBS="$LIBS"
9367 LIBS="-linet  $LIBS"
9368 cat > conftest.$ac_ext <<EOF
9369 #line 9370 "configure"
9370 #include "confdefs.h"
9371 /* Override any gcc2 internal prototype to avoid an error.  */
9372 /* We use char because int might match the return type of a gcc2
9373     builtin and then its argument prototype would still apply.  */
9374 char socket();
9375
9376 int main() {
9377 socket()
9378 ; return 0; }
9379 EOF
9380 if { (eval echo configure:9381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9381   rm -rf conftest*
9382   eval "ac_cv_lib_$ac_lib_var=yes"
9383 else
9384   echo "configure: failed program was:" >&5
9385   cat conftest.$ac_ext >&5
9386   rm -rf conftest*
9387   eval "ac_cv_lib_$ac_lib_var=no"
9388 fi
9389 rm -f conftest*
9390 LIBS="$ac_save_LIBS"
9391
9392 fi
9393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9394   echo "$ac_t""yes" 1>&6
9395     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9396     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9397   cat >> confdefs.h <<EOF
9398 #define $ac_tr_lib 1
9399 EOF
9400
9401   LIBS="-linet $LIBS"
9402
9403 else
9404   echo "$ac_t""no" 1>&6
9405 fi
9406
9407         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9408 echo "configure:9409: checking for main in -lgen" >&5
9409 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9410 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9411   echo $ac_n "(cached) $ac_c" 1>&6
9412 else
9413   ac_save_LIBS="$LIBS"
9414 LIBS="-lgen  $LIBS"
9415 cat > conftest.$ac_ext <<EOF
9416 #line 9417 "configure"
9417 #include "confdefs.h"
9418
9419 int main() {
9420 main()
9421 ; return 0; }
9422 EOF
9423 if { (eval echo configure:9424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9424   rm -rf conftest*
9425   eval "ac_cv_lib_$ac_lib_var=yes"
9426 else
9427   echo "configure: failed program was:" >&5
9428   cat conftest.$ac_ext >&5
9429   rm -rf conftest*
9430   eval "ac_cv_lib_$ac_lib_var=no"
9431 fi
9432 rm -f conftest*
9433 LIBS="$ac_save_LIBS"
9434
9435 fi
9436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9437   echo "$ac_t""yes" 1>&6
9438     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9439     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9440   cat >> confdefs.h <<EOF
9441 #define $ac_tr_lib 1
9442 EOF
9443
9444   LIBS="-lgen $LIBS"
9445
9446 else
9447   echo "$ac_t""no" 1>&6
9448 fi
9449
9450
9451 fi
9452
9453
9454 echo $ac_n "checking for select""... $ac_c" 1>&6
9455 echo "configure:9456: checking for select" >&5
9456 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9457   echo $ac_n "(cached) $ac_c" 1>&6
9458 else
9459   cat > conftest.$ac_ext <<EOF
9460 #line 9461 "configure"
9461 #include "confdefs.h"
9462 /* System header to define __stub macros and hopefully few prototypes,
9463     which can conflict with char select(); below.  */
9464 #include <assert.h>
9465 /* Override any gcc2 internal prototype to avoid an error.  */
9466 /* We use char because int might match the return type of a gcc2
9467     builtin and then its argument prototype would still apply.  */
9468 char select();
9469 char (*f)();
9470
9471 int main() {
9472
9473 /* The GNU C library defines this for functions which it implements
9474     to always fail with ENOSYS.  Some functions are actually named
9475     something starting with __ and the normal name is an alias.  */
9476 #if defined (__stub_select) || defined (__stub___select)
9477 choke me
9478 #else
9479 f = select;
9480 #endif
9481
9482 ; return 0; }
9483 EOF
9484 if { (eval echo configure:9485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9485   rm -rf conftest*
9486   eval "ac_cv_func_select=yes"
9487 else
9488   echo "configure: failed program was:" >&5
9489   cat conftest.$ac_ext >&5
9490   rm -rf conftest*
9491   eval "ac_cv_func_select=no"
9492 fi
9493 rm -f conftest*
9494 fi
9495
9496 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9497   echo "$ac_t""yes" 1>&6
9498   :
9499 else
9500   echo "$ac_t""no" 1>&6
9501 { echo "configure: error: select() required." 1>&2; exit 1; }
9502 fi
9503
9504
9505 if test "${ac_cv_header_winsock_h}" != yes; then
9506                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9507 echo "configure:9508: checking types of arguments for select()" >&5
9508  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9509   echo $ac_n "(cached) $ac_c" 1>&6
9510 else
9511    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9512   echo $ac_n "(cached) $ac_c" 1>&6
9513 else
9514     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9515   echo $ac_n "(cached) $ac_c" 1>&6
9516 else
9517      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9518      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9519       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9520        cat > conftest.$ac_ext <<EOF
9521 #line 9522 "configure"
9522 #include "confdefs.h"
9523 #ifdef HAVE_SYS_TYPES_H
9524 #include <sys/types.h>
9525 #endif
9526 #ifdef HAVE_SYS_TIME_H
9527 #include <sys/time.h>
9528 #endif
9529 #ifdef HAVE_SYS_SELECT_H
9530 #include <sys/select.h>
9531 #endif
9532 #ifdef HAVE_SYS_SOCKET_H
9533 #include <sys/socket.h>
9534 #endif
9535 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);
9536 int main() {
9537
9538 ; return 0; }
9539 EOF
9540 if { (eval echo configure:9541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9541   rm -rf conftest*
9542           ac_not_found=no ; break 3
9543 else
9544   echo "configure: failed program was:" >&5
9545   cat conftest.$ac_ext >&5
9546   rm -rf conftest*
9547   ac_not_found=yes
9548 fi
9549 rm -f conftest*
9550       done
9551      done
9552     done
9553    
9554 fi
9555   
9556 fi
9557  
9558 fi
9559  if test "$ac_not_found" = yes; then
9560   ac_cv_func_select_arg1=int 
9561   ac_cv_func_select_arg234='int *' 
9562   ac_cv_func_select_arg5='struct timeval *'
9563  fi
9564  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9565  cat >> confdefs.h <<EOF
9566 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9567 EOF
9568
9569  cat >> confdefs.h <<EOF
9570 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9571 EOF
9572
9573  cat >> confdefs.h <<EOF
9574 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9575 EOF
9576
9577
9578 fi
9579
9580
9581 for ac_hdr in regex.h 
9582 do
9583 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9584 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9585 echo "configure:9586: checking for $ac_hdr" >&5
9586 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9587   echo $ac_n "(cached) $ac_c" 1>&6
9588 else
9589   cat > conftest.$ac_ext <<EOF
9590 #line 9591 "configure"
9591 #include "confdefs.h"
9592 #include <$ac_hdr>
9593 EOF
9594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9595 { (eval echo configure:9596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9597 if test -z "$ac_err"; then
9598   rm -rf conftest*
9599   eval "ac_cv_header_$ac_safe=yes"
9600 else
9601   echo "$ac_err" >&5
9602   echo "configure: failed program was:" >&5
9603   cat conftest.$ac_ext >&5
9604   rm -rf conftest*
9605   eval "ac_cv_header_$ac_safe=no"
9606 fi
9607 rm -f conftest*
9608 fi
9609 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9610   echo "$ac_t""yes" 1>&6
9611     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9612   cat >> confdefs.h <<EOF
9613 #define $ac_tr_hdr 1
9614 EOF
9615  
9616 else
9617   echo "$ac_t""no" 1>&6
9618 fi
9619 done
9620
9621 if test "$ac_cv_header_regex_h" != yes ; then
9622         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9623 fi
9624
9625 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9626 echo "configure:9627: checking for library containing regfree" >&5
9627 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9628   echo $ac_n "(cached) $ac_c" 1>&6
9629 else
9630   ac_func_search_save_LIBS="$LIBS"
9631 ac_cv_search_regfree="no"
9632 cat > conftest.$ac_ext <<EOF
9633 #line 9634 "configure"
9634 #include "confdefs.h"
9635 /* Override any gcc2 internal prototype to avoid an error.  */
9636 /* We use char because int might match the return type of a gcc2
9637     builtin and then its argument prototype would still apply.  */
9638 char regfree();
9639
9640 int main() {
9641 regfree()
9642 ; return 0; }
9643 EOF
9644 if { (eval echo configure:9645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9645   rm -rf conftest*
9646   ac_cv_search_regfree="none required"
9647 else
9648   echo "configure: failed program was:" >&5
9649   cat conftest.$ac_ext >&5
9650 fi
9651 rm -f conftest*
9652 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9653 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9654 cat > conftest.$ac_ext <<EOF
9655 #line 9656 "configure"
9656 #include "confdefs.h"
9657 /* Override any gcc2 internal prototype to avoid an error.  */
9658 /* We use char because int might match the return type of a gcc2
9659     builtin and then its argument prototype would still apply.  */
9660 char regfree();
9661
9662 int main() {
9663 regfree()
9664 ; return 0; }
9665 EOF
9666 if { (eval echo configure:9667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9667   rm -rf conftest*
9668   ac_cv_search_regfree="-l$ac_lib"
9669 break
9670 else
9671   echo "configure: failed program was:" >&5
9672   cat conftest.$ac_ext >&5
9673 fi
9674 rm -f conftest*
9675 done
9676 LIBS="$ac_func_search_save_LIBS"
9677 fi
9678
9679 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9680 if test "$ac_cv_search_regfree" != "no"; then
9681   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9682   :
9683 else :
9684   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9685 fi
9686
9687
9688 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9689 echo "configure:9690: checking for compatible POSIX regex" >&5
9690 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9691   echo $ac_n "(cached) $ac_c" 1>&6
9692 else
9693   
9694         if test "$cross_compiling" = yes; then
9695   ol_cv_c_posix_regex=cross
9696 else
9697   cat > conftest.$ac_ext <<EOF
9698 #line 9699 "configure"
9699 #include "confdefs.h"
9700
9701 #include <sys/types.h>
9702 #include <regex.h>
9703 static char *pattern, *string;
9704 main()
9705 {
9706         int rc;
9707         regex_t re;
9708
9709         pattern = "^A";
9710
9711         if(regcomp(&re, pattern, 0)) {
9712                 return -1;
9713         }
9714         
9715         string = "ALL MATCH";
9716         
9717         rc = regexec(&re, string, 0, (void*)0, 0);
9718
9719         regfree(&re);
9720
9721         return rc;
9722 }
9723 EOF
9724 if { (eval echo configure:9725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9725 then
9726   ol_cv_c_posix_regex=yes
9727 else
9728   echo "configure: failed program was:" >&5
9729   cat conftest.$ac_ext >&5
9730   rm -fr conftest*
9731   ol_cv_c_posix_regex=no
9732 fi
9733 rm -fr conftest*
9734 fi
9735
9736 fi
9737
9738 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9739
9740 if test "$ol_cv_c_posix_regex" = no ; then
9741         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9742 fi
9743
9744
9745 have_uuid=no
9746 for ac_hdr in sys/uuid.h
9747 do
9748 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9749 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9750 echo "configure:9751: checking for $ac_hdr" >&5
9751 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9752   echo $ac_n "(cached) $ac_c" 1>&6
9753 else
9754   cat > conftest.$ac_ext <<EOF
9755 #line 9756 "configure"
9756 #include "confdefs.h"
9757 #include <$ac_hdr>
9758 EOF
9759 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9760 { (eval echo configure:9761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9761 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9762 if test -z "$ac_err"; then
9763   rm -rf conftest*
9764   eval "ac_cv_header_$ac_safe=yes"
9765 else
9766   echo "$ac_err" >&5
9767   echo "configure: failed program was:" >&5
9768   cat conftest.$ac_ext >&5
9769   rm -rf conftest*
9770   eval "ac_cv_header_$ac_safe=no"
9771 fi
9772 rm -f conftest*
9773 fi
9774 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9775   echo "$ac_t""yes" 1>&6
9776     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9777   cat >> confdefs.h <<EOF
9778 #define $ac_tr_hdr 1
9779 EOF
9780  
9781 else
9782   echo "$ac_t""no" 1>&6
9783 fi
9784 done
9785
9786 if test $ac_cv_header_sys_uuid_h = yes ; then
9787         save_LIBS="$LIBS"
9788         
9789 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9790 echo "configure:9791: checking for library containing uuid_to_str" >&5
9791 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9792   echo $ac_n "(cached) $ac_c" 1>&6
9793 else
9794   ac_func_search_save_LIBS="$LIBS"
9795 ac_cv_search_uuid_to_str="no"
9796 cat > conftest.$ac_ext <<EOF
9797 #line 9798 "configure"
9798 #include "confdefs.h"
9799 /* Override any gcc2 internal prototype to avoid an error.  */
9800 /* We use char because int might match the return type of a gcc2
9801     builtin and then its argument prototype would still apply.  */
9802 char uuid_to_str();
9803
9804 int main() {
9805 uuid_to_str()
9806 ; return 0; }
9807 EOF
9808 if { (eval echo configure:9809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9809   rm -rf conftest*
9810   ac_cv_search_uuid_to_str="none required"
9811 else
9812   echo "configure: failed program was:" >&5
9813   cat conftest.$ac_ext >&5
9814 fi
9815 rm -f conftest*
9816 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9817 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9818 cat > conftest.$ac_ext <<EOF
9819 #line 9820 "configure"
9820 #include "confdefs.h"
9821 /* Override any gcc2 internal prototype to avoid an error.  */
9822 /* We use char because int might match the return type of a gcc2
9823     builtin and then its argument prototype would still apply.  */
9824 char uuid_to_str();
9825
9826 int main() {
9827 uuid_to_str()
9828 ; return 0; }
9829 EOF
9830 if { (eval echo configure:9831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9831   rm -rf conftest*
9832   ac_cv_search_uuid_to_str="-l$ac_lib"
9833 break
9834 else
9835   echo "configure: failed program was:" >&5
9836   cat conftest.$ac_ext >&5
9837 fi
9838 rm -f conftest*
9839 done
9840 LIBS="$ac_func_search_save_LIBS"
9841 fi
9842
9843 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9844 if test "$ac_cv_search_uuid_to_str" != "no"; then
9845   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9846   have_uuid=yes
9847 else :
9848   :
9849 fi
9850         LIBS="$save_LIBS"
9851
9852         if test have_uuid = yes ; then
9853                 cat >> confdefs.h <<\EOF
9854 #define HAVE_UUID_TO_STR 1
9855 EOF
9856
9857
9858                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9859                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9860         fi
9861 fi
9862
9863 if test $have_uuid = no ; then
9864         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9865 echo "configure:9866: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9866         save_LIBS="$LIBS"
9867         LIBS="$LIBS -lrpcrt4"
9868         cat > conftest.$ac_ext <<EOF
9869 #line 9870 "configure"
9870 #include "confdefs.h"
9871
9872                 int __stdcall UuidCreate(void *);
9873                 int __stdcall UuidToStringA(void *,void **);
9874                 
9875 int main() {
9876
9877                 UuidCreate(0);
9878                 UuidToStringA(0,0);
9879                 
9880 ; return 0; }
9881 EOF
9882 if { (eval echo configure:9883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9883   rm -rf conftest*
9884   need_rpcrt=yes
9885 else
9886   echo "configure: failed program was:" >&5
9887   cat conftest.$ac_ext >&5
9888   rm -rf conftest*
9889   need_rpcrt=no
9890 fi
9891 rm -f conftest*
9892         if test $need_rpcrt = yes; then
9893                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9894         fi
9895         LIBS="$save_LIBS"
9896         echo "$ac_t""$need_rpcrt" 1>&6
9897 fi
9898
9899 ol_link_dnssrv=no
9900 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9901 echo "configure:9902: checking for res_query" >&5
9902 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9903   echo $ac_n "(cached) $ac_c" 1>&6
9904 else
9905   cat > conftest.$ac_ext <<EOF
9906 #line 9907 "configure"
9907 #include "confdefs.h"
9908 /* System header to define __stub macros and hopefully few prototypes,
9909     which can conflict with char res_query(); below.  */
9910 #include <assert.h>
9911 /* Override any gcc2 internal prototype to avoid an error.  */
9912 /* We use char because int might match the return type of a gcc2
9913     builtin and then its argument prototype would still apply.  */
9914 char res_query();
9915 char (*f)();
9916
9917 int main() {
9918
9919 /* The GNU C library defines this for functions which it implements
9920     to always fail with ENOSYS.  Some functions are actually named
9921     something starting with __ and the normal name is an alias.  */
9922 #if defined (__stub_res_query) || defined (__stub___res_query)
9923 choke me
9924 #else
9925 f = res_query;
9926 #endif
9927
9928 ; return 0; }
9929 EOF
9930 if { (eval echo configure:9931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9931   rm -rf conftest*
9932   eval "ac_cv_func_res_query=yes"
9933 else
9934   echo "configure: failed program was:" >&5
9935   cat conftest.$ac_ext >&5
9936   rm -rf conftest*
9937   eval "ac_cv_func_res_query=no"
9938 fi
9939 rm -f conftest*
9940 fi
9941
9942 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9943   echo "$ac_t""yes" 1>&6
9944   :
9945 else
9946   echo "$ac_t""no" 1>&6
9947 fi
9948
9949 if test $ac_cv_func_res_query = no ; then 
9950         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9951 echo "configure:9952: checking for __res_query" >&5
9952 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9953   echo $ac_n "(cached) $ac_c" 1>&6
9954 else
9955   cat > conftest.$ac_ext <<EOF
9956 #line 9957 "configure"
9957 #include "confdefs.h"
9958 /* System header to define __stub macros and hopefully few prototypes,
9959     which can conflict with char __res_query(); below.  */
9960 #include <assert.h>
9961 /* Override any gcc2 internal prototype to avoid an error.  */
9962 /* We use char because int might match the return type of a gcc2
9963     builtin and then its argument prototype would still apply.  */
9964 char __res_query();
9965 char (*f)();
9966
9967 int main() {
9968
9969 /* The GNU C library defines this for functions which it implements
9970     to always fail with ENOSYS.  Some functions are actually named
9971     something starting with __ and the normal name is an alias.  */
9972 #if defined (__stub___res_query) || defined (__stub_____res_query)
9973 choke me
9974 #else
9975 f = __res_query;
9976 #endif
9977
9978 ; return 0; }
9979 EOF
9980 if { (eval echo configure:9981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9981   rm -rf conftest*
9982   eval "ac_cv_func___res_query=yes"
9983 else
9984   echo "configure: failed program was:" >&5
9985   cat conftest.$ac_ext >&5
9986   rm -rf conftest*
9987   eval "ac_cv_func___res_query=no"
9988 fi
9989 rm -f conftest*
9990 fi
9991
9992 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9993   echo "$ac_t""yes" 1>&6
9994   :
9995 else
9996   echo "$ac_t""no" 1>&6
9997 fi
9998
9999         ac_cv_func_res_query=$ac_cv_func___res_query
10000 fi
10001
10002 if test $ac_cv_func_res_query = no ; then 
10003         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10004 echo "configure:10005: checking for res_query in -lbind" >&5
10005 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10006 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10007   echo $ac_n "(cached) $ac_c" 1>&6
10008 else
10009   ac_save_LIBS="$LIBS"
10010 LIBS="-lbind  $LIBS"
10011 cat > conftest.$ac_ext <<EOF
10012 #line 10013 "configure"
10013 #include "confdefs.h"
10014 /* Override any gcc2 internal prototype to avoid an error.  */
10015 /* We use char because int might match the return type of a gcc2
10016     builtin and then its argument prototype would still apply.  */
10017 char res_query();
10018
10019 int main() {
10020 res_query()
10021 ; return 0; }
10022 EOF
10023 if { (eval echo configure:10024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10024   rm -rf conftest*
10025   eval "ac_cv_lib_$ac_lib_var=yes"
10026 else
10027   echo "configure: failed program was:" >&5
10028   cat conftest.$ac_ext >&5
10029   rm -rf conftest*
10030   eval "ac_cv_lib_$ac_lib_var=no"
10031 fi
10032 rm -f conftest*
10033 LIBS="$ac_save_LIBS"
10034
10035 fi
10036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10037   echo "$ac_t""yes" 1>&6
10038     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10039     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10040   cat >> confdefs.h <<EOF
10041 #define $ac_tr_lib 1
10042 EOF
10043
10044   LIBS="-lbind $LIBS"
10045
10046 else
10047   echo "$ac_t""no" 1>&6
10048 fi
10049
10050         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10051 fi
10052
10053 if test $ac_cv_func_res_query = no ; then 
10054         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10055 echo "configure:10056: checking for __res_query in -lbind" >&5
10056 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10057 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10058   echo $ac_n "(cached) $ac_c" 1>&6
10059 else
10060   ac_save_LIBS="$LIBS"
10061 LIBS="-lbind  $LIBS"
10062 cat > conftest.$ac_ext <<EOF
10063 #line 10064 "configure"
10064 #include "confdefs.h"
10065 /* Override any gcc2 internal prototype to avoid an error.  */
10066 /* We use char because int might match the return type of a gcc2
10067     builtin and then its argument prototype would still apply.  */
10068 char __res_query();
10069
10070 int main() {
10071 __res_query()
10072 ; return 0; }
10073 EOF
10074 if { (eval echo configure:10075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10075   rm -rf conftest*
10076   eval "ac_cv_lib_$ac_lib_var=yes"
10077 else
10078   echo "configure: failed program was:" >&5
10079   cat conftest.$ac_ext >&5
10080   rm -rf conftest*
10081   eval "ac_cv_lib_$ac_lib_var=no"
10082 fi
10083 rm -f conftest*
10084 LIBS="$ac_save_LIBS"
10085
10086 fi
10087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10088   echo "$ac_t""yes" 1>&6
10089     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10090     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10091   cat >> confdefs.h <<EOF
10092 #define $ac_tr_lib 1
10093 EOF
10094
10095   LIBS="-lbind $LIBS"
10096
10097 else
10098   echo "$ac_t""no" 1>&6
10099 fi
10100
10101         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10102 fi
10103
10104 if test $ac_cv_func_res_query = no ; then 
10105         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10106 echo "configure:10107: checking for res_query in -lresolv" >&5
10107 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10108 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10109   echo $ac_n "(cached) $ac_c" 1>&6
10110 else
10111   ac_save_LIBS="$LIBS"
10112 LIBS="-lresolv  $LIBS"
10113 cat > conftest.$ac_ext <<EOF
10114 #line 10115 "configure"
10115 #include "confdefs.h"
10116 /* Override any gcc2 internal prototype to avoid an error.  */
10117 /* We use char because int might match the return type of a gcc2
10118     builtin and then its argument prototype would still apply.  */
10119 char res_query();
10120
10121 int main() {
10122 res_query()
10123 ; return 0; }
10124 EOF
10125 if { (eval echo configure:10126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10126   rm -rf conftest*
10127   eval "ac_cv_lib_$ac_lib_var=yes"
10128 else
10129   echo "configure: failed program was:" >&5
10130   cat conftest.$ac_ext >&5
10131   rm -rf conftest*
10132   eval "ac_cv_lib_$ac_lib_var=no"
10133 fi
10134 rm -f conftest*
10135 LIBS="$ac_save_LIBS"
10136
10137 fi
10138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10139   echo "$ac_t""yes" 1>&6
10140     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10141     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10142   cat >> confdefs.h <<EOF
10143 #define $ac_tr_lib 1
10144 EOF
10145
10146   LIBS="-lresolv $LIBS"
10147
10148 else
10149   echo "$ac_t""no" 1>&6
10150 fi
10151
10152         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10153 fi
10154
10155 if test $ac_cv_func_res_query = no ; then 
10156         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10157 echo "configure:10158: checking for __res_query in -lresolv" >&5
10158 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10159 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10160   echo $ac_n "(cached) $ac_c" 1>&6
10161 else
10162   ac_save_LIBS="$LIBS"
10163 LIBS="-lresolv  $LIBS"
10164 cat > conftest.$ac_ext <<EOF
10165 #line 10166 "configure"
10166 #include "confdefs.h"
10167 /* Override any gcc2 internal prototype to avoid an error.  */
10168 /* We use char because int might match the return type of a gcc2
10169     builtin and then its argument prototype would still apply.  */
10170 char __res_query();
10171
10172 int main() {
10173 __res_query()
10174 ; return 0; }
10175 EOF
10176 if { (eval echo configure:10177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10177   rm -rf conftest*
10178   eval "ac_cv_lib_$ac_lib_var=yes"
10179 else
10180   echo "configure: failed program was:" >&5
10181   cat conftest.$ac_ext >&5
10182   rm -rf conftest*
10183   eval "ac_cv_lib_$ac_lib_var=no"
10184 fi
10185 rm -f conftest*
10186 LIBS="$ac_save_LIBS"
10187
10188 fi
10189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10190   echo "$ac_t""yes" 1>&6
10191     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10192     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10193   cat >> confdefs.h <<EOF
10194 #define $ac_tr_lib 1
10195 EOF
10196
10197   LIBS="-lresolv $LIBS"
10198
10199 else
10200   echo "$ac_t""no" 1>&6
10201 fi
10202
10203         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10204 fi
10205
10206 if test "$ac_cv_func_res_query" = yes ; then
10207         cat >> confdefs.h <<\EOF
10208 #define HAVE_RES_QUERY 1
10209 EOF
10210
10211
10212         if test $ol_enable_dnssrv != no ; then
10213                 ol_link_dnssrv=yes
10214         fi
10215 fi
10216
10217 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10218         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10219 fi
10220
10221 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10222 do
10223 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10224 echo "configure:10225: checking for $ac_func" >&5
10225 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10226   echo $ac_n "(cached) $ac_c" 1>&6
10227 else
10228   cat > conftest.$ac_ext <<EOF
10229 #line 10230 "configure"
10230 #include "confdefs.h"
10231 /* System header to define __stub macros and hopefully few prototypes,
10232     which can conflict with char $ac_func(); below.  */
10233 #include <assert.h>
10234 /* Override any gcc2 internal prototype to avoid an error.  */
10235 /* We use char because int might match the return type of a gcc2
10236     builtin and then its argument prototype would still apply.  */
10237 char $ac_func();
10238 char (*f)();
10239
10240 int main() {
10241
10242 /* The GNU C library defines this for functions which it implements
10243     to always fail with ENOSYS.  Some functions are actually named
10244     something starting with __ and the normal name is an alias.  */
10245 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10246 choke me
10247 #else
10248 f = $ac_func;
10249 #endif
10250
10251 ; return 0; }
10252 EOF
10253 if { (eval echo configure:10254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10254   rm -rf conftest*
10255   eval "ac_cv_func_$ac_func=yes"
10256 else
10257   echo "configure: failed program was:" >&5
10258   cat conftest.$ac_ext >&5
10259   rm -rf conftest*
10260   eval "ac_cv_func_$ac_func=no"
10261 fi
10262 rm -f conftest*
10263 fi
10264
10265 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10266   echo "$ac_t""yes" 1>&6
10267     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10268   cat >> confdefs.h <<EOF
10269 #define $ac_tr_func 1
10270 EOF
10271  
10272 else
10273   echo "$ac_t""no" 1>&6
10274 fi
10275 done
10276
10277
10278 ol_link_ipv6=no
10279 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10280         if test $ol_enable_ipv6 = yes ; then
10281                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10282         fi
10283 elif test $ol_enable_ipv6 != no ; then
10284         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10285 echo "configure:10286: checking INET6_ADDRSTRLEN" >&5
10286 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10287   echo $ac_n "(cached) $ac_c" 1>&6
10288 else
10289   
10290                 cat > conftest.$ac_ext <<EOF
10291 #line 10292 "configure"
10292 #include "confdefs.h"
10293
10294 #                       include <netinet/in.h>
10295 #                       ifdef INET6_ADDRSTRLEN
10296                                 __has_inet6_addrstrlen__;
10297 #                       endif
10298                 
10299 EOF
10300 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10301   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10302   rm -rf conftest*
10303   ol_cv_inet6_addrstrlen=yes
10304 else
10305   rm -rf conftest*
10306   ol_cv_inet6_addrstrlen=no
10307 fi
10308 rm -f conftest*
10309
10310 fi
10311
10312 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10313
10314
10315         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10316 echo "configure:10317: checking struct sockaddr_storage" >&5
10317 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10318   echo $ac_n "(cached) $ac_c" 1>&6
10319 else
10320   
10321                 cat > conftest.$ac_ext <<EOF
10322 #line 10323 "configure"
10323 #include "confdefs.h"
10324
10325 #include <sys/types.h>
10326 #include <sys/socket.h>
10327
10328 int main() {
10329
10330                         struct sockaddr_storage ss;
10331
10332 ; return 0; }
10333 EOF
10334 if { (eval echo configure:10335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10335   rm -rf conftest*
10336   ol_cv_struct_sockaddr_storage=yes
10337 else
10338   echo "configure: failed program was:" >&5
10339   cat conftest.$ac_ext >&5
10340   rm -rf conftest*
10341   ol_cv_struct_sockaddr_storage=no
10342 fi
10343 rm -f conftest*
10344 fi
10345
10346 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10347
10348         if test $ol_cv_inet6_addrstrlen = yes \
10349                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10350                 ol_link_ipv6=yes
10351         elif test $ol_enable_ipv6 = yes \
10352                         -a $ol_cv_inet6_addrstrlen = no ; then
10353                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10354         elif test $ol_enable_ipv6 = yes \
10355                         -a $ol_cv_struct_sockaddr_storage = no ; then
10356                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10357         fi
10358 fi
10359
10360 if test $ol_enable_local != no ; then
10361         for ac_hdr in sys/un.h 
10362 do
10363 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10364 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10365 echo "configure:10366: checking for $ac_hdr" >&5
10366 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10367   echo $ac_n "(cached) $ac_c" 1>&6
10368 else
10369   cat > conftest.$ac_ext <<EOF
10370 #line 10371 "configure"
10371 #include "confdefs.h"
10372 #include <$ac_hdr>
10373 EOF
10374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10375 { (eval echo configure:10376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10377 if test -z "$ac_err"; then
10378   rm -rf conftest*
10379   eval "ac_cv_header_$ac_safe=yes"
10380 else
10381   echo "$ac_err" >&5
10382   echo "configure: failed program was:" >&5
10383   cat conftest.$ac_ext >&5
10384   rm -rf conftest*
10385   eval "ac_cv_header_$ac_safe=no"
10386 fi
10387 rm -f conftest*
10388 fi
10389 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10390   echo "$ac_t""yes" 1>&6
10391     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10392   cat >> confdefs.h <<EOF
10393 #define $ac_tr_hdr 1
10394 EOF
10395  
10396 else
10397   echo "$ac_t""no" 1>&6
10398 fi
10399 done
10400
10401
10402         if test $ol_enable_local = auto ; then
10403                 ol_enable_local=$ac_cv_header_sys_un_h
10404         elif test $ac_cv_header_sys_un_h = no ; then
10405                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10406         fi
10407 fi
10408
10409 ol_link_kbind=no
10410 ol_link_kpasswd=no
10411 ol_link_krb5=no
10412 ol_link_krb4=no
10413
10414 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10415         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10416         -o $ol_with_kerberos = k425 ; then
10417
10418         for ac_hdr in krb5.h
10419 do
10420 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10421 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10422 echo "configure:10423: checking for $ac_hdr" >&5
10423 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10424   echo $ac_n "(cached) $ac_c" 1>&6
10425 else
10426   cat > conftest.$ac_ext <<EOF
10427 #line 10428 "configure"
10428 #include "confdefs.h"
10429 #include <$ac_hdr>
10430 EOF
10431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10432 { (eval echo configure:10433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10434 if test -z "$ac_err"; then
10435   rm -rf conftest*
10436   eval "ac_cv_header_$ac_safe=yes"
10437 else
10438   echo "$ac_err" >&5
10439   echo "configure: failed program was:" >&5
10440   cat conftest.$ac_ext >&5
10441   rm -rf conftest*
10442   eval "ac_cv_header_$ac_safe=no"
10443 fi
10444 rm -f conftest*
10445 fi
10446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10447   echo "$ac_t""yes" 1>&6
10448     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10449   cat >> confdefs.h <<EOF
10450 #define $ac_tr_hdr 1
10451 EOF
10452  
10453 else
10454   echo "$ac_t""no" 1>&6
10455 fi
10456 done
10457
10458
10459         if test $ac_cv_header_krb5_h = yes ; then
10460                                 for ac_hdr in heim_err.h
10461 do
10462 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10463 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10464 echo "configure:10465: checking for $ac_hdr" >&5
10465 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10466   echo $ac_n "(cached) $ac_c" 1>&6
10467 else
10468   cat > conftest.$ac_ext <<EOF
10469 #line 10470 "configure"
10470 #include "confdefs.h"
10471 #include <$ac_hdr>
10472 EOF
10473 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10474 { (eval echo configure:10475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10475 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10476 if test -z "$ac_err"; then
10477   rm -rf conftest*
10478   eval "ac_cv_header_$ac_safe=yes"
10479 else
10480   echo "$ac_err" >&5
10481   echo "configure: failed program was:" >&5
10482   cat conftest.$ac_ext >&5
10483   rm -rf conftest*
10484   eval "ac_cv_header_$ac_safe=no"
10485 fi
10486 rm -f conftest*
10487 fi
10488 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10489   echo "$ac_t""yes" 1>&6
10490     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10491   cat >> confdefs.h <<EOF
10492 #define $ac_tr_hdr 1
10493 EOF
10494  
10495 else
10496   echo "$ac_t""no" 1>&6
10497 fi
10498 done
10499
10500                 if test $ac_cv_header_heim_err_h = yes ; then
10501                         krb5_impl=heimdal
10502                 else
10503                         krb5_impl=mit
10504                 fi
10505
10506                 if test $krb5_impl = mit; then
10507                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10508 echo "configure:10509: checking for main in -lk5crypto" >&5
10509 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10510 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10511   echo $ac_n "(cached) $ac_c" 1>&6
10512 else
10513   ac_save_LIBS="$LIBS"
10514 LIBS="-lk5crypto  $LIBS"
10515 cat > conftest.$ac_ext <<EOF
10516 #line 10517 "configure"
10517 #include "confdefs.h"
10518
10519 int main() {
10520 main()
10521 ; return 0; }
10522 EOF
10523 if { (eval echo configure:10524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10524   rm -rf conftest*
10525   eval "ac_cv_lib_$ac_lib_var=yes"
10526 else
10527   echo "configure: failed program was:" >&5
10528   cat conftest.$ac_ext >&5
10529   rm -rf conftest*
10530   eval "ac_cv_lib_$ac_lib_var=no"
10531 fi
10532 rm -f conftest*
10533 LIBS="$ac_save_LIBS"
10534
10535 fi
10536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10537   echo "$ac_t""yes" 1>&6
10538   krb5crypto=k5crypto
10539 else
10540   echo "$ac_t""no" 1>&6
10541 krb5crypto=crypto
10542 fi
10543
10544
10545                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10546 echo "configure:10547: checking for main in -lkrb5" >&5
10547 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10548 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10549   echo $ac_n "(cached) $ac_c" 1>&6
10550 else
10551   ac_save_LIBS="$LIBS"
10552 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10553 cat > conftest.$ac_ext <<EOF
10554 #line 10555 "configure"
10555 #include "confdefs.h"
10556
10557 int main() {
10558 main()
10559 ; return 0; }
10560 EOF
10561 if { (eval echo configure:10562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10562   rm -rf conftest*
10563   eval "ac_cv_lib_$ac_lib_var=yes"
10564 else
10565   echo "configure: failed program was:" >&5
10566   cat conftest.$ac_ext >&5
10567   rm -rf conftest*
10568   eval "ac_cv_lib_$ac_lib_var=no"
10569 fi
10570 rm -f conftest*
10571 LIBS="$ac_save_LIBS"
10572
10573 fi
10574 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10575   echo "$ac_t""yes" 1>&6
10576   have_krb5=yes
10577                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10578 else
10579   echo "$ac_t""no" 1>&6
10580 have_krb5=no
10581 fi
10582
10583
10584                 elif test $krb5_impl = heimdal; then
10585                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10586 echo "configure:10587: checking for main in -ldes" >&5
10587 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10588 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10589   echo $ac_n "(cached) $ac_c" 1>&6
10590 else
10591   ac_save_LIBS="$LIBS"
10592 LIBS="-ldes  $LIBS"
10593 cat > conftest.$ac_ext <<EOF
10594 #line 10595 "configure"
10595 #include "confdefs.h"
10596
10597 int main() {
10598 main()
10599 ; return 0; }
10600 EOF
10601 if { (eval echo configure:10602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10602   rm -rf conftest*
10603   eval "ac_cv_lib_$ac_lib_var=yes"
10604 else
10605   echo "configure: failed program was:" >&5
10606   cat conftest.$ac_ext >&5
10607   rm -rf conftest*
10608   eval "ac_cv_lib_$ac_lib_var=no"
10609 fi
10610 rm -f conftest*
10611 LIBS="$ac_save_LIBS"
10612
10613 fi
10614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10615   echo "$ac_t""yes" 1>&6
10616   krb5crypto=des
10617 else
10618   echo "$ac_t""no" 1>&6
10619 krb5crypto=crypto
10620 fi
10621
10622
10623                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10624 echo "configure:10625: checking for main in -lkrb5" >&5
10625 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10626 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10627   echo $ac_n "(cached) $ac_c" 1>&6
10628 else
10629   ac_save_LIBS="$LIBS"
10630 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10631 cat > conftest.$ac_ext <<EOF
10632 #line 10633 "configure"
10633 #include "confdefs.h"
10634
10635 int main() {
10636 main()
10637 ; return 0; }
10638 EOF
10639 if { (eval echo configure:10640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10640   rm -rf conftest*
10641   eval "ac_cv_lib_$ac_lib_var=yes"
10642 else
10643   echo "configure: failed program was:" >&5
10644   cat conftest.$ac_ext >&5
10645   rm -rf conftest*
10646   eval "ac_cv_lib_$ac_lib_var=no"
10647 fi
10648 rm -f conftest*
10649 LIBS="$ac_save_LIBS"
10650
10651 fi
10652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10653   echo "$ac_t""yes" 1>&6
10654   have_krb5=yes
10655                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10656 else
10657   echo "$ac_t""no" 1>&6
10658 have_krb5=no
10659 fi
10660
10661
10662                         cat >> confdefs.h <<\EOF
10663 #define HAVE_HEIMDAL_KERBEROS 1
10664 EOF
10665
10666
10667                 else
10668                         have_krb5=no
10669                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10670                 fi
10671
10672                 if test $have_krb5 = yes ; then
10673                         ol_link_krb5=yes
10674
10675                         cat >> confdefs.h <<\EOF
10676 #define HAVE_KRB5 1
10677 EOF
10678
10679
10680                         if test $ol_enable_kpasswd != no ; then
10681                                 ol_link_kpasswd=yes;
10682                         fi
10683
10684                         if test $ol_with_kerberos = k5only ; then
10685                                 ol_with_kerberos=found
10686                         fi
10687
10688                 elif test $ol_with_kerberos != auto ; then
10689                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10690                 fi
10691
10692         fi
10693 fi
10694
10695 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10696         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10697
10698         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10699 do
10700 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10701 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10702 echo "configure:10703: checking for $ac_hdr" >&5
10703 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10704   echo $ac_n "(cached) $ac_c" 1>&6
10705 else
10706   cat > conftest.$ac_ext <<EOF
10707 #line 10708 "configure"
10708 #include "confdefs.h"
10709 #include <$ac_hdr>
10710 EOF
10711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10712 { (eval echo configure:10713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10714 if test -z "$ac_err"; then
10715   rm -rf conftest*
10716   eval "ac_cv_header_$ac_safe=yes"
10717 else
10718   echo "$ac_err" >&5
10719   echo "configure: failed program was:" >&5
10720   cat conftest.$ac_ext >&5
10721   rm -rf conftest*
10722   eval "ac_cv_header_$ac_safe=no"
10723 fi
10724 rm -f conftest*
10725 fi
10726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10727   echo "$ac_t""yes" 1>&6
10728     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10729   cat >> confdefs.h <<EOF
10730 #define $ac_tr_hdr 1
10731 EOF
10732  
10733 else
10734   echo "$ac_t""no" 1>&6
10735 fi
10736 done
10737
10738
10739         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10740                 if test $krb5_impl = mit; then
10741                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10742 echo "configure:10743: checking for main in -lkrb4" >&5
10743 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10744 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10745   echo $ac_n "(cached) $ac_c" 1>&6
10746 else
10747   ac_save_LIBS="$LIBS"
10748 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10749 cat > conftest.$ac_ext <<EOF
10750 #line 10751 "configure"
10751 #include "confdefs.h"
10752
10753 int main() {
10754 main()
10755 ; return 0; }
10756 EOF
10757 if { (eval echo configure:10758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10758   rm -rf conftest*
10759   eval "ac_cv_lib_$ac_lib_var=yes"
10760 else
10761   echo "configure: failed program was:" >&5
10762   cat conftest.$ac_ext >&5
10763   rm -rf conftest*
10764   eval "ac_cv_lib_$ac_lib_var=no"
10765 fi
10766 rm -f conftest*
10767 LIBS="$ac_save_LIBS"
10768
10769 fi
10770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10771   echo "$ac_t""yes" 1>&6
10772   have_k425=yes
10773                                 KRB4_LIBS="-lkrb4 -ldes425"
10774 else
10775   echo "$ac_t""no" 1>&6
10776 have_k425=no
10777 fi
10778
10779
10780                 elif test $krb5_impl = heimdal; then
10781                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10782 echo "configure:10783: checking for main in -lkrb4" >&5
10783 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10784 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10785   echo $ac_n "(cached) $ac_c" 1>&6
10786 else
10787   ac_save_LIBS="$LIBS"
10788 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10789 cat > conftest.$ac_ext <<EOF
10790 #line 10791 "configure"
10791 #include "confdefs.h"
10792
10793 int main() {
10794 main()
10795 ; return 0; }
10796 EOF
10797 if { (eval echo configure:10798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10798   rm -rf conftest*
10799   eval "ac_cv_lib_$ac_lib_var=yes"
10800 else
10801   echo "configure: failed program was:" >&5
10802   cat conftest.$ac_ext >&5
10803   rm -rf conftest*
10804   eval "ac_cv_lib_$ac_lib_var=no"
10805 fi
10806 rm -f conftest*
10807 LIBS="$ac_save_LIBS"
10808
10809 fi
10810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10811   echo "$ac_t""yes" 1>&6
10812   have_k425=yes
10813                                 KRB4_LIBS="-lkrb4"
10814 else
10815   echo "$ac_t""no" 1>&6
10816 have_k425=no
10817 fi
10818
10819
10820                 else
10821                         have_425=no
10822                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10823                 fi
10824
10825                 if test $have_k425 = yes ; then
10826                         ol_with_kerberos=found
10827                         ol_link_krb4=yes
10828
10829                         cat >> confdefs.h <<\EOF
10830 #define HAVE_KRB425 1
10831 EOF
10832
10833                         cat >> confdefs.h <<\EOF
10834 #define HAVE_KRB4 1
10835 EOF
10836
10837
10838                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10839 echo "configure:10840: checking for des_debug in Kerberos libraries" >&5
10840 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10841   echo $ac_n "(cached) $ac_c" 1>&6
10842 else
10843   
10844                                                                 save_LIBS="$LIBS"
10845                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10846                                 cat > conftest.$ac_ext <<EOF
10847 #line 10848 "configure"
10848 #include "confdefs.h"
10849
10850 #include <kerberosIV/krb.h>
10851 #include <kerberosIV/des.h>
10852 extern int des_debug;
10853
10854 int main() {
10855
10856 des_debug = 1;
10857
10858 ; return 0; }
10859 EOF
10860 if { (eval echo configure:10861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10861   rm -rf conftest*
10862   ol_cv_var_des_debug=yes
10863 else
10864   echo "configure: failed program was:" >&5
10865   cat conftest.$ac_ext >&5
10866   rm -rf conftest*
10867   ol_cv_var_des_debug=no
10868 fi
10869 rm -f conftest*
10870                                                                 LIBS="$save_LIBS"
10871                         
10872 fi
10873
10874 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10875
10876                         if test $ol_cv_var_des_debug = yes ; then
10877                                 cat >> confdefs.h <<\EOF
10878 #define HAVE_DES_DEBUG 1
10879 EOF
10880
10881                         fi
10882
10883                         LIBS="$save_LIBS"
10884                 fi
10885         fi
10886 fi
10887
10888 if test $ol_link_krb5 = yes ; then
10889         ol_with_kerberos=found
10890 fi
10891
10892 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10893         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10894
10895         for ac_hdr in krb.h des.h krb-archaeology.h 
10896 do
10897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10899 echo "configure:10900: checking for $ac_hdr" >&5
10900 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10901   echo $ac_n "(cached) $ac_c" 1>&6
10902 else
10903   cat > conftest.$ac_ext <<EOF
10904 #line 10905 "configure"
10905 #include "confdefs.h"
10906 #include <$ac_hdr>
10907 EOF
10908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10909 { (eval echo configure:10910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10911 if test -z "$ac_err"; then
10912   rm -rf conftest*
10913   eval "ac_cv_header_$ac_safe=yes"
10914 else
10915   echo "$ac_err" >&5
10916   echo "configure: failed program was:" >&5
10917   cat conftest.$ac_ext >&5
10918   rm -rf conftest*
10919   eval "ac_cv_header_$ac_safe=no"
10920 fi
10921 rm -f conftest*
10922 fi
10923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10924   echo "$ac_t""yes" 1>&6
10925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10926   cat >> confdefs.h <<EOF
10927 #define $ac_tr_hdr 1
10928 EOF
10929  
10930 else
10931   echo "$ac_t""no" 1>&6
10932 fi
10933 done
10934
10935
10936         if test $ac_cv_header_krb_h = yes ; then
10937                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10938 echo "configure:10939: checking for main in -lkrb" >&5
10939 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10940 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10941   echo $ac_n "(cached) $ac_c" 1>&6
10942 else
10943   ac_save_LIBS="$LIBS"
10944 LIBS="-lkrb -ldes $LIBS"
10945 cat > conftest.$ac_ext <<EOF
10946 #line 10947 "configure"
10947 #include "confdefs.h"
10948
10949 int main() {
10950 main()
10951 ; return 0; }
10952 EOF
10953 if { (eval echo configure:10954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10954   rm -rf conftest*
10955   eval "ac_cv_lib_$ac_lib_var=yes"
10956 else
10957   echo "configure: failed program was:" >&5
10958   cat conftest.$ac_ext >&5
10959   rm -rf conftest*
10960   eval "ac_cv_lib_$ac_lib_var=no"
10961 fi
10962 rm -f conftest*
10963 LIBS="$ac_save_LIBS"
10964
10965 fi
10966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10967   echo "$ac_t""yes" 1>&6
10968   have_k4=yes
10969 else
10970   echo "$ac_t""no" 1>&6
10971 have_k4=no
10972 fi
10973
10974
10975                 if test $have_k4 = yes ; then
10976                         ol_with_kerberos=found
10977                         ol_link_krb4=yes
10978
10979                         cat >> confdefs.h <<\EOF
10980 #define HAVE_KRB4 1
10981 EOF
10982
10983
10984                         KRB4_LIBS="-lkrb -ldes"
10985
10986                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10987                                 cat >> confdefs.h <<\EOF
10988 #define HAVE_KTH_KERBEROS 1
10989 EOF
10990
10991                         fi
10992                 fi
10993         fi
10994 fi
10995
10996 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10997         ol_link_kpasswd=yes
10998 fi
10999
11000 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11001         ol_link_kbind=yes
11002
11003 elif test $ol_enable_kbind = yes ; then
11004         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11005 fi
11006
11007 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11008         cat >> confdefs.h <<\EOF
11009 #define HAVE_KERBEROS 1
11010 EOF
11011
11012
11013 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11014         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11015 fi
11016
11017 ol_link_tls=no
11018 if test $ol_with_tls != no ; then
11019         for ac_hdr in openssl/ssl.h ssl.h
11020 do
11021 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11022 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11023 echo "configure:11024: checking for $ac_hdr" >&5
11024 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11025   echo $ac_n "(cached) $ac_c" 1>&6
11026 else
11027   cat > conftest.$ac_ext <<EOF
11028 #line 11029 "configure"
11029 #include "confdefs.h"
11030 #include <$ac_hdr>
11031 EOF
11032 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11033 { (eval echo configure:11034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11034 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11035 if test -z "$ac_err"; then
11036   rm -rf conftest*
11037   eval "ac_cv_header_$ac_safe=yes"
11038 else
11039   echo "$ac_err" >&5
11040   echo "configure: failed program was:" >&5
11041   cat conftest.$ac_ext >&5
11042   rm -rf conftest*
11043   eval "ac_cv_header_$ac_safe=no"
11044 fi
11045 rm -f conftest*
11046 fi
11047 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11048   echo "$ac_t""yes" 1>&6
11049     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11050   cat >> confdefs.h <<EOF
11051 #define $ac_tr_hdr 1
11052 EOF
11053  
11054 else
11055   echo "$ac_t""no" 1>&6
11056 fi
11057 done
11058
11059         
11060         if test $ac_cv_header_openssl_ssl_h = yes \
11061                 -o $ac_cv_header_ssl_h = yes ; then
11062                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11063 echo "configure:11064: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11064 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11065 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11066   echo $ac_n "(cached) $ac_c" 1>&6
11067 else
11068   ac_save_LIBS="$LIBS"
11069 LIBS="-lssl -lcrypto $LIBS"
11070 cat > conftest.$ac_ext <<EOF
11071 #line 11072 "configure"
11072 #include "confdefs.h"
11073 /* Override any gcc2 internal prototype to avoid an error.  */
11074 /* We use char because int might match the return type of a gcc2
11075     builtin and then its argument prototype would still apply.  */
11076 char SSLeay_add_ssl_algorithms();
11077
11078 int main() {
11079 SSLeay_add_ssl_algorithms()
11080 ; return 0; }
11081 EOF
11082 if { (eval echo configure:11083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11083   rm -rf conftest*
11084   eval "ac_cv_lib_$ac_lib_var=yes"
11085 else
11086   echo "configure: failed program was:" >&5
11087   cat conftest.$ac_ext >&5
11088   rm -rf conftest*
11089   eval "ac_cv_lib_$ac_lib_var=no"
11090 fi
11091 rm -f conftest*
11092 LIBS="$ac_save_LIBS"
11093
11094 fi
11095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11096   echo "$ac_t""yes" 1>&6
11097   have_ssleay=yes
11098                         need_rsaref=no
11099 else
11100   echo "$ac_t""no" 1>&6
11101 have_ssleay=no
11102 fi
11103
11104                         
11105                 if test $have_ssleay = no ; then
11106                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11107 echo "configure:11108: checking for SSL_library_init in -lssl" >&5
11108 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11109 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11110   echo $ac_n "(cached) $ac_c" 1>&6
11111 else
11112   ac_save_LIBS="$LIBS"
11113 LIBS="-lssl -lcrypto $LIBS"
11114 cat > conftest.$ac_ext <<EOF
11115 #line 11116 "configure"
11116 #include "confdefs.h"
11117 /* Override any gcc2 internal prototype to avoid an error.  */
11118 /* We use char because int might match the return type of a gcc2
11119     builtin and then its argument prototype would still apply.  */
11120 char SSL_library_init();
11121
11122 int main() {
11123 SSL_library_init()
11124 ; return 0; }
11125 EOF
11126 if { (eval echo configure:11127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11127   rm -rf conftest*
11128   eval "ac_cv_lib_$ac_lib_var=yes"
11129 else
11130   echo "configure: failed program was:" >&5
11131   cat conftest.$ac_ext >&5
11132   rm -rf conftest*
11133   eval "ac_cv_lib_$ac_lib_var=no"
11134 fi
11135 rm -f conftest*
11136 LIBS="$ac_save_LIBS"
11137
11138 fi
11139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11140   echo "$ac_t""yes" 1>&6
11141   have_ssleay=yes
11142                                 need_rsaref=no
11143 else
11144   echo "$ac_t""no" 1>&6
11145 have_ssleay=no
11146 fi
11147
11148                 fi
11149
11150                 if test $have_ssleay = no ; then
11151                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11152 echo "configure:11153: checking for ssl3_accept in -lssl" >&5
11153 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11154 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11155   echo $ac_n "(cached) $ac_c" 1>&6
11156 else
11157   ac_save_LIBS="$LIBS"
11158 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11159 cat > conftest.$ac_ext <<EOF
11160 #line 11161 "configure"
11161 #include "confdefs.h"
11162 /* Override any gcc2 internal prototype to avoid an error.  */
11163 /* We use char because int might match the return type of a gcc2
11164     builtin and then its argument prototype would still apply.  */
11165 char ssl3_accept();
11166
11167 int main() {
11168 ssl3_accept()
11169 ; return 0; }
11170 EOF
11171 if { (eval echo configure:11172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11172   rm -rf conftest*
11173   eval "ac_cv_lib_$ac_lib_var=yes"
11174 else
11175   echo "configure: failed program was:" >&5
11176   cat conftest.$ac_ext >&5
11177   rm -rf conftest*
11178   eval "ac_cv_lib_$ac_lib_var=no"
11179 fi
11180 rm -f conftest*
11181 LIBS="$ac_save_LIBS"
11182
11183 fi
11184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11185   echo "$ac_t""yes" 1>&6
11186   have_ssleay=yes
11187                                 need_rsaref=yes
11188 else
11189   echo "$ac_t""no" 1>&6
11190 have_ssleay=no
11191 fi
11192
11193                 fi
11194
11195                 if test $have_ssleay = yes ; then
11196                         ol_with_tls=found
11197                         ol_link_tls=yes
11198
11199                         cat >> confdefs.h <<\EOF
11200 #define HAVE_SSLEAY 1
11201 EOF
11202
11203
11204                         if test $need_rsaref = yes; then
11205                                 cat >> confdefs.h <<\EOF
11206 #define HAVE_RSAREF 1
11207 EOF
11208
11209
11210                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11211                         else
11212                                 TLS_LIBS="-lssl -lcrypto"
11213                         fi
11214                 fi
11215         fi
11216
11217 else
11218         echo "configure: warning: TLS data protection not supported!" 1>&2
11219 fi
11220
11221 WITH_TLS=no
11222 if test $ol_link_tls = yes ; then
11223         cat >> confdefs.h <<\EOF
11224 #define HAVE_TLS 1
11225 EOF
11226
11227         WITH_TLS=yes
11228
11229 elif test $ol_with_tls = auto ; then
11230         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11231         echo "configure: warning: TLS data protection not supported!" 1>&2
11232
11233 elif test $ol_with_tls != no ; then
11234         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11235 fi
11236
11237 if test $ol_enable_lmpasswd != no; then
11238         if test $ol_link_tls != yes ; then
11239                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11240         fi
11241
11242         cat >> confdefs.h <<\EOF
11243 #define SLAPD_LMHASH 1
11244 EOF
11245
11246 fi
11247
11248 ol_link_threads=no
11249
11250 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11251         -o $ol_with_threads = nt ; then
11252
11253         
11254         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11255 echo "configure:11256: checking for _beginthread" >&5
11256 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11257   echo $ac_n "(cached) $ac_c" 1>&6
11258 else
11259   cat > conftest.$ac_ext <<EOF
11260 #line 11261 "configure"
11261 #include "confdefs.h"
11262 /* System header to define __stub macros and hopefully few prototypes,
11263     which can conflict with char _beginthread(); below.  */
11264 #include <assert.h>
11265 /* Override any gcc2 internal prototype to avoid an error.  */
11266 /* We use char because int might match the return type of a gcc2
11267     builtin and then its argument prototype would still apply.  */
11268 char _beginthread();
11269 char (*f)();
11270
11271 int main() {
11272
11273 /* The GNU C library defines this for functions which it implements
11274     to always fail with ENOSYS.  Some functions are actually named
11275     something starting with __ and the normal name is an alias.  */
11276 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11277 choke me
11278 #else
11279 f = _beginthread;
11280 #endif
11281
11282 ; return 0; }
11283 EOF
11284 if { (eval echo configure:11285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11285   rm -rf conftest*
11286   eval "ac_cv_func__beginthread=yes"
11287 else
11288   echo "configure: failed program was:" >&5
11289   cat conftest.$ac_ext >&5
11290   rm -rf conftest*
11291   eval "ac_cv_func__beginthread=no"
11292 fi
11293 rm -f conftest*
11294 fi
11295
11296 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11297   echo "$ac_t""yes" 1>&6
11298   :
11299 else
11300   echo "$ac_t""no" 1>&6
11301 fi
11302
11303
11304         if test $ac_cv_func__beginthread = yes ; then
11305                 cat >> confdefs.h <<\EOF
11306 #define HAVE_NT_THREADS 1
11307 EOF
11308
11309                 ol_cv_nt_threads=yes
11310         fi
11311
11312
11313         if test "$ol_cv_nt_threads" = yes ; then
11314                 ol_link_threads=nt
11315                 ol_with_threads=found
11316                 ol_with_yielding_select=yes
11317
11318                 cat >> confdefs.h <<\EOF
11319 #define HAVE_NT_SERVICE_MANAGER 1
11320 EOF
11321
11322                 cat >> confdefs.h <<\EOF
11323 #define HAVE_NT_EVENT_LOG 1
11324 EOF
11325
11326         fi
11327
11328         if test $ol_with_threads = nt ; then
11329                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11330         fi
11331 fi
11332
11333 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11334         -o $ol_with_threads = posix ; then
11335
11336         for ac_hdr in pthread.h
11337 do
11338 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11339 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11340 echo "configure:11341: checking for $ac_hdr" >&5
11341 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11342   echo $ac_n "(cached) $ac_c" 1>&6
11343 else
11344   cat > conftest.$ac_ext <<EOF
11345 #line 11346 "configure"
11346 #include "confdefs.h"
11347 #include <$ac_hdr>
11348 EOF
11349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11350 { (eval echo configure:11351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11352 if test -z "$ac_err"; then
11353   rm -rf conftest*
11354   eval "ac_cv_header_$ac_safe=yes"
11355 else
11356   echo "$ac_err" >&5
11357   echo "configure: failed program was:" >&5
11358   cat conftest.$ac_ext >&5
11359   rm -rf conftest*
11360   eval "ac_cv_header_$ac_safe=no"
11361 fi
11362 rm -f conftest*
11363 fi
11364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11365   echo "$ac_t""yes" 1>&6
11366     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11367   cat >> confdefs.h <<EOF
11368 #define $ac_tr_hdr 1
11369 EOF
11370  
11371 else
11372   echo "$ac_t""no" 1>&6
11373 fi
11374 done
11375
11376
11377         if test $ac_cv_header_pthread_h = yes ; then
11378                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11379 echo "configure:11380: checking POSIX thread version" >&5
11380 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11381   echo $ac_n "(cached) $ac_c" 1>&6
11382 else
11383   
11384         cat > conftest.$ac_ext <<EOF
11385 #line 11386 "configure"
11386 #include "confdefs.h"
11387
11388 #               include <pthread.h>
11389         
11390 int main() {
11391
11392                 int i = PTHREAD_CREATE_JOINABLE;
11393         
11394 ; return 0; }
11395 EOF
11396 if { (eval echo configure:11397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11397   rm -rf conftest*
11398   
11399         cat > conftest.$ac_ext <<EOF
11400 #line 11401 "configure"
11401 #include "confdefs.h"
11402 #include <pthread.h>
11403 EOF
11404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11405   egrep "pthread_detach" >/dev/null 2>&1; then
11406   rm -rf conftest*
11407   ol_cv_pthread_version=10
11408 else
11409   rm -rf conftest*
11410   ol_cv_pthread_version=8
11411 fi
11412 rm -f conftest*
11413
11414 else
11415   echo "configure: failed program was:" >&5
11416   cat conftest.$ac_ext >&5
11417   rm -rf conftest*
11418   
11419         cat > conftest.$ac_ext <<EOF
11420 #line 11421 "configure"
11421 #include "confdefs.h"
11422
11423 #               include <pthread.h>
11424 #               ifdef PTHREAD_CREATE_UNDETACHED
11425                 draft7
11426 #               endif
11427         
11428 EOF
11429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11430   egrep "draft7" >/dev/null 2>&1; then
11431   rm -rf conftest*
11432   ol_cv_pthread_version=7
11433 else
11434   rm -rf conftest*
11435   
11436         cat > conftest.$ac_ext <<EOF
11437 #line 11438 "configure"
11438 #include "confdefs.h"
11439 #include <pthread.h>
11440 EOF
11441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11442   egrep "pthread_attr_init" >/dev/null 2>&1; then
11443   rm -rf conftest*
11444   ol_cv_pthread_version=6
11445 else
11446   rm -rf conftest*
11447   
11448         cat > conftest.$ac_ext <<EOF
11449 #line 11450 "configure"
11450 #include "confdefs.h"
11451
11452 #               include <pthread.h>
11453 #ifdef          PTHREAD_MUTEX_INITIALIZER
11454                 draft5
11455 #endif
11456         
11457 EOF
11458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11459   egrep "draft5" >/dev/null 2>&1; then
11460   rm -rf conftest*
11461   ol_cv_pthread_version=5
11462 else
11463   rm -rf conftest*
11464   ol_cv_pthread_version=4
11465 fi
11466 rm -f conftest*
11467  
11468 fi
11469 rm -f conftest*
11470  
11471 fi
11472 rm -f conftest*
11473  
11474 fi
11475 rm -f conftest*
11476
11477 fi
11478
11479 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11480
11481
11482                 if test $ol_cv_pthread_version != 0 ; then
11483                         cat >> confdefs.h <<EOF
11484 #define HAVE_PTHREADS $ol_cv_pthread_version
11485 EOF
11486
11487                 else
11488                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11489                 fi
11490
11491                 # consider threads found
11492                 ol_with_threads=found
11493
11494                 
11495         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11496 echo "configure:11497: checking for LinuxThreads pthread.h" >&5
11497 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11498   echo $ac_n "(cached) $ac_c" 1>&6
11499 else
11500   cat > conftest.$ac_ext <<EOF
11501 #line 11502 "configure"
11502 #include "confdefs.h"
11503 #include <pthread.h>
11504 EOF
11505 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11506   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11507   rm -rf conftest*
11508   ol_cv_header_linux_threads=yes
11509 else
11510   rm -rf conftest*
11511   ol_cv_header_linux_threads=no
11512 fi
11513 rm -f conftest*
11514
11515                 
11516 fi
11517
11518 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11519         if test $ol_cv_header_linux_threads = yes; then
11520                 cat >> confdefs.h <<\EOF
11521 #define HAVE_LINUX_THREADS 1
11522 EOF
11523
11524         fi
11525
11526                 
11527         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11528 echo "configure:11529: checking for GNU Pth pthread.h" >&5
11529 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11530   echo $ac_n "(cached) $ac_c" 1>&6
11531 else
11532   cat > conftest.$ac_ext <<EOF
11533 #line 11534 "configure"
11534 #include "confdefs.h"
11535 #include <pthread.h>
11536 #ifdef _POSIX_THREAD_IS_GNU_PTH
11537         __gnu_pth__;
11538 #endif
11539
11540 EOF
11541 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11542   egrep "__gnu_pth__" >/dev/null 2>&1; then
11543   rm -rf conftest*
11544   ol_cv_header_gnu_pth_pthread_h=yes
11545 else
11546   rm -rf conftest*
11547   ol_cv_header_gnu_pth_pthread_h=no
11548 fi
11549 rm -f conftest*
11550
11551                 
11552 fi
11553
11554 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11555
11556
11557                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11558                         for ac_hdr in sched.h
11559 do
11560 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11561 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11562 echo "configure:11563: checking for $ac_hdr" >&5
11563 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11564   echo $ac_n "(cached) $ac_c" 1>&6
11565 else
11566   cat > conftest.$ac_ext <<EOF
11567 #line 11568 "configure"
11568 #include "confdefs.h"
11569 #include <$ac_hdr>
11570 EOF
11571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11572 { (eval echo configure:11573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11574 if test -z "$ac_err"; then
11575   rm -rf conftest*
11576   eval "ac_cv_header_$ac_safe=yes"
11577 else
11578   echo "$ac_err" >&5
11579   echo "configure: failed program was:" >&5
11580   cat conftest.$ac_ext >&5
11581   rm -rf conftest*
11582   eval "ac_cv_header_$ac_safe=no"
11583 fi
11584 rm -f conftest*
11585 fi
11586 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11587   echo "$ac_t""yes" 1>&6
11588     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11589   cat >> confdefs.h <<EOF
11590 #define $ac_tr_hdr 1
11591 EOF
11592  
11593 else
11594   echo "$ac_t""no" 1>&6
11595 fi
11596 done
11597
11598                 fi
11599
11600                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11601                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11602 echo "configure:11603: checking for pthread_create in default libraries" >&5
11603 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11604   echo $ac_n "(cached) $ac_c" 1>&6
11605 else
11606   
11607                 if test "$cross_compiling" = yes; then
11608   cat > conftest.$ac_ext <<EOF
11609 #line 11610 "configure"
11610 #include "confdefs.h"
11611 /* pthread test headers */
11612 #include <pthread.h>
11613 #if HAVE_PTHREADS < 7
11614 #include <errno.h>
11615 #endif
11616 #ifndef NULL
11617 #define NULL (void*)0
11618 #endif
11619
11620 static void *task(p)
11621         void *p;
11622 {
11623         return (void *) (p == NULL);
11624 }
11625
11626 int main() {
11627
11628         /* pthread test function */
11629 #ifndef PTHREAD_CREATE_DETACHED
11630 #define PTHREAD_CREATE_DETACHED 1
11631 #endif
11632         pthread_t t;
11633         int status;
11634         int detach = PTHREAD_CREATE_DETACHED;
11635
11636 #if HAVE_PTHREADS > 4
11637         /* Final pthreads */
11638         pthread_attr_t attr;
11639
11640         status = pthread_attr_init(&attr);
11641         if( status ) return status;
11642
11643 #if HAVE_PTHREADS < 7
11644         status = pthread_attr_setdetachstate(&attr, &detach);
11645         if( status < 0 ) status = errno;
11646 #else
11647         status = pthread_attr_setdetachstate(&attr, detach);
11648 #endif
11649         if( status ) return status;
11650         status = pthread_create( &t, &attr, task, NULL );
11651 #if HAVE_PTHREADS < 7
11652         if( status < 0 ) status = errno;
11653 #endif
11654         if( status ) return status;
11655 #else
11656         /* Draft 4 pthreads */
11657         status = pthread_create( &t, pthread_attr_default, task, NULL );
11658         if( status ) return errno;
11659
11660         /* give thread a chance to complete */
11661         /* it should remain joinable and hence detachable */
11662         sleep( 1 );
11663
11664         status = pthread_detach( &t );
11665         if( status ) return errno;
11666 #endif
11667
11668 #ifdef HAVE_LINUX_THREADS
11669         pthread_kill_other_threads_np();
11670 #endif
11671
11672         return 0;
11673
11674 ; return 0; }
11675 EOF
11676 if { (eval echo configure:11677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11677   rm -rf conftest*
11678   ol_cv_pthread_create=yes
11679 else
11680   echo "configure: failed program was:" >&5
11681   cat conftest.$ac_ext >&5
11682   rm -rf conftest*
11683   ol_cv_pthread_create=no
11684 fi
11685 rm -f conftest*
11686 else
11687   cat > conftest.$ac_ext <<EOF
11688 #line 11689 "configure"
11689 #include "confdefs.h"
11690 /* pthread test headers */
11691 #include <pthread.h>
11692 #if HAVE_PTHREADS < 7
11693 #include <errno.h>
11694 #endif
11695 #ifndef NULL
11696 #define NULL (void*)0
11697 #endif
11698
11699 static void *task(p)
11700         void *p;
11701 {
11702         return (void *) (p == NULL);
11703 }
11704
11705
11706 int main(argc, argv)
11707         int argc;
11708         char **argv;
11709 {
11710
11711         /* pthread test function */
11712 #ifndef PTHREAD_CREATE_DETACHED
11713 #define PTHREAD_CREATE_DETACHED 1
11714 #endif
11715         pthread_t t;
11716         int status;
11717         int detach = PTHREAD_CREATE_DETACHED;
11718
11719 #if HAVE_PTHREADS > 4
11720         /* Final pthreads */
11721         pthread_attr_t attr;
11722
11723         status = pthread_attr_init(&attr);
11724         if( status ) return status;
11725
11726 #if HAVE_PTHREADS < 7
11727         status = pthread_attr_setdetachstate(&attr, &detach);
11728         if( status < 0 ) status = errno;
11729 #else
11730         status = pthread_attr_setdetachstate(&attr, detach);
11731 #endif
11732         if( status ) return status;
11733         status = pthread_create( &t, &attr, task, NULL );
11734 #if HAVE_PTHREADS < 7
11735         if( status < 0 ) status = errno;
11736 #endif
11737         if( status ) return status;
11738 #else
11739         /* Draft 4 pthreads */
11740         status = pthread_create( &t, pthread_attr_default, task, NULL );
11741         if( status ) return errno;
11742
11743         /* give thread a chance to complete */
11744         /* it should remain joinable and hence detachable */
11745         sleep( 1 );
11746
11747         status = pthread_detach( &t );
11748         if( status ) return errno;
11749 #endif
11750
11751 #ifdef HAVE_LINUX_THREADS
11752         pthread_kill_other_threads_np();
11753 #endif
11754
11755         return 0;
11756
11757 }
11758
11759 EOF
11760 if { (eval echo configure:11761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11761 then
11762   ol_cv_pthread_create=yes
11763 else
11764   echo "configure: failed program was:" >&5
11765   cat conftest.$ac_ext >&5
11766   rm -fr conftest*
11767   ol_cv_pthread_create=no
11768 fi
11769 rm -fr conftest*
11770 fi
11771
11772 fi
11773
11774 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11775
11776                 if test $ol_cv_pthread_create != no ; then
11777                         ol_link_threads=posix
11778                         ol_link_pthreads=""
11779                 fi
11780                 
11781                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11782 if test "$ol_link_threads" = no ; then
11783         # try -kthread
11784         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11785 echo "configure:11786: checking for pthread link with -kthread" >&5
11786 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11787   echo $ac_n "(cached) $ac_c" 1>&6
11788 else
11789   
11790                 # save the flags
11791                 ol_LIBS="$LIBS"
11792                 LIBS="-kthread $LIBS"
11793
11794                 if test "$cross_compiling" = yes; then
11795   cat > conftest.$ac_ext <<EOF
11796 #line 11797 "configure"
11797 #include "confdefs.h"
11798 /* pthread test headers */
11799 #include <pthread.h>
11800 #if HAVE_PTHREADS < 7
11801 #include <errno.h>
11802 #endif
11803 #ifndef NULL
11804 #define NULL (void*)0
11805 #endif
11806
11807 static void *task(p)
11808         void *p;
11809 {
11810         return (void *) (p == NULL);
11811 }
11812
11813 int main() {
11814
11815         /* pthread test function */
11816 #ifndef PTHREAD_CREATE_DETACHED
11817 #define PTHREAD_CREATE_DETACHED 1
11818 #endif
11819         pthread_t t;
11820         int status;
11821         int detach = PTHREAD_CREATE_DETACHED;
11822
11823 #if HAVE_PTHREADS > 4
11824         /* Final pthreads */
11825         pthread_attr_t attr;
11826
11827         status = pthread_attr_init(&attr);
11828         if( status ) return status;
11829
11830 #if HAVE_PTHREADS < 7
11831         status = pthread_attr_setdetachstate(&attr, &detach);
11832         if( status < 0 ) status = errno;
11833 #else
11834         status = pthread_attr_setdetachstate(&attr, detach);
11835 #endif
11836         if( status ) return status;
11837         status = pthread_create( &t, &attr, task, NULL );
11838 #if HAVE_PTHREADS < 7
11839         if( status < 0 ) status = errno;
11840 #endif
11841         if( status ) return status;
11842 #else
11843         /* Draft 4 pthreads */
11844         status = pthread_create( &t, pthread_attr_default, task, NULL );
11845         if( status ) return errno;
11846
11847         /* give thread a chance to complete */
11848         /* it should remain joinable and hence detachable */
11849         sleep( 1 );
11850
11851         status = pthread_detach( &t );
11852         if( status ) return errno;
11853 #endif
11854
11855 #ifdef HAVE_LINUX_THREADS
11856         pthread_kill_other_threads_np();
11857 #endif
11858
11859         return 0;
11860
11861 ; return 0; }
11862 EOF
11863 if { (eval echo configure:11864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11864   rm -rf conftest*
11865   ol_cv_pthread_kthread=yes
11866 else
11867   echo "configure: failed program was:" >&5
11868   cat conftest.$ac_ext >&5
11869   rm -rf conftest*
11870   ol_cv_pthread_kthread=no
11871 fi
11872 rm -f conftest*
11873 else
11874   cat > conftest.$ac_ext <<EOF
11875 #line 11876 "configure"
11876 #include "confdefs.h"
11877 /* pthread test headers */
11878 #include <pthread.h>
11879 #if HAVE_PTHREADS < 7
11880 #include <errno.h>
11881 #endif
11882 #ifndef NULL
11883 #define NULL (void*)0
11884 #endif
11885
11886 static void *task(p)
11887         void *p;
11888 {
11889         return (void *) (p == NULL);
11890 }
11891
11892
11893 int main(argc, argv)
11894         int argc;
11895         char **argv;
11896 {
11897
11898         /* pthread test function */
11899 #ifndef PTHREAD_CREATE_DETACHED
11900 #define PTHREAD_CREATE_DETACHED 1
11901 #endif
11902         pthread_t t;
11903         int status;
11904         int detach = PTHREAD_CREATE_DETACHED;
11905
11906 #if HAVE_PTHREADS > 4
11907         /* Final pthreads */
11908         pthread_attr_t attr;
11909
11910         status = pthread_attr_init(&attr);
11911         if( status ) return status;
11912
11913 #if HAVE_PTHREADS < 7
11914         status = pthread_attr_setdetachstate(&attr, &detach);
11915         if( status < 0 ) status = errno;
11916 #else
11917         status = pthread_attr_setdetachstate(&attr, detach);
11918 #endif
11919         if( status ) return status;
11920         status = pthread_create( &t, &attr, task, NULL );
11921 #if HAVE_PTHREADS < 7
11922         if( status < 0 ) status = errno;
11923 #endif
11924         if( status ) return status;
11925 #else
11926         /* Draft 4 pthreads */
11927         status = pthread_create( &t, pthread_attr_default, task, NULL );
11928         if( status ) return errno;
11929
11930         /* give thread a chance to complete */
11931         /* it should remain joinable and hence detachable */
11932         sleep( 1 );
11933
11934         status = pthread_detach( &t );
11935         if( status ) return errno;
11936 #endif
11937
11938 #ifdef HAVE_LINUX_THREADS
11939         pthread_kill_other_threads_np();
11940 #endif
11941
11942         return 0;
11943
11944 }
11945
11946 EOF
11947 if { (eval echo configure:11948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11948 then
11949   ol_cv_pthread_kthread=yes
11950 else
11951   echo "configure: failed program was:" >&5
11952   cat conftest.$ac_ext >&5
11953   rm -fr conftest*
11954   ol_cv_pthread_kthread=no
11955 fi
11956 rm -fr conftest*
11957 fi
11958
11959
11960                 # restore the LIBS
11961                 LIBS="$ol_LIBS"
11962         
11963 fi
11964
11965 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11966
11967         if test $ol_cv_pthread_kthread = yes ; then
11968                 ol_link_pthreads="-kthread"
11969                 ol_link_threads=posix
11970         fi
11971 fi
11972
11973                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11974 if test "$ol_link_threads" = no ; then
11975         # try -pthread
11976         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11977 echo "configure:11978: checking for pthread link with -pthread" >&5
11978 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11979   echo $ac_n "(cached) $ac_c" 1>&6
11980 else
11981   
11982                 # save the flags
11983                 ol_LIBS="$LIBS"
11984                 LIBS="-pthread $LIBS"
11985
11986                 if test "$cross_compiling" = yes; then
11987   cat > conftest.$ac_ext <<EOF
11988 #line 11989 "configure"
11989 #include "confdefs.h"
11990 /* pthread test headers */
11991 #include <pthread.h>
11992 #if HAVE_PTHREADS < 7
11993 #include <errno.h>
11994 #endif
11995 #ifndef NULL
11996 #define NULL (void*)0
11997 #endif
11998
11999 static void *task(p)
12000         void *p;
12001 {
12002         return (void *) (p == NULL);
12003 }
12004
12005 int main() {
12006
12007         /* pthread test function */
12008 #ifndef PTHREAD_CREATE_DETACHED
12009 #define PTHREAD_CREATE_DETACHED 1
12010 #endif
12011         pthread_t t;
12012         int status;
12013         int detach = PTHREAD_CREATE_DETACHED;
12014
12015 #if HAVE_PTHREADS > 4
12016         /* Final pthreads */
12017         pthread_attr_t attr;
12018
12019         status = pthread_attr_init(&attr);
12020         if( status ) return status;
12021
12022 #if HAVE_PTHREADS < 7
12023         status = pthread_attr_setdetachstate(&attr, &detach);
12024         if( status < 0 ) status = errno;
12025 #else
12026         status = pthread_attr_setdetachstate(&attr, detach);
12027 #endif
12028         if( status ) return status;
12029         status = pthread_create( &t, &attr, task, NULL );
12030 #if HAVE_PTHREADS < 7
12031         if( status < 0 ) status = errno;
12032 #endif
12033         if( status ) return status;
12034 #else
12035         /* Draft 4 pthreads */
12036         status = pthread_create( &t, pthread_attr_default, task, NULL );
12037         if( status ) return errno;
12038
12039         /* give thread a chance to complete */
12040         /* it should remain joinable and hence detachable */
12041         sleep( 1 );
12042
12043         status = pthread_detach( &t );
12044         if( status ) return errno;
12045 #endif
12046
12047 #ifdef HAVE_LINUX_THREADS
12048         pthread_kill_other_threads_np();
12049 #endif
12050
12051         return 0;
12052
12053 ; return 0; }
12054 EOF
12055 if { (eval echo configure:12056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12056   rm -rf conftest*
12057   ol_cv_pthread_pthread=yes
12058 else
12059   echo "configure: failed program was:" >&5
12060   cat conftest.$ac_ext >&5
12061   rm -rf conftest*
12062   ol_cv_pthread_pthread=no
12063 fi
12064 rm -f conftest*
12065 else
12066   cat > conftest.$ac_ext <<EOF
12067 #line 12068 "configure"
12068 #include "confdefs.h"
12069 /* pthread test headers */
12070 #include <pthread.h>
12071 #if HAVE_PTHREADS < 7
12072 #include <errno.h>
12073 #endif
12074 #ifndef NULL
12075 #define NULL (void*)0
12076 #endif
12077
12078 static void *task(p)
12079         void *p;
12080 {
12081         return (void *) (p == NULL);
12082 }
12083
12084
12085 int main(argc, argv)
12086         int argc;
12087         char **argv;
12088 {
12089
12090         /* pthread test function */
12091 #ifndef PTHREAD_CREATE_DETACHED
12092 #define PTHREAD_CREATE_DETACHED 1
12093 #endif
12094         pthread_t t;
12095         int status;
12096         int detach = PTHREAD_CREATE_DETACHED;
12097
12098 #if HAVE_PTHREADS > 4
12099         /* Final pthreads */
12100         pthread_attr_t attr;
12101
12102         status = pthread_attr_init(&attr);
12103         if( status ) return status;
12104
12105 #if HAVE_PTHREADS < 7
12106         status = pthread_attr_setdetachstate(&attr, &detach);
12107         if( status < 0 ) status = errno;
12108 #else
12109         status = pthread_attr_setdetachstate(&attr, detach);
12110 #endif
12111         if( status ) return status;
12112         status = pthread_create( &t, &attr, task, NULL );
12113 #if HAVE_PTHREADS < 7
12114         if( status < 0 ) status = errno;
12115 #endif
12116         if( status ) return status;
12117 #else
12118         /* Draft 4 pthreads */
12119         status = pthread_create( &t, pthread_attr_default, task, NULL );
12120         if( status ) return errno;
12121
12122         /* give thread a chance to complete */
12123         /* it should remain joinable and hence detachable */
12124         sleep( 1 );
12125
12126         status = pthread_detach( &t );
12127         if( status ) return errno;
12128 #endif
12129
12130 #ifdef HAVE_LINUX_THREADS
12131         pthread_kill_other_threads_np();
12132 #endif
12133
12134         return 0;
12135
12136 }
12137
12138 EOF
12139 if { (eval echo configure:12140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12140 then
12141   ol_cv_pthread_pthread=yes
12142 else
12143   echo "configure: failed program was:" >&5
12144   cat conftest.$ac_ext >&5
12145   rm -fr conftest*
12146   ol_cv_pthread_pthread=no
12147 fi
12148 rm -fr conftest*
12149 fi
12150
12151
12152                 # restore the LIBS
12153                 LIBS="$ol_LIBS"
12154         
12155 fi
12156
12157 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12158
12159         if test $ol_cv_pthread_pthread = yes ; then
12160                 ol_link_pthreads="-pthread"
12161                 ol_link_threads=posix
12162         fi
12163 fi
12164
12165                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12166 if test "$ol_link_threads" = no ; then
12167         # try -pthreads
12168         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12169 echo "configure:12170: checking for pthread link with -pthreads" >&5
12170 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12171   echo $ac_n "(cached) $ac_c" 1>&6
12172 else
12173   
12174                 # save the flags
12175                 ol_LIBS="$LIBS"
12176                 LIBS="-pthreads $LIBS"
12177
12178                 if test "$cross_compiling" = yes; then
12179   cat > conftest.$ac_ext <<EOF
12180 #line 12181 "configure"
12181 #include "confdefs.h"
12182 /* pthread test headers */
12183 #include <pthread.h>
12184 #if HAVE_PTHREADS < 7
12185 #include <errno.h>
12186 #endif
12187 #ifndef NULL
12188 #define NULL (void*)0
12189 #endif
12190
12191 static void *task(p)
12192         void *p;
12193 {
12194         return (void *) (p == NULL);
12195 }
12196
12197 int main() {
12198
12199         /* pthread test function */
12200 #ifndef PTHREAD_CREATE_DETACHED
12201 #define PTHREAD_CREATE_DETACHED 1
12202 #endif
12203         pthread_t t;
12204         int status;
12205         int detach = PTHREAD_CREATE_DETACHED;
12206
12207 #if HAVE_PTHREADS > 4
12208         /* Final pthreads */
12209         pthread_attr_t attr;
12210
12211         status = pthread_attr_init(&attr);
12212         if( status ) return status;
12213
12214 #if HAVE_PTHREADS < 7
12215         status = pthread_attr_setdetachstate(&attr, &detach);
12216         if( status < 0 ) status = errno;
12217 #else
12218         status = pthread_attr_setdetachstate(&attr, detach);
12219 #endif
12220         if( status ) return status;
12221         status = pthread_create( &t, &attr, task, NULL );
12222 #if HAVE_PTHREADS < 7
12223         if( status < 0 ) status = errno;
12224 #endif
12225         if( status ) return status;
12226 #else
12227         /* Draft 4 pthreads */
12228         status = pthread_create( &t, pthread_attr_default, task, NULL );
12229         if( status ) return errno;
12230
12231         /* give thread a chance to complete */
12232         /* it should remain joinable and hence detachable */
12233         sleep( 1 );
12234
12235         status = pthread_detach( &t );
12236         if( status ) return errno;
12237 #endif
12238
12239 #ifdef HAVE_LINUX_THREADS
12240         pthread_kill_other_threads_np();
12241 #endif
12242
12243         return 0;
12244
12245 ; return 0; }
12246 EOF
12247 if { (eval echo configure:12248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12248   rm -rf conftest*
12249   ol_cv_pthread_pthreads=yes
12250 else
12251   echo "configure: failed program was:" >&5
12252   cat conftest.$ac_ext >&5
12253   rm -rf conftest*
12254   ol_cv_pthread_pthreads=no
12255 fi
12256 rm -f conftest*
12257 else
12258   cat > conftest.$ac_ext <<EOF
12259 #line 12260 "configure"
12260 #include "confdefs.h"
12261 /* pthread test headers */
12262 #include <pthread.h>
12263 #if HAVE_PTHREADS < 7
12264 #include <errno.h>
12265 #endif
12266 #ifndef NULL
12267 #define NULL (void*)0
12268 #endif
12269
12270 static void *task(p)
12271         void *p;
12272 {
12273         return (void *) (p == NULL);
12274 }
12275
12276
12277 int main(argc, argv)
12278         int argc;
12279         char **argv;
12280 {
12281
12282         /* pthread test function */
12283 #ifndef PTHREAD_CREATE_DETACHED
12284 #define PTHREAD_CREATE_DETACHED 1
12285 #endif
12286         pthread_t t;
12287         int status;
12288         int detach = PTHREAD_CREATE_DETACHED;
12289
12290 #if HAVE_PTHREADS > 4
12291         /* Final pthreads */
12292         pthread_attr_t attr;
12293
12294         status = pthread_attr_init(&attr);
12295         if( status ) return status;
12296
12297 #if HAVE_PTHREADS < 7
12298         status = pthread_attr_setdetachstate(&attr, &detach);
12299         if( status < 0 ) status = errno;
12300 #else
12301         status = pthread_attr_setdetachstate(&attr, detach);
12302 #endif
12303         if( status ) return status;
12304         status = pthread_create( &t, &attr, task, NULL );
12305 #if HAVE_PTHREADS < 7
12306         if( status < 0 ) status = errno;
12307 #endif
12308         if( status ) return status;
12309 #else
12310         /* Draft 4 pthreads */
12311         status = pthread_create( &t, pthread_attr_default, task, NULL );
12312         if( status ) return errno;
12313
12314         /* give thread a chance to complete */
12315         /* it should remain joinable and hence detachable */
12316         sleep( 1 );
12317
12318         status = pthread_detach( &t );
12319         if( status ) return errno;
12320 #endif
12321
12322 #ifdef HAVE_LINUX_THREADS
12323         pthread_kill_other_threads_np();
12324 #endif
12325
12326         return 0;
12327
12328 }
12329
12330 EOF
12331 if { (eval echo configure:12332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12332 then
12333   ol_cv_pthread_pthreads=yes
12334 else
12335   echo "configure: failed program was:" >&5
12336   cat conftest.$ac_ext >&5
12337   rm -fr conftest*
12338   ol_cv_pthread_pthreads=no
12339 fi
12340 rm -fr conftest*
12341 fi
12342
12343
12344                 # restore the LIBS
12345                 LIBS="$ol_LIBS"
12346         
12347 fi
12348
12349 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12350
12351         if test $ol_cv_pthread_pthreads = yes ; then
12352                 ol_link_pthreads="-pthreads"
12353                 ol_link_threads=posix
12354         fi
12355 fi
12356
12357                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12358 if test "$ol_link_threads" = no ; then
12359         # try -mthreads
12360         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12361 echo "configure:12362: checking for pthread link with -mthreads" >&5
12362 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12363   echo $ac_n "(cached) $ac_c" 1>&6
12364 else
12365   
12366                 # save the flags
12367                 ol_LIBS="$LIBS"
12368                 LIBS="-mthreads $LIBS"
12369
12370                 if test "$cross_compiling" = yes; then
12371   cat > conftest.$ac_ext <<EOF
12372 #line 12373 "configure"
12373 #include "confdefs.h"
12374 /* pthread test headers */
12375 #include <pthread.h>
12376 #if HAVE_PTHREADS < 7
12377 #include <errno.h>
12378 #endif
12379 #ifndef NULL
12380 #define NULL (void*)0
12381 #endif
12382
12383 static void *task(p)
12384         void *p;
12385 {
12386         return (void *) (p == NULL);
12387 }
12388
12389 int main() {
12390
12391         /* pthread test function */
12392 #ifndef PTHREAD_CREATE_DETACHED
12393 #define PTHREAD_CREATE_DETACHED 1
12394 #endif
12395         pthread_t t;
12396         int status;
12397         int detach = PTHREAD_CREATE_DETACHED;
12398
12399 #if HAVE_PTHREADS > 4
12400         /* Final pthreads */
12401         pthread_attr_t attr;
12402
12403         status = pthread_attr_init(&attr);
12404         if( status ) return status;
12405
12406 #if HAVE_PTHREADS < 7
12407         status = pthread_attr_setdetachstate(&attr, &detach);
12408         if( status < 0 ) status = errno;
12409 #else
12410         status = pthread_attr_setdetachstate(&attr, detach);
12411 #endif
12412         if( status ) return status;
12413         status = pthread_create( &t, &attr, task, NULL );
12414 #if HAVE_PTHREADS < 7
12415         if( status < 0 ) status = errno;
12416 #endif
12417         if( status ) return status;
12418 #else
12419         /* Draft 4 pthreads */
12420         status = pthread_create( &t, pthread_attr_default, task, NULL );
12421         if( status ) return errno;
12422
12423         /* give thread a chance to complete */
12424         /* it should remain joinable and hence detachable */
12425         sleep( 1 );
12426
12427         status = pthread_detach( &t );
12428         if( status ) return errno;
12429 #endif
12430
12431 #ifdef HAVE_LINUX_THREADS
12432         pthread_kill_other_threads_np();
12433 #endif
12434
12435         return 0;
12436
12437 ; return 0; }
12438 EOF
12439 if { (eval echo configure:12440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12440   rm -rf conftest*
12441   ol_cv_pthread_mthreads=yes
12442 else
12443   echo "configure: failed program was:" >&5
12444   cat conftest.$ac_ext >&5
12445   rm -rf conftest*
12446   ol_cv_pthread_mthreads=no
12447 fi
12448 rm -f conftest*
12449 else
12450   cat > conftest.$ac_ext <<EOF
12451 #line 12452 "configure"
12452 #include "confdefs.h"
12453 /* pthread test headers */
12454 #include <pthread.h>
12455 #if HAVE_PTHREADS < 7
12456 #include <errno.h>
12457 #endif
12458 #ifndef NULL
12459 #define NULL (void*)0
12460 #endif
12461
12462 static void *task(p)
12463         void *p;
12464 {
12465         return (void *) (p == NULL);
12466 }
12467
12468
12469 int main(argc, argv)
12470         int argc;
12471         char **argv;
12472 {
12473
12474         /* pthread test function */
12475 #ifndef PTHREAD_CREATE_DETACHED
12476 #define PTHREAD_CREATE_DETACHED 1
12477 #endif
12478         pthread_t t;
12479         int status;
12480         int detach = PTHREAD_CREATE_DETACHED;
12481
12482 #if HAVE_PTHREADS > 4
12483         /* Final pthreads */
12484         pthread_attr_t attr;
12485
12486         status = pthread_attr_init(&attr);
12487         if( status ) return status;
12488
12489 #if HAVE_PTHREADS < 7
12490         status = pthread_attr_setdetachstate(&attr, &detach);
12491         if( status < 0 ) status = errno;
12492 #else
12493         status = pthread_attr_setdetachstate(&attr, detach);
12494 #endif
12495         if( status ) return status;
12496         status = pthread_create( &t, &attr, task, NULL );
12497 #if HAVE_PTHREADS < 7
12498         if( status < 0 ) status = errno;
12499 #endif
12500         if( status ) return status;
12501 #else
12502         /* Draft 4 pthreads */
12503         status = pthread_create( &t, pthread_attr_default, task, NULL );
12504         if( status ) return errno;
12505
12506         /* give thread a chance to complete */
12507         /* it should remain joinable and hence detachable */
12508         sleep( 1 );
12509
12510         status = pthread_detach( &t );
12511         if( status ) return errno;
12512 #endif
12513
12514 #ifdef HAVE_LINUX_THREADS
12515         pthread_kill_other_threads_np();
12516 #endif
12517
12518         return 0;
12519
12520 }
12521
12522 EOF
12523 if { (eval echo configure:12524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12524 then
12525   ol_cv_pthread_mthreads=yes
12526 else
12527   echo "configure: failed program was:" >&5
12528   cat conftest.$ac_ext >&5
12529   rm -fr conftest*
12530   ol_cv_pthread_mthreads=no
12531 fi
12532 rm -fr conftest*
12533 fi
12534
12535
12536                 # restore the LIBS
12537                 LIBS="$ol_LIBS"
12538         
12539 fi
12540
12541 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12542
12543         if test $ol_cv_pthread_mthreads = yes ; then
12544                 ol_link_pthreads="-mthreads"
12545                 ol_link_threads=posix
12546         fi
12547 fi
12548
12549                 # Pthread try link: -thread (ol_cv_pthread_thread)
12550 if test "$ol_link_threads" = no ; then
12551         # try -thread
12552         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12553 echo "configure:12554: checking for pthread link with -thread" >&5
12554 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12555   echo $ac_n "(cached) $ac_c" 1>&6
12556 else
12557   
12558                 # save the flags
12559                 ol_LIBS="$LIBS"
12560                 LIBS="-thread $LIBS"
12561
12562                 if test "$cross_compiling" = yes; then
12563   cat > conftest.$ac_ext <<EOF
12564 #line 12565 "configure"
12565 #include "confdefs.h"
12566 /* pthread test headers */
12567 #include <pthread.h>
12568 #if HAVE_PTHREADS < 7
12569 #include <errno.h>
12570 #endif
12571 #ifndef NULL
12572 #define NULL (void*)0
12573 #endif
12574
12575 static void *task(p)
12576         void *p;
12577 {
12578         return (void *) (p == NULL);
12579 }
12580
12581 int main() {
12582
12583         /* pthread test function */
12584 #ifndef PTHREAD_CREATE_DETACHED
12585 #define PTHREAD_CREATE_DETACHED 1
12586 #endif
12587         pthread_t t;
12588         int status;
12589         int detach = PTHREAD_CREATE_DETACHED;
12590
12591 #if HAVE_PTHREADS > 4
12592         /* Final pthreads */
12593         pthread_attr_t attr;
12594
12595         status = pthread_attr_init(&attr);
12596         if( status ) return status;
12597
12598 #if HAVE_PTHREADS < 7
12599         status = pthread_attr_setdetachstate(&attr, &detach);
12600         if( status < 0 ) status = errno;
12601 #else
12602         status = pthread_attr_setdetachstate(&attr, detach);
12603 #endif
12604         if( status ) return status;
12605         status = pthread_create( &t, &attr, task, NULL );
12606 #if HAVE_PTHREADS < 7
12607         if( status < 0 ) status = errno;
12608 #endif
12609         if( status ) return status;
12610 #else
12611         /* Draft 4 pthreads */
12612         status = pthread_create( &t, pthread_attr_default, task, NULL );
12613         if( status ) return errno;
12614
12615         /* give thread a chance to complete */
12616         /* it should remain joinable and hence detachable */
12617         sleep( 1 );
12618
12619         status = pthread_detach( &t );
12620         if( status ) return errno;
12621 #endif
12622
12623 #ifdef HAVE_LINUX_THREADS
12624         pthread_kill_other_threads_np();
12625 #endif
12626
12627         return 0;
12628
12629 ; return 0; }
12630 EOF
12631 if { (eval echo configure:12632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12632   rm -rf conftest*
12633   ol_cv_pthread_thread=yes
12634 else
12635   echo "configure: failed program was:" >&5
12636   cat conftest.$ac_ext >&5
12637   rm -rf conftest*
12638   ol_cv_pthread_thread=no
12639 fi
12640 rm -f conftest*
12641 else
12642   cat > conftest.$ac_ext <<EOF
12643 #line 12644 "configure"
12644 #include "confdefs.h"
12645 /* pthread test headers */
12646 #include <pthread.h>
12647 #if HAVE_PTHREADS < 7
12648 #include <errno.h>
12649 #endif
12650 #ifndef NULL
12651 #define NULL (void*)0
12652 #endif
12653
12654 static void *task(p)
12655         void *p;
12656 {
12657         return (void *) (p == NULL);
12658 }
12659
12660
12661 int main(argc, argv)
12662         int argc;
12663         char **argv;
12664 {
12665
12666         /* pthread test function */
12667 #ifndef PTHREAD_CREATE_DETACHED
12668 #define PTHREAD_CREATE_DETACHED 1
12669 #endif
12670         pthread_t t;
12671         int status;
12672         int detach = PTHREAD_CREATE_DETACHED;
12673
12674 #if HAVE_PTHREADS > 4
12675         /* Final pthreads */
12676         pthread_attr_t attr;
12677
12678         status = pthread_attr_init(&attr);
12679         if( status ) return status;
12680
12681 #if HAVE_PTHREADS < 7
12682         status = pthread_attr_setdetachstate(&attr, &detach);
12683         if( status < 0 ) status = errno;
12684 #else
12685         status = pthread_attr_setdetachstate(&attr, detach);
12686 #endif
12687         if( status ) return status;
12688         status = pthread_create( &t, &attr, task, NULL );
12689 #if HAVE_PTHREADS < 7
12690         if( status < 0 ) status = errno;
12691 #endif
12692         if( status ) return status;
12693 #else
12694         /* Draft 4 pthreads */
12695         status = pthread_create( &t, pthread_attr_default, task, NULL );
12696         if( status ) return errno;
12697
12698         /* give thread a chance to complete */
12699         /* it should remain joinable and hence detachable */
12700         sleep( 1 );
12701
12702         status = pthread_detach( &t );
12703         if( status ) return errno;
12704 #endif
12705
12706 #ifdef HAVE_LINUX_THREADS
12707         pthread_kill_other_threads_np();
12708 #endif
12709
12710         return 0;
12711
12712 }
12713
12714 EOF
12715 if { (eval echo configure:12716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12716 then
12717   ol_cv_pthread_thread=yes
12718 else
12719   echo "configure: failed program was:" >&5
12720   cat conftest.$ac_ext >&5
12721   rm -fr conftest*
12722   ol_cv_pthread_thread=no
12723 fi
12724 rm -fr conftest*
12725 fi
12726
12727
12728                 # restore the LIBS
12729                 LIBS="$ol_LIBS"
12730         
12731 fi
12732
12733 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12734
12735         if test $ol_cv_pthread_thread = yes ; then
12736                 ol_link_pthreads="-thread"
12737                 ol_link_threads=posix
12738         fi
12739 fi
12740
12741
12742                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12743 if test "$ol_link_threads" = no ; then
12744         # try -lpthread -lmach -lexc -lc_r
12745         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12746 echo "configure:12747: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12747 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12748   echo $ac_n "(cached) $ac_c" 1>&6
12749 else
12750   
12751                 # save the flags
12752                 ol_LIBS="$LIBS"
12753                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12754
12755                 if test "$cross_compiling" = yes; then
12756   cat > conftest.$ac_ext <<EOF
12757 #line 12758 "configure"
12758 #include "confdefs.h"
12759 /* pthread test headers */
12760 #include <pthread.h>
12761 #if HAVE_PTHREADS < 7
12762 #include <errno.h>
12763 #endif
12764 #ifndef NULL
12765 #define NULL (void*)0
12766 #endif
12767
12768 static void *task(p)
12769         void *p;
12770 {
12771         return (void *) (p == NULL);
12772 }
12773
12774 int main() {
12775
12776         /* pthread test function */
12777 #ifndef PTHREAD_CREATE_DETACHED
12778 #define PTHREAD_CREATE_DETACHED 1
12779 #endif
12780         pthread_t t;
12781         int status;
12782         int detach = PTHREAD_CREATE_DETACHED;
12783
12784 #if HAVE_PTHREADS > 4
12785         /* Final pthreads */
12786         pthread_attr_t attr;
12787
12788         status = pthread_attr_init(&attr);
12789         if( status ) return status;
12790
12791 #if HAVE_PTHREADS < 7
12792         status = pthread_attr_setdetachstate(&attr, &detach);
12793         if( status < 0 ) status = errno;
12794 #else
12795         status = pthread_attr_setdetachstate(&attr, detach);
12796 #endif
12797         if( status ) return status;
12798         status = pthread_create( &t, &attr, task, NULL );
12799 #if HAVE_PTHREADS < 7
12800         if( status < 0 ) status = errno;
12801 #endif
12802         if( status ) return status;
12803 #else
12804         /* Draft 4 pthreads */
12805         status = pthread_create( &t, pthread_attr_default, task, NULL );
12806         if( status ) return errno;
12807
12808         /* give thread a chance to complete */
12809         /* it should remain joinable and hence detachable */
12810         sleep( 1 );
12811
12812         status = pthread_detach( &t );
12813         if( status ) return errno;
12814 #endif
12815
12816 #ifdef HAVE_LINUX_THREADS
12817         pthread_kill_other_threads_np();
12818 #endif
12819
12820         return 0;
12821
12822 ; return 0; }
12823 EOF
12824 if { (eval echo configure:12825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12825   rm -rf conftest*
12826   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12827 else
12828   echo "configure: failed program was:" >&5
12829   cat conftest.$ac_ext >&5
12830   rm -rf conftest*
12831   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12832 fi
12833 rm -f conftest*
12834 else
12835   cat > conftest.$ac_ext <<EOF
12836 #line 12837 "configure"
12837 #include "confdefs.h"
12838 /* pthread test headers */
12839 #include <pthread.h>
12840 #if HAVE_PTHREADS < 7
12841 #include <errno.h>
12842 #endif
12843 #ifndef NULL
12844 #define NULL (void*)0
12845 #endif
12846
12847 static void *task(p)
12848         void *p;
12849 {
12850         return (void *) (p == NULL);
12851 }
12852
12853
12854 int main(argc, argv)
12855         int argc;
12856         char **argv;
12857 {
12858
12859         /* pthread test function */
12860 #ifndef PTHREAD_CREATE_DETACHED
12861 #define PTHREAD_CREATE_DETACHED 1
12862 #endif
12863         pthread_t t;
12864         int status;
12865         int detach = PTHREAD_CREATE_DETACHED;
12866
12867 #if HAVE_PTHREADS > 4
12868         /* Final pthreads */
12869         pthread_attr_t attr;
12870
12871         status = pthread_attr_init(&attr);
12872         if( status ) return status;
12873
12874 #if HAVE_PTHREADS < 7
12875         status = pthread_attr_setdetachstate(&attr, &detach);
12876         if( status < 0 ) status = errno;
12877 #else
12878         status = pthread_attr_setdetachstate(&attr, detach);
12879 #endif
12880         if( status ) return status;
12881         status = pthread_create( &t, &attr, task, NULL );
12882 #if HAVE_PTHREADS < 7
12883         if( status < 0 ) status = errno;
12884 #endif
12885         if( status ) return status;
12886 #else
12887         /* Draft 4 pthreads */
12888         status = pthread_create( &t, pthread_attr_default, task, NULL );
12889         if( status ) return errno;
12890
12891         /* give thread a chance to complete */
12892         /* it should remain joinable and hence detachable */
12893         sleep( 1 );
12894
12895         status = pthread_detach( &t );
12896         if( status ) return errno;
12897 #endif
12898
12899 #ifdef HAVE_LINUX_THREADS
12900         pthread_kill_other_threads_np();
12901 #endif
12902
12903         return 0;
12904
12905 }
12906
12907 EOF
12908 if { (eval echo configure:12909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12909 then
12910   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12911 else
12912   echo "configure: failed program was:" >&5
12913   cat conftest.$ac_ext >&5
12914   rm -fr conftest*
12915   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12916 fi
12917 rm -fr conftest*
12918 fi
12919
12920
12921                 # restore the LIBS
12922                 LIBS="$ol_LIBS"
12923         
12924 fi
12925
12926 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12927
12928         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12929                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12930                 ol_link_threads=posix
12931         fi
12932 fi
12933
12934                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12935 if test "$ol_link_threads" = no ; then
12936         # try -lpthread -lmach -lexc
12937         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12938 echo "configure:12939: checking for pthread link with -lpthread -lmach -lexc" >&5
12939 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12940   echo $ac_n "(cached) $ac_c" 1>&6
12941 else
12942   
12943                 # save the flags
12944                 ol_LIBS="$LIBS"
12945                 LIBS="-lpthread -lmach -lexc $LIBS"
12946
12947                 if test "$cross_compiling" = yes; then
12948   cat > conftest.$ac_ext <<EOF
12949 #line 12950 "configure"
12950 #include "confdefs.h"
12951 /* pthread test headers */
12952 #include <pthread.h>
12953 #if HAVE_PTHREADS < 7
12954 #include <errno.h>
12955 #endif
12956 #ifndef NULL
12957 #define NULL (void*)0
12958 #endif
12959
12960 static void *task(p)
12961         void *p;
12962 {
12963         return (void *) (p == NULL);
12964 }
12965
12966 int main() {
12967
12968         /* pthread test function */
12969 #ifndef PTHREAD_CREATE_DETACHED
12970 #define PTHREAD_CREATE_DETACHED 1
12971 #endif
12972         pthread_t t;
12973         int status;
12974         int detach = PTHREAD_CREATE_DETACHED;
12975
12976 #if HAVE_PTHREADS > 4
12977         /* Final pthreads */
12978         pthread_attr_t attr;
12979
12980         status = pthread_attr_init(&attr);
12981         if( status ) return status;
12982
12983 #if HAVE_PTHREADS < 7
12984         status = pthread_attr_setdetachstate(&attr, &detach);
12985         if( status < 0 ) status = errno;
12986 #else
12987         status = pthread_attr_setdetachstate(&attr, detach);
12988 #endif
12989         if( status ) return status;
12990         status = pthread_create( &t, &attr, task, NULL );
12991 #if HAVE_PTHREADS < 7
12992         if( status < 0 ) status = errno;
12993 #endif
12994         if( status ) return status;
12995 #else
12996         /* Draft 4 pthreads */
12997         status = pthread_create( &t, pthread_attr_default, task, NULL );
12998         if( status ) return errno;
12999
13000         /* give thread a chance to complete */
13001         /* it should remain joinable and hence detachable */
13002         sleep( 1 );
13003
13004         status = pthread_detach( &t );
13005         if( status ) return errno;
13006 #endif
13007
13008 #ifdef HAVE_LINUX_THREADS
13009         pthread_kill_other_threads_np();
13010 #endif
13011
13012         return 0;
13013
13014 ; return 0; }
13015 EOF
13016 if { (eval echo configure:13017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13017   rm -rf conftest*
13018   ol_cv_pthread_lpthread_lmach_lexc=yes
13019 else
13020   echo "configure: failed program was:" >&5
13021   cat conftest.$ac_ext >&5
13022   rm -rf conftest*
13023   ol_cv_pthread_lpthread_lmach_lexc=no
13024 fi
13025 rm -f conftest*
13026 else
13027   cat > conftest.$ac_ext <<EOF
13028 #line 13029 "configure"
13029 #include "confdefs.h"
13030 /* pthread test headers */
13031 #include <pthread.h>
13032 #if HAVE_PTHREADS < 7
13033 #include <errno.h>
13034 #endif
13035 #ifndef NULL
13036 #define NULL (void*)0
13037 #endif
13038
13039 static void *task(p)
13040         void *p;
13041 {
13042         return (void *) (p == NULL);
13043 }
13044
13045
13046 int main(argc, argv)
13047         int argc;
13048         char **argv;
13049 {
13050
13051         /* pthread test function */
13052 #ifndef PTHREAD_CREATE_DETACHED
13053 #define PTHREAD_CREATE_DETACHED 1
13054 #endif
13055         pthread_t t;
13056         int status;
13057         int detach = PTHREAD_CREATE_DETACHED;
13058
13059 #if HAVE_PTHREADS > 4
13060         /* Final pthreads */
13061         pthread_attr_t attr;
13062
13063         status = pthread_attr_init(&attr);
13064         if( status ) return status;
13065
13066 #if HAVE_PTHREADS < 7
13067         status = pthread_attr_setdetachstate(&attr, &detach);
13068         if( status < 0 ) status = errno;
13069 #else
13070         status = pthread_attr_setdetachstate(&attr, detach);
13071 #endif
13072         if( status ) return status;
13073         status = pthread_create( &t, &attr, task, NULL );
13074 #if HAVE_PTHREADS < 7
13075         if( status < 0 ) status = errno;
13076 #endif
13077         if( status ) return status;
13078 #else
13079         /* Draft 4 pthreads */
13080         status = pthread_create( &t, pthread_attr_default, task, NULL );
13081         if( status ) return errno;
13082
13083         /* give thread a chance to complete */
13084         /* it should remain joinable and hence detachable */
13085         sleep( 1 );
13086
13087         status = pthread_detach( &t );
13088         if( status ) return errno;
13089 #endif
13090
13091 #ifdef HAVE_LINUX_THREADS
13092         pthread_kill_other_threads_np();
13093 #endif
13094
13095         return 0;
13096
13097 }
13098
13099 EOF
13100 if { (eval echo configure:13101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13101 then
13102   ol_cv_pthread_lpthread_lmach_lexc=yes
13103 else
13104   echo "configure: failed program was:" >&5
13105   cat conftest.$ac_ext >&5
13106   rm -fr conftest*
13107   ol_cv_pthread_lpthread_lmach_lexc=no
13108 fi
13109 rm -fr conftest*
13110 fi
13111
13112
13113                 # restore the LIBS
13114                 LIBS="$ol_LIBS"
13115         
13116 fi
13117
13118 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13119
13120         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13121                 ol_link_pthreads="-lpthread -lmach -lexc"
13122                 ol_link_threads=posix
13123         fi
13124 fi
13125
13126
13127                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13128 if test "$ol_link_threads" = no ; then
13129         # try -lpthread -Wl,-woff,85
13130         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13131 echo "configure:13132: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13132 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13133   echo $ac_n "(cached) $ac_c" 1>&6
13134 else
13135   
13136                 # save the flags
13137                 ol_LIBS="$LIBS"
13138                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13139
13140                 if test "$cross_compiling" = yes; then
13141   cat > conftest.$ac_ext <<EOF
13142 #line 13143 "configure"
13143 #include "confdefs.h"
13144 /* pthread test headers */
13145 #include <pthread.h>
13146 #if HAVE_PTHREADS < 7
13147 #include <errno.h>
13148 #endif
13149 #ifndef NULL
13150 #define NULL (void*)0
13151 #endif
13152
13153 static void *task(p)
13154         void *p;
13155 {
13156         return (void *) (p == NULL);
13157 }
13158
13159 int main() {
13160
13161         /* pthread test function */
13162 #ifndef PTHREAD_CREATE_DETACHED
13163 #define PTHREAD_CREATE_DETACHED 1
13164 #endif
13165         pthread_t t;
13166         int status;
13167         int detach = PTHREAD_CREATE_DETACHED;
13168
13169 #if HAVE_PTHREADS > 4
13170         /* Final pthreads */
13171         pthread_attr_t attr;
13172
13173         status = pthread_attr_init(&attr);
13174         if( status ) return status;
13175
13176 #if HAVE_PTHREADS < 7
13177         status = pthread_attr_setdetachstate(&attr, &detach);
13178         if( status < 0 ) status = errno;
13179 #else
13180         status = pthread_attr_setdetachstate(&attr, detach);
13181 #endif
13182         if( status ) return status;
13183         status = pthread_create( &t, &attr, task, NULL );
13184 #if HAVE_PTHREADS < 7
13185         if( status < 0 ) status = errno;
13186 #endif
13187         if( status ) return status;
13188 #else
13189         /* Draft 4 pthreads */
13190         status = pthread_create( &t, pthread_attr_default, task, NULL );
13191         if( status ) return errno;
13192
13193         /* give thread a chance to complete */
13194         /* it should remain joinable and hence detachable */
13195         sleep( 1 );
13196
13197         status = pthread_detach( &t );
13198         if( status ) return errno;
13199 #endif
13200
13201 #ifdef HAVE_LINUX_THREADS
13202         pthread_kill_other_threads_np();
13203 #endif
13204
13205         return 0;
13206
13207 ; return 0; }
13208 EOF
13209 if { (eval echo configure:13210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13210   rm -rf conftest*
13211   ol_cv_pthread_lib_lpthread_woff=yes
13212 else
13213   echo "configure: failed program was:" >&5
13214   cat conftest.$ac_ext >&5
13215   rm -rf conftest*
13216   ol_cv_pthread_lib_lpthread_woff=no
13217 fi
13218 rm -f conftest*
13219 else
13220   cat > conftest.$ac_ext <<EOF
13221 #line 13222 "configure"
13222 #include "confdefs.h"
13223 /* pthread test headers */
13224 #include <pthread.h>
13225 #if HAVE_PTHREADS < 7
13226 #include <errno.h>
13227 #endif
13228 #ifndef NULL
13229 #define NULL (void*)0
13230 #endif
13231
13232 static void *task(p)
13233         void *p;
13234 {
13235         return (void *) (p == NULL);
13236 }
13237
13238
13239 int main(argc, argv)
13240         int argc;
13241         char **argv;
13242 {
13243
13244         /* pthread test function */
13245 #ifndef PTHREAD_CREATE_DETACHED
13246 #define PTHREAD_CREATE_DETACHED 1
13247 #endif
13248         pthread_t t;
13249         int status;
13250         int detach = PTHREAD_CREATE_DETACHED;
13251
13252 #if HAVE_PTHREADS > 4
13253         /* Final pthreads */
13254         pthread_attr_t attr;
13255
13256         status = pthread_attr_init(&attr);
13257         if( status ) return status;
13258
13259 #if HAVE_PTHREADS < 7
13260         status = pthread_attr_setdetachstate(&attr, &detach);
13261         if( status < 0 ) status = errno;
13262 #else
13263         status = pthread_attr_setdetachstate(&attr, detach);
13264 #endif
13265         if( status ) return status;
13266         status = pthread_create( &t, &attr, task, NULL );
13267 #if HAVE_PTHREADS < 7
13268         if( status < 0 ) status = errno;
13269 #endif
13270         if( status ) return status;
13271 #else
13272         /* Draft 4 pthreads */
13273         status = pthread_create( &t, pthread_attr_default, task, NULL );
13274         if( status ) return errno;
13275
13276         /* give thread a chance to complete */
13277         /* it should remain joinable and hence detachable */
13278         sleep( 1 );
13279
13280         status = pthread_detach( &t );
13281         if( status ) return errno;
13282 #endif
13283
13284 #ifdef HAVE_LINUX_THREADS
13285         pthread_kill_other_threads_np();
13286 #endif
13287
13288         return 0;
13289
13290 }
13291
13292 EOF
13293 if { (eval echo configure:13294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13294 then
13295   ol_cv_pthread_lib_lpthread_woff=yes
13296 else
13297   echo "configure: failed program was:" >&5
13298   cat conftest.$ac_ext >&5
13299   rm -fr conftest*
13300   ol_cv_pthread_lib_lpthread_woff=no
13301 fi
13302 rm -fr conftest*
13303 fi
13304
13305
13306                 # restore the LIBS
13307                 LIBS="$ol_LIBS"
13308         
13309 fi
13310
13311 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13312
13313         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13314                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13315                 ol_link_threads=posix
13316         fi
13317 fi
13318
13319
13320                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13321 if test "$ol_link_threads" = no ; then
13322         # try -lpthread
13323         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13324 echo "configure:13325: checking for pthread link with -lpthread" >&5
13325 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13326   echo $ac_n "(cached) $ac_c" 1>&6
13327 else
13328   
13329                 # save the flags
13330                 ol_LIBS="$LIBS"
13331                 LIBS="-lpthread $LIBS"
13332
13333                 if test "$cross_compiling" = yes; then
13334   cat > conftest.$ac_ext <<EOF
13335 #line 13336 "configure"
13336 #include "confdefs.h"
13337 /* pthread test headers */
13338 #include <pthread.h>
13339 #if HAVE_PTHREADS < 7
13340 #include <errno.h>
13341 #endif
13342 #ifndef NULL
13343 #define NULL (void*)0
13344 #endif
13345
13346 static void *task(p)
13347         void *p;
13348 {
13349         return (void *) (p == NULL);
13350 }
13351
13352 int main() {
13353
13354         /* pthread test function */
13355 #ifndef PTHREAD_CREATE_DETACHED
13356 #define PTHREAD_CREATE_DETACHED 1
13357 #endif
13358         pthread_t t;
13359         int status;
13360         int detach = PTHREAD_CREATE_DETACHED;
13361
13362 #if HAVE_PTHREADS > 4
13363         /* Final pthreads */
13364         pthread_attr_t attr;
13365
13366         status = pthread_attr_init(&attr);
13367         if( status ) return status;
13368
13369 #if HAVE_PTHREADS < 7
13370         status = pthread_attr_setdetachstate(&attr, &detach);
13371         if( status < 0 ) status = errno;
13372 #else
13373         status = pthread_attr_setdetachstate(&attr, detach);
13374 #endif
13375         if( status ) return status;
13376         status = pthread_create( &t, &attr, task, NULL );
13377 #if HAVE_PTHREADS < 7
13378         if( status < 0 ) status = errno;
13379 #endif
13380         if( status ) return status;
13381 #else
13382         /* Draft 4 pthreads */
13383         status = pthread_create( &t, pthread_attr_default, task, NULL );
13384         if( status ) return errno;
13385
13386         /* give thread a chance to complete */
13387         /* it should remain joinable and hence detachable */
13388         sleep( 1 );
13389
13390         status = pthread_detach( &t );
13391         if( status ) return errno;
13392 #endif
13393
13394 #ifdef HAVE_LINUX_THREADS
13395         pthread_kill_other_threads_np();
13396 #endif
13397
13398         return 0;
13399
13400 ; return 0; }
13401 EOF
13402 if { (eval echo configure:13403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13403   rm -rf conftest*
13404   ol_cv_pthread_lpthread=yes
13405 else
13406   echo "configure: failed program was:" >&5
13407   cat conftest.$ac_ext >&5
13408   rm -rf conftest*
13409   ol_cv_pthread_lpthread=no
13410 fi
13411 rm -f conftest*
13412 else
13413   cat > conftest.$ac_ext <<EOF
13414 #line 13415 "configure"
13415 #include "confdefs.h"
13416 /* pthread test headers */
13417 #include <pthread.h>
13418 #if HAVE_PTHREADS < 7
13419 #include <errno.h>
13420 #endif
13421 #ifndef NULL
13422 #define NULL (void*)0
13423 #endif
13424
13425 static void *task(p)
13426         void *p;
13427 {
13428         return (void *) (p == NULL);
13429 }
13430
13431
13432 int main(argc, argv)
13433         int argc;
13434         char **argv;
13435 {
13436
13437         /* pthread test function */
13438 #ifndef PTHREAD_CREATE_DETACHED
13439 #define PTHREAD_CREATE_DETACHED 1
13440 #endif
13441         pthread_t t;
13442         int status;
13443         int detach = PTHREAD_CREATE_DETACHED;
13444
13445 #if HAVE_PTHREADS > 4
13446         /* Final pthreads */
13447         pthread_attr_t attr;
13448
13449         status = pthread_attr_init(&attr);
13450         if( status ) return status;
13451
13452 #if HAVE_PTHREADS < 7
13453         status = pthread_attr_setdetachstate(&attr, &detach);
13454         if( status < 0 ) status = errno;
13455 #else
13456         status = pthread_attr_setdetachstate(&attr, detach);
13457 #endif
13458         if( status ) return status;
13459         status = pthread_create( &t, &attr, task, NULL );
13460 #if HAVE_PTHREADS < 7
13461         if( status < 0 ) status = errno;
13462 #endif
13463         if( status ) return status;
13464 #else
13465         /* Draft 4 pthreads */
13466         status = pthread_create( &t, pthread_attr_default, task, NULL );
13467         if( status ) return errno;
13468
13469         /* give thread a chance to complete */
13470         /* it should remain joinable and hence detachable */
13471         sleep( 1 );
13472
13473         status = pthread_detach( &t );
13474         if( status ) return errno;
13475 #endif
13476
13477 #ifdef HAVE_LINUX_THREADS
13478         pthread_kill_other_threads_np();
13479 #endif
13480
13481         return 0;
13482
13483 }
13484
13485 EOF
13486 if { (eval echo configure:13487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13487 then
13488   ol_cv_pthread_lpthread=yes
13489 else
13490   echo "configure: failed program was:" >&5
13491   cat conftest.$ac_ext >&5
13492   rm -fr conftest*
13493   ol_cv_pthread_lpthread=no
13494 fi
13495 rm -fr conftest*
13496 fi
13497
13498
13499                 # restore the LIBS
13500                 LIBS="$ol_LIBS"
13501         
13502 fi
13503
13504 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13505
13506         if test $ol_cv_pthread_lpthread = yes ; then
13507                 ol_link_pthreads="-lpthread"
13508                 ol_link_threads=posix
13509         fi
13510 fi
13511
13512                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13513 if test "$ol_link_threads" = no ; then
13514         # try -lc_r
13515         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13516 echo "configure:13517: checking for pthread link with -lc_r" >&5
13517 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13518   echo $ac_n "(cached) $ac_c" 1>&6
13519 else
13520   
13521                 # save the flags
13522                 ol_LIBS="$LIBS"
13523                 LIBS="-lc_r $LIBS"
13524
13525                 if test "$cross_compiling" = yes; then
13526   cat > conftest.$ac_ext <<EOF
13527 #line 13528 "configure"
13528 #include "confdefs.h"
13529 /* pthread test headers */
13530 #include <pthread.h>
13531 #if HAVE_PTHREADS < 7
13532 #include <errno.h>
13533 #endif
13534 #ifndef NULL
13535 #define NULL (void*)0
13536 #endif
13537
13538 static void *task(p)
13539         void *p;
13540 {
13541         return (void *) (p == NULL);
13542 }
13543
13544 int main() {
13545
13546         /* pthread test function */
13547 #ifndef PTHREAD_CREATE_DETACHED
13548 #define PTHREAD_CREATE_DETACHED 1
13549 #endif
13550         pthread_t t;
13551         int status;
13552         int detach = PTHREAD_CREATE_DETACHED;
13553
13554 #if HAVE_PTHREADS > 4
13555         /* Final pthreads */
13556         pthread_attr_t attr;
13557
13558         status = pthread_attr_init(&attr);
13559         if( status ) return status;
13560
13561 #if HAVE_PTHREADS < 7
13562         status = pthread_attr_setdetachstate(&attr, &detach);
13563         if( status < 0 ) status = errno;
13564 #else
13565         status = pthread_attr_setdetachstate(&attr, detach);
13566 #endif
13567         if( status ) return status;
13568         status = pthread_create( &t, &attr, task, NULL );
13569 #if HAVE_PTHREADS < 7
13570         if( status < 0 ) status = errno;
13571 #endif
13572         if( status ) return status;
13573 #else
13574         /* Draft 4 pthreads */
13575         status = pthread_create( &t, pthread_attr_default, task, NULL );
13576         if( status ) return errno;
13577
13578         /* give thread a chance to complete */
13579         /* it should remain joinable and hence detachable */
13580         sleep( 1 );
13581
13582         status = pthread_detach( &t );
13583         if( status ) return errno;
13584 #endif
13585
13586 #ifdef HAVE_LINUX_THREADS
13587         pthread_kill_other_threads_np();
13588 #endif
13589
13590         return 0;
13591
13592 ; return 0; }
13593 EOF
13594 if { (eval echo configure:13595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13595   rm -rf conftest*
13596   ol_cv_pthread_lc_r=yes
13597 else
13598   echo "configure: failed program was:" >&5
13599   cat conftest.$ac_ext >&5
13600   rm -rf conftest*
13601   ol_cv_pthread_lc_r=no
13602 fi
13603 rm -f conftest*
13604 else
13605   cat > conftest.$ac_ext <<EOF
13606 #line 13607 "configure"
13607 #include "confdefs.h"
13608 /* pthread test headers */
13609 #include <pthread.h>
13610 #if HAVE_PTHREADS < 7
13611 #include <errno.h>
13612 #endif
13613 #ifndef NULL
13614 #define NULL (void*)0
13615 #endif
13616
13617 static void *task(p)
13618         void *p;
13619 {
13620         return (void *) (p == NULL);
13621 }
13622
13623
13624 int main(argc, argv)
13625         int argc;
13626         char **argv;
13627 {
13628
13629         /* pthread test function */
13630 #ifndef PTHREAD_CREATE_DETACHED
13631 #define PTHREAD_CREATE_DETACHED 1
13632 #endif
13633         pthread_t t;
13634         int status;
13635         int detach = PTHREAD_CREATE_DETACHED;
13636
13637 #if HAVE_PTHREADS > 4
13638         /* Final pthreads */
13639         pthread_attr_t attr;
13640
13641         status = pthread_attr_init(&attr);
13642         if( status ) return status;
13643
13644 #if HAVE_PTHREADS < 7
13645         status = pthread_attr_setdetachstate(&attr, &detach);
13646         if( status < 0 ) status = errno;
13647 #else
13648         status = pthread_attr_setdetachstate(&attr, detach);
13649 #endif
13650         if( status ) return status;
13651         status = pthread_create( &t, &attr, task, NULL );
13652 #if HAVE_PTHREADS < 7
13653         if( status < 0 ) status = errno;
13654 #endif
13655         if( status ) return status;
13656 #else
13657         /* Draft 4 pthreads */
13658         status = pthread_create( &t, pthread_attr_default, task, NULL );
13659         if( status ) return errno;
13660
13661         /* give thread a chance to complete */
13662         /* it should remain joinable and hence detachable */
13663         sleep( 1 );
13664
13665         status = pthread_detach( &t );
13666         if( status ) return errno;
13667 #endif
13668
13669 #ifdef HAVE_LINUX_THREADS
13670         pthread_kill_other_threads_np();
13671 #endif
13672
13673         return 0;
13674
13675 }
13676
13677 EOF
13678 if { (eval echo configure:13679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13679 then
13680   ol_cv_pthread_lc_r=yes
13681 else
13682   echo "configure: failed program was:" >&5
13683   cat conftest.$ac_ext >&5
13684   rm -fr conftest*
13685   ol_cv_pthread_lc_r=no
13686 fi
13687 rm -fr conftest*
13688 fi
13689
13690
13691                 # restore the LIBS
13692                 LIBS="$ol_LIBS"
13693         
13694 fi
13695
13696 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13697
13698         if test $ol_cv_pthread_lc_r = yes ; then
13699                 ol_link_pthreads="-lc_r"
13700                 ol_link_threads=posix
13701         fi
13702 fi
13703
13704
13705                 # Pthread try link: -threads (ol_cv_pthread_threads)
13706 if test "$ol_link_threads" = no ; then
13707         # try -threads
13708         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13709 echo "configure:13710: checking for pthread link with -threads" >&5
13710 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13711   echo $ac_n "(cached) $ac_c" 1>&6
13712 else
13713   
13714                 # save the flags
13715                 ol_LIBS="$LIBS"
13716                 LIBS="-threads $LIBS"
13717
13718                 if test "$cross_compiling" = yes; then
13719   cat > conftest.$ac_ext <<EOF
13720 #line 13721 "configure"
13721 #include "confdefs.h"
13722 /* pthread test headers */
13723 #include <pthread.h>
13724 #if HAVE_PTHREADS < 7
13725 #include <errno.h>
13726 #endif
13727 #ifndef NULL
13728 #define NULL (void*)0
13729 #endif
13730
13731 static void *task(p)
13732         void *p;
13733 {
13734         return (void *) (p == NULL);
13735 }
13736
13737 int main() {
13738
13739         /* pthread test function */
13740 #ifndef PTHREAD_CREATE_DETACHED
13741 #define PTHREAD_CREATE_DETACHED 1
13742 #endif
13743         pthread_t t;
13744         int status;
13745         int detach = PTHREAD_CREATE_DETACHED;
13746
13747 #if HAVE_PTHREADS > 4
13748         /* Final pthreads */
13749         pthread_attr_t attr;
13750
13751         status = pthread_attr_init(&attr);
13752         if( status ) return status;
13753
13754 #if HAVE_PTHREADS < 7
13755         status = pthread_attr_setdetachstate(&attr, &detach);
13756         if( status < 0 ) status = errno;
13757 #else
13758         status = pthread_attr_setdetachstate(&attr, detach);
13759 #endif
13760         if( status ) return status;
13761         status = pthread_create( &t, &attr, task, NULL );
13762 #if HAVE_PTHREADS < 7
13763         if( status < 0 ) status = errno;
13764 #endif
13765         if( status ) return status;
13766 #else
13767         /* Draft 4 pthreads */
13768         status = pthread_create( &t, pthread_attr_default, task, NULL );
13769         if( status ) return errno;
13770
13771         /* give thread a chance to complete */
13772         /* it should remain joinable and hence detachable */
13773         sleep( 1 );
13774
13775         status = pthread_detach( &t );
13776         if( status ) return errno;
13777 #endif
13778
13779 #ifdef HAVE_LINUX_THREADS
13780         pthread_kill_other_threads_np();
13781 #endif
13782
13783         return 0;
13784
13785 ; return 0; }
13786 EOF
13787 if { (eval echo configure:13788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13788   rm -rf conftest*
13789   ol_cv_pthread_threads=yes
13790 else
13791   echo "configure: failed program was:" >&5
13792   cat conftest.$ac_ext >&5
13793   rm -rf conftest*
13794   ol_cv_pthread_threads=no
13795 fi
13796 rm -f conftest*
13797 else
13798   cat > conftest.$ac_ext <<EOF
13799 #line 13800 "configure"
13800 #include "confdefs.h"
13801 /* pthread test headers */
13802 #include <pthread.h>
13803 #if HAVE_PTHREADS < 7
13804 #include <errno.h>
13805 #endif
13806 #ifndef NULL
13807 #define NULL (void*)0
13808 #endif
13809
13810 static void *task(p)
13811         void *p;
13812 {
13813         return (void *) (p == NULL);
13814 }
13815
13816
13817 int main(argc, argv)
13818         int argc;
13819         char **argv;
13820 {
13821
13822         /* pthread test function */
13823 #ifndef PTHREAD_CREATE_DETACHED
13824 #define PTHREAD_CREATE_DETACHED 1
13825 #endif
13826         pthread_t t;
13827         int status;
13828         int detach = PTHREAD_CREATE_DETACHED;
13829
13830 #if HAVE_PTHREADS > 4
13831         /* Final pthreads */
13832         pthread_attr_t attr;
13833
13834         status = pthread_attr_init(&attr);
13835         if( status ) return status;
13836
13837 #if HAVE_PTHREADS < 7
13838         status = pthread_attr_setdetachstate(&attr, &detach);
13839         if( status < 0 ) status = errno;
13840 #else
13841         status = pthread_attr_setdetachstate(&attr, detach);
13842 #endif
13843         if( status ) return status;
13844         status = pthread_create( &t, &attr, task, NULL );
13845 #if HAVE_PTHREADS < 7
13846         if( status < 0 ) status = errno;
13847 #endif
13848         if( status ) return status;
13849 #else
13850         /* Draft 4 pthreads */
13851         status = pthread_create( &t, pthread_attr_default, task, NULL );
13852         if( status ) return errno;
13853
13854         /* give thread a chance to complete */
13855         /* it should remain joinable and hence detachable */
13856         sleep( 1 );
13857
13858         status = pthread_detach( &t );
13859         if( status ) return errno;
13860 #endif
13861
13862 #ifdef HAVE_LINUX_THREADS
13863         pthread_kill_other_threads_np();
13864 #endif
13865
13866         return 0;
13867
13868 }
13869
13870 EOF
13871 if { (eval echo configure:13872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13872 then
13873   ol_cv_pthread_threads=yes
13874 else
13875   echo "configure: failed program was:" >&5
13876   cat conftest.$ac_ext >&5
13877   rm -fr conftest*
13878   ol_cv_pthread_threads=no
13879 fi
13880 rm -fr conftest*
13881 fi
13882
13883
13884                 # restore the LIBS
13885                 LIBS="$ol_LIBS"
13886         
13887 fi
13888
13889 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13890
13891         if test $ol_cv_pthread_threads = yes ; then
13892                 ol_link_pthreads="-threads"
13893                 ol_link_threads=posix
13894         fi
13895 fi
13896
13897
13898                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13899 if test "$ol_link_threads" = no ; then
13900         # try -lpthreads -lmach -lexc -lc_r
13901         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13902 echo "configure:13903: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13903 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13904   echo $ac_n "(cached) $ac_c" 1>&6
13905 else
13906   
13907                 # save the flags
13908                 ol_LIBS="$LIBS"
13909                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13910
13911                 if test "$cross_compiling" = yes; then
13912   cat > conftest.$ac_ext <<EOF
13913 #line 13914 "configure"
13914 #include "confdefs.h"
13915 /* pthread test headers */
13916 #include <pthread.h>
13917 #if HAVE_PTHREADS < 7
13918 #include <errno.h>
13919 #endif
13920 #ifndef NULL
13921 #define NULL (void*)0
13922 #endif
13923
13924 static void *task(p)
13925         void *p;
13926 {
13927         return (void *) (p == NULL);
13928 }
13929
13930 int main() {
13931
13932         /* pthread test function */
13933 #ifndef PTHREAD_CREATE_DETACHED
13934 #define PTHREAD_CREATE_DETACHED 1
13935 #endif
13936         pthread_t t;
13937         int status;
13938         int detach = PTHREAD_CREATE_DETACHED;
13939
13940 #if HAVE_PTHREADS > 4
13941         /* Final pthreads */
13942         pthread_attr_t attr;
13943
13944         status = pthread_attr_init(&attr);
13945         if( status ) return status;
13946
13947 #if HAVE_PTHREADS < 7
13948         status = pthread_attr_setdetachstate(&attr, &detach);
13949         if( status < 0 ) status = errno;
13950 #else
13951         status = pthread_attr_setdetachstate(&attr, detach);
13952 #endif
13953         if( status ) return status;
13954         status = pthread_create( &t, &attr, task, NULL );
13955 #if HAVE_PTHREADS < 7
13956         if( status < 0 ) status = errno;
13957 #endif
13958         if( status ) return status;
13959 #else
13960         /* Draft 4 pthreads */
13961         status = pthread_create( &t, pthread_attr_default, task, NULL );
13962         if( status ) return errno;
13963
13964         /* give thread a chance to complete */
13965         /* it should remain joinable and hence detachable */
13966         sleep( 1 );
13967
13968         status = pthread_detach( &t );
13969         if( status ) return errno;
13970 #endif
13971
13972 #ifdef HAVE_LINUX_THREADS
13973         pthread_kill_other_threads_np();
13974 #endif
13975
13976         return 0;
13977
13978 ; return 0; }
13979 EOF
13980 if { (eval echo configure:13981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13981   rm -rf conftest*
13982   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13983 else
13984   echo "configure: failed program was:" >&5
13985   cat conftest.$ac_ext >&5
13986   rm -rf conftest*
13987   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13988 fi
13989 rm -f conftest*
13990 else
13991   cat > conftest.$ac_ext <<EOF
13992 #line 13993 "configure"
13993 #include "confdefs.h"
13994 /* pthread test headers */
13995 #include <pthread.h>
13996 #if HAVE_PTHREADS < 7
13997 #include <errno.h>
13998 #endif
13999 #ifndef NULL
14000 #define NULL (void*)0
14001 #endif
14002
14003 static void *task(p)
14004         void *p;
14005 {
14006         return (void *) (p == NULL);
14007 }
14008
14009
14010 int main(argc, argv)
14011         int argc;
14012         char **argv;
14013 {
14014
14015         /* pthread test function */
14016 #ifndef PTHREAD_CREATE_DETACHED
14017 #define PTHREAD_CREATE_DETACHED 1
14018 #endif
14019         pthread_t t;
14020         int status;
14021         int detach = PTHREAD_CREATE_DETACHED;
14022
14023 #if HAVE_PTHREADS > 4
14024         /* Final pthreads */
14025         pthread_attr_t attr;
14026
14027         status = pthread_attr_init(&attr);
14028         if( status ) return status;
14029
14030 #if HAVE_PTHREADS < 7
14031         status = pthread_attr_setdetachstate(&attr, &detach);
14032         if( status < 0 ) status = errno;
14033 #else
14034         status = pthread_attr_setdetachstate(&attr, detach);
14035 #endif
14036         if( status ) return status;
14037         status = pthread_create( &t, &attr, task, NULL );
14038 #if HAVE_PTHREADS < 7
14039         if( status < 0 ) status = errno;
14040 #endif
14041         if( status ) return status;
14042 #else
14043         /* Draft 4 pthreads */
14044         status = pthread_create( &t, pthread_attr_default, task, NULL );
14045         if( status ) return errno;
14046
14047         /* give thread a chance to complete */
14048         /* it should remain joinable and hence detachable */
14049         sleep( 1 );
14050
14051         status = pthread_detach( &t );
14052         if( status ) return errno;
14053 #endif
14054
14055 #ifdef HAVE_LINUX_THREADS
14056         pthread_kill_other_threads_np();
14057 #endif
14058
14059         return 0;
14060
14061 }
14062
14063 EOF
14064 if { (eval echo configure:14065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14065 then
14066   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14067 else
14068   echo "configure: failed program was:" >&5
14069   cat conftest.$ac_ext >&5
14070   rm -fr conftest*
14071   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14072 fi
14073 rm -fr conftest*
14074 fi
14075
14076
14077                 # restore the LIBS
14078                 LIBS="$ol_LIBS"
14079         
14080 fi
14081
14082 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14083
14084         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14085                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14086                 ol_link_threads=posix
14087         fi
14088 fi
14089
14090                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14091 if test "$ol_link_threads" = no ; then
14092         # try -lpthreads -lmach -lexc
14093         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14094 echo "configure:14095: checking for pthread link with -lpthreads -lmach -lexc" >&5
14095 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14096   echo $ac_n "(cached) $ac_c" 1>&6
14097 else
14098   
14099                 # save the flags
14100                 ol_LIBS="$LIBS"
14101                 LIBS="-lpthreads -lmach -lexc $LIBS"
14102
14103                 if test "$cross_compiling" = yes; then
14104   cat > conftest.$ac_ext <<EOF
14105 #line 14106 "configure"
14106 #include "confdefs.h"
14107 /* pthread test headers */
14108 #include <pthread.h>
14109 #if HAVE_PTHREADS < 7
14110 #include <errno.h>
14111 #endif
14112 #ifndef NULL
14113 #define NULL (void*)0
14114 #endif
14115
14116 static void *task(p)
14117         void *p;
14118 {
14119         return (void *) (p == NULL);
14120 }
14121
14122 int main() {
14123
14124         /* pthread test function */
14125 #ifndef PTHREAD_CREATE_DETACHED
14126 #define PTHREAD_CREATE_DETACHED 1
14127 #endif
14128         pthread_t t;
14129         int status;
14130         int detach = PTHREAD_CREATE_DETACHED;
14131
14132 #if HAVE_PTHREADS > 4
14133         /* Final pthreads */
14134         pthread_attr_t attr;
14135
14136         status = pthread_attr_init(&attr);
14137         if( status ) return status;
14138
14139 #if HAVE_PTHREADS < 7
14140         status = pthread_attr_setdetachstate(&attr, &detach);
14141         if( status < 0 ) status = errno;
14142 #else
14143         status = pthread_attr_setdetachstate(&attr, detach);
14144 #endif
14145         if( status ) return status;
14146         status = pthread_create( &t, &attr, task, NULL );
14147 #if HAVE_PTHREADS < 7
14148         if( status < 0 ) status = errno;
14149 #endif
14150         if( status ) return status;
14151 #else
14152         /* Draft 4 pthreads */
14153         status = pthread_create( &t, pthread_attr_default, task, NULL );
14154         if( status ) return errno;
14155
14156         /* give thread a chance to complete */
14157         /* it should remain joinable and hence detachable */
14158         sleep( 1 );
14159
14160         status = pthread_detach( &t );
14161         if( status ) return errno;
14162 #endif
14163
14164 #ifdef HAVE_LINUX_THREADS
14165         pthread_kill_other_threads_np();
14166 #endif
14167
14168         return 0;
14169
14170 ; return 0; }
14171 EOF
14172 if { (eval echo configure:14173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14173   rm -rf conftest*
14174   ol_cv_pthread_lpthreads_lmach_lexc=yes
14175 else
14176   echo "configure: failed program was:" >&5
14177   cat conftest.$ac_ext >&5
14178   rm -rf conftest*
14179   ol_cv_pthread_lpthreads_lmach_lexc=no
14180 fi
14181 rm -f conftest*
14182 else
14183   cat > conftest.$ac_ext <<EOF
14184 #line 14185 "configure"
14185 #include "confdefs.h"
14186 /* pthread test headers */
14187 #include <pthread.h>
14188 #if HAVE_PTHREADS < 7
14189 #include <errno.h>
14190 #endif
14191 #ifndef NULL
14192 #define NULL (void*)0
14193 #endif
14194
14195 static void *task(p)
14196         void *p;
14197 {
14198         return (void *) (p == NULL);
14199 }
14200
14201
14202 int main(argc, argv)
14203         int argc;
14204         char **argv;
14205 {
14206
14207         /* pthread test function */
14208 #ifndef PTHREAD_CREATE_DETACHED
14209 #define PTHREAD_CREATE_DETACHED 1
14210 #endif
14211         pthread_t t;
14212         int status;
14213         int detach = PTHREAD_CREATE_DETACHED;
14214
14215 #if HAVE_PTHREADS > 4
14216         /* Final pthreads */
14217         pthread_attr_t attr;
14218
14219         status = pthread_attr_init(&attr);
14220         if( status ) return status;
14221
14222 #if HAVE_PTHREADS < 7
14223         status = pthread_attr_setdetachstate(&attr, &detach);
14224         if( status < 0 ) status = errno;
14225 #else
14226         status = pthread_attr_setdetachstate(&attr, detach);
14227 #endif
14228         if( status ) return status;
14229         status = pthread_create( &t, &attr, task, NULL );
14230 #if HAVE_PTHREADS < 7
14231         if( status < 0 ) status = errno;
14232 #endif
14233         if( status ) return status;
14234 #else
14235         /* Draft 4 pthreads */
14236         status = pthread_create( &t, pthread_attr_default, task, NULL );
14237         if( status ) return errno;
14238
14239         /* give thread a chance to complete */
14240         /* it should remain joinable and hence detachable */
14241         sleep( 1 );
14242
14243         status = pthread_detach( &t );
14244         if( status ) return errno;
14245 #endif
14246
14247 #ifdef HAVE_LINUX_THREADS
14248         pthread_kill_other_threads_np();
14249 #endif
14250
14251         return 0;
14252
14253 }
14254
14255 EOF
14256 if { (eval echo configure:14257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14257 then
14258   ol_cv_pthread_lpthreads_lmach_lexc=yes
14259 else
14260   echo "configure: failed program was:" >&5
14261   cat conftest.$ac_ext >&5
14262   rm -fr conftest*
14263   ol_cv_pthread_lpthreads_lmach_lexc=no
14264 fi
14265 rm -fr conftest*
14266 fi
14267
14268
14269                 # restore the LIBS
14270                 LIBS="$ol_LIBS"
14271         
14272 fi
14273
14274 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14275
14276         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14277                 ol_link_pthreads="-lpthreads -lmach -lexc"
14278                 ol_link_threads=posix
14279         fi
14280 fi
14281
14282                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14283 if test "$ol_link_threads" = no ; then
14284         # try -lpthreads -lexc
14285         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14286 echo "configure:14287: checking for pthread link with -lpthreads -lexc" >&5
14287 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14288   echo $ac_n "(cached) $ac_c" 1>&6
14289 else
14290   
14291                 # save the flags
14292                 ol_LIBS="$LIBS"
14293                 LIBS="-lpthreads -lexc $LIBS"
14294
14295                 if test "$cross_compiling" = yes; then
14296   cat > conftest.$ac_ext <<EOF
14297 #line 14298 "configure"
14298 #include "confdefs.h"
14299 /* pthread test headers */
14300 #include <pthread.h>
14301 #if HAVE_PTHREADS < 7
14302 #include <errno.h>
14303 #endif
14304 #ifndef NULL
14305 #define NULL (void*)0
14306 #endif
14307
14308 static void *task(p)
14309         void *p;
14310 {
14311         return (void *) (p == NULL);
14312 }
14313
14314 int main() {
14315
14316         /* pthread test function */
14317 #ifndef PTHREAD_CREATE_DETACHED
14318 #define PTHREAD_CREATE_DETACHED 1
14319 #endif
14320         pthread_t t;
14321         int status;
14322         int detach = PTHREAD_CREATE_DETACHED;
14323
14324 #if HAVE_PTHREADS > 4
14325         /* Final pthreads */
14326         pthread_attr_t attr;
14327
14328         status = pthread_attr_init(&attr);
14329         if( status ) return status;
14330
14331 #if HAVE_PTHREADS < 7
14332         status = pthread_attr_setdetachstate(&attr, &detach);
14333         if( status < 0 ) status = errno;
14334 #else
14335         status = pthread_attr_setdetachstate(&attr, detach);
14336 #endif
14337         if( status ) return status;
14338         status = pthread_create( &t, &attr, task, NULL );
14339 #if HAVE_PTHREADS < 7
14340         if( status < 0 ) status = errno;
14341 #endif
14342         if( status ) return status;
14343 #else
14344         /* Draft 4 pthreads */
14345         status = pthread_create( &t, pthread_attr_default, task, NULL );
14346         if( status ) return errno;
14347
14348         /* give thread a chance to complete */
14349         /* it should remain joinable and hence detachable */
14350         sleep( 1 );
14351
14352         status = pthread_detach( &t );
14353         if( status ) return errno;
14354 #endif
14355
14356 #ifdef HAVE_LINUX_THREADS
14357         pthread_kill_other_threads_np();
14358 #endif
14359
14360         return 0;
14361
14362 ; return 0; }
14363 EOF
14364 if { (eval echo configure:14365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14365   rm -rf conftest*
14366   ol_cv_pthread_lpthreads_lexc=yes
14367 else
14368   echo "configure: failed program was:" >&5
14369   cat conftest.$ac_ext >&5
14370   rm -rf conftest*
14371   ol_cv_pthread_lpthreads_lexc=no
14372 fi
14373 rm -f conftest*
14374 else
14375   cat > conftest.$ac_ext <<EOF
14376 #line 14377 "configure"
14377 #include "confdefs.h"
14378 /* pthread test headers */
14379 #include <pthread.h>
14380 #if HAVE_PTHREADS < 7
14381 #include <errno.h>
14382 #endif
14383 #ifndef NULL
14384 #define NULL (void*)0
14385 #endif
14386
14387 static void *task(p)
14388         void *p;
14389 {
14390         return (void *) (p == NULL);
14391 }
14392
14393
14394 int main(argc, argv)
14395         int argc;
14396         char **argv;
14397 {
14398
14399         /* pthread test function */
14400 #ifndef PTHREAD_CREATE_DETACHED
14401 #define PTHREAD_CREATE_DETACHED 1
14402 #endif
14403         pthread_t t;
14404         int status;
14405         int detach = PTHREAD_CREATE_DETACHED;
14406
14407 #if HAVE_PTHREADS > 4
14408         /* Final pthreads */
14409         pthread_attr_t attr;
14410
14411         status = pthread_attr_init(&attr);
14412         if( status ) return status;
14413
14414 #if HAVE_PTHREADS < 7
14415         status = pthread_attr_setdetachstate(&attr, &detach);
14416         if( status < 0 ) status = errno;
14417 #else
14418         status = pthread_attr_setdetachstate(&attr, detach);
14419 #endif
14420         if( status ) return status;
14421         status = pthread_create( &t, &attr, task, NULL );
14422 #if HAVE_PTHREADS < 7
14423         if( status < 0 ) status = errno;
14424 #endif
14425         if( status ) return status;
14426 #else
14427         /* Draft 4 pthreads */
14428         status = pthread_create( &t, pthread_attr_default, task, NULL );
14429         if( status ) return errno;
14430
14431         /* give thread a chance to complete */
14432         /* it should remain joinable and hence detachable */
14433         sleep( 1 );
14434
14435         status = pthread_detach( &t );
14436         if( status ) return errno;
14437 #endif
14438
14439 #ifdef HAVE_LINUX_THREADS
14440         pthread_kill_other_threads_np();
14441 #endif
14442
14443         return 0;
14444
14445 }
14446
14447 EOF
14448 if { (eval echo configure:14449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14449 then
14450   ol_cv_pthread_lpthreads_lexc=yes
14451 else
14452   echo "configure: failed program was:" >&5
14453   cat conftest.$ac_ext >&5
14454   rm -fr conftest*
14455   ol_cv_pthread_lpthreads_lexc=no
14456 fi
14457 rm -fr conftest*
14458 fi
14459
14460
14461                 # restore the LIBS
14462                 LIBS="$ol_LIBS"
14463         
14464 fi
14465
14466 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14467
14468         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14469                 ol_link_pthreads="-lpthreads -lexc"
14470                 ol_link_threads=posix
14471         fi
14472 fi
14473
14474
14475                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14476 if test "$ol_link_threads" = no ; then
14477         # try -lpthreads
14478         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14479 echo "configure:14480: checking for pthread link with -lpthreads" >&5
14480 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14481   echo $ac_n "(cached) $ac_c" 1>&6
14482 else
14483   
14484                 # save the flags
14485                 ol_LIBS="$LIBS"
14486                 LIBS="-lpthreads $LIBS"
14487
14488                 if test "$cross_compiling" = yes; then
14489   cat > conftest.$ac_ext <<EOF
14490 #line 14491 "configure"
14491 #include "confdefs.h"
14492 /* pthread test headers */
14493 #include <pthread.h>
14494 #if HAVE_PTHREADS < 7
14495 #include <errno.h>
14496 #endif
14497 #ifndef NULL
14498 #define NULL (void*)0
14499 #endif
14500
14501 static void *task(p)
14502         void *p;
14503 {
14504         return (void *) (p == NULL);
14505 }
14506
14507 int main() {
14508
14509         /* pthread test function */
14510 #ifndef PTHREAD_CREATE_DETACHED
14511 #define PTHREAD_CREATE_DETACHED 1
14512 #endif
14513         pthread_t t;
14514         int status;
14515         int detach = PTHREAD_CREATE_DETACHED;
14516
14517 #if HAVE_PTHREADS > 4
14518         /* Final pthreads */
14519         pthread_attr_t attr;
14520
14521         status = pthread_attr_init(&attr);
14522         if( status ) return status;
14523
14524 #if HAVE_PTHREADS < 7
14525         status = pthread_attr_setdetachstate(&attr, &detach);
14526         if( status < 0 ) status = errno;
14527 #else
14528         status = pthread_attr_setdetachstate(&attr, detach);
14529 #endif
14530         if( status ) return status;
14531         status = pthread_create( &t, &attr, task, NULL );
14532 #if HAVE_PTHREADS < 7
14533         if( status < 0 ) status = errno;
14534 #endif
14535         if( status ) return status;
14536 #else
14537         /* Draft 4 pthreads */
14538         status = pthread_create( &t, pthread_attr_default, task, NULL );
14539         if( status ) return errno;
14540
14541         /* give thread a chance to complete */
14542         /* it should remain joinable and hence detachable */
14543         sleep( 1 );
14544
14545         status = pthread_detach( &t );
14546         if( status ) return errno;
14547 #endif
14548
14549 #ifdef HAVE_LINUX_THREADS
14550         pthread_kill_other_threads_np();
14551 #endif
14552
14553         return 0;
14554
14555 ; return 0; }
14556 EOF
14557 if { (eval echo configure:14558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14558   rm -rf conftest*
14559   ol_cv_pthread_lib_lpthreads=yes
14560 else
14561   echo "configure: failed program was:" >&5
14562   cat conftest.$ac_ext >&5
14563   rm -rf conftest*
14564   ol_cv_pthread_lib_lpthreads=no
14565 fi
14566 rm -f conftest*
14567 else
14568   cat > conftest.$ac_ext <<EOF
14569 #line 14570 "configure"
14570 #include "confdefs.h"
14571 /* pthread test headers */
14572 #include <pthread.h>
14573 #if HAVE_PTHREADS < 7
14574 #include <errno.h>
14575 #endif
14576 #ifndef NULL
14577 #define NULL (void*)0
14578 #endif
14579
14580 static void *task(p)
14581         void *p;
14582 {
14583         return (void *) (p == NULL);
14584 }
14585
14586
14587 int main(argc, argv)
14588         int argc;
14589         char **argv;
14590 {
14591
14592         /* pthread test function */
14593 #ifndef PTHREAD_CREATE_DETACHED
14594 #define PTHREAD_CREATE_DETACHED 1
14595 #endif
14596         pthread_t t;
14597         int status;
14598         int detach = PTHREAD_CREATE_DETACHED;
14599
14600 #if HAVE_PTHREADS > 4
14601         /* Final pthreads */
14602         pthread_attr_t attr;
14603
14604         status = pthread_attr_init(&attr);
14605         if( status ) return status;
14606
14607 #if HAVE_PTHREADS < 7
14608         status = pthread_attr_setdetachstate(&attr, &detach);
14609         if( status < 0 ) status = errno;
14610 #else
14611         status = pthread_attr_setdetachstate(&attr, detach);
14612 #endif
14613         if( status ) return status;
14614         status = pthread_create( &t, &attr, task, NULL );
14615 #if HAVE_PTHREADS < 7
14616         if( status < 0 ) status = errno;
14617 #endif
14618         if( status ) return status;
14619 #else
14620         /* Draft 4 pthreads */
14621         status = pthread_create( &t, pthread_attr_default, task, NULL );
14622         if( status ) return errno;
14623
14624         /* give thread a chance to complete */
14625         /* it should remain joinable and hence detachable */
14626         sleep( 1 );
14627
14628         status = pthread_detach( &t );
14629         if( status ) return errno;
14630 #endif
14631
14632 #ifdef HAVE_LINUX_THREADS
14633         pthread_kill_other_threads_np();
14634 #endif
14635
14636         return 0;
14637
14638 }
14639
14640 EOF
14641 if { (eval echo configure:14642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14642 then
14643   ol_cv_pthread_lib_lpthreads=yes
14644 else
14645   echo "configure: failed program was:" >&5
14646   cat conftest.$ac_ext >&5
14647   rm -fr conftest*
14648   ol_cv_pthread_lib_lpthreads=no
14649 fi
14650 rm -fr conftest*
14651 fi
14652
14653
14654                 # restore the LIBS
14655                 LIBS="$ol_LIBS"
14656         
14657 fi
14658
14659 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14660
14661         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14662                 ol_link_pthreads="-lpthreads"
14663                 ol_link_threads=posix
14664         fi
14665 fi
14666
14667
14668                 if test $ol_link_threads != no ; then
14669                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14670
14671                                                 save_CPPFLAGS="$CPPFLAGS"
14672                         save_LIBS="$LIBS"
14673                         LIBS="$LTHREAD_LIBS $LIBS"
14674
14675                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14676 do
14677 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14678 echo "configure:14679: checking for $ac_func" >&5
14679 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14680   echo $ac_n "(cached) $ac_c" 1>&6
14681 else
14682   cat > conftest.$ac_ext <<EOF
14683 #line 14684 "configure"
14684 #include "confdefs.h"
14685 /* System header to define __stub macros and hopefully few prototypes,
14686     which can conflict with char $ac_func(); below.  */
14687 #include <assert.h>
14688 /* Override any gcc2 internal prototype to avoid an error.  */
14689 /* We use char because int might match the return type of a gcc2
14690     builtin and then its argument prototype would still apply.  */
14691 char $ac_func();
14692 char (*f)();
14693
14694 int main() {
14695
14696 /* The GNU C library defines this for functions which it implements
14697     to always fail with ENOSYS.  Some functions are actually named
14698     something starting with __ and the normal name is an alias.  */
14699 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14700 choke me
14701 #else
14702 f = $ac_func;
14703 #endif
14704
14705 ; return 0; }
14706 EOF
14707 if { (eval echo configure:14708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14708   rm -rf conftest*
14709   eval "ac_cv_func_$ac_func=yes"
14710 else
14711   echo "configure: failed program was:" >&5
14712   cat conftest.$ac_ext >&5
14713   rm -rf conftest*
14714   eval "ac_cv_func_$ac_func=no"
14715 fi
14716 rm -f conftest*
14717 fi
14718
14719 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14720   echo "$ac_t""yes" 1>&6
14721     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14722   cat >> confdefs.h <<EOF
14723 #define $ac_tr_func 1
14724 EOF
14725  
14726 else
14727   echo "$ac_t""no" 1>&6
14728 fi
14729 done
14730
14731
14732                         if test $ac_cv_func_sched_yield = no -a \
14733                                 $ac_cv_func_pthread_yield = no -a \
14734                                 $ac_cv_func_thr_yield = no ; then
14735                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14736 echo "configure:14737: checking for sched_yield in -lrt" >&5
14737 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14738 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14739   echo $ac_n "(cached) $ac_c" 1>&6
14740 else
14741   ac_save_LIBS="$LIBS"
14742 LIBS="-lrt  $LIBS"
14743 cat > conftest.$ac_ext <<EOF
14744 #line 14745 "configure"
14745 #include "confdefs.h"
14746 /* Override any gcc2 internal prototype to avoid an error.  */
14747 /* We use char because int might match the return type of a gcc2
14748     builtin and then its argument prototype would still apply.  */
14749 char sched_yield();
14750
14751 int main() {
14752 sched_yield()
14753 ; return 0; }
14754 EOF
14755 if { (eval echo configure:14756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14756   rm -rf conftest*
14757   eval "ac_cv_lib_$ac_lib_var=yes"
14758 else
14759   echo "configure: failed program was:" >&5
14760   cat conftest.$ac_ext >&5
14761   rm -rf conftest*
14762   eval "ac_cv_lib_$ac_lib_var=no"
14763 fi
14764 rm -f conftest*
14765 LIBS="$ac_save_LIBS"
14766
14767 fi
14768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14769   echo "$ac_t""yes" 1>&6
14770   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14771                                         cat >> confdefs.h <<\EOF
14772 #define HAVE_SCHED_YIELD 1
14773 EOF
14774
14775                                         ac_cv_func_sched_yield=yes
14776 else
14777   echo "$ac_t""no" 1>&6
14778 ac_cv_func_sched_yield=no
14779 fi
14780
14781                         fi
14782                         if test $ac_cv_func_sched_yield = no -a \
14783                                 $ac_cv_func_pthread_yield = no -a \
14784                                 "$ac_cv_func_thr_yield" = no ; then
14785                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14786                         fi
14787
14788                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14789 do
14790 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14791 echo "configure:14792: checking for $ac_func" >&5
14792 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14793   echo $ac_n "(cached) $ac_c" 1>&6
14794 else
14795   cat > conftest.$ac_ext <<EOF
14796 #line 14797 "configure"
14797 #include "confdefs.h"
14798 /* System header to define __stub macros and hopefully few prototypes,
14799     which can conflict with char $ac_func(); below.  */
14800 #include <assert.h>
14801 /* Override any gcc2 internal prototype to avoid an error.  */
14802 /* We use char because int might match the return type of a gcc2
14803     builtin and then its argument prototype would still apply.  */
14804 char $ac_func();
14805 char (*f)();
14806
14807 int main() {
14808
14809 /* The GNU C library defines this for functions which it implements
14810     to always fail with ENOSYS.  Some functions are actually named
14811     something starting with __ and the normal name is an alias.  */
14812 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14813 choke me
14814 #else
14815 f = $ac_func;
14816 #endif
14817
14818 ; return 0; }
14819 EOF
14820 if { (eval echo configure:14821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14821   rm -rf conftest*
14822   eval "ac_cv_func_$ac_func=yes"
14823 else
14824   echo "configure: failed program was:" >&5
14825   cat conftest.$ac_ext >&5
14826   rm -rf conftest*
14827   eval "ac_cv_func_$ac_func=no"
14828 fi
14829 rm -f conftest*
14830 fi
14831
14832 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14833   echo "$ac_t""yes" 1>&6
14834     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14835   cat >> confdefs.h <<EOF
14836 #define $ac_tr_func 1
14837 EOF
14838  
14839 else
14840   echo "$ac_t""no" 1>&6
14841 fi
14842 done
14843
14844
14845                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14846 echo "configure:14847: checking for pthread_detach with <pthread.h>" >&5
14847 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14848   echo $ac_n "(cached) $ac_c" 1>&6
14849 else
14850   
14851                                                                 cat > conftest.$ac_ext <<EOF
14852 #line 14853 "configure"
14853 #include "confdefs.h"
14854
14855 #include <pthread.h>
14856 #ifndef NULL
14857 #define NULL (void*)0
14858 #endif
14859
14860 int main() {
14861 pthread_detach(NULL);
14862 ; return 0; }
14863 EOF
14864 if { (eval echo configure:14865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14865   rm -rf conftest*
14866   ol_cv_func_pthread_detach=yes
14867 else
14868   echo "configure: failed program was:" >&5
14869   cat conftest.$ac_ext >&5
14870   rm -rf conftest*
14871   ol_cv_func_pthread_detach=no
14872 fi
14873 rm -f conftest*
14874                         
14875 fi
14876
14877 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14878
14879                         if test $ol_cv_func_pthread_detach = no ; then
14880                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14881                         fi
14882
14883                         cat >> confdefs.h <<\EOF
14884 #define HAVE_PTHREAD_DETACH 1
14885 EOF
14886
14887
14888                                                 for ac_func in \
14889                                 pthread_setconcurrency \
14890                                 pthread_getconcurrency \
14891                                 thr_setconcurrency \
14892                                 thr_getconcurrency \
14893                         
14894 do
14895 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14896 echo "configure:14897: checking for $ac_func" >&5
14897 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14898   echo $ac_n "(cached) $ac_c" 1>&6
14899 else
14900   cat > conftest.$ac_ext <<EOF
14901 #line 14902 "configure"
14902 #include "confdefs.h"
14903 /* System header to define __stub macros and hopefully few prototypes,
14904     which can conflict with char $ac_func(); below.  */
14905 #include <assert.h>
14906 /* Override any gcc2 internal prototype to avoid an error.  */
14907 /* We use char because int might match the return type of a gcc2
14908     builtin and then its argument prototype would still apply.  */
14909 char $ac_func();
14910 char (*f)();
14911
14912 int main() {
14913
14914 /* The GNU C library defines this for functions which it implements
14915     to always fail with ENOSYS.  Some functions are actually named
14916     something starting with __ and the normal name is an alias.  */
14917 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14918 choke me
14919 #else
14920 f = $ac_func;
14921 #endif
14922
14923 ; return 0; }
14924 EOF
14925 if { (eval echo configure:14926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14926   rm -rf conftest*
14927   eval "ac_cv_func_$ac_func=yes"
14928 else
14929   echo "configure: failed program was:" >&5
14930   cat conftest.$ac_ext >&5
14931   rm -rf conftest*
14932   eval "ac_cv_func_$ac_func=no"
14933 fi
14934 rm -f conftest*
14935 fi
14936
14937 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14938   echo "$ac_t""yes" 1>&6
14939     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14940   cat >> confdefs.h <<EOF
14941 #define $ac_tr_func 1
14942 EOF
14943  
14944 else
14945   echo "$ac_t""no" 1>&6
14946 fi
14947 done
14948
14949
14950                         
14951         for ac_func in pthread_kill_other_threads_np
14952 do
14953 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14954 echo "configure:14955: checking for $ac_func" >&5
14955 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14956   echo $ac_n "(cached) $ac_c" 1>&6
14957 else
14958   cat > conftest.$ac_ext <<EOF
14959 #line 14960 "configure"
14960 #include "confdefs.h"
14961 /* System header to define __stub macros and hopefully few prototypes,
14962     which can conflict with char $ac_func(); below.  */
14963 #include <assert.h>
14964 /* Override any gcc2 internal prototype to avoid an error.  */
14965 /* We use char because int might match the return type of a gcc2
14966     builtin and then its argument prototype would still apply.  */
14967 char $ac_func();
14968 char (*f)();
14969
14970 int main() {
14971
14972 /* The GNU C library defines this for functions which it implements
14973     to always fail with ENOSYS.  Some functions are actually named
14974     something starting with __ and the normal name is an alias.  */
14975 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14976 choke me
14977 #else
14978 f = $ac_func;
14979 #endif
14980
14981 ; return 0; }
14982 EOF
14983 if { (eval echo configure:14984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14984   rm -rf conftest*
14985   eval "ac_cv_func_$ac_func=yes"
14986 else
14987   echo "configure: failed program was:" >&5
14988   cat conftest.$ac_ext >&5
14989   rm -rf conftest*
14990   eval "ac_cv_func_$ac_func=no"
14991 fi
14992 rm -f conftest*
14993 fi
14994
14995 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14996   echo "$ac_t""yes" 1>&6
14997     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14998   cat >> confdefs.h <<EOF
14999 #define $ac_tr_func 1
15000 EOF
15001  
15002 else
15003   echo "$ac_t""no" 1>&6
15004 fi
15005 done
15006
15007         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15008 echo "configure:15009: checking for LinuxThreads implementation" >&5
15009 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15010   echo $ac_n "(cached) $ac_c" 1>&6
15011 else
15012   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15013 fi
15014
15015 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15016
15017                         
15018         
15019         
15020         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15021 echo "configure:15022: checking for LinuxThreads consistency" >&5
15022 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15023   echo $ac_n "(cached) $ac_c" 1>&6
15024 else
15025   
15026                 if test $ol_cv_header_linux_threads = yes -a \
15027                         $ol_cv_sys_linux_threads = yes; then
15028                         ol_cv_linux_threads=yes
15029                 elif test $ol_cv_header_linux_threads = no -a \
15030                         $ol_cv_sys_linux_threads = no; then
15031                         ol_cv_linux_threads=no
15032                 else
15033                         ol_cv_linux_threads=error
15034                 fi
15035         
15036 fi
15037
15038 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15039
15040
15041                         if test $ol_cv_linux_threads = error; then
15042                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15043                         fi
15044
15045                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15046 echo "configure:15047: checking if pthread_create() works" >&5
15047 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15048   echo $ac_n "(cached) $ac_c" 1>&6
15049 else
15050   
15051                         if test "$cross_compiling" = yes; then
15052                                 ol_cv_pthread_create_works=yes
15053 else
15054   cat > conftest.$ac_ext <<EOF
15055 #line 15056 "configure"
15056 #include "confdefs.h"
15057 /* pthread test headers */
15058 #include <pthread.h>
15059 #if HAVE_PTHREADS < 7
15060 #include <errno.h>
15061 #endif
15062 #ifndef NULL
15063 #define NULL (void*)0
15064 #endif
15065
15066 static void *task(p)
15067         void *p;
15068 {
15069         return (void *) (p == NULL);
15070 }
15071
15072
15073 int main(argc, argv)
15074         int argc;
15075         char **argv;
15076 {
15077
15078         /* pthread test function */
15079 #ifndef PTHREAD_CREATE_DETACHED
15080 #define PTHREAD_CREATE_DETACHED 1
15081 #endif
15082         pthread_t t;
15083         int status;
15084         int detach = PTHREAD_CREATE_DETACHED;
15085
15086 #if HAVE_PTHREADS > 4
15087         /* Final pthreads */
15088         pthread_attr_t attr;
15089
15090         status = pthread_attr_init(&attr);
15091         if( status ) return status;
15092
15093 #if HAVE_PTHREADS < 7
15094         status = pthread_attr_setdetachstate(&attr, &detach);
15095         if( status < 0 ) status = errno;
15096 #else
15097         status = pthread_attr_setdetachstate(&attr, detach);
15098 #endif
15099         if( status ) return status;
15100         status = pthread_create( &t, &attr, task, NULL );
15101 #if HAVE_PTHREADS < 7
15102         if( status < 0 ) status = errno;
15103 #endif
15104         if( status ) return status;
15105 #else
15106         /* Draft 4 pthreads */
15107         status = pthread_create( &t, pthread_attr_default, task, NULL );
15108         if( status ) return errno;
15109
15110         /* give thread a chance to complete */
15111         /* it should remain joinable and hence detachable */
15112         sleep( 1 );
15113
15114         status = pthread_detach( &t );
15115         if( status ) return errno;
15116 #endif
15117
15118 #ifdef HAVE_LINUX_THREADS
15119         pthread_kill_other_threads_np();
15120 #endif
15121
15122         return 0;
15123
15124 }
15125
15126 EOF
15127 if { (eval echo configure:15128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15128 then
15129   ol_cv_pthread_create_works=yes
15130 else
15131   echo "configure: failed program was:" >&5
15132   cat conftest.$ac_ext >&5
15133   rm -fr conftest*
15134   ol_cv_pthread_create_works=no
15135 fi
15136 rm -fr conftest*
15137 fi
15138
15139 fi
15140
15141 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15142
15143                         if test $ol_cv_pthread_create_works = no ; then
15144                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15145                         fi
15146
15147                                                 if test $ol_with_yielding_select = auto ; then
15148                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15149 echo "configure:15150: checking if select yields when using pthreads" >&5
15150 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15151   echo $ac_n "(cached) $ac_c" 1>&6
15152 else
15153   
15154                                 if test "$cross_compiling" = yes; then
15155   ol_cv_pthread_select_yields=cross
15156 else
15157   cat > conftest.$ac_ext <<EOF
15158 #line 15159 "configure"
15159 #include "confdefs.h"
15160
15161 #include <sys/types.h>
15162 #include <sys/time.h>
15163 #include <unistd.h>
15164 #include <pthread.h>
15165 #ifndef NULL
15166 #define NULL (void*) 0
15167 #endif
15168
15169 static int fildes[2];
15170
15171 static void *task(p)
15172         void *p;
15173 {
15174         int i;
15175         struct timeval tv;
15176
15177         fd_set rfds;
15178
15179         tv.tv_sec=10;
15180         tv.tv_usec=0;
15181
15182         FD_ZERO(&rfds);
15183         FD_SET(fildes[0], &rfds);
15184
15185         /* we're not interested in any fds */
15186         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15187
15188         if(i < 0) {
15189                 perror("select");
15190                 exit(10);
15191         }
15192
15193         exit(0); /* if we exit here, the select blocked the whole process */
15194 }
15195
15196 int main(argc, argv)
15197         int argc;
15198         char **argv;
15199 {
15200         pthread_t t;
15201
15202         /* create a pipe to select */
15203         if(pipe(&fildes[0])) {
15204                 perror("select");
15205                 exit(1);
15206         }
15207
15208 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15209         (void) pthread_setconcurrency(2);
15210 #else
15211 #ifdef HAVE_THR_SETCONCURRENCY
15212         /* Set Solaris LWP concurrency to 2 */
15213         thr_setconcurrency(2);
15214 #endif
15215 #endif
15216
15217 #if HAVE_PTHREADS < 6
15218         pthread_create(&t, pthread_attr_default, task, NULL);
15219 #else
15220         pthread_create(&t, NULL, task, NULL);
15221 #endif
15222
15223         /* make sure task runs first */
15224 #if HAVE_THR_YIELD
15225         thr_yield();
15226 #elif defined( HAVE_SCHED_YIELD )
15227         sched_yield();
15228 #elif defined( HAVE_PTHREAD_YIELD )
15229         pthread_yield();
15230 #endif
15231
15232         exit(2);
15233 }
15234 EOF
15235 if { (eval echo configure:15236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15236 then
15237   ol_cv_pthread_select_yields=no
15238 else
15239   echo "configure: failed program was:" >&5
15240   cat conftest.$ac_ext >&5
15241   rm -fr conftest*
15242   ol_cv_pthread_select_yields=yes
15243 fi
15244 rm -fr conftest*
15245 fi
15246
15247 fi
15248
15249 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15250
15251                                 if test $ol_cv_pthread_select_yields = cross ; then
15252                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15253                                 fi
15254
15255                                 if test $ol_cv_pthread_select_yields = yes ; then
15256                                         ol_with_yielding_select=yes
15257                                 fi
15258                         fi
15259
15260                                                 CPPFLAGS="$save_CPPFLAGS"
15261                         LIBS="$save_LIBS"
15262                 else
15263                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15264                 fi
15265         fi
15266
15267         if test $ol_with_threads = posix ; then
15268                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15269         fi
15270 fi
15271
15272 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15273         -o $ol_with_threads = mach ; then
15274
15275                 for ac_hdr in mach/cthreads.h cthreads.h
15276 do
15277 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15278 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15279 echo "configure:15280: checking for $ac_hdr" >&5
15280 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15281   echo $ac_n "(cached) $ac_c" 1>&6
15282 else
15283   cat > conftest.$ac_ext <<EOF
15284 #line 15285 "configure"
15285 #include "confdefs.h"
15286 #include <$ac_hdr>
15287 EOF
15288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15289 { (eval echo configure:15290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15291 if test -z "$ac_err"; then
15292   rm -rf conftest*
15293   eval "ac_cv_header_$ac_safe=yes"
15294 else
15295   echo "$ac_err" >&5
15296   echo "configure: failed program was:" >&5
15297   cat conftest.$ac_ext >&5
15298   rm -rf conftest*
15299   eval "ac_cv_header_$ac_safe=no"
15300 fi
15301 rm -f conftest*
15302 fi
15303 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15304   echo "$ac_t""yes" 1>&6
15305     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15306   cat >> confdefs.h <<EOF
15307 #define $ac_tr_hdr 1
15308 EOF
15309  
15310 else
15311   echo "$ac_t""no" 1>&6
15312 fi
15313 done
15314
15315         if test $ac_cv_header_mach_cthreads_h = yes ; then
15316                 ol_with_threads=found
15317
15318                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15319 echo "configure:15320: checking for cthread_fork" >&5
15320 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15321   echo $ac_n "(cached) $ac_c" 1>&6
15322 else
15323   cat > conftest.$ac_ext <<EOF
15324 #line 15325 "configure"
15325 #include "confdefs.h"
15326 /* System header to define __stub macros and hopefully few prototypes,
15327     which can conflict with char cthread_fork(); below.  */
15328 #include <assert.h>
15329 /* Override any gcc2 internal prototype to avoid an error.  */
15330 /* We use char because int might match the return type of a gcc2
15331     builtin and then its argument prototype would still apply.  */
15332 char cthread_fork();
15333 char (*f)();
15334
15335 int main() {
15336
15337 /* The GNU C library defines this for functions which it implements
15338     to always fail with ENOSYS.  Some functions are actually named
15339     something starting with __ and the normal name is an alias.  */
15340 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15341 choke me
15342 #else
15343 f = cthread_fork;
15344 #endif
15345
15346 ; return 0; }
15347 EOF
15348 if { (eval echo configure:15349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15349   rm -rf conftest*
15350   eval "ac_cv_func_cthread_fork=yes"
15351 else
15352   echo "configure: failed program was:" >&5
15353   cat conftest.$ac_ext >&5
15354   rm -rf conftest*
15355   eval "ac_cv_func_cthread_fork=no"
15356 fi
15357 rm -f conftest*
15358 fi
15359
15360 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15361   echo "$ac_t""yes" 1>&6
15362   ol_link_threads=yes
15363 else
15364   echo "$ac_t""no" 1>&6
15365 fi
15366
15367
15368                 if test $ol_link_threads = no ; then
15369                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15370 echo "configure:15371: checking for cthread_fork with -all_load" >&5
15371 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15372   echo $ac_n "(cached) $ac_c" 1>&6
15373 else
15374   
15375                                                                 save_LIBS="$LIBS"
15376                                 LIBS="-all_load $LIBS"
15377                                 cat > conftest.$ac_ext <<EOF
15378 #line 15379 "configure"
15379 #include "confdefs.h"
15380 #include <mach/cthreads.h>
15381 int main() {
15382
15383                                         cthread_fork((void *)0, (void *)0);
15384                                         
15385 ; return 0; }
15386 EOF
15387 if { (eval echo configure:15388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15388   rm -rf conftest*
15389   ol_cv_cthread_all_load=yes
15390 else
15391   echo "configure: failed program was:" >&5
15392   cat conftest.$ac_ext >&5
15393   rm -rf conftest*
15394   ol_cv_cthread_all_load=no
15395 fi
15396 rm -f conftest*
15397                                                                 LIBS="$save_LIBS"
15398                         
15399 fi
15400
15401 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15402
15403                         if test $ol_cv_cthread_all_load = yes ; then
15404                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15405                                 ol_link_threads=mach
15406                                 ol_with_threads=found
15407                         fi
15408                 fi
15409
15410         elif test $ac_cv_header_cthreads_h = yes ; then
15411                                 
15412                 ol_with_threads=found
15413  
15414                                 save_LIBS="$LIBS"
15415                 LIBS="$LIBS -lthreads"
15416                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15417 echo "configure:15418: checking for cthread_fork" >&5
15418 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15419   echo $ac_n "(cached) $ac_c" 1>&6
15420 else
15421   cat > conftest.$ac_ext <<EOF
15422 #line 15423 "configure"
15423 #include "confdefs.h"
15424 /* System header to define __stub macros and hopefully few prototypes,
15425     which can conflict with char cthread_fork(); below.  */
15426 #include <assert.h>
15427 /* Override any gcc2 internal prototype to avoid an error.  */
15428 /* We use char because int might match the return type of a gcc2
15429     builtin and then its argument prototype would still apply.  */
15430 char cthread_fork();
15431 char (*f)();
15432
15433 int main() {
15434
15435 /* The GNU C library defines this for functions which it implements
15436     to always fail with ENOSYS.  Some functions are actually named
15437     something starting with __ and the normal name is an alias.  */
15438 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15439 choke me
15440 #else
15441 f = cthread_fork;
15442 #endif
15443
15444 ; return 0; }
15445 EOF
15446 if { (eval echo configure:15447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15447   rm -rf conftest*
15448   eval "ac_cv_func_cthread_fork=yes"
15449 else
15450   echo "configure: failed program was:" >&5
15451   cat conftest.$ac_ext >&5
15452   rm -rf conftest*
15453   eval "ac_cv_func_cthread_fork=no"
15454 fi
15455 rm -f conftest*
15456 fi
15457
15458 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15459   echo "$ac_t""yes" 1>&6
15460   ol_link_threads=yes
15461 else
15462   echo "$ac_t""no" 1>&6
15463 fi
15464
15465                 LIBS="$save_LIBS"
15466
15467                 if test $ol_link_threads = yes ; then
15468                         LTHREAD_LIBS="-lthreads"
15469                         ol_link_threads=mach
15470                         ol_with_threads=found
15471                 else
15472                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15473                 fi
15474
15475         elif test $ol_with_threads = mach ; then
15476                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15477         fi
15478
15479         if test $ol_link_threads = mach ; then
15480                 cat >> confdefs.h <<\EOF
15481 #define HAVE_MACH_CTHREADS 1
15482 EOF
15483
15484         elif test $ol_with_threads = found ; then
15485                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15486         fi
15487 fi
15488
15489 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15490         -o $ol_with_threads = pth ; then
15491
15492         for ac_hdr in pth.h
15493 do
15494 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15495 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15496 echo "configure:15497: checking for $ac_hdr" >&5
15497 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15498   echo $ac_n "(cached) $ac_c" 1>&6
15499 else
15500   cat > conftest.$ac_ext <<EOF
15501 #line 15502 "configure"
15502 #include "confdefs.h"
15503 #include <$ac_hdr>
15504 EOF
15505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15506 { (eval echo configure:15507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15508 if test -z "$ac_err"; then
15509   rm -rf conftest*
15510   eval "ac_cv_header_$ac_safe=yes"
15511 else
15512   echo "$ac_err" >&5
15513   echo "configure: failed program was:" >&5
15514   cat conftest.$ac_ext >&5
15515   rm -rf conftest*
15516   eval "ac_cv_header_$ac_safe=no"
15517 fi
15518 rm -f conftest*
15519 fi
15520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15521   echo "$ac_t""yes" 1>&6
15522     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15523   cat >> confdefs.h <<EOF
15524 #define $ac_tr_hdr 1
15525 EOF
15526  
15527 else
15528   echo "$ac_t""no" 1>&6
15529 fi
15530 done
15531
15532
15533         if test $ac_cv_header_pth_h = yes ; then
15534                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15535 echo "configure:15536: checking for pth_version in -lpth" >&5
15536 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15537 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15538   echo $ac_n "(cached) $ac_c" 1>&6
15539 else
15540   ac_save_LIBS="$LIBS"
15541 LIBS="-lpth  $LIBS"
15542 cat > conftest.$ac_ext <<EOF
15543 #line 15544 "configure"
15544 #include "confdefs.h"
15545 /* Override any gcc2 internal prototype to avoid an error.  */
15546 /* We use char because int might match the return type of a gcc2
15547     builtin and then its argument prototype would still apply.  */
15548 char pth_version();
15549
15550 int main() {
15551 pth_version()
15552 ; return 0; }
15553 EOF
15554 if { (eval echo configure:15555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15555   rm -rf conftest*
15556   eval "ac_cv_lib_$ac_lib_var=yes"
15557 else
15558   echo "configure: failed program was:" >&5
15559   cat conftest.$ac_ext >&5
15560   rm -rf conftest*
15561   eval "ac_cv_lib_$ac_lib_var=no"
15562 fi
15563 rm -f conftest*
15564 LIBS="$ac_save_LIBS"
15565
15566 fi
15567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15568   echo "$ac_t""yes" 1>&6
15569   have_pth=yes
15570 else
15571   echo "$ac_t""no" 1>&6
15572 have_pth=no
15573 fi
15574
15575
15576                 if test $have_pth = yes ; then
15577                         cat >> confdefs.h <<\EOF
15578 #define HAVE_GNU_PTH 1
15579 EOF
15580
15581                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15582                         ol_link_threads=pth
15583                         ol_with_threads=found
15584
15585                         if test $ol_with_yielding_select = auto ; then
15586                                 ol_with_yielding_select=yes
15587                         fi
15588                 fi
15589         fi
15590 fi
15591
15592 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15593         -o $ol_with_threads = lwp ; then
15594
15595                 for ac_hdr in thread.h synch.h
15596 do
15597 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15598 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15599 echo "configure:15600: checking for $ac_hdr" >&5
15600 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15601   echo $ac_n "(cached) $ac_c" 1>&6
15602 else
15603   cat > conftest.$ac_ext <<EOF
15604 #line 15605 "configure"
15605 #include "confdefs.h"
15606 #include <$ac_hdr>
15607 EOF
15608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15609 { (eval echo configure:15610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15611 if test -z "$ac_err"; then
15612   rm -rf conftest*
15613   eval "ac_cv_header_$ac_safe=yes"
15614 else
15615   echo "$ac_err" >&5
15616   echo "configure: failed program was:" >&5
15617   cat conftest.$ac_ext >&5
15618   rm -rf conftest*
15619   eval "ac_cv_header_$ac_safe=no"
15620 fi
15621 rm -f conftest*
15622 fi
15623 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15624   echo "$ac_t""yes" 1>&6
15625     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15626   cat >> confdefs.h <<EOF
15627 #define $ac_tr_hdr 1
15628 EOF
15629  
15630 else
15631   echo "$ac_t""no" 1>&6
15632 fi
15633 done
15634
15635         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15636                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15637 echo "configure:15638: checking for thr_create in -lthread" >&5
15638 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15639 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15640   echo $ac_n "(cached) $ac_c" 1>&6
15641 else
15642   ac_save_LIBS="$LIBS"
15643 LIBS="-lthread  $LIBS"
15644 cat > conftest.$ac_ext <<EOF
15645 #line 15646 "configure"
15646 #include "confdefs.h"
15647 /* Override any gcc2 internal prototype to avoid an error.  */
15648 /* We use char because int might match the return type of a gcc2
15649     builtin and then its argument prototype would still apply.  */
15650 char thr_create();
15651
15652 int main() {
15653 thr_create()
15654 ; return 0; }
15655 EOF
15656 if { (eval echo configure:15657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15657   rm -rf conftest*
15658   eval "ac_cv_lib_$ac_lib_var=yes"
15659 else
15660   echo "configure: failed program was:" >&5
15661   cat conftest.$ac_ext >&5
15662   rm -rf conftest*
15663   eval "ac_cv_lib_$ac_lib_var=no"
15664 fi
15665 rm -f conftest*
15666 LIBS="$ac_save_LIBS"
15667
15668 fi
15669 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15670   echo "$ac_t""yes" 1>&6
15671   have_thr=yes
15672 else
15673   echo "$ac_t""no" 1>&6
15674 have_thr=no
15675 fi
15676
15677
15678                 if test $have_thr = yes ; then
15679                         cat >> confdefs.h <<\EOF
15680 #define HAVE_THR 1
15681 EOF
15682
15683                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15684                         ol_link_threads=thr
15685
15686                         if test $ol_with_yielding_select = auto ; then
15687                                 ol_with_yielding_select=yes
15688                         fi
15689
15690                                                 for ac_func in \
15691                                 thr_setconcurrency \
15692                                 thr_getconcurrency \
15693                         
15694 do
15695 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15696 echo "configure:15697: checking for $ac_func" >&5
15697 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15698   echo $ac_n "(cached) $ac_c" 1>&6
15699 else
15700   cat > conftest.$ac_ext <<EOF
15701 #line 15702 "configure"
15702 #include "confdefs.h"
15703 /* System header to define __stub macros and hopefully few prototypes,
15704     which can conflict with char $ac_func(); below.  */
15705 #include <assert.h>
15706 /* Override any gcc2 internal prototype to avoid an error.  */
15707 /* We use char because int might match the return type of a gcc2
15708     builtin and then its argument prototype would still apply.  */
15709 char $ac_func();
15710 char (*f)();
15711
15712 int main() {
15713
15714 /* The GNU C library defines this for functions which it implements
15715     to always fail with ENOSYS.  Some functions are actually named
15716     something starting with __ and the normal name is an alias.  */
15717 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15718 choke me
15719 #else
15720 f = $ac_func;
15721 #endif
15722
15723 ; return 0; }
15724 EOF
15725 if { (eval echo configure:15726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15726   rm -rf conftest*
15727   eval "ac_cv_func_$ac_func=yes"
15728 else
15729   echo "configure: failed program was:" >&5
15730   cat conftest.$ac_ext >&5
15731   rm -rf conftest*
15732   eval "ac_cv_func_$ac_func=no"
15733 fi
15734 rm -f conftest*
15735 fi
15736
15737 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15738   echo "$ac_t""yes" 1>&6
15739     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15740   cat >> confdefs.h <<EOF
15741 #define $ac_tr_func 1
15742 EOF
15743  
15744 else
15745   echo "$ac_t""no" 1>&6
15746 fi
15747 done
15748
15749                 fi
15750         fi
15751
15752                 for ac_hdr in lwp/lwp.h
15753 do
15754 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15755 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15756 echo "configure:15757: checking for $ac_hdr" >&5
15757 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15758   echo $ac_n "(cached) $ac_c" 1>&6
15759 else
15760   cat > conftest.$ac_ext <<EOF
15761 #line 15762 "configure"
15762 #include "confdefs.h"
15763 #include <$ac_hdr>
15764 EOF
15765 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15766 { (eval echo configure:15767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15767 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15768 if test -z "$ac_err"; then
15769   rm -rf conftest*
15770   eval "ac_cv_header_$ac_safe=yes"
15771 else
15772   echo "$ac_err" >&5
15773   echo "configure: failed program was:" >&5
15774   cat conftest.$ac_ext >&5
15775   rm -rf conftest*
15776   eval "ac_cv_header_$ac_safe=no"
15777 fi
15778 rm -f conftest*
15779 fi
15780 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15781   echo "$ac_t""yes" 1>&6
15782     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15783   cat >> confdefs.h <<EOF
15784 #define $ac_tr_hdr 1
15785 EOF
15786  
15787 else
15788   echo "$ac_t""no" 1>&6
15789 fi
15790 done
15791
15792         if test $ac_cv_header_lwp_lwp_h = yes ; then
15793                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15794 echo "configure:15795: checking for lwp_create in -llwp" >&5
15795 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15796 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15797   echo $ac_n "(cached) $ac_c" 1>&6
15798 else
15799   ac_save_LIBS="$LIBS"
15800 LIBS="-llwp  $LIBS"
15801 cat > conftest.$ac_ext <<EOF
15802 #line 15803 "configure"
15803 #include "confdefs.h"
15804 /* Override any gcc2 internal prototype to avoid an error.  */
15805 /* We use char because int might match the return type of a gcc2
15806     builtin and then its argument prototype would still apply.  */
15807 char lwp_create();
15808
15809 int main() {
15810 lwp_create()
15811 ; return 0; }
15812 EOF
15813 if { (eval echo configure:15814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15814   rm -rf conftest*
15815   eval "ac_cv_lib_$ac_lib_var=yes"
15816 else
15817   echo "configure: failed program was:" >&5
15818   cat conftest.$ac_ext >&5
15819   rm -rf conftest*
15820   eval "ac_cv_lib_$ac_lib_var=no"
15821 fi
15822 rm -f conftest*
15823 LIBS="$ac_save_LIBS"
15824
15825 fi
15826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15827   echo "$ac_t""yes" 1>&6
15828   have_lwp=yes
15829 else
15830   echo "$ac_t""no" 1>&6
15831 have_lwp=no
15832 fi
15833
15834
15835                 if test $have_lwp = yes ; then
15836                         cat >> confdefs.h <<\EOF
15837 #define HAVE_LWP 1
15838 EOF
15839
15840                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15841                         ol_link_threads=lwp
15842
15843                         if test $ol_with_yielding_select = auto ; then
15844                                 ol_with_yielding_select=no
15845                         fi
15846                 fi
15847         fi
15848 fi
15849
15850 if test $ol_with_yielding_select = yes ; then
15851         cat >> confdefs.h <<\EOF
15852 #define HAVE_YIELDING_SELECT 1
15853 EOF
15854
15855 fi
15856
15857 if test $ol_with_threads = manual ; then
15858                 ol_link_threads=yes
15859
15860         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15861
15862         for ac_hdr in pthread.h sched.h
15863 do
15864 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15865 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15866 echo "configure:15867: checking for $ac_hdr" >&5
15867 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15868   echo $ac_n "(cached) $ac_c" 1>&6
15869 else
15870   cat > conftest.$ac_ext <<EOF
15871 #line 15872 "configure"
15872 #include "confdefs.h"
15873 #include <$ac_hdr>
15874 EOF
15875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15876 { (eval echo configure:15877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15878 if test -z "$ac_err"; then
15879   rm -rf conftest*
15880   eval "ac_cv_header_$ac_safe=yes"
15881 else
15882   echo "$ac_err" >&5
15883   echo "configure: failed program was:" >&5
15884   cat conftest.$ac_ext >&5
15885   rm -rf conftest*
15886   eval "ac_cv_header_$ac_safe=no"
15887 fi
15888 rm -f conftest*
15889 fi
15890 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15891   echo "$ac_t""yes" 1>&6
15892     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15893   cat >> confdefs.h <<EOF
15894 #define $ac_tr_hdr 1
15895 EOF
15896  
15897 else
15898   echo "$ac_t""no" 1>&6
15899 fi
15900 done
15901
15902         for ac_func in sched_yield pthread_yield
15903 do
15904 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15905 echo "configure:15906: checking for $ac_func" >&5
15906 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15907   echo $ac_n "(cached) $ac_c" 1>&6
15908 else
15909   cat > conftest.$ac_ext <<EOF
15910 #line 15911 "configure"
15911 #include "confdefs.h"
15912 /* System header to define __stub macros and hopefully few prototypes,
15913     which can conflict with char $ac_func(); below.  */
15914 #include <assert.h>
15915 /* Override any gcc2 internal prototype to avoid an error.  */
15916 /* We use char because int might match the return type of a gcc2
15917     builtin and then its argument prototype would still apply.  */
15918 char $ac_func();
15919 char (*f)();
15920
15921 int main() {
15922
15923 /* The GNU C library defines this for functions which it implements
15924     to always fail with ENOSYS.  Some functions are actually named
15925     something starting with __ and the normal name is an alias.  */
15926 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15927 choke me
15928 #else
15929 f = $ac_func;
15930 #endif
15931
15932 ; return 0; }
15933 EOF
15934 if { (eval echo configure:15935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15935   rm -rf conftest*
15936   eval "ac_cv_func_$ac_func=yes"
15937 else
15938   echo "configure: failed program was:" >&5
15939   cat conftest.$ac_ext >&5
15940   rm -rf conftest*
15941   eval "ac_cv_func_$ac_func=no"
15942 fi
15943 rm -f conftest*
15944 fi
15945
15946 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15947   echo "$ac_t""yes" 1>&6
15948     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15949   cat >> confdefs.h <<EOF
15950 #define $ac_tr_func 1
15951 EOF
15952  
15953 else
15954   echo "$ac_t""no" 1>&6
15955 fi
15956 done
15957
15958         
15959         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15960 echo "configure:15961: checking for LinuxThreads pthread.h" >&5
15961 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15962   echo $ac_n "(cached) $ac_c" 1>&6
15963 else
15964   cat > conftest.$ac_ext <<EOF
15965 #line 15966 "configure"
15966 #include "confdefs.h"
15967 #include <pthread.h>
15968 EOF
15969 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15970   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15971   rm -rf conftest*
15972   ol_cv_header_linux_threads=yes
15973 else
15974   rm -rf conftest*
15975   ol_cv_header_linux_threads=no
15976 fi
15977 rm -f conftest*
15978
15979                 
15980 fi
15981
15982 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15983         if test $ol_cv_header_linux_threads = yes; then
15984                 cat >> confdefs.h <<\EOF
15985 #define HAVE_LINUX_THREADS 1
15986 EOF
15987
15988         fi
15989
15990
15991         for ac_hdr in mach/cthreads.h
15992 do
15993 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15994 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15995 echo "configure:15996: checking for $ac_hdr" >&5
15996 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15997   echo $ac_n "(cached) $ac_c" 1>&6
15998 else
15999   cat > conftest.$ac_ext <<EOF
16000 #line 16001 "configure"
16001 #include "confdefs.h"
16002 #include <$ac_hdr>
16003 EOF
16004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16005 { (eval echo configure:16006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16007 if test -z "$ac_err"; then
16008   rm -rf conftest*
16009   eval "ac_cv_header_$ac_safe=yes"
16010 else
16011   echo "$ac_err" >&5
16012   echo "configure: failed program was:" >&5
16013   cat conftest.$ac_ext >&5
16014   rm -rf conftest*
16015   eval "ac_cv_header_$ac_safe=no"
16016 fi
16017 rm -f conftest*
16018 fi
16019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16020   echo "$ac_t""yes" 1>&6
16021     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16022   cat >> confdefs.h <<EOF
16023 #define $ac_tr_hdr 1
16024 EOF
16025  
16026 else
16027   echo "$ac_t""no" 1>&6
16028 fi
16029 done
16030
16031         for ac_hdr in lwp/lwp.h
16032 do
16033 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16034 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16035 echo "configure:16036: checking for $ac_hdr" >&5
16036 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16037   echo $ac_n "(cached) $ac_c" 1>&6
16038 else
16039   cat > conftest.$ac_ext <<EOF
16040 #line 16041 "configure"
16041 #include "confdefs.h"
16042 #include <$ac_hdr>
16043 EOF
16044 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16045 { (eval echo configure:16046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16046 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16047 if test -z "$ac_err"; then
16048   rm -rf conftest*
16049   eval "ac_cv_header_$ac_safe=yes"
16050 else
16051   echo "$ac_err" >&5
16052   echo "configure: failed program was:" >&5
16053   cat conftest.$ac_ext >&5
16054   rm -rf conftest*
16055   eval "ac_cv_header_$ac_safe=no"
16056 fi
16057 rm -f conftest*
16058 fi
16059 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16060   echo "$ac_t""yes" 1>&6
16061     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16062   cat >> confdefs.h <<EOF
16063 #define $ac_tr_hdr 1
16064 EOF
16065  
16066 else
16067   echo "$ac_t""no" 1>&6
16068 fi
16069 done
16070
16071         for ac_hdr in thread.h synch.h
16072 do
16073 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16074 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16075 echo "configure:16076: checking for $ac_hdr" >&5
16076 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16077   echo $ac_n "(cached) $ac_c" 1>&6
16078 else
16079   cat > conftest.$ac_ext <<EOF
16080 #line 16081 "configure"
16081 #include "confdefs.h"
16082 #include <$ac_hdr>
16083 EOF
16084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16085 { (eval echo configure:16086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16087 if test -z "$ac_err"; then
16088   rm -rf conftest*
16089   eval "ac_cv_header_$ac_safe=yes"
16090 else
16091   echo "$ac_err" >&5
16092   echo "configure: failed program was:" >&5
16093   cat conftest.$ac_ext >&5
16094   rm -rf conftest*
16095   eval "ac_cv_header_$ac_safe=no"
16096 fi
16097 rm -f conftest*
16098 fi
16099 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16100   echo "$ac_t""yes" 1>&6
16101     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16102   cat >> confdefs.h <<EOF
16103 #define $ac_tr_hdr 1
16104 EOF
16105  
16106 else
16107   echo "$ac_t""no" 1>&6
16108 fi
16109 done
16110
16111 fi
16112
16113 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16114                         cat >> confdefs.h <<\EOF
16115 #define REENTRANT 1
16116 EOF
16117
16118         cat >> confdefs.h <<\EOF
16119 #define _REENTRANT 1
16120 EOF
16121
16122         cat >> confdefs.h <<\EOF
16123 #define THREAD_SAFE 1
16124 EOF
16125
16126         cat >> confdefs.h <<\EOF
16127 #define _THREAD_SAFE 1
16128 EOF
16129
16130         cat >> confdefs.h <<\EOF
16131 #define THREADSAFE 1
16132 EOF
16133
16134         cat >> confdefs.h <<\EOF
16135 #define _THREADSAFE 1
16136 EOF
16137
16138         cat >> confdefs.h <<\EOF
16139 #define _SGI_MP_SOURCE 1
16140 EOF
16141
16142
16143                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16144 echo "configure:16145: checking for thread specific errno" >&5
16145 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16146   echo $ac_n "(cached) $ac_c" 1>&6
16147 else
16148   
16149                 cat > conftest.$ac_ext <<EOF
16150 #line 16151 "configure"
16151 #include "confdefs.h"
16152 #include <errno.h>
16153 int main() {
16154 errno = 0;
16155 ; return 0; }
16156 EOF
16157 if { (eval echo configure:16158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16158   rm -rf conftest*
16159   ol_cv_errno_thread_specific=yes
16160 else
16161   echo "configure: failed program was:" >&5
16162   cat conftest.$ac_ext >&5
16163   rm -rf conftest*
16164   ol_cv_errno_thread_specific=no
16165 fi
16166 rm -f conftest*
16167         
16168 fi
16169
16170 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16171
16172                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16173 echo "configure:16174: checking for thread specific h_errno" >&5
16174 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16175   echo $ac_n "(cached) $ac_c" 1>&6
16176 else
16177   
16178                 cat > conftest.$ac_ext <<EOF
16179 #line 16180 "configure"
16180 #include "confdefs.h"
16181 #include <netdb.h>
16182 int main() {
16183 h_errno = 0;
16184 ; return 0; }
16185 EOF
16186 if { (eval echo configure:16187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16187   rm -rf conftest*
16188   ol_cv_h_errno_thread_specific=yes
16189 else
16190   echo "configure: failed program was:" >&5
16191   cat conftest.$ac_ext >&5
16192   rm -rf conftest*
16193   ol_cv_h_errno_thread_specific=no
16194 fi
16195 rm -f conftest*
16196         
16197 fi
16198
16199 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16200
16201         if test $ol_cv_errno_thread_specific != yes \
16202                 -o $ol_cv_h_errno_thread_specific != yes ; then
16203                 LIBS="$LTHREAD_LIBS $LIBS"
16204                 LTHREAD_LIBS=""
16205         fi
16206
16207 fi  
16208
16209 if test $ol_link_threads = no ; then
16210         if test $ol_with_threads = yes ; then
16211                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16212         fi
16213
16214         if test $ol_with_threads = auto ; then
16215                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16216                 ol_with_threads=no
16217         fi
16218
16219         cat >> confdefs.h <<\EOF
16220 #define NO_THREADS 1
16221 EOF
16222
16223         LTHREAD_LIBS=""
16224 fi
16225
16226 if test $ol_link_threads != no ; then
16227         cat >> confdefs.h <<\EOF
16228 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16229 EOF
16230
16231 fi
16232
16233 for ac_func in \
16234         ctime_r                 \
16235         gethostbyname_r gethostbyaddr_r \
16236
16237 do
16238 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16239 echo "configure:16240: checking for $ac_func" >&5
16240 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16241   echo $ac_n "(cached) $ac_c" 1>&6
16242 else
16243   cat > conftest.$ac_ext <<EOF
16244 #line 16245 "configure"
16245 #include "confdefs.h"
16246 /* System header to define __stub macros and hopefully few prototypes,
16247     which can conflict with char $ac_func(); below.  */
16248 #include <assert.h>
16249 /* Override any gcc2 internal prototype to avoid an error.  */
16250 /* We use char because int might match the return type of a gcc2
16251     builtin and then its argument prototype would still apply.  */
16252 char $ac_func();
16253 char (*f)();
16254
16255 int main() {
16256
16257 /* The GNU C library defines this for functions which it implements
16258     to always fail with ENOSYS.  Some functions are actually named
16259     something starting with __ and the normal name is an alias.  */
16260 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16261 choke me
16262 #else
16263 f = $ac_func;
16264 #endif
16265
16266 ; return 0; }
16267 EOF
16268 if { (eval echo configure:16269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16269   rm -rf conftest*
16270   eval "ac_cv_func_$ac_func=yes"
16271 else
16272   echo "configure: failed program was:" >&5
16273   cat conftest.$ac_ext >&5
16274   rm -rf conftest*
16275   eval "ac_cv_func_$ac_func=no"
16276 fi
16277 rm -f conftest*
16278 fi
16279
16280 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16281   echo "$ac_t""yes" 1>&6
16282     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16283   cat >> confdefs.h <<EOF
16284 #define $ac_tr_func 1
16285 EOF
16286  
16287 else
16288   echo "$ac_t""no" 1>&6
16289 fi
16290 done
16291
16292
16293 if test "$ac_cv_func_ctime_r" = no ; then
16294         ol_cv_func_ctime_r_nargs=0
16295 else
16296         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16297 echo "configure:16298: checking number of arguments of ctime_r" >&5
16298 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16299   echo $ac_n "(cached) $ac_c" 1>&6
16300 else
16301   cat > conftest.$ac_ext <<EOF
16302 #line 16303 "configure"
16303 #include "confdefs.h"
16304 #include <time.h>
16305 int main() {
16306 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16307 ; return 0; }
16308 EOF
16309 if { (eval echo configure:16310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16310   rm -rf conftest*
16311   ol_cv_func_ctime_r_nargs3=yes
16312 else
16313   echo "configure: failed program was:" >&5
16314   cat conftest.$ac_ext >&5
16315   rm -rf conftest*
16316   ol_cv_func_ctime_r_nargs3=no
16317 fi
16318 rm -f conftest*
16319
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);
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_nargs2=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_nargs2=no
16336 fi
16337 rm -f conftest*
16338
16339         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16340                 $ol_cv_func_ctime_r_nargs2 = no ; then
16341
16342                 ol_cv_func_ctime_r_nargs=3
16343
16344         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16345                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16346
16347                 ol_cv_func_ctime_r_nargs=2
16348
16349         else
16350                 ol_cv_func_ctime_r_nargs=0
16351         fi
16352   
16353 fi
16354
16355 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16356
16357   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16358         cat >> confdefs.h <<EOF
16359 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16360 EOF
16361
16362   fi
16363
16364 fi
16365
16366 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16367         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16368 echo "configure:16369: checking number of arguments of gethostbyname_r" >&5
16369 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16370   echo $ac_n "(cached) $ac_c" 1>&6
16371 else
16372   cat > conftest.$ac_ext <<EOF
16373 #line 16374 "configure"
16374 #include "confdefs.h"
16375 #include <sys/types.h>
16376 #include <sys/socket.h>
16377 #include <netinet/in.h>
16378 #include <netdb.h>
16379 #define BUFSIZE (sizeof(struct hostent)+10)
16380 int main() {
16381 struct hostent hent; char buffer[BUFSIZE];
16382                 int bufsize=BUFSIZE;int h_errno;
16383                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16384                         buffer, bufsize, &h_errno);
16385 ; return 0; }
16386 EOF
16387 if { (eval echo configure:16388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16388   rm -rf conftest*
16389   ol_cv_func_gethostbyname_r_nargs5=yes
16390 else
16391   echo "configure: failed program was:" >&5
16392   cat conftest.$ac_ext >&5
16393   rm -rf conftest*
16394   ol_cv_func_gethostbyname_r_nargs5=no
16395 fi
16396 rm -f conftest*
16397
16398         cat > conftest.$ac_ext <<EOF
16399 #line 16400 "configure"
16400 #include "confdefs.h"
16401 #include <sys/types.h>
16402 #include <sys/socket.h>
16403 #include <netinet/in.h>
16404 #include <netdb.h>
16405 #define BUFSIZE (sizeof(struct hostent)+10)
16406 int main() {
16407 struct hostent hent;struct hostent *rhent;
16408                 char buffer[BUFSIZE];
16409                 int bufsize=BUFSIZE;int h_errno;
16410                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16411                         &rhent, &h_errno);
16412 ; return 0; }
16413 EOF
16414 if { (eval echo configure:16415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16415   rm -rf conftest*
16416   ol_cv_func_gethostbyname_r_nargs6=yes
16417 else
16418   echo "configure: failed program was:" >&5
16419   cat conftest.$ac_ext >&5
16420   rm -rf conftest*
16421   ol_cv_func_gethostbyname_r_nargs6=no
16422 fi
16423 rm -f conftest*
16424
16425         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16426                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16427
16428                 ol_cv_func_gethostbyname_r_nargs=5
16429
16430         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16431                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16432
16433                 ol_cv_func_gethostbyname_r_nargs=6
16434
16435         else
16436                 ol_cv_func_gethostbyname_r_nargs=0
16437         fi
16438   
16439 fi
16440
16441 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16442   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16443         cat >> confdefs.h <<EOF
16444 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16445 EOF
16446
16447   fi
16448
16449 else
16450         ol_cv_func_gethostbyname_r_nargs=0
16451 fi
16452  
16453 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16454         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16455 echo "configure:16456: checking number of arguments of gethostbyaddr_r" >&5
16456 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16457   echo $ac_n "(cached) $ac_c" 1>&6
16458 else
16459   cat > conftest.$ac_ext <<EOF
16460 #line 16461 "configure"
16461 #include "confdefs.h"
16462 #include <sys/types.h>
16463 #include <sys/socket.h>
16464 #include <netinet/in.h>
16465 #include <netdb.h>
16466 #define BUFSIZE (sizeof(struct hostent)+10)
16467 int main() {
16468 struct hostent hent; char buffer[BUFSIZE]; 
16469             struct in_addr add;
16470             size_t alen=sizeof(struct in_addr);
16471             int bufsize=BUFSIZE;int h_errno;
16472                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16473                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16474 ; return 0; }
16475 EOF
16476 if { (eval echo configure:16477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16477   rm -rf conftest*
16478   ol_cv_func_gethostbyaddr_r_nargs7=yes
16479 else
16480   echo "configure: failed program was:" >&5
16481   cat conftest.$ac_ext >&5
16482   rm -rf conftest*
16483   ol_cv_func_gethostbyaddr_r_nargs7=no
16484 fi
16485 rm -f conftest*
16486
16487         cat > conftest.$ac_ext <<EOF
16488 #line 16489 "configure"
16489 #include "confdefs.h"
16490 #include <sys/types.h>
16491 #include <sys/socket.h>
16492 #include <netinet/in.h>
16493 #include <netdb.h>
16494 #define BUFSIZE (sizeof(struct hostent)+10)
16495 int main() {
16496 struct hostent hent;
16497                 struct hostent *rhent; char buffer[BUFSIZE]; 
16498                 struct in_addr add;
16499                 size_t alen=sizeof(struct in_addr);
16500                 int bufsize=BUFSIZE;int h_errno;
16501                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16502                         alen, AF_INET, &hent, buffer, bufsize, 
16503                         &rhent, &h_errno);
16504 ; return 0; }
16505 EOF
16506 if { (eval echo configure:16507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16507   rm -rf conftest*
16508   ol_cv_func_gethostbyaddr_r_nargs8=yes
16509 else
16510   echo "configure: failed program was:" >&5
16511   cat conftest.$ac_ext >&5
16512   rm -rf conftest*
16513   ol_cv_func_gethostbyaddr_r_nargs8=no
16514 fi
16515 rm -f conftest*
16516
16517         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16518                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16519
16520                 ol_cv_func_gethostbyaddr_r_nargs=7
16521
16522         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16523                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16524
16525                 ol_cv_func_gethostbyaddr_r_nargs=8
16526
16527         else
16528                 ol_cv_func_gethostbyaddr_r_nargs=0
16529         fi
16530   
16531 fi
16532
16533 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16534   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16535     cat >> confdefs.h <<EOF
16536 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16537 EOF
16538
16539   fi
16540
16541 else
16542         ol_cv_func_gethostbyaddr_r_nargs=0
16543 fi
16544
16545 ol_link_ldbm=no 
16546
16547 if test $ol_with_ldbm_api = auto \
16548         -o $ol_with_ldbm_api = berkeley \
16549         -o $ol_with_ldbm_api = bcompat ; then
16550
16551         if test $ol_with_ldbm_api = bcompat; then \
16552                 for ac_hdr in db_185.h db.h
16553 do
16554 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16555 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16556 echo "configure:16557: checking for $ac_hdr" >&5
16557 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16558   echo $ac_n "(cached) $ac_c" 1>&6
16559 else
16560   cat > conftest.$ac_ext <<EOF
16561 #line 16562 "configure"
16562 #include "confdefs.h"
16563 #include <$ac_hdr>
16564 EOF
16565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16566 { (eval echo configure:16567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16568 if test -z "$ac_err"; then
16569   rm -rf conftest*
16570   eval "ac_cv_header_$ac_safe=yes"
16571 else
16572   echo "$ac_err" >&5
16573   echo "configure: failed program was:" >&5
16574   cat conftest.$ac_ext >&5
16575   rm -rf conftest*
16576   eval "ac_cv_header_$ac_safe=no"
16577 fi
16578 rm -f conftest*
16579 fi
16580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16581   echo "$ac_t""yes" 1>&6
16582     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16583   cat >> confdefs.h <<EOF
16584 #define $ac_tr_hdr 1
16585 EOF
16586  
16587 else
16588   echo "$ac_t""no" 1>&6
16589 fi
16590 done
16591
16592 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16593         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16594 echo "configure:16595: checking if Berkeley DB header compatibility" >&5
16595 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16596   echo $ac_n "(cached) $ac_c" 1>&6
16597 else
16598   
16599                 cat > conftest.$ac_ext <<EOF
16600 #line 16601 "configure"
16601 #include "confdefs.h"
16602
16603 #if HAVE_DB_185_H
16604 #       include <db_185.h>
16605 #else
16606 #       include <db.h>
16607 #endif
16608
16609  /* this check could be improved */
16610 #ifndef DB_VERSION_MAJOR
16611 #       define DB_VERSION_MAJOR 1
16612 #endif
16613
16614 #if DB_VERSION_MAJOR == 1 
16615         __db_version_1
16616 #endif
16617
16618 EOF
16619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16620   egrep "__db_version_1" >/dev/null 2>&1; then
16621   rm -rf conftest*
16622   ol_cv_header_db1=yes
16623 else
16624   rm -rf conftest*
16625   ol_cv_header_db1=no
16626 fi
16627 rm -f conftest*
16628
16629 fi
16630
16631 echo "$ac_t""$ol_cv_header_db1" 1>&6
16632
16633         if test $ol_cv_header_db1 = yes ; then
16634                 ol_cv_lib_db=no
16635 if test $ol_cv_lib_db = no ; then
16636         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16637 echo "configure:16638: checking for Berkeley DB link (default)" >&5
16638 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16639   echo $ac_n "(cached) $ac_c" 1>&6
16640 else
16641   
16642         ol_DB_LIB=
16643         ol_LIBS=$LIBS
16644         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16645
16646         cat > conftest.$ac_ext <<EOF
16647 #line 16648 "configure"
16648 #include "confdefs.h"
16649
16650 #ifdef HAVE_DB_185_H
16651 # include <db_185.h>
16652 #else
16653 # include <db.h>
16654 #endif
16655
16656 #ifndef DB_VERSION_MAJOR
16657 # define DB_VERSION_MAJOR 1
16658 #endif
16659
16660 #ifndef NULL
16661 #define NULL ((void*)0)
16662 #endif
16663
16664 int main() {
16665
16666 #if DB_VERSION_MAJOR > 1
16667         {
16668                 char *version;
16669                 int major, minor, patch;
16670
16671                 version = db_version( &major, &minor, &patch );
16672
16673                 if( major != DB_VERSION_MAJOR ||
16674                         minor < DB_VERSION_MINOR )
16675                 {
16676                         printf("Berkeley DB version mismatch\n"
16677                                 "\texpected: %s\n\tgot: %s\n",
16678                                 DB_VERSION_STRING, version);
16679                         return 1;
16680                 }
16681         }
16682 #endif
16683
16684 #if DB_VERSION_MAJOR > 2
16685         db_env_create( NULL, 0 );
16686 #elif DB_VERSION_MAJOR > 1
16687         db_appexit( NULL );
16688 #else
16689         (void) dbopen( NULL, 0, 0, 0, NULL);
16690 #endif
16691
16692 ; return 0; }
16693 EOF
16694 if { (eval echo configure:16695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16695   rm -rf conftest*
16696   ol_cv_db_none=yes
16697 else
16698   echo "configure: failed program was:" >&5
16699   cat conftest.$ac_ext >&5
16700   rm -rf conftest*
16701   ol_cv_db_none=no
16702 fi
16703 rm -f conftest*
16704
16705         LIBS="$ol_LIBS"
16706
16707 fi
16708
16709 echo "$ac_t""$ol_cv_db_none" 1>&6
16710
16711         if test $ol_cv_db_none = yes ; then
16712                 ol_cv_lib_db=yes
16713         fi
16714 fi
16715
16716 if test $ol_cv_lib_db = no ; then
16717         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16718 echo "configure:16719: checking for Berkeley DB link (-ldb42)" >&5
16719 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16720   echo $ac_n "(cached) $ac_c" 1>&6
16721 else
16722   
16723         ol_DB_LIB=-ldb42
16724         ol_LIBS=$LIBS
16725         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16726
16727         cat > conftest.$ac_ext <<EOF
16728 #line 16729 "configure"
16729 #include "confdefs.h"
16730
16731 #ifdef HAVE_DB_185_H
16732 # include <db_185.h>
16733 #else
16734 # include <db.h>
16735 #endif
16736
16737 #ifndef DB_VERSION_MAJOR
16738 # define DB_VERSION_MAJOR 1
16739 #endif
16740
16741 #ifndef NULL
16742 #define NULL ((void*)0)
16743 #endif
16744
16745 int main() {
16746
16747 #if DB_VERSION_MAJOR > 1
16748         {
16749                 char *version;
16750                 int major, minor, patch;
16751
16752                 version = db_version( &major, &minor, &patch );
16753
16754                 if( major != DB_VERSION_MAJOR ||
16755                         minor < DB_VERSION_MINOR )
16756                 {
16757                         printf("Berkeley DB version mismatch\n"
16758                                 "\texpected: %s\n\tgot: %s\n",
16759                                 DB_VERSION_STRING, version);
16760                         return 1;
16761                 }
16762         }
16763 #endif
16764
16765 #if DB_VERSION_MAJOR > 2
16766         db_env_create( NULL, 0 );
16767 #elif DB_VERSION_MAJOR > 1
16768         db_appexit( NULL );
16769 #else
16770         (void) dbopen( NULL, 0, 0, 0, NULL);
16771 #endif
16772
16773 ; return 0; }
16774 EOF
16775 if { (eval echo configure:16776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16776   rm -rf conftest*
16777   ol_cv_db_db42=yes
16778 else
16779   echo "configure: failed program was:" >&5
16780   cat conftest.$ac_ext >&5
16781   rm -rf conftest*
16782   ol_cv_db_db42=no
16783 fi
16784 rm -f conftest*
16785
16786         LIBS="$ol_LIBS"
16787
16788 fi
16789
16790 echo "$ac_t""$ol_cv_db_db42" 1>&6
16791
16792         if test $ol_cv_db_db42 = yes ; then
16793                 ol_cv_lib_db=-ldb42
16794         fi
16795 fi
16796
16797 if test $ol_cv_lib_db = no ; then
16798         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16799 echo "configure:16800: checking for Berkeley DB link (-ldb-42)" >&5
16800 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16801   echo $ac_n "(cached) $ac_c" 1>&6
16802 else
16803   
16804         ol_DB_LIB=-ldb-42
16805         ol_LIBS=$LIBS
16806         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16807
16808         cat > conftest.$ac_ext <<EOF
16809 #line 16810 "configure"
16810 #include "confdefs.h"
16811
16812 #ifdef HAVE_DB_185_H
16813 # include <db_185.h>
16814 #else
16815 # include <db.h>
16816 #endif
16817
16818 #ifndef DB_VERSION_MAJOR
16819 # define DB_VERSION_MAJOR 1
16820 #endif
16821
16822 #ifndef NULL
16823 #define NULL ((void*)0)
16824 #endif
16825
16826 int main() {
16827
16828 #if DB_VERSION_MAJOR > 1
16829         {
16830                 char *version;
16831                 int major, minor, patch;
16832
16833                 version = db_version( &major, &minor, &patch );
16834
16835                 if( major != DB_VERSION_MAJOR ||
16836                         minor < DB_VERSION_MINOR )
16837                 {
16838                         printf("Berkeley DB version mismatch\n"
16839                                 "\texpected: %s\n\tgot: %s\n",
16840                                 DB_VERSION_STRING, version);
16841                         return 1;
16842                 }
16843         }
16844 #endif
16845
16846 #if DB_VERSION_MAJOR > 2
16847         db_env_create( NULL, 0 );
16848 #elif DB_VERSION_MAJOR > 1
16849         db_appexit( NULL );
16850 #else
16851         (void) dbopen( NULL, 0, 0, 0, NULL);
16852 #endif
16853
16854 ; return 0; }
16855 EOF
16856 if { (eval echo configure:16857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16857   rm -rf conftest*
16858   ol_cv_db_db_42=yes
16859 else
16860   echo "configure: failed program was:" >&5
16861   cat conftest.$ac_ext >&5
16862   rm -rf conftest*
16863   ol_cv_db_db_42=no
16864 fi
16865 rm -f conftest*
16866
16867         LIBS="$ol_LIBS"
16868
16869 fi
16870
16871 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16872
16873         if test $ol_cv_db_db_42 = yes ; then
16874                 ol_cv_lib_db=-ldb-42
16875         fi
16876 fi
16877
16878 if test $ol_cv_lib_db = no ; then
16879         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16880 echo "configure:16881: checking for Berkeley DB link (-ldb-4.2)" >&5
16881 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16882   echo $ac_n "(cached) $ac_c" 1>&6
16883 else
16884   
16885         ol_DB_LIB=-ldb-4.2
16886         ol_LIBS=$LIBS
16887         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16888
16889         cat > conftest.$ac_ext <<EOF
16890 #line 16891 "configure"
16891 #include "confdefs.h"
16892
16893 #ifdef HAVE_DB_185_H
16894 # include <db_185.h>
16895 #else
16896 # include <db.h>
16897 #endif
16898
16899 #ifndef DB_VERSION_MAJOR
16900 # define DB_VERSION_MAJOR 1
16901 #endif
16902
16903 #ifndef NULL
16904 #define NULL ((void*)0)
16905 #endif
16906
16907 int main() {
16908
16909 #if DB_VERSION_MAJOR > 1
16910         {
16911                 char *version;
16912                 int major, minor, patch;
16913
16914                 version = db_version( &major, &minor, &patch );
16915
16916                 if( major != DB_VERSION_MAJOR ||
16917                         minor < DB_VERSION_MINOR )
16918                 {
16919                         printf("Berkeley DB version mismatch\n"
16920                                 "\texpected: %s\n\tgot: %s\n",
16921                                 DB_VERSION_STRING, version);
16922                         return 1;
16923                 }
16924         }
16925 #endif
16926
16927 #if DB_VERSION_MAJOR > 2
16928         db_env_create( NULL, 0 );
16929 #elif DB_VERSION_MAJOR > 1
16930         db_appexit( NULL );
16931 #else
16932         (void) dbopen( NULL, 0, 0, 0, NULL);
16933 #endif
16934
16935 ; return 0; }
16936 EOF
16937 if { (eval echo configure:16938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16938   rm -rf conftest*
16939   ol_cv_db_db_4_dot_2=yes
16940 else
16941   echo "configure: failed program was:" >&5
16942   cat conftest.$ac_ext >&5
16943   rm -rf conftest*
16944   ol_cv_db_db_4_dot_2=no
16945 fi
16946 rm -f conftest*
16947
16948         LIBS="$ol_LIBS"
16949
16950 fi
16951
16952 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16953
16954         if test $ol_cv_db_db_4_dot_2 = yes ; then
16955                 ol_cv_lib_db=-ldb-4.2
16956         fi
16957 fi
16958
16959 if test $ol_cv_lib_db = no ; then
16960         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16961 echo "configure:16962: checking for Berkeley DB link (-ldb-4-2)" >&5
16962 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16963   echo $ac_n "(cached) $ac_c" 1>&6
16964 else
16965   
16966         ol_DB_LIB=-ldb-4-2
16967         ol_LIBS=$LIBS
16968         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16969
16970         cat > conftest.$ac_ext <<EOF
16971 #line 16972 "configure"
16972 #include "confdefs.h"
16973
16974 #ifdef HAVE_DB_185_H
16975 # include <db_185.h>
16976 #else
16977 # include <db.h>
16978 #endif
16979
16980 #ifndef DB_VERSION_MAJOR
16981 # define DB_VERSION_MAJOR 1
16982 #endif
16983
16984 #ifndef NULL
16985 #define NULL ((void*)0)
16986 #endif
16987
16988 int main() {
16989
16990 #if DB_VERSION_MAJOR > 1
16991         {
16992                 char *version;
16993                 int major, minor, patch;
16994
16995                 version = db_version( &major, &minor, &patch );
16996
16997                 if( major != DB_VERSION_MAJOR ||
16998                         minor < DB_VERSION_MINOR )
16999                 {
17000                         printf("Berkeley DB version mismatch\n"
17001                                 "\texpected: %s\n\tgot: %s\n",
17002                                 DB_VERSION_STRING, version);
17003                         return 1;
17004                 }
17005         }
17006 #endif
17007
17008 #if DB_VERSION_MAJOR > 2
17009         db_env_create( NULL, 0 );
17010 #elif DB_VERSION_MAJOR > 1
17011         db_appexit( NULL );
17012 #else
17013         (void) dbopen( NULL, 0, 0, 0, NULL);
17014 #endif
17015
17016 ; return 0; }
17017 EOF
17018 if { (eval echo configure:17019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17019   rm -rf conftest*
17020   ol_cv_db_db_4_2=yes
17021 else
17022   echo "configure: failed program was:" >&5
17023   cat conftest.$ac_ext >&5
17024   rm -rf conftest*
17025   ol_cv_db_db_4_2=no
17026 fi
17027 rm -f conftest*
17028
17029         LIBS="$ol_LIBS"
17030
17031 fi
17032
17033 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17034
17035         if test $ol_cv_db_db_4_2 = yes ; then
17036                 ol_cv_lib_db=-ldb-4-2
17037         fi
17038 fi
17039
17040 if test $ol_cv_lib_db = no ; then
17041         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17042 echo "configure:17043: checking for Berkeley DB link (-ldb-4)" >&5
17043 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17044   echo $ac_n "(cached) $ac_c" 1>&6
17045 else
17046   
17047         ol_DB_LIB=-ldb-4
17048         ol_LIBS=$LIBS
17049         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17050
17051         cat > conftest.$ac_ext <<EOF
17052 #line 17053 "configure"
17053 #include "confdefs.h"
17054
17055 #ifdef HAVE_DB_185_H
17056 # include <db_185.h>
17057 #else
17058 # include <db.h>
17059 #endif
17060
17061 #ifndef DB_VERSION_MAJOR
17062 # define DB_VERSION_MAJOR 1
17063 #endif
17064
17065 #ifndef NULL
17066 #define NULL ((void*)0)
17067 #endif
17068
17069 int main() {
17070
17071 #if DB_VERSION_MAJOR > 1
17072         {
17073                 char *version;
17074                 int major, minor, patch;
17075
17076                 version = db_version( &major, &minor, &patch );
17077
17078                 if( major != DB_VERSION_MAJOR ||
17079                         minor < DB_VERSION_MINOR )
17080                 {
17081                         printf("Berkeley DB version mismatch\n"
17082                                 "\texpected: %s\n\tgot: %s\n",
17083                                 DB_VERSION_STRING, version);
17084                         return 1;
17085                 }
17086         }
17087 #endif
17088
17089 #if DB_VERSION_MAJOR > 2
17090         db_env_create( NULL, 0 );
17091 #elif DB_VERSION_MAJOR > 1
17092         db_appexit( NULL );
17093 #else
17094         (void) dbopen( NULL, 0, 0, 0, NULL);
17095 #endif
17096
17097 ; return 0; }
17098 EOF
17099 if { (eval echo configure:17100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17100   rm -rf conftest*
17101   ol_cv_db_db_4=yes
17102 else
17103   echo "configure: failed program was:" >&5
17104   cat conftest.$ac_ext >&5
17105   rm -rf conftest*
17106   ol_cv_db_db_4=no
17107 fi
17108 rm -f conftest*
17109
17110         LIBS="$ol_LIBS"
17111
17112 fi
17113
17114 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17115
17116         if test $ol_cv_db_db_4 = yes ; then
17117                 ol_cv_lib_db=-ldb-4
17118         fi
17119 fi
17120
17121 if test $ol_cv_lib_db = no ; then
17122         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17123 echo "configure:17124: checking for Berkeley DB link (-ldb4)" >&5
17124 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17125   echo $ac_n "(cached) $ac_c" 1>&6
17126 else
17127   
17128         ol_DB_LIB=-ldb4
17129         ol_LIBS=$LIBS
17130         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17131
17132         cat > conftest.$ac_ext <<EOF
17133 #line 17134 "configure"
17134 #include "confdefs.h"
17135
17136 #ifdef HAVE_DB_185_H
17137 # include <db_185.h>
17138 #else
17139 # include <db.h>
17140 #endif
17141
17142 #ifndef DB_VERSION_MAJOR
17143 # define DB_VERSION_MAJOR 1
17144 #endif
17145
17146 #ifndef NULL
17147 #define NULL ((void*)0)
17148 #endif
17149
17150 int main() {
17151
17152 #if DB_VERSION_MAJOR > 1
17153         {
17154                 char *version;
17155                 int major, minor, patch;
17156
17157                 version = db_version( &major, &minor, &patch );
17158
17159                 if( major != DB_VERSION_MAJOR ||
17160                         minor < DB_VERSION_MINOR )
17161                 {
17162                         printf("Berkeley DB version mismatch\n"
17163                                 "\texpected: %s\n\tgot: %s\n",
17164                                 DB_VERSION_STRING, version);
17165                         return 1;
17166                 }
17167         }
17168 #endif
17169
17170 #if DB_VERSION_MAJOR > 2
17171         db_env_create( NULL, 0 );
17172 #elif DB_VERSION_MAJOR > 1
17173         db_appexit( NULL );
17174 #else
17175         (void) dbopen( NULL, 0, 0, 0, NULL);
17176 #endif
17177
17178 ; return 0; }
17179 EOF
17180 if { (eval echo configure:17181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17181   rm -rf conftest*
17182   ol_cv_db_db4=yes
17183 else
17184   echo "configure: failed program was:" >&5
17185   cat conftest.$ac_ext >&5
17186   rm -rf conftest*
17187   ol_cv_db_db4=no
17188 fi
17189 rm -f conftest*
17190
17191         LIBS="$ol_LIBS"
17192
17193 fi
17194
17195 echo "$ac_t""$ol_cv_db_db4" 1>&6
17196
17197         if test $ol_cv_db_db4 = yes ; then
17198                 ol_cv_lib_db=-ldb4
17199         fi
17200 fi
17201
17202 if test $ol_cv_lib_db = no ; then
17203         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17204 echo "configure:17205: checking for Berkeley DB link (-ldb)" >&5
17205 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17206   echo $ac_n "(cached) $ac_c" 1>&6
17207 else
17208   
17209         ol_DB_LIB=-ldb
17210         ol_LIBS=$LIBS
17211         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17212
17213         cat > conftest.$ac_ext <<EOF
17214 #line 17215 "configure"
17215 #include "confdefs.h"
17216
17217 #ifdef HAVE_DB_185_H
17218 # include <db_185.h>
17219 #else
17220 # include <db.h>
17221 #endif
17222
17223 #ifndef DB_VERSION_MAJOR
17224 # define DB_VERSION_MAJOR 1
17225 #endif
17226
17227 #ifndef NULL
17228 #define NULL ((void*)0)
17229 #endif
17230
17231 int main() {
17232
17233 #if DB_VERSION_MAJOR > 1
17234         {
17235                 char *version;
17236                 int major, minor, patch;
17237
17238                 version = db_version( &major, &minor, &patch );
17239
17240                 if( major != DB_VERSION_MAJOR ||
17241                         minor < DB_VERSION_MINOR )
17242                 {
17243                         printf("Berkeley DB version mismatch\n"
17244                                 "\texpected: %s\n\tgot: %s\n",
17245                                 DB_VERSION_STRING, version);
17246                         return 1;
17247                 }
17248         }
17249 #endif
17250
17251 #if DB_VERSION_MAJOR > 2
17252         db_env_create( NULL, 0 );
17253 #elif DB_VERSION_MAJOR > 1
17254         db_appexit( NULL );
17255 #else
17256         (void) dbopen( NULL, 0, 0, 0, NULL);
17257 #endif
17258
17259 ; return 0; }
17260 EOF
17261 if { (eval echo configure:17262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17262   rm -rf conftest*
17263   ol_cv_db_db=yes
17264 else
17265   echo "configure: failed program was:" >&5
17266   cat conftest.$ac_ext >&5
17267   rm -rf conftest*
17268   ol_cv_db_db=no
17269 fi
17270 rm -f conftest*
17271
17272         LIBS="$ol_LIBS"
17273
17274 fi
17275
17276 echo "$ac_t""$ol_cv_db_db" 1>&6
17277
17278         if test $ol_cv_db_db = yes ; then
17279                 ol_cv_lib_db=-ldb
17280         fi
17281 fi
17282
17283 if test $ol_cv_lib_db = no ; then
17284         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17285 echo "configure:17286: checking for Berkeley DB link (-ldb41)" >&5
17286 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17287   echo $ac_n "(cached) $ac_c" 1>&6
17288 else
17289   
17290         ol_DB_LIB=-ldb41
17291         ol_LIBS=$LIBS
17292         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17293
17294         cat > conftest.$ac_ext <<EOF
17295 #line 17296 "configure"
17296 #include "confdefs.h"
17297
17298 #ifdef HAVE_DB_185_H
17299 # include <db_185.h>
17300 #else
17301 # include <db.h>
17302 #endif
17303
17304 #ifndef DB_VERSION_MAJOR
17305 # define DB_VERSION_MAJOR 1
17306 #endif
17307
17308 #ifndef NULL
17309 #define NULL ((void*)0)
17310 #endif
17311
17312 int main() {
17313
17314 #if DB_VERSION_MAJOR > 1
17315         {
17316                 char *version;
17317                 int major, minor, patch;
17318
17319                 version = db_version( &major, &minor, &patch );
17320
17321                 if( major != DB_VERSION_MAJOR ||
17322                         minor < DB_VERSION_MINOR )
17323                 {
17324                         printf("Berkeley DB version mismatch\n"
17325                                 "\texpected: %s\n\tgot: %s\n",
17326                                 DB_VERSION_STRING, version);
17327                         return 1;
17328                 }
17329         }
17330 #endif
17331
17332 #if DB_VERSION_MAJOR > 2
17333         db_env_create( NULL, 0 );
17334 #elif DB_VERSION_MAJOR > 1
17335         db_appexit( NULL );
17336 #else
17337         (void) dbopen( NULL, 0, 0, 0, NULL);
17338 #endif
17339
17340 ; return 0; }
17341 EOF
17342 if { (eval echo configure:17343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17343   rm -rf conftest*
17344   ol_cv_db_db41=yes
17345 else
17346   echo "configure: failed program was:" >&5
17347   cat conftest.$ac_ext >&5
17348   rm -rf conftest*
17349   ol_cv_db_db41=no
17350 fi
17351 rm -f conftest*
17352
17353         LIBS="$ol_LIBS"
17354
17355 fi
17356
17357 echo "$ac_t""$ol_cv_db_db41" 1>&6
17358
17359         if test $ol_cv_db_db41 = yes ; then
17360                 ol_cv_lib_db=-ldb41
17361         fi
17362 fi
17363
17364 if test $ol_cv_lib_db = no ; then
17365         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17366 echo "configure:17367: checking for Berkeley DB link (-ldb-41)" >&5
17367 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17368   echo $ac_n "(cached) $ac_c" 1>&6
17369 else
17370   
17371         ol_DB_LIB=-ldb-41
17372         ol_LIBS=$LIBS
17373         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17374
17375         cat > conftest.$ac_ext <<EOF
17376 #line 17377 "configure"
17377 #include "confdefs.h"
17378
17379 #ifdef HAVE_DB_185_H
17380 # include <db_185.h>
17381 #else
17382 # include <db.h>
17383 #endif
17384
17385 #ifndef DB_VERSION_MAJOR
17386 # define DB_VERSION_MAJOR 1
17387 #endif
17388
17389 #ifndef NULL
17390 #define NULL ((void*)0)
17391 #endif
17392
17393 int main() {
17394
17395 #if DB_VERSION_MAJOR > 1
17396         {
17397                 char *version;
17398                 int major, minor, patch;
17399
17400                 version = db_version( &major, &minor, &patch );
17401
17402                 if( major != DB_VERSION_MAJOR ||
17403                         minor < DB_VERSION_MINOR )
17404                 {
17405                         printf("Berkeley DB version mismatch\n"
17406                                 "\texpected: %s\n\tgot: %s\n",
17407                                 DB_VERSION_STRING, version);
17408                         return 1;
17409                 }
17410         }
17411 #endif
17412
17413 #if DB_VERSION_MAJOR > 2
17414         db_env_create( NULL, 0 );
17415 #elif DB_VERSION_MAJOR > 1
17416         db_appexit( NULL );
17417 #else
17418         (void) dbopen( NULL, 0, 0, 0, NULL);
17419 #endif
17420
17421 ; return 0; }
17422 EOF
17423 if { (eval echo configure:17424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17424   rm -rf conftest*
17425   ol_cv_db_db_41=yes
17426 else
17427   echo "configure: failed program was:" >&5
17428   cat conftest.$ac_ext >&5
17429   rm -rf conftest*
17430   ol_cv_db_db_41=no
17431 fi
17432 rm -f conftest*
17433
17434         LIBS="$ol_LIBS"
17435
17436 fi
17437
17438 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17439
17440         if test $ol_cv_db_db_41 = yes ; then
17441                 ol_cv_lib_db=-ldb-41
17442         fi
17443 fi
17444
17445 if test $ol_cv_lib_db = no ; then
17446         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17447 echo "configure:17448: checking for Berkeley DB link (-ldb-4.1)" >&5
17448 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17449   echo $ac_n "(cached) $ac_c" 1>&6
17450 else
17451   
17452         ol_DB_LIB=-ldb-4.1
17453         ol_LIBS=$LIBS
17454         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17455
17456         cat > conftest.$ac_ext <<EOF
17457 #line 17458 "configure"
17458 #include "confdefs.h"
17459
17460 #ifdef HAVE_DB_185_H
17461 # include <db_185.h>
17462 #else
17463 # include <db.h>
17464 #endif
17465
17466 #ifndef DB_VERSION_MAJOR
17467 # define DB_VERSION_MAJOR 1
17468 #endif
17469
17470 #ifndef NULL
17471 #define NULL ((void*)0)
17472 #endif
17473
17474 int main() {
17475
17476 #if DB_VERSION_MAJOR > 1
17477         {
17478                 char *version;
17479                 int major, minor, patch;
17480
17481                 version = db_version( &major, &minor, &patch );
17482
17483                 if( major != DB_VERSION_MAJOR ||
17484                         minor < DB_VERSION_MINOR )
17485                 {
17486                         printf("Berkeley DB version mismatch\n"
17487                                 "\texpected: %s\n\tgot: %s\n",
17488                                 DB_VERSION_STRING, version);
17489                         return 1;
17490                 }
17491         }
17492 #endif
17493
17494 #if DB_VERSION_MAJOR > 2
17495         db_env_create( NULL, 0 );
17496 #elif DB_VERSION_MAJOR > 1
17497         db_appexit( NULL );
17498 #else
17499         (void) dbopen( NULL, 0, 0, 0, NULL);
17500 #endif
17501
17502 ; return 0; }
17503 EOF
17504 if { (eval echo configure:17505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17505   rm -rf conftest*
17506   ol_cv_db_db_4_dot_1=yes
17507 else
17508   echo "configure: failed program was:" >&5
17509   cat conftest.$ac_ext >&5
17510   rm -rf conftest*
17511   ol_cv_db_db_4_dot_1=no
17512 fi
17513 rm -f conftest*
17514
17515         LIBS="$ol_LIBS"
17516
17517 fi
17518
17519 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17520
17521         if test $ol_cv_db_db_4_dot_1 = yes ; then
17522                 ol_cv_lib_db=-ldb-4.1
17523         fi
17524 fi
17525
17526 if test $ol_cv_lib_db = no ; then
17527         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17528 echo "configure:17529: checking for Berkeley DB link (-ldb-4-1)" >&5
17529 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17530   echo $ac_n "(cached) $ac_c" 1>&6
17531 else
17532   
17533         ol_DB_LIB=-ldb-4-1
17534         ol_LIBS=$LIBS
17535         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17536
17537         cat > conftest.$ac_ext <<EOF
17538 #line 17539 "configure"
17539 #include "confdefs.h"
17540
17541 #ifdef HAVE_DB_185_H
17542 # include <db_185.h>
17543 #else
17544 # include <db.h>
17545 #endif
17546
17547 #ifndef DB_VERSION_MAJOR
17548 # define DB_VERSION_MAJOR 1
17549 #endif
17550
17551 #ifndef NULL
17552 #define NULL ((void*)0)
17553 #endif
17554
17555 int main() {
17556
17557 #if DB_VERSION_MAJOR > 1
17558         {
17559                 char *version;
17560                 int major, minor, patch;
17561
17562                 version = db_version( &major, &minor, &patch );
17563
17564                 if( major != DB_VERSION_MAJOR ||
17565                         minor < DB_VERSION_MINOR )
17566                 {
17567                         printf("Berkeley DB version mismatch\n"
17568                                 "\texpected: %s\n\tgot: %s\n",
17569                                 DB_VERSION_STRING, version);
17570                         return 1;
17571                 }
17572         }
17573 #endif
17574
17575 #if DB_VERSION_MAJOR > 2
17576         db_env_create( NULL, 0 );
17577 #elif DB_VERSION_MAJOR > 1
17578         db_appexit( NULL );
17579 #else
17580         (void) dbopen( NULL, 0, 0, 0, NULL);
17581 #endif
17582
17583 ; return 0; }
17584 EOF
17585 if { (eval echo configure:17586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17586   rm -rf conftest*
17587   ol_cv_db_db_4_1=yes
17588 else
17589   echo "configure: failed program was:" >&5
17590   cat conftest.$ac_ext >&5
17591   rm -rf conftest*
17592   ol_cv_db_db_4_1=no
17593 fi
17594 rm -f conftest*
17595
17596         LIBS="$ol_LIBS"
17597
17598 fi
17599
17600 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17601
17602         if test $ol_cv_db_db_4_1 = yes ; then
17603                 ol_cv_lib_db=-ldb-4-1
17604         fi
17605 fi
17606
17607 if test $ol_cv_lib_db = no ; then
17608         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17609 echo "configure:17610: checking for Berkeley DB link (-ldb3)" >&5
17610 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17611   echo $ac_n "(cached) $ac_c" 1>&6
17612 else
17613   
17614         ol_DB_LIB=-ldb3
17615         ol_LIBS=$LIBS
17616         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17617
17618         cat > conftest.$ac_ext <<EOF
17619 #line 17620 "configure"
17620 #include "confdefs.h"
17621
17622 #ifdef HAVE_DB_185_H
17623 # include <db_185.h>
17624 #else
17625 # include <db.h>
17626 #endif
17627
17628 #ifndef DB_VERSION_MAJOR
17629 # define DB_VERSION_MAJOR 1
17630 #endif
17631
17632 #ifndef NULL
17633 #define NULL ((void*)0)
17634 #endif
17635
17636 int main() {
17637
17638 #if DB_VERSION_MAJOR > 1
17639         {
17640                 char *version;
17641                 int major, minor, patch;
17642
17643                 version = db_version( &major, &minor, &patch );
17644
17645                 if( major != DB_VERSION_MAJOR ||
17646                         minor < DB_VERSION_MINOR )
17647                 {
17648                         printf("Berkeley DB version mismatch\n"
17649                                 "\texpected: %s\n\tgot: %s\n",
17650                                 DB_VERSION_STRING, version);
17651                         return 1;
17652                 }
17653         }
17654 #endif
17655
17656 #if DB_VERSION_MAJOR > 2
17657         db_env_create( NULL, 0 );
17658 #elif DB_VERSION_MAJOR > 1
17659         db_appexit( NULL );
17660 #else
17661         (void) dbopen( NULL, 0, 0, 0, NULL);
17662 #endif
17663
17664 ; return 0; }
17665 EOF
17666 if { (eval echo configure:17667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17667   rm -rf conftest*
17668   ol_cv_db_db3=yes
17669 else
17670   echo "configure: failed program was:" >&5
17671   cat conftest.$ac_ext >&5
17672   rm -rf conftest*
17673   ol_cv_db_db3=no
17674 fi
17675 rm -f conftest*
17676
17677         LIBS="$ol_LIBS"
17678
17679 fi
17680
17681 echo "$ac_t""$ol_cv_db_db3" 1>&6
17682
17683         if test $ol_cv_db_db3 = yes ; then
17684                 ol_cv_lib_db=-ldb3
17685         fi
17686 fi
17687
17688 if test $ol_cv_lib_db = no ; then
17689         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17690 echo "configure:17691: checking for Berkeley DB link (-ldb-3)" >&5
17691 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17692   echo $ac_n "(cached) $ac_c" 1>&6
17693 else
17694   
17695         ol_DB_LIB=-ldb-3
17696         ol_LIBS=$LIBS
17697         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17698
17699         cat > conftest.$ac_ext <<EOF
17700 #line 17701 "configure"
17701 #include "confdefs.h"
17702
17703 #ifdef HAVE_DB_185_H
17704 # include <db_185.h>
17705 #else
17706 # include <db.h>
17707 #endif
17708
17709 #ifndef DB_VERSION_MAJOR
17710 # define DB_VERSION_MAJOR 1
17711 #endif
17712
17713 #ifndef NULL
17714 #define NULL ((void*)0)
17715 #endif
17716
17717 int main() {
17718
17719 #if DB_VERSION_MAJOR > 1
17720         {
17721                 char *version;
17722                 int major, minor, patch;
17723
17724                 version = db_version( &major, &minor, &patch );
17725
17726                 if( major != DB_VERSION_MAJOR ||
17727                         minor < DB_VERSION_MINOR )
17728                 {
17729                         printf("Berkeley DB version mismatch\n"
17730                                 "\texpected: %s\n\tgot: %s\n",
17731                                 DB_VERSION_STRING, version);
17732                         return 1;
17733                 }
17734         }
17735 #endif
17736
17737 #if DB_VERSION_MAJOR > 2
17738         db_env_create( NULL, 0 );
17739 #elif DB_VERSION_MAJOR > 1
17740         db_appexit( NULL );
17741 #else
17742         (void) dbopen( NULL, 0, 0, 0, NULL);
17743 #endif
17744
17745 ; return 0; }
17746 EOF
17747 if { (eval echo configure:17748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17748   rm -rf conftest*
17749   ol_cv_db_db_3=yes
17750 else
17751   echo "configure: failed program was:" >&5
17752   cat conftest.$ac_ext >&5
17753   rm -rf conftest*
17754   ol_cv_db_db_3=no
17755 fi
17756 rm -f conftest*
17757
17758         LIBS="$ol_LIBS"
17759
17760 fi
17761
17762 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17763
17764         if test $ol_cv_db_db_3 = yes ; then
17765                 ol_cv_lib_db=-ldb-3
17766         fi
17767 fi
17768
17769 if test $ol_cv_lib_db = no ; then
17770         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17771 echo "configure:17772: checking for Berkeley DB link (-ldb2)" >&5
17772 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17773   echo $ac_n "(cached) $ac_c" 1>&6
17774 else
17775   
17776         ol_DB_LIB=-ldb2
17777         ol_LIBS=$LIBS
17778         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17779
17780         cat > conftest.$ac_ext <<EOF
17781 #line 17782 "configure"
17782 #include "confdefs.h"
17783
17784 #ifdef HAVE_DB_185_H
17785 # include <db_185.h>
17786 #else
17787 # include <db.h>
17788 #endif
17789
17790 #ifndef DB_VERSION_MAJOR
17791 # define DB_VERSION_MAJOR 1
17792 #endif
17793
17794 #ifndef NULL
17795 #define NULL ((void*)0)
17796 #endif
17797
17798 int main() {
17799
17800 #if DB_VERSION_MAJOR > 1
17801         {
17802                 char *version;
17803                 int major, minor, patch;
17804
17805                 version = db_version( &major, &minor, &patch );
17806
17807                 if( major != DB_VERSION_MAJOR ||
17808                         minor < DB_VERSION_MINOR )
17809                 {
17810                         printf("Berkeley DB version mismatch\n"
17811                                 "\texpected: %s\n\tgot: %s\n",
17812                                 DB_VERSION_STRING, version);
17813                         return 1;
17814                 }
17815         }
17816 #endif
17817
17818 #if DB_VERSION_MAJOR > 2
17819         db_env_create( NULL, 0 );
17820 #elif DB_VERSION_MAJOR > 1
17821         db_appexit( NULL );
17822 #else
17823         (void) dbopen( NULL, 0, 0, 0, NULL);
17824 #endif
17825
17826 ; return 0; }
17827 EOF
17828 if { (eval echo configure:17829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17829   rm -rf conftest*
17830   ol_cv_db_db2=yes
17831 else
17832   echo "configure: failed program was:" >&5
17833   cat conftest.$ac_ext >&5
17834   rm -rf conftest*
17835   ol_cv_db_db2=no
17836 fi
17837 rm -f conftest*
17838
17839         LIBS="$ol_LIBS"
17840
17841 fi
17842
17843 echo "$ac_t""$ol_cv_db_db2" 1>&6
17844
17845         if test $ol_cv_db_db2 = yes ; then
17846                 ol_cv_lib_db=-ldb2
17847         fi
17848 fi
17849
17850 if test $ol_cv_lib_db = no ; then
17851         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17852 echo "configure:17853: checking for Berkeley DB link (-ldb-2)" >&5
17853 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17854   echo $ac_n "(cached) $ac_c" 1>&6
17855 else
17856   
17857         ol_DB_LIB=-ldb-2
17858         ol_LIBS=$LIBS
17859         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17860
17861         cat > conftest.$ac_ext <<EOF
17862 #line 17863 "configure"
17863 #include "confdefs.h"
17864
17865 #ifdef HAVE_DB_185_H
17866 # include <db_185.h>
17867 #else
17868 # include <db.h>
17869 #endif
17870
17871 #ifndef DB_VERSION_MAJOR
17872 # define DB_VERSION_MAJOR 1
17873 #endif
17874
17875 #ifndef NULL
17876 #define NULL ((void*)0)
17877 #endif
17878
17879 int main() {
17880
17881 #if DB_VERSION_MAJOR > 1
17882         {
17883                 char *version;
17884                 int major, minor, patch;
17885
17886                 version = db_version( &major, &minor, &patch );
17887
17888                 if( major != DB_VERSION_MAJOR ||
17889                         minor < DB_VERSION_MINOR )
17890                 {
17891                         printf("Berkeley DB version mismatch\n"
17892                                 "\texpected: %s\n\tgot: %s\n",
17893                                 DB_VERSION_STRING, version);
17894                         return 1;
17895                 }
17896         }
17897 #endif
17898
17899 #if DB_VERSION_MAJOR > 2
17900         db_env_create( NULL, 0 );
17901 #elif DB_VERSION_MAJOR > 1
17902         db_appexit( NULL );
17903 #else
17904         (void) dbopen( NULL, 0, 0, 0, NULL);
17905 #endif
17906
17907 ; return 0; }
17908 EOF
17909 if { (eval echo configure:17910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17910   rm -rf conftest*
17911   ol_cv_db_db_2=yes
17912 else
17913   echo "configure: failed program was:" >&5
17914   cat conftest.$ac_ext >&5
17915   rm -rf conftest*
17916   ol_cv_db_db_2=no
17917 fi
17918 rm -f conftest*
17919
17920         LIBS="$ol_LIBS"
17921
17922 fi
17923
17924 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17925
17926         if test $ol_cv_db_db_2 = yes ; then
17927                 ol_cv_lib_db=-ldb-2
17928         fi
17929 fi
17930
17931 if test $ol_cv_lib_db = no ; then
17932         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17933 echo "configure:17934: checking for Berkeley DB link (-ldb1)" >&5
17934 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17935   echo $ac_n "(cached) $ac_c" 1>&6
17936 else
17937   
17938         ol_DB_LIB=-ldb1
17939         ol_LIBS=$LIBS
17940         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17941
17942         cat > conftest.$ac_ext <<EOF
17943 #line 17944 "configure"
17944 #include "confdefs.h"
17945
17946 #ifdef HAVE_DB_185_H
17947 # include <db_185.h>
17948 #else
17949 # include <db.h>
17950 #endif
17951
17952 #ifndef DB_VERSION_MAJOR
17953 # define DB_VERSION_MAJOR 1
17954 #endif
17955
17956 #ifndef NULL
17957 #define NULL ((void*)0)
17958 #endif
17959
17960 int main() {
17961
17962 #if DB_VERSION_MAJOR > 1
17963         {
17964                 char *version;
17965                 int major, minor, patch;
17966
17967                 version = db_version( &major, &minor, &patch );
17968
17969                 if( major != DB_VERSION_MAJOR ||
17970                         minor < DB_VERSION_MINOR )
17971                 {
17972                         printf("Berkeley DB version mismatch\n"
17973                                 "\texpected: %s\n\tgot: %s\n",
17974                                 DB_VERSION_STRING, version);
17975                         return 1;
17976                 }
17977         }
17978 #endif
17979
17980 #if DB_VERSION_MAJOR > 2
17981         db_env_create( NULL, 0 );
17982 #elif DB_VERSION_MAJOR > 1
17983         db_appexit( NULL );
17984 #else
17985         (void) dbopen( NULL, 0, 0, 0, NULL);
17986 #endif
17987
17988 ; return 0; }
17989 EOF
17990 if { (eval echo configure:17991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17991   rm -rf conftest*
17992   ol_cv_db_db1=yes
17993 else
17994   echo "configure: failed program was:" >&5
17995   cat conftest.$ac_ext >&5
17996   rm -rf conftest*
17997   ol_cv_db_db1=no
17998 fi
17999 rm -f conftest*
18000
18001         LIBS="$ol_LIBS"
18002
18003 fi
18004
18005 echo "$ac_t""$ol_cv_db_db1" 1>&6
18006
18007         if test $ol_cv_db_db1 = yes ; then
18008                 ol_cv_lib_db=-ldb1
18009         fi
18010 fi
18011
18012 if test $ol_cv_lib_db = no ; then
18013         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18014 echo "configure:18015: checking for Berkeley DB link (-ldb-1)" >&5
18015 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18016   echo $ac_n "(cached) $ac_c" 1>&6
18017 else
18018   
18019         ol_DB_LIB=-ldb-1
18020         ol_LIBS=$LIBS
18021         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18022
18023         cat > conftest.$ac_ext <<EOF
18024 #line 18025 "configure"
18025 #include "confdefs.h"
18026
18027 #ifdef HAVE_DB_185_H
18028 # include <db_185.h>
18029 #else
18030 # include <db.h>
18031 #endif
18032
18033 #ifndef DB_VERSION_MAJOR
18034 # define DB_VERSION_MAJOR 1
18035 #endif
18036
18037 #ifndef NULL
18038 #define NULL ((void*)0)
18039 #endif
18040
18041 int main() {
18042
18043 #if DB_VERSION_MAJOR > 1
18044         {
18045                 char *version;
18046                 int major, minor, patch;
18047
18048                 version = db_version( &major, &minor, &patch );
18049
18050                 if( major != DB_VERSION_MAJOR ||
18051                         minor < DB_VERSION_MINOR )
18052                 {
18053                         printf("Berkeley DB version mismatch\n"
18054                                 "\texpected: %s\n\tgot: %s\n",
18055                                 DB_VERSION_STRING, version);
18056                         return 1;
18057                 }
18058         }
18059 #endif
18060
18061 #if DB_VERSION_MAJOR > 2
18062         db_env_create( NULL, 0 );
18063 #elif DB_VERSION_MAJOR > 1
18064         db_appexit( NULL );
18065 #else
18066         (void) dbopen( NULL, 0, 0, 0, NULL);
18067 #endif
18068
18069 ; return 0; }
18070 EOF
18071 if { (eval echo configure:18072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18072   rm -rf conftest*
18073   ol_cv_db_db_1=yes
18074 else
18075   echo "configure: failed program was:" >&5
18076   cat conftest.$ac_ext >&5
18077   rm -rf conftest*
18078   ol_cv_db_db_1=no
18079 fi
18080 rm -f conftest*
18081
18082         LIBS="$ol_LIBS"
18083
18084 fi
18085
18086 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18087
18088         if test $ol_cv_db_db_1 = yes ; then
18089                 ol_cv_lib_db=-ldb-1
18090         fi
18091 fi
18092
18093
18094                 if test "$ol_cv_lib_db" != no ; then
18095                         ol_cv_berkeley_db=yes
18096                 fi
18097         fi
18098 fi
18099
18100         else
18101                 ol_cv_berkeley_db=no
18102 for ac_hdr in db.h
18103 do
18104 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18105 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18106 echo "configure:18107: checking for $ac_hdr" >&5
18107 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18108   echo $ac_n "(cached) $ac_c" 1>&6
18109 else
18110   cat > conftest.$ac_ext <<EOF
18111 #line 18112 "configure"
18112 #include "confdefs.h"
18113 #include <$ac_hdr>
18114 EOF
18115 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18116 { (eval echo configure:18117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18117 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18118 if test -z "$ac_err"; then
18119   rm -rf conftest*
18120   eval "ac_cv_header_$ac_safe=yes"
18121 else
18122   echo "$ac_err" >&5
18123   echo "configure: failed program was:" >&5
18124   cat conftest.$ac_ext >&5
18125   rm -rf conftest*
18126   eval "ac_cv_header_$ac_safe=no"
18127 fi
18128 rm -f conftest*
18129 fi
18130 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18131   echo "$ac_t""yes" 1>&6
18132     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18133   cat >> confdefs.h <<EOF
18134 #define $ac_tr_hdr 1
18135 EOF
18136  
18137 else
18138   echo "$ac_t""no" 1>&6
18139 fi
18140 done
18141
18142 if test $ac_cv_header_db_h = yes; then
18143         ol_cv_lib_db=no
18144 if test $ol_cv_lib_db = no ; then
18145         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18146 echo "configure:18147: checking for Berkeley DB link (default)" >&5
18147 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18148   echo $ac_n "(cached) $ac_c" 1>&6
18149 else
18150   
18151         ol_DB_LIB=
18152         ol_LIBS=$LIBS
18153         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18154
18155         cat > conftest.$ac_ext <<EOF
18156 #line 18157 "configure"
18157 #include "confdefs.h"
18158
18159 #ifdef HAVE_DB_185_H
18160 # include <db_185.h>
18161 #else
18162 # include <db.h>
18163 #endif
18164
18165 #ifndef DB_VERSION_MAJOR
18166 # define DB_VERSION_MAJOR 1
18167 #endif
18168
18169 #ifndef NULL
18170 #define NULL ((void*)0)
18171 #endif
18172
18173 int main() {
18174
18175 #if DB_VERSION_MAJOR > 1
18176         {
18177                 char *version;
18178                 int major, minor, patch;
18179
18180                 version = db_version( &major, &minor, &patch );
18181
18182                 if( major != DB_VERSION_MAJOR ||
18183                         minor < DB_VERSION_MINOR )
18184                 {
18185                         printf("Berkeley DB version mismatch\n"
18186                                 "\texpected: %s\n\tgot: %s\n",
18187                                 DB_VERSION_STRING, version);
18188                         return 1;
18189                 }
18190         }
18191 #endif
18192
18193 #if DB_VERSION_MAJOR > 2
18194         db_env_create( NULL, 0 );
18195 #elif DB_VERSION_MAJOR > 1
18196         db_appexit( NULL );
18197 #else
18198         (void) dbopen( NULL, 0, 0, 0, NULL);
18199 #endif
18200
18201 ; return 0; }
18202 EOF
18203 if { (eval echo configure:18204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18204   rm -rf conftest*
18205   ol_cv_db_none=yes
18206 else
18207   echo "configure: failed program was:" >&5
18208   cat conftest.$ac_ext >&5
18209   rm -rf conftest*
18210   ol_cv_db_none=no
18211 fi
18212 rm -f conftest*
18213
18214         LIBS="$ol_LIBS"
18215
18216 fi
18217
18218 echo "$ac_t""$ol_cv_db_none" 1>&6
18219
18220         if test $ol_cv_db_none = yes ; then
18221                 ol_cv_lib_db=yes
18222         fi
18223 fi
18224
18225 if test $ol_cv_lib_db = no ; then
18226         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18227 echo "configure:18228: checking for Berkeley DB link (-ldb42)" >&5
18228 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18229   echo $ac_n "(cached) $ac_c" 1>&6
18230 else
18231   
18232         ol_DB_LIB=-ldb42
18233         ol_LIBS=$LIBS
18234         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18235
18236         cat > conftest.$ac_ext <<EOF
18237 #line 18238 "configure"
18238 #include "confdefs.h"
18239
18240 #ifdef HAVE_DB_185_H
18241 # include <db_185.h>
18242 #else
18243 # include <db.h>
18244 #endif
18245
18246 #ifndef DB_VERSION_MAJOR
18247 # define DB_VERSION_MAJOR 1
18248 #endif
18249
18250 #ifndef NULL
18251 #define NULL ((void*)0)
18252 #endif
18253
18254 int main() {
18255
18256 #if DB_VERSION_MAJOR > 1
18257         {
18258                 char *version;
18259                 int major, minor, patch;
18260
18261                 version = db_version( &major, &minor, &patch );
18262
18263                 if( major != DB_VERSION_MAJOR ||
18264                         minor < DB_VERSION_MINOR )
18265                 {
18266                         printf("Berkeley DB version mismatch\n"
18267                                 "\texpected: %s\n\tgot: %s\n",
18268                                 DB_VERSION_STRING, version);
18269                         return 1;
18270                 }
18271         }
18272 #endif
18273
18274 #if DB_VERSION_MAJOR > 2
18275         db_env_create( NULL, 0 );
18276 #elif DB_VERSION_MAJOR > 1
18277         db_appexit( NULL );
18278 #else
18279         (void) dbopen( NULL, 0, 0, 0, NULL);
18280 #endif
18281
18282 ; return 0; }
18283 EOF
18284 if { (eval echo configure:18285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18285   rm -rf conftest*
18286   ol_cv_db_db42=yes
18287 else
18288   echo "configure: failed program was:" >&5
18289   cat conftest.$ac_ext >&5
18290   rm -rf conftest*
18291   ol_cv_db_db42=no
18292 fi
18293 rm -f conftest*
18294
18295         LIBS="$ol_LIBS"
18296
18297 fi
18298
18299 echo "$ac_t""$ol_cv_db_db42" 1>&6
18300
18301         if test $ol_cv_db_db42 = yes ; then
18302                 ol_cv_lib_db=-ldb42
18303         fi
18304 fi
18305
18306 if test $ol_cv_lib_db = no ; then
18307         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18308 echo "configure:18309: checking for Berkeley DB link (-ldb-42)" >&5
18309 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18310   echo $ac_n "(cached) $ac_c" 1>&6
18311 else
18312   
18313         ol_DB_LIB=-ldb-42
18314         ol_LIBS=$LIBS
18315         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18316
18317         cat > conftest.$ac_ext <<EOF
18318 #line 18319 "configure"
18319 #include "confdefs.h"
18320
18321 #ifdef HAVE_DB_185_H
18322 # include <db_185.h>
18323 #else
18324 # include <db.h>
18325 #endif
18326
18327 #ifndef DB_VERSION_MAJOR
18328 # define DB_VERSION_MAJOR 1
18329 #endif
18330
18331 #ifndef NULL
18332 #define NULL ((void*)0)
18333 #endif
18334
18335 int main() {
18336
18337 #if DB_VERSION_MAJOR > 1
18338         {
18339                 char *version;
18340                 int major, minor, patch;
18341
18342                 version = db_version( &major, &minor, &patch );
18343
18344                 if( major != DB_VERSION_MAJOR ||
18345                         minor < DB_VERSION_MINOR )
18346                 {
18347                         printf("Berkeley DB version mismatch\n"
18348                                 "\texpected: %s\n\tgot: %s\n",
18349                                 DB_VERSION_STRING, version);
18350                         return 1;
18351                 }
18352         }
18353 #endif
18354
18355 #if DB_VERSION_MAJOR > 2
18356         db_env_create( NULL, 0 );
18357 #elif DB_VERSION_MAJOR > 1
18358         db_appexit( NULL );
18359 #else
18360         (void) dbopen( NULL, 0, 0, 0, NULL);
18361 #endif
18362
18363 ; return 0; }
18364 EOF
18365 if { (eval echo configure:18366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18366   rm -rf conftest*
18367   ol_cv_db_db_42=yes
18368 else
18369   echo "configure: failed program was:" >&5
18370   cat conftest.$ac_ext >&5
18371   rm -rf conftest*
18372   ol_cv_db_db_42=no
18373 fi
18374 rm -f conftest*
18375
18376         LIBS="$ol_LIBS"
18377
18378 fi
18379
18380 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18381
18382         if test $ol_cv_db_db_42 = yes ; then
18383                 ol_cv_lib_db=-ldb-42
18384         fi
18385 fi
18386
18387 if test $ol_cv_lib_db = no ; then
18388         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18389 echo "configure:18390: checking for Berkeley DB link (-ldb-4.2)" >&5
18390 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18391   echo $ac_n "(cached) $ac_c" 1>&6
18392 else
18393   
18394         ol_DB_LIB=-ldb-4.2
18395         ol_LIBS=$LIBS
18396         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18397
18398         cat > conftest.$ac_ext <<EOF
18399 #line 18400 "configure"
18400 #include "confdefs.h"
18401
18402 #ifdef HAVE_DB_185_H
18403 # include <db_185.h>
18404 #else
18405 # include <db.h>
18406 #endif
18407
18408 #ifndef DB_VERSION_MAJOR
18409 # define DB_VERSION_MAJOR 1
18410 #endif
18411
18412 #ifndef NULL
18413 #define NULL ((void*)0)
18414 #endif
18415
18416 int main() {
18417
18418 #if DB_VERSION_MAJOR > 1
18419         {
18420                 char *version;
18421                 int major, minor, patch;
18422
18423                 version = db_version( &major, &minor, &patch );
18424
18425                 if( major != DB_VERSION_MAJOR ||
18426                         minor < DB_VERSION_MINOR )
18427                 {
18428                         printf("Berkeley DB version mismatch\n"
18429                                 "\texpected: %s\n\tgot: %s\n",
18430                                 DB_VERSION_STRING, version);
18431                         return 1;
18432                 }
18433         }
18434 #endif
18435
18436 #if DB_VERSION_MAJOR > 2
18437         db_env_create( NULL, 0 );
18438 #elif DB_VERSION_MAJOR > 1
18439         db_appexit( NULL );
18440 #else
18441         (void) dbopen( NULL, 0, 0, 0, NULL);
18442 #endif
18443
18444 ; return 0; }
18445 EOF
18446 if { (eval echo configure:18447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18447   rm -rf conftest*
18448   ol_cv_db_db_4_dot_2=yes
18449 else
18450   echo "configure: failed program was:" >&5
18451   cat conftest.$ac_ext >&5
18452   rm -rf conftest*
18453   ol_cv_db_db_4_dot_2=no
18454 fi
18455 rm -f conftest*
18456
18457         LIBS="$ol_LIBS"
18458
18459 fi
18460
18461 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18462
18463         if test $ol_cv_db_db_4_dot_2 = yes ; then
18464                 ol_cv_lib_db=-ldb-4.2
18465         fi
18466 fi
18467
18468 if test $ol_cv_lib_db = no ; then
18469         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18470 echo "configure:18471: checking for Berkeley DB link (-ldb-4-2)" >&5
18471 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18472   echo $ac_n "(cached) $ac_c" 1>&6
18473 else
18474   
18475         ol_DB_LIB=-ldb-4-2
18476         ol_LIBS=$LIBS
18477         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18478
18479         cat > conftest.$ac_ext <<EOF
18480 #line 18481 "configure"
18481 #include "confdefs.h"
18482
18483 #ifdef HAVE_DB_185_H
18484 # include <db_185.h>
18485 #else
18486 # include <db.h>
18487 #endif
18488
18489 #ifndef DB_VERSION_MAJOR
18490 # define DB_VERSION_MAJOR 1
18491 #endif
18492
18493 #ifndef NULL
18494 #define NULL ((void*)0)
18495 #endif
18496
18497 int main() {
18498
18499 #if DB_VERSION_MAJOR > 1
18500         {
18501                 char *version;
18502                 int major, minor, patch;
18503
18504                 version = db_version( &major, &minor, &patch );
18505
18506                 if( major != DB_VERSION_MAJOR ||
18507                         minor < DB_VERSION_MINOR )
18508                 {
18509                         printf("Berkeley DB version mismatch\n"
18510                                 "\texpected: %s\n\tgot: %s\n",
18511                                 DB_VERSION_STRING, version);
18512                         return 1;
18513                 }
18514         }
18515 #endif
18516
18517 #if DB_VERSION_MAJOR > 2
18518         db_env_create( NULL, 0 );
18519 #elif DB_VERSION_MAJOR > 1
18520         db_appexit( NULL );
18521 #else
18522         (void) dbopen( NULL, 0, 0, 0, NULL);
18523 #endif
18524
18525 ; return 0; }
18526 EOF
18527 if { (eval echo configure:18528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18528   rm -rf conftest*
18529   ol_cv_db_db_4_2=yes
18530 else
18531   echo "configure: failed program was:" >&5
18532   cat conftest.$ac_ext >&5
18533   rm -rf conftest*
18534   ol_cv_db_db_4_2=no
18535 fi
18536 rm -f conftest*
18537
18538         LIBS="$ol_LIBS"
18539
18540 fi
18541
18542 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18543
18544         if test $ol_cv_db_db_4_2 = yes ; then
18545                 ol_cv_lib_db=-ldb-4-2
18546         fi
18547 fi
18548
18549 if test $ol_cv_lib_db = no ; then
18550         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18551 echo "configure:18552: checking for Berkeley DB link (-ldb-4)" >&5
18552 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18553   echo $ac_n "(cached) $ac_c" 1>&6
18554 else
18555   
18556         ol_DB_LIB=-ldb-4
18557         ol_LIBS=$LIBS
18558         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18559
18560         cat > conftest.$ac_ext <<EOF
18561 #line 18562 "configure"
18562 #include "confdefs.h"
18563
18564 #ifdef HAVE_DB_185_H
18565 # include <db_185.h>
18566 #else
18567 # include <db.h>
18568 #endif
18569
18570 #ifndef DB_VERSION_MAJOR
18571 # define DB_VERSION_MAJOR 1
18572 #endif
18573
18574 #ifndef NULL
18575 #define NULL ((void*)0)
18576 #endif
18577
18578 int main() {
18579
18580 #if DB_VERSION_MAJOR > 1
18581         {
18582                 char *version;
18583                 int major, minor, patch;
18584
18585                 version = db_version( &major, &minor, &patch );
18586
18587                 if( major != DB_VERSION_MAJOR ||
18588                         minor < DB_VERSION_MINOR )
18589                 {
18590                         printf("Berkeley DB version mismatch\n"
18591                                 "\texpected: %s\n\tgot: %s\n",
18592                                 DB_VERSION_STRING, version);
18593                         return 1;
18594                 }
18595         }
18596 #endif
18597
18598 #if DB_VERSION_MAJOR > 2
18599         db_env_create( NULL, 0 );
18600 #elif DB_VERSION_MAJOR > 1
18601         db_appexit( NULL );
18602 #else
18603         (void) dbopen( NULL, 0, 0, 0, NULL);
18604 #endif
18605
18606 ; return 0; }
18607 EOF
18608 if { (eval echo configure:18609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18609   rm -rf conftest*
18610   ol_cv_db_db_4=yes
18611 else
18612   echo "configure: failed program was:" >&5
18613   cat conftest.$ac_ext >&5
18614   rm -rf conftest*
18615   ol_cv_db_db_4=no
18616 fi
18617 rm -f conftest*
18618
18619         LIBS="$ol_LIBS"
18620
18621 fi
18622
18623 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18624
18625         if test $ol_cv_db_db_4 = yes ; then
18626                 ol_cv_lib_db=-ldb-4
18627         fi
18628 fi
18629
18630 if test $ol_cv_lib_db = no ; then
18631         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18632 echo "configure:18633: checking for Berkeley DB link (-ldb4)" >&5
18633 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18634   echo $ac_n "(cached) $ac_c" 1>&6
18635 else
18636   
18637         ol_DB_LIB=-ldb4
18638         ol_LIBS=$LIBS
18639         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18640
18641         cat > conftest.$ac_ext <<EOF
18642 #line 18643 "configure"
18643 #include "confdefs.h"
18644
18645 #ifdef HAVE_DB_185_H
18646 # include <db_185.h>
18647 #else
18648 # include <db.h>
18649 #endif
18650
18651 #ifndef DB_VERSION_MAJOR
18652 # define DB_VERSION_MAJOR 1
18653 #endif
18654
18655 #ifndef NULL
18656 #define NULL ((void*)0)
18657 #endif
18658
18659 int main() {
18660
18661 #if DB_VERSION_MAJOR > 1
18662         {
18663                 char *version;
18664                 int major, minor, patch;
18665
18666                 version = db_version( &major, &minor, &patch );
18667
18668                 if( major != DB_VERSION_MAJOR ||
18669                         minor < DB_VERSION_MINOR )
18670                 {
18671                         printf("Berkeley DB version mismatch\n"
18672                                 "\texpected: %s\n\tgot: %s\n",
18673                                 DB_VERSION_STRING, version);
18674                         return 1;
18675                 }
18676         }
18677 #endif
18678
18679 #if DB_VERSION_MAJOR > 2
18680         db_env_create( NULL, 0 );
18681 #elif DB_VERSION_MAJOR > 1
18682         db_appexit( NULL );
18683 #else
18684         (void) dbopen( NULL, 0, 0, 0, NULL);
18685 #endif
18686
18687 ; return 0; }
18688 EOF
18689 if { (eval echo configure:18690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18690   rm -rf conftest*
18691   ol_cv_db_db4=yes
18692 else
18693   echo "configure: failed program was:" >&5
18694   cat conftest.$ac_ext >&5
18695   rm -rf conftest*
18696   ol_cv_db_db4=no
18697 fi
18698 rm -f conftest*
18699
18700         LIBS="$ol_LIBS"
18701
18702 fi
18703
18704 echo "$ac_t""$ol_cv_db_db4" 1>&6
18705
18706         if test $ol_cv_db_db4 = yes ; then
18707                 ol_cv_lib_db=-ldb4
18708         fi
18709 fi
18710
18711 if test $ol_cv_lib_db = no ; then
18712         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18713 echo "configure:18714: checking for Berkeley DB link (-ldb)" >&5
18714 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18715   echo $ac_n "(cached) $ac_c" 1>&6
18716 else
18717   
18718         ol_DB_LIB=-ldb
18719         ol_LIBS=$LIBS
18720         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18721
18722         cat > conftest.$ac_ext <<EOF
18723 #line 18724 "configure"
18724 #include "confdefs.h"
18725
18726 #ifdef HAVE_DB_185_H
18727 # include <db_185.h>
18728 #else
18729 # include <db.h>
18730 #endif
18731
18732 #ifndef DB_VERSION_MAJOR
18733 # define DB_VERSION_MAJOR 1
18734 #endif
18735
18736 #ifndef NULL
18737 #define NULL ((void*)0)
18738 #endif
18739
18740 int main() {
18741
18742 #if DB_VERSION_MAJOR > 1
18743         {
18744                 char *version;
18745                 int major, minor, patch;
18746
18747                 version = db_version( &major, &minor, &patch );
18748
18749                 if( major != DB_VERSION_MAJOR ||
18750                         minor < DB_VERSION_MINOR )
18751                 {
18752                         printf("Berkeley DB version mismatch\n"
18753                                 "\texpected: %s\n\tgot: %s\n",
18754                                 DB_VERSION_STRING, version);
18755                         return 1;
18756                 }
18757         }
18758 #endif
18759
18760 #if DB_VERSION_MAJOR > 2
18761         db_env_create( NULL, 0 );
18762 #elif DB_VERSION_MAJOR > 1
18763         db_appexit( NULL );
18764 #else
18765         (void) dbopen( NULL, 0, 0, 0, NULL);
18766 #endif
18767
18768 ; return 0; }
18769 EOF
18770 if { (eval echo configure:18771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18771   rm -rf conftest*
18772   ol_cv_db_db=yes
18773 else
18774   echo "configure: failed program was:" >&5
18775   cat conftest.$ac_ext >&5
18776   rm -rf conftest*
18777   ol_cv_db_db=no
18778 fi
18779 rm -f conftest*
18780
18781         LIBS="$ol_LIBS"
18782
18783 fi
18784
18785 echo "$ac_t""$ol_cv_db_db" 1>&6
18786
18787         if test $ol_cv_db_db = yes ; then
18788                 ol_cv_lib_db=-ldb
18789         fi
18790 fi
18791
18792 if test $ol_cv_lib_db = no ; then
18793         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18794 echo "configure:18795: checking for Berkeley DB link (-ldb41)" >&5
18795 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18796   echo $ac_n "(cached) $ac_c" 1>&6
18797 else
18798   
18799         ol_DB_LIB=-ldb41
18800         ol_LIBS=$LIBS
18801         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18802
18803         cat > conftest.$ac_ext <<EOF
18804 #line 18805 "configure"
18805 #include "confdefs.h"
18806
18807 #ifdef HAVE_DB_185_H
18808 # include <db_185.h>
18809 #else
18810 # include <db.h>
18811 #endif
18812
18813 #ifndef DB_VERSION_MAJOR
18814 # define DB_VERSION_MAJOR 1
18815 #endif
18816
18817 #ifndef NULL
18818 #define NULL ((void*)0)
18819 #endif
18820
18821 int main() {
18822
18823 #if DB_VERSION_MAJOR > 1
18824         {
18825                 char *version;
18826                 int major, minor, patch;
18827
18828                 version = db_version( &major, &minor, &patch );
18829
18830                 if( major != DB_VERSION_MAJOR ||
18831                         minor < DB_VERSION_MINOR )
18832                 {
18833                         printf("Berkeley DB version mismatch\n"
18834                                 "\texpected: %s\n\tgot: %s\n",
18835                                 DB_VERSION_STRING, version);
18836                         return 1;
18837                 }
18838         }
18839 #endif
18840
18841 #if DB_VERSION_MAJOR > 2
18842         db_env_create( NULL, 0 );
18843 #elif DB_VERSION_MAJOR > 1
18844         db_appexit( NULL );
18845 #else
18846         (void) dbopen( NULL, 0, 0, 0, NULL);
18847 #endif
18848
18849 ; return 0; }
18850 EOF
18851 if { (eval echo configure:18852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18852   rm -rf conftest*
18853   ol_cv_db_db41=yes
18854 else
18855   echo "configure: failed program was:" >&5
18856   cat conftest.$ac_ext >&5
18857   rm -rf conftest*
18858   ol_cv_db_db41=no
18859 fi
18860 rm -f conftest*
18861
18862         LIBS="$ol_LIBS"
18863
18864 fi
18865
18866 echo "$ac_t""$ol_cv_db_db41" 1>&6
18867
18868         if test $ol_cv_db_db41 = yes ; then
18869                 ol_cv_lib_db=-ldb41
18870         fi
18871 fi
18872
18873 if test $ol_cv_lib_db = no ; then
18874         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18875 echo "configure:18876: checking for Berkeley DB link (-ldb-41)" >&5
18876 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18877   echo $ac_n "(cached) $ac_c" 1>&6
18878 else
18879   
18880         ol_DB_LIB=-ldb-41
18881         ol_LIBS=$LIBS
18882         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18883
18884         cat > conftest.$ac_ext <<EOF
18885 #line 18886 "configure"
18886 #include "confdefs.h"
18887
18888 #ifdef HAVE_DB_185_H
18889 # include <db_185.h>
18890 #else
18891 # include <db.h>
18892 #endif
18893
18894 #ifndef DB_VERSION_MAJOR
18895 # define DB_VERSION_MAJOR 1
18896 #endif
18897
18898 #ifndef NULL
18899 #define NULL ((void*)0)
18900 #endif
18901
18902 int main() {
18903
18904 #if DB_VERSION_MAJOR > 1
18905         {
18906                 char *version;
18907                 int major, minor, patch;
18908
18909                 version = db_version( &major, &minor, &patch );
18910
18911                 if( major != DB_VERSION_MAJOR ||
18912                         minor < DB_VERSION_MINOR )
18913                 {
18914                         printf("Berkeley DB version mismatch\n"
18915                                 "\texpected: %s\n\tgot: %s\n",
18916                                 DB_VERSION_STRING, version);
18917                         return 1;
18918                 }
18919         }
18920 #endif
18921
18922 #if DB_VERSION_MAJOR > 2
18923         db_env_create( NULL, 0 );
18924 #elif DB_VERSION_MAJOR > 1
18925         db_appexit( NULL );
18926 #else
18927         (void) dbopen( NULL, 0, 0, 0, NULL);
18928 #endif
18929
18930 ; return 0; }
18931 EOF
18932 if { (eval echo configure:18933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18933   rm -rf conftest*
18934   ol_cv_db_db_41=yes
18935 else
18936   echo "configure: failed program was:" >&5
18937   cat conftest.$ac_ext >&5
18938   rm -rf conftest*
18939   ol_cv_db_db_41=no
18940 fi
18941 rm -f conftest*
18942
18943         LIBS="$ol_LIBS"
18944
18945 fi
18946
18947 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18948
18949         if test $ol_cv_db_db_41 = yes ; then
18950                 ol_cv_lib_db=-ldb-41
18951         fi
18952 fi
18953
18954 if test $ol_cv_lib_db = no ; then
18955         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18956 echo "configure:18957: checking for Berkeley DB link (-ldb-4.1)" >&5
18957 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18958   echo $ac_n "(cached) $ac_c" 1>&6
18959 else
18960   
18961         ol_DB_LIB=-ldb-4.1
18962         ol_LIBS=$LIBS
18963         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18964
18965         cat > conftest.$ac_ext <<EOF
18966 #line 18967 "configure"
18967 #include "confdefs.h"
18968
18969 #ifdef HAVE_DB_185_H
18970 # include <db_185.h>
18971 #else
18972 # include <db.h>
18973 #endif
18974
18975 #ifndef DB_VERSION_MAJOR
18976 # define DB_VERSION_MAJOR 1
18977 #endif
18978
18979 #ifndef NULL
18980 #define NULL ((void*)0)
18981 #endif
18982
18983 int main() {
18984
18985 #if DB_VERSION_MAJOR > 1
18986         {
18987                 char *version;
18988                 int major, minor, patch;
18989
18990                 version = db_version( &major, &minor, &patch );
18991
18992                 if( major != DB_VERSION_MAJOR ||
18993                         minor < DB_VERSION_MINOR )
18994                 {
18995                         printf("Berkeley DB version mismatch\n"
18996                                 "\texpected: %s\n\tgot: %s\n",
18997                                 DB_VERSION_STRING, version);
18998                         return 1;
18999                 }
19000         }
19001 #endif
19002
19003 #if DB_VERSION_MAJOR > 2
19004         db_env_create( NULL, 0 );
19005 #elif DB_VERSION_MAJOR > 1
19006         db_appexit( NULL );
19007 #else
19008         (void) dbopen( NULL, 0, 0, 0, NULL);
19009 #endif
19010
19011 ; return 0; }
19012 EOF
19013 if { (eval echo configure:19014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19014   rm -rf conftest*
19015   ol_cv_db_db_4_dot_1=yes
19016 else
19017   echo "configure: failed program was:" >&5
19018   cat conftest.$ac_ext >&5
19019   rm -rf conftest*
19020   ol_cv_db_db_4_dot_1=no
19021 fi
19022 rm -f conftest*
19023
19024         LIBS="$ol_LIBS"
19025
19026 fi
19027
19028 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19029
19030         if test $ol_cv_db_db_4_dot_1 = yes ; then
19031                 ol_cv_lib_db=-ldb-4.1
19032         fi
19033 fi
19034
19035 if test $ol_cv_lib_db = no ; then
19036         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19037 echo "configure:19038: checking for Berkeley DB link (-ldb-4-1)" >&5
19038 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19039   echo $ac_n "(cached) $ac_c" 1>&6
19040 else
19041   
19042         ol_DB_LIB=-ldb-4-1
19043         ol_LIBS=$LIBS
19044         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19045
19046         cat > conftest.$ac_ext <<EOF
19047 #line 19048 "configure"
19048 #include "confdefs.h"
19049
19050 #ifdef HAVE_DB_185_H
19051 # include <db_185.h>
19052 #else
19053 # include <db.h>
19054 #endif
19055
19056 #ifndef DB_VERSION_MAJOR
19057 # define DB_VERSION_MAJOR 1
19058 #endif
19059
19060 #ifndef NULL
19061 #define NULL ((void*)0)
19062 #endif
19063
19064 int main() {
19065
19066 #if DB_VERSION_MAJOR > 1
19067         {
19068                 char *version;
19069                 int major, minor, patch;
19070
19071                 version = db_version( &major, &minor, &patch );
19072
19073                 if( major != DB_VERSION_MAJOR ||
19074                         minor < DB_VERSION_MINOR )
19075                 {
19076                         printf("Berkeley DB version mismatch\n"
19077                                 "\texpected: %s\n\tgot: %s\n",
19078                                 DB_VERSION_STRING, version);
19079                         return 1;
19080                 }
19081         }
19082 #endif
19083
19084 #if DB_VERSION_MAJOR > 2
19085         db_env_create( NULL, 0 );
19086 #elif DB_VERSION_MAJOR > 1
19087         db_appexit( NULL );
19088 #else
19089         (void) dbopen( NULL, 0, 0, 0, NULL);
19090 #endif
19091
19092 ; return 0; }
19093 EOF
19094 if { (eval echo configure:19095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19095   rm -rf conftest*
19096   ol_cv_db_db_4_1=yes
19097 else
19098   echo "configure: failed program was:" >&5
19099   cat conftest.$ac_ext >&5
19100   rm -rf conftest*
19101   ol_cv_db_db_4_1=no
19102 fi
19103 rm -f conftest*
19104
19105         LIBS="$ol_LIBS"
19106
19107 fi
19108
19109 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19110
19111         if test $ol_cv_db_db_4_1 = yes ; then
19112                 ol_cv_lib_db=-ldb-4-1
19113         fi
19114 fi
19115
19116 if test $ol_cv_lib_db = no ; then
19117         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19118 echo "configure:19119: checking for Berkeley DB link (-ldb3)" >&5
19119 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19120   echo $ac_n "(cached) $ac_c" 1>&6
19121 else
19122   
19123         ol_DB_LIB=-ldb3
19124         ol_LIBS=$LIBS
19125         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19126
19127         cat > conftest.$ac_ext <<EOF
19128 #line 19129 "configure"
19129 #include "confdefs.h"
19130
19131 #ifdef HAVE_DB_185_H
19132 # include <db_185.h>
19133 #else
19134 # include <db.h>
19135 #endif
19136
19137 #ifndef DB_VERSION_MAJOR
19138 # define DB_VERSION_MAJOR 1
19139 #endif
19140
19141 #ifndef NULL
19142 #define NULL ((void*)0)
19143 #endif
19144
19145 int main() {
19146
19147 #if DB_VERSION_MAJOR > 1
19148         {
19149                 char *version;
19150                 int major, minor, patch;
19151
19152                 version = db_version( &major, &minor, &patch );
19153
19154                 if( major != DB_VERSION_MAJOR ||
19155                         minor < DB_VERSION_MINOR )
19156                 {
19157                         printf("Berkeley DB version mismatch\n"
19158                                 "\texpected: %s\n\tgot: %s\n",
19159                                 DB_VERSION_STRING, version);
19160                         return 1;
19161                 }
19162         }
19163 #endif
19164
19165 #if DB_VERSION_MAJOR > 2
19166         db_env_create( NULL, 0 );
19167 #elif DB_VERSION_MAJOR > 1
19168         db_appexit( NULL );
19169 #else
19170         (void) dbopen( NULL, 0, 0, 0, NULL);
19171 #endif
19172
19173 ; return 0; }
19174 EOF
19175 if { (eval echo configure:19176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19176   rm -rf conftest*
19177   ol_cv_db_db3=yes
19178 else
19179   echo "configure: failed program was:" >&5
19180   cat conftest.$ac_ext >&5
19181   rm -rf conftest*
19182   ol_cv_db_db3=no
19183 fi
19184 rm -f conftest*
19185
19186         LIBS="$ol_LIBS"
19187
19188 fi
19189
19190 echo "$ac_t""$ol_cv_db_db3" 1>&6
19191
19192         if test $ol_cv_db_db3 = yes ; then
19193                 ol_cv_lib_db=-ldb3
19194         fi
19195 fi
19196
19197 if test $ol_cv_lib_db = no ; then
19198         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19199 echo "configure:19200: checking for Berkeley DB link (-ldb-3)" >&5
19200 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19201   echo $ac_n "(cached) $ac_c" 1>&6
19202 else
19203   
19204         ol_DB_LIB=-ldb-3
19205         ol_LIBS=$LIBS
19206         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19207
19208         cat > conftest.$ac_ext <<EOF
19209 #line 19210 "configure"
19210 #include "confdefs.h"
19211
19212 #ifdef HAVE_DB_185_H
19213 # include <db_185.h>
19214 #else
19215 # include <db.h>
19216 #endif
19217
19218 #ifndef DB_VERSION_MAJOR
19219 # define DB_VERSION_MAJOR 1
19220 #endif
19221
19222 #ifndef NULL
19223 #define NULL ((void*)0)
19224 #endif
19225
19226 int main() {
19227
19228 #if DB_VERSION_MAJOR > 1
19229         {
19230                 char *version;
19231                 int major, minor, patch;
19232
19233                 version = db_version( &major, &minor, &patch );
19234
19235                 if( major != DB_VERSION_MAJOR ||
19236                         minor < DB_VERSION_MINOR )
19237                 {
19238                         printf("Berkeley DB version mismatch\n"
19239                                 "\texpected: %s\n\tgot: %s\n",
19240                                 DB_VERSION_STRING, version);
19241                         return 1;
19242                 }
19243         }
19244 #endif
19245
19246 #if DB_VERSION_MAJOR > 2
19247         db_env_create( NULL, 0 );
19248 #elif DB_VERSION_MAJOR > 1
19249         db_appexit( NULL );
19250 #else
19251         (void) dbopen( NULL, 0, 0, 0, NULL);
19252 #endif
19253
19254 ; return 0; }
19255 EOF
19256 if { (eval echo configure:19257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19257   rm -rf conftest*
19258   ol_cv_db_db_3=yes
19259 else
19260   echo "configure: failed program was:" >&5
19261   cat conftest.$ac_ext >&5
19262   rm -rf conftest*
19263   ol_cv_db_db_3=no
19264 fi
19265 rm -f conftest*
19266
19267         LIBS="$ol_LIBS"
19268
19269 fi
19270
19271 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19272
19273         if test $ol_cv_db_db_3 = yes ; then
19274                 ol_cv_lib_db=-ldb-3
19275         fi
19276 fi
19277
19278 if test $ol_cv_lib_db = no ; then
19279         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19280 echo "configure:19281: checking for Berkeley DB link (-ldb2)" >&5
19281 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19282   echo $ac_n "(cached) $ac_c" 1>&6
19283 else
19284   
19285         ol_DB_LIB=-ldb2
19286         ol_LIBS=$LIBS
19287         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19288
19289         cat > conftest.$ac_ext <<EOF
19290 #line 19291 "configure"
19291 #include "confdefs.h"
19292
19293 #ifdef HAVE_DB_185_H
19294 # include <db_185.h>
19295 #else
19296 # include <db.h>
19297 #endif
19298
19299 #ifndef DB_VERSION_MAJOR
19300 # define DB_VERSION_MAJOR 1
19301 #endif
19302
19303 #ifndef NULL
19304 #define NULL ((void*)0)
19305 #endif
19306
19307 int main() {
19308
19309 #if DB_VERSION_MAJOR > 1
19310         {
19311                 char *version;
19312                 int major, minor, patch;
19313
19314                 version = db_version( &major, &minor, &patch );
19315
19316                 if( major != DB_VERSION_MAJOR ||
19317                         minor < DB_VERSION_MINOR )
19318                 {
19319                         printf("Berkeley DB version mismatch\n"
19320                                 "\texpected: %s\n\tgot: %s\n",
19321                                 DB_VERSION_STRING, version);
19322                         return 1;
19323                 }
19324         }
19325 #endif
19326
19327 #if DB_VERSION_MAJOR > 2
19328         db_env_create( NULL, 0 );
19329 #elif DB_VERSION_MAJOR > 1
19330         db_appexit( NULL );
19331 #else
19332         (void) dbopen( NULL, 0, 0, 0, NULL);
19333 #endif
19334
19335 ; return 0; }
19336 EOF
19337 if { (eval echo configure:19338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19338   rm -rf conftest*
19339   ol_cv_db_db2=yes
19340 else
19341   echo "configure: failed program was:" >&5
19342   cat conftest.$ac_ext >&5
19343   rm -rf conftest*
19344   ol_cv_db_db2=no
19345 fi
19346 rm -f conftest*
19347
19348         LIBS="$ol_LIBS"
19349
19350 fi
19351
19352 echo "$ac_t""$ol_cv_db_db2" 1>&6
19353
19354         if test $ol_cv_db_db2 = yes ; then
19355                 ol_cv_lib_db=-ldb2
19356         fi
19357 fi
19358
19359 if test $ol_cv_lib_db = no ; then
19360         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19361 echo "configure:19362: checking for Berkeley DB link (-ldb-2)" >&5
19362 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19363   echo $ac_n "(cached) $ac_c" 1>&6
19364 else
19365   
19366         ol_DB_LIB=-ldb-2
19367         ol_LIBS=$LIBS
19368         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19369
19370         cat > conftest.$ac_ext <<EOF
19371 #line 19372 "configure"
19372 #include "confdefs.h"
19373
19374 #ifdef HAVE_DB_185_H
19375 # include <db_185.h>
19376 #else
19377 # include <db.h>
19378 #endif
19379
19380 #ifndef DB_VERSION_MAJOR
19381 # define DB_VERSION_MAJOR 1
19382 #endif
19383
19384 #ifndef NULL
19385 #define NULL ((void*)0)
19386 #endif
19387
19388 int main() {
19389
19390 #if DB_VERSION_MAJOR > 1
19391         {
19392                 char *version;
19393                 int major, minor, patch;
19394
19395                 version = db_version( &major, &minor, &patch );
19396
19397                 if( major != DB_VERSION_MAJOR ||
19398                         minor < DB_VERSION_MINOR )
19399                 {
19400                         printf("Berkeley DB version mismatch\n"
19401                                 "\texpected: %s\n\tgot: %s\n",
19402                                 DB_VERSION_STRING, version);
19403                         return 1;
19404                 }
19405         }
19406 #endif
19407
19408 #if DB_VERSION_MAJOR > 2
19409         db_env_create( NULL, 0 );
19410 #elif DB_VERSION_MAJOR > 1
19411         db_appexit( NULL );
19412 #else
19413         (void) dbopen( NULL, 0, 0, 0, NULL);
19414 #endif
19415
19416 ; return 0; }
19417 EOF
19418 if { (eval echo configure:19419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19419   rm -rf conftest*
19420   ol_cv_db_db_2=yes
19421 else
19422   echo "configure: failed program was:" >&5
19423   cat conftest.$ac_ext >&5
19424   rm -rf conftest*
19425   ol_cv_db_db_2=no
19426 fi
19427 rm -f conftest*
19428
19429         LIBS="$ol_LIBS"
19430
19431 fi
19432
19433 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19434
19435         if test $ol_cv_db_db_2 = yes ; then
19436                 ol_cv_lib_db=-ldb-2
19437         fi
19438 fi
19439
19440 if test $ol_cv_lib_db = no ; then
19441         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19442 echo "configure:19443: checking for Berkeley DB link (-ldb1)" >&5
19443 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19444   echo $ac_n "(cached) $ac_c" 1>&6
19445 else
19446   
19447         ol_DB_LIB=-ldb1
19448         ol_LIBS=$LIBS
19449         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19450
19451         cat > conftest.$ac_ext <<EOF
19452 #line 19453 "configure"
19453 #include "confdefs.h"
19454
19455 #ifdef HAVE_DB_185_H
19456 # include <db_185.h>
19457 #else
19458 # include <db.h>
19459 #endif
19460
19461 #ifndef DB_VERSION_MAJOR
19462 # define DB_VERSION_MAJOR 1
19463 #endif
19464
19465 #ifndef NULL
19466 #define NULL ((void*)0)
19467 #endif
19468
19469 int main() {
19470
19471 #if DB_VERSION_MAJOR > 1
19472         {
19473                 char *version;
19474                 int major, minor, patch;
19475
19476                 version = db_version( &major, &minor, &patch );
19477
19478                 if( major != DB_VERSION_MAJOR ||
19479                         minor < DB_VERSION_MINOR )
19480                 {
19481                         printf("Berkeley DB version mismatch\n"
19482                                 "\texpected: %s\n\tgot: %s\n",
19483                                 DB_VERSION_STRING, version);
19484                         return 1;
19485                 }
19486         }
19487 #endif
19488
19489 #if DB_VERSION_MAJOR > 2
19490         db_env_create( NULL, 0 );
19491 #elif DB_VERSION_MAJOR > 1
19492         db_appexit( NULL );
19493 #else
19494         (void) dbopen( NULL, 0, 0, 0, NULL);
19495 #endif
19496
19497 ; return 0; }
19498 EOF
19499 if { (eval echo configure:19500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19500   rm -rf conftest*
19501   ol_cv_db_db1=yes
19502 else
19503   echo "configure: failed program was:" >&5
19504   cat conftest.$ac_ext >&5
19505   rm -rf conftest*
19506   ol_cv_db_db1=no
19507 fi
19508 rm -f conftest*
19509
19510         LIBS="$ol_LIBS"
19511
19512 fi
19513
19514 echo "$ac_t""$ol_cv_db_db1" 1>&6
19515
19516         if test $ol_cv_db_db1 = yes ; then
19517                 ol_cv_lib_db=-ldb1
19518         fi
19519 fi
19520
19521 if test $ol_cv_lib_db = no ; then
19522         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19523 echo "configure:19524: checking for Berkeley DB link (-ldb-1)" >&5
19524 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19525   echo $ac_n "(cached) $ac_c" 1>&6
19526 else
19527   
19528         ol_DB_LIB=-ldb-1
19529         ol_LIBS=$LIBS
19530         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19531
19532         cat > conftest.$ac_ext <<EOF
19533 #line 19534 "configure"
19534 #include "confdefs.h"
19535
19536 #ifdef HAVE_DB_185_H
19537 # include <db_185.h>
19538 #else
19539 # include <db.h>
19540 #endif
19541
19542 #ifndef DB_VERSION_MAJOR
19543 # define DB_VERSION_MAJOR 1
19544 #endif
19545
19546 #ifndef NULL
19547 #define NULL ((void*)0)
19548 #endif
19549
19550 int main() {
19551
19552 #if DB_VERSION_MAJOR > 1
19553         {
19554                 char *version;
19555                 int major, minor, patch;
19556
19557                 version = db_version( &major, &minor, &patch );
19558
19559                 if( major != DB_VERSION_MAJOR ||
19560                         minor < DB_VERSION_MINOR )
19561                 {
19562                         printf("Berkeley DB version mismatch\n"
19563                                 "\texpected: %s\n\tgot: %s\n",
19564                                 DB_VERSION_STRING, version);
19565                         return 1;
19566                 }
19567         }
19568 #endif
19569
19570 #if DB_VERSION_MAJOR > 2
19571         db_env_create( NULL, 0 );
19572 #elif DB_VERSION_MAJOR > 1
19573         db_appexit( NULL );
19574 #else
19575         (void) dbopen( NULL, 0, 0, 0, NULL);
19576 #endif
19577
19578 ; return 0; }
19579 EOF
19580 if { (eval echo configure:19581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19581   rm -rf conftest*
19582   ol_cv_db_db_1=yes
19583 else
19584   echo "configure: failed program was:" >&5
19585   cat conftest.$ac_ext >&5
19586   rm -rf conftest*
19587   ol_cv_db_db_1=no
19588 fi
19589 rm -f conftest*
19590
19591         LIBS="$ol_LIBS"
19592
19593 fi
19594
19595 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19596
19597         if test $ol_cv_db_db_1 = yes ; then
19598                 ol_cv_lib_db=-ldb-1
19599         fi
19600 fi
19601
19602
19603         if test "$ol_cv_lib_db" != no ; then
19604                 ol_cv_berkeley_db=yes
19605                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19606 echo "configure:19607: checking for Berkeley DB thread support" >&5
19607 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19608   echo $ac_n "(cached) $ac_c" 1>&6
19609 else
19610   
19611         ol_LIBS="$LIBS"
19612         LIBS="$LTHREAD_LIBS $LIBS"
19613         if test $ol_cv_lib_db != yes ; then
19614                 LIBS="$ol_cv_lib_db $LIBS"
19615         fi
19616
19617         if test "$cross_compiling" = yes; then
19618   ol_cv_berkeley_db_thread=cross
19619 else
19620   cat > conftest.$ac_ext <<EOF
19621 #line 19622 "configure"
19622 #include "confdefs.h"
19623
19624 #ifdef HAVE_DB_185_H
19625         choke me;
19626 #else
19627 #include <db.h>
19628 #endif
19629 #ifndef NULL
19630 #define NULL ((void *)0)
19631 #endif
19632 main()
19633 {
19634         int rc;
19635         u_int32_t flags = DB_CREATE |
19636 #ifdef DB_PRIVATE
19637                 DB_PRIVATE |
19638 #endif
19639                 DB_THREAD;
19640
19641 #if DB_VERSION_MAJOR > 2
19642         DB_ENV *env = NULL;
19643
19644         rc = db_env_create( &env, 0 );
19645
19646         flags |= DB_INIT_MPOOL;
19647 #ifdef DB_MPOOL_PRIVATE
19648         flags |= DB_MPOOL_PRIVATE;
19649 #endif
19650
19651         if( rc ) {
19652                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19653                 return rc;
19654         }
19655
19656 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19657         rc = env->open( env, NULL, flags, 0 );
19658 #else
19659         rc = env->open( env, NULL, NULL, flags, 0 );
19660 #endif
19661
19662         if ( rc == 0 ) {
19663                 rc = env->close( env, 0 );
19664         }
19665
19666         if( rc ) {
19667                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19668                 return rc;
19669         }
19670
19671 #else
19672         DB_ENV env;
19673         memset( &env, '\0', sizeof(env) );
19674
19675         rc = db_appinit( NULL, NULL, &env, flags );
19676
19677         if( rc == 0 ) {
19678                 db_appexit( &env );
19679         }
19680
19681         unlink("__db_mpool.share");
19682         unlink("__db_lock.share");
19683 #endif
19684
19685         return rc;
19686 }
19687 EOF
19688 if { (eval echo configure:19689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19689 then
19690   ol_cv_berkeley_db_thread=yes
19691 else
19692   echo "configure: failed program was:" >&5
19693   cat conftest.$ac_ext >&5
19694   rm -fr conftest*
19695   ol_cv_berkeley_db_thread=no
19696 fi
19697 rm -fr conftest*
19698 fi
19699
19700
19701         LIBS="$ol_LIBS"
19702
19703 fi
19704
19705 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19706
19707         if test $ol_cv_berkeley_db_thread != no ; then
19708                 cat >> confdefs.h <<\EOF
19709 #define HAVE_BERKELEY_DB_THREAD 1
19710 EOF
19711
19712         fi
19713
19714         fi
19715 fi
19716
19717         fi
19718
19719         if test $ol_cv_berkeley_db != no ; then
19720                 cat >> confdefs.h <<\EOF
19721 #define HAVE_BERKELEY_DB 1
19722 EOF
19723
19724
19725                 ol_link_ldbm=berkeley
19726                 ol_with_ldbm_api=berkeley
19727
19728                 if test $ol_with_ldbm_type = hash ; then
19729                         cat >> confdefs.h <<\EOF
19730 #define LDBM_USE_DBHASH 1
19731 EOF
19732
19733                 else
19734                         cat >> confdefs.h <<\EOF
19735 #define LDBM_USE_DBBTREE 1
19736 EOF
19737
19738                 fi
19739
19740                                                 if test $ol_cv_lib_db != yes ; then
19741                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19742                 fi
19743         fi
19744 fi
19745
19746 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19747         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19748 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19749         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19750 echo "configure:19751: checking Berkeley DB version for BDB backend" >&5
19751 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19752   echo $ac_n "(cached) $ac_c" 1>&6
19753 else
19754   
19755         cat > conftest.$ac_ext <<EOF
19756 #line 19757 "configure"
19757 #include "confdefs.h"
19758
19759 #include <db.h>
19760
19761  /* this check could be improved */
19762 #ifndef DB_VERSION_MAJOR
19763 #       define DB_VERSION_MAJOR 1
19764 #endif
19765 #ifndef DB_VERSION_MINOR
19766 #       define DB_VERSION_MINOR 0
19767 #endif
19768
19769 /* require 4.2 or later */
19770 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19771         __db_version_compat
19772 #endif
19773         
19774 EOF
19775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19776   egrep "__db_version_compat" >/dev/null 2>&1; then
19777   rm -rf conftest*
19778   ol_cv_bdb_compat=yes
19779 else
19780   rm -rf conftest*
19781   ol_cv_bdb_compat=no
19782 fi
19783 rm -f conftest*
19784
19785 fi
19786
19787 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19788
19789
19790         if test $ol_cv_bdb_compat = yes ; then
19791                 ol_enable_bdb=yes
19792         elif test $ol_enable_bdb = yes ; then
19793                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19794         else
19795                 ol_enable_bdb=no
19796         fi
19797 fi
19798 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19799         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19800 fi
19801
19802 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19803         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19804         ol_with_ldbm_api=none
19805 fi
19806
19807 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19808         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19809 echo "configure:19810: checking for MDBM library" >&5
19810 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19811   echo $ac_n "(cached) $ac_c" 1>&6
19812 else
19813         ol_LIBS="$LIBS"
19814         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19815 echo "configure:19816: checking for mdbm_set_chain" >&5
19816 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19817   echo $ac_n "(cached) $ac_c" 1>&6
19818 else
19819   cat > conftest.$ac_ext <<EOF
19820 #line 19821 "configure"
19821 #include "confdefs.h"
19822 /* System header to define __stub macros and hopefully few prototypes,
19823     which can conflict with char mdbm_set_chain(); below.  */
19824 #include <assert.h>
19825 /* Override any gcc2 internal prototype to avoid an error.  */
19826 /* We use char because int might match the return type of a gcc2
19827     builtin and then its argument prototype would still apply.  */
19828 char mdbm_set_chain();
19829 char (*f)();
19830
19831 int main() {
19832
19833 /* The GNU C library defines this for functions which it implements
19834     to always fail with ENOSYS.  Some functions are actually named
19835     something starting with __ and the normal name is an alias.  */
19836 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19837 choke me
19838 #else
19839 f = mdbm_set_chain;
19840 #endif
19841
19842 ; return 0; }
19843 EOF
19844 if { (eval echo configure:19845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19845   rm -rf conftest*
19846   eval "ac_cv_func_mdbm_set_chain=yes"
19847 else
19848   echo "configure: failed program was:" >&5
19849   cat conftest.$ac_ext >&5
19850   rm -rf conftest*
19851   eval "ac_cv_func_mdbm_set_chain=no"
19852 fi
19853 rm -f conftest*
19854 fi
19855
19856 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19857   echo "$ac_t""yes" 1>&6
19858   ol_cv_lib_mdbm=yes
19859 else
19860   echo "$ac_t""no" 1>&6
19861
19862                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19863 echo "configure:19864: checking for mdbm_set_chain in -lmdbm" >&5
19864 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19865 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19866   echo $ac_n "(cached) $ac_c" 1>&6
19867 else
19868   ac_save_LIBS="$LIBS"
19869 LIBS="-lmdbm  $LIBS"
19870 cat > conftest.$ac_ext <<EOF
19871 #line 19872 "configure"
19872 #include "confdefs.h"
19873 /* Override any gcc2 internal prototype to avoid an error.  */
19874 /* We use char because int might match the return type of a gcc2
19875     builtin and then its argument prototype would still apply.  */
19876 char mdbm_set_chain();
19877
19878 int main() {
19879 mdbm_set_chain()
19880 ; return 0; }
19881 EOF
19882 if { (eval echo configure:19883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19883   rm -rf conftest*
19884   eval "ac_cv_lib_$ac_lib_var=yes"
19885 else
19886   echo "configure: failed program was:" >&5
19887   cat conftest.$ac_ext >&5
19888   rm -rf conftest*
19889   eval "ac_cv_lib_$ac_lib_var=no"
19890 fi
19891 rm -f conftest*
19892 LIBS="$ac_save_LIBS"
19893
19894 fi
19895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19896   echo "$ac_t""yes" 1>&6
19897   ol_cv_lib_mdbm=-lmdbm
19898 else
19899   echo "$ac_t""no" 1>&6
19900 ol_cv_lib_mdbm=no
19901 fi
19902
19903         
19904 fi
19905
19906         LIBS="$ol_LIBS"
19907
19908 fi
19909
19910 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19911
19912
19913  for ac_hdr in mdbm.h
19914 do
19915 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19916 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19917 echo "configure:19918: checking for $ac_hdr" >&5
19918 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19919   echo $ac_n "(cached) $ac_c" 1>&6
19920 else
19921   cat > conftest.$ac_ext <<EOF
19922 #line 19923 "configure"
19923 #include "confdefs.h"
19924 #include <$ac_hdr>
19925 EOF
19926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19927 { (eval echo configure:19928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19929 if test -z "$ac_err"; then
19930   rm -rf conftest*
19931   eval "ac_cv_header_$ac_safe=yes"
19932 else
19933   echo "$ac_err" >&5
19934   echo "configure: failed program was:" >&5
19935   cat conftest.$ac_ext >&5
19936   rm -rf conftest*
19937   eval "ac_cv_header_$ac_safe=no"
19938 fi
19939 rm -f conftest*
19940 fi
19941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19942   echo "$ac_t""yes" 1>&6
19943     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19944   cat >> confdefs.h <<EOF
19945 #define $ac_tr_hdr 1
19946 EOF
19947  
19948 else
19949   echo "$ac_t""no" 1>&6
19950 fi
19951 done
19952
19953  echo $ac_n "checking for db""... $ac_c" 1>&6
19954 echo "configure:19955: checking for db" >&5
19955 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19956   echo $ac_n "(cached) $ac_c" 1>&6
19957 else
19958   
19959         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19960                 ol_cv_mdbm=no
19961         else
19962                 ol_cv_mdbm=yes
19963         fi
19964
19965 fi
19966
19967 echo "$ac_t""$ol_cv_mdbm" 1>&6
19968  if test $ol_cv_mdbm = yes ; then
19969         cat >> confdefs.h <<\EOF
19970 #define HAVE_MDBM 1
19971 EOF
19972
19973  fi
19974
19975
19976         if test $ol_cv_mdbm = yes ; then
19977                 ol_link_ldbm=mdbm
19978                 ol_with_ldbm_api=mdbm
19979                 if test $ol_cv_lib_mdbm != yes ; then
19980                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19981                 fi
19982         fi
19983 fi
19984
19985 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19986         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19987 echo "configure:19988: checking for GDBM library" >&5
19988 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19989   echo $ac_n "(cached) $ac_c" 1>&6
19990 else
19991         ol_LIBS="$LIBS"
19992         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19993 echo "configure:19994: checking for gdbm_open" >&5
19994 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19995   echo $ac_n "(cached) $ac_c" 1>&6
19996 else
19997   cat > conftest.$ac_ext <<EOF
19998 #line 19999 "configure"
19999 #include "confdefs.h"
20000 /* System header to define __stub macros and hopefully few prototypes,
20001     which can conflict with char gdbm_open(); below.  */
20002 #include <assert.h>
20003 /* Override any gcc2 internal prototype to avoid an error.  */
20004 /* We use char because int might match the return type of a gcc2
20005     builtin and then its argument prototype would still apply.  */
20006 char gdbm_open();
20007 char (*f)();
20008
20009 int main() {
20010
20011 /* The GNU C library defines this for functions which it implements
20012     to always fail with ENOSYS.  Some functions are actually named
20013     something starting with __ and the normal name is an alias.  */
20014 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20015 choke me
20016 #else
20017 f = gdbm_open;
20018 #endif
20019
20020 ; return 0; }
20021 EOF
20022 if { (eval echo configure:20023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20023   rm -rf conftest*
20024   eval "ac_cv_func_gdbm_open=yes"
20025 else
20026   echo "configure: failed program was:" >&5
20027   cat conftest.$ac_ext >&5
20028   rm -rf conftest*
20029   eval "ac_cv_func_gdbm_open=no"
20030 fi
20031 rm -f conftest*
20032 fi
20033
20034 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20035   echo "$ac_t""yes" 1>&6
20036   ol_cv_lib_gdbm=yes
20037 else
20038   echo "$ac_t""no" 1>&6
20039
20040                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20041 echo "configure:20042: checking for gdbm_open in -lgdbm" >&5
20042 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20043 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20044   echo $ac_n "(cached) $ac_c" 1>&6
20045 else
20046   ac_save_LIBS="$LIBS"
20047 LIBS="-lgdbm  $LIBS"
20048 cat > conftest.$ac_ext <<EOF
20049 #line 20050 "configure"
20050 #include "confdefs.h"
20051 /* Override any gcc2 internal prototype to avoid an error.  */
20052 /* We use char because int might match the return type of a gcc2
20053     builtin and then its argument prototype would still apply.  */
20054 char gdbm_open();
20055
20056 int main() {
20057 gdbm_open()
20058 ; return 0; }
20059 EOF
20060 if { (eval echo configure:20061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20061   rm -rf conftest*
20062   eval "ac_cv_lib_$ac_lib_var=yes"
20063 else
20064   echo "configure: failed program was:" >&5
20065   cat conftest.$ac_ext >&5
20066   rm -rf conftest*
20067   eval "ac_cv_lib_$ac_lib_var=no"
20068 fi
20069 rm -f conftest*
20070 LIBS="$ac_save_LIBS"
20071
20072 fi
20073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20074   echo "$ac_t""yes" 1>&6
20075   ol_cv_lib_gdbm=-lgdbm
20076 else
20077   echo "$ac_t""no" 1>&6
20078 ol_cv_lib_gdbm=no
20079 fi
20080
20081         
20082 fi
20083
20084         LIBS="$ol_LIBS"
20085
20086 fi
20087
20088 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20089
20090
20091  for ac_hdr in gdbm.h
20092 do
20093 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20094 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20095 echo "configure:20096: checking for $ac_hdr" >&5
20096 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20097   echo $ac_n "(cached) $ac_c" 1>&6
20098 else
20099   cat > conftest.$ac_ext <<EOF
20100 #line 20101 "configure"
20101 #include "confdefs.h"
20102 #include <$ac_hdr>
20103 EOF
20104 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20105 { (eval echo configure:20106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20106 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20107 if test -z "$ac_err"; then
20108   rm -rf conftest*
20109   eval "ac_cv_header_$ac_safe=yes"
20110 else
20111   echo "$ac_err" >&5
20112   echo "configure: failed program was:" >&5
20113   cat conftest.$ac_ext >&5
20114   rm -rf conftest*
20115   eval "ac_cv_header_$ac_safe=no"
20116 fi
20117 rm -f conftest*
20118 fi
20119 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20120   echo "$ac_t""yes" 1>&6
20121     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20122   cat >> confdefs.h <<EOF
20123 #define $ac_tr_hdr 1
20124 EOF
20125  
20126 else
20127   echo "$ac_t""no" 1>&6
20128 fi
20129 done
20130
20131  echo $ac_n "checking for db""... $ac_c" 1>&6
20132 echo "configure:20133: checking for db" >&5
20133 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20134   echo $ac_n "(cached) $ac_c" 1>&6
20135 else
20136   
20137         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20138                 ol_cv_gdbm=no
20139         else
20140                 ol_cv_gdbm=yes
20141         fi
20142
20143 fi
20144
20145 echo "$ac_t""$ol_cv_gdbm" 1>&6
20146  if test $ol_cv_gdbm = yes ; then
20147         cat >> confdefs.h <<\EOF
20148 #define HAVE_GDBM 1
20149 EOF
20150
20151  fi
20152
20153
20154         if test $ol_cv_gdbm = yes ; then
20155                 ol_link_ldbm=gdbm
20156                 ol_with_ldbm_api=gdbm
20157
20158                 if test $ol_cv_lib_gdbm != yes ; then
20159                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20160                 fi
20161         fi
20162 fi
20163
20164 if test $ol_with_ldbm_api = ndbm ; then
20165         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20166 echo "configure:20167: checking for NDBM library" >&5
20167 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20168   echo $ac_n "(cached) $ac_c" 1>&6
20169 else
20170         ol_LIBS="$LIBS"
20171         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20172 echo "configure:20173: checking for dbm_open" >&5
20173 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20174   echo $ac_n "(cached) $ac_c" 1>&6
20175 else
20176   cat > conftest.$ac_ext <<EOF
20177 #line 20178 "configure"
20178 #include "confdefs.h"
20179 /* System header to define __stub macros and hopefully few prototypes,
20180     which can conflict with char dbm_open(); below.  */
20181 #include <assert.h>
20182 /* Override any gcc2 internal prototype to avoid an error.  */
20183 /* We use char because int might match the return type of a gcc2
20184     builtin and then its argument prototype would still apply.  */
20185 char dbm_open();
20186 char (*f)();
20187
20188 int main() {
20189
20190 /* The GNU C library defines this for functions which it implements
20191     to always fail with ENOSYS.  Some functions are actually named
20192     something starting with __ and the normal name is an alias.  */
20193 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20194 choke me
20195 #else
20196 f = dbm_open;
20197 #endif
20198
20199 ; return 0; }
20200 EOF
20201 if { (eval echo configure:20202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20202   rm -rf conftest*
20203   eval "ac_cv_func_dbm_open=yes"
20204 else
20205   echo "configure: failed program was:" >&5
20206   cat conftest.$ac_ext >&5
20207   rm -rf conftest*
20208   eval "ac_cv_func_dbm_open=no"
20209 fi
20210 rm -f conftest*
20211 fi
20212
20213 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20214   echo "$ac_t""yes" 1>&6
20215   ol_cv_lib_ndbm=yes
20216 else
20217   echo "$ac_t""no" 1>&6
20218
20219                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20220 echo "configure:20221: checking for dbm_open in -lndbm" >&5
20221 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20222 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20223   echo $ac_n "(cached) $ac_c" 1>&6
20224 else
20225   ac_save_LIBS="$LIBS"
20226 LIBS="-lndbm  $LIBS"
20227 cat > conftest.$ac_ext <<EOF
20228 #line 20229 "configure"
20229 #include "confdefs.h"
20230 /* Override any gcc2 internal prototype to avoid an error.  */
20231 /* We use char because int might match the return type of a gcc2
20232     builtin and then its argument prototype would still apply.  */
20233 char dbm_open();
20234
20235 int main() {
20236 dbm_open()
20237 ; return 0; }
20238 EOF
20239 if { (eval echo configure:20240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20240   rm -rf conftest*
20241   eval "ac_cv_lib_$ac_lib_var=yes"
20242 else
20243   echo "configure: failed program was:" >&5
20244   cat conftest.$ac_ext >&5
20245   rm -rf conftest*
20246   eval "ac_cv_lib_$ac_lib_var=no"
20247 fi
20248 rm -f conftest*
20249 LIBS="$ac_save_LIBS"
20250
20251 fi
20252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20253   echo "$ac_t""yes" 1>&6
20254   ol_cv_lib_ndbm=-lndbm
20255 else
20256   echo "$ac_t""no" 1>&6
20257
20258                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20259 echo "configure:20260: checking for dbm_open in -ldbm" >&5
20260 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20261 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20262   echo $ac_n "(cached) $ac_c" 1>&6
20263 else
20264   ac_save_LIBS="$LIBS"
20265 LIBS="-ldbm  $LIBS"
20266 cat > conftest.$ac_ext <<EOF
20267 #line 20268 "configure"
20268 #include "confdefs.h"
20269 /* Override any gcc2 internal prototype to avoid an error.  */
20270 /* We use char because int might match the return type of a gcc2
20271     builtin and then its argument prototype would still apply.  */
20272 char dbm_open();
20273
20274 int main() {
20275 dbm_open()
20276 ; return 0; }
20277 EOF
20278 if { (eval echo configure:20279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20279   rm -rf conftest*
20280   eval "ac_cv_lib_$ac_lib_var=yes"
20281 else
20282   echo "configure: failed program was:" >&5
20283   cat conftest.$ac_ext >&5
20284   rm -rf conftest*
20285   eval "ac_cv_lib_$ac_lib_var=no"
20286 fi
20287 rm -f conftest*
20288 LIBS="$ac_save_LIBS"
20289
20290 fi
20291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20292   echo "$ac_t""yes" 1>&6
20293   ol_cv_lib_ndbm=-ldbm
20294 else
20295   echo "$ac_t""no" 1>&6
20296 ol_cv_lib_ndbm=no
20297 fi
20298                 
20299 fi
20300
20301         
20302 fi
20303
20304         LIBS="$ol_LIBS"
20305
20306 fi
20307
20308 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20309
20310
20311  for ac_hdr in ndbm.h
20312 do
20313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20315 echo "configure:20316: checking for $ac_hdr" >&5
20316 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20317   echo $ac_n "(cached) $ac_c" 1>&6
20318 else
20319   cat > conftest.$ac_ext <<EOF
20320 #line 20321 "configure"
20321 #include "confdefs.h"
20322 #include <$ac_hdr>
20323 EOF
20324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20325 { (eval echo configure:20326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20327 if test -z "$ac_err"; then
20328   rm -rf conftest*
20329   eval "ac_cv_header_$ac_safe=yes"
20330 else
20331   echo "$ac_err" >&5
20332   echo "configure: failed program was:" >&5
20333   cat conftest.$ac_ext >&5
20334   rm -rf conftest*
20335   eval "ac_cv_header_$ac_safe=no"
20336 fi
20337 rm -f conftest*
20338 fi
20339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20340   echo "$ac_t""yes" 1>&6
20341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20342   cat >> confdefs.h <<EOF
20343 #define $ac_tr_hdr 1
20344 EOF
20345  
20346 else
20347   echo "$ac_t""no" 1>&6
20348 fi
20349 done
20350
20351  echo $ac_n "checking for db""... $ac_c" 1>&6
20352 echo "configure:20353: checking for db" >&5
20353 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20354   echo $ac_n "(cached) $ac_c" 1>&6
20355 else
20356   
20357         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20358                 ol_cv_ndbm=no
20359         else
20360                 ol_cv_ndbm=yes
20361         fi
20362
20363 fi
20364
20365 echo "$ac_t""$ol_cv_ndbm" 1>&6
20366  if test $ol_cv_ndbm = yes ; then
20367         cat >> confdefs.h <<\EOF
20368 #define HAVE_NDBM 1
20369 EOF
20370
20371  fi
20372
20373
20374         if test $ol_cv_ndbm = yes ; then
20375                 ol_link_ldbm=ndbm
20376                 ol_with_ldbm_api=ndbm
20377
20378                 if test $ol_cv_lib_ndbm != yes ; then
20379                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20380                 fi
20381         fi
20382 fi
20383
20384 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20385         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20386         if test $ol_enable_ldbm = yes ; then
20387                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20388         fi
20389
20390         echo "configure: warning: disabling LDBM" 1>&2
20391         ol_enable_ldbm=no
20392 fi
20393
20394
20395 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20396         BUILD_LIBS_DYNAMIC=shared
20397         cat >> confdefs.h <<\EOF
20398 #define LDAP_LIBS_DYNAMIC 1
20399 EOF
20400
20401         LTSTATIC=""
20402 else
20403         BUILD_LIBS_DYNAMIC=static
20404         LTSTATIC="-static"
20405 fi
20406
20407 if test $ol_enable_wrappers != no ; then
20408         for ac_hdr in tcpd.h
20409 do
20410 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20411 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20412 echo "configure:20413: checking for $ac_hdr" >&5
20413 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20414   echo $ac_n "(cached) $ac_c" 1>&6
20415 else
20416   cat > conftest.$ac_ext <<EOF
20417 #line 20418 "configure"
20418 #include "confdefs.h"
20419 #include <$ac_hdr>
20420 EOF
20421 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20422 { (eval echo configure:20423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20423 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20424 if test -z "$ac_err"; then
20425   rm -rf conftest*
20426   eval "ac_cv_header_$ac_safe=yes"
20427 else
20428   echo "$ac_err" >&5
20429   echo "configure: failed program was:" >&5
20430   cat conftest.$ac_ext >&5
20431   rm -rf conftest*
20432   eval "ac_cv_header_$ac_safe=no"
20433 fi
20434 rm -f conftest*
20435 fi
20436 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20437   echo "$ac_t""yes" 1>&6
20438     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20439   cat >> confdefs.h <<EOF
20440 #define $ac_tr_hdr 1
20441 EOF
20442  
20443                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20444 echo "configure:20445: checking for TCP wrappers library" >&5
20445                 save_LIBS="$LIBS"
20446                 LIBS="$LIBS -lwrap"
20447                 cat > conftest.$ac_ext <<EOF
20448 #line 20449 "configure"
20449 #include "confdefs.h"
20450
20451 #include <tcpd.h>
20452 int allow_severity = 0;
20453 int deny_severity  = 0;
20454
20455 struct request_info *req;
20456                 
20457 int main() {
20458
20459 hosts_access(req)
20460                 
20461 ; return 0; }
20462 EOF
20463 if { (eval echo configure:20464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20464   rm -rf conftest*
20465   echo "$ac_t""-lwrap" 1>&6
20466                 have_wrappers=yes
20467                 LIBS="$save_LIBS"
20468 else
20469   echo "configure: failed program was:" >&5
20470   cat conftest.$ac_ext >&5
20471   rm -rf conftest*
20472   
20473                                 LIBS="$LIBS -lnsl"
20474                 cat > conftest.$ac_ext <<EOF
20475 #line 20476 "configure"
20476 #include "confdefs.h"
20477
20478 #include <tcpd.h>
20479 int allow_severity = 0;
20480 int deny_severity  = 0;
20481
20482 struct request_info *req;
20483                 
20484 int main() {
20485
20486 hosts_access(req)
20487                 
20488 ; return 0; }
20489 EOF
20490 if { (eval echo configure:20491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20491   rm -rf conftest*
20492   echo "$ac_t""-lwrap -lnsl" 1>&6
20493                 have_wrappers=yes
20494                 LIBS="$save_LIBS -lnsl"
20495 else
20496   echo "configure: failed program was:" >&5
20497   cat conftest.$ac_ext >&5
20498   rm -rf conftest*
20499   
20500                 echo "$ac_t""no" 1>&6
20501                 have_wrappers=no
20502                 LIBS=$save_LIBS
20503 fi
20504 rm -f conftest*
20505 fi
20506 rm -f conftest*
20507 else
20508   echo "$ac_t""no" 1>&6
20509 have_wrappers=no
20510 fi
20511 done
20512
20513
20514         if test $have_wrappers = yes ; then
20515                 cat >> confdefs.h <<\EOF
20516 #define HAVE_TCPD 1
20517 EOF
20518
20519                 WRAP_LIBS="-lwrap"
20520         elif test $ol_enable_wrappers = yes ; then
20521                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20522         else
20523                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20524                 WRAP_LIBS=""
20525         fi
20526 fi
20527
20528 if test $ol_enable_syslog != no ; then
20529         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20530 echo "configure:20531: checking for openlog" >&5
20531 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20532   echo $ac_n "(cached) $ac_c" 1>&6
20533 else
20534   cat > conftest.$ac_ext <<EOF
20535 #line 20536 "configure"
20536 #include "confdefs.h"
20537 /* System header to define __stub macros and hopefully few prototypes,
20538     which can conflict with char openlog(); below.  */
20539 #include <assert.h>
20540 /* Override any gcc2 internal prototype to avoid an error.  */
20541 /* We use char because int might match the return type of a gcc2
20542     builtin and then its argument prototype would still apply.  */
20543 char openlog();
20544 char (*f)();
20545
20546 int main() {
20547
20548 /* The GNU C library defines this for functions which it implements
20549     to always fail with ENOSYS.  Some functions are actually named
20550     something starting with __ and the normal name is an alias.  */
20551 #if defined (__stub_openlog) || defined (__stub___openlog)
20552 choke me
20553 #else
20554 f = openlog;
20555 #endif
20556
20557 ; return 0; }
20558 EOF
20559 if { (eval echo configure:20560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20560   rm -rf conftest*
20561   eval "ac_cv_func_openlog=yes"
20562 else
20563   echo "configure: failed program was:" >&5
20564   cat conftest.$ac_ext >&5
20565   rm -rf conftest*
20566   eval "ac_cv_func_openlog=no"
20567 fi
20568 rm -f conftest*
20569 fi
20570
20571 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20572   echo "$ac_t""yes" 1>&6
20573   :
20574 else
20575   echo "$ac_t""no" 1>&6
20576 fi
20577
20578         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20579                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20580         fi
20581         ol_enable_syslog=$ac_cv_func_openlog
20582 fi
20583
20584
20585 ol_link_sql=no
20586 if test $ol_enable_sql != no ; then
20587         for ac_hdr in sql.h sqlext.h
20588 do
20589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20591 echo "configure:20592: checking for $ac_hdr" >&5
20592 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20593   echo $ac_n "(cached) $ac_c" 1>&6
20594 else
20595   cat > conftest.$ac_ext <<EOF
20596 #line 20597 "configure"
20597 #include "confdefs.h"
20598 #include <$ac_hdr>
20599 EOF
20600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20601 { (eval echo configure:20602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20603 if test -z "$ac_err"; then
20604   rm -rf conftest*
20605   eval "ac_cv_header_$ac_safe=yes"
20606 else
20607   echo "$ac_err" >&5
20608   echo "configure: failed program was:" >&5
20609   cat conftest.$ac_ext >&5
20610   rm -rf conftest*
20611   eval "ac_cv_header_$ac_safe=no"
20612 fi
20613 rm -f conftest*
20614 fi
20615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20616   echo "$ac_t""yes" 1>&6
20617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20618   cat >> confdefs.h <<EOF
20619 #define $ac_tr_hdr 1
20620 EOF
20621  
20622 else
20623   echo "$ac_t""no" 1>&6
20624 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20625         
20626 fi
20627 done
20628
20629
20630         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20631 echo "configure:20632: checking for SQLDriverConnect in -liodbc" >&5
20632 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20633 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20634   echo $ac_n "(cached) $ac_c" 1>&6
20635 else
20636   ac_save_LIBS="$LIBS"
20637 LIBS="-liodbc  $LIBS"
20638 cat > conftest.$ac_ext <<EOF
20639 #line 20640 "configure"
20640 #include "confdefs.h"
20641 /* Override any gcc2 internal prototype to avoid an error.  */
20642 /* We use char because int might match the return type of a gcc2
20643     builtin and then its argument prototype would still apply.  */
20644 char SQLDriverConnect();
20645
20646 int main() {
20647 SQLDriverConnect()
20648 ; return 0; }
20649 EOF
20650 if { (eval echo configure:20651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20651   rm -rf conftest*
20652   eval "ac_cv_lib_$ac_lib_var=yes"
20653 else
20654   echo "configure: failed program was:" >&5
20655   cat conftest.$ac_ext >&5
20656   rm -rf conftest*
20657   eval "ac_cv_lib_$ac_lib_var=no"
20658 fi
20659 rm -f conftest*
20660 LIBS="$ac_save_LIBS"
20661
20662 fi
20663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20664   echo "$ac_t""yes" 1>&6
20665   have_iodbc=yes
20666 else
20667   echo "$ac_t""no" 1>&6
20668 have_iodbc=no
20669 fi
20670
20671         if test $have_iodbc = yes ; then
20672                 ol_link_sql="-liodbc"
20673         else
20674                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20675 echo "configure:20676: checking for SQLDriverConnect in -lodbc" >&5
20676 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20677 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20678   echo $ac_n "(cached) $ac_c" 1>&6
20679 else
20680   ac_save_LIBS="$LIBS"
20681 LIBS="-lodbc  $LIBS"
20682 cat > conftest.$ac_ext <<EOF
20683 #line 20684 "configure"
20684 #include "confdefs.h"
20685 /* Override any gcc2 internal prototype to avoid an error.  */
20686 /* We use char because int might match the return type of a gcc2
20687     builtin and then its argument prototype would still apply.  */
20688 char SQLDriverConnect();
20689
20690 int main() {
20691 SQLDriverConnect()
20692 ; return 0; }
20693 EOF
20694 if { (eval echo configure:20695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20695   rm -rf conftest*
20696   eval "ac_cv_lib_$ac_lib_var=yes"
20697 else
20698   echo "configure: failed program was:" >&5
20699   cat conftest.$ac_ext >&5
20700   rm -rf conftest*
20701   eval "ac_cv_lib_$ac_lib_var=no"
20702 fi
20703 rm -f conftest*
20704 LIBS="$ac_save_LIBS"
20705
20706 fi
20707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20708   echo "$ac_t""yes" 1>&6
20709   have_odbc=yes
20710 else
20711   echo "$ac_t""no" 1>&6
20712 have_odbc=no
20713 fi
20714
20715                 if test $have_odbc = yes ; then
20716                         ol_link_sql="-lodbc"
20717                 fi
20718         fi
20719
20720         if test $ol_link_sql != no ; then
20721                 SLAPD_SQL_LIBS="$ol_link_sql"
20722
20723         elif test $ol_enable_sql != auto ; then
20724                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20725         fi
20726 fi
20727
20728 ol_link_sasl=no
20729 ol_link_spasswd=no
20730 if test $ol_with_cyrus_sasl != no ; then
20731         for ac_hdr in sasl/sasl.h sasl.h
20732 do
20733 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20734 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20735 echo "configure:20736: checking for $ac_hdr" >&5
20736 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20737   echo $ac_n "(cached) $ac_c" 1>&6
20738 else
20739   cat > conftest.$ac_ext <<EOF
20740 #line 20741 "configure"
20741 #include "confdefs.h"
20742 #include <$ac_hdr>
20743 EOF
20744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20745 { (eval echo configure:20746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20747 if test -z "$ac_err"; then
20748   rm -rf conftest*
20749   eval "ac_cv_header_$ac_safe=yes"
20750 else
20751   echo "$ac_err" >&5
20752   echo "configure: failed program was:" >&5
20753   cat conftest.$ac_ext >&5
20754   rm -rf conftest*
20755   eval "ac_cv_header_$ac_safe=no"
20756 fi
20757 rm -f conftest*
20758 fi
20759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20760   echo "$ac_t""yes" 1>&6
20761     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20762   cat >> confdefs.h <<EOF
20763 #define $ac_tr_hdr 1
20764 EOF
20765  
20766 else
20767   echo "$ac_t""no" 1>&6
20768 fi
20769 done
20770
20771
20772         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20773                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20774 echo "configure:20775: checking for sasl_client_init in -lsasl2" >&5
20775 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20776 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20777   echo $ac_n "(cached) $ac_c" 1>&6
20778 else
20779   ac_save_LIBS="$LIBS"
20780 LIBS="-lsasl2  $LIBS"
20781 cat > conftest.$ac_ext <<EOF
20782 #line 20783 "configure"
20783 #include "confdefs.h"
20784 /* Override any gcc2 internal prototype to avoid an error.  */
20785 /* We use char because int might match the return type of a gcc2
20786     builtin and then its argument prototype would still apply.  */
20787 char sasl_client_init();
20788
20789 int main() {
20790 sasl_client_init()
20791 ; return 0; }
20792 EOF
20793 if { (eval echo configure:20794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20794   rm -rf conftest*
20795   eval "ac_cv_lib_$ac_lib_var=yes"
20796 else
20797   echo "configure: failed program was:" >&5
20798   cat conftest.$ac_ext >&5
20799   rm -rf conftest*
20800   eval "ac_cv_lib_$ac_lib_var=no"
20801 fi
20802 rm -f conftest*
20803 LIBS="$ac_save_LIBS"
20804
20805 fi
20806 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20807   echo "$ac_t""yes" 1>&6
20808   ol_link_sasl="-lsasl2"
20809 else
20810   echo "$ac_t""no" 1>&6
20811 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20812 echo "configure:20813: checking for sasl_client_init in -lsasl" >&5
20813 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20814 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20815   echo $ac_n "(cached) $ac_c" 1>&6
20816 else
20817   ac_save_LIBS="$LIBS"
20818 LIBS="-lsasl  $LIBS"
20819 cat > conftest.$ac_ext <<EOF
20820 #line 20821 "configure"
20821 #include "confdefs.h"
20822 /* Override any gcc2 internal prototype to avoid an error.  */
20823 /* We use char because int might match the return type of a gcc2
20824     builtin and then its argument prototype would still apply.  */
20825 char sasl_client_init();
20826
20827 int main() {
20828 sasl_client_init()
20829 ; return 0; }
20830 EOF
20831 if { (eval echo configure:20832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20832   rm -rf conftest*
20833   eval "ac_cv_lib_$ac_lib_var=yes"
20834 else
20835   echo "configure: failed program was:" >&5
20836   cat conftest.$ac_ext >&5
20837   rm -rf conftest*
20838   eval "ac_cv_lib_$ac_lib_var=no"
20839 fi
20840 rm -f conftest*
20841 LIBS="$ac_save_LIBS"
20842
20843 fi
20844 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20845   echo "$ac_t""yes" 1>&6
20846   ol_link_sasl="-lsasl"
20847 else
20848   echo "$ac_t""no" 1>&6
20849 fi
20850
20851 fi
20852
20853         fi
20854
20855         if test $ol_link_sasl = no ; then
20856                 if test $ol_with_cyrus_sasl != auto ; then
20857                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20858                 else
20859                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20860                         echo "configure: warning: SASL authentication not supported!" 1>&2
20861                         if test $ol_link_tls = no ; then
20862                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20863                         fi
20864                 fi
20865         else
20866                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20867 echo "configure:20868: checking Cyrus SASL library version" >&5
20868 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20869   echo $ac_n "(cached) $ac_c" 1>&6
20870 else
20871   
20872         cat > conftest.$ac_ext <<EOF
20873 #line 20874 "configure"
20874 #include "confdefs.h"
20875
20876 #ifdef HAVE_SASL_SASL_H
20877 #include <sasl/sasl.h>
20878 #else
20879 #include <sasl.h>
20880 #endif
20881
20882 /* Require 2.1.15+ */
20883 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20884         char *__sasl_compat = "2.2+ or better okay (we guess)";
20885 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20886         && SASL_VERSION_STEP >=15
20887         char *__sasl_compat = "2.1.15+ or better okay";
20888 #endif
20889         
20890 EOF
20891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20892   egrep "__sasl_compat" >/dev/null 2>&1; then
20893   rm -rf conftest*
20894   ol_cv_sasl_compat=yes
20895 else
20896   rm -rf conftest*
20897   ol_cv_sasl_compat=no
20898 fi
20899 rm -f conftest*
20900
20901 fi
20902
20903 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20904
20905                 if test $ol_cv_sasl_compat = no ; then
20906                         ol_link_sasl=no
20907                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20908                 fi
20909
20910                 cat >> confdefs.h <<\EOF
20911 #define HAVE_CYRUS_SASL 1
20912 EOF
20913
20914                 SASL_LIBS="$ol_link_sasl"
20915                 if test $ol_enable_spasswd != no ; then
20916                         ol_link_spasswd=yes
20917                 fi
20918
20919                 ac_save_LIBS="$LIBS"
20920                 LIBS="$LIBS $ol_link_sasl"
20921                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20922 echo "configure:20923: checking for sasl_version" >&5
20923 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20924   echo $ac_n "(cached) $ac_c" 1>&6
20925 else
20926   cat > conftest.$ac_ext <<EOF
20927 #line 20928 "configure"
20928 #include "confdefs.h"
20929 /* System header to define __stub macros and hopefully few prototypes,
20930     which can conflict with char sasl_version(); below.  */
20931 #include <assert.h>
20932 /* Override any gcc2 internal prototype to avoid an error.  */
20933 /* We use char because int might match the return type of a gcc2
20934     builtin and then its argument prototype would still apply.  */
20935 char sasl_version();
20936 char (*f)();
20937
20938 int main() {
20939
20940 /* The GNU C library defines this for functions which it implements
20941     to always fail with ENOSYS.  Some functions are actually named
20942     something starting with __ and the normal name is an alias.  */
20943 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20944 choke me
20945 #else
20946 f = sasl_version;
20947 #endif
20948
20949 ; return 0; }
20950 EOF
20951 if { (eval echo configure:20952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20952   rm -rf conftest*
20953   eval "ac_cv_func_sasl_version=yes"
20954 else
20955   echo "configure: failed program was:" >&5
20956   cat conftest.$ac_ext >&5
20957   rm -rf conftest*
20958   eval "ac_cv_func_sasl_version=no"
20959 fi
20960 rm -f conftest*
20961 fi
20962
20963 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20964   echo "$ac_t""yes" 1>&6
20965   cat >> confdefs.h <<\EOF
20966 #define HAVE_SASL_VERSION 1
20967 EOF
20968
20969 else
20970   echo "$ac_t""no" 1>&6
20971 fi
20972
20973                 LIBS="$ac_save_LIBS"
20974         fi
20975
20976 else
20977         echo "configure: warning: SASL authentication not supported!" 1>&2
20978         if test $ol_link_tls = no ; then
20979                 echo "configure: warning: Strong authentication not supported!" 1>&2
20980         fi
20981 fi
20982
20983 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20984         dev=no
20985         if test -r /dev/urandom ; then
20986                 dev="/dev/urandom";
20987         elif test -r /idev/urandom ; then
20988                 dev="/idev/urandom";
20989         elif test -r /dev/srandom ; then
20990                 dev="/dev/srandom";
20991         elif test -r /dev/random ; then
20992                 dev="/dev/random";
20993         elif test -r /idev/random ; then
20994                 dev="/idev/random";
20995         fi
20996
20997         if test $dev != no ; then
20998                 cat >> confdefs.h <<EOF
20999 #define URANDOM_DEVICE "$dev"
21000 EOF
21001
21002         fi
21003 fi
21004
21005 ol_link_fetch=no
21006 if test $ol_with_fetch != no ; then
21007         ol_LIBS=$LIBS
21008 LIBS="-lfetch -lcom_err $LIBS"
21009 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21010 echo "configure:21011: checking fetch(3) library" >&5
21011 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21012   echo $ac_n "(cached) $ac_c" 1>&6
21013 else
21014   
21015         cat > conftest.$ac_ext <<EOF
21016 #line 21017 "configure"
21017 #include "confdefs.h"
21018
21019 #include <sys/param.h>
21020 #include <stdio.h>
21021 #include <fetch.h>
21022 int main() {
21023 struct url *u = fetchParseURL("file:///"); 
21024 ; return 0; }
21025 EOF
21026 if { (eval echo configure:21027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21027   rm -rf conftest*
21028   ol_cv_lib_fetch=yes
21029 else
21030   echo "configure: failed program was:" >&5
21031   cat conftest.$ac_ext >&5
21032   rm -rf conftest*
21033   ol_cv_lib_fetch=no
21034 fi
21035 rm -f conftest*
21036 fi
21037
21038 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21039 LIBS=$ol_LIBS
21040 if test $ol_cv_lib_fetch != no ; then
21041         ol_link_fetch="-lfetch -lcom_err"
21042         cat >> confdefs.h <<\EOF
21043 #define HAVE_FETCH 1
21044 EOF
21045
21046 fi
21047
21048
21049         if test $ol_cv_lib_fetch != no ; then
21050                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21051                 ol_link_fetch=freebsd
21052
21053         elif test $ol_with_fetch != auto ; then
21054                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21055         fi 
21056 fi
21057
21058 if test $ol_enable_crypt != no ; then
21059         save_LIBS="$LIBS"
21060         LIBS="$TLS_LIBS $LIBS"
21061
21062         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21063 echo "configure:21064: checking for crypt" >&5
21064 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21065   echo $ac_n "(cached) $ac_c" 1>&6
21066 else
21067   cat > conftest.$ac_ext <<EOF
21068 #line 21069 "configure"
21069 #include "confdefs.h"
21070 /* System header to define __stub macros and hopefully few prototypes,
21071     which can conflict with char crypt(); below.  */
21072 #include <assert.h>
21073 /* Override any gcc2 internal prototype to avoid an error.  */
21074 /* We use char because int might match the return type of a gcc2
21075     builtin and then its argument prototype would still apply.  */
21076 char crypt();
21077 char (*f)();
21078
21079 int main() {
21080
21081 /* The GNU C library defines this for functions which it implements
21082     to always fail with ENOSYS.  Some functions are actually named
21083     something starting with __ and the normal name is an alias.  */
21084 #if defined (__stub_crypt) || defined (__stub___crypt)
21085 choke me
21086 #else
21087 f = crypt;
21088 #endif
21089
21090 ; return 0; }
21091 EOF
21092 if { (eval echo configure:21093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21093   rm -rf conftest*
21094   eval "ac_cv_func_crypt=yes"
21095 else
21096   echo "configure: failed program was:" >&5
21097   cat conftest.$ac_ext >&5
21098   rm -rf conftest*
21099   eval "ac_cv_func_crypt=no"
21100 fi
21101 rm -f conftest*
21102 fi
21103
21104 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21105   echo "$ac_t""yes" 1>&6
21106   have_crypt=yes
21107 else
21108   echo "$ac_t""no" 1>&6
21109
21110                 LIBS="$save_LIBS"
21111                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21112 echo "configure:21113: checking for crypt in -lcrypt" >&5
21113 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21114 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21115   echo $ac_n "(cached) $ac_c" 1>&6
21116 else
21117   ac_save_LIBS="$LIBS"
21118 LIBS="-lcrypt  $LIBS"
21119 cat > conftest.$ac_ext <<EOF
21120 #line 21121 "configure"
21121 #include "confdefs.h"
21122 /* Override any gcc2 internal prototype to avoid an error.  */
21123 /* We use char because int might match the return type of a gcc2
21124     builtin and then its argument prototype would still apply.  */
21125 char crypt();
21126
21127 int main() {
21128 crypt()
21129 ; return 0; }
21130 EOF
21131 if { (eval echo configure:21132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21132   rm -rf conftest*
21133   eval "ac_cv_lib_$ac_lib_var=yes"
21134 else
21135   echo "configure: failed program was:" >&5
21136   cat conftest.$ac_ext >&5
21137   rm -rf conftest*
21138   eval "ac_cv_lib_$ac_lib_var=no"
21139 fi
21140 rm -f conftest*
21141 LIBS="$ac_save_LIBS"
21142
21143 fi
21144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21145   echo "$ac_t""yes" 1>&6
21146   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21147                         have_crypt=yes
21148 else
21149   echo "$ac_t""no" 1>&6
21150 have_crypt=no
21151 fi
21152
21153 fi
21154
21155
21156         LIBS="$save_LIBS"
21157
21158         if test $have_crypt = yes ; then
21159                 cat >> confdefs.h <<\EOF
21160 #define HAVE_CRYPT 1
21161 EOF
21162
21163         else
21164                 echo "configure: warning: could not find crypt" 1>&2
21165                 if test $ol_enable_crypt = yes ; then
21166                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21167                 fi
21168
21169                 echo "configure: warning: disabling crypt support" 1>&2
21170                 ol_enable_crypt=no
21171         fi
21172 fi
21173
21174 if test $ol_enable_proctitle != no ; then
21175         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21176 echo "configure:21177: checking for setproctitle" >&5
21177 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21178   echo $ac_n "(cached) $ac_c" 1>&6
21179 else
21180   cat > conftest.$ac_ext <<EOF
21181 #line 21182 "configure"
21182 #include "confdefs.h"
21183 /* System header to define __stub macros and hopefully few prototypes,
21184     which can conflict with char setproctitle(); below.  */
21185 #include <assert.h>
21186 /* Override any gcc2 internal prototype to avoid an error.  */
21187 /* We use char because int might match the return type of a gcc2
21188     builtin and then its argument prototype would still apply.  */
21189 char setproctitle();
21190 char (*f)();
21191
21192 int main() {
21193
21194 /* The GNU C library defines this for functions which it implements
21195     to always fail with ENOSYS.  Some functions are actually named
21196     something starting with __ and the normal name is an alias.  */
21197 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21198 choke me
21199 #else
21200 f = setproctitle;
21201 #endif
21202
21203 ; return 0; }
21204 EOF
21205 if { (eval echo configure:21206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21206   rm -rf conftest*
21207   eval "ac_cv_func_setproctitle=yes"
21208 else
21209   echo "configure: failed program was:" >&5
21210   cat conftest.$ac_ext >&5
21211   rm -rf conftest*
21212   eval "ac_cv_func_setproctitle=no"
21213 fi
21214 rm -f conftest*
21215 fi
21216
21217 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21218   echo "$ac_t""yes" 1>&6
21219   have_setproctitle=yes
21220 else
21221   echo "$ac_t""no" 1>&6
21222
21223                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21224 echo "configure:21225: checking for setproctitle in -lutil" >&5
21225 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21226 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21227   echo $ac_n "(cached) $ac_c" 1>&6
21228 else
21229   ac_save_LIBS="$LIBS"
21230 LIBS="-lutil  $LIBS"
21231 cat > conftest.$ac_ext <<EOF
21232 #line 21233 "configure"
21233 #include "confdefs.h"
21234 /* Override any gcc2 internal prototype to avoid an error.  */
21235 /* We use char because int might match the return type of a gcc2
21236     builtin and then its argument prototype would still apply.  */
21237 char setproctitle();
21238
21239 int main() {
21240 setproctitle()
21241 ; return 0; }
21242 EOF
21243 if { (eval echo configure:21244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21244   rm -rf conftest*
21245   eval "ac_cv_lib_$ac_lib_var=yes"
21246 else
21247   echo "configure: failed program was:" >&5
21248   cat conftest.$ac_ext >&5
21249   rm -rf conftest*
21250   eval "ac_cv_lib_$ac_lib_var=no"
21251 fi
21252 rm -f conftest*
21253 LIBS="$ac_save_LIBS"
21254
21255 fi
21256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21257   echo "$ac_t""yes" 1>&6
21258   have_setproctitle=yes
21259                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21260 else
21261   echo "$ac_t""no" 1>&6
21262 have_setproctitle=no
21263                         LIBOBJS="$LIBOBJS setproctitle.o"
21264                         LIBSRCS="$LIBSRCS setproctitle.c"
21265 fi
21266
21267 fi
21268
21269
21270         if test $have_setproctitle = yes ; then
21271                 cat >> confdefs.h <<\EOF
21272 #define HAVE_SETPROCTITLE 1
21273 EOF
21274
21275         fi
21276 fi
21277
21278 if test $ol_enable_slp != no ; then
21279         for ac_hdr in slp.h 
21280 do
21281 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21282 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21283 echo "configure:21284: checking for $ac_hdr" >&5
21284 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21285   echo $ac_n "(cached) $ac_c" 1>&6
21286 else
21287   cat > conftest.$ac_ext <<EOF
21288 #line 21289 "configure"
21289 #include "confdefs.h"
21290 #include <$ac_hdr>
21291 EOF
21292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21293 { (eval echo configure:21294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21295 if test -z "$ac_err"; then
21296   rm -rf conftest*
21297   eval "ac_cv_header_$ac_safe=yes"
21298 else
21299   echo "$ac_err" >&5
21300   echo "configure: failed program was:" >&5
21301   cat conftest.$ac_ext >&5
21302   rm -rf conftest*
21303   eval "ac_cv_header_$ac_safe=no"
21304 fi
21305 rm -f conftest*
21306 fi
21307 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21308   echo "$ac_t""yes" 1>&6
21309     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21310   cat >> confdefs.h <<EOF
21311 #define $ac_tr_hdr 1
21312 EOF
21313  
21314 else
21315   echo "$ac_t""no" 1>&6
21316 fi
21317 done
21318
21319
21320         if test $ac_cv_header_slp_h = yes ; then
21321                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21322 echo "configure:21323: checking for SLPOpen in -lslp" >&5
21323 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21324 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21325   echo $ac_n "(cached) $ac_c" 1>&6
21326 else
21327   ac_save_LIBS="$LIBS"
21328 LIBS="-lslp  $LIBS"
21329 cat > conftest.$ac_ext <<EOF
21330 #line 21331 "configure"
21331 #include "confdefs.h"
21332 /* Override any gcc2 internal prototype to avoid an error.  */
21333 /* We use char because int might match the return type of a gcc2
21334     builtin and then its argument prototype would still apply.  */
21335 char SLPOpen();
21336
21337 int main() {
21338 SLPOpen()
21339 ; return 0; }
21340 EOF
21341 if { (eval echo configure:21342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21342   rm -rf conftest*
21343   eval "ac_cv_lib_$ac_lib_var=yes"
21344 else
21345   echo "configure: failed program was:" >&5
21346   cat conftest.$ac_ext >&5
21347   rm -rf conftest*
21348   eval "ac_cv_lib_$ac_lib_var=no"
21349 fi
21350 rm -f conftest*
21351 LIBS="$ac_save_LIBS"
21352
21353 fi
21354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21355   echo "$ac_t""yes" 1>&6
21356   have_slp=yes
21357 else
21358   echo "$ac_t""no" 1>&6
21359 have_slp=no
21360 fi
21361
21362                 if test $have_slp = yes ; then
21363                         cat >> confdefs.h <<\EOF
21364 #define HAVE_SLP 1
21365 EOF
21366
21367                         SLAPD_SLP_LIBS=-lslp
21368                 fi
21369
21370         elif test $ol_enable_slp = yes ; then
21371                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21372         fi
21373 fi
21374
21375
21376 echo $ac_n "checking long long""... $ac_c" 1>&6
21377 echo "configure:21378: checking long long" >&5
21378 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21379   echo $ac_n "(cached) $ac_c" 1>&6
21380 else
21381   
21382         cat > conftest.$ac_ext <<EOF
21383 #line 21384 "configure"
21384 #include "confdefs.h"
21385
21386 int main() {
21387 long long x;
21388 ; return 0; }
21389 EOF
21390 if { (eval echo configure:21391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21391   rm -rf conftest*
21392   ol_cv_type_long_long=yes
21393 else
21394   echo "configure: failed program was:" >&5
21395   cat conftest.$ac_ext >&5
21396   rm -rf conftest*
21397   ol_cv_type_long_long=no
21398 fi
21399 rm -f conftest*
21400 fi
21401
21402 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21403 if test $ol_cv_type_long_long = yes; then
21404         cat >> confdefs.h <<\EOF
21405 #define HAVE_LONG_LONG 1
21406 EOF
21407
21408 fi
21409
21410 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21411 echo "configure:21412: checking for ANSI C header files" >&5
21412 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21413   echo $ac_n "(cached) $ac_c" 1>&6
21414 else
21415   cat > conftest.$ac_ext <<EOF
21416 #line 21417 "configure"
21417 #include "confdefs.h"
21418 #include <stdlib.h>
21419 #include <stdarg.h>
21420 #include <string.h>
21421 #include <float.h>
21422 EOF
21423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21424 { (eval echo configure:21425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21426 if test -z "$ac_err"; then
21427   rm -rf conftest*
21428   ac_cv_header_stdc=yes
21429 else
21430   echo "$ac_err" >&5
21431   echo "configure: failed program was:" >&5
21432   cat conftest.$ac_ext >&5
21433   rm -rf conftest*
21434   ac_cv_header_stdc=no
21435 fi
21436 rm -f conftest*
21437
21438 if test $ac_cv_header_stdc = yes; then
21439   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21440 cat > conftest.$ac_ext <<EOF
21441 #line 21442 "configure"
21442 #include "confdefs.h"
21443 #include <string.h>
21444 EOF
21445 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21446   egrep "memchr" >/dev/null 2>&1; then
21447   :
21448 else
21449   rm -rf conftest*
21450   ac_cv_header_stdc=no
21451 fi
21452 rm -f conftest*
21453
21454 fi
21455
21456 if test $ac_cv_header_stdc = yes; then
21457   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21458 cat > conftest.$ac_ext <<EOF
21459 #line 21460 "configure"
21460 #include "confdefs.h"
21461 #include <stdlib.h>
21462 EOF
21463 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21464   egrep "free" >/dev/null 2>&1; then
21465   :
21466 else
21467   rm -rf conftest*
21468   ac_cv_header_stdc=no
21469 fi
21470 rm -f conftest*
21471
21472 fi
21473
21474 if test $ac_cv_header_stdc = yes; then
21475   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21476 if test "$cross_compiling" = yes; then
21477   :
21478 else
21479   cat > conftest.$ac_ext <<EOF
21480 #line 21481 "configure"
21481 #include "confdefs.h"
21482 #include <ctype.h>
21483 #if ((' ' & 0x0FF) == 0x020)
21484 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21485 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21486 #else
21487 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21488  || ('j' <= (c) && (c) <= 'r') \
21489  || ('s' <= (c) && (c) <= 'z'))
21490 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21491 #endif
21492 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21493 int main () { int i; for (i = 0; i < 256; i++)
21494 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21495 exit (0); }
21496
21497 EOF
21498 if { (eval echo configure:21499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21499 then
21500   :
21501 else
21502   echo "configure: failed program was:" >&5
21503   cat conftest.$ac_ext >&5
21504   rm -fr conftest*
21505   ac_cv_header_stdc=no
21506 fi
21507 rm -fr conftest*
21508 fi
21509
21510 fi
21511 fi
21512
21513 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21514 if test $ac_cv_header_stdc = yes; then
21515   cat >> confdefs.h <<\EOF
21516 #define STDC_HEADERS 1
21517 EOF
21518
21519 fi
21520
21521 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21522 echo "configure:21523: checking for mode_t" >&5
21523 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21524   echo $ac_n "(cached) $ac_c" 1>&6
21525 else
21526   cat > conftest.$ac_ext <<EOF
21527 #line 21528 "configure"
21528 #include "confdefs.h"
21529 #include <sys/types.h>
21530 #if STDC_HEADERS
21531 #include <stdlib.h>
21532 #include <stddef.h>
21533 #endif
21534
21535 EOF
21536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21537   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21538   rm -rf conftest*
21539   eval "ac_cv_type_mode_t=yes"
21540 else
21541   rm -rf conftest*
21542   eval "ac_cv_type_mode_t=no"
21543 fi
21544 rm -f conftest*
21545
21546 fi
21547 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21548   echo "$ac_t""yes" 1>&6
21549 else
21550   echo "$ac_t""no" 1>&6
21551   cat >> confdefs.h <<EOF
21552 #define mode_t int
21553 EOF
21554
21555 fi
21556
21557 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21558 echo "configure:21559: checking for off_t" >&5
21559 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21560   echo $ac_n "(cached) $ac_c" 1>&6
21561 else
21562   cat > conftest.$ac_ext <<EOF
21563 #line 21564 "configure"
21564 #include "confdefs.h"
21565 #include <sys/types.h>
21566 #if STDC_HEADERS
21567 #include <stdlib.h>
21568 #include <stddef.h>
21569 #endif
21570
21571 EOF
21572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21573   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21574   rm -rf conftest*
21575   eval "ac_cv_type_off_t=yes"
21576 else
21577   rm -rf conftest*
21578   eval "ac_cv_type_off_t=no"
21579 fi
21580 rm -f conftest*
21581
21582 fi
21583 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21584   echo "$ac_t""yes" 1>&6
21585 else
21586   echo "$ac_t""no" 1>&6
21587   cat >> confdefs.h <<EOF
21588 #define off_t long
21589 EOF
21590
21591 fi
21592
21593 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21594 echo "configure:21595: checking for pid_t" >&5
21595 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21596   echo $ac_n "(cached) $ac_c" 1>&6
21597 else
21598   cat > conftest.$ac_ext <<EOF
21599 #line 21600 "configure"
21600 #include "confdefs.h"
21601 #include <sys/types.h>
21602 #if STDC_HEADERS
21603 #include <stdlib.h>
21604 #include <stddef.h>
21605 #endif
21606
21607 EOF
21608 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21609   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21610   rm -rf conftest*
21611   eval "ac_cv_type_pid_t=yes"
21612 else
21613   rm -rf conftest*
21614   eval "ac_cv_type_pid_t=no"
21615 fi
21616 rm -f conftest*
21617
21618 fi
21619 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21620   echo "$ac_t""yes" 1>&6
21621 else
21622   echo "$ac_t""no" 1>&6
21623   cat >> confdefs.h <<EOF
21624 #define pid_t int
21625 EOF
21626
21627 fi
21628
21629 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21630 echo "configure:21631: checking for ptrdiff_t" >&5
21631 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21632   echo $ac_n "(cached) $ac_c" 1>&6
21633 else
21634   cat > conftest.$ac_ext <<EOF
21635 #line 21636 "configure"
21636 #include "confdefs.h"
21637 #include <stddef.h>
21638 int main() {
21639 ptrdiff_t p
21640 ; return 0; }
21641 EOF
21642 if { (eval echo configure:21643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21643   rm -rf conftest*
21644   am_cv_type_ptrdiff_t=yes
21645 else
21646   echo "configure: failed program was:" >&5
21647   cat conftest.$ac_ext >&5
21648   rm -rf conftest*
21649   am_cv_type_ptrdiff_t=no
21650 fi
21651 rm -f conftest*
21652 fi
21653
21654 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21655    if test $am_cv_type_ptrdiff_t = yes; then
21656      cat >> confdefs.h <<\EOF
21657 #define HAVE_PTRDIFF_T 1
21658 EOF
21659
21660    fi
21661
21662 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21663 echo "configure:21664: checking return type of signal handlers" >&5
21664 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21665   echo $ac_n "(cached) $ac_c" 1>&6
21666 else
21667   cat > conftest.$ac_ext <<EOF
21668 #line 21669 "configure"
21669 #include "confdefs.h"
21670 #include <sys/types.h>
21671 #include <signal.h>
21672 #ifdef signal
21673 #undef signal
21674 #endif
21675 #ifdef __cplusplus
21676 extern "C" void (*signal (int, void (*)(int)))(int);
21677 #else
21678 void (*signal ()) ();
21679 #endif
21680
21681 int main() {
21682 int i;
21683 ; return 0; }
21684 EOF
21685 if { (eval echo configure:21686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21686   rm -rf conftest*
21687   ac_cv_type_signal=void
21688 else
21689   echo "configure: failed program was:" >&5
21690   cat conftest.$ac_ext >&5
21691   rm -rf conftest*
21692   ac_cv_type_signal=int
21693 fi
21694 rm -f conftest*
21695 fi
21696
21697 echo "$ac_t""$ac_cv_type_signal" 1>&6
21698 cat >> confdefs.h <<EOF
21699 #define RETSIGTYPE $ac_cv_type_signal
21700 EOF
21701
21702
21703 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21704 echo "configure:21705: checking for size_t" >&5
21705 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21706   echo $ac_n "(cached) $ac_c" 1>&6
21707 else
21708   cat > conftest.$ac_ext <<EOF
21709 #line 21710 "configure"
21710 #include "confdefs.h"
21711 #include <sys/types.h>
21712 #if STDC_HEADERS
21713 #include <stdlib.h>
21714 #include <stddef.h>
21715 #endif
21716
21717 EOF
21718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21719   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21720   rm -rf conftest*
21721   eval "ac_cv_type_size_t=yes"
21722 else
21723   rm -rf conftest*
21724   eval "ac_cv_type_size_t=no"
21725 fi
21726 rm -f conftest*
21727
21728 fi
21729 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21730   echo "$ac_t""yes" 1>&6
21731 else
21732   echo "$ac_t""no" 1>&6
21733   cat >> confdefs.h <<EOF
21734 #define size_t unsigned
21735 EOF
21736
21737 fi
21738
21739
21740 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21741 echo "configure:21742: checking for ssize_t" >&5
21742 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21743   echo $ac_n "(cached) $ac_c" 1>&6
21744 else
21745   cat > conftest.$ac_ext <<EOF
21746 #line 21747 "configure"
21747 #include "confdefs.h"
21748 #include <sys/types.h>
21749 #if STDC_HEADERS
21750 #include <stdlib.h>
21751 #include <stddef.h>
21752 #endif
21753
21754 EOF
21755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21756   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21757   rm -rf conftest*
21758   eval "ac_cv_type_ssize_t=yes"
21759 else
21760   rm -rf conftest*
21761   eval "ac_cv_type_ssize_t=no"
21762 fi
21763 rm -f conftest*
21764
21765 fi
21766 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21767   echo "$ac_t""yes" 1>&6
21768 else
21769   echo "$ac_t""no" 1>&6
21770   cat >> confdefs.h <<EOF
21771 #define ssize_t signed int
21772 EOF
21773
21774 fi
21775
21776 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21777 echo "configure:21778: checking for caddr_t" >&5
21778 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21779   echo $ac_n "(cached) $ac_c" 1>&6
21780 else
21781   cat > conftest.$ac_ext <<EOF
21782 #line 21783 "configure"
21783 #include "confdefs.h"
21784 #include <sys/types.h>
21785 #if STDC_HEADERS
21786 #include <stdlib.h>
21787 #include <stddef.h>
21788 #endif
21789
21790 EOF
21791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21792   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21793   rm -rf conftest*
21794   eval "ac_cv_type_caddr_t=yes"
21795 else
21796   rm -rf conftest*
21797   eval "ac_cv_type_caddr_t=no"
21798 fi
21799 rm -f conftest*
21800
21801 fi
21802 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21803   echo "$ac_t""yes" 1>&6
21804 else
21805   echo "$ac_t""no" 1>&6
21806   cat >> confdefs.h <<EOF
21807 #define caddr_t char *
21808 EOF
21809
21810 fi
21811
21812
21813 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21814 echo "configure:21815: checking for socklen_t" >&5
21815 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21816   echo $ac_n "(cached) $ac_c" 1>&6
21817 else
21818   cat > conftest.$ac_ext <<EOF
21819 #line 21820 "configure"
21820 #include "confdefs.h"
21821
21822 #ifdef HAVE_SYS_TYPES_H
21823 #include <sys/types.h>
21824 #endif
21825 #ifdef HAVE_SYS_SOCKET_H
21826 #include <sys/socket.h>
21827 #endif
21828
21829 int main() {
21830 socklen_t len;
21831 ; return 0; }
21832 EOF
21833 if { (eval echo configure:21834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21834   rm -rf conftest*
21835   ol_cv_type_socklen_t=yes
21836 else
21837   echo "configure: failed program was:" >&5
21838   cat conftest.$ac_ext >&5
21839   rm -rf conftest*
21840   ol_cv_type_socklen_t=no
21841 fi
21842 rm -f conftest*
21843 fi
21844
21845 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21846   if test $ol_cv_type_socklen_t = no; then
21847     cat >> confdefs.h <<\EOF
21848 #define socklen_t int
21849 EOF
21850
21851   fi
21852  
21853 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21854 echo "configure:21855: checking for member st_blksize in aggregate type struct stat" >&5
21855 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21856   echo $ac_n "(cached) $ac_c" 1>&6
21857 else
21858   cat > conftest.$ac_ext <<EOF
21859 #line 21860 "configure"
21860 #include "confdefs.h"
21861 #include <sys/types.h>
21862 #include <sys/stat.h>
21863 int main() {
21864 struct stat foo; foo.st_blksize;
21865 ; return 0; }
21866 EOF
21867 if { (eval echo configure:21868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21868   rm -rf conftest*
21869   ac_cv_c_struct_member_st_blksize=yes
21870 else
21871   echo "configure: failed program was:" >&5
21872   cat conftest.$ac_ext >&5
21873   rm -rf conftest*
21874   ac_cv_c_struct_member_st_blksize=no
21875 fi
21876 rm -f conftest*
21877 fi
21878
21879 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21880 st_blksize="$ac_cv_c_struct_member_st_blksize"
21881 if test $ac_cv_c_struct_member_st_blksize = yes; then
21882   cat >> confdefs.h <<\EOF
21883 #define HAVE_ST_BLKSIZE 1
21884 EOF
21885
21886 fi
21887
21888 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21889 echo "configure:21890: checking whether time.h and sys/time.h may both be included" >&5
21890 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21891   echo $ac_n "(cached) $ac_c" 1>&6
21892 else
21893   cat > conftest.$ac_ext <<EOF
21894 #line 21895 "configure"
21895 #include "confdefs.h"
21896 #include <sys/types.h>
21897 #include <sys/time.h>
21898 #include <time.h>
21899 int main() {
21900 struct tm *tp;
21901 ; return 0; }
21902 EOF
21903 if { (eval echo configure:21904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21904   rm -rf conftest*
21905   ac_cv_header_time=yes
21906 else
21907   echo "configure: failed program was:" >&5
21908   cat conftest.$ac_ext >&5
21909   rm -rf conftest*
21910   ac_cv_header_time=no
21911 fi
21912 rm -f conftest*
21913 fi
21914
21915 echo "$ac_t""$ac_cv_header_time" 1>&6
21916 if test $ac_cv_header_time = yes; then
21917   cat >> confdefs.h <<\EOF
21918 #define TIME_WITH_SYS_TIME 1
21919 EOF
21920
21921 fi
21922
21923 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21924 echo "configure:21925: checking whether struct tm is in sys/time.h or time.h" >&5
21925 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21926   echo $ac_n "(cached) $ac_c" 1>&6
21927 else
21928   cat > conftest.$ac_ext <<EOF
21929 #line 21930 "configure"
21930 #include "confdefs.h"
21931 #include <sys/types.h>
21932 #include <time.h>
21933 int main() {
21934 struct tm *tp; tp->tm_sec;
21935 ; return 0; }
21936 EOF
21937 if { (eval echo configure:21938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21938   rm -rf conftest*
21939   ac_cv_struct_tm=time.h
21940 else
21941   echo "configure: failed program was:" >&5
21942   cat conftest.$ac_ext >&5
21943   rm -rf conftest*
21944   ac_cv_struct_tm=sys/time.h
21945 fi
21946 rm -f conftest*
21947 fi
21948
21949 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21950 if test $ac_cv_struct_tm = sys/time.h; then
21951   cat >> confdefs.h <<\EOF
21952 #define TM_IN_SYS_TIME 1
21953 EOF
21954
21955 fi
21956
21957 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21958 echo "configure:21959: checking for uid_t in sys/types.h" >&5
21959 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21960   echo $ac_n "(cached) $ac_c" 1>&6
21961 else
21962   cat > conftest.$ac_ext <<EOF
21963 #line 21964 "configure"
21964 #include "confdefs.h"
21965 #include <sys/types.h>
21966 EOF
21967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21968   egrep "uid_t" >/dev/null 2>&1; then
21969   rm -rf conftest*
21970   ac_cv_type_uid_t=yes
21971 else
21972   rm -rf conftest*
21973   ac_cv_type_uid_t=no
21974 fi
21975 rm -f conftest*
21976
21977 fi
21978
21979 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21980 if test $ac_cv_type_uid_t = no; then
21981   cat >> confdefs.h <<\EOF
21982 #define uid_t int
21983 EOF
21984
21985   cat >> confdefs.h <<\EOF
21986 #define gid_t int
21987 EOF
21988
21989 fi
21990
21991 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21992 echo "configure:21993: checking for sig_atomic_t" >&5
21993 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21994   echo $ac_n "(cached) $ac_c" 1>&6
21995 else
21996   cat > conftest.$ac_ext <<EOF
21997 #line 21998 "configure"
21998 #include "confdefs.h"
21999 #include <signal.h>
22000 int main() {
22001 sig_atomic_t atomic;
22002 ; return 0; }
22003 EOF
22004 if { (eval echo configure:22005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22005   rm -rf conftest*
22006   ol_cv_type_sig_atomic_t=yes
22007 else
22008   echo "configure: failed program was:" >&5
22009   cat conftest.$ac_ext >&5
22010   rm -rf conftest*
22011   ol_cv_type_sig_atomic_t=no
22012 fi
22013 rm -f conftest*
22014 fi
22015
22016 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22017   if test $ol_cv_type_sig_atomic_t = no; then
22018     cat >> confdefs.h <<\EOF
22019 #define sig_atomic_t int
22020 EOF
22021
22022   fi
22023  
22024
22025
22026 # test for pw_gecos in struct passwd
22027 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22028 echo "configure:22029: checking struct passwd for pw_gecos" >&5
22029 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22030   echo $ac_n "(cached) $ac_c" 1>&6
22031 else
22032   
22033         cat > conftest.$ac_ext <<EOF
22034 #line 22035 "configure"
22035 #include "confdefs.h"
22036 #include <pwd.h>
22037 int main() {
22038
22039         struct passwd pwd;
22040         pwd.pw_gecos = pwd.pw_name;
22041
22042 ; return 0; }
22043 EOF
22044 if { (eval echo configure:22045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22045   rm -rf conftest*
22046   ol_cv_struct_passwd_pw_gecos=yes
22047 else
22048   echo "configure: failed program was:" >&5
22049   cat conftest.$ac_ext >&5
22050   rm -rf conftest*
22051   ol_cv_struct_passwd_pw_gecos=no
22052 fi
22053 rm -f conftest*
22054 fi
22055
22056 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22057 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22058         cat >> confdefs.h <<\EOF
22059 #define HAVE_PW_GECOS 1
22060 EOF
22061
22062 fi
22063
22064 # test for pw_passwd in struct passwd
22065 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22066 echo "configure:22067: checking struct passwd for pw_passwd" >&5
22067 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22068   echo $ac_n "(cached) $ac_c" 1>&6
22069 else
22070   
22071         cat > conftest.$ac_ext <<EOF
22072 #line 22073 "configure"
22073 #include "confdefs.h"
22074 #include <pwd.h>
22075 int main() {
22076
22077         struct passwd pwd;
22078         pwd.pw_passwd = pwd.pw_name;
22079
22080 ; return 0; }
22081 EOF
22082 if { (eval echo configure:22083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22083   rm -rf conftest*
22084   ol_cv_struct_passwd_pw_passwd=yes
22085 else
22086   echo "configure: failed program was:" >&5
22087   cat conftest.$ac_ext >&5
22088   rm -rf conftest*
22089   ol_cv_struct_passwd_pw_passwd=no
22090 fi
22091 rm -f conftest*
22092 fi
22093
22094 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22095 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22096         cat >> confdefs.h <<\EOF
22097 #define HAVE_PW_PASSWD 1
22098 EOF
22099
22100 fi
22101
22102
22103 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22104 echo "configure:22105: checking if toupper() requires islower()" >&5
22105 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22106   echo $ac_n "(cached) $ac_c" 1>&6
22107 else
22108   
22109         if test "$cross_compiling" = yes; then
22110   ol_cv_c_upper_lower=safe
22111 else
22112   cat > conftest.$ac_ext <<EOF
22113 #line 22114 "configure"
22114 #include "confdefs.h"
22115
22116 #include <ctype.h>
22117 main()
22118 {
22119         if ('C' == toupper('C'))
22120                 exit(0);
22121         else
22122                 exit(1);
22123 }
22124 EOF
22125 if { (eval echo configure:22126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22126 then
22127   ol_cv_c_upper_lower=no
22128 else
22129   echo "configure: failed program was:" >&5
22130   cat conftest.$ac_ext >&5
22131   rm -fr conftest*
22132   ol_cv_c_upper_lower=yes
22133 fi
22134 rm -fr conftest*
22135 fi
22136
22137 fi
22138
22139 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22140 if test $ol_cv_c_upper_lower != no ; then
22141         cat >> confdefs.h <<\EOF
22142 #define C_UPPER_LOWER 1
22143 EOF
22144
22145 fi
22146
22147 echo $ac_n "checking for working const""... $ac_c" 1>&6
22148 echo "configure:22149: checking for working const" >&5
22149 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22150   echo $ac_n "(cached) $ac_c" 1>&6
22151 else
22152   cat > conftest.$ac_ext <<EOF
22153 #line 22154 "configure"
22154 #include "confdefs.h"
22155
22156 int main() {
22157
22158 /* Ultrix mips cc rejects this.  */
22159 typedef int charset[2]; const charset x;
22160 /* SunOS 4.1.1 cc rejects this.  */
22161 char const *const *ccp;
22162 char **p;
22163 /* NEC SVR4.0.2 mips cc rejects this.  */
22164 struct point {int x, y;};
22165 static struct point const zero = {0,0};
22166 /* AIX XL C 1.02.0.0 rejects this.
22167    It does not let you subtract one const X* pointer from another in an arm
22168    of an if-expression whose if-part is not a constant expression */
22169 const char *g = "string";
22170 ccp = &g + (g ? g-g : 0);
22171 /* HPUX 7.0 cc rejects these. */
22172 ++ccp;
22173 p = (char**) ccp;
22174 ccp = (char const *const *) p;
22175 { /* SCO 3.2v4 cc rejects this.  */
22176   char *t;
22177   char const *s = 0 ? (char *) 0 : (char const *) 0;
22178
22179   *t++ = 0;
22180 }
22181 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22182   int x[] = {25, 17};
22183   const int *foo = &x[0];
22184   ++foo;
22185 }
22186 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22187   typedef const int *iptr;
22188   iptr p = 0;
22189   ++p;
22190 }
22191 { /* AIX XL C 1.02.0.0 rejects this saying
22192      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22193   struct s { int j; const int *ap[3]; };
22194   struct s *b; b->j = 5;
22195 }
22196 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22197   const int foo = 10;
22198 }
22199
22200 ; return 0; }
22201 EOF
22202 if { (eval echo configure:22203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22203   rm -rf conftest*
22204   ac_cv_c_const=yes
22205 else
22206   echo "configure: failed program was:" >&5
22207   cat conftest.$ac_ext >&5
22208   rm -rf conftest*
22209   ac_cv_c_const=no
22210 fi
22211 rm -f conftest*
22212 fi
22213
22214 echo "$ac_t""$ac_cv_c_const" 1>&6
22215 if test $ac_cv_c_const = no; then
22216   cat >> confdefs.h <<\EOF
22217 #define const 
22218 EOF
22219
22220 fi
22221
22222 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22223 echo "configure:22224: checking if compiler understands volatile" >&5
22224 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22225   echo $ac_n "(cached) $ac_c" 1>&6
22226 else
22227   cat > conftest.$ac_ext <<EOF
22228 #line 22229 "configure"
22229 #include "confdefs.h"
22230 int x, y, z;
22231 int main() {
22232 volatile int a; int * volatile b = x ? &y : &z;
22233       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22234       *b = 0;
22235 ; return 0; }
22236 EOF
22237 if { (eval echo configure:22238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22238   rm -rf conftest*
22239   ol_cv_c_volatile=yes
22240 else
22241   echo "configure: failed program was:" >&5
22242   cat conftest.$ac_ext >&5
22243   rm -rf conftest*
22244   ol_cv_c_volatile=no
22245 fi
22246 rm -f conftest*
22247 fi
22248
22249 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22250   if test $ol_cv_c_volatile = yes; then
22251     : 
22252   else
22253     cat >> confdefs.h <<\EOF
22254 #define volatile 
22255 EOF
22256
22257   fi
22258  
22259
22260 if test $cross_compiling = yes ; then
22261         cat >> confdefs.h <<\EOF
22262 #define CROSS_COMPILING 1
22263 EOF
22264
22265 else
22266         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22267 echo "configure:22268: checking whether byte ordering is bigendian" >&5
22268 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22269   echo $ac_n "(cached) $ac_c" 1>&6
22270 else
22271   ac_cv_c_bigendian=unknown
22272 # See if sys/param.h defines the BYTE_ORDER macro.
22273 cat > conftest.$ac_ext <<EOF
22274 #line 22275 "configure"
22275 #include "confdefs.h"
22276 #include <sys/types.h>
22277 #include <sys/param.h>
22278 int main() {
22279
22280 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22281  bogus endian macros
22282 #endif
22283 ; return 0; }
22284 EOF
22285 if { (eval echo configure:22286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22286   rm -rf conftest*
22287   # It does; now see whether it defined to BIG_ENDIAN or not.
22288 cat > conftest.$ac_ext <<EOF
22289 #line 22290 "configure"
22290 #include "confdefs.h"
22291 #include <sys/types.h>
22292 #include <sys/param.h>
22293 int main() {
22294
22295 #if BYTE_ORDER != BIG_ENDIAN
22296  not big endian
22297 #endif
22298 ; return 0; }
22299 EOF
22300 if { (eval echo configure:22301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22301   rm -rf conftest*
22302   ac_cv_c_bigendian=yes
22303 else
22304   echo "configure: failed program was:" >&5
22305   cat conftest.$ac_ext >&5
22306   rm -rf conftest*
22307   ac_cv_c_bigendian=no
22308 fi
22309 rm -f conftest*
22310 else
22311   echo "configure: failed program was:" >&5
22312   cat conftest.$ac_ext >&5
22313 fi
22314 rm -f conftest*
22315 if test $ac_cv_c_bigendian = unknown; then
22316 if test "$cross_compiling" = yes; then
22317     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22318 else
22319   cat > conftest.$ac_ext <<EOF
22320 #line 22321 "configure"
22321 #include "confdefs.h"
22322 main () {
22323   /* Are we little or big endian?  From Harbison&Steele.  */
22324   union
22325   {
22326     long l;
22327     char c[sizeof (long)];
22328   } u;
22329   u.l = 1;
22330   exit (u.c[sizeof (long) - 1] == 1);
22331 }
22332 EOF
22333 if { (eval echo configure:22334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22334 then
22335   ac_cv_c_bigendian=no
22336 else
22337   echo "configure: failed program was:" >&5
22338   cat conftest.$ac_ext >&5
22339   rm -fr conftest*
22340   ac_cv_c_bigendian=yes
22341 fi
22342 rm -fr conftest*
22343 fi
22344
22345 fi
22346 fi
22347
22348 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22349 if test $ac_cv_c_bigendian = yes; then
22350   cat >> confdefs.h <<\EOF
22351 #define WORDS_BIGENDIAN 1
22352 EOF
22353
22354 fi
22355
22356 fi
22357
22358 echo $ac_n "checking size of short""... $ac_c" 1>&6
22359 echo "configure:22360: checking size of short" >&5 
22360 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22361   echo $ac_n "(cached) $ac_c" 1>&6
22362 else
22363   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22364   cat > conftest.$ac_ext <<EOF
22365 #line 22366 "configure"
22366 #include "confdefs.h"
22367 #include "confdefs.h" 
22368 #include <sys/types.h> 
22369  
22370
22371 int main() {
22372 switch (0) case 0: case (sizeof (short) == $ac_size):;
22373 ; return 0; }
22374 EOF
22375 if { (eval echo configure:22376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22376   rm -rf conftest*
22377   ac_cv_sizeof_short=$ac_size
22378 else
22379   echo "configure: failed program was:" >&5
22380   cat conftest.$ac_ext >&5
22381 fi
22382 rm -f conftest* 
22383   if test x$ac_cv_sizeof_short != x ; then break; fi 
22384 done 
22385
22386 fi
22387  
22388 if test x$ac_cv_sizeof_short = x ; then 
22389   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22390 fi 
22391 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22392 cat >> confdefs.h <<EOF
22393 #define SIZEOF_SHORT $ac_cv_sizeof_short
22394 EOF
22395  
22396  
22397 echo $ac_n "checking size of int""... $ac_c" 1>&6
22398 echo "configure:22399: checking size of int" >&5 
22399 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22400   echo $ac_n "(cached) $ac_c" 1>&6
22401 else
22402   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22403   cat > conftest.$ac_ext <<EOF
22404 #line 22405 "configure"
22405 #include "confdefs.h"
22406 #include "confdefs.h" 
22407 #include <sys/types.h> 
22408  
22409
22410 int main() {
22411 switch (0) case 0: case (sizeof (int) == $ac_size):;
22412 ; return 0; }
22413 EOF
22414 if { (eval echo configure:22415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22415   rm -rf conftest*
22416   ac_cv_sizeof_int=$ac_size
22417 else
22418   echo "configure: failed program was:" >&5
22419   cat conftest.$ac_ext >&5
22420 fi
22421 rm -f conftest* 
22422   if test x$ac_cv_sizeof_int != x ; then break; fi 
22423 done 
22424
22425 fi
22426  
22427 if test x$ac_cv_sizeof_int = x ; then 
22428   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22429 fi 
22430 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22431 cat >> confdefs.h <<EOF
22432 #define SIZEOF_INT $ac_cv_sizeof_int
22433 EOF
22434  
22435  
22436 echo $ac_n "checking size of long""... $ac_c" 1>&6
22437 echo "configure:22438: checking size of long" >&5 
22438 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22439   echo $ac_n "(cached) $ac_c" 1>&6
22440 else
22441   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22442   cat > conftest.$ac_ext <<EOF
22443 #line 22444 "configure"
22444 #include "confdefs.h"
22445 #include "confdefs.h" 
22446 #include <sys/types.h> 
22447  
22448
22449 int main() {
22450 switch (0) case 0: case (sizeof (long) == $ac_size):;
22451 ; return 0; }
22452 EOF
22453 if { (eval echo configure:22454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22454   rm -rf conftest*
22455   ac_cv_sizeof_long=$ac_size
22456 else
22457   echo "configure: failed program was:" >&5
22458   cat conftest.$ac_ext >&5
22459 fi
22460 rm -f conftest* 
22461   if test x$ac_cv_sizeof_long != x ; then break; fi 
22462 done 
22463
22464 fi
22465  
22466 if test x$ac_cv_sizeof_long = x ; then 
22467   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22468 fi 
22469 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22470 cat >> confdefs.h <<EOF
22471 #define SIZEOF_LONG $ac_cv_sizeof_long
22472 EOF
22473  
22474
22475
22476 if test "$ac_cv_sizeof_int" -lt 4 ; then
22477         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22478
22479         cat >> confdefs.h <<\EOF
22480 #define LBER_INT_T long
22481 EOF
22482
22483 else
22484         cat >> confdefs.h <<\EOF
22485 #define LBER_INT_T int
22486 EOF
22487
22488 fi
22489
22490 cat >> confdefs.h <<\EOF
22491 #define LBER_LEN_T long
22492 EOF
22493
22494 cat >> confdefs.h <<\EOF
22495 #define LBER_SOCKET_T int
22496 EOF
22497
22498 cat >> confdefs.h <<\EOF
22499 #define LBER_TAG_T long
22500 EOF
22501
22502
22503 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22504 echo "configure:22505: checking for 8-bit clean memcmp" >&5
22505 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22506   echo $ac_n "(cached) $ac_c" 1>&6
22507 else
22508   if test "$cross_compiling" = yes; then
22509   ac_cv_func_memcmp_clean=no
22510 else
22511   cat > conftest.$ac_ext <<EOF
22512 #line 22513 "configure"
22513 #include "confdefs.h"
22514
22515 main()
22516 {
22517   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22518   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22519 }
22520
22521 EOF
22522 if { (eval echo configure:22523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22523 then
22524   ac_cv_func_memcmp_clean=yes
22525 else
22526   echo "configure: failed program was:" >&5
22527   cat conftest.$ac_ext >&5
22528   rm -fr conftest*
22529   ac_cv_func_memcmp_clean=no
22530 fi
22531 rm -fr conftest*
22532 fi
22533
22534 fi
22535
22536 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22537 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22538
22539 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22540 echo "configure:22541: checking for strftime" >&5
22541 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22542   echo $ac_n "(cached) $ac_c" 1>&6
22543 else
22544   cat > conftest.$ac_ext <<EOF
22545 #line 22546 "configure"
22546 #include "confdefs.h"
22547 /* System header to define __stub macros and hopefully few prototypes,
22548     which can conflict with char strftime(); below.  */
22549 #include <assert.h>
22550 /* Override any gcc2 internal prototype to avoid an error.  */
22551 /* We use char because int might match the return type of a gcc2
22552     builtin and then its argument prototype would still apply.  */
22553 char strftime();
22554 char (*f)();
22555
22556 int main() {
22557
22558 /* The GNU C library defines this for functions which it implements
22559     to always fail with ENOSYS.  Some functions are actually named
22560     something starting with __ and the normal name is an alias.  */
22561 #if defined (__stub_strftime) || defined (__stub___strftime)
22562 choke me
22563 #else
22564 f = strftime;
22565 #endif
22566
22567 ; return 0; }
22568 EOF
22569 if { (eval echo configure:22570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22570   rm -rf conftest*
22571   eval "ac_cv_func_strftime=yes"
22572 else
22573   echo "configure: failed program was:" >&5
22574   cat conftest.$ac_ext >&5
22575   rm -rf conftest*
22576   eval "ac_cv_func_strftime=no"
22577 fi
22578 rm -f conftest*
22579 fi
22580
22581 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22582   echo "$ac_t""yes" 1>&6
22583   cat >> confdefs.h <<\EOF
22584 #define HAVE_STRFTIME 1
22585 EOF
22586
22587 else
22588   echo "$ac_t""no" 1>&6
22589 # strftime is in -lintl on SCO UNIX.
22590 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22591 echo "configure:22592: checking for strftime in -lintl" >&5
22592 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22593 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22594   echo $ac_n "(cached) $ac_c" 1>&6
22595 else
22596   ac_save_LIBS="$LIBS"
22597 LIBS="-lintl  $LIBS"
22598 cat > conftest.$ac_ext <<EOF
22599 #line 22600 "configure"
22600 #include "confdefs.h"
22601 /* Override any gcc2 internal prototype to avoid an error.  */
22602 /* We use char because int might match the return type of a gcc2
22603     builtin and then its argument prototype would still apply.  */
22604 char strftime();
22605
22606 int main() {
22607 strftime()
22608 ; return 0; }
22609 EOF
22610 if { (eval echo configure:22611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22611   rm -rf conftest*
22612   eval "ac_cv_lib_$ac_lib_var=yes"
22613 else
22614   echo "configure: failed program was:" >&5
22615   cat conftest.$ac_ext >&5
22616   rm -rf conftest*
22617   eval "ac_cv_lib_$ac_lib_var=no"
22618 fi
22619 rm -f conftest*
22620 LIBS="$ac_save_LIBS"
22621
22622 fi
22623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22624   echo "$ac_t""yes" 1>&6
22625   cat >> confdefs.h <<\EOF
22626 #define HAVE_STRFTIME 1
22627 EOF
22628
22629 LIBS="-lintl $LIBS"
22630 else
22631   echo "$ac_t""no" 1>&6
22632 fi
22633
22634 fi
22635
22636
22637 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22638 echo "configure:22639: checking for inet_aton()" >&5
22639 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22640   echo $ac_n "(cached) $ac_c" 1>&6
22641 else
22642   cat > conftest.$ac_ext <<EOF
22643 #line 22644 "configure"
22644 #include "confdefs.h"
22645
22646 #ifdef HAVE_SYS_TYPES_H
22647 #       include <sys/types.h>
22648 #endif
22649 #ifdef HAVE_SYS_SOCKET_H
22650 #       include <sys/socket.h>
22651 #       ifdef HAVE_SYS_SELECT_H
22652 #               include <sys/select.h>
22653 #       endif
22654 #       include <netinet/in.h>
22655 #       ifdef HAVE_ARPA_INET_H
22656 #               include <arpa/inet.h>
22657 #       endif
22658 #endif
22659
22660 int main() {
22661 struct in_addr in;
22662 int rc = inet_aton( "255.255.255.255", &in );
22663 ; return 0; }
22664 EOF
22665 if { (eval echo configure:22666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22666   rm -rf conftest*
22667   ol_cv_func_inet_aton=yes
22668 else
22669   echo "configure: failed program was:" >&5
22670   cat conftest.$ac_ext >&5
22671   rm -rf conftest*
22672   ol_cv_func_inet_aton=no
22673 fi
22674 rm -f conftest*
22675 fi
22676
22677 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22678   if test $ol_cv_func_inet_aton != no; then
22679     cat >> confdefs.h <<\EOF
22680 #define HAVE_INET_ATON 1
22681 EOF
22682
22683   fi
22684  
22685
22686 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22687 echo "configure:22688: checking for _spawnlp" >&5
22688 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22689   echo $ac_n "(cached) $ac_c" 1>&6
22690 else
22691   cat > conftest.$ac_ext <<EOF
22692 #line 22693 "configure"
22693 #include "confdefs.h"
22694 /* System header to define __stub macros and hopefully few prototypes,
22695     which can conflict with char _spawnlp(); below.  */
22696 #include <assert.h>
22697 /* Override any gcc2 internal prototype to avoid an error.  */
22698 /* We use char because int might match the return type of a gcc2
22699     builtin and then its argument prototype would still apply.  */
22700 char _spawnlp();
22701 char (*f)();
22702
22703 int main() {
22704
22705 /* The GNU C library defines this for functions which it implements
22706     to always fail with ENOSYS.  Some functions are actually named
22707     something starting with __ and the normal name is an alias.  */
22708 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22709 choke me
22710 #else
22711 f = _spawnlp;
22712 #endif
22713
22714 ; return 0; }
22715 EOF
22716 if { (eval echo configure:22717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22717   rm -rf conftest*
22718   eval "ac_cv_func__spawnlp=yes"
22719 else
22720   echo "configure: failed program was:" >&5
22721   cat conftest.$ac_ext >&5
22722   rm -rf conftest*
22723   eval "ac_cv_func__spawnlp=no"
22724 fi
22725 rm -f conftest*
22726 fi
22727
22728 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22729   echo "$ac_t""yes" 1>&6
22730   cat >> confdefs.h <<\EOF
22731 #define HAVE_SPAWNLP 1
22732 EOF
22733
22734 else
22735   echo "$ac_t""no" 1>&6
22736 fi
22737
22738
22739 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22740 echo "configure:22741: checking for _snprintf" >&5
22741 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22742   echo $ac_n "(cached) $ac_c" 1>&6
22743 else
22744   cat > conftest.$ac_ext <<EOF
22745 #line 22746 "configure"
22746 #include "confdefs.h"
22747 /* System header to define __stub macros and hopefully few prototypes,
22748     which can conflict with char _snprintf(); below.  */
22749 #include <assert.h>
22750 /* Override any gcc2 internal prototype to avoid an error.  */
22751 /* We use char because int might match the return type of a gcc2
22752     builtin and then its argument prototype would still apply.  */
22753 char _snprintf();
22754 char (*f)();
22755
22756 int main() {
22757
22758 /* The GNU C library defines this for functions which it implements
22759     to always fail with ENOSYS.  Some functions are actually named
22760     something starting with __ and the normal name is an alias.  */
22761 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22762 choke me
22763 #else
22764 f = _snprintf;
22765 #endif
22766
22767 ; return 0; }
22768 EOF
22769 if { (eval echo configure:22770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22770   rm -rf conftest*
22771   eval "ac_cv_func__snprintf=yes"
22772 else
22773   echo "configure: failed program was:" >&5
22774   cat conftest.$ac_ext >&5
22775   rm -rf conftest*
22776   eval "ac_cv_func__snprintf=no"
22777 fi
22778 rm -f conftest*
22779 fi
22780
22781 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22782   echo "$ac_t""yes" 1>&6
22783   ac_cv_func_snprintf=yes
22784         cat >> confdefs.h <<\EOF
22785 #define snprintf _snprintf
22786 EOF
22787
22788
22789 else
22790   echo "$ac_t""no" 1>&6
22791 fi
22792
22793
22794 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22795 echo "configure:22796: checking for _vsnprintf" >&5
22796 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22797   echo $ac_n "(cached) $ac_c" 1>&6
22798 else
22799   cat > conftest.$ac_ext <<EOF
22800 #line 22801 "configure"
22801 #include "confdefs.h"
22802 /* System header to define __stub macros and hopefully few prototypes,
22803     which can conflict with char _vsnprintf(); below.  */
22804 #include <assert.h>
22805 /* Override any gcc2 internal prototype to avoid an error.  */
22806 /* We use char because int might match the return type of a gcc2
22807     builtin and then its argument prototype would still apply.  */
22808 char _vsnprintf();
22809 char (*f)();
22810
22811 int main() {
22812
22813 /* The GNU C library defines this for functions which it implements
22814     to always fail with ENOSYS.  Some functions are actually named
22815     something starting with __ and the normal name is an alias.  */
22816 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22817 choke me
22818 #else
22819 f = _vsnprintf;
22820 #endif
22821
22822 ; return 0; }
22823 EOF
22824 if { (eval echo configure:22825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22825   rm -rf conftest*
22826   eval "ac_cv_func__vsnprintf=yes"
22827 else
22828   echo "configure: failed program was:" >&5
22829   cat conftest.$ac_ext >&5
22830   rm -rf conftest*
22831   eval "ac_cv_func__vsnprintf=no"
22832 fi
22833 rm -f conftest*
22834 fi
22835
22836 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22837   echo "$ac_t""yes" 1>&6
22838   ac_cv_func_vsnprintf=yes
22839         cat >> confdefs.h <<\EOF
22840 #define vsnprintf _vsnprintf
22841 EOF
22842
22843
22844 else
22845   echo "$ac_t""no" 1>&6
22846 fi
22847
22848
22849 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22850 echo "configure:22851: checking for vprintf" >&5
22851 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22852   echo $ac_n "(cached) $ac_c" 1>&6
22853 else
22854   cat > conftest.$ac_ext <<EOF
22855 #line 22856 "configure"
22856 #include "confdefs.h"
22857 /* System header to define __stub macros and hopefully few prototypes,
22858     which can conflict with char vprintf(); below.  */
22859 #include <assert.h>
22860 /* Override any gcc2 internal prototype to avoid an error.  */
22861 /* We use char because int might match the return type of a gcc2
22862     builtin and then its argument prototype would still apply.  */
22863 char vprintf();
22864 char (*f)();
22865
22866 int main() {
22867
22868 /* The GNU C library defines this for functions which it implements
22869     to always fail with ENOSYS.  Some functions are actually named
22870     something starting with __ and the normal name is an alias.  */
22871 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22872 choke me
22873 #else
22874 f = vprintf;
22875 #endif
22876
22877 ; return 0; }
22878 EOF
22879 if { (eval echo configure:22880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22880   rm -rf conftest*
22881   eval "ac_cv_func_vprintf=yes"
22882 else
22883   echo "configure: failed program was:" >&5
22884   cat conftest.$ac_ext >&5
22885   rm -rf conftest*
22886   eval "ac_cv_func_vprintf=no"
22887 fi
22888 rm -f conftest*
22889 fi
22890
22891 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22892   echo "$ac_t""yes" 1>&6
22893   cat >> confdefs.h <<\EOF
22894 #define HAVE_VPRINTF 1
22895 EOF
22896
22897 else
22898   echo "$ac_t""no" 1>&6
22899 fi
22900
22901 if test "$ac_cv_func_vprintf" != yes; then
22902 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22903 echo "configure:22904: checking for _doprnt" >&5
22904 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22905   echo $ac_n "(cached) $ac_c" 1>&6
22906 else
22907   cat > conftest.$ac_ext <<EOF
22908 #line 22909 "configure"
22909 #include "confdefs.h"
22910 /* System header to define __stub macros and hopefully few prototypes,
22911     which can conflict with char _doprnt(); below.  */
22912 #include <assert.h>
22913 /* Override any gcc2 internal prototype to avoid an error.  */
22914 /* We use char because int might match the return type of a gcc2
22915     builtin and then its argument prototype would still apply.  */
22916 char _doprnt();
22917 char (*f)();
22918
22919 int main() {
22920
22921 /* The GNU C library defines this for functions which it implements
22922     to always fail with ENOSYS.  Some functions are actually named
22923     something starting with __ and the normal name is an alias.  */
22924 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22925 choke me
22926 #else
22927 f = _doprnt;
22928 #endif
22929
22930 ; return 0; }
22931 EOF
22932 if { (eval echo configure:22933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22933   rm -rf conftest*
22934   eval "ac_cv_func__doprnt=yes"
22935 else
22936   echo "configure: failed program was:" >&5
22937   cat conftest.$ac_ext >&5
22938   rm -rf conftest*
22939   eval "ac_cv_func__doprnt=no"
22940 fi
22941 rm -f conftest*
22942 fi
22943
22944 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22945   echo "$ac_t""yes" 1>&6
22946   cat >> confdefs.h <<\EOF
22947 #define HAVE_DOPRNT 1
22948 EOF
22949
22950 else
22951   echo "$ac_t""no" 1>&6
22952 fi
22953
22954 fi
22955
22956
22957 if test $ac_cv_func_vprintf = yes ; then
22958                 for ac_func in snprintf vsnprintf
22959 do
22960 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22961 echo "configure:22962: checking for $ac_func" >&5
22962 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22963   echo $ac_n "(cached) $ac_c" 1>&6
22964 else
22965   cat > conftest.$ac_ext <<EOF
22966 #line 22967 "configure"
22967 #include "confdefs.h"
22968 /* System header to define __stub macros and hopefully few prototypes,
22969     which can conflict with char $ac_func(); below.  */
22970 #include <assert.h>
22971 /* Override any gcc2 internal prototype to avoid an error.  */
22972 /* We use char because int might match the return type of a gcc2
22973     builtin and then its argument prototype would still apply.  */
22974 char $ac_func();
22975 char (*f)();
22976
22977 int main() {
22978
22979 /* The GNU C library defines this for functions which it implements
22980     to always fail with ENOSYS.  Some functions are actually named
22981     something starting with __ and the normal name is an alias.  */
22982 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22983 choke me
22984 #else
22985 f = $ac_func;
22986 #endif
22987
22988 ; return 0; }
22989 EOF
22990 if { (eval echo configure:22991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22991   rm -rf conftest*
22992   eval "ac_cv_func_$ac_func=yes"
22993 else
22994   echo "configure: failed program was:" >&5
22995   cat conftest.$ac_ext >&5
22996   rm -rf conftest*
22997   eval "ac_cv_func_$ac_func=no"
22998 fi
22999 rm -f conftest*
23000 fi
23001
23002 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23003   echo "$ac_t""yes" 1>&6
23004     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23005   cat >> confdefs.h <<EOF
23006 #define $ac_tr_func 1
23007 EOF
23008  
23009 else
23010   echo "$ac_t""no" 1>&6
23011 fi
23012 done
23013
23014 fi
23015
23016 for ac_func in \
23017         bcopy                   \
23018         closesocket             \
23019         chroot                  \
23020         endgrent                \
23021         endpwent                \
23022         fcntl                   \
23023         flock                   \
23024         fstat                   \
23025         getdtablesize   \
23026         getgrgid                \
23027         gethostname             \
23028         getpass                 \
23029         getpassphrase   \
23030         getpwuid                \
23031         getpwnam                \
23032         getspnam                \
23033         gettimeofday    \
23034         initgroups              \
23035         lockf                   \
23036         memcpy                  \
23037         memmove                 \
23038         mkstemp                 \
23039         mktemp                  \
23040         pipe                    \
23041         read                    \
23042         recv                    \
23043         recvfrom                \
23044         setpwfile               \
23045         setgid                  \
23046         setegid                 \
23047         setsid                  \
23048         setuid                  \
23049         seteuid                 \
23050         sigaction               \
23051         signal                  \
23052         sigset                  \
23053         strdup                  \
23054         strerror                \
23055         strpbrk                 \
23056         strrchr                 \
23057         strsep                  \
23058         strstr                  \
23059         strtol                  \
23060         strtoul                 \
23061         strtoq                  \
23062         strtouq                 \
23063         strtoll                 \
23064         strspn                  \
23065         sysconf                 \
23066         usleep                  \
23067         waitpid                 \
23068         wait4                   \
23069         write                   \
23070         send                    \
23071         sendmsg                 \
23072         sendto                  \
23073
23074 do
23075 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23076 echo "configure:23077: checking for $ac_func" >&5
23077 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23078   echo $ac_n "(cached) $ac_c" 1>&6
23079 else
23080   cat > conftest.$ac_ext <<EOF
23081 #line 23082 "configure"
23082 #include "confdefs.h"
23083 /* System header to define __stub macros and hopefully few prototypes,
23084     which can conflict with char $ac_func(); below.  */
23085 #include <assert.h>
23086 /* Override any gcc2 internal prototype to avoid an error.  */
23087 /* We use char because int might match the return type of a gcc2
23088     builtin and then its argument prototype would still apply.  */
23089 char $ac_func();
23090 char (*f)();
23091
23092 int main() {
23093
23094 /* The GNU C library defines this for functions which it implements
23095     to always fail with ENOSYS.  Some functions are actually named
23096     something starting with __ and the normal name is an alias.  */
23097 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23098 choke me
23099 #else
23100 f = $ac_func;
23101 #endif
23102
23103 ; return 0; }
23104 EOF
23105 if { (eval echo configure:23106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23106   rm -rf conftest*
23107   eval "ac_cv_func_$ac_func=yes"
23108 else
23109   echo "configure: failed program was:" >&5
23110   cat conftest.$ac_ext >&5
23111   rm -rf conftest*
23112   eval "ac_cv_func_$ac_func=no"
23113 fi
23114 rm -f conftest*
23115 fi
23116
23117 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23118   echo "$ac_t""yes" 1>&6
23119     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23120   cat >> confdefs.h <<EOF
23121 #define $ac_tr_func 1
23122 EOF
23123  
23124 else
23125   echo "$ac_t""no" 1>&6
23126 fi
23127 done
23128
23129
23130 for ac_func in getopt getpeereid
23131 do
23132 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23133 echo "configure:23134: checking for $ac_func" >&5
23134 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23135   echo $ac_n "(cached) $ac_c" 1>&6
23136 else
23137   cat > conftest.$ac_ext <<EOF
23138 #line 23139 "configure"
23139 #include "confdefs.h"
23140 /* System header to define __stub macros and hopefully few prototypes,
23141     which can conflict with char $ac_func(); below.  */
23142 #include <assert.h>
23143 /* Override any gcc2 internal prototype to avoid an error.  */
23144 /* We use char because int might match the return type of a gcc2
23145     builtin and then its argument prototype would still apply.  */
23146 char $ac_func();
23147 char (*f)();
23148
23149 int main() {
23150
23151 /* The GNU C library defines this for functions which it implements
23152     to always fail with ENOSYS.  Some functions are actually named
23153     something starting with __ and the normal name is an alias.  */
23154 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23155 choke me
23156 #else
23157 f = $ac_func;
23158 #endif
23159
23160 ; return 0; }
23161 EOF
23162 if { (eval echo configure:23163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23163   rm -rf conftest*
23164   eval "ac_cv_func_$ac_func=yes"
23165 else
23166   echo "configure: failed program was:" >&5
23167   cat conftest.$ac_ext >&5
23168   rm -rf conftest*
23169   eval "ac_cv_func_$ac_func=no"
23170 fi
23171 rm -f conftest*
23172 fi
23173
23174 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23175   echo "$ac_t""yes" 1>&6
23176     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23177   cat >> confdefs.h <<EOF
23178 #define $ac_tr_func 1
23179 EOF
23180  
23181 else
23182   echo "$ac_t""no" 1>&6
23183 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23184 fi
23185 done
23186
23187
23188
23189 if test "$ac_cv_func_getopt" != yes; then
23190         LIBSRCS="$LIBSRCS getopt.c"
23191 fi
23192 if test "$ac_cv_func_getpeereid" != yes; then
23193         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23194 echo "configure:23195: checking for msg_accrights in msghdr" >&5
23195 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23196   echo $ac_n "(cached) $ac_c" 1>&6
23197 else
23198   cat > conftest.$ac_ext <<EOF
23199 #line 23200 "configure"
23200 #include "confdefs.h"
23201 #include <sys/socket.h>
23202 int main() {
23203 struct msghdr m; m.msg_accrightslen=0
23204 ; return 0; }
23205 EOF
23206 if { (eval echo configure:23207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23207   rm -rf conftest*
23208   ol_cv_msghdr_msg_accrights=yes
23209 else
23210   echo "configure: failed program was:" >&5
23211   cat conftest.$ac_ext >&5
23212   rm -rf conftest*
23213   ol_cv_msghdr_msg_accrights=no
23214 fi
23215 rm -f conftest*
23216         
23217 fi
23218
23219 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23220   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23221         cat >> confdefs.h <<\EOF
23222 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23223 EOF
23224
23225   fi
23226
23227         LIBSRCS="$LIBSRCS getpeereid.c"
23228 fi
23229 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23230         if test "$ac_cv_func_snprintf" != yes; then
23231                 cat >> confdefs.h <<\EOF
23232 #define snprintf ber_pvt_snprintf
23233 EOF
23234
23235         fi
23236         if test "$ac_cv_func_vsnprintf" != yes; then
23237                 cat >> confdefs.h <<\EOF
23238 #define vsnprintf ber_pvt_vsnprintf
23239 EOF
23240
23241         fi
23242 fi
23243
23244 # Check Configuration
23245 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23246 echo "configure:23247: checking declaration of sys_errlist" >&5
23247 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23248   echo $ac_n "(cached) $ac_c" 1>&6
23249 else
23250   
23251         cat > conftest.$ac_ext <<EOF
23252 #line 23253 "configure"
23253 #include "confdefs.h"
23254
23255 #include <stdio.h>
23256 #include <sys/types.h>
23257 #include <errno.h>
23258 #ifdef WINNT
23259 #include <stdlib.h>
23260 #endif 
23261 int main() {
23262 char *c = (char *) *sys_errlist
23263 ; return 0; }
23264 EOF
23265 if { (eval echo configure:23266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23266   rm -rf conftest*
23267   ol_cv_dcl_sys_errlist=yes
23268         ol_cv_have_sys_errlist=yes
23269 else
23270   echo "configure: failed program was:" >&5
23271   cat conftest.$ac_ext >&5
23272   rm -rf conftest*
23273   ol_cv_dcl_sys_errlist=no
23274 fi
23275 rm -f conftest*
23276 fi
23277
23278 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23279 #
23280 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23281 if test $ol_cv_dcl_sys_errlist = no ; then
23282         cat >> confdefs.h <<\EOF
23283 #define DECL_SYS_ERRLIST 1
23284 EOF
23285
23286
23287         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23288 echo "configure:23289: checking existence of sys_errlist" >&5
23289 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23290   echo $ac_n "(cached) $ac_c" 1>&6
23291 else
23292   
23293                 cat > conftest.$ac_ext <<EOF
23294 #line 23295 "configure"
23295 #include "confdefs.h"
23296 #include <errno.h>
23297 int main() {
23298 char *c = (char *) *sys_errlist
23299 ; return 0; }
23300 EOF
23301 if { (eval echo configure:23302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23302   rm -rf conftest*
23303   ol_cv_have_sys_errlist=yes
23304 else
23305   echo "configure: failed program was:" >&5
23306   cat conftest.$ac_ext >&5
23307   rm -rf conftest*
23308   ol_cv_have_sys_errlist=no
23309 fi
23310 rm -f conftest*
23311 fi
23312
23313 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23314 fi
23315 if test $ol_cv_have_sys_errlist = yes ; then
23316         cat >> confdefs.h <<\EOF
23317 #define HAVE_SYS_ERRLIST 1
23318 EOF
23319
23320 fi
23321
23322
23323
23324 if test "$ol_enable_slapi" != no ; then
23325                         for ac_hdr in ltdl.h
23326 do
23327 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23328 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23329 echo "configure:23330: checking for $ac_hdr" >&5
23330 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23331   echo $ac_n "(cached) $ac_c" 1>&6
23332 else
23333   cat > conftest.$ac_ext <<EOF
23334 #line 23335 "configure"
23335 #include "confdefs.h"
23336 #include <$ac_hdr>
23337 EOF
23338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23339 { (eval echo configure:23340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23341 if test -z "$ac_err"; then
23342   rm -rf conftest*
23343   eval "ac_cv_header_$ac_safe=yes"
23344 else
23345   echo "$ac_err" >&5
23346   echo "configure: failed program was:" >&5
23347   cat conftest.$ac_ext >&5
23348   rm -rf conftest*
23349   eval "ac_cv_header_$ac_safe=no"
23350 fi
23351 rm -f conftest*
23352 fi
23353 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23354   echo "$ac_t""yes" 1>&6
23355     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23356   cat >> confdefs.h <<EOF
23357 #define $ac_tr_hdr 1
23358 EOF
23359  
23360 else
23361   echo "$ac_t""no" 1>&6
23362 fi
23363 done
23364
23365
23366         if test $ac_cv_header_ltdl_h != yes ; then
23367                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23368         fi
23369         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23370 echo "configure:23371: checking for lt_dlinit in -lltdl" >&5
23371 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23372 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23373   echo $ac_n "(cached) $ac_c" 1>&6
23374 else
23375   ac_save_LIBS="$LIBS"
23376 LIBS="-lltdl  $LIBS"
23377 cat > conftest.$ac_ext <<EOF
23378 #line 23379 "configure"
23379 #include "confdefs.h"
23380 /* Override any gcc2 internal prototype to avoid an error.  */
23381 /* We use char because int might match the return type of a gcc2
23382     builtin and then its argument prototype would still apply.  */
23383 char lt_dlinit();
23384
23385 int main() {
23386 lt_dlinit()
23387 ; return 0; }
23388 EOF
23389 if { (eval echo configure:23390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23390   rm -rf conftest*
23391   eval "ac_cv_lib_$ac_lib_var=yes"
23392 else
23393   echo "configure: failed program was:" >&5
23394   cat conftest.$ac_ext >&5
23395   rm -rf conftest*
23396   eval "ac_cv_lib_$ac_lib_var=no"
23397 fi
23398 rm -f conftest*
23399 LIBS="$ac_save_LIBS"
23400
23401 fi
23402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23403   echo "$ac_t""yes" 1>&6
23404   
23405                 SLAPI_LIBS=-lltdl
23406                 LIBSLAPI=libslapi.a
23407                 LIBSLAPITOOLS=../libslapi.a
23408                 cat >> confdefs.h <<\EOF
23409 #define HAVE_LIBLTDL 1
23410 EOF
23411
23412         
23413 else
23414   echo "$ac_t""no" 1>&6
23415 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23416 fi
23417
23418
23419         cat >> confdefs.h <<\EOF
23420 #define LDAP_SLAPI 1
23421 EOF
23422
23423 fi
23424
23425 if test "$ol_enable_debug" != no ; then
23426         cat >> confdefs.h <<\EOF
23427 #define LDAP_DEBUG 1
23428 EOF
23429
23430 fi
23431 if test "$ol_enable_syslog" = yes ; then
23432         cat >> confdefs.h <<\EOF
23433 #define LDAP_SYSLOG 1
23434 EOF
23435
23436 fi
23437 if test "$ol_link_kbind" != no ; then
23438         cat >> confdefs.h <<\EOF
23439 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23440 EOF
23441
23442 fi
23443 if test "$ol_enable_proctitle" != no ; then
23444         cat >> confdefs.h <<\EOF
23445 #define LDAP_PROCTITLE 1
23446 EOF
23447
23448 fi
23449 if test "$ol_enable_referrals" != no ; then
23450         cat >> confdefs.h <<\EOF
23451 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23452 EOF
23453
23454 fi
23455 if test "$ol_enable_local" != no; then
23456         cat >> confdefs.h <<\EOF
23457 #define LDAP_PF_LOCAL 1
23458 EOF
23459
23460 fi
23461 if test "$ol_link_ipv6" != no; then
23462         cat >> confdefs.h <<\EOF
23463 #define LDAP_PF_INET6 1
23464 EOF
23465
23466 fi
23467 if test "$ol_enable_cleartext" != no ; then
23468         cat >> confdefs.h <<\EOF
23469 #define SLAPD_CLEARTEXT 1
23470 EOF
23471
23472 fi
23473 if test "$ol_enable_crypt" != no ; then
23474         cat >> confdefs.h <<\EOF
23475 #define SLAPD_CRYPT 1
23476 EOF
23477
23478 fi
23479 if test "$ol_link_kpasswd" != no ; then
23480         cat >> confdefs.h <<\EOF
23481 #define SLAPD_KPASSWD 1
23482 EOF
23483
23484 fi
23485 if test "$ol_link_spasswd" != no ; then
23486         cat >> confdefs.h <<\EOF
23487 #define SLAPD_SPASSWD 1
23488 EOF
23489
23490 fi
23491 if test "$ol_enable_multimaster" != no ; then
23492         cat >> confdefs.h <<\EOF
23493 #define SLAPD_MULTIMASTER 1
23494 EOF
23495
23496 fi
23497 if test "$ol_enable_rlookups" != no ; then
23498         cat >> confdefs.h <<\EOF
23499 #define SLAPD_RLOOKUPS 1
23500 EOF
23501
23502 fi
23503 if test "$ol_enable_aci" != no ; then
23504         cat >> confdefs.h <<\EOF
23505 #define SLAPD_ACI_ENABLED 1
23506 EOF
23507
23508 fi
23509
23510 if test "$ol_link_modules" != no ; then
23511         cat >> confdefs.h <<\EOF
23512 #define SLAPD_MODULES 1
23513 EOF
23514
23515         BUILD_SLAPD=yes
23516         SLAPD_MODULES_LDFLAGS="-dlopen self"
23517 fi
23518
23519 cat >> confdefs.h <<\EOF
23520 #define SLAPD_MOD_STATIC 1
23521 EOF
23522
23523 cat >> confdefs.h <<\EOF
23524 #define SLAPD_MOD_DYNAMIC 2
23525 EOF
23526
23527
23528 if test "$ol_enable_bdb" != no ; then
23529         cat >> confdefs.h <<\EOF
23530 #define SLAPD_BDB 1
23531 EOF
23532
23533         BUILD_SLAPD=yes
23534         BUILD_BDB=yes
23535         if test "$ol_with_bdb_module" != static ; then
23536                 cat >> confdefs.h <<\EOF
23537 #define SLAPD_BDB_DYNAMIC 1
23538 EOF
23539
23540                 BUILD_BDB=mod
23541                 BUILD_BDB_DYNAMIC=shared
23542                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23543         else
23544                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23545         fi
23546 fi
23547
23548 if test "$ol_link_dnssrv" != no ; then
23549         cat >> confdefs.h <<\EOF
23550 #define SLAPD_DNSSRV 1
23551 EOF
23552
23553         BUILD_SLAPD=yes
23554         BUILD_DNSSRV=yes
23555         if test "$ol_with_dnssrv_module" != static ; then
23556                 cat >> confdefs.h <<\EOF
23557 #define SLAPD_DNSSRV_DYNAMIC 1
23558 EOF
23559
23560                 BUILD_DNSSRV=mod
23561                 BUILD_DNSSRV_DYNAMIC=shared
23562                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23563         else
23564                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23565         fi
23566 fi
23567
23568 if test "$ol_enable_hdb" != no ; then
23569         cat >> confdefs.h <<\EOF
23570 #define SLAPD_HDB 1
23571 EOF
23572
23573         BUILD_SLAPD=yes
23574         BUILD_HDB=yes
23575         if test "$ol_with_hdb_module" != static ; then
23576                 cat >> confdefs.h <<\EOF
23577 #define SLAPD_HDB_DYNAMIC 1
23578 EOF
23579
23580                 BUILD_HDB=mod
23581                 BUILD_HDB_DYNAMIC=shared
23582                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23583         else
23584                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23585         fi
23586 fi
23587
23588 if test "$ol_enable_ldap" != no ; then
23589         cat >> confdefs.h <<\EOF
23590 #define SLAPD_LDAP 1
23591 EOF
23592
23593         BUILD_SLAPD=yes
23594         BUILD_LDAP=yes
23595         if test "$ol_with_ldap_module" != static ; then
23596                 cat >> confdefs.h <<\EOF
23597 #define SLAPD_LDAP_DYNAMIC 1
23598 EOF
23599
23600                 BUILD_LDAP=mod
23601                 BUILD_LDAP_DYNAMIC=shared
23602                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23603         else
23604                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23605         fi
23606 fi
23607
23608 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23609         cat >> confdefs.h <<\EOF
23610 #define SLAPD_LDBM 1
23611 EOF
23612
23613         BUILD_SLAPD=yes
23614         BUILD_LDBM=yes
23615         if test "$ol_with_ldbm_module" != static ; then
23616                 cat >> confdefs.h <<\EOF
23617 #define SLAPD_LDBM_DYNAMIC 1
23618 EOF
23619
23620                 BUILD_LDBM=mod
23621                 BUILD_LDBM_DYNAMIC=shared
23622                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23623         else
23624                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23625         fi
23626 fi
23627
23628 if test "$ol_enable_meta" != no ; then
23629         if test "$ol_enable_ldap" = no ; then
23630                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23631         fi
23632         if test "$ol_enable_rewrite" = no ; then
23633                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23634         fi
23635         cat >> confdefs.h <<\EOF
23636 #define SLAPD_META 1
23637 EOF
23638
23639         BUILD_SLAPD=yes
23640         BUILD_META=yes
23641         BUILD_REWRITE=yes
23642         if test "$ol_with_meta_module" != static ; then
23643                 cat >> confdefs.h <<\EOF
23644 #define SLAPD_META_DYNAMIC 1
23645 EOF
23646
23647                 BUILD_META=mod
23648                 BUILD_META_DYNAMIC=shared
23649                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23650         else
23651                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23652         fi
23653 fi
23654
23655 if test "$ol_enable_monitor" != no ; then
23656         cat >> confdefs.h <<\EOF
23657 #define SLAPD_MONITOR 1
23658 EOF
23659
23660         BUILD_SLAPD=yes
23661         BUILD_MONITOR=yes
23662         if test "$ol_with_monitor_module" != static ; then
23663                 cat >> confdefs.h <<\EOF
23664 #define SLAPD_MONITOR_DYNAMIC 1
23665 EOF
23666
23667                 BUILD_MONITOR=mod
23668                 BUILD_MONITOR_DYNAMIC=shared
23669                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23670         else
23671                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23672         fi
23673 fi
23674
23675 if test "$ol_enable_null" != no ; then
23676         cat >> confdefs.h <<\EOF
23677 #define SLAPD_NULL 1
23678 EOF
23679
23680         BUILD_SLAPD=yes
23681         BUILD_NULL=yes
23682         if test "$ol_with_null_module" != static ; then
23683                 cat >> confdefs.h <<\EOF
23684 #define SLAPD_NULL_DYNAMIC 1
23685 EOF
23686
23687                 BUILD_NULL=mod
23688                 BUILD_NULL_DYNAMIC=shared
23689                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23690         else
23691                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23692         fi
23693 fi
23694
23695 if test "$ol_enable_passwd" != no ; then
23696         cat >> confdefs.h <<\EOF
23697 #define SLAPD_PASSWD 1
23698 EOF
23699
23700         BUILD_SLAPD=yes
23701         BUILD_PASSWD=yes
23702         if test "$ol_with_passwd_module" != static ; then
23703                 cat >> confdefs.h <<\EOF
23704 #define SLAPD_PASSWD_DYNAMIC 1
23705 EOF
23706
23707                 BUILD_PASSWD=mod
23708                 BUILD_PASSWD_DYNAMIC=shared
23709                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23710         else
23711                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23712         fi
23713 fi
23714
23715 if test "$ol_link_perl" != no ; then
23716         cat >> confdefs.h <<\EOF
23717 #define SLAPD_PERL 1
23718 EOF
23719
23720         BUILD_SLAPD=yes
23721         BUILD_PERL=yes
23722         if test "$ol_with_perl_module" != static ; then
23723                 cat >> confdefs.h <<\EOF
23724 #define SLAPD_PERL_DYNAMIC 1
23725 EOF
23726
23727                 BUILD_PERL=mod
23728                 BUILD_PERL_DYNAMIC=shared
23729                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23730         else
23731                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23732         fi
23733 fi
23734
23735 if test "$ol_enable_shell" != no ; then
23736         if test "$ol_link_thread" != no ; then
23737                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23738         fi
23739         cat >> confdefs.h <<\EOF
23740 #define SLAPD_SHELL 1
23741 EOF
23742
23743         BUILD_SLAPD=yes
23744         BUILD_SHELL=yes
23745         if test "$ol_with_shell_module" != static ; then
23746                 cat >> confdefs.h <<\EOF
23747 #define SLAPD_SHELL_DYNAMIC 1
23748 EOF
23749
23750                 BUILD_SHELL=mod
23751                 BUILD_SHELL_DYNAMIC=shared
23752                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23753         else
23754                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23755         fi
23756 fi
23757
23758 if test "$ol_link_sql" != no ; then
23759         cat >> confdefs.h <<\EOF
23760 #define SLAPD_SQL 1
23761 EOF
23762
23763         BUILD_SLAPD=yes
23764         BUILD_SQL=yes
23765         if test "$ol_with_sql_module" != static; then
23766                 cat >> confdefs.h <<\EOF
23767 #define SLAPD_SQL_DYNAMIC 1
23768 EOF
23769
23770                 BUILD_SQL=mod
23771                 BUILD_SQL_DYNAMIC=shared
23772                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23773         else
23774                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23775         fi
23776 fi
23777
23778 if test "$ol_with_dyngroup" != no ; then
23779         BUILD_DYNGROUP=$ol_with_dyngroup
23780         if test "$ol_with_dyngroup" = mod ; then
23781                 MFLAG=SLAPD_MOD_DYNAMIC
23782                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23783         else
23784                 MFLAG=SLAPD_MOD_STATIC
23785         fi
23786         cat >> confdefs.h <<EOF
23787 #define SLAPD_OVER_DYNGROUP $MFLAG
23788 EOF
23789
23790 fi
23791
23792 if test "$ol_with_proxycache" != no ; then
23793         BUILD_PROXYCACHE=$ol_with_proxycache
23794         if test "$ol_with_proxycache" = mod ; then
23795                 MFLAG=SLAPD_MOD_DYNAMIC
23796                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23797         else
23798                 MFLAG=SLAPD_MOD_STATIC
23799         fi
23800         cat >> confdefs.h <<EOF
23801 #define SLAPD_OVER_PROXYCACHE $MFLAG
23802 EOF
23803
23804 fi
23805
23806 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23807         $BUILD_SLAPD = yes ; then
23808         BUILD_SLURPD=yes
23809 fi
23810
23811 if test "$ol_enable_rewrite" != no ; then
23812         cat >> confdefs.h <<\EOF
23813 #define ENABLE_REWRITE 1
23814 EOF
23815
23816         BUILD_REWRITE=yes
23817 fi
23818
23819 if test "$ol_enable_slapi" != no ; then
23820         cat >> confdefs.h <<\EOF
23821 #define ENABLE_SLAPI 1
23822 EOF
23823
23824         BUILD_SLAPI=yes
23825         SLAPD_SLAPI_DEPEND=libslapi.a
23826 fi
23827
23828
23829
23830 if test "$ac_cv_mingw32" = yes ; then
23831         PLAT=NT
23832         SLAPD_MODULES_LDFLAGS=
23833 else
23834         PLAT=UNIX
23835 fi
23836
23837 if test -z "$SLAPD_STATIC_BACKENDS"; then
23838         SLAPD_NO_STATIC='#'
23839 else
23840         SLAPD_NO_STATIC=
23841 fi
23842
23843
23844
23845
23846
23847
23848
23849   
23850   
23851   
23852   
23853   
23854   
23855   
23856   
23857   
23858   
23859   
23860   
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 # Check whether --with-xxinstall or --without-xxinstall was given.
23916 if test "${with_xxinstall+set}" = set; then
23917   withval="$with_xxinstall"
23918   :
23919 fi
23920
23921
23922
23923 trap '' 1 2 15
23924
23925 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23926
23927 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23928 # Let make expand exec_prefix.
23929 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23930
23931 # Any assignment to VPATH causes Sun make to only execute
23932 # the first set of double-colon rules, so remove it if not needed.
23933 # If there is a colon in the path, we need to keep it.
23934 if test "x$srcdir" = x.; then
23935   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23936 fi
23937
23938 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23939
23940 DEFS=-DHAVE_CONFIG_H
23941
23942 # Without the "./", some shells look in PATH for config.status.
23943 : ${CONFIG_STATUS=./config.status}
23944
23945 echo creating $CONFIG_STATUS
23946 rm -f $CONFIG_STATUS
23947 cat > $CONFIG_STATUS <<EOF
23948 #! /bin/sh
23949 # Generated automatically by configure.
23950 # Run this file to recreate the current configuration.
23951 # This directory was configured as follows,
23952 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23953 #
23954 # $0 $ac_configure_args
23955 #
23956 # Compiler output produced by configure, useful for debugging
23957 # configure, is in ./config.log if it exists.
23958
23959 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23960 for ac_option
23961 do
23962   case "\$ac_option" in
23963   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23964     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23965     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23966   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23967     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23968     exit 0 ;;
23969   -help | --help | --hel | --he | --h)
23970     echo "\$ac_cs_usage"; exit 0 ;;
23971   *) echo "\$ac_cs_usage"; exit 1 ;;
23972   esac
23973 done
23974
23975 ac_given_srcdir=$srcdir
23976 ac_given_INSTALL="$INSTALL"
23977
23978 trap 'rm -fr `echo "\
23979 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23980 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23981 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23982 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23983 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23984 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23985 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23986 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23987 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23988 include/Makefile:build/top.mk:include/Makefile.in \
23989 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23990 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23991 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23992 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23993 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23994 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23995 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23996 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23997 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23998 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23999 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24000 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24001 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24002 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24003 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24004 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24005 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24006 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24007 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24008 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24009 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24010 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24011 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24012 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24013 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24014 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24015 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24016 tests/run \
24017 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24018  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24019 EOF
24020 cat >> $CONFIG_STATUS <<EOF
24021
24022 # Protect against being on the right side of a sed subst in config.status.
24023 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24024  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24025 $ac_vpsub
24026 $extrasub
24027 s%@SHELL@%$SHELL%g
24028 s%@CFLAGS@%$CFLAGS%g
24029 s%@CPPFLAGS@%$CPPFLAGS%g
24030 s%@CXXFLAGS@%$CXXFLAGS%g
24031 s%@FFLAGS@%$FFLAGS%g
24032 s%@DEFS@%$DEFS%g
24033 s%@LDFLAGS@%$LDFLAGS%g
24034 s%@LIBS@%$LIBS%g
24035 s%@exec_prefix@%$exec_prefix%g
24036 s%@prefix@%$prefix%g
24037 s%@program_transform_name@%$program_transform_name%g
24038 s%@bindir@%$bindir%g
24039 s%@sbindir@%$sbindir%g
24040 s%@libexecdir@%$libexecdir%g
24041 s%@datadir@%$datadir%g
24042 s%@sysconfdir@%$sysconfdir%g
24043 s%@sharedstatedir@%$sharedstatedir%g
24044 s%@localstatedir@%$localstatedir%g
24045 s%@libdir@%$libdir%g
24046 s%@includedir@%$includedir%g
24047 s%@oldincludedir@%$oldincludedir%g
24048 s%@infodir@%$infodir%g
24049 s%@mandir@%$mandir%g
24050 s%@host@%$host%g
24051 s%@host_alias@%$host_alias%g
24052 s%@host_cpu@%$host_cpu%g
24053 s%@host_vendor@%$host_vendor%g
24054 s%@host_os@%$host_os%g
24055 s%@target@%$target%g
24056 s%@target_alias@%$target_alias%g
24057 s%@target_cpu@%$target_cpu%g
24058 s%@target_vendor@%$target_vendor%g
24059 s%@target_os@%$target_os%g
24060 s%@build@%$build%g
24061 s%@build_alias@%$build_alias%g
24062 s%@build_cpu@%$build_cpu%g
24063 s%@build_vendor@%$build_vendor%g
24064 s%@build_os@%$build_os%g
24065 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24066 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24067 s%@INSTALL_DATA@%$INSTALL_DATA%g
24068 s%@PACKAGE@%$PACKAGE%g
24069 s%@VERSION@%$VERSION%g
24070 s%@ACLOCAL@%$ACLOCAL%g
24071 s%@AUTOCONF@%$AUTOCONF%g
24072 s%@AUTOMAKE@%$AUTOMAKE%g
24073 s%@AUTOHEADER@%$AUTOHEADER%g
24074 s%@MAKEINFO@%$MAKEINFO%g
24075 s%@install_sh@%$install_sh%g
24076 s%@AMTAR@%$AMTAR%g
24077 s%@AWK@%$AWK%g
24078 s%@AMTARFLAGS@%$AMTARFLAGS%g
24079 s%@SET_MAKE@%$SET_MAKE%g
24080 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24081 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24082 s%@top_builddir@%$top_builddir%g
24083 s%@ldap_subdir@%$ldap_subdir%g
24084 s%@CC@%$CC%g
24085 s%@AR@%$AR%g
24086 s%@LN_S@%$LN_S%g
24087 s%@OBJEXT@%$OBJEXT%g
24088 s%@EXEEXT@%$EXEEXT%g
24089 s%@ECHO@%$ECHO%g
24090 s%@RANLIB@%$RANLIB%g
24091 s%@STRIP@%$STRIP%g
24092 s%@DLLTOOL@%$DLLTOOL%g
24093 s%@AS@%$AS%g
24094 s%@OBJDUMP@%$OBJDUMP%g
24095 s%@CPP@%$CPP%g
24096 s%@LIBTOOL@%$LIBTOOL%g
24097 s%@LN_H@%$LN_H%g
24098 s%@PERLBIN@%$PERLBIN%g
24099 s%@OL_MKDEP@%$OL_MKDEP%g
24100 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24101 s%@LTSTATIC@%$LTSTATIC%g
24102 s%@LIBOBJS@%$LIBOBJS%g
24103 s%@LIBSRCS@%$LIBSRCS%g
24104 s%@PLAT@%$PLAT%g
24105 s%@WITH_TLS@%$WITH_TLS%g
24106 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24107 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24108 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24109 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24110 s%@BUILD_BDB@%$BUILD_BDB%g
24111 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24112 s%@BUILD_HDB@%$BUILD_HDB%g
24113 s%@BUILD_LDAP@%$BUILD_LDAP%g
24114 s%@BUILD_LDBM@%$BUILD_LDBM%g
24115 s%@BUILD_META@%$BUILD_META%g
24116 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24117 s%@BUILD_NULL@%$BUILD_NULL%g
24118 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24119 s%@BUILD_PERL@%$BUILD_PERL%g
24120 s%@BUILD_SHELL@%$BUILD_SHELL%g
24121 s%@BUILD_SQL@%$BUILD_SQL%g
24122 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24123 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24124 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24125 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24126 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24127 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24128 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24129 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24130 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24131 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24132 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24133 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24134 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24135 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24136 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24137 s%@LDAP_LIBS@%$LDAP_LIBS%g
24138 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24139 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24140 s%@LDBM_LIBS@%$LDBM_LIBS%g
24141 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24142 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24143 s%@WRAP_LIBS@%$WRAP_LIBS%g
24144 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24145 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24146 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24147 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24148 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24149 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24150 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24151 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24152 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24153 s%@KRB4_LIBS@%$KRB4_LIBS%g
24154 s%@KRB5_LIBS@%$KRB5_LIBS%g
24155 s%@SASL_LIBS@%$SASL_LIBS%g
24156 s%@TLS_LIBS@%$TLS_LIBS%g
24157 s%@MODULES_LIBS@%$MODULES_LIBS%g
24158 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24159 s%@LIBSLAPI@%$LIBSLAPI%g
24160 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24161 s%@AUTH_LIBS@%$AUTH_LIBS%g
24162 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24163 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24164 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24165 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24166
24167 CEOF
24168 EOF
24169
24170 cat >> $CONFIG_STATUS <<\EOF
24171
24172 # Split the substitutions into bite-sized pieces for seds with
24173 # small command number limits, like on Digital OSF/1 and HP-UX.
24174 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24175 ac_file=1 # Number of current file.
24176 ac_beg=1 # First line for current file.
24177 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24178 ac_more_lines=:
24179 ac_sed_cmds=""
24180 while $ac_more_lines; do
24181   if test $ac_beg -gt 1; then
24182     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24183   else
24184     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24185   fi
24186   if test ! -s conftest.s$ac_file; then
24187     ac_more_lines=false
24188     rm -f conftest.s$ac_file
24189   else
24190     if test -z "$ac_sed_cmds"; then
24191       ac_sed_cmds="sed -f conftest.s$ac_file"
24192     else
24193       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24194     fi
24195     ac_file=`expr $ac_file + 1`
24196     ac_beg=$ac_end
24197     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24198   fi
24199 done
24200 if test -z "$ac_sed_cmds"; then
24201   ac_sed_cmds=cat
24202 fi
24203 EOF
24204
24205 cat >> $CONFIG_STATUS <<EOF
24206
24207 CONFIG_FILES=\${CONFIG_FILES-"\
24208 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24209 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24210 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24211 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24212 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24213 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24214 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24215 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24216 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24217 include/Makefile:build/top.mk:include/Makefile.in \
24218 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24219 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24220 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24221 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24222 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24223 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24224 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24225 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24226 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24227 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24228 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24229 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24230 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24231 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24232 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24233 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24234 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24235 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24236 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24237 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24238 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24239 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24240 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24241 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24242 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24243 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24244 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24245 tests/run \
24246 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24247 "}
24248 EOF
24249 cat >> $CONFIG_STATUS <<\EOF
24250 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24251   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24252   case "$ac_file" in
24253   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24254        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24255   *) ac_file_in="${ac_file}.in" ;;
24256   esac
24257
24258   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24259
24260   # Remove last slash and all that follows it.  Not all systems have dirname.
24261   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24262   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24263     # The file is in a subdirectory.
24264     test ! -d "$ac_dir" && mkdir "$ac_dir"
24265     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24266     # A "../" for each directory in $ac_dir_suffix.
24267     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24268   else
24269     ac_dir_suffix= ac_dots=
24270   fi
24271
24272   case "$ac_given_srcdir" in
24273   .)  srcdir=.
24274       if test -z "$ac_dots"; then top_srcdir=.
24275       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24276   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24277   *) # Relative path.
24278     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24279     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24280   esac
24281
24282   case "$ac_given_INSTALL" in
24283   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24284   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24285   esac
24286
24287   echo creating "$ac_file"
24288   rm -f "$ac_file"
24289   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24290   case "$ac_file" in
24291   *[Mm]akefile*) ac_comsub="1i\\
24292 # $configure_input" ;;
24293   *) ac_comsub= ;;
24294   esac
24295
24296   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24297   sed -e "$ac_comsub
24298 s%@configure_input@%$configure_input%g
24299 s%@srcdir@%$srcdir%g
24300 s%@top_srcdir@%$top_srcdir%g
24301 s%@INSTALL@%$INSTALL%g
24302 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24303 fi; done
24304 rm -f conftest.s*
24305
24306 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24307 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24308 #
24309 # ac_d sets the value in "#define NAME VALUE" lines.
24310 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24311 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24312 ac_dC='\3'
24313 ac_dD='%g'
24314 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24315 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24316 ac_uB='\([      ]\)%\1#\2define\3'
24317 ac_uC=' '
24318 ac_uD='\4%g'
24319 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24320 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24321 ac_eB='$%\1#\2define\3'
24322 ac_eC=' '
24323 ac_eD='%g'
24324
24325 if test "${CONFIG_HEADERS+set}" != set; then
24326 EOF
24327 cat >> $CONFIG_STATUS <<EOF
24328   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24329 EOF
24330 cat >> $CONFIG_STATUS <<\EOF
24331 fi
24332 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24333   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24334   case "$ac_file" in
24335   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24336        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24337   *) ac_file_in="${ac_file}.in" ;;
24338   esac
24339
24340   echo creating $ac_file
24341
24342   rm -f conftest.frag conftest.in conftest.out
24343   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24344   cat $ac_file_inputs > conftest.in
24345
24346 EOF
24347
24348 # Transform confdefs.h into a sed script conftest.vals that substitutes
24349 # the proper values into config.h.in to produce config.h.  And first:
24350 # Protect against being on the right side of a sed subst in config.status.
24351 # Protect against being in an unquoted here document in config.status.
24352 rm -f conftest.vals
24353 cat > conftest.hdr <<\EOF
24354 s/[\\&%]/\\&/g
24355 s%[\\$`]%\\&%g
24356 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24357 s%ac_d%ac_u%gp
24358 s%ac_u%ac_e%gp
24359 EOF
24360 sed -n -f conftest.hdr confdefs.h > conftest.vals
24361 rm -f conftest.hdr
24362
24363 # This sed command replaces #undef with comments.  This is necessary, for
24364 # example, in the case of _POSIX_SOURCE, which is predefined and required
24365 # on some systems where configure will not decide to define it.
24366 cat >> conftest.vals <<\EOF
24367 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24368 EOF
24369
24370 # Break up conftest.vals because some shells have a limit on
24371 # the size of here documents, and old seds have small limits too.
24372
24373 rm -f conftest.tail
24374 while :
24375 do
24376   ac_lines=`grep -c . conftest.vals`
24377   # grep -c gives empty output for an empty file on some AIX systems.
24378   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24379   # Write a limited-size here document to conftest.frag.
24380   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24381   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24382   echo 'CEOF
24383   sed -f conftest.frag conftest.in > conftest.out
24384   rm -f conftest.in
24385   mv conftest.out conftest.in
24386 ' >> $CONFIG_STATUS
24387   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24388   rm -f conftest.vals
24389   mv conftest.tail conftest.vals
24390 done
24391 rm -f conftest.vals
24392
24393 cat >> $CONFIG_STATUS <<\EOF
24394   rm -f conftest.frag conftest.h
24395   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24396   cat conftest.in >> conftest.h
24397   rm -f conftest.in
24398   if cmp -s $ac_file conftest.h 2>/dev/null; then
24399     echo "$ac_file is unchanged"
24400     rm -f conftest.h
24401   else
24402     # Remove last slash and all that follows it.  Not all systems have dirname.
24403       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24404       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24405       # The file is in a subdirectory.
24406       test ! -d "$ac_dir" && mkdir "$ac_dir"
24407     fi
24408     rm -f $ac_file
24409     mv conftest.h $ac_file
24410   fi
24411 fi; done
24412
24413 EOF
24414 cat >> $CONFIG_STATUS <<EOF
24415
24416 EOF
24417 cat >> $CONFIG_STATUS <<\EOF
24418
24419 chmod +x tests/run
24420 date > stamp-h
24421 echo Please run \"make depend\" to build dependencies
24422
24423 exit 0
24424 EOF
24425 chmod +x $CONFIG_STATUS
24426 rm -fr confdefs* $ac_clean_files
24427 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24428