]> git.sur5r.net Git - openldap/blob - configure
new to 2.2
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.478.2.14 2004/03/17 20:15:30 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 # OpenLDAP --enable-lmpasswd
1740         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1741 if test "${enable_lmpasswd+set}" = set; then
1742   enableval="$enable_lmpasswd"
1743   
1744         ol_arg=invalid
1745         for ol_val in auto yes no ; do
1746                 if test "$enableval" = "$ol_val" ; then
1747                         ol_arg="$ol_val"
1748                 fi
1749         done
1750         if test "$ol_arg" = "invalid" ; then
1751                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1752         fi
1753         ol_enable_lmpasswd="$ol_arg"
1754
1755 else
1756         ol_enable_lmpasswd="no"
1757 fi
1758 # end --enable-lmpasswd
1759 # OpenLDAP --enable-spasswd
1760         # Check whether --enable-spasswd or --disable-spasswd was given.
1761 if test "${enable_spasswd+set}" = set; then
1762   enableval="$enable_spasswd"
1763   
1764         ol_arg=invalid
1765         for ol_val in auto yes no ; do
1766                 if test "$enableval" = "$ol_val" ; then
1767                         ol_arg="$ol_val"
1768                 fi
1769         done
1770         if test "$ol_arg" = "invalid" ; then
1771                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1772         fi
1773         ol_enable_spasswd="$ol_arg"
1774
1775 else
1776         ol_enable_spasswd="no"
1777 fi
1778 # end --enable-spasswd
1779 # OpenLDAP --enable-modules
1780         # Check whether --enable-modules or --disable-modules was given.
1781 if test "${enable_modules+set}" = set; then
1782   enableval="$enable_modules"
1783   
1784         ol_arg=invalid
1785         for ol_val in auto yes no ; do
1786                 if test "$enableval" = "$ol_val" ; then
1787                         ol_arg="$ol_val"
1788                 fi
1789         done
1790         if test "$ol_arg" = "invalid" ; then
1791                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1792         fi
1793         ol_enable_modules="$ol_arg"
1794
1795 else
1796         ol_enable_modules="no"
1797 fi
1798 # end --enable-modules
1799 ol_enable_multimaster=${ol_enable_multimaster-no}
1800 # OpenLDAP --enable-rewrite
1801         # Check whether --enable-rewrite or --disable-rewrite was given.
1802 if test "${enable_rewrite+set}" = set; then
1803   enableval="$enable_rewrite"
1804   
1805         ol_arg=invalid
1806         for ol_val in auto yes no ; do
1807                 if test "$enableval" = "$ol_val" ; then
1808                         ol_arg="$ol_val"
1809                 fi
1810         done
1811         if test "$ol_arg" = "invalid" ; then
1812                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1813         fi
1814         ol_enable_rewrite="$ol_arg"
1815
1816 else
1817         ol_enable_rewrite="no"
1818 fi
1819 # end --enable-rewrite
1820 # OpenLDAP --enable-rlookups
1821         # Check whether --enable-rlookups or --disable-rlookups was given.
1822 if test "${enable_rlookups+set}" = set; then
1823   enableval="$enable_rlookups"
1824   
1825         ol_arg=invalid
1826         for ol_val in auto yes no ; do
1827                 if test "$enableval" = "$ol_val" ; then
1828                         ol_arg="$ol_val"
1829                 fi
1830         done
1831         if test "$ol_arg" = "invalid" ; then
1832                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1833         fi
1834         ol_enable_rlookups="$ol_arg"
1835
1836 else
1837         ol_enable_rlookups="no"
1838 fi
1839 # end --enable-rlookups
1840 # OpenLDAP --enable-slapi
1841         # Check whether --enable-slapi or --disable-slapi was given.
1842 if test "${enable_slapi+set}" = set; then
1843   enableval="$enable_slapi"
1844   
1845         ol_arg=invalid
1846         for ol_val in auto yes no ; do
1847                 if test "$enableval" = "$ol_val" ; then
1848                         ol_arg="$ol_val"
1849                 fi
1850         done
1851         if test "$ol_arg" = "invalid" ; then
1852                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1853         fi
1854         ol_enable_slapi="$ol_arg"
1855
1856 else
1857         ol_enable_slapi="no"
1858 fi
1859 # end --enable-slapi
1860 # OpenLDAP --enable-slp
1861         # Check whether --enable-slp or --disable-slp was given.
1862 if test "${enable_slp+set}" = set; then
1863   enableval="$enable_slp"
1864   
1865         ol_arg=invalid
1866         for ol_val in auto yes no ; do
1867                 if test "$enableval" = "$ol_val" ; then
1868                         ol_arg="$ol_val"
1869                 fi
1870         done
1871         if test "$ol_arg" = "invalid" ; then
1872                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1873         fi
1874         ol_enable_slp="$ol_arg"
1875
1876 else
1877         ol_enable_slp="no"
1878 fi
1879 # end --enable-slp
1880 # OpenLDAP --enable-wrappers
1881         # Check whether --enable-wrappers or --disable-wrappers was given.
1882 if test "${enable_wrappers+set}" = set; then
1883   enableval="$enable_wrappers"
1884   
1885         ol_arg=invalid
1886         for ol_val in auto yes no ; do
1887                 if test "$enableval" = "$ol_val" ; then
1888                         ol_arg="$ol_val"
1889                 fi
1890         done
1891         if test "$ol_arg" = "invalid" ; then
1892                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1893         fi
1894         ol_enable_wrappers="$ol_arg"
1895
1896 else
1897         ol_enable_wrappers="no"
1898 fi
1899 # end --enable-wrappers
1900
1901
1902 # OpenLDAP --enable-bdb
1903         # Check whether --enable-bdb or --disable-bdb was given.
1904 if test "${enable_bdb+set}" = set; then
1905   enableval="$enable_bdb"
1906   
1907         ol_arg=invalid
1908         for ol_val in auto yes no ; do
1909                 if test "$enableval" = "$ol_val" ; then
1910                         ol_arg="$ol_val"
1911                 fi
1912         done
1913         if test "$ol_arg" = "invalid" ; then
1914                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1915         fi
1916         ol_enable_bdb="$ol_arg"
1917
1918 else
1919         ol_enable_bdb="yes"
1920 fi
1921 # end --enable-bdb
1922 # OpenLDAP --with-bdb_module
1923         # Check whether --with-bdb_module or --without-bdb_module was given.
1924 if test "${with_bdb_module+set}" = set; then
1925   withval="$with_bdb_module"
1926   
1927         ol_arg=invalid
1928         for ol_val in static dynamic ; do
1929                 if test "$withval" = "$ol_val" ; then
1930                         ol_arg="$ol_val"
1931                 fi
1932         done
1933         if test "$ol_arg" = "invalid" ; then
1934                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1935         fi
1936         ol_with_bdb_module="$ol_arg"
1937
1938 else
1939         ol_with_bdb_module="static"
1940 fi
1941 # end --with-bdb_module
1942
1943 # OpenLDAP --enable-dnssrv
1944         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1945 if test "${enable_dnssrv+set}" = set; then
1946   enableval="$enable_dnssrv"
1947   
1948         ol_arg=invalid
1949         for ol_val in auto yes no ; do
1950                 if test "$enableval" = "$ol_val" ; then
1951                         ol_arg="$ol_val"
1952                 fi
1953         done
1954         if test "$ol_arg" = "invalid" ; then
1955                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1956         fi
1957         ol_enable_dnssrv="$ol_arg"
1958
1959 else
1960         ol_enable_dnssrv="no"
1961 fi
1962 # end --enable-dnssrv
1963 # OpenLDAP --with-dnssrv_module
1964         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1965 if test "${with_dnssrv_module+set}" = set; then
1966   withval="$with_dnssrv_module"
1967   
1968         ol_arg=invalid
1969         for ol_val in static dynamic ; do
1970                 if test "$withval" = "$ol_val" ; then
1971                         ol_arg="$ol_val"
1972                 fi
1973         done
1974         if test "$ol_arg" = "invalid" ; then
1975                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1976         fi
1977         ol_with_dnssrv_module="$ol_arg"
1978
1979 else
1980         ol_with_dnssrv_module="static"
1981 fi
1982 # end --with-dnssrv_module
1983
1984 # OpenLDAP --enable-hdb
1985         # Check whether --enable-hdb or --disable-hdb was given.
1986 if test "${enable_hdb+set}" = set; then
1987   enableval="$enable_hdb"
1988   
1989         ol_arg=invalid
1990         for ol_val in auto yes no ; do
1991                 if test "$enableval" = "$ol_val" ; then
1992                         ol_arg="$ol_val"
1993                 fi
1994         done
1995         if test "$ol_arg" = "invalid" ; then
1996                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1997         fi
1998         ol_enable_hdb="$ol_arg"
1999
2000 else
2001         ol_enable_hdb="no"
2002 fi
2003 # end --enable-hdb
2004 # OpenLDAP --with-hdb_module
2005         # Check whether --with-hdb_module or --without-hdb_module was given.
2006 if test "${with_hdb_module+set}" = set; then
2007   withval="$with_hdb_module"
2008   
2009         ol_arg=invalid
2010         for ol_val in static dynamic ; do
2011                 if test "$withval" = "$ol_val" ; then
2012                         ol_arg="$ol_val"
2013                 fi
2014         done
2015         if test "$ol_arg" = "invalid" ; then
2016                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2017         fi
2018         ol_with_hdb_module="$ol_arg"
2019
2020 else
2021         ol_with_hdb_module="static"
2022 fi
2023 # end --with-hdb_module
2024
2025 # OpenLDAP --enable-ldap
2026         # Check whether --enable-ldap or --disable-ldap was given.
2027 if test "${enable_ldap+set}" = set; then
2028   enableval="$enable_ldap"
2029   
2030         ol_arg=invalid
2031         for ol_val in auto yes no ; do
2032                 if test "$enableval" = "$ol_val" ; then
2033                         ol_arg="$ol_val"
2034                 fi
2035         done
2036         if test "$ol_arg" = "invalid" ; then
2037                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2038         fi
2039         ol_enable_ldap="$ol_arg"
2040
2041 else
2042         ol_enable_ldap="no"
2043 fi
2044 # end --enable-ldap
2045 # OpenLDAP --with-ldap_module
2046         # Check whether --with-ldap_module or --without-ldap_module was given.
2047 if test "${with_ldap_module+set}" = set; then
2048   withval="$with_ldap_module"
2049   
2050         ol_arg=invalid
2051         for ol_val in static dynamic ; do
2052                 if test "$withval" = "$ol_val" ; then
2053                         ol_arg="$ol_val"
2054                 fi
2055         done
2056         if test "$ol_arg" = "invalid" ; then
2057                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2058         fi
2059         ol_with_ldap_module="$ol_arg"
2060
2061 else
2062         ol_with_ldap_module="static"
2063 fi
2064 # end --with-ldap_module
2065
2066 # OpenLDAP --enable-ldbm
2067         # Check whether --enable-ldbm or --disable-ldbm was given.
2068 if test "${enable_ldbm+set}" = set; then
2069   enableval="$enable_ldbm"
2070   
2071         ol_arg=invalid
2072         for ol_val in auto yes no ; do
2073                 if test "$enableval" = "$ol_val" ; then
2074                         ol_arg="$ol_val"
2075                 fi
2076         done
2077         if test "$ol_arg" = "invalid" ; then
2078                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2079         fi
2080         ol_enable_ldbm="$ol_arg"
2081
2082 else
2083         ol_enable_ldbm="no"
2084 fi
2085 # end --enable-ldbm
2086 # OpenLDAP --with-ldbm_api
2087         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2088 if test "${with_ldbm_api+set}" = set; then
2089   withval="$with_ldbm_api"
2090   
2091         ol_arg=invalid
2092         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2093                 if test "$withval" = "$ol_val" ; then
2094                         ol_arg="$ol_val"
2095                 fi
2096         done
2097         if test "$ol_arg" = "invalid" ; then
2098                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2099         fi
2100         ol_with_ldbm_api="$ol_arg"
2101
2102 else
2103         ol_with_ldbm_api="auto"
2104 fi
2105 # end --with-ldbm_api
2106
2107 # OpenLDAP --with-ldbm_module
2108         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2109 if test "${with_ldbm_module+set}" = set; then
2110   withval="$with_ldbm_module"
2111   
2112         ol_arg=invalid
2113         for ol_val in static dynamic ; do
2114                 if test "$withval" = "$ol_val" ; then
2115                         ol_arg="$ol_val"
2116                 fi
2117         done
2118         if test "$ol_arg" = "invalid" ; then
2119                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2120         fi
2121         ol_with_ldbm_module="$ol_arg"
2122
2123 else
2124         ol_with_ldbm_module="static"
2125 fi
2126 # end --with-ldbm_module
2127
2128 # OpenLDAP --with-ldbm_type
2129         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2130 if test "${with_ldbm_type+set}" = set; then
2131   withval="$with_ldbm_type"
2132   
2133         ol_arg=invalid
2134         for ol_val in auto btree hash ; do
2135                 if test "$withval" = "$ol_val" ; then
2136                         ol_arg="$ol_val"
2137                 fi
2138         done
2139         if test "$ol_arg" = "invalid" ; then
2140                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2141         fi
2142         ol_with_ldbm_type="$ol_arg"
2143
2144 else
2145         ol_with_ldbm_type="auto"
2146 fi
2147 # end --with-ldbm_type
2148
2149 # OpenLDAP --enable-meta
2150         # Check whether --enable-meta or --disable-meta was given.
2151 if test "${enable_meta+set}" = set; then
2152   enableval="$enable_meta"
2153   
2154         ol_arg=invalid
2155         for ol_val in auto yes no ; do
2156                 if test "$enableval" = "$ol_val" ; then
2157                         ol_arg="$ol_val"
2158                 fi
2159         done
2160         if test "$ol_arg" = "invalid" ; then
2161                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2162         fi
2163         ol_enable_meta="$ol_arg"
2164
2165 else
2166         ol_enable_meta="no"
2167 fi
2168 # end --enable-meta
2169 # OpenLDAP --with-meta_module
2170         # Check whether --with-meta_module or --without-meta_module was given.
2171 if test "${with_meta_module+set}" = set; then
2172   withval="$with_meta_module"
2173   
2174         ol_arg=invalid
2175         for ol_val in static dynamic ; do
2176                 if test "$withval" = "$ol_val" ; then
2177                         ol_arg="$ol_val"
2178                 fi
2179         done
2180         if test "$ol_arg" = "invalid" ; then
2181                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2182         fi
2183         ol_with_meta_module="$ol_arg"
2184
2185 else
2186         ol_with_meta_module="static"
2187 fi
2188 # end --with-meta_module
2189
2190 # OpenLDAP --enable-monitor
2191         # Check whether --enable-monitor or --disable-monitor was given.
2192 if test "${enable_monitor+set}" = set; then
2193   enableval="$enable_monitor"
2194   
2195         ol_arg=invalid
2196         for ol_val in auto yes no ; do
2197                 if test "$enableval" = "$ol_val" ; then
2198                         ol_arg="$ol_val"
2199                 fi
2200         done
2201         if test "$ol_arg" = "invalid" ; then
2202                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2203         fi
2204         ol_enable_monitor="$ol_arg"
2205
2206 else
2207         ol_enable_monitor="yes"
2208 fi
2209 # end --enable-monitor
2210 # OpenLDAP --with-monitor_module
2211         # Check whether --with-monitor_module or --without-monitor_module was given.
2212 if test "${with_monitor_module+set}" = set; then
2213   withval="$with_monitor_module"
2214   
2215         ol_arg=invalid
2216         for ol_val in static dynamic ; do
2217                 if test "$withval" = "$ol_val" ; then
2218                         ol_arg="$ol_val"
2219                 fi
2220         done
2221         if test "$ol_arg" = "invalid" ; then
2222                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2223         fi
2224         ol_with_monitor_module="$ol_arg"
2225
2226 else
2227         ol_with_monitor_module="static"
2228 fi
2229 # end --with-monitor_module
2230
2231 # OpenLDAP --enable-null
2232         # Check whether --enable-null or --disable-null was given.
2233 if test "${enable_null+set}" = set; then
2234   enableval="$enable_null"
2235   
2236         ol_arg=invalid
2237         for ol_val in auto yes no ; do
2238                 if test "$enableval" = "$ol_val" ; then
2239                         ol_arg="$ol_val"
2240                 fi
2241         done
2242         if test "$ol_arg" = "invalid" ; then
2243                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2244         fi
2245         ol_enable_null="$ol_arg"
2246
2247 else
2248         ol_enable_null="no"
2249 fi
2250 # end --enable-null
2251 # OpenLDAP --with-null_module
2252         # Check whether --with-null_module or --without-null_module was given.
2253 if test "${with_null_module+set}" = set; then
2254   withval="$with_null_module"
2255   
2256         ol_arg=invalid
2257         for ol_val in static dynamic ; do
2258                 if test "$withval" = "$ol_val" ; then
2259                         ol_arg="$ol_val"
2260                 fi
2261         done
2262         if test "$ol_arg" = "invalid" ; then
2263                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2264         fi
2265         ol_with_null_module="$ol_arg"
2266
2267 else
2268         ol_with_null_module="static"
2269 fi
2270 # end --with-null_module
2271
2272 # OpenLDAP --enable-passwd
2273         # Check whether --enable-passwd or --disable-passwd was given.
2274 if test "${enable_passwd+set}" = set; then
2275   enableval="$enable_passwd"
2276   
2277         ol_arg=invalid
2278         for ol_val in auto yes no ; do
2279                 if test "$enableval" = "$ol_val" ; then
2280                         ol_arg="$ol_val"
2281                 fi
2282         done
2283         if test "$ol_arg" = "invalid" ; then
2284                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2285         fi
2286         ol_enable_passwd="$ol_arg"
2287
2288 else
2289         ol_enable_passwd="no"
2290 fi
2291 # end --enable-passwd
2292 # OpenLDAP --with-passwd_module
2293         # Check whether --with-passwd_module or --without-passwd_module was given.
2294 if test "${with_passwd_module+set}" = set; then
2295   withval="$with_passwd_module"
2296   
2297         ol_arg=invalid
2298         for ol_val in static dynamic ; do
2299                 if test "$withval" = "$ol_val" ; then
2300                         ol_arg="$ol_val"
2301                 fi
2302         done
2303         if test "$ol_arg" = "invalid" ; then
2304                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2305         fi
2306         ol_with_passwd_module="$ol_arg"
2307
2308 else
2309         ol_with_passwd_module="static"
2310 fi
2311 # end --with-passwd_module
2312
2313 # OpenLDAP --enable-perl
2314         # Check whether --enable-perl or --disable-perl was given.
2315 if test "${enable_perl+set}" = set; then
2316   enableval="$enable_perl"
2317   
2318         ol_arg=invalid
2319         for ol_val in auto yes no ; do
2320                 if test "$enableval" = "$ol_val" ; then
2321                         ol_arg="$ol_val"
2322                 fi
2323         done
2324         if test "$ol_arg" = "invalid" ; then
2325                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2326         fi
2327         ol_enable_perl="$ol_arg"
2328
2329 else
2330         ol_enable_perl="no"
2331 fi
2332 # end --enable-perl
2333 # OpenLDAP --with-perl_module
2334         # Check whether --with-perl_module or --without-perl_module was given.
2335 if test "${with_perl_module+set}" = set; then
2336   withval="$with_perl_module"
2337   
2338         ol_arg=invalid
2339         for ol_val in static dynamic ; do
2340                 if test "$withval" = "$ol_val" ; then
2341                         ol_arg="$ol_val"
2342                 fi
2343         done
2344         if test "$ol_arg" = "invalid" ; then
2345                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2346         fi
2347         ol_with_perl_module="$ol_arg"
2348
2349 else
2350         ol_with_perl_module="static"
2351 fi
2352 # end --with-perl_module
2353
2354 # OpenLDAP --enable-shell
2355         # Check whether --enable-shell or --disable-shell was given.
2356 if test "${enable_shell+set}" = set; then
2357   enableval="$enable_shell"
2358   
2359         ol_arg=invalid
2360         for ol_val in auto yes no ; do
2361                 if test "$enableval" = "$ol_val" ; then
2362                         ol_arg="$ol_val"
2363                 fi
2364         done
2365         if test "$ol_arg" = "invalid" ; then
2366                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2367         fi
2368         ol_enable_shell="$ol_arg"
2369
2370 else
2371         ol_enable_shell="no"
2372 fi
2373 # end --enable-shell
2374 # OpenLDAP --with-shell_module
2375         # Check whether --with-shell_module or --without-shell_module was given.
2376 if test "${with_shell_module+set}" = set; then
2377   withval="$with_shell_module"
2378   
2379         ol_arg=invalid
2380         for ol_val in static dynamic ; do
2381                 if test "$withval" = "$ol_val" ; then
2382                         ol_arg="$ol_val"
2383                 fi
2384         done
2385         if test "$ol_arg" = "invalid" ; then
2386                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2387         fi
2388         ol_with_shell_module="$ol_arg"
2389
2390 else
2391         ol_with_shell_module="static"
2392 fi
2393 # end --with-shell_module
2394
2395 # OpenLDAP --enable-sql
2396         # Check whether --enable-sql or --disable-sql was given.
2397 if test "${enable_sql+set}" = set; then
2398   enableval="$enable_sql"
2399   
2400         ol_arg=invalid
2401         for ol_val in auto yes no ; do
2402                 if test "$enableval" = "$ol_val" ; then
2403                         ol_arg="$ol_val"
2404                 fi
2405         done
2406         if test "$ol_arg" = "invalid" ; then
2407                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2408         fi
2409         ol_enable_sql="$ol_arg"
2410
2411 else
2412         ol_enable_sql="no"
2413 fi
2414 # end --enable-sql
2415 # OpenLDAP --with-sql_module
2416         # Check whether --with-sql_module or --without-sql_module was given.
2417 if test "${with_sql_module+set}" = set; then
2418   withval="$with_sql_module"
2419   
2420         ol_arg=invalid
2421         for ol_val in static dynamic ; do
2422                 if test "$withval" = "$ol_val" ; then
2423                         ol_arg="$ol_val"
2424                 fi
2425         done
2426         if test "$ol_arg" = "invalid" ; then
2427                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2428         fi
2429         ol_with_sql_module="$ol_arg"
2430
2431 else
2432         ol_with_sql_module="static"
2433 fi
2434 # end --with-sql_module
2435
2436
2437 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2438 if test "${with_xxslapoverlays+set}" = set; then
2439   withval="$with_xxslapoverlays"
2440   :
2441 fi
2442
2443 # OpenLDAP --with-dyngroup
2444         # Check whether --with-dyngroup or --without-dyngroup was given.
2445 if test "${with_dyngroup+set}" = set; then
2446   withval="$with_dyngroup"
2447   
2448         ol_arg=invalid
2449         for ol_val in no yes mod ; do
2450                 if test "$withval" = "$ol_val" ; then
2451                         ol_arg="$ol_val"
2452                 fi
2453         done
2454         if test "$ol_arg" = "invalid" ; then
2455                 { echo "configure: error: bad value $withval for --with-dyngroup" 1>&2; exit 1; }
2456         fi
2457         ol_with_dyngroup="$ol_arg"
2458
2459 else
2460         ol_with_dyngroup="no"
2461 fi
2462 # end --with-dyngroup
2463
2464 # OpenLDAP --with-proxycache
2465         # Check whether --with-proxycache or --without-proxycache was given.
2466 if test "${with_proxycache+set}" = set; then
2467   withval="$with_proxycache"
2468   
2469         ol_arg=invalid
2470         for ol_val in no yes mod ; do
2471                 if test "$withval" = "$ol_val" ; then
2472                         ol_arg="$ol_val"
2473                 fi
2474         done
2475         if test "$ol_arg" = "invalid" ; then
2476                 { echo "configure: error: bad value $withval for --with-proxycache" 1>&2; exit 1; }
2477         fi
2478         ol_with_proxycache="$ol_arg"
2479
2480 else
2481         ol_with_proxycache="no"
2482 fi
2483 # end --with-proxycache
2484
2485
2486 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2487 if test "${with_xxslurpdoptions+set}" = set; then
2488   withval="$with_xxslurpdoptions"
2489   :
2490 fi
2491
2492 # OpenLDAP --enable-slurpd
2493         # Check whether --enable-slurpd or --disable-slurpd was given.
2494 if test "${enable_slurpd+set}" = set; then
2495   enableval="$enable_slurpd"
2496   
2497         ol_arg=invalid
2498         for ol_val in auto yes no ; do
2499                 if test "$enableval" = "$ol_val" ; then
2500                         ol_arg="$ol_val"
2501                 fi
2502         done
2503         if test "$ol_arg" = "invalid" ; then
2504                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2505         fi
2506         ol_enable_slurpd="$ol_arg"
2507
2508 else
2509         ol_enable_slurpd="auto"
2510 fi
2511 # end --enable-slurpd
2512
2513 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2514 if test "${with_xxliboptions+set}" = set; then
2515   withval="$with_xxliboptions"
2516   :
2517 fi
2518
2519 # Check whether --enable-static or --disable-static was given.
2520 if test "${enable_static+set}" = set; then
2521   enableval="$enable_static"
2522   p=${PACKAGE-default}
2523 case $enableval in
2524 yes) enable_static=yes ;;
2525 no) enable_static=no ;;
2526 *)
2527   enable_static=no
2528   # Look at the argument we got.  We use all the common list separators.
2529   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2530   for pkg in $enableval; do
2531     if test "X$pkg" = "X$p"; then
2532       enable_static=yes
2533     fi
2534   done
2535   IFS="$ac_save_ifs"
2536   ;;
2537 esac
2538 else
2539   enable_static=yes
2540 fi
2541
2542 # Check whether --enable-shared or --disable-shared was given.
2543 if test "${enable_shared+set}" = set; then
2544   enableval="$enable_shared"
2545   p=${PACKAGE-default}
2546 case $enableval in
2547 yes) enable_shared=yes ;;
2548 no) enable_shared=no ;;
2549 *)
2550   enable_shared=no
2551   # Look at the argument we got.  We use all the common list separators.
2552   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2553   for pkg in $enableval; do
2554     if test "X$pkg" = "X$p"; then
2555       enable_shared=yes
2556     fi
2557   done
2558   IFS="$ac_save_ifs"
2559   ;;
2560 esac
2561 else
2562   enable_shared=yes
2563 fi
2564
2565
2566
2567 # validate options
2568 if test $ol_enable_slapd = no ; then
2569                 if test $ol_enable_slapi = yes ; then
2570                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2571         fi
2572         if test $ol_enable_bdb = yes ; then
2573                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2574         fi
2575         if test $ol_enable_dnssrv = yes ; then
2576                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2577         fi
2578         if test $ol_enable_hdb = yes ; then
2579                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2580         fi
2581         if test $ol_enable_ldap = yes ; then
2582                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2583         fi
2584         if test $ol_enable_ldbm = yes ; then
2585                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2586         fi
2587         if test $ol_enable_meta = yes ; then
2588                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2589         fi
2590         if test $ol_enable_monitor = yes ; then
2591                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2592         fi
2593         if test $ol_enable_null = yes ; then
2594                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2595         fi
2596         if test $ol_enable_passwd = yes ; then
2597                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2598         fi
2599         if test $ol_enable_perl = yes ; then
2600                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2601         fi
2602         if test $ol_enable_shell = yes ; then
2603                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2604         fi
2605         if test $ol_enable_sql = yes ; then
2606                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2607         fi
2608         if test $ol_enable_modules = yes ; then
2609                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2610         fi
2611         if test $ol_enable_multimaster = yes ; then
2612                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2613         fi
2614         if test $ol_enable_wrappers = yes ; then
2615                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2616         fi
2617         if test $ol_enable_rlookups = yes ; then
2618                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2619         fi
2620         if test $ol_enable_aci = yes ; then
2621                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2622         fi
2623         if test $ol_with_ldbm_api != auto ; then
2624                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2625         fi
2626         if test $ol_with_ldbm_type != auto ; then
2627                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2628         fi
2629         if test $ol_with_bdb_module != static ; then
2630                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2631         fi
2632         if test $ol_with_dnssrv_module != static ; then
2633                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2634         fi
2635         if test $ol_with_hdb_module != static ; then
2636                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2637         fi
2638         if test $ol_with_ldap_module != static ; then
2639                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2640         fi
2641         if test $ol_with_ldbm_module != static ; then
2642                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2643         fi
2644         if test $ol_with_meta_module != static ; then
2645                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2646         fi
2647         if test $ol_with_monitor_module != static ; then
2648                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2649         fi
2650         if test $ol_with_null_module != static ; then
2651                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2652         fi
2653         if test $ol_with_passwd_module != static ; then
2654                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2655         fi
2656         if test $ol_with_perl_module != static ; then
2657                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2658         fi
2659         if test $ol_with_shell_module != static ; then
2660                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2661         fi
2662         if test $ol_with_sql_module != static ; then
2663                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2664         fi
2665         if test $ol_enable_slurpd = yes ; then
2666                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2667         fi
2668         if test $ol_enable_rewrite = yes ; then
2669                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2670         fi
2671         if test $ol_with_dyngroup != no ; then
2672                 echo "configure: warning: slapd disabled, ignoring --with-dyngroup argument" 1>&2
2673         fi
2674         if test $ol_with_proxycache != no ; then
2675                 echo "configure: warning: slapd disabled, ignoring --with-proxycache argument" 1>&2
2676         fi
2677
2678         # force settings to no
2679         ol_enable_slapi=no
2680         ol_enable_bdb=no
2681         ol_enable_dnssrv=no
2682         ol_enable_hdb=no
2683         ol_enable_ldap=no
2684         ol_enable_ldbm=no
2685         ol_enable_meta=no
2686         ol_enable_monitor=no
2687         ol_enable_null=no
2688         ol_enable_passwd=no
2689         ol_enable_perl=no
2690         ol_enable_shell=no
2691         ol_enable_sql=no
2692
2693         ol_enable_modules=no
2694         ol_enable_multimaster=no
2695         ol_enable_rlookups=no
2696         ol_enable_aci=no
2697         ol_enable_wrappers=no
2698
2699         ol_with_ldbm_api=no
2700         ol_with_ldbm_type=no
2701
2702         ol_with_bdb_module=static
2703         ol_with_dnssrv_module=static
2704         ol_with_hdb_module=static
2705         ol_with_ldap_module=static
2706         ol_with_ldbm_module=static
2707         ol_with_meta_module=static
2708         ol_with_monitor_module=static
2709         ol_with_null_module=static
2710         ol_with_passwd_module=static
2711         ol_with_perl_module=static
2712         ol_with_shell_module=static
2713         ol_with_sql_module=static
2714
2715         ol_enable_slurpd=no
2716
2717         ol_enable_rewrite=no
2718
2719         ol_with_dyngroup=no
2720         ol_with_proxycache=no
2721
2722 elif test $ol_enable_ldbm = no ; then
2723         
2724         if test $ol_with_ldbm_api != auto ; then
2725                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2726         fi
2727
2728         if test $ol_with_ldbm_type != auto ; then
2729                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2730         fi
2731
2732         if test $ol_with_ldbm_module != static ; then
2733                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2734         fi
2735
2736         if test $ol_enable_modules != yes -a \
2737                 $ol_enable_bdb = no -a \
2738                 $ol_enable_dnssrv = no -a \
2739                 $ol_enable_hdb = no -a \
2740                 $ol_enable_ldap = no -a \
2741                 $ol_enable_meta = no -a \
2742                 $ol_enable_monitor = no -a \
2743                 $ol_enable_null = no -a \
2744                 $ol_enable_passwd = no -a \
2745                 $ol_enable_perl = no -a \
2746                 $ol_enable_shell = no -a \
2747                 $ol_enable_sql = no ; then
2748
2749                 if test $ol_enable_slapd = yes ; then
2750                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2751                 else
2752                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2753                         ol_enable_slapd=no
2754                 fi
2755         fi
2756
2757         ol_with_ldbm_api=no
2758         ol_with_ldbm_type=no
2759         ol_with_ldbm_module=static
2760
2761         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2762                 ol_with_ldbm_api=berkeley
2763         fi
2764
2765 else
2766                 if test $ol_with_ldbm_api = gdbm -a \
2767                 $ol_with_ldbm_type = btree ; then
2768                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2769         fi
2770         if test $ol_with_ldbm_api = mdbm -a \
2771                 $ol_with_ldbm_type = btree ; then
2772                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2773         fi
2774         if test $ol_with_ldbm_api = ndbm -a \
2775                 $ol_with_ldbm_type = btree ; then
2776                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2777         fi
2778
2779         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2780                 if test $ol_with_ldbm_api = auto ; then
2781                         ol_with_ldbm_api=berkeley
2782                 elif test $ol_with_ldbm_api != berkeley ; then
2783                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2784                 fi
2785
2786         elif test $ol_enable_bdb = auto ; then
2787                 if test $ol_with_ldbm_api != berkeley \
2788                         -o $ol_with_ldbm_api != auto ; then
2789                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2790                         ol_enable_bdb=no
2791                 fi
2792         fi
2793 fi
2794
2795 if test $ol_enable_slurpd = yes ; then
2796                 if test $ol_with_threads = no ; then
2797                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2798         fi
2799 fi
2800
2801 if test $ol_enable_lmpasswd = yes ; then
2802         if test $ol_with_tls = no ; then
2803                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2804         fi
2805 fi
2806
2807 if test $ol_enable_kbind = yes ; then
2808         if test $ol_with_kerberos = no ; then
2809                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2810         elif test $ol_with_kerberos = auto ; then
2811                 ol_with_kerberos=yes
2812         fi
2813
2814 elif test $ol_enable_kbind = no ; then
2815         if test $ol_with_kerberos = auto ; then
2816                 ol_with_kerberos=no
2817         elif test $ol_with_kerberos != no ; then
2818                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2819                 ol_with_kerberos=no
2820         fi
2821 fi
2822
2823 if test $ol_enable_spasswd = yes ; then
2824         if test $ol_with_cyrus_sasl = no ; then
2825                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2826         fi
2827         ol_with_cyrus_sasl=yes
2828 fi
2829
2830 echo "$ac_t""done" 1>&6
2831
2832 LDAP_LIBS=
2833 LDBM_LIBS=
2834 LTHREAD_LIBS=
2835 LUTIL_LIBS=
2836
2837 SLAPD_LIBS=
2838 SLURPD_LIBS=
2839
2840 BUILD_SLAPD=no
2841 BUILD_SLURPD=no
2842
2843 BUILD_THREAD=no
2844
2845 BUILD_SLAPI=no
2846 SLAPD_SLAPI_DEPEND=
2847
2848 BUILD_BDB=no
2849 BUILD_DNSSRV=no
2850 BUILD_HDB=no
2851 BUILD_LDAP=no
2852 BUILD_LDBM=no
2853 BUILD_META=no
2854 BUILD_MONITOR=no
2855 BUILD_NULL=no
2856 BUILD_PASSWD=no
2857 BUILD_PERL=no
2858 BUILD_SHELL=no
2859 BUILD_SQL=no
2860
2861 BUILD_BDB_DYNAMIC=static
2862 BUILD_DNSSRV_DYNAMIC=static
2863 BUILD_HDB_DYNAMIC=static
2864 BUILD_LDAP_DYNAMIC=static
2865 BUILD_LDBM_DYNAMIC=static
2866 BUILD_META_DYNAMIC=static
2867 BUILD_MONITOR_DYNAMIC=static
2868 BUILD_NULL_DYNAMIC=static
2869 BUILD_PASSWD_DYNAMIC=static
2870 BUILD_PERL_DYNAMIC=static
2871 BUILD_SHELL_DYNAMIC=static
2872 BUILD_SQL_DYNAMIC=static
2873
2874 BUILD_DYNGROUP=no
2875 BUILD_PROXYCACHE=no
2876
2877 SLAPD_DYNAMIC_OVERLAYS=
2878
2879 SLAPD_MODULES_LDFLAGS=
2880 SLAPD_MODULES_CPPFLAGS=
2881
2882 SLAPD_STATIC_BACKENDS=
2883 SLAPD_DYNAMIC_BACKENDS=
2884
2885 SLAPD_PERL_LDFLAGS=
2886 MOD_PERL_LDFLAGS=
2887 PERL_CPPFLAGS=
2888
2889 SLAPD_SQL_LDFLAGS=
2890 SLAPD_SQL_LIBS=
2891 SLAPD_SQL_INCLUDES=
2892
2893 KRB4_LIBS=
2894 KRB5_LIBS=
2895 SASL_LIBS=
2896 TLS_LIBS=
2897 MODULES_LIBS=
2898 SLAPI_LIBS=
2899 LIBSLAPI=
2900 LIBSLAPITOOLS=
2901 AUTH_LIBS=
2902
2903 SLAPD_SLP_LIBS=
2904
2905
2906 # Find a good install program.  We prefer a C program (faster),
2907 # so one script is as good as another.  But avoid the broken or
2908 # incompatible versions:
2909 # SysV /etc/install, /usr/sbin/install
2910 # SunOS /usr/etc/install
2911 # IRIX /sbin/install
2912 # AIX /bin/install
2913 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2914 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2915 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2916 # ./install, which can be erroneously created by make from ./install.sh.
2917 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2918 echo "configure:2919: checking for a BSD compatible install" >&5
2919 if test -z "$INSTALL"; then
2920 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2921   echo $ac_n "(cached) $ac_c" 1>&6
2922 else
2923     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2924   for ac_dir in $PATH; do
2925     # Account for people who put trailing slashes in PATH elements.
2926     case "$ac_dir/" in
2927     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2928     *)
2929       # OSF1 and SCO ODT 3.0 have their own names for install.
2930       # Don't use installbsd from OSF since it installs stuff as root
2931       # by default.
2932       for ac_prog in ginstall scoinst install; do
2933         if test -f $ac_dir/$ac_prog; then
2934           if test $ac_prog = install &&
2935             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2936             # AIX install.  It has an incompatible calling convention.
2937             :
2938           elif test $ac_prog = install &&
2939             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2940             # program-specific install script used by HP pwplus--don't use.
2941             :
2942           else
2943             ac_cv_path_install="$ac_dir/$ac_prog -c"
2944             break 2
2945           fi
2946         fi
2947       done
2948       ;;
2949     esac
2950   done
2951   IFS="$ac_save_IFS"
2952
2953 fi
2954   if test "${ac_cv_path_install+set}" = set; then
2955     INSTALL="$ac_cv_path_install"
2956   else
2957     # As a last resort, use the slow shell script.  We don't cache a
2958     # path for INSTALL within a source directory, because that will
2959     # break other packages using the cache if that directory is
2960     # removed, or if the path is relative.
2961     INSTALL="$ac_install_sh"
2962   fi
2963 fi
2964 echo "$ac_t""$INSTALL" 1>&6
2965
2966 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2967 # It thinks the first close brace ends the variable substitution.
2968 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2969
2970 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2971
2972 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2973
2974
2975 cat >> confdefs.h <<\EOF
2976 #define HAVE_MKVERSION 1
2977 EOF
2978
2979
2980
2981
2982 ol_aix_threads=no
2983 case "$target" in
2984 *-*-aix*)       if test -z "$CC" ; then
2985                 case "$ol_with_threads" in
2986                 auto | yes |  posix) ol_aix_threads=yes ;;
2987                 esac
2988         fi
2989 ;;
2990 esac
2991
2992 if test $ol_aix_threads = yes ; then
2993         if test -z "${CC}" ; then
2994                 for ac_prog in cc_r xlc_r cc
2995 do
2996 # Extract the first word of "$ac_prog", so it can be a program name with args.
2997 set dummy $ac_prog; ac_word=$2
2998 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2999 echo "configure:3000: checking for $ac_word" >&5
3000 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3001   echo $ac_n "(cached) $ac_c" 1>&6
3002 else
3003   if test -n "$CC"; then
3004   ac_cv_prog_CC="$CC" # Let the user override the test.
3005 else
3006   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3007   ac_dummy="$PATH"
3008   for ac_dir in $ac_dummy; do
3009     test -z "$ac_dir" && ac_dir=.
3010     if test -f $ac_dir/$ac_word; then
3011       ac_cv_prog_CC="$ac_prog"
3012       break
3013     fi
3014   done
3015   IFS="$ac_save_ifs"
3016 fi
3017 fi
3018 CC="$ac_cv_prog_CC"
3019 if test -n "$CC"; then
3020   echo "$ac_t""$CC" 1>&6
3021 else
3022   echo "$ac_t""no" 1>&6
3023 fi
3024
3025 test -n "$CC" && break
3026 done
3027
3028
3029                 if test "$CC" = cc ; then
3030                                                 if test $ol_with_threads != auto ; then
3031                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3032                         else
3033                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3034                         fi
3035                         ol_with_threads=no
3036                 fi
3037         fi
3038
3039         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3040                 ol_with_threads=posix
3041                 ol_cv_pthread_create=yes
3042         fi
3043 fi
3044
3045 if test -z "${CC}"; then
3046         for ac_prog in cc gcc
3047 do
3048 # Extract the first word of "$ac_prog", so it can be a program name with args.
3049 set dummy $ac_prog; ac_word=$2
3050 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3051 echo "configure:3052: checking for $ac_word" >&5
3052 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3053   echo $ac_n "(cached) $ac_c" 1>&6
3054 else
3055   if test -n "$CC"; then
3056   ac_cv_prog_CC="$CC" # Let the user override the test.
3057 else
3058   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3059   ac_dummy="$PATH"
3060   for ac_dir in $ac_dummy; do
3061     test -z "$ac_dir" && ac_dir=.
3062     if test -f $ac_dir/$ac_word; then
3063       ac_cv_prog_CC="$ac_prog"
3064       break
3065     fi
3066   done
3067   IFS="$ac_save_ifs"
3068 fi
3069 fi
3070 CC="$ac_cv_prog_CC"
3071 if test -n "$CC"; then
3072   echo "$ac_t""$CC" 1>&6
3073 else
3074   echo "$ac_t""no" 1>&6
3075 fi
3076
3077 test -n "$CC" && break
3078 done
3079 test -n "$CC" || CC="missing"
3080
3081
3082         if test "${CC}" = "missing" ; then
3083                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3084         fi
3085 fi
3086
3087 if test -z "${AR}"; then
3088         for ac_prog in ar gar
3089 do
3090 # Extract the first word of "$ac_prog", so it can be a program name with args.
3091 set dummy $ac_prog; ac_word=$2
3092 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3093 echo "configure:3094: checking for $ac_word" >&5
3094 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3095   echo $ac_n "(cached) $ac_c" 1>&6
3096 else
3097   if test -n "$AR"; then
3098   ac_cv_prog_AR="$AR" # Let the user override the test.
3099 else
3100   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3101   ac_dummy="$PATH"
3102   for ac_dir in $ac_dummy; do
3103     test -z "$ac_dir" && ac_dir=.
3104     if test -f $ac_dir/$ac_word; then
3105       ac_cv_prog_AR="$ac_prog"
3106       break
3107     fi
3108   done
3109   IFS="$ac_save_ifs"
3110 fi
3111 fi
3112 AR="$ac_cv_prog_AR"
3113 if test -n "$AR"; then
3114   echo "$ac_t""$AR" 1>&6
3115 else
3116   echo "$ac_t""no" 1>&6
3117 fi
3118
3119 test -n "$AR" && break
3120 done
3121 test -n "$AR" || AR="missing"
3122
3123
3124         if test "${AR}" = "missing" ; then
3125                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3126         fi
3127 fi
3128
3129
3130
3131 # Find the correct PATH separator.  Usually this is `:', but
3132 # DJGPP uses `;' like DOS.
3133 if test "X${PATH_SEPARATOR+set}" != Xset; then
3134   UNAME=${UNAME-`uname 2>/dev/null`}
3135   case X$UNAME in
3136     *-DOS) lt_cv_sys_path_separator=';' ;;
3137     *)     lt_cv_sys_path_separator=':' ;;
3138   esac
3139   PATH_SEPARATOR=$lt_cv_sys_path_separator
3140 fi
3141
3142 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3143 echo "configure:3144: checking for Cygwin environment" >&5
3144 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3145   echo $ac_n "(cached) $ac_c" 1>&6
3146 else
3147   cat > conftest.$ac_ext <<EOF
3148 #line 3149 "configure"
3149 #include "confdefs.h"
3150
3151 int main() {
3152
3153 #ifndef __CYGWIN__
3154 #define __CYGWIN__ __CYGWIN32__
3155 #endif
3156 return __CYGWIN__;
3157 ; return 0; }
3158 EOF
3159 if { (eval echo configure:3160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3160   rm -rf conftest*
3161   ac_cv_cygwin=yes
3162 else
3163   echo "configure: failed program was:" >&5
3164   cat conftest.$ac_ext >&5
3165   rm -rf conftest*
3166   ac_cv_cygwin=no
3167 fi
3168 rm -f conftest*
3169 fi
3170
3171 echo "$ac_t""$ac_cv_cygwin" 1>&6
3172 CYGWIN=
3173 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3174 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3175 echo "configure:3176: checking for mingw32 environment" >&5
3176 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3177   echo $ac_n "(cached) $ac_c" 1>&6
3178 else
3179   cat > conftest.$ac_ext <<EOF
3180 #line 3181 "configure"
3181 #include "confdefs.h"
3182
3183 int main() {
3184 return __MINGW32__;
3185 ; return 0; }
3186 EOF
3187 if { (eval echo configure:3188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3188   rm -rf conftest*
3189   ac_cv_mingw32=yes
3190 else
3191   echo "configure: failed program was:" >&5
3192   cat conftest.$ac_ext >&5
3193   rm -rf conftest*
3194   ac_cv_mingw32=no
3195 fi
3196 rm -f conftest*
3197 fi
3198
3199 echo "$ac_t""$ac_cv_mingw32" 1>&6
3200 MINGW32=
3201 test "$ac_cv_mingw32" = yes && MINGW32=yes
3202 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3203 echo "configure:3204: checking for EMX OS/2 environment" >&5
3204 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3205   echo $ac_n "(cached) $ac_c" 1>&6
3206 else
3207   cat > conftest.$ac_ext <<EOF
3208 #line 3209 "configure"
3209 #include "confdefs.h"
3210
3211 int main() {
3212 return __EMX__;
3213 ; return 0; }
3214 EOF
3215 if { (eval echo configure:3216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3216   rm -rf conftest*
3217   ac_cv_emxos2=yes
3218 else
3219   echo "configure: failed program was:" >&5
3220   cat conftest.$ac_ext >&5
3221   rm -rf conftest*
3222   ac_cv_emxos2=no
3223 fi
3224 rm -f conftest*
3225 fi
3226
3227 echo "$ac_t""$ac_cv_emxos2" 1>&6
3228 EMXOS2=
3229 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3230 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3231 echo "configure:3232: checking how to run the C preprocessor" >&5
3232 # On Suns, sometimes $CPP names a directory.
3233 if test -n "$CPP" && test -d "$CPP"; then
3234   CPP=
3235 fi
3236 if test -z "$CPP"; then
3237 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3238   echo $ac_n "(cached) $ac_c" 1>&6
3239 else
3240     # This must be in double quotes, not single quotes, because CPP may get
3241   # substituted into the Makefile and "${CC-cc}" will confuse make.
3242   CPP="${CC-cc} -E"
3243   # On the NeXT, cc -E runs the code through the compiler's parser,
3244   # not just through cpp.
3245   cat > conftest.$ac_ext <<EOF
3246 #line 3247 "configure"
3247 #include "confdefs.h"
3248 #include <assert.h>
3249 Syntax Error
3250 EOF
3251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3252 { (eval echo configure:3253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3254 if test -z "$ac_err"; then
3255   :
3256 else
3257   echo "$ac_err" >&5
3258   echo "configure: failed program was:" >&5
3259   cat conftest.$ac_ext >&5
3260   rm -rf conftest*
3261   CPP="${CC-cc} -E -traditional-cpp"
3262   cat > conftest.$ac_ext <<EOF
3263 #line 3264 "configure"
3264 #include "confdefs.h"
3265 #include <assert.h>
3266 Syntax Error
3267 EOF
3268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3269 { (eval echo configure:3270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3271 if test -z "$ac_err"; then
3272   :
3273 else
3274   echo "$ac_err" >&5
3275   echo "configure: failed program was:" >&5
3276   cat conftest.$ac_ext >&5
3277   rm -rf conftest*
3278   CPP="${CC-cc} -nologo -E"
3279   cat > conftest.$ac_ext <<EOF
3280 #line 3281 "configure"
3281 #include "confdefs.h"
3282 #include <assert.h>
3283 Syntax Error
3284 EOF
3285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3286 { (eval echo configure:3287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3288 if test -z "$ac_err"; then
3289   :
3290 else
3291   echo "$ac_err" >&5
3292   echo "configure: failed program was:" >&5
3293   cat conftest.$ac_ext >&5
3294   rm -rf conftest*
3295   CPP=/lib/cpp
3296 fi
3297 rm -f conftest*
3298 fi
3299 rm -f conftest*
3300 fi
3301 rm -f conftest*
3302   ac_cv_prog_CPP="$CPP"
3303 fi
3304   CPP="$ac_cv_prog_CPP"
3305 else
3306   ac_cv_prog_CPP="$CPP"
3307 fi
3308 echo "$ac_t""$CPP" 1>&6
3309
3310 # Check whether --enable-fast-install or --disable-fast-install was given.
3311 if test "${enable_fast_install+set}" = set; then
3312   enableval="$enable_fast_install"
3313   p=${PACKAGE-default}
3314 case $enableval in
3315 yes) enable_fast_install=yes ;;
3316 no) enable_fast_install=no ;;
3317 *)
3318   enable_fast_install=no
3319   # Look at the argument we got.  We use all the common list separators.
3320   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3321   for pkg in $enableval; do
3322     if test "X$pkg" = "X$p"; then
3323       enable_fast_install=yes
3324     fi
3325   done
3326   IFS="$ac_save_ifs"
3327   ;;
3328 esac
3329 else
3330   enable_fast_install=yes
3331 fi
3332
3333 # Extract the first word of "gcc", so it can be a program name with args.
3334 set dummy gcc; ac_word=$2
3335 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3336 echo "configure:3337: checking for $ac_word" >&5
3337 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3338   echo $ac_n "(cached) $ac_c" 1>&6
3339 else
3340   if test -n "$CC"; then
3341   ac_cv_prog_CC="$CC" # Let the user override the test.
3342 else
3343   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3344   ac_dummy="$PATH"
3345   for ac_dir in $ac_dummy; do
3346     test -z "$ac_dir" && ac_dir=.
3347     if test -f $ac_dir/$ac_word; then
3348       ac_cv_prog_CC="gcc"
3349       break
3350     fi
3351   done
3352   IFS="$ac_save_ifs"
3353 fi
3354 fi
3355 CC="$ac_cv_prog_CC"
3356 if test -n "$CC"; then
3357   echo "$ac_t""$CC" 1>&6
3358 else
3359   echo "$ac_t""no" 1>&6
3360 fi
3361
3362 if test -z "$CC"; then
3363   # Extract the first word of "cc", so it can be a program name with args.
3364 set dummy cc; ac_word=$2
3365 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3366 echo "configure:3367: checking for $ac_word" >&5
3367 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3368   echo $ac_n "(cached) $ac_c" 1>&6
3369 else
3370   if test -n "$CC"; then
3371   ac_cv_prog_CC="$CC" # Let the user override the test.
3372 else
3373   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3374   ac_prog_rejected=no
3375   ac_dummy="$PATH"
3376   for ac_dir in $ac_dummy; do
3377     test -z "$ac_dir" && ac_dir=.
3378     if test -f $ac_dir/$ac_word; then
3379       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3380         ac_prog_rejected=yes
3381         continue
3382       fi
3383       ac_cv_prog_CC="cc"
3384       break
3385     fi
3386   done
3387   IFS="$ac_save_ifs"
3388 if test $ac_prog_rejected = yes; then
3389   # We found a bogon in the path, so make sure we never use it.
3390   set dummy $ac_cv_prog_CC
3391   shift
3392   if test $# -gt 0; then
3393     # We chose a different compiler from the bogus one.
3394     # However, it has the same basename, so the bogon will be chosen
3395     # first if we set CC to just the basename; use the full file name.
3396     shift
3397     set dummy "$ac_dir/$ac_word" "$@"
3398     shift
3399     ac_cv_prog_CC="$@"
3400   fi
3401 fi
3402 fi
3403 fi
3404 CC="$ac_cv_prog_CC"
3405 if test -n "$CC"; then
3406   echo "$ac_t""$CC" 1>&6
3407 else
3408   echo "$ac_t""no" 1>&6
3409 fi
3410
3411   if test -z "$CC"; then
3412     case "`uname -s`" in
3413     *win32* | *WIN32* | *CYGWIN*)
3414       # Extract the first word of "cl", so it can be a program name with args.
3415 set dummy cl; ac_word=$2
3416 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3417 echo "configure:3418: checking for $ac_word" >&5
3418 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3419   echo $ac_n "(cached) $ac_c" 1>&6
3420 else
3421   if test -n "$CC"; then
3422   ac_cv_prog_CC="$CC" # Let the user override the test.
3423 else
3424   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3425   ac_dummy="$PATH"
3426   for ac_dir in $ac_dummy; do
3427     test -z "$ac_dir" && ac_dir=.
3428     if test -f $ac_dir/$ac_word; then
3429       ac_cv_prog_CC="cl"
3430       break
3431     fi
3432   done
3433   IFS="$ac_save_ifs"
3434 fi
3435 fi
3436 CC="$ac_cv_prog_CC"
3437 if test -n "$CC"; then
3438   echo "$ac_t""$CC" 1>&6
3439 else
3440   echo "$ac_t""no" 1>&6
3441 fi
3442  ;;
3443     esac
3444   fi
3445   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3446 fi
3447
3448 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3449 echo "configure:3450: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3450
3451 ac_ext=c
3452 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3453 ac_cpp='$CPP $CPPFLAGS'
3454 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3455 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3456 cross_compiling=$ac_cv_prog_cc_cross
3457
3458 cat > conftest.$ac_ext << EOF
3459
3460 #line 3461 "configure"
3461 #include "confdefs.h"
3462
3463 main(){return(0);}
3464 EOF
3465 if { (eval echo configure:3466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3466   ac_cv_prog_cc_works=yes
3467   # If we can't run a trivial program, we are probably using a cross compiler.
3468   if (./conftest; exit) 2>/dev/null; then
3469     ac_cv_prog_cc_cross=no
3470   else
3471     ac_cv_prog_cc_cross=yes
3472   fi
3473 else
3474   echo "configure: failed program was:" >&5
3475   cat conftest.$ac_ext >&5
3476   ac_cv_prog_cc_works=no
3477 fi
3478 rm -fr conftest*
3479 ac_ext=c
3480 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3481 ac_cpp='$CPP $CPPFLAGS'
3482 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3483 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3484 cross_compiling=$ac_cv_prog_cc_cross
3485
3486 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3487 if test $ac_cv_prog_cc_works = no; then
3488   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3489 fi
3490 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3491 echo "configure:3492: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3492 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3493 cross_compiling=$ac_cv_prog_cc_cross
3494
3495 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3496 echo "configure:3497: checking whether we are using GNU C" >&5
3497 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3498   echo $ac_n "(cached) $ac_c" 1>&6
3499 else
3500   cat > conftest.c <<EOF
3501 #ifdef __GNUC__
3502   yes;
3503 #endif
3504 EOF
3505 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3506   ac_cv_prog_gcc=yes
3507 else
3508   ac_cv_prog_gcc=no
3509 fi
3510 fi
3511
3512 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3513
3514 if test $ac_cv_prog_gcc = yes; then
3515   GCC=yes
3516 else
3517   GCC=
3518 fi
3519
3520 ac_test_CFLAGS="${CFLAGS+set}"
3521 ac_save_CFLAGS="$CFLAGS"
3522 CFLAGS=
3523 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3524 echo "configure:3525: checking whether ${CC-cc} accepts -g" >&5
3525 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3526   echo $ac_n "(cached) $ac_c" 1>&6
3527 else
3528   echo 'void f(){}' > conftest.c
3529 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3530   ac_cv_prog_cc_g=yes
3531 else
3532   ac_cv_prog_cc_g=no
3533 fi
3534 rm -f conftest*
3535
3536 fi
3537
3538 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3539 if test "$ac_test_CFLAGS" = set; then
3540   CFLAGS="$ac_save_CFLAGS"
3541 elif test $ac_cv_prog_cc_g = yes; then
3542   if test "$GCC" = yes; then
3543     CFLAGS="-g -O2"
3544   else
3545     CFLAGS="-g"
3546   fi
3547 else
3548   if test "$GCC" = yes; then
3549     CFLAGS="-O2"
3550   else
3551     CFLAGS=
3552   fi
3553 fi
3554
3555 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3556 if test "${with_gnu_ld+set}" = set; then
3557   withval="$with_gnu_ld"
3558   test "$withval" = no || with_gnu_ld=yes
3559 else
3560   with_gnu_ld=no
3561 fi
3562
3563 ac_prog=ld
3564 if test "$GCC" = yes; then
3565   # Check if gcc -print-prog-name=ld gives a path.
3566   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3567 echo "configure:3568: checking for ld used by GCC" >&5
3568   case $host in
3569   *-*-mingw*)
3570     # gcc leaves a trailing carriage return which upsets mingw
3571     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3572   *)
3573     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3574   esac
3575   case $ac_prog in
3576     # Accept absolute paths.
3577     [\\/]* | [A-Za-z]:[\\/]*)
3578       re_direlt='/[^/][^/]*/\.\./'
3579       # Canonicalize the path of ld
3580       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3581       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3582         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3583       done
3584       test -z "$LD" && LD="$ac_prog"
3585       ;;
3586   "")
3587     # If it fails, then pretend we aren't using GCC.
3588     ac_prog=ld
3589     ;;
3590   *)
3591     # If it is relative, then search for the first ld in PATH.
3592     with_gnu_ld=unknown
3593     ;;
3594   esac
3595 elif test "$with_gnu_ld" = yes; then
3596   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3597 echo "configure:3598: checking for GNU ld" >&5
3598 else
3599   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3600 echo "configure:3601: checking for non-GNU ld" >&5
3601 fi
3602 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3603   echo $ac_n "(cached) $ac_c" 1>&6
3604 else
3605   if test -z "$LD"; then
3606   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3607   for ac_dir in $PATH; do
3608     test -z "$ac_dir" && ac_dir=.
3609     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3610       lt_cv_path_LD="$ac_dir/$ac_prog"
3611       # Check to see if the program is GNU ld.  I'd rather use --version,
3612       # but apparently some GNU ld's only accept -v.
3613       # Break only if it was the GNU/non-GNU ld that we prefer.
3614       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3615         test "$with_gnu_ld" != no && break
3616       else
3617         test "$with_gnu_ld" != yes && break
3618       fi
3619     fi
3620   done
3621   IFS="$ac_save_ifs"
3622 else
3623   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3624 fi
3625 fi
3626
3627 LD="$lt_cv_path_LD"
3628 if test -n "$LD"; then
3629   echo "$ac_t""$LD" 1>&6
3630 else
3631   echo "$ac_t""no" 1>&6
3632 fi
3633 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3634 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3635 echo "configure:3636: checking if the linker ($LD) is GNU ld" >&5
3636 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3637   echo $ac_n "(cached) $ac_c" 1>&6
3638 else
3639   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3640 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3641   lt_cv_prog_gnu_ld=yes
3642 else
3643   lt_cv_prog_gnu_ld=no
3644 fi
3645 fi
3646
3647 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3648 with_gnu_ld=$lt_cv_prog_gnu_ld
3649
3650
3651 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3652 echo "configure:3653: checking for $LD option to reload object files" >&5
3653 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3654   echo $ac_n "(cached) $ac_c" 1>&6
3655 else
3656   lt_cv_ld_reload_flag='-r'
3657 fi
3658
3659 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3660 reload_flag=$lt_cv_ld_reload_flag
3661 test -n "$reload_flag" && reload_flag=" $reload_flag"
3662
3663 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3664 echo "configure:3665: checking for BSD-compatible nm" >&5
3665 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3666   echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668   if test -n "$NM"; then
3669   # Let the user override the test.
3670   lt_cv_path_NM="$NM"
3671 else
3672   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3673   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3674     test -z "$ac_dir" && ac_dir=.
3675     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3676     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3677       # Check to see if the nm accepts a BSD-compat flag.
3678       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3679       #   nm: unknown option "B" ignored
3680       # Tru64's nm complains that /dev/null is an invalid object file
3681       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3682         lt_cv_path_NM="$tmp_nm -B"
3683         break
3684       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3685         lt_cv_path_NM="$tmp_nm -p"
3686         break
3687       else
3688         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3689         continue # so that we can try to find one that supports BSD flags
3690       fi
3691     fi
3692   done
3693   IFS="$ac_save_ifs"
3694   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3695 fi
3696 fi
3697
3698 NM="$lt_cv_path_NM"
3699 echo "$ac_t""$NM" 1>&6
3700
3701 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3702 echo "configure:3703: checking for a sed that does not truncate output" >&5
3703 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3704   echo $ac_n "(cached) $ac_c" 1>&6
3705 else
3706   # Loop through the user's path and test for sed and gsed.
3707 # Then use that list of sed's as ones to test for truncation.
3708 as_executable_p="test -f"
3709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3710 for as_dir in $PATH
3711 do
3712   IFS=$as_save_IFS
3713   test -z "$as_dir" && as_dir=.
3714   for ac_prog in sed gsed; do
3715     for ac_exec_ext in '' $ac_executable_extensions; do
3716       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3717         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3718       fi
3719     done
3720   done
3721 done
3722
3723   # Create a temporary directory, and hook for its removal unless debugging.
3724 $debug ||
3725 {
3726   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3727   trap '{ (exit 1); exit 1; }' 1 2 13 15
3728 }
3729
3730 # Create a (secure) tmp directory for tmp files.
3731 : ${TMPDIR=/tmp}
3732 {
3733   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3734   test -n "$tmp" && test -d "$tmp"
3735 }  ||
3736 {
3737   tmp=$TMPDIR/sed$$-$RANDOM
3738   (umask 077 && mkdir $tmp)
3739 } ||
3740 {
3741    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3742    { (exit 1); exit 1; }
3743 }
3744   _max=0
3745   _count=0
3746   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3747   # along with /bin/sed that truncates output.
3748   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3749     test ! -f ${_sed} && break
3750     cat /dev/null > "$tmp/sed.in"
3751     _count=0
3752     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3753     # Check for GNU sed and select it if it is found.
3754     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3755       lt_cv_path_SED=${_sed}
3756       break
3757     fi
3758     while true; do
3759       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3760       mv "$tmp/sed.tmp" "$tmp/sed.in"
3761       cp "$tmp/sed.in" "$tmp/sed.nl"
3762       echo >>"$tmp/sed.nl"
3763       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3764       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3765       # 40000 chars as input seems more than enough
3766       test $_count -gt 10 && break
3767       _count=`expr $_count + 1`
3768       if test $_count -gt $_max; then
3769         _max=$_count
3770         lt_cv_path_SED=$_sed
3771       fi
3772     done
3773   done
3774   rm -rf "$tmp"
3775
3776 fi
3777
3778 if test "X$SED" != "X"; then
3779   lt_cv_path_SED=$SED
3780 else
3781   SED=$lt_cv_path_SED
3782 fi
3783 echo "$ac_t""$SED" 1>&6
3784
3785 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3786 echo "configure:3787: checking whether ln -s works" >&5
3787 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3788   echo $ac_n "(cached) $ac_c" 1>&6
3789 else
3790   rm -f conftestdata
3791 if ln -s X conftestdata 2>/dev/null
3792 then
3793   rm -f conftestdata
3794   ac_cv_prog_LN_S="ln -s"
3795 else
3796   ac_cv_prog_LN_S=ln
3797 fi
3798 fi
3799 LN_S="$ac_cv_prog_LN_S"
3800 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3801   echo "$ac_t""yes" 1>&6
3802 else
3803   echo "$ac_t""no" 1>&6
3804 fi
3805
3806 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3807 echo "configure:3808: checking how to recognise dependent libraries" >&5
3808 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3809   echo $ac_n "(cached) $ac_c" 1>&6
3810 else
3811   lt_cv_file_magic_cmd='$MAGIC_CMD'
3812 lt_cv_file_magic_test_file=
3813 lt_cv_deplibs_check_method='unknown'
3814 # Need to set the preceding variable on all platforms that support
3815 # interlibrary dependencies.
3816 # 'none' -- dependencies not supported.
3817 # `unknown' -- same as none, but documents that we really don't know.
3818 # 'pass_all' -- all dependencies passed with no checks.
3819 # 'test_compile' -- check by making test program.
3820 # 'file_magic [[regex]]' -- check by looking for files in library path
3821 # which responds to the $file_magic_cmd with a given egrep regex.
3822 # If you have `file' or equivalent on your system and you're not sure
3823 # whether `pass_all' will *always* work, you probably want this one.
3824
3825 case $host_os in
3826 aix4* | aix5*)
3827   lt_cv_deplibs_check_method=pass_all
3828   ;;
3829
3830 beos*)
3831   lt_cv_deplibs_check_method=pass_all
3832   ;;
3833
3834 bsdi4*)
3835   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3836   lt_cv_file_magic_cmd='/usr/bin/file -L'
3837   lt_cv_file_magic_test_file=/shlib/libc.so
3838   ;;
3839
3840 cygwin* | mingw* | pw32*)
3841   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3842   lt_cv_file_magic_cmd='$OBJDUMP -f'
3843   ;;
3844
3845 darwin* | rhapsody*)
3846   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3847   lt_cv_file_magic_cmd='/usr/bin/file -L'
3848   case "$host_os" in
3849   rhapsody* | darwin1.[012])
3850     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3851     ;;
3852   *) # Darwin 1.3 on
3853     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3854     ;;
3855   esac
3856   ;;
3857
3858 freebsd*)
3859   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3860     case $host_cpu in
3861     i*86 )
3862       # Not sure whether the presence of OpenBSD here was a mistake.
3863       # Let's accept both of them until this is cleared up.
3864       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3865       lt_cv_file_magic_cmd=/usr/bin/file
3866       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3867       ;;
3868     esac
3869   else
3870     lt_cv_deplibs_check_method=pass_all
3871   fi
3872   ;;
3873
3874 gnu*)
3875   lt_cv_deplibs_check_method=pass_all
3876   ;;
3877
3878 hpux10.20*|hpux11*)
3879   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3880   lt_cv_file_magic_cmd=/usr/bin/file
3881   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3882   ;;
3883
3884 irix5* | irix6* | nonstopux*)
3885   case $host_os in
3886   irix5* | nonstopux*)
3887     # this will be overridden with pass_all, but let us keep it just in case
3888     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3889     ;;
3890   *)
3891     case $LD in
3892     *-32|*"-32 ") libmagic=32-bit;;
3893     *-n32|*"-n32 ") libmagic=N32;;
3894     *-64|*"-64 ") libmagic=64-bit;;
3895     *) libmagic=never-match;;
3896     esac
3897     # this will be overridden with pass_all, but let us keep it just in case
3898     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3899     ;;
3900   esac
3901   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3902   lt_cv_deplibs_check_method=pass_all
3903   ;;
3904
3905 # This must be Linux ELF.
3906 linux-gnu*)
3907   case $host_cpu in
3908   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3909     lt_cv_deplibs_check_method=pass_all ;;
3910   *)
3911     # glibc up to 2.1.1 does not perform some relocations on ARM
3912     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3913   esac
3914   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3915   ;;
3916
3917 netbsd*)
3918   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3919     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3920   else
3921     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3922   fi
3923   ;;
3924
3925 newos6*)
3926   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3927   lt_cv_file_magic_cmd=/usr/bin/file
3928   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3929   ;;
3930
3931 openbsd*)
3932   lt_cv_file_magic_cmd=/usr/bin/file
3933   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3934   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3935     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3936   else
3937     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3938   fi
3939   ;;
3940
3941 openedition*)
3942   lt_cv_deplibs_check_method=pass_all
3943   ;;
3944
3945 osf3* | osf4* | osf5*)
3946   # this will be overridden with pass_all, but let us keep it just in case
3947   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3948   lt_cv_file_magic_test_file=/shlib/libc.so
3949   lt_cv_deplibs_check_method=pass_all
3950   ;;
3951
3952 sco3.2v5*)
3953   lt_cv_deplibs_check_method=pass_all
3954   ;;
3955
3956 solaris*)
3957   lt_cv_deplibs_check_method=pass_all
3958   lt_cv_file_magic_test_file=/lib/libc.so
3959   ;;
3960
3961 sysv5uw[78]* | sysv4*uw2*)
3962   lt_cv_deplibs_check_method=pass_all
3963   ;;
3964
3965 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3966   case $host_vendor in
3967   motorola)
3968     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]'
3969     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3970     ;;
3971   ncr)
3972     lt_cv_deplibs_check_method=pass_all
3973     ;;
3974   sequent)
3975     lt_cv_file_magic_cmd='/bin/file'
3976     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3977     ;;
3978   sni)
3979     lt_cv_file_magic_cmd='/bin/file'
3980     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3981     lt_cv_file_magic_test_file=/lib/libc.so
3982     ;;
3983   siemens)
3984     lt_cv_deplibs_check_method=pass_all
3985     ;;
3986   esac
3987   ;;
3988 esac
3989
3990 fi
3991
3992 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3993 file_magic_cmd=$lt_cv_file_magic_cmd
3994 deplibs_check_method=$lt_cv_deplibs_check_method
3995
3996 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3997 echo "configure:3998: checking for object suffix" >&5
3998 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3999   echo $ac_n "(cached) $ac_c" 1>&6
4000 else
4001   rm -f conftest*
4002 echo 'int i = 1;' > conftest.$ac_ext
4003 if { (eval echo configure:4004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4004   for ac_file in conftest.*; do
4005     case $ac_file in
4006     *.c) ;;
4007     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4008     esac
4009   done
4010 else
4011   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4012 fi
4013 rm -f conftest*
4014 fi
4015
4016 echo "$ac_t""$ac_cv_objext" 1>&6
4017 OBJEXT=$ac_cv_objext
4018 ac_objext=$ac_cv_objext
4019
4020
4021
4022
4023 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4024 echo "configure:4025: checking for executable suffix" >&5
4025 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4026   echo $ac_n "(cached) $ac_c" 1>&6
4027 else
4028   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4029   ac_cv_exeext=.exe
4030 else
4031   rm -f conftest*
4032   echo 'int main () { return 0; }' > conftest.$ac_ext
4033   ac_cv_exeext=
4034   if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4035     for file in conftest.*; do
4036       case $file in
4037       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4038       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4039       esac
4040     done
4041   else
4042     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4043   fi
4044   rm -f conftest*
4045   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4046 fi
4047 fi
4048
4049 EXEEXT=""
4050 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4051 echo "$ac_t""${ac_cv_exeext}" 1>&6
4052 ac_exeext=$EXEEXT
4053
4054 if test $host != $build; then
4055   ac_tool_prefix=${host_alias}-
4056 else
4057   ac_tool_prefix=
4058 fi
4059
4060
4061
4062
4063 # Check for command to grab the raw symbol name followed by C symbol from nm.
4064 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4065 echo "configure:4066: checking command to parse $NM output" >&5
4066 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4067   echo $ac_n "(cached) $ac_c" 1>&6
4068 else
4069   
4070 # These are sane defaults that work on at least a few old systems.
4071 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4072
4073 # Character class describing NM global symbol codes.
4074 symcode='[BCDEGRST]'
4075
4076 # Regexp to match symbols that can be accessed directly from C.
4077 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4078
4079 # Transform the above into a raw symbol and a C symbol.
4080 symxfrm='\1 \2\3 \3'
4081
4082 # Transform an extracted symbol line into a proper C declaration
4083 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4084
4085 # Transform an extracted symbol line into symbol name and symbol address
4086 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'"
4087
4088 # Define system-specific variables.
4089 case $host_os in
4090 aix*)
4091   symcode='[BCDT]'
4092   ;;
4093 cygwin* | mingw* | pw32*)
4094   symcode='[ABCDGISTW]'
4095   ;;
4096 hpux*) # Its linker distinguishes data from code symbols
4097   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4098   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'"
4099   ;;
4100 irix* | nonstopux*)
4101   symcode='[BCDEGRST]'
4102   ;;
4103 osf*)
4104   symcode='[BCDEGQRST]'
4105   ;;
4106 solaris* | sysv5*)
4107   symcode='[BDT]'
4108   ;;
4109 sysv4)
4110   symcode='[DFNSTU]'
4111   ;;
4112 esac
4113
4114 # Handle CRLF in mingw tool chain
4115 opt_cr=
4116 case $host_os in
4117 mingw*)
4118   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4119   ;;
4120 esac
4121
4122 # If we're using GNU nm, then use its standard symbol codes.
4123 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4124   symcode='[ABCDGISTW]'
4125 fi
4126
4127 # Try without a prefix undercore, then with it.
4128 for ac_symprfx in "" "_"; do
4129
4130   # Write the raw and C identifiers.
4131 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4132
4133   # Check to see that the pipe works correctly.
4134   pipe_works=no
4135   rm -f conftest*
4136   cat > conftest.$ac_ext <<EOF
4137 #ifdef __cplusplus
4138 extern "C" {
4139 #endif
4140 char nm_test_var;
4141 void nm_test_func(){}
4142 #ifdef __cplusplus
4143 }
4144 #endif
4145 int main(){nm_test_var='a';nm_test_func();return(0);}
4146 EOF
4147
4148   if { (eval echo configure:4149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4149     # Now try to grab the symbols.
4150     nlist=conftest.nm
4151     if { (eval echo configure:4152: \"$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
4152       # Try sorting and uniquifying the output.
4153       if sort "$nlist" | uniq > "$nlist"T; then
4154         mv -f "$nlist"T "$nlist"
4155       else
4156         rm -f "$nlist"T
4157       fi
4158
4159       # Make sure that we snagged all the symbols we need.
4160       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4161         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4162           cat <<EOF > conftest.$ac_ext
4163 #ifdef __cplusplus
4164 extern "C" {
4165 #endif
4166
4167 EOF
4168           # Now generate the symbol file.
4169           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4170
4171           cat <<EOF >> conftest.$ac_ext
4172 #if defined (__STDC__) && __STDC__
4173 # define lt_ptr void *
4174 #else
4175 # define lt_ptr char *
4176 # define const
4177 #endif
4178
4179 /* The mapping between symbol names and symbols. */
4180 const struct {
4181   const char *name;
4182   lt_ptr address;
4183 }
4184 lt_preloaded_symbols[] =
4185 {
4186 EOF
4187           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4188           cat <<\EOF >> conftest.$ac_ext
4189   {0, (lt_ptr) 0}
4190 };
4191
4192 #ifdef __cplusplus
4193 }
4194 #endif
4195 EOF
4196           # Now try linking the two files.
4197           mv conftest.$ac_objext conftstm.$ac_objext
4198           save_LIBS="$LIBS"
4199           save_CFLAGS="$CFLAGS"
4200           LIBS="conftstm.$ac_objext"
4201           CFLAGS="$CFLAGS$no_builtin_flag"
4202           if { (eval echo configure:4203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4203             pipe_works=yes
4204           fi
4205           LIBS="$save_LIBS"
4206           CFLAGS="$save_CFLAGS"
4207         else
4208           echo "cannot find nm_test_func in $nlist" >&5
4209         fi
4210       else
4211         echo "cannot find nm_test_var in $nlist" >&5
4212       fi
4213     else
4214       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4215     fi
4216   else
4217     echo "$progname: failed program was:" >&5
4218     cat conftest.$ac_ext >&5
4219   fi
4220   rm -f conftest* conftst*
4221
4222   # Do not use the global_symbol_pipe unless it works.
4223   if test "$pipe_works" = yes; then
4224     break
4225   else
4226     lt_cv_sys_global_symbol_pipe=
4227   fi
4228 done
4229
4230 fi
4231
4232 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4233 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4234   global_symbol_to_cdecl=
4235   global_symbol_to_c_name_address=
4236 else
4237   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4238   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4239 fi
4240 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4241 then
4242   echo "$ac_t""failed" 1>&6
4243 else
4244   echo "$ac_t""ok" 1>&6
4245 fi
4246
4247 for ac_hdr in dlfcn.h
4248 do
4249 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4250 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4251 echo "configure:4252: checking for $ac_hdr" >&5
4252 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4253   echo $ac_n "(cached) $ac_c" 1>&6
4254 else
4255   cat > conftest.$ac_ext <<EOF
4256 #line 4257 "configure"
4257 #include "confdefs.h"
4258 #include <$ac_hdr>
4259 EOF
4260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4261 { (eval echo configure:4262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4262 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4263 if test -z "$ac_err"; then
4264   rm -rf conftest*
4265   eval "ac_cv_header_$ac_safe=yes"
4266 else
4267   echo "$ac_err" >&5
4268   echo "configure: failed program was:" >&5
4269   cat conftest.$ac_ext >&5
4270   rm -rf conftest*
4271   eval "ac_cv_header_$ac_safe=no"
4272 fi
4273 rm -f conftest*
4274 fi
4275 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4276   echo "$ac_t""yes" 1>&6
4277     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4278   cat >> confdefs.h <<EOF
4279 #define $ac_tr_hdr 1
4280 EOF
4281  
4282 else
4283   echo "$ac_t""no" 1>&6
4284 fi
4285 done
4286
4287
4288
4289
4290
4291
4292 # Only perform the check for file, if the check method requires it
4293 case $deplibs_check_method in
4294 file_magic*)
4295   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4296     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4297 echo "configure:4298: checking for ${ac_tool_prefix}file" >&5
4298 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4299   echo $ac_n "(cached) $ac_c" 1>&6
4300 else
4301   case $MAGIC_CMD in
4302   /*)
4303   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4304   ;;
4305   ?:/*)
4306   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4307   ;;
4308   *)
4309   ac_save_MAGIC_CMD="$MAGIC_CMD"
4310   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4311   ac_dummy="/usr/bin:$PATH"
4312   for ac_dir in $ac_dummy; do
4313     test -z "$ac_dir" && ac_dir=.
4314     if test -f $ac_dir/${ac_tool_prefix}file; then
4315       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4316       if test -n "$file_magic_test_file"; then
4317         case $deplibs_check_method in
4318         "file_magic "*)
4319           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4320           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4321           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4322             egrep "$file_magic_regex" > /dev/null; then
4323             :
4324           else
4325             cat <<EOF 1>&2
4326
4327 *** Warning: the command libtool uses to detect shared libraries,
4328 *** $file_magic_cmd, produces output that libtool cannot recognize.
4329 *** The result is that libtool may fail to recognize shared libraries
4330 *** as such.  This will affect the creation of libtool libraries that
4331 *** depend on shared libraries, but programs linked with such libtool
4332 *** libraries will work regardless of this problem.  Nevertheless, you
4333 *** may want to report the problem to your system manager and/or to
4334 *** bug-libtool@gnu.org
4335
4336 EOF
4337           fi ;;
4338         esac
4339       fi
4340       break
4341     fi
4342   done
4343   IFS="$ac_save_ifs"
4344   MAGIC_CMD="$ac_save_MAGIC_CMD"
4345   ;;
4346 esac
4347 fi
4348
4349 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4350 if test -n "$MAGIC_CMD"; then
4351   echo "$ac_t""$MAGIC_CMD" 1>&6
4352 else
4353   echo "$ac_t""no" 1>&6
4354 fi
4355
4356 if test -z "$lt_cv_path_MAGIC_CMD"; then
4357   if test -n "$ac_tool_prefix"; then
4358     echo $ac_n "checking for file""... $ac_c" 1>&6
4359 echo "configure:4360: checking for file" >&5
4360 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4361   echo $ac_n "(cached) $ac_c" 1>&6
4362 else
4363   case $MAGIC_CMD in
4364   /*)
4365   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4366   ;;
4367   ?:/*)
4368   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4369   ;;
4370   *)
4371   ac_save_MAGIC_CMD="$MAGIC_CMD"
4372   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4373   ac_dummy="/usr/bin:$PATH"
4374   for ac_dir in $ac_dummy; do
4375     test -z "$ac_dir" && ac_dir=.
4376     if test -f $ac_dir/file; then
4377       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4378       if test -n "$file_magic_test_file"; then
4379         case $deplibs_check_method in
4380         "file_magic "*)
4381           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4382           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4383           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4384             egrep "$file_magic_regex" > /dev/null; then
4385             :
4386           else
4387             cat <<EOF 1>&2
4388
4389 *** Warning: the command libtool uses to detect shared libraries,
4390 *** $file_magic_cmd, produces output that libtool cannot recognize.
4391 *** The result is that libtool may fail to recognize shared libraries
4392 *** as such.  This will affect the creation of libtool libraries that
4393 *** depend on shared libraries, but programs linked with such libtool
4394 *** libraries will work regardless of this problem.  Nevertheless, you
4395 *** may want to report the problem to your system manager and/or to
4396 *** bug-libtool@gnu.org
4397
4398 EOF
4399           fi ;;
4400         esac
4401       fi
4402       break
4403     fi
4404   done
4405   IFS="$ac_save_ifs"
4406   MAGIC_CMD="$ac_save_MAGIC_CMD"
4407   ;;
4408 esac
4409 fi
4410
4411 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4412 if test -n "$MAGIC_CMD"; then
4413   echo "$ac_t""$MAGIC_CMD" 1>&6
4414 else
4415   echo "$ac_t""no" 1>&6
4416 fi
4417
4418   else
4419     MAGIC_CMD=:
4420   fi
4421 fi
4422
4423   fi
4424   ;;
4425 esac
4426
4427 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4428 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4429 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4430 echo "configure:4431: checking for $ac_word" >&5
4431 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4432   echo $ac_n "(cached) $ac_c" 1>&6
4433 else
4434   if test -n "$RANLIB"; then
4435   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4436 else
4437   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4438   ac_dummy="$PATH"
4439   for ac_dir in $ac_dummy; do
4440     test -z "$ac_dir" && ac_dir=.
4441     if test -f $ac_dir/$ac_word; then
4442       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4443       break
4444     fi
4445   done
4446   IFS="$ac_save_ifs"
4447 fi
4448 fi
4449 RANLIB="$ac_cv_prog_RANLIB"
4450 if test -n "$RANLIB"; then
4451   echo "$ac_t""$RANLIB" 1>&6
4452 else
4453   echo "$ac_t""no" 1>&6
4454 fi
4455
4456
4457 if test -z "$ac_cv_prog_RANLIB"; then
4458 if test -n "$ac_tool_prefix"; then
4459   # Extract the first word of "ranlib", so it can be a program name with args.
4460 set dummy ranlib; ac_word=$2
4461 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4462 echo "configure:4463: checking for $ac_word" >&5
4463 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4464   echo $ac_n "(cached) $ac_c" 1>&6
4465 else
4466   if test -n "$RANLIB"; then
4467   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4468 else
4469   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4470   ac_dummy="$PATH"
4471   for ac_dir in $ac_dummy; do
4472     test -z "$ac_dir" && ac_dir=.
4473     if test -f $ac_dir/$ac_word; then
4474       ac_cv_prog_RANLIB="ranlib"
4475       break
4476     fi
4477   done
4478   IFS="$ac_save_ifs"
4479   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4480 fi
4481 fi
4482 RANLIB="$ac_cv_prog_RANLIB"
4483 if test -n "$RANLIB"; then
4484   echo "$ac_t""$RANLIB" 1>&6
4485 else
4486   echo "$ac_t""no" 1>&6
4487 fi
4488
4489 else
4490   RANLIB=":"
4491 fi
4492 fi
4493
4494 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4495 set dummy ${ac_tool_prefix}strip; ac_word=$2
4496 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4497 echo "configure:4498: checking for $ac_word" >&5
4498 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4499   echo $ac_n "(cached) $ac_c" 1>&6
4500 else
4501   if test -n "$STRIP"; then
4502   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4503 else
4504   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4505   ac_dummy="$PATH"
4506   for ac_dir in $ac_dummy; do
4507     test -z "$ac_dir" && ac_dir=.
4508     if test -f $ac_dir/$ac_word; then
4509       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4510       break
4511     fi
4512   done
4513   IFS="$ac_save_ifs"
4514 fi
4515 fi
4516 STRIP="$ac_cv_prog_STRIP"
4517 if test -n "$STRIP"; then
4518   echo "$ac_t""$STRIP" 1>&6
4519 else
4520   echo "$ac_t""no" 1>&6
4521 fi
4522
4523
4524 if test -z "$ac_cv_prog_STRIP"; then
4525 if test -n "$ac_tool_prefix"; then
4526   # Extract the first word of "strip", so it can be a program name with args.
4527 set dummy strip; ac_word=$2
4528 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4529 echo "configure:4530: checking for $ac_word" >&5
4530 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4531   echo $ac_n "(cached) $ac_c" 1>&6
4532 else
4533   if test -n "$STRIP"; then
4534   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4535 else
4536   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4537   ac_dummy="$PATH"
4538   for ac_dir in $ac_dummy; do
4539     test -z "$ac_dir" && ac_dir=.
4540     if test -f $ac_dir/$ac_word; then
4541       ac_cv_prog_STRIP="strip"
4542       break
4543     fi
4544   done
4545   IFS="$ac_save_ifs"
4546   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4547 fi
4548 fi
4549 STRIP="$ac_cv_prog_STRIP"
4550 if test -n "$STRIP"; then
4551   echo "$ac_t""$STRIP" 1>&6
4552 else
4553   echo "$ac_t""no" 1>&6
4554 fi
4555
4556 else
4557   STRIP=":"
4558 fi
4559 fi
4560
4561
4562 enable_dlopen=yes
4563 enable_win32_dll=yes
4564
4565 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4566 if test "${enable_libtool_lock+set}" = set; then
4567   enableval="$enable_libtool_lock"
4568   :
4569 fi
4570
4571 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4572
4573 # Some flags need to be propagated to the compiler or linker for good
4574 # libtool support.
4575 case $host in
4576 *-*-irix6*)
4577   # Find out which ABI we are using.
4578   echo '#line 4579 "configure"' > conftest.$ac_ext
4579   if { (eval echo configure:4580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4580     case `/usr/bin/file conftest.$ac_objext` in
4581     *32-bit*)
4582       LD="${LD-ld} -32"
4583       ;;
4584     *N32*)
4585       LD="${LD-ld} -n32"
4586       ;;
4587     *64-bit*)
4588       LD="${LD-ld} -64"
4589       ;;
4590     esac
4591   fi
4592   rm -rf conftest*
4593   ;;
4594
4595 *-*-sco3.2v5*)
4596   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4597   SAVE_CFLAGS="$CFLAGS"
4598   CFLAGS="$CFLAGS -belf"
4599   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4600 echo "configure:4601: checking whether the C compiler needs -belf" >&5
4601 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4602   echo $ac_n "(cached) $ac_c" 1>&6
4603 else
4604   
4605      ac_ext=c
4606 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4607 ac_cpp='$CPP $CPPFLAGS'
4608 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4609 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4610 cross_compiling=$ac_cv_prog_cc_cross
4611
4612      cat > conftest.$ac_ext <<EOF
4613 #line 4614 "configure"
4614 #include "confdefs.h"
4615
4616 int main() {
4617
4618 ; return 0; }
4619 EOF
4620 if { (eval echo configure:4621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4621   rm -rf conftest*
4622   lt_cv_cc_needs_belf=yes
4623 else
4624   echo "configure: failed program was:" >&5
4625   cat conftest.$ac_ext >&5
4626   rm -rf conftest*
4627   lt_cv_cc_needs_belf=no
4628 fi
4629 rm -f conftest*
4630      ac_ext=c
4631 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4632 ac_cpp='$CPP $CPPFLAGS'
4633 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4634 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4635 cross_compiling=$ac_cv_prog_cc_cross
4636
4637 fi
4638
4639 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4640   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4641     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4642     CFLAGS="$SAVE_CFLAGS"
4643   fi
4644   ;;
4645
4646 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4647   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4648 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4649 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4650 echo "configure:4651: checking for $ac_word" >&5
4651 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4652   echo $ac_n "(cached) $ac_c" 1>&6
4653 else
4654   if test -n "$DLLTOOL"; then
4655   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4656 else
4657   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4658   ac_dummy="$PATH"
4659   for ac_dir in $ac_dummy; do
4660     test -z "$ac_dir" && ac_dir=.
4661     if test -f $ac_dir/$ac_word; then
4662       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4663       break
4664     fi
4665   done
4666   IFS="$ac_save_ifs"
4667 fi
4668 fi
4669 DLLTOOL="$ac_cv_prog_DLLTOOL"
4670 if test -n "$DLLTOOL"; then
4671   echo "$ac_t""$DLLTOOL" 1>&6
4672 else
4673   echo "$ac_t""no" 1>&6
4674 fi
4675
4676
4677 if test -z "$ac_cv_prog_DLLTOOL"; then
4678 if test -n "$ac_tool_prefix"; then
4679   # Extract the first word of "dlltool", so it can be a program name with args.
4680 set dummy dlltool; ac_word=$2
4681 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4682 echo "configure:4683: checking for $ac_word" >&5
4683 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4684   echo $ac_n "(cached) $ac_c" 1>&6
4685 else
4686   if test -n "$DLLTOOL"; then
4687   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4688 else
4689   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4690   ac_dummy="$PATH"
4691   for ac_dir in $ac_dummy; do
4692     test -z "$ac_dir" && ac_dir=.
4693     if test -f $ac_dir/$ac_word; then
4694       ac_cv_prog_DLLTOOL="dlltool"
4695       break
4696     fi
4697   done
4698   IFS="$ac_save_ifs"
4699   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4700 fi
4701 fi
4702 DLLTOOL="$ac_cv_prog_DLLTOOL"
4703 if test -n "$DLLTOOL"; then
4704   echo "$ac_t""$DLLTOOL" 1>&6
4705 else
4706   echo "$ac_t""no" 1>&6
4707 fi
4708
4709 else
4710   DLLTOOL="false"
4711 fi
4712 fi
4713
4714   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4715 set dummy ${ac_tool_prefix}as; ac_word=$2
4716 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4717 echo "configure:4718: checking for $ac_word" >&5
4718 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4719   echo $ac_n "(cached) $ac_c" 1>&6
4720 else
4721   if test -n "$AS"; then
4722   ac_cv_prog_AS="$AS" # Let the user override the test.
4723 else
4724   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4725   ac_dummy="$PATH"
4726   for ac_dir in $ac_dummy; do
4727     test -z "$ac_dir" && ac_dir=.
4728     if test -f $ac_dir/$ac_word; then
4729       ac_cv_prog_AS="${ac_tool_prefix}as"
4730       break
4731     fi
4732   done
4733   IFS="$ac_save_ifs"
4734 fi
4735 fi
4736 AS="$ac_cv_prog_AS"
4737 if test -n "$AS"; then
4738   echo "$ac_t""$AS" 1>&6
4739 else
4740   echo "$ac_t""no" 1>&6
4741 fi
4742
4743
4744 if test -z "$ac_cv_prog_AS"; then
4745 if test -n "$ac_tool_prefix"; then
4746   # Extract the first word of "as", so it can be a program name with args.
4747 set dummy as; ac_word=$2
4748 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4749 echo "configure:4750: checking for $ac_word" >&5
4750 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4751   echo $ac_n "(cached) $ac_c" 1>&6
4752 else
4753   if test -n "$AS"; then
4754   ac_cv_prog_AS="$AS" # Let the user override the test.
4755 else
4756   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4757   ac_dummy="$PATH"
4758   for ac_dir in $ac_dummy; do
4759     test -z "$ac_dir" && ac_dir=.
4760     if test -f $ac_dir/$ac_word; then
4761       ac_cv_prog_AS="as"
4762       break
4763     fi
4764   done
4765   IFS="$ac_save_ifs"
4766   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4767 fi
4768 fi
4769 AS="$ac_cv_prog_AS"
4770 if test -n "$AS"; then
4771   echo "$ac_t""$AS" 1>&6
4772 else
4773   echo "$ac_t""no" 1>&6
4774 fi
4775
4776 else
4777   AS="false"
4778 fi
4779 fi
4780
4781   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4782 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4783 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4784 echo "configure:4785: checking for $ac_word" >&5
4785 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4786   echo $ac_n "(cached) $ac_c" 1>&6
4787 else
4788   if test -n "$OBJDUMP"; then
4789   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4790 else
4791   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4792   ac_dummy="$PATH"
4793   for ac_dir in $ac_dummy; do
4794     test -z "$ac_dir" && ac_dir=.
4795     if test -f $ac_dir/$ac_word; then
4796       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4797       break
4798     fi
4799   done
4800   IFS="$ac_save_ifs"
4801 fi
4802 fi
4803 OBJDUMP="$ac_cv_prog_OBJDUMP"
4804 if test -n "$OBJDUMP"; then
4805   echo "$ac_t""$OBJDUMP" 1>&6
4806 else
4807   echo "$ac_t""no" 1>&6
4808 fi
4809
4810
4811 if test -z "$ac_cv_prog_OBJDUMP"; then
4812 if test -n "$ac_tool_prefix"; then
4813   # Extract the first word of "objdump", so it can be a program name with args.
4814 set dummy objdump; ac_word=$2
4815 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4816 echo "configure:4817: checking for $ac_word" >&5
4817 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4818   echo $ac_n "(cached) $ac_c" 1>&6
4819 else
4820   if test -n "$OBJDUMP"; then
4821   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4822 else
4823   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4824   ac_dummy="$PATH"
4825   for ac_dir in $ac_dummy; do
4826     test -z "$ac_dir" && ac_dir=.
4827     if test -f $ac_dir/$ac_word; then
4828       ac_cv_prog_OBJDUMP="objdump"
4829       break
4830     fi
4831   done
4832   IFS="$ac_save_ifs"
4833   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4834 fi
4835 fi
4836 OBJDUMP="$ac_cv_prog_OBJDUMP"
4837 if test -n "$OBJDUMP"; then
4838   echo "$ac_t""$OBJDUMP" 1>&6
4839 else
4840   echo "$ac_t""no" 1>&6
4841 fi
4842
4843 else
4844   OBJDUMP="false"
4845 fi
4846 fi
4847
4848
4849   # recent cygwin and mingw systems supply a stub DllMain which the user
4850   # can override, but on older systems we have to supply one
4851   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4852 echo "configure:4853: checking if libtool should supply DllMain function" >&5
4853 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4854   echo $ac_n "(cached) $ac_c" 1>&6
4855 else
4856   cat > conftest.$ac_ext <<EOF
4857 #line 4858 "configure"
4858 #include "confdefs.h"
4859
4860 int main() {
4861 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4862       DllMain (0, 0, 0);
4863 ; return 0; }
4864 EOF
4865 if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4866   rm -rf conftest*
4867   lt_cv_need_dllmain=no
4868 else
4869   echo "configure: failed program was:" >&5
4870   cat conftest.$ac_ext >&5
4871   rm -rf conftest*
4872   lt_cv_need_dllmain=yes
4873 fi
4874 rm -f conftest*
4875 fi
4876
4877 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4878
4879   case $host/$CC in
4880   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4881     # old mingw systems require "-dll" to link a DLL, while more recent ones
4882     # require "-mdll"
4883     SAVE_CFLAGS="$CFLAGS"
4884     CFLAGS="$CFLAGS -mdll"
4885     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4886 echo "configure:4887: checking how to link DLLs" >&5
4887 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4888   echo $ac_n "(cached) $ac_c" 1>&6
4889 else
4890   cat > conftest.$ac_ext <<EOF
4891 #line 4892 "configure"
4892 #include "confdefs.h"
4893
4894 int main() {
4895
4896 ; return 0; }
4897 EOF
4898 if { (eval echo configure:4899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4899   rm -rf conftest*
4900   lt_cv_cc_dll_switch=-mdll
4901 else
4902   echo "configure: failed program was:" >&5
4903   cat conftest.$ac_ext >&5
4904   rm -rf conftest*
4905   lt_cv_cc_dll_switch=-dll
4906 fi
4907 rm -f conftest*
4908 fi
4909
4910 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4911     CFLAGS="$SAVE_CFLAGS" ;;
4912   *-*-cygwin* | *-*-pw32*)
4913     # cygwin systems need to pass --dll to the linker, and not link
4914     # crt.o which will require a WinMain@16 definition.
4915     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4916   esac
4917   ;;
4918   
4919 esac
4920
4921 # Sed substitution that helps us do robust quoting.  It backslashifies
4922 # metacharacters that are still active within double-quoted strings.
4923 Xsed='sed -e s/^X//'
4924 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4925
4926 # Same as above, but do not quote variable references.
4927 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4928
4929 # Sed substitution to delay expansion of an escaped shell variable in a
4930 # double_quote_subst'ed string.
4931 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4932
4933 # Constants:
4934 rm="rm -f"
4935
4936 # Global variables:
4937 default_ofile=libtool
4938 can_build_shared=yes
4939
4940 # All known linkers require a `.a' archive for static linking (except M$VC,
4941 # which needs '.lib').
4942 libext=a
4943 ltmain="$ac_aux_dir/ltmain.sh"
4944 ofile="$default_ofile"
4945 with_gnu_ld="$lt_cv_prog_gnu_ld"
4946 need_locks="$enable_libtool_lock"
4947
4948 old_CC="$CC"
4949 old_CFLAGS="$CFLAGS"
4950
4951 # Set sane defaults for various variables
4952 test -z "$AR" && AR=ar
4953 test -z "$AR_FLAGS" && AR_FLAGS=cru
4954 test -z "$AS" && AS=as
4955 test -z "$CC" && CC=cc
4956 test -z "$DLLTOOL" && DLLTOOL=dlltool
4957 test -z "$LD" && LD=ld
4958 test -z "$LN_S" && LN_S="ln -s"
4959 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4960 test -z "$NM" && NM=nm
4961 test -z "$OBJDUMP" && OBJDUMP=objdump
4962 test -z "$RANLIB" && RANLIB=:
4963 test -z "$STRIP" && STRIP=:
4964 test -z "$ac_objext" && ac_objext=o
4965
4966 if test x"$host" != x"$build"; then
4967   ac_tool_prefix=${host_alias}-
4968 else
4969   ac_tool_prefix=
4970 fi
4971
4972 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4973 case $host_os in
4974 linux-gnu*) ;;
4975 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4976 esac
4977
4978 case $host_os in
4979 aix3*)
4980   # AIX sometimes has problems with the GCC collect2 program.  For some
4981   # reason, if we set the COLLECT_NAMES environment variable, the problems
4982   # vanish in a puff of smoke.
4983   if test "X${COLLECT_NAMES+set}" != Xset; then
4984     COLLECT_NAMES=
4985     export COLLECT_NAMES
4986   fi
4987   ;;
4988 esac
4989
4990 # Determine commands to create old-style static archives.
4991 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4992 old_postinstall_cmds='chmod 644 $oldlib'
4993 old_postuninstall_cmds=
4994
4995 if test -n "$RANLIB"; then
4996   case $host_os in
4997   openbsd*)
4998     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4999     ;;
5000   *)
5001     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5002     ;;
5003   esac
5004   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5005 fi
5006
5007 # Allow CC to be a program name with arguments.
5008 set dummy $CC
5009 compiler="$2"
5010
5011 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5012 echo "configure:5013: checking for objdir" >&5
5013 rm -f .libs 2>/dev/null
5014 mkdir .libs 2>/dev/null
5015 if test -d .libs; then
5016   objdir=.libs
5017 else
5018   # MS-DOS does not allow filenames that begin with a dot.
5019   objdir=_libs
5020 fi
5021 rmdir .libs 2>/dev/null
5022 echo "$ac_t""$objdir" 1>&6
5023
5024
5025 # Check whether --with-pic or --without-pic was given.
5026 if test "${with_pic+set}" = set; then
5027   withval="$with_pic"
5028   pic_mode="$withval"
5029 else
5030   pic_mode=default
5031 fi
5032
5033 test -z "$pic_mode" && pic_mode=default
5034
5035 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5036 # in isolation, and that seeing it set (from the cache) indicates that
5037 # the associated values are set (in the cache) correctly too.
5038 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5039 echo "configure:5040: checking for $compiler option to produce PIC" >&5
5040 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5041   echo $ac_n "(cached) $ac_c" 1>&6
5042 else
5043    lt_cv_prog_cc_pic=
5044   lt_cv_prog_cc_shlib=
5045   lt_cv_prog_cc_wl=
5046   lt_cv_prog_cc_static=
5047   lt_cv_prog_cc_no_builtin=
5048   lt_cv_prog_cc_can_build_shared=$can_build_shared
5049
5050   if test "$GCC" = yes; then
5051     lt_cv_prog_cc_wl='-Wl,'
5052     lt_cv_prog_cc_static='-static'
5053
5054     case $host_os in
5055     aix*)
5056       # Below there is a dirty hack to force normal static linking with -ldl
5057       # The problem is because libdl dynamically linked with both libc and
5058       # libC (AIX C++ library), which obviously doesn't included in libraries
5059       # list by gcc. This cause undefined symbols with -static flags.
5060       # This hack allows C programs to be linked with "-static -ldl", but
5061       # not sure about C++ programs.
5062       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5063       ;;
5064     amigaos*)
5065       # FIXME: we need at least 68020 code to build shared libraries, but
5066       # adding the `-m68020' flag to GCC prevents building anything better,
5067       # like `-m68040'.
5068       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5069       ;;
5070     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5071       # PIC is the default for these OSes.
5072       ;;
5073     darwin* | rhapsody*)
5074       # PIC is the default on this platform
5075       # Common symbols not allowed in MH_DYLIB files
5076       lt_cv_prog_cc_pic='-fno-common'
5077       ;;
5078     cygwin* | mingw* | pw32* | os2*)
5079       # This hack is so that the source file can tell whether it is being
5080       # built for inclusion in a dll (and should export symbols for example).
5081       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5082       ;;
5083     sysv4*MP*)
5084       if test -d /usr/nec; then
5085          lt_cv_prog_cc_pic=-Kconform_pic
5086       fi
5087       ;;
5088     *)
5089       lt_cv_prog_cc_pic='-fPIC'
5090       ;;
5091     esac
5092   else
5093     # PORTME Check for PIC flags for the system compiler.
5094     case $host_os in
5095     aix3* | aix4* | aix5*)
5096       lt_cv_prog_cc_wl='-Wl,'
5097       # All AIX code is PIC.
5098       if test "$host_cpu" = ia64; then
5099         # AIX 5 now supports IA64 processor
5100         lt_cv_prog_cc_static='-Bstatic'
5101       else
5102         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5103       fi
5104       ;;
5105
5106     hpux9* | hpux10* | hpux11*)
5107       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5108       lt_cv_prog_cc_wl='-Wl,'
5109       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5110       lt_cv_prog_cc_pic='+Z'
5111       ;;
5112
5113     irix5* | irix6* | nonstopux*)
5114       lt_cv_prog_cc_wl='-Wl,'
5115       lt_cv_prog_cc_static='-non_shared'
5116       # PIC (with -KPIC) is the default.
5117       ;;
5118
5119     cygwin* | mingw* | pw32* | os2*)
5120       # This hack is so that the source file can tell whether it is being
5121       # built for inclusion in a dll (and should export symbols for example).
5122       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5123       ;;
5124
5125     newsos6)
5126       lt_cv_prog_cc_pic='-KPIC'
5127       lt_cv_prog_cc_static='-Bstatic'
5128       ;;
5129     
5130     openedition)
5131       # XPLINK code is PIC by default
5132       ;;
5133
5134     osf3* | osf4* | osf5*)
5135       # All OSF/1 code is PIC.
5136       lt_cv_prog_cc_wl='-Wl,'
5137       lt_cv_prog_cc_static='-non_shared'
5138       ;;
5139
5140     sco3.2v5*)
5141       lt_cv_prog_cc_pic='-Kpic'
5142       lt_cv_prog_cc_static='-dn'
5143       lt_cv_prog_cc_shlib='-belf'
5144       ;;
5145
5146     solaris*)
5147       lt_cv_prog_cc_pic='-KPIC'
5148       lt_cv_prog_cc_static='-Bstatic'
5149       lt_cv_prog_cc_wl='-Wl,'
5150       ;;
5151
5152     sunos4*)
5153       lt_cv_prog_cc_pic='-PIC'
5154       lt_cv_prog_cc_static='-Bstatic'
5155       lt_cv_prog_cc_wl='-Qoption ld '
5156       ;;
5157
5158     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5159       lt_cv_prog_cc_pic='-KPIC'
5160       lt_cv_prog_cc_static='-Bstatic'
5161       lt_cv_prog_cc_wl='-Wl,'
5162       ;;
5163
5164     uts4*)
5165       lt_cv_prog_cc_pic='-pic'
5166       lt_cv_prog_cc_static='-Bstatic'
5167       ;;
5168
5169     sysv4*MP*)
5170       if test -d /usr/nec ;then
5171         lt_cv_prog_cc_pic='-Kconform_pic'
5172         lt_cv_prog_cc_static='-Bstatic'
5173       fi
5174       ;;
5175
5176     *)
5177       lt_cv_prog_cc_can_build_shared=no
5178       ;;
5179     esac
5180   fi
5181
5182 fi
5183
5184 if test -z "$lt_cv_prog_cc_pic"; then
5185   echo "$ac_t""none" 1>&6
5186 else
5187   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5188
5189   # Check to make sure the pic_flag actually works.
5190   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5191 echo "configure:5192: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5192   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5193   echo $ac_n "(cached) $ac_c" 1>&6
5194 else
5195       save_CFLAGS="$CFLAGS"
5196     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5197     cat > conftest.$ac_ext <<EOF
5198 #line 5199 "configure"
5199 #include "confdefs.h"
5200
5201 int main() {
5202
5203 ; return 0; }
5204 EOF
5205 if { (eval echo configure:5206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5206   rm -rf conftest*
5207         case $host_os in
5208       hpux9* | hpux10* | hpux11*)
5209         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5210         # they create non-PIC objects.  So, if there were any warnings, we
5211         # assume that PIC is not supported.
5212         if test -s conftest.err; then
5213           lt_cv_prog_cc_pic_works=no
5214         else
5215           lt_cv_prog_cc_pic_works=yes
5216         fi
5217         ;;
5218       *)
5219         lt_cv_prog_cc_pic_works=yes
5220         ;;
5221       esac
5222     
5223 else
5224   echo "configure: failed program was:" >&5
5225   cat conftest.$ac_ext >&5
5226   rm -rf conftest*
5227         lt_cv_prog_cc_pic_works=no
5228     
5229 fi
5230 rm -f conftest*
5231     CFLAGS="$save_CFLAGS"
5232   
5233 fi
5234
5235
5236   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5237     lt_cv_prog_cc_pic=
5238     lt_cv_prog_cc_can_build_shared=no
5239   else
5240     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5241   fi
5242
5243   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5244 fi
5245
5246 # Check for any special shared library compilation flags.
5247 if test -n "$lt_cv_prog_cc_shlib"; then
5248   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5249   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5250   else
5251    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5252     lt_cv_prog_cc_can_build_shared=no
5253   fi
5254 fi
5255
5256 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5257 echo "configure:5258: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5258 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5259   echo $ac_n "(cached) $ac_c" 1>&6
5260 else
5261     lt_cv_prog_cc_static_works=no
5262   save_LDFLAGS="$LDFLAGS"
5263   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5264   cat > conftest.$ac_ext <<EOF
5265 #line 5266 "configure"
5266 #include "confdefs.h"
5267
5268 int main() {
5269
5270 ; return 0; }
5271 EOF
5272 if { (eval echo configure:5273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5273   rm -rf conftest*
5274   lt_cv_prog_cc_static_works=yes
5275 else
5276   echo "configure: failed program was:" >&5
5277   cat conftest.$ac_ext >&5
5278 fi
5279 rm -f conftest*
5280   LDFLAGS="$save_LDFLAGS"
5281
5282 fi
5283
5284
5285 # Belt *and* braces to stop my trousers falling down:
5286 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5287 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5288
5289 pic_flag="$lt_cv_prog_cc_pic"
5290 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5291 wl="$lt_cv_prog_cc_wl"
5292 link_static_flag="$lt_cv_prog_cc_static"
5293 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5294 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5295
5296
5297 # Check to see if options -o and -c are simultaneously supported by compiler
5298 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5299 echo "configure:5300: checking if $compiler supports -c -o file.$ac_objext" >&5
5300 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5301   echo $ac_n "(cached) $ac_c" 1>&6
5302 else
5303   
5304 $rm -r conftest 2>/dev/null
5305 mkdir conftest
5306 cd conftest
5307 echo "int some_variable = 0;" > conftest.$ac_ext
5308 mkdir out
5309 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5310 # that will create temporary files in the current directory regardless of
5311 # the output directory.  Thus, making CWD read-only will cause this test
5312 # to fail, enabling locking or at least warning the user not to do parallel
5313 # builds.
5314 chmod -w .
5315 save_CFLAGS="$CFLAGS"
5316 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5317 compiler_c_o=no
5318 if { (eval echo configure:5319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5319   # The compiler can only warn and ignore the option if not recognized
5320   # So say no if there are warnings
5321   if test -s out/conftest.err; then
5322     lt_cv_compiler_c_o=no
5323   else
5324     lt_cv_compiler_c_o=yes
5325   fi
5326 else
5327   # Append any errors to the config.log.
5328   cat out/conftest.err 1>&5
5329   lt_cv_compiler_c_o=no
5330 fi
5331 CFLAGS="$save_CFLAGS"
5332 chmod u+w .
5333 $rm conftest* out/*
5334 rmdir out
5335 cd ..
5336 rmdir conftest
5337 $rm -r conftest 2>/dev/null
5338
5339 fi
5340
5341 compiler_c_o=$lt_cv_compiler_c_o
5342 echo "$ac_t""$compiler_c_o" 1>&6
5343
5344 if test x"$compiler_c_o" = x"yes"; then
5345   # Check to see if we can write to a .lo
5346   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5347 echo "configure:5348: checking if $compiler supports -c -o file.lo" >&5
5348   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5349   echo $ac_n "(cached) $ac_c" 1>&6
5350 else
5351   
5352   lt_cv_compiler_o_lo=no
5353   save_CFLAGS="$CFLAGS"
5354   CFLAGS="$CFLAGS -c -o conftest.lo"
5355   save_objext="$ac_objext"
5356   ac_objext=lo
5357   cat > conftest.$ac_ext <<EOF
5358 #line 5359 "configure"
5359 #include "confdefs.h"
5360
5361 int main() {
5362 int some_variable = 0;
5363 ; return 0; }
5364 EOF
5365 if { (eval echo configure:5366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5366   rm -rf conftest*
5367       # The compiler can only warn and ignore the option if not recognized
5368     # So say no if there are warnings
5369     if test -s conftest.err; then
5370       lt_cv_compiler_o_lo=no
5371     else
5372       lt_cv_compiler_o_lo=yes
5373     fi
5374   
5375 else
5376   echo "configure: failed program was:" >&5
5377   cat conftest.$ac_ext >&5
5378 fi
5379 rm -f conftest*
5380   ac_objext="$save_objext"
5381   CFLAGS="$save_CFLAGS"
5382   
5383 fi
5384
5385   compiler_o_lo=$lt_cv_compiler_o_lo
5386   echo "$ac_t""$compiler_o_lo" 1>&6
5387 else
5388   compiler_o_lo=no
5389 fi
5390
5391 # Check to see if we can do hard links to lock some files if needed
5392 hard_links="nottested"
5393 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5394   # do not overwrite the value of need_locks provided by the user
5395   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5396 echo "configure:5397: checking if we can lock with hard links" >&5
5397   hard_links=yes
5398   $rm conftest*
5399   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5400   touch conftest.a
5401   ln conftest.a conftest.b 2>&5 || hard_links=no
5402   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5403   echo "$ac_t""$hard_links" 1>&6
5404   if test "$hard_links" = no; then
5405     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5406     need_locks=warn
5407   fi
5408 else
5409   need_locks=no
5410 fi
5411
5412 if test "$GCC" = yes; then
5413   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5414   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5415 echo "configure:5416: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5416   echo "int some_variable = 0;" > conftest.$ac_ext
5417   save_CFLAGS="$CFLAGS"
5418   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5419   compiler_rtti_exceptions=no
5420   cat > conftest.$ac_ext <<EOF
5421 #line 5422 "configure"
5422 #include "confdefs.h"
5423
5424 int main() {
5425 int some_variable = 0;
5426 ; return 0; }
5427 EOF
5428 if { (eval echo configure:5429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5429   rm -rf conftest*
5430       # The compiler can only warn and ignore the option if not recognized
5431     # So say no if there are warnings
5432     if test -s conftest.err; then
5433       compiler_rtti_exceptions=no
5434     else
5435       compiler_rtti_exceptions=yes
5436     fi
5437   
5438 else
5439   echo "configure: failed program was:" >&5
5440   cat conftest.$ac_ext >&5
5441 fi
5442 rm -f conftest*
5443   CFLAGS="$save_CFLAGS"
5444   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5445
5446   if test "$compiler_rtti_exceptions" = "yes"; then
5447     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5448   else
5449     no_builtin_flag=' -fno-builtin'
5450   fi
5451 fi
5452
5453 # See if the linker supports building shared libraries.
5454 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5455 echo "configure:5456: checking whether the linker ($LD) supports shared libraries" >&5
5456
5457 allow_undefined_flag=
5458 no_undefined_flag=
5459 need_lib_prefix=unknown
5460 need_version=unknown
5461 # when you set need_version to no, make sure it does not cause -set_version
5462 # flags to be left without arguments
5463 archive_cmds=
5464 archive_expsym_cmds=
5465 old_archive_from_new_cmds=
5466 old_archive_from_expsyms_cmds=
5467 export_dynamic_flag_spec=
5468 whole_archive_flag_spec=
5469 thread_safe_flag_spec=
5470 hardcode_into_libs=no
5471 hardcode_libdir_flag_spec=
5472 hardcode_libdir_separator=
5473 hardcode_direct=no
5474 hardcode_minus_L=no
5475 hardcode_shlibpath_var=unsupported
5476 runpath_var=
5477 link_all_deplibs=unknown
5478 always_export_symbols=no
5479 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5480 # include_expsyms should be a list of space-separated symbols to be *always*
5481 # included in the symbol list
5482 include_expsyms=
5483 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5484 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5485 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5486 # as well as any symbol that contains `d'.
5487 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5488 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5489 # platforms (ab)use it in PIC code, but their linkers get confused if
5490 # the symbol is explicitly referenced.  Since portable code cannot
5491 # rely on this symbol name, it's probably fine to never include it in
5492 # preloaded symbol tables.
5493 extract_expsyms_cmds=
5494
5495 case $host_os in
5496 cygwin* | mingw* | pw32*)
5497   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5498   # When not using gcc, we currently assume that we are using
5499   # Microsoft Visual C++.
5500   if test "$GCC" != yes; then
5501     with_gnu_ld=no
5502   fi
5503   ;;
5504 openbsd*)
5505   with_gnu_ld=no
5506   ;;
5507 esac
5508
5509 ld_shlibs=yes
5510 if test "$with_gnu_ld" = yes; then
5511   # If archive_cmds runs LD, not CC, wlarc should be empty
5512   wlarc='${wl}'
5513
5514   # See if GNU ld supports shared libraries.
5515   case $host_os in
5516   aix3* | aix4* | aix5*)
5517     # On AIX, the GNU linker is very broken
5518     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5519     ld_shlibs=no
5520     cat <<EOF 1>&2
5521
5522 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5523 *** to be unable to reliably create shared libraries on AIX.
5524 *** Therefore, libtool is disabling shared libraries support.  If you
5525 *** really care for shared libraries, you may want to modify your PATH
5526 *** so that a non-GNU linker is found, and then restart.
5527
5528 EOF
5529     ;;
5530
5531   amigaos*)
5532     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)'
5533     hardcode_libdir_flag_spec='-L$libdir'
5534     hardcode_minus_L=yes
5535
5536     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5537     # that the semantics of dynamic libraries on AmigaOS, at least up
5538     # to version 4, is to share data among multiple programs linked
5539     # with the same dynamic library.  Since this doesn't match the
5540     # behavior of shared libraries on other platforms, we can use
5541     # them.
5542     ld_shlibs=no
5543     ;;
5544
5545   beos*)
5546     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5547       allow_undefined_flag=unsupported
5548       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5549       # support --undefined.  This deserves some investigation.  FIXME
5550       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5551     else
5552       ld_shlibs=no
5553     fi
5554     ;;
5555
5556   cygwin* | mingw* | pw32*)
5557     # hardcode_libdir_flag_spec is actually meaningless, as there is
5558     # no search path for DLLs.
5559     hardcode_libdir_flag_spec='-L$libdir'
5560     allow_undefined_flag=unsupported
5561     always_export_symbols=yes
5562
5563     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5564       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5565       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5566       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5567       else $CC -o impgen impgen.c ; fi)~
5568       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5569
5570     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5571
5572     # cygwin and mingw dlls have different entry points and sets of symbols
5573     # to exclude.
5574     # FIXME: what about values for MSVC?
5575     dll_entry=__cygwin_dll_entry@12
5576     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5577     case $host_os in
5578     mingw*)
5579       # mingw values
5580       dll_entry=_DllMainCRTStartup@12
5581       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5582       ;;
5583     esac
5584
5585     # mingw and cygwin differ, and it's simplest to just exclude the union
5586     # of the two symbol sets.
5587     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5588
5589     # recent cygwin and mingw systems supply a stub DllMain which the user
5590     # can override, but on older systems we have to supply one (in ltdll.c)
5591     if test "x$lt_cv_need_dllmain" = "xyes"; then
5592       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5593       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~
5594         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5595     else
5596       ltdll_obj=
5597       ltdll_cmds=
5598     fi
5599
5600     # Extract the symbol export list from an `--export-all' def file,
5601     # then regenerate the def file from the symbol export list, so that
5602     # the compiled dll only exports the symbol export list.
5603     # Be careful not to strip the DATA tag left be newer dlltools.
5604     export_symbols_cmds="$ltdll_cmds"'
5605       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5606       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5607
5608     # If the export-symbols file already is a .def file (1st line
5609     # is EXPORTS), use it as is.
5610     # If DATA tags from a recent dlltool are present, honour them!
5611     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5612         cp $export_symbols $output_objdir/$soname-def;
5613       else
5614         echo EXPORTS > $output_objdir/$soname-def;
5615         _lt_hint=1;
5616         cat $export_symbols | while read symbol; do
5617          set dummy \$symbol;
5618          case \$# in
5619            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5620            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5621            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5622          esac;
5623          _lt_hint=`expr 1 + \$_lt_hint`;
5624         done;
5625       fi~
5626       '"$ltdll_cmds"'
5627       $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~
5628       $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~
5629       $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~
5630       $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~
5631       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5632     ;;
5633
5634   netbsd*)
5635     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5636       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5637       wlarc=
5638     else
5639       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5640       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5641     fi
5642     ;;
5643
5644   solaris* | sysv5*)
5645     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5646       ld_shlibs=no
5647       cat <<EOF 1>&2
5648
5649 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5650 *** create shared libraries on Solaris systems.  Therefore, libtool
5651 *** is disabling shared libraries support.  We urge you to upgrade GNU
5652 *** binutils to release 2.9.1 or newer.  Another option is to modify
5653 *** your PATH or compiler configuration so that the native linker is
5654 *** used, and then restart.
5655
5656 EOF
5657     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5658       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5659       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5660     else
5661       ld_shlibs=no
5662     fi
5663     ;;
5664
5665   sunos4*)
5666     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5667     wlarc=
5668     hardcode_direct=yes
5669     hardcode_shlibpath_var=no
5670     ;;
5671
5672   *)
5673     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5674       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5675       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5676     else
5677       ld_shlibs=no
5678     fi
5679     ;;
5680   esac
5681
5682   if test "$ld_shlibs" = yes; then
5683     runpath_var=LD_RUN_PATH
5684     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5685     export_dynamic_flag_spec='${wl}--export-dynamic'
5686     case $host_os in
5687     cygwin* | mingw* | pw32*)
5688       # dlltool doesn't understand --whole-archive et. al.
5689       whole_archive_flag_spec=
5690       ;;
5691     *)
5692       # ancient GNU ld didn't support --whole-archive et. al.
5693       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5694         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5695       else
5696         whole_archive_flag_spec=
5697       fi
5698       ;;
5699     esac
5700   fi
5701 else
5702   # PORTME fill in a description of your system's linker (not GNU ld)
5703   case $host_os in
5704   aix3*)
5705     allow_undefined_flag=unsupported
5706     always_export_symbols=yes
5707     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'
5708     # Note: this linker hardcodes the directories in LIBPATH if there
5709     # are no directories specified by -L.
5710     hardcode_minus_L=yes
5711     if test "$GCC" = yes && test -z "$link_static_flag"; then
5712       # Neither direct hardcoding nor static linking is supported with a
5713       # broken collect2.
5714       hardcode_direct=unsupported
5715     fi
5716     ;;
5717
5718   aix4* | aix5*)
5719     if test "$host_cpu" = ia64; then
5720       # On IA64, the linker does run time linking by default, so we don't
5721       # have to do anything special.
5722       aix_use_runtimelinking=no
5723       exp_sym_flag='-Bexport'
5724       no_entry_flag=""
5725     else
5726       aix_use_runtimelinking=no
5727
5728       # Test if we are trying to use run time linking or normal
5729       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5730       # need to do runtime linking.
5731       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5732         for ld_flag in $LDFLAGS; do
5733           case $ld_flag in
5734           *-brtl*)
5735             aix_use_runtimelinking=yes
5736             break
5737           ;;
5738           esac
5739         done
5740       esac
5741
5742       exp_sym_flag='-bexport'
5743       no_entry_flag='-bnoentry'
5744     fi
5745
5746     # When large executables or shared objects are built, AIX ld can
5747     # have problems creating the table of contents.  If linking a library
5748     # or program results in "error TOC overflow" add -mminimal-toc to
5749     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5750     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5751
5752     hardcode_direct=yes
5753     archive_cmds=''
5754     hardcode_libdir_separator=':'
5755     if test "$GCC" = yes; then
5756       case $host_os in aix4.[012]|aix4.[012].*)
5757         collect2name=`${CC} -print-prog-name=collect2`
5758         if test -f "$collect2name" && \
5759           strings "$collect2name" | grep resolve_lib_name >/dev/null
5760         then
5761           # We have reworked collect2
5762           hardcode_direct=yes
5763         else
5764           # We have old collect2
5765           hardcode_direct=unsupported
5766           # It fails to find uninstalled libraries when the uninstalled
5767           # path is not listed in the libpath.  Setting hardcode_minus_L
5768           # to unsupported forces relinking
5769           hardcode_minus_L=yes
5770           hardcode_libdir_flag_spec='-L$libdir'
5771           hardcode_libdir_separator=
5772         fi
5773       esac
5774
5775       shared_flag='-shared'
5776     else
5777       # not using gcc
5778       if test "$host_cpu" = ia64; then
5779         shared_flag='${wl}-G'
5780       else
5781         if test "$aix_use_runtimelinking" = yes; then
5782           shared_flag='${wl}-G'
5783         else
5784           shared_flag='${wl}-bM:SRE'
5785         fi
5786       fi
5787     fi
5788
5789     # It seems that -bexpall can do strange things, so it is better to
5790     # generate a list of symbols to export.
5791     always_export_symbols=yes
5792     if test "$aix_use_runtimelinking" = yes; then
5793       # Warning - without using the other runtime loading flags (-brtl),
5794       # -berok will link without error, but may produce a broken library.
5795       allow_undefined_flag='-berok'
5796       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5797       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"
5798     else
5799       if test "$host_cpu" = ia64; then
5800         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5801         allow_undefined_flag="-z nodefs"
5802         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"
5803       else
5804         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5805         # Warning - without using the other run time loading flags,
5806         # -berok will link without error, but may produce a broken library.
5807         allow_undefined_flag='${wl}-berok'
5808         # This is a bit strange, but is similar to how AIX traditionally builds
5809         # it's shared libraries.
5810         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'
5811       fi
5812     fi
5813     ;;
5814
5815   amigaos*)
5816     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)'
5817     hardcode_libdir_flag_spec='-L$libdir'
5818     hardcode_minus_L=yes
5819     # see comment about different semantics on the GNU ld section
5820     ld_shlibs=no
5821     ;;
5822
5823   cygwin* | mingw* | pw32*)
5824     # When not using gcc, we currently assume that we are using
5825     # Microsoft Visual C++.
5826     # hardcode_libdir_flag_spec is actually meaningless, as there is
5827     # no search path for DLLs.
5828     hardcode_libdir_flag_spec=' '
5829     allow_undefined_flag=unsupported
5830     # Tell ltmain to make .lib files, not .a files.
5831     libext=lib
5832     # FIXME: Setting linknames here is a bad hack.
5833     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5834     # The linker will automatically build a .lib file if we build a DLL.
5835     old_archive_from_new_cmds='true'
5836     # FIXME: Should let the user specify the lib program.
5837     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5838     fix_srcfile_path='`cygpath -w "$srcfile"`'
5839     ;;
5840
5841   darwin* | rhapsody*)
5842     case "$host_os" in
5843     rhapsody* | darwin1.[012])
5844       allow_undefined_flag='-undefined suppress'
5845       ;;
5846     *) # Darwin 1.3 on
5847       allow_undefined_flag='-flat_namespace -undefined suppress'
5848       ;;
5849     esac
5850     # FIXME: Relying on posixy $() will cause problems for
5851     #        cross-compilation, but unfortunately the echo tests do not
5852     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5853     #        `"' quotes if we put them in here... so don't!
5854     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)'
5855     # We need to add '_' to the symbols in $export_symbols first
5856     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5857     hardcode_direct=yes
5858     hardcode_shlibpath_var=no
5859     whole_archive_flag_spec='-all_load $convenience'
5860     ;;
5861
5862   freebsd1*)
5863     ld_shlibs=no
5864     ;;
5865
5866   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5867   # support.  Future versions do this automatically, but an explicit c++rt0.o
5868   # does not break anything, and helps significantly (at the cost of a little
5869   # extra space).
5870   freebsd2.2*)
5871     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5872     hardcode_libdir_flag_spec='-R$libdir'
5873     hardcode_direct=yes
5874     hardcode_shlibpath_var=no
5875     ;;
5876
5877   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5878   freebsd2*)
5879     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5880     hardcode_direct=yes
5881     hardcode_minus_L=yes
5882     hardcode_shlibpath_var=no
5883     ;;
5884
5885   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5886   freebsd*)
5887     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5888     hardcode_libdir_flag_spec='-R$libdir'
5889     hardcode_direct=yes
5890     hardcode_shlibpath_var=no
5891     ;;
5892
5893   hpux9* | hpux10* | hpux11*)
5894     case $host_os in
5895     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' ;;
5896     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5897     esac
5898     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5899     hardcode_libdir_separator=:
5900     hardcode_direct=yes
5901     hardcode_minus_L=yes # Not in the search PATH, but as the default
5902                          # location of the library.
5903     export_dynamic_flag_spec='${wl}-E'
5904     ;;
5905
5906   irix5* | irix6* | nonstopux*)
5907     if test "$GCC" = yes; then
5908       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'
5909       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5910     else
5911       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'
5912       hardcode_libdir_flag_spec='-rpath $libdir'
5913     fi
5914     hardcode_libdir_separator=:
5915     link_all_deplibs=yes
5916     ;;
5917
5918   netbsd*)
5919     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5920       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5921     else
5922       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5923     fi
5924     hardcode_libdir_flag_spec='-R$libdir'
5925     hardcode_direct=yes
5926     hardcode_shlibpath_var=no
5927     ;;
5928
5929   newsos6)
5930     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5931     hardcode_direct=yes
5932     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5933     hardcode_libdir_separator=:
5934     hardcode_shlibpath_var=no
5935     ;;
5936
5937   openbsd*)
5938     hardcode_direct=yes
5939     hardcode_shlibpath_var=no
5940     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5941       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5942       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5943       export_dynamic_flag_spec='${wl}-E'
5944     else
5945       case "$host_os" in
5946       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5947         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5948         hardcode_libdir_flag_spec='-R$libdir'
5949         ;;
5950       *)
5951         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5952         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5953         ;;
5954       esac
5955     fi
5956     ;;
5957
5958   openedition*)
5959     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5960         cp \$linknames \$output_objdir && linknames=''"
5961     export_dynamic_flag_spec="-Wl,DLL"
5962     ;;
5963
5964   os2*)
5965     hardcode_libdir_flag_spec='-L$libdir'
5966     hardcode_minus_L=yes
5967     allow_undefined_flag=unsupported
5968     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'
5969     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5970     ;;
5971
5972   osf3*)
5973     if test "$GCC" = yes; then
5974       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5975       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5976     else
5977       allow_undefined_flag=' -expect_unresolved \*'
5978       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'
5979     fi
5980     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5981     hardcode_libdir_separator=:
5982     ;;
5983
5984   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5985     if test "$GCC" = yes; then
5986       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5987       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'
5988       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5989     else
5990       allow_undefined_flag=' -expect_unresolved \*'
5991       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'
5992       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5993       $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'
5994
5995       #Both c and cxx compiler support -rpath directly
5996       hardcode_libdir_flag_spec='-rpath $libdir'
5997     fi
5998     hardcode_libdir_separator=:
5999     ;;
6000
6001   sco3.2v5*)
6002     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6003     hardcode_shlibpath_var=no
6004     runpath_var=LD_RUN_PATH
6005     hardcode_runpath_var=yes
6006     export_dynamic_flag_spec='${wl}-Bexport'
6007     ;;
6008
6009   solaris*)
6010     # gcc --version < 3.0 without binutils cannot create self contained
6011     # shared libraries reliably, requiring libgcc.a to resolve some of
6012     # the object symbols generated in some cases.  Libraries that use
6013     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6014     # a copy of libgcc.a into every shared library to guarantee resolving
6015     # such symbols causes other problems:  According to Tim Van Holder
6016     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6017     # (to the application) exception stack for one thing.
6018     no_undefined_flag=' -z defs'
6019     if test "$GCC" = yes; then
6020       case `$CC --version 2>/dev/null` in
6021       [12].*)
6022         cat <<EOF 1>&2
6023
6024 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6025 *** create self contained shared libraries on Solaris systems, without
6026 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6027 *** -no-undefined support, which will at least allow you to build shared
6028 *** libraries.  However, you may find that when you link such libraries
6029 *** into an application without using GCC, you have to manually add
6030 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6031 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6032 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6033
6034 EOF
6035         no_undefined_flag=
6036         ;;
6037       esac
6038     fi
6039     # $CC -shared without GNU ld will not create a library from C++
6040     # object files and a static libstdc++, better avoid it by now
6041     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6042     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6043                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6044     hardcode_libdir_flag_spec='-R$libdir'
6045     hardcode_shlibpath_var=no
6046     case $host_os in
6047     solaris2.[0-5] | solaris2.[0-5].*) ;;
6048     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6049       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6050     esac
6051     link_all_deplibs=yes
6052     ;;
6053
6054   sunos4*)
6055     if test "x$host_vendor" = xsequent; then
6056       # Use $CC to link under sequent, because it throws in some extra .o
6057       # files that make .init and .fini sections work.
6058       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6059     else
6060       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6061     fi
6062     hardcode_libdir_flag_spec='-L$libdir'
6063     hardcode_direct=yes
6064     hardcode_minus_L=yes
6065     hardcode_shlibpath_var=no
6066     ;;
6067
6068   sysv4)
6069     case $host_vendor in
6070       sni)
6071         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6072         hardcode_direct=yes # is this really true???
6073         ;;
6074       siemens)
6075         ## LD is ld it makes a PLAMLIB
6076         ## CC just makes a GrossModule.
6077         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6078         reload_cmds='$CC -r -o $output$reload_objs'
6079         hardcode_direct=no
6080         ;;
6081       motorola)
6082         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6083         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6084         ;;
6085     esac
6086     runpath_var='LD_RUN_PATH'
6087     hardcode_shlibpath_var=no
6088     ;;
6089
6090   sysv4.3*)
6091     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6092     hardcode_shlibpath_var=no
6093     export_dynamic_flag_spec='-Bexport'
6094     ;;
6095
6096   sysv5*)
6097     no_undefined_flag=' -z text'
6098     # $CC -shared without GNU ld will not create a library from C++
6099     # object files and a static libstdc++, better avoid it by now
6100     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6101     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6102                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6103     hardcode_libdir_flag_spec=
6104     hardcode_shlibpath_var=no
6105     runpath_var='LD_RUN_PATH'
6106     ;;
6107
6108   uts4*)
6109     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6110     hardcode_libdir_flag_spec='-L$libdir'
6111     hardcode_shlibpath_var=no
6112     ;;
6113
6114   dgux*)
6115     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6116     hardcode_libdir_flag_spec='-L$libdir'
6117     hardcode_shlibpath_var=no
6118     ;;
6119
6120   sysv4*MP*)
6121     if test -d /usr/nec; then
6122       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6123       hardcode_shlibpath_var=no
6124       runpath_var=LD_RUN_PATH
6125       hardcode_runpath_var=yes
6126       ld_shlibs=yes
6127     fi
6128     ;;
6129
6130   sysv4.2uw2*)
6131     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6132     hardcode_direct=yes
6133     hardcode_minus_L=no
6134     hardcode_shlibpath_var=no
6135     hardcode_runpath_var=yes
6136     runpath_var=LD_RUN_PATH
6137     ;;
6138
6139   sysv5uw7* | unixware7*)
6140     no_undefined_flag='${wl}-z ${wl}text'
6141     if test "$GCC" = yes; then
6142       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6143     else
6144       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6145     fi
6146     runpath_var='LD_RUN_PATH'
6147     hardcode_shlibpath_var=no
6148     ;;
6149
6150   *)
6151     ld_shlibs=no
6152     ;;
6153   esac
6154 fi
6155 echo "$ac_t""$ld_shlibs" 1>&6
6156 test "$ld_shlibs" = no && can_build_shared=no
6157
6158 # Check hardcoding attributes.
6159 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6160 echo "configure:6161: checking how to hardcode library paths into programs" >&5
6161 hardcode_action=
6162 if test -n "$hardcode_libdir_flag_spec" || \
6163    test -n "$runpath_var"; then
6164
6165   # We can hardcode non-existant directories.
6166   if test "$hardcode_direct" != no &&
6167      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6168      # have to relink, otherwise we might link with an installed library
6169      # when we should be linking with a yet-to-be-installed one
6170      ## test "$hardcode_shlibpath_var" != no &&
6171      test "$hardcode_minus_L" != no; then
6172     # Linking always hardcodes the temporary library directory.
6173     hardcode_action=relink
6174   else
6175     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6176     hardcode_action=immediate
6177   fi
6178 else
6179   # We cannot hardcode anything, or else we can only hardcode existing
6180   # directories.
6181   hardcode_action=unsupported
6182 fi
6183 echo "$ac_t""$hardcode_action" 1>&6
6184
6185 striplib=
6186 old_striplib=
6187 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6188 echo "configure:6189: checking whether stripping libraries is possible" >&5
6189 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6190   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6191   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6192   echo "$ac_t""yes" 1>&6
6193 else
6194   echo "$ac_t""no" 1>&6
6195 fi
6196
6197 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6198 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6199
6200 # PORTME Fill in your ld.so characteristics
6201 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6202 echo "configure:6203: checking dynamic linker characteristics" >&5
6203 library_names_spec=
6204 libname_spec='lib$name'
6205 soname_spec=
6206 postinstall_cmds=
6207 postuninstall_cmds=
6208 finish_cmds=
6209 finish_eval=
6210 shlibpath_var=
6211 shlibpath_overrides_runpath=unknown
6212 version_type=none
6213 dynamic_linker="$host_os ld.so"
6214 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6215 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6216
6217 case $host_os in
6218 aix3*)
6219   version_type=linux
6220   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6221   shlibpath_var=LIBPATH
6222
6223   # AIX has no versioning support, so we append a major version to the name.
6224   soname_spec='${libname}${release}.so$major'
6225   ;;
6226
6227 aix4* | aix5*)
6228   version_type=linux
6229   need_lib_prefix=no
6230   need_version=no
6231   hardcode_into_libs=yes
6232   if test "$host_cpu" = ia64; then
6233     # AIX 5 supports IA64
6234     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6235     shlibpath_var=LD_LIBRARY_PATH
6236   else
6237     # With GCC up to 2.95.x, collect2 would create an import file
6238     # for dependence libraries.  The import file would start with
6239     # the line `#! .'.  This would cause the generated library to
6240     # depend on `.', always an invalid library.  This was fixed in
6241     # development snapshots of GCC prior to 3.0.
6242     case $host_os in
6243       aix4 | aix4.[01] | aix4.[01].*)
6244         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6245              echo ' yes '
6246              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6247           :
6248         else
6249           can_build_shared=no
6250         fi
6251         ;;
6252     esac
6253     # AIX (on Power*) has no versioning support, so currently we can
6254     # not hardcode correct soname into executable. Probably we can
6255     # add versioning support to collect2, so additional links can
6256     # be useful in future.
6257     if test "$aix_use_runtimelinking" = yes; then
6258       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6259       # instead of lib<name>.a to let people know that these are not
6260       # typical AIX shared libraries.
6261       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6262     else
6263       # We preserve .a as extension for shared libraries through AIX4.2
6264       # and later when we are not doing run time linking.
6265       library_names_spec='${libname}${release}.a $libname.a'
6266       soname_spec='${libname}${release}.so$major'
6267     fi
6268     shlibpath_var=LIBPATH
6269   fi
6270   hardcode_into_libs=yes
6271   ;;
6272
6273 amigaos*)
6274   library_names_spec='$libname.ixlibrary $libname.a'
6275   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6276   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'
6277   ;;
6278
6279 beos*)
6280   library_names_spec='${libname}.so'
6281   dynamic_linker="$host_os ld.so"
6282   shlibpath_var=LIBRARY_PATH
6283   ;;
6284
6285 bsdi4*)
6286   version_type=linux
6287   need_version=no
6288   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6289   soname_spec='${libname}${release}.so$major'
6290   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6291   shlibpath_var=LD_LIBRARY_PATH
6292   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6293   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6294   export_dynamic_flag_spec=-rdynamic
6295   # the default ld.so.conf also contains /usr/contrib/lib and
6296   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6297   # libtool to hard-code these into programs
6298   ;;
6299
6300 cygwin* | mingw* | pw32*)
6301   version_type=windows
6302   need_version=no
6303   need_lib_prefix=no
6304   case $GCC,$host_os in
6305   yes,cygwin*)
6306     library_names_spec='$libname.dll.a'
6307     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6308     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6309       dldir=$destdir/`dirname \$dlpath`~
6310       test -d \$dldir || mkdir -p \$dldir~
6311       $install_prog .libs/$dlname \$dldir/$dlname'
6312     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6313       dlpath=$dir/\$dldll~
6314        $rm \$dlpath'
6315     ;;
6316   yes,mingw*)
6317     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6318     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6319     ;;
6320   yes,pw32*)
6321     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6322     ;;
6323   *)
6324     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6325     ;;
6326   esac
6327   dynamic_linker='Win32 ld.exe'
6328   # FIXME: first we should search . and the directory the executable is in
6329   shlibpath_var=PATH
6330   ;;
6331
6332 darwin* | rhapsody*)
6333   dynamic_linker="$host_os dyld"
6334   version_type=darwin
6335   need_lib_prefix=no
6336   need_version=no
6337   # FIXME: Relying on posixy $() will cause problems for
6338   #        cross-compilation, but unfortunately the echo tests do not
6339   #        yet detect zsh echo's removal of \ escapes.
6340   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)'
6341   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6342   shlibpath_overrides_runpath=yes
6343   shlibpath_var=DYLD_LIBRARY_PATH
6344   ;;
6345
6346 freebsd1*)
6347   dynamic_linker=no
6348   ;;
6349
6350 freebsd*)
6351   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6352   version_type=freebsd-$objformat
6353   case $version_type in
6354     freebsd-elf*)
6355       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6356       need_version=no
6357       need_lib_prefix=no
6358       ;;
6359     freebsd-*)
6360       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6361       need_version=yes
6362       ;;
6363   esac
6364   shlibpath_var=LD_LIBRARY_PATH
6365   case $host_os in
6366   freebsd2*)
6367     shlibpath_overrides_runpath=yes
6368     ;;
6369   *)
6370     shlibpath_overrides_runpath=no
6371     hardcode_into_libs=yes
6372     ;;
6373   esac
6374   ;;
6375
6376 gnu*)
6377   version_type=linux
6378   need_lib_prefix=no
6379   need_version=no
6380   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6381   soname_spec='${libname}${release}.so$major'
6382   shlibpath_var=LD_LIBRARY_PATH
6383   hardcode_into_libs=yes
6384   ;;
6385
6386 hpux9* | hpux10* | hpux11*)
6387   # Give a soname corresponding to the major version so that dld.sl refuses to
6388   # link against other versions.
6389   dynamic_linker="$host_os dld.sl"
6390   version_type=sunos
6391   need_lib_prefix=no
6392   need_version=no
6393   shlibpath_var=SHLIB_PATH
6394   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6395   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6396   soname_spec='${libname}${release}.sl$major'
6397   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6398   postinstall_cmds='chmod 555 $lib'
6399   ;;
6400
6401 irix5* | irix6* | nonstopux*)
6402   case $host_os in
6403     nonstopux*) version_type=nonstopux ;;
6404     *)          version_type=irix ;;
6405   esac
6406   need_lib_prefix=no
6407   need_version=no
6408   soname_spec='${libname}${release}.so$major'
6409   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6410   case $host_os in
6411   irix5* | nonstopux*)
6412     libsuff= shlibsuff=
6413     ;;
6414   *)
6415     case $LD in # libtool.m4 will add one of these switches to LD
6416     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6417     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6418     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6419     *) libsuff= shlibsuff= libmagic=never-match;;
6420     esac
6421     ;;
6422   esac
6423   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6424   shlibpath_overrides_runpath=no
6425   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6426   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6427   ;;
6428
6429 # No shared lib support for Linux oldld, aout, or coff.
6430 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6431   dynamic_linker=no
6432   ;;
6433
6434 # This must be Linux ELF.
6435 linux-gnu*)
6436   version_type=linux
6437   need_lib_prefix=no
6438   need_version=no
6439   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6440   soname_spec='${libname}${release}.so$major'
6441   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6442   shlibpath_var=LD_LIBRARY_PATH
6443   shlibpath_overrides_runpath=no
6444   # This implies no fast_install, which is unacceptable.
6445   # Some rework will be needed to allow for fast_install
6446   # before this can be enabled.
6447   hardcode_into_libs=yes
6448
6449   # We used to test for /lib/ld.so.1 and disable shared libraries on
6450   # powerpc, because MkLinux only supported shared libraries with the
6451   # GNU dynamic linker.  Since this was broken with cross compilers,
6452   # most powerpc-linux boxes support dynamic linking these days and
6453   # people can always --disable-shared, the test was removed, and we
6454   # assume the GNU/Linux dynamic linker is in use.
6455   dynamic_linker='GNU/Linux ld.so'
6456   ;;
6457
6458 netbsd*)
6459   version_type=sunos
6460   need_lib_prefix=no
6461   need_version=no
6462   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6463     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6464     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6465     dynamic_linker='NetBSD (a.out) ld.so'
6466   else
6467     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6468     soname_spec='${libname}${release}.so$major'
6469     dynamic_linker='NetBSD ld.elf_so'
6470   fi
6471   shlibpath_var=LD_LIBRARY_PATH
6472   shlibpath_overrides_runpath=yes
6473   hardcode_into_libs=yes
6474   ;;
6475
6476 newsos6)
6477   version_type=linux
6478   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6479   shlibpath_var=LD_LIBRARY_PATH
6480   shlibpath_overrides_runpath=yes
6481   ;;
6482
6483 openbsd*)
6484   version_type=sunos
6485   need_lib_prefix=no
6486   need_version=no
6487   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6488     case "$host_os" in
6489     openbsd2.[89] | openbsd2.[89].*)
6490       shlibpath_overrides_runpath=no
6491       ;;
6492     *)
6493       shlibpath_overrides_runpath=yes
6494       ;;
6495     esac
6496   else
6497     shlibpath_overrides_runpath=yes
6498   fi
6499   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6500   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6501   shlibpath_var=LD_LIBRARY_PATH
6502   ;;
6503
6504 openedition*)
6505   need_lib_prefix=no
6506   need_version=no
6507   shlibpath_overrides_runpath=yes
6508   shlibpath_var=LIBPATH
6509   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6510   # the library's exports are in libname.x; this is the file that must
6511   # actually be linked with to use a DLL.
6512   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6513   ;;
6514
6515 os2*)
6516   libname_spec='$name'
6517   need_lib_prefix=no
6518   library_names_spec='$libname.dll $libname.a'
6519   dynamic_linker='OS/2 ld.exe'
6520   shlibpath_var=LIBPATH
6521   ;;
6522
6523 osf3* | osf4* | osf5*)
6524   version_type=osf
6525   need_version=no
6526   soname_spec='${libname}${release}.so$major'
6527   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6528   shlibpath_var=LD_LIBRARY_PATH
6529   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6530   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6531   hardcode_into_libs=yes
6532   ;;
6533
6534 sco3.2v5*)
6535   version_type=osf
6536   soname_spec='${libname}${release}.so$major'
6537   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6538   shlibpath_var=LD_LIBRARY_PATH
6539   ;;
6540
6541 solaris*)
6542   version_type=linux
6543   need_lib_prefix=no
6544   need_version=no
6545   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6546   soname_spec='${libname}${release}.so$major'
6547   shlibpath_var=LD_LIBRARY_PATH
6548   shlibpath_overrides_runpath=yes
6549   hardcode_into_libs=yes
6550   # ldd complains unless libraries are executable
6551   postinstall_cmds='chmod +x $lib'
6552   ;;
6553
6554 sunos4*)
6555   version_type=sunos
6556   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6557   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6558   shlibpath_var=LD_LIBRARY_PATH
6559   shlibpath_overrides_runpath=yes
6560   if test "$with_gnu_ld" = yes; then
6561     need_lib_prefix=no
6562   fi
6563   need_version=yes
6564   ;;
6565
6566 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6567   version_type=linux
6568   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6569   soname_spec='${libname}${release}.so$major'
6570   shlibpath_var=LD_LIBRARY_PATH
6571   case $host_vendor in
6572     sni)
6573       shlibpath_overrides_runpath=no
6574       need_lib_prefix=no
6575       export_dynamic_flag_spec='${wl}-Blargedynsym'
6576       runpath_var=LD_RUN_PATH
6577       ;;
6578     siemens)
6579       need_lib_prefix=no
6580       ;;
6581     motorola)
6582       need_lib_prefix=no
6583       need_version=no
6584       shlibpath_overrides_runpath=no
6585       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6586       ;;
6587   esac
6588   ;;
6589
6590 uts4*)
6591   version_type=linux
6592   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6593   soname_spec='${libname}${release}.so$major'
6594   shlibpath_var=LD_LIBRARY_PATH
6595   ;;
6596
6597 dgux*)
6598   version_type=linux
6599   need_lib_prefix=no
6600   need_version=no
6601   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6602   soname_spec='${libname}${release}.so$major'
6603   shlibpath_var=LD_LIBRARY_PATH
6604   ;;
6605
6606 sysv4*MP*)
6607   if test -d /usr/nec ;then
6608     version_type=linux
6609     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6610     soname_spec='$libname.so.$major'
6611     shlibpath_var=LD_LIBRARY_PATH
6612   fi
6613   ;;
6614
6615 *)
6616   dynamic_linker=no
6617   ;;
6618 esac
6619 echo "$ac_t""$dynamic_linker" 1>&6
6620 test "$dynamic_linker" = no && can_build_shared=no
6621
6622 # Report the final consequences.
6623 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6624 echo "configure:6625: checking if libtool supports shared libraries" >&5
6625 echo "$ac_t""$can_build_shared" 1>&6
6626
6627 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6628 echo "configure:6629: checking whether to build shared libraries" >&5
6629 test "$can_build_shared" = "no" && enable_shared=no
6630
6631 # On AIX, shared libraries and static libraries use the same namespace, and
6632 # are all built from PIC.
6633 case "$host_os" in
6634 aix3*)
6635   test "$enable_shared" = yes && enable_static=no
6636   if test -n "$RANLIB"; then
6637     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6638     postinstall_cmds='$RANLIB $lib'
6639   fi
6640   ;;
6641
6642 aix4*)
6643   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6644     test "$enable_shared" = yes && enable_static=no
6645   fi
6646   ;;
6647 esac
6648 echo "$ac_t""$enable_shared" 1>&6
6649
6650 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6651 echo "configure:6652: checking whether to build static libraries" >&5
6652 # Make sure either enable_shared or enable_static is yes.
6653 test "$enable_shared" = yes || enable_static=yes
6654 echo "$ac_t""$enable_static" 1>&6
6655
6656 if test "$hardcode_action" = relink; then
6657   # Fast installation is not supported
6658   enable_fast_install=no
6659 elif test "$shlibpath_overrides_runpath" = yes ||
6660      test "$enable_shared" = no; then
6661   # Fast installation is not necessary
6662   enable_fast_install=needless
6663 fi
6664
6665 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6666 if test "$GCC" = yes; then
6667   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6668 fi
6669
6670 if test "x$enable_dlopen" != xyes; then
6671   enable_dlopen=unknown
6672   enable_dlopen_self=unknown
6673   enable_dlopen_self_static=unknown
6674 else
6675   lt_cv_dlopen=no
6676   lt_cv_dlopen_libs=
6677
6678   case $host_os in
6679   beos*)
6680     lt_cv_dlopen="load_add_on"
6681     lt_cv_dlopen_libs=
6682     lt_cv_dlopen_self=yes
6683     ;;
6684
6685   cygwin* | mingw* | pw32*)
6686     lt_cv_dlopen="LoadLibrary"
6687     lt_cv_dlopen_libs=
6688    ;;
6689
6690   *)
6691     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6692 echo "configure:6693: checking for dllload" >&5
6693 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6694   echo $ac_n "(cached) $ac_c" 1>&6
6695 else
6696   cat > conftest.$ac_ext <<EOF
6697 #line 6698 "configure"
6698 #include "confdefs.h"
6699 /* System header to define __stub macros and hopefully few prototypes,
6700     which can conflict with char dllload(); below.  */
6701 #include <assert.h>
6702 /* Override any gcc2 internal prototype to avoid an error.  */
6703 /* We use char because int might match the return type of a gcc2
6704     builtin and then its argument prototype would still apply.  */
6705 char dllload();
6706 char (*f)();
6707
6708 int main() {
6709
6710 /* The GNU C library defines this for functions which it implements
6711     to always fail with ENOSYS.  Some functions are actually named
6712     something starting with __ and the normal name is an alias.  */
6713 #if defined (__stub_dllload) || defined (__stub___dllload)
6714 choke me
6715 #else
6716 f = dllload;
6717 #endif
6718
6719 ; return 0; }
6720 EOF
6721 if { (eval echo configure:6722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6722   rm -rf conftest*
6723   eval "ac_cv_func_dllload=yes"
6724 else
6725   echo "configure: failed program was:" >&5
6726   cat conftest.$ac_ext >&5
6727   rm -rf conftest*
6728   eval "ac_cv_func_dllload=no"
6729 fi
6730 rm -f conftest*
6731 fi
6732
6733 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6734   echo "$ac_t""yes" 1>&6
6735   lt_cv_dlopen="dllload"
6736 else
6737   echo "$ac_t""no" 1>&6
6738 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6739 echo "configure:6740: checking for shl_load" >&5
6740 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6741   echo $ac_n "(cached) $ac_c" 1>&6
6742 else
6743   cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746 /* System header to define __stub macros and hopefully few prototypes,
6747     which can conflict with char shl_load(); below.  */
6748 #include <assert.h>
6749 /* Override any gcc2 internal prototype to avoid an error.  */
6750 /* We use char because int might match the return type of a gcc2
6751     builtin and then its argument prototype would still apply.  */
6752 char shl_load();
6753 char (*f)();
6754
6755 int main() {
6756
6757 /* The GNU C library defines this for functions which it implements
6758     to always fail with ENOSYS.  Some functions are actually named
6759     something starting with __ and the normal name is an alias.  */
6760 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6761 choke me
6762 #else
6763 f = shl_load;
6764 #endif
6765
6766 ; return 0; }
6767 EOF
6768 if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6769   rm -rf conftest*
6770   eval "ac_cv_func_shl_load=yes"
6771 else
6772   echo "configure: failed program was:" >&5
6773   cat conftest.$ac_ext >&5
6774   rm -rf conftest*
6775   eval "ac_cv_func_shl_load=no"
6776 fi
6777 rm -f conftest*
6778 fi
6779
6780 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6781   echo "$ac_t""yes" 1>&6
6782   lt_cv_dlopen="shl_load"
6783 else
6784   echo "$ac_t""no" 1>&6
6785 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6786 echo "configure:6787: checking for shl_load in -ldld" >&5
6787 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6788 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6789   echo $ac_n "(cached) $ac_c" 1>&6
6790 else
6791   ac_save_LIBS="$LIBS"
6792 LIBS="-ldld  $LIBS"
6793 cat > conftest.$ac_ext <<EOF
6794 #line 6795 "configure"
6795 #include "confdefs.h"
6796 /* Override any gcc2 internal prototype to avoid an error.  */
6797 /* We use char because int might match the return type of a gcc2
6798     builtin and then its argument prototype would still apply.  */
6799 char shl_load();
6800
6801 int main() {
6802 shl_load()
6803 ; return 0; }
6804 EOF
6805 if { (eval echo configure:6806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6806   rm -rf conftest*
6807   eval "ac_cv_lib_$ac_lib_var=yes"
6808 else
6809   echo "configure: failed program was:" >&5
6810   cat conftest.$ac_ext >&5
6811   rm -rf conftest*
6812   eval "ac_cv_lib_$ac_lib_var=no"
6813 fi
6814 rm -f conftest*
6815 LIBS="$ac_save_LIBS"
6816
6817 fi
6818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6819   echo "$ac_t""yes" 1>&6
6820   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6821 else
6822   echo "$ac_t""no" 1>&6
6823 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6824 echo "configure:6825: checking for dlopen" >&5
6825 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6826   echo $ac_n "(cached) $ac_c" 1>&6
6827 else
6828   cat > conftest.$ac_ext <<EOF
6829 #line 6830 "configure"
6830 #include "confdefs.h"
6831 /* System header to define __stub macros and hopefully few prototypes,
6832     which can conflict with char dlopen(); below.  */
6833 #include <assert.h>
6834 /* Override any gcc2 internal prototype to avoid an error.  */
6835 /* We use char because int might match the return type of a gcc2
6836     builtin and then its argument prototype would still apply.  */
6837 char dlopen();
6838 char (*f)();
6839
6840 int main() {
6841
6842 /* The GNU C library defines this for functions which it implements
6843     to always fail with ENOSYS.  Some functions are actually named
6844     something starting with __ and the normal name is an alias.  */
6845 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6846 choke me
6847 #else
6848 f = dlopen;
6849 #endif
6850
6851 ; return 0; }
6852 EOF
6853 if { (eval echo configure:6854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6854   rm -rf conftest*
6855   eval "ac_cv_func_dlopen=yes"
6856 else
6857   echo "configure: failed program was:" >&5
6858   cat conftest.$ac_ext >&5
6859   rm -rf conftest*
6860   eval "ac_cv_func_dlopen=no"
6861 fi
6862 rm -f conftest*
6863 fi
6864
6865 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6866   echo "$ac_t""yes" 1>&6
6867   lt_cv_dlopen="dlopen"
6868 else
6869   echo "$ac_t""no" 1>&6
6870 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6871 echo "configure:6872: checking for dlopen in -ldl" >&5
6872 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6873 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6874   echo $ac_n "(cached) $ac_c" 1>&6
6875 else
6876   ac_save_LIBS="$LIBS"
6877 LIBS="-ldl  $LIBS"
6878 cat > conftest.$ac_ext <<EOF
6879 #line 6880 "configure"
6880 #include "confdefs.h"
6881 /* Override any gcc2 internal prototype to avoid an error.  */
6882 /* We use char because int might match the return type of a gcc2
6883     builtin and then its argument prototype would still apply.  */
6884 char dlopen();
6885
6886 int main() {
6887 dlopen()
6888 ; return 0; }
6889 EOF
6890 if { (eval echo configure:6891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6891   rm -rf conftest*
6892   eval "ac_cv_lib_$ac_lib_var=yes"
6893 else
6894   echo "configure: failed program was:" >&5
6895   cat conftest.$ac_ext >&5
6896   rm -rf conftest*
6897   eval "ac_cv_lib_$ac_lib_var=no"
6898 fi
6899 rm -f conftest*
6900 LIBS="$ac_save_LIBS"
6901
6902 fi
6903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6904   echo "$ac_t""yes" 1>&6
6905   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6906 else
6907   echo "$ac_t""no" 1>&6
6908 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6909 echo "configure:6910: checking for dlopen in -lsvld" >&5
6910 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6911 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6912   echo $ac_n "(cached) $ac_c" 1>&6
6913 else
6914   ac_save_LIBS="$LIBS"
6915 LIBS="-lsvld  $LIBS"
6916 cat > conftest.$ac_ext <<EOF
6917 #line 6918 "configure"
6918 #include "confdefs.h"
6919 /* Override any gcc2 internal prototype to avoid an error.  */
6920 /* We use char because int might match the return type of a gcc2
6921     builtin and then its argument prototype would still apply.  */
6922 char dlopen();
6923
6924 int main() {
6925 dlopen()
6926 ; return 0; }
6927 EOF
6928 if { (eval echo configure:6929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6929   rm -rf conftest*
6930   eval "ac_cv_lib_$ac_lib_var=yes"
6931 else
6932   echo "configure: failed program was:" >&5
6933   cat conftest.$ac_ext >&5
6934   rm -rf conftest*
6935   eval "ac_cv_lib_$ac_lib_var=no"
6936 fi
6937 rm -f conftest*
6938 LIBS="$ac_save_LIBS"
6939
6940 fi
6941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6942   echo "$ac_t""yes" 1>&6
6943   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6944 else
6945   echo "$ac_t""no" 1>&6
6946 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6947 echo "configure:6948: checking for dld_link in -ldld" >&5
6948 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6949 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6950   echo $ac_n "(cached) $ac_c" 1>&6
6951 else
6952   ac_save_LIBS="$LIBS"
6953 LIBS="-ldld  $LIBS"
6954 cat > conftest.$ac_ext <<EOF
6955 #line 6956 "configure"
6956 #include "confdefs.h"
6957 /* Override any gcc2 internal prototype to avoid an error.  */
6958 /* We use char because int might match the return type of a gcc2
6959     builtin and then its argument prototype would still apply.  */
6960 char dld_link();
6961
6962 int main() {
6963 dld_link()
6964 ; return 0; }
6965 EOF
6966 if { (eval echo configure:6967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6967   rm -rf conftest*
6968   eval "ac_cv_lib_$ac_lib_var=yes"
6969 else
6970   echo "configure: failed program was:" >&5
6971   cat conftest.$ac_ext >&5
6972   rm -rf conftest*
6973   eval "ac_cv_lib_$ac_lib_var=no"
6974 fi
6975 rm -f conftest*
6976 LIBS="$ac_save_LIBS"
6977
6978 fi
6979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6980   echo "$ac_t""yes" 1>&6
6981   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6982 else
6983   echo "$ac_t""no" 1>&6
6984 fi
6985
6986               
6987 fi
6988
6989             
6990 fi
6991
6992           
6993 fi
6994
6995         
6996 fi
6997
6998       
6999 fi
7000
7001     
7002 fi
7003
7004     ;;
7005   esac
7006
7007   if test "x$lt_cv_dlopen" != xno; then
7008     enable_dlopen=yes
7009   else
7010     enable_dlopen=no
7011   fi
7012
7013   case $lt_cv_dlopen in
7014   dlopen)
7015     save_CPPFLAGS="$CPPFLAGS"
7016         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
7017
7018     save_LDFLAGS="$LDFLAGS"
7019     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7020
7021     save_LIBS="$LIBS"
7022     LIBS="$lt_cv_dlopen_libs $LIBS"
7023
7024     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
7025 echo "configure:7026: checking whether a program can dlopen itself" >&5
7026 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
7027   echo $ac_n "(cached) $ac_c" 1>&6
7028 else
7029           if test "$cross_compiling" = yes; then :
7030   lt_cv_dlopen_self=cross
7031 else
7032     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7033   lt_status=$lt_dlunknown
7034   cat > conftest.$ac_ext <<EOF
7035 #line 7036 "configure"
7036 #include "confdefs.h"
7037
7038 #if HAVE_DLFCN_H
7039 #include <dlfcn.h>
7040 #endif
7041
7042 #include <stdio.h>
7043
7044 #ifdef RTLD_GLOBAL
7045 #  define LT_DLGLOBAL           RTLD_GLOBAL
7046 #else
7047 #  ifdef DL_GLOBAL
7048 #    define LT_DLGLOBAL         DL_GLOBAL
7049 #  else
7050 #    define LT_DLGLOBAL         0
7051 #  endif
7052 #endif
7053
7054 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7055    find out it does not work in some platform. */
7056 #ifndef LT_DLLAZY_OR_NOW
7057 #  ifdef RTLD_LAZY
7058 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7059 #  else
7060 #    ifdef DL_LAZY
7061 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7062 #    else
7063 #      ifdef RTLD_NOW
7064 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7065 #      else
7066 #        ifdef DL_NOW
7067 #          define LT_DLLAZY_OR_NOW      DL_NOW
7068 #        else
7069 #          define LT_DLLAZY_OR_NOW      0
7070 #        endif
7071 #      endif
7072 #    endif
7073 #  endif
7074 #endif
7075
7076 #ifdef __cplusplus
7077 extern "C" void exit (int);
7078 #endif
7079
7080 void fnord() { int i=42;}
7081 int main ()
7082 {
7083   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7084   int status = $lt_dlunknown;
7085
7086   if (self)
7087     {
7088       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7089       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7090       /* dlclose (self); */
7091     }
7092
7093     exit (status);
7094 }
7095 EOF
7096   if { (eval echo configure:7097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7097     (./conftest; exit; ) 2>/dev/null
7098     lt_status=$?
7099     case x$lt_status in
7100       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7101       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7102       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7103     esac
7104   else :
7105     # compilation failed
7106     lt_cv_dlopen_self=no
7107   fi
7108 fi
7109 rm -fr conftest*
7110
7111     
7112 fi
7113
7114 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7115
7116     if test "x$lt_cv_dlopen_self" = xyes; then
7117       LDFLAGS="$LDFLAGS $link_static_flag"
7118       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7119 echo "configure:7120: checking whether a statically linked program can dlopen itself" >&5
7120 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7121   echo $ac_n "(cached) $ac_c" 1>&6
7122 else
7123           if test "$cross_compiling" = yes; then :
7124   lt_cv_dlopen_self_static=cross
7125 else
7126     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7127   lt_status=$lt_dlunknown
7128   cat > conftest.$ac_ext <<EOF
7129 #line 7130 "configure"
7130 #include "confdefs.h"
7131
7132 #if HAVE_DLFCN_H
7133 #include <dlfcn.h>
7134 #endif
7135
7136 #include <stdio.h>
7137
7138 #ifdef RTLD_GLOBAL
7139 #  define LT_DLGLOBAL           RTLD_GLOBAL
7140 #else
7141 #  ifdef DL_GLOBAL
7142 #    define LT_DLGLOBAL         DL_GLOBAL
7143 #  else
7144 #    define LT_DLGLOBAL         0
7145 #  endif
7146 #endif
7147
7148 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7149    find out it does not work in some platform. */
7150 #ifndef LT_DLLAZY_OR_NOW
7151 #  ifdef RTLD_LAZY
7152 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7153 #  else
7154 #    ifdef DL_LAZY
7155 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7156 #    else
7157 #      ifdef RTLD_NOW
7158 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7159 #      else
7160 #        ifdef DL_NOW
7161 #          define LT_DLLAZY_OR_NOW      DL_NOW
7162 #        else
7163 #          define LT_DLLAZY_OR_NOW      0
7164 #        endif
7165 #      endif
7166 #    endif
7167 #  endif
7168 #endif
7169
7170 #ifdef __cplusplus
7171 extern "C" void exit (int);
7172 #endif
7173
7174 void fnord() { int i=42;}
7175 int main ()
7176 {
7177   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7178   int status = $lt_dlunknown;
7179
7180   if (self)
7181     {
7182       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7183       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7184       /* dlclose (self); */
7185     }
7186
7187     exit (status);
7188 }
7189 EOF
7190   if { (eval echo configure:7191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7191     (./conftest; exit; ) 2>/dev/null
7192     lt_status=$?
7193     case x$lt_status in
7194       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7195       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7196       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7197     esac
7198   else :
7199     # compilation failed
7200     lt_cv_dlopen_self_static=no
7201   fi
7202 fi
7203 rm -fr conftest*
7204
7205       
7206 fi
7207
7208 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7209     fi
7210
7211     CPPFLAGS="$save_CPPFLAGS"
7212     LDFLAGS="$save_LDFLAGS"
7213     LIBS="$save_LIBS"
7214     ;;
7215   esac
7216
7217   case $lt_cv_dlopen_self in
7218   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7219   *) enable_dlopen_self=unknown ;;
7220   esac
7221
7222   case $lt_cv_dlopen_self_static in
7223   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7224   *) enable_dlopen_self_static=unknown ;;
7225   esac
7226 fi
7227
7228
7229 if test "$enable_shared" = yes && test "$GCC" = yes; then
7230   case $archive_cmds in
7231   *'~'*)
7232     # FIXME: we may have to deal with multi-command sequences.
7233     ;;
7234   '$CC '*)
7235     # Test whether the compiler implicitly links with -lc since on some
7236     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7237     # to ld, don't add -lc before -lgcc.
7238     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7239 echo "configure:7240: checking whether -lc should be explicitly linked in" >&5
7240     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7241   echo $ac_n "(cached) $ac_c" 1>&6
7242 else
7243   $rm conftest*
7244     echo 'static int dummy;' > conftest.$ac_ext
7245
7246     if { (eval echo configure:7247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7247       soname=conftest
7248       lib=conftest
7249       libobjs=conftest.$ac_objext
7250       deplibs=
7251       wl=$lt_cv_prog_cc_wl
7252       compiler_flags=-v
7253       linker_flags=-v
7254       verstring=
7255       output_objdir=.
7256       libname=conftest
7257       save_allow_undefined_flag=$allow_undefined_flag
7258       allow_undefined_flag=
7259       if { (eval echo configure:7260: \"$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; }
7260       then
7261         lt_cv_archive_cmds_need_lc=no
7262       else
7263         lt_cv_archive_cmds_need_lc=yes
7264       fi
7265       allow_undefined_flag=$save_allow_undefined_flag
7266     else
7267       cat conftest.err 1>&5
7268     fi
7269 fi
7270
7271     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7272     ;;
7273   esac
7274 fi
7275 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7276
7277 # The second clause should only fire when bootstrapping the
7278 # libtool distribution, otherwise you forgot to ship ltmain.sh
7279 # with your package, and you will get complaints that there are
7280 # no rules to generate ltmain.sh.
7281 if test -f "$ltmain"; then
7282   :
7283 else
7284   # If there is no Makefile yet, we rely on a make rule to execute
7285   # `config.status --recheck' to rerun these tests and create the
7286   # libtool script then.
7287   test -f Makefile && make "$ltmain"
7288 fi
7289
7290 if test -f "$ltmain"; then
7291   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7292   $rm -f "${ofile}T"
7293
7294   echo creating $ofile
7295
7296   # Now quote all the things that may contain metacharacters while being
7297   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7298   # variables and quote the copies for generation of the libtool script.
7299   for var in echo old_CC old_CFLAGS SED \
7300     AR AR_FLAGS CC LD LN_S NM SHELL \
7301     reload_flag reload_cmds wl \
7302     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7303     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7304     library_names_spec soname_spec \
7305     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7306     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7307     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7308     old_striplib striplib file_magic_cmd export_symbols_cmds \
7309     deplibs_check_method allow_undefined_flag no_undefined_flag \
7310     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7311     global_symbol_to_c_name_address \
7312     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7313     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7314     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7315
7316     case $var in
7317     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7318     old_postinstall_cmds | old_postuninstall_cmds | \
7319     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7320     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7321     postinstall_cmds | postuninstall_cmds | \
7322     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7323       # Double-quote double-evaled strings.
7324       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7325       ;;
7326     *)
7327       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7328       ;;
7329     esac
7330   done
7331
7332   cat <<__EOF__ > "${ofile}T"
7333 #! $SHELL
7334
7335 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7336 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7337 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7338 #
7339 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7340 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7341 #
7342 # This program is free software; you can redistribute it and/or modify
7343 # it under the terms of the GNU General Public License as published by
7344 # the Free Software Foundation; either version 2 of the License, or
7345 # (at your option) any later version.
7346 #
7347 # This program is distributed in the hope that it will be useful, but
7348 # WITHOUT ANY WARRANTY; without even the implied warranty of
7349 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7350 # General Public License for more details.
7351 #
7352 # You should have received a copy of the GNU General Public License
7353 # along with this program; if not, write to the Free Software
7354 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7355 #
7356 # As a special exception to the GNU General Public License, if you
7357 # distribute this file as part of a program that contains a
7358 # configuration script generated by Autoconf, you may include it under
7359 # the same distribution terms that you use for the rest of that program.
7360
7361 # A sed that does not truncate output.
7362 SED=$lt_SED
7363
7364 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7365 Xsed="${SED} -e s/^X//"
7366
7367 # The HP-UX ksh and POSIX shell print the target directory to stdout
7368 # if CDPATH is set.
7369 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7370
7371 # ### BEGIN LIBTOOL CONFIG
7372
7373 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7374
7375 # Shell to use when invoking shell scripts.
7376 SHELL=$lt_SHELL
7377
7378 # Whether or not to build shared libraries.
7379 build_libtool_libs=$enable_shared
7380
7381 # Whether or not to build static libraries.
7382 build_old_libs=$enable_static
7383
7384 # Whether or not to add -lc for building shared libraries.
7385 build_libtool_need_lc=$need_lc
7386
7387 # Whether or not to optimize for fast installation.
7388 fast_install=$enable_fast_install
7389
7390 # The host system.
7391 host_alias=$host_alias
7392 host=$host
7393
7394 # An echo program that does not interpret backslashes.
7395 echo=$lt_echo
7396
7397 # The archiver.
7398 AR=$lt_AR
7399 AR_FLAGS=$lt_AR_FLAGS
7400
7401 # The default C compiler.
7402 CC=$lt_CC
7403
7404 # Is the compiler the GNU C compiler?
7405 with_gcc=$GCC
7406
7407 # The linker used to build libraries.
7408 LD=$lt_LD
7409
7410 # Whether we need hard or soft links.
7411 LN_S=$lt_LN_S
7412
7413 # A BSD-compatible nm program.
7414 NM=$lt_NM
7415
7416 # A symbol stripping program
7417 STRIP=$STRIP
7418
7419 # Used to examine libraries when file_magic_cmd begins "file"
7420 MAGIC_CMD=$MAGIC_CMD
7421
7422 # Used on cygwin: DLL creation program.
7423 DLLTOOL="$DLLTOOL"
7424
7425 # Used on cygwin: object dumper.
7426 OBJDUMP="$OBJDUMP"
7427
7428 # Used on cygwin: assembler.
7429 AS="$AS"
7430
7431 # The name of the directory that contains temporary libtool files.
7432 objdir=$objdir
7433
7434 # How to create reloadable object files.
7435 reload_flag=$lt_reload_flag
7436 reload_cmds=$lt_reload_cmds
7437
7438 # How to pass a linker flag through the compiler.
7439 wl=$lt_wl
7440
7441 # Object file suffix (normally "o").
7442 objext="$ac_objext"
7443
7444 # Old archive suffix (normally "a").
7445 libext="$libext"
7446
7447 # Executable file suffix (normally "").
7448 exeext="$exeext"
7449
7450 # Additional compiler flags for building library objects.
7451 pic_flag=$lt_pic_flag
7452 pic_mode=$pic_mode
7453
7454 # Does compiler simultaneously support -c and -o options?
7455 compiler_c_o=$lt_compiler_c_o
7456
7457 # Can we write directly to a .lo ?
7458 compiler_o_lo=$lt_compiler_o_lo
7459
7460 # Must we lock files when doing compilation ?
7461 need_locks=$lt_need_locks
7462
7463 # Do we need the lib prefix for modules?
7464 need_lib_prefix=$need_lib_prefix
7465
7466 # Do we need a version for libraries?
7467 need_version=$need_version
7468
7469 # Whether dlopen is supported.
7470 dlopen_support=$enable_dlopen
7471
7472 # Whether dlopen of programs is supported.
7473 dlopen_self=$enable_dlopen_self
7474
7475 # Whether dlopen of statically linked programs is supported.
7476 dlopen_self_static=$enable_dlopen_self_static
7477
7478 # Compiler flag to prevent dynamic linking.
7479 link_static_flag=$lt_link_static_flag
7480
7481 # Compiler flag to turn off builtin functions.
7482 no_builtin_flag=$lt_no_builtin_flag
7483
7484 # Compiler flag to allow reflexive dlopens.
7485 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7486
7487 # Compiler flag to generate shared objects directly from archives.
7488 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7489
7490 # Compiler flag to generate thread-safe objects.
7491 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7492
7493 # Library versioning type.
7494 version_type=$version_type
7495
7496 # Format of library name prefix.
7497 libname_spec=$lt_libname_spec
7498
7499 # List of archive names.  First name is the real one, the rest are links.
7500 # The last name is the one that the linker finds with -lNAME.
7501 library_names_spec=$lt_library_names_spec
7502
7503 # The coded name of the library, if different from the real name.
7504 soname_spec=$lt_soname_spec
7505
7506 # Commands used to build and install an old-style archive.
7507 RANLIB=$lt_RANLIB
7508 old_archive_cmds=$lt_old_archive_cmds
7509 old_postinstall_cmds=$lt_old_postinstall_cmds
7510 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7511
7512 # Create an old-style archive from a shared archive.
7513 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7514
7515 # Create a temporary old-style archive to link instead of a shared archive.
7516 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7517
7518 # Commands used to build and install a shared archive.
7519 archive_cmds=$lt_archive_cmds
7520 archive_expsym_cmds=$lt_archive_expsym_cmds
7521 postinstall_cmds=$lt_postinstall_cmds
7522 postuninstall_cmds=$lt_postuninstall_cmds
7523
7524 # Commands to strip libraries.
7525 old_striplib=$lt_old_striplib
7526 striplib=$lt_striplib
7527
7528 # Method to check whether dependent libraries are shared objects.
7529 deplibs_check_method=$lt_deplibs_check_method
7530
7531 # Command to use when deplibs_check_method == file_magic.
7532 file_magic_cmd=$lt_file_magic_cmd
7533
7534 # Flag that allows shared libraries with undefined symbols to be built.
7535 allow_undefined_flag=$lt_allow_undefined_flag
7536
7537 # Flag that forces no undefined symbols.
7538 no_undefined_flag=$lt_no_undefined_flag
7539
7540 # Commands used to finish a libtool library installation in a directory.
7541 finish_cmds=$lt_finish_cmds
7542
7543 # Same as above, but a single script fragment to be evaled but not shown.
7544 finish_eval=$lt_finish_eval
7545
7546 # Take the output of nm and produce a listing of raw symbols and C names.
7547 global_symbol_pipe=$lt_global_symbol_pipe
7548
7549 # Transform the output of nm in a proper C declaration
7550 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7551
7552 # Transform the output of nm in a C name address pair
7553 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7554
7555 # This is the shared library runtime path variable.
7556 runpath_var=$runpath_var
7557
7558 # This is the shared library path variable.
7559 shlibpath_var=$shlibpath_var
7560
7561 # Is shlibpath searched before the hard-coded library search path?
7562 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7563
7564 # How to hardcode a shared library path into an executable.
7565 hardcode_action=$hardcode_action
7566
7567 # Whether we should hardcode library paths into libraries.
7568 hardcode_into_libs=$hardcode_into_libs
7569
7570 # Flag to hardcode \$libdir into a binary during linking.
7571 # This must work even if \$libdir does not exist.
7572 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7573
7574 # Whether we need a single -rpath flag with a separated argument.
7575 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7576
7577 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7578 # resulting binary.
7579 hardcode_direct=$hardcode_direct
7580
7581 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7582 # resulting binary.
7583 hardcode_minus_L=$hardcode_minus_L
7584
7585 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7586 # the resulting binary.
7587 hardcode_shlibpath_var=$hardcode_shlibpath_var
7588
7589 # Variables whose values should be saved in libtool wrapper scripts and
7590 # restored at relink time.
7591 variables_saved_for_relink="$variables_saved_for_relink"
7592
7593 # Whether libtool must link a program against all its dependency libraries.
7594 link_all_deplibs=$link_all_deplibs
7595
7596 # Compile-time system search path for libraries
7597 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7598
7599 # Run-time system search path for libraries
7600 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7601
7602 # Fix the shell variable \$srcfile for the compiler.
7603 fix_srcfile_path="$fix_srcfile_path"
7604
7605 # Set to yes if exported symbols are required.
7606 always_export_symbols=$always_export_symbols
7607
7608 # The commands to list exported symbols.
7609 export_symbols_cmds=$lt_export_symbols_cmds
7610
7611 # The commands to extract the exported symbol list from a shared archive.
7612 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7613
7614 # Symbols that should not be listed in the preloaded symbols.
7615 exclude_expsyms=$lt_exclude_expsyms
7616
7617 # Symbols that must always be exported.
7618 include_expsyms=$lt_include_expsyms
7619
7620 # ### END LIBTOOL CONFIG
7621
7622 __EOF__
7623
7624   case $host_os in
7625   aix3*)
7626     cat <<\EOF >> "${ofile}T"
7627
7628 # AIX sometimes has problems with the GCC collect2 program.  For some
7629 # reason, if we set the COLLECT_NAMES environment variable, the problems
7630 # vanish in a puff of smoke.
7631 if test "X${COLLECT_NAMES+set}" != Xset; then
7632   COLLECT_NAMES=
7633   export COLLECT_NAMES
7634 fi
7635 EOF
7636     ;;
7637   esac
7638
7639   case $host_os in
7640   cygwin* | mingw* | pw32* | os2*)
7641     cat <<'EOF' >> "${ofile}T"
7642       # This is a source program that is used to create dlls on Windows
7643       # Don't remove nor modify the starting and closing comments
7644 # /* ltdll.c starts here */
7645 # #define WIN32_LEAN_AND_MEAN
7646 # #include <windows.h>
7647 # #undef WIN32_LEAN_AND_MEAN
7648 # #include <stdio.h>
7649 #
7650 # #ifndef __CYGWIN__
7651 # #  ifdef __CYGWIN32__
7652 # #    define __CYGWIN__ __CYGWIN32__
7653 # #  endif
7654 # #endif
7655 #
7656 # #ifdef __cplusplus
7657 # extern "C" {
7658 # #endif
7659 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7660 # #ifdef __cplusplus
7661 # }
7662 # #endif
7663 #
7664 # #ifdef __CYGWIN__
7665 # #include <cygwin/cygwin_dll.h>
7666 # DECLARE_CYGWIN_DLL( DllMain );
7667 # #endif
7668 # HINSTANCE __hDllInstance_base;
7669 #
7670 # BOOL APIENTRY
7671 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7672 # {
7673 #   __hDllInstance_base = hInst;
7674 #   return TRUE;
7675 # }
7676 # /* ltdll.c ends here */
7677         # This is a source program that is used to create import libraries
7678         # on Windows for dlls which lack them. Don't remove nor modify the
7679         # starting and closing comments
7680 # /* impgen.c starts here */
7681 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7682 #
7683 #  This file is part of GNU libtool.
7684 #
7685 #  This program is free software; you can redistribute it and/or modify
7686 #  it under the terms of the GNU General Public License as published by
7687 #  the Free Software Foundation; either version 2 of the License, or
7688 #  (at your option) any later version.
7689 #
7690 #  This program is distributed in the hope that it will be useful,
7691 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7692 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7693 #  GNU General Public License for more details.
7694 #
7695 #  You should have received a copy of the GNU General Public License
7696 #  along with this program; if not, write to the Free Software
7697 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7698 #  */
7699 #
7700 # #include <stdio.h>            /* for printf() */
7701 # #include <unistd.h>           /* for open(), lseek(), read() */
7702 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7703 # #include <string.h>           /* for strdup() */
7704 #
7705 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7706 # #ifndef O_BINARY
7707 # #define O_BINARY 0
7708 # #endif
7709 #
7710 # static unsigned int
7711 # pe_get16 (fd, offset)
7712 #      int fd;
7713 #      int offset;
7714 # {
7715 #   unsigned char b[2];
7716 #   lseek (fd, offset, SEEK_SET);
7717 #   read (fd, b, 2);
7718 #   return b[0] + (b[1]<<8);
7719 # }
7720 #
7721 # static unsigned int
7722 # pe_get32 (fd, offset)
7723 #     int fd;
7724 #     int offset;
7725 # {
7726 #   unsigned char b[4];
7727 #   lseek (fd, offset, SEEK_SET);
7728 #   read (fd, b, 4);
7729 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7730 # }
7731 #
7732 # static unsigned int
7733 # pe_as32 (ptr)
7734 #      void *ptr;
7735 # {
7736 #   unsigned char *b = ptr;
7737 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7738 # }
7739 #
7740 # int
7741 # main (argc, argv)
7742 #     int argc;
7743 #     char *argv[];
7744 # {
7745 #     int dll;
7746 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7747 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7748 #     unsigned long name_rvas, nexp;
7749 #     unsigned char *expdata, *erva;
7750 #     char *filename, *dll_name;
7751 #
7752 #     filename = argv[1];
7753 #
7754 #     dll = open(filename, O_RDONLY|O_BINARY);
7755 #     if (dll < 1)
7756 #       return 1;
7757 #
7758 #     dll_name = filename;
7759 #
7760 #     for (i=0; filename[i]; i++)
7761 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7762 #           dll_name = filename + i +1;
7763 #
7764 #     pe_header_offset = pe_get32 (dll, 0x3c);
7765 #     opthdr_ofs = pe_header_offset + 4 + 20;
7766 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7767 #
7768 #     if (num_entries < 1) /* no exports */
7769 #       return 1;
7770 #
7771 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7772 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7773 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7774 #     secptr = (pe_header_offset + 4 + 20 +
7775 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7776 #
7777 #     expptr = 0;
7778 #     for (i = 0; i < nsections; i++)
7779 #     {
7780 #       char sname[8];
7781 #       unsigned long secptr1 = secptr + 40 * i;
7782 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7783 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7784 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7785 #       lseek(dll, secptr1, SEEK_SET);
7786 #       read(dll, sname, 8);
7787 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7788 #       {
7789 #           expptr = fptr + (export_rva - vaddr);
7790 #           if (export_rva + export_size > vaddr + vsize)
7791 #               export_size = vsize - (export_rva - vaddr);
7792 #           break;
7793 #       }
7794 #     }
7795 #
7796 #     expdata = (unsigned char*)malloc(export_size);
7797 #     lseek (dll, expptr, SEEK_SET);
7798 #     read (dll, expdata, export_size);
7799 #     erva = expdata - export_rva;
7800 #
7801 #     nexp = pe_as32 (expdata+24);
7802 #     name_rvas = pe_as32 (expdata+32);
7803 #
7804 #     printf ("EXPORTS\n");
7805 #     for (i = 0; i<nexp; i++)
7806 #     {
7807 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7808 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7809 #     }
7810 #
7811 #     return 0;
7812 # }
7813 # /* impgen.c ends here */
7814
7815 EOF
7816     ;;
7817   esac
7818
7819   # We use sed instead of cat because bash on DJGPP gets confused if
7820   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7821   # text mode, it properly converts lines to CR/LF.  This bash problem
7822   # is reportedly fixed, but why not run on old versions too?
7823   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7824
7825   mv -f "${ofile}T" "$ofile" || \
7826     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7827   chmod +x "$ofile"
7828 fi
7829
7830
7831
7832
7833
7834 # This can be used to rebuild libtool when needed
7835 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7836
7837 # Always use our own libtool.
7838 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7839
7840 # Prevent multiple expansion
7841
7842
7843
7844 # test for ln hardlink support
7845 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7846 echo "configure:7847: checking whether ln works" >&5
7847 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7848   echo $ac_n "(cached) $ac_c" 1>&6
7849 else
7850   rm -f conftest.src conftest.dst
7851 echo "conftest" > conftest.src
7852 if ln conftest.src conftest.dst 2>/dev/null
7853 then
7854   ol_cv_prog_LN_H="ln"
7855 else
7856   ol_cv_prog_LN_H="cp"
7857 fi
7858 rm -f conftest.src conftest.dst
7859
7860 fi
7861 LN_H="$ol_cv_prog_LN_H"
7862 if test "$ol_cv_prog_LN_H" = "ln"; then
7863         echo "$ac_t""yes" 1>&6
7864 else
7865         echo "$ac_t""no" 1>&6
7866 fi
7867
7868 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7869 echo "configure:7870: checking whether ln -s works" >&5
7870 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7871   echo $ac_n "(cached) $ac_c" 1>&6
7872 else
7873   rm -f conftestdata
7874 if ln -s X conftestdata 2>/dev/null
7875 then
7876   rm -f conftestdata
7877   ac_cv_prog_LN_S="ln -s"
7878 else
7879   ac_cv_prog_LN_S=ln
7880 fi
7881 fi
7882 LN_S="$ac_cv_prog_LN_S"
7883 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7884   echo "$ac_t""yes" 1>&6
7885 else
7886   echo "$ac_t""no" 1>&6
7887 fi
7888
7889
7890 ol_link_perl=no
7891 if test $ol_enable_perl != no ; then
7892         # Extract the first word of "perl", so it can be a program name with args.
7893 set dummy perl; ac_word=$2
7894 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7895 echo "configure:7896: checking for $ac_word" >&5
7896 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7897   echo $ac_n "(cached) $ac_c" 1>&6
7898 else
7899   case "$PERLBIN" in
7900   /*)
7901   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7902   ;;
7903   ?:/*)
7904   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7905   ;;
7906   *)
7907   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7908   ac_dummy="$PATH"
7909   for ac_dir in $ac_dummy; do 
7910     test -z "$ac_dir" && ac_dir=.
7911     if test -f $ac_dir/$ac_word; then
7912       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7913       break
7914     fi
7915   done
7916   IFS="$ac_save_ifs"
7917   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7918   ;;
7919 esac
7920 fi
7921 PERLBIN="$ac_cv_path_PERLBIN"
7922 if test -n "$PERLBIN"; then
7923   echo "$ac_t""$PERLBIN" 1>&6
7924 else
7925   echo "$ac_t""no" 1>&6
7926 fi
7927
7928
7929         if test "no$PERLBIN" = "no" ; then
7930                 if test $ol_enable_perl = yes ; then
7931                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7932                 fi
7933
7934         else
7935                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7936                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7937
7938                 if test x"$ol_with_perl_module" = "xstatic" ; then
7939                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7940                 else
7941                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7942                 fi
7943                                 ol_link_perl=yes
7944         fi
7945 fi
7946
7947 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7948 echo "configure:7949: checking how to run the C preprocessor" >&5
7949 # On Suns, sometimes $CPP names a directory.
7950 if test -n "$CPP" && test -d "$CPP"; then
7951   CPP=
7952 fi
7953 if test -z "$CPP"; then
7954 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7955   echo $ac_n "(cached) $ac_c" 1>&6
7956 else
7957     # This must be in double quotes, not single quotes, because CPP may get
7958   # substituted into the Makefile and "${CC-cc}" will confuse make.
7959   CPP="${CC-cc} -E"
7960   # On the NeXT, cc -E runs the code through the compiler's parser,
7961   # not just through cpp.
7962   cat > conftest.$ac_ext <<EOF
7963 #line 7964 "configure"
7964 #include "confdefs.h"
7965 #include <assert.h>
7966 Syntax Error
7967 EOF
7968 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7969 { (eval echo configure:7970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7970 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7971 if test -z "$ac_err"; then
7972   :
7973 else
7974   echo "$ac_err" >&5
7975   echo "configure: failed program was:" >&5
7976   cat conftest.$ac_ext >&5
7977   rm -rf conftest*
7978   CPP="${CC-cc} -E -traditional-cpp"
7979   cat > conftest.$ac_ext <<EOF
7980 #line 7981 "configure"
7981 #include "confdefs.h"
7982 #include <assert.h>
7983 Syntax Error
7984 EOF
7985 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7986 { (eval echo configure:7987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7987 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7988 if test -z "$ac_err"; then
7989   :
7990 else
7991   echo "$ac_err" >&5
7992   echo "configure: failed program was:" >&5
7993   cat conftest.$ac_ext >&5
7994   rm -rf conftest*
7995   CPP="${CC-cc} -nologo -E"
7996   cat > conftest.$ac_ext <<EOF
7997 #line 7998 "configure"
7998 #include "confdefs.h"
7999 #include <assert.h>
8000 Syntax Error
8001 EOF
8002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8003 { (eval echo configure:8004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8005 if test -z "$ac_err"; then
8006   :
8007 else
8008   echo "$ac_err" >&5
8009   echo "configure: failed program was:" >&5
8010   cat conftest.$ac_ext >&5
8011   rm -rf conftest*
8012   CPP=/lib/cpp
8013 fi
8014 rm -f conftest*
8015 fi
8016 rm -f conftest*
8017 fi
8018 rm -f conftest*
8019   ac_cv_prog_CPP="$CPP"
8020 fi
8021   CPP="$ac_cv_prog_CPP"
8022 else
8023   ac_cv_prog_CPP="$CPP"
8024 fi
8025 echo "$ac_t""$CPP" 1>&6
8026
8027
8028 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
8029         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
8030
8031 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
8032         echo "configure: warning: programs compiled here do run here..." 1>&2
8033         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
8034
8035 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
8036         echo "configure: warning: programs compiled here do not run here..." 1>&2
8037         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
8038 fi
8039
8040
8041 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8042 echo "configure:8043: checking for Cygwin environment" >&5
8043 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
8044   echo $ac_n "(cached) $ac_c" 1>&6
8045 else
8046   cat > conftest.$ac_ext <<EOF
8047 #line 8048 "configure"
8048 #include "confdefs.h"
8049
8050 int main() {
8051
8052 #ifndef __CYGWIN__
8053 #define __CYGWIN__ __CYGWIN32__
8054 #endif
8055 return __CYGWIN__;
8056 ; return 0; }
8057 EOF
8058 if { (eval echo configure:8059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8059   rm -rf conftest*
8060   ac_cv_cygwin=yes
8061 else
8062   echo "configure: failed program was:" >&5
8063   cat conftest.$ac_ext >&5
8064   rm -rf conftest*
8065   ac_cv_cygwin=no
8066 fi
8067 rm -f conftest*
8068 fi
8069
8070 echo "$ac_t""$ac_cv_cygwin" 1>&6
8071 CYGWIN=
8072 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8073 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8074 echo "configure:8075: checking for mingw32 environment" >&5
8075 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8076   echo $ac_n "(cached) $ac_c" 1>&6
8077 else
8078   cat > conftest.$ac_ext <<EOF
8079 #line 8080 "configure"
8080 #include "confdefs.h"
8081
8082 int main() {
8083 return __MINGW32__;
8084 ; return 0; }
8085 EOF
8086 if { (eval echo configure:8087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8087   rm -rf conftest*
8088   ac_cv_mingw32=yes
8089 else
8090   echo "configure: failed program was:" >&5
8091   cat conftest.$ac_ext >&5
8092   rm -rf conftest*
8093   ac_cv_mingw32=no
8094 fi
8095 rm -f conftest*
8096 fi
8097
8098 echo "$ac_t""$ac_cv_mingw32" 1>&6
8099 MINGW32=
8100 test "$ac_cv_mingw32" = yes && MINGW32=yes
8101
8102
8103
8104 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8105 echo "configure:8106: checking for executable suffix" >&5
8106 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8107   echo $ac_n "(cached) $ac_c" 1>&6
8108 else
8109   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8110   ac_cv_exeext=.exe
8111 else
8112   rm -f conftest*
8113   echo 'int main () { return 0; }' > conftest.$ac_ext
8114   ac_cv_exeext=
8115   if { (eval echo configure:8116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8116     for file in conftest.*; do
8117       case $file in
8118       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8119       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8120       esac
8121     done
8122   else
8123     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8124   fi
8125   rm -f conftest*
8126   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8127 fi
8128 fi
8129
8130 EXEEXT=""
8131 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8132 echo "$ac_t""${ac_cv_exeext}" 1>&6
8133 ac_exeext=$EXEEXT
8134
8135 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8136 echo "configure:8137: checking for object suffix" >&5
8137 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8138   echo $ac_n "(cached) $ac_c" 1>&6
8139 else
8140   rm -f conftest*
8141 echo 'int i = 1;' > conftest.$ac_ext
8142 if { (eval echo configure:8143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8143   for ac_file in conftest.*; do
8144     case $ac_file in
8145     *.c) ;;
8146     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8147     esac
8148   done
8149 else
8150   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8151 fi
8152 rm -f conftest*
8153 fi
8154
8155 echo "$ac_t""$ac_cv_objext" 1>&6
8156 OBJEXT=$ac_cv_objext
8157 ac_objext=$ac_cv_objext
8158
8159
8160 cat >> confdefs.h <<EOF
8161 #define EXEEXT "${EXEEXT}"
8162 EOF
8163
8164
8165 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8166 echo "configure:8167: checking for be_app in -lbe" >&5
8167 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8168 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8169   echo $ac_n "(cached) $ac_c" 1>&6
8170 else
8171   ac_save_LIBS="$LIBS"
8172 LIBS="-lbe -lroot -lnet $LIBS"
8173 cat > conftest.$ac_ext <<EOF
8174 #line 8175 "configure"
8175 #include "confdefs.h"
8176 /* Override any gcc2 internal prototype to avoid an error.  */
8177 /* We use char because int might match the return type of a gcc2
8178     builtin and then its argument prototype would still apply.  */
8179 char be_app();
8180
8181 int main() {
8182 be_app()
8183 ; return 0; }
8184 EOF
8185 if { (eval echo configure:8186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8186   rm -rf conftest*
8187   eval "ac_cv_lib_$ac_lib_var=yes"
8188 else
8189   echo "configure: failed program was:" >&5
8190   cat conftest.$ac_ext >&5
8191   rm -rf conftest*
8192   eval "ac_cv_lib_$ac_lib_var=no"
8193 fi
8194 rm -f conftest*
8195 LIBS="$ac_save_LIBS"
8196
8197 fi
8198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8199   echo "$ac_t""yes" 1>&6
8200   LIBS="$LIBS -lbe -lroot -lnet"
8201 else
8202   echo "$ac_t""no" 1>&6
8203 :
8204 fi
8205
8206
8207
8208
8209
8210 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8211 echo "configure:8212: checking for ${CC-cc} option to accept ANSI C" >&5
8212 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8213   echo $ac_n "(cached) $ac_c" 1>&6
8214 else
8215   am_cv_prog_cc_stdc=no
8216 ac_save_CC="$CC"
8217 # Don't try gcc -ansi; that turns off useful extensions and
8218 # breaks some systems' header files.
8219 # AIX                   -qlanglvl=ansi
8220 # Ultrix and OSF/1      -std1
8221 # HP-UX 10.20 and later -Ae
8222 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8223 # SVR4                  -Xc -D__EXTENSIONS__
8224 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8225 do
8226   CC="$ac_save_CC $ac_arg"
8227   cat > conftest.$ac_ext <<EOF
8228 #line 8229 "configure"
8229 #include "confdefs.h"
8230 #include <stdarg.h>
8231 #include <stdio.h>
8232 #include <sys/types.h>
8233 #include <sys/stat.h>
8234 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8235 struct buf { int x; };
8236 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8237 static char *e (p, i)
8238      char **p;
8239      int i;
8240 {
8241   return p[i];
8242 }
8243 static char *f (char * (*g) (char **, int), char **p, ...)
8244 {
8245   char *s;
8246   va_list v;
8247   va_start (v,p);
8248   s = g (p, va_arg (v,int));
8249   va_end (v);
8250   return s;
8251 }
8252 int test (int i, double x);
8253 struct s1 {int (*f) (int a);};
8254 struct s2 {int (*f) (double a);};
8255 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8256 int argc;
8257 char **argv;
8258
8259 int main() {
8260
8261 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8262
8263 ; return 0; }
8264 EOF
8265 if { (eval echo configure:8266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8266   rm -rf conftest*
8267   am_cv_prog_cc_stdc="$ac_arg"; break
8268 else
8269   echo "configure: failed program was:" >&5
8270   cat conftest.$ac_ext >&5
8271 fi
8272 rm -f conftest*
8273 done
8274 CC="$ac_save_CC"
8275
8276 fi
8277
8278 if test -z "$am_cv_prog_cc_stdc"; then
8279   echo "$ac_t""none needed" 1>&6
8280 else
8281   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8282 fi
8283 case "x$am_cv_prog_cc_stdc" in
8284   x|xno) ;;
8285   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8286 esac
8287
8288 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8289         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8290 fi
8291
8292 # test for make depend flag
8293 OL_MKDEP=
8294 OL_MKDEP_FLAGS=
8295 if test -z "${MKDEP}"; then
8296         OL_MKDEP="${CC-cc}"
8297         if test -z "${MKDEP_FLAGS}"; then
8298                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8299 echo "configure:8300: checking for ${OL_MKDEP} depend flag" >&5
8300 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8301   echo $ac_n "(cached) $ac_c" 1>&6
8302 else
8303   
8304                         ol_cv_mkdep=no
8305                         for flag in "-M" "-xM"; do
8306                                 cat > conftest.c <<EOF
8307  noCode;
8308 EOF
8309                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8310                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8311                                 then
8312                                         if test ! -f conftest."${ac_object}" ; then
8313                                                 ol_cv_mkdep=$flag
8314                                                 OL_MKDEP_FLAGS="$flag"
8315                                                 break
8316                                         fi
8317                                 fi
8318                         done
8319                         rm -f conftest*
8320                 
8321 fi
8322
8323 echo "$ac_t""$ol_cv_mkdep" 1>&6
8324         else
8325                 cc_cv_mkdep=yes
8326                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8327         fi
8328 else
8329         cc_cv_mkdep=yes
8330         OL_MKDEP="${MKDEP}"
8331         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8332 fi
8333
8334
8335
8336 if test "${ol_cv_mkdep}" = no ; then
8337         # this will soon become an error
8338         echo "configure: warning: do not know how to generate dependencies" 1>&2
8339 fi
8340
8341 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8342 echo "configure:8343: checking for afopen in -ls" >&5
8343 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8344 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8345   echo $ac_n "(cached) $ac_c" 1>&6
8346 else
8347   ac_save_LIBS="$LIBS"
8348 LIBS="-ls  $LIBS"
8349 cat > conftest.$ac_ext <<EOF
8350 #line 8351 "configure"
8351 #include "confdefs.h"
8352 /* Override any gcc2 internal prototype to avoid an error.  */
8353 /* We use char because int might match the return type of a gcc2
8354     builtin and then its argument prototype would still apply.  */
8355 char afopen();
8356
8357 int main() {
8358 afopen()
8359 ; return 0; }
8360 EOF
8361 if { (eval echo configure:8362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8362   rm -rf conftest*
8363   eval "ac_cv_lib_$ac_lib_var=yes"
8364 else
8365   echo "configure: failed program was:" >&5
8366   cat conftest.$ac_ext >&5
8367   rm -rf conftest*
8368   eval "ac_cv_lib_$ac_lib_var=no"
8369 fi
8370 rm -f conftest*
8371 LIBS="$ac_save_LIBS"
8372
8373 fi
8374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8375   echo "$ac_t""yes" 1>&6
8376   
8377         AUTH_LIBS=-ls
8378         cat >> confdefs.h <<\EOF
8379 #define HAVE_AIX_SECURITY 1
8380 EOF
8381
8382
8383 else
8384   echo "$ac_t""no" 1>&6
8385 fi
8386
8387
8388 case "$target" in
8389 *-ibm-openedition)
8390         ac_cv_func_getopt=no
8391         cat >> confdefs.h <<\EOF
8392 #define BOTH_STRINGS_H 1
8393 EOF
8394
8395         ;;
8396 esac
8397
8398 ol_link_modules=no
8399 if test $ol_enable_modules != no ; then
8400         for ac_hdr in ltdl.h
8401 do
8402 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8403 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8404 echo "configure:8405: checking for $ac_hdr" >&5
8405 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8406   echo $ac_n "(cached) $ac_c" 1>&6
8407 else
8408   cat > conftest.$ac_ext <<EOF
8409 #line 8410 "configure"
8410 #include "confdefs.h"
8411 #include <$ac_hdr>
8412 EOF
8413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8414 { (eval echo configure:8415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8415 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8416 if test -z "$ac_err"; then
8417   rm -rf conftest*
8418   eval "ac_cv_header_$ac_safe=yes"
8419 else
8420   echo "$ac_err" >&5
8421   echo "configure: failed program was:" >&5
8422   cat conftest.$ac_ext >&5
8423   rm -rf conftest*
8424   eval "ac_cv_header_$ac_safe=no"
8425 fi
8426 rm -f conftest*
8427 fi
8428 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8429   echo "$ac_t""yes" 1>&6
8430     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8431   cat >> confdefs.h <<EOF
8432 #define $ac_tr_hdr 1
8433 EOF
8434  
8435 else
8436   echo "$ac_t""no" 1>&6
8437 fi
8438 done
8439
8440
8441         if test $ac_cv_header_ltdl_h = no ; then
8442                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8443         fi
8444
8445         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8446 echo "configure:8447: checking for lt_dlinit in -lltdl" >&5
8447 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8448 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8449   echo $ac_n "(cached) $ac_c" 1>&6
8450 else
8451   ac_save_LIBS="$LIBS"
8452 LIBS="-lltdl  $LIBS"
8453 cat > conftest.$ac_ext <<EOF
8454 #line 8455 "configure"
8455 #include "confdefs.h"
8456 /* Override any gcc2 internal prototype to avoid an error.  */
8457 /* We use char because int might match the return type of a gcc2
8458     builtin and then its argument prototype would still apply.  */
8459 char lt_dlinit();
8460
8461 int main() {
8462 lt_dlinit()
8463 ; return 0; }
8464 EOF
8465 if { (eval echo configure:8466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8466   rm -rf conftest*
8467   eval "ac_cv_lib_$ac_lib_var=yes"
8468 else
8469   echo "configure: failed program was:" >&5
8470   cat conftest.$ac_ext >&5
8471   rm -rf conftest*
8472   eval "ac_cv_lib_$ac_lib_var=no"
8473 fi
8474 rm -f conftest*
8475 LIBS="$ac_save_LIBS"
8476
8477 fi
8478 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8479   echo "$ac_t""yes" 1>&6
8480   
8481                 MODULES_LIBS=-lltdl
8482                 cat >> confdefs.h <<\EOF
8483 #define HAVE_LIBLTDL 1
8484 EOF
8485
8486         
8487 else
8488   echo "$ac_t""no" 1>&6
8489 fi
8490
8491
8492         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8493                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8494         fi
8495         ol_link_modules=yes
8496 else
8497         ol_with_bdb_module=static
8498         ol_with_dnssrv_module=static
8499         ol_with_hdb_module=static
8500         ol_with_ldap_module=static
8501         ol_with_ldbm_module=static
8502         ol_with_meta_module=static
8503         ol_with_monitor_module=static
8504         ol_with_null_module=static
8505         ol_with_passwd_module=static
8506         ol_with_perl_module=static
8507         ol_with_shell_module=static
8508         ol_with_sql_module=static
8509         if test $ol_with_dyngroup = mod ; then
8510                 echo "configure: warning: building static dyngroup overlay" 1>&2
8511                 ol_with_dyngroup=yes
8512         fi
8513         if test $ol_with_proxycache = mod ; then
8514                 echo "configure: warning: building static proxycache overlay" 1>&2
8515                 ol_with_proxycache=yes
8516         fi
8517 fi
8518
8519 # test for EBCDIC
8520 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8521 echo "configure:8522: checking for EBCDIC" >&5
8522 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8523   echo $ac_n "(cached) $ac_c" 1>&6
8524 else
8525   
8526         cat > conftest.$ac_ext <<EOF
8527 #line 8528 "configure"
8528 #include "confdefs.h"
8529
8530 #if !('M' == 0xd4)
8531 #include <__ASCII__/generate_error.h>
8532 #endif
8533
8534 EOF
8535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8536 { (eval echo configure:8537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8538 if test -z "$ac_err"; then
8539   rm -rf conftest*
8540   ol_cv_cpp_ebcdic=yes
8541 else
8542   echo "$ac_err" >&5
8543   echo "configure: failed program was:" >&5
8544   cat conftest.$ac_ext >&5
8545   rm -rf conftest*
8546   ol_cv_cpp_ebcdic=no
8547 fi
8548 rm -f conftest*
8549 fi
8550
8551 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8552 if test $ol_cv_cpp_ebcdic = yes ; then
8553         cat >> confdefs.h <<\EOF
8554 #define HAVE_EBCDIC 1
8555 EOF
8556
8557 fi
8558
8559 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8560 echo "configure:8561: checking for ANSI C header files" >&5
8561 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8562   echo $ac_n "(cached) $ac_c" 1>&6
8563 else
8564   cat > conftest.$ac_ext <<EOF
8565 #line 8566 "configure"
8566 #include "confdefs.h"
8567 #include <stdlib.h>
8568 #include <stdarg.h>
8569 #include <string.h>
8570 #include <float.h>
8571 EOF
8572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8573 { (eval echo configure:8574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8575 if test -z "$ac_err"; then
8576   rm -rf conftest*
8577   ol_cv_header_stdc=yes
8578 else
8579   echo "$ac_err" >&5
8580   echo "configure: failed program was:" >&5
8581   cat conftest.$ac_ext >&5
8582   rm -rf conftest*
8583   ol_cv_header_stdc=no
8584 fi
8585 rm -f conftest*
8586
8587 if test $ol_cv_header_stdc = yes; then
8588   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8589 cat > conftest.$ac_ext <<EOF
8590 #line 8591 "configure"
8591 #include "confdefs.h"
8592 #include <string.h>
8593 EOF
8594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8595   egrep "memchr" >/dev/null 2>&1; then
8596   :
8597 else
8598   rm -rf conftest*
8599   ol_cv_header_stdc=no
8600 fi
8601 rm -f conftest*
8602
8603 fi
8604
8605 if test $ol_cv_header_stdc = yes; then
8606   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8607 cat > conftest.$ac_ext <<EOF
8608 #line 8609 "configure"
8609 #include "confdefs.h"
8610 #include <stdlib.h>
8611 EOF
8612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8613   egrep "free" >/dev/null 2>&1; then
8614   :
8615 else
8616   rm -rf conftest*
8617   ol_cv_header_stdc=no
8618 fi
8619 rm -f conftest*
8620
8621 fi
8622
8623 if test $ol_cv_header_stdc = yes; then
8624   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8625 if test "$cross_compiling" = yes; then
8626   :
8627 else
8628   cat > conftest.$ac_ext <<EOF
8629 #line 8630 "configure"
8630 #include "confdefs.h"
8631 #include <ctype.h>
8632 #ifndef HAVE_EBCDIC
8633 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8634 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8635 #else
8636 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8637                 || ('j' <= (c) && (c) <= 'r') \
8638                 || ('s' <= (c) && (c) <= 'z'))
8639 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8640 #endif
8641 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8642 int main () { int i; for (i = 0; i < 256; i++)
8643 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8644 exit (0); }
8645
8646 EOF
8647 if { (eval echo configure:8648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8648 then
8649   :
8650 else
8651   echo "configure: failed program was:" >&5
8652   cat conftest.$ac_ext >&5
8653   rm -fr conftest*
8654   ol_cv_header_stdc=no
8655 fi
8656 rm -fr conftest*
8657 fi
8658
8659 fi
8660 fi
8661
8662 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8663 if test $ol_cv_header_stdc = yes; then
8664   cat >> confdefs.h <<\EOF
8665 #define STDC_HEADERS 1
8666 EOF
8667
8668 fi
8669 ac_cv_header_stdc=disable
8670
8671
8672 if test $ol_cv_header_stdc != yes; then
8673         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8674 fi
8675
8676 ac_header_dirent=no
8677 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8678 do
8679 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8680 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8681 echo "configure:8682: checking for $ac_hdr that defines DIR" >&5
8682 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8683   echo $ac_n "(cached) $ac_c" 1>&6
8684 else
8685   cat > conftest.$ac_ext <<EOF
8686 #line 8687 "configure"
8687 #include "confdefs.h"
8688 #include <sys/types.h>
8689 #include <$ac_hdr>
8690 int main() {
8691 DIR *dirp = 0;
8692 ; return 0; }
8693 EOF
8694 if { (eval echo configure:8695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8695   rm -rf conftest*
8696   eval "ac_cv_header_dirent_$ac_safe=yes"
8697 else
8698   echo "configure: failed program was:" >&5
8699   cat conftest.$ac_ext >&5
8700   rm -rf conftest*
8701   eval "ac_cv_header_dirent_$ac_safe=no"
8702 fi
8703 rm -f conftest*
8704 fi
8705 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8706   echo "$ac_t""yes" 1>&6
8707     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8708   cat >> confdefs.h <<EOF
8709 #define $ac_tr_hdr 1
8710 EOF
8711  ac_header_dirent=$ac_hdr; break
8712 else
8713   echo "$ac_t""no" 1>&6
8714 fi
8715 done
8716 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8717 if test $ac_header_dirent = dirent.h; then
8718 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8719 echo "configure:8720: checking for opendir in -ldir" >&5
8720 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8721 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8722   echo $ac_n "(cached) $ac_c" 1>&6
8723 else
8724   ac_save_LIBS="$LIBS"
8725 LIBS="-ldir  $LIBS"
8726 cat > conftest.$ac_ext <<EOF
8727 #line 8728 "configure"
8728 #include "confdefs.h"
8729 /* Override any gcc2 internal prototype to avoid an error.  */
8730 /* We use char because int might match the return type of a gcc2
8731     builtin and then its argument prototype would still apply.  */
8732 char opendir();
8733
8734 int main() {
8735 opendir()
8736 ; return 0; }
8737 EOF
8738 if { (eval echo configure:8739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8739   rm -rf conftest*
8740   eval "ac_cv_lib_$ac_lib_var=yes"
8741 else
8742   echo "configure: failed program was:" >&5
8743   cat conftest.$ac_ext >&5
8744   rm -rf conftest*
8745   eval "ac_cv_lib_$ac_lib_var=no"
8746 fi
8747 rm -f conftest*
8748 LIBS="$ac_save_LIBS"
8749
8750 fi
8751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8752   echo "$ac_t""yes" 1>&6
8753   LIBS="$LIBS -ldir"
8754 else
8755   echo "$ac_t""no" 1>&6
8756 fi
8757
8758 else
8759 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8760 echo "configure:8761: checking for opendir in -lx" >&5
8761 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8762 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8763   echo $ac_n "(cached) $ac_c" 1>&6
8764 else
8765   ac_save_LIBS="$LIBS"
8766 LIBS="-lx  $LIBS"
8767 cat > conftest.$ac_ext <<EOF
8768 #line 8769 "configure"
8769 #include "confdefs.h"
8770 /* Override any gcc2 internal prototype to avoid an error.  */
8771 /* We use char because int might match the return type of a gcc2
8772     builtin and then its argument prototype would still apply.  */
8773 char opendir();
8774
8775 int main() {
8776 opendir()
8777 ; return 0; }
8778 EOF
8779 if { (eval echo configure:8780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8780   rm -rf conftest*
8781   eval "ac_cv_lib_$ac_lib_var=yes"
8782 else
8783   echo "configure: failed program was:" >&5
8784   cat conftest.$ac_ext >&5
8785   rm -rf conftest*
8786   eval "ac_cv_lib_$ac_lib_var=no"
8787 fi
8788 rm -f conftest*
8789 LIBS="$ac_save_LIBS"
8790
8791 fi
8792 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8793   echo "$ac_t""yes" 1>&6
8794   LIBS="$LIBS -lx"
8795 else
8796   echo "$ac_t""no" 1>&6
8797 fi
8798
8799 fi
8800
8801 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8802 echo "configure:8803: checking for sys/wait.h that is POSIX.1 compatible" >&5
8803 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8804   echo $ac_n "(cached) $ac_c" 1>&6
8805 else
8806   cat > conftest.$ac_ext <<EOF
8807 #line 8808 "configure"
8808 #include "confdefs.h"
8809 #include <sys/types.h>
8810 #include <sys/wait.h>
8811 #ifndef WEXITSTATUS
8812 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8813 #endif
8814 #ifndef WIFEXITED
8815 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8816 #endif
8817 int main() {
8818 int s;
8819 wait (&s);
8820 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8821 ; return 0; }
8822 EOF
8823 if { (eval echo configure:8824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8824   rm -rf conftest*
8825   ac_cv_header_sys_wait_h=yes
8826 else
8827   echo "configure: failed program was:" >&5
8828   cat conftest.$ac_ext >&5
8829   rm -rf conftest*
8830   ac_cv_header_sys_wait_h=no
8831 fi
8832 rm -f conftest*
8833 fi
8834
8835 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8836 if test $ac_cv_header_sys_wait_h = yes; then
8837   cat >> confdefs.h <<\EOF
8838 #define HAVE_SYS_WAIT_H 1
8839 EOF
8840
8841 fi
8842
8843 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8844 echo "configure:8845: checking POSIX termios" >&5
8845 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8846   echo $ac_n "(cached) $ac_c" 1>&6
8847 else
8848   cat > conftest.$ac_ext <<EOF
8849 #line 8850 "configure"
8850 #include "confdefs.h"
8851 #include <sys/types.h>
8852 #include <unistd.h>
8853 #include <termios.h>
8854 int main() {
8855 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8856    tcgetattr(0, 0);
8857 ; return 0; }
8858 EOF
8859 if { (eval echo configure:8860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8860   rm -rf conftest*
8861   am_cv_sys_posix_termios=yes
8862 else
8863   echo "configure: failed program was:" >&5
8864   cat conftest.$ac_ext >&5
8865   rm -rf conftest*
8866   am_cv_sys_posix_termios=no
8867 fi
8868 rm -f conftest*
8869 fi
8870
8871 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8872
8873
8874  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8875 echo "configure:8876: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8876 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8877   echo $ac_n "(cached) $ac_c" 1>&6
8878 else
8879   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8880
8881   gwinsz_in_termios_h=no
8882   if test $am_cv_sys_posix_termios = yes; then
8883     cat > conftest.$ac_ext <<EOF
8884 #line 8885 "configure"
8885 #include "confdefs.h"
8886 #include <sys/types.h>
8887 #     include <termios.h>
8888 #     ifdef TIOCGWINSZ
8889         yes
8890 #     endif
8891     
8892 EOF
8893 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8894   egrep "yes" >/dev/null 2>&1; then
8895   rm -rf conftest*
8896   gwinsz_in_termios_h=yes
8897 fi
8898 rm -f conftest*
8899
8900   fi
8901
8902   if test $gwinsz_in_termios_h = no; then
8903     cat > conftest.$ac_ext <<EOF
8904 #line 8905 "configure"
8905 #include "confdefs.h"
8906 #include <sys/types.h>
8907 #     include <sys/ioctl.h>
8908 #     ifdef TIOCGWINSZ
8909         yes
8910 #     endif
8911     
8912 EOF
8913 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8914   egrep "yes" >/dev/null 2>&1; then
8915   rm -rf conftest*
8916   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8917 fi
8918 rm -f conftest*
8919
8920   fi
8921   
8922 fi
8923
8924 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8925   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8926     cat >> confdefs.h <<\EOF
8927 #define GWINSZ_IN_SYS_IOCTL 1
8928 EOF
8929
8930   fi
8931
8932 if test $am_cv_sys_posix_termios = yes ; then
8933         cat >> confdefs.h <<\EOF
8934 #define HAVE_POSIX_TERMIOS 1
8935 EOF
8936
8937 fi
8938
8939 for ac_hdr in \
8940         arpa/inet.h             \
8941         arpa/nameser.h  \
8942         assert.h                \
8943         bits/types.h    \
8944         conio.h                 \
8945         crypt.h                 \
8946         direct.h                \
8947         errno.h                 \
8948         fcntl.h                 \
8949         filio.h                 \
8950         getopt.h                \
8951         grp.h                   \
8952         io.h                    \
8953         libutil.h               \
8954         limits.h                \
8955         locale.h                \
8956         netinet/tcp.h   \
8957         malloc.h                \
8958         memory.h                \
8959         psap.h                  \
8960         pwd.h                   \
8961         process.h               \
8962         resolv.h                \
8963         sgtty.h                 \
8964         shadow.h                \
8965         stddef.h                \
8966         string.h                \
8967         strings.h               \
8968         sysexits.h              \
8969         sys/file.h              \
8970         sys/filio.h             \
8971         sys/errno.h             \
8972         sys/ioctl.h             \
8973         sys/param.h             \
8974         sys/resource.h  \
8975         sys/select.h    \
8976         sys/socket.h    \
8977         sys/stat.h              \
8978         sys/syslog.h    \
8979         sys/time.h              \
8980         sys/types.h             \
8981         sys/ucred.h             \
8982         sys/uio.h               \
8983         syslog.h                \
8984         termios.h               \
8985         unistd.h                \
8986         winsock.h               \
8987         winsock2.h              \
8988
8989 do
8990 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8991 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8992 echo "configure:8993: checking for $ac_hdr" >&5
8993 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8994   echo $ac_n "(cached) $ac_c" 1>&6
8995 else
8996   cat > conftest.$ac_ext <<EOF
8997 #line 8998 "configure"
8998 #include "confdefs.h"
8999 #include <$ac_hdr>
9000 EOF
9001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9002 { (eval echo configure:9003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9004 if test -z "$ac_err"; then
9005   rm -rf conftest*
9006   eval "ac_cv_header_$ac_safe=yes"
9007 else
9008   echo "$ac_err" >&5
9009   echo "configure: failed program was:" >&5
9010   cat conftest.$ac_ext >&5
9011   rm -rf conftest*
9012   eval "ac_cv_header_$ac_safe=no"
9013 fi
9014 rm -f conftest*
9015 fi
9016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9017   echo "$ac_t""yes" 1>&6
9018     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9019   cat >> confdefs.h <<EOF
9020 #define $ac_tr_hdr 1
9021 EOF
9022  
9023 else
9024   echo "$ac_t""no" 1>&6
9025 fi
9026 done
9027
9028
9029
9030
9031 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9032 echo "configure:9033: checking for sigset in -lV3" >&5
9033 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9034 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9035   echo $ac_n "(cached) $ac_c" 1>&6
9036 else
9037   ac_save_LIBS="$LIBS"
9038 LIBS="-lV3  $LIBS"
9039 cat > conftest.$ac_ext <<EOF
9040 #line 9041 "configure"
9041 #include "confdefs.h"
9042 /* Override any gcc2 internal prototype to avoid an error.  */
9043 /* We use char because int might match the return type of a gcc2
9044     builtin and then its argument prototype would still apply.  */
9045 char sigset();
9046
9047 int main() {
9048 sigset()
9049 ; return 0; }
9050 EOF
9051 if { (eval echo configure:9052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9052   rm -rf conftest*
9053   eval "ac_cv_lib_$ac_lib_var=yes"
9054 else
9055   echo "configure: failed program was:" >&5
9056   cat conftest.$ac_ext >&5
9057   rm -rf conftest*
9058   eval "ac_cv_lib_$ac_lib_var=no"
9059 fi
9060 rm -f conftest*
9061 LIBS="$ac_save_LIBS"
9062
9063 fi
9064 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9065   echo "$ac_t""yes" 1>&6
9066     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9067     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9068   cat >> confdefs.h <<EOF
9069 #define $ac_tr_lib 1
9070 EOF
9071
9072   LIBS="-lV3 $LIBS"
9073
9074 else
9075   echo "$ac_t""no" 1>&6
9076 fi
9077
9078
9079 if test "$ac_cv_header_winsock_h" = yes; then
9080 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9081 echo "configure:9082: checking for winsock" >&5
9082 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9083   echo $ac_n "(cached) $ac_c" 1>&6
9084 else
9085   save_LIBS="$LIBS"
9086 for curlib in ws2_32 wsock32; do
9087         LIBS="$LIBS -l$curlib"
9088         cat > conftest.$ac_ext <<EOF
9089 #line 9090 "configure"
9090 #include "confdefs.h"
9091 #include <winsock.h>
9092                         
9093 int main() {
9094
9095                         socket(0,0,0);
9096                         select(0,NULL,NULL,NULL,NULL);
9097                         closesocket(0);
9098                         gethostname(NULL,0);
9099                         
9100 ; return 0; }
9101 EOF
9102 if { (eval echo configure:9103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9103   rm -rf conftest*
9104   ol_cv_winsock=yes
9105 else
9106   echo "configure: failed program was:" >&5
9107   cat conftest.$ac_ext >&5
9108   rm -rf conftest*
9109   ol_cv_winsock=no
9110 fi
9111 rm -f conftest*
9112
9113         if test $ol_cv_winsock = yes; then
9114                 cat >> confdefs.h <<\EOF
9115 #define HAVE_WINSOCK 1
9116 EOF
9117
9118                 ac_cv_func_socket=yes
9119                 ac_cv_func_select=yes
9120                 ac_cv_func_closesocket=yes
9121                 ac_cv_func_gethostname=yes
9122                 if test $curlib = ws2_32; then
9123                         ol_cv_winsock=winsock2
9124                         cat >> confdefs.h <<\EOF
9125 #define HAVE_WINSOCK2 1
9126 EOF
9127
9128                 fi
9129                 break
9130         fi
9131         LIBS="$save_LIBS"
9132 done
9133 fi
9134
9135 echo "$ac_t""$ol_cv_winsock" 1>&6
9136 fi
9137
9138
9139 echo $ac_n "checking for socket""... $ac_c" 1>&6
9140 echo "configure:9141: checking for socket" >&5
9141 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9142   echo $ac_n "(cached) $ac_c" 1>&6
9143 else
9144   cat > conftest.$ac_ext <<EOF
9145 #line 9146 "configure"
9146 #include "confdefs.h"
9147 /* System header to define __stub macros and hopefully few prototypes,
9148     which can conflict with char socket(); below.  */
9149 #include <assert.h>
9150 /* Override any gcc2 internal prototype to avoid an error.  */
9151 /* We use char because int might match the return type of a gcc2
9152     builtin and then its argument prototype would still apply.  */
9153 char socket();
9154 char (*f)();
9155
9156 int main() {
9157
9158 /* The GNU C library defines this for functions which it implements
9159     to always fail with ENOSYS.  Some functions are actually named
9160     something starting with __ and the normal name is an alias.  */
9161 #if defined (__stub_socket) || defined (__stub___socket)
9162 choke me
9163 #else
9164 f = socket;
9165 #endif
9166
9167 ; return 0; }
9168 EOF
9169 if { (eval echo configure:9170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9170   rm -rf conftest*
9171   eval "ac_cv_func_socket=yes"
9172 else
9173   echo "configure: failed program was:" >&5
9174   cat conftest.$ac_ext >&5
9175   rm -rf conftest*
9176   eval "ac_cv_func_socket=no"
9177 fi
9178 rm -f conftest*
9179 fi
9180
9181 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9182   echo "$ac_t""yes" 1>&6
9183   :
9184 else
9185   echo "$ac_t""no" 1>&6
9186         
9187         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9188 echo "configure:9189: checking for main in -lsocket" >&5
9189 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9190 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9191   echo $ac_n "(cached) $ac_c" 1>&6
9192 else
9193   ac_save_LIBS="$LIBS"
9194 LIBS="-lsocket  $LIBS"
9195 cat > conftest.$ac_ext <<EOF
9196 #line 9197 "configure"
9197 #include "confdefs.h"
9198
9199 int main() {
9200 main()
9201 ; return 0; }
9202 EOF
9203 if { (eval echo configure:9204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9204   rm -rf conftest*
9205   eval "ac_cv_lib_$ac_lib_var=yes"
9206 else
9207   echo "configure: failed program was:" >&5
9208   cat conftest.$ac_ext >&5
9209   rm -rf conftest*
9210   eval "ac_cv_lib_$ac_lib_var=no"
9211 fi
9212 rm -f conftest*
9213 LIBS="$ac_save_LIBS"
9214
9215 fi
9216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9217   echo "$ac_t""yes" 1>&6
9218     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9219     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9220   cat >> confdefs.h <<EOF
9221 #define $ac_tr_lib 1
9222 EOF
9223
9224   LIBS="-lsocket $LIBS"
9225
9226 else
9227   echo "$ac_t""no" 1>&6
9228 fi
9229
9230         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9231 echo "configure:9232: checking for main in -lnet" >&5
9232 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9233 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9234   echo $ac_n "(cached) $ac_c" 1>&6
9235 else
9236   ac_save_LIBS="$LIBS"
9237 LIBS="-lnet  $LIBS"
9238 cat > conftest.$ac_ext <<EOF
9239 #line 9240 "configure"
9240 #include "confdefs.h"
9241
9242 int main() {
9243 main()
9244 ; return 0; }
9245 EOF
9246 if { (eval echo configure:9247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9247   rm -rf conftest*
9248   eval "ac_cv_lib_$ac_lib_var=yes"
9249 else
9250   echo "configure: failed program was:" >&5
9251   cat conftest.$ac_ext >&5
9252   rm -rf conftest*
9253   eval "ac_cv_lib_$ac_lib_var=no"
9254 fi
9255 rm -f conftest*
9256 LIBS="$ac_save_LIBS"
9257
9258 fi
9259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9260   echo "$ac_t""yes" 1>&6
9261     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9262     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9263   cat >> confdefs.h <<EOF
9264 #define $ac_tr_lib 1
9265 EOF
9266
9267   LIBS="-lnet $LIBS"
9268
9269 else
9270   echo "$ac_t""no" 1>&6
9271 fi
9272
9273         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9274 echo "configure:9275: checking for main in -lnsl_s" >&5
9275 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9277   echo $ac_n "(cached) $ac_c" 1>&6
9278 else
9279   ac_save_LIBS="$LIBS"
9280 LIBS="-lnsl_s  $LIBS"
9281 cat > conftest.$ac_ext <<EOF
9282 #line 9283 "configure"
9283 #include "confdefs.h"
9284
9285 int main() {
9286 main()
9287 ; return 0; }
9288 EOF
9289 if { (eval echo configure:9290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9290   rm -rf conftest*
9291   eval "ac_cv_lib_$ac_lib_var=yes"
9292 else
9293   echo "configure: failed program was:" >&5
9294   cat conftest.$ac_ext >&5
9295   rm -rf conftest*
9296   eval "ac_cv_lib_$ac_lib_var=no"
9297 fi
9298 rm -f conftest*
9299 LIBS="$ac_save_LIBS"
9300
9301 fi
9302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9303   echo "$ac_t""yes" 1>&6
9304     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9305     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9306   cat >> confdefs.h <<EOF
9307 #define $ac_tr_lib 1
9308 EOF
9309
9310   LIBS="-lnsl_s $LIBS"
9311
9312 else
9313   echo "$ac_t""no" 1>&6
9314 fi
9315
9316         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9317 echo "configure:9318: checking for main in -lnsl" >&5
9318 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9319 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9320   echo $ac_n "(cached) $ac_c" 1>&6
9321 else
9322   ac_save_LIBS="$LIBS"
9323 LIBS="-lnsl  $LIBS"
9324 cat > conftest.$ac_ext <<EOF
9325 #line 9326 "configure"
9326 #include "confdefs.h"
9327
9328 int main() {
9329 main()
9330 ; return 0; }
9331 EOF
9332 if { (eval echo configure:9333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9333   rm -rf conftest*
9334   eval "ac_cv_lib_$ac_lib_var=yes"
9335 else
9336   echo "configure: failed program was:" >&5
9337   cat conftest.$ac_ext >&5
9338   rm -rf conftest*
9339   eval "ac_cv_lib_$ac_lib_var=no"
9340 fi
9341 rm -f conftest*
9342 LIBS="$ac_save_LIBS"
9343
9344 fi
9345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9346   echo "$ac_t""yes" 1>&6
9347     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9348     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9349   cat >> confdefs.h <<EOF
9350 #define $ac_tr_lib 1
9351 EOF
9352
9353   LIBS="-lnsl $LIBS"
9354
9355 else
9356   echo "$ac_t""no" 1>&6
9357 fi
9358
9359         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9360 echo "configure:9361: checking for socket in -linet" >&5
9361 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9362 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9363   echo $ac_n "(cached) $ac_c" 1>&6
9364 else
9365   ac_save_LIBS="$LIBS"
9366 LIBS="-linet  $LIBS"
9367 cat > conftest.$ac_ext <<EOF
9368 #line 9369 "configure"
9369 #include "confdefs.h"
9370 /* Override any gcc2 internal prototype to avoid an error.  */
9371 /* We use char because int might match the return type of a gcc2
9372     builtin and then its argument prototype would still apply.  */
9373 char socket();
9374
9375 int main() {
9376 socket()
9377 ; return 0; }
9378 EOF
9379 if { (eval echo configure:9380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9380   rm -rf conftest*
9381   eval "ac_cv_lib_$ac_lib_var=yes"
9382 else
9383   echo "configure: failed program was:" >&5
9384   cat conftest.$ac_ext >&5
9385   rm -rf conftest*
9386   eval "ac_cv_lib_$ac_lib_var=no"
9387 fi
9388 rm -f conftest*
9389 LIBS="$ac_save_LIBS"
9390
9391 fi
9392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9393   echo "$ac_t""yes" 1>&6
9394     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9395     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9396   cat >> confdefs.h <<EOF
9397 #define $ac_tr_lib 1
9398 EOF
9399
9400   LIBS="-linet $LIBS"
9401
9402 else
9403   echo "$ac_t""no" 1>&6
9404 fi
9405
9406         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9407 echo "configure:9408: checking for main in -lgen" >&5
9408 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9409 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9410   echo $ac_n "(cached) $ac_c" 1>&6
9411 else
9412   ac_save_LIBS="$LIBS"
9413 LIBS="-lgen  $LIBS"
9414 cat > conftest.$ac_ext <<EOF
9415 #line 9416 "configure"
9416 #include "confdefs.h"
9417
9418 int main() {
9419 main()
9420 ; return 0; }
9421 EOF
9422 if { (eval echo configure:9423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9423   rm -rf conftest*
9424   eval "ac_cv_lib_$ac_lib_var=yes"
9425 else
9426   echo "configure: failed program was:" >&5
9427   cat conftest.$ac_ext >&5
9428   rm -rf conftest*
9429   eval "ac_cv_lib_$ac_lib_var=no"
9430 fi
9431 rm -f conftest*
9432 LIBS="$ac_save_LIBS"
9433
9434 fi
9435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9436   echo "$ac_t""yes" 1>&6
9437     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9438     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9439   cat >> confdefs.h <<EOF
9440 #define $ac_tr_lib 1
9441 EOF
9442
9443   LIBS="-lgen $LIBS"
9444
9445 else
9446   echo "$ac_t""no" 1>&6
9447 fi
9448
9449
9450 fi
9451
9452
9453 echo $ac_n "checking for select""... $ac_c" 1>&6
9454 echo "configure:9455: checking for select" >&5
9455 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9456   echo $ac_n "(cached) $ac_c" 1>&6
9457 else
9458   cat > conftest.$ac_ext <<EOF
9459 #line 9460 "configure"
9460 #include "confdefs.h"
9461 /* System header to define __stub macros and hopefully few prototypes,
9462     which can conflict with char select(); below.  */
9463 #include <assert.h>
9464 /* Override any gcc2 internal prototype to avoid an error.  */
9465 /* We use char because int might match the return type of a gcc2
9466     builtin and then its argument prototype would still apply.  */
9467 char select();
9468 char (*f)();
9469
9470 int main() {
9471
9472 /* The GNU C library defines this for functions which it implements
9473     to always fail with ENOSYS.  Some functions are actually named
9474     something starting with __ and the normal name is an alias.  */
9475 #if defined (__stub_select) || defined (__stub___select)
9476 choke me
9477 #else
9478 f = select;
9479 #endif
9480
9481 ; return 0; }
9482 EOF
9483 if { (eval echo configure:9484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9484   rm -rf conftest*
9485   eval "ac_cv_func_select=yes"
9486 else
9487   echo "configure: failed program was:" >&5
9488   cat conftest.$ac_ext >&5
9489   rm -rf conftest*
9490   eval "ac_cv_func_select=no"
9491 fi
9492 rm -f conftest*
9493 fi
9494
9495 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9496   echo "$ac_t""yes" 1>&6
9497   :
9498 else
9499   echo "$ac_t""no" 1>&6
9500 { echo "configure: error: select() required." 1>&2; exit 1; }
9501 fi
9502
9503
9504 if test "${ac_cv_header_winsock_h}" != yes; then
9505                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9506 echo "configure:9507: checking types of arguments for select()" >&5
9507  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9508   echo $ac_n "(cached) $ac_c" 1>&6
9509 else
9510    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9511   echo $ac_n "(cached) $ac_c" 1>&6
9512 else
9513     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9514   echo $ac_n "(cached) $ac_c" 1>&6
9515 else
9516      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9517      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9518       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9519        cat > conftest.$ac_ext <<EOF
9520 #line 9521 "configure"
9521 #include "confdefs.h"
9522 #ifdef HAVE_SYS_TYPES_H
9523 #include <sys/types.h>
9524 #endif
9525 #ifdef HAVE_SYS_TIME_H
9526 #include <sys/time.h>
9527 #endif
9528 #ifdef HAVE_SYS_SELECT_H
9529 #include <sys/select.h>
9530 #endif
9531 #ifdef HAVE_SYS_SOCKET_H
9532 #include <sys/socket.h>
9533 #endif
9534 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);
9535 int main() {
9536
9537 ; return 0; }
9538 EOF
9539 if { (eval echo configure:9540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9540   rm -rf conftest*
9541           ac_not_found=no ; break 3
9542 else
9543   echo "configure: failed program was:" >&5
9544   cat conftest.$ac_ext >&5
9545   rm -rf conftest*
9546   ac_not_found=yes
9547 fi
9548 rm -f conftest*
9549       done
9550      done
9551     done
9552    
9553 fi
9554   
9555 fi
9556  
9557 fi
9558  if test "$ac_not_found" = yes; then
9559   ac_cv_func_select_arg1=int 
9560   ac_cv_func_select_arg234='int *' 
9561   ac_cv_func_select_arg5='struct timeval *'
9562  fi
9563  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9564  cat >> confdefs.h <<EOF
9565 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9566 EOF
9567
9568  cat >> confdefs.h <<EOF
9569 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9570 EOF
9571
9572  cat >> confdefs.h <<EOF
9573 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9574 EOF
9575
9576
9577 fi
9578
9579
9580 for ac_hdr in regex.h 
9581 do
9582 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9583 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9584 echo "configure:9585: checking for $ac_hdr" >&5
9585 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9586   echo $ac_n "(cached) $ac_c" 1>&6
9587 else
9588   cat > conftest.$ac_ext <<EOF
9589 #line 9590 "configure"
9590 #include "confdefs.h"
9591 #include <$ac_hdr>
9592 EOF
9593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9594 { (eval echo configure:9595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9596 if test -z "$ac_err"; then
9597   rm -rf conftest*
9598   eval "ac_cv_header_$ac_safe=yes"
9599 else
9600   echo "$ac_err" >&5
9601   echo "configure: failed program was:" >&5
9602   cat conftest.$ac_ext >&5
9603   rm -rf conftest*
9604   eval "ac_cv_header_$ac_safe=no"
9605 fi
9606 rm -f conftest*
9607 fi
9608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9609   echo "$ac_t""yes" 1>&6
9610     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9611   cat >> confdefs.h <<EOF
9612 #define $ac_tr_hdr 1
9613 EOF
9614  
9615 else
9616   echo "$ac_t""no" 1>&6
9617 fi
9618 done
9619
9620 if test "$ac_cv_header_regex_h" != yes ; then
9621         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9622 fi
9623
9624 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9625 echo "configure:9626: checking for library containing regfree" >&5
9626 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9627   echo $ac_n "(cached) $ac_c" 1>&6
9628 else
9629   ac_func_search_save_LIBS="$LIBS"
9630 ac_cv_search_regfree="no"
9631 cat > conftest.$ac_ext <<EOF
9632 #line 9633 "configure"
9633 #include "confdefs.h"
9634 /* Override any gcc2 internal prototype to avoid an error.  */
9635 /* We use char because int might match the return type of a gcc2
9636     builtin and then its argument prototype would still apply.  */
9637 char regfree();
9638
9639 int main() {
9640 regfree()
9641 ; return 0; }
9642 EOF
9643 if { (eval echo configure:9644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9644   rm -rf conftest*
9645   ac_cv_search_regfree="none required"
9646 else
9647   echo "configure: failed program was:" >&5
9648   cat conftest.$ac_ext >&5
9649 fi
9650 rm -f conftest*
9651 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9652 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9653 cat > conftest.$ac_ext <<EOF
9654 #line 9655 "configure"
9655 #include "confdefs.h"
9656 /* Override any gcc2 internal prototype to avoid an error.  */
9657 /* We use char because int might match the return type of a gcc2
9658     builtin and then its argument prototype would still apply.  */
9659 char regfree();
9660
9661 int main() {
9662 regfree()
9663 ; return 0; }
9664 EOF
9665 if { (eval echo configure:9666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9666   rm -rf conftest*
9667   ac_cv_search_regfree="-l$ac_lib"
9668 break
9669 else
9670   echo "configure: failed program was:" >&5
9671   cat conftest.$ac_ext >&5
9672 fi
9673 rm -f conftest*
9674 done
9675 LIBS="$ac_func_search_save_LIBS"
9676 fi
9677
9678 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9679 if test "$ac_cv_search_regfree" != "no"; then
9680   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9681   :
9682 else :
9683   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9684 fi
9685
9686
9687 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9688 echo "configure:9689: checking for compatible POSIX regex" >&5
9689 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9690   echo $ac_n "(cached) $ac_c" 1>&6
9691 else
9692   
9693         if test "$cross_compiling" = yes; then
9694   ol_cv_c_posix_regex=cross
9695 else
9696   cat > conftest.$ac_ext <<EOF
9697 #line 9698 "configure"
9698 #include "confdefs.h"
9699
9700 #include <sys/types.h>
9701 #include <regex.h>
9702 static char *pattern, *string;
9703 main()
9704 {
9705         int rc;
9706         regex_t re;
9707
9708         pattern = "^A";
9709
9710         if(regcomp(&re, pattern, 0)) {
9711                 return -1;
9712         }
9713         
9714         string = "ALL MATCH";
9715         
9716         rc = regexec(&re, string, 0, (void*)0, 0);
9717
9718         regfree(&re);
9719
9720         return rc;
9721 }
9722 EOF
9723 if { (eval echo configure:9724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9724 then
9725   ol_cv_c_posix_regex=yes
9726 else
9727   echo "configure: failed program was:" >&5
9728   cat conftest.$ac_ext >&5
9729   rm -fr conftest*
9730   ol_cv_c_posix_regex=no
9731 fi
9732 rm -fr conftest*
9733 fi
9734
9735 fi
9736
9737 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9738
9739 if test "$ol_cv_c_posix_regex" = no ; then
9740         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9741 fi
9742
9743
9744 have_uuid=no
9745 for ac_hdr in sys/uuid.h
9746 do
9747 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9748 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9749 echo "configure:9750: checking for $ac_hdr" >&5
9750 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9751   echo $ac_n "(cached) $ac_c" 1>&6
9752 else
9753   cat > conftest.$ac_ext <<EOF
9754 #line 9755 "configure"
9755 #include "confdefs.h"
9756 #include <$ac_hdr>
9757 EOF
9758 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9759 { (eval echo configure:9760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9760 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9761 if test -z "$ac_err"; then
9762   rm -rf conftest*
9763   eval "ac_cv_header_$ac_safe=yes"
9764 else
9765   echo "$ac_err" >&5
9766   echo "configure: failed program was:" >&5
9767   cat conftest.$ac_ext >&5
9768   rm -rf conftest*
9769   eval "ac_cv_header_$ac_safe=no"
9770 fi
9771 rm -f conftest*
9772 fi
9773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9774   echo "$ac_t""yes" 1>&6
9775     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9776   cat >> confdefs.h <<EOF
9777 #define $ac_tr_hdr 1
9778 EOF
9779  
9780 else
9781   echo "$ac_t""no" 1>&6
9782 fi
9783 done
9784
9785 if test $ac_cv_header_sys_uuid_h = yes ; then
9786         save_LIBS="$LIBS"
9787         
9788 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9789 echo "configure:9790: checking for library containing uuid_to_str" >&5
9790 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9791   echo $ac_n "(cached) $ac_c" 1>&6
9792 else
9793   ac_func_search_save_LIBS="$LIBS"
9794 ac_cv_search_uuid_to_str="no"
9795 cat > conftest.$ac_ext <<EOF
9796 #line 9797 "configure"
9797 #include "confdefs.h"
9798 /* Override any gcc2 internal prototype to avoid an error.  */
9799 /* We use char because int might match the return type of a gcc2
9800     builtin and then its argument prototype would still apply.  */
9801 char uuid_to_str();
9802
9803 int main() {
9804 uuid_to_str()
9805 ; return 0; }
9806 EOF
9807 if { (eval echo configure:9808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9808   rm -rf conftest*
9809   ac_cv_search_uuid_to_str="none required"
9810 else
9811   echo "configure: failed program was:" >&5
9812   cat conftest.$ac_ext >&5
9813 fi
9814 rm -f conftest*
9815 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9816 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9817 cat > conftest.$ac_ext <<EOF
9818 #line 9819 "configure"
9819 #include "confdefs.h"
9820 /* Override any gcc2 internal prototype to avoid an error.  */
9821 /* We use char because int might match the return type of a gcc2
9822     builtin and then its argument prototype would still apply.  */
9823 char uuid_to_str();
9824
9825 int main() {
9826 uuid_to_str()
9827 ; return 0; }
9828 EOF
9829 if { (eval echo configure:9830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9830   rm -rf conftest*
9831   ac_cv_search_uuid_to_str="-l$ac_lib"
9832 break
9833 else
9834   echo "configure: failed program was:" >&5
9835   cat conftest.$ac_ext >&5
9836 fi
9837 rm -f conftest*
9838 done
9839 LIBS="$ac_func_search_save_LIBS"
9840 fi
9841
9842 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9843 if test "$ac_cv_search_uuid_to_str" != "no"; then
9844   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9845   have_uuid=yes
9846 else :
9847   :
9848 fi
9849         LIBS="$save_LIBS"
9850
9851         if test have_uuid = yes ; then
9852                 cat >> confdefs.h <<\EOF
9853 #define HAVE_UUID_TO_STR 1
9854 EOF
9855
9856
9857                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9858                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9859         fi
9860 fi
9861
9862 if test $have_uuid = no ; then
9863         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9864 echo "configure:9865: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9865         save_LIBS="$LIBS"
9866         LIBS="$LIBS -lrpcrt4"
9867         cat > conftest.$ac_ext <<EOF
9868 #line 9869 "configure"
9869 #include "confdefs.h"
9870
9871                 int __stdcall UuidCreate(void *);
9872                 int __stdcall UuidToStringA(void *,void **);
9873                 
9874 int main() {
9875
9876                 UuidCreate(0);
9877                 UuidToStringA(0,0);
9878                 
9879 ; return 0; }
9880 EOF
9881 if { (eval echo configure:9882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9882   rm -rf conftest*
9883   need_rpcrt=yes
9884 else
9885   echo "configure: failed program was:" >&5
9886   cat conftest.$ac_ext >&5
9887   rm -rf conftest*
9888   need_rpcrt=no
9889 fi
9890 rm -f conftest*
9891         if test $need_rpcrt = yes; then
9892                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9893         fi
9894         LIBS="$save_LIBS"
9895         echo "$ac_t""$need_rpcrt" 1>&6
9896 fi
9897
9898 ol_link_dnssrv=no
9899 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9900 echo "configure:9901: checking for res_query" >&5
9901 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9902   echo $ac_n "(cached) $ac_c" 1>&6
9903 else
9904   cat > conftest.$ac_ext <<EOF
9905 #line 9906 "configure"
9906 #include "confdefs.h"
9907 /* System header to define __stub macros and hopefully few prototypes,
9908     which can conflict with char res_query(); below.  */
9909 #include <assert.h>
9910 /* Override any gcc2 internal prototype to avoid an error.  */
9911 /* We use char because int might match the return type of a gcc2
9912     builtin and then its argument prototype would still apply.  */
9913 char res_query();
9914 char (*f)();
9915
9916 int main() {
9917
9918 /* The GNU C library defines this for functions which it implements
9919     to always fail with ENOSYS.  Some functions are actually named
9920     something starting with __ and the normal name is an alias.  */
9921 #if defined (__stub_res_query) || defined (__stub___res_query)
9922 choke me
9923 #else
9924 f = res_query;
9925 #endif
9926
9927 ; return 0; }
9928 EOF
9929 if { (eval echo configure:9930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9930   rm -rf conftest*
9931   eval "ac_cv_func_res_query=yes"
9932 else
9933   echo "configure: failed program was:" >&5
9934   cat conftest.$ac_ext >&5
9935   rm -rf conftest*
9936   eval "ac_cv_func_res_query=no"
9937 fi
9938 rm -f conftest*
9939 fi
9940
9941 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9942   echo "$ac_t""yes" 1>&6
9943   :
9944 else
9945   echo "$ac_t""no" 1>&6
9946 fi
9947
9948 if test $ac_cv_func_res_query = no ; then 
9949         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9950 echo "configure:9951: checking for __res_query" >&5
9951 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9952   echo $ac_n "(cached) $ac_c" 1>&6
9953 else
9954   cat > conftest.$ac_ext <<EOF
9955 #line 9956 "configure"
9956 #include "confdefs.h"
9957 /* System header to define __stub macros and hopefully few prototypes,
9958     which can conflict with char __res_query(); below.  */
9959 #include <assert.h>
9960 /* Override any gcc2 internal prototype to avoid an error.  */
9961 /* We use char because int might match the return type of a gcc2
9962     builtin and then its argument prototype would still apply.  */
9963 char __res_query();
9964 char (*f)();
9965
9966 int main() {
9967
9968 /* The GNU C library defines this for functions which it implements
9969     to always fail with ENOSYS.  Some functions are actually named
9970     something starting with __ and the normal name is an alias.  */
9971 #if defined (__stub___res_query) || defined (__stub_____res_query)
9972 choke me
9973 #else
9974 f = __res_query;
9975 #endif
9976
9977 ; return 0; }
9978 EOF
9979 if { (eval echo configure:9980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9980   rm -rf conftest*
9981   eval "ac_cv_func___res_query=yes"
9982 else
9983   echo "configure: failed program was:" >&5
9984   cat conftest.$ac_ext >&5
9985   rm -rf conftest*
9986   eval "ac_cv_func___res_query=no"
9987 fi
9988 rm -f conftest*
9989 fi
9990
9991 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9992   echo "$ac_t""yes" 1>&6
9993   :
9994 else
9995   echo "$ac_t""no" 1>&6
9996 fi
9997
9998         ac_cv_func_res_query=$ac_cv_func___res_query
9999 fi
10000
10001 if test $ac_cv_func_res_query = no ; then 
10002         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10003 echo "configure:10004: checking for res_query in -lbind" >&5
10004 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10005 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10006   echo $ac_n "(cached) $ac_c" 1>&6
10007 else
10008   ac_save_LIBS="$LIBS"
10009 LIBS="-lbind  $LIBS"
10010 cat > conftest.$ac_ext <<EOF
10011 #line 10012 "configure"
10012 #include "confdefs.h"
10013 /* Override any gcc2 internal prototype to avoid an error.  */
10014 /* We use char because int might match the return type of a gcc2
10015     builtin and then its argument prototype would still apply.  */
10016 char res_query();
10017
10018 int main() {
10019 res_query()
10020 ; return 0; }
10021 EOF
10022 if { (eval echo configure:10023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10023   rm -rf conftest*
10024   eval "ac_cv_lib_$ac_lib_var=yes"
10025 else
10026   echo "configure: failed program was:" >&5
10027   cat conftest.$ac_ext >&5
10028   rm -rf conftest*
10029   eval "ac_cv_lib_$ac_lib_var=no"
10030 fi
10031 rm -f conftest*
10032 LIBS="$ac_save_LIBS"
10033
10034 fi
10035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10036   echo "$ac_t""yes" 1>&6
10037     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10038     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10039   cat >> confdefs.h <<EOF
10040 #define $ac_tr_lib 1
10041 EOF
10042
10043   LIBS="-lbind $LIBS"
10044
10045 else
10046   echo "$ac_t""no" 1>&6
10047 fi
10048
10049         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10050 fi
10051
10052 if test $ac_cv_func_res_query = no ; then 
10053         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10054 echo "configure:10055: checking for __res_query in -lbind" >&5
10055 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10056 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10057   echo $ac_n "(cached) $ac_c" 1>&6
10058 else
10059   ac_save_LIBS="$LIBS"
10060 LIBS="-lbind  $LIBS"
10061 cat > conftest.$ac_ext <<EOF
10062 #line 10063 "configure"
10063 #include "confdefs.h"
10064 /* Override any gcc2 internal prototype to avoid an error.  */
10065 /* We use char because int might match the return type of a gcc2
10066     builtin and then its argument prototype would still apply.  */
10067 char __res_query();
10068
10069 int main() {
10070 __res_query()
10071 ; return 0; }
10072 EOF
10073 if { (eval echo configure:10074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10074   rm -rf conftest*
10075   eval "ac_cv_lib_$ac_lib_var=yes"
10076 else
10077   echo "configure: failed program was:" >&5
10078   cat conftest.$ac_ext >&5
10079   rm -rf conftest*
10080   eval "ac_cv_lib_$ac_lib_var=no"
10081 fi
10082 rm -f conftest*
10083 LIBS="$ac_save_LIBS"
10084
10085 fi
10086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10087   echo "$ac_t""yes" 1>&6
10088     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10089     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10090   cat >> confdefs.h <<EOF
10091 #define $ac_tr_lib 1
10092 EOF
10093
10094   LIBS="-lbind $LIBS"
10095
10096 else
10097   echo "$ac_t""no" 1>&6
10098 fi
10099
10100         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10101 fi
10102
10103 if test $ac_cv_func_res_query = no ; then 
10104         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10105 echo "configure:10106: checking for res_query in -lresolv" >&5
10106 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10107 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10108   echo $ac_n "(cached) $ac_c" 1>&6
10109 else
10110   ac_save_LIBS="$LIBS"
10111 LIBS="-lresolv  $LIBS"
10112 cat > conftest.$ac_ext <<EOF
10113 #line 10114 "configure"
10114 #include "confdefs.h"
10115 /* Override any gcc2 internal prototype to avoid an error.  */
10116 /* We use char because int might match the return type of a gcc2
10117     builtin and then its argument prototype would still apply.  */
10118 char res_query();
10119
10120 int main() {
10121 res_query()
10122 ; return 0; }
10123 EOF
10124 if { (eval echo configure:10125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10125   rm -rf conftest*
10126   eval "ac_cv_lib_$ac_lib_var=yes"
10127 else
10128   echo "configure: failed program was:" >&5
10129   cat conftest.$ac_ext >&5
10130   rm -rf conftest*
10131   eval "ac_cv_lib_$ac_lib_var=no"
10132 fi
10133 rm -f conftest*
10134 LIBS="$ac_save_LIBS"
10135
10136 fi
10137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10138   echo "$ac_t""yes" 1>&6
10139     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10140     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10141   cat >> confdefs.h <<EOF
10142 #define $ac_tr_lib 1
10143 EOF
10144
10145   LIBS="-lresolv $LIBS"
10146
10147 else
10148   echo "$ac_t""no" 1>&6
10149 fi
10150
10151         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10152 fi
10153
10154 if test $ac_cv_func_res_query = no ; then 
10155         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10156 echo "configure:10157: checking for __res_query in -lresolv" >&5
10157 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10158 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10159   echo $ac_n "(cached) $ac_c" 1>&6
10160 else
10161   ac_save_LIBS="$LIBS"
10162 LIBS="-lresolv  $LIBS"
10163 cat > conftest.$ac_ext <<EOF
10164 #line 10165 "configure"
10165 #include "confdefs.h"
10166 /* Override any gcc2 internal prototype to avoid an error.  */
10167 /* We use char because int might match the return type of a gcc2
10168     builtin and then its argument prototype would still apply.  */
10169 char __res_query();
10170
10171 int main() {
10172 __res_query()
10173 ; return 0; }
10174 EOF
10175 if { (eval echo configure:10176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10176   rm -rf conftest*
10177   eval "ac_cv_lib_$ac_lib_var=yes"
10178 else
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -rf conftest*
10182   eval "ac_cv_lib_$ac_lib_var=no"
10183 fi
10184 rm -f conftest*
10185 LIBS="$ac_save_LIBS"
10186
10187 fi
10188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10189   echo "$ac_t""yes" 1>&6
10190     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10191     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10192   cat >> confdefs.h <<EOF
10193 #define $ac_tr_lib 1
10194 EOF
10195
10196   LIBS="-lresolv $LIBS"
10197
10198 else
10199   echo "$ac_t""no" 1>&6
10200 fi
10201
10202         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10203 fi
10204
10205 if test "$ac_cv_func_res_query" = yes ; then
10206         cat >> confdefs.h <<\EOF
10207 #define HAVE_RES_QUERY 1
10208 EOF
10209
10210
10211         if test $ol_enable_dnssrv != no ; then
10212                 ol_link_dnssrv=yes
10213         fi
10214 fi
10215
10216 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10217         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10218 fi
10219
10220 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10221 do
10222 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10223 echo "configure:10224: checking for $ac_func" >&5
10224 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10225   echo $ac_n "(cached) $ac_c" 1>&6
10226 else
10227   cat > conftest.$ac_ext <<EOF
10228 #line 10229 "configure"
10229 #include "confdefs.h"
10230 /* System header to define __stub macros and hopefully few prototypes,
10231     which can conflict with char $ac_func(); below.  */
10232 #include <assert.h>
10233 /* Override any gcc2 internal prototype to avoid an error.  */
10234 /* We use char because int might match the return type of a gcc2
10235     builtin and then its argument prototype would still apply.  */
10236 char $ac_func();
10237 char (*f)();
10238
10239 int main() {
10240
10241 /* The GNU C library defines this for functions which it implements
10242     to always fail with ENOSYS.  Some functions are actually named
10243     something starting with __ and the normal name is an alias.  */
10244 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10245 choke me
10246 #else
10247 f = $ac_func;
10248 #endif
10249
10250 ; return 0; }
10251 EOF
10252 if { (eval echo configure:10253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10253   rm -rf conftest*
10254   eval "ac_cv_func_$ac_func=yes"
10255 else
10256   echo "configure: failed program was:" >&5
10257   cat conftest.$ac_ext >&5
10258   rm -rf conftest*
10259   eval "ac_cv_func_$ac_func=no"
10260 fi
10261 rm -f conftest*
10262 fi
10263
10264 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10265   echo "$ac_t""yes" 1>&6
10266     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10267   cat >> confdefs.h <<EOF
10268 #define $ac_tr_func 1
10269 EOF
10270  
10271 else
10272   echo "$ac_t""no" 1>&6
10273 fi
10274 done
10275
10276
10277 ol_link_ipv6=no
10278 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10279         if test $ol_enable_ipv6 = yes ; then
10280                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10281         fi
10282 elif test $ol_enable_ipv6 != no ; then
10283         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10284 echo "configure:10285: checking INET6_ADDRSTRLEN" >&5
10285 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10286   echo $ac_n "(cached) $ac_c" 1>&6
10287 else
10288   
10289                 cat > conftest.$ac_ext <<EOF
10290 #line 10291 "configure"
10291 #include "confdefs.h"
10292
10293 #                       include <netinet/in.h>
10294 #                       ifdef INET6_ADDRSTRLEN
10295                                 __has_inet6_addrstrlen__;
10296 #                       endif
10297                 
10298 EOF
10299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10300   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10301   rm -rf conftest*
10302   ol_cv_inet6_addrstrlen=yes
10303 else
10304   rm -rf conftest*
10305   ol_cv_inet6_addrstrlen=no
10306 fi
10307 rm -f conftest*
10308
10309 fi
10310
10311 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10312
10313
10314         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10315 echo "configure:10316: checking struct sockaddr_storage" >&5
10316 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10317   echo $ac_n "(cached) $ac_c" 1>&6
10318 else
10319   
10320                 cat > conftest.$ac_ext <<EOF
10321 #line 10322 "configure"
10322 #include "confdefs.h"
10323
10324 #include <sys/types.h>
10325 #include <sys/socket.h>
10326
10327 int main() {
10328
10329                         struct sockaddr_storage ss;
10330
10331 ; return 0; }
10332 EOF
10333 if { (eval echo configure:10334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10334   rm -rf conftest*
10335   ol_cv_struct_sockaddr_storage=yes
10336 else
10337   echo "configure: failed program was:" >&5
10338   cat conftest.$ac_ext >&5
10339   rm -rf conftest*
10340   ol_cv_struct_sockaddr_storage=no
10341 fi
10342 rm -f conftest*
10343 fi
10344
10345 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10346
10347         if test $ol_cv_inet6_addrstrlen = yes \
10348                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10349                 ol_link_ipv6=yes
10350         elif test $ol_enable_ipv6 = yes \
10351                         -a $ol_cv_inet6_addrstrlen = no ; then
10352                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10353         elif test $ol_enable_ipv6 = yes \
10354                         -a $ol_cv_struct_sockaddr_storage = no ; then
10355                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10356         fi
10357 fi
10358
10359 if test $ol_enable_local != no ; then
10360         for ac_hdr in sys/un.h 
10361 do
10362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10364 echo "configure:10365: checking for $ac_hdr" >&5
10365 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10366   echo $ac_n "(cached) $ac_c" 1>&6
10367 else
10368   cat > conftest.$ac_ext <<EOF
10369 #line 10370 "configure"
10370 #include "confdefs.h"
10371 #include <$ac_hdr>
10372 EOF
10373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10374 { (eval echo configure:10375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10376 if test -z "$ac_err"; then
10377   rm -rf conftest*
10378   eval "ac_cv_header_$ac_safe=yes"
10379 else
10380   echo "$ac_err" >&5
10381   echo "configure: failed program was:" >&5
10382   cat conftest.$ac_ext >&5
10383   rm -rf conftest*
10384   eval "ac_cv_header_$ac_safe=no"
10385 fi
10386 rm -f conftest*
10387 fi
10388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10389   echo "$ac_t""yes" 1>&6
10390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10391   cat >> confdefs.h <<EOF
10392 #define $ac_tr_hdr 1
10393 EOF
10394  
10395 else
10396   echo "$ac_t""no" 1>&6
10397 fi
10398 done
10399
10400
10401         if test $ol_enable_local = auto ; then
10402                 ol_enable_local=$ac_cv_header_sys_un_h
10403         elif test $ac_cv_header_sys_un_h = no ; then
10404                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10405         fi
10406 fi
10407
10408 ol_link_kbind=no
10409 ol_link_krb5=no
10410 ol_link_krb4=no
10411
10412 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10413         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10414         -o $ol_with_kerberos = k425 ; then
10415
10416         for ac_hdr in krb5.h
10417 do
10418 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10419 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10420 echo "configure:10421: checking for $ac_hdr" >&5
10421 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10422   echo $ac_n "(cached) $ac_c" 1>&6
10423 else
10424   cat > conftest.$ac_ext <<EOF
10425 #line 10426 "configure"
10426 #include "confdefs.h"
10427 #include <$ac_hdr>
10428 EOF
10429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10430 { (eval echo configure:10431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10432 if test -z "$ac_err"; then
10433   rm -rf conftest*
10434   eval "ac_cv_header_$ac_safe=yes"
10435 else
10436   echo "$ac_err" >&5
10437   echo "configure: failed program was:" >&5
10438   cat conftest.$ac_ext >&5
10439   rm -rf conftest*
10440   eval "ac_cv_header_$ac_safe=no"
10441 fi
10442 rm -f conftest*
10443 fi
10444 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10445   echo "$ac_t""yes" 1>&6
10446     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10447   cat >> confdefs.h <<EOF
10448 #define $ac_tr_hdr 1
10449 EOF
10450  
10451 else
10452   echo "$ac_t""no" 1>&6
10453 fi
10454 done
10455
10456
10457         if test $ac_cv_header_krb5_h = yes ; then
10458                                 for ac_hdr in heim_err.h
10459 do
10460 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10461 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10462 echo "configure:10463: checking for $ac_hdr" >&5
10463 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10464   echo $ac_n "(cached) $ac_c" 1>&6
10465 else
10466   cat > conftest.$ac_ext <<EOF
10467 #line 10468 "configure"
10468 #include "confdefs.h"
10469 #include <$ac_hdr>
10470 EOF
10471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10472 { (eval echo configure:10473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10474 if test -z "$ac_err"; then
10475   rm -rf conftest*
10476   eval "ac_cv_header_$ac_safe=yes"
10477 else
10478   echo "$ac_err" >&5
10479   echo "configure: failed program was:" >&5
10480   cat conftest.$ac_ext >&5
10481   rm -rf conftest*
10482   eval "ac_cv_header_$ac_safe=no"
10483 fi
10484 rm -f conftest*
10485 fi
10486 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10487   echo "$ac_t""yes" 1>&6
10488     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10489   cat >> confdefs.h <<EOF
10490 #define $ac_tr_hdr 1
10491 EOF
10492  
10493 else
10494   echo "$ac_t""no" 1>&6
10495 fi
10496 done
10497
10498                 if test $ac_cv_header_heim_err_h = yes ; then
10499                         krb5_impl=heimdal
10500                 else
10501                         krb5_impl=mit
10502                 fi
10503
10504                 if test $krb5_impl = mit; then
10505                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10506 echo "configure:10507: checking for main in -lk5crypto" >&5
10507 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10508 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10509   echo $ac_n "(cached) $ac_c" 1>&6
10510 else
10511   ac_save_LIBS="$LIBS"
10512 LIBS="-lk5crypto  $LIBS"
10513 cat > conftest.$ac_ext <<EOF
10514 #line 10515 "configure"
10515 #include "confdefs.h"
10516
10517 int main() {
10518 main()
10519 ; return 0; }
10520 EOF
10521 if { (eval echo configure:10522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10522   rm -rf conftest*
10523   eval "ac_cv_lib_$ac_lib_var=yes"
10524 else
10525   echo "configure: failed program was:" >&5
10526   cat conftest.$ac_ext >&5
10527   rm -rf conftest*
10528   eval "ac_cv_lib_$ac_lib_var=no"
10529 fi
10530 rm -f conftest*
10531 LIBS="$ac_save_LIBS"
10532
10533 fi
10534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10535   echo "$ac_t""yes" 1>&6
10536   krb5crypto=k5crypto
10537 else
10538   echo "$ac_t""no" 1>&6
10539 krb5crypto=crypto
10540 fi
10541
10542
10543                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10544 echo "configure:10545: checking for main in -lkrb5" >&5
10545 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10546 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10547   echo $ac_n "(cached) $ac_c" 1>&6
10548 else
10549   ac_save_LIBS="$LIBS"
10550 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10551 cat > conftest.$ac_ext <<EOF
10552 #line 10553 "configure"
10553 #include "confdefs.h"
10554
10555 int main() {
10556 main()
10557 ; return 0; }
10558 EOF
10559 if { (eval echo configure:10560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10560   rm -rf conftest*
10561   eval "ac_cv_lib_$ac_lib_var=yes"
10562 else
10563   echo "configure: failed program was:" >&5
10564   cat conftest.$ac_ext >&5
10565   rm -rf conftest*
10566   eval "ac_cv_lib_$ac_lib_var=no"
10567 fi
10568 rm -f conftest*
10569 LIBS="$ac_save_LIBS"
10570
10571 fi
10572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10573   echo "$ac_t""yes" 1>&6
10574   have_krb5=yes
10575                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10576 else
10577   echo "$ac_t""no" 1>&6
10578 have_krb5=no
10579 fi
10580
10581
10582                 elif test $krb5_impl = heimdal; then
10583                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10584 echo "configure:10585: checking for main in -ldes" >&5
10585 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10586 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10587   echo $ac_n "(cached) $ac_c" 1>&6
10588 else
10589   ac_save_LIBS="$LIBS"
10590 LIBS="-ldes  $LIBS"
10591 cat > conftest.$ac_ext <<EOF
10592 #line 10593 "configure"
10593 #include "confdefs.h"
10594
10595 int main() {
10596 main()
10597 ; return 0; }
10598 EOF
10599 if { (eval echo configure:10600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10600   rm -rf conftest*
10601   eval "ac_cv_lib_$ac_lib_var=yes"
10602 else
10603   echo "configure: failed program was:" >&5
10604   cat conftest.$ac_ext >&5
10605   rm -rf conftest*
10606   eval "ac_cv_lib_$ac_lib_var=no"
10607 fi
10608 rm -f conftest*
10609 LIBS="$ac_save_LIBS"
10610
10611 fi
10612 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10613   echo "$ac_t""yes" 1>&6
10614   krb5crypto=des
10615 else
10616   echo "$ac_t""no" 1>&6
10617 krb5crypto=crypto
10618 fi
10619
10620
10621                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10622 echo "configure:10623: checking for main in -lkrb5" >&5
10623 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10624 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10625   echo $ac_n "(cached) $ac_c" 1>&6
10626 else
10627   ac_save_LIBS="$LIBS"
10628 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10629 cat > conftest.$ac_ext <<EOF
10630 #line 10631 "configure"
10631 #include "confdefs.h"
10632
10633 int main() {
10634 main()
10635 ; return 0; }
10636 EOF
10637 if { (eval echo configure:10638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10638   rm -rf conftest*
10639   eval "ac_cv_lib_$ac_lib_var=yes"
10640 else
10641   echo "configure: failed program was:" >&5
10642   cat conftest.$ac_ext >&5
10643   rm -rf conftest*
10644   eval "ac_cv_lib_$ac_lib_var=no"
10645 fi
10646 rm -f conftest*
10647 LIBS="$ac_save_LIBS"
10648
10649 fi
10650 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10651   echo "$ac_t""yes" 1>&6
10652   have_krb5=yes
10653                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10654 else
10655   echo "$ac_t""no" 1>&6
10656 have_krb5=no
10657 fi
10658
10659
10660                         cat >> confdefs.h <<\EOF
10661 #define HAVE_HEIMDAL_KERBEROS 1
10662 EOF
10663
10664
10665                 else
10666                         have_krb5=no
10667                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10668                 fi
10669
10670                 if test $have_krb5 = yes ; then
10671                         ol_link_krb5=yes
10672
10673                         cat >> confdefs.h <<\EOF
10674 #define HAVE_KRB5 1
10675 EOF
10676
10677
10678                         if test $ol_with_kerberos = k5only ; then
10679                                 ol_with_kerberos=found
10680                         fi
10681
10682                 elif test $ol_with_kerberos != auto ; then
10683                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10684                 fi
10685
10686         fi
10687 fi
10688
10689 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10690         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10691
10692         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10693 do
10694 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10695 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10696 echo "configure:10697: checking for $ac_hdr" >&5
10697 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10698   echo $ac_n "(cached) $ac_c" 1>&6
10699 else
10700   cat > conftest.$ac_ext <<EOF
10701 #line 10702 "configure"
10702 #include "confdefs.h"
10703 #include <$ac_hdr>
10704 EOF
10705 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10706 { (eval echo configure:10707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10707 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10708 if test -z "$ac_err"; then
10709   rm -rf conftest*
10710   eval "ac_cv_header_$ac_safe=yes"
10711 else
10712   echo "$ac_err" >&5
10713   echo "configure: failed program was:" >&5
10714   cat conftest.$ac_ext >&5
10715   rm -rf conftest*
10716   eval "ac_cv_header_$ac_safe=no"
10717 fi
10718 rm -f conftest*
10719 fi
10720 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10721   echo "$ac_t""yes" 1>&6
10722     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10723   cat >> confdefs.h <<EOF
10724 #define $ac_tr_hdr 1
10725 EOF
10726  
10727 else
10728   echo "$ac_t""no" 1>&6
10729 fi
10730 done
10731
10732
10733         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10734                 if test $krb5_impl = mit; then
10735                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10736 echo "configure:10737: checking for main in -lkrb4" >&5
10737 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10738 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10739   echo $ac_n "(cached) $ac_c" 1>&6
10740 else
10741   ac_save_LIBS="$LIBS"
10742 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10743 cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746
10747 int main() {
10748 main()
10749 ; return 0; }
10750 EOF
10751 if { (eval echo configure:10752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10752   rm -rf conftest*
10753   eval "ac_cv_lib_$ac_lib_var=yes"
10754 else
10755   echo "configure: failed program was:" >&5
10756   cat conftest.$ac_ext >&5
10757   rm -rf conftest*
10758   eval "ac_cv_lib_$ac_lib_var=no"
10759 fi
10760 rm -f conftest*
10761 LIBS="$ac_save_LIBS"
10762
10763 fi
10764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10765   echo "$ac_t""yes" 1>&6
10766   have_k425=yes
10767                                 KRB4_LIBS="-lkrb4 -ldes425"
10768 else
10769   echo "$ac_t""no" 1>&6
10770 have_k425=no
10771 fi
10772
10773
10774                 elif test $krb5_impl = heimdal; then
10775                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10776 echo "configure:10777: checking for main in -lkrb4" >&5
10777 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10778 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10779   echo $ac_n "(cached) $ac_c" 1>&6
10780 else
10781   ac_save_LIBS="$LIBS"
10782 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10783 cat > conftest.$ac_ext <<EOF
10784 #line 10785 "configure"
10785 #include "confdefs.h"
10786
10787 int main() {
10788 main()
10789 ; return 0; }
10790 EOF
10791 if { (eval echo configure:10792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10792   rm -rf conftest*
10793   eval "ac_cv_lib_$ac_lib_var=yes"
10794 else
10795   echo "configure: failed program was:" >&5
10796   cat conftest.$ac_ext >&5
10797   rm -rf conftest*
10798   eval "ac_cv_lib_$ac_lib_var=no"
10799 fi
10800 rm -f conftest*
10801 LIBS="$ac_save_LIBS"
10802
10803 fi
10804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10805   echo "$ac_t""yes" 1>&6
10806   have_k425=yes
10807                                 KRB4_LIBS="-lkrb4"
10808 else
10809   echo "$ac_t""no" 1>&6
10810 have_k425=no
10811 fi
10812
10813
10814                 else
10815                         have_425=no
10816                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10817                 fi
10818
10819                 if test $have_k425 = yes ; then
10820                         ol_with_kerberos=found
10821                         ol_link_krb4=yes
10822
10823                         cat >> confdefs.h <<\EOF
10824 #define HAVE_KRB425 1
10825 EOF
10826
10827                         cat >> confdefs.h <<\EOF
10828 #define HAVE_KRB4 1
10829 EOF
10830
10831
10832                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10833 echo "configure:10834: checking for des_debug in Kerberos libraries" >&5
10834 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10835   echo $ac_n "(cached) $ac_c" 1>&6
10836 else
10837   
10838                                                                 save_LIBS="$LIBS"
10839                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10840                                 cat > conftest.$ac_ext <<EOF
10841 #line 10842 "configure"
10842 #include "confdefs.h"
10843
10844 #include <kerberosIV/krb.h>
10845 #include <kerberosIV/des.h>
10846 extern int des_debug;
10847
10848 int main() {
10849
10850 des_debug = 1;
10851
10852 ; return 0; }
10853 EOF
10854 if { (eval echo configure:10855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10855   rm -rf conftest*
10856   ol_cv_var_des_debug=yes
10857 else
10858   echo "configure: failed program was:" >&5
10859   cat conftest.$ac_ext >&5
10860   rm -rf conftest*
10861   ol_cv_var_des_debug=no
10862 fi
10863 rm -f conftest*
10864                                                                 LIBS="$save_LIBS"
10865                         
10866 fi
10867
10868 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10869
10870                         if test $ol_cv_var_des_debug = yes ; then
10871                                 cat >> confdefs.h <<\EOF
10872 #define HAVE_DES_DEBUG 1
10873 EOF
10874
10875                         fi
10876
10877                         LIBS="$save_LIBS"
10878                 fi
10879         fi
10880 fi
10881
10882 if test $ol_link_krb5 = yes ; then
10883         ol_with_kerberos=found
10884 fi
10885
10886 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10887         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10888
10889         for ac_hdr in krb.h des.h krb-archaeology.h 
10890 do
10891 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10892 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10893 echo "configure:10894: checking for $ac_hdr" >&5
10894 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10895   echo $ac_n "(cached) $ac_c" 1>&6
10896 else
10897   cat > conftest.$ac_ext <<EOF
10898 #line 10899 "configure"
10899 #include "confdefs.h"
10900 #include <$ac_hdr>
10901 EOF
10902 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10903 { (eval echo configure:10904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10904 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10905 if test -z "$ac_err"; then
10906   rm -rf conftest*
10907   eval "ac_cv_header_$ac_safe=yes"
10908 else
10909   echo "$ac_err" >&5
10910   echo "configure: failed program was:" >&5
10911   cat conftest.$ac_ext >&5
10912   rm -rf conftest*
10913   eval "ac_cv_header_$ac_safe=no"
10914 fi
10915 rm -f conftest*
10916 fi
10917 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10918   echo "$ac_t""yes" 1>&6
10919     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10920   cat >> confdefs.h <<EOF
10921 #define $ac_tr_hdr 1
10922 EOF
10923  
10924 else
10925   echo "$ac_t""no" 1>&6
10926 fi
10927 done
10928
10929
10930         if test $ac_cv_header_krb_h = yes ; then
10931                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10932 echo "configure:10933: checking for main in -lkrb" >&5
10933 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10934 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10935   echo $ac_n "(cached) $ac_c" 1>&6
10936 else
10937   ac_save_LIBS="$LIBS"
10938 LIBS="-lkrb -ldes $LIBS"
10939 cat > conftest.$ac_ext <<EOF
10940 #line 10941 "configure"
10941 #include "confdefs.h"
10942
10943 int main() {
10944 main()
10945 ; return 0; }
10946 EOF
10947 if { (eval echo configure:10948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10948   rm -rf conftest*
10949   eval "ac_cv_lib_$ac_lib_var=yes"
10950 else
10951   echo "configure: failed program was:" >&5
10952   cat conftest.$ac_ext >&5
10953   rm -rf conftest*
10954   eval "ac_cv_lib_$ac_lib_var=no"
10955 fi
10956 rm -f conftest*
10957 LIBS="$ac_save_LIBS"
10958
10959 fi
10960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10961   echo "$ac_t""yes" 1>&6
10962   have_k4=yes
10963 else
10964   echo "$ac_t""no" 1>&6
10965 have_k4=no
10966 fi
10967
10968
10969                 if test $have_k4 = yes ; then
10970                         ol_with_kerberos=found
10971                         ol_link_krb4=yes
10972
10973                         cat >> confdefs.h <<\EOF
10974 #define HAVE_KRB4 1
10975 EOF
10976
10977
10978                         KRB4_LIBS="-lkrb -ldes"
10979
10980                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10981                                 cat >> confdefs.h <<\EOF
10982 #define HAVE_KTH_KERBEROS 1
10983 EOF
10984
10985                         fi
10986                 fi
10987         fi
10988 fi
10989
10990 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10991         ol_link_kbind=yes
10992
10993 elif test $ol_enable_kbind = yes ; then
10994         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10995 fi
10996
10997 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10998         cat >> confdefs.h <<\EOF
10999 #define HAVE_KERBEROS 1
11000 EOF
11001
11002
11003 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11004         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11005 fi
11006
11007 ol_link_tls=no
11008 if test $ol_with_tls != no ; then
11009         for ac_hdr in openssl/ssl.h ssl.h
11010 do
11011 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11012 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11013 echo "configure:11014: checking for $ac_hdr" >&5
11014 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11015   echo $ac_n "(cached) $ac_c" 1>&6
11016 else
11017   cat > conftest.$ac_ext <<EOF
11018 #line 11019 "configure"
11019 #include "confdefs.h"
11020 #include <$ac_hdr>
11021 EOF
11022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11023 { (eval echo configure:11024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11025 if test -z "$ac_err"; then
11026   rm -rf conftest*
11027   eval "ac_cv_header_$ac_safe=yes"
11028 else
11029   echo "$ac_err" >&5
11030   echo "configure: failed program was:" >&5
11031   cat conftest.$ac_ext >&5
11032   rm -rf conftest*
11033   eval "ac_cv_header_$ac_safe=no"
11034 fi
11035 rm -f conftest*
11036 fi
11037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11038   echo "$ac_t""yes" 1>&6
11039     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11040   cat >> confdefs.h <<EOF
11041 #define $ac_tr_hdr 1
11042 EOF
11043  
11044 else
11045   echo "$ac_t""no" 1>&6
11046 fi
11047 done
11048
11049         
11050         if test $ac_cv_header_openssl_ssl_h = yes \
11051                 -o $ac_cv_header_ssl_h = yes ; then
11052                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11053 echo "configure:11054: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11054 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11055 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11056   echo $ac_n "(cached) $ac_c" 1>&6
11057 else
11058   ac_save_LIBS="$LIBS"
11059 LIBS="-lssl -lcrypto $LIBS"
11060 cat > conftest.$ac_ext <<EOF
11061 #line 11062 "configure"
11062 #include "confdefs.h"
11063 /* Override any gcc2 internal prototype to avoid an error.  */
11064 /* We use char because int might match the return type of a gcc2
11065     builtin and then its argument prototype would still apply.  */
11066 char SSLeay_add_ssl_algorithms();
11067
11068 int main() {
11069 SSLeay_add_ssl_algorithms()
11070 ; return 0; }
11071 EOF
11072 if { (eval echo configure:11073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11073   rm -rf conftest*
11074   eval "ac_cv_lib_$ac_lib_var=yes"
11075 else
11076   echo "configure: failed program was:" >&5
11077   cat conftest.$ac_ext >&5
11078   rm -rf conftest*
11079   eval "ac_cv_lib_$ac_lib_var=no"
11080 fi
11081 rm -f conftest*
11082 LIBS="$ac_save_LIBS"
11083
11084 fi
11085 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11086   echo "$ac_t""yes" 1>&6
11087   have_ssleay=yes
11088                         need_rsaref=no
11089 else
11090   echo "$ac_t""no" 1>&6
11091 have_ssleay=no
11092 fi
11093
11094                         
11095                 if test $have_ssleay = no ; then
11096                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11097 echo "configure:11098: checking for SSL_library_init in -lssl" >&5
11098 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11099 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11100   echo $ac_n "(cached) $ac_c" 1>&6
11101 else
11102   ac_save_LIBS="$LIBS"
11103 LIBS="-lssl -lcrypto $LIBS"
11104 cat > conftest.$ac_ext <<EOF
11105 #line 11106 "configure"
11106 #include "confdefs.h"
11107 /* Override any gcc2 internal prototype to avoid an error.  */
11108 /* We use char because int might match the return type of a gcc2
11109     builtin and then its argument prototype would still apply.  */
11110 char SSL_library_init();
11111
11112 int main() {
11113 SSL_library_init()
11114 ; return 0; }
11115 EOF
11116 if { (eval echo configure:11117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11117   rm -rf conftest*
11118   eval "ac_cv_lib_$ac_lib_var=yes"
11119 else
11120   echo "configure: failed program was:" >&5
11121   cat conftest.$ac_ext >&5
11122   rm -rf conftest*
11123   eval "ac_cv_lib_$ac_lib_var=no"
11124 fi
11125 rm -f conftest*
11126 LIBS="$ac_save_LIBS"
11127
11128 fi
11129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11130   echo "$ac_t""yes" 1>&6
11131   have_ssleay=yes
11132                                 need_rsaref=no
11133 else
11134   echo "$ac_t""no" 1>&6
11135 have_ssleay=no
11136 fi
11137
11138                 fi
11139
11140                 if test $have_ssleay = no ; then
11141                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11142 echo "configure:11143: checking for ssl3_accept in -lssl" >&5
11143 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11144 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11145   echo $ac_n "(cached) $ac_c" 1>&6
11146 else
11147   ac_save_LIBS="$LIBS"
11148 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11149 cat > conftest.$ac_ext <<EOF
11150 #line 11151 "configure"
11151 #include "confdefs.h"
11152 /* Override any gcc2 internal prototype to avoid an error.  */
11153 /* We use char because int might match the return type of a gcc2
11154     builtin and then its argument prototype would still apply.  */
11155 char ssl3_accept();
11156
11157 int main() {
11158 ssl3_accept()
11159 ; return 0; }
11160 EOF
11161 if { (eval echo configure:11162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11162   rm -rf conftest*
11163   eval "ac_cv_lib_$ac_lib_var=yes"
11164 else
11165   echo "configure: failed program was:" >&5
11166   cat conftest.$ac_ext >&5
11167   rm -rf conftest*
11168   eval "ac_cv_lib_$ac_lib_var=no"
11169 fi
11170 rm -f conftest*
11171 LIBS="$ac_save_LIBS"
11172
11173 fi
11174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11175   echo "$ac_t""yes" 1>&6
11176   have_ssleay=yes
11177                                 need_rsaref=yes
11178 else
11179   echo "$ac_t""no" 1>&6
11180 have_ssleay=no
11181 fi
11182
11183                 fi
11184
11185                 if test $have_ssleay = yes ; then
11186                         ol_with_tls=found
11187                         ol_link_tls=yes
11188
11189                         cat >> confdefs.h <<\EOF
11190 #define HAVE_SSLEAY 1
11191 EOF
11192
11193
11194                         if test $need_rsaref = yes; then
11195                                 cat >> confdefs.h <<\EOF
11196 #define HAVE_RSAREF 1
11197 EOF
11198
11199
11200                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11201                         else
11202                                 TLS_LIBS="-lssl -lcrypto"
11203                         fi
11204                 fi
11205         fi
11206
11207 else
11208         echo "configure: warning: TLS data protection not supported!" 1>&2
11209 fi
11210
11211 WITH_TLS=no
11212 if test $ol_link_tls = yes ; then
11213         cat >> confdefs.h <<\EOF
11214 #define HAVE_TLS 1
11215 EOF
11216
11217         WITH_TLS=yes
11218
11219 elif test $ol_with_tls = auto ; then
11220         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11221         echo "configure: warning: TLS data protection not supported!" 1>&2
11222
11223 elif test $ol_with_tls != no ; then
11224         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11225 fi
11226
11227 if test $ol_enable_lmpasswd != no; then
11228         if test $ol_link_tls != yes ; then
11229                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11230         fi
11231
11232         cat >> confdefs.h <<\EOF
11233 #define SLAPD_LMHASH 1
11234 EOF
11235
11236 fi
11237
11238 ol_link_threads=no
11239
11240 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11241         -o $ol_with_threads = nt ; then
11242
11243         
11244         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11245 echo "configure:11246: checking for _beginthread" >&5
11246 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11247   echo $ac_n "(cached) $ac_c" 1>&6
11248 else
11249   cat > conftest.$ac_ext <<EOF
11250 #line 11251 "configure"
11251 #include "confdefs.h"
11252 /* System header to define __stub macros and hopefully few prototypes,
11253     which can conflict with char _beginthread(); below.  */
11254 #include <assert.h>
11255 /* Override any gcc2 internal prototype to avoid an error.  */
11256 /* We use char because int might match the return type of a gcc2
11257     builtin and then its argument prototype would still apply.  */
11258 char _beginthread();
11259 char (*f)();
11260
11261 int main() {
11262
11263 /* The GNU C library defines this for functions which it implements
11264     to always fail with ENOSYS.  Some functions are actually named
11265     something starting with __ and the normal name is an alias.  */
11266 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11267 choke me
11268 #else
11269 f = _beginthread;
11270 #endif
11271
11272 ; return 0; }
11273 EOF
11274 if { (eval echo configure:11275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11275   rm -rf conftest*
11276   eval "ac_cv_func__beginthread=yes"
11277 else
11278   echo "configure: failed program was:" >&5
11279   cat conftest.$ac_ext >&5
11280   rm -rf conftest*
11281   eval "ac_cv_func__beginthread=no"
11282 fi
11283 rm -f conftest*
11284 fi
11285
11286 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11287   echo "$ac_t""yes" 1>&6
11288   :
11289 else
11290   echo "$ac_t""no" 1>&6
11291 fi
11292
11293
11294         if test $ac_cv_func__beginthread = yes ; then
11295                 cat >> confdefs.h <<\EOF
11296 #define HAVE_NT_THREADS 1
11297 EOF
11298
11299                 ol_cv_nt_threads=yes
11300         fi
11301
11302
11303         if test "$ol_cv_nt_threads" = yes ; then
11304                 ol_link_threads=nt
11305                 ol_with_threads=found
11306                 ol_with_yielding_select=yes
11307
11308                 cat >> confdefs.h <<\EOF
11309 #define HAVE_NT_SERVICE_MANAGER 1
11310 EOF
11311
11312                 cat >> confdefs.h <<\EOF
11313 #define HAVE_NT_EVENT_LOG 1
11314 EOF
11315
11316         fi
11317
11318         if test $ol_with_threads = nt ; then
11319                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11320         fi
11321 fi
11322
11323 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11324         -o $ol_with_threads = posix ; then
11325
11326         for ac_hdr in pthread.h
11327 do
11328 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11329 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11330 echo "configure:11331: checking for $ac_hdr" >&5
11331 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11332   echo $ac_n "(cached) $ac_c" 1>&6
11333 else
11334   cat > conftest.$ac_ext <<EOF
11335 #line 11336 "configure"
11336 #include "confdefs.h"
11337 #include <$ac_hdr>
11338 EOF
11339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11340 { (eval echo configure:11341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11342 if test -z "$ac_err"; then
11343   rm -rf conftest*
11344   eval "ac_cv_header_$ac_safe=yes"
11345 else
11346   echo "$ac_err" >&5
11347   echo "configure: failed program was:" >&5
11348   cat conftest.$ac_ext >&5
11349   rm -rf conftest*
11350   eval "ac_cv_header_$ac_safe=no"
11351 fi
11352 rm -f conftest*
11353 fi
11354 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11355   echo "$ac_t""yes" 1>&6
11356     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11357   cat >> confdefs.h <<EOF
11358 #define $ac_tr_hdr 1
11359 EOF
11360  
11361 else
11362   echo "$ac_t""no" 1>&6
11363 fi
11364 done
11365
11366
11367         if test $ac_cv_header_pthread_h = yes ; then
11368                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11369 echo "configure:11370: checking POSIX thread version" >&5
11370 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11371   echo $ac_n "(cached) $ac_c" 1>&6
11372 else
11373   
11374         cat > conftest.$ac_ext <<EOF
11375 #line 11376 "configure"
11376 #include "confdefs.h"
11377
11378 #               include <pthread.h>
11379         
11380 int main() {
11381
11382                 int i = PTHREAD_CREATE_JOINABLE;
11383         
11384 ; return 0; }
11385 EOF
11386 if { (eval echo configure:11387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11387   rm -rf conftest*
11388   
11389         cat > conftest.$ac_ext <<EOF
11390 #line 11391 "configure"
11391 #include "confdefs.h"
11392 #include <pthread.h>
11393 EOF
11394 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11395   egrep "pthread_detach" >/dev/null 2>&1; then
11396   rm -rf conftest*
11397   ol_cv_pthread_version=10
11398 else
11399   rm -rf conftest*
11400   ol_cv_pthread_version=8
11401 fi
11402 rm -f conftest*
11403
11404 else
11405   echo "configure: failed program was:" >&5
11406   cat conftest.$ac_ext >&5
11407   rm -rf conftest*
11408   
11409         cat > conftest.$ac_ext <<EOF
11410 #line 11411 "configure"
11411 #include "confdefs.h"
11412
11413 #               include <pthread.h>
11414 #               ifdef PTHREAD_CREATE_UNDETACHED
11415                 draft7
11416 #               endif
11417         
11418 EOF
11419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11420   egrep "draft7" >/dev/null 2>&1; then
11421   rm -rf conftest*
11422   ol_cv_pthread_version=7
11423 else
11424   rm -rf conftest*
11425   
11426         cat > conftest.$ac_ext <<EOF
11427 #line 11428 "configure"
11428 #include "confdefs.h"
11429 #include <pthread.h>
11430 EOF
11431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11432   egrep "pthread_attr_init" >/dev/null 2>&1; then
11433   rm -rf conftest*
11434   ol_cv_pthread_version=6
11435 else
11436   rm -rf conftest*
11437   
11438         cat > conftest.$ac_ext <<EOF
11439 #line 11440 "configure"
11440 #include "confdefs.h"
11441
11442 #               include <pthread.h>
11443 #ifdef          PTHREAD_MUTEX_INITIALIZER
11444                 draft5
11445 #endif
11446         
11447 EOF
11448 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11449   egrep "draft5" >/dev/null 2>&1; then
11450   rm -rf conftest*
11451   ol_cv_pthread_version=5
11452 else
11453   rm -rf conftest*
11454   ol_cv_pthread_version=4
11455 fi
11456 rm -f conftest*
11457  
11458 fi
11459 rm -f conftest*
11460  
11461 fi
11462 rm -f conftest*
11463  
11464 fi
11465 rm -f conftest*
11466
11467 fi
11468
11469 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11470
11471
11472                 if test $ol_cv_pthread_version != 0 ; then
11473                         cat >> confdefs.h <<EOF
11474 #define HAVE_PTHREADS $ol_cv_pthread_version
11475 EOF
11476
11477                 else
11478                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11479                 fi
11480
11481                 # consider threads found
11482                 ol_with_threads=found
11483
11484                 
11485         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11486 echo "configure:11487: checking for LinuxThreads pthread.h" >&5
11487 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11488   echo $ac_n "(cached) $ac_c" 1>&6
11489 else
11490   cat > conftest.$ac_ext <<EOF
11491 #line 11492 "configure"
11492 #include "confdefs.h"
11493 #include <pthread.h>
11494 EOF
11495 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11496   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11497   rm -rf conftest*
11498   ol_cv_header_linux_threads=yes
11499 else
11500   rm -rf conftest*
11501   ol_cv_header_linux_threads=no
11502 fi
11503 rm -f conftest*
11504
11505                 
11506 fi
11507
11508 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11509         if test $ol_cv_header_linux_threads = yes; then
11510                 cat >> confdefs.h <<\EOF
11511 #define HAVE_LINUX_THREADS 1
11512 EOF
11513
11514         fi
11515
11516                 
11517         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11518 echo "configure:11519: checking for GNU Pth pthread.h" >&5
11519 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11520   echo $ac_n "(cached) $ac_c" 1>&6
11521 else
11522   cat > conftest.$ac_ext <<EOF
11523 #line 11524 "configure"
11524 #include "confdefs.h"
11525 #include <pthread.h>
11526 #ifdef _POSIX_THREAD_IS_GNU_PTH
11527         __gnu_pth__;
11528 #endif
11529
11530 EOF
11531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11532   egrep "__gnu_pth__" >/dev/null 2>&1; then
11533   rm -rf conftest*
11534   ol_cv_header_gnu_pth_pthread_h=yes
11535 else
11536   rm -rf conftest*
11537   ol_cv_header_gnu_pth_pthread_h=no
11538 fi
11539 rm -f conftest*
11540
11541                 
11542 fi
11543
11544 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11545
11546
11547                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11548                         for ac_hdr in sched.h
11549 do
11550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11552 echo "configure:11553: checking for $ac_hdr" >&5
11553 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11554   echo $ac_n "(cached) $ac_c" 1>&6
11555 else
11556   cat > conftest.$ac_ext <<EOF
11557 #line 11558 "configure"
11558 #include "confdefs.h"
11559 #include <$ac_hdr>
11560 EOF
11561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11562 { (eval echo configure:11563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11564 if test -z "$ac_err"; then
11565   rm -rf conftest*
11566   eval "ac_cv_header_$ac_safe=yes"
11567 else
11568   echo "$ac_err" >&5
11569   echo "configure: failed program was:" >&5
11570   cat conftest.$ac_ext >&5
11571   rm -rf conftest*
11572   eval "ac_cv_header_$ac_safe=no"
11573 fi
11574 rm -f conftest*
11575 fi
11576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11577   echo "$ac_t""yes" 1>&6
11578     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11579   cat >> confdefs.h <<EOF
11580 #define $ac_tr_hdr 1
11581 EOF
11582  
11583 else
11584   echo "$ac_t""no" 1>&6
11585 fi
11586 done
11587
11588                 fi
11589
11590                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11591                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11592 echo "configure:11593: checking for pthread_create in default libraries" >&5
11593 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11594   echo $ac_n "(cached) $ac_c" 1>&6
11595 else
11596   
11597                 if test "$cross_compiling" = yes; then
11598   cat > conftest.$ac_ext <<EOF
11599 #line 11600 "configure"
11600 #include "confdefs.h"
11601 /* pthread test headers */
11602 #include <pthread.h>
11603 #if HAVE_PTHREADS < 7
11604 #include <errno.h>
11605 #endif
11606 #ifndef NULL
11607 #define NULL (void*)0
11608 #endif
11609
11610 static void *task(p)
11611         void *p;
11612 {
11613         return (void *) (p == NULL);
11614 }
11615
11616 int main() {
11617
11618         /* pthread test function */
11619 #ifndef PTHREAD_CREATE_DETACHED
11620 #define PTHREAD_CREATE_DETACHED 1
11621 #endif
11622         pthread_t t;
11623         int status;
11624         int detach = PTHREAD_CREATE_DETACHED;
11625
11626 #if HAVE_PTHREADS > 4
11627         /* Final pthreads */
11628         pthread_attr_t attr;
11629
11630         status = pthread_attr_init(&attr);
11631         if( status ) return status;
11632
11633 #if HAVE_PTHREADS < 7
11634         status = pthread_attr_setdetachstate(&attr, &detach);
11635         if( status < 0 ) status = errno;
11636 #else
11637         status = pthread_attr_setdetachstate(&attr, detach);
11638 #endif
11639         if( status ) return status;
11640         status = pthread_create( &t, &attr, task, NULL );
11641 #if HAVE_PTHREADS < 7
11642         if( status < 0 ) status = errno;
11643 #endif
11644         if( status ) return status;
11645 #else
11646         /* Draft 4 pthreads */
11647         status = pthread_create( &t, pthread_attr_default, task, NULL );
11648         if( status ) return errno;
11649
11650         /* give thread a chance to complete */
11651         /* it should remain joinable and hence detachable */
11652         sleep( 1 );
11653
11654         status = pthread_detach( &t );
11655         if( status ) return errno;
11656 #endif
11657
11658 #ifdef HAVE_LINUX_THREADS
11659         pthread_kill_other_threads_np();
11660 #endif
11661
11662         return 0;
11663
11664 ; return 0; }
11665 EOF
11666 if { (eval echo configure:11667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11667   rm -rf conftest*
11668   ol_cv_pthread_create=yes
11669 else
11670   echo "configure: failed program was:" >&5
11671   cat conftest.$ac_ext >&5
11672   rm -rf conftest*
11673   ol_cv_pthread_create=no
11674 fi
11675 rm -f conftest*
11676 else
11677   cat > conftest.$ac_ext <<EOF
11678 #line 11679 "configure"
11679 #include "confdefs.h"
11680 /* pthread test headers */
11681 #include <pthread.h>
11682 #if HAVE_PTHREADS < 7
11683 #include <errno.h>
11684 #endif
11685 #ifndef NULL
11686 #define NULL (void*)0
11687 #endif
11688
11689 static void *task(p)
11690         void *p;
11691 {
11692         return (void *) (p == NULL);
11693 }
11694
11695
11696 int main(argc, argv)
11697         int argc;
11698         char **argv;
11699 {
11700
11701         /* pthread test function */
11702 #ifndef PTHREAD_CREATE_DETACHED
11703 #define PTHREAD_CREATE_DETACHED 1
11704 #endif
11705         pthread_t t;
11706         int status;
11707         int detach = PTHREAD_CREATE_DETACHED;
11708
11709 #if HAVE_PTHREADS > 4
11710         /* Final pthreads */
11711         pthread_attr_t attr;
11712
11713         status = pthread_attr_init(&attr);
11714         if( status ) return status;
11715
11716 #if HAVE_PTHREADS < 7
11717         status = pthread_attr_setdetachstate(&attr, &detach);
11718         if( status < 0 ) status = errno;
11719 #else
11720         status = pthread_attr_setdetachstate(&attr, detach);
11721 #endif
11722         if( status ) return status;
11723         status = pthread_create( &t, &attr, task, NULL );
11724 #if HAVE_PTHREADS < 7
11725         if( status < 0 ) status = errno;
11726 #endif
11727         if( status ) return status;
11728 #else
11729         /* Draft 4 pthreads */
11730         status = pthread_create( &t, pthread_attr_default, task, NULL );
11731         if( status ) return errno;
11732
11733         /* give thread a chance to complete */
11734         /* it should remain joinable and hence detachable */
11735         sleep( 1 );
11736
11737         status = pthread_detach( &t );
11738         if( status ) return errno;
11739 #endif
11740
11741 #ifdef HAVE_LINUX_THREADS
11742         pthread_kill_other_threads_np();
11743 #endif
11744
11745         return 0;
11746
11747 }
11748
11749 EOF
11750 if { (eval echo configure:11751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11751 then
11752   ol_cv_pthread_create=yes
11753 else
11754   echo "configure: failed program was:" >&5
11755   cat conftest.$ac_ext >&5
11756   rm -fr conftest*
11757   ol_cv_pthread_create=no
11758 fi
11759 rm -fr conftest*
11760 fi
11761
11762 fi
11763
11764 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11765
11766                 if test $ol_cv_pthread_create != no ; then
11767                         ol_link_threads=posix
11768                         ol_link_pthreads=""
11769                 fi
11770                 
11771                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11772 if test "$ol_link_threads" = no ; then
11773         # try -kthread
11774         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11775 echo "configure:11776: checking for pthread link with -kthread" >&5
11776 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11777   echo $ac_n "(cached) $ac_c" 1>&6
11778 else
11779   
11780                 # save the flags
11781                 ol_LIBS="$LIBS"
11782                 LIBS="-kthread $LIBS"
11783
11784                 if test "$cross_compiling" = yes; then
11785   cat > conftest.$ac_ext <<EOF
11786 #line 11787 "configure"
11787 #include "confdefs.h"
11788 /* pthread test headers */
11789 #include <pthread.h>
11790 #if HAVE_PTHREADS < 7
11791 #include <errno.h>
11792 #endif
11793 #ifndef NULL
11794 #define NULL (void*)0
11795 #endif
11796
11797 static void *task(p)
11798         void *p;
11799 {
11800         return (void *) (p == NULL);
11801 }
11802
11803 int main() {
11804
11805         /* pthread test function */
11806 #ifndef PTHREAD_CREATE_DETACHED
11807 #define PTHREAD_CREATE_DETACHED 1
11808 #endif
11809         pthread_t t;
11810         int status;
11811         int detach = PTHREAD_CREATE_DETACHED;
11812
11813 #if HAVE_PTHREADS > 4
11814         /* Final pthreads */
11815         pthread_attr_t attr;
11816
11817         status = pthread_attr_init(&attr);
11818         if( status ) return status;
11819
11820 #if HAVE_PTHREADS < 7
11821         status = pthread_attr_setdetachstate(&attr, &detach);
11822         if( status < 0 ) status = errno;
11823 #else
11824         status = pthread_attr_setdetachstate(&attr, detach);
11825 #endif
11826         if( status ) return status;
11827         status = pthread_create( &t, &attr, task, NULL );
11828 #if HAVE_PTHREADS < 7
11829         if( status < 0 ) status = errno;
11830 #endif
11831         if( status ) return status;
11832 #else
11833         /* Draft 4 pthreads */
11834         status = pthread_create( &t, pthread_attr_default, task, NULL );
11835         if( status ) return errno;
11836
11837         /* give thread a chance to complete */
11838         /* it should remain joinable and hence detachable */
11839         sleep( 1 );
11840
11841         status = pthread_detach( &t );
11842         if( status ) return errno;
11843 #endif
11844
11845 #ifdef HAVE_LINUX_THREADS
11846         pthread_kill_other_threads_np();
11847 #endif
11848
11849         return 0;
11850
11851 ; return 0; }
11852 EOF
11853 if { (eval echo configure:11854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11854   rm -rf conftest*
11855   ol_cv_pthread_kthread=yes
11856 else
11857   echo "configure: failed program was:" >&5
11858   cat conftest.$ac_ext >&5
11859   rm -rf conftest*
11860   ol_cv_pthread_kthread=no
11861 fi
11862 rm -f conftest*
11863 else
11864   cat > conftest.$ac_ext <<EOF
11865 #line 11866 "configure"
11866 #include "confdefs.h"
11867 /* pthread test headers */
11868 #include <pthread.h>
11869 #if HAVE_PTHREADS < 7
11870 #include <errno.h>
11871 #endif
11872 #ifndef NULL
11873 #define NULL (void*)0
11874 #endif
11875
11876 static void *task(p)
11877         void *p;
11878 {
11879         return (void *) (p == NULL);
11880 }
11881
11882
11883 int main(argc, argv)
11884         int argc;
11885         char **argv;
11886 {
11887
11888         /* pthread test function */
11889 #ifndef PTHREAD_CREATE_DETACHED
11890 #define PTHREAD_CREATE_DETACHED 1
11891 #endif
11892         pthread_t t;
11893         int status;
11894         int detach = PTHREAD_CREATE_DETACHED;
11895
11896 #if HAVE_PTHREADS > 4
11897         /* Final pthreads */
11898         pthread_attr_t attr;
11899
11900         status = pthread_attr_init(&attr);
11901         if( status ) return status;
11902
11903 #if HAVE_PTHREADS < 7
11904         status = pthread_attr_setdetachstate(&attr, &detach);
11905         if( status < 0 ) status = errno;
11906 #else
11907         status = pthread_attr_setdetachstate(&attr, detach);
11908 #endif
11909         if( status ) return status;
11910         status = pthread_create( &t, &attr, task, NULL );
11911 #if HAVE_PTHREADS < 7
11912         if( status < 0 ) status = errno;
11913 #endif
11914         if( status ) return status;
11915 #else
11916         /* Draft 4 pthreads */
11917         status = pthread_create( &t, pthread_attr_default, task, NULL );
11918         if( status ) return errno;
11919
11920         /* give thread a chance to complete */
11921         /* it should remain joinable and hence detachable */
11922         sleep( 1 );
11923
11924         status = pthread_detach( &t );
11925         if( status ) return errno;
11926 #endif
11927
11928 #ifdef HAVE_LINUX_THREADS
11929         pthread_kill_other_threads_np();
11930 #endif
11931
11932         return 0;
11933
11934 }
11935
11936 EOF
11937 if { (eval echo configure:11938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11938 then
11939   ol_cv_pthread_kthread=yes
11940 else
11941   echo "configure: failed program was:" >&5
11942   cat conftest.$ac_ext >&5
11943   rm -fr conftest*
11944   ol_cv_pthread_kthread=no
11945 fi
11946 rm -fr conftest*
11947 fi
11948
11949
11950                 # restore the LIBS
11951                 LIBS="$ol_LIBS"
11952         
11953 fi
11954
11955 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11956
11957         if test $ol_cv_pthread_kthread = yes ; then
11958                 ol_link_pthreads="-kthread"
11959                 ol_link_threads=posix
11960         fi
11961 fi
11962
11963                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11964 if test "$ol_link_threads" = no ; then
11965         # try -pthread
11966         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11967 echo "configure:11968: checking for pthread link with -pthread" >&5
11968 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11969   echo $ac_n "(cached) $ac_c" 1>&6
11970 else
11971   
11972                 # save the flags
11973                 ol_LIBS="$LIBS"
11974                 LIBS="-pthread $LIBS"
11975
11976                 if test "$cross_compiling" = yes; then
11977   cat > conftest.$ac_ext <<EOF
11978 #line 11979 "configure"
11979 #include "confdefs.h"
11980 /* pthread test headers */
11981 #include <pthread.h>
11982 #if HAVE_PTHREADS < 7
11983 #include <errno.h>
11984 #endif
11985 #ifndef NULL
11986 #define NULL (void*)0
11987 #endif
11988
11989 static void *task(p)
11990         void *p;
11991 {
11992         return (void *) (p == NULL);
11993 }
11994
11995 int main() {
11996
11997         /* pthread test function */
11998 #ifndef PTHREAD_CREATE_DETACHED
11999 #define PTHREAD_CREATE_DETACHED 1
12000 #endif
12001         pthread_t t;
12002         int status;
12003         int detach = PTHREAD_CREATE_DETACHED;
12004
12005 #if HAVE_PTHREADS > 4
12006         /* Final pthreads */
12007         pthread_attr_t attr;
12008
12009         status = pthread_attr_init(&attr);
12010         if( status ) return status;
12011
12012 #if HAVE_PTHREADS < 7
12013         status = pthread_attr_setdetachstate(&attr, &detach);
12014         if( status < 0 ) status = errno;
12015 #else
12016         status = pthread_attr_setdetachstate(&attr, detach);
12017 #endif
12018         if( status ) return status;
12019         status = pthread_create( &t, &attr, task, NULL );
12020 #if HAVE_PTHREADS < 7
12021         if( status < 0 ) status = errno;
12022 #endif
12023         if( status ) return status;
12024 #else
12025         /* Draft 4 pthreads */
12026         status = pthread_create( &t, pthread_attr_default, task, NULL );
12027         if( status ) return errno;
12028
12029         /* give thread a chance to complete */
12030         /* it should remain joinable and hence detachable */
12031         sleep( 1 );
12032
12033         status = pthread_detach( &t );
12034         if( status ) return errno;
12035 #endif
12036
12037 #ifdef HAVE_LINUX_THREADS
12038         pthread_kill_other_threads_np();
12039 #endif
12040
12041         return 0;
12042
12043 ; return 0; }
12044 EOF
12045 if { (eval echo configure:12046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12046   rm -rf conftest*
12047   ol_cv_pthread_pthread=yes
12048 else
12049   echo "configure: failed program was:" >&5
12050   cat conftest.$ac_ext >&5
12051   rm -rf conftest*
12052   ol_cv_pthread_pthread=no
12053 fi
12054 rm -f conftest*
12055 else
12056   cat > conftest.$ac_ext <<EOF
12057 #line 12058 "configure"
12058 #include "confdefs.h"
12059 /* pthread test headers */
12060 #include <pthread.h>
12061 #if HAVE_PTHREADS < 7
12062 #include <errno.h>
12063 #endif
12064 #ifndef NULL
12065 #define NULL (void*)0
12066 #endif
12067
12068 static void *task(p)
12069         void *p;
12070 {
12071         return (void *) (p == NULL);
12072 }
12073
12074
12075 int main(argc, argv)
12076         int argc;
12077         char **argv;
12078 {
12079
12080         /* pthread test function */
12081 #ifndef PTHREAD_CREATE_DETACHED
12082 #define PTHREAD_CREATE_DETACHED 1
12083 #endif
12084         pthread_t t;
12085         int status;
12086         int detach = PTHREAD_CREATE_DETACHED;
12087
12088 #if HAVE_PTHREADS > 4
12089         /* Final pthreads */
12090         pthread_attr_t attr;
12091
12092         status = pthread_attr_init(&attr);
12093         if( status ) return status;
12094
12095 #if HAVE_PTHREADS < 7
12096         status = pthread_attr_setdetachstate(&attr, &detach);
12097         if( status < 0 ) status = errno;
12098 #else
12099         status = pthread_attr_setdetachstate(&attr, detach);
12100 #endif
12101         if( status ) return status;
12102         status = pthread_create( &t, &attr, task, NULL );
12103 #if HAVE_PTHREADS < 7
12104         if( status < 0 ) status = errno;
12105 #endif
12106         if( status ) return status;
12107 #else
12108         /* Draft 4 pthreads */
12109         status = pthread_create( &t, pthread_attr_default, task, NULL );
12110         if( status ) return errno;
12111
12112         /* give thread a chance to complete */
12113         /* it should remain joinable and hence detachable */
12114         sleep( 1 );
12115
12116         status = pthread_detach( &t );
12117         if( status ) return errno;
12118 #endif
12119
12120 #ifdef HAVE_LINUX_THREADS
12121         pthread_kill_other_threads_np();
12122 #endif
12123
12124         return 0;
12125
12126 }
12127
12128 EOF
12129 if { (eval echo configure:12130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12130 then
12131   ol_cv_pthread_pthread=yes
12132 else
12133   echo "configure: failed program was:" >&5
12134   cat conftest.$ac_ext >&5
12135   rm -fr conftest*
12136   ol_cv_pthread_pthread=no
12137 fi
12138 rm -fr conftest*
12139 fi
12140
12141
12142                 # restore the LIBS
12143                 LIBS="$ol_LIBS"
12144         
12145 fi
12146
12147 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12148
12149         if test $ol_cv_pthread_pthread = yes ; then
12150                 ol_link_pthreads="-pthread"
12151                 ol_link_threads=posix
12152         fi
12153 fi
12154
12155                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12156 if test "$ol_link_threads" = no ; then
12157         # try -pthreads
12158         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12159 echo "configure:12160: checking for pthread link with -pthreads" >&5
12160 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12161   echo $ac_n "(cached) $ac_c" 1>&6
12162 else
12163   
12164                 # save the flags
12165                 ol_LIBS="$LIBS"
12166                 LIBS="-pthreads $LIBS"
12167
12168                 if test "$cross_compiling" = yes; then
12169   cat > conftest.$ac_ext <<EOF
12170 #line 12171 "configure"
12171 #include "confdefs.h"
12172 /* pthread test headers */
12173 #include <pthread.h>
12174 #if HAVE_PTHREADS < 7
12175 #include <errno.h>
12176 #endif
12177 #ifndef NULL
12178 #define NULL (void*)0
12179 #endif
12180
12181 static void *task(p)
12182         void *p;
12183 {
12184         return (void *) (p == NULL);
12185 }
12186
12187 int main() {
12188
12189         /* pthread test function */
12190 #ifndef PTHREAD_CREATE_DETACHED
12191 #define PTHREAD_CREATE_DETACHED 1
12192 #endif
12193         pthread_t t;
12194         int status;
12195         int detach = PTHREAD_CREATE_DETACHED;
12196
12197 #if HAVE_PTHREADS > 4
12198         /* Final pthreads */
12199         pthread_attr_t attr;
12200
12201         status = pthread_attr_init(&attr);
12202         if( status ) return status;
12203
12204 #if HAVE_PTHREADS < 7
12205         status = pthread_attr_setdetachstate(&attr, &detach);
12206         if( status < 0 ) status = errno;
12207 #else
12208         status = pthread_attr_setdetachstate(&attr, detach);
12209 #endif
12210         if( status ) return status;
12211         status = pthread_create( &t, &attr, task, NULL );
12212 #if HAVE_PTHREADS < 7
12213         if( status < 0 ) status = errno;
12214 #endif
12215         if( status ) return status;
12216 #else
12217         /* Draft 4 pthreads */
12218         status = pthread_create( &t, pthread_attr_default, task, NULL );
12219         if( status ) return errno;
12220
12221         /* give thread a chance to complete */
12222         /* it should remain joinable and hence detachable */
12223         sleep( 1 );
12224
12225         status = pthread_detach( &t );
12226         if( status ) return errno;
12227 #endif
12228
12229 #ifdef HAVE_LINUX_THREADS
12230         pthread_kill_other_threads_np();
12231 #endif
12232
12233         return 0;
12234
12235 ; return 0; }
12236 EOF
12237 if { (eval echo configure:12238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12238   rm -rf conftest*
12239   ol_cv_pthread_pthreads=yes
12240 else
12241   echo "configure: failed program was:" >&5
12242   cat conftest.$ac_ext >&5
12243   rm -rf conftest*
12244   ol_cv_pthread_pthreads=no
12245 fi
12246 rm -f conftest*
12247 else
12248   cat > conftest.$ac_ext <<EOF
12249 #line 12250 "configure"
12250 #include "confdefs.h"
12251 /* pthread test headers */
12252 #include <pthread.h>
12253 #if HAVE_PTHREADS < 7
12254 #include <errno.h>
12255 #endif
12256 #ifndef NULL
12257 #define NULL (void*)0
12258 #endif
12259
12260 static void *task(p)
12261         void *p;
12262 {
12263         return (void *) (p == NULL);
12264 }
12265
12266
12267 int main(argc, argv)
12268         int argc;
12269         char **argv;
12270 {
12271
12272         /* pthread test function */
12273 #ifndef PTHREAD_CREATE_DETACHED
12274 #define PTHREAD_CREATE_DETACHED 1
12275 #endif
12276         pthread_t t;
12277         int status;
12278         int detach = PTHREAD_CREATE_DETACHED;
12279
12280 #if HAVE_PTHREADS > 4
12281         /* Final pthreads */
12282         pthread_attr_t attr;
12283
12284         status = pthread_attr_init(&attr);
12285         if( status ) return status;
12286
12287 #if HAVE_PTHREADS < 7
12288         status = pthread_attr_setdetachstate(&attr, &detach);
12289         if( status < 0 ) status = errno;
12290 #else
12291         status = pthread_attr_setdetachstate(&attr, detach);
12292 #endif
12293         if( status ) return status;
12294         status = pthread_create( &t, &attr, task, NULL );
12295 #if HAVE_PTHREADS < 7
12296         if( status < 0 ) status = errno;
12297 #endif
12298         if( status ) return status;
12299 #else
12300         /* Draft 4 pthreads */
12301         status = pthread_create( &t, pthread_attr_default, task, NULL );
12302         if( status ) return errno;
12303
12304         /* give thread a chance to complete */
12305         /* it should remain joinable and hence detachable */
12306         sleep( 1 );
12307
12308         status = pthread_detach( &t );
12309         if( status ) return errno;
12310 #endif
12311
12312 #ifdef HAVE_LINUX_THREADS
12313         pthread_kill_other_threads_np();
12314 #endif
12315
12316         return 0;
12317
12318 }
12319
12320 EOF
12321 if { (eval echo configure:12322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12322 then
12323   ol_cv_pthread_pthreads=yes
12324 else
12325   echo "configure: failed program was:" >&5
12326   cat conftest.$ac_ext >&5
12327   rm -fr conftest*
12328   ol_cv_pthread_pthreads=no
12329 fi
12330 rm -fr conftest*
12331 fi
12332
12333
12334                 # restore the LIBS
12335                 LIBS="$ol_LIBS"
12336         
12337 fi
12338
12339 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12340
12341         if test $ol_cv_pthread_pthreads = yes ; then
12342                 ol_link_pthreads="-pthreads"
12343                 ol_link_threads=posix
12344         fi
12345 fi
12346
12347                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12348 if test "$ol_link_threads" = no ; then
12349         # try -mthreads
12350         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12351 echo "configure:12352: checking for pthread link with -mthreads" >&5
12352 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12353   echo $ac_n "(cached) $ac_c" 1>&6
12354 else
12355   
12356                 # save the flags
12357                 ol_LIBS="$LIBS"
12358                 LIBS="-mthreads $LIBS"
12359
12360                 if test "$cross_compiling" = yes; then
12361   cat > conftest.$ac_ext <<EOF
12362 #line 12363 "configure"
12363 #include "confdefs.h"
12364 /* pthread test headers */
12365 #include <pthread.h>
12366 #if HAVE_PTHREADS < 7
12367 #include <errno.h>
12368 #endif
12369 #ifndef NULL
12370 #define NULL (void*)0
12371 #endif
12372
12373 static void *task(p)
12374         void *p;
12375 {
12376         return (void *) (p == NULL);
12377 }
12378
12379 int main() {
12380
12381         /* pthread test function */
12382 #ifndef PTHREAD_CREATE_DETACHED
12383 #define PTHREAD_CREATE_DETACHED 1
12384 #endif
12385         pthread_t t;
12386         int status;
12387         int detach = PTHREAD_CREATE_DETACHED;
12388
12389 #if HAVE_PTHREADS > 4
12390         /* Final pthreads */
12391         pthread_attr_t attr;
12392
12393         status = pthread_attr_init(&attr);
12394         if( status ) return status;
12395
12396 #if HAVE_PTHREADS < 7
12397         status = pthread_attr_setdetachstate(&attr, &detach);
12398         if( status < 0 ) status = errno;
12399 #else
12400         status = pthread_attr_setdetachstate(&attr, detach);
12401 #endif
12402         if( status ) return status;
12403         status = pthread_create( &t, &attr, task, NULL );
12404 #if HAVE_PTHREADS < 7
12405         if( status < 0 ) status = errno;
12406 #endif
12407         if( status ) return status;
12408 #else
12409         /* Draft 4 pthreads */
12410         status = pthread_create( &t, pthread_attr_default, task, NULL );
12411         if( status ) return errno;
12412
12413         /* give thread a chance to complete */
12414         /* it should remain joinable and hence detachable */
12415         sleep( 1 );
12416
12417         status = pthread_detach( &t );
12418         if( status ) return errno;
12419 #endif
12420
12421 #ifdef HAVE_LINUX_THREADS
12422         pthread_kill_other_threads_np();
12423 #endif
12424
12425         return 0;
12426
12427 ; return 0; }
12428 EOF
12429 if { (eval echo configure:12430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12430   rm -rf conftest*
12431   ol_cv_pthread_mthreads=yes
12432 else
12433   echo "configure: failed program was:" >&5
12434   cat conftest.$ac_ext >&5
12435   rm -rf conftest*
12436   ol_cv_pthread_mthreads=no
12437 fi
12438 rm -f conftest*
12439 else
12440   cat > conftest.$ac_ext <<EOF
12441 #line 12442 "configure"
12442 #include "confdefs.h"
12443 /* pthread test headers */
12444 #include <pthread.h>
12445 #if HAVE_PTHREADS < 7
12446 #include <errno.h>
12447 #endif
12448 #ifndef NULL
12449 #define NULL (void*)0
12450 #endif
12451
12452 static void *task(p)
12453         void *p;
12454 {
12455         return (void *) (p == NULL);
12456 }
12457
12458
12459 int main(argc, argv)
12460         int argc;
12461         char **argv;
12462 {
12463
12464         /* pthread test function */
12465 #ifndef PTHREAD_CREATE_DETACHED
12466 #define PTHREAD_CREATE_DETACHED 1
12467 #endif
12468         pthread_t t;
12469         int status;
12470         int detach = PTHREAD_CREATE_DETACHED;
12471
12472 #if HAVE_PTHREADS > 4
12473         /* Final pthreads */
12474         pthread_attr_t attr;
12475
12476         status = pthread_attr_init(&attr);
12477         if( status ) return status;
12478
12479 #if HAVE_PTHREADS < 7
12480         status = pthread_attr_setdetachstate(&attr, &detach);
12481         if( status < 0 ) status = errno;
12482 #else
12483         status = pthread_attr_setdetachstate(&attr, detach);
12484 #endif
12485         if( status ) return status;
12486         status = pthread_create( &t, &attr, task, NULL );
12487 #if HAVE_PTHREADS < 7
12488         if( status < 0 ) status = errno;
12489 #endif
12490         if( status ) return status;
12491 #else
12492         /* Draft 4 pthreads */
12493         status = pthread_create( &t, pthread_attr_default, task, NULL );
12494         if( status ) return errno;
12495
12496         /* give thread a chance to complete */
12497         /* it should remain joinable and hence detachable */
12498         sleep( 1 );
12499
12500         status = pthread_detach( &t );
12501         if( status ) return errno;
12502 #endif
12503
12504 #ifdef HAVE_LINUX_THREADS
12505         pthread_kill_other_threads_np();
12506 #endif
12507
12508         return 0;
12509
12510 }
12511
12512 EOF
12513 if { (eval echo configure:12514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12514 then
12515   ol_cv_pthread_mthreads=yes
12516 else
12517   echo "configure: failed program was:" >&5
12518   cat conftest.$ac_ext >&5
12519   rm -fr conftest*
12520   ol_cv_pthread_mthreads=no
12521 fi
12522 rm -fr conftest*
12523 fi
12524
12525
12526                 # restore the LIBS
12527                 LIBS="$ol_LIBS"
12528         
12529 fi
12530
12531 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12532
12533         if test $ol_cv_pthread_mthreads = yes ; then
12534                 ol_link_pthreads="-mthreads"
12535                 ol_link_threads=posix
12536         fi
12537 fi
12538
12539                 # Pthread try link: -thread (ol_cv_pthread_thread)
12540 if test "$ol_link_threads" = no ; then
12541         # try -thread
12542         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12543 echo "configure:12544: checking for pthread link with -thread" >&5
12544 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12545   echo $ac_n "(cached) $ac_c" 1>&6
12546 else
12547   
12548                 # save the flags
12549                 ol_LIBS="$LIBS"
12550                 LIBS="-thread $LIBS"
12551
12552                 if test "$cross_compiling" = yes; then
12553   cat > conftest.$ac_ext <<EOF
12554 #line 12555 "configure"
12555 #include "confdefs.h"
12556 /* pthread test headers */
12557 #include <pthread.h>
12558 #if HAVE_PTHREADS < 7
12559 #include <errno.h>
12560 #endif
12561 #ifndef NULL
12562 #define NULL (void*)0
12563 #endif
12564
12565 static void *task(p)
12566         void *p;
12567 {
12568         return (void *) (p == NULL);
12569 }
12570
12571 int main() {
12572
12573         /* pthread test function */
12574 #ifndef PTHREAD_CREATE_DETACHED
12575 #define PTHREAD_CREATE_DETACHED 1
12576 #endif
12577         pthread_t t;
12578         int status;
12579         int detach = PTHREAD_CREATE_DETACHED;
12580
12581 #if HAVE_PTHREADS > 4
12582         /* Final pthreads */
12583         pthread_attr_t attr;
12584
12585         status = pthread_attr_init(&attr);
12586         if( status ) return status;
12587
12588 #if HAVE_PTHREADS < 7
12589         status = pthread_attr_setdetachstate(&attr, &detach);
12590         if( status < 0 ) status = errno;
12591 #else
12592         status = pthread_attr_setdetachstate(&attr, detach);
12593 #endif
12594         if( status ) return status;
12595         status = pthread_create( &t, &attr, task, NULL );
12596 #if HAVE_PTHREADS < 7
12597         if( status < 0 ) status = errno;
12598 #endif
12599         if( status ) return status;
12600 #else
12601         /* Draft 4 pthreads */
12602         status = pthread_create( &t, pthread_attr_default, task, NULL );
12603         if( status ) return errno;
12604
12605         /* give thread a chance to complete */
12606         /* it should remain joinable and hence detachable */
12607         sleep( 1 );
12608
12609         status = pthread_detach( &t );
12610         if( status ) return errno;
12611 #endif
12612
12613 #ifdef HAVE_LINUX_THREADS
12614         pthread_kill_other_threads_np();
12615 #endif
12616
12617         return 0;
12618
12619 ; return 0; }
12620 EOF
12621 if { (eval echo configure:12622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12622   rm -rf conftest*
12623   ol_cv_pthread_thread=yes
12624 else
12625   echo "configure: failed program was:" >&5
12626   cat conftest.$ac_ext >&5
12627   rm -rf conftest*
12628   ol_cv_pthread_thread=no
12629 fi
12630 rm -f conftest*
12631 else
12632   cat > conftest.$ac_ext <<EOF
12633 #line 12634 "configure"
12634 #include "confdefs.h"
12635 /* pthread test headers */
12636 #include <pthread.h>
12637 #if HAVE_PTHREADS < 7
12638 #include <errno.h>
12639 #endif
12640 #ifndef NULL
12641 #define NULL (void*)0
12642 #endif
12643
12644 static void *task(p)
12645         void *p;
12646 {
12647         return (void *) (p == NULL);
12648 }
12649
12650
12651 int main(argc, argv)
12652         int argc;
12653         char **argv;
12654 {
12655
12656         /* pthread test function */
12657 #ifndef PTHREAD_CREATE_DETACHED
12658 #define PTHREAD_CREATE_DETACHED 1
12659 #endif
12660         pthread_t t;
12661         int status;
12662         int detach = PTHREAD_CREATE_DETACHED;
12663
12664 #if HAVE_PTHREADS > 4
12665         /* Final pthreads */
12666         pthread_attr_t attr;
12667
12668         status = pthread_attr_init(&attr);
12669         if( status ) return status;
12670
12671 #if HAVE_PTHREADS < 7
12672         status = pthread_attr_setdetachstate(&attr, &detach);
12673         if( status < 0 ) status = errno;
12674 #else
12675         status = pthread_attr_setdetachstate(&attr, detach);
12676 #endif
12677         if( status ) return status;
12678         status = pthread_create( &t, &attr, task, NULL );
12679 #if HAVE_PTHREADS < 7
12680         if( status < 0 ) status = errno;
12681 #endif
12682         if( status ) return status;
12683 #else
12684         /* Draft 4 pthreads */
12685         status = pthread_create( &t, pthread_attr_default, task, NULL );
12686         if( status ) return errno;
12687
12688         /* give thread a chance to complete */
12689         /* it should remain joinable and hence detachable */
12690         sleep( 1 );
12691
12692         status = pthread_detach( &t );
12693         if( status ) return errno;
12694 #endif
12695
12696 #ifdef HAVE_LINUX_THREADS
12697         pthread_kill_other_threads_np();
12698 #endif
12699
12700         return 0;
12701
12702 }
12703
12704 EOF
12705 if { (eval echo configure:12706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12706 then
12707   ol_cv_pthread_thread=yes
12708 else
12709   echo "configure: failed program was:" >&5
12710   cat conftest.$ac_ext >&5
12711   rm -fr conftest*
12712   ol_cv_pthread_thread=no
12713 fi
12714 rm -fr conftest*
12715 fi
12716
12717
12718                 # restore the LIBS
12719                 LIBS="$ol_LIBS"
12720         
12721 fi
12722
12723 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12724
12725         if test $ol_cv_pthread_thread = yes ; then
12726                 ol_link_pthreads="-thread"
12727                 ol_link_threads=posix
12728         fi
12729 fi
12730
12731
12732                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12733 if test "$ol_link_threads" = no ; then
12734         # try -lpthread -lmach -lexc -lc_r
12735         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12736 echo "configure:12737: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12737 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12738   echo $ac_n "(cached) $ac_c" 1>&6
12739 else
12740   
12741                 # save the flags
12742                 ol_LIBS="$LIBS"
12743                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12744
12745                 if test "$cross_compiling" = yes; then
12746   cat > conftest.$ac_ext <<EOF
12747 #line 12748 "configure"
12748 #include "confdefs.h"
12749 /* pthread test headers */
12750 #include <pthread.h>
12751 #if HAVE_PTHREADS < 7
12752 #include <errno.h>
12753 #endif
12754 #ifndef NULL
12755 #define NULL (void*)0
12756 #endif
12757
12758 static void *task(p)
12759         void *p;
12760 {
12761         return (void *) (p == NULL);
12762 }
12763
12764 int main() {
12765
12766         /* pthread test function */
12767 #ifndef PTHREAD_CREATE_DETACHED
12768 #define PTHREAD_CREATE_DETACHED 1
12769 #endif
12770         pthread_t t;
12771         int status;
12772         int detach = PTHREAD_CREATE_DETACHED;
12773
12774 #if HAVE_PTHREADS > 4
12775         /* Final pthreads */
12776         pthread_attr_t attr;
12777
12778         status = pthread_attr_init(&attr);
12779         if( status ) return status;
12780
12781 #if HAVE_PTHREADS < 7
12782         status = pthread_attr_setdetachstate(&attr, &detach);
12783         if( status < 0 ) status = errno;
12784 #else
12785         status = pthread_attr_setdetachstate(&attr, detach);
12786 #endif
12787         if( status ) return status;
12788         status = pthread_create( &t, &attr, task, NULL );
12789 #if HAVE_PTHREADS < 7
12790         if( status < 0 ) status = errno;
12791 #endif
12792         if( status ) return status;
12793 #else
12794         /* Draft 4 pthreads */
12795         status = pthread_create( &t, pthread_attr_default, task, NULL );
12796         if( status ) return errno;
12797
12798         /* give thread a chance to complete */
12799         /* it should remain joinable and hence detachable */
12800         sleep( 1 );
12801
12802         status = pthread_detach( &t );
12803         if( status ) return errno;
12804 #endif
12805
12806 #ifdef HAVE_LINUX_THREADS
12807         pthread_kill_other_threads_np();
12808 #endif
12809
12810         return 0;
12811
12812 ; return 0; }
12813 EOF
12814 if { (eval echo configure:12815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12815   rm -rf conftest*
12816   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12817 else
12818   echo "configure: failed program was:" >&5
12819   cat conftest.$ac_ext >&5
12820   rm -rf conftest*
12821   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12822 fi
12823 rm -f conftest*
12824 else
12825   cat > conftest.$ac_ext <<EOF
12826 #line 12827 "configure"
12827 #include "confdefs.h"
12828 /* pthread test headers */
12829 #include <pthread.h>
12830 #if HAVE_PTHREADS < 7
12831 #include <errno.h>
12832 #endif
12833 #ifndef NULL
12834 #define NULL (void*)0
12835 #endif
12836
12837 static void *task(p)
12838         void *p;
12839 {
12840         return (void *) (p == NULL);
12841 }
12842
12843
12844 int main(argc, argv)
12845         int argc;
12846         char **argv;
12847 {
12848
12849         /* pthread test function */
12850 #ifndef PTHREAD_CREATE_DETACHED
12851 #define PTHREAD_CREATE_DETACHED 1
12852 #endif
12853         pthread_t t;
12854         int status;
12855         int detach = PTHREAD_CREATE_DETACHED;
12856
12857 #if HAVE_PTHREADS > 4
12858         /* Final pthreads */
12859         pthread_attr_t attr;
12860
12861         status = pthread_attr_init(&attr);
12862         if( status ) return status;
12863
12864 #if HAVE_PTHREADS < 7
12865         status = pthread_attr_setdetachstate(&attr, &detach);
12866         if( status < 0 ) status = errno;
12867 #else
12868         status = pthread_attr_setdetachstate(&attr, detach);
12869 #endif
12870         if( status ) return status;
12871         status = pthread_create( &t, &attr, task, NULL );
12872 #if HAVE_PTHREADS < 7
12873         if( status < 0 ) status = errno;
12874 #endif
12875         if( status ) return status;
12876 #else
12877         /* Draft 4 pthreads */
12878         status = pthread_create( &t, pthread_attr_default, task, NULL );
12879         if( status ) return errno;
12880
12881         /* give thread a chance to complete */
12882         /* it should remain joinable and hence detachable */
12883         sleep( 1 );
12884
12885         status = pthread_detach( &t );
12886         if( status ) return errno;
12887 #endif
12888
12889 #ifdef HAVE_LINUX_THREADS
12890         pthread_kill_other_threads_np();
12891 #endif
12892
12893         return 0;
12894
12895 }
12896
12897 EOF
12898 if { (eval echo configure:12899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12899 then
12900   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12901 else
12902   echo "configure: failed program was:" >&5
12903   cat conftest.$ac_ext >&5
12904   rm -fr conftest*
12905   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12906 fi
12907 rm -fr conftest*
12908 fi
12909
12910
12911                 # restore the LIBS
12912                 LIBS="$ol_LIBS"
12913         
12914 fi
12915
12916 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12917
12918         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12919                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12920                 ol_link_threads=posix
12921         fi
12922 fi
12923
12924                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12925 if test "$ol_link_threads" = no ; then
12926         # try -lpthread -lmach -lexc
12927         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12928 echo "configure:12929: checking for pthread link with -lpthread -lmach -lexc" >&5
12929 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12930   echo $ac_n "(cached) $ac_c" 1>&6
12931 else
12932   
12933                 # save the flags
12934                 ol_LIBS="$LIBS"
12935                 LIBS="-lpthread -lmach -lexc $LIBS"
12936
12937                 if test "$cross_compiling" = yes; then
12938   cat > conftest.$ac_ext <<EOF
12939 #line 12940 "configure"
12940 #include "confdefs.h"
12941 /* pthread test headers */
12942 #include <pthread.h>
12943 #if HAVE_PTHREADS < 7
12944 #include <errno.h>
12945 #endif
12946 #ifndef NULL
12947 #define NULL (void*)0
12948 #endif
12949
12950 static void *task(p)
12951         void *p;
12952 {
12953         return (void *) (p == NULL);
12954 }
12955
12956 int main() {
12957
12958         /* pthread test function */
12959 #ifndef PTHREAD_CREATE_DETACHED
12960 #define PTHREAD_CREATE_DETACHED 1
12961 #endif
12962         pthread_t t;
12963         int status;
12964         int detach = PTHREAD_CREATE_DETACHED;
12965
12966 #if HAVE_PTHREADS > 4
12967         /* Final pthreads */
12968         pthread_attr_t attr;
12969
12970         status = pthread_attr_init(&attr);
12971         if( status ) return status;
12972
12973 #if HAVE_PTHREADS < 7
12974         status = pthread_attr_setdetachstate(&attr, &detach);
12975         if( status < 0 ) status = errno;
12976 #else
12977         status = pthread_attr_setdetachstate(&attr, detach);
12978 #endif
12979         if( status ) return status;
12980         status = pthread_create( &t, &attr, task, NULL );
12981 #if HAVE_PTHREADS < 7
12982         if( status < 0 ) status = errno;
12983 #endif
12984         if( status ) return status;
12985 #else
12986         /* Draft 4 pthreads */
12987         status = pthread_create( &t, pthread_attr_default, task, NULL );
12988         if( status ) return errno;
12989
12990         /* give thread a chance to complete */
12991         /* it should remain joinable and hence detachable */
12992         sleep( 1 );
12993
12994         status = pthread_detach( &t );
12995         if( status ) return errno;
12996 #endif
12997
12998 #ifdef HAVE_LINUX_THREADS
12999         pthread_kill_other_threads_np();
13000 #endif
13001
13002         return 0;
13003
13004 ; return 0; }
13005 EOF
13006 if { (eval echo configure:13007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13007   rm -rf conftest*
13008   ol_cv_pthread_lpthread_lmach_lexc=yes
13009 else
13010   echo "configure: failed program was:" >&5
13011   cat conftest.$ac_ext >&5
13012   rm -rf conftest*
13013   ol_cv_pthread_lpthread_lmach_lexc=no
13014 fi
13015 rm -f conftest*
13016 else
13017   cat > conftest.$ac_ext <<EOF
13018 #line 13019 "configure"
13019 #include "confdefs.h"
13020 /* pthread test headers */
13021 #include <pthread.h>
13022 #if HAVE_PTHREADS < 7
13023 #include <errno.h>
13024 #endif
13025 #ifndef NULL
13026 #define NULL (void*)0
13027 #endif
13028
13029 static void *task(p)
13030         void *p;
13031 {
13032         return (void *) (p == NULL);
13033 }
13034
13035
13036 int main(argc, argv)
13037         int argc;
13038         char **argv;
13039 {
13040
13041         /* pthread test function */
13042 #ifndef PTHREAD_CREATE_DETACHED
13043 #define PTHREAD_CREATE_DETACHED 1
13044 #endif
13045         pthread_t t;
13046         int status;
13047         int detach = PTHREAD_CREATE_DETACHED;
13048
13049 #if HAVE_PTHREADS > 4
13050         /* Final pthreads */
13051         pthread_attr_t attr;
13052
13053         status = pthread_attr_init(&attr);
13054         if( status ) return status;
13055
13056 #if HAVE_PTHREADS < 7
13057         status = pthread_attr_setdetachstate(&attr, &detach);
13058         if( status < 0 ) status = errno;
13059 #else
13060         status = pthread_attr_setdetachstate(&attr, detach);
13061 #endif
13062         if( status ) return status;
13063         status = pthread_create( &t, &attr, task, NULL );
13064 #if HAVE_PTHREADS < 7
13065         if( status < 0 ) status = errno;
13066 #endif
13067         if( status ) return status;
13068 #else
13069         /* Draft 4 pthreads */
13070         status = pthread_create( &t, pthread_attr_default, task, NULL );
13071         if( status ) return errno;
13072
13073         /* give thread a chance to complete */
13074         /* it should remain joinable and hence detachable */
13075         sleep( 1 );
13076
13077         status = pthread_detach( &t );
13078         if( status ) return errno;
13079 #endif
13080
13081 #ifdef HAVE_LINUX_THREADS
13082         pthread_kill_other_threads_np();
13083 #endif
13084
13085         return 0;
13086
13087 }
13088
13089 EOF
13090 if { (eval echo configure:13091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13091 then
13092   ol_cv_pthread_lpthread_lmach_lexc=yes
13093 else
13094   echo "configure: failed program was:" >&5
13095   cat conftest.$ac_ext >&5
13096   rm -fr conftest*
13097   ol_cv_pthread_lpthread_lmach_lexc=no
13098 fi
13099 rm -fr conftest*
13100 fi
13101
13102
13103                 # restore the LIBS
13104                 LIBS="$ol_LIBS"
13105         
13106 fi
13107
13108 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13109
13110         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13111                 ol_link_pthreads="-lpthread -lmach -lexc"
13112                 ol_link_threads=posix
13113         fi
13114 fi
13115
13116
13117                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13118 if test "$ol_link_threads" = no ; then
13119         # try -lpthread -Wl,-woff,85
13120         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13121 echo "configure:13122: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13122 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13123   echo $ac_n "(cached) $ac_c" 1>&6
13124 else
13125   
13126                 # save the flags
13127                 ol_LIBS="$LIBS"
13128                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13129
13130                 if test "$cross_compiling" = yes; then
13131   cat > conftest.$ac_ext <<EOF
13132 #line 13133 "configure"
13133 #include "confdefs.h"
13134 /* pthread test headers */
13135 #include <pthread.h>
13136 #if HAVE_PTHREADS < 7
13137 #include <errno.h>
13138 #endif
13139 #ifndef NULL
13140 #define NULL (void*)0
13141 #endif
13142
13143 static void *task(p)
13144         void *p;
13145 {
13146         return (void *) (p == NULL);
13147 }
13148
13149 int main() {
13150
13151         /* pthread test function */
13152 #ifndef PTHREAD_CREATE_DETACHED
13153 #define PTHREAD_CREATE_DETACHED 1
13154 #endif
13155         pthread_t t;
13156         int status;
13157         int detach = PTHREAD_CREATE_DETACHED;
13158
13159 #if HAVE_PTHREADS > 4
13160         /* Final pthreads */
13161         pthread_attr_t attr;
13162
13163         status = pthread_attr_init(&attr);
13164         if( status ) return status;
13165
13166 #if HAVE_PTHREADS < 7
13167         status = pthread_attr_setdetachstate(&attr, &detach);
13168         if( status < 0 ) status = errno;
13169 #else
13170         status = pthread_attr_setdetachstate(&attr, detach);
13171 #endif
13172         if( status ) return status;
13173         status = pthread_create( &t, &attr, task, NULL );
13174 #if HAVE_PTHREADS < 7
13175         if( status < 0 ) status = errno;
13176 #endif
13177         if( status ) return status;
13178 #else
13179         /* Draft 4 pthreads */
13180         status = pthread_create( &t, pthread_attr_default, task, NULL );
13181         if( status ) return errno;
13182
13183         /* give thread a chance to complete */
13184         /* it should remain joinable and hence detachable */
13185         sleep( 1 );
13186
13187         status = pthread_detach( &t );
13188         if( status ) return errno;
13189 #endif
13190
13191 #ifdef HAVE_LINUX_THREADS
13192         pthread_kill_other_threads_np();
13193 #endif
13194
13195         return 0;
13196
13197 ; return 0; }
13198 EOF
13199 if { (eval echo configure:13200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13200   rm -rf conftest*
13201   ol_cv_pthread_lib_lpthread_woff=yes
13202 else
13203   echo "configure: failed program was:" >&5
13204   cat conftest.$ac_ext >&5
13205   rm -rf conftest*
13206   ol_cv_pthread_lib_lpthread_woff=no
13207 fi
13208 rm -f conftest*
13209 else
13210   cat > conftest.$ac_ext <<EOF
13211 #line 13212 "configure"
13212 #include "confdefs.h"
13213 /* pthread test headers */
13214 #include <pthread.h>
13215 #if HAVE_PTHREADS < 7
13216 #include <errno.h>
13217 #endif
13218 #ifndef NULL
13219 #define NULL (void*)0
13220 #endif
13221
13222 static void *task(p)
13223         void *p;
13224 {
13225         return (void *) (p == NULL);
13226 }
13227
13228
13229 int main(argc, argv)
13230         int argc;
13231         char **argv;
13232 {
13233
13234         /* pthread test function */
13235 #ifndef PTHREAD_CREATE_DETACHED
13236 #define PTHREAD_CREATE_DETACHED 1
13237 #endif
13238         pthread_t t;
13239         int status;
13240         int detach = PTHREAD_CREATE_DETACHED;
13241
13242 #if HAVE_PTHREADS > 4
13243         /* Final pthreads */
13244         pthread_attr_t attr;
13245
13246         status = pthread_attr_init(&attr);
13247         if( status ) return status;
13248
13249 #if HAVE_PTHREADS < 7
13250         status = pthread_attr_setdetachstate(&attr, &detach);
13251         if( status < 0 ) status = errno;
13252 #else
13253         status = pthread_attr_setdetachstate(&attr, detach);
13254 #endif
13255         if( status ) return status;
13256         status = pthread_create( &t, &attr, task, NULL );
13257 #if HAVE_PTHREADS < 7
13258         if( status < 0 ) status = errno;
13259 #endif
13260         if( status ) return status;
13261 #else
13262         /* Draft 4 pthreads */
13263         status = pthread_create( &t, pthread_attr_default, task, NULL );
13264         if( status ) return errno;
13265
13266         /* give thread a chance to complete */
13267         /* it should remain joinable and hence detachable */
13268         sleep( 1 );
13269
13270         status = pthread_detach( &t );
13271         if( status ) return errno;
13272 #endif
13273
13274 #ifdef HAVE_LINUX_THREADS
13275         pthread_kill_other_threads_np();
13276 #endif
13277
13278         return 0;
13279
13280 }
13281
13282 EOF
13283 if { (eval echo configure:13284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13284 then
13285   ol_cv_pthread_lib_lpthread_woff=yes
13286 else
13287   echo "configure: failed program was:" >&5
13288   cat conftest.$ac_ext >&5
13289   rm -fr conftest*
13290   ol_cv_pthread_lib_lpthread_woff=no
13291 fi
13292 rm -fr conftest*
13293 fi
13294
13295
13296                 # restore the LIBS
13297                 LIBS="$ol_LIBS"
13298         
13299 fi
13300
13301 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13302
13303         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13304                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13305                 ol_link_threads=posix
13306         fi
13307 fi
13308
13309
13310                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13311 if test "$ol_link_threads" = no ; then
13312         # try -lpthread
13313         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13314 echo "configure:13315: checking for pthread link with -lpthread" >&5
13315 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13316   echo $ac_n "(cached) $ac_c" 1>&6
13317 else
13318   
13319                 # save the flags
13320                 ol_LIBS="$LIBS"
13321                 LIBS="-lpthread $LIBS"
13322
13323                 if test "$cross_compiling" = yes; then
13324   cat > conftest.$ac_ext <<EOF
13325 #line 13326 "configure"
13326 #include "confdefs.h"
13327 /* pthread test headers */
13328 #include <pthread.h>
13329 #if HAVE_PTHREADS < 7
13330 #include <errno.h>
13331 #endif
13332 #ifndef NULL
13333 #define NULL (void*)0
13334 #endif
13335
13336 static void *task(p)
13337         void *p;
13338 {
13339         return (void *) (p == NULL);
13340 }
13341
13342 int main() {
13343
13344         /* pthread test function */
13345 #ifndef PTHREAD_CREATE_DETACHED
13346 #define PTHREAD_CREATE_DETACHED 1
13347 #endif
13348         pthread_t t;
13349         int status;
13350         int detach = PTHREAD_CREATE_DETACHED;
13351
13352 #if HAVE_PTHREADS > 4
13353         /* Final pthreads */
13354         pthread_attr_t attr;
13355
13356         status = pthread_attr_init(&attr);
13357         if( status ) return status;
13358
13359 #if HAVE_PTHREADS < 7
13360         status = pthread_attr_setdetachstate(&attr, &detach);
13361         if( status < 0 ) status = errno;
13362 #else
13363         status = pthread_attr_setdetachstate(&attr, detach);
13364 #endif
13365         if( status ) return status;
13366         status = pthread_create( &t, &attr, task, NULL );
13367 #if HAVE_PTHREADS < 7
13368         if( status < 0 ) status = errno;
13369 #endif
13370         if( status ) return status;
13371 #else
13372         /* Draft 4 pthreads */
13373         status = pthread_create( &t, pthread_attr_default, task, NULL );
13374         if( status ) return errno;
13375
13376         /* give thread a chance to complete */
13377         /* it should remain joinable and hence detachable */
13378         sleep( 1 );
13379
13380         status = pthread_detach( &t );
13381         if( status ) return errno;
13382 #endif
13383
13384 #ifdef HAVE_LINUX_THREADS
13385         pthread_kill_other_threads_np();
13386 #endif
13387
13388         return 0;
13389
13390 ; return 0; }
13391 EOF
13392 if { (eval echo configure:13393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13393   rm -rf conftest*
13394   ol_cv_pthread_lpthread=yes
13395 else
13396   echo "configure: failed program was:" >&5
13397   cat conftest.$ac_ext >&5
13398   rm -rf conftest*
13399   ol_cv_pthread_lpthread=no
13400 fi
13401 rm -f conftest*
13402 else
13403   cat > conftest.$ac_ext <<EOF
13404 #line 13405 "configure"
13405 #include "confdefs.h"
13406 /* pthread test headers */
13407 #include <pthread.h>
13408 #if HAVE_PTHREADS < 7
13409 #include <errno.h>
13410 #endif
13411 #ifndef NULL
13412 #define NULL (void*)0
13413 #endif
13414
13415 static void *task(p)
13416         void *p;
13417 {
13418         return (void *) (p == NULL);
13419 }
13420
13421
13422 int main(argc, argv)
13423         int argc;
13424         char **argv;
13425 {
13426
13427         /* pthread test function */
13428 #ifndef PTHREAD_CREATE_DETACHED
13429 #define PTHREAD_CREATE_DETACHED 1
13430 #endif
13431         pthread_t t;
13432         int status;
13433         int detach = PTHREAD_CREATE_DETACHED;
13434
13435 #if HAVE_PTHREADS > 4
13436         /* Final pthreads */
13437         pthread_attr_t attr;
13438
13439         status = pthread_attr_init(&attr);
13440         if( status ) return status;
13441
13442 #if HAVE_PTHREADS < 7
13443         status = pthread_attr_setdetachstate(&attr, &detach);
13444         if( status < 0 ) status = errno;
13445 #else
13446         status = pthread_attr_setdetachstate(&attr, detach);
13447 #endif
13448         if( status ) return status;
13449         status = pthread_create( &t, &attr, task, NULL );
13450 #if HAVE_PTHREADS < 7
13451         if( status < 0 ) status = errno;
13452 #endif
13453         if( status ) return status;
13454 #else
13455         /* Draft 4 pthreads */
13456         status = pthread_create( &t, pthread_attr_default, task, NULL );
13457         if( status ) return errno;
13458
13459         /* give thread a chance to complete */
13460         /* it should remain joinable and hence detachable */
13461         sleep( 1 );
13462
13463         status = pthread_detach( &t );
13464         if( status ) return errno;
13465 #endif
13466
13467 #ifdef HAVE_LINUX_THREADS
13468         pthread_kill_other_threads_np();
13469 #endif
13470
13471         return 0;
13472
13473 }
13474
13475 EOF
13476 if { (eval echo configure:13477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13477 then
13478   ol_cv_pthread_lpthread=yes
13479 else
13480   echo "configure: failed program was:" >&5
13481   cat conftest.$ac_ext >&5
13482   rm -fr conftest*
13483   ol_cv_pthread_lpthread=no
13484 fi
13485 rm -fr conftest*
13486 fi
13487
13488
13489                 # restore the LIBS
13490                 LIBS="$ol_LIBS"
13491         
13492 fi
13493
13494 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13495
13496         if test $ol_cv_pthread_lpthread = yes ; then
13497                 ol_link_pthreads="-lpthread"
13498                 ol_link_threads=posix
13499         fi
13500 fi
13501
13502                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13503 if test "$ol_link_threads" = no ; then
13504         # try -lc_r
13505         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13506 echo "configure:13507: checking for pthread link with -lc_r" >&5
13507 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13508   echo $ac_n "(cached) $ac_c" 1>&6
13509 else
13510   
13511                 # save the flags
13512                 ol_LIBS="$LIBS"
13513                 LIBS="-lc_r $LIBS"
13514
13515                 if test "$cross_compiling" = yes; then
13516   cat > conftest.$ac_ext <<EOF
13517 #line 13518 "configure"
13518 #include "confdefs.h"
13519 /* pthread test headers */
13520 #include <pthread.h>
13521 #if HAVE_PTHREADS < 7
13522 #include <errno.h>
13523 #endif
13524 #ifndef NULL
13525 #define NULL (void*)0
13526 #endif
13527
13528 static void *task(p)
13529         void *p;
13530 {
13531         return (void *) (p == NULL);
13532 }
13533
13534 int main() {
13535
13536         /* pthread test function */
13537 #ifndef PTHREAD_CREATE_DETACHED
13538 #define PTHREAD_CREATE_DETACHED 1
13539 #endif
13540         pthread_t t;
13541         int status;
13542         int detach = PTHREAD_CREATE_DETACHED;
13543
13544 #if HAVE_PTHREADS > 4
13545         /* Final pthreads */
13546         pthread_attr_t attr;
13547
13548         status = pthread_attr_init(&attr);
13549         if( status ) return status;
13550
13551 #if HAVE_PTHREADS < 7
13552         status = pthread_attr_setdetachstate(&attr, &detach);
13553         if( status < 0 ) status = errno;
13554 #else
13555         status = pthread_attr_setdetachstate(&attr, detach);
13556 #endif
13557         if( status ) return status;
13558         status = pthread_create( &t, &attr, task, NULL );
13559 #if HAVE_PTHREADS < 7
13560         if( status < 0 ) status = errno;
13561 #endif
13562         if( status ) return status;
13563 #else
13564         /* Draft 4 pthreads */
13565         status = pthread_create( &t, pthread_attr_default, task, NULL );
13566         if( status ) return errno;
13567
13568         /* give thread a chance to complete */
13569         /* it should remain joinable and hence detachable */
13570         sleep( 1 );
13571
13572         status = pthread_detach( &t );
13573         if( status ) return errno;
13574 #endif
13575
13576 #ifdef HAVE_LINUX_THREADS
13577         pthread_kill_other_threads_np();
13578 #endif
13579
13580         return 0;
13581
13582 ; return 0; }
13583 EOF
13584 if { (eval echo configure:13585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13585   rm -rf conftest*
13586   ol_cv_pthread_lc_r=yes
13587 else
13588   echo "configure: failed program was:" >&5
13589   cat conftest.$ac_ext >&5
13590   rm -rf conftest*
13591   ol_cv_pthread_lc_r=no
13592 fi
13593 rm -f conftest*
13594 else
13595   cat > conftest.$ac_ext <<EOF
13596 #line 13597 "configure"
13597 #include "confdefs.h"
13598 /* pthread test headers */
13599 #include <pthread.h>
13600 #if HAVE_PTHREADS < 7
13601 #include <errno.h>
13602 #endif
13603 #ifndef NULL
13604 #define NULL (void*)0
13605 #endif
13606
13607 static void *task(p)
13608         void *p;
13609 {
13610         return (void *) (p == NULL);
13611 }
13612
13613
13614 int main(argc, argv)
13615         int argc;
13616         char **argv;
13617 {
13618
13619         /* pthread test function */
13620 #ifndef PTHREAD_CREATE_DETACHED
13621 #define PTHREAD_CREATE_DETACHED 1
13622 #endif
13623         pthread_t t;
13624         int status;
13625         int detach = PTHREAD_CREATE_DETACHED;
13626
13627 #if HAVE_PTHREADS > 4
13628         /* Final pthreads */
13629         pthread_attr_t attr;
13630
13631         status = pthread_attr_init(&attr);
13632         if( status ) return status;
13633
13634 #if HAVE_PTHREADS < 7
13635         status = pthread_attr_setdetachstate(&attr, &detach);
13636         if( status < 0 ) status = errno;
13637 #else
13638         status = pthread_attr_setdetachstate(&attr, detach);
13639 #endif
13640         if( status ) return status;
13641         status = pthread_create( &t, &attr, task, NULL );
13642 #if HAVE_PTHREADS < 7
13643         if( status < 0 ) status = errno;
13644 #endif
13645         if( status ) return status;
13646 #else
13647         /* Draft 4 pthreads */
13648         status = pthread_create( &t, pthread_attr_default, task, NULL );
13649         if( status ) return errno;
13650
13651         /* give thread a chance to complete */
13652         /* it should remain joinable and hence detachable */
13653         sleep( 1 );
13654
13655         status = pthread_detach( &t );
13656         if( status ) return errno;
13657 #endif
13658
13659 #ifdef HAVE_LINUX_THREADS
13660         pthread_kill_other_threads_np();
13661 #endif
13662
13663         return 0;
13664
13665 }
13666
13667 EOF
13668 if { (eval echo configure:13669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13669 then
13670   ol_cv_pthread_lc_r=yes
13671 else
13672   echo "configure: failed program was:" >&5
13673   cat conftest.$ac_ext >&5
13674   rm -fr conftest*
13675   ol_cv_pthread_lc_r=no
13676 fi
13677 rm -fr conftest*
13678 fi
13679
13680
13681                 # restore the LIBS
13682                 LIBS="$ol_LIBS"
13683         
13684 fi
13685
13686 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13687
13688         if test $ol_cv_pthread_lc_r = yes ; then
13689                 ol_link_pthreads="-lc_r"
13690                 ol_link_threads=posix
13691         fi
13692 fi
13693
13694
13695                 # Pthread try link: -threads (ol_cv_pthread_threads)
13696 if test "$ol_link_threads" = no ; then
13697         # try -threads
13698         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13699 echo "configure:13700: checking for pthread link with -threads" >&5
13700 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13701   echo $ac_n "(cached) $ac_c" 1>&6
13702 else
13703   
13704                 # save the flags
13705                 ol_LIBS="$LIBS"
13706                 LIBS="-threads $LIBS"
13707
13708                 if test "$cross_compiling" = yes; then
13709   cat > conftest.$ac_ext <<EOF
13710 #line 13711 "configure"
13711 #include "confdefs.h"
13712 /* pthread test headers */
13713 #include <pthread.h>
13714 #if HAVE_PTHREADS < 7
13715 #include <errno.h>
13716 #endif
13717 #ifndef NULL
13718 #define NULL (void*)0
13719 #endif
13720
13721 static void *task(p)
13722         void *p;
13723 {
13724         return (void *) (p == NULL);
13725 }
13726
13727 int main() {
13728
13729         /* pthread test function */
13730 #ifndef PTHREAD_CREATE_DETACHED
13731 #define PTHREAD_CREATE_DETACHED 1
13732 #endif
13733         pthread_t t;
13734         int status;
13735         int detach = PTHREAD_CREATE_DETACHED;
13736
13737 #if HAVE_PTHREADS > 4
13738         /* Final pthreads */
13739         pthread_attr_t attr;
13740
13741         status = pthread_attr_init(&attr);
13742         if( status ) return status;
13743
13744 #if HAVE_PTHREADS < 7
13745         status = pthread_attr_setdetachstate(&attr, &detach);
13746         if( status < 0 ) status = errno;
13747 #else
13748         status = pthread_attr_setdetachstate(&attr, detach);
13749 #endif
13750         if( status ) return status;
13751         status = pthread_create( &t, &attr, task, NULL );
13752 #if HAVE_PTHREADS < 7
13753         if( status < 0 ) status = errno;
13754 #endif
13755         if( status ) return status;
13756 #else
13757         /* Draft 4 pthreads */
13758         status = pthread_create( &t, pthread_attr_default, task, NULL );
13759         if( status ) return errno;
13760
13761         /* give thread a chance to complete */
13762         /* it should remain joinable and hence detachable */
13763         sleep( 1 );
13764
13765         status = pthread_detach( &t );
13766         if( status ) return errno;
13767 #endif
13768
13769 #ifdef HAVE_LINUX_THREADS
13770         pthread_kill_other_threads_np();
13771 #endif
13772
13773         return 0;
13774
13775 ; return 0; }
13776 EOF
13777 if { (eval echo configure:13778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13778   rm -rf conftest*
13779   ol_cv_pthread_threads=yes
13780 else
13781   echo "configure: failed program was:" >&5
13782   cat conftest.$ac_ext >&5
13783   rm -rf conftest*
13784   ol_cv_pthread_threads=no
13785 fi
13786 rm -f conftest*
13787 else
13788   cat > conftest.$ac_ext <<EOF
13789 #line 13790 "configure"
13790 #include "confdefs.h"
13791 /* pthread test headers */
13792 #include <pthread.h>
13793 #if HAVE_PTHREADS < 7
13794 #include <errno.h>
13795 #endif
13796 #ifndef NULL
13797 #define NULL (void*)0
13798 #endif
13799
13800 static void *task(p)
13801         void *p;
13802 {
13803         return (void *) (p == NULL);
13804 }
13805
13806
13807 int main(argc, argv)
13808         int argc;
13809         char **argv;
13810 {
13811
13812         /* pthread test function */
13813 #ifndef PTHREAD_CREATE_DETACHED
13814 #define PTHREAD_CREATE_DETACHED 1
13815 #endif
13816         pthread_t t;
13817         int status;
13818         int detach = PTHREAD_CREATE_DETACHED;
13819
13820 #if HAVE_PTHREADS > 4
13821         /* Final pthreads */
13822         pthread_attr_t attr;
13823
13824         status = pthread_attr_init(&attr);
13825         if( status ) return status;
13826
13827 #if HAVE_PTHREADS < 7
13828         status = pthread_attr_setdetachstate(&attr, &detach);
13829         if( status < 0 ) status = errno;
13830 #else
13831         status = pthread_attr_setdetachstate(&attr, detach);
13832 #endif
13833         if( status ) return status;
13834         status = pthread_create( &t, &attr, task, NULL );
13835 #if HAVE_PTHREADS < 7
13836         if( status < 0 ) status = errno;
13837 #endif
13838         if( status ) return status;
13839 #else
13840         /* Draft 4 pthreads */
13841         status = pthread_create( &t, pthread_attr_default, task, NULL );
13842         if( status ) return errno;
13843
13844         /* give thread a chance to complete */
13845         /* it should remain joinable and hence detachable */
13846         sleep( 1 );
13847
13848         status = pthread_detach( &t );
13849         if( status ) return errno;
13850 #endif
13851
13852 #ifdef HAVE_LINUX_THREADS
13853         pthread_kill_other_threads_np();
13854 #endif
13855
13856         return 0;
13857
13858 }
13859
13860 EOF
13861 if { (eval echo configure:13862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13862 then
13863   ol_cv_pthread_threads=yes
13864 else
13865   echo "configure: failed program was:" >&5
13866   cat conftest.$ac_ext >&5
13867   rm -fr conftest*
13868   ol_cv_pthread_threads=no
13869 fi
13870 rm -fr conftest*
13871 fi
13872
13873
13874                 # restore the LIBS
13875                 LIBS="$ol_LIBS"
13876         
13877 fi
13878
13879 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13880
13881         if test $ol_cv_pthread_threads = yes ; then
13882                 ol_link_pthreads="-threads"
13883                 ol_link_threads=posix
13884         fi
13885 fi
13886
13887
13888                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13889 if test "$ol_link_threads" = no ; then
13890         # try -lpthreads -lmach -lexc -lc_r
13891         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13892 echo "configure:13893: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13893 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13894   echo $ac_n "(cached) $ac_c" 1>&6
13895 else
13896   
13897                 # save the flags
13898                 ol_LIBS="$LIBS"
13899                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13900
13901                 if test "$cross_compiling" = yes; then
13902   cat > conftest.$ac_ext <<EOF
13903 #line 13904 "configure"
13904 #include "confdefs.h"
13905 /* pthread test headers */
13906 #include <pthread.h>
13907 #if HAVE_PTHREADS < 7
13908 #include <errno.h>
13909 #endif
13910 #ifndef NULL
13911 #define NULL (void*)0
13912 #endif
13913
13914 static void *task(p)
13915         void *p;
13916 {
13917         return (void *) (p == NULL);
13918 }
13919
13920 int main() {
13921
13922         /* pthread test function */
13923 #ifndef PTHREAD_CREATE_DETACHED
13924 #define PTHREAD_CREATE_DETACHED 1
13925 #endif
13926         pthread_t t;
13927         int status;
13928         int detach = PTHREAD_CREATE_DETACHED;
13929
13930 #if HAVE_PTHREADS > 4
13931         /* Final pthreads */
13932         pthread_attr_t attr;
13933
13934         status = pthread_attr_init(&attr);
13935         if( status ) return status;
13936
13937 #if HAVE_PTHREADS < 7
13938         status = pthread_attr_setdetachstate(&attr, &detach);
13939         if( status < 0 ) status = errno;
13940 #else
13941         status = pthread_attr_setdetachstate(&attr, detach);
13942 #endif
13943         if( status ) return status;
13944         status = pthread_create( &t, &attr, task, NULL );
13945 #if HAVE_PTHREADS < 7
13946         if( status < 0 ) status = errno;
13947 #endif
13948         if( status ) return status;
13949 #else
13950         /* Draft 4 pthreads */
13951         status = pthread_create( &t, pthread_attr_default, task, NULL );
13952         if( status ) return errno;
13953
13954         /* give thread a chance to complete */
13955         /* it should remain joinable and hence detachable */
13956         sleep( 1 );
13957
13958         status = pthread_detach( &t );
13959         if( status ) return errno;
13960 #endif
13961
13962 #ifdef HAVE_LINUX_THREADS
13963         pthread_kill_other_threads_np();
13964 #endif
13965
13966         return 0;
13967
13968 ; return 0; }
13969 EOF
13970 if { (eval echo configure:13971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13971   rm -rf conftest*
13972   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13973 else
13974   echo "configure: failed program was:" >&5
13975   cat conftest.$ac_ext >&5
13976   rm -rf conftest*
13977   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13978 fi
13979 rm -f conftest*
13980 else
13981   cat > conftest.$ac_ext <<EOF
13982 #line 13983 "configure"
13983 #include "confdefs.h"
13984 /* pthread test headers */
13985 #include <pthread.h>
13986 #if HAVE_PTHREADS < 7
13987 #include <errno.h>
13988 #endif
13989 #ifndef NULL
13990 #define NULL (void*)0
13991 #endif
13992
13993 static void *task(p)
13994         void *p;
13995 {
13996         return (void *) (p == NULL);
13997 }
13998
13999
14000 int main(argc, argv)
14001         int argc;
14002         char **argv;
14003 {
14004
14005         /* pthread test function */
14006 #ifndef PTHREAD_CREATE_DETACHED
14007 #define PTHREAD_CREATE_DETACHED 1
14008 #endif
14009         pthread_t t;
14010         int status;
14011         int detach = PTHREAD_CREATE_DETACHED;
14012
14013 #if HAVE_PTHREADS > 4
14014         /* Final pthreads */
14015         pthread_attr_t attr;
14016
14017         status = pthread_attr_init(&attr);
14018         if( status ) return status;
14019
14020 #if HAVE_PTHREADS < 7
14021         status = pthread_attr_setdetachstate(&attr, &detach);
14022         if( status < 0 ) status = errno;
14023 #else
14024         status = pthread_attr_setdetachstate(&attr, detach);
14025 #endif
14026         if( status ) return status;
14027         status = pthread_create( &t, &attr, task, NULL );
14028 #if HAVE_PTHREADS < 7
14029         if( status < 0 ) status = errno;
14030 #endif
14031         if( status ) return status;
14032 #else
14033         /* Draft 4 pthreads */
14034         status = pthread_create( &t, pthread_attr_default, task, NULL );
14035         if( status ) return errno;
14036
14037         /* give thread a chance to complete */
14038         /* it should remain joinable and hence detachable */
14039         sleep( 1 );
14040
14041         status = pthread_detach( &t );
14042         if( status ) return errno;
14043 #endif
14044
14045 #ifdef HAVE_LINUX_THREADS
14046         pthread_kill_other_threads_np();
14047 #endif
14048
14049         return 0;
14050
14051 }
14052
14053 EOF
14054 if { (eval echo configure:14055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14055 then
14056   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14057 else
14058   echo "configure: failed program was:" >&5
14059   cat conftest.$ac_ext >&5
14060   rm -fr conftest*
14061   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14062 fi
14063 rm -fr conftest*
14064 fi
14065
14066
14067                 # restore the LIBS
14068                 LIBS="$ol_LIBS"
14069         
14070 fi
14071
14072 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14073
14074         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14075                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14076                 ol_link_threads=posix
14077         fi
14078 fi
14079
14080                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14081 if test "$ol_link_threads" = no ; then
14082         # try -lpthreads -lmach -lexc
14083         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14084 echo "configure:14085: checking for pthread link with -lpthreads -lmach -lexc" >&5
14085 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14086   echo $ac_n "(cached) $ac_c" 1>&6
14087 else
14088   
14089                 # save the flags
14090                 ol_LIBS="$LIBS"
14091                 LIBS="-lpthreads -lmach -lexc $LIBS"
14092
14093                 if test "$cross_compiling" = yes; then
14094   cat > conftest.$ac_ext <<EOF
14095 #line 14096 "configure"
14096 #include "confdefs.h"
14097 /* pthread test headers */
14098 #include <pthread.h>
14099 #if HAVE_PTHREADS < 7
14100 #include <errno.h>
14101 #endif
14102 #ifndef NULL
14103 #define NULL (void*)0
14104 #endif
14105
14106 static void *task(p)
14107         void *p;
14108 {
14109         return (void *) (p == NULL);
14110 }
14111
14112 int main() {
14113
14114         /* pthread test function */
14115 #ifndef PTHREAD_CREATE_DETACHED
14116 #define PTHREAD_CREATE_DETACHED 1
14117 #endif
14118         pthread_t t;
14119         int status;
14120         int detach = PTHREAD_CREATE_DETACHED;
14121
14122 #if HAVE_PTHREADS > 4
14123         /* Final pthreads */
14124         pthread_attr_t attr;
14125
14126         status = pthread_attr_init(&attr);
14127         if( status ) return status;
14128
14129 #if HAVE_PTHREADS < 7
14130         status = pthread_attr_setdetachstate(&attr, &detach);
14131         if( status < 0 ) status = errno;
14132 #else
14133         status = pthread_attr_setdetachstate(&attr, detach);
14134 #endif
14135         if( status ) return status;
14136         status = pthread_create( &t, &attr, task, NULL );
14137 #if HAVE_PTHREADS < 7
14138         if( status < 0 ) status = errno;
14139 #endif
14140         if( status ) return status;
14141 #else
14142         /* Draft 4 pthreads */
14143         status = pthread_create( &t, pthread_attr_default, task, NULL );
14144         if( status ) return errno;
14145
14146         /* give thread a chance to complete */
14147         /* it should remain joinable and hence detachable */
14148         sleep( 1 );
14149
14150         status = pthread_detach( &t );
14151         if( status ) return errno;
14152 #endif
14153
14154 #ifdef HAVE_LINUX_THREADS
14155         pthread_kill_other_threads_np();
14156 #endif
14157
14158         return 0;
14159
14160 ; return 0; }
14161 EOF
14162 if { (eval echo configure:14163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14163   rm -rf conftest*
14164   ol_cv_pthread_lpthreads_lmach_lexc=yes
14165 else
14166   echo "configure: failed program was:" >&5
14167   cat conftest.$ac_ext >&5
14168   rm -rf conftest*
14169   ol_cv_pthread_lpthreads_lmach_lexc=no
14170 fi
14171 rm -f conftest*
14172 else
14173   cat > conftest.$ac_ext <<EOF
14174 #line 14175 "configure"
14175 #include "confdefs.h"
14176 /* pthread test headers */
14177 #include <pthread.h>
14178 #if HAVE_PTHREADS < 7
14179 #include <errno.h>
14180 #endif
14181 #ifndef NULL
14182 #define NULL (void*)0
14183 #endif
14184
14185 static void *task(p)
14186         void *p;
14187 {
14188         return (void *) (p == NULL);
14189 }
14190
14191
14192 int main(argc, argv)
14193         int argc;
14194         char **argv;
14195 {
14196
14197         /* pthread test function */
14198 #ifndef PTHREAD_CREATE_DETACHED
14199 #define PTHREAD_CREATE_DETACHED 1
14200 #endif
14201         pthread_t t;
14202         int status;
14203         int detach = PTHREAD_CREATE_DETACHED;
14204
14205 #if HAVE_PTHREADS > 4
14206         /* Final pthreads */
14207         pthread_attr_t attr;
14208
14209         status = pthread_attr_init(&attr);
14210         if( status ) return status;
14211
14212 #if HAVE_PTHREADS < 7
14213         status = pthread_attr_setdetachstate(&attr, &detach);
14214         if( status < 0 ) status = errno;
14215 #else
14216         status = pthread_attr_setdetachstate(&attr, detach);
14217 #endif
14218         if( status ) return status;
14219         status = pthread_create( &t, &attr, task, NULL );
14220 #if HAVE_PTHREADS < 7
14221         if( status < 0 ) status = errno;
14222 #endif
14223         if( status ) return status;
14224 #else
14225         /* Draft 4 pthreads */
14226         status = pthread_create( &t, pthread_attr_default, task, NULL );
14227         if( status ) return errno;
14228
14229         /* give thread a chance to complete */
14230         /* it should remain joinable and hence detachable */
14231         sleep( 1 );
14232
14233         status = pthread_detach( &t );
14234         if( status ) return errno;
14235 #endif
14236
14237 #ifdef HAVE_LINUX_THREADS
14238         pthread_kill_other_threads_np();
14239 #endif
14240
14241         return 0;
14242
14243 }
14244
14245 EOF
14246 if { (eval echo configure:14247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14247 then
14248   ol_cv_pthread_lpthreads_lmach_lexc=yes
14249 else
14250   echo "configure: failed program was:" >&5
14251   cat conftest.$ac_ext >&5
14252   rm -fr conftest*
14253   ol_cv_pthread_lpthreads_lmach_lexc=no
14254 fi
14255 rm -fr conftest*
14256 fi
14257
14258
14259                 # restore the LIBS
14260                 LIBS="$ol_LIBS"
14261         
14262 fi
14263
14264 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14265
14266         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14267                 ol_link_pthreads="-lpthreads -lmach -lexc"
14268                 ol_link_threads=posix
14269         fi
14270 fi
14271
14272                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14273 if test "$ol_link_threads" = no ; then
14274         # try -lpthreads -lexc
14275         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14276 echo "configure:14277: checking for pthread link with -lpthreads -lexc" >&5
14277 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14278   echo $ac_n "(cached) $ac_c" 1>&6
14279 else
14280   
14281                 # save the flags
14282                 ol_LIBS="$LIBS"
14283                 LIBS="-lpthreads -lexc $LIBS"
14284
14285                 if test "$cross_compiling" = yes; then
14286   cat > conftest.$ac_ext <<EOF
14287 #line 14288 "configure"
14288 #include "confdefs.h"
14289 /* pthread test headers */
14290 #include <pthread.h>
14291 #if HAVE_PTHREADS < 7
14292 #include <errno.h>
14293 #endif
14294 #ifndef NULL
14295 #define NULL (void*)0
14296 #endif
14297
14298 static void *task(p)
14299         void *p;
14300 {
14301         return (void *) (p == NULL);
14302 }
14303
14304 int main() {
14305
14306         /* pthread test function */
14307 #ifndef PTHREAD_CREATE_DETACHED
14308 #define PTHREAD_CREATE_DETACHED 1
14309 #endif
14310         pthread_t t;
14311         int status;
14312         int detach = PTHREAD_CREATE_DETACHED;
14313
14314 #if HAVE_PTHREADS > 4
14315         /* Final pthreads */
14316         pthread_attr_t attr;
14317
14318         status = pthread_attr_init(&attr);
14319         if( status ) return status;
14320
14321 #if HAVE_PTHREADS < 7
14322         status = pthread_attr_setdetachstate(&attr, &detach);
14323         if( status < 0 ) status = errno;
14324 #else
14325         status = pthread_attr_setdetachstate(&attr, detach);
14326 #endif
14327         if( status ) return status;
14328         status = pthread_create( &t, &attr, task, NULL );
14329 #if HAVE_PTHREADS < 7
14330         if( status < 0 ) status = errno;
14331 #endif
14332         if( status ) return status;
14333 #else
14334         /* Draft 4 pthreads */
14335         status = pthread_create( &t, pthread_attr_default, task, NULL );
14336         if( status ) return errno;
14337
14338         /* give thread a chance to complete */
14339         /* it should remain joinable and hence detachable */
14340         sleep( 1 );
14341
14342         status = pthread_detach( &t );
14343         if( status ) return errno;
14344 #endif
14345
14346 #ifdef HAVE_LINUX_THREADS
14347         pthread_kill_other_threads_np();
14348 #endif
14349
14350         return 0;
14351
14352 ; return 0; }
14353 EOF
14354 if { (eval echo configure:14355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14355   rm -rf conftest*
14356   ol_cv_pthread_lpthreads_lexc=yes
14357 else
14358   echo "configure: failed program was:" >&5
14359   cat conftest.$ac_ext >&5
14360   rm -rf conftest*
14361   ol_cv_pthread_lpthreads_lexc=no
14362 fi
14363 rm -f conftest*
14364 else
14365   cat > conftest.$ac_ext <<EOF
14366 #line 14367 "configure"
14367 #include "confdefs.h"
14368 /* pthread test headers */
14369 #include <pthread.h>
14370 #if HAVE_PTHREADS < 7
14371 #include <errno.h>
14372 #endif
14373 #ifndef NULL
14374 #define NULL (void*)0
14375 #endif
14376
14377 static void *task(p)
14378         void *p;
14379 {
14380         return (void *) (p == NULL);
14381 }
14382
14383
14384 int main(argc, argv)
14385         int argc;
14386         char **argv;
14387 {
14388
14389         /* pthread test function */
14390 #ifndef PTHREAD_CREATE_DETACHED
14391 #define PTHREAD_CREATE_DETACHED 1
14392 #endif
14393         pthread_t t;
14394         int status;
14395         int detach = PTHREAD_CREATE_DETACHED;
14396
14397 #if HAVE_PTHREADS > 4
14398         /* Final pthreads */
14399         pthread_attr_t attr;
14400
14401         status = pthread_attr_init(&attr);
14402         if( status ) return status;
14403
14404 #if HAVE_PTHREADS < 7
14405         status = pthread_attr_setdetachstate(&attr, &detach);
14406         if( status < 0 ) status = errno;
14407 #else
14408         status = pthread_attr_setdetachstate(&attr, detach);
14409 #endif
14410         if( status ) return status;
14411         status = pthread_create( &t, &attr, task, NULL );
14412 #if HAVE_PTHREADS < 7
14413         if( status < 0 ) status = errno;
14414 #endif
14415         if( status ) return status;
14416 #else
14417         /* Draft 4 pthreads */
14418         status = pthread_create( &t, pthread_attr_default, task, NULL );
14419         if( status ) return errno;
14420
14421         /* give thread a chance to complete */
14422         /* it should remain joinable and hence detachable */
14423         sleep( 1 );
14424
14425         status = pthread_detach( &t );
14426         if( status ) return errno;
14427 #endif
14428
14429 #ifdef HAVE_LINUX_THREADS
14430         pthread_kill_other_threads_np();
14431 #endif
14432
14433         return 0;
14434
14435 }
14436
14437 EOF
14438 if { (eval echo configure:14439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14439 then
14440   ol_cv_pthread_lpthreads_lexc=yes
14441 else
14442   echo "configure: failed program was:" >&5
14443   cat conftest.$ac_ext >&5
14444   rm -fr conftest*
14445   ol_cv_pthread_lpthreads_lexc=no
14446 fi
14447 rm -fr conftest*
14448 fi
14449
14450
14451                 # restore the LIBS
14452                 LIBS="$ol_LIBS"
14453         
14454 fi
14455
14456 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14457
14458         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14459                 ol_link_pthreads="-lpthreads -lexc"
14460                 ol_link_threads=posix
14461         fi
14462 fi
14463
14464
14465                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14466 if test "$ol_link_threads" = no ; then
14467         # try -lpthreads
14468         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14469 echo "configure:14470: checking for pthread link with -lpthreads" >&5
14470 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14471   echo $ac_n "(cached) $ac_c" 1>&6
14472 else
14473   
14474                 # save the flags
14475                 ol_LIBS="$LIBS"
14476                 LIBS="-lpthreads $LIBS"
14477
14478                 if test "$cross_compiling" = yes; then
14479   cat > conftest.$ac_ext <<EOF
14480 #line 14481 "configure"
14481 #include "confdefs.h"
14482 /* pthread test headers */
14483 #include <pthread.h>
14484 #if HAVE_PTHREADS < 7
14485 #include <errno.h>
14486 #endif
14487 #ifndef NULL
14488 #define NULL (void*)0
14489 #endif
14490
14491 static void *task(p)
14492         void *p;
14493 {
14494         return (void *) (p == NULL);
14495 }
14496
14497 int main() {
14498
14499         /* pthread test function */
14500 #ifndef PTHREAD_CREATE_DETACHED
14501 #define PTHREAD_CREATE_DETACHED 1
14502 #endif
14503         pthread_t t;
14504         int status;
14505         int detach = PTHREAD_CREATE_DETACHED;
14506
14507 #if HAVE_PTHREADS > 4
14508         /* Final pthreads */
14509         pthread_attr_t attr;
14510
14511         status = pthread_attr_init(&attr);
14512         if( status ) return status;
14513
14514 #if HAVE_PTHREADS < 7
14515         status = pthread_attr_setdetachstate(&attr, &detach);
14516         if( status < 0 ) status = errno;
14517 #else
14518         status = pthread_attr_setdetachstate(&attr, detach);
14519 #endif
14520         if( status ) return status;
14521         status = pthread_create( &t, &attr, task, NULL );
14522 #if HAVE_PTHREADS < 7
14523         if( status < 0 ) status = errno;
14524 #endif
14525         if( status ) return status;
14526 #else
14527         /* Draft 4 pthreads */
14528         status = pthread_create( &t, pthread_attr_default, task, NULL );
14529         if( status ) return errno;
14530
14531         /* give thread a chance to complete */
14532         /* it should remain joinable and hence detachable */
14533         sleep( 1 );
14534
14535         status = pthread_detach( &t );
14536         if( status ) return errno;
14537 #endif
14538
14539 #ifdef HAVE_LINUX_THREADS
14540         pthread_kill_other_threads_np();
14541 #endif
14542
14543         return 0;
14544
14545 ; return 0; }
14546 EOF
14547 if { (eval echo configure:14548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14548   rm -rf conftest*
14549   ol_cv_pthread_lib_lpthreads=yes
14550 else
14551   echo "configure: failed program was:" >&5
14552   cat conftest.$ac_ext >&5
14553   rm -rf conftest*
14554   ol_cv_pthread_lib_lpthreads=no
14555 fi
14556 rm -f conftest*
14557 else
14558   cat > conftest.$ac_ext <<EOF
14559 #line 14560 "configure"
14560 #include "confdefs.h"
14561 /* pthread test headers */
14562 #include <pthread.h>
14563 #if HAVE_PTHREADS < 7
14564 #include <errno.h>
14565 #endif
14566 #ifndef NULL
14567 #define NULL (void*)0
14568 #endif
14569
14570 static void *task(p)
14571         void *p;
14572 {
14573         return (void *) (p == NULL);
14574 }
14575
14576
14577 int main(argc, argv)
14578         int argc;
14579         char **argv;
14580 {
14581
14582         /* pthread test function */
14583 #ifndef PTHREAD_CREATE_DETACHED
14584 #define PTHREAD_CREATE_DETACHED 1
14585 #endif
14586         pthread_t t;
14587         int status;
14588         int detach = PTHREAD_CREATE_DETACHED;
14589
14590 #if HAVE_PTHREADS > 4
14591         /* Final pthreads */
14592         pthread_attr_t attr;
14593
14594         status = pthread_attr_init(&attr);
14595         if( status ) return status;
14596
14597 #if HAVE_PTHREADS < 7
14598         status = pthread_attr_setdetachstate(&attr, &detach);
14599         if( status < 0 ) status = errno;
14600 #else
14601         status = pthread_attr_setdetachstate(&attr, detach);
14602 #endif
14603         if( status ) return status;
14604         status = pthread_create( &t, &attr, task, NULL );
14605 #if HAVE_PTHREADS < 7
14606         if( status < 0 ) status = errno;
14607 #endif
14608         if( status ) return status;
14609 #else
14610         /* Draft 4 pthreads */
14611         status = pthread_create( &t, pthread_attr_default, task, NULL );
14612         if( status ) return errno;
14613
14614         /* give thread a chance to complete */
14615         /* it should remain joinable and hence detachable */
14616         sleep( 1 );
14617
14618         status = pthread_detach( &t );
14619         if( status ) return errno;
14620 #endif
14621
14622 #ifdef HAVE_LINUX_THREADS
14623         pthread_kill_other_threads_np();
14624 #endif
14625
14626         return 0;
14627
14628 }
14629
14630 EOF
14631 if { (eval echo configure:14632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14632 then
14633   ol_cv_pthread_lib_lpthreads=yes
14634 else
14635   echo "configure: failed program was:" >&5
14636   cat conftest.$ac_ext >&5
14637   rm -fr conftest*
14638   ol_cv_pthread_lib_lpthreads=no
14639 fi
14640 rm -fr conftest*
14641 fi
14642
14643
14644                 # restore the LIBS
14645                 LIBS="$ol_LIBS"
14646         
14647 fi
14648
14649 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14650
14651         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14652                 ol_link_pthreads="-lpthreads"
14653                 ol_link_threads=posix
14654         fi
14655 fi
14656
14657
14658                 if test $ol_link_threads != no ; then
14659                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14660
14661                                                 save_CPPFLAGS="$CPPFLAGS"
14662                         save_LIBS="$LIBS"
14663                         LIBS="$LTHREAD_LIBS $LIBS"
14664
14665                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14666 do
14667 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14668 echo "configure:14669: checking for $ac_func" >&5
14669 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14670   echo $ac_n "(cached) $ac_c" 1>&6
14671 else
14672   cat > conftest.$ac_ext <<EOF
14673 #line 14674 "configure"
14674 #include "confdefs.h"
14675 /* System header to define __stub macros and hopefully few prototypes,
14676     which can conflict with char $ac_func(); below.  */
14677 #include <assert.h>
14678 /* Override any gcc2 internal prototype to avoid an error.  */
14679 /* We use char because int might match the return type of a gcc2
14680     builtin and then its argument prototype would still apply.  */
14681 char $ac_func();
14682 char (*f)();
14683
14684 int main() {
14685
14686 /* The GNU C library defines this for functions which it implements
14687     to always fail with ENOSYS.  Some functions are actually named
14688     something starting with __ and the normal name is an alias.  */
14689 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14690 choke me
14691 #else
14692 f = $ac_func;
14693 #endif
14694
14695 ; return 0; }
14696 EOF
14697 if { (eval echo configure:14698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14698   rm -rf conftest*
14699   eval "ac_cv_func_$ac_func=yes"
14700 else
14701   echo "configure: failed program was:" >&5
14702   cat conftest.$ac_ext >&5
14703   rm -rf conftest*
14704   eval "ac_cv_func_$ac_func=no"
14705 fi
14706 rm -f conftest*
14707 fi
14708
14709 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14710   echo "$ac_t""yes" 1>&6
14711     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14712   cat >> confdefs.h <<EOF
14713 #define $ac_tr_func 1
14714 EOF
14715  
14716 else
14717   echo "$ac_t""no" 1>&6
14718 fi
14719 done
14720
14721
14722                         if test $ac_cv_func_sched_yield = no -a \
14723                                 $ac_cv_func_pthread_yield = no -a \
14724                                 $ac_cv_func_thr_yield = no ; then
14725                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14726 echo "configure:14727: checking for sched_yield in -lrt" >&5
14727 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14728 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14729   echo $ac_n "(cached) $ac_c" 1>&6
14730 else
14731   ac_save_LIBS="$LIBS"
14732 LIBS="-lrt  $LIBS"
14733 cat > conftest.$ac_ext <<EOF
14734 #line 14735 "configure"
14735 #include "confdefs.h"
14736 /* Override any gcc2 internal prototype to avoid an error.  */
14737 /* We use char because int might match the return type of a gcc2
14738     builtin and then its argument prototype would still apply.  */
14739 char sched_yield();
14740
14741 int main() {
14742 sched_yield()
14743 ; return 0; }
14744 EOF
14745 if { (eval echo configure:14746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14746   rm -rf conftest*
14747   eval "ac_cv_lib_$ac_lib_var=yes"
14748 else
14749   echo "configure: failed program was:" >&5
14750   cat conftest.$ac_ext >&5
14751   rm -rf conftest*
14752   eval "ac_cv_lib_$ac_lib_var=no"
14753 fi
14754 rm -f conftest*
14755 LIBS="$ac_save_LIBS"
14756
14757 fi
14758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14759   echo "$ac_t""yes" 1>&6
14760   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14761                                         cat >> confdefs.h <<\EOF
14762 #define HAVE_SCHED_YIELD 1
14763 EOF
14764
14765                                         ac_cv_func_sched_yield=yes
14766 else
14767   echo "$ac_t""no" 1>&6
14768 ac_cv_func_sched_yield=no
14769 fi
14770
14771                         fi
14772                         if test $ac_cv_func_sched_yield = no -a \
14773                                 $ac_cv_func_pthread_yield = no -a \
14774                                 "$ac_cv_func_thr_yield" = no ; then
14775                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14776                         fi
14777
14778                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14779 do
14780 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14781 echo "configure:14782: checking for $ac_func" >&5
14782 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14783   echo $ac_n "(cached) $ac_c" 1>&6
14784 else
14785   cat > conftest.$ac_ext <<EOF
14786 #line 14787 "configure"
14787 #include "confdefs.h"
14788 /* System header to define __stub macros and hopefully few prototypes,
14789     which can conflict with char $ac_func(); below.  */
14790 #include <assert.h>
14791 /* Override any gcc2 internal prototype to avoid an error.  */
14792 /* We use char because int might match the return type of a gcc2
14793     builtin and then its argument prototype would still apply.  */
14794 char $ac_func();
14795 char (*f)();
14796
14797 int main() {
14798
14799 /* The GNU C library defines this for functions which it implements
14800     to always fail with ENOSYS.  Some functions are actually named
14801     something starting with __ and the normal name is an alias.  */
14802 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14803 choke me
14804 #else
14805 f = $ac_func;
14806 #endif
14807
14808 ; return 0; }
14809 EOF
14810 if { (eval echo configure:14811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14811   rm -rf conftest*
14812   eval "ac_cv_func_$ac_func=yes"
14813 else
14814   echo "configure: failed program was:" >&5
14815   cat conftest.$ac_ext >&5
14816   rm -rf conftest*
14817   eval "ac_cv_func_$ac_func=no"
14818 fi
14819 rm -f conftest*
14820 fi
14821
14822 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14823   echo "$ac_t""yes" 1>&6
14824     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14825   cat >> confdefs.h <<EOF
14826 #define $ac_tr_func 1
14827 EOF
14828  
14829 else
14830   echo "$ac_t""no" 1>&6
14831 fi
14832 done
14833
14834
14835                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14836 echo "configure:14837: checking for pthread_detach with <pthread.h>" >&5
14837 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14838   echo $ac_n "(cached) $ac_c" 1>&6
14839 else
14840   
14841                                                                 cat > conftest.$ac_ext <<EOF
14842 #line 14843 "configure"
14843 #include "confdefs.h"
14844
14845 #include <pthread.h>
14846 #ifndef NULL
14847 #define NULL (void*)0
14848 #endif
14849
14850 int main() {
14851 pthread_detach(NULL);
14852 ; return 0; }
14853 EOF
14854 if { (eval echo configure:14855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14855   rm -rf conftest*
14856   ol_cv_func_pthread_detach=yes
14857 else
14858   echo "configure: failed program was:" >&5
14859   cat conftest.$ac_ext >&5
14860   rm -rf conftest*
14861   ol_cv_func_pthread_detach=no
14862 fi
14863 rm -f conftest*
14864                         
14865 fi
14866
14867 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14868
14869                         if test $ol_cv_func_pthread_detach = no ; then
14870                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14871                         fi
14872
14873                         cat >> confdefs.h <<\EOF
14874 #define HAVE_PTHREAD_DETACH 1
14875 EOF
14876
14877
14878                                                 for ac_func in \
14879                                 pthread_setconcurrency \
14880                                 pthread_getconcurrency \
14881                                 thr_setconcurrency \
14882                                 thr_getconcurrency \
14883                         
14884 do
14885 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14886 echo "configure:14887: checking for $ac_func" >&5
14887 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14888   echo $ac_n "(cached) $ac_c" 1>&6
14889 else
14890   cat > conftest.$ac_ext <<EOF
14891 #line 14892 "configure"
14892 #include "confdefs.h"
14893 /* System header to define __stub macros and hopefully few prototypes,
14894     which can conflict with char $ac_func(); below.  */
14895 #include <assert.h>
14896 /* Override any gcc2 internal prototype to avoid an error.  */
14897 /* We use char because int might match the return type of a gcc2
14898     builtin and then its argument prototype would still apply.  */
14899 char $ac_func();
14900 char (*f)();
14901
14902 int main() {
14903
14904 /* The GNU C library defines this for functions which it implements
14905     to always fail with ENOSYS.  Some functions are actually named
14906     something starting with __ and the normal name is an alias.  */
14907 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14908 choke me
14909 #else
14910 f = $ac_func;
14911 #endif
14912
14913 ; return 0; }
14914 EOF
14915 if { (eval echo configure:14916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14916   rm -rf conftest*
14917   eval "ac_cv_func_$ac_func=yes"
14918 else
14919   echo "configure: failed program was:" >&5
14920   cat conftest.$ac_ext >&5
14921   rm -rf conftest*
14922   eval "ac_cv_func_$ac_func=no"
14923 fi
14924 rm -f conftest*
14925 fi
14926
14927 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14928   echo "$ac_t""yes" 1>&6
14929     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14930   cat >> confdefs.h <<EOF
14931 #define $ac_tr_func 1
14932 EOF
14933  
14934 else
14935   echo "$ac_t""no" 1>&6
14936 fi
14937 done
14938
14939
14940                         
14941         for ac_func in pthread_kill_other_threads_np
14942 do
14943 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14944 echo "configure:14945: checking for $ac_func" >&5
14945 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14946   echo $ac_n "(cached) $ac_c" 1>&6
14947 else
14948   cat > conftest.$ac_ext <<EOF
14949 #line 14950 "configure"
14950 #include "confdefs.h"
14951 /* System header to define __stub macros and hopefully few prototypes,
14952     which can conflict with char $ac_func(); below.  */
14953 #include <assert.h>
14954 /* Override any gcc2 internal prototype to avoid an error.  */
14955 /* We use char because int might match the return type of a gcc2
14956     builtin and then its argument prototype would still apply.  */
14957 char $ac_func();
14958 char (*f)();
14959
14960 int main() {
14961
14962 /* The GNU C library defines this for functions which it implements
14963     to always fail with ENOSYS.  Some functions are actually named
14964     something starting with __ and the normal name is an alias.  */
14965 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14966 choke me
14967 #else
14968 f = $ac_func;
14969 #endif
14970
14971 ; return 0; }
14972 EOF
14973 if { (eval echo configure:14974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14974   rm -rf conftest*
14975   eval "ac_cv_func_$ac_func=yes"
14976 else
14977   echo "configure: failed program was:" >&5
14978   cat conftest.$ac_ext >&5
14979   rm -rf conftest*
14980   eval "ac_cv_func_$ac_func=no"
14981 fi
14982 rm -f conftest*
14983 fi
14984
14985 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14986   echo "$ac_t""yes" 1>&6
14987     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14988   cat >> confdefs.h <<EOF
14989 #define $ac_tr_func 1
14990 EOF
14991  
14992 else
14993   echo "$ac_t""no" 1>&6
14994 fi
14995 done
14996
14997         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14998 echo "configure:14999: checking for LinuxThreads implementation" >&5
14999 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15000   echo $ac_n "(cached) $ac_c" 1>&6
15001 else
15002   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15003 fi
15004
15005 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15006
15007                         
15008         
15009         
15010         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15011 echo "configure:15012: checking for LinuxThreads consistency" >&5
15012 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15013   echo $ac_n "(cached) $ac_c" 1>&6
15014 else
15015   
15016                 if test $ol_cv_header_linux_threads = yes -a \
15017                         $ol_cv_sys_linux_threads = yes; then
15018                         ol_cv_linux_threads=yes
15019                 elif test $ol_cv_header_linux_threads = no -a \
15020                         $ol_cv_sys_linux_threads = no; then
15021                         ol_cv_linux_threads=no
15022                 else
15023                         ol_cv_linux_threads=error
15024                 fi
15025         
15026 fi
15027
15028 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15029
15030
15031                         if test $ol_cv_linux_threads = error; then
15032                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15033                         fi
15034
15035                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15036 echo "configure:15037: checking if pthread_create() works" >&5
15037 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15038   echo $ac_n "(cached) $ac_c" 1>&6
15039 else
15040   
15041                         if test "$cross_compiling" = yes; then
15042                                 ol_cv_pthread_create_works=yes
15043 else
15044   cat > conftest.$ac_ext <<EOF
15045 #line 15046 "configure"
15046 #include "confdefs.h"
15047 /* pthread test headers */
15048 #include <pthread.h>
15049 #if HAVE_PTHREADS < 7
15050 #include <errno.h>
15051 #endif
15052 #ifndef NULL
15053 #define NULL (void*)0
15054 #endif
15055
15056 static void *task(p)
15057         void *p;
15058 {
15059         return (void *) (p == NULL);
15060 }
15061
15062
15063 int main(argc, argv)
15064         int argc;
15065         char **argv;
15066 {
15067
15068         /* pthread test function */
15069 #ifndef PTHREAD_CREATE_DETACHED
15070 #define PTHREAD_CREATE_DETACHED 1
15071 #endif
15072         pthread_t t;
15073         int status;
15074         int detach = PTHREAD_CREATE_DETACHED;
15075
15076 #if HAVE_PTHREADS > 4
15077         /* Final pthreads */
15078         pthread_attr_t attr;
15079
15080         status = pthread_attr_init(&attr);
15081         if( status ) return status;
15082
15083 #if HAVE_PTHREADS < 7
15084         status = pthread_attr_setdetachstate(&attr, &detach);
15085         if( status < 0 ) status = errno;
15086 #else
15087         status = pthread_attr_setdetachstate(&attr, detach);
15088 #endif
15089         if( status ) return status;
15090         status = pthread_create( &t, &attr, task, NULL );
15091 #if HAVE_PTHREADS < 7
15092         if( status < 0 ) status = errno;
15093 #endif
15094         if( status ) return status;
15095 #else
15096         /* Draft 4 pthreads */
15097         status = pthread_create( &t, pthread_attr_default, task, NULL );
15098         if( status ) return errno;
15099
15100         /* give thread a chance to complete */
15101         /* it should remain joinable and hence detachable */
15102         sleep( 1 );
15103
15104         status = pthread_detach( &t );
15105         if( status ) return errno;
15106 #endif
15107
15108 #ifdef HAVE_LINUX_THREADS
15109         pthread_kill_other_threads_np();
15110 #endif
15111
15112         return 0;
15113
15114 }
15115
15116 EOF
15117 if { (eval echo configure:15118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15118 then
15119   ol_cv_pthread_create_works=yes
15120 else
15121   echo "configure: failed program was:" >&5
15122   cat conftest.$ac_ext >&5
15123   rm -fr conftest*
15124   ol_cv_pthread_create_works=no
15125 fi
15126 rm -fr conftest*
15127 fi
15128
15129 fi
15130
15131 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15132
15133                         if test $ol_cv_pthread_create_works = no ; then
15134                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15135                         fi
15136
15137                                                 if test $ol_with_yielding_select = auto ; then
15138                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15139 echo "configure:15140: checking if select yields when using pthreads" >&5
15140 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15141   echo $ac_n "(cached) $ac_c" 1>&6
15142 else
15143   
15144                                 if test "$cross_compiling" = yes; then
15145   ol_cv_pthread_select_yields=cross
15146 else
15147   cat > conftest.$ac_ext <<EOF
15148 #line 15149 "configure"
15149 #include "confdefs.h"
15150
15151 #include <sys/types.h>
15152 #include <sys/time.h>
15153 #include <unistd.h>
15154 #include <pthread.h>
15155 #ifndef NULL
15156 #define NULL (void*) 0
15157 #endif
15158
15159 static int fildes[2];
15160
15161 static void *task(p)
15162         void *p;
15163 {
15164         int i;
15165         struct timeval tv;
15166
15167         fd_set rfds;
15168
15169         tv.tv_sec=10;
15170         tv.tv_usec=0;
15171
15172         FD_ZERO(&rfds);
15173         FD_SET(fildes[0], &rfds);
15174
15175         /* we're not interested in any fds */
15176         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15177
15178         if(i < 0) {
15179                 perror("select");
15180                 exit(10);
15181         }
15182
15183         exit(0); /* if we exit here, the select blocked the whole process */
15184 }
15185
15186 int main(argc, argv)
15187         int argc;
15188         char **argv;
15189 {
15190         pthread_t t;
15191
15192         /* create a pipe to select */
15193         if(pipe(&fildes[0])) {
15194                 perror("select");
15195                 exit(1);
15196         }
15197
15198 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15199         (void) pthread_setconcurrency(2);
15200 #else
15201 #ifdef HAVE_THR_SETCONCURRENCY
15202         /* Set Solaris LWP concurrency to 2 */
15203         thr_setconcurrency(2);
15204 #endif
15205 #endif
15206
15207 #if HAVE_PTHREADS < 6
15208         pthread_create(&t, pthread_attr_default, task, NULL);
15209 #else
15210         pthread_create(&t, NULL, task, NULL);
15211 #endif
15212
15213         /* make sure task runs first */
15214 #if HAVE_THR_YIELD
15215         thr_yield();
15216 #elif defined( HAVE_SCHED_YIELD )
15217         sched_yield();
15218 #elif defined( HAVE_PTHREAD_YIELD )
15219         pthread_yield();
15220 #endif
15221
15222         exit(2);
15223 }
15224 EOF
15225 if { (eval echo configure:15226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15226 then
15227   ol_cv_pthread_select_yields=no
15228 else
15229   echo "configure: failed program was:" >&5
15230   cat conftest.$ac_ext >&5
15231   rm -fr conftest*
15232   ol_cv_pthread_select_yields=yes
15233 fi
15234 rm -fr conftest*
15235 fi
15236
15237 fi
15238
15239 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15240
15241                                 if test $ol_cv_pthread_select_yields = cross ; then
15242                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15243                                 fi
15244
15245                                 if test $ol_cv_pthread_select_yields = yes ; then
15246                                         ol_with_yielding_select=yes
15247                                 fi
15248                         fi
15249
15250                                                 CPPFLAGS="$save_CPPFLAGS"
15251                         LIBS="$save_LIBS"
15252                 else
15253                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15254                 fi
15255         fi
15256
15257         if test $ol_with_threads = posix ; then
15258                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15259         fi
15260 fi
15261
15262 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15263         -o $ol_with_threads = mach ; then
15264
15265                 for ac_hdr in mach/cthreads.h cthreads.h
15266 do
15267 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15268 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15269 echo "configure:15270: checking for $ac_hdr" >&5
15270 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15271   echo $ac_n "(cached) $ac_c" 1>&6
15272 else
15273   cat > conftest.$ac_ext <<EOF
15274 #line 15275 "configure"
15275 #include "confdefs.h"
15276 #include <$ac_hdr>
15277 EOF
15278 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15279 { (eval echo configure:15280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15280 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15281 if test -z "$ac_err"; then
15282   rm -rf conftest*
15283   eval "ac_cv_header_$ac_safe=yes"
15284 else
15285   echo "$ac_err" >&5
15286   echo "configure: failed program was:" >&5
15287   cat conftest.$ac_ext >&5
15288   rm -rf conftest*
15289   eval "ac_cv_header_$ac_safe=no"
15290 fi
15291 rm -f conftest*
15292 fi
15293 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15294   echo "$ac_t""yes" 1>&6
15295     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15296   cat >> confdefs.h <<EOF
15297 #define $ac_tr_hdr 1
15298 EOF
15299  
15300 else
15301   echo "$ac_t""no" 1>&6
15302 fi
15303 done
15304
15305         if test $ac_cv_header_mach_cthreads_h = yes ; then
15306                 ol_with_threads=found
15307
15308                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15309 echo "configure:15310: checking for cthread_fork" >&5
15310 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15311   echo $ac_n "(cached) $ac_c" 1>&6
15312 else
15313   cat > conftest.$ac_ext <<EOF
15314 #line 15315 "configure"
15315 #include "confdefs.h"
15316 /* System header to define __stub macros and hopefully few prototypes,
15317     which can conflict with char cthread_fork(); below.  */
15318 #include <assert.h>
15319 /* Override any gcc2 internal prototype to avoid an error.  */
15320 /* We use char because int might match the return type of a gcc2
15321     builtin and then its argument prototype would still apply.  */
15322 char cthread_fork();
15323 char (*f)();
15324
15325 int main() {
15326
15327 /* The GNU C library defines this for functions which it implements
15328     to always fail with ENOSYS.  Some functions are actually named
15329     something starting with __ and the normal name is an alias.  */
15330 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15331 choke me
15332 #else
15333 f = cthread_fork;
15334 #endif
15335
15336 ; return 0; }
15337 EOF
15338 if { (eval echo configure:15339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15339   rm -rf conftest*
15340   eval "ac_cv_func_cthread_fork=yes"
15341 else
15342   echo "configure: failed program was:" >&5
15343   cat conftest.$ac_ext >&5
15344   rm -rf conftest*
15345   eval "ac_cv_func_cthread_fork=no"
15346 fi
15347 rm -f conftest*
15348 fi
15349
15350 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15351   echo "$ac_t""yes" 1>&6
15352   ol_link_threads=yes
15353 else
15354   echo "$ac_t""no" 1>&6
15355 fi
15356
15357
15358                 if test $ol_link_threads = no ; then
15359                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15360 echo "configure:15361: checking for cthread_fork with -all_load" >&5
15361 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15362   echo $ac_n "(cached) $ac_c" 1>&6
15363 else
15364   
15365                                                                 save_LIBS="$LIBS"
15366                                 LIBS="-all_load $LIBS"
15367                                 cat > conftest.$ac_ext <<EOF
15368 #line 15369 "configure"
15369 #include "confdefs.h"
15370 #include <mach/cthreads.h>
15371 int main() {
15372
15373                                         cthread_fork((void *)0, (void *)0);
15374                                         
15375 ; return 0; }
15376 EOF
15377 if { (eval echo configure:15378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15378   rm -rf conftest*
15379   ol_cv_cthread_all_load=yes
15380 else
15381   echo "configure: failed program was:" >&5
15382   cat conftest.$ac_ext >&5
15383   rm -rf conftest*
15384   ol_cv_cthread_all_load=no
15385 fi
15386 rm -f conftest*
15387                                                                 LIBS="$save_LIBS"
15388                         
15389 fi
15390
15391 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15392
15393                         if test $ol_cv_cthread_all_load = yes ; then
15394                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15395                                 ol_link_threads=mach
15396                                 ol_with_threads=found
15397                         fi
15398                 fi
15399
15400         elif test $ac_cv_header_cthreads_h = yes ; then
15401                                 
15402                 ol_with_threads=found
15403  
15404                                 save_LIBS="$LIBS"
15405                 LIBS="$LIBS -lthreads"
15406                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15407 echo "configure:15408: checking for cthread_fork" >&5
15408 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15409   echo $ac_n "(cached) $ac_c" 1>&6
15410 else
15411   cat > conftest.$ac_ext <<EOF
15412 #line 15413 "configure"
15413 #include "confdefs.h"
15414 /* System header to define __stub macros and hopefully few prototypes,
15415     which can conflict with char cthread_fork(); below.  */
15416 #include <assert.h>
15417 /* Override any gcc2 internal prototype to avoid an error.  */
15418 /* We use char because int might match the return type of a gcc2
15419     builtin and then its argument prototype would still apply.  */
15420 char cthread_fork();
15421 char (*f)();
15422
15423 int main() {
15424
15425 /* The GNU C library defines this for functions which it implements
15426     to always fail with ENOSYS.  Some functions are actually named
15427     something starting with __ and the normal name is an alias.  */
15428 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15429 choke me
15430 #else
15431 f = cthread_fork;
15432 #endif
15433
15434 ; return 0; }
15435 EOF
15436 if { (eval echo configure:15437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15437   rm -rf conftest*
15438   eval "ac_cv_func_cthread_fork=yes"
15439 else
15440   echo "configure: failed program was:" >&5
15441   cat conftest.$ac_ext >&5
15442   rm -rf conftest*
15443   eval "ac_cv_func_cthread_fork=no"
15444 fi
15445 rm -f conftest*
15446 fi
15447
15448 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15449   echo "$ac_t""yes" 1>&6
15450   ol_link_threads=yes
15451 else
15452   echo "$ac_t""no" 1>&6
15453 fi
15454
15455                 LIBS="$save_LIBS"
15456
15457                 if test $ol_link_threads = yes ; then
15458                         LTHREAD_LIBS="-lthreads"
15459                         ol_link_threads=mach
15460                         ol_with_threads=found
15461                 else
15462                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15463                 fi
15464
15465         elif test $ol_with_threads = mach ; then
15466                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15467         fi
15468
15469         if test $ol_link_threads = mach ; then
15470                 cat >> confdefs.h <<\EOF
15471 #define HAVE_MACH_CTHREADS 1
15472 EOF
15473
15474         elif test $ol_with_threads = found ; then
15475                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15476         fi
15477 fi
15478
15479 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15480         -o $ol_with_threads = pth ; then
15481
15482         for ac_hdr in pth.h
15483 do
15484 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15485 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15486 echo "configure:15487: checking for $ac_hdr" >&5
15487 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15488   echo $ac_n "(cached) $ac_c" 1>&6
15489 else
15490   cat > conftest.$ac_ext <<EOF
15491 #line 15492 "configure"
15492 #include "confdefs.h"
15493 #include <$ac_hdr>
15494 EOF
15495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15496 { (eval echo configure:15497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15498 if test -z "$ac_err"; then
15499   rm -rf conftest*
15500   eval "ac_cv_header_$ac_safe=yes"
15501 else
15502   echo "$ac_err" >&5
15503   echo "configure: failed program was:" >&5
15504   cat conftest.$ac_ext >&5
15505   rm -rf conftest*
15506   eval "ac_cv_header_$ac_safe=no"
15507 fi
15508 rm -f conftest*
15509 fi
15510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15511   echo "$ac_t""yes" 1>&6
15512     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15513   cat >> confdefs.h <<EOF
15514 #define $ac_tr_hdr 1
15515 EOF
15516  
15517 else
15518   echo "$ac_t""no" 1>&6
15519 fi
15520 done
15521
15522
15523         if test $ac_cv_header_pth_h = yes ; then
15524                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15525 echo "configure:15526: checking for pth_version in -lpth" >&5
15526 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15527 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15528   echo $ac_n "(cached) $ac_c" 1>&6
15529 else
15530   ac_save_LIBS="$LIBS"
15531 LIBS="-lpth  $LIBS"
15532 cat > conftest.$ac_ext <<EOF
15533 #line 15534 "configure"
15534 #include "confdefs.h"
15535 /* Override any gcc2 internal prototype to avoid an error.  */
15536 /* We use char because int might match the return type of a gcc2
15537     builtin and then its argument prototype would still apply.  */
15538 char pth_version();
15539
15540 int main() {
15541 pth_version()
15542 ; return 0; }
15543 EOF
15544 if { (eval echo configure:15545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15545   rm -rf conftest*
15546   eval "ac_cv_lib_$ac_lib_var=yes"
15547 else
15548   echo "configure: failed program was:" >&5
15549   cat conftest.$ac_ext >&5
15550   rm -rf conftest*
15551   eval "ac_cv_lib_$ac_lib_var=no"
15552 fi
15553 rm -f conftest*
15554 LIBS="$ac_save_LIBS"
15555
15556 fi
15557 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15558   echo "$ac_t""yes" 1>&6
15559   have_pth=yes
15560 else
15561   echo "$ac_t""no" 1>&6
15562 have_pth=no
15563 fi
15564
15565
15566                 if test $have_pth = yes ; then
15567                         cat >> confdefs.h <<\EOF
15568 #define HAVE_GNU_PTH 1
15569 EOF
15570
15571                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15572                         ol_link_threads=pth
15573                         ol_with_threads=found
15574
15575                         if test $ol_with_yielding_select = auto ; then
15576                                 ol_with_yielding_select=yes
15577                         fi
15578                 fi
15579         fi
15580 fi
15581
15582 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15583         -o $ol_with_threads = lwp ; then
15584
15585                 for ac_hdr in thread.h synch.h
15586 do
15587 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15588 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15589 echo "configure:15590: checking for $ac_hdr" >&5
15590 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15591   echo $ac_n "(cached) $ac_c" 1>&6
15592 else
15593   cat > conftest.$ac_ext <<EOF
15594 #line 15595 "configure"
15595 #include "confdefs.h"
15596 #include <$ac_hdr>
15597 EOF
15598 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15599 { (eval echo configure:15600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15600 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15601 if test -z "$ac_err"; then
15602   rm -rf conftest*
15603   eval "ac_cv_header_$ac_safe=yes"
15604 else
15605   echo "$ac_err" >&5
15606   echo "configure: failed program was:" >&5
15607   cat conftest.$ac_ext >&5
15608   rm -rf conftest*
15609   eval "ac_cv_header_$ac_safe=no"
15610 fi
15611 rm -f conftest*
15612 fi
15613 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15614   echo "$ac_t""yes" 1>&6
15615     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15616   cat >> confdefs.h <<EOF
15617 #define $ac_tr_hdr 1
15618 EOF
15619  
15620 else
15621   echo "$ac_t""no" 1>&6
15622 fi
15623 done
15624
15625         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15626                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15627 echo "configure:15628: checking for thr_create in -lthread" >&5
15628 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15630   echo $ac_n "(cached) $ac_c" 1>&6
15631 else
15632   ac_save_LIBS="$LIBS"
15633 LIBS="-lthread  $LIBS"
15634 cat > conftest.$ac_ext <<EOF
15635 #line 15636 "configure"
15636 #include "confdefs.h"
15637 /* Override any gcc2 internal prototype to avoid an error.  */
15638 /* We use char because int might match the return type of a gcc2
15639     builtin and then its argument prototype would still apply.  */
15640 char thr_create();
15641
15642 int main() {
15643 thr_create()
15644 ; return 0; }
15645 EOF
15646 if { (eval echo configure:15647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15647   rm -rf conftest*
15648   eval "ac_cv_lib_$ac_lib_var=yes"
15649 else
15650   echo "configure: failed program was:" >&5
15651   cat conftest.$ac_ext >&5
15652   rm -rf conftest*
15653   eval "ac_cv_lib_$ac_lib_var=no"
15654 fi
15655 rm -f conftest*
15656 LIBS="$ac_save_LIBS"
15657
15658 fi
15659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15660   echo "$ac_t""yes" 1>&6
15661   have_thr=yes
15662 else
15663   echo "$ac_t""no" 1>&6
15664 have_thr=no
15665 fi
15666
15667
15668                 if test $have_thr = yes ; then
15669                         cat >> confdefs.h <<\EOF
15670 #define HAVE_THR 1
15671 EOF
15672
15673                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15674                         ol_link_threads=thr
15675
15676                         if test $ol_with_yielding_select = auto ; then
15677                                 ol_with_yielding_select=yes
15678                         fi
15679
15680                                                 for ac_func in \
15681                                 thr_setconcurrency \
15682                                 thr_getconcurrency \
15683                         
15684 do
15685 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15686 echo "configure:15687: checking for $ac_func" >&5
15687 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15688   echo $ac_n "(cached) $ac_c" 1>&6
15689 else
15690   cat > conftest.$ac_ext <<EOF
15691 #line 15692 "configure"
15692 #include "confdefs.h"
15693 /* System header to define __stub macros and hopefully few prototypes,
15694     which can conflict with char $ac_func(); below.  */
15695 #include <assert.h>
15696 /* Override any gcc2 internal prototype to avoid an error.  */
15697 /* We use char because int might match the return type of a gcc2
15698     builtin and then its argument prototype would still apply.  */
15699 char $ac_func();
15700 char (*f)();
15701
15702 int main() {
15703
15704 /* The GNU C library defines this for functions which it implements
15705     to always fail with ENOSYS.  Some functions are actually named
15706     something starting with __ and the normal name is an alias.  */
15707 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15708 choke me
15709 #else
15710 f = $ac_func;
15711 #endif
15712
15713 ; return 0; }
15714 EOF
15715 if { (eval echo configure:15716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15716   rm -rf conftest*
15717   eval "ac_cv_func_$ac_func=yes"
15718 else
15719   echo "configure: failed program was:" >&5
15720   cat conftest.$ac_ext >&5
15721   rm -rf conftest*
15722   eval "ac_cv_func_$ac_func=no"
15723 fi
15724 rm -f conftest*
15725 fi
15726
15727 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15728   echo "$ac_t""yes" 1>&6
15729     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15730   cat >> confdefs.h <<EOF
15731 #define $ac_tr_func 1
15732 EOF
15733  
15734 else
15735   echo "$ac_t""no" 1>&6
15736 fi
15737 done
15738
15739                 fi
15740         fi
15741
15742                 for ac_hdr in lwp/lwp.h
15743 do
15744 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15745 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15746 echo "configure:15747: checking for $ac_hdr" >&5
15747 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15748   echo $ac_n "(cached) $ac_c" 1>&6
15749 else
15750   cat > conftest.$ac_ext <<EOF
15751 #line 15752 "configure"
15752 #include "confdefs.h"
15753 #include <$ac_hdr>
15754 EOF
15755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15756 { (eval echo configure:15757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15758 if test -z "$ac_err"; then
15759   rm -rf conftest*
15760   eval "ac_cv_header_$ac_safe=yes"
15761 else
15762   echo "$ac_err" >&5
15763   echo "configure: failed program was:" >&5
15764   cat conftest.$ac_ext >&5
15765   rm -rf conftest*
15766   eval "ac_cv_header_$ac_safe=no"
15767 fi
15768 rm -f conftest*
15769 fi
15770 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15771   echo "$ac_t""yes" 1>&6
15772     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15773   cat >> confdefs.h <<EOF
15774 #define $ac_tr_hdr 1
15775 EOF
15776  
15777 else
15778   echo "$ac_t""no" 1>&6
15779 fi
15780 done
15781
15782         if test $ac_cv_header_lwp_lwp_h = yes ; then
15783                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15784 echo "configure:15785: checking for lwp_create in -llwp" >&5
15785 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15786 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15787   echo $ac_n "(cached) $ac_c" 1>&6
15788 else
15789   ac_save_LIBS="$LIBS"
15790 LIBS="-llwp  $LIBS"
15791 cat > conftest.$ac_ext <<EOF
15792 #line 15793 "configure"
15793 #include "confdefs.h"
15794 /* Override any gcc2 internal prototype to avoid an error.  */
15795 /* We use char because int might match the return type of a gcc2
15796     builtin and then its argument prototype would still apply.  */
15797 char lwp_create();
15798
15799 int main() {
15800 lwp_create()
15801 ; return 0; }
15802 EOF
15803 if { (eval echo configure:15804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15804   rm -rf conftest*
15805   eval "ac_cv_lib_$ac_lib_var=yes"
15806 else
15807   echo "configure: failed program was:" >&5
15808   cat conftest.$ac_ext >&5
15809   rm -rf conftest*
15810   eval "ac_cv_lib_$ac_lib_var=no"
15811 fi
15812 rm -f conftest*
15813 LIBS="$ac_save_LIBS"
15814
15815 fi
15816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15817   echo "$ac_t""yes" 1>&6
15818   have_lwp=yes
15819 else
15820   echo "$ac_t""no" 1>&6
15821 have_lwp=no
15822 fi
15823
15824
15825                 if test $have_lwp = yes ; then
15826                         cat >> confdefs.h <<\EOF
15827 #define HAVE_LWP 1
15828 EOF
15829
15830                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15831                         ol_link_threads=lwp
15832
15833                         if test $ol_with_yielding_select = auto ; then
15834                                 ol_with_yielding_select=no
15835                         fi
15836                 fi
15837         fi
15838 fi
15839
15840 if test $ol_with_yielding_select = yes ; then
15841         cat >> confdefs.h <<\EOF
15842 #define HAVE_YIELDING_SELECT 1
15843 EOF
15844
15845 fi
15846
15847 if test $ol_with_threads = manual ; then
15848                 ol_link_threads=yes
15849
15850         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15851
15852         for ac_hdr in pthread.h sched.h
15853 do
15854 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15855 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15856 echo "configure:15857: checking for $ac_hdr" >&5
15857 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15858   echo $ac_n "(cached) $ac_c" 1>&6
15859 else
15860   cat > conftest.$ac_ext <<EOF
15861 #line 15862 "configure"
15862 #include "confdefs.h"
15863 #include <$ac_hdr>
15864 EOF
15865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15866 { (eval echo configure:15867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15868 if test -z "$ac_err"; then
15869   rm -rf conftest*
15870   eval "ac_cv_header_$ac_safe=yes"
15871 else
15872   echo "$ac_err" >&5
15873   echo "configure: failed program was:" >&5
15874   cat conftest.$ac_ext >&5
15875   rm -rf conftest*
15876   eval "ac_cv_header_$ac_safe=no"
15877 fi
15878 rm -f conftest*
15879 fi
15880 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15881   echo "$ac_t""yes" 1>&6
15882     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15883   cat >> confdefs.h <<EOF
15884 #define $ac_tr_hdr 1
15885 EOF
15886  
15887 else
15888   echo "$ac_t""no" 1>&6
15889 fi
15890 done
15891
15892         for ac_func in sched_yield pthread_yield
15893 do
15894 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15895 echo "configure:15896: checking for $ac_func" >&5
15896 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15897   echo $ac_n "(cached) $ac_c" 1>&6
15898 else
15899   cat > conftest.$ac_ext <<EOF
15900 #line 15901 "configure"
15901 #include "confdefs.h"
15902 /* System header to define __stub macros and hopefully few prototypes,
15903     which can conflict with char $ac_func(); below.  */
15904 #include <assert.h>
15905 /* Override any gcc2 internal prototype to avoid an error.  */
15906 /* We use char because int might match the return type of a gcc2
15907     builtin and then its argument prototype would still apply.  */
15908 char $ac_func();
15909 char (*f)();
15910
15911 int main() {
15912
15913 /* The GNU C library defines this for functions which it implements
15914     to always fail with ENOSYS.  Some functions are actually named
15915     something starting with __ and the normal name is an alias.  */
15916 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15917 choke me
15918 #else
15919 f = $ac_func;
15920 #endif
15921
15922 ; return 0; }
15923 EOF
15924 if { (eval echo configure:15925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15925   rm -rf conftest*
15926   eval "ac_cv_func_$ac_func=yes"
15927 else
15928   echo "configure: failed program was:" >&5
15929   cat conftest.$ac_ext >&5
15930   rm -rf conftest*
15931   eval "ac_cv_func_$ac_func=no"
15932 fi
15933 rm -f conftest*
15934 fi
15935
15936 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15937   echo "$ac_t""yes" 1>&6
15938     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15939   cat >> confdefs.h <<EOF
15940 #define $ac_tr_func 1
15941 EOF
15942  
15943 else
15944   echo "$ac_t""no" 1>&6
15945 fi
15946 done
15947
15948         
15949         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15950 echo "configure:15951: checking for LinuxThreads pthread.h" >&5
15951 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15952   echo $ac_n "(cached) $ac_c" 1>&6
15953 else
15954   cat > conftest.$ac_ext <<EOF
15955 #line 15956 "configure"
15956 #include "confdefs.h"
15957 #include <pthread.h>
15958 EOF
15959 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15960   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15961   rm -rf conftest*
15962   ol_cv_header_linux_threads=yes
15963 else
15964   rm -rf conftest*
15965   ol_cv_header_linux_threads=no
15966 fi
15967 rm -f conftest*
15968
15969                 
15970 fi
15971
15972 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15973         if test $ol_cv_header_linux_threads = yes; then
15974                 cat >> confdefs.h <<\EOF
15975 #define HAVE_LINUX_THREADS 1
15976 EOF
15977
15978         fi
15979
15980
15981         for ac_hdr in mach/cthreads.h
15982 do
15983 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15984 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15985 echo "configure:15986: checking for $ac_hdr" >&5
15986 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15987   echo $ac_n "(cached) $ac_c" 1>&6
15988 else
15989   cat > conftest.$ac_ext <<EOF
15990 #line 15991 "configure"
15991 #include "confdefs.h"
15992 #include <$ac_hdr>
15993 EOF
15994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15995 { (eval echo configure:15996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15996 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15997 if test -z "$ac_err"; then
15998   rm -rf conftest*
15999   eval "ac_cv_header_$ac_safe=yes"
16000 else
16001   echo "$ac_err" >&5
16002   echo "configure: failed program was:" >&5
16003   cat conftest.$ac_ext >&5
16004   rm -rf conftest*
16005   eval "ac_cv_header_$ac_safe=no"
16006 fi
16007 rm -f conftest*
16008 fi
16009 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16010   echo "$ac_t""yes" 1>&6
16011     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16012   cat >> confdefs.h <<EOF
16013 #define $ac_tr_hdr 1
16014 EOF
16015  
16016 else
16017   echo "$ac_t""no" 1>&6
16018 fi
16019 done
16020
16021         for ac_hdr in lwp/lwp.h
16022 do
16023 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16024 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16025 echo "configure:16026: checking for $ac_hdr" >&5
16026 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16027   echo $ac_n "(cached) $ac_c" 1>&6
16028 else
16029   cat > conftest.$ac_ext <<EOF
16030 #line 16031 "configure"
16031 #include "confdefs.h"
16032 #include <$ac_hdr>
16033 EOF
16034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16035 { (eval echo configure:16036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16037 if test -z "$ac_err"; then
16038   rm -rf conftest*
16039   eval "ac_cv_header_$ac_safe=yes"
16040 else
16041   echo "$ac_err" >&5
16042   echo "configure: failed program was:" >&5
16043   cat conftest.$ac_ext >&5
16044   rm -rf conftest*
16045   eval "ac_cv_header_$ac_safe=no"
16046 fi
16047 rm -f conftest*
16048 fi
16049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16050   echo "$ac_t""yes" 1>&6
16051     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16052   cat >> confdefs.h <<EOF
16053 #define $ac_tr_hdr 1
16054 EOF
16055  
16056 else
16057   echo "$ac_t""no" 1>&6
16058 fi
16059 done
16060
16061         for ac_hdr in thread.h synch.h
16062 do
16063 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16064 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16065 echo "configure:16066: checking for $ac_hdr" >&5
16066 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16067   echo $ac_n "(cached) $ac_c" 1>&6
16068 else
16069   cat > conftest.$ac_ext <<EOF
16070 #line 16071 "configure"
16071 #include "confdefs.h"
16072 #include <$ac_hdr>
16073 EOF
16074 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16075 { (eval echo configure:16076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16076 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16077 if test -z "$ac_err"; then
16078   rm -rf conftest*
16079   eval "ac_cv_header_$ac_safe=yes"
16080 else
16081   echo "$ac_err" >&5
16082   echo "configure: failed program was:" >&5
16083   cat conftest.$ac_ext >&5
16084   rm -rf conftest*
16085   eval "ac_cv_header_$ac_safe=no"
16086 fi
16087 rm -f conftest*
16088 fi
16089 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16090   echo "$ac_t""yes" 1>&6
16091     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16092   cat >> confdefs.h <<EOF
16093 #define $ac_tr_hdr 1
16094 EOF
16095  
16096 else
16097   echo "$ac_t""no" 1>&6
16098 fi
16099 done
16100
16101 fi
16102
16103 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16104                         cat >> confdefs.h <<\EOF
16105 #define REENTRANT 1
16106 EOF
16107
16108         cat >> confdefs.h <<\EOF
16109 #define _REENTRANT 1
16110 EOF
16111
16112         cat >> confdefs.h <<\EOF
16113 #define THREAD_SAFE 1
16114 EOF
16115
16116         cat >> confdefs.h <<\EOF
16117 #define _THREAD_SAFE 1
16118 EOF
16119
16120         cat >> confdefs.h <<\EOF
16121 #define THREADSAFE 1
16122 EOF
16123
16124         cat >> confdefs.h <<\EOF
16125 #define _THREADSAFE 1
16126 EOF
16127
16128         cat >> confdefs.h <<\EOF
16129 #define _SGI_MP_SOURCE 1
16130 EOF
16131
16132
16133                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16134 echo "configure:16135: checking for thread specific errno" >&5
16135 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16136   echo $ac_n "(cached) $ac_c" 1>&6
16137 else
16138   
16139                 cat > conftest.$ac_ext <<EOF
16140 #line 16141 "configure"
16141 #include "confdefs.h"
16142 #include <errno.h>
16143 int main() {
16144 errno = 0;
16145 ; return 0; }
16146 EOF
16147 if { (eval echo configure:16148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16148   rm -rf conftest*
16149   ol_cv_errno_thread_specific=yes
16150 else
16151   echo "configure: failed program was:" >&5
16152   cat conftest.$ac_ext >&5
16153   rm -rf conftest*
16154   ol_cv_errno_thread_specific=no
16155 fi
16156 rm -f conftest*
16157         
16158 fi
16159
16160 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16161
16162                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16163 echo "configure:16164: checking for thread specific h_errno" >&5
16164 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16165   echo $ac_n "(cached) $ac_c" 1>&6
16166 else
16167   
16168                 cat > conftest.$ac_ext <<EOF
16169 #line 16170 "configure"
16170 #include "confdefs.h"
16171 #include <netdb.h>
16172 int main() {
16173 h_errno = 0;
16174 ; return 0; }
16175 EOF
16176 if { (eval echo configure:16177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16177   rm -rf conftest*
16178   ol_cv_h_errno_thread_specific=yes
16179 else
16180   echo "configure: failed program was:" >&5
16181   cat conftest.$ac_ext >&5
16182   rm -rf conftest*
16183   ol_cv_h_errno_thread_specific=no
16184 fi
16185 rm -f conftest*
16186         
16187 fi
16188
16189 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16190
16191         if test $ol_cv_errno_thread_specific != yes \
16192                 -o $ol_cv_h_errno_thread_specific != yes ; then
16193                 LIBS="$LTHREAD_LIBS $LIBS"
16194                 LTHREAD_LIBS=""
16195         fi
16196
16197 fi  
16198
16199 if test $ol_link_threads = no ; then
16200         if test $ol_with_threads = yes ; then
16201                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16202         fi
16203
16204         if test $ol_with_threads = auto ; then
16205                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16206                 ol_with_threads=no
16207         fi
16208
16209         cat >> confdefs.h <<\EOF
16210 #define NO_THREADS 1
16211 EOF
16212
16213         LTHREAD_LIBS=""
16214 fi
16215
16216 if test $ol_link_threads != no ; then
16217         cat >> confdefs.h <<\EOF
16218 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16219 EOF
16220
16221 fi
16222
16223 for ac_func in \
16224         ctime_r                 \
16225         gethostbyname_r gethostbyaddr_r \
16226
16227 do
16228 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16229 echo "configure:16230: checking for $ac_func" >&5
16230 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16231   echo $ac_n "(cached) $ac_c" 1>&6
16232 else
16233   cat > conftest.$ac_ext <<EOF
16234 #line 16235 "configure"
16235 #include "confdefs.h"
16236 /* System header to define __stub macros and hopefully few prototypes,
16237     which can conflict with char $ac_func(); below.  */
16238 #include <assert.h>
16239 /* Override any gcc2 internal prototype to avoid an error.  */
16240 /* We use char because int might match the return type of a gcc2
16241     builtin and then its argument prototype would still apply.  */
16242 char $ac_func();
16243 char (*f)();
16244
16245 int main() {
16246
16247 /* The GNU C library defines this for functions which it implements
16248     to always fail with ENOSYS.  Some functions are actually named
16249     something starting with __ and the normal name is an alias.  */
16250 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16251 choke me
16252 #else
16253 f = $ac_func;
16254 #endif
16255
16256 ; return 0; }
16257 EOF
16258 if { (eval echo configure:16259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16259   rm -rf conftest*
16260   eval "ac_cv_func_$ac_func=yes"
16261 else
16262   echo "configure: failed program was:" >&5
16263   cat conftest.$ac_ext >&5
16264   rm -rf conftest*
16265   eval "ac_cv_func_$ac_func=no"
16266 fi
16267 rm -f conftest*
16268 fi
16269
16270 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16271   echo "$ac_t""yes" 1>&6
16272     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16273   cat >> confdefs.h <<EOF
16274 #define $ac_tr_func 1
16275 EOF
16276  
16277 else
16278   echo "$ac_t""no" 1>&6
16279 fi
16280 done
16281
16282
16283 if test "$ac_cv_func_ctime_r" = no ; then
16284         ol_cv_func_ctime_r_nargs=0
16285 else
16286         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16287 echo "configure:16288: checking number of arguments of ctime_r" >&5
16288 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16289   echo $ac_n "(cached) $ac_c" 1>&6
16290 else
16291   cat > conftest.$ac_ext <<EOF
16292 #line 16293 "configure"
16293 #include "confdefs.h"
16294 #include <time.h>
16295 int main() {
16296 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16297 ; return 0; }
16298 EOF
16299 if { (eval echo configure:16300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16300   rm -rf conftest*
16301   ol_cv_func_ctime_r_nargs3=yes
16302 else
16303   echo "configure: failed program was:" >&5
16304   cat conftest.$ac_ext >&5
16305   rm -rf conftest*
16306   ol_cv_func_ctime_r_nargs3=no
16307 fi
16308 rm -f conftest*
16309
16310         cat > conftest.$ac_ext <<EOF
16311 #line 16312 "configure"
16312 #include "confdefs.h"
16313 #include <time.h>
16314 int main() {
16315 time_t ti; char *buffer; ctime_r(&ti,buffer);
16316 ; return 0; }
16317 EOF
16318 if { (eval echo configure:16319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16319   rm -rf conftest*
16320   ol_cv_func_ctime_r_nargs2=yes
16321 else
16322   echo "configure: failed program was:" >&5
16323   cat conftest.$ac_ext >&5
16324   rm -rf conftest*
16325   ol_cv_func_ctime_r_nargs2=no
16326 fi
16327 rm -f conftest*
16328
16329         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16330                 $ol_cv_func_ctime_r_nargs2 = no ; then
16331
16332                 ol_cv_func_ctime_r_nargs=3
16333
16334         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16335                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16336
16337                 ol_cv_func_ctime_r_nargs=2
16338
16339         else
16340                 ol_cv_func_ctime_r_nargs=0
16341         fi
16342   
16343 fi
16344
16345 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16346
16347   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16348         cat >> confdefs.h <<EOF
16349 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16350 EOF
16351
16352   fi
16353
16354 fi
16355
16356 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16357         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16358 echo "configure:16359: checking number of arguments of gethostbyname_r" >&5
16359 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16360   echo $ac_n "(cached) $ac_c" 1>&6
16361 else
16362   cat > conftest.$ac_ext <<EOF
16363 #line 16364 "configure"
16364 #include "confdefs.h"
16365 #include <sys/types.h>
16366 #include <sys/socket.h>
16367 #include <netinet/in.h>
16368 #include <netdb.h>
16369 #define BUFSIZE (sizeof(struct hostent)+10)
16370 int main() {
16371 struct hostent hent; char buffer[BUFSIZE];
16372                 int bufsize=BUFSIZE;int h_errno;
16373                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16374                         buffer, bufsize, &h_errno);
16375 ; return 0; }
16376 EOF
16377 if { (eval echo configure:16378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16378   rm -rf conftest*
16379   ol_cv_func_gethostbyname_r_nargs5=yes
16380 else
16381   echo "configure: failed program was:" >&5
16382   cat conftest.$ac_ext >&5
16383   rm -rf conftest*
16384   ol_cv_func_gethostbyname_r_nargs5=no
16385 fi
16386 rm -f conftest*
16387
16388         cat > conftest.$ac_ext <<EOF
16389 #line 16390 "configure"
16390 #include "confdefs.h"
16391 #include <sys/types.h>
16392 #include <sys/socket.h>
16393 #include <netinet/in.h>
16394 #include <netdb.h>
16395 #define BUFSIZE (sizeof(struct hostent)+10)
16396 int main() {
16397 struct hostent hent;struct hostent *rhent;
16398                 char buffer[BUFSIZE];
16399                 int bufsize=BUFSIZE;int h_errno;
16400                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16401                         &rhent, &h_errno);
16402 ; return 0; }
16403 EOF
16404 if { (eval echo configure:16405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16405   rm -rf conftest*
16406   ol_cv_func_gethostbyname_r_nargs6=yes
16407 else
16408   echo "configure: failed program was:" >&5
16409   cat conftest.$ac_ext >&5
16410   rm -rf conftest*
16411   ol_cv_func_gethostbyname_r_nargs6=no
16412 fi
16413 rm -f conftest*
16414
16415         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16416                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16417
16418                 ol_cv_func_gethostbyname_r_nargs=5
16419
16420         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16421                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16422
16423                 ol_cv_func_gethostbyname_r_nargs=6
16424
16425         else
16426                 ol_cv_func_gethostbyname_r_nargs=0
16427         fi
16428   
16429 fi
16430
16431 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16432   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16433         cat >> confdefs.h <<EOF
16434 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16435 EOF
16436
16437   fi
16438
16439 else
16440         ol_cv_func_gethostbyname_r_nargs=0
16441 fi
16442  
16443 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16444         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16445 echo "configure:16446: checking number of arguments of gethostbyaddr_r" >&5
16446 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16447   echo $ac_n "(cached) $ac_c" 1>&6
16448 else
16449   cat > conftest.$ac_ext <<EOF
16450 #line 16451 "configure"
16451 #include "confdefs.h"
16452 #include <sys/types.h>
16453 #include <sys/socket.h>
16454 #include <netinet/in.h>
16455 #include <netdb.h>
16456 #define BUFSIZE (sizeof(struct hostent)+10)
16457 int main() {
16458 struct hostent hent; char buffer[BUFSIZE]; 
16459             struct in_addr add;
16460             size_t alen=sizeof(struct in_addr);
16461             int bufsize=BUFSIZE;int h_errno;
16462                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16463                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16464 ; return 0; }
16465 EOF
16466 if { (eval echo configure:16467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16467   rm -rf conftest*
16468   ol_cv_func_gethostbyaddr_r_nargs7=yes
16469 else
16470   echo "configure: failed program was:" >&5
16471   cat conftest.$ac_ext >&5
16472   rm -rf conftest*
16473   ol_cv_func_gethostbyaddr_r_nargs7=no
16474 fi
16475 rm -f conftest*
16476
16477         cat > conftest.$ac_ext <<EOF
16478 #line 16479 "configure"
16479 #include "confdefs.h"
16480 #include <sys/types.h>
16481 #include <sys/socket.h>
16482 #include <netinet/in.h>
16483 #include <netdb.h>
16484 #define BUFSIZE (sizeof(struct hostent)+10)
16485 int main() {
16486 struct hostent hent;
16487                 struct hostent *rhent; char buffer[BUFSIZE]; 
16488                 struct in_addr add;
16489                 size_t alen=sizeof(struct in_addr);
16490                 int bufsize=BUFSIZE;int h_errno;
16491                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16492                         alen, AF_INET, &hent, buffer, bufsize, 
16493                         &rhent, &h_errno);
16494 ; return 0; }
16495 EOF
16496 if { (eval echo configure:16497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16497   rm -rf conftest*
16498   ol_cv_func_gethostbyaddr_r_nargs8=yes
16499 else
16500   echo "configure: failed program was:" >&5
16501   cat conftest.$ac_ext >&5
16502   rm -rf conftest*
16503   ol_cv_func_gethostbyaddr_r_nargs8=no
16504 fi
16505 rm -f conftest*
16506
16507         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16508                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16509
16510                 ol_cv_func_gethostbyaddr_r_nargs=7
16511
16512         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16513                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16514
16515                 ol_cv_func_gethostbyaddr_r_nargs=8
16516
16517         else
16518                 ol_cv_func_gethostbyaddr_r_nargs=0
16519         fi
16520   
16521 fi
16522
16523 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16524   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16525     cat >> confdefs.h <<EOF
16526 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16527 EOF
16528
16529   fi
16530
16531 else
16532         ol_cv_func_gethostbyaddr_r_nargs=0
16533 fi
16534
16535 ol_link_ldbm=no 
16536
16537 if test $ol_with_ldbm_api = auto \
16538         -o $ol_with_ldbm_api = berkeley \
16539         -o $ol_with_ldbm_api = bcompat ; then
16540
16541         if test $ol_with_ldbm_api = bcompat; then \
16542                 for ac_hdr in db_185.h db.h
16543 do
16544 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16545 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16546 echo "configure:16547: checking for $ac_hdr" >&5
16547 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16548   echo $ac_n "(cached) $ac_c" 1>&6
16549 else
16550   cat > conftest.$ac_ext <<EOF
16551 #line 16552 "configure"
16552 #include "confdefs.h"
16553 #include <$ac_hdr>
16554 EOF
16555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16556 { (eval echo configure:16557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16558 if test -z "$ac_err"; then
16559   rm -rf conftest*
16560   eval "ac_cv_header_$ac_safe=yes"
16561 else
16562   echo "$ac_err" >&5
16563   echo "configure: failed program was:" >&5
16564   cat conftest.$ac_ext >&5
16565   rm -rf conftest*
16566   eval "ac_cv_header_$ac_safe=no"
16567 fi
16568 rm -f conftest*
16569 fi
16570 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16571   echo "$ac_t""yes" 1>&6
16572     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16573   cat >> confdefs.h <<EOF
16574 #define $ac_tr_hdr 1
16575 EOF
16576  
16577 else
16578   echo "$ac_t""no" 1>&6
16579 fi
16580 done
16581
16582 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16583         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16584 echo "configure:16585: checking if Berkeley DB header compatibility" >&5
16585 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16586   echo $ac_n "(cached) $ac_c" 1>&6
16587 else
16588   
16589                 cat > conftest.$ac_ext <<EOF
16590 #line 16591 "configure"
16591 #include "confdefs.h"
16592
16593 #if HAVE_DB_185_H
16594 #       include <db_185.h>
16595 #else
16596 #       include <db.h>
16597 #endif
16598
16599  /* this check could be improved */
16600 #ifndef DB_VERSION_MAJOR
16601 #       define DB_VERSION_MAJOR 1
16602 #endif
16603
16604 #if DB_VERSION_MAJOR == 1 
16605         __db_version_1
16606 #endif
16607
16608 EOF
16609 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16610   egrep "__db_version_1" >/dev/null 2>&1; then
16611   rm -rf conftest*
16612   ol_cv_header_db1=yes
16613 else
16614   rm -rf conftest*
16615   ol_cv_header_db1=no
16616 fi
16617 rm -f conftest*
16618
16619 fi
16620
16621 echo "$ac_t""$ol_cv_header_db1" 1>&6
16622
16623         if test $ol_cv_header_db1 = yes ; then
16624                 ol_cv_lib_db=no
16625 if test $ol_cv_lib_db = no ; then
16626         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16627 echo "configure:16628: checking for Berkeley DB link (default)" >&5
16628 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16629   echo $ac_n "(cached) $ac_c" 1>&6
16630 else
16631   
16632         ol_DB_LIB=
16633         ol_LIBS=$LIBS
16634         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16635
16636         cat > conftest.$ac_ext <<EOF
16637 #line 16638 "configure"
16638 #include "confdefs.h"
16639
16640 #ifdef HAVE_DB_185_H
16641 # include <db_185.h>
16642 #else
16643 # include <db.h>
16644 #endif
16645
16646 #ifndef DB_VERSION_MAJOR
16647 # define DB_VERSION_MAJOR 1
16648 #endif
16649
16650 #ifndef NULL
16651 #define NULL ((void*)0)
16652 #endif
16653
16654 int main() {
16655
16656 #if DB_VERSION_MAJOR > 1
16657         {
16658                 char *version;
16659                 int major, minor, patch;
16660
16661                 version = db_version( &major, &minor, &patch );
16662
16663                 if( major != DB_VERSION_MAJOR ||
16664                         minor < DB_VERSION_MINOR )
16665                 {
16666                         printf("Berkeley DB version mismatch\n"
16667                                 "\texpected: %s\n\tgot: %s\n",
16668                                 DB_VERSION_STRING, version);
16669                         return 1;
16670                 }
16671         }
16672 #endif
16673
16674 #if DB_VERSION_MAJOR > 2
16675         db_env_create( NULL, 0 );
16676 #elif DB_VERSION_MAJOR > 1
16677         db_appexit( NULL );
16678 #else
16679         (void) dbopen( NULL, 0, 0, 0, NULL);
16680 #endif
16681
16682 ; return 0; }
16683 EOF
16684 if { (eval echo configure:16685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16685   rm -rf conftest*
16686   ol_cv_db_none=yes
16687 else
16688   echo "configure: failed program was:" >&5
16689   cat conftest.$ac_ext >&5
16690   rm -rf conftest*
16691   ol_cv_db_none=no
16692 fi
16693 rm -f conftest*
16694
16695         LIBS="$ol_LIBS"
16696
16697 fi
16698
16699 echo "$ac_t""$ol_cv_db_none" 1>&6
16700
16701         if test $ol_cv_db_none = yes ; then
16702                 ol_cv_lib_db=yes
16703         fi
16704 fi
16705
16706 if test $ol_cv_lib_db = no ; then
16707         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16708 echo "configure:16709: checking for Berkeley DB link (-ldb42)" >&5
16709 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16710   echo $ac_n "(cached) $ac_c" 1>&6
16711 else
16712   
16713         ol_DB_LIB=-ldb42
16714         ol_LIBS=$LIBS
16715         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16716
16717         cat > conftest.$ac_ext <<EOF
16718 #line 16719 "configure"
16719 #include "confdefs.h"
16720
16721 #ifdef HAVE_DB_185_H
16722 # include <db_185.h>
16723 #else
16724 # include <db.h>
16725 #endif
16726
16727 #ifndef DB_VERSION_MAJOR
16728 # define DB_VERSION_MAJOR 1
16729 #endif
16730
16731 #ifndef NULL
16732 #define NULL ((void*)0)
16733 #endif
16734
16735 int main() {
16736
16737 #if DB_VERSION_MAJOR > 1
16738         {
16739                 char *version;
16740                 int major, minor, patch;
16741
16742                 version = db_version( &major, &minor, &patch );
16743
16744                 if( major != DB_VERSION_MAJOR ||
16745                         minor < DB_VERSION_MINOR )
16746                 {
16747                         printf("Berkeley DB version mismatch\n"
16748                                 "\texpected: %s\n\tgot: %s\n",
16749                                 DB_VERSION_STRING, version);
16750                         return 1;
16751                 }
16752         }
16753 #endif
16754
16755 #if DB_VERSION_MAJOR > 2
16756         db_env_create( NULL, 0 );
16757 #elif DB_VERSION_MAJOR > 1
16758         db_appexit( NULL );
16759 #else
16760         (void) dbopen( NULL, 0, 0, 0, NULL);
16761 #endif
16762
16763 ; return 0; }
16764 EOF
16765 if { (eval echo configure:16766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16766   rm -rf conftest*
16767   ol_cv_db_db42=yes
16768 else
16769   echo "configure: failed program was:" >&5
16770   cat conftest.$ac_ext >&5
16771   rm -rf conftest*
16772   ol_cv_db_db42=no
16773 fi
16774 rm -f conftest*
16775
16776         LIBS="$ol_LIBS"
16777
16778 fi
16779
16780 echo "$ac_t""$ol_cv_db_db42" 1>&6
16781
16782         if test $ol_cv_db_db42 = yes ; then
16783                 ol_cv_lib_db=-ldb42
16784         fi
16785 fi
16786
16787 if test $ol_cv_lib_db = no ; then
16788         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16789 echo "configure:16790: checking for Berkeley DB link (-ldb-42)" >&5
16790 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16791   echo $ac_n "(cached) $ac_c" 1>&6
16792 else
16793   
16794         ol_DB_LIB=-ldb-42
16795         ol_LIBS=$LIBS
16796         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16797
16798         cat > conftest.$ac_ext <<EOF
16799 #line 16800 "configure"
16800 #include "confdefs.h"
16801
16802 #ifdef HAVE_DB_185_H
16803 # include <db_185.h>
16804 #else
16805 # include <db.h>
16806 #endif
16807
16808 #ifndef DB_VERSION_MAJOR
16809 # define DB_VERSION_MAJOR 1
16810 #endif
16811
16812 #ifndef NULL
16813 #define NULL ((void*)0)
16814 #endif
16815
16816 int main() {
16817
16818 #if DB_VERSION_MAJOR > 1
16819         {
16820                 char *version;
16821                 int major, minor, patch;
16822
16823                 version = db_version( &major, &minor, &patch );
16824
16825                 if( major != DB_VERSION_MAJOR ||
16826                         minor < DB_VERSION_MINOR )
16827                 {
16828                         printf("Berkeley DB version mismatch\n"
16829                                 "\texpected: %s\n\tgot: %s\n",
16830                                 DB_VERSION_STRING, version);
16831                         return 1;
16832                 }
16833         }
16834 #endif
16835
16836 #if DB_VERSION_MAJOR > 2
16837         db_env_create( NULL, 0 );
16838 #elif DB_VERSION_MAJOR > 1
16839         db_appexit( NULL );
16840 #else
16841         (void) dbopen( NULL, 0, 0, 0, NULL);
16842 #endif
16843
16844 ; return 0; }
16845 EOF
16846 if { (eval echo configure:16847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16847   rm -rf conftest*
16848   ol_cv_db_db_42=yes
16849 else
16850   echo "configure: failed program was:" >&5
16851   cat conftest.$ac_ext >&5
16852   rm -rf conftest*
16853   ol_cv_db_db_42=no
16854 fi
16855 rm -f conftest*
16856
16857         LIBS="$ol_LIBS"
16858
16859 fi
16860
16861 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16862
16863         if test $ol_cv_db_db_42 = yes ; then
16864                 ol_cv_lib_db=-ldb-42
16865         fi
16866 fi
16867
16868 if test $ol_cv_lib_db = no ; then
16869         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16870 echo "configure:16871: checking for Berkeley DB link (-ldb-4.2)" >&5
16871 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16872   echo $ac_n "(cached) $ac_c" 1>&6
16873 else
16874   
16875         ol_DB_LIB=-ldb-4.2
16876         ol_LIBS=$LIBS
16877         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16878
16879         cat > conftest.$ac_ext <<EOF
16880 #line 16881 "configure"
16881 #include "confdefs.h"
16882
16883 #ifdef HAVE_DB_185_H
16884 # include <db_185.h>
16885 #else
16886 # include <db.h>
16887 #endif
16888
16889 #ifndef DB_VERSION_MAJOR
16890 # define DB_VERSION_MAJOR 1
16891 #endif
16892
16893 #ifndef NULL
16894 #define NULL ((void*)0)
16895 #endif
16896
16897 int main() {
16898
16899 #if DB_VERSION_MAJOR > 1
16900         {
16901                 char *version;
16902                 int major, minor, patch;
16903
16904                 version = db_version( &major, &minor, &patch );
16905
16906                 if( major != DB_VERSION_MAJOR ||
16907                         minor < DB_VERSION_MINOR )
16908                 {
16909                         printf("Berkeley DB version mismatch\n"
16910                                 "\texpected: %s\n\tgot: %s\n",
16911                                 DB_VERSION_STRING, version);
16912                         return 1;
16913                 }
16914         }
16915 #endif
16916
16917 #if DB_VERSION_MAJOR > 2
16918         db_env_create( NULL, 0 );
16919 #elif DB_VERSION_MAJOR > 1
16920         db_appexit( NULL );
16921 #else
16922         (void) dbopen( NULL, 0, 0, 0, NULL);
16923 #endif
16924
16925 ; return 0; }
16926 EOF
16927 if { (eval echo configure:16928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16928   rm -rf conftest*
16929   ol_cv_db_db_4_dot_2=yes
16930 else
16931   echo "configure: failed program was:" >&5
16932   cat conftest.$ac_ext >&5
16933   rm -rf conftest*
16934   ol_cv_db_db_4_dot_2=no
16935 fi
16936 rm -f conftest*
16937
16938         LIBS="$ol_LIBS"
16939
16940 fi
16941
16942 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16943
16944         if test $ol_cv_db_db_4_dot_2 = yes ; then
16945                 ol_cv_lib_db=-ldb-4.2
16946         fi
16947 fi
16948
16949 if test $ol_cv_lib_db = no ; then
16950         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16951 echo "configure:16952: checking for Berkeley DB link (-ldb-4-2)" >&5
16952 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16953   echo $ac_n "(cached) $ac_c" 1>&6
16954 else
16955   
16956         ol_DB_LIB=-ldb-4-2
16957         ol_LIBS=$LIBS
16958         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16959
16960         cat > conftest.$ac_ext <<EOF
16961 #line 16962 "configure"
16962 #include "confdefs.h"
16963
16964 #ifdef HAVE_DB_185_H
16965 # include <db_185.h>
16966 #else
16967 # include <db.h>
16968 #endif
16969
16970 #ifndef DB_VERSION_MAJOR
16971 # define DB_VERSION_MAJOR 1
16972 #endif
16973
16974 #ifndef NULL
16975 #define NULL ((void*)0)
16976 #endif
16977
16978 int main() {
16979
16980 #if DB_VERSION_MAJOR > 1
16981         {
16982                 char *version;
16983                 int major, minor, patch;
16984
16985                 version = db_version( &major, &minor, &patch );
16986
16987                 if( major != DB_VERSION_MAJOR ||
16988                         minor < DB_VERSION_MINOR )
16989                 {
16990                         printf("Berkeley DB version mismatch\n"
16991                                 "\texpected: %s\n\tgot: %s\n",
16992                                 DB_VERSION_STRING, version);
16993                         return 1;
16994                 }
16995         }
16996 #endif
16997
16998 #if DB_VERSION_MAJOR > 2
16999         db_env_create( NULL, 0 );
17000 #elif DB_VERSION_MAJOR > 1
17001         db_appexit( NULL );
17002 #else
17003         (void) dbopen( NULL, 0, 0, 0, NULL);
17004 #endif
17005
17006 ; return 0; }
17007 EOF
17008 if { (eval echo configure:17009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17009   rm -rf conftest*
17010   ol_cv_db_db_4_2=yes
17011 else
17012   echo "configure: failed program was:" >&5
17013   cat conftest.$ac_ext >&5
17014   rm -rf conftest*
17015   ol_cv_db_db_4_2=no
17016 fi
17017 rm -f conftest*
17018
17019         LIBS="$ol_LIBS"
17020
17021 fi
17022
17023 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17024
17025         if test $ol_cv_db_db_4_2 = yes ; then
17026                 ol_cv_lib_db=-ldb-4-2
17027         fi
17028 fi
17029
17030 if test $ol_cv_lib_db = no ; then
17031         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17032 echo "configure:17033: checking for Berkeley DB link (-ldb-4)" >&5
17033 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17034   echo $ac_n "(cached) $ac_c" 1>&6
17035 else
17036   
17037         ol_DB_LIB=-ldb-4
17038         ol_LIBS=$LIBS
17039         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17040
17041         cat > conftest.$ac_ext <<EOF
17042 #line 17043 "configure"
17043 #include "confdefs.h"
17044
17045 #ifdef HAVE_DB_185_H
17046 # include <db_185.h>
17047 #else
17048 # include <db.h>
17049 #endif
17050
17051 #ifndef DB_VERSION_MAJOR
17052 # define DB_VERSION_MAJOR 1
17053 #endif
17054
17055 #ifndef NULL
17056 #define NULL ((void*)0)
17057 #endif
17058
17059 int main() {
17060
17061 #if DB_VERSION_MAJOR > 1
17062         {
17063                 char *version;
17064                 int major, minor, patch;
17065
17066                 version = db_version( &major, &minor, &patch );
17067
17068                 if( major != DB_VERSION_MAJOR ||
17069                         minor < DB_VERSION_MINOR )
17070                 {
17071                         printf("Berkeley DB version mismatch\n"
17072                                 "\texpected: %s\n\tgot: %s\n",
17073                                 DB_VERSION_STRING, version);
17074                         return 1;
17075                 }
17076         }
17077 #endif
17078
17079 #if DB_VERSION_MAJOR > 2
17080         db_env_create( NULL, 0 );
17081 #elif DB_VERSION_MAJOR > 1
17082         db_appexit( NULL );
17083 #else
17084         (void) dbopen( NULL, 0, 0, 0, NULL);
17085 #endif
17086
17087 ; return 0; }
17088 EOF
17089 if { (eval echo configure:17090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17090   rm -rf conftest*
17091   ol_cv_db_db_4=yes
17092 else
17093   echo "configure: failed program was:" >&5
17094   cat conftest.$ac_ext >&5
17095   rm -rf conftest*
17096   ol_cv_db_db_4=no
17097 fi
17098 rm -f conftest*
17099
17100         LIBS="$ol_LIBS"
17101
17102 fi
17103
17104 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17105
17106         if test $ol_cv_db_db_4 = yes ; then
17107                 ol_cv_lib_db=-ldb-4
17108         fi
17109 fi
17110
17111 if test $ol_cv_lib_db = no ; then
17112         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17113 echo "configure:17114: checking for Berkeley DB link (-ldb4)" >&5
17114 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17115   echo $ac_n "(cached) $ac_c" 1>&6
17116 else
17117   
17118         ol_DB_LIB=-ldb4
17119         ol_LIBS=$LIBS
17120         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17121
17122         cat > conftest.$ac_ext <<EOF
17123 #line 17124 "configure"
17124 #include "confdefs.h"
17125
17126 #ifdef HAVE_DB_185_H
17127 # include <db_185.h>
17128 #else
17129 # include <db.h>
17130 #endif
17131
17132 #ifndef DB_VERSION_MAJOR
17133 # define DB_VERSION_MAJOR 1
17134 #endif
17135
17136 #ifndef NULL
17137 #define NULL ((void*)0)
17138 #endif
17139
17140 int main() {
17141
17142 #if DB_VERSION_MAJOR > 1
17143         {
17144                 char *version;
17145                 int major, minor, patch;
17146
17147                 version = db_version( &major, &minor, &patch );
17148
17149                 if( major != DB_VERSION_MAJOR ||
17150                         minor < DB_VERSION_MINOR )
17151                 {
17152                         printf("Berkeley DB version mismatch\n"
17153                                 "\texpected: %s\n\tgot: %s\n",
17154                                 DB_VERSION_STRING, version);
17155                         return 1;
17156                 }
17157         }
17158 #endif
17159
17160 #if DB_VERSION_MAJOR > 2
17161         db_env_create( NULL, 0 );
17162 #elif DB_VERSION_MAJOR > 1
17163         db_appexit( NULL );
17164 #else
17165         (void) dbopen( NULL, 0, 0, 0, NULL);
17166 #endif
17167
17168 ; return 0; }
17169 EOF
17170 if { (eval echo configure:17171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17171   rm -rf conftest*
17172   ol_cv_db_db4=yes
17173 else
17174   echo "configure: failed program was:" >&5
17175   cat conftest.$ac_ext >&5
17176   rm -rf conftest*
17177   ol_cv_db_db4=no
17178 fi
17179 rm -f conftest*
17180
17181         LIBS="$ol_LIBS"
17182
17183 fi
17184
17185 echo "$ac_t""$ol_cv_db_db4" 1>&6
17186
17187         if test $ol_cv_db_db4 = yes ; then
17188                 ol_cv_lib_db=-ldb4
17189         fi
17190 fi
17191
17192 if test $ol_cv_lib_db = no ; then
17193         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17194 echo "configure:17195: checking for Berkeley DB link (-ldb)" >&5
17195 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17196   echo $ac_n "(cached) $ac_c" 1>&6
17197 else
17198   
17199         ol_DB_LIB=-ldb
17200         ol_LIBS=$LIBS
17201         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17202
17203         cat > conftest.$ac_ext <<EOF
17204 #line 17205 "configure"
17205 #include "confdefs.h"
17206
17207 #ifdef HAVE_DB_185_H
17208 # include <db_185.h>
17209 #else
17210 # include <db.h>
17211 #endif
17212
17213 #ifndef DB_VERSION_MAJOR
17214 # define DB_VERSION_MAJOR 1
17215 #endif
17216
17217 #ifndef NULL
17218 #define NULL ((void*)0)
17219 #endif
17220
17221 int main() {
17222
17223 #if DB_VERSION_MAJOR > 1
17224         {
17225                 char *version;
17226                 int major, minor, patch;
17227
17228                 version = db_version( &major, &minor, &patch );
17229
17230                 if( major != DB_VERSION_MAJOR ||
17231                         minor < DB_VERSION_MINOR )
17232                 {
17233                         printf("Berkeley DB version mismatch\n"
17234                                 "\texpected: %s\n\tgot: %s\n",
17235                                 DB_VERSION_STRING, version);
17236                         return 1;
17237                 }
17238         }
17239 #endif
17240
17241 #if DB_VERSION_MAJOR > 2
17242         db_env_create( NULL, 0 );
17243 #elif DB_VERSION_MAJOR > 1
17244         db_appexit( NULL );
17245 #else
17246         (void) dbopen( NULL, 0, 0, 0, NULL);
17247 #endif
17248
17249 ; return 0; }
17250 EOF
17251 if { (eval echo configure:17252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17252   rm -rf conftest*
17253   ol_cv_db_db=yes
17254 else
17255   echo "configure: failed program was:" >&5
17256   cat conftest.$ac_ext >&5
17257   rm -rf conftest*
17258   ol_cv_db_db=no
17259 fi
17260 rm -f conftest*
17261
17262         LIBS="$ol_LIBS"
17263
17264 fi
17265
17266 echo "$ac_t""$ol_cv_db_db" 1>&6
17267
17268         if test $ol_cv_db_db = yes ; then
17269                 ol_cv_lib_db=-ldb
17270         fi
17271 fi
17272
17273 if test $ol_cv_lib_db = no ; then
17274         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17275 echo "configure:17276: checking for Berkeley DB link (-ldb41)" >&5
17276 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17277   echo $ac_n "(cached) $ac_c" 1>&6
17278 else
17279   
17280         ol_DB_LIB=-ldb41
17281         ol_LIBS=$LIBS
17282         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17283
17284         cat > conftest.$ac_ext <<EOF
17285 #line 17286 "configure"
17286 #include "confdefs.h"
17287
17288 #ifdef HAVE_DB_185_H
17289 # include <db_185.h>
17290 #else
17291 # include <db.h>
17292 #endif
17293
17294 #ifndef DB_VERSION_MAJOR
17295 # define DB_VERSION_MAJOR 1
17296 #endif
17297
17298 #ifndef NULL
17299 #define NULL ((void*)0)
17300 #endif
17301
17302 int main() {
17303
17304 #if DB_VERSION_MAJOR > 1
17305         {
17306                 char *version;
17307                 int major, minor, patch;
17308
17309                 version = db_version( &major, &minor, &patch );
17310
17311                 if( major != DB_VERSION_MAJOR ||
17312                         minor < DB_VERSION_MINOR )
17313                 {
17314                         printf("Berkeley DB version mismatch\n"
17315                                 "\texpected: %s\n\tgot: %s\n",
17316                                 DB_VERSION_STRING, version);
17317                         return 1;
17318                 }
17319         }
17320 #endif
17321
17322 #if DB_VERSION_MAJOR > 2
17323         db_env_create( NULL, 0 );
17324 #elif DB_VERSION_MAJOR > 1
17325         db_appexit( NULL );
17326 #else
17327         (void) dbopen( NULL, 0, 0, 0, NULL);
17328 #endif
17329
17330 ; return 0; }
17331 EOF
17332 if { (eval echo configure:17333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17333   rm -rf conftest*
17334   ol_cv_db_db41=yes
17335 else
17336   echo "configure: failed program was:" >&5
17337   cat conftest.$ac_ext >&5
17338   rm -rf conftest*
17339   ol_cv_db_db41=no
17340 fi
17341 rm -f conftest*
17342
17343         LIBS="$ol_LIBS"
17344
17345 fi
17346
17347 echo "$ac_t""$ol_cv_db_db41" 1>&6
17348
17349         if test $ol_cv_db_db41 = yes ; then
17350                 ol_cv_lib_db=-ldb41
17351         fi
17352 fi
17353
17354 if test $ol_cv_lib_db = no ; then
17355         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17356 echo "configure:17357: checking for Berkeley DB link (-ldb-41)" >&5
17357 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17358   echo $ac_n "(cached) $ac_c" 1>&6
17359 else
17360   
17361         ol_DB_LIB=-ldb-41
17362         ol_LIBS=$LIBS
17363         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17364
17365         cat > conftest.$ac_ext <<EOF
17366 #line 17367 "configure"
17367 #include "confdefs.h"
17368
17369 #ifdef HAVE_DB_185_H
17370 # include <db_185.h>
17371 #else
17372 # include <db.h>
17373 #endif
17374
17375 #ifndef DB_VERSION_MAJOR
17376 # define DB_VERSION_MAJOR 1
17377 #endif
17378
17379 #ifndef NULL
17380 #define NULL ((void*)0)
17381 #endif
17382
17383 int main() {
17384
17385 #if DB_VERSION_MAJOR > 1
17386         {
17387                 char *version;
17388                 int major, minor, patch;
17389
17390                 version = db_version( &major, &minor, &patch );
17391
17392                 if( major != DB_VERSION_MAJOR ||
17393                         minor < DB_VERSION_MINOR )
17394                 {
17395                         printf("Berkeley DB version mismatch\n"
17396                                 "\texpected: %s\n\tgot: %s\n",
17397                                 DB_VERSION_STRING, version);
17398                         return 1;
17399                 }
17400         }
17401 #endif
17402
17403 #if DB_VERSION_MAJOR > 2
17404         db_env_create( NULL, 0 );
17405 #elif DB_VERSION_MAJOR > 1
17406         db_appexit( NULL );
17407 #else
17408         (void) dbopen( NULL, 0, 0, 0, NULL);
17409 #endif
17410
17411 ; return 0; }
17412 EOF
17413 if { (eval echo configure:17414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17414   rm -rf conftest*
17415   ol_cv_db_db_41=yes
17416 else
17417   echo "configure: failed program was:" >&5
17418   cat conftest.$ac_ext >&5
17419   rm -rf conftest*
17420   ol_cv_db_db_41=no
17421 fi
17422 rm -f conftest*
17423
17424         LIBS="$ol_LIBS"
17425
17426 fi
17427
17428 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17429
17430         if test $ol_cv_db_db_41 = yes ; then
17431                 ol_cv_lib_db=-ldb-41
17432         fi
17433 fi
17434
17435 if test $ol_cv_lib_db = no ; then
17436         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17437 echo "configure:17438: checking for Berkeley DB link (-ldb-4.1)" >&5
17438 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17439   echo $ac_n "(cached) $ac_c" 1>&6
17440 else
17441   
17442         ol_DB_LIB=-ldb-4.1
17443         ol_LIBS=$LIBS
17444         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17445
17446         cat > conftest.$ac_ext <<EOF
17447 #line 17448 "configure"
17448 #include "confdefs.h"
17449
17450 #ifdef HAVE_DB_185_H
17451 # include <db_185.h>
17452 #else
17453 # include <db.h>
17454 #endif
17455
17456 #ifndef DB_VERSION_MAJOR
17457 # define DB_VERSION_MAJOR 1
17458 #endif
17459
17460 #ifndef NULL
17461 #define NULL ((void*)0)
17462 #endif
17463
17464 int main() {
17465
17466 #if DB_VERSION_MAJOR > 1
17467         {
17468                 char *version;
17469                 int major, minor, patch;
17470
17471                 version = db_version( &major, &minor, &patch );
17472
17473                 if( major != DB_VERSION_MAJOR ||
17474                         minor < DB_VERSION_MINOR )
17475                 {
17476                         printf("Berkeley DB version mismatch\n"
17477                                 "\texpected: %s\n\tgot: %s\n",
17478                                 DB_VERSION_STRING, version);
17479                         return 1;
17480                 }
17481         }
17482 #endif
17483
17484 #if DB_VERSION_MAJOR > 2
17485         db_env_create( NULL, 0 );
17486 #elif DB_VERSION_MAJOR > 1
17487         db_appexit( NULL );
17488 #else
17489         (void) dbopen( NULL, 0, 0, 0, NULL);
17490 #endif
17491
17492 ; return 0; }
17493 EOF
17494 if { (eval echo configure:17495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17495   rm -rf conftest*
17496   ol_cv_db_db_4_dot_1=yes
17497 else
17498   echo "configure: failed program was:" >&5
17499   cat conftest.$ac_ext >&5
17500   rm -rf conftest*
17501   ol_cv_db_db_4_dot_1=no
17502 fi
17503 rm -f conftest*
17504
17505         LIBS="$ol_LIBS"
17506
17507 fi
17508
17509 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17510
17511         if test $ol_cv_db_db_4_dot_1 = yes ; then
17512                 ol_cv_lib_db=-ldb-4.1
17513         fi
17514 fi
17515
17516 if test $ol_cv_lib_db = no ; then
17517         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17518 echo "configure:17519: checking for Berkeley DB link (-ldb-4-1)" >&5
17519 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17520   echo $ac_n "(cached) $ac_c" 1>&6
17521 else
17522   
17523         ol_DB_LIB=-ldb-4-1
17524         ol_LIBS=$LIBS
17525         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17526
17527         cat > conftest.$ac_ext <<EOF
17528 #line 17529 "configure"
17529 #include "confdefs.h"
17530
17531 #ifdef HAVE_DB_185_H
17532 # include <db_185.h>
17533 #else
17534 # include <db.h>
17535 #endif
17536
17537 #ifndef DB_VERSION_MAJOR
17538 # define DB_VERSION_MAJOR 1
17539 #endif
17540
17541 #ifndef NULL
17542 #define NULL ((void*)0)
17543 #endif
17544
17545 int main() {
17546
17547 #if DB_VERSION_MAJOR > 1
17548         {
17549                 char *version;
17550                 int major, minor, patch;
17551
17552                 version = db_version( &major, &minor, &patch );
17553
17554                 if( major != DB_VERSION_MAJOR ||
17555                         minor < DB_VERSION_MINOR )
17556                 {
17557                         printf("Berkeley DB version mismatch\n"
17558                                 "\texpected: %s\n\tgot: %s\n",
17559                                 DB_VERSION_STRING, version);
17560                         return 1;
17561                 }
17562         }
17563 #endif
17564
17565 #if DB_VERSION_MAJOR > 2
17566         db_env_create( NULL, 0 );
17567 #elif DB_VERSION_MAJOR > 1
17568         db_appexit( NULL );
17569 #else
17570         (void) dbopen( NULL, 0, 0, 0, NULL);
17571 #endif
17572
17573 ; return 0; }
17574 EOF
17575 if { (eval echo configure:17576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17576   rm -rf conftest*
17577   ol_cv_db_db_4_1=yes
17578 else
17579   echo "configure: failed program was:" >&5
17580   cat conftest.$ac_ext >&5
17581   rm -rf conftest*
17582   ol_cv_db_db_4_1=no
17583 fi
17584 rm -f conftest*
17585
17586         LIBS="$ol_LIBS"
17587
17588 fi
17589
17590 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17591
17592         if test $ol_cv_db_db_4_1 = yes ; then
17593                 ol_cv_lib_db=-ldb-4-1
17594         fi
17595 fi
17596
17597 if test $ol_cv_lib_db = no ; then
17598         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17599 echo "configure:17600: checking for Berkeley DB link (-ldb3)" >&5
17600 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17601   echo $ac_n "(cached) $ac_c" 1>&6
17602 else
17603   
17604         ol_DB_LIB=-ldb3
17605         ol_LIBS=$LIBS
17606         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17607
17608         cat > conftest.$ac_ext <<EOF
17609 #line 17610 "configure"
17610 #include "confdefs.h"
17611
17612 #ifdef HAVE_DB_185_H
17613 # include <db_185.h>
17614 #else
17615 # include <db.h>
17616 #endif
17617
17618 #ifndef DB_VERSION_MAJOR
17619 # define DB_VERSION_MAJOR 1
17620 #endif
17621
17622 #ifndef NULL
17623 #define NULL ((void*)0)
17624 #endif
17625
17626 int main() {
17627
17628 #if DB_VERSION_MAJOR > 1
17629         {
17630                 char *version;
17631                 int major, minor, patch;
17632
17633                 version = db_version( &major, &minor, &patch );
17634
17635                 if( major != DB_VERSION_MAJOR ||
17636                         minor < DB_VERSION_MINOR )
17637                 {
17638                         printf("Berkeley DB version mismatch\n"
17639                                 "\texpected: %s\n\tgot: %s\n",
17640                                 DB_VERSION_STRING, version);
17641                         return 1;
17642                 }
17643         }
17644 #endif
17645
17646 #if DB_VERSION_MAJOR > 2
17647         db_env_create( NULL, 0 );
17648 #elif DB_VERSION_MAJOR > 1
17649         db_appexit( NULL );
17650 #else
17651         (void) dbopen( NULL, 0, 0, 0, NULL);
17652 #endif
17653
17654 ; return 0; }
17655 EOF
17656 if { (eval echo configure:17657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17657   rm -rf conftest*
17658   ol_cv_db_db3=yes
17659 else
17660   echo "configure: failed program was:" >&5
17661   cat conftest.$ac_ext >&5
17662   rm -rf conftest*
17663   ol_cv_db_db3=no
17664 fi
17665 rm -f conftest*
17666
17667         LIBS="$ol_LIBS"
17668
17669 fi
17670
17671 echo "$ac_t""$ol_cv_db_db3" 1>&6
17672
17673         if test $ol_cv_db_db3 = yes ; then
17674                 ol_cv_lib_db=-ldb3
17675         fi
17676 fi
17677
17678 if test $ol_cv_lib_db = no ; then
17679         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17680 echo "configure:17681: checking for Berkeley DB link (-ldb-3)" >&5
17681 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17682   echo $ac_n "(cached) $ac_c" 1>&6
17683 else
17684   
17685         ol_DB_LIB=-ldb-3
17686         ol_LIBS=$LIBS
17687         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17688
17689         cat > conftest.$ac_ext <<EOF
17690 #line 17691 "configure"
17691 #include "confdefs.h"
17692
17693 #ifdef HAVE_DB_185_H
17694 # include <db_185.h>
17695 #else
17696 # include <db.h>
17697 #endif
17698
17699 #ifndef DB_VERSION_MAJOR
17700 # define DB_VERSION_MAJOR 1
17701 #endif
17702
17703 #ifndef NULL
17704 #define NULL ((void*)0)
17705 #endif
17706
17707 int main() {
17708
17709 #if DB_VERSION_MAJOR > 1
17710         {
17711                 char *version;
17712                 int major, minor, patch;
17713
17714                 version = db_version( &major, &minor, &patch );
17715
17716                 if( major != DB_VERSION_MAJOR ||
17717                         minor < DB_VERSION_MINOR )
17718                 {
17719                         printf("Berkeley DB version mismatch\n"
17720                                 "\texpected: %s\n\tgot: %s\n",
17721                                 DB_VERSION_STRING, version);
17722                         return 1;
17723                 }
17724         }
17725 #endif
17726
17727 #if DB_VERSION_MAJOR > 2
17728         db_env_create( NULL, 0 );
17729 #elif DB_VERSION_MAJOR > 1
17730         db_appexit( NULL );
17731 #else
17732         (void) dbopen( NULL, 0, 0, 0, NULL);
17733 #endif
17734
17735 ; return 0; }
17736 EOF
17737 if { (eval echo configure:17738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17738   rm -rf conftest*
17739   ol_cv_db_db_3=yes
17740 else
17741   echo "configure: failed program was:" >&5
17742   cat conftest.$ac_ext >&5
17743   rm -rf conftest*
17744   ol_cv_db_db_3=no
17745 fi
17746 rm -f conftest*
17747
17748         LIBS="$ol_LIBS"
17749
17750 fi
17751
17752 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17753
17754         if test $ol_cv_db_db_3 = yes ; then
17755                 ol_cv_lib_db=-ldb-3
17756         fi
17757 fi
17758
17759 if test $ol_cv_lib_db = no ; then
17760         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17761 echo "configure:17762: checking for Berkeley DB link (-ldb2)" >&5
17762 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17763   echo $ac_n "(cached) $ac_c" 1>&6
17764 else
17765   
17766         ol_DB_LIB=-ldb2
17767         ol_LIBS=$LIBS
17768         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17769
17770         cat > conftest.$ac_ext <<EOF
17771 #line 17772 "configure"
17772 #include "confdefs.h"
17773
17774 #ifdef HAVE_DB_185_H
17775 # include <db_185.h>
17776 #else
17777 # include <db.h>
17778 #endif
17779
17780 #ifndef DB_VERSION_MAJOR
17781 # define DB_VERSION_MAJOR 1
17782 #endif
17783
17784 #ifndef NULL
17785 #define NULL ((void*)0)
17786 #endif
17787
17788 int main() {
17789
17790 #if DB_VERSION_MAJOR > 1
17791         {
17792                 char *version;
17793                 int major, minor, patch;
17794
17795                 version = db_version( &major, &minor, &patch );
17796
17797                 if( major != DB_VERSION_MAJOR ||
17798                         minor < DB_VERSION_MINOR )
17799                 {
17800                         printf("Berkeley DB version mismatch\n"
17801                                 "\texpected: %s\n\tgot: %s\n",
17802                                 DB_VERSION_STRING, version);
17803                         return 1;
17804                 }
17805         }
17806 #endif
17807
17808 #if DB_VERSION_MAJOR > 2
17809         db_env_create( NULL, 0 );
17810 #elif DB_VERSION_MAJOR > 1
17811         db_appexit( NULL );
17812 #else
17813         (void) dbopen( NULL, 0, 0, 0, NULL);
17814 #endif
17815
17816 ; return 0; }
17817 EOF
17818 if { (eval echo configure:17819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17819   rm -rf conftest*
17820   ol_cv_db_db2=yes
17821 else
17822   echo "configure: failed program was:" >&5
17823   cat conftest.$ac_ext >&5
17824   rm -rf conftest*
17825   ol_cv_db_db2=no
17826 fi
17827 rm -f conftest*
17828
17829         LIBS="$ol_LIBS"
17830
17831 fi
17832
17833 echo "$ac_t""$ol_cv_db_db2" 1>&6
17834
17835         if test $ol_cv_db_db2 = yes ; then
17836                 ol_cv_lib_db=-ldb2
17837         fi
17838 fi
17839
17840 if test $ol_cv_lib_db = no ; then
17841         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17842 echo "configure:17843: checking for Berkeley DB link (-ldb-2)" >&5
17843 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17844   echo $ac_n "(cached) $ac_c" 1>&6
17845 else
17846   
17847         ol_DB_LIB=-ldb-2
17848         ol_LIBS=$LIBS
17849         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17850
17851         cat > conftest.$ac_ext <<EOF
17852 #line 17853 "configure"
17853 #include "confdefs.h"
17854
17855 #ifdef HAVE_DB_185_H
17856 # include <db_185.h>
17857 #else
17858 # include <db.h>
17859 #endif
17860
17861 #ifndef DB_VERSION_MAJOR
17862 # define DB_VERSION_MAJOR 1
17863 #endif
17864
17865 #ifndef NULL
17866 #define NULL ((void*)0)
17867 #endif
17868
17869 int main() {
17870
17871 #if DB_VERSION_MAJOR > 1
17872         {
17873                 char *version;
17874                 int major, minor, patch;
17875
17876                 version = db_version( &major, &minor, &patch );
17877
17878                 if( major != DB_VERSION_MAJOR ||
17879                         minor < DB_VERSION_MINOR )
17880                 {
17881                         printf("Berkeley DB version mismatch\n"
17882                                 "\texpected: %s\n\tgot: %s\n",
17883                                 DB_VERSION_STRING, version);
17884                         return 1;
17885                 }
17886         }
17887 #endif
17888
17889 #if DB_VERSION_MAJOR > 2
17890         db_env_create( NULL, 0 );
17891 #elif DB_VERSION_MAJOR > 1
17892         db_appexit( NULL );
17893 #else
17894         (void) dbopen( NULL, 0, 0, 0, NULL);
17895 #endif
17896
17897 ; return 0; }
17898 EOF
17899 if { (eval echo configure:17900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17900   rm -rf conftest*
17901   ol_cv_db_db_2=yes
17902 else
17903   echo "configure: failed program was:" >&5
17904   cat conftest.$ac_ext >&5
17905   rm -rf conftest*
17906   ol_cv_db_db_2=no
17907 fi
17908 rm -f conftest*
17909
17910         LIBS="$ol_LIBS"
17911
17912 fi
17913
17914 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17915
17916         if test $ol_cv_db_db_2 = yes ; then
17917                 ol_cv_lib_db=-ldb-2
17918         fi
17919 fi
17920
17921 if test $ol_cv_lib_db = no ; then
17922         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17923 echo "configure:17924: checking for Berkeley DB link (-ldb1)" >&5
17924 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17925   echo $ac_n "(cached) $ac_c" 1>&6
17926 else
17927   
17928         ol_DB_LIB=-ldb1
17929         ol_LIBS=$LIBS
17930         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17931
17932         cat > conftest.$ac_ext <<EOF
17933 #line 17934 "configure"
17934 #include "confdefs.h"
17935
17936 #ifdef HAVE_DB_185_H
17937 # include <db_185.h>
17938 #else
17939 # include <db.h>
17940 #endif
17941
17942 #ifndef DB_VERSION_MAJOR
17943 # define DB_VERSION_MAJOR 1
17944 #endif
17945
17946 #ifndef NULL
17947 #define NULL ((void*)0)
17948 #endif
17949
17950 int main() {
17951
17952 #if DB_VERSION_MAJOR > 1
17953         {
17954                 char *version;
17955                 int major, minor, patch;
17956
17957                 version = db_version( &major, &minor, &patch );
17958
17959                 if( major != DB_VERSION_MAJOR ||
17960                         minor < DB_VERSION_MINOR )
17961                 {
17962                         printf("Berkeley DB version mismatch\n"
17963                                 "\texpected: %s\n\tgot: %s\n",
17964                                 DB_VERSION_STRING, version);
17965                         return 1;
17966                 }
17967         }
17968 #endif
17969
17970 #if DB_VERSION_MAJOR > 2
17971         db_env_create( NULL, 0 );
17972 #elif DB_VERSION_MAJOR > 1
17973         db_appexit( NULL );
17974 #else
17975         (void) dbopen( NULL, 0, 0, 0, NULL);
17976 #endif
17977
17978 ; return 0; }
17979 EOF
17980 if { (eval echo configure:17981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17981   rm -rf conftest*
17982   ol_cv_db_db1=yes
17983 else
17984   echo "configure: failed program was:" >&5
17985   cat conftest.$ac_ext >&5
17986   rm -rf conftest*
17987   ol_cv_db_db1=no
17988 fi
17989 rm -f conftest*
17990
17991         LIBS="$ol_LIBS"
17992
17993 fi
17994
17995 echo "$ac_t""$ol_cv_db_db1" 1>&6
17996
17997         if test $ol_cv_db_db1 = yes ; then
17998                 ol_cv_lib_db=-ldb1
17999         fi
18000 fi
18001
18002 if test $ol_cv_lib_db = no ; then
18003         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18004 echo "configure:18005: checking for Berkeley DB link (-ldb-1)" >&5
18005 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18006   echo $ac_n "(cached) $ac_c" 1>&6
18007 else
18008   
18009         ol_DB_LIB=-ldb-1
18010         ol_LIBS=$LIBS
18011         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18012
18013         cat > conftest.$ac_ext <<EOF
18014 #line 18015 "configure"
18015 #include "confdefs.h"
18016
18017 #ifdef HAVE_DB_185_H
18018 # include <db_185.h>
18019 #else
18020 # include <db.h>
18021 #endif
18022
18023 #ifndef DB_VERSION_MAJOR
18024 # define DB_VERSION_MAJOR 1
18025 #endif
18026
18027 #ifndef NULL
18028 #define NULL ((void*)0)
18029 #endif
18030
18031 int main() {
18032
18033 #if DB_VERSION_MAJOR > 1
18034         {
18035                 char *version;
18036                 int major, minor, patch;
18037
18038                 version = db_version( &major, &minor, &patch );
18039
18040                 if( major != DB_VERSION_MAJOR ||
18041                         minor < DB_VERSION_MINOR )
18042                 {
18043                         printf("Berkeley DB version mismatch\n"
18044                                 "\texpected: %s\n\tgot: %s\n",
18045                                 DB_VERSION_STRING, version);
18046                         return 1;
18047                 }
18048         }
18049 #endif
18050
18051 #if DB_VERSION_MAJOR > 2
18052         db_env_create( NULL, 0 );
18053 #elif DB_VERSION_MAJOR > 1
18054         db_appexit( NULL );
18055 #else
18056         (void) dbopen( NULL, 0, 0, 0, NULL);
18057 #endif
18058
18059 ; return 0; }
18060 EOF
18061 if { (eval echo configure:18062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18062   rm -rf conftest*
18063   ol_cv_db_db_1=yes
18064 else
18065   echo "configure: failed program was:" >&5
18066   cat conftest.$ac_ext >&5
18067   rm -rf conftest*
18068   ol_cv_db_db_1=no
18069 fi
18070 rm -f conftest*
18071
18072         LIBS="$ol_LIBS"
18073
18074 fi
18075
18076 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18077
18078         if test $ol_cv_db_db_1 = yes ; then
18079                 ol_cv_lib_db=-ldb-1
18080         fi
18081 fi
18082
18083
18084                 if test "$ol_cv_lib_db" != no ; then
18085                         ol_cv_berkeley_db=yes
18086                 fi
18087         fi
18088 fi
18089
18090         else
18091                 ol_cv_berkeley_db=no
18092 for ac_hdr in db.h
18093 do
18094 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18095 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18096 echo "configure:18097: checking for $ac_hdr" >&5
18097 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18098   echo $ac_n "(cached) $ac_c" 1>&6
18099 else
18100   cat > conftest.$ac_ext <<EOF
18101 #line 18102 "configure"
18102 #include "confdefs.h"
18103 #include <$ac_hdr>
18104 EOF
18105 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18106 { (eval echo configure:18107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18107 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18108 if test -z "$ac_err"; then
18109   rm -rf conftest*
18110   eval "ac_cv_header_$ac_safe=yes"
18111 else
18112   echo "$ac_err" >&5
18113   echo "configure: failed program was:" >&5
18114   cat conftest.$ac_ext >&5
18115   rm -rf conftest*
18116   eval "ac_cv_header_$ac_safe=no"
18117 fi
18118 rm -f conftest*
18119 fi
18120 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18121   echo "$ac_t""yes" 1>&6
18122     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18123   cat >> confdefs.h <<EOF
18124 #define $ac_tr_hdr 1
18125 EOF
18126  
18127 else
18128   echo "$ac_t""no" 1>&6
18129 fi
18130 done
18131
18132 if test $ac_cv_header_db_h = yes; then
18133         ol_cv_lib_db=no
18134 if test $ol_cv_lib_db = no ; then
18135         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18136 echo "configure:18137: checking for Berkeley DB link (default)" >&5
18137 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18138   echo $ac_n "(cached) $ac_c" 1>&6
18139 else
18140   
18141         ol_DB_LIB=
18142         ol_LIBS=$LIBS
18143         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18144
18145         cat > conftest.$ac_ext <<EOF
18146 #line 18147 "configure"
18147 #include "confdefs.h"
18148
18149 #ifdef HAVE_DB_185_H
18150 # include <db_185.h>
18151 #else
18152 # include <db.h>
18153 #endif
18154
18155 #ifndef DB_VERSION_MAJOR
18156 # define DB_VERSION_MAJOR 1
18157 #endif
18158
18159 #ifndef NULL
18160 #define NULL ((void*)0)
18161 #endif
18162
18163 int main() {
18164
18165 #if DB_VERSION_MAJOR > 1
18166         {
18167                 char *version;
18168                 int major, minor, patch;
18169
18170                 version = db_version( &major, &minor, &patch );
18171
18172                 if( major != DB_VERSION_MAJOR ||
18173                         minor < DB_VERSION_MINOR )
18174                 {
18175                         printf("Berkeley DB version mismatch\n"
18176                                 "\texpected: %s\n\tgot: %s\n",
18177                                 DB_VERSION_STRING, version);
18178                         return 1;
18179                 }
18180         }
18181 #endif
18182
18183 #if DB_VERSION_MAJOR > 2
18184         db_env_create( NULL, 0 );
18185 #elif DB_VERSION_MAJOR > 1
18186         db_appexit( NULL );
18187 #else
18188         (void) dbopen( NULL, 0, 0, 0, NULL);
18189 #endif
18190
18191 ; return 0; }
18192 EOF
18193 if { (eval echo configure:18194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18194   rm -rf conftest*
18195   ol_cv_db_none=yes
18196 else
18197   echo "configure: failed program was:" >&5
18198   cat conftest.$ac_ext >&5
18199   rm -rf conftest*
18200   ol_cv_db_none=no
18201 fi
18202 rm -f conftest*
18203
18204         LIBS="$ol_LIBS"
18205
18206 fi
18207
18208 echo "$ac_t""$ol_cv_db_none" 1>&6
18209
18210         if test $ol_cv_db_none = yes ; then
18211                 ol_cv_lib_db=yes
18212         fi
18213 fi
18214
18215 if test $ol_cv_lib_db = no ; then
18216         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18217 echo "configure:18218: checking for Berkeley DB link (-ldb42)" >&5
18218 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18219   echo $ac_n "(cached) $ac_c" 1>&6
18220 else
18221   
18222         ol_DB_LIB=-ldb42
18223         ol_LIBS=$LIBS
18224         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18225
18226         cat > conftest.$ac_ext <<EOF
18227 #line 18228 "configure"
18228 #include "confdefs.h"
18229
18230 #ifdef HAVE_DB_185_H
18231 # include <db_185.h>
18232 #else
18233 # include <db.h>
18234 #endif
18235
18236 #ifndef DB_VERSION_MAJOR
18237 # define DB_VERSION_MAJOR 1
18238 #endif
18239
18240 #ifndef NULL
18241 #define NULL ((void*)0)
18242 #endif
18243
18244 int main() {
18245
18246 #if DB_VERSION_MAJOR > 1
18247         {
18248                 char *version;
18249                 int major, minor, patch;
18250
18251                 version = db_version( &major, &minor, &patch );
18252
18253                 if( major != DB_VERSION_MAJOR ||
18254                         minor < DB_VERSION_MINOR )
18255                 {
18256                         printf("Berkeley DB version mismatch\n"
18257                                 "\texpected: %s\n\tgot: %s\n",
18258                                 DB_VERSION_STRING, version);
18259                         return 1;
18260                 }
18261         }
18262 #endif
18263
18264 #if DB_VERSION_MAJOR > 2
18265         db_env_create( NULL, 0 );
18266 #elif DB_VERSION_MAJOR > 1
18267         db_appexit( NULL );
18268 #else
18269         (void) dbopen( NULL, 0, 0, 0, NULL);
18270 #endif
18271
18272 ; return 0; }
18273 EOF
18274 if { (eval echo configure:18275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18275   rm -rf conftest*
18276   ol_cv_db_db42=yes
18277 else
18278   echo "configure: failed program was:" >&5
18279   cat conftest.$ac_ext >&5
18280   rm -rf conftest*
18281   ol_cv_db_db42=no
18282 fi
18283 rm -f conftest*
18284
18285         LIBS="$ol_LIBS"
18286
18287 fi
18288
18289 echo "$ac_t""$ol_cv_db_db42" 1>&6
18290
18291         if test $ol_cv_db_db42 = yes ; then
18292                 ol_cv_lib_db=-ldb42
18293         fi
18294 fi
18295
18296 if test $ol_cv_lib_db = no ; then
18297         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18298 echo "configure:18299: checking for Berkeley DB link (-ldb-42)" >&5
18299 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18300   echo $ac_n "(cached) $ac_c" 1>&6
18301 else
18302   
18303         ol_DB_LIB=-ldb-42
18304         ol_LIBS=$LIBS
18305         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18306
18307         cat > conftest.$ac_ext <<EOF
18308 #line 18309 "configure"
18309 #include "confdefs.h"
18310
18311 #ifdef HAVE_DB_185_H
18312 # include <db_185.h>
18313 #else
18314 # include <db.h>
18315 #endif
18316
18317 #ifndef DB_VERSION_MAJOR
18318 # define DB_VERSION_MAJOR 1
18319 #endif
18320
18321 #ifndef NULL
18322 #define NULL ((void*)0)
18323 #endif
18324
18325 int main() {
18326
18327 #if DB_VERSION_MAJOR > 1
18328         {
18329                 char *version;
18330                 int major, minor, patch;
18331
18332                 version = db_version( &major, &minor, &patch );
18333
18334                 if( major != DB_VERSION_MAJOR ||
18335                         minor < DB_VERSION_MINOR )
18336                 {
18337                         printf("Berkeley DB version mismatch\n"
18338                                 "\texpected: %s\n\tgot: %s\n",
18339                                 DB_VERSION_STRING, version);
18340                         return 1;
18341                 }
18342         }
18343 #endif
18344
18345 #if DB_VERSION_MAJOR > 2
18346         db_env_create( NULL, 0 );
18347 #elif DB_VERSION_MAJOR > 1
18348         db_appexit( NULL );
18349 #else
18350         (void) dbopen( NULL, 0, 0, 0, NULL);
18351 #endif
18352
18353 ; return 0; }
18354 EOF
18355 if { (eval echo configure:18356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18356   rm -rf conftest*
18357   ol_cv_db_db_42=yes
18358 else
18359   echo "configure: failed program was:" >&5
18360   cat conftest.$ac_ext >&5
18361   rm -rf conftest*
18362   ol_cv_db_db_42=no
18363 fi
18364 rm -f conftest*
18365
18366         LIBS="$ol_LIBS"
18367
18368 fi
18369
18370 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18371
18372         if test $ol_cv_db_db_42 = yes ; then
18373                 ol_cv_lib_db=-ldb-42
18374         fi
18375 fi
18376
18377 if test $ol_cv_lib_db = no ; then
18378         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18379 echo "configure:18380: checking for Berkeley DB link (-ldb-4.2)" >&5
18380 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18381   echo $ac_n "(cached) $ac_c" 1>&6
18382 else
18383   
18384         ol_DB_LIB=-ldb-4.2
18385         ol_LIBS=$LIBS
18386         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18387
18388         cat > conftest.$ac_ext <<EOF
18389 #line 18390 "configure"
18390 #include "confdefs.h"
18391
18392 #ifdef HAVE_DB_185_H
18393 # include <db_185.h>
18394 #else
18395 # include <db.h>
18396 #endif
18397
18398 #ifndef DB_VERSION_MAJOR
18399 # define DB_VERSION_MAJOR 1
18400 #endif
18401
18402 #ifndef NULL
18403 #define NULL ((void*)0)
18404 #endif
18405
18406 int main() {
18407
18408 #if DB_VERSION_MAJOR > 1
18409         {
18410                 char *version;
18411                 int major, minor, patch;
18412
18413                 version = db_version( &major, &minor, &patch );
18414
18415                 if( major != DB_VERSION_MAJOR ||
18416                         minor < DB_VERSION_MINOR )
18417                 {
18418                         printf("Berkeley DB version mismatch\n"
18419                                 "\texpected: %s\n\tgot: %s\n",
18420                                 DB_VERSION_STRING, version);
18421                         return 1;
18422                 }
18423         }
18424 #endif
18425
18426 #if DB_VERSION_MAJOR > 2
18427         db_env_create( NULL, 0 );
18428 #elif DB_VERSION_MAJOR > 1
18429         db_appexit( NULL );
18430 #else
18431         (void) dbopen( NULL, 0, 0, 0, NULL);
18432 #endif
18433
18434 ; return 0; }
18435 EOF
18436 if { (eval echo configure:18437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18437   rm -rf conftest*
18438   ol_cv_db_db_4_dot_2=yes
18439 else
18440   echo "configure: failed program was:" >&5
18441   cat conftest.$ac_ext >&5
18442   rm -rf conftest*
18443   ol_cv_db_db_4_dot_2=no
18444 fi
18445 rm -f conftest*
18446
18447         LIBS="$ol_LIBS"
18448
18449 fi
18450
18451 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18452
18453         if test $ol_cv_db_db_4_dot_2 = yes ; then
18454                 ol_cv_lib_db=-ldb-4.2
18455         fi
18456 fi
18457
18458 if test $ol_cv_lib_db = no ; then
18459         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18460 echo "configure:18461: checking for Berkeley DB link (-ldb-4-2)" >&5
18461 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18462   echo $ac_n "(cached) $ac_c" 1>&6
18463 else
18464   
18465         ol_DB_LIB=-ldb-4-2
18466         ol_LIBS=$LIBS
18467         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18468
18469         cat > conftest.$ac_ext <<EOF
18470 #line 18471 "configure"
18471 #include "confdefs.h"
18472
18473 #ifdef HAVE_DB_185_H
18474 # include <db_185.h>
18475 #else
18476 # include <db.h>
18477 #endif
18478
18479 #ifndef DB_VERSION_MAJOR
18480 # define DB_VERSION_MAJOR 1
18481 #endif
18482
18483 #ifndef NULL
18484 #define NULL ((void*)0)
18485 #endif
18486
18487 int main() {
18488
18489 #if DB_VERSION_MAJOR > 1
18490         {
18491                 char *version;
18492                 int major, minor, patch;
18493
18494                 version = db_version( &major, &minor, &patch );
18495
18496                 if( major != DB_VERSION_MAJOR ||
18497                         minor < DB_VERSION_MINOR )
18498                 {
18499                         printf("Berkeley DB version mismatch\n"
18500                                 "\texpected: %s\n\tgot: %s\n",
18501                                 DB_VERSION_STRING, version);
18502                         return 1;
18503                 }
18504         }
18505 #endif
18506
18507 #if DB_VERSION_MAJOR > 2
18508         db_env_create( NULL, 0 );
18509 #elif DB_VERSION_MAJOR > 1
18510         db_appexit( NULL );
18511 #else
18512         (void) dbopen( NULL, 0, 0, 0, NULL);
18513 #endif
18514
18515 ; return 0; }
18516 EOF
18517 if { (eval echo configure:18518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18518   rm -rf conftest*
18519   ol_cv_db_db_4_2=yes
18520 else
18521   echo "configure: failed program was:" >&5
18522   cat conftest.$ac_ext >&5
18523   rm -rf conftest*
18524   ol_cv_db_db_4_2=no
18525 fi
18526 rm -f conftest*
18527
18528         LIBS="$ol_LIBS"
18529
18530 fi
18531
18532 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18533
18534         if test $ol_cv_db_db_4_2 = yes ; then
18535                 ol_cv_lib_db=-ldb-4-2
18536         fi
18537 fi
18538
18539 if test $ol_cv_lib_db = no ; then
18540         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18541 echo "configure:18542: checking for Berkeley DB link (-ldb-4)" >&5
18542 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18543   echo $ac_n "(cached) $ac_c" 1>&6
18544 else
18545   
18546         ol_DB_LIB=-ldb-4
18547         ol_LIBS=$LIBS
18548         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18549
18550         cat > conftest.$ac_ext <<EOF
18551 #line 18552 "configure"
18552 #include "confdefs.h"
18553
18554 #ifdef HAVE_DB_185_H
18555 # include <db_185.h>
18556 #else
18557 # include <db.h>
18558 #endif
18559
18560 #ifndef DB_VERSION_MAJOR
18561 # define DB_VERSION_MAJOR 1
18562 #endif
18563
18564 #ifndef NULL
18565 #define NULL ((void*)0)
18566 #endif
18567
18568 int main() {
18569
18570 #if DB_VERSION_MAJOR > 1
18571         {
18572                 char *version;
18573                 int major, minor, patch;
18574
18575                 version = db_version( &major, &minor, &patch );
18576
18577                 if( major != DB_VERSION_MAJOR ||
18578                         minor < DB_VERSION_MINOR )
18579                 {
18580                         printf("Berkeley DB version mismatch\n"
18581                                 "\texpected: %s\n\tgot: %s\n",
18582                                 DB_VERSION_STRING, version);
18583                         return 1;
18584                 }
18585         }
18586 #endif
18587
18588 #if DB_VERSION_MAJOR > 2
18589         db_env_create( NULL, 0 );
18590 #elif DB_VERSION_MAJOR > 1
18591         db_appexit( NULL );
18592 #else
18593         (void) dbopen( NULL, 0, 0, 0, NULL);
18594 #endif
18595
18596 ; return 0; }
18597 EOF
18598 if { (eval echo configure:18599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18599   rm -rf conftest*
18600   ol_cv_db_db_4=yes
18601 else
18602   echo "configure: failed program was:" >&5
18603   cat conftest.$ac_ext >&5
18604   rm -rf conftest*
18605   ol_cv_db_db_4=no
18606 fi
18607 rm -f conftest*
18608
18609         LIBS="$ol_LIBS"
18610
18611 fi
18612
18613 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18614
18615         if test $ol_cv_db_db_4 = yes ; then
18616                 ol_cv_lib_db=-ldb-4
18617         fi
18618 fi
18619
18620 if test $ol_cv_lib_db = no ; then
18621         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18622 echo "configure:18623: checking for Berkeley DB link (-ldb4)" >&5
18623 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18624   echo $ac_n "(cached) $ac_c" 1>&6
18625 else
18626   
18627         ol_DB_LIB=-ldb4
18628         ol_LIBS=$LIBS
18629         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18630
18631         cat > conftest.$ac_ext <<EOF
18632 #line 18633 "configure"
18633 #include "confdefs.h"
18634
18635 #ifdef HAVE_DB_185_H
18636 # include <db_185.h>
18637 #else
18638 # include <db.h>
18639 #endif
18640
18641 #ifndef DB_VERSION_MAJOR
18642 # define DB_VERSION_MAJOR 1
18643 #endif
18644
18645 #ifndef NULL
18646 #define NULL ((void*)0)
18647 #endif
18648
18649 int main() {
18650
18651 #if DB_VERSION_MAJOR > 1
18652         {
18653                 char *version;
18654                 int major, minor, patch;
18655
18656                 version = db_version( &major, &minor, &patch );
18657
18658                 if( major != DB_VERSION_MAJOR ||
18659                         minor < DB_VERSION_MINOR )
18660                 {
18661                         printf("Berkeley DB version mismatch\n"
18662                                 "\texpected: %s\n\tgot: %s\n",
18663                                 DB_VERSION_STRING, version);
18664                         return 1;
18665                 }
18666         }
18667 #endif
18668
18669 #if DB_VERSION_MAJOR > 2
18670         db_env_create( NULL, 0 );
18671 #elif DB_VERSION_MAJOR > 1
18672         db_appexit( NULL );
18673 #else
18674         (void) dbopen( NULL, 0, 0, 0, NULL);
18675 #endif
18676
18677 ; return 0; }
18678 EOF
18679 if { (eval echo configure:18680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18680   rm -rf conftest*
18681   ol_cv_db_db4=yes
18682 else
18683   echo "configure: failed program was:" >&5
18684   cat conftest.$ac_ext >&5
18685   rm -rf conftest*
18686   ol_cv_db_db4=no
18687 fi
18688 rm -f conftest*
18689
18690         LIBS="$ol_LIBS"
18691
18692 fi
18693
18694 echo "$ac_t""$ol_cv_db_db4" 1>&6
18695
18696         if test $ol_cv_db_db4 = yes ; then
18697                 ol_cv_lib_db=-ldb4
18698         fi
18699 fi
18700
18701 if test $ol_cv_lib_db = no ; then
18702         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18703 echo "configure:18704: checking for Berkeley DB link (-ldb)" >&5
18704 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18705   echo $ac_n "(cached) $ac_c" 1>&6
18706 else
18707   
18708         ol_DB_LIB=-ldb
18709         ol_LIBS=$LIBS
18710         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18711
18712         cat > conftest.$ac_ext <<EOF
18713 #line 18714 "configure"
18714 #include "confdefs.h"
18715
18716 #ifdef HAVE_DB_185_H
18717 # include <db_185.h>
18718 #else
18719 # include <db.h>
18720 #endif
18721
18722 #ifndef DB_VERSION_MAJOR
18723 # define DB_VERSION_MAJOR 1
18724 #endif
18725
18726 #ifndef NULL
18727 #define NULL ((void*)0)
18728 #endif
18729
18730 int main() {
18731
18732 #if DB_VERSION_MAJOR > 1
18733         {
18734                 char *version;
18735                 int major, minor, patch;
18736
18737                 version = db_version( &major, &minor, &patch );
18738
18739                 if( major != DB_VERSION_MAJOR ||
18740                         minor < DB_VERSION_MINOR )
18741                 {
18742                         printf("Berkeley DB version mismatch\n"
18743                                 "\texpected: %s\n\tgot: %s\n",
18744                                 DB_VERSION_STRING, version);
18745                         return 1;
18746                 }
18747         }
18748 #endif
18749
18750 #if DB_VERSION_MAJOR > 2
18751         db_env_create( NULL, 0 );
18752 #elif DB_VERSION_MAJOR > 1
18753         db_appexit( NULL );
18754 #else
18755         (void) dbopen( NULL, 0, 0, 0, NULL);
18756 #endif
18757
18758 ; return 0; }
18759 EOF
18760 if { (eval echo configure:18761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18761   rm -rf conftest*
18762   ol_cv_db_db=yes
18763 else
18764   echo "configure: failed program was:" >&5
18765   cat conftest.$ac_ext >&5
18766   rm -rf conftest*
18767   ol_cv_db_db=no
18768 fi
18769 rm -f conftest*
18770
18771         LIBS="$ol_LIBS"
18772
18773 fi
18774
18775 echo "$ac_t""$ol_cv_db_db" 1>&6
18776
18777         if test $ol_cv_db_db = yes ; then
18778                 ol_cv_lib_db=-ldb
18779         fi
18780 fi
18781
18782 if test $ol_cv_lib_db = no ; then
18783         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18784 echo "configure:18785: checking for Berkeley DB link (-ldb41)" >&5
18785 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18786   echo $ac_n "(cached) $ac_c" 1>&6
18787 else
18788   
18789         ol_DB_LIB=-ldb41
18790         ol_LIBS=$LIBS
18791         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18792
18793         cat > conftest.$ac_ext <<EOF
18794 #line 18795 "configure"
18795 #include "confdefs.h"
18796
18797 #ifdef HAVE_DB_185_H
18798 # include <db_185.h>
18799 #else
18800 # include <db.h>
18801 #endif
18802
18803 #ifndef DB_VERSION_MAJOR
18804 # define DB_VERSION_MAJOR 1
18805 #endif
18806
18807 #ifndef NULL
18808 #define NULL ((void*)0)
18809 #endif
18810
18811 int main() {
18812
18813 #if DB_VERSION_MAJOR > 1
18814         {
18815                 char *version;
18816                 int major, minor, patch;
18817
18818                 version = db_version( &major, &minor, &patch );
18819
18820                 if( major != DB_VERSION_MAJOR ||
18821                         minor < DB_VERSION_MINOR )
18822                 {
18823                         printf("Berkeley DB version mismatch\n"
18824                                 "\texpected: %s\n\tgot: %s\n",
18825                                 DB_VERSION_STRING, version);
18826                         return 1;
18827                 }
18828         }
18829 #endif
18830
18831 #if DB_VERSION_MAJOR > 2
18832         db_env_create( NULL, 0 );
18833 #elif DB_VERSION_MAJOR > 1
18834         db_appexit( NULL );
18835 #else
18836         (void) dbopen( NULL, 0, 0, 0, NULL);
18837 #endif
18838
18839 ; return 0; }
18840 EOF
18841 if { (eval echo configure:18842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18842   rm -rf conftest*
18843   ol_cv_db_db41=yes
18844 else
18845   echo "configure: failed program was:" >&5
18846   cat conftest.$ac_ext >&5
18847   rm -rf conftest*
18848   ol_cv_db_db41=no
18849 fi
18850 rm -f conftest*
18851
18852         LIBS="$ol_LIBS"
18853
18854 fi
18855
18856 echo "$ac_t""$ol_cv_db_db41" 1>&6
18857
18858         if test $ol_cv_db_db41 = yes ; then
18859                 ol_cv_lib_db=-ldb41
18860         fi
18861 fi
18862
18863 if test $ol_cv_lib_db = no ; then
18864         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18865 echo "configure:18866: checking for Berkeley DB link (-ldb-41)" >&5
18866 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18867   echo $ac_n "(cached) $ac_c" 1>&6
18868 else
18869   
18870         ol_DB_LIB=-ldb-41
18871         ol_LIBS=$LIBS
18872         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18873
18874         cat > conftest.$ac_ext <<EOF
18875 #line 18876 "configure"
18876 #include "confdefs.h"
18877
18878 #ifdef HAVE_DB_185_H
18879 # include <db_185.h>
18880 #else
18881 # include <db.h>
18882 #endif
18883
18884 #ifndef DB_VERSION_MAJOR
18885 # define DB_VERSION_MAJOR 1
18886 #endif
18887
18888 #ifndef NULL
18889 #define NULL ((void*)0)
18890 #endif
18891
18892 int main() {
18893
18894 #if DB_VERSION_MAJOR > 1
18895         {
18896                 char *version;
18897                 int major, minor, patch;
18898
18899                 version = db_version( &major, &minor, &patch );
18900
18901                 if( major != DB_VERSION_MAJOR ||
18902                         minor < DB_VERSION_MINOR )
18903                 {
18904                         printf("Berkeley DB version mismatch\n"
18905                                 "\texpected: %s\n\tgot: %s\n",
18906                                 DB_VERSION_STRING, version);
18907                         return 1;
18908                 }
18909         }
18910 #endif
18911
18912 #if DB_VERSION_MAJOR > 2
18913         db_env_create( NULL, 0 );
18914 #elif DB_VERSION_MAJOR > 1
18915         db_appexit( NULL );
18916 #else
18917         (void) dbopen( NULL, 0, 0, 0, NULL);
18918 #endif
18919
18920 ; return 0; }
18921 EOF
18922 if { (eval echo configure:18923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18923   rm -rf conftest*
18924   ol_cv_db_db_41=yes
18925 else
18926   echo "configure: failed program was:" >&5
18927   cat conftest.$ac_ext >&5
18928   rm -rf conftest*
18929   ol_cv_db_db_41=no
18930 fi
18931 rm -f conftest*
18932
18933         LIBS="$ol_LIBS"
18934
18935 fi
18936
18937 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18938
18939         if test $ol_cv_db_db_41 = yes ; then
18940                 ol_cv_lib_db=-ldb-41
18941         fi
18942 fi
18943
18944 if test $ol_cv_lib_db = no ; then
18945         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18946 echo "configure:18947: checking for Berkeley DB link (-ldb-4.1)" >&5
18947 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18948   echo $ac_n "(cached) $ac_c" 1>&6
18949 else
18950   
18951         ol_DB_LIB=-ldb-4.1
18952         ol_LIBS=$LIBS
18953         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18954
18955         cat > conftest.$ac_ext <<EOF
18956 #line 18957 "configure"
18957 #include "confdefs.h"
18958
18959 #ifdef HAVE_DB_185_H
18960 # include <db_185.h>
18961 #else
18962 # include <db.h>
18963 #endif
18964
18965 #ifndef DB_VERSION_MAJOR
18966 # define DB_VERSION_MAJOR 1
18967 #endif
18968
18969 #ifndef NULL
18970 #define NULL ((void*)0)
18971 #endif
18972
18973 int main() {
18974
18975 #if DB_VERSION_MAJOR > 1
18976         {
18977                 char *version;
18978                 int major, minor, patch;
18979
18980                 version = db_version( &major, &minor, &patch );
18981
18982                 if( major != DB_VERSION_MAJOR ||
18983                         minor < DB_VERSION_MINOR )
18984                 {
18985                         printf("Berkeley DB version mismatch\n"
18986                                 "\texpected: %s\n\tgot: %s\n",
18987                                 DB_VERSION_STRING, version);
18988                         return 1;
18989                 }
18990         }
18991 #endif
18992
18993 #if DB_VERSION_MAJOR > 2
18994         db_env_create( NULL, 0 );
18995 #elif DB_VERSION_MAJOR > 1
18996         db_appexit( NULL );
18997 #else
18998         (void) dbopen( NULL, 0, 0, 0, NULL);
18999 #endif
19000
19001 ; return 0; }
19002 EOF
19003 if { (eval echo configure:19004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19004   rm -rf conftest*
19005   ol_cv_db_db_4_dot_1=yes
19006 else
19007   echo "configure: failed program was:" >&5
19008   cat conftest.$ac_ext >&5
19009   rm -rf conftest*
19010   ol_cv_db_db_4_dot_1=no
19011 fi
19012 rm -f conftest*
19013
19014         LIBS="$ol_LIBS"
19015
19016 fi
19017
19018 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19019
19020         if test $ol_cv_db_db_4_dot_1 = yes ; then
19021                 ol_cv_lib_db=-ldb-4.1
19022         fi
19023 fi
19024
19025 if test $ol_cv_lib_db = no ; then
19026         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19027 echo "configure:19028: checking for Berkeley DB link (-ldb-4-1)" >&5
19028 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19029   echo $ac_n "(cached) $ac_c" 1>&6
19030 else
19031   
19032         ol_DB_LIB=-ldb-4-1
19033         ol_LIBS=$LIBS
19034         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19035
19036         cat > conftest.$ac_ext <<EOF
19037 #line 19038 "configure"
19038 #include "confdefs.h"
19039
19040 #ifdef HAVE_DB_185_H
19041 # include <db_185.h>
19042 #else
19043 # include <db.h>
19044 #endif
19045
19046 #ifndef DB_VERSION_MAJOR
19047 # define DB_VERSION_MAJOR 1
19048 #endif
19049
19050 #ifndef NULL
19051 #define NULL ((void*)0)
19052 #endif
19053
19054 int main() {
19055
19056 #if DB_VERSION_MAJOR > 1
19057         {
19058                 char *version;
19059                 int major, minor, patch;
19060
19061                 version = db_version( &major, &minor, &patch );
19062
19063                 if( major != DB_VERSION_MAJOR ||
19064                         minor < DB_VERSION_MINOR )
19065                 {
19066                         printf("Berkeley DB version mismatch\n"
19067                                 "\texpected: %s\n\tgot: %s\n",
19068                                 DB_VERSION_STRING, version);
19069                         return 1;
19070                 }
19071         }
19072 #endif
19073
19074 #if DB_VERSION_MAJOR > 2
19075         db_env_create( NULL, 0 );
19076 #elif DB_VERSION_MAJOR > 1
19077         db_appexit( NULL );
19078 #else
19079         (void) dbopen( NULL, 0, 0, 0, NULL);
19080 #endif
19081
19082 ; return 0; }
19083 EOF
19084 if { (eval echo configure:19085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19085   rm -rf conftest*
19086   ol_cv_db_db_4_1=yes
19087 else
19088   echo "configure: failed program was:" >&5
19089   cat conftest.$ac_ext >&5
19090   rm -rf conftest*
19091   ol_cv_db_db_4_1=no
19092 fi
19093 rm -f conftest*
19094
19095         LIBS="$ol_LIBS"
19096
19097 fi
19098
19099 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19100
19101         if test $ol_cv_db_db_4_1 = yes ; then
19102                 ol_cv_lib_db=-ldb-4-1
19103         fi
19104 fi
19105
19106 if test $ol_cv_lib_db = no ; then
19107         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19108 echo "configure:19109: checking for Berkeley DB link (-ldb3)" >&5
19109 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19110   echo $ac_n "(cached) $ac_c" 1>&6
19111 else
19112   
19113         ol_DB_LIB=-ldb3
19114         ol_LIBS=$LIBS
19115         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19116
19117         cat > conftest.$ac_ext <<EOF
19118 #line 19119 "configure"
19119 #include "confdefs.h"
19120
19121 #ifdef HAVE_DB_185_H
19122 # include <db_185.h>
19123 #else
19124 # include <db.h>
19125 #endif
19126
19127 #ifndef DB_VERSION_MAJOR
19128 # define DB_VERSION_MAJOR 1
19129 #endif
19130
19131 #ifndef NULL
19132 #define NULL ((void*)0)
19133 #endif
19134
19135 int main() {
19136
19137 #if DB_VERSION_MAJOR > 1
19138         {
19139                 char *version;
19140                 int major, minor, patch;
19141
19142                 version = db_version( &major, &minor, &patch );
19143
19144                 if( major != DB_VERSION_MAJOR ||
19145                         minor < DB_VERSION_MINOR )
19146                 {
19147                         printf("Berkeley DB version mismatch\n"
19148                                 "\texpected: %s\n\tgot: %s\n",
19149                                 DB_VERSION_STRING, version);
19150                         return 1;
19151                 }
19152         }
19153 #endif
19154
19155 #if DB_VERSION_MAJOR > 2
19156         db_env_create( NULL, 0 );
19157 #elif DB_VERSION_MAJOR > 1
19158         db_appexit( NULL );
19159 #else
19160         (void) dbopen( NULL, 0, 0, 0, NULL);
19161 #endif
19162
19163 ; return 0; }
19164 EOF
19165 if { (eval echo configure:19166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19166   rm -rf conftest*
19167   ol_cv_db_db3=yes
19168 else
19169   echo "configure: failed program was:" >&5
19170   cat conftest.$ac_ext >&5
19171   rm -rf conftest*
19172   ol_cv_db_db3=no
19173 fi
19174 rm -f conftest*
19175
19176         LIBS="$ol_LIBS"
19177
19178 fi
19179
19180 echo "$ac_t""$ol_cv_db_db3" 1>&6
19181
19182         if test $ol_cv_db_db3 = yes ; then
19183                 ol_cv_lib_db=-ldb3
19184         fi
19185 fi
19186
19187 if test $ol_cv_lib_db = no ; then
19188         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19189 echo "configure:19190: checking for Berkeley DB link (-ldb-3)" >&5
19190 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19191   echo $ac_n "(cached) $ac_c" 1>&6
19192 else
19193   
19194         ol_DB_LIB=-ldb-3
19195         ol_LIBS=$LIBS
19196         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19197
19198         cat > conftest.$ac_ext <<EOF
19199 #line 19200 "configure"
19200 #include "confdefs.h"
19201
19202 #ifdef HAVE_DB_185_H
19203 # include <db_185.h>
19204 #else
19205 # include <db.h>
19206 #endif
19207
19208 #ifndef DB_VERSION_MAJOR
19209 # define DB_VERSION_MAJOR 1
19210 #endif
19211
19212 #ifndef NULL
19213 #define NULL ((void*)0)
19214 #endif
19215
19216 int main() {
19217
19218 #if DB_VERSION_MAJOR > 1
19219         {
19220                 char *version;
19221                 int major, minor, patch;
19222
19223                 version = db_version( &major, &minor, &patch );
19224
19225                 if( major != DB_VERSION_MAJOR ||
19226                         minor < DB_VERSION_MINOR )
19227                 {
19228                         printf("Berkeley DB version mismatch\n"
19229                                 "\texpected: %s\n\tgot: %s\n",
19230                                 DB_VERSION_STRING, version);
19231                         return 1;
19232                 }
19233         }
19234 #endif
19235
19236 #if DB_VERSION_MAJOR > 2
19237         db_env_create( NULL, 0 );
19238 #elif DB_VERSION_MAJOR > 1
19239         db_appexit( NULL );
19240 #else
19241         (void) dbopen( NULL, 0, 0, 0, NULL);
19242 #endif
19243
19244 ; return 0; }
19245 EOF
19246 if { (eval echo configure:19247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19247   rm -rf conftest*
19248   ol_cv_db_db_3=yes
19249 else
19250   echo "configure: failed program was:" >&5
19251   cat conftest.$ac_ext >&5
19252   rm -rf conftest*
19253   ol_cv_db_db_3=no
19254 fi
19255 rm -f conftest*
19256
19257         LIBS="$ol_LIBS"
19258
19259 fi
19260
19261 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19262
19263         if test $ol_cv_db_db_3 = yes ; then
19264                 ol_cv_lib_db=-ldb-3
19265         fi
19266 fi
19267
19268 if test $ol_cv_lib_db = no ; then
19269         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19270 echo "configure:19271: checking for Berkeley DB link (-ldb2)" >&5
19271 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19272   echo $ac_n "(cached) $ac_c" 1>&6
19273 else
19274   
19275         ol_DB_LIB=-ldb2
19276         ol_LIBS=$LIBS
19277         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19278
19279         cat > conftest.$ac_ext <<EOF
19280 #line 19281 "configure"
19281 #include "confdefs.h"
19282
19283 #ifdef HAVE_DB_185_H
19284 # include <db_185.h>
19285 #else
19286 # include <db.h>
19287 #endif
19288
19289 #ifndef DB_VERSION_MAJOR
19290 # define DB_VERSION_MAJOR 1
19291 #endif
19292
19293 #ifndef NULL
19294 #define NULL ((void*)0)
19295 #endif
19296
19297 int main() {
19298
19299 #if DB_VERSION_MAJOR > 1
19300         {
19301                 char *version;
19302                 int major, minor, patch;
19303
19304                 version = db_version( &major, &minor, &patch );
19305
19306                 if( major != DB_VERSION_MAJOR ||
19307                         minor < DB_VERSION_MINOR )
19308                 {
19309                         printf("Berkeley DB version mismatch\n"
19310                                 "\texpected: %s\n\tgot: %s\n",
19311                                 DB_VERSION_STRING, version);
19312                         return 1;
19313                 }
19314         }
19315 #endif
19316
19317 #if DB_VERSION_MAJOR > 2
19318         db_env_create( NULL, 0 );
19319 #elif DB_VERSION_MAJOR > 1
19320         db_appexit( NULL );
19321 #else
19322         (void) dbopen( NULL, 0, 0, 0, NULL);
19323 #endif
19324
19325 ; return 0; }
19326 EOF
19327 if { (eval echo configure:19328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19328   rm -rf conftest*
19329   ol_cv_db_db2=yes
19330 else
19331   echo "configure: failed program was:" >&5
19332   cat conftest.$ac_ext >&5
19333   rm -rf conftest*
19334   ol_cv_db_db2=no
19335 fi
19336 rm -f conftest*
19337
19338         LIBS="$ol_LIBS"
19339
19340 fi
19341
19342 echo "$ac_t""$ol_cv_db_db2" 1>&6
19343
19344         if test $ol_cv_db_db2 = yes ; then
19345                 ol_cv_lib_db=-ldb2
19346         fi
19347 fi
19348
19349 if test $ol_cv_lib_db = no ; then
19350         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19351 echo "configure:19352: checking for Berkeley DB link (-ldb-2)" >&5
19352 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19353   echo $ac_n "(cached) $ac_c" 1>&6
19354 else
19355   
19356         ol_DB_LIB=-ldb-2
19357         ol_LIBS=$LIBS
19358         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19359
19360         cat > conftest.$ac_ext <<EOF
19361 #line 19362 "configure"
19362 #include "confdefs.h"
19363
19364 #ifdef HAVE_DB_185_H
19365 # include <db_185.h>
19366 #else
19367 # include <db.h>
19368 #endif
19369
19370 #ifndef DB_VERSION_MAJOR
19371 # define DB_VERSION_MAJOR 1
19372 #endif
19373
19374 #ifndef NULL
19375 #define NULL ((void*)0)
19376 #endif
19377
19378 int main() {
19379
19380 #if DB_VERSION_MAJOR > 1
19381         {
19382                 char *version;
19383                 int major, minor, patch;
19384
19385                 version = db_version( &major, &minor, &patch );
19386
19387                 if( major != DB_VERSION_MAJOR ||
19388                         minor < DB_VERSION_MINOR )
19389                 {
19390                         printf("Berkeley DB version mismatch\n"
19391                                 "\texpected: %s\n\tgot: %s\n",
19392                                 DB_VERSION_STRING, version);
19393                         return 1;
19394                 }
19395         }
19396 #endif
19397
19398 #if DB_VERSION_MAJOR > 2
19399         db_env_create( NULL, 0 );
19400 #elif DB_VERSION_MAJOR > 1
19401         db_appexit( NULL );
19402 #else
19403         (void) dbopen( NULL, 0, 0, 0, NULL);
19404 #endif
19405
19406 ; return 0; }
19407 EOF
19408 if { (eval echo configure:19409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19409   rm -rf conftest*
19410   ol_cv_db_db_2=yes
19411 else
19412   echo "configure: failed program was:" >&5
19413   cat conftest.$ac_ext >&5
19414   rm -rf conftest*
19415   ol_cv_db_db_2=no
19416 fi
19417 rm -f conftest*
19418
19419         LIBS="$ol_LIBS"
19420
19421 fi
19422
19423 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19424
19425         if test $ol_cv_db_db_2 = yes ; then
19426                 ol_cv_lib_db=-ldb-2
19427         fi
19428 fi
19429
19430 if test $ol_cv_lib_db = no ; then
19431         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19432 echo "configure:19433: checking for Berkeley DB link (-ldb1)" >&5
19433 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19434   echo $ac_n "(cached) $ac_c" 1>&6
19435 else
19436   
19437         ol_DB_LIB=-ldb1
19438         ol_LIBS=$LIBS
19439         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19440
19441         cat > conftest.$ac_ext <<EOF
19442 #line 19443 "configure"
19443 #include "confdefs.h"
19444
19445 #ifdef HAVE_DB_185_H
19446 # include <db_185.h>
19447 #else
19448 # include <db.h>
19449 #endif
19450
19451 #ifndef DB_VERSION_MAJOR
19452 # define DB_VERSION_MAJOR 1
19453 #endif
19454
19455 #ifndef NULL
19456 #define NULL ((void*)0)
19457 #endif
19458
19459 int main() {
19460
19461 #if DB_VERSION_MAJOR > 1
19462         {
19463                 char *version;
19464                 int major, minor, patch;
19465
19466                 version = db_version( &major, &minor, &patch );
19467
19468                 if( major != DB_VERSION_MAJOR ||
19469                         minor < DB_VERSION_MINOR )
19470                 {
19471                         printf("Berkeley DB version mismatch\n"
19472                                 "\texpected: %s\n\tgot: %s\n",
19473                                 DB_VERSION_STRING, version);
19474                         return 1;
19475                 }
19476         }
19477 #endif
19478
19479 #if DB_VERSION_MAJOR > 2
19480         db_env_create( NULL, 0 );
19481 #elif DB_VERSION_MAJOR > 1
19482         db_appexit( NULL );
19483 #else
19484         (void) dbopen( NULL, 0, 0, 0, NULL);
19485 #endif
19486
19487 ; return 0; }
19488 EOF
19489 if { (eval echo configure:19490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19490   rm -rf conftest*
19491   ol_cv_db_db1=yes
19492 else
19493   echo "configure: failed program was:" >&5
19494   cat conftest.$ac_ext >&5
19495   rm -rf conftest*
19496   ol_cv_db_db1=no
19497 fi
19498 rm -f conftest*
19499
19500         LIBS="$ol_LIBS"
19501
19502 fi
19503
19504 echo "$ac_t""$ol_cv_db_db1" 1>&6
19505
19506         if test $ol_cv_db_db1 = yes ; then
19507                 ol_cv_lib_db=-ldb1
19508         fi
19509 fi
19510
19511 if test $ol_cv_lib_db = no ; then
19512         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19513 echo "configure:19514: checking for Berkeley DB link (-ldb-1)" >&5
19514 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19515   echo $ac_n "(cached) $ac_c" 1>&6
19516 else
19517   
19518         ol_DB_LIB=-ldb-1
19519         ol_LIBS=$LIBS
19520         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19521
19522         cat > conftest.$ac_ext <<EOF
19523 #line 19524 "configure"
19524 #include "confdefs.h"
19525
19526 #ifdef HAVE_DB_185_H
19527 # include <db_185.h>
19528 #else
19529 # include <db.h>
19530 #endif
19531
19532 #ifndef DB_VERSION_MAJOR
19533 # define DB_VERSION_MAJOR 1
19534 #endif
19535
19536 #ifndef NULL
19537 #define NULL ((void*)0)
19538 #endif
19539
19540 int main() {
19541
19542 #if DB_VERSION_MAJOR > 1
19543         {
19544                 char *version;
19545                 int major, minor, patch;
19546
19547                 version = db_version( &major, &minor, &patch );
19548
19549                 if( major != DB_VERSION_MAJOR ||
19550                         minor < DB_VERSION_MINOR )
19551                 {
19552                         printf("Berkeley DB version mismatch\n"
19553                                 "\texpected: %s\n\tgot: %s\n",
19554                                 DB_VERSION_STRING, version);
19555                         return 1;
19556                 }
19557         }
19558 #endif
19559
19560 #if DB_VERSION_MAJOR > 2
19561         db_env_create( NULL, 0 );
19562 #elif DB_VERSION_MAJOR > 1
19563         db_appexit( NULL );
19564 #else
19565         (void) dbopen( NULL, 0, 0, 0, NULL);
19566 #endif
19567
19568 ; return 0; }
19569 EOF
19570 if { (eval echo configure:19571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19571   rm -rf conftest*
19572   ol_cv_db_db_1=yes
19573 else
19574   echo "configure: failed program was:" >&5
19575   cat conftest.$ac_ext >&5
19576   rm -rf conftest*
19577   ol_cv_db_db_1=no
19578 fi
19579 rm -f conftest*
19580
19581         LIBS="$ol_LIBS"
19582
19583 fi
19584
19585 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19586
19587         if test $ol_cv_db_db_1 = yes ; then
19588                 ol_cv_lib_db=-ldb-1
19589         fi
19590 fi
19591
19592
19593         if test "$ol_cv_lib_db" != no ; then
19594                 ol_cv_berkeley_db=yes
19595                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19596 echo "configure:19597: checking for Berkeley DB thread support" >&5
19597 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19598   echo $ac_n "(cached) $ac_c" 1>&6
19599 else
19600   
19601         ol_LIBS="$LIBS"
19602         LIBS="$LTHREAD_LIBS $LIBS"
19603         if test $ol_cv_lib_db != yes ; then
19604                 LIBS="$ol_cv_lib_db $LIBS"
19605         fi
19606
19607         if test "$cross_compiling" = yes; then
19608   ol_cv_berkeley_db_thread=cross
19609 else
19610   cat > conftest.$ac_ext <<EOF
19611 #line 19612 "configure"
19612 #include "confdefs.h"
19613
19614 #ifdef HAVE_DB_185_H
19615         choke me;
19616 #else
19617 #include <db.h>
19618 #endif
19619 #ifndef NULL
19620 #define NULL ((void *)0)
19621 #endif
19622 main()
19623 {
19624         int rc;
19625         u_int32_t flags = DB_CREATE |
19626 #ifdef DB_PRIVATE
19627                 DB_PRIVATE |
19628 #endif
19629                 DB_THREAD;
19630
19631 #if DB_VERSION_MAJOR > 2
19632         DB_ENV *env = NULL;
19633
19634         rc = db_env_create( &env, 0 );
19635
19636         flags |= DB_INIT_MPOOL;
19637 #ifdef DB_MPOOL_PRIVATE
19638         flags |= DB_MPOOL_PRIVATE;
19639 #endif
19640
19641         if( rc ) {
19642                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19643                 return rc;
19644         }
19645
19646 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19647         rc = env->open( env, NULL, flags, 0 );
19648 #else
19649         rc = env->open( env, NULL, NULL, flags, 0 );
19650 #endif
19651
19652         if ( rc == 0 ) {
19653                 rc = env->close( env, 0 );
19654         }
19655
19656         if( rc ) {
19657                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19658                 return rc;
19659         }
19660
19661 #else
19662         DB_ENV env;
19663         memset( &env, '\0', sizeof(env) );
19664
19665         rc = db_appinit( NULL, NULL, &env, flags );
19666
19667         if( rc == 0 ) {
19668                 db_appexit( &env );
19669         }
19670
19671         unlink("__db_mpool.share");
19672         unlink("__db_lock.share");
19673 #endif
19674
19675         return rc;
19676 }
19677 EOF
19678 if { (eval echo configure:19679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19679 then
19680   ol_cv_berkeley_db_thread=yes
19681 else
19682   echo "configure: failed program was:" >&5
19683   cat conftest.$ac_ext >&5
19684   rm -fr conftest*
19685   ol_cv_berkeley_db_thread=no
19686 fi
19687 rm -fr conftest*
19688 fi
19689
19690
19691         LIBS="$ol_LIBS"
19692
19693 fi
19694
19695 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19696
19697         if test $ol_cv_berkeley_db_thread != no ; then
19698                 cat >> confdefs.h <<\EOF
19699 #define HAVE_BERKELEY_DB_THREAD 1
19700 EOF
19701
19702         fi
19703
19704         fi
19705 fi
19706
19707         fi
19708
19709         if test $ol_cv_berkeley_db != no ; then
19710                 cat >> confdefs.h <<\EOF
19711 #define HAVE_BERKELEY_DB 1
19712 EOF
19713
19714
19715                 ol_link_ldbm=berkeley
19716                 ol_with_ldbm_api=berkeley
19717
19718                 if test $ol_with_ldbm_type = hash ; then
19719                         cat >> confdefs.h <<\EOF
19720 #define LDBM_USE_DBHASH 1
19721 EOF
19722
19723                 else
19724                         cat >> confdefs.h <<\EOF
19725 #define LDBM_USE_DBBTREE 1
19726 EOF
19727
19728                 fi
19729
19730                                                 if test $ol_cv_lib_db != yes ; then
19731                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19732                 fi
19733         fi
19734 fi
19735
19736 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19737         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19738 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19739         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19740 echo "configure:19741: checking Berkeley DB version for BDB backend" >&5
19741 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19742   echo $ac_n "(cached) $ac_c" 1>&6
19743 else
19744   
19745         cat > conftest.$ac_ext <<EOF
19746 #line 19747 "configure"
19747 #include "confdefs.h"
19748
19749 #include <db.h>
19750
19751  /* this check could be improved */
19752 #ifndef DB_VERSION_MAJOR
19753 #       define DB_VERSION_MAJOR 1
19754 #endif
19755 #ifndef DB_VERSION_MINOR
19756 #       define DB_VERSION_MINOR 0
19757 #endif
19758
19759 /* require 4.2 or later */
19760 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19761         __db_version_compat
19762 #endif
19763         
19764 EOF
19765 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19766   egrep "__db_version_compat" >/dev/null 2>&1; then
19767   rm -rf conftest*
19768   ol_cv_bdb_compat=yes
19769 else
19770   rm -rf conftest*
19771   ol_cv_bdb_compat=no
19772 fi
19773 rm -f conftest*
19774
19775 fi
19776
19777 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19778
19779
19780         if test $ol_cv_bdb_compat = yes ; then
19781                 ol_enable_bdb=yes
19782         elif test $ol_enable_bdb = yes ; then
19783                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19784         else
19785                 ol_enable_bdb=no
19786         fi
19787 fi
19788 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19789         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19790 fi
19791
19792 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19793         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19794         ol_with_ldbm_api=none
19795 fi
19796
19797 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19798         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19799 echo "configure:19800: checking for MDBM library" >&5
19800 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19801   echo $ac_n "(cached) $ac_c" 1>&6
19802 else
19803         ol_LIBS="$LIBS"
19804         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19805 echo "configure:19806: checking for mdbm_set_chain" >&5
19806 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19807   echo $ac_n "(cached) $ac_c" 1>&6
19808 else
19809   cat > conftest.$ac_ext <<EOF
19810 #line 19811 "configure"
19811 #include "confdefs.h"
19812 /* System header to define __stub macros and hopefully few prototypes,
19813     which can conflict with char mdbm_set_chain(); below.  */
19814 #include <assert.h>
19815 /* Override any gcc2 internal prototype to avoid an error.  */
19816 /* We use char because int might match the return type of a gcc2
19817     builtin and then its argument prototype would still apply.  */
19818 char mdbm_set_chain();
19819 char (*f)();
19820
19821 int main() {
19822
19823 /* The GNU C library defines this for functions which it implements
19824     to always fail with ENOSYS.  Some functions are actually named
19825     something starting with __ and the normal name is an alias.  */
19826 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19827 choke me
19828 #else
19829 f = mdbm_set_chain;
19830 #endif
19831
19832 ; return 0; }
19833 EOF
19834 if { (eval echo configure:19835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19835   rm -rf conftest*
19836   eval "ac_cv_func_mdbm_set_chain=yes"
19837 else
19838   echo "configure: failed program was:" >&5
19839   cat conftest.$ac_ext >&5
19840   rm -rf conftest*
19841   eval "ac_cv_func_mdbm_set_chain=no"
19842 fi
19843 rm -f conftest*
19844 fi
19845
19846 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19847   echo "$ac_t""yes" 1>&6
19848   ol_cv_lib_mdbm=yes
19849 else
19850   echo "$ac_t""no" 1>&6
19851
19852                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19853 echo "configure:19854: checking for mdbm_set_chain in -lmdbm" >&5
19854 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19855 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19856   echo $ac_n "(cached) $ac_c" 1>&6
19857 else
19858   ac_save_LIBS="$LIBS"
19859 LIBS="-lmdbm  $LIBS"
19860 cat > conftest.$ac_ext <<EOF
19861 #line 19862 "configure"
19862 #include "confdefs.h"
19863 /* Override any gcc2 internal prototype to avoid an error.  */
19864 /* We use char because int might match the return type of a gcc2
19865     builtin and then its argument prototype would still apply.  */
19866 char mdbm_set_chain();
19867
19868 int main() {
19869 mdbm_set_chain()
19870 ; return 0; }
19871 EOF
19872 if { (eval echo configure:19873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19873   rm -rf conftest*
19874   eval "ac_cv_lib_$ac_lib_var=yes"
19875 else
19876   echo "configure: failed program was:" >&5
19877   cat conftest.$ac_ext >&5
19878   rm -rf conftest*
19879   eval "ac_cv_lib_$ac_lib_var=no"
19880 fi
19881 rm -f conftest*
19882 LIBS="$ac_save_LIBS"
19883
19884 fi
19885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19886   echo "$ac_t""yes" 1>&6
19887   ol_cv_lib_mdbm=-lmdbm
19888 else
19889   echo "$ac_t""no" 1>&6
19890 ol_cv_lib_mdbm=no
19891 fi
19892
19893         
19894 fi
19895
19896         LIBS="$ol_LIBS"
19897
19898 fi
19899
19900 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19901
19902
19903  for ac_hdr in mdbm.h
19904 do
19905 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19906 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19907 echo "configure:19908: checking for $ac_hdr" >&5
19908 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19909   echo $ac_n "(cached) $ac_c" 1>&6
19910 else
19911   cat > conftest.$ac_ext <<EOF
19912 #line 19913 "configure"
19913 #include "confdefs.h"
19914 #include <$ac_hdr>
19915 EOF
19916 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19917 { (eval echo configure:19918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19918 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19919 if test -z "$ac_err"; then
19920   rm -rf conftest*
19921   eval "ac_cv_header_$ac_safe=yes"
19922 else
19923   echo "$ac_err" >&5
19924   echo "configure: failed program was:" >&5
19925   cat conftest.$ac_ext >&5
19926   rm -rf conftest*
19927   eval "ac_cv_header_$ac_safe=no"
19928 fi
19929 rm -f conftest*
19930 fi
19931 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19932   echo "$ac_t""yes" 1>&6
19933     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19934   cat >> confdefs.h <<EOF
19935 #define $ac_tr_hdr 1
19936 EOF
19937  
19938 else
19939   echo "$ac_t""no" 1>&6
19940 fi
19941 done
19942
19943  echo $ac_n "checking for db""... $ac_c" 1>&6
19944 echo "configure:19945: checking for db" >&5
19945 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19946   echo $ac_n "(cached) $ac_c" 1>&6
19947 else
19948   
19949         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19950                 ol_cv_mdbm=no
19951         else
19952                 ol_cv_mdbm=yes
19953         fi
19954
19955 fi
19956
19957 echo "$ac_t""$ol_cv_mdbm" 1>&6
19958  if test $ol_cv_mdbm = yes ; then
19959         cat >> confdefs.h <<\EOF
19960 #define HAVE_MDBM 1
19961 EOF
19962
19963  fi
19964
19965
19966         if test $ol_cv_mdbm = yes ; then
19967                 ol_link_ldbm=mdbm
19968                 ol_with_ldbm_api=mdbm
19969                 if test $ol_cv_lib_mdbm != yes ; then
19970                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19971                 fi
19972         fi
19973 fi
19974
19975 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19976         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19977 echo "configure:19978: checking for GDBM library" >&5
19978 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19979   echo $ac_n "(cached) $ac_c" 1>&6
19980 else
19981         ol_LIBS="$LIBS"
19982         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19983 echo "configure:19984: checking for gdbm_open" >&5
19984 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19985   echo $ac_n "(cached) $ac_c" 1>&6
19986 else
19987   cat > conftest.$ac_ext <<EOF
19988 #line 19989 "configure"
19989 #include "confdefs.h"
19990 /* System header to define __stub macros and hopefully few prototypes,
19991     which can conflict with char gdbm_open(); below.  */
19992 #include <assert.h>
19993 /* Override any gcc2 internal prototype to avoid an error.  */
19994 /* We use char because int might match the return type of a gcc2
19995     builtin and then its argument prototype would still apply.  */
19996 char gdbm_open();
19997 char (*f)();
19998
19999 int main() {
20000
20001 /* The GNU C library defines this for functions which it implements
20002     to always fail with ENOSYS.  Some functions are actually named
20003     something starting with __ and the normal name is an alias.  */
20004 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20005 choke me
20006 #else
20007 f = gdbm_open;
20008 #endif
20009
20010 ; return 0; }
20011 EOF
20012 if { (eval echo configure:20013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20013   rm -rf conftest*
20014   eval "ac_cv_func_gdbm_open=yes"
20015 else
20016   echo "configure: failed program was:" >&5
20017   cat conftest.$ac_ext >&5
20018   rm -rf conftest*
20019   eval "ac_cv_func_gdbm_open=no"
20020 fi
20021 rm -f conftest*
20022 fi
20023
20024 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20025   echo "$ac_t""yes" 1>&6
20026   ol_cv_lib_gdbm=yes
20027 else
20028   echo "$ac_t""no" 1>&6
20029
20030                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20031 echo "configure:20032: checking for gdbm_open in -lgdbm" >&5
20032 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20033 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20034   echo $ac_n "(cached) $ac_c" 1>&6
20035 else
20036   ac_save_LIBS="$LIBS"
20037 LIBS="-lgdbm  $LIBS"
20038 cat > conftest.$ac_ext <<EOF
20039 #line 20040 "configure"
20040 #include "confdefs.h"
20041 /* Override any gcc2 internal prototype to avoid an error.  */
20042 /* We use char because int might match the return type of a gcc2
20043     builtin and then its argument prototype would still apply.  */
20044 char gdbm_open();
20045
20046 int main() {
20047 gdbm_open()
20048 ; return 0; }
20049 EOF
20050 if { (eval echo configure:20051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20051   rm -rf conftest*
20052   eval "ac_cv_lib_$ac_lib_var=yes"
20053 else
20054   echo "configure: failed program was:" >&5
20055   cat conftest.$ac_ext >&5
20056   rm -rf conftest*
20057   eval "ac_cv_lib_$ac_lib_var=no"
20058 fi
20059 rm -f conftest*
20060 LIBS="$ac_save_LIBS"
20061
20062 fi
20063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20064   echo "$ac_t""yes" 1>&6
20065   ol_cv_lib_gdbm=-lgdbm
20066 else
20067   echo "$ac_t""no" 1>&6
20068 ol_cv_lib_gdbm=no
20069 fi
20070
20071         
20072 fi
20073
20074         LIBS="$ol_LIBS"
20075
20076 fi
20077
20078 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20079
20080
20081  for ac_hdr in gdbm.h
20082 do
20083 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20084 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20085 echo "configure:20086: checking for $ac_hdr" >&5
20086 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20087   echo $ac_n "(cached) $ac_c" 1>&6
20088 else
20089   cat > conftest.$ac_ext <<EOF
20090 #line 20091 "configure"
20091 #include "confdefs.h"
20092 #include <$ac_hdr>
20093 EOF
20094 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20095 { (eval echo configure:20096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20096 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20097 if test -z "$ac_err"; then
20098   rm -rf conftest*
20099   eval "ac_cv_header_$ac_safe=yes"
20100 else
20101   echo "$ac_err" >&5
20102   echo "configure: failed program was:" >&5
20103   cat conftest.$ac_ext >&5
20104   rm -rf conftest*
20105   eval "ac_cv_header_$ac_safe=no"
20106 fi
20107 rm -f conftest*
20108 fi
20109 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20110   echo "$ac_t""yes" 1>&6
20111     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20112   cat >> confdefs.h <<EOF
20113 #define $ac_tr_hdr 1
20114 EOF
20115  
20116 else
20117   echo "$ac_t""no" 1>&6
20118 fi
20119 done
20120
20121  echo $ac_n "checking for db""... $ac_c" 1>&6
20122 echo "configure:20123: checking for db" >&5
20123 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20124   echo $ac_n "(cached) $ac_c" 1>&6
20125 else
20126   
20127         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20128                 ol_cv_gdbm=no
20129         else
20130                 ol_cv_gdbm=yes
20131         fi
20132
20133 fi
20134
20135 echo "$ac_t""$ol_cv_gdbm" 1>&6
20136  if test $ol_cv_gdbm = yes ; then
20137         cat >> confdefs.h <<\EOF
20138 #define HAVE_GDBM 1
20139 EOF
20140
20141  fi
20142
20143
20144         if test $ol_cv_gdbm = yes ; then
20145                 ol_link_ldbm=gdbm
20146                 ol_with_ldbm_api=gdbm
20147
20148                 if test $ol_cv_lib_gdbm != yes ; then
20149                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20150                 fi
20151         fi
20152 fi
20153
20154 if test $ol_with_ldbm_api = ndbm ; then
20155         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20156 echo "configure:20157: checking for NDBM library" >&5
20157 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20158   echo $ac_n "(cached) $ac_c" 1>&6
20159 else
20160         ol_LIBS="$LIBS"
20161         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20162 echo "configure:20163: checking for dbm_open" >&5
20163 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20164   echo $ac_n "(cached) $ac_c" 1>&6
20165 else
20166   cat > conftest.$ac_ext <<EOF
20167 #line 20168 "configure"
20168 #include "confdefs.h"
20169 /* System header to define __stub macros and hopefully few prototypes,
20170     which can conflict with char dbm_open(); below.  */
20171 #include <assert.h>
20172 /* Override any gcc2 internal prototype to avoid an error.  */
20173 /* We use char because int might match the return type of a gcc2
20174     builtin and then its argument prototype would still apply.  */
20175 char dbm_open();
20176 char (*f)();
20177
20178 int main() {
20179
20180 /* The GNU C library defines this for functions which it implements
20181     to always fail with ENOSYS.  Some functions are actually named
20182     something starting with __ and the normal name is an alias.  */
20183 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20184 choke me
20185 #else
20186 f = dbm_open;
20187 #endif
20188
20189 ; return 0; }
20190 EOF
20191 if { (eval echo configure:20192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20192   rm -rf conftest*
20193   eval "ac_cv_func_dbm_open=yes"
20194 else
20195   echo "configure: failed program was:" >&5
20196   cat conftest.$ac_ext >&5
20197   rm -rf conftest*
20198   eval "ac_cv_func_dbm_open=no"
20199 fi
20200 rm -f conftest*
20201 fi
20202
20203 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20204   echo "$ac_t""yes" 1>&6
20205   ol_cv_lib_ndbm=yes
20206 else
20207   echo "$ac_t""no" 1>&6
20208
20209                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20210 echo "configure:20211: checking for dbm_open in -lndbm" >&5
20211 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20212 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20213   echo $ac_n "(cached) $ac_c" 1>&6
20214 else
20215   ac_save_LIBS="$LIBS"
20216 LIBS="-lndbm  $LIBS"
20217 cat > conftest.$ac_ext <<EOF
20218 #line 20219 "configure"
20219 #include "confdefs.h"
20220 /* Override any gcc2 internal prototype to avoid an error.  */
20221 /* We use char because int might match the return type of a gcc2
20222     builtin and then its argument prototype would still apply.  */
20223 char dbm_open();
20224
20225 int main() {
20226 dbm_open()
20227 ; return 0; }
20228 EOF
20229 if { (eval echo configure:20230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20230   rm -rf conftest*
20231   eval "ac_cv_lib_$ac_lib_var=yes"
20232 else
20233   echo "configure: failed program was:" >&5
20234   cat conftest.$ac_ext >&5
20235   rm -rf conftest*
20236   eval "ac_cv_lib_$ac_lib_var=no"
20237 fi
20238 rm -f conftest*
20239 LIBS="$ac_save_LIBS"
20240
20241 fi
20242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20243   echo "$ac_t""yes" 1>&6
20244   ol_cv_lib_ndbm=-lndbm
20245 else
20246   echo "$ac_t""no" 1>&6
20247
20248                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20249 echo "configure:20250: checking for dbm_open in -ldbm" >&5
20250 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20251 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20252   echo $ac_n "(cached) $ac_c" 1>&6
20253 else
20254   ac_save_LIBS="$LIBS"
20255 LIBS="-ldbm  $LIBS"
20256 cat > conftest.$ac_ext <<EOF
20257 #line 20258 "configure"
20258 #include "confdefs.h"
20259 /* Override any gcc2 internal prototype to avoid an error.  */
20260 /* We use char because int might match the return type of a gcc2
20261     builtin and then its argument prototype would still apply.  */
20262 char dbm_open();
20263
20264 int main() {
20265 dbm_open()
20266 ; return 0; }
20267 EOF
20268 if { (eval echo configure:20269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20269   rm -rf conftest*
20270   eval "ac_cv_lib_$ac_lib_var=yes"
20271 else
20272   echo "configure: failed program was:" >&5
20273   cat conftest.$ac_ext >&5
20274   rm -rf conftest*
20275   eval "ac_cv_lib_$ac_lib_var=no"
20276 fi
20277 rm -f conftest*
20278 LIBS="$ac_save_LIBS"
20279
20280 fi
20281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20282   echo "$ac_t""yes" 1>&6
20283   ol_cv_lib_ndbm=-ldbm
20284 else
20285   echo "$ac_t""no" 1>&6
20286 ol_cv_lib_ndbm=no
20287 fi
20288                 
20289 fi
20290
20291         
20292 fi
20293
20294         LIBS="$ol_LIBS"
20295
20296 fi
20297
20298 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20299
20300
20301  for ac_hdr in ndbm.h
20302 do
20303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20304 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20305 echo "configure:20306: checking for $ac_hdr" >&5
20306 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20307   echo $ac_n "(cached) $ac_c" 1>&6
20308 else
20309   cat > conftest.$ac_ext <<EOF
20310 #line 20311 "configure"
20311 #include "confdefs.h"
20312 #include <$ac_hdr>
20313 EOF
20314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20315 { (eval echo configure:20316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20317 if test -z "$ac_err"; then
20318   rm -rf conftest*
20319   eval "ac_cv_header_$ac_safe=yes"
20320 else
20321   echo "$ac_err" >&5
20322   echo "configure: failed program was:" >&5
20323   cat conftest.$ac_ext >&5
20324   rm -rf conftest*
20325   eval "ac_cv_header_$ac_safe=no"
20326 fi
20327 rm -f conftest*
20328 fi
20329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20330   echo "$ac_t""yes" 1>&6
20331     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20332   cat >> confdefs.h <<EOF
20333 #define $ac_tr_hdr 1
20334 EOF
20335  
20336 else
20337   echo "$ac_t""no" 1>&6
20338 fi
20339 done
20340
20341  echo $ac_n "checking for db""... $ac_c" 1>&6
20342 echo "configure:20343: checking for db" >&5
20343 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20344   echo $ac_n "(cached) $ac_c" 1>&6
20345 else
20346   
20347         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20348                 ol_cv_ndbm=no
20349         else
20350                 ol_cv_ndbm=yes
20351         fi
20352
20353 fi
20354
20355 echo "$ac_t""$ol_cv_ndbm" 1>&6
20356  if test $ol_cv_ndbm = yes ; then
20357         cat >> confdefs.h <<\EOF
20358 #define HAVE_NDBM 1
20359 EOF
20360
20361  fi
20362
20363
20364         if test $ol_cv_ndbm = yes ; then
20365                 ol_link_ldbm=ndbm
20366                 ol_with_ldbm_api=ndbm
20367
20368                 if test $ol_cv_lib_ndbm != yes ; then
20369                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20370                 fi
20371         fi
20372 fi
20373
20374 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20375         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20376         if test $ol_enable_ldbm = yes ; then
20377                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20378         fi
20379
20380         echo "configure: warning: disabling LDBM" 1>&2
20381         ol_enable_ldbm=no
20382 fi
20383
20384
20385 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20386         BUILD_LIBS_DYNAMIC=shared
20387         cat >> confdefs.h <<\EOF
20388 #define LDAP_LIBS_DYNAMIC 1
20389 EOF
20390
20391         LTSTATIC=""
20392 else
20393         BUILD_LIBS_DYNAMIC=static
20394         LTSTATIC="-static"
20395 fi
20396
20397 if test $ol_enable_wrappers != no ; then
20398         for ac_hdr in tcpd.h
20399 do
20400 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20401 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20402 echo "configure:20403: checking for $ac_hdr" >&5
20403 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20404   echo $ac_n "(cached) $ac_c" 1>&6
20405 else
20406   cat > conftest.$ac_ext <<EOF
20407 #line 20408 "configure"
20408 #include "confdefs.h"
20409 #include <$ac_hdr>
20410 EOF
20411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20412 { (eval echo configure:20413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20414 if test -z "$ac_err"; then
20415   rm -rf conftest*
20416   eval "ac_cv_header_$ac_safe=yes"
20417 else
20418   echo "$ac_err" >&5
20419   echo "configure: failed program was:" >&5
20420   cat conftest.$ac_ext >&5
20421   rm -rf conftest*
20422   eval "ac_cv_header_$ac_safe=no"
20423 fi
20424 rm -f conftest*
20425 fi
20426 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20427   echo "$ac_t""yes" 1>&6
20428     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20429   cat >> confdefs.h <<EOF
20430 #define $ac_tr_hdr 1
20431 EOF
20432  
20433                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20434 echo "configure:20435: checking for TCP wrappers library" >&5
20435                 save_LIBS="$LIBS"
20436                 LIBS="$LIBS -lwrap"
20437                 cat > conftest.$ac_ext <<EOF
20438 #line 20439 "configure"
20439 #include "confdefs.h"
20440
20441 #include <tcpd.h>
20442 int allow_severity = 0;
20443 int deny_severity  = 0;
20444
20445 struct request_info *req;
20446                 
20447 int main() {
20448
20449 hosts_access(req)
20450                 
20451 ; return 0; }
20452 EOF
20453 if { (eval echo configure:20454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20454   rm -rf conftest*
20455   echo "$ac_t""-lwrap" 1>&6
20456                 have_wrappers=yes
20457                 LIBS="$save_LIBS"
20458 else
20459   echo "configure: failed program was:" >&5
20460   cat conftest.$ac_ext >&5
20461   rm -rf conftest*
20462   
20463                                 LIBS="$LIBS -lnsl"
20464                 cat > conftest.$ac_ext <<EOF
20465 #line 20466 "configure"
20466 #include "confdefs.h"
20467
20468 #include <tcpd.h>
20469 int allow_severity = 0;
20470 int deny_severity  = 0;
20471
20472 struct request_info *req;
20473                 
20474 int main() {
20475
20476 hosts_access(req)
20477                 
20478 ; return 0; }
20479 EOF
20480 if { (eval echo configure:20481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20481   rm -rf conftest*
20482   echo "$ac_t""-lwrap -lnsl" 1>&6
20483                 have_wrappers=yes
20484                 LIBS="$save_LIBS -lnsl"
20485 else
20486   echo "configure: failed program was:" >&5
20487   cat conftest.$ac_ext >&5
20488   rm -rf conftest*
20489   
20490                 echo "$ac_t""no" 1>&6
20491                 have_wrappers=no
20492                 LIBS=$save_LIBS
20493 fi
20494 rm -f conftest*
20495 fi
20496 rm -f conftest*
20497 else
20498   echo "$ac_t""no" 1>&6
20499 have_wrappers=no
20500 fi
20501 done
20502
20503
20504         if test $have_wrappers = yes ; then
20505                 cat >> confdefs.h <<\EOF
20506 #define HAVE_TCPD 1
20507 EOF
20508
20509                 WRAP_LIBS="-lwrap"
20510         elif test $ol_enable_wrappers = yes ; then
20511                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20512         else
20513                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20514                 WRAP_LIBS=""
20515         fi
20516 fi
20517
20518 if test $ol_enable_syslog != no ; then
20519         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20520 echo "configure:20521: checking for openlog" >&5
20521 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20522   echo $ac_n "(cached) $ac_c" 1>&6
20523 else
20524   cat > conftest.$ac_ext <<EOF
20525 #line 20526 "configure"
20526 #include "confdefs.h"
20527 /* System header to define __stub macros and hopefully few prototypes,
20528     which can conflict with char openlog(); below.  */
20529 #include <assert.h>
20530 /* Override any gcc2 internal prototype to avoid an error.  */
20531 /* We use char because int might match the return type of a gcc2
20532     builtin and then its argument prototype would still apply.  */
20533 char openlog();
20534 char (*f)();
20535
20536 int main() {
20537
20538 /* The GNU C library defines this for functions which it implements
20539     to always fail with ENOSYS.  Some functions are actually named
20540     something starting with __ and the normal name is an alias.  */
20541 #if defined (__stub_openlog) || defined (__stub___openlog)
20542 choke me
20543 #else
20544 f = openlog;
20545 #endif
20546
20547 ; return 0; }
20548 EOF
20549 if { (eval echo configure:20550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20550   rm -rf conftest*
20551   eval "ac_cv_func_openlog=yes"
20552 else
20553   echo "configure: failed program was:" >&5
20554   cat conftest.$ac_ext >&5
20555   rm -rf conftest*
20556   eval "ac_cv_func_openlog=no"
20557 fi
20558 rm -f conftest*
20559 fi
20560
20561 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20562   echo "$ac_t""yes" 1>&6
20563   :
20564 else
20565   echo "$ac_t""no" 1>&6
20566 fi
20567
20568         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20569                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20570         fi
20571         ol_enable_syslog=$ac_cv_func_openlog
20572 fi
20573
20574
20575 ol_link_sql=no
20576 if test $ol_enable_sql != no ; then
20577         for ac_hdr in sql.h sqlext.h
20578 do
20579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20581 echo "configure:20582: checking for $ac_hdr" >&5
20582 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20583   echo $ac_n "(cached) $ac_c" 1>&6
20584 else
20585   cat > conftest.$ac_ext <<EOF
20586 #line 20587 "configure"
20587 #include "confdefs.h"
20588 #include <$ac_hdr>
20589 EOF
20590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20591 { (eval echo configure:20592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20593 if test -z "$ac_err"; then
20594   rm -rf conftest*
20595   eval "ac_cv_header_$ac_safe=yes"
20596 else
20597   echo "$ac_err" >&5
20598   echo "configure: failed program was:" >&5
20599   cat conftest.$ac_ext >&5
20600   rm -rf conftest*
20601   eval "ac_cv_header_$ac_safe=no"
20602 fi
20603 rm -f conftest*
20604 fi
20605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20606   echo "$ac_t""yes" 1>&6
20607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20608   cat >> confdefs.h <<EOF
20609 #define $ac_tr_hdr 1
20610 EOF
20611  
20612 else
20613   echo "$ac_t""no" 1>&6
20614 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20615         
20616 fi
20617 done
20618
20619
20620         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20621 echo "configure:20622: checking for SQLDriverConnect in -liodbc" >&5
20622 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20623 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20624   echo $ac_n "(cached) $ac_c" 1>&6
20625 else
20626   ac_save_LIBS="$LIBS"
20627 LIBS="-liodbc  $LIBS"
20628 cat > conftest.$ac_ext <<EOF
20629 #line 20630 "configure"
20630 #include "confdefs.h"
20631 /* Override any gcc2 internal prototype to avoid an error.  */
20632 /* We use char because int might match the return type of a gcc2
20633     builtin and then its argument prototype would still apply.  */
20634 char SQLDriverConnect();
20635
20636 int main() {
20637 SQLDriverConnect()
20638 ; return 0; }
20639 EOF
20640 if { (eval echo configure:20641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20641   rm -rf conftest*
20642   eval "ac_cv_lib_$ac_lib_var=yes"
20643 else
20644   echo "configure: failed program was:" >&5
20645   cat conftest.$ac_ext >&5
20646   rm -rf conftest*
20647   eval "ac_cv_lib_$ac_lib_var=no"
20648 fi
20649 rm -f conftest*
20650 LIBS="$ac_save_LIBS"
20651
20652 fi
20653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20654   echo "$ac_t""yes" 1>&6
20655   have_iodbc=yes
20656 else
20657   echo "$ac_t""no" 1>&6
20658 have_iodbc=no
20659 fi
20660
20661         if test $have_iodbc = yes ; then
20662                 ol_link_sql="-liodbc"
20663         else
20664                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20665 echo "configure:20666: checking for SQLDriverConnect in -lodbc" >&5
20666 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20667 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20668   echo $ac_n "(cached) $ac_c" 1>&6
20669 else
20670   ac_save_LIBS="$LIBS"
20671 LIBS="-lodbc  $LIBS"
20672 cat > conftest.$ac_ext <<EOF
20673 #line 20674 "configure"
20674 #include "confdefs.h"
20675 /* Override any gcc2 internal prototype to avoid an error.  */
20676 /* We use char because int might match the return type of a gcc2
20677     builtin and then its argument prototype would still apply.  */
20678 char SQLDriverConnect();
20679
20680 int main() {
20681 SQLDriverConnect()
20682 ; return 0; }
20683 EOF
20684 if { (eval echo configure:20685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20685   rm -rf conftest*
20686   eval "ac_cv_lib_$ac_lib_var=yes"
20687 else
20688   echo "configure: failed program was:" >&5
20689   cat conftest.$ac_ext >&5
20690   rm -rf conftest*
20691   eval "ac_cv_lib_$ac_lib_var=no"
20692 fi
20693 rm -f conftest*
20694 LIBS="$ac_save_LIBS"
20695
20696 fi
20697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20698   echo "$ac_t""yes" 1>&6
20699   have_odbc=yes
20700 else
20701   echo "$ac_t""no" 1>&6
20702 have_odbc=no
20703 fi
20704
20705                 if test $have_odbc = yes ; then
20706                         ol_link_sql="-lodbc"
20707                 fi
20708         fi
20709
20710         if test $ol_link_sql != no ; then
20711                 SLAPD_SQL_LIBS="$ol_link_sql"
20712
20713         elif test $ol_enable_sql != auto ; then
20714                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20715         fi
20716 fi
20717
20718 ol_link_sasl=no
20719 ol_link_spasswd=no
20720 if test $ol_with_cyrus_sasl != no ; then
20721         for ac_hdr in sasl/sasl.h sasl.h
20722 do
20723 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20724 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20725 echo "configure:20726: checking for $ac_hdr" >&5
20726 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20727   echo $ac_n "(cached) $ac_c" 1>&6
20728 else
20729   cat > conftest.$ac_ext <<EOF
20730 #line 20731 "configure"
20731 #include "confdefs.h"
20732 #include <$ac_hdr>
20733 EOF
20734 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20735 { (eval echo configure:20736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20736 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20737 if test -z "$ac_err"; then
20738   rm -rf conftest*
20739   eval "ac_cv_header_$ac_safe=yes"
20740 else
20741   echo "$ac_err" >&5
20742   echo "configure: failed program was:" >&5
20743   cat conftest.$ac_ext >&5
20744   rm -rf conftest*
20745   eval "ac_cv_header_$ac_safe=no"
20746 fi
20747 rm -f conftest*
20748 fi
20749 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20750   echo "$ac_t""yes" 1>&6
20751     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20752   cat >> confdefs.h <<EOF
20753 #define $ac_tr_hdr 1
20754 EOF
20755  
20756 else
20757   echo "$ac_t""no" 1>&6
20758 fi
20759 done
20760
20761
20762         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20763                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20764 echo "configure:20765: checking for sasl_client_init in -lsasl2" >&5
20765 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20766 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20767   echo $ac_n "(cached) $ac_c" 1>&6
20768 else
20769   ac_save_LIBS="$LIBS"
20770 LIBS="-lsasl2  $LIBS"
20771 cat > conftest.$ac_ext <<EOF
20772 #line 20773 "configure"
20773 #include "confdefs.h"
20774 /* Override any gcc2 internal prototype to avoid an error.  */
20775 /* We use char because int might match the return type of a gcc2
20776     builtin and then its argument prototype would still apply.  */
20777 char sasl_client_init();
20778
20779 int main() {
20780 sasl_client_init()
20781 ; return 0; }
20782 EOF
20783 if { (eval echo configure:20784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20784   rm -rf conftest*
20785   eval "ac_cv_lib_$ac_lib_var=yes"
20786 else
20787   echo "configure: failed program was:" >&5
20788   cat conftest.$ac_ext >&5
20789   rm -rf conftest*
20790   eval "ac_cv_lib_$ac_lib_var=no"
20791 fi
20792 rm -f conftest*
20793 LIBS="$ac_save_LIBS"
20794
20795 fi
20796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20797   echo "$ac_t""yes" 1>&6
20798   ol_link_sasl="-lsasl2"
20799 else
20800   echo "$ac_t""no" 1>&6
20801 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20802 echo "configure:20803: checking for sasl_client_init in -lsasl" >&5
20803 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20804 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20805   echo $ac_n "(cached) $ac_c" 1>&6
20806 else
20807   ac_save_LIBS="$LIBS"
20808 LIBS="-lsasl  $LIBS"
20809 cat > conftest.$ac_ext <<EOF
20810 #line 20811 "configure"
20811 #include "confdefs.h"
20812 /* Override any gcc2 internal prototype to avoid an error.  */
20813 /* We use char because int might match the return type of a gcc2
20814     builtin and then its argument prototype would still apply.  */
20815 char sasl_client_init();
20816
20817 int main() {
20818 sasl_client_init()
20819 ; return 0; }
20820 EOF
20821 if { (eval echo configure:20822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20822   rm -rf conftest*
20823   eval "ac_cv_lib_$ac_lib_var=yes"
20824 else
20825   echo "configure: failed program was:" >&5
20826   cat conftest.$ac_ext >&5
20827   rm -rf conftest*
20828   eval "ac_cv_lib_$ac_lib_var=no"
20829 fi
20830 rm -f conftest*
20831 LIBS="$ac_save_LIBS"
20832
20833 fi
20834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20835   echo "$ac_t""yes" 1>&6
20836   ol_link_sasl="-lsasl"
20837 else
20838   echo "$ac_t""no" 1>&6
20839 fi
20840
20841 fi
20842
20843         fi
20844
20845         if test $ol_link_sasl = no ; then
20846                 if test $ol_with_cyrus_sasl != auto ; then
20847                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20848                 else
20849                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20850                         echo "configure: warning: SASL authentication not supported!" 1>&2
20851                         if test $ol_link_tls = no ; then
20852                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20853                         fi
20854                 fi
20855         else
20856                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20857 echo "configure:20858: checking Cyrus SASL library version" >&5
20858 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20859   echo $ac_n "(cached) $ac_c" 1>&6
20860 else
20861   
20862         cat > conftest.$ac_ext <<EOF
20863 #line 20864 "configure"
20864 #include "confdefs.h"
20865
20866 #ifdef HAVE_SASL_SASL_H
20867 #include <sasl/sasl.h>
20868 #else
20869 #include <sasl.h>
20870 #endif
20871
20872 /* Require 2.1.15+ */
20873 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20874         char *__sasl_compat = "2.2+ or better okay (we guess)";
20875 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20876         && SASL_VERSION_STEP >=15
20877         char *__sasl_compat = "2.1.15+ or better okay";
20878 #endif
20879         
20880 EOF
20881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20882   egrep "__sasl_compat" >/dev/null 2>&1; then
20883   rm -rf conftest*
20884   ol_cv_sasl_compat=yes
20885 else
20886   rm -rf conftest*
20887   ol_cv_sasl_compat=no
20888 fi
20889 rm -f conftest*
20890
20891 fi
20892
20893 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20894
20895                 if test $ol_cv_sasl_compat = no ; then
20896                         ol_link_sasl=no
20897                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20898                 fi
20899
20900                 cat >> confdefs.h <<\EOF
20901 #define HAVE_CYRUS_SASL 1
20902 EOF
20903
20904                 SASL_LIBS="$ol_link_sasl"
20905                 if test $ol_enable_spasswd != no ; then
20906                         ol_link_spasswd=yes
20907                 fi
20908
20909                 ac_save_LIBS="$LIBS"
20910                 LIBS="$LIBS $ol_link_sasl"
20911                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20912 echo "configure:20913: checking for sasl_version" >&5
20913 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20914   echo $ac_n "(cached) $ac_c" 1>&6
20915 else
20916   cat > conftest.$ac_ext <<EOF
20917 #line 20918 "configure"
20918 #include "confdefs.h"
20919 /* System header to define __stub macros and hopefully few prototypes,
20920     which can conflict with char sasl_version(); below.  */
20921 #include <assert.h>
20922 /* Override any gcc2 internal prototype to avoid an error.  */
20923 /* We use char because int might match the return type of a gcc2
20924     builtin and then its argument prototype would still apply.  */
20925 char sasl_version();
20926 char (*f)();
20927
20928 int main() {
20929
20930 /* The GNU C library defines this for functions which it implements
20931     to always fail with ENOSYS.  Some functions are actually named
20932     something starting with __ and the normal name is an alias.  */
20933 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20934 choke me
20935 #else
20936 f = sasl_version;
20937 #endif
20938
20939 ; return 0; }
20940 EOF
20941 if { (eval echo configure:20942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20942   rm -rf conftest*
20943   eval "ac_cv_func_sasl_version=yes"
20944 else
20945   echo "configure: failed program was:" >&5
20946   cat conftest.$ac_ext >&5
20947   rm -rf conftest*
20948   eval "ac_cv_func_sasl_version=no"
20949 fi
20950 rm -f conftest*
20951 fi
20952
20953 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20954   echo "$ac_t""yes" 1>&6
20955   cat >> confdefs.h <<\EOF
20956 #define HAVE_SASL_VERSION 1
20957 EOF
20958
20959 else
20960   echo "$ac_t""no" 1>&6
20961 fi
20962
20963                 LIBS="$ac_save_LIBS"
20964         fi
20965
20966 else
20967         echo "configure: warning: SASL authentication not supported!" 1>&2
20968         if test $ol_link_tls = no ; then
20969                 echo "configure: warning: Strong authentication not supported!" 1>&2
20970         fi
20971 fi
20972
20973 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20974         dev=no
20975         if test -r /dev/urandom ; then
20976                 dev="/dev/urandom";
20977         elif test -r /idev/urandom ; then
20978                 dev="/idev/urandom";
20979         elif test -r /dev/srandom ; then
20980                 dev="/dev/srandom";
20981         elif test -r /dev/random ; then
20982                 dev="/dev/random";
20983         elif test -r /idev/random ; then
20984                 dev="/idev/random";
20985         fi
20986
20987         if test $dev != no ; then
20988                 cat >> confdefs.h <<EOF
20989 #define URANDOM_DEVICE "$dev"
20990 EOF
20991
20992         fi
20993 fi
20994
20995 ol_link_fetch=no
20996 if test $ol_with_fetch != no ; then
20997         ol_LIBS=$LIBS
20998 LIBS="-lfetch -lcom_err $LIBS"
20999 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21000 echo "configure:21001: checking fetch(3) library" >&5
21001 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21002   echo $ac_n "(cached) $ac_c" 1>&6
21003 else
21004   
21005         cat > conftest.$ac_ext <<EOF
21006 #line 21007 "configure"
21007 #include "confdefs.h"
21008
21009 #include <sys/param.h>
21010 #include <stdio.h>
21011 #include <fetch.h>
21012 int main() {
21013 struct url *u = fetchParseURL("file:///"); 
21014 ; return 0; }
21015 EOF
21016 if { (eval echo configure:21017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21017   rm -rf conftest*
21018   ol_cv_lib_fetch=yes
21019 else
21020   echo "configure: failed program was:" >&5
21021   cat conftest.$ac_ext >&5
21022   rm -rf conftest*
21023   ol_cv_lib_fetch=no
21024 fi
21025 rm -f conftest*
21026 fi
21027
21028 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21029 LIBS=$ol_LIBS
21030 if test $ol_cv_lib_fetch != no ; then
21031         ol_link_fetch="-lfetch -lcom_err"
21032         cat >> confdefs.h <<\EOF
21033 #define HAVE_FETCH 1
21034 EOF
21035
21036 fi
21037
21038
21039         if test $ol_cv_lib_fetch != no ; then
21040                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21041                 ol_link_fetch=freebsd
21042
21043         elif test $ol_with_fetch != auto ; then
21044                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21045         fi 
21046 fi
21047
21048 if test $ol_enable_crypt != no ; then
21049         save_LIBS="$LIBS"
21050         LIBS="$TLS_LIBS $LIBS"
21051
21052         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21053 echo "configure:21054: checking for crypt" >&5
21054 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21055   echo $ac_n "(cached) $ac_c" 1>&6
21056 else
21057   cat > conftest.$ac_ext <<EOF
21058 #line 21059 "configure"
21059 #include "confdefs.h"
21060 /* System header to define __stub macros and hopefully few prototypes,
21061     which can conflict with char crypt(); below.  */
21062 #include <assert.h>
21063 /* Override any gcc2 internal prototype to avoid an error.  */
21064 /* We use char because int might match the return type of a gcc2
21065     builtin and then its argument prototype would still apply.  */
21066 char crypt();
21067 char (*f)();
21068
21069 int main() {
21070
21071 /* The GNU C library defines this for functions which it implements
21072     to always fail with ENOSYS.  Some functions are actually named
21073     something starting with __ and the normal name is an alias.  */
21074 #if defined (__stub_crypt) || defined (__stub___crypt)
21075 choke me
21076 #else
21077 f = crypt;
21078 #endif
21079
21080 ; return 0; }
21081 EOF
21082 if { (eval echo configure:21083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21083   rm -rf conftest*
21084   eval "ac_cv_func_crypt=yes"
21085 else
21086   echo "configure: failed program was:" >&5
21087   cat conftest.$ac_ext >&5
21088   rm -rf conftest*
21089   eval "ac_cv_func_crypt=no"
21090 fi
21091 rm -f conftest*
21092 fi
21093
21094 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21095   echo "$ac_t""yes" 1>&6
21096   have_crypt=yes
21097 else
21098   echo "$ac_t""no" 1>&6
21099
21100                 LIBS="$save_LIBS"
21101                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21102 echo "configure:21103: checking for crypt in -lcrypt" >&5
21103 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21104 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21105   echo $ac_n "(cached) $ac_c" 1>&6
21106 else
21107   ac_save_LIBS="$LIBS"
21108 LIBS="-lcrypt  $LIBS"
21109 cat > conftest.$ac_ext <<EOF
21110 #line 21111 "configure"
21111 #include "confdefs.h"
21112 /* Override any gcc2 internal prototype to avoid an error.  */
21113 /* We use char because int might match the return type of a gcc2
21114     builtin and then its argument prototype would still apply.  */
21115 char crypt();
21116
21117 int main() {
21118 crypt()
21119 ; return 0; }
21120 EOF
21121 if { (eval echo configure:21122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21122   rm -rf conftest*
21123   eval "ac_cv_lib_$ac_lib_var=yes"
21124 else
21125   echo "configure: failed program was:" >&5
21126   cat conftest.$ac_ext >&5
21127   rm -rf conftest*
21128   eval "ac_cv_lib_$ac_lib_var=no"
21129 fi
21130 rm -f conftest*
21131 LIBS="$ac_save_LIBS"
21132
21133 fi
21134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21135   echo "$ac_t""yes" 1>&6
21136   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21137                         have_crypt=yes
21138 else
21139   echo "$ac_t""no" 1>&6
21140 have_crypt=no
21141 fi
21142
21143 fi
21144
21145
21146         LIBS="$save_LIBS"
21147
21148         if test $have_crypt = yes ; then
21149                 cat >> confdefs.h <<\EOF
21150 #define HAVE_CRYPT 1
21151 EOF
21152
21153         else
21154                 echo "configure: warning: could not find crypt" 1>&2
21155                 if test $ol_enable_crypt = yes ; then
21156                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21157                 fi
21158
21159                 echo "configure: warning: disabling crypt support" 1>&2
21160                 ol_enable_crypt=no
21161         fi
21162 fi
21163
21164 if test $ol_enable_proctitle != no ; then
21165         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21166 echo "configure:21167: checking for setproctitle" >&5
21167 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21168   echo $ac_n "(cached) $ac_c" 1>&6
21169 else
21170   cat > conftest.$ac_ext <<EOF
21171 #line 21172 "configure"
21172 #include "confdefs.h"
21173 /* System header to define __stub macros and hopefully few prototypes,
21174     which can conflict with char setproctitle(); below.  */
21175 #include <assert.h>
21176 /* Override any gcc2 internal prototype to avoid an error.  */
21177 /* We use char because int might match the return type of a gcc2
21178     builtin and then its argument prototype would still apply.  */
21179 char setproctitle();
21180 char (*f)();
21181
21182 int main() {
21183
21184 /* The GNU C library defines this for functions which it implements
21185     to always fail with ENOSYS.  Some functions are actually named
21186     something starting with __ and the normal name is an alias.  */
21187 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21188 choke me
21189 #else
21190 f = setproctitle;
21191 #endif
21192
21193 ; return 0; }
21194 EOF
21195 if { (eval echo configure:21196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21196   rm -rf conftest*
21197   eval "ac_cv_func_setproctitle=yes"
21198 else
21199   echo "configure: failed program was:" >&5
21200   cat conftest.$ac_ext >&5
21201   rm -rf conftest*
21202   eval "ac_cv_func_setproctitle=no"
21203 fi
21204 rm -f conftest*
21205 fi
21206
21207 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21208   echo "$ac_t""yes" 1>&6
21209   have_setproctitle=yes
21210 else
21211   echo "$ac_t""no" 1>&6
21212
21213                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21214 echo "configure:21215: checking for setproctitle in -lutil" >&5
21215 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21216 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21217   echo $ac_n "(cached) $ac_c" 1>&6
21218 else
21219   ac_save_LIBS="$LIBS"
21220 LIBS="-lutil  $LIBS"
21221 cat > conftest.$ac_ext <<EOF
21222 #line 21223 "configure"
21223 #include "confdefs.h"
21224 /* Override any gcc2 internal prototype to avoid an error.  */
21225 /* We use char because int might match the return type of a gcc2
21226     builtin and then its argument prototype would still apply.  */
21227 char setproctitle();
21228
21229 int main() {
21230 setproctitle()
21231 ; return 0; }
21232 EOF
21233 if { (eval echo configure:21234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21234   rm -rf conftest*
21235   eval "ac_cv_lib_$ac_lib_var=yes"
21236 else
21237   echo "configure: failed program was:" >&5
21238   cat conftest.$ac_ext >&5
21239   rm -rf conftest*
21240   eval "ac_cv_lib_$ac_lib_var=no"
21241 fi
21242 rm -f conftest*
21243 LIBS="$ac_save_LIBS"
21244
21245 fi
21246 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21247   echo "$ac_t""yes" 1>&6
21248   have_setproctitle=yes
21249                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21250 else
21251   echo "$ac_t""no" 1>&6
21252 have_setproctitle=no
21253                         LIBOBJS="$LIBOBJS setproctitle.o"
21254                         LIBSRCS="$LIBSRCS setproctitle.c"
21255 fi
21256
21257 fi
21258
21259
21260         if test $have_setproctitle = yes ; then
21261                 cat >> confdefs.h <<\EOF
21262 #define HAVE_SETPROCTITLE 1
21263 EOF
21264
21265         fi
21266 fi
21267
21268 if test $ol_enable_slp != no ; then
21269         for ac_hdr in slp.h 
21270 do
21271 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21272 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21273 echo "configure:21274: checking for $ac_hdr" >&5
21274 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21275   echo $ac_n "(cached) $ac_c" 1>&6
21276 else
21277   cat > conftest.$ac_ext <<EOF
21278 #line 21279 "configure"
21279 #include "confdefs.h"
21280 #include <$ac_hdr>
21281 EOF
21282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21283 { (eval echo configure:21284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21285 if test -z "$ac_err"; then
21286   rm -rf conftest*
21287   eval "ac_cv_header_$ac_safe=yes"
21288 else
21289   echo "$ac_err" >&5
21290   echo "configure: failed program was:" >&5
21291   cat conftest.$ac_ext >&5
21292   rm -rf conftest*
21293   eval "ac_cv_header_$ac_safe=no"
21294 fi
21295 rm -f conftest*
21296 fi
21297 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21298   echo "$ac_t""yes" 1>&6
21299     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21300   cat >> confdefs.h <<EOF
21301 #define $ac_tr_hdr 1
21302 EOF
21303  
21304 else
21305   echo "$ac_t""no" 1>&6
21306 fi
21307 done
21308
21309
21310         if test $ac_cv_header_slp_h = yes ; then
21311                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21312 echo "configure:21313: checking for SLPOpen in -lslp" >&5
21313 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21314 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21315   echo $ac_n "(cached) $ac_c" 1>&6
21316 else
21317   ac_save_LIBS="$LIBS"
21318 LIBS="-lslp  $LIBS"
21319 cat > conftest.$ac_ext <<EOF
21320 #line 21321 "configure"
21321 #include "confdefs.h"
21322 /* Override any gcc2 internal prototype to avoid an error.  */
21323 /* We use char because int might match the return type of a gcc2
21324     builtin and then its argument prototype would still apply.  */
21325 char SLPOpen();
21326
21327 int main() {
21328 SLPOpen()
21329 ; return 0; }
21330 EOF
21331 if { (eval echo configure:21332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21332   rm -rf conftest*
21333   eval "ac_cv_lib_$ac_lib_var=yes"
21334 else
21335   echo "configure: failed program was:" >&5
21336   cat conftest.$ac_ext >&5
21337   rm -rf conftest*
21338   eval "ac_cv_lib_$ac_lib_var=no"
21339 fi
21340 rm -f conftest*
21341 LIBS="$ac_save_LIBS"
21342
21343 fi
21344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21345   echo "$ac_t""yes" 1>&6
21346   have_slp=yes
21347 else
21348   echo "$ac_t""no" 1>&6
21349 have_slp=no
21350 fi
21351
21352                 if test $have_slp = yes ; then
21353                         cat >> confdefs.h <<\EOF
21354 #define HAVE_SLP 1
21355 EOF
21356
21357                         SLAPD_SLP_LIBS=-lslp
21358                 fi
21359
21360         elif test $ol_enable_slp = yes ; then
21361                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21362         fi
21363 fi
21364
21365
21366 echo $ac_n "checking long long""... $ac_c" 1>&6
21367 echo "configure:21368: checking long long" >&5
21368 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21369   echo $ac_n "(cached) $ac_c" 1>&6
21370 else
21371   
21372         cat > conftest.$ac_ext <<EOF
21373 #line 21374 "configure"
21374 #include "confdefs.h"
21375
21376 int main() {
21377 long long x;
21378 ; return 0; }
21379 EOF
21380 if { (eval echo configure:21381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21381   rm -rf conftest*
21382   ol_cv_type_long_long=yes
21383 else
21384   echo "configure: failed program was:" >&5
21385   cat conftest.$ac_ext >&5
21386   rm -rf conftest*
21387   ol_cv_type_long_long=no
21388 fi
21389 rm -f conftest*
21390 fi
21391
21392 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21393 if test $ol_cv_type_long_long = yes; then
21394         cat >> confdefs.h <<\EOF
21395 #define HAVE_LONG_LONG 1
21396 EOF
21397
21398 fi
21399
21400 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21401 echo "configure:21402: checking for ANSI C header files" >&5
21402 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21403   echo $ac_n "(cached) $ac_c" 1>&6
21404 else
21405   cat > conftest.$ac_ext <<EOF
21406 #line 21407 "configure"
21407 #include "confdefs.h"
21408 #include <stdlib.h>
21409 #include <stdarg.h>
21410 #include <string.h>
21411 #include <float.h>
21412 EOF
21413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21414 { (eval echo configure:21415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21415 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21416 if test -z "$ac_err"; then
21417   rm -rf conftest*
21418   ac_cv_header_stdc=yes
21419 else
21420   echo "$ac_err" >&5
21421   echo "configure: failed program was:" >&5
21422   cat conftest.$ac_ext >&5
21423   rm -rf conftest*
21424   ac_cv_header_stdc=no
21425 fi
21426 rm -f conftest*
21427
21428 if test $ac_cv_header_stdc = yes; then
21429   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21430 cat > conftest.$ac_ext <<EOF
21431 #line 21432 "configure"
21432 #include "confdefs.h"
21433 #include <string.h>
21434 EOF
21435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21436   egrep "memchr" >/dev/null 2>&1; then
21437   :
21438 else
21439   rm -rf conftest*
21440   ac_cv_header_stdc=no
21441 fi
21442 rm -f conftest*
21443
21444 fi
21445
21446 if test $ac_cv_header_stdc = yes; then
21447   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21448 cat > conftest.$ac_ext <<EOF
21449 #line 21450 "configure"
21450 #include "confdefs.h"
21451 #include <stdlib.h>
21452 EOF
21453 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21454   egrep "free" >/dev/null 2>&1; then
21455   :
21456 else
21457   rm -rf conftest*
21458   ac_cv_header_stdc=no
21459 fi
21460 rm -f conftest*
21461
21462 fi
21463
21464 if test $ac_cv_header_stdc = yes; then
21465   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21466 if test "$cross_compiling" = yes; then
21467   :
21468 else
21469   cat > conftest.$ac_ext <<EOF
21470 #line 21471 "configure"
21471 #include "confdefs.h"
21472 #include <ctype.h>
21473 #if ((' ' & 0x0FF) == 0x020)
21474 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21475 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21476 #else
21477 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21478  || ('j' <= (c) && (c) <= 'r') \
21479  || ('s' <= (c) && (c) <= 'z'))
21480 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21481 #endif
21482 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21483 int main () { int i; for (i = 0; i < 256; i++)
21484 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21485 exit (0); }
21486
21487 EOF
21488 if { (eval echo configure:21489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21489 then
21490   :
21491 else
21492   echo "configure: failed program was:" >&5
21493   cat conftest.$ac_ext >&5
21494   rm -fr conftest*
21495   ac_cv_header_stdc=no
21496 fi
21497 rm -fr conftest*
21498 fi
21499
21500 fi
21501 fi
21502
21503 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21504 if test $ac_cv_header_stdc = yes; then
21505   cat >> confdefs.h <<\EOF
21506 #define STDC_HEADERS 1
21507 EOF
21508
21509 fi
21510
21511 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21512 echo "configure:21513: checking for mode_t" >&5
21513 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21514   echo $ac_n "(cached) $ac_c" 1>&6
21515 else
21516   cat > conftest.$ac_ext <<EOF
21517 #line 21518 "configure"
21518 #include "confdefs.h"
21519 #include <sys/types.h>
21520 #if STDC_HEADERS
21521 #include <stdlib.h>
21522 #include <stddef.h>
21523 #endif
21524
21525 EOF
21526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21527   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21528   rm -rf conftest*
21529   eval "ac_cv_type_mode_t=yes"
21530 else
21531   rm -rf conftest*
21532   eval "ac_cv_type_mode_t=no"
21533 fi
21534 rm -f conftest*
21535
21536 fi
21537 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21538   echo "$ac_t""yes" 1>&6
21539 else
21540   echo "$ac_t""no" 1>&6
21541   cat >> confdefs.h <<EOF
21542 #define mode_t int
21543 EOF
21544
21545 fi
21546
21547 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21548 echo "configure:21549: checking for off_t" >&5
21549 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21550   echo $ac_n "(cached) $ac_c" 1>&6
21551 else
21552   cat > conftest.$ac_ext <<EOF
21553 #line 21554 "configure"
21554 #include "confdefs.h"
21555 #include <sys/types.h>
21556 #if STDC_HEADERS
21557 #include <stdlib.h>
21558 #include <stddef.h>
21559 #endif
21560
21561 EOF
21562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21563   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21564   rm -rf conftest*
21565   eval "ac_cv_type_off_t=yes"
21566 else
21567   rm -rf conftest*
21568   eval "ac_cv_type_off_t=no"
21569 fi
21570 rm -f conftest*
21571
21572 fi
21573 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21574   echo "$ac_t""yes" 1>&6
21575 else
21576   echo "$ac_t""no" 1>&6
21577   cat >> confdefs.h <<EOF
21578 #define off_t long
21579 EOF
21580
21581 fi
21582
21583 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21584 echo "configure:21585: checking for pid_t" >&5
21585 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21586   echo $ac_n "(cached) $ac_c" 1>&6
21587 else
21588   cat > conftest.$ac_ext <<EOF
21589 #line 21590 "configure"
21590 #include "confdefs.h"
21591 #include <sys/types.h>
21592 #if STDC_HEADERS
21593 #include <stdlib.h>
21594 #include <stddef.h>
21595 #endif
21596
21597 EOF
21598 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21599   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21600   rm -rf conftest*
21601   eval "ac_cv_type_pid_t=yes"
21602 else
21603   rm -rf conftest*
21604   eval "ac_cv_type_pid_t=no"
21605 fi
21606 rm -f conftest*
21607
21608 fi
21609 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21610   echo "$ac_t""yes" 1>&6
21611 else
21612   echo "$ac_t""no" 1>&6
21613   cat >> confdefs.h <<EOF
21614 #define pid_t int
21615 EOF
21616
21617 fi
21618
21619 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21620 echo "configure:21621: checking for ptrdiff_t" >&5
21621 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21622   echo $ac_n "(cached) $ac_c" 1>&6
21623 else
21624   cat > conftest.$ac_ext <<EOF
21625 #line 21626 "configure"
21626 #include "confdefs.h"
21627 #include <stddef.h>
21628 int main() {
21629 ptrdiff_t p
21630 ; return 0; }
21631 EOF
21632 if { (eval echo configure:21633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21633   rm -rf conftest*
21634   am_cv_type_ptrdiff_t=yes
21635 else
21636   echo "configure: failed program was:" >&5
21637   cat conftest.$ac_ext >&5
21638   rm -rf conftest*
21639   am_cv_type_ptrdiff_t=no
21640 fi
21641 rm -f conftest*
21642 fi
21643
21644 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21645    if test $am_cv_type_ptrdiff_t = yes; then
21646      cat >> confdefs.h <<\EOF
21647 #define HAVE_PTRDIFF_T 1
21648 EOF
21649
21650    fi
21651
21652 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21653 echo "configure:21654: checking return type of signal handlers" >&5
21654 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21655   echo $ac_n "(cached) $ac_c" 1>&6
21656 else
21657   cat > conftest.$ac_ext <<EOF
21658 #line 21659 "configure"
21659 #include "confdefs.h"
21660 #include <sys/types.h>
21661 #include <signal.h>
21662 #ifdef signal
21663 #undef signal
21664 #endif
21665 #ifdef __cplusplus
21666 extern "C" void (*signal (int, void (*)(int)))(int);
21667 #else
21668 void (*signal ()) ();
21669 #endif
21670
21671 int main() {
21672 int i;
21673 ; return 0; }
21674 EOF
21675 if { (eval echo configure:21676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21676   rm -rf conftest*
21677   ac_cv_type_signal=void
21678 else
21679   echo "configure: failed program was:" >&5
21680   cat conftest.$ac_ext >&5
21681   rm -rf conftest*
21682   ac_cv_type_signal=int
21683 fi
21684 rm -f conftest*
21685 fi
21686
21687 echo "$ac_t""$ac_cv_type_signal" 1>&6
21688 cat >> confdefs.h <<EOF
21689 #define RETSIGTYPE $ac_cv_type_signal
21690 EOF
21691
21692
21693 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21694 echo "configure:21695: checking for size_t" >&5
21695 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21696   echo $ac_n "(cached) $ac_c" 1>&6
21697 else
21698   cat > conftest.$ac_ext <<EOF
21699 #line 21700 "configure"
21700 #include "confdefs.h"
21701 #include <sys/types.h>
21702 #if STDC_HEADERS
21703 #include <stdlib.h>
21704 #include <stddef.h>
21705 #endif
21706
21707 EOF
21708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21709   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21710   rm -rf conftest*
21711   eval "ac_cv_type_size_t=yes"
21712 else
21713   rm -rf conftest*
21714   eval "ac_cv_type_size_t=no"
21715 fi
21716 rm -f conftest*
21717
21718 fi
21719 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21720   echo "$ac_t""yes" 1>&6
21721 else
21722   echo "$ac_t""no" 1>&6
21723   cat >> confdefs.h <<EOF
21724 #define size_t unsigned
21725 EOF
21726
21727 fi
21728
21729
21730 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21731 echo "configure:21732: checking for ssize_t" >&5
21732 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21733   echo $ac_n "(cached) $ac_c" 1>&6
21734 else
21735   cat > conftest.$ac_ext <<EOF
21736 #line 21737 "configure"
21737 #include "confdefs.h"
21738 #include <sys/types.h>
21739 #if STDC_HEADERS
21740 #include <stdlib.h>
21741 #include <stddef.h>
21742 #endif
21743
21744 EOF
21745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21746   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21747   rm -rf conftest*
21748   eval "ac_cv_type_ssize_t=yes"
21749 else
21750   rm -rf conftest*
21751   eval "ac_cv_type_ssize_t=no"
21752 fi
21753 rm -f conftest*
21754
21755 fi
21756 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21757   echo "$ac_t""yes" 1>&6
21758 else
21759   echo "$ac_t""no" 1>&6
21760   cat >> confdefs.h <<EOF
21761 #define ssize_t signed int
21762 EOF
21763
21764 fi
21765
21766 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21767 echo "configure:21768: checking for caddr_t" >&5
21768 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21769   echo $ac_n "(cached) $ac_c" 1>&6
21770 else
21771   cat > conftest.$ac_ext <<EOF
21772 #line 21773 "configure"
21773 #include "confdefs.h"
21774 #include <sys/types.h>
21775 #if STDC_HEADERS
21776 #include <stdlib.h>
21777 #include <stddef.h>
21778 #endif
21779
21780 EOF
21781 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21782   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21783   rm -rf conftest*
21784   eval "ac_cv_type_caddr_t=yes"
21785 else
21786   rm -rf conftest*
21787   eval "ac_cv_type_caddr_t=no"
21788 fi
21789 rm -f conftest*
21790
21791 fi
21792 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21793   echo "$ac_t""yes" 1>&6
21794 else
21795   echo "$ac_t""no" 1>&6
21796   cat >> confdefs.h <<EOF
21797 #define caddr_t char *
21798 EOF
21799
21800 fi
21801
21802
21803 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21804 echo "configure:21805: checking for socklen_t" >&5
21805 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21806   echo $ac_n "(cached) $ac_c" 1>&6
21807 else
21808   cat > conftest.$ac_ext <<EOF
21809 #line 21810 "configure"
21810 #include "confdefs.h"
21811
21812 #ifdef HAVE_SYS_TYPES_H
21813 #include <sys/types.h>
21814 #endif
21815 #ifdef HAVE_SYS_SOCKET_H
21816 #include <sys/socket.h>
21817 #endif
21818
21819 int main() {
21820 socklen_t len;
21821 ; return 0; }
21822 EOF
21823 if { (eval echo configure:21824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21824   rm -rf conftest*
21825   ol_cv_type_socklen_t=yes
21826 else
21827   echo "configure: failed program was:" >&5
21828   cat conftest.$ac_ext >&5
21829   rm -rf conftest*
21830   ol_cv_type_socklen_t=no
21831 fi
21832 rm -f conftest*
21833 fi
21834
21835 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21836   if test $ol_cv_type_socklen_t = no; then
21837     cat >> confdefs.h <<\EOF
21838 #define socklen_t int
21839 EOF
21840
21841   fi
21842  
21843 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21844 echo "configure:21845: checking for member st_blksize in aggregate type struct stat" >&5
21845 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21846   echo $ac_n "(cached) $ac_c" 1>&6
21847 else
21848   cat > conftest.$ac_ext <<EOF
21849 #line 21850 "configure"
21850 #include "confdefs.h"
21851 #include <sys/types.h>
21852 #include <sys/stat.h>
21853 int main() {
21854 struct stat foo; foo.st_blksize;
21855 ; return 0; }
21856 EOF
21857 if { (eval echo configure:21858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21858   rm -rf conftest*
21859   ac_cv_c_struct_member_st_blksize=yes
21860 else
21861   echo "configure: failed program was:" >&5
21862   cat conftest.$ac_ext >&5
21863   rm -rf conftest*
21864   ac_cv_c_struct_member_st_blksize=no
21865 fi
21866 rm -f conftest*
21867 fi
21868
21869 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21870 st_blksize="$ac_cv_c_struct_member_st_blksize"
21871 if test $ac_cv_c_struct_member_st_blksize = yes; then
21872   cat >> confdefs.h <<\EOF
21873 #define HAVE_ST_BLKSIZE 1
21874 EOF
21875
21876 fi
21877
21878 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21879 echo "configure:21880: checking whether time.h and sys/time.h may both be included" >&5
21880 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21881   echo $ac_n "(cached) $ac_c" 1>&6
21882 else
21883   cat > conftest.$ac_ext <<EOF
21884 #line 21885 "configure"
21885 #include "confdefs.h"
21886 #include <sys/types.h>
21887 #include <sys/time.h>
21888 #include <time.h>
21889 int main() {
21890 struct tm *tp;
21891 ; return 0; }
21892 EOF
21893 if { (eval echo configure:21894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21894   rm -rf conftest*
21895   ac_cv_header_time=yes
21896 else
21897   echo "configure: failed program was:" >&5
21898   cat conftest.$ac_ext >&5
21899   rm -rf conftest*
21900   ac_cv_header_time=no
21901 fi
21902 rm -f conftest*
21903 fi
21904
21905 echo "$ac_t""$ac_cv_header_time" 1>&6
21906 if test $ac_cv_header_time = yes; then
21907   cat >> confdefs.h <<\EOF
21908 #define TIME_WITH_SYS_TIME 1
21909 EOF
21910
21911 fi
21912
21913 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21914 echo "configure:21915: checking whether struct tm is in sys/time.h or time.h" >&5
21915 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21916   echo $ac_n "(cached) $ac_c" 1>&6
21917 else
21918   cat > conftest.$ac_ext <<EOF
21919 #line 21920 "configure"
21920 #include "confdefs.h"
21921 #include <sys/types.h>
21922 #include <time.h>
21923 int main() {
21924 struct tm *tp; tp->tm_sec;
21925 ; return 0; }
21926 EOF
21927 if { (eval echo configure:21928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21928   rm -rf conftest*
21929   ac_cv_struct_tm=time.h
21930 else
21931   echo "configure: failed program was:" >&5
21932   cat conftest.$ac_ext >&5
21933   rm -rf conftest*
21934   ac_cv_struct_tm=sys/time.h
21935 fi
21936 rm -f conftest*
21937 fi
21938
21939 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21940 if test $ac_cv_struct_tm = sys/time.h; then
21941   cat >> confdefs.h <<\EOF
21942 #define TM_IN_SYS_TIME 1
21943 EOF
21944
21945 fi
21946
21947 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21948 echo "configure:21949: checking for uid_t in sys/types.h" >&5
21949 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21950   echo $ac_n "(cached) $ac_c" 1>&6
21951 else
21952   cat > conftest.$ac_ext <<EOF
21953 #line 21954 "configure"
21954 #include "confdefs.h"
21955 #include <sys/types.h>
21956 EOF
21957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21958   egrep "uid_t" >/dev/null 2>&1; then
21959   rm -rf conftest*
21960   ac_cv_type_uid_t=yes
21961 else
21962   rm -rf conftest*
21963   ac_cv_type_uid_t=no
21964 fi
21965 rm -f conftest*
21966
21967 fi
21968
21969 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21970 if test $ac_cv_type_uid_t = no; then
21971   cat >> confdefs.h <<\EOF
21972 #define uid_t int
21973 EOF
21974
21975   cat >> confdefs.h <<\EOF
21976 #define gid_t int
21977 EOF
21978
21979 fi
21980
21981 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21982 echo "configure:21983: checking for sig_atomic_t" >&5
21983 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21984   echo $ac_n "(cached) $ac_c" 1>&6
21985 else
21986   cat > conftest.$ac_ext <<EOF
21987 #line 21988 "configure"
21988 #include "confdefs.h"
21989 #include <signal.h>
21990 int main() {
21991 sig_atomic_t atomic;
21992 ; return 0; }
21993 EOF
21994 if { (eval echo configure:21995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21995   rm -rf conftest*
21996   ol_cv_type_sig_atomic_t=yes
21997 else
21998   echo "configure: failed program was:" >&5
21999   cat conftest.$ac_ext >&5
22000   rm -rf conftest*
22001   ol_cv_type_sig_atomic_t=no
22002 fi
22003 rm -f conftest*
22004 fi
22005
22006 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22007   if test $ol_cv_type_sig_atomic_t = no; then
22008     cat >> confdefs.h <<\EOF
22009 #define sig_atomic_t int
22010 EOF
22011
22012   fi
22013  
22014
22015
22016 # test for pw_gecos in struct passwd
22017 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22018 echo "configure:22019: checking struct passwd for pw_gecos" >&5
22019 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22020   echo $ac_n "(cached) $ac_c" 1>&6
22021 else
22022   
22023         cat > conftest.$ac_ext <<EOF
22024 #line 22025 "configure"
22025 #include "confdefs.h"
22026 #include <pwd.h>
22027 int main() {
22028
22029         struct passwd pwd;
22030         pwd.pw_gecos = pwd.pw_name;
22031
22032 ; return 0; }
22033 EOF
22034 if { (eval echo configure:22035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22035   rm -rf conftest*
22036   ol_cv_struct_passwd_pw_gecos=yes
22037 else
22038   echo "configure: failed program was:" >&5
22039   cat conftest.$ac_ext >&5
22040   rm -rf conftest*
22041   ol_cv_struct_passwd_pw_gecos=no
22042 fi
22043 rm -f conftest*
22044 fi
22045
22046 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22047 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22048         cat >> confdefs.h <<\EOF
22049 #define HAVE_PW_GECOS 1
22050 EOF
22051
22052 fi
22053
22054 # test for pw_passwd in struct passwd
22055 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22056 echo "configure:22057: checking struct passwd for pw_passwd" >&5
22057 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22058   echo $ac_n "(cached) $ac_c" 1>&6
22059 else
22060   
22061         cat > conftest.$ac_ext <<EOF
22062 #line 22063 "configure"
22063 #include "confdefs.h"
22064 #include <pwd.h>
22065 int main() {
22066
22067         struct passwd pwd;
22068         pwd.pw_passwd = pwd.pw_name;
22069
22070 ; return 0; }
22071 EOF
22072 if { (eval echo configure:22073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22073   rm -rf conftest*
22074   ol_cv_struct_passwd_pw_passwd=yes
22075 else
22076   echo "configure: failed program was:" >&5
22077   cat conftest.$ac_ext >&5
22078   rm -rf conftest*
22079   ol_cv_struct_passwd_pw_passwd=no
22080 fi
22081 rm -f conftest*
22082 fi
22083
22084 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22085 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22086         cat >> confdefs.h <<\EOF
22087 #define HAVE_PW_PASSWD 1
22088 EOF
22089
22090 fi
22091
22092
22093 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22094 echo "configure:22095: checking if toupper() requires islower()" >&5
22095 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22096   echo $ac_n "(cached) $ac_c" 1>&6
22097 else
22098   
22099         if test "$cross_compiling" = yes; then
22100   ol_cv_c_upper_lower=safe
22101 else
22102   cat > conftest.$ac_ext <<EOF
22103 #line 22104 "configure"
22104 #include "confdefs.h"
22105
22106 #include <ctype.h>
22107 main()
22108 {
22109         if ('C' == toupper('C'))
22110                 exit(0);
22111         else
22112                 exit(1);
22113 }
22114 EOF
22115 if { (eval echo configure:22116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22116 then
22117   ol_cv_c_upper_lower=no
22118 else
22119   echo "configure: failed program was:" >&5
22120   cat conftest.$ac_ext >&5
22121   rm -fr conftest*
22122   ol_cv_c_upper_lower=yes
22123 fi
22124 rm -fr conftest*
22125 fi
22126
22127 fi
22128
22129 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22130 if test $ol_cv_c_upper_lower != no ; then
22131         cat >> confdefs.h <<\EOF
22132 #define C_UPPER_LOWER 1
22133 EOF
22134
22135 fi
22136
22137 echo $ac_n "checking for working const""... $ac_c" 1>&6
22138 echo "configure:22139: checking for working const" >&5
22139 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22140   echo $ac_n "(cached) $ac_c" 1>&6
22141 else
22142   cat > conftest.$ac_ext <<EOF
22143 #line 22144 "configure"
22144 #include "confdefs.h"
22145
22146 int main() {
22147
22148 /* Ultrix mips cc rejects this.  */
22149 typedef int charset[2]; const charset x;
22150 /* SunOS 4.1.1 cc rejects this.  */
22151 char const *const *ccp;
22152 char **p;
22153 /* NEC SVR4.0.2 mips cc rejects this.  */
22154 struct point {int x, y;};
22155 static struct point const zero = {0,0};
22156 /* AIX XL C 1.02.0.0 rejects this.
22157    It does not let you subtract one const X* pointer from another in an arm
22158    of an if-expression whose if-part is not a constant expression */
22159 const char *g = "string";
22160 ccp = &g + (g ? g-g : 0);
22161 /* HPUX 7.0 cc rejects these. */
22162 ++ccp;
22163 p = (char**) ccp;
22164 ccp = (char const *const *) p;
22165 { /* SCO 3.2v4 cc rejects this.  */
22166   char *t;
22167   char const *s = 0 ? (char *) 0 : (char const *) 0;
22168
22169   *t++ = 0;
22170 }
22171 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22172   int x[] = {25, 17};
22173   const int *foo = &x[0];
22174   ++foo;
22175 }
22176 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22177   typedef const int *iptr;
22178   iptr p = 0;
22179   ++p;
22180 }
22181 { /* AIX XL C 1.02.0.0 rejects this saying
22182      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22183   struct s { int j; const int *ap[3]; };
22184   struct s *b; b->j = 5;
22185 }
22186 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22187   const int foo = 10;
22188 }
22189
22190 ; return 0; }
22191 EOF
22192 if { (eval echo configure:22193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22193   rm -rf conftest*
22194   ac_cv_c_const=yes
22195 else
22196   echo "configure: failed program was:" >&5
22197   cat conftest.$ac_ext >&5
22198   rm -rf conftest*
22199   ac_cv_c_const=no
22200 fi
22201 rm -f conftest*
22202 fi
22203
22204 echo "$ac_t""$ac_cv_c_const" 1>&6
22205 if test $ac_cv_c_const = no; then
22206   cat >> confdefs.h <<\EOF
22207 #define const 
22208 EOF
22209
22210 fi
22211
22212 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22213 echo "configure:22214: checking if compiler understands volatile" >&5
22214 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22215   echo $ac_n "(cached) $ac_c" 1>&6
22216 else
22217   cat > conftest.$ac_ext <<EOF
22218 #line 22219 "configure"
22219 #include "confdefs.h"
22220 int x, y, z;
22221 int main() {
22222 volatile int a; int * volatile b = x ? &y : &z;
22223       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22224       *b = 0;
22225 ; return 0; }
22226 EOF
22227 if { (eval echo configure:22228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22228   rm -rf conftest*
22229   ol_cv_c_volatile=yes
22230 else
22231   echo "configure: failed program was:" >&5
22232   cat conftest.$ac_ext >&5
22233   rm -rf conftest*
22234   ol_cv_c_volatile=no
22235 fi
22236 rm -f conftest*
22237 fi
22238
22239 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22240   if test $ol_cv_c_volatile = yes; then
22241     : 
22242   else
22243     cat >> confdefs.h <<\EOF
22244 #define volatile 
22245 EOF
22246
22247   fi
22248  
22249
22250 if test $cross_compiling = yes ; then
22251         cat >> confdefs.h <<\EOF
22252 #define CROSS_COMPILING 1
22253 EOF
22254
22255 else
22256         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22257 echo "configure:22258: checking whether byte ordering is bigendian" >&5
22258 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22259   echo $ac_n "(cached) $ac_c" 1>&6
22260 else
22261   ac_cv_c_bigendian=unknown
22262 # See if sys/param.h defines the BYTE_ORDER macro.
22263 cat > conftest.$ac_ext <<EOF
22264 #line 22265 "configure"
22265 #include "confdefs.h"
22266 #include <sys/types.h>
22267 #include <sys/param.h>
22268 int main() {
22269
22270 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22271  bogus endian macros
22272 #endif
22273 ; return 0; }
22274 EOF
22275 if { (eval echo configure:22276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22276   rm -rf conftest*
22277   # It does; now see whether it defined to BIG_ENDIAN or not.
22278 cat > conftest.$ac_ext <<EOF
22279 #line 22280 "configure"
22280 #include "confdefs.h"
22281 #include <sys/types.h>
22282 #include <sys/param.h>
22283 int main() {
22284
22285 #if BYTE_ORDER != BIG_ENDIAN
22286  not big endian
22287 #endif
22288 ; return 0; }
22289 EOF
22290 if { (eval echo configure:22291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22291   rm -rf conftest*
22292   ac_cv_c_bigendian=yes
22293 else
22294   echo "configure: failed program was:" >&5
22295   cat conftest.$ac_ext >&5
22296   rm -rf conftest*
22297   ac_cv_c_bigendian=no
22298 fi
22299 rm -f conftest*
22300 else
22301   echo "configure: failed program was:" >&5
22302   cat conftest.$ac_ext >&5
22303 fi
22304 rm -f conftest*
22305 if test $ac_cv_c_bigendian = unknown; then
22306 if test "$cross_compiling" = yes; then
22307     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22308 else
22309   cat > conftest.$ac_ext <<EOF
22310 #line 22311 "configure"
22311 #include "confdefs.h"
22312 main () {
22313   /* Are we little or big endian?  From Harbison&Steele.  */
22314   union
22315   {
22316     long l;
22317     char c[sizeof (long)];
22318   } u;
22319   u.l = 1;
22320   exit (u.c[sizeof (long) - 1] == 1);
22321 }
22322 EOF
22323 if { (eval echo configure:22324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22324 then
22325   ac_cv_c_bigendian=no
22326 else
22327   echo "configure: failed program was:" >&5
22328   cat conftest.$ac_ext >&5
22329   rm -fr conftest*
22330   ac_cv_c_bigendian=yes
22331 fi
22332 rm -fr conftest*
22333 fi
22334
22335 fi
22336 fi
22337
22338 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22339 if test $ac_cv_c_bigendian = yes; then
22340   cat >> confdefs.h <<\EOF
22341 #define WORDS_BIGENDIAN 1
22342 EOF
22343
22344 fi
22345
22346 fi
22347
22348 echo $ac_n "checking size of short""... $ac_c" 1>&6
22349 echo "configure:22350: checking size of short" >&5 
22350 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22351   echo $ac_n "(cached) $ac_c" 1>&6
22352 else
22353   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22354   cat > conftest.$ac_ext <<EOF
22355 #line 22356 "configure"
22356 #include "confdefs.h"
22357 #include "confdefs.h" 
22358 #include <sys/types.h> 
22359  
22360
22361 int main() {
22362 switch (0) case 0: case (sizeof (short) == $ac_size):;
22363 ; return 0; }
22364 EOF
22365 if { (eval echo configure:22366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22366   rm -rf conftest*
22367   ac_cv_sizeof_short=$ac_size
22368 else
22369   echo "configure: failed program was:" >&5
22370   cat conftest.$ac_ext >&5
22371 fi
22372 rm -f conftest* 
22373   if test x$ac_cv_sizeof_short != x ; then break; fi 
22374 done 
22375
22376 fi
22377  
22378 if test x$ac_cv_sizeof_short = x ; then 
22379   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22380 fi 
22381 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22382 cat >> confdefs.h <<EOF
22383 #define SIZEOF_SHORT $ac_cv_sizeof_short
22384 EOF
22385  
22386  
22387 echo $ac_n "checking size of int""... $ac_c" 1>&6
22388 echo "configure:22389: checking size of int" >&5 
22389 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22390   echo $ac_n "(cached) $ac_c" 1>&6
22391 else
22392   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22393   cat > conftest.$ac_ext <<EOF
22394 #line 22395 "configure"
22395 #include "confdefs.h"
22396 #include "confdefs.h" 
22397 #include <sys/types.h> 
22398  
22399
22400 int main() {
22401 switch (0) case 0: case (sizeof (int) == $ac_size):;
22402 ; return 0; }
22403 EOF
22404 if { (eval echo configure:22405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22405   rm -rf conftest*
22406   ac_cv_sizeof_int=$ac_size
22407 else
22408   echo "configure: failed program was:" >&5
22409   cat conftest.$ac_ext >&5
22410 fi
22411 rm -f conftest* 
22412   if test x$ac_cv_sizeof_int != x ; then break; fi 
22413 done 
22414
22415 fi
22416  
22417 if test x$ac_cv_sizeof_int = x ; then 
22418   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22419 fi 
22420 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22421 cat >> confdefs.h <<EOF
22422 #define SIZEOF_INT $ac_cv_sizeof_int
22423 EOF
22424  
22425  
22426 echo $ac_n "checking size of long""... $ac_c" 1>&6
22427 echo "configure:22428: checking size of long" >&5 
22428 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22429   echo $ac_n "(cached) $ac_c" 1>&6
22430 else
22431   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22432   cat > conftest.$ac_ext <<EOF
22433 #line 22434 "configure"
22434 #include "confdefs.h"
22435 #include "confdefs.h" 
22436 #include <sys/types.h> 
22437  
22438
22439 int main() {
22440 switch (0) case 0: case (sizeof (long) == $ac_size):;
22441 ; return 0; }
22442 EOF
22443 if { (eval echo configure:22444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22444   rm -rf conftest*
22445   ac_cv_sizeof_long=$ac_size
22446 else
22447   echo "configure: failed program was:" >&5
22448   cat conftest.$ac_ext >&5
22449 fi
22450 rm -f conftest* 
22451   if test x$ac_cv_sizeof_long != x ; then break; fi 
22452 done 
22453
22454 fi
22455  
22456 if test x$ac_cv_sizeof_long = x ; then 
22457   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22458 fi 
22459 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22460 cat >> confdefs.h <<EOF
22461 #define SIZEOF_LONG $ac_cv_sizeof_long
22462 EOF
22463  
22464
22465
22466 if test "$ac_cv_sizeof_int" -lt 4 ; then
22467         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22468
22469         cat >> confdefs.h <<\EOF
22470 #define LBER_INT_T long
22471 EOF
22472
22473 else
22474         cat >> confdefs.h <<\EOF
22475 #define LBER_INT_T int
22476 EOF
22477
22478 fi
22479
22480 cat >> confdefs.h <<\EOF
22481 #define LBER_LEN_T long
22482 EOF
22483
22484 cat >> confdefs.h <<\EOF
22485 #define LBER_SOCKET_T int
22486 EOF
22487
22488 cat >> confdefs.h <<\EOF
22489 #define LBER_TAG_T long
22490 EOF
22491
22492
22493 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22494 echo "configure:22495: checking for 8-bit clean memcmp" >&5
22495 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22496   echo $ac_n "(cached) $ac_c" 1>&6
22497 else
22498   if test "$cross_compiling" = yes; then
22499   ac_cv_func_memcmp_clean=no
22500 else
22501   cat > conftest.$ac_ext <<EOF
22502 #line 22503 "configure"
22503 #include "confdefs.h"
22504
22505 main()
22506 {
22507   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22508   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22509 }
22510
22511 EOF
22512 if { (eval echo configure:22513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22513 then
22514   ac_cv_func_memcmp_clean=yes
22515 else
22516   echo "configure: failed program was:" >&5
22517   cat conftest.$ac_ext >&5
22518   rm -fr conftest*
22519   ac_cv_func_memcmp_clean=no
22520 fi
22521 rm -fr conftest*
22522 fi
22523
22524 fi
22525
22526 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22527 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22528
22529 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22530 echo "configure:22531: checking for strftime" >&5
22531 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22532   echo $ac_n "(cached) $ac_c" 1>&6
22533 else
22534   cat > conftest.$ac_ext <<EOF
22535 #line 22536 "configure"
22536 #include "confdefs.h"
22537 /* System header to define __stub macros and hopefully few prototypes,
22538     which can conflict with char strftime(); below.  */
22539 #include <assert.h>
22540 /* Override any gcc2 internal prototype to avoid an error.  */
22541 /* We use char because int might match the return type of a gcc2
22542     builtin and then its argument prototype would still apply.  */
22543 char strftime();
22544 char (*f)();
22545
22546 int main() {
22547
22548 /* The GNU C library defines this for functions which it implements
22549     to always fail with ENOSYS.  Some functions are actually named
22550     something starting with __ and the normal name is an alias.  */
22551 #if defined (__stub_strftime) || defined (__stub___strftime)
22552 choke me
22553 #else
22554 f = strftime;
22555 #endif
22556
22557 ; return 0; }
22558 EOF
22559 if { (eval echo configure:22560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22560   rm -rf conftest*
22561   eval "ac_cv_func_strftime=yes"
22562 else
22563   echo "configure: failed program was:" >&5
22564   cat conftest.$ac_ext >&5
22565   rm -rf conftest*
22566   eval "ac_cv_func_strftime=no"
22567 fi
22568 rm -f conftest*
22569 fi
22570
22571 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22572   echo "$ac_t""yes" 1>&6
22573   cat >> confdefs.h <<\EOF
22574 #define HAVE_STRFTIME 1
22575 EOF
22576
22577 else
22578   echo "$ac_t""no" 1>&6
22579 # strftime is in -lintl on SCO UNIX.
22580 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22581 echo "configure:22582: checking for strftime in -lintl" >&5
22582 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22583 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22584   echo $ac_n "(cached) $ac_c" 1>&6
22585 else
22586   ac_save_LIBS="$LIBS"
22587 LIBS="-lintl  $LIBS"
22588 cat > conftest.$ac_ext <<EOF
22589 #line 22590 "configure"
22590 #include "confdefs.h"
22591 /* Override any gcc2 internal prototype to avoid an error.  */
22592 /* We use char because int might match the return type of a gcc2
22593     builtin and then its argument prototype would still apply.  */
22594 char strftime();
22595
22596 int main() {
22597 strftime()
22598 ; return 0; }
22599 EOF
22600 if { (eval echo configure:22601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22601   rm -rf conftest*
22602   eval "ac_cv_lib_$ac_lib_var=yes"
22603 else
22604   echo "configure: failed program was:" >&5
22605   cat conftest.$ac_ext >&5
22606   rm -rf conftest*
22607   eval "ac_cv_lib_$ac_lib_var=no"
22608 fi
22609 rm -f conftest*
22610 LIBS="$ac_save_LIBS"
22611
22612 fi
22613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22614   echo "$ac_t""yes" 1>&6
22615   cat >> confdefs.h <<\EOF
22616 #define HAVE_STRFTIME 1
22617 EOF
22618
22619 LIBS="-lintl $LIBS"
22620 else
22621   echo "$ac_t""no" 1>&6
22622 fi
22623
22624 fi
22625
22626
22627 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22628 echo "configure:22629: checking for inet_aton()" >&5
22629 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22630   echo $ac_n "(cached) $ac_c" 1>&6
22631 else
22632   cat > conftest.$ac_ext <<EOF
22633 #line 22634 "configure"
22634 #include "confdefs.h"
22635
22636 #ifdef HAVE_SYS_TYPES_H
22637 #       include <sys/types.h>
22638 #endif
22639 #ifdef HAVE_SYS_SOCKET_H
22640 #       include <sys/socket.h>
22641 #       ifdef HAVE_SYS_SELECT_H
22642 #               include <sys/select.h>
22643 #       endif
22644 #       include <netinet/in.h>
22645 #       ifdef HAVE_ARPA_INET_H
22646 #               include <arpa/inet.h>
22647 #       endif
22648 #endif
22649
22650 int main() {
22651 struct in_addr in;
22652 int rc = inet_aton( "255.255.255.255", &in );
22653 ; return 0; }
22654 EOF
22655 if { (eval echo configure:22656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22656   rm -rf conftest*
22657   ol_cv_func_inet_aton=yes
22658 else
22659   echo "configure: failed program was:" >&5
22660   cat conftest.$ac_ext >&5
22661   rm -rf conftest*
22662   ol_cv_func_inet_aton=no
22663 fi
22664 rm -f conftest*
22665 fi
22666
22667 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22668   if test $ol_cv_func_inet_aton != no; then
22669     cat >> confdefs.h <<\EOF
22670 #define HAVE_INET_ATON 1
22671 EOF
22672
22673   fi
22674  
22675
22676 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22677 echo "configure:22678: checking for _spawnlp" >&5
22678 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22679   echo $ac_n "(cached) $ac_c" 1>&6
22680 else
22681   cat > conftest.$ac_ext <<EOF
22682 #line 22683 "configure"
22683 #include "confdefs.h"
22684 /* System header to define __stub macros and hopefully few prototypes,
22685     which can conflict with char _spawnlp(); below.  */
22686 #include <assert.h>
22687 /* Override any gcc2 internal prototype to avoid an error.  */
22688 /* We use char because int might match the return type of a gcc2
22689     builtin and then its argument prototype would still apply.  */
22690 char _spawnlp();
22691 char (*f)();
22692
22693 int main() {
22694
22695 /* The GNU C library defines this for functions which it implements
22696     to always fail with ENOSYS.  Some functions are actually named
22697     something starting with __ and the normal name is an alias.  */
22698 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22699 choke me
22700 #else
22701 f = _spawnlp;
22702 #endif
22703
22704 ; return 0; }
22705 EOF
22706 if { (eval echo configure:22707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22707   rm -rf conftest*
22708   eval "ac_cv_func__spawnlp=yes"
22709 else
22710   echo "configure: failed program was:" >&5
22711   cat conftest.$ac_ext >&5
22712   rm -rf conftest*
22713   eval "ac_cv_func__spawnlp=no"
22714 fi
22715 rm -f conftest*
22716 fi
22717
22718 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22719   echo "$ac_t""yes" 1>&6
22720   cat >> confdefs.h <<\EOF
22721 #define HAVE_SPAWNLP 1
22722 EOF
22723
22724 else
22725   echo "$ac_t""no" 1>&6
22726 fi
22727
22728
22729 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22730 echo "configure:22731: checking for _snprintf" >&5
22731 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22732   echo $ac_n "(cached) $ac_c" 1>&6
22733 else
22734   cat > conftest.$ac_ext <<EOF
22735 #line 22736 "configure"
22736 #include "confdefs.h"
22737 /* System header to define __stub macros and hopefully few prototypes,
22738     which can conflict with char _snprintf(); below.  */
22739 #include <assert.h>
22740 /* Override any gcc2 internal prototype to avoid an error.  */
22741 /* We use char because int might match the return type of a gcc2
22742     builtin and then its argument prototype would still apply.  */
22743 char _snprintf();
22744 char (*f)();
22745
22746 int main() {
22747
22748 /* The GNU C library defines this for functions which it implements
22749     to always fail with ENOSYS.  Some functions are actually named
22750     something starting with __ and the normal name is an alias.  */
22751 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22752 choke me
22753 #else
22754 f = _snprintf;
22755 #endif
22756
22757 ; return 0; }
22758 EOF
22759 if { (eval echo configure:22760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22760   rm -rf conftest*
22761   eval "ac_cv_func__snprintf=yes"
22762 else
22763   echo "configure: failed program was:" >&5
22764   cat conftest.$ac_ext >&5
22765   rm -rf conftest*
22766   eval "ac_cv_func__snprintf=no"
22767 fi
22768 rm -f conftest*
22769 fi
22770
22771 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22772   echo "$ac_t""yes" 1>&6
22773   ac_cv_func_snprintf=yes
22774         cat >> confdefs.h <<\EOF
22775 #define snprintf _snprintf
22776 EOF
22777
22778
22779 else
22780   echo "$ac_t""no" 1>&6
22781 fi
22782
22783
22784 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22785 echo "configure:22786: checking for _vsnprintf" >&5
22786 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22787   echo $ac_n "(cached) $ac_c" 1>&6
22788 else
22789   cat > conftest.$ac_ext <<EOF
22790 #line 22791 "configure"
22791 #include "confdefs.h"
22792 /* System header to define __stub macros and hopefully few prototypes,
22793     which can conflict with char _vsnprintf(); below.  */
22794 #include <assert.h>
22795 /* Override any gcc2 internal prototype to avoid an error.  */
22796 /* We use char because int might match the return type of a gcc2
22797     builtin and then its argument prototype would still apply.  */
22798 char _vsnprintf();
22799 char (*f)();
22800
22801 int main() {
22802
22803 /* The GNU C library defines this for functions which it implements
22804     to always fail with ENOSYS.  Some functions are actually named
22805     something starting with __ and the normal name is an alias.  */
22806 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22807 choke me
22808 #else
22809 f = _vsnprintf;
22810 #endif
22811
22812 ; return 0; }
22813 EOF
22814 if { (eval echo configure:22815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22815   rm -rf conftest*
22816   eval "ac_cv_func__vsnprintf=yes"
22817 else
22818   echo "configure: failed program was:" >&5
22819   cat conftest.$ac_ext >&5
22820   rm -rf conftest*
22821   eval "ac_cv_func__vsnprintf=no"
22822 fi
22823 rm -f conftest*
22824 fi
22825
22826 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22827   echo "$ac_t""yes" 1>&6
22828   ac_cv_func_vsnprintf=yes
22829         cat >> confdefs.h <<\EOF
22830 #define vsnprintf _vsnprintf
22831 EOF
22832
22833
22834 else
22835   echo "$ac_t""no" 1>&6
22836 fi
22837
22838
22839 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22840 echo "configure:22841: checking for vprintf" >&5
22841 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22842   echo $ac_n "(cached) $ac_c" 1>&6
22843 else
22844   cat > conftest.$ac_ext <<EOF
22845 #line 22846 "configure"
22846 #include "confdefs.h"
22847 /* System header to define __stub macros and hopefully few prototypes,
22848     which can conflict with char vprintf(); below.  */
22849 #include <assert.h>
22850 /* Override any gcc2 internal prototype to avoid an error.  */
22851 /* We use char because int might match the return type of a gcc2
22852     builtin and then its argument prototype would still apply.  */
22853 char vprintf();
22854 char (*f)();
22855
22856 int main() {
22857
22858 /* The GNU C library defines this for functions which it implements
22859     to always fail with ENOSYS.  Some functions are actually named
22860     something starting with __ and the normal name is an alias.  */
22861 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22862 choke me
22863 #else
22864 f = vprintf;
22865 #endif
22866
22867 ; return 0; }
22868 EOF
22869 if { (eval echo configure:22870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22870   rm -rf conftest*
22871   eval "ac_cv_func_vprintf=yes"
22872 else
22873   echo "configure: failed program was:" >&5
22874   cat conftest.$ac_ext >&5
22875   rm -rf conftest*
22876   eval "ac_cv_func_vprintf=no"
22877 fi
22878 rm -f conftest*
22879 fi
22880
22881 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22882   echo "$ac_t""yes" 1>&6
22883   cat >> confdefs.h <<\EOF
22884 #define HAVE_VPRINTF 1
22885 EOF
22886
22887 else
22888   echo "$ac_t""no" 1>&6
22889 fi
22890
22891 if test "$ac_cv_func_vprintf" != yes; then
22892 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22893 echo "configure:22894: checking for _doprnt" >&5
22894 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22895   echo $ac_n "(cached) $ac_c" 1>&6
22896 else
22897   cat > conftest.$ac_ext <<EOF
22898 #line 22899 "configure"
22899 #include "confdefs.h"
22900 /* System header to define __stub macros and hopefully few prototypes,
22901     which can conflict with char _doprnt(); below.  */
22902 #include <assert.h>
22903 /* Override any gcc2 internal prototype to avoid an error.  */
22904 /* We use char because int might match the return type of a gcc2
22905     builtin and then its argument prototype would still apply.  */
22906 char _doprnt();
22907 char (*f)();
22908
22909 int main() {
22910
22911 /* The GNU C library defines this for functions which it implements
22912     to always fail with ENOSYS.  Some functions are actually named
22913     something starting with __ and the normal name is an alias.  */
22914 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22915 choke me
22916 #else
22917 f = _doprnt;
22918 #endif
22919
22920 ; return 0; }
22921 EOF
22922 if { (eval echo configure:22923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22923   rm -rf conftest*
22924   eval "ac_cv_func__doprnt=yes"
22925 else
22926   echo "configure: failed program was:" >&5
22927   cat conftest.$ac_ext >&5
22928   rm -rf conftest*
22929   eval "ac_cv_func__doprnt=no"
22930 fi
22931 rm -f conftest*
22932 fi
22933
22934 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22935   echo "$ac_t""yes" 1>&6
22936   cat >> confdefs.h <<\EOF
22937 #define HAVE_DOPRNT 1
22938 EOF
22939
22940 else
22941   echo "$ac_t""no" 1>&6
22942 fi
22943
22944 fi
22945
22946
22947 if test $ac_cv_func_vprintf = yes ; then
22948                 for ac_func in snprintf vsnprintf
22949 do
22950 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22951 echo "configure:22952: checking for $ac_func" >&5
22952 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22953   echo $ac_n "(cached) $ac_c" 1>&6
22954 else
22955   cat > conftest.$ac_ext <<EOF
22956 #line 22957 "configure"
22957 #include "confdefs.h"
22958 /* System header to define __stub macros and hopefully few prototypes,
22959     which can conflict with char $ac_func(); below.  */
22960 #include <assert.h>
22961 /* Override any gcc2 internal prototype to avoid an error.  */
22962 /* We use char because int might match the return type of a gcc2
22963     builtin and then its argument prototype would still apply.  */
22964 char $ac_func();
22965 char (*f)();
22966
22967 int main() {
22968
22969 /* The GNU C library defines this for functions which it implements
22970     to always fail with ENOSYS.  Some functions are actually named
22971     something starting with __ and the normal name is an alias.  */
22972 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22973 choke me
22974 #else
22975 f = $ac_func;
22976 #endif
22977
22978 ; return 0; }
22979 EOF
22980 if { (eval echo configure:22981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22981   rm -rf conftest*
22982   eval "ac_cv_func_$ac_func=yes"
22983 else
22984   echo "configure: failed program was:" >&5
22985   cat conftest.$ac_ext >&5
22986   rm -rf conftest*
22987   eval "ac_cv_func_$ac_func=no"
22988 fi
22989 rm -f conftest*
22990 fi
22991
22992 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22993   echo "$ac_t""yes" 1>&6
22994     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22995   cat >> confdefs.h <<EOF
22996 #define $ac_tr_func 1
22997 EOF
22998  
22999 else
23000   echo "$ac_t""no" 1>&6
23001 fi
23002 done
23003
23004 fi
23005
23006 for ac_func in \
23007         bcopy                   \
23008         closesocket             \
23009         chroot                  \
23010         endgrent                \
23011         endpwent                \
23012         fcntl                   \
23013         flock                   \
23014         fstat                   \
23015         getdtablesize   \
23016         getgrgid                \
23017         gethostname             \
23018         getpass                 \
23019         getpassphrase   \
23020         getpwuid                \
23021         getpwnam                \
23022         getspnam                \
23023         gettimeofday    \
23024         initgroups              \
23025         lockf                   \
23026         memcpy                  \
23027         memmove                 \
23028         mkstemp                 \
23029         mktemp                  \
23030         pipe                    \
23031         read                    \
23032         recv                    \
23033         recvfrom                \
23034         setpwfile               \
23035         setgid                  \
23036         setegid                 \
23037         setsid                  \
23038         setuid                  \
23039         seteuid                 \
23040         sigaction               \
23041         signal                  \
23042         sigset                  \
23043         strdup                  \
23044         strerror                \
23045         strpbrk                 \
23046         strrchr                 \
23047         strsep                  \
23048         strstr                  \
23049         strtol                  \
23050         strtoul                 \
23051         strtoq                  \
23052         strtouq                 \
23053         strtoll                 \
23054         strspn                  \
23055         sysconf                 \
23056         usleep                  \
23057         waitpid                 \
23058         wait4                   \
23059         write                   \
23060         send                    \
23061         sendmsg                 \
23062         sendto                  \
23063
23064 do
23065 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23066 echo "configure:23067: checking for $ac_func" >&5
23067 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23068   echo $ac_n "(cached) $ac_c" 1>&6
23069 else
23070   cat > conftest.$ac_ext <<EOF
23071 #line 23072 "configure"
23072 #include "confdefs.h"
23073 /* System header to define __stub macros and hopefully few prototypes,
23074     which can conflict with char $ac_func(); below.  */
23075 #include <assert.h>
23076 /* Override any gcc2 internal prototype to avoid an error.  */
23077 /* We use char because int might match the return type of a gcc2
23078     builtin and then its argument prototype would still apply.  */
23079 char $ac_func();
23080 char (*f)();
23081
23082 int main() {
23083
23084 /* The GNU C library defines this for functions which it implements
23085     to always fail with ENOSYS.  Some functions are actually named
23086     something starting with __ and the normal name is an alias.  */
23087 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23088 choke me
23089 #else
23090 f = $ac_func;
23091 #endif
23092
23093 ; return 0; }
23094 EOF
23095 if { (eval echo configure:23096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23096   rm -rf conftest*
23097   eval "ac_cv_func_$ac_func=yes"
23098 else
23099   echo "configure: failed program was:" >&5
23100   cat conftest.$ac_ext >&5
23101   rm -rf conftest*
23102   eval "ac_cv_func_$ac_func=no"
23103 fi
23104 rm -f conftest*
23105 fi
23106
23107 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23108   echo "$ac_t""yes" 1>&6
23109     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23110   cat >> confdefs.h <<EOF
23111 #define $ac_tr_func 1
23112 EOF
23113  
23114 else
23115   echo "$ac_t""no" 1>&6
23116 fi
23117 done
23118
23119
23120 for ac_func in getopt getpeereid
23121 do
23122 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23123 echo "configure:23124: checking for $ac_func" >&5
23124 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23125   echo $ac_n "(cached) $ac_c" 1>&6
23126 else
23127   cat > conftest.$ac_ext <<EOF
23128 #line 23129 "configure"
23129 #include "confdefs.h"
23130 /* System header to define __stub macros and hopefully few prototypes,
23131     which can conflict with char $ac_func(); below.  */
23132 #include <assert.h>
23133 /* Override any gcc2 internal prototype to avoid an error.  */
23134 /* We use char because int might match the return type of a gcc2
23135     builtin and then its argument prototype would still apply.  */
23136 char $ac_func();
23137 char (*f)();
23138
23139 int main() {
23140
23141 /* The GNU C library defines this for functions which it implements
23142     to always fail with ENOSYS.  Some functions are actually named
23143     something starting with __ and the normal name is an alias.  */
23144 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23145 choke me
23146 #else
23147 f = $ac_func;
23148 #endif
23149
23150 ; return 0; }
23151 EOF
23152 if { (eval echo configure:23153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23153   rm -rf conftest*
23154   eval "ac_cv_func_$ac_func=yes"
23155 else
23156   echo "configure: failed program was:" >&5
23157   cat conftest.$ac_ext >&5
23158   rm -rf conftest*
23159   eval "ac_cv_func_$ac_func=no"
23160 fi
23161 rm -f conftest*
23162 fi
23163
23164 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23165   echo "$ac_t""yes" 1>&6
23166     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23167   cat >> confdefs.h <<EOF
23168 #define $ac_tr_func 1
23169 EOF
23170  
23171 else
23172   echo "$ac_t""no" 1>&6
23173 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23174 fi
23175 done
23176
23177
23178
23179 if test "$ac_cv_func_getopt" != yes; then
23180         LIBSRCS="$LIBSRCS getopt.c"
23181 fi
23182 if test "$ac_cv_func_getpeereid" != yes; then
23183         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23184 echo "configure:23185: checking for msg_accrights in msghdr" >&5
23185 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23186   echo $ac_n "(cached) $ac_c" 1>&6
23187 else
23188   cat > conftest.$ac_ext <<EOF
23189 #line 23190 "configure"
23190 #include "confdefs.h"
23191 #include <sys/socket.h>
23192 int main() {
23193 struct msghdr m; m.msg_accrightslen=0
23194 ; return 0; }
23195 EOF
23196 if { (eval echo configure:23197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23197   rm -rf conftest*
23198   ol_cv_msghdr_msg_accrights=yes
23199 else
23200   echo "configure: failed program was:" >&5
23201   cat conftest.$ac_ext >&5
23202   rm -rf conftest*
23203   ol_cv_msghdr_msg_accrights=no
23204 fi
23205 rm -f conftest*
23206         
23207 fi
23208
23209 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23210   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23211         cat >> confdefs.h <<\EOF
23212 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23213 EOF
23214
23215   fi
23216
23217         LIBSRCS="$LIBSRCS getpeereid.c"
23218 fi
23219 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23220         if test "$ac_cv_func_snprintf" != yes; then
23221                 cat >> confdefs.h <<\EOF
23222 #define snprintf ber_pvt_snprintf
23223 EOF
23224
23225         fi
23226         if test "$ac_cv_func_vsnprintf" != yes; then
23227                 cat >> confdefs.h <<\EOF
23228 #define vsnprintf ber_pvt_vsnprintf
23229 EOF
23230
23231         fi
23232 fi
23233
23234 # Check Configuration
23235 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23236 echo "configure:23237: checking declaration of sys_errlist" >&5
23237 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23238   echo $ac_n "(cached) $ac_c" 1>&6
23239 else
23240   
23241         cat > conftest.$ac_ext <<EOF
23242 #line 23243 "configure"
23243 #include "confdefs.h"
23244
23245 #include <stdio.h>
23246 #include <sys/types.h>
23247 #include <errno.h>
23248 #ifdef WINNT
23249 #include <stdlib.h>
23250 #endif 
23251 int main() {
23252 char *c = (char *) *sys_errlist
23253 ; return 0; }
23254 EOF
23255 if { (eval echo configure:23256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23256   rm -rf conftest*
23257   ol_cv_dcl_sys_errlist=yes
23258         ol_cv_have_sys_errlist=yes
23259 else
23260   echo "configure: failed program was:" >&5
23261   cat conftest.$ac_ext >&5
23262   rm -rf conftest*
23263   ol_cv_dcl_sys_errlist=no
23264 fi
23265 rm -f conftest*
23266 fi
23267
23268 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23269 #
23270 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23271 if test $ol_cv_dcl_sys_errlist = no ; then
23272         cat >> confdefs.h <<\EOF
23273 #define DECL_SYS_ERRLIST 1
23274 EOF
23275
23276
23277         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23278 echo "configure:23279: checking existence of sys_errlist" >&5
23279 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23280   echo $ac_n "(cached) $ac_c" 1>&6
23281 else
23282   
23283                 cat > conftest.$ac_ext <<EOF
23284 #line 23285 "configure"
23285 #include "confdefs.h"
23286 #include <errno.h>
23287 int main() {
23288 char *c = (char *) *sys_errlist
23289 ; return 0; }
23290 EOF
23291 if { (eval echo configure:23292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23292   rm -rf conftest*
23293   ol_cv_have_sys_errlist=yes
23294 else
23295   echo "configure: failed program was:" >&5
23296   cat conftest.$ac_ext >&5
23297   rm -rf conftest*
23298   ol_cv_have_sys_errlist=no
23299 fi
23300 rm -f conftest*
23301 fi
23302
23303 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23304 fi
23305 if test $ol_cv_have_sys_errlist = yes ; then
23306         cat >> confdefs.h <<\EOF
23307 #define HAVE_SYS_ERRLIST 1
23308 EOF
23309
23310 fi
23311
23312
23313
23314 if test "$ol_enable_slapi" != no ; then
23315                         for ac_hdr in ltdl.h
23316 do
23317 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23318 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23319 echo "configure:23320: checking for $ac_hdr" >&5
23320 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23321   echo $ac_n "(cached) $ac_c" 1>&6
23322 else
23323   cat > conftest.$ac_ext <<EOF
23324 #line 23325 "configure"
23325 #include "confdefs.h"
23326 #include <$ac_hdr>
23327 EOF
23328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23329 { (eval echo configure:23330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23331 if test -z "$ac_err"; then
23332   rm -rf conftest*
23333   eval "ac_cv_header_$ac_safe=yes"
23334 else
23335   echo "$ac_err" >&5
23336   echo "configure: failed program was:" >&5
23337   cat conftest.$ac_ext >&5
23338   rm -rf conftest*
23339   eval "ac_cv_header_$ac_safe=no"
23340 fi
23341 rm -f conftest*
23342 fi
23343 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23344   echo "$ac_t""yes" 1>&6
23345     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23346   cat >> confdefs.h <<EOF
23347 #define $ac_tr_hdr 1
23348 EOF
23349  
23350 else
23351   echo "$ac_t""no" 1>&6
23352 fi
23353 done
23354
23355
23356         if test $ac_cv_header_ltdl_h != yes ; then
23357                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23358         fi
23359         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23360 echo "configure:23361: checking for lt_dlinit in -lltdl" >&5
23361 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23362 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23363   echo $ac_n "(cached) $ac_c" 1>&6
23364 else
23365   ac_save_LIBS="$LIBS"
23366 LIBS="-lltdl  $LIBS"
23367 cat > conftest.$ac_ext <<EOF
23368 #line 23369 "configure"
23369 #include "confdefs.h"
23370 /* Override any gcc2 internal prototype to avoid an error.  */
23371 /* We use char because int might match the return type of a gcc2
23372     builtin and then its argument prototype would still apply.  */
23373 char lt_dlinit();
23374
23375 int main() {
23376 lt_dlinit()
23377 ; return 0; }
23378 EOF
23379 if { (eval echo configure:23380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23380   rm -rf conftest*
23381   eval "ac_cv_lib_$ac_lib_var=yes"
23382 else
23383   echo "configure: failed program was:" >&5
23384   cat conftest.$ac_ext >&5
23385   rm -rf conftest*
23386   eval "ac_cv_lib_$ac_lib_var=no"
23387 fi
23388 rm -f conftest*
23389 LIBS="$ac_save_LIBS"
23390
23391 fi
23392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23393   echo "$ac_t""yes" 1>&6
23394   
23395                 SLAPI_LIBS=-lltdl
23396                 LIBSLAPI=libslapi.a
23397                 LIBSLAPITOOLS=../libslapi.a
23398                 cat >> confdefs.h <<\EOF
23399 #define HAVE_LIBLTDL 1
23400 EOF
23401
23402         
23403 else
23404   echo "$ac_t""no" 1>&6
23405 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23406 fi
23407
23408
23409         cat >> confdefs.h <<\EOF
23410 #define LDAP_SLAPI 1
23411 EOF
23412
23413 fi
23414
23415 if test "$ol_enable_debug" != no ; then
23416         cat >> confdefs.h <<\EOF
23417 #define LDAP_DEBUG 1
23418 EOF
23419
23420 fi
23421 if test "$ol_enable_syslog" = yes ; then
23422         cat >> confdefs.h <<\EOF
23423 #define LDAP_SYSLOG 1
23424 EOF
23425
23426 fi
23427 if test "$ol_link_kbind" != no ; then
23428         cat >> confdefs.h <<\EOF
23429 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23430 EOF
23431
23432 fi
23433 if test "$ol_enable_proctitle" != no ; then
23434         cat >> confdefs.h <<\EOF
23435 #define LDAP_PROCTITLE 1
23436 EOF
23437
23438 fi
23439 if test "$ol_enable_referrals" != no ; then
23440         cat >> confdefs.h <<\EOF
23441 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23442 EOF
23443
23444 fi
23445 if test "$ol_enable_local" != no; then
23446         cat >> confdefs.h <<\EOF
23447 #define LDAP_PF_LOCAL 1
23448 EOF
23449
23450 fi
23451 if test "$ol_link_ipv6" != no; then
23452         cat >> confdefs.h <<\EOF
23453 #define LDAP_PF_INET6 1
23454 EOF
23455
23456 fi
23457 if test "$ol_enable_cleartext" != no ; then
23458         cat >> confdefs.h <<\EOF
23459 #define SLAPD_CLEARTEXT 1
23460 EOF
23461
23462 fi
23463 if test "$ol_enable_crypt" != no ; then
23464         cat >> confdefs.h <<\EOF
23465 #define SLAPD_CRYPT 1
23466 EOF
23467
23468 fi
23469 if test "$ol_link_spasswd" != no ; then
23470         cat >> confdefs.h <<\EOF
23471 #define SLAPD_SPASSWD 1
23472 EOF
23473
23474 fi
23475 if test "$ol_enable_multimaster" != no ; then
23476         cat >> confdefs.h <<\EOF
23477 #define SLAPD_MULTIMASTER 1
23478 EOF
23479
23480 fi
23481 if test "$ol_enable_rlookups" != no ; then
23482         cat >> confdefs.h <<\EOF
23483 #define SLAPD_RLOOKUPS 1
23484 EOF
23485
23486 fi
23487 if test "$ol_enable_aci" != no ; then
23488         cat >> confdefs.h <<\EOF
23489 #define SLAPD_ACI_ENABLED 1
23490 EOF
23491
23492 fi
23493
23494 if test "$ol_link_modules" != no ; then
23495         cat >> confdefs.h <<\EOF
23496 #define SLAPD_MODULES 1
23497 EOF
23498
23499         BUILD_SLAPD=yes
23500         SLAPD_MODULES_LDFLAGS="-dlopen self"
23501 fi
23502
23503 cat >> confdefs.h <<\EOF
23504 #define SLAPD_MOD_STATIC 1
23505 EOF
23506
23507 cat >> confdefs.h <<\EOF
23508 #define SLAPD_MOD_DYNAMIC 2
23509 EOF
23510
23511
23512 if test "$ol_enable_bdb" != no ; then
23513         cat >> confdefs.h <<\EOF
23514 #define SLAPD_BDB 1
23515 EOF
23516
23517         BUILD_SLAPD=yes
23518         BUILD_BDB=yes
23519         if test "$ol_with_bdb_module" != static ; then
23520                 cat >> confdefs.h <<\EOF
23521 #define SLAPD_BDB_DYNAMIC 1
23522 EOF
23523
23524                 BUILD_BDB=mod
23525                 BUILD_BDB_DYNAMIC=shared
23526                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23527         else
23528                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23529         fi
23530 fi
23531
23532 if test "$ol_link_dnssrv" != no ; then
23533         cat >> confdefs.h <<\EOF
23534 #define SLAPD_DNSSRV 1
23535 EOF
23536
23537         BUILD_SLAPD=yes
23538         BUILD_DNSSRV=yes
23539         if test "$ol_with_dnssrv_module" != static ; then
23540                 cat >> confdefs.h <<\EOF
23541 #define SLAPD_DNSSRV_DYNAMIC 1
23542 EOF
23543
23544                 BUILD_DNSSRV=mod
23545                 BUILD_DNSSRV_DYNAMIC=shared
23546                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23547         else
23548                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23549         fi
23550 fi
23551
23552 if test "$ol_enable_hdb" != no ; then
23553         cat >> confdefs.h <<\EOF
23554 #define SLAPD_HDB 1
23555 EOF
23556
23557         BUILD_SLAPD=yes
23558         BUILD_HDB=yes
23559         if test "$ol_with_hdb_module" != static ; then
23560                 cat >> confdefs.h <<\EOF
23561 #define SLAPD_HDB_DYNAMIC 1
23562 EOF
23563
23564                 BUILD_HDB=mod
23565                 BUILD_HDB_DYNAMIC=shared
23566                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23567         else
23568                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23569         fi
23570 fi
23571
23572 if test "$ol_enable_ldap" != no ; then
23573         cat >> confdefs.h <<\EOF
23574 #define SLAPD_LDAP 1
23575 EOF
23576
23577         BUILD_SLAPD=yes
23578         BUILD_LDAP=yes
23579         if test "$ol_with_ldap_module" != static ; then
23580                 cat >> confdefs.h <<\EOF
23581 #define SLAPD_LDAP_DYNAMIC 1
23582 EOF
23583
23584                 BUILD_LDAP=mod
23585                 BUILD_LDAP_DYNAMIC=shared
23586                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23587         else
23588                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23589         fi
23590 fi
23591
23592 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23593         cat >> confdefs.h <<\EOF
23594 #define SLAPD_LDBM 1
23595 EOF
23596
23597         BUILD_SLAPD=yes
23598         BUILD_LDBM=yes
23599         if test "$ol_with_ldbm_module" != static ; then
23600                 cat >> confdefs.h <<\EOF
23601 #define SLAPD_LDBM_DYNAMIC 1
23602 EOF
23603
23604                 BUILD_LDBM=mod
23605                 BUILD_LDBM_DYNAMIC=shared
23606                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23607         else
23608                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23609         fi
23610 fi
23611
23612 if test "$ol_enable_meta" != no ; then
23613         if test "$ol_enable_ldap" = no ; then
23614                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23615         fi
23616         if test "$ol_enable_rewrite" = no ; then
23617                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23618         fi
23619         cat >> confdefs.h <<\EOF
23620 #define SLAPD_META 1
23621 EOF
23622
23623         BUILD_SLAPD=yes
23624         BUILD_META=yes
23625         BUILD_REWRITE=yes
23626         if test "$ol_with_meta_module" != static ; then
23627                 cat >> confdefs.h <<\EOF
23628 #define SLAPD_META_DYNAMIC 1
23629 EOF
23630
23631                 BUILD_META=mod
23632                 BUILD_META_DYNAMIC=shared
23633                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23634         else
23635                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23636         fi
23637 fi
23638
23639 if test "$ol_enable_monitor" != no ; then
23640         cat >> confdefs.h <<\EOF
23641 #define SLAPD_MONITOR 1
23642 EOF
23643
23644         BUILD_SLAPD=yes
23645         BUILD_MONITOR=yes
23646         if test "$ol_with_monitor_module" != static ; then
23647                 cat >> confdefs.h <<\EOF
23648 #define SLAPD_MONITOR_DYNAMIC 1
23649 EOF
23650
23651                 BUILD_MONITOR=mod
23652                 BUILD_MONITOR_DYNAMIC=shared
23653                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23654         else
23655                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23656         fi
23657 fi
23658
23659 if test "$ol_enable_null" != no ; then
23660         cat >> confdefs.h <<\EOF
23661 #define SLAPD_NULL 1
23662 EOF
23663
23664         BUILD_SLAPD=yes
23665         BUILD_NULL=yes
23666         if test "$ol_with_null_module" != static ; then
23667                 cat >> confdefs.h <<\EOF
23668 #define SLAPD_NULL_DYNAMIC 1
23669 EOF
23670
23671                 BUILD_NULL=mod
23672                 BUILD_NULL_DYNAMIC=shared
23673                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23674         else
23675                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23676         fi
23677 fi
23678
23679 if test "$ol_enable_passwd" != no ; then
23680         cat >> confdefs.h <<\EOF
23681 #define SLAPD_PASSWD 1
23682 EOF
23683
23684         BUILD_SLAPD=yes
23685         BUILD_PASSWD=yes
23686         if test "$ol_with_passwd_module" != static ; then
23687                 cat >> confdefs.h <<\EOF
23688 #define SLAPD_PASSWD_DYNAMIC 1
23689 EOF
23690
23691                 BUILD_PASSWD=mod
23692                 BUILD_PASSWD_DYNAMIC=shared
23693                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23694         else
23695                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23696         fi
23697 fi
23698
23699 if test "$ol_link_perl" != no ; then
23700         cat >> confdefs.h <<\EOF
23701 #define SLAPD_PERL 1
23702 EOF
23703
23704         BUILD_SLAPD=yes
23705         BUILD_PERL=yes
23706         if test "$ol_with_perl_module" != static ; then
23707                 cat >> confdefs.h <<\EOF
23708 #define SLAPD_PERL_DYNAMIC 1
23709 EOF
23710
23711                 BUILD_PERL=mod
23712                 BUILD_PERL_DYNAMIC=shared
23713                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23714         else
23715                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23716         fi
23717 fi
23718
23719 if test "$ol_enable_shell" != no ; then
23720         if test "$ol_link_thread" != no ; then
23721                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23722         fi
23723         cat >> confdefs.h <<\EOF
23724 #define SLAPD_SHELL 1
23725 EOF
23726
23727         BUILD_SLAPD=yes
23728         BUILD_SHELL=yes
23729         if test "$ol_with_shell_module" != static ; then
23730                 cat >> confdefs.h <<\EOF
23731 #define SLAPD_SHELL_DYNAMIC 1
23732 EOF
23733
23734                 BUILD_SHELL=mod
23735                 BUILD_SHELL_DYNAMIC=shared
23736                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23737         else
23738                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23739         fi
23740 fi
23741
23742 if test "$ol_link_sql" != no ; then
23743         cat >> confdefs.h <<\EOF
23744 #define SLAPD_SQL 1
23745 EOF
23746
23747         BUILD_SLAPD=yes
23748         BUILD_SQL=yes
23749         if test "$ol_with_sql_module" != static; then
23750                 cat >> confdefs.h <<\EOF
23751 #define SLAPD_SQL_DYNAMIC 1
23752 EOF
23753
23754                 BUILD_SQL=mod
23755                 BUILD_SQL_DYNAMIC=shared
23756                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23757         else
23758                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23759         fi
23760 fi
23761
23762 if test "$ol_with_dyngroup" != no ; then
23763         BUILD_DYNGROUP=$ol_with_dyngroup
23764         if test "$ol_with_dyngroup" = mod ; then
23765                 MFLAG=SLAPD_MOD_DYNAMIC
23766                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23767         else
23768                 MFLAG=SLAPD_MOD_STATIC
23769         fi
23770         cat >> confdefs.h <<EOF
23771 #define SLAPD_OVER_DYNGROUP $MFLAG
23772 EOF
23773
23774 fi
23775
23776 if test "$ol_with_proxycache" != no ; then
23777         BUILD_PROXYCACHE=$ol_with_proxycache
23778         if test "$ol_with_proxycache" = mod ; then
23779                 MFLAG=SLAPD_MOD_DYNAMIC
23780                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23781         else
23782                 MFLAG=SLAPD_MOD_STATIC
23783         fi
23784         cat >> confdefs.h <<EOF
23785 #define SLAPD_OVER_PROXYCACHE $MFLAG
23786 EOF
23787
23788 fi
23789
23790 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23791         $BUILD_SLAPD = yes ; then
23792         BUILD_SLURPD=yes
23793 fi
23794
23795 if test "$ol_enable_rewrite" != no ; then
23796         cat >> confdefs.h <<\EOF
23797 #define ENABLE_REWRITE 1
23798 EOF
23799
23800         BUILD_REWRITE=yes
23801 fi
23802
23803 if test "$ol_enable_slapi" != no ; then
23804         cat >> confdefs.h <<\EOF
23805 #define ENABLE_SLAPI 1
23806 EOF
23807
23808         BUILD_SLAPI=yes
23809         SLAPD_SLAPI_DEPEND=libslapi.a
23810 fi
23811
23812
23813
23814 if test "$ac_cv_mingw32" = yes ; then
23815         PLAT=NT
23816         SLAPD_MODULES_LDFLAGS=
23817 else
23818         PLAT=UNIX
23819 fi
23820
23821 if test -z "$SLAPD_STATIC_BACKENDS"; then
23822         SLAPD_NO_STATIC='#'
23823 else
23824         SLAPD_NO_STATIC=
23825 fi
23826
23827
23828
23829
23830
23831
23832
23833   
23834   
23835   
23836   
23837   
23838   
23839   
23840   
23841   
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 # Check whether --with-xxinstall or --without-xxinstall was given.
23900 if test "${with_xxinstall+set}" = set; then
23901   withval="$with_xxinstall"
23902   :
23903 fi
23904
23905
23906
23907 trap '' 1 2 15
23908
23909 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23910
23911 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23912 # Let make expand exec_prefix.
23913 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23914
23915 # Any assignment to VPATH causes Sun make to only execute
23916 # the first set of double-colon rules, so remove it if not needed.
23917 # If there is a colon in the path, we need to keep it.
23918 if test "x$srcdir" = x.; then
23919   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23920 fi
23921
23922 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23923
23924 DEFS=-DHAVE_CONFIG_H
23925
23926 # Without the "./", some shells look in PATH for config.status.
23927 : ${CONFIG_STATUS=./config.status}
23928
23929 echo creating $CONFIG_STATUS
23930 rm -f $CONFIG_STATUS
23931 cat > $CONFIG_STATUS <<EOF
23932 #! /bin/sh
23933 # Generated automatically by configure.
23934 # Run this file to recreate the current configuration.
23935 # This directory was configured as follows,
23936 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23937 #
23938 # $0 $ac_configure_args
23939 #
23940 # Compiler output produced by configure, useful for debugging
23941 # configure, is in ./config.log if it exists.
23942
23943 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23944 for ac_option
23945 do
23946   case "\$ac_option" in
23947   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23948     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23949     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23950   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23951     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23952     exit 0 ;;
23953   -help | --help | --hel | --he | --h)
23954     echo "\$ac_cs_usage"; exit 0 ;;
23955   *) echo "\$ac_cs_usage"; exit 1 ;;
23956   esac
23957 done
23958
23959 ac_given_srcdir=$srcdir
23960 ac_given_INSTALL="$INSTALL"
23961
23962 trap 'rm -fr `echo "\
23963 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23964 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23965 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23966 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23967 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23968 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23969 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23970 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23971 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23972 include/Makefile:build/top.mk:include/Makefile.in \
23973 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23974 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23975 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23976 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23977 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23978 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23979 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23980 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23981 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23982 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23983 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23984 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23985 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23986 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23987 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23988 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23989 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23990 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23991 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23992 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23993 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23994 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23995 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23996 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
23997 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23998 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23999 tests/run \
24000 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24001  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24002 EOF
24003 cat >> $CONFIG_STATUS <<EOF
24004
24005 # Protect against being on the right side of a sed subst in config.status.
24006 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24007  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24008 $ac_vpsub
24009 $extrasub
24010 s%@SHELL@%$SHELL%g
24011 s%@CFLAGS@%$CFLAGS%g
24012 s%@CPPFLAGS@%$CPPFLAGS%g
24013 s%@CXXFLAGS@%$CXXFLAGS%g
24014 s%@FFLAGS@%$FFLAGS%g
24015 s%@DEFS@%$DEFS%g
24016 s%@LDFLAGS@%$LDFLAGS%g
24017 s%@LIBS@%$LIBS%g
24018 s%@exec_prefix@%$exec_prefix%g
24019 s%@prefix@%$prefix%g
24020 s%@program_transform_name@%$program_transform_name%g
24021 s%@bindir@%$bindir%g
24022 s%@sbindir@%$sbindir%g
24023 s%@libexecdir@%$libexecdir%g
24024 s%@datadir@%$datadir%g
24025 s%@sysconfdir@%$sysconfdir%g
24026 s%@sharedstatedir@%$sharedstatedir%g
24027 s%@localstatedir@%$localstatedir%g
24028 s%@libdir@%$libdir%g
24029 s%@includedir@%$includedir%g
24030 s%@oldincludedir@%$oldincludedir%g
24031 s%@infodir@%$infodir%g
24032 s%@mandir@%$mandir%g
24033 s%@host@%$host%g
24034 s%@host_alias@%$host_alias%g
24035 s%@host_cpu@%$host_cpu%g
24036 s%@host_vendor@%$host_vendor%g
24037 s%@host_os@%$host_os%g
24038 s%@target@%$target%g
24039 s%@target_alias@%$target_alias%g
24040 s%@target_cpu@%$target_cpu%g
24041 s%@target_vendor@%$target_vendor%g
24042 s%@target_os@%$target_os%g
24043 s%@build@%$build%g
24044 s%@build_alias@%$build_alias%g
24045 s%@build_cpu@%$build_cpu%g
24046 s%@build_vendor@%$build_vendor%g
24047 s%@build_os@%$build_os%g
24048 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24049 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24050 s%@INSTALL_DATA@%$INSTALL_DATA%g
24051 s%@PACKAGE@%$PACKAGE%g
24052 s%@VERSION@%$VERSION%g
24053 s%@ACLOCAL@%$ACLOCAL%g
24054 s%@AUTOCONF@%$AUTOCONF%g
24055 s%@AUTOMAKE@%$AUTOMAKE%g
24056 s%@AUTOHEADER@%$AUTOHEADER%g
24057 s%@MAKEINFO@%$MAKEINFO%g
24058 s%@install_sh@%$install_sh%g
24059 s%@AMTAR@%$AMTAR%g
24060 s%@AWK@%$AWK%g
24061 s%@AMTARFLAGS@%$AMTARFLAGS%g
24062 s%@SET_MAKE@%$SET_MAKE%g
24063 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24064 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24065 s%@top_builddir@%$top_builddir%g
24066 s%@ldap_subdir@%$ldap_subdir%g
24067 s%@CC@%$CC%g
24068 s%@AR@%$AR%g
24069 s%@LN_S@%$LN_S%g
24070 s%@OBJEXT@%$OBJEXT%g
24071 s%@EXEEXT@%$EXEEXT%g
24072 s%@ECHO@%$ECHO%g
24073 s%@RANLIB@%$RANLIB%g
24074 s%@STRIP@%$STRIP%g
24075 s%@DLLTOOL@%$DLLTOOL%g
24076 s%@AS@%$AS%g
24077 s%@OBJDUMP@%$OBJDUMP%g
24078 s%@CPP@%$CPP%g
24079 s%@LIBTOOL@%$LIBTOOL%g
24080 s%@LN_H@%$LN_H%g
24081 s%@PERLBIN@%$PERLBIN%g
24082 s%@OL_MKDEP@%$OL_MKDEP%g
24083 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24084 s%@LTSTATIC@%$LTSTATIC%g
24085 s%@LIBOBJS@%$LIBOBJS%g
24086 s%@LIBSRCS@%$LIBSRCS%g
24087 s%@PLAT@%$PLAT%g
24088 s%@WITH_TLS@%$WITH_TLS%g
24089 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24090 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24091 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24092 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24093 s%@BUILD_BDB@%$BUILD_BDB%g
24094 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24095 s%@BUILD_HDB@%$BUILD_HDB%g
24096 s%@BUILD_LDAP@%$BUILD_LDAP%g
24097 s%@BUILD_LDBM@%$BUILD_LDBM%g
24098 s%@BUILD_META@%$BUILD_META%g
24099 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24100 s%@BUILD_NULL@%$BUILD_NULL%g
24101 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24102 s%@BUILD_PERL@%$BUILD_PERL%g
24103 s%@BUILD_SHELL@%$BUILD_SHELL%g
24104 s%@BUILD_SQL@%$BUILD_SQL%g
24105 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24106 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24107 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24108 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24109 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24110 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24111 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24112 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24113 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24114 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24115 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24116 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24117 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24118 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24119 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24120 s%@LDAP_LIBS@%$LDAP_LIBS%g
24121 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24122 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24123 s%@LDBM_LIBS@%$LDBM_LIBS%g
24124 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24125 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24126 s%@WRAP_LIBS@%$WRAP_LIBS%g
24127 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24128 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24129 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24130 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24131 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24132 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24133 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24134 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24135 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24136 s%@KRB4_LIBS@%$KRB4_LIBS%g
24137 s%@KRB5_LIBS@%$KRB5_LIBS%g
24138 s%@SASL_LIBS@%$SASL_LIBS%g
24139 s%@TLS_LIBS@%$TLS_LIBS%g
24140 s%@MODULES_LIBS@%$MODULES_LIBS%g
24141 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24142 s%@LIBSLAPI@%$LIBSLAPI%g
24143 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24144 s%@AUTH_LIBS@%$AUTH_LIBS%g
24145 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24146 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24147 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24148 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24149
24150 CEOF
24151 EOF
24152
24153 cat >> $CONFIG_STATUS <<\EOF
24154
24155 # Split the substitutions into bite-sized pieces for seds with
24156 # small command number limits, like on Digital OSF/1 and HP-UX.
24157 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24158 ac_file=1 # Number of current file.
24159 ac_beg=1 # First line for current file.
24160 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24161 ac_more_lines=:
24162 ac_sed_cmds=""
24163 while $ac_more_lines; do
24164   if test $ac_beg -gt 1; then
24165     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24166   else
24167     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24168   fi
24169   if test ! -s conftest.s$ac_file; then
24170     ac_more_lines=false
24171     rm -f conftest.s$ac_file
24172   else
24173     if test -z "$ac_sed_cmds"; then
24174       ac_sed_cmds="sed -f conftest.s$ac_file"
24175     else
24176       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24177     fi
24178     ac_file=`expr $ac_file + 1`
24179     ac_beg=$ac_end
24180     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24181   fi
24182 done
24183 if test -z "$ac_sed_cmds"; then
24184   ac_sed_cmds=cat
24185 fi
24186 EOF
24187
24188 cat >> $CONFIG_STATUS <<EOF
24189
24190 CONFIG_FILES=\${CONFIG_FILES-"\
24191 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24192 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24193 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24194 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24195 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24196 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24197 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24198 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24199 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24200 include/Makefile:build/top.mk:include/Makefile.in \
24201 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24202 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24203 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24204 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24205 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24206 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24207 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24208 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24209 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24210 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24211 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24212 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24213 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24214 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24215 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24216 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24217 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24218 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24219 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24220 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24221 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24222 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24223 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24224 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24225 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24226 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24227 tests/run \
24228 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24229 "}
24230 EOF
24231 cat >> $CONFIG_STATUS <<\EOF
24232 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24233   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24234   case "$ac_file" in
24235   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24236        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24237   *) ac_file_in="${ac_file}.in" ;;
24238   esac
24239
24240   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24241
24242   # Remove last slash and all that follows it.  Not all systems have dirname.
24243   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24244   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24245     # The file is in a subdirectory.
24246     test ! -d "$ac_dir" && mkdir "$ac_dir"
24247     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24248     # A "../" for each directory in $ac_dir_suffix.
24249     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24250   else
24251     ac_dir_suffix= ac_dots=
24252   fi
24253
24254   case "$ac_given_srcdir" in
24255   .)  srcdir=.
24256       if test -z "$ac_dots"; then top_srcdir=.
24257       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24258   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24259   *) # Relative path.
24260     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24261     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24262   esac
24263
24264   case "$ac_given_INSTALL" in
24265   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24266   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24267   esac
24268
24269   echo creating "$ac_file"
24270   rm -f "$ac_file"
24271   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24272   case "$ac_file" in
24273   *[Mm]akefile*) ac_comsub="1i\\
24274 # $configure_input" ;;
24275   *) ac_comsub= ;;
24276   esac
24277
24278   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24279   sed -e "$ac_comsub
24280 s%@configure_input@%$configure_input%g
24281 s%@srcdir@%$srcdir%g
24282 s%@top_srcdir@%$top_srcdir%g
24283 s%@INSTALL@%$INSTALL%g
24284 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24285 fi; done
24286 rm -f conftest.s*
24287
24288 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24289 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24290 #
24291 # ac_d sets the value in "#define NAME VALUE" lines.
24292 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24293 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24294 ac_dC='\3'
24295 ac_dD='%g'
24296 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24297 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24298 ac_uB='\([      ]\)%\1#\2define\3'
24299 ac_uC=' '
24300 ac_uD='\4%g'
24301 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24302 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24303 ac_eB='$%\1#\2define\3'
24304 ac_eC=' '
24305 ac_eD='%g'
24306
24307 if test "${CONFIG_HEADERS+set}" != set; then
24308 EOF
24309 cat >> $CONFIG_STATUS <<EOF
24310   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24311 EOF
24312 cat >> $CONFIG_STATUS <<\EOF
24313 fi
24314 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24315   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24316   case "$ac_file" in
24317   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24318        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24319   *) ac_file_in="${ac_file}.in" ;;
24320   esac
24321
24322   echo creating $ac_file
24323
24324   rm -f conftest.frag conftest.in conftest.out
24325   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24326   cat $ac_file_inputs > conftest.in
24327
24328 EOF
24329
24330 # Transform confdefs.h into a sed script conftest.vals that substitutes
24331 # the proper values into config.h.in to produce config.h.  And first:
24332 # Protect against being on the right side of a sed subst in config.status.
24333 # Protect against being in an unquoted here document in config.status.
24334 rm -f conftest.vals
24335 cat > conftest.hdr <<\EOF
24336 s/[\\&%]/\\&/g
24337 s%[\\$`]%\\&%g
24338 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24339 s%ac_d%ac_u%gp
24340 s%ac_u%ac_e%gp
24341 EOF
24342 sed -n -f conftest.hdr confdefs.h > conftest.vals
24343 rm -f conftest.hdr
24344
24345 # This sed command replaces #undef with comments.  This is necessary, for
24346 # example, in the case of _POSIX_SOURCE, which is predefined and required
24347 # on some systems where configure will not decide to define it.
24348 cat >> conftest.vals <<\EOF
24349 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24350 EOF
24351
24352 # Break up conftest.vals because some shells have a limit on
24353 # the size of here documents, and old seds have small limits too.
24354
24355 rm -f conftest.tail
24356 while :
24357 do
24358   ac_lines=`grep -c . conftest.vals`
24359   # grep -c gives empty output for an empty file on some AIX systems.
24360   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24361   # Write a limited-size here document to conftest.frag.
24362   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24363   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24364   echo 'CEOF
24365   sed -f conftest.frag conftest.in > conftest.out
24366   rm -f conftest.in
24367   mv conftest.out conftest.in
24368 ' >> $CONFIG_STATUS
24369   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24370   rm -f conftest.vals
24371   mv conftest.tail conftest.vals
24372 done
24373 rm -f conftest.vals
24374
24375 cat >> $CONFIG_STATUS <<\EOF
24376   rm -f conftest.frag conftest.h
24377   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24378   cat conftest.in >> conftest.h
24379   rm -f conftest.in
24380   if cmp -s $ac_file conftest.h 2>/dev/null; then
24381     echo "$ac_file is unchanged"
24382     rm -f conftest.h
24383   else
24384     # Remove last slash and all that follows it.  Not all systems have dirname.
24385       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24386       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24387       # The file is in a subdirectory.
24388       test ! -d "$ac_dir" && mkdir "$ac_dir"
24389     fi
24390     rm -f $ac_file
24391     mv conftest.h $ac_file
24392   fi
24393 fi; done
24394
24395 EOF
24396 cat >> $CONFIG_STATUS <<EOF
24397
24398 EOF
24399 cat >> $CONFIG_STATUS <<\EOF
24400
24401 chmod +x tests/run
24402 date > stamp-h
24403 echo Please run \"make depend\" to build dependencies
24404
24405 exit 0
24406 EOF
24407 chmod +x $CONFIG_STATUS
24408 rm -fr confdefs* $ac_clean_files
24409 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24410