]> git.sur5r.net Git - openldap/blob - configure
slaptool destdir fix from head
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.478.2.15 2004/03/24 21:51:22 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   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58
59 SLAPD (Standalone LDAP Daemon) Options:"
60 ac_help="$ac_help
61   --enable-slapd          enable building slapd [yes]"
62 ac_help="$ac_help
63     --enable-aci          enable per-object ACIs (experimental) [no]"
64 ac_help="$ac_help
65     --enable-cleartext    enable cleartext passwords [yes]"
66 ac_help="$ac_help
67     --enable-crypt        enable crypt(3) passwords [no]"
68 ac_help="$ac_help
69     --enable-lmpasswd     enable LAN Manager passwords [no]"
70 ac_help="$ac_help
71     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
72 ac_help="$ac_help
73     --enable-modules      enable dynamic module support [no]"
74 ac_help="$ac_help
75     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
76 ac_help="$ac_help
77     --enable-rlookups     enable reverse lookups of client hostnames [no]"
78 ac_help="$ac_help
79     --enable-slapi        enable SLAPI support (experimental) [no]"
80 ac_help="$ac_help
81     --enable-slp          enable SLPv2 support [no]"
82 ac_help="$ac_help
83     --enable-wrappers     enable tcp wrapper support [no]"
84 ac_help="$ac_help
85     --enable-bdb          enable Berkeley DB backend [yes]"
86 ac_help="$ac_help
87     --with-bdb-module     module type static|dynamic [static]"
88 ac_help="$ac_help
89     --enable-dnssrv       enable dnssrv backend [no]"
90 ac_help="$ac_help
91     --with-dnssrv-module  module type static|dynamic [static]"
92 ac_help="$ac_help
93     --enable-hdb          enable Hierarchical DB backend [no]"
94 ac_help="$ac_help
95     --with-hdb-module     module type static|dynamic [static]"
96 ac_help="$ac_help
97     --enable-ldap         enable ldap backend [no]"
98 ac_help="$ac_help
99     --with-ldap-module    module type static|dynamic [static]"
100 ac_help="$ac_help
101     --enable-ldbm         enable ldbm backend [no]"
102 ac_help="$ac_help
103     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
104 ac_help="$ac_help
105     --with-ldbm-module    module type static|dynamic [static]"
106 ac_help="$ac_help
107     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
108 ac_help="$ac_help
109     --enable-meta         enable metadirectory backend [no]"
110 ac_help="$ac_help
111     --with-meta-module    module type static|dynamic [static]"
112 ac_help="$ac_help
113     --enable-monitor      enable monitor backend [yes]"
114 ac_help="$ac_help
115     --with-monitor-module module type static|dynamic [static]"
116 ac_help="$ac_help
117     --enable-null         enable null backend [no]"
118 ac_help="$ac_help
119     --with-null-module    module type static|dynamic [static]"
120 ac_help="$ac_help
121     --enable-passwd       enable passwd backend [no]"
122 ac_help="$ac_help
123     --with-passwd-module  module type static|dynamic [static]"
124 ac_help="$ac_help
125     --enable-perl         enable perl backend [no]"
126 ac_help="$ac_help
127     --with-perl-module    module type static|dynamic [static]"
128 ac_help="$ac_help
129     --enable-shell        enable shell backend [no]"
130 ac_help="$ac_help
131     --with-shell-module   module type static|dynamic [static]"
132 ac_help="$ac_help
133     --enable-sql          enable sql backend [no]"
134 ac_help="$ac_help
135     --with-sql-module     module type static|dynamic [static]"
136 ac_help="$ac_help
137
138 SLAPD Overlay Options:"
139 ac_help="$ac_help
140     --with-dyngroup       Dynamic Group overlay no|yes|mod [no]"
141 ac_help="$ac_help
142     --with-proxycache     Proxy Cache overlay no|yes|mod [no]"
143 ac_help="$ac_help
144
145 SLURPD (Replication Daemon) Options:"
146 ac_help="$ac_help
147   --enable-slurpd         enable building slurpd [auto]"
148 ac_help="$ac_help
149
150 Library Generation & Linking Options"
151 ac_help="$ac_help
152   --enable-static[=PKGS]  build static libraries [default=yes]"
153 ac_help="$ac_help
154   --enable-shared[=PKGS]  build shared libraries [default=yes]"
155 ac_help="$ac_help
156   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
157 ac_help="$ac_help
158   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
159
160 # Find the correct PATH separator.  Usually this is `:', but
161 # DJGPP uses `;' like DOS.
162 if test "X${PATH_SEPARATOR+set}" != Xset; then
163   UNAME=${UNAME-`uname 2>/dev/null`}
164   case X$UNAME in
165     *-DOS) lt_cv_sys_path_separator=';' ;;
166     *)     lt_cv_sys_path_separator=':' ;;
167   esac
168   PATH_SEPARATOR=$lt_cv_sys_path_separator
169 fi
170
171
172 # Check that we are running under the correct shell.
173 SHELL=${CONFIG_SHELL-/bin/sh}
174
175 case X$ECHO in
176 X*--fallback-echo)
177   # Remove one level of quotation (which was required for Make).
178   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
179   ;;
180 esac
181
182 echo=${ECHO-echo}
183 if test "X$1" = X--no-reexec; then
184   # Discard the --no-reexec flag, and continue.
185   shift
186 elif test "X$1" = X--fallback-echo; then
187   # Avoid inline document here, it may be left over
188   :
189 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
190   # Yippee, $echo works!
191   :
192 else
193   # Restart under the correct shell.
194   exec $SHELL "$0" --no-reexec ${1+"$@"}
195 fi
196
197 if test "X$1" = X--fallback-echo; then
198   # used as fallback echo
199   shift
200   cat <<EOF
201
202 EOF
203   exit 0
204 fi
205
206 # The HP-UX ksh and POSIX shell print the target directory to stdout
207 # if CDPATH is set.
208 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
209
210 if test -z "$ECHO"; then
211 if test "X${echo_test_string+set}" != Xset; then
212 # find a string as large as possible, as long as the shell can cope with it
213   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
214     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
215     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
216        echo_test_string="`eval $cmd`" &&
217        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
218     then
219       break
220     fi
221   done
222 fi
223
224 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
225    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
226    test "X$echo_testing_string" = "X$echo_test_string"; then
227   :
228 else
229   # The Solaris, AIX, and Digital Unix default echo programs unquote
230   # backslashes.  This makes it impossible to quote backslashes using
231   #   echo "$something" | sed 's/\\/\\\\/g'
232   #
233   # So, first we look for a working echo in the user's PATH.
234
235   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
236   for dir in $PATH /usr/ucb; do
237     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
238        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
239        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
240        test "X$echo_testing_string" = "X$echo_test_string"; then
241       echo="$dir/echo"
242       break
243     fi
244   done
245   IFS="$save_ifs"
246
247   if test "X$echo" = Xecho; then
248     # We didn't find a better echo, so look for alternatives.
249     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
250        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
251        test "X$echo_testing_string" = "X$echo_test_string"; then
252       # This shell has a builtin print -r that does the trick.
253       echo='print -r'
254     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
255          test "X$CONFIG_SHELL" != X/bin/ksh; then
256       # If we have ksh, try running configure again with it.
257       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
258       export ORIGINAL_CONFIG_SHELL
259       CONFIG_SHELL=/bin/ksh
260       export CONFIG_SHELL
261       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
262     else
263       # Try using printf.
264       echo='printf %s\n'
265       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
266          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
267          test "X$echo_testing_string" = "X$echo_test_string"; then
268         # Cool, printf works
269         :
270       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
271            test "X$echo_testing_string" = 'X\t' &&
272            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
273            test "X$echo_testing_string" = "X$echo_test_string"; then
274         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
275         export CONFIG_SHELL
276         SHELL="$CONFIG_SHELL"
277         export SHELL
278         echo="$CONFIG_SHELL $0 --fallback-echo"
279       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
280            test "X$echo_testing_string" = 'X\t' &&
281            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
282            test "X$echo_testing_string" = "X$echo_test_string"; then
283         echo="$CONFIG_SHELL $0 --fallback-echo"
284       else
285         # maybe with a smaller string...
286         prev=:
287
288         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
289           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
290           then
291             break
292           fi
293           prev="$cmd"
294         done
295
296         if test "$prev" != 'sed 50q "$0"'; then
297           echo_test_string=`eval $prev`
298           export echo_test_string
299           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
300         else
301           # Oops.  We lost completely, so just stick with echo.
302           echo=echo
303         fi
304       fi
305     fi
306   fi
307 fi
308 fi
309
310 # Copy echo and quote the copy suitably for passing to libtool from
311 # the Makefile, instead of quoting the original, which is used later.
312 ECHO=$echo
313 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
314    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
315 fi
316
317
318 ac_help="$ac_help
319   --disable-libtool-lock  avoid locking (might break parallel builds)"
320 ac_help="$ac_help
321   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
322 ac_help="$ac_help
323
324 See INSTALL file for further details."
325
326 # Initialize some variables set by options.
327 # The variables have the same names as the options, with
328 # dashes changed to underlines.
329 build=NONE
330 cache_file=./config.cache
331 exec_prefix=NONE
332 host=NONE
333 no_create=
334 nonopt=NONE
335 no_recursion=
336 prefix=NONE
337 program_prefix=NONE
338 program_suffix=NONE
339 program_transform_name=s,x,x,
340 silent=
341 site=
342 srcdir=
343 target=NONE
344 verbose=
345 x_includes=NONE
346 x_libraries=NONE
347 bindir='${exec_prefix}/bin'
348 sbindir='${exec_prefix}/sbin'
349 libexecdir='${exec_prefix}/libexec'
350 datadir='${prefix}/share'
351 sysconfdir='${prefix}/etc'
352 sharedstatedir='${prefix}/com'
353 localstatedir='${prefix}/var'
354 libdir='${exec_prefix}/lib'
355 includedir='${prefix}/include'
356 oldincludedir='/usr/include'
357 infodir='${prefix}/info'
358 mandir='${prefix}/man'
359
360 # Initialize some other variables.
361 subdirs=
362 MFLAGS= MAKEFLAGS=
363 SHELL=${CONFIG_SHELL-/bin/sh}
364 # Maximum number of lines to put in a shell here document.
365 ac_max_here_lines=12
366
367 ac_prev=
368 for ac_option
369 do
370
371   # If the previous option needs an argument, assign it.
372   if test -n "$ac_prev"; then
373     eval "$ac_prev=\$ac_option"
374     ac_prev=
375     continue
376   fi
377
378   case "$ac_option" in
379   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
380   *) ac_optarg= ;;
381   esac
382
383   # Accept the important Cygnus configure options, so we can diagnose typos.
384
385   case "$ac_option" in
386
387   -bindir | --bindir | --bindi | --bind | --bin | --bi)
388     ac_prev=bindir ;;
389   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
390     bindir="$ac_optarg" ;;
391
392   -build | --build | --buil | --bui | --bu)
393     ac_prev=build ;;
394   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
395     build="$ac_optarg" ;;
396
397   -cache-file | --cache-file | --cache-fil | --cache-fi \
398   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
399     ac_prev=cache_file ;;
400   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
401   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
402     cache_file="$ac_optarg" ;;
403
404   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
405     ac_prev=datadir ;;
406   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
407   | --da=*)
408     datadir="$ac_optarg" ;;
409
410   -disable-* | --disable-*)
411     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
412     # Reject names that are not valid shell variable names.
413     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
414       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
415     fi
416     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
417     eval "enable_${ac_feature}=no" ;;
418
419   -enable-* | --enable-*)
420     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
421     # Reject names that are not valid shell variable names.
422     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
423       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
424     fi
425     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
426     case "$ac_option" in
427       *=*) ;;
428       *) ac_optarg=yes ;;
429     esac
430     eval "enable_${ac_feature}='$ac_optarg'" ;;
431
432   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
433   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
434   | --exec | --exe | --ex)
435     ac_prev=exec_prefix ;;
436   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
437   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
438   | --exec=* | --exe=* | --ex=*)
439     exec_prefix="$ac_optarg" ;;
440
441   -gas | --gas | --ga | --g)
442     # Obsolete; use --with-gas.
443     with_gas=yes ;;
444
445   -help | --help | --hel | --he)
446     # Omit some internal or obsolete options to make the list less imposing.
447     # This message is too long to be a string in the A/UX 3.1 sh.
448     cat << EOF
449 Usage: configure [options] [host]
450 Options: [defaults in brackets after descriptions]
451 Configuration:
452   --cache-file=FILE       cache test results in FILE
453   --help                  print this message
454   --no-create             do not create output files
455   --quiet, --silent       do not print \`checking...' messages
456   --version               print the version of autoconf that created configure
457 Directory and file names:
458   --prefix=PREFIX         install architecture-independent files in PREFIX
459                           [$ac_default_prefix]
460   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
461                           [same as prefix]
462   --bindir=DIR            user executables in DIR [EPREFIX/bin]
463   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
464   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
465   --datadir=DIR           read-only architecture-independent data in DIR
466                           [PREFIX/share]
467   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
468   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
469                           [PREFIX/com]
470   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
471   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
472   --includedir=DIR        C header files in DIR [PREFIX/include]
473   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
474   --infodir=DIR           info documentation in DIR [PREFIX/info]
475   --mandir=DIR            man documentation in DIR [PREFIX/man]
476   --srcdir=DIR            find the sources in DIR [configure dir or ..]
477   --program-prefix=PREFIX prepend PREFIX to installed program names
478   --program-suffix=SUFFIX append SUFFIX to installed program names
479   --program-transform-name=PROGRAM
480                           run sed PROGRAM on installed program names
481 EOF
482     cat << EOF
483 Host type:
484   --build=BUILD           configure for building on BUILD [BUILD=HOST]
485   --host=HOST             configure for HOST [guessed]
486   --target=TARGET         configure for TARGET [TARGET=HOST]
487 Features and packages:
488   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
489   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
490   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
491   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
492   --x-includes=DIR        X include files are in DIR
493   --x-libraries=DIR       X library files are in DIR
494 EOF
495     if test -n "$ac_help"; then
496       echo "--enable and --with options recognized:$ac_help"
497     fi
498     exit 0 ;;
499
500   -host | --host | --hos | --ho)
501     ac_prev=host ;;
502   -host=* | --host=* | --hos=* | --ho=*)
503     host="$ac_optarg" ;;
504
505   -includedir | --includedir | --includedi | --included | --include \
506   | --includ | --inclu | --incl | --inc)
507     ac_prev=includedir ;;
508   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
509   | --includ=* | --inclu=* | --incl=* | --inc=*)
510     includedir="$ac_optarg" ;;
511
512   -infodir | --infodir | --infodi | --infod | --info | --inf)
513     ac_prev=infodir ;;
514   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
515     infodir="$ac_optarg" ;;
516
517   -libdir | --libdir | --libdi | --libd)
518     ac_prev=libdir ;;
519   -libdir=* | --libdir=* | --libdi=* | --libd=*)
520     libdir="$ac_optarg" ;;
521
522   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
523   | --libexe | --libex | --libe)
524     ac_prev=libexecdir ;;
525   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
526   | --libexe=* | --libex=* | --libe=*)
527     libexecdir="$ac_optarg" ;;
528
529   -localstatedir | --localstatedir | --localstatedi | --localstated \
530   | --localstate | --localstat | --localsta | --localst \
531   | --locals | --local | --loca | --loc | --lo)
532     ac_prev=localstatedir ;;
533   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
534   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
535   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
536     localstatedir="$ac_optarg" ;;
537
538   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
539     ac_prev=mandir ;;
540   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
541     mandir="$ac_optarg" ;;
542
543   -nfp | --nfp | --nf)
544     # Obsolete; use --without-fp.
545     with_fp=no ;;
546
547   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
548   | --no-cr | --no-c)
549     no_create=yes ;;
550
551   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
552   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
553     no_recursion=yes ;;
554
555   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
556   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
557   | --oldin | --oldi | --old | --ol | --o)
558     ac_prev=oldincludedir ;;
559   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
560   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
561   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
562     oldincludedir="$ac_optarg" ;;
563
564   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
565     ac_prev=prefix ;;
566   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
567     prefix="$ac_optarg" ;;
568
569   -program-prefix | --program-prefix | --program-prefi | --program-pref \
570   | --program-pre | --program-pr | --program-p)
571     ac_prev=program_prefix ;;
572   -program-prefix=* | --program-prefix=* | --program-prefi=* \
573   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
574     program_prefix="$ac_optarg" ;;
575
576   -program-suffix | --program-suffix | --program-suffi | --program-suff \
577   | --program-suf | --program-su | --program-s)
578     ac_prev=program_suffix ;;
579   -program-suffix=* | --program-suffix=* | --program-suffi=* \
580   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
581     program_suffix="$ac_optarg" ;;
582
583   -program-transform-name | --program-transform-name \
584   | --program-transform-nam | --program-transform-na \
585   | --program-transform-n | --program-transform- \
586   | --program-transform | --program-transfor \
587   | --program-transfo | --program-transf \
588   | --program-trans | --program-tran \
589   | --progr-tra | --program-tr | --program-t)
590     ac_prev=program_transform_name ;;
591   -program-transform-name=* | --program-transform-name=* \
592   | --program-transform-nam=* | --program-transform-na=* \
593   | --program-transform-n=* | --program-transform-=* \
594   | --program-transform=* | --program-transfor=* \
595   | --program-transfo=* | --program-transf=* \
596   | --program-trans=* | --program-tran=* \
597   | --progr-tra=* | --program-tr=* | --program-t=*)
598     program_transform_name="$ac_optarg" ;;
599
600   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
601   | -silent | --silent | --silen | --sile | --sil)
602     silent=yes ;;
603
604   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
605     ac_prev=sbindir ;;
606   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
607   | --sbi=* | --sb=*)
608     sbindir="$ac_optarg" ;;
609
610   -sharedstatedir | --sharedstatedir | --sharedstatedi \
611   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
612   | --sharedst | --shareds | --shared | --share | --shar \
613   | --sha | --sh)
614     ac_prev=sharedstatedir ;;
615   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
616   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
617   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
618   | --sha=* | --sh=*)
619     sharedstatedir="$ac_optarg" ;;
620
621   -site | --site | --sit)
622     ac_prev=site ;;
623   -site=* | --site=* | --sit=*)
624     site="$ac_optarg" ;;
625
626   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
627     ac_prev=srcdir ;;
628   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
629     srcdir="$ac_optarg" ;;
630
631   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
632   | --syscon | --sysco | --sysc | --sys | --sy)
633     ac_prev=sysconfdir ;;
634   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
635   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
636     sysconfdir="$ac_optarg" ;;
637
638   -target | --target | --targe | --targ | --tar | --ta | --t)
639     ac_prev=target ;;
640   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
641     target="$ac_optarg" ;;
642
643   -v | -verbose | --verbose | --verbos | --verbo | --verb)
644     verbose=yes ;;
645
646   -version | --version | --versio | --versi | --vers)
647     echo "configure generated by autoconf version 2.13.1"
648     exit 0 ;;
649
650   -with-* | --with-*)
651     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
652     # Reject names that are not valid shell variable names.
653     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
654       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
655     fi
656     ac_package=`echo $ac_package| sed 's/-/_/g'`
657     case "$ac_option" in
658       *=*) ;;
659       *) ac_optarg=yes ;;
660     esac
661     eval "with_${ac_package}='$ac_optarg'" ;;
662
663   -without-* | --without-*)
664     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
665     # Reject names that are not valid shell variable names.
666     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
667       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
668     fi
669     ac_package=`echo $ac_package| sed 's/-/_/g'`
670     eval "with_${ac_package}=no" ;;
671
672   --x)
673     # Obsolete; use --with-x.
674     with_x=yes ;;
675
676   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
677   | --x-incl | --x-inc | --x-in | --x-i)
678     ac_prev=x_includes ;;
679   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
680   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
681     x_includes="$ac_optarg" ;;
682
683   -x-libraries | --x-libraries | --x-librarie | --x-librari \
684   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
685     ac_prev=x_libraries ;;
686   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
687   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
688     x_libraries="$ac_optarg" ;;
689
690   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
691     ;;
692
693   *)
694     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
695       echo "configure: warning: $ac_option: invalid host type" 1>&2
696     fi
697     if test "x$nonopt" != xNONE; then
698       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
699     fi
700     nonopt="$ac_option"
701     ;;
702
703   esac
704 done
705
706 if test -n "$ac_prev"; then
707   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
708 fi
709
710 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
711
712 # File descriptor usage:
713 # 0 standard input
714 # 1 file creation
715 # 2 errors and warnings
716 # 3 some systems may open it to /dev/tty
717 # 4 used on the Kubota Titan
718 # 6 checking for... messages and results
719 # 5 compiler messages saved in config.log
720 if test "$silent" = yes; then
721   exec 6>/dev/null
722 else
723   exec 6>&1
724 fi
725 exec 5>./config.log
726
727 echo "\
728 This file contains any messages produced by compilers while
729 running configure, to aid debugging if configure makes a mistake.
730 " 1>&5
731
732 # Strip out --no-create and --no-recursion so they do not pile up.
733 # Also quote any args containing shell metacharacters.
734 ac_configure_args=
735 for ac_arg
736 do
737   case "$ac_arg" in
738   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
739   | --no-cr | --no-c) ;;
740   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
741   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
742   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
743   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
744   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
745   esac
746 done
747
748 # NLS nuisances.
749 # Only set these to C if already set.  These must not be set unconditionally
750 # because not all systems understand e.g. LANG=C (notably SCO).
751 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
752 # Non-C LC_CTYPE values break the ctype check.
753 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
754 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
755 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
756 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
757
758 # confdefs.h avoids OS command line length limits that DEFS can exceed.
759 rm -rf conftest* confdefs.h
760 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
761 echo > confdefs.h
762
763 # A filename unique to this package, relative to the directory that
764 # configure is in, which we can look for to find out if srcdir is correct.
765 ac_unique_file=build/version.sh
766
767 # Find the source files, if location was not specified.
768 if test -z "$srcdir"; then
769   ac_srcdir_defaulted=yes
770   # Try the directory containing this script, then its parent.
771   ac_prog=$0
772   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
773   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
774   srcdir=$ac_confdir
775   if test ! -r $srcdir/$ac_unique_file; then
776     srcdir=..
777   fi
778 else
779   ac_srcdir_defaulted=no
780 fi
781 if test ! -r $srcdir/$ac_unique_file; then
782   if test "$ac_srcdir_defaulted" = yes; then
783     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
784   else
785     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
786   fi
787 fi
788 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
789
790 # Prefer explicitly selected file to automatically selected ones.
791 if test -z "$CONFIG_SITE"; then
792   if test "x$prefix" != xNONE; then
793     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
794   else
795     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
796   fi
797 fi
798 for ac_site_file in $CONFIG_SITE; do
799   if test -r "$ac_site_file"; then
800     echo "loading site script $ac_site_file"
801     . "$ac_site_file"
802   fi
803 done
804
805
806 ac_ext=c
807 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
808 ac_cpp='$CPP $CPPFLAGS'
809 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
810 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
811 cross_compiling=$ac_cv_prog_cc_cross
812
813 ac_exeext=
814 ac_objext=o
815 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
816   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
817   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
818     ac_n= ac_c='
819 ' ac_t='        '
820   else
821     ac_n=-n ac_c= ac_t=
822   fi
823 else
824   ac_n= ac_c='\c' ac_t=
825 fi
826
827
828 # set unset (borrowed from autoconf 2.49c)
829 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
830   ol_unset=unset
831 else
832   ol_unset=false
833 fi
834 # unset CDPATH
835 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
836
837 ac_aux_dir=
838 for ac_dir in build $srcdir/build; do
839   if test -f $ac_dir/install-sh; then
840     ac_aux_dir=$ac_dir
841     ac_install_sh="$ac_aux_dir/install-sh -c"
842     break
843   elif test -f $ac_dir/install.sh; then
844     ac_aux_dir=$ac_dir
845     ac_install_sh="$ac_aux_dir/install.sh -c"
846     break
847   elif test -f $ac_dir/shtool; then
848     ac_aux_dir=$ac_dir
849     ac_install_sh="$ac_aux_dir/shtool install -c"
850     break
851   fi
852 done
853 if test -z "$ac_aux_dir"; then
854   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
855 fi
856 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
857 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
858 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
859
860 eval `$ac_aux_dir/version.sh`
861 if test -z "$OL_STRING"; then
862         { echo "configure: error: could not determine version" 1>&2; exit 1; }
863 fi
864
865 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
866         ac_cv_shtool="$ac_aux_dir/shtool"
867 else
868         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
869 fi
870
871 SHTOOL="$ac_cv_shtool"
872
873 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
874 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
875
876 OPENLDAP_CVS=""
877 if test -d $ac_aux_dir/CVS; then
878         OPENLDAP_CVS="(from CVS sources) "
879 fi
880
881 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
882
883
884 echo $ac_n "checking host system type""... $ac_c" 1>&6
885 echo "configure:886: checking host system type" >&5
886 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
887
888 # Make sure we can run config.sub.
889   if $ac_config_sub sun4 >/dev/null 2>&1; then :
890     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
891   fi
892
893   ac_cv_host_alias=$host
894   case "$ac_cv_host_alias" in
895   NONE)
896     case $nonopt in
897     NONE)
898       if ac_cv_host_alias=`$ac_config_guess`; then :
899       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
900       fi ;;
901     *) ac_cv_host_alias=$nonopt ;;
902     esac ;;
903   esac
904
905   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
906   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
907   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
908   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
909 else
910   echo $ac_n "(cached) $ac_c" 1>&6
911 fi
912
913 echo "$ac_t""$ac_cv_host" 1>&6
914
915 host=$ac_cv_host
916 host_alias=$ac_cv_host_alias
917 host_cpu=$ac_cv_host_cpu
918 host_vendor=$ac_cv_host_vendor
919 host_os=$ac_cv_host_os
920
921
922
923
924
925 echo $ac_n "checking target system type""... $ac_c" 1>&6
926 echo "configure:927: checking target system type" >&5
927 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
928
929 # Make sure we can run config.sub.
930   if $ac_config_sub sun4 >/dev/null 2>&1; then :
931     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
932   fi
933
934   ac_cv_target_alias=$target
935   case "$ac_cv_target_alias" in
936   NONE)
937     case $nonopt in
938     NONE)
939       ac_cv_target_alias=$host_alias ;;
940
941     *) ac_cv_target_alias=$nonopt ;;
942     esac ;;
943   esac
944
945   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
946   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
947   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
948   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
949 else
950   echo $ac_n "(cached) $ac_c" 1>&6
951 fi
952
953 echo "$ac_t""$ac_cv_target" 1>&6
954
955 target=$ac_cv_target
956 target_alias=$ac_cv_target_alias
957 target_cpu=$ac_cv_target_cpu
958 target_vendor=$ac_cv_target_vendor
959 target_os=$ac_cv_target_os
960
961
962
963
964
965 echo $ac_n "checking build system type""... $ac_c" 1>&6
966 echo "configure:967: checking build system type" >&5
967 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
968
969 # Make sure we can run config.sub.
970   if $ac_config_sub sun4 >/dev/null 2>&1; then :
971     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
972   fi
973
974   ac_cv_build_alias=$build
975   case "$ac_cv_build_alias" in
976   NONE)
977     case $nonopt in
978     NONE)
979       ac_cv_build_alias=$host_alias ;;
980
981     *) ac_cv_build_alias=$nonopt ;;
982     esac ;;
983   esac
984
985   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
986   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
987   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
988   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
989 else
990   echo $ac_n "(cached) $ac_c" 1>&6
991 fi
992
993 echo "$ac_t""$ac_cv_build" 1>&6
994
995 build=$ac_cv_build
996 build_alias=$ac_cv_build_alias
997 build_cpu=$ac_cv_build_cpu
998 build_vendor=$ac_cv_build_vendor
999 build_os=$ac_cv_build_os
1000
1001
1002
1003
1004
1005 # Do some error checking and defaulting for the host and target type.
1006 # The inputs are:
1007 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1008 #
1009 # The rules are:
1010 # 1. You are not allowed to specify --host, --target, and nonopt at the
1011 #    same time.
1012 # 2. Host defaults to nonopt.
1013 # 3. If nonopt is not specified, then host defaults to the current host,
1014 #    as determined by config.guess.
1015 # 4. Target and build default to nonopt.
1016 # 5. If nonopt is not specified, then target and build default to host.
1017
1018 # The aliases save the names the user supplied, while $host etc.
1019 # will get canonicalized.
1020 case $host---$target---$nonopt in
1021 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1022 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1023 esac
1024
1025 test "$host_alias" != "$target_alias" &&
1026   test "$program_prefix$program_suffix$program_transform_name" = \
1027     NONENONEs,x,x, &&
1028   program_prefix=${target_alias}-
1029
1030
1031 # Find a good install program.  We prefer a C program (faster),
1032 # so one script is as good as another.  But avoid the broken or
1033 # incompatible versions:
1034 # SysV /etc/install, /usr/sbin/install
1035 # SunOS /usr/etc/install
1036 # IRIX /sbin/install
1037 # AIX /bin/install
1038 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1039 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1040 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1041 # ./install, which can be erroneously created by make from ./install.sh.
1042 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1043 echo "configure:1044: checking for a BSD compatible install" >&5
1044 if test -z "$INSTALL"; then
1045 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1046   echo $ac_n "(cached) $ac_c" 1>&6
1047 else
1048     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1049   for ac_dir in $PATH; do
1050     # Account for people who put trailing slashes in PATH elements.
1051     case "$ac_dir/" in
1052     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1053     *)
1054       # OSF1 and SCO ODT 3.0 have their own names for install.
1055       # Don't use installbsd from OSF since it installs stuff as root
1056       # by default.
1057       for ac_prog in ginstall scoinst install; do
1058         if test -f $ac_dir/$ac_prog; then
1059           if test $ac_prog = install &&
1060             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1061             # AIX install.  It has an incompatible calling convention.
1062             :
1063           elif test $ac_prog = install &&
1064             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1065             # program-specific install script used by HP pwplus--don't use.
1066             :
1067           else
1068             ac_cv_path_install="$ac_dir/$ac_prog -c"
1069             break 2
1070           fi
1071         fi
1072       done
1073       ;;
1074     esac
1075   done
1076   IFS="$ac_save_IFS"
1077
1078 fi
1079   if test "${ac_cv_path_install+set}" = set; then
1080     INSTALL="$ac_cv_path_install"
1081   else
1082     # As a last resort, use the slow shell script.  We don't cache a
1083     # path for INSTALL within a source directory, because that will
1084     # break other packages using the cache if that directory is
1085     # removed, or if the path is relative.
1086     INSTALL="$ac_install_sh"
1087   fi
1088 fi
1089 echo "$ac_t""$INSTALL" 1>&6
1090
1091 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1092 # It thinks the first close brace ends the variable substitution.
1093 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1094
1095 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1096
1097 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1098
1099 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1100 echo "configure:1101: checking whether build environment is sane" >&5
1101 # Just in case
1102 sleep 1
1103 echo timestamp > conftestfile
1104 # Do `set' in a subshell so we don't clobber the current shell's
1105 # arguments.  Must try -L first in case configure is actually a
1106 # symlink; some systems play weird games with the mod time of symlinks
1107 # (eg FreeBSD returns the mod time of the symlink's containing
1108 # directory).
1109 if (
1110    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1111    if test "$*" = "X"; then
1112       # -L didn't work.
1113       set X `ls -t $srcdir/configure conftestfile`
1114    fi
1115    if test "$*" != "X $srcdir/configure conftestfile" \
1116       && test "$*" != "X conftestfile $srcdir/configure"; then
1117
1118       # If neither matched, then we have a broken ls.  This can happen
1119       # if, for instance, CONFIG_SHELL is bash and it inherits a
1120       # broken ls alias from the environment.  This has actually
1121       # happened.  Such a system could not be considered "sane".
1122       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1123 alias in your environment" 1>&2; exit 1; }
1124    fi
1125
1126    test "$2" = conftestfile
1127    )
1128 then
1129    # Ok.
1130    :
1131 else
1132    { echo "configure: error: newly created file is older than distributed files!
1133 Check your system clock" 1>&2; exit 1; }
1134 fi
1135 rm -f conftest*
1136 echo "$ac_t""yes" 1>&6
1137 if test "$program_transform_name" = s,x,x,; then
1138   program_transform_name=
1139 else
1140   # Double any \ or $.  echo might interpret backslashes.
1141   cat <<\EOF_SED > conftestsed
1142 s,\\,\\\\,g; s,\$,$$,g
1143 EOF_SED
1144   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1145   rm -f conftestsed
1146 fi
1147 test "$program_prefix" != NONE &&
1148   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1149 # Use a double $ so make ignores it.
1150 test "$program_suffix" != NONE &&
1151   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1152
1153 # sed with no file args requires a program.
1154 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1155
1156 for ac_prog in mawk gawk nawk awk
1157 do
1158 # Extract the first word of "$ac_prog", so it can be a program name with args.
1159 set dummy $ac_prog; ac_word=$2
1160 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1161 echo "configure:1162: checking for $ac_word" >&5
1162 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1163   echo $ac_n "(cached) $ac_c" 1>&6
1164 else
1165   if test -n "$AWK"; then
1166   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1167 else
1168   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1169   ac_dummy="$PATH"
1170   for ac_dir in $ac_dummy; do
1171     test -z "$ac_dir" && ac_dir=.
1172     if test -f $ac_dir/$ac_word; then
1173       ac_cv_prog_AWK="$ac_prog"
1174       break
1175     fi
1176   done
1177   IFS="$ac_save_ifs"
1178 fi
1179 fi
1180 AWK="$ac_cv_prog_AWK"
1181 if test -n "$AWK"; then
1182   echo "$ac_t""$AWK" 1>&6
1183 else
1184   echo "$ac_t""no" 1>&6
1185 fi
1186
1187 test -n "$AWK" && break
1188 done
1189
1190 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1191 echo "configure:1192: checking whether ${MAKE-make} sets \${MAKE}" >&5
1192 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1193 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1194   echo $ac_n "(cached) $ac_c" 1>&6
1195 else
1196   cat > conftestmake <<\EOF
1197 all:
1198         @echo 'ac_maketemp="${MAKE}"'
1199 EOF
1200 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1201 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1202 if test -n "$ac_maketemp"; then
1203   eval ac_cv_prog_make_${ac_make}_set=yes
1204 else
1205   eval ac_cv_prog_make_${ac_make}_set=no
1206 fi
1207 rm -f conftestmake
1208 fi
1209 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1210   echo "$ac_t""yes" 1>&6
1211   SET_MAKE=
1212 else
1213   echo "$ac_t""no" 1>&6
1214   SET_MAKE="MAKE=${MAKE-make}"
1215 fi
1216
1217
1218
1219 PACKAGE=$OL_PACKAGE
1220
1221 VERSION=$OL_VERSION
1222
1223 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1224   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1225 fi
1226
1227
1228
1229 missing_dir=`cd $ac_aux_dir && pwd`
1230 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1231 echo "configure:1232: checking for working aclocal" >&5
1232 # Run test in a subshell; some versions of sh will print an error if
1233 # an executable is not found, even if stderr is redirected.
1234 # Redirect stdin to placate older versions of autoconf.  Sigh.
1235 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1236    ACLOCAL=aclocal
1237    echo "$ac_t""found" 1>&6
1238 else
1239    ACLOCAL="$missing_dir/missing aclocal"
1240    echo "$ac_t""missing" 1>&6
1241 fi
1242
1243 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1244 echo "configure:1245: checking for working autoconf" >&5
1245 # Run test in a subshell; some versions of sh will print an error if
1246 # an executable is not found, even if stderr is redirected.
1247 # Redirect stdin to placate older versions of autoconf.  Sigh.
1248 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1249    AUTOCONF=autoconf
1250    echo "$ac_t""found" 1>&6
1251 else
1252    AUTOCONF="$missing_dir/missing autoconf"
1253    echo "$ac_t""missing" 1>&6
1254 fi
1255
1256 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1257 echo "configure:1258: checking for working automake" >&5
1258 # Run test in a subshell; some versions of sh will print an error if
1259 # an executable is not found, even if stderr is redirected.
1260 # Redirect stdin to placate older versions of autoconf.  Sigh.
1261 if (automake --version) < /dev/null > /dev/null 2>&1; then
1262    AUTOMAKE=automake
1263    echo "$ac_t""found" 1>&6
1264 else
1265    AUTOMAKE="$missing_dir/missing automake"
1266    echo "$ac_t""missing" 1>&6
1267 fi
1268
1269 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1270 echo "configure:1271: checking for working autoheader" >&5
1271 # Run test in a subshell; some versions of sh will print an error if
1272 # an executable is not found, even if stderr is redirected.
1273 # Redirect stdin to placate older versions of autoconf.  Sigh.
1274 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1275    AUTOHEADER=autoheader
1276    echo "$ac_t""found" 1>&6
1277 else
1278    AUTOHEADER="$missing_dir/missing autoheader"
1279    echo "$ac_t""missing" 1>&6
1280 fi
1281
1282 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1283 echo "configure:1284: checking for working makeinfo" >&5
1284 # Run test in a subshell; some versions of sh will print an error if
1285 # an executable is not found, even if stderr is redirected.
1286 # Redirect stdin to placate older versions of autoconf.  Sigh.
1287 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1288    MAKEINFO=makeinfo
1289    echo "$ac_t""found" 1>&6
1290 else
1291    MAKEINFO="$missing_dir/missing makeinfo"
1292    echo "$ac_t""missing" 1>&6
1293 fi
1294
1295 install_sh="$missing_dir/install-sh"
1296 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1297
1298 for ac_prog in gnutar gtar tar
1299 do
1300 # Extract the first word of "$ac_prog", so it can be a program name with args.
1301 set dummy $ac_prog; ac_word=$2
1302 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1303 echo "configure:1304: checking for $ac_word" >&5
1304 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1305   echo $ac_n "(cached) $ac_c" 1>&6
1306 else
1307   if test -n "$AMTAR"; then
1308   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1309 else
1310   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1311   ac_dummy="$PATH"
1312   for ac_dir in $ac_dummy; do
1313     test -z "$ac_dir" && ac_dir=.
1314     if test -f $ac_dir/$ac_word; then
1315       ac_cv_prog_AMTAR="$ac_prog"
1316       break
1317     fi
1318   done
1319   IFS="$ac_save_ifs"
1320 fi
1321 fi
1322 AMTAR="$ac_cv_prog_AMTAR"
1323 if test -n "$AMTAR"; then
1324   echo "$ac_t""$AMTAR" 1>&6
1325 else
1326   echo "$ac_t""no" 1>&6
1327 fi
1328
1329 test -n "$AMTAR" && break
1330 done
1331
1332
1333 AMTARFLAGS=
1334 if test -n "$AMTAR"; then
1335   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1336         AMTARFLAGS=o
1337   fi
1338 fi
1339
1340 cat >> confdefs.h <<EOF
1341 #define OPENLDAP_PACKAGE "$PACKAGE"
1342 EOF
1343
1344 cat >> confdefs.h <<EOF
1345 #define OPENLDAP_VERSION "$VERSION"
1346 EOF
1347
1348
1349 cat >> confdefs.h <<EOF
1350 #define LDAP_VENDOR_VERSION $OL_API_INC
1351 EOF
1352
1353 cat >> confdefs.h <<EOF
1354 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1355 EOF
1356
1357 cat >> confdefs.h <<EOF
1358 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1359 EOF
1360
1361 cat >> confdefs.h <<EOF
1362 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1363 EOF
1364
1365
1366 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1367
1368 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
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
1524
1525 # OpenLDAP --with-cyrus_sasl
1526         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1527 if test "${with_cyrus_sasl+set}" = set; then
1528   withval="$with_cyrus_sasl"
1529   
1530         ol_arg=invalid
1531         for ol_val in auto yes no  ; do
1532                 if test "$withval" = "$ol_val" ; then
1533                         ol_arg="$ol_val"
1534                 fi
1535         done
1536         if test "$ol_arg" = "invalid" ; then
1537                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1538         fi
1539         ol_with_cyrus_sasl="$ol_arg"
1540
1541 else
1542         ol_with_cyrus_sasl="auto"
1543 fi
1544 # end --with-cyrus_sasl
1545
1546 # OpenLDAP --with-fetch
1547         # Check whether --with-fetch or --without-fetch was given.
1548 if test "${with_fetch+set}" = set; then
1549   withval="$with_fetch"
1550   
1551         ol_arg=invalid
1552         for ol_val in auto yes no  ; do
1553                 if test "$withval" = "$ol_val" ; then
1554                         ol_arg="$ol_val"
1555                 fi
1556         done
1557         if test "$ol_arg" = "invalid" ; then
1558                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1559         fi
1560         ol_with_fetch="$ol_arg"
1561
1562 else
1563         ol_with_fetch="auto"
1564 fi
1565 # end --with-fetch
1566
1567 ol_with_kerberos=${ol_with_kerberos-auto}
1568 # OpenLDAP --with-threads
1569         # Check whether --with-threads or --without-threads was given.
1570 if test "${with_threads+set}" = set; then
1571   withval="$with_threads"
1572   
1573         ol_arg=invalid
1574         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1575                 if test "$withval" = "$ol_val" ; then
1576                         ol_arg="$ol_val"
1577                 fi
1578         done
1579         if test "$ol_arg" = "invalid" ; then
1580                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1581         fi
1582         ol_with_threads="$ol_arg"
1583
1584 else
1585         ol_with_threads="auto"
1586 fi
1587 # end --with-threads
1588
1589 # OpenLDAP --with-tls
1590         # Check whether --with-tls or --without-tls was given.
1591 if test "${with_tls+set}" = set; then
1592   withval="$with_tls"
1593   
1594         ol_arg=invalid
1595         for ol_val in auto ssleay openssl yes no  ; do
1596                 if test "$withval" = "$ol_val" ; then
1597                         ol_arg="$ol_val"
1598                 fi
1599         done
1600         if test "$ol_arg" = "invalid" ; then
1601                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1602         fi
1603         ol_with_tls="$ol_arg"
1604
1605 else
1606         ol_with_tls="auto"
1607 fi
1608 # end --with-tls
1609
1610 # OpenLDAP --with-yielding_select
1611         # Check whether --with-yielding_select or --without-yielding_select was given.
1612 if test "${with_yielding_select+set}" = set; then
1613   withval="$with_yielding_select"
1614   
1615         ol_arg=invalid
1616         for ol_val in auto yes no manual  ; do
1617                 if test "$withval" = "$ol_val" ; then
1618                         ol_arg="$ol_val"
1619                 fi
1620         done
1621         if test "$ol_arg" = "invalid" ; then
1622                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1623         fi
1624         ol_with_yielding_select="$ol_arg"
1625
1626 else
1627         ol_with_yielding_select="auto"
1628 fi
1629 # end --with-yielding_select
1630
1631
1632
1633 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1634 if test "${with_xxslapdoptions+set}" = set; then
1635   withval="$with_xxslapdoptions"
1636   :
1637 fi
1638
1639 # OpenLDAP --enable-slapd
1640         # Check whether --enable-slapd or --disable-slapd was given.
1641 if test "${enable_slapd+set}" = set; then
1642   enableval="$enable_slapd"
1643   
1644         ol_arg=invalid
1645         for ol_val in auto yes no ; do
1646                 if test "$enableval" = "$ol_val" ; then
1647                         ol_arg="$ol_val"
1648                 fi
1649         done
1650         if test "$ol_arg" = "invalid" ; then
1651                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1652         fi
1653         ol_enable_slapd="$ol_arg"
1654
1655 else
1656         ol_enable_slapd="yes"
1657 fi
1658 # end --enable-slapd
1659 # OpenLDAP --enable-aci
1660         # Check whether --enable-aci or --disable-aci was given.
1661 if test "${enable_aci+set}" = set; then
1662   enableval="$enable_aci"
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-aci" 1>&2; exit 1; }
1672         fi
1673         ol_enable_aci="$ol_arg"
1674
1675 else
1676         ol_enable_aci="no"
1677 fi
1678 # end --enable-aci
1679 # OpenLDAP --enable-cleartext
1680         # Check whether --enable-cleartext or --disable-cleartext was given.
1681 if test "${enable_cleartext+set}" = set; then
1682   enableval="$enable_cleartext"
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-cleartext" 1>&2; exit 1; }
1692         fi
1693         ol_enable_cleartext="$ol_arg"
1694
1695 else
1696         ol_enable_cleartext="yes"
1697 fi
1698 # end --enable-cleartext
1699 # OpenLDAP --enable-crypt
1700         # Check whether --enable-crypt or --disable-crypt was given.
1701 if test "${enable_crypt+set}" = set; then
1702   enableval="$enable_crypt"
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-crypt" 1>&2; exit 1; }
1712         fi
1713         ol_enable_crypt="$ol_arg"
1714
1715 else
1716         ol_enable_crypt="no"
1717 fi
1718 # end --enable-crypt
1719 # OpenLDAP --enable-lmpasswd
1720         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1721 if test "${enable_lmpasswd+set}" = set; then
1722   enableval="$enable_lmpasswd"
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-lmpasswd" 1>&2; exit 1; }
1732         fi
1733         ol_enable_lmpasswd="$ol_arg"
1734
1735 else
1736         ol_enable_lmpasswd="no"
1737 fi
1738 # end --enable-lmpasswd
1739 # OpenLDAP --enable-spasswd
1740         # Check whether --enable-spasswd or --disable-spasswd was given.
1741 if test "${enable_spasswd+set}" = set; then
1742   enableval="$enable_spasswd"
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-spasswd" 1>&2; exit 1; }
1752         fi
1753         ol_enable_spasswd="$ol_arg"
1754
1755 else
1756         ol_enable_spasswd="no"
1757 fi
1758 # end --enable-spasswd
1759 # OpenLDAP --enable-modules
1760         # Check whether --enable-modules or --disable-modules was given.
1761 if test "${enable_modules+set}" = set; then
1762   enableval="$enable_modules"
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-modules" 1>&2; exit 1; }
1772         fi
1773         ol_enable_modules="$ol_arg"
1774
1775 else
1776         ol_enable_modules="no"
1777 fi
1778 # end --enable-modules
1779 ol_enable_multimaster=${ol_enable_multimaster-no}
1780 # OpenLDAP --enable-rewrite
1781         # Check whether --enable-rewrite or --disable-rewrite was given.
1782 if test "${enable_rewrite+set}" = set; then
1783   enableval="$enable_rewrite"
1784   
1785         ol_arg=invalid
1786         for ol_val in auto yes no ; do
1787                 if test "$enableval" = "$ol_val" ; then
1788                         ol_arg="$ol_val"
1789                 fi
1790         done
1791         if test "$ol_arg" = "invalid" ; then
1792                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1793         fi
1794         ol_enable_rewrite="$ol_arg"
1795
1796 else
1797         ol_enable_rewrite="no"
1798 fi
1799 # end --enable-rewrite
1800 # OpenLDAP --enable-rlookups
1801         # Check whether --enable-rlookups or --disable-rlookups was given.
1802 if test "${enable_rlookups+set}" = set; then
1803   enableval="$enable_rlookups"
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-rlookups" 1>&2; exit 1; }
1813         fi
1814         ol_enable_rlookups="$ol_arg"
1815
1816 else
1817         ol_enable_rlookups="no"
1818 fi
1819 # end --enable-rlookups
1820 # OpenLDAP --enable-slapi
1821         # Check whether --enable-slapi or --disable-slapi was given.
1822 if test "${enable_slapi+set}" = set; then
1823   enableval="$enable_slapi"
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-slapi" 1>&2; exit 1; }
1833         fi
1834         ol_enable_slapi="$ol_arg"
1835
1836 else
1837         ol_enable_slapi="no"
1838 fi
1839 # end --enable-slapi
1840 # OpenLDAP --enable-slp
1841         # Check whether --enable-slp or --disable-slp was given.
1842 if test "${enable_slp+set}" = set; then
1843   enableval="$enable_slp"
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-slp" 1>&2; exit 1; }
1853         fi
1854         ol_enable_slp="$ol_arg"
1855
1856 else
1857         ol_enable_slp="no"
1858 fi
1859 # end --enable-slp
1860 # OpenLDAP --enable-wrappers
1861         # Check whether --enable-wrappers or --disable-wrappers was given.
1862 if test "${enable_wrappers+set}" = set; then
1863   enableval="$enable_wrappers"
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-wrappers" 1>&2; exit 1; }
1873         fi
1874         ol_enable_wrappers="$ol_arg"
1875
1876 else
1877         ol_enable_wrappers="no"
1878 fi
1879 # end --enable-wrappers
1880
1881
1882 # OpenLDAP --enable-bdb
1883         # Check whether --enable-bdb or --disable-bdb was given.
1884 if test "${enable_bdb+set}" = set; then
1885   enableval="$enable_bdb"
1886   
1887         ol_arg=invalid
1888         for ol_val in auto yes no ; do
1889                 if test "$enableval" = "$ol_val" ; then
1890                         ol_arg="$ol_val"
1891                 fi
1892         done
1893         if test "$ol_arg" = "invalid" ; then
1894                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1895         fi
1896         ol_enable_bdb="$ol_arg"
1897
1898 else
1899         ol_enable_bdb="yes"
1900 fi
1901 # end --enable-bdb
1902 # OpenLDAP --with-bdb_module
1903         # Check whether --with-bdb_module or --without-bdb_module was given.
1904 if test "${with_bdb_module+set}" = set; then
1905   withval="$with_bdb_module"
1906   
1907         ol_arg=invalid
1908         for ol_val in static dynamic ; do
1909                 if test "$withval" = "$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 $withval for --with-bdb_module" 1>&2; exit 1; }
1915         fi
1916         ol_with_bdb_module="$ol_arg"
1917
1918 else
1919         ol_with_bdb_module="static"
1920 fi
1921 # end --with-bdb_module
1922
1923 # OpenLDAP --enable-dnssrv
1924         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1925 if test "${enable_dnssrv+set}" = set; then
1926   enableval="$enable_dnssrv"
1927   
1928         ol_arg=invalid
1929         for ol_val in auto yes no ; do
1930                 if test "$enableval" = "$ol_val" ; then
1931                         ol_arg="$ol_val"
1932                 fi
1933         done
1934         if test "$ol_arg" = "invalid" ; then
1935                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1936         fi
1937         ol_enable_dnssrv="$ol_arg"
1938
1939 else
1940         ol_enable_dnssrv="no"
1941 fi
1942 # end --enable-dnssrv
1943 # OpenLDAP --with-dnssrv_module
1944         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1945 if test "${with_dnssrv_module+set}" = set; then
1946   withval="$with_dnssrv_module"
1947   
1948         ol_arg=invalid
1949         for ol_val in static dynamic ; do
1950                 if test "$withval" = "$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 $withval for --with-dnssrv_module" 1>&2; exit 1; }
1956         fi
1957         ol_with_dnssrv_module="$ol_arg"
1958
1959 else
1960         ol_with_dnssrv_module="static"
1961 fi
1962 # end --with-dnssrv_module
1963
1964 # OpenLDAP --enable-hdb
1965         # Check whether --enable-hdb or --disable-hdb was given.
1966 if test "${enable_hdb+set}" = set; then
1967   enableval="$enable_hdb"
1968   
1969         ol_arg=invalid
1970         for ol_val in auto yes no ; do
1971                 if test "$enableval" = "$ol_val" ; then
1972                         ol_arg="$ol_val"
1973                 fi
1974         done
1975         if test "$ol_arg" = "invalid" ; then
1976                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1977         fi
1978         ol_enable_hdb="$ol_arg"
1979
1980 else
1981         ol_enable_hdb="no"
1982 fi
1983 # end --enable-hdb
1984 # OpenLDAP --with-hdb_module
1985         # Check whether --with-hdb_module or --without-hdb_module was given.
1986 if test "${with_hdb_module+set}" = set; then
1987   withval="$with_hdb_module"
1988   
1989         ol_arg=invalid
1990         for ol_val in static dynamic ; do
1991                 if test "$withval" = "$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 $withval for --with-hdb_module" 1>&2; exit 1; }
1997         fi
1998         ol_with_hdb_module="$ol_arg"
1999
2000 else
2001         ol_with_hdb_module="static"
2002 fi
2003 # end --with-hdb_module
2004
2005 # OpenLDAP --enable-ldap
2006         # Check whether --enable-ldap or --disable-ldap was given.
2007 if test "${enable_ldap+set}" = set; then
2008   enableval="$enable_ldap"
2009   
2010         ol_arg=invalid
2011         for ol_val in auto yes no ; do
2012                 if test "$enableval" = "$ol_val" ; then
2013                         ol_arg="$ol_val"
2014                 fi
2015         done
2016         if test "$ol_arg" = "invalid" ; then
2017                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2018         fi
2019         ol_enable_ldap="$ol_arg"
2020
2021 else
2022         ol_enable_ldap="no"
2023 fi
2024 # end --enable-ldap
2025 # OpenLDAP --with-ldap_module
2026         # Check whether --with-ldap_module or --without-ldap_module was given.
2027 if test "${with_ldap_module+set}" = set; then
2028   withval="$with_ldap_module"
2029   
2030         ol_arg=invalid
2031         for ol_val in static dynamic ; do
2032                 if test "$withval" = "$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 $withval for --with-ldap_module" 1>&2; exit 1; }
2038         fi
2039         ol_with_ldap_module="$ol_arg"
2040
2041 else
2042         ol_with_ldap_module="static"
2043 fi
2044 # end --with-ldap_module
2045
2046 # OpenLDAP --enable-ldbm
2047         # Check whether --enable-ldbm or --disable-ldbm was given.
2048 if test "${enable_ldbm+set}" = set; then
2049   enableval="$enable_ldbm"
2050   
2051         ol_arg=invalid
2052         for ol_val in auto yes no ; do
2053                 if test "$enableval" = "$ol_val" ; then
2054                         ol_arg="$ol_val"
2055                 fi
2056         done
2057         if test "$ol_arg" = "invalid" ; then
2058                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2059         fi
2060         ol_enable_ldbm="$ol_arg"
2061
2062 else
2063         ol_enable_ldbm="no"
2064 fi
2065 # end --enable-ldbm
2066 # OpenLDAP --with-ldbm_api
2067         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2068 if test "${with_ldbm_api+set}" = set; then
2069   withval="$with_ldbm_api"
2070   
2071         ol_arg=invalid
2072         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2073                 if test "$withval" = "$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 $withval for --with-ldbm_api" 1>&2; exit 1; }
2079         fi
2080         ol_with_ldbm_api="$ol_arg"
2081
2082 else
2083         ol_with_ldbm_api="auto"
2084 fi
2085 # end --with-ldbm_api
2086
2087 # OpenLDAP --with-ldbm_module
2088         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2089 if test "${with_ldbm_module+set}" = set; then
2090   withval="$with_ldbm_module"
2091   
2092         ol_arg=invalid
2093         for ol_val in static dynamic ; do
2094                 if test "$withval" = "$ol_val" ; then
2095                         ol_arg="$ol_val"
2096                 fi
2097         done
2098         if test "$ol_arg" = "invalid" ; then
2099                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2100         fi
2101         ol_with_ldbm_module="$ol_arg"
2102
2103 else
2104         ol_with_ldbm_module="static"
2105 fi
2106 # end --with-ldbm_module
2107
2108 # OpenLDAP --with-ldbm_type
2109         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2110 if test "${with_ldbm_type+set}" = set; then
2111   withval="$with_ldbm_type"
2112   
2113         ol_arg=invalid
2114         for ol_val in auto btree hash ; do
2115                 if test "$withval" = "$ol_val" ; then
2116                         ol_arg="$ol_val"
2117                 fi
2118         done
2119         if test "$ol_arg" = "invalid" ; then
2120                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2121         fi
2122         ol_with_ldbm_type="$ol_arg"
2123
2124 else
2125         ol_with_ldbm_type="auto"
2126 fi
2127 # end --with-ldbm_type
2128
2129 # OpenLDAP --enable-meta
2130         # Check whether --enable-meta or --disable-meta was given.
2131 if test "${enable_meta+set}" = set; then
2132   enableval="$enable_meta"
2133   
2134         ol_arg=invalid
2135         for ol_val in auto yes no ; do
2136                 if test "$enableval" = "$ol_val" ; then
2137                         ol_arg="$ol_val"
2138                 fi
2139         done
2140         if test "$ol_arg" = "invalid" ; then
2141                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2142         fi
2143         ol_enable_meta="$ol_arg"
2144
2145 else
2146         ol_enable_meta="no"
2147 fi
2148 # end --enable-meta
2149 # OpenLDAP --with-meta_module
2150         # Check whether --with-meta_module or --without-meta_module was given.
2151 if test "${with_meta_module+set}" = set; then
2152   withval="$with_meta_module"
2153   
2154         ol_arg=invalid
2155         for ol_val in static dynamic ; do
2156                 if test "$withval" = "$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 $withval for --with-meta_module" 1>&2; exit 1; }
2162         fi
2163         ol_with_meta_module="$ol_arg"
2164
2165 else
2166         ol_with_meta_module="static"
2167 fi
2168 # end --with-meta_module
2169
2170 # OpenLDAP --enable-monitor
2171         # Check whether --enable-monitor or --disable-monitor was given.
2172 if test "${enable_monitor+set}" = set; then
2173   enableval="$enable_monitor"
2174   
2175         ol_arg=invalid
2176         for ol_val in auto yes no ; do
2177                 if test "$enableval" = "$ol_val" ; then
2178                         ol_arg="$ol_val"
2179                 fi
2180         done
2181         if test "$ol_arg" = "invalid" ; then
2182                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2183         fi
2184         ol_enable_monitor="$ol_arg"
2185
2186 else
2187         ol_enable_monitor="yes"
2188 fi
2189 # end --enable-monitor
2190 # OpenLDAP --with-monitor_module
2191         # Check whether --with-monitor_module or --without-monitor_module was given.
2192 if test "${with_monitor_module+set}" = set; then
2193   withval="$with_monitor_module"
2194   
2195         ol_arg=invalid
2196         for ol_val in static dynamic ; do
2197                 if test "$withval" = "$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 $withval for --with-monitor_module" 1>&2; exit 1; }
2203         fi
2204         ol_with_monitor_module="$ol_arg"
2205
2206 else
2207         ol_with_monitor_module="static"
2208 fi
2209 # end --with-monitor_module
2210
2211 # OpenLDAP --enable-null
2212         # Check whether --enable-null or --disable-null was given.
2213 if test "${enable_null+set}" = set; then
2214   enableval="$enable_null"
2215   
2216         ol_arg=invalid
2217         for ol_val in auto yes no ; do
2218                 if test "$enableval" = "$ol_val" ; then
2219                         ol_arg="$ol_val"
2220                 fi
2221         done
2222         if test "$ol_arg" = "invalid" ; then
2223                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2224         fi
2225         ol_enable_null="$ol_arg"
2226
2227 else
2228         ol_enable_null="no"
2229 fi
2230 # end --enable-null
2231 # OpenLDAP --with-null_module
2232         # Check whether --with-null_module or --without-null_module was given.
2233 if test "${with_null_module+set}" = set; then
2234   withval="$with_null_module"
2235   
2236         ol_arg=invalid
2237         for ol_val in static dynamic ; do
2238                 if test "$withval" = "$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 $withval for --with-null_module" 1>&2; exit 1; }
2244         fi
2245         ol_with_null_module="$ol_arg"
2246
2247 else
2248         ol_with_null_module="static"
2249 fi
2250 # end --with-null_module
2251
2252 # OpenLDAP --enable-passwd
2253         # Check whether --enable-passwd or --disable-passwd was given.
2254 if test "${enable_passwd+set}" = set; then
2255   enableval="$enable_passwd"
2256   
2257         ol_arg=invalid
2258         for ol_val in auto yes no ; do
2259                 if test "$enableval" = "$ol_val" ; then
2260                         ol_arg="$ol_val"
2261                 fi
2262         done
2263         if test "$ol_arg" = "invalid" ; then
2264                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2265         fi
2266         ol_enable_passwd="$ol_arg"
2267
2268 else
2269         ol_enable_passwd="no"
2270 fi
2271 # end --enable-passwd
2272 # OpenLDAP --with-passwd_module
2273         # Check whether --with-passwd_module or --without-passwd_module was given.
2274 if test "${with_passwd_module+set}" = set; then
2275   withval="$with_passwd_module"
2276   
2277         ol_arg=invalid
2278         for ol_val in static dynamic ; do
2279                 if test "$withval" = "$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 $withval for --with-passwd_module" 1>&2; exit 1; }
2285         fi
2286         ol_with_passwd_module="$ol_arg"
2287
2288 else
2289         ol_with_passwd_module="static"
2290 fi
2291 # end --with-passwd_module
2292
2293 # OpenLDAP --enable-perl
2294         # Check whether --enable-perl or --disable-perl was given.
2295 if test "${enable_perl+set}" = set; then
2296   enableval="$enable_perl"
2297   
2298         ol_arg=invalid
2299         for ol_val in auto yes no ; do
2300                 if test "$enableval" = "$ol_val" ; then
2301                         ol_arg="$ol_val"
2302                 fi
2303         done
2304         if test "$ol_arg" = "invalid" ; then
2305                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2306         fi
2307         ol_enable_perl="$ol_arg"
2308
2309 else
2310         ol_enable_perl="no"
2311 fi
2312 # end --enable-perl
2313 # OpenLDAP --with-perl_module
2314         # Check whether --with-perl_module or --without-perl_module was given.
2315 if test "${with_perl_module+set}" = set; then
2316   withval="$with_perl_module"
2317   
2318         ol_arg=invalid
2319         for ol_val in static dynamic ; do
2320                 if test "$withval" = "$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 $withval for --with-perl_module" 1>&2; exit 1; }
2326         fi
2327         ol_with_perl_module="$ol_arg"
2328
2329 else
2330         ol_with_perl_module="static"
2331 fi
2332 # end --with-perl_module
2333
2334 # OpenLDAP --enable-shell
2335         # Check whether --enable-shell or --disable-shell was given.
2336 if test "${enable_shell+set}" = set; then
2337   enableval="$enable_shell"
2338   
2339         ol_arg=invalid
2340         for ol_val in auto yes no ; do
2341                 if test "$enableval" = "$ol_val" ; then
2342                         ol_arg="$ol_val"
2343                 fi
2344         done
2345         if test "$ol_arg" = "invalid" ; then
2346                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2347         fi
2348         ol_enable_shell="$ol_arg"
2349
2350 else
2351         ol_enable_shell="no"
2352 fi
2353 # end --enable-shell
2354 # OpenLDAP --with-shell_module
2355         # Check whether --with-shell_module or --without-shell_module was given.
2356 if test "${with_shell_module+set}" = set; then
2357   withval="$with_shell_module"
2358   
2359         ol_arg=invalid
2360         for ol_val in static dynamic ; do
2361                 if test "$withval" = "$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 $withval for --with-shell_module" 1>&2; exit 1; }
2367         fi
2368         ol_with_shell_module="$ol_arg"
2369
2370 else
2371         ol_with_shell_module="static"
2372 fi
2373 # end --with-shell_module
2374
2375 # OpenLDAP --enable-sql
2376         # Check whether --enable-sql or --disable-sql was given.
2377 if test "${enable_sql+set}" = set; then
2378   enableval="$enable_sql"
2379   
2380         ol_arg=invalid
2381         for ol_val in auto yes no ; do
2382                 if test "$enableval" = "$ol_val" ; then
2383                         ol_arg="$ol_val"
2384                 fi
2385         done
2386         if test "$ol_arg" = "invalid" ; then
2387                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2388         fi
2389         ol_enable_sql="$ol_arg"
2390
2391 else
2392         ol_enable_sql="no"
2393 fi
2394 # end --enable-sql
2395 # OpenLDAP --with-sql_module
2396         # Check whether --with-sql_module or --without-sql_module was given.
2397 if test "${with_sql_module+set}" = set; then
2398   withval="$with_sql_module"
2399   
2400         ol_arg=invalid
2401         for ol_val in static dynamic ; do
2402                 if test "$withval" = "$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 $withval for --with-sql_module" 1>&2; exit 1; }
2408         fi
2409         ol_with_sql_module="$ol_arg"
2410
2411 else
2412         ol_with_sql_module="static"
2413 fi
2414 # end --with-sql_module
2415
2416
2417 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2418 if test "${with_xxslapoverlays+set}" = set; then
2419   withval="$with_xxslapoverlays"
2420   :
2421 fi
2422
2423 # OpenLDAP --with-dyngroup
2424         # Check whether --with-dyngroup or --without-dyngroup was given.
2425 if test "${with_dyngroup+set}" = set; then
2426   withval="$with_dyngroup"
2427   
2428         ol_arg=invalid
2429         for ol_val in no yes mod ; do
2430                 if test "$withval" = "$ol_val" ; then
2431                         ol_arg="$ol_val"
2432                 fi
2433         done
2434         if test "$ol_arg" = "invalid" ; then
2435                 { echo "configure: error: bad value $withval for --with-dyngroup" 1>&2; exit 1; }
2436         fi
2437         ol_with_dyngroup="$ol_arg"
2438
2439 else
2440         ol_with_dyngroup="no"
2441 fi
2442 # end --with-dyngroup
2443
2444 # OpenLDAP --with-proxycache
2445         # Check whether --with-proxycache or --without-proxycache was given.
2446 if test "${with_proxycache+set}" = set; then
2447   withval="$with_proxycache"
2448   
2449         ol_arg=invalid
2450         for ol_val in no yes mod ; do
2451                 if test "$withval" = "$ol_val" ; then
2452                         ol_arg="$ol_val"
2453                 fi
2454         done
2455         if test "$ol_arg" = "invalid" ; then
2456                 { echo "configure: error: bad value $withval for --with-proxycache" 1>&2; exit 1; }
2457         fi
2458         ol_with_proxycache="$ol_arg"
2459
2460 else
2461         ol_with_proxycache="no"
2462 fi
2463 # end --with-proxycache
2464
2465
2466 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2467 if test "${with_xxslurpdoptions+set}" = set; then
2468   withval="$with_xxslurpdoptions"
2469   :
2470 fi
2471
2472 # OpenLDAP --enable-slurpd
2473         # Check whether --enable-slurpd or --disable-slurpd was given.
2474 if test "${enable_slurpd+set}" = set; then
2475   enableval="$enable_slurpd"
2476   
2477         ol_arg=invalid
2478         for ol_val in auto yes no ; do
2479                 if test "$enableval" = "$ol_val" ; then
2480                         ol_arg="$ol_val"
2481                 fi
2482         done
2483         if test "$ol_arg" = "invalid" ; then
2484                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2485         fi
2486         ol_enable_slurpd="$ol_arg"
2487
2488 else
2489         ol_enable_slurpd="auto"
2490 fi
2491 # end --enable-slurpd
2492
2493 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2494 if test "${with_xxliboptions+set}" = set; then
2495   withval="$with_xxliboptions"
2496   :
2497 fi
2498
2499 # Check whether --enable-static or --disable-static was given.
2500 if test "${enable_static+set}" = set; then
2501   enableval="$enable_static"
2502   p=${PACKAGE-default}
2503 case $enableval in
2504 yes) enable_static=yes ;;
2505 no) enable_static=no ;;
2506 *)
2507   enable_static=no
2508   # Look at the argument we got.  We use all the common list separators.
2509   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2510   for pkg in $enableval; do
2511     if test "X$pkg" = "X$p"; then
2512       enable_static=yes
2513     fi
2514   done
2515   IFS="$ac_save_ifs"
2516   ;;
2517 esac
2518 else
2519   enable_static=yes
2520 fi
2521
2522 # Check whether --enable-shared or --disable-shared was given.
2523 if test "${enable_shared+set}" = set; then
2524   enableval="$enable_shared"
2525   p=${PACKAGE-default}
2526 case $enableval in
2527 yes) enable_shared=yes ;;
2528 no) enable_shared=no ;;
2529 *)
2530   enable_shared=no
2531   # Look at the argument we got.  We use all the common list separators.
2532   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2533   for pkg in $enableval; do
2534     if test "X$pkg" = "X$p"; then
2535       enable_shared=yes
2536     fi
2537   done
2538   IFS="$ac_save_ifs"
2539   ;;
2540 esac
2541 else
2542   enable_shared=yes
2543 fi
2544
2545
2546
2547 # validate options
2548 if test $ol_enable_slapd = no ; then
2549                 if test $ol_enable_slapi = yes ; then
2550                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2551         fi
2552         if test $ol_enable_bdb = yes ; then
2553                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2554         fi
2555         if test $ol_enable_dnssrv = yes ; then
2556                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2557         fi
2558         if test $ol_enable_hdb = yes ; then
2559                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2560         fi
2561         if test $ol_enable_ldap = yes ; then
2562                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2563         fi
2564         if test $ol_enable_ldbm = yes ; then
2565                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2566         fi
2567         if test $ol_enable_meta = yes ; then
2568                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2569         fi
2570         if test $ol_enable_monitor = yes ; then
2571                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2572         fi
2573         if test $ol_enable_null = yes ; then
2574                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2575         fi
2576         if test $ol_enable_passwd = yes ; then
2577                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2578         fi
2579         if test $ol_enable_perl = yes ; then
2580                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2581         fi
2582         if test $ol_enable_shell = yes ; then
2583                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2584         fi
2585         if test $ol_enable_sql = yes ; then
2586                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2587         fi
2588         if test $ol_enable_modules = yes ; then
2589                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2590         fi
2591         if test $ol_enable_multimaster = yes ; then
2592                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2593         fi
2594         if test $ol_enable_wrappers = yes ; then
2595                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2596         fi
2597         if test $ol_enable_rlookups = yes ; then
2598                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2599         fi
2600         if test $ol_enable_aci = yes ; then
2601                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2602         fi
2603         if test $ol_with_ldbm_api != auto ; then
2604                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2605         fi
2606         if test $ol_with_ldbm_type != auto ; then
2607                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2608         fi
2609         if test $ol_with_bdb_module != static ; then
2610                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2611         fi
2612         if test $ol_with_dnssrv_module != static ; then
2613                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2614         fi
2615         if test $ol_with_hdb_module != static ; then
2616                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2617         fi
2618         if test $ol_with_ldap_module != static ; then
2619                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2620         fi
2621         if test $ol_with_ldbm_module != static ; then
2622                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2623         fi
2624         if test $ol_with_meta_module != static ; then
2625                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2626         fi
2627         if test $ol_with_monitor_module != static ; then
2628                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2629         fi
2630         if test $ol_with_null_module != static ; then
2631                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2632         fi
2633         if test $ol_with_passwd_module != static ; then
2634                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2635         fi
2636         if test $ol_with_perl_module != static ; then
2637                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2638         fi
2639         if test $ol_with_shell_module != static ; then
2640                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2641         fi
2642         if test $ol_with_sql_module != static ; then
2643                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2644         fi
2645         if test $ol_enable_slurpd = yes ; then
2646                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2647         fi
2648         if test $ol_enable_rewrite = yes ; then
2649                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2650         fi
2651         if test $ol_with_dyngroup != no ; then
2652                 echo "configure: warning: slapd disabled, ignoring --with-dyngroup argument" 1>&2
2653         fi
2654         if test $ol_with_proxycache != no ; then
2655                 echo "configure: warning: slapd disabled, ignoring --with-proxycache argument" 1>&2
2656         fi
2657
2658         # force settings to no
2659         ol_enable_slapi=no
2660         ol_enable_bdb=no
2661         ol_enable_dnssrv=no
2662         ol_enable_hdb=no
2663         ol_enable_ldap=no
2664         ol_enable_ldbm=no
2665         ol_enable_meta=no
2666         ol_enable_monitor=no
2667         ol_enable_null=no
2668         ol_enable_passwd=no
2669         ol_enable_perl=no
2670         ol_enable_shell=no
2671         ol_enable_sql=no
2672
2673         ol_enable_modules=no
2674         ol_enable_multimaster=no
2675         ol_enable_rlookups=no
2676         ol_enable_aci=no
2677         ol_enable_wrappers=no
2678
2679         ol_with_ldbm_api=no
2680         ol_with_ldbm_type=no
2681
2682         ol_with_bdb_module=static
2683         ol_with_dnssrv_module=static
2684         ol_with_hdb_module=static
2685         ol_with_ldap_module=static
2686         ol_with_ldbm_module=static
2687         ol_with_meta_module=static
2688         ol_with_monitor_module=static
2689         ol_with_null_module=static
2690         ol_with_passwd_module=static
2691         ol_with_perl_module=static
2692         ol_with_shell_module=static
2693         ol_with_sql_module=static
2694
2695         ol_enable_slurpd=no
2696
2697         ol_enable_rewrite=no
2698
2699         ol_with_dyngroup=no
2700         ol_with_proxycache=no
2701
2702 elif test $ol_enable_ldbm = no ; then
2703         
2704         if test $ol_with_ldbm_api != auto ; then
2705                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2706         fi
2707
2708         if test $ol_with_ldbm_type != auto ; then
2709                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2710         fi
2711
2712         if test $ol_with_ldbm_module != static ; then
2713                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2714         fi
2715
2716         if test $ol_enable_modules != yes -a \
2717                 $ol_enable_bdb = no -a \
2718                 $ol_enable_dnssrv = no -a \
2719                 $ol_enable_hdb = no -a \
2720                 $ol_enable_ldap = no -a \
2721                 $ol_enable_meta = no -a \
2722                 $ol_enable_monitor = no -a \
2723                 $ol_enable_null = no -a \
2724                 $ol_enable_passwd = no -a \
2725                 $ol_enable_perl = no -a \
2726                 $ol_enable_shell = no -a \
2727                 $ol_enable_sql = no ; then
2728
2729                 if test $ol_enable_slapd = yes ; then
2730                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2731                 else
2732                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2733                         ol_enable_slapd=no
2734                 fi
2735         fi
2736
2737         ol_with_ldbm_api=no
2738         ol_with_ldbm_type=no
2739         ol_with_ldbm_module=static
2740
2741         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2742                 ol_with_ldbm_api=berkeley
2743         fi
2744
2745 else
2746                 if test $ol_with_ldbm_api = gdbm -a \
2747                 $ol_with_ldbm_type = btree ; then
2748                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2749         fi
2750         if test $ol_with_ldbm_api = mdbm -a \
2751                 $ol_with_ldbm_type = btree ; then
2752                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2753         fi
2754         if test $ol_with_ldbm_api = ndbm -a \
2755                 $ol_with_ldbm_type = btree ; then
2756                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2757         fi
2758
2759         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2760                 if test $ol_with_ldbm_api = auto ; then
2761                         ol_with_ldbm_api=berkeley
2762                 elif test $ol_with_ldbm_api != berkeley ; then
2763                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2764                 fi
2765
2766         elif test $ol_enable_bdb = auto ; then
2767                 if test $ol_with_ldbm_api != berkeley \
2768                         -o $ol_with_ldbm_api != auto ; then
2769                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2770                         ol_enable_bdb=no
2771                 fi
2772         fi
2773 fi
2774
2775 if test $ol_enable_slurpd = yes ; then
2776                 if test $ol_with_threads = no ; then
2777                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2778         fi
2779 fi
2780
2781 if test $ol_enable_lmpasswd = yes ; then
2782         if test $ol_with_tls = no ; then
2783                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2784         fi
2785 fi
2786
2787 if test $ol_enable_kbind = yes ; then
2788         if test $ol_with_kerberos = no ; then
2789                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2790         elif test $ol_with_kerberos = auto ; then
2791                 ol_with_kerberos=yes
2792         fi
2793
2794 elif test $ol_enable_kbind = no ; then
2795         if test $ol_with_kerberos = auto ; then
2796                 ol_with_kerberos=no
2797         elif test $ol_with_kerberos != no ; then
2798                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2799                 ol_with_kerberos=no
2800         fi
2801 fi
2802
2803 if test $ol_enable_spasswd = yes ; then
2804         if test $ol_with_cyrus_sasl = no ; then
2805                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2806         fi
2807         ol_with_cyrus_sasl=yes
2808 fi
2809
2810 echo "$ac_t""done" 1>&6
2811
2812 LDAP_LIBS=
2813 LDBM_LIBS=
2814 LTHREAD_LIBS=
2815 LUTIL_LIBS=
2816
2817 SLAPD_LIBS=
2818 SLURPD_LIBS=
2819
2820 BUILD_SLAPD=no
2821 BUILD_SLURPD=no
2822
2823 BUILD_THREAD=no
2824
2825 BUILD_SLAPI=no
2826 SLAPD_SLAPI_DEPEND=
2827
2828 BUILD_BDB=no
2829 BUILD_DNSSRV=no
2830 BUILD_HDB=no
2831 BUILD_LDAP=no
2832 BUILD_LDBM=no
2833 BUILD_META=no
2834 BUILD_MONITOR=no
2835 BUILD_NULL=no
2836 BUILD_PASSWD=no
2837 BUILD_PERL=no
2838 BUILD_SHELL=no
2839 BUILD_SQL=no
2840
2841 BUILD_BDB_DYNAMIC=static
2842 BUILD_DNSSRV_DYNAMIC=static
2843 BUILD_HDB_DYNAMIC=static
2844 BUILD_LDAP_DYNAMIC=static
2845 BUILD_LDBM_DYNAMIC=static
2846 BUILD_META_DYNAMIC=static
2847 BUILD_MONITOR_DYNAMIC=static
2848 BUILD_NULL_DYNAMIC=static
2849 BUILD_PASSWD_DYNAMIC=static
2850 BUILD_PERL_DYNAMIC=static
2851 BUILD_SHELL_DYNAMIC=static
2852 BUILD_SQL_DYNAMIC=static
2853
2854 BUILD_DYNGROUP=no
2855 BUILD_PROXYCACHE=no
2856
2857 SLAPD_DYNAMIC_OVERLAYS=
2858
2859 SLAPD_MODULES_LDFLAGS=
2860 SLAPD_MODULES_CPPFLAGS=
2861
2862 SLAPD_STATIC_BACKENDS=
2863 SLAPD_DYNAMIC_BACKENDS=
2864
2865 SLAPD_PERL_LDFLAGS=
2866 MOD_PERL_LDFLAGS=
2867 PERL_CPPFLAGS=
2868
2869 SLAPD_SQL_LDFLAGS=
2870 SLAPD_SQL_LIBS=
2871 SLAPD_SQL_INCLUDES=
2872
2873 KRB4_LIBS=
2874 KRB5_LIBS=
2875 SASL_LIBS=
2876 TLS_LIBS=
2877 MODULES_LIBS=
2878 SLAPI_LIBS=
2879 LIBSLAPI=
2880 LIBSLAPITOOLS=
2881 AUTH_LIBS=
2882
2883 SLAPD_SLP_LIBS=
2884
2885
2886 # Find a good install program.  We prefer a C program (faster),
2887 # so one script is as good as another.  But avoid the broken or
2888 # incompatible versions:
2889 # SysV /etc/install, /usr/sbin/install
2890 # SunOS /usr/etc/install
2891 # IRIX /sbin/install
2892 # AIX /bin/install
2893 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2894 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2895 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2896 # ./install, which can be erroneously created by make from ./install.sh.
2897 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2898 echo "configure:2899: checking for a BSD compatible install" >&5
2899 if test -z "$INSTALL"; then
2900 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2901   echo $ac_n "(cached) $ac_c" 1>&6
2902 else
2903     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2904   for ac_dir in $PATH; do
2905     # Account for people who put trailing slashes in PATH elements.
2906     case "$ac_dir/" in
2907     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2908     *)
2909       # OSF1 and SCO ODT 3.0 have their own names for install.
2910       # Don't use installbsd from OSF since it installs stuff as root
2911       # by default.
2912       for ac_prog in ginstall scoinst install; do
2913         if test -f $ac_dir/$ac_prog; then
2914           if test $ac_prog = install &&
2915             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2916             # AIX install.  It has an incompatible calling convention.
2917             :
2918           elif test $ac_prog = install &&
2919             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2920             # program-specific install script used by HP pwplus--don't use.
2921             :
2922           else
2923             ac_cv_path_install="$ac_dir/$ac_prog -c"
2924             break 2
2925           fi
2926         fi
2927       done
2928       ;;
2929     esac
2930   done
2931   IFS="$ac_save_IFS"
2932
2933 fi
2934   if test "${ac_cv_path_install+set}" = set; then
2935     INSTALL="$ac_cv_path_install"
2936   else
2937     # As a last resort, use the slow shell script.  We don't cache a
2938     # path for INSTALL within a source directory, because that will
2939     # break other packages using the cache if that directory is
2940     # removed, or if the path is relative.
2941     INSTALL="$ac_install_sh"
2942   fi
2943 fi
2944 echo "$ac_t""$INSTALL" 1>&6
2945
2946 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2947 # It thinks the first close brace ends the variable substitution.
2948 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2949
2950 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2951
2952 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2953
2954
2955 cat >> confdefs.h <<\EOF
2956 #define HAVE_MKVERSION 1
2957 EOF
2958
2959
2960
2961
2962 ol_aix_threads=no
2963 case "$target" in
2964 *-*-aix*)       if test -z "$CC" ; then
2965                 case "$ol_with_threads" in
2966                 auto | yes |  posix) ol_aix_threads=yes ;;
2967                 esac
2968         fi
2969 ;;
2970 esac
2971
2972 if test $ol_aix_threads = yes ; then
2973         if test -z "${CC}" ; then
2974                 for ac_prog in cc_r xlc_r cc
2975 do
2976 # Extract the first word of "$ac_prog", so it can be a program name with args.
2977 set dummy $ac_prog; ac_word=$2
2978 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2979 echo "configure:2980: checking for $ac_word" >&5
2980 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2981   echo $ac_n "(cached) $ac_c" 1>&6
2982 else
2983   if test -n "$CC"; then
2984   ac_cv_prog_CC="$CC" # Let the user override the test.
2985 else
2986   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2987   ac_dummy="$PATH"
2988   for ac_dir in $ac_dummy; do
2989     test -z "$ac_dir" && ac_dir=.
2990     if test -f $ac_dir/$ac_word; then
2991       ac_cv_prog_CC="$ac_prog"
2992       break
2993     fi
2994   done
2995   IFS="$ac_save_ifs"
2996 fi
2997 fi
2998 CC="$ac_cv_prog_CC"
2999 if test -n "$CC"; then
3000   echo "$ac_t""$CC" 1>&6
3001 else
3002   echo "$ac_t""no" 1>&6
3003 fi
3004
3005 test -n "$CC" && break
3006 done
3007
3008
3009                 if test "$CC" = cc ; then
3010                                                 if test $ol_with_threads != auto ; then
3011                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3012                         else
3013                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3014                         fi
3015                         ol_with_threads=no
3016                 fi
3017         fi
3018
3019         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3020                 ol_with_threads=posix
3021                 ol_cv_pthread_create=yes
3022         fi
3023 fi
3024
3025 if test -z "${CC}"; then
3026         for ac_prog in cc gcc
3027 do
3028 # Extract the first word of "$ac_prog", so it can be a program name with args.
3029 set dummy $ac_prog; ac_word=$2
3030 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3031 echo "configure:3032: checking for $ac_word" >&5
3032 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3033   echo $ac_n "(cached) $ac_c" 1>&6
3034 else
3035   if test -n "$CC"; then
3036   ac_cv_prog_CC="$CC" # Let the user override the test.
3037 else
3038   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3039   ac_dummy="$PATH"
3040   for ac_dir in $ac_dummy; do
3041     test -z "$ac_dir" && ac_dir=.
3042     if test -f $ac_dir/$ac_word; then
3043       ac_cv_prog_CC="$ac_prog"
3044       break
3045     fi
3046   done
3047   IFS="$ac_save_ifs"
3048 fi
3049 fi
3050 CC="$ac_cv_prog_CC"
3051 if test -n "$CC"; then
3052   echo "$ac_t""$CC" 1>&6
3053 else
3054   echo "$ac_t""no" 1>&6
3055 fi
3056
3057 test -n "$CC" && break
3058 done
3059 test -n "$CC" || CC="missing"
3060
3061
3062         if test "${CC}" = "missing" ; then
3063                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3064         fi
3065 fi
3066
3067 if test -z "${AR}"; then
3068         for ac_prog in ar gar
3069 do
3070 # Extract the first word of "$ac_prog", so it can be a program name with args.
3071 set dummy $ac_prog; ac_word=$2
3072 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3073 echo "configure:3074: checking for $ac_word" >&5
3074 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3075   echo $ac_n "(cached) $ac_c" 1>&6
3076 else
3077   if test -n "$AR"; then
3078   ac_cv_prog_AR="$AR" # Let the user override the test.
3079 else
3080   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3081   ac_dummy="$PATH"
3082   for ac_dir in $ac_dummy; do
3083     test -z "$ac_dir" && ac_dir=.
3084     if test -f $ac_dir/$ac_word; then
3085       ac_cv_prog_AR="$ac_prog"
3086       break
3087     fi
3088   done
3089   IFS="$ac_save_ifs"
3090 fi
3091 fi
3092 AR="$ac_cv_prog_AR"
3093 if test -n "$AR"; then
3094   echo "$ac_t""$AR" 1>&6
3095 else
3096   echo "$ac_t""no" 1>&6
3097 fi
3098
3099 test -n "$AR" && break
3100 done
3101 test -n "$AR" || AR="missing"
3102
3103
3104         if test "${AR}" = "missing" ; then
3105                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3106         fi
3107 fi
3108
3109
3110
3111 # Find the correct PATH separator.  Usually this is `:', but
3112 # DJGPP uses `;' like DOS.
3113 if test "X${PATH_SEPARATOR+set}" != Xset; then
3114   UNAME=${UNAME-`uname 2>/dev/null`}
3115   case X$UNAME in
3116     *-DOS) lt_cv_sys_path_separator=';' ;;
3117     *)     lt_cv_sys_path_separator=':' ;;
3118   esac
3119   PATH_SEPARATOR=$lt_cv_sys_path_separator
3120 fi
3121
3122 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3123 echo "configure:3124: checking for Cygwin environment" >&5
3124 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3125   echo $ac_n "(cached) $ac_c" 1>&6
3126 else
3127   cat > conftest.$ac_ext <<EOF
3128 #line 3129 "configure"
3129 #include "confdefs.h"
3130
3131 int main() {
3132
3133 #ifndef __CYGWIN__
3134 #define __CYGWIN__ __CYGWIN32__
3135 #endif
3136 return __CYGWIN__;
3137 ; return 0; }
3138 EOF
3139 if { (eval echo configure:3140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3140   rm -rf conftest*
3141   ac_cv_cygwin=yes
3142 else
3143   echo "configure: failed program was:" >&5
3144   cat conftest.$ac_ext >&5
3145   rm -rf conftest*
3146   ac_cv_cygwin=no
3147 fi
3148 rm -f conftest*
3149 fi
3150
3151 echo "$ac_t""$ac_cv_cygwin" 1>&6
3152 CYGWIN=
3153 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3154 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3155 echo "configure:3156: checking for mingw32 environment" >&5
3156 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3157   echo $ac_n "(cached) $ac_c" 1>&6
3158 else
3159   cat > conftest.$ac_ext <<EOF
3160 #line 3161 "configure"
3161 #include "confdefs.h"
3162
3163 int main() {
3164 return __MINGW32__;
3165 ; return 0; }
3166 EOF
3167 if { (eval echo configure:3168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3168   rm -rf conftest*
3169   ac_cv_mingw32=yes
3170 else
3171   echo "configure: failed program was:" >&5
3172   cat conftest.$ac_ext >&5
3173   rm -rf conftest*
3174   ac_cv_mingw32=no
3175 fi
3176 rm -f conftest*
3177 fi
3178
3179 echo "$ac_t""$ac_cv_mingw32" 1>&6
3180 MINGW32=
3181 test "$ac_cv_mingw32" = yes && MINGW32=yes
3182 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3183 echo "configure:3184: checking for EMX OS/2 environment" >&5
3184 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3185   echo $ac_n "(cached) $ac_c" 1>&6
3186 else
3187   cat > conftest.$ac_ext <<EOF
3188 #line 3189 "configure"
3189 #include "confdefs.h"
3190
3191 int main() {
3192 return __EMX__;
3193 ; return 0; }
3194 EOF
3195 if { (eval echo configure:3196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3196   rm -rf conftest*
3197   ac_cv_emxos2=yes
3198 else
3199   echo "configure: failed program was:" >&5
3200   cat conftest.$ac_ext >&5
3201   rm -rf conftest*
3202   ac_cv_emxos2=no
3203 fi
3204 rm -f conftest*
3205 fi
3206
3207 echo "$ac_t""$ac_cv_emxos2" 1>&6
3208 EMXOS2=
3209 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3210 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3211 echo "configure:3212: checking how to run the C preprocessor" >&5
3212 # On Suns, sometimes $CPP names a directory.
3213 if test -n "$CPP" && test -d "$CPP"; then
3214   CPP=
3215 fi
3216 if test -z "$CPP"; then
3217 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3218   echo $ac_n "(cached) $ac_c" 1>&6
3219 else
3220     # This must be in double quotes, not single quotes, because CPP may get
3221   # substituted into the Makefile and "${CC-cc}" will confuse make.
3222   CPP="${CC-cc} -E"
3223   # On the NeXT, cc -E runs the code through the compiler's parser,
3224   # not just through cpp.
3225   cat > conftest.$ac_ext <<EOF
3226 #line 3227 "configure"
3227 #include "confdefs.h"
3228 #include <assert.h>
3229 Syntax Error
3230 EOF
3231 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3232 { (eval echo configure:3233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3233 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3234 if test -z "$ac_err"; then
3235   :
3236 else
3237   echo "$ac_err" >&5
3238   echo "configure: failed program was:" >&5
3239   cat conftest.$ac_ext >&5
3240   rm -rf conftest*
3241   CPP="${CC-cc} -E -traditional-cpp"
3242   cat > conftest.$ac_ext <<EOF
3243 #line 3244 "configure"
3244 #include "confdefs.h"
3245 #include <assert.h>
3246 Syntax Error
3247 EOF
3248 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3249 { (eval echo configure:3250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3250 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3251 if test -z "$ac_err"; then
3252   :
3253 else
3254   echo "$ac_err" >&5
3255   echo "configure: failed program was:" >&5
3256   cat conftest.$ac_ext >&5
3257   rm -rf conftest*
3258   CPP="${CC-cc} -nologo -E"
3259   cat > conftest.$ac_ext <<EOF
3260 #line 3261 "configure"
3261 #include "confdefs.h"
3262 #include <assert.h>
3263 Syntax Error
3264 EOF
3265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3266 { (eval echo configure:3267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3268 if test -z "$ac_err"; then
3269   :
3270 else
3271   echo "$ac_err" >&5
3272   echo "configure: failed program was:" >&5
3273   cat conftest.$ac_ext >&5
3274   rm -rf conftest*
3275   CPP=/lib/cpp
3276 fi
3277 rm -f conftest*
3278 fi
3279 rm -f conftest*
3280 fi
3281 rm -f conftest*
3282   ac_cv_prog_CPP="$CPP"
3283 fi
3284   CPP="$ac_cv_prog_CPP"
3285 else
3286   ac_cv_prog_CPP="$CPP"
3287 fi
3288 echo "$ac_t""$CPP" 1>&6
3289
3290 # Check whether --enable-fast-install or --disable-fast-install was given.
3291 if test "${enable_fast_install+set}" = set; then
3292   enableval="$enable_fast_install"
3293   p=${PACKAGE-default}
3294 case $enableval in
3295 yes) enable_fast_install=yes ;;
3296 no) enable_fast_install=no ;;
3297 *)
3298   enable_fast_install=no
3299   # Look at the argument we got.  We use all the common list separators.
3300   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3301   for pkg in $enableval; do
3302     if test "X$pkg" = "X$p"; then
3303       enable_fast_install=yes
3304     fi
3305   done
3306   IFS="$ac_save_ifs"
3307   ;;
3308 esac
3309 else
3310   enable_fast_install=yes
3311 fi
3312
3313 # Extract the first word of "gcc", so it can be a program name with args.
3314 set dummy gcc; ac_word=$2
3315 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3316 echo "configure:3317: checking for $ac_word" >&5
3317 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3318   echo $ac_n "(cached) $ac_c" 1>&6
3319 else
3320   if test -n "$CC"; then
3321   ac_cv_prog_CC="$CC" # Let the user override the test.
3322 else
3323   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3324   ac_dummy="$PATH"
3325   for ac_dir in $ac_dummy; do
3326     test -z "$ac_dir" && ac_dir=.
3327     if test -f $ac_dir/$ac_word; then
3328       ac_cv_prog_CC="gcc"
3329       break
3330     fi
3331   done
3332   IFS="$ac_save_ifs"
3333 fi
3334 fi
3335 CC="$ac_cv_prog_CC"
3336 if test -n "$CC"; then
3337   echo "$ac_t""$CC" 1>&6
3338 else
3339   echo "$ac_t""no" 1>&6
3340 fi
3341
3342 if test -z "$CC"; then
3343   # Extract the first word of "cc", so it can be a program name with args.
3344 set dummy cc; ac_word=$2
3345 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3346 echo "configure:3347: checking for $ac_word" >&5
3347 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3348   echo $ac_n "(cached) $ac_c" 1>&6
3349 else
3350   if test -n "$CC"; then
3351   ac_cv_prog_CC="$CC" # Let the user override the test.
3352 else
3353   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3354   ac_prog_rejected=no
3355   ac_dummy="$PATH"
3356   for ac_dir in $ac_dummy; do
3357     test -z "$ac_dir" && ac_dir=.
3358     if test -f $ac_dir/$ac_word; then
3359       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3360         ac_prog_rejected=yes
3361         continue
3362       fi
3363       ac_cv_prog_CC="cc"
3364       break
3365     fi
3366   done
3367   IFS="$ac_save_ifs"
3368 if test $ac_prog_rejected = yes; then
3369   # We found a bogon in the path, so make sure we never use it.
3370   set dummy $ac_cv_prog_CC
3371   shift
3372   if test $# -gt 0; then
3373     # We chose a different compiler from the bogus one.
3374     # However, it has the same basename, so the bogon will be chosen
3375     # first if we set CC to just the basename; use the full file name.
3376     shift
3377     set dummy "$ac_dir/$ac_word" "$@"
3378     shift
3379     ac_cv_prog_CC="$@"
3380   fi
3381 fi
3382 fi
3383 fi
3384 CC="$ac_cv_prog_CC"
3385 if test -n "$CC"; then
3386   echo "$ac_t""$CC" 1>&6
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390
3391   if test -z "$CC"; then
3392     case "`uname -s`" in
3393     *win32* | *WIN32* | *CYGWIN*)
3394       # Extract the first word of "cl", so it can be a program name with args.
3395 set dummy cl; ac_word=$2
3396 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3397 echo "configure:3398: checking for $ac_word" >&5
3398 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3399   echo $ac_n "(cached) $ac_c" 1>&6
3400 else
3401   if test -n "$CC"; then
3402   ac_cv_prog_CC="$CC" # Let the user override the test.
3403 else
3404   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3405   ac_dummy="$PATH"
3406   for ac_dir in $ac_dummy; do
3407     test -z "$ac_dir" && ac_dir=.
3408     if test -f $ac_dir/$ac_word; then
3409       ac_cv_prog_CC="cl"
3410       break
3411     fi
3412   done
3413   IFS="$ac_save_ifs"
3414 fi
3415 fi
3416 CC="$ac_cv_prog_CC"
3417 if test -n "$CC"; then
3418   echo "$ac_t""$CC" 1>&6
3419 else
3420   echo "$ac_t""no" 1>&6
3421 fi
3422  ;;
3423     esac
3424   fi
3425   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3426 fi
3427
3428 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3429 echo "configure:3430: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3430
3431 ac_ext=c
3432 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3433 ac_cpp='$CPP $CPPFLAGS'
3434 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3435 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3436 cross_compiling=$ac_cv_prog_cc_cross
3437
3438 cat > conftest.$ac_ext << EOF
3439
3440 #line 3441 "configure"
3441 #include "confdefs.h"
3442
3443 main(){return(0);}
3444 EOF
3445 if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3446   ac_cv_prog_cc_works=yes
3447   # If we can't run a trivial program, we are probably using a cross compiler.
3448   if (./conftest; exit) 2>/dev/null; then
3449     ac_cv_prog_cc_cross=no
3450   else
3451     ac_cv_prog_cc_cross=yes
3452   fi
3453 else
3454   echo "configure: failed program was:" >&5
3455   cat conftest.$ac_ext >&5
3456   ac_cv_prog_cc_works=no
3457 fi
3458 rm -fr conftest*
3459 ac_ext=c
3460 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3461 ac_cpp='$CPP $CPPFLAGS'
3462 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3463 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3464 cross_compiling=$ac_cv_prog_cc_cross
3465
3466 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3467 if test $ac_cv_prog_cc_works = no; then
3468   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3469 fi
3470 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3471 echo "configure:3472: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3472 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3473 cross_compiling=$ac_cv_prog_cc_cross
3474
3475 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3476 echo "configure:3477: checking whether we are using GNU C" >&5
3477 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3478   echo $ac_n "(cached) $ac_c" 1>&6
3479 else
3480   cat > conftest.c <<EOF
3481 #ifdef __GNUC__
3482   yes;
3483 #endif
3484 EOF
3485 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3486   ac_cv_prog_gcc=yes
3487 else
3488   ac_cv_prog_gcc=no
3489 fi
3490 fi
3491
3492 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3493
3494 if test $ac_cv_prog_gcc = yes; then
3495   GCC=yes
3496 else
3497   GCC=
3498 fi
3499
3500 ac_test_CFLAGS="${CFLAGS+set}"
3501 ac_save_CFLAGS="$CFLAGS"
3502 CFLAGS=
3503 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3504 echo "configure:3505: checking whether ${CC-cc} accepts -g" >&5
3505 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3506   echo $ac_n "(cached) $ac_c" 1>&6
3507 else
3508   echo 'void f(){}' > conftest.c
3509 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3510   ac_cv_prog_cc_g=yes
3511 else
3512   ac_cv_prog_cc_g=no
3513 fi
3514 rm -f conftest*
3515
3516 fi
3517
3518 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3519 if test "$ac_test_CFLAGS" = set; then
3520   CFLAGS="$ac_save_CFLAGS"
3521 elif test $ac_cv_prog_cc_g = yes; then
3522   if test "$GCC" = yes; then
3523     CFLAGS="-g -O2"
3524   else
3525     CFLAGS="-g"
3526   fi
3527 else
3528   if test "$GCC" = yes; then
3529     CFLAGS="-O2"
3530   else
3531     CFLAGS=
3532   fi
3533 fi
3534
3535 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3536 if test "${with_gnu_ld+set}" = set; then
3537   withval="$with_gnu_ld"
3538   test "$withval" = no || with_gnu_ld=yes
3539 else
3540   with_gnu_ld=no
3541 fi
3542
3543 ac_prog=ld
3544 if test "$GCC" = yes; then
3545   # Check if gcc -print-prog-name=ld gives a path.
3546   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3547 echo "configure:3548: checking for ld used by GCC" >&5
3548   case $host in
3549   *-*-mingw*)
3550     # gcc leaves a trailing carriage return which upsets mingw
3551     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3552   *)
3553     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3554   esac
3555   case $ac_prog in
3556     # Accept absolute paths.
3557     [\\/]* | [A-Za-z]:[\\/]*)
3558       re_direlt='/[^/][^/]*/\.\./'
3559       # Canonicalize the path of ld
3560       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3561       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3562         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3563       done
3564       test -z "$LD" && LD="$ac_prog"
3565       ;;
3566   "")
3567     # If it fails, then pretend we aren't using GCC.
3568     ac_prog=ld
3569     ;;
3570   *)
3571     # If it is relative, then search for the first ld in PATH.
3572     with_gnu_ld=unknown
3573     ;;
3574   esac
3575 elif test "$with_gnu_ld" = yes; then
3576   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3577 echo "configure:3578: checking for GNU ld" >&5
3578 else
3579   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3580 echo "configure:3581: checking for non-GNU ld" >&5
3581 fi
3582 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3583   echo $ac_n "(cached) $ac_c" 1>&6
3584 else
3585   if test -z "$LD"; then
3586   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3587   for ac_dir in $PATH; do
3588     test -z "$ac_dir" && ac_dir=.
3589     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3590       lt_cv_path_LD="$ac_dir/$ac_prog"
3591       # Check to see if the program is GNU ld.  I'd rather use --version,
3592       # but apparently some GNU ld's only accept -v.
3593       # Break only if it was the GNU/non-GNU ld that we prefer.
3594       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3595         test "$with_gnu_ld" != no && break
3596       else
3597         test "$with_gnu_ld" != yes && break
3598       fi
3599     fi
3600   done
3601   IFS="$ac_save_ifs"
3602 else
3603   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3604 fi
3605 fi
3606
3607 LD="$lt_cv_path_LD"
3608 if test -n "$LD"; then
3609   echo "$ac_t""$LD" 1>&6
3610 else
3611   echo "$ac_t""no" 1>&6
3612 fi
3613 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3614 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3615 echo "configure:3616: checking if the linker ($LD) is GNU ld" >&5
3616 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3617   echo $ac_n "(cached) $ac_c" 1>&6
3618 else
3619   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3620 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3621   lt_cv_prog_gnu_ld=yes
3622 else
3623   lt_cv_prog_gnu_ld=no
3624 fi
3625 fi
3626
3627 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3628 with_gnu_ld=$lt_cv_prog_gnu_ld
3629
3630
3631 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3632 echo "configure:3633: checking for $LD option to reload object files" >&5
3633 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3634   echo $ac_n "(cached) $ac_c" 1>&6
3635 else
3636   lt_cv_ld_reload_flag='-r'
3637 fi
3638
3639 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3640 reload_flag=$lt_cv_ld_reload_flag
3641 test -n "$reload_flag" && reload_flag=" $reload_flag"
3642
3643 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3644 echo "configure:3645: checking for BSD-compatible nm" >&5
3645 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3646   echo $ac_n "(cached) $ac_c" 1>&6
3647 else
3648   if test -n "$NM"; then
3649   # Let the user override the test.
3650   lt_cv_path_NM="$NM"
3651 else
3652   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3653   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3654     test -z "$ac_dir" && ac_dir=.
3655     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3656     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3657       # Check to see if the nm accepts a BSD-compat flag.
3658       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3659       #   nm: unknown option "B" ignored
3660       # Tru64's nm complains that /dev/null is an invalid object file
3661       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3662         lt_cv_path_NM="$tmp_nm -B"
3663         break
3664       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3665         lt_cv_path_NM="$tmp_nm -p"
3666         break
3667       else
3668         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3669         continue # so that we can try to find one that supports BSD flags
3670       fi
3671     fi
3672   done
3673   IFS="$ac_save_ifs"
3674   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3675 fi
3676 fi
3677
3678 NM="$lt_cv_path_NM"
3679 echo "$ac_t""$NM" 1>&6
3680
3681 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3682 echo "configure:3683: checking for a sed that does not truncate output" >&5
3683 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3684   echo $ac_n "(cached) $ac_c" 1>&6
3685 else
3686   # Loop through the user's path and test for sed and gsed.
3687 # Then use that list of sed's as ones to test for truncation.
3688 as_executable_p="test -f"
3689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3690 for as_dir in $PATH
3691 do
3692   IFS=$as_save_IFS
3693   test -z "$as_dir" && as_dir=.
3694   for ac_prog in sed gsed; do
3695     for ac_exec_ext in '' $ac_executable_extensions; do
3696       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3697         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3698       fi
3699     done
3700   done
3701 done
3702
3703   # Create a temporary directory, and hook for its removal unless debugging.
3704 $debug ||
3705 {
3706   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3707   trap '{ (exit 1); exit 1; }' 1 2 13 15
3708 }
3709
3710 # Create a (secure) tmp directory for tmp files.
3711 : ${TMPDIR=/tmp}
3712 {
3713   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3714   test -n "$tmp" && test -d "$tmp"
3715 }  ||
3716 {
3717   tmp=$TMPDIR/sed$$-$RANDOM
3718   (umask 077 && mkdir $tmp)
3719 } ||
3720 {
3721    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3722    { (exit 1); exit 1; }
3723 }
3724   _max=0
3725   _count=0
3726   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3727   # along with /bin/sed that truncates output.
3728   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3729     test ! -f ${_sed} && break
3730     cat /dev/null > "$tmp/sed.in"
3731     _count=0
3732     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3733     # Check for GNU sed and select it if it is found.
3734     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3735       lt_cv_path_SED=${_sed}
3736       break
3737     fi
3738     while true; do
3739       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3740       mv "$tmp/sed.tmp" "$tmp/sed.in"
3741       cp "$tmp/sed.in" "$tmp/sed.nl"
3742       echo >>"$tmp/sed.nl"
3743       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3744       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3745       # 40000 chars as input seems more than enough
3746       test $_count -gt 10 && break
3747       _count=`expr $_count + 1`
3748       if test $_count -gt $_max; then
3749         _max=$_count
3750         lt_cv_path_SED=$_sed
3751       fi
3752     done
3753   done
3754   rm -rf "$tmp"
3755
3756 fi
3757
3758 if test "X$SED" != "X"; then
3759   lt_cv_path_SED=$SED
3760 else
3761   SED=$lt_cv_path_SED
3762 fi
3763 echo "$ac_t""$SED" 1>&6
3764
3765 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3766 echo "configure:3767: checking whether ln -s works" >&5
3767 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3768   echo $ac_n "(cached) $ac_c" 1>&6
3769 else
3770   rm -f conftestdata
3771 if ln -s X conftestdata 2>/dev/null
3772 then
3773   rm -f conftestdata
3774   ac_cv_prog_LN_S="ln -s"
3775 else
3776   ac_cv_prog_LN_S=ln
3777 fi
3778 fi
3779 LN_S="$ac_cv_prog_LN_S"
3780 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3781   echo "$ac_t""yes" 1>&6
3782 else
3783   echo "$ac_t""no" 1>&6
3784 fi
3785
3786 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3787 echo "configure:3788: checking how to recognise dependent libraries" >&5
3788 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3789   echo $ac_n "(cached) $ac_c" 1>&6
3790 else
3791   lt_cv_file_magic_cmd='$MAGIC_CMD'
3792 lt_cv_file_magic_test_file=
3793 lt_cv_deplibs_check_method='unknown'
3794 # Need to set the preceding variable on all platforms that support
3795 # interlibrary dependencies.
3796 # 'none' -- dependencies not supported.
3797 # `unknown' -- same as none, but documents that we really don't know.
3798 # 'pass_all' -- all dependencies passed with no checks.
3799 # 'test_compile' -- check by making test program.
3800 # 'file_magic [[regex]]' -- check by looking for files in library path
3801 # which responds to the $file_magic_cmd with a given egrep regex.
3802 # If you have `file' or equivalent on your system and you're not sure
3803 # whether `pass_all' will *always* work, you probably want this one.
3804
3805 case $host_os in
3806 aix4* | aix5*)
3807   lt_cv_deplibs_check_method=pass_all
3808   ;;
3809
3810 beos*)
3811   lt_cv_deplibs_check_method=pass_all
3812   ;;
3813
3814 bsdi4*)
3815   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3816   lt_cv_file_magic_cmd='/usr/bin/file -L'
3817   lt_cv_file_magic_test_file=/shlib/libc.so
3818   ;;
3819
3820 cygwin* | mingw* | pw32*)
3821   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3822   lt_cv_file_magic_cmd='$OBJDUMP -f'
3823   ;;
3824
3825 darwin* | rhapsody*)
3826   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3827   lt_cv_file_magic_cmd='/usr/bin/file -L'
3828   case "$host_os" in
3829   rhapsody* | darwin1.[012])
3830     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3831     ;;
3832   *) # Darwin 1.3 on
3833     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3834     ;;
3835   esac
3836   ;;
3837
3838 freebsd*)
3839   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3840     case $host_cpu in
3841     i*86 )
3842       # Not sure whether the presence of OpenBSD here was a mistake.
3843       # Let's accept both of them until this is cleared up.
3844       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3845       lt_cv_file_magic_cmd=/usr/bin/file
3846       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3847       ;;
3848     esac
3849   else
3850     lt_cv_deplibs_check_method=pass_all
3851   fi
3852   ;;
3853
3854 gnu*)
3855   lt_cv_deplibs_check_method=pass_all
3856   ;;
3857
3858 hpux10.20*|hpux11*)
3859   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3860   lt_cv_file_magic_cmd=/usr/bin/file
3861   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3862   ;;
3863
3864 irix5* | irix6* | nonstopux*)
3865   case $host_os in
3866   irix5* | nonstopux*)
3867     # this will be overridden with pass_all, but let us keep it just in case
3868     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3869     ;;
3870   *)
3871     case $LD in
3872     *-32|*"-32 ") libmagic=32-bit;;
3873     *-n32|*"-n32 ") libmagic=N32;;
3874     *-64|*"-64 ") libmagic=64-bit;;
3875     *) libmagic=never-match;;
3876     esac
3877     # this will be overridden with pass_all, but let us keep it just in case
3878     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3879     ;;
3880   esac
3881   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3882   lt_cv_deplibs_check_method=pass_all
3883   ;;
3884
3885 # This must be Linux ELF.
3886 linux-gnu*)
3887   case $host_cpu in
3888   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3889     lt_cv_deplibs_check_method=pass_all ;;
3890   *)
3891     # glibc up to 2.1.1 does not perform some relocations on ARM
3892     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3893   esac
3894   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3895   ;;
3896
3897 netbsd*)
3898   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3899     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3900   else
3901     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3902   fi
3903   ;;
3904
3905 newos6*)
3906   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3907   lt_cv_file_magic_cmd=/usr/bin/file
3908   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3909   ;;
3910
3911 openbsd*)
3912   lt_cv_file_magic_cmd=/usr/bin/file
3913   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3914   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3915     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3916   else
3917     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3918   fi
3919   ;;
3920
3921 openedition*)
3922   lt_cv_deplibs_check_method=pass_all
3923   ;;
3924
3925 osf3* | osf4* | osf5*)
3926   # this will be overridden with pass_all, but let us keep it just in case
3927   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3928   lt_cv_file_magic_test_file=/shlib/libc.so
3929   lt_cv_deplibs_check_method=pass_all
3930   ;;
3931
3932 sco3.2v5*)
3933   lt_cv_deplibs_check_method=pass_all
3934   ;;
3935
3936 solaris*)
3937   lt_cv_deplibs_check_method=pass_all
3938   lt_cv_file_magic_test_file=/lib/libc.so
3939   ;;
3940
3941 sysv5uw[78]* | sysv4*uw2*)
3942   lt_cv_deplibs_check_method=pass_all
3943   ;;
3944
3945 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3946   case $host_vendor in
3947   motorola)
3948     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]'
3949     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3950     ;;
3951   ncr)
3952     lt_cv_deplibs_check_method=pass_all
3953     ;;
3954   sequent)
3955     lt_cv_file_magic_cmd='/bin/file'
3956     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3957     ;;
3958   sni)
3959     lt_cv_file_magic_cmd='/bin/file'
3960     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3961     lt_cv_file_magic_test_file=/lib/libc.so
3962     ;;
3963   siemens)
3964     lt_cv_deplibs_check_method=pass_all
3965     ;;
3966   esac
3967   ;;
3968 esac
3969
3970 fi
3971
3972 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3973 file_magic_cmd=$lt_cv_file_magic_cmd
3974 deplibs_check_method=$lt_cv_deplibs_check_method
3975
3976 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3977 echo "configure:3978: checking for object suffix" >&5
3978 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3979   echo $ac_n "(cached) $ac_c" 1>&6
3980 else
3981   rm -f conftest*
3982 echo 'int i = 1;' > conftest.$ac_ext
3983 if { (eval echo configure:3984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3984   for ac_file in conftest.*; do
3985     case $ac_file in
3986     *.c) ;;
3987     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3988     esac
3989   done
3990 else
3991   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3992 fi
3993 rm -f conftest*
3994 fi
3995
3996 echo "$ac_t""$ac_cv_objext" 1>&6
3997 OBJEXT=$ac_cv_objext
3998 ac_objext=$ac_cv_objext
3999
4000
4001
4002
4003 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4004 echo "configure:4005: checking for executable suffix" >&5
4005 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4006   echo $ac_n "(cached) $ac_c" 1>&6
4007 else
4008   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4009   ac_cv_exeext=.exe
4010 else
4011   rm -f conftest*
4012   echo 'int main () { return 0; }' > conftest.$ac_ext
4013   ac_cv_exeext=
4014   if { (eval echo configure:4015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4015     for file in conftest.*; do
4016       case $file in
4017       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4018       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4019       esac
4020     done
4021   else
4022     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4023   fi
4024   rm -f conftest*
4025   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4026 fi
4027 fi
4028
4029 EXEEXT=""
4030 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4031 echo "$ac_t""${ac_cv_exeext}" 1>&6
4032 ac_exeext=$EXEEXT
4033
4034 if test $host != $build; then
4035   ac_tool_prefix=${host_alias}-
4036 else
4037   ac_tool_prefix=
4038 fi
4039
4040
4041
4042
4043 # Check for command to grab the raw symbol name followed by C symbol from nm.
4044 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4045 echo "configure:4046: checking command to parse $NM output" >&5
4046 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4047   echo $ac_n "(cached) $ac_c" 1>&6
4048 else
4049   
4050 # These are sane defaults that work on at least a few old systems.
4051 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4052
4053 # Character class describing NM global symbol codes.
4054 symcode='[BCDEGRST]'
4055
4056 # Regexp to match symbols that can be accessed directly from C.
4057 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4058
4059 # Transform the above into a raw symbol and a C symbol.
4060 symxfrm='\1 \2\3 \3'
4061
4062 # Transform an extracted symbol line into a proper C declaration
4063 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4064
4065 # Transform an extracted symbol line into symbol name and symbol address
4066 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'"
4067
4068 # Define system-specific variables.
4069 case $host_os in
4070 aix*)
4071   symcode='[BCDT]'
4072   ;;
4073 cygwin* | mingw* | pw32*)
4074   symcode='[ABCDGISTW]'
4075   ;;
4076 hpux*) # Its linker distinguishes data from code symbols
4077   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4078   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'"
4079   ;;
4080 irix* | nonstopux*)
4081   symcode='[BCDEGRST]'
4082   ;;
4083 osf*)
4084   symcode='[BCDEGQRST]'
4085   ;;
4086 solaris* | sysv5*)
4087   symcode='[BDT]'
4088   ;;
4089 sysv4)
4090   symcode='[DFNSTU]'
4091   ;;
4092 esac
4093
4094 # Handle CRLF in mingw tool chain
4095 opt_cr=
4096 case $host_os in
4097 mingw*)
4098   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4099   ;;
4100 esac
4101
4102 # If we're using GNU nm, then use its standard symbol codes.
4103 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4104   symcode='[ABCDGISTW]'
4105 fi
4106
4107 # Try without a prefix undercore, then with it.
4108 for ac_symprfx in "" "_"; do
4109
4110   # Write the raw and C identifiers.
4111 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4112
4113   # Check to see that the pipe works correctly.
4114   pipe_works=no
4115   rm -f conftest*
4116   cat > conftest.$ac_ext <<EOF
4117 #ifdef __cplusplus
4118 extern "C" {
4119 #endif
4120 char nm_test_var;
4121 void nm_test_func(){}
4122 #ifdef __cplusplus
4123 }
4124 #endif
4125 int main(){nm_test_var='a';nm_test_func();return(0);}
4126 EOF
4127
4128   if { (eval echo configure:4129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4129     # Now try to grab the symbols.
4130     nlist=conftest.nm
4131     if { (eval echo configure:4132: \"$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
4132       # Try sorting and uniquifying the output.
4133       if sort "$nlist" | uniq > "$nlist"T; then
4134         mv -f "$nlist"T "$nlist"
4135       else
4136         rm -f "$nlist"T
4137       fi
4138
4139       # Make sure that we snagged all the symbols we need.
4140       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4141         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4142           cat <<EOF > conftest.$ac_ext
4143 #ifdef __cplusplus
4144 extern "C" {
4145 #endif
4146
4147 EOF
4148           # Now generate the symbol file.
4149           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4150
4151           cat <<EOF >> conftest.$ac_ext
4152 #if defined (__STDC__) && __STDC__
4153 # define lt_ptr void *
4154 #else
4155 # define lt_ptr char *
4156 # define const
4157 #endif
4158
4159 /* The mapping between symbol names and symbols. */
4160 const struct {
4161   const char *name;
4162   lt_ptr address;
4163 }
4164 lt_preloaded_symbols[] =
4165 {
4166 EOF
4167           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4168           cat <<\EOF >> conftest.$ac_ext
4169   {0, (lt_ptr) 0}
4170 };
4171
4172 #ifdef __cplusplus
4173 }
4174 #endif
4175 EOF
4176           # Now try linking the two files.
4177           mv conftest.$ac_objext conftstm.$ac_objext
4178           save_LIBS="$LIBS"
4179           save_CFLAGS="$CFLAGS"
4180           LIBS="conftstm.$ac_objext"
4181           CFLAGS="$CFLAGS$no_builtin_flag"
4182           if { (eval echo configure:4183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4183             pipe_works=yes
4184           fi
4185           LIBS="$save_LIBS"
4186           CFLAGS="$save_CFLAGS"
4187         else
4188           echo "cannot find nm_test_func in $nlist" >&5
4189         fi
4190       else
4191         echo "cannot find nm_test_var in $nlist" >&5
4192       fi
4193     else
4194       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4195     fi
4196   else
4197     echo "$progname: failed program was:" >&5
4198     cat conftest.$ac_ext >&5
4199   fi
4200   rm -f conftest* conftst*
4201
4202   # Do not use the global_symbol_pipe unless it works.
4203   if test "$pipe_works" = yes; then
4204     break
4205   else
4206     lt_cv_sys_global_symbol_pipe=
4207   fi
4208 done
4209
4210 fi
4211
4212 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4213 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4214   global_symbol_to_cdecl=
4215   global_symbol_to_c_name_address=
4216 else
4217   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4218   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4219 fi
4220 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4221 then
4222   echo "$ac_t""failed" 1>&6
4223 else
4224   echo "$ac_t""ok" 1>&6
4225 fi
4226
4227 for ac_hdr in dlfcn.h
4228 do
4229 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4230 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4231 echo "configure:4232: checking for $ac_hdr" >&5
4232 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4233   echo $ac_n "(cached) $ac_c" 1>&6
4234 else
4235   cat > conftest.$ac_ext <<EOF
4236 #line 4237 "configure"
4237 #include "confdefs.h"
4238 #include <$ac_hdr>
4239 EOF
4240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4241 { (eval echo configure:4242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4243 if test -z "$ac_err"; then
4244   rm -rf conftest*
4245   eval "ac_cv_header_$ac_safe=yes"
4246 else
4247   echo "$ac_err" >&5
4248   echo "configure: failed program was:" >&5
4249   cat conftest.$ac_ext >&5
4250   rm -rf conftest*
4251   eval "ac_cv_header_$ac_safe=no"
4252 fi
4253 rm -f conftest*
4254 fi
4255 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4256   echo "$ac_t""yes" 1>&6
4257     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4258   cat >> confdefs.h <<EOF
4259 #define $ac_tr_hdr 1
4260 EOF
4261  
4262 else
4263   echo "$ac_t""no" 1>&6
4264 fi
4265 done
4266
4267
4268
4269
4270
4271
4272 # Only perform the check for file, if the check method requires it
4273 case $deplibs_check_method in
4274 file_magic*)
4275   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4276     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4277 echo "configure:4278: checking for ${ac_tool_prefix}file" >&5
4278 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4279   echo $ac_n "(cached) $ac_c" 1>&6
4280 else
4281   case $MAGIC_CMD in
4282   /*)
4283   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4284   ;;
4285   ?:/*)
4286   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4287   ;;
4288   *)
4289   ac_save_MAGIC_CMD="$MAGIC_CMD"
4290   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4291   ac_dummy="/usr/bin:$PATH"
4292   for ac_dir in $ac_dummy; do
4293     test -z "$ac_dir" && ac_dir=.
4294     if test -f $ac_dir/${ac_tool_prefix}file; then
4295       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4296       if test -n "$file_magic_test_file"; then
4297         case $deplibs_check_method in
4298         "file_magic "*)
4299           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4300           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4301           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4302             egrep "$file_magic_regex" > /dev/null; then
4303             :
4304           else
4305             cat <<EOF 1>&2
4306
4307 *** Warning: the command libtool uses to detect shared libraries,
4308 *** $file_magic_cmd, produces output that libtool cannot recognize.
4309 *** The result is that libtool may fail to recognize shared libraries
4310 *** as such.  This will affect the creation of libtool libraries that
4311 *** depend on shared libraries, but programs linked with such libtool
4312 *** libraries will work regardless of this problem.  Nevertheless, you
4313 *** may want to report the problem to your system manager and/or to
4314 *** bug-libtool@gnu.org
4315
4316 EOF
4317           fi ;;
4318         esac
4319       fi
4320       break
4321     fi
4322   done
4323   IFS="$ac_save_ifs"
4324   MAGIC_CMD="$ac_save_MAGIC_CMD"
4325   ;;
4326 esac
4327 fi
4328
4329 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4330 if test -n "$MAGIC_CMD"; then
4331   echo "$ac_t""$MAGIC_CMD" 1>&6
4332 else
4333   echo "$ac_t""no" 1>&6
4334 fi
4335
4336 if test -z "$lt_cv_path_MAGIC_CMD"; then
4337   if test -n "$ac_tool_prefix"; then
4338     echo $ac_n "checking for file""... $ac_c" 1>&6
4339 echo "configure:4340: checking for file" >&5
4340 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4341   echo $ac_n "(cached) $ac_c" 1>&6
4342 else
4343   case $MAGIC_CMD in
4344   /*)
4345   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4346   ;;
4347   ?:/*)
4348   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4349   ;;
4350   *)
4351   ac_save_MAGIC_CMD="$MAGIC_CMD"
4352   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4353   ac_dummy="/usr/bin:$PATH"
4354   for ac_dir in $ac_dummy; do
4355     test -z "$ac_dir" && ac_dir=.
4356     if test -f $ac_dir/file; then
4357       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4358       if test -n "$file_magic_test_file"; then
4359         case $deplibs_check_method in
4360         "file_magic "*)
4361           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4362           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4363           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4364             egrep "$file_magic_regex" > /dev/null; then
4365             :
4366           else
4367             cat <<EOF 1>&2
4368
4369 *** Warning: the command libtool uses to detect shared libraries,
4370 *** $file_magic_cmd, produces output that libtool cannot recognize.
4371 *** The result is that libtool may fail to recognize shared libraries
4372 *** as such.  This will affect the creation of libtool libraries that
4373 *** depend on shared libraries, but programs linked with such libtool
4374 *** libraries will work regardless of this problem.  Nevertheless, you
4375 *** may want to report the problem to your system manager and/or to
4376 *** bug-libtool@gnu.org
4377
4378 EOF
4379           fi ;;
4380         esac
4381       fi
4382       break
4383     fi
4384   done
4385   IFS="$ac_save_ifs"
4386   MAGIC_CMD="$ac_save_MAGIC_CMD"
4387   ;;
4388 esac
4389 fi
4390
4391 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4392 if test -n "$MAGIC_CMD"; then
4393   echo "$ac_t""$MAGIC_CMD" 1>&6
4394 else
4395   echo "$ac_t""no" 1>&6
4396 fi
4397
4398   else
4399     MAGIC_CMD=:
4400   fi
4401 fi
4402
4403   fi
4404   ;;
4405 esac
4406
4407 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4408 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4409 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4410 echo "configure:4411: checking for $ac_word" >&5
4411 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4412   echo $ac_n "(cached) $ac_c" 1>&6
4413 else
4414   if test -n "$RANLIB"; then
4415   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4416 else
4417   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4418   ac_dummy="$PATH"
4419   for ac_dir in $ac_dummy; do
4420     test -z "$ac_dir" && ac_dir=.
4421     if test -f $ac_dir/$ac_word; then
4422       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4423       break
4424     fi
4425   done
4426   IFS="$ac_save_ifs"
4427 fi
4428 fi
4429 RANLIB="$ac_cv_prog_RANLIB"
4430 if test -n "$RANLIB"; then
4431   echo "$ac_t""$RANLIB" 1>&6
4432 else
4433   echo "$ac_t""no" 1>&6
4434 fi
4435
4436
4437 if test -z "$ac_cv_prog_RANLIB"; then
4438 if test -n "$ac_tool_prefix"; then
4439   # Extract the first word of "ranlib", so it can be a program name with args.
4440 set dummy ranlib; ac_word=$2
4441 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4442 echo "configure:4443: checking for $ac_word" >&5
4443 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4444   echo $ac_n "(cached) $ac_c" 1>&6
4445 else
4446   if test -n "$RANLIB"; then
4447   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4448 else
4449   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4450   ac_dummy="$PATH"
4451   for ac_dir in $ac_dummy; do
4452     test -z "$ac_dir" && ac_dir=.
4453     if test -f $ac_dir/$ac_word; then
4454       ac_cv_prog_RANLIB="ranlib"
4455       break
4456     fi
4457   done
4458   IFS="$ac_save_ifs"
4459   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4460 fi
4461 fi
4462 RANLIB="$ac_cv_prog_RANLIB"
4463 if test -n "$RANLIB"; then
4464   echo "$ac_t""$RANLIB" 1>&6
4465 else
4466   echo "$ac_t""no" 1>&6
4467 fi
4468
4469 else
4470   RANLIB=":"
4471 fi
4472 fi
4473
4474 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4475 set dummy ${ac_tool_prefix}strip; ac_word=$2
4476 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4477 echo "configure:4478: checking for $ac_word" >&5
4478 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4479   echo $ac_n "(cached) $ac_c" 1>&6
4480 else
4481   if test -n "$STRIP"; then
4482   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4483 else
4484   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4485   ac_dummy="$PATH"
4486   for ac_dir in $ac_dummy; do
4487     test -z "$ac_dir" && ac_dir=.
4488     if test -f $ac_dir/$ac_word; then
4489       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4490       break
4491     fi
4492   done
4493   IFS="$ac_save_ifs"
4494 fi
4495 fi
4496 STRIP="$ac_cv_prog_STRIP"
4497 if test -n "$STRIP"; then
4498   echo "$ac_t""$STRIP" 1>&6
4499 else
4500   echo "$ac_t""no" 1>&6
4501 fi
4502
4503
4504 if test -z "$ac_cv_prog_STRIP"; then
4505 if test -n "$ac_tool_prefix"; then
4506   # Extract the first word of "strip", so it can be a program name with args.
4507 set dummy strip; ac_word=$2
4508 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4509 echo "configure:4510: checking for $ac_word" >&5
4510 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4511   echo $ac_n "(cached) $ac_c" 1>&6
4512 else
4513   if test -n "$STRIP"; then
4514   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4515 else
4516   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4517   ac_dummy="$PATH"
4518   for ac_dir in $ac_dummy; do
4519     test -z "$ac_dir" && ac_dir=.
4520     if test -f $ac_dir/$ac_word; then
4521       ac_cv_prog_STRIP="strip"
4522       break
4523     fi
4524   done
4525   IFS="$ac_save_ifs"
4526   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4527 fi
4528 fi
4529 STRIP="$ac_cv_prog_STRIP"
4530 if test -n "$STRIP"; then
4531   echo "$ac_t""$STRIP" 1>&6
4532 else
4533   echo "$ac_t""no" 1>&6
4534 fi
4535
4536 else
4537   STRIP=":"
4538 fi
4539 fi
4540
4541
4542 enable_dlopen=yes
4543 enable_win32_dll=yes
4544
4545 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4546 if test "${enable_libtool_lock+set}" = set; then
4547   enableval="$enable_libtool_lock"
4548   :
4549 fi
4550
4551 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4552
4553 # Some flags need to be propagated to the compiler or linker for good
4554 # libtool support.
4555 case $host in
4556 *-*-irix6*)
4557   # Find out which ABI we are using.
4558   echo '#line 4559 "configure"' > conftest.$ac_ext
4559   if { (eval echo configure:4560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4560     case `/usr/bin/file conftest.$ac_objext` in
4561     *32-bit*)
4562       LD="${LD-ld} -32"
4563       ;;
4564     *N32*)
4565       LD="${LD-ld} -n32"
4566       ;;
4567     *64-bit*)
4568       LD="${LD-ld} -64"
4569       ;;
4570     esac
4571   fi
4572   rm -rf conftest*
4573   ;;
4574
4575 *-*-sco3.2v5*)
4576   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4577   SAVE_CFLAGS="$CFLAGS"
4578   CFLAGS="$CFLAGS -belf"
4579   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4580 echo "configure:4581: checking whether the C compiler needs -belf" >&5
4581 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4582   echo $ac_n "(cached) $ac_c" 1>&6
4583 else
4584   
4585      ac_ext=c
4586 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4587 ac_cpp='$CPP $CPPFLAGS'
4588 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4589 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4590 cross_compiling=$ac_cv_prog_cc_cross
4591
4592      cat > conftest.$ac_ext <<EOF
4593 #line 4594 "configure"
4594 #include "confdefs.h"
4595
4596 int main() {
4597
4598 ; return 0; }
4599 EOF
4600 if { (eval echo configure:4601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4601   rm -rf conftest*
4602   lt_cv_cc_needs_belf=yes
4603 else
4604   echo "configure: failed program was:" >&5
4605   cat conftest.$ac_ext >&5
4606   rm -rf conftest*
4607   lt_cv_cc_needs_belf=no
4608 fi
4609 rm -f conftest*
4610      ac_ext=c
4611 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4612 ac_cpp='$CPP $CPPFLAGS'
4613 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4614 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4615 cross_compiling=$ac_cv_prog_cc_cross
4616
4617 fi
4618
4619 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4620   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4621     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4622     CFLAGS="$SAVE_CFLAGS"
4623   fi
4624   ;;
4625
4626 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4627   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4628 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4629 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4630 echo "configure:4631: checking for $ac_word" >&5
4631 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4632   echo $ac_n "(cached) $ac_c" 1>&6
4633 else
4634   if test -n "$DLLTOOL"; then
4635   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4636 else
4637   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4638   ac_dummy="$PATH"
4639   for ac_dir in $ac_dummy; do
4640     test -z "$ac_dir" && ac_dir=.
4641     if test -f $ac_dir/$ac_word; then
4642       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4643       break
4644     fi
4645   done
4646   IFS="$ac_save_ifs"
4647 fi
4648 fi
4649 DLLTOOL="$ac_cv_prog_DLLTOOL"
4650 if test -n "$DLLTOOL"; then
4651   echo "$ac_t""$DLLTOOL" 1>&6
4652 else
4653   echo "$ac_t""no" 1>&6
4654 fi
4655
4656
4657 if test -z "$ac_cv_prog_DLLTOOL"; then
4658 if test -n "$ac_tool_prefix"; then
4659   # Extract the first word of "dlltool", so it can be a program name with args.
4660 set dummy dlltool; ac_word=$2
4661 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4662 echo "configure:4663: checking for $ac_word" >&5
4663 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4664   echo $ac_n "(cached) $ac_c" 1>&6
4665 else
4666   if test -n "$DLLTOOL"; then
4667   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4668 else
4669   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4670   ac_dummy="$PATH"
4671   for ac_dir in $ac_dummy; do
4672     test -z "$ac_dir" && ac_dir=.
4673     if test -f $ac_dir/$ac_word; then
4674       ac_cv_prog_DLLTOOL="dlltool"
4675       break
4676     fi
4677   done
4678   IFS="$ac_save_ifs"
4679   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4680 fi
4681 fi
4682 DLLTOOL="$ac_cv_prog_DLLTOOL"
4683 if test -n "$DLLTOOL"; then
4684   echo "$ac_t""$DLLTOOL" 1>&6
4685 else
4686   echo "$ac_t""no" 1>&6
4687 fi
4688
4689 else
4690   DLLTOOL="false"
4691 fi
4692 fi
4693
4694   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4695 set dummy ${ac_tool_prefix}as; ac_word=$2
4696 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4697 echo "configure:4698: checking for $ac_word" >&5
4698 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4699   echo $ac_n "(cached) $ac_c" 1>&6
4700 else
4701   if test -n "$AS"; then
4702   ac_cv_prog_AS="$AS" # Let the user override the test.
4703 else
4704   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4705   ac_dummy="$PATH"
4706   for ac_dir in $ac_dummy; do
4707     test -z "$ac_dir" && ac_dir=.
4708     if test -f $ac_dir/$ac_word; then
4709       ac_cv_prog_AS="${ac_tool_prefix}as"
4710       break
4711     fi
4712   done
4713   IFS="$ac_save_ifs"
4714 fi
4715 fi
4716 AS="$ac_cv_prog_AS"
4717 if test -n "$AS"; then
4718   echo "$ac_t""$AS" 1>&6
4719 else
4720   echo "$ac_t""no" 1>&6
4721 fi
4722
4723
4724 if test -z "$ac_cv_prog_AS"; then
4725 if test -n "$ac_tool_prefix"; then
4726   # Extract the first word of "as", so it can be a program name with args.
4727 set dummy as; ac_word=$2
4728 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4729 echo "configure:4730: checking for $ac_word" >&5
4730 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4731   echo $ac_n "(cached) $ac_c" 1>&6
4732 else
4733   if test -n "$AS"; then
4734   ac_cv_prog_AS="$AS" # Let the user override the test.
4735 else
4736   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4737   ac_dummy="$PATH"
4738   for ac_dir in $ac_dummy; do
4739     test -z "$ac_dir" && ac_dir=.
4740     if test -f $ac_dir/$ac_word; then
4741       ac_cv_prog_AS="as"
4742       break
4743     fi
4744   done
4745   IFS="$ac_save_ifs"
4746   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4747 fi
4748 fi
4749 AS="$ac_cv_prog_AS"
4750 if test -n "$AS"; then
4751   echo "$ac_t""$AS" 1>&6
4752 else
4753   echo "$ac_t""no" 1>&6
4754 fi
4755
4756 else
4757   AS="false"
4758 fi
4759 fi
4760
4761   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4762 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4763 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4764 echo "configure:4765: checking for $ac_word" >&5
4765 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4766   echo $ac_n "(cached) $ac_c" 1>&6
4767 else
4768   if test -n "$OBJDUMP"; then
4769   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4770 else
4771   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4772   ac_dummy="$PATH"
4773   for ac_dir in $ac_dummy; do
4774     test -z "$ac_dir" && ac_dir=.
4775     if test -f $ac_dir/$ac_word; then
4776       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4777       break
4778     fi
4779   done
4780   IFS="$ac_save_ifs"
4781 fi
4782 fi
4783 OBJDUMP="$ac_cv_prog_OBJDUMP"
4784 if test -n "$OBJDUMP"; then
4785   echo "$ac_t""$OBJDUMP" 1>&6
4786 else
4787   echo "$ac_t""no" 1>&6
4788 fi
4789
4790
4791 if test -z "$ac_cv_prog_OBJDUMP"; then
4792 if test -n "$ac_tool_prefix"; then
4793   # Extract the first word of "objdump", so it can be a program name with args.
4794 set dummy objdump; ac_word=$2
4795 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4796 echo "configure:4797: checking for $ac_word" >&5
4797 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4798   echo $ac_n "(cached) $ac_c" 1>&6
4799 else
4800   if test -n "$OBJDUMP"; then
4801   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4802 else
4803   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4804   ac_dummy="$PATH"
4805   for ac_dir in $ac_dummy; do
4806     test -z "$ac_dir" && ac_dir=.
4807     if test -f $ac_dir/$ac_word; then
4808       ac_cv_prog_OBJDUMP="objdump"
4809       break
4810     fi
4811   done
4812   IFS="$ac_save_ifs"
4813   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4814 fi
4815 fi
4816 OBJDUMP="$ac_cv_prog_OBJDUMP"
4817 if test -n "$OBJDUMP"; then
4818   echo "$ac_t""$OBJDUMP" 1>&6
4819 else
4820   echo "$ac_t""no" 1>&6
4821 fi
4822
4823 else
4824   OBJDUMP="false"
4825 fi
4826 fi
4827
4828
4829   # recent cygwin and mingw systems supply a stub DllMain which the user
4830   # can override, but on older systems we have to supply one
4831   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4832 echo "configure:4833: checking if libtool should supply DllMain function" >&5
4833 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4834   echo $ac_n "(cached) $ac_c" 1>&6
4835 else
4836   cat > conftest.$ac_ext <<EOF
4837 #line 4838 "configure"
4838 #include "confdefs.h"
4839
4840 int main() {
4841 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4842       DllMain (0, 0, 0);
4843 ; return 0; }
4844 EOF
4845 if { (eval echo configure:4846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4846   rm -rf conftest*
4847   lt_cv_need_dllmain=no
4848 else
4849   echo "configure: failed program was:" >&5
4850   cat conftest.$ac_ext >&5
4851   rm -rf conftest*
4852   lt_cv_need_dllmain=yes
4853 fi
4854 rm -f conftest*
4855 fi
4856
4857 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4858
4859   case $host/$CC in
4860   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4861     # old mingw systems require "-dll" to link a DLL, while more recent ones
4862     # require "-mdll"
4863     SAVE_CFLAGS="$CFLAGS"
4864     CFLAGS="$CFLAGS -mdll"
4865     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4866 echo "configure:4867: checking how to link DLLs" >&5
4867 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4868   echo $ac_n "(cached) $ac_c" 1>&6
4869 else
4870   cat > conftest.$ac_ext <<EOF
4871 #line 4872 "configure"
4872 #include "confdefs.h"
4873
4874 int main() {
4875
4876 ; return 0; }
4877 EOF
4878 if { (eval echo configure:4879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4879   rm -rf conftest*
4880   lt_cv_cc_dll_switch=-mdll
4881 else
4882   echo "configure: failed program was:" >&5
4883   cat conftest.$ac_ext >&5
4884   rm -rf conftest*
4885   lt_cv_cc_dll_switch=-dll
4886 fi
4887 rm -f conftest*
4888 fi
4889
4890 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4891     CFLAGS="$SAVE_CFLAGS" ;;
4892   *-*-cygwin* | *-*-pw32*)
4893     # cygwin systems need to pass --dll to the linker, and not link
4894     # crt.o which will require a WinMain@16 definition.
4895     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4896   esac
4897   ;;
4898   
4899 esac
4900
4901 # Sed substitution that helps us do robust quoting.  It backslashifies
4902 # metacharacters that are still active within double-quoted strings.
4903 Xsed='sed -e s/^X//'
4904 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4905
4906 # Same as above, but do not quote variable references.
4907 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4908
4909 # Sed substitution to delay expansion of an escaped shell variable in a
4910 # double_quote_subst'ed string.
4911 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4912
4913 # Constants:
4914 rm="rm -f"
4915
4916 # Global variables:
4917 default_ofile=libtool
4918 can_build_shared=yes
4919
4920 # All known linkers require a `.a' archive for static linking (except M$VC,
4921 # which needs '.lib').
4922 libext=a
4923 ltmain="$ac_aux_dir/ltmain.sh"
4924 ofile="$default_ofile"
4925 with_gnu_ld="$lt_cv_prog_gnu_ld"
4926 need_locks="$enable_libtool_lock"
4927
4928 old_CC="$CC"
4929 old_CFLAGS="$CFLAGS"
4930
4931 # Set sane defaults for various variables
4932 test -z "$AR" && AR=ar
4933 test -z "$AR_FLAGS" && AR_FLAGS=cru
4934 test -z "$AS" && AS=as
4935 test -z "$CC" && CC=cc
4936 test -z "$DLLTOOL" && DLLTOOL=dlltool
4937 test -z "$LD" && LD=ld
4938 test -z "$LN_S" && LN_S="ln -s"
4939 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4940 test -z "$NM" && NM=nm
4941 test -z "$OBJDUMP" && OBJDUMP=objdump
4942 test -z "$RANLIB" && RANLIB=:
4943 test -z "$STRIP" && STRIP=:
4944 test -z "$ac_objext" && ac_objext=o
4945
4946 if test x"$host" != x"$build"; then
4947   ac_tool_prefix=${host_alias}-
4948 else
4949   ac_tool_prefix=
4950 fi
4951
4952 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4953 case $host_os in
4954 linux-gnu*) ;;
4955 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4956 esac
4957
4958 case $host_os in
4959 aix3*)
4960   # AIX sometimes has problems with the GCC collect2 program.  For some
4961   # reason, if we set the COLLECT_NAMES environment variable, the problems
4962   # vanish in a puff of smoke.
4963   if test "X${COLLECT_NAMES+set}" != Xset; then
4964     COLLECT_NAMES=
4965     export COLLECT_NAMES
4966   fi
4967   ;;
4968 esac
4969
4970 # Determine commands to create old-style static archives.
4971 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4972 old_postinstall_cmds='chmod 644 $oldlib'
4973 old_postuninstall_cmds=
4974
4975 if test -n "$RANLIB"; then
4976   case $host_os in
4977   openbsd*)
4978     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4979     ;;
4980   *)
4981     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4982     ;;
4983   esac
4984   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4985 fi
4986
4987 # Allow CC to be a program name with arguments.
4988 set dummy $CC
4989 compiler="$2"
4990
4991 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4992 echo "configure:4993: checking for objdir" >&5
4993 rm -f .libs 2>/dev/null
4994 mkdir .libs 2>/dev/null
4995 if test -d .libs; then
4996   objdir=.libs
4997 else
4998   # MS-DOS does not allow filenames that begin with a dot.
4999   objdir=_libs
5000 fi
5001 rmdir .libs 2>/dev/null
5002 echo "$ac_t""$objdir" 1>&6
5003
5004
5005 # Check whether --with-pic or --without-pic was given.
5006 if test "${with_pic+set}" = set; then
5007   withval="$with_pic"
5008   pic_mode="$withval"
5009 else
5010   pic_mode=default
5011 fi
5012
5013 test -z "$pic_mode" && pic_mode=default
5014
5015 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5016 # in isolation, and that seeing it set (from the cache) indicates that
5017 # the associated values are set (in the cache) correctly too.
5018 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5019 echo "configure:5020: checking for $compiler option to produce PIC" >&5
5020 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5021   echo $ac_n "(cached) $ac_c" 1>&6
5022 else
5023    lt_cv_prog_cc_pic=
5024   lt_cv_prog_cc_shlib=
5025   lt_cv_prog_cc_wl=
5026   lt_cv_prog_cc_static=
5027   lt_cv_prog_cc_no_builtin=
5028   lt_cv_prog_cc_can_build_shared=$can_build_shared
5029
5030   if test "$GCC" = yes; then
5031     lt_cv_prog_cc_wl='-Wl,'
5032     lt_cv_prog_cc_static='-static'
5033
5034     case $host_os in
5035     aix*)
5036       # Below there is a dirty hack to force normal static linking with -ldl
5037       # The problem is because libdl dynamically linked with both libc and
5038       # libC (AIX C++ library), which obviously doesn't included in libraries
5039       # list by gcc. This cause undefined symbols with -static flags.
5040       # This hack allows C programs to be linked with "-static -ldl", but
5041       # not sure about C++ programs.
5042       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5043       ;;
5044     amigaos*)
5045       # FIXME: we need at least 68020 code to build shared libraries, but
5046       # adding the `-m68020' flag to GCC prevents building anything better,
5047       # like `-m68040'.
5048       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5049       ;;
5050     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5051       # PIC is the default for these OSes.
5052       ;;
5053     darwin* | rhapsody*)
5054       # PIC is the default on this platform
5055       # Common symbols not allowed in MH_DYLIB files
5056       lt_cv_prog_cc_pic='-fno-common'
5057       ;;
5058     cygwin* | mingw* | pw32* | os2*)
5059       # This hack is so that the source file can tell whether it is being
5060       # built for inclusion in a dll (and should export symbols for example).
5061       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5062       ;;
5063     sysv4*MP*)
5064       if test -d /usr/nec; then
5065          lt_cv_prog_cc_pic=-Kconform_pic
5066       fi
5067       ;;
5068     *)
5069       lt_cv_prog_cc_pic='-fPIC'
5070       ;;
5071     esac
5072   else
5073     # PORTME Check for PIC flags for the system compiler.
5074     case $host_os in
5075     aix3* | aix4* | aix5*)
5076       lt_cv_prog_cc_wl='-Wl,'
5077       # All AIX code is PIC.
5078       if test "$host_cpu" = ia64; then
5079         # AIX 5 now supports IA64 processor
5080         lt_cv_prog_cc_static='-Bstatic'
5081       else
5082         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5083       fi
5084       ;;
5085
5086     hpux9* | hpux10* | hpux11*)
5087       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5088       lt_cv_prog_cc_wl='-Wl,'
5089       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5090       lt_cv_prog_cc_pic='+Z'
5091       ;;
5092
5093     irix5* | irix6* | nonstopux*)
5094       lt_cv_prog_cc_wl='-Wl,'
5095       lt_cv_prog_cc_static='-non_shared'
5096       # PIC (with -KPIC) is the default.
5097       ;;
5098
5099     cygwin* | mingw* | pw32* | os2*)
5100       # This hack is so that the source file can tell whether it is being
5101       # built for inclusion in a dll (and should export symbols for example).
5102       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5103       ;;
5104
5105     newsos6)
5106       lt_cv_prog_cc_pic='-KPIC'
5107       lt_cv_prog_cc_static='-Bstatic'
5108       ;;
5109     
5110     openedition)
5111       # XPLINK code is PIC by default
5112       ;;
5113
5114     osf3* | osf4* | osf5*)
5115       # All OSF/1 code is PIC.
5116       lt_cv_prog_cc_wl='-Wl,'
5117       lt_cv_prog_cc_static='-non_shared'
5118       ;;
5119
5120     sco3.2v5*)
5121       lt_cv_prog_cc_pic='-Kpic'
5122       lt_cv_prog_cc_static='-dn'
5123       lt_cv_prog_cc_shlib='-belf'
5124       ;;
5125
5126     solaris*)
5127       lt_cv_prog_cc_pic='-KPIC'
5128       lt_cv_prog_cc_static='-Bstatic'
5129       lt_cv_prog_cc_wl='-Wl,'
5130       ;;
5131
5132     sunos4*)
5133       lt_cv_prog_cc_pic='-PIC'
5134       lt_cv_prog_cc_static='-Bstatic'
5135       lt_cv_prog_cc_wl='-Qoption ld '
5136       ;;
5137
5138     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5139       lt_cv_prog_cc_pic='-KPIC'
5140       lt_cv_prog_cc_static='-Bstatic'
5141       lt_cv_prog_cc_wl='-Wl,'
5142       ;;
5143
5144     uts4*)
5145       lt_cv_prog_cc_pic='-pic'
5146       lt_cv_prog_cc_static='-Bstatic'
5147       ;;
5148
5149     sysv4*MP*)
5150       if test -d /usr/nec ;then
5151         lt_cv_prog_cc_pic='-Kconform_pic'
5152         lt_cv_prog_cc_static='-Bstatic'
5153       fi
5154       ;;
5155
5156     *)
5157       lt_cv_prog_cc_can_build_shared=no
5158       ;;
5159     esac
5160   fi
5161
5162 fi
5163
5164 if test -z "$lt_cv_prog_cc_pic"; then
5165   echo "$ac_t""none" 1>&6
5166 else
5167   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5168
5169   # Check to make sure the pic_flag actually works.
5170   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5171 echo "configure:5172: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5172   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5173   echo $ac_n "(cached) $ac_c" 1>&6
5174 else
5175       save_CFLAGS="$CFLAGS"
5176     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5177     cat > conftest.$ac_ext <<EOF
5178 #line 5179 "configure"
5179 #include "confdefs.h"
5180
5181 int main() {
5182
5183 ; return 0; }
5184 EOF
5185 if { (eval echo configure:5186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5186   rm -rf conftest*
5187         case $host_os in
5188       hpux9* | hpux10* | hpux11*)
5189         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5190         # they create non-PIC objects.  So, if there were any warnings, we
5191         # assume that PIC is not supported.
5192         if test -s conftest.err; then
5193           lt_cv_prog_cc_pic_works=no
5194         else
5195           lt_cv_prog_cc_pic_works=yes
5196         fi
5197         ;;
5198       *)
5199         lt_cv_prog_cc_pic_works=yes
5200         ;;
5201       esac
5202     
5203 else
5204   echo "configure: failed program was:" >&5
5205   cat conftest.$ac_ext >&5
5206   rm -rf conftest*
5207         lt_cv_prog_cc_pic_works=no
5208     
5209 fi
5210 rm -f conftest*
5211     CFLAGS="$save_CFLAGS"
5212   
5213 fi
5214
5215
5216   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5217     lt_cv_prog_cc_pic=
5218     lt_cv_prog_cc_can_build_shared=no
5219   else
5220     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5221   fi
5222
5223   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5224 fi
5225
5226 # Check for any special shared library compilation flags.
5227 if test -n "$lt_cv_prog_cc_shlib"; then
5228   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5229   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5230   else
5231    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5232     lt_cv_prog_cc_can_build_shared=no
5233   fi
5234 fi
5235
5236 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5237 echo "configure:5238: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5238 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5239   echo $ac_n "(cached) $ac_c" 1>&6
5240 else
5241     lt_cv_prog_cc_static_works=no
5242   save_LDFLAGS="$LDFLAGS"
5243   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5244   cat > conftest.$ac_ext <<EOF
5245 #line 5246 "configure"
5246 #include "confdefs.h"
5247
5248 int main() {
5249
5250 ; return 0; }
5251 EOF
5252 if { (eval echo configure:5253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5253   rm -rf conftest*
5254   lt_cv_prog_cc_static_works=yes
5255 else
5256   echo "configure: failed program was:" >&5
5257   cat conftest.$ac_ext >&5
5258 fi
5259 rm -f conftest*
5260   LDFLAGS="$save_LDFLAGS"
5261
5262 fi
5263
5264
5265 # Belt *and* braces to stop my trousers falling down:
5266 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5267 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5268
5269 pic_flag="$lt_cv_prog_cc_pic"
5270 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5271 wl="$lt_cv_prog_cc_wl"
5272 link_static_flag="$lt_cv_prog_cc_static"
5273 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5274 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5275
5276
5277 # Check to see if options -o and -c are simultaneously supported by compiler
5278 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5279 echo "configure:5280: checking if $compiler supports -c -o file.$ac_objext" >&5
5280 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5281   echo $ac_n "(cached) $ac_c" 1>&6
5282 else
5283   
5284 $rm -r conftest 2>/dev/null
5285 mkdir conftest
5286 cd conftest
5287 echo "int some_variable = 0;" > conftest.$ac_ext
5288 mkdir out
5289 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5290 # that will create temporary files in the current directory regardless of
5291 # the output directory.  Thus, making CWD read-only will cause this test
5292 # to fail, enabling locking or at least warning the user not to do parallel
5293 # builds.
5294 chmod -w .
5295 save_CFLAGS="$CFLAGS"
5296 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5297 compiler_c_o=no
5298 if { (eval echo configure:5299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5299   # The compiler can only warn and ignore the option if not recognized
5300   # So say no if there are warnings
5301   if test -s out/conftest.err; then
5302     lt_cv_compiler_c_o=no
5303   else
5304     lt_cv_compiler_c_o=yes
5305   fi
5306 else
5307   # Append any errors to the config.log.
5308   cat out/conftest.err 1>&5
5309   lt_cv_compiler_c_o=no
5310 fi
5311 CFLAGS="$save_CFLAGS"
5312 chmod u+w .
5313 $rm conftest* out/*
5314 rmdir out
5315 cd ..
5316 rmdir conftest
5317 $rm -r conftest 2>/dev/null
5318
5319 fi
5320
5321 compiler_c_o=$lt_cv_compiler_c_o
5322 echo "$ac_t""$compiler_c_o" 1>&6
5323
5324 if test x"$compiler_c_o" = x"yes"; then
5325   # Check to see if we can write to a .lo
5326   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5327 echo "configure:5328: checking if $compiler supports -c -o file.lo" >&5
5328   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5329   echo $ac_n "(cached) $ac_c" 1>&6
5330 else
5331   
5332   lt_cv_compiler_o_lo=no
5333   save_CFLAGS="$CFLAGS"
5334   CFLAGS="$CFLAGS -c -o conftest.lo"
5335   save_objext="$ac_objext"
5336   ac_objext=lo
5337   cat > conftest.$ac_ext <<EOF
5338 #line 5339 "configure"
5339 #include "confdefs.h"
5340
5341 int main() {
5342 int some_variable = 0;
5343 ; return 0; }
5344 EOF
5345 if { (eval echo configure:5346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5346   rm -rf conftest*
5347       # The compiler can only warn and ignore the option if not recognized
5348     # So say no if there are warnings
5349     if test -s conftest.err; then
5350       lt_cv_compiler_o_lo=no
5351     else
5352       lt_cv_compiler_o_lo=yes
5353     fi
5354   
5355 else
5356   echo "configure: failed program was:" >&5
5357   cat conftest.$ac_ext >&5
5358 fi
5359 rm -f conftest*
5360   ac_objext="$save_objext"
5361   CFLAGS="$save_CFLAGS"
5362   
5363 fi
5364
5365   compiler_o_lo=$lt_cv_compiler_o_lo
5366   echo "$ac_t""$compiler_o_lo" 1>&6
5367 else
5368   compiler_o_lo=no
5369 fi
5370
5371 # Check to see if we can do hard links to lock some files if needed
5372 hard_links="nottested"
5373 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5374   # do not overwrite the value of need_locks provided by the user
5375   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5376 echo "configure:5377: checking if we can lock with hard links" >&5
5377   hard_links=yes
5378   $rm conftest*
5379   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5380   touch conftest.a
5381   ln conftest.a conftest.b 2>&5 || hard_links=no
5382   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5383   echo "$ac_t""$hard_links" 1>&6
5384   if test "$hard_links" = no; then
5385     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5386     need_locks=warn
5387   fi
5388 else
5389   need_locks=no
5390 fi
5391
5392 if test "$GCC" = yes; then
5393   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5394   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5395 echo "configure:5396: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5396   echo "int some_variable = 0;" > conftest.$ac_ext
5397   save_CFLAGS="$CFLAGS"
5398   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5399   compiler_rtti_exceptions=no
5400   cat > conftest.$ac_ext <<EOF
5401 #line 5402 "configure"
5402 #include "confdefs.h"
5403
5404 int main() {
5405 int some_variable = 0;
5406 ; return 0; }
5407 EOF
5408 if { (eval echo configure:5409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5409   rm -rf conftest*
5410       # The compiler can only warn and ignore the option if not recognized
5411     # So say no if there are warnings
5412     if test -s conftest.err; then
5413       compiler_rtti_exceptions=no
5414     else
5415       compiler_rtti_exceptions=yes
5416     fi
5417   
5418 else
5419   echo "configure: failed program was:" >&5
5420   cat conftest.$ac_ext >&5
5421 fi
5422 rm -f conftest*
5423   CFLAGS="$save_CFLAGS"
5424   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5425
5426   if test "$compiler_rtti_exceptions" = "yes"; then
5427     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5428   else
5429     no_builtin_flag=' -fno-builtin'
5430   fi
5431 fi
5432
5433 # See if the linker supports building shared libraries.
5434 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5435 echo "configure:5436: checking whether the linker ($LD) supports shared libraries" >&5
5436
5437 allow_undefined_flag=
5438 no_undefined_flag=
5439 need_lib_prefix=unknown
5440 need_version=unknown
5441 # when you set need_version to no, make sure it does not cause -set_version
5442 # flags to be left without arguments
5443 archive_cmds=
5444 archive_expsym_cmds=
5445 old_archive_from_new_cmds=
5446 old_archive_from_expsyms_cmds=
5447 export_dynamic_flag_spec=
5448 whole_archive_flag_spec=
5449 thread_safe_flag_spec=
5450 hardcode_into_libs=no
5451 hardcode_libdir_flag_spec=
5452 hardcode_libdir_separator=
5453 hardcode_direct=no
5454 hardcode_minus_L=no
5455 hardcode_shlibpath_var=unsupported
5456 runpath_var=
5457 link_all_deplibs=unknown
5458 always_export_symbols=no
5459 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5460 # include_expsyms should be a list of space-separated symbols to be *always*
5461 # included in the symbol list
5462 include_expsyms=
5463 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5464 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5465 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5466 # as well as any symbol that contains `d'.
5467 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5468 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5469 # platforms (ab)use it in PIC code, but their linkers get confused if
5470 # the symbol is explicitly referenced.  Since portable code cannot
5471 # rely on this symbol name, it's probably fine to never include it in
5472 # preloaded symbol tables.
5473 extract_expsyms_cmds=
5474
5475 case $host_os in
5476 cygwin* | mingw* | pw32*)
5477   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5478   # When not using gcc, we currently assume that we are using
5479   # Microsoft Visual C++.
5480   if test "$GCC" != yes; then
5481     with_gnu_ld=no
5482   fi
5483   ;;
5484 openbsd*)
5485   with_gnu_ld=no
5486   ;;
5487 esac
5488
5489 ld_shlibs=yes
5490 if test "$with_gnu_ld" = yes; then
5491   # If archive_cmds runs LD, not CC, wlarc should be empty
5492   wlarc='${wl}'
5493
5494   # See if GNU ld supports shared libraries.
5495   case $host_os in
5496   aix3* | aix4* | aix5*)
5497     # On AIX, the GNU linker is very broken
5498     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5499     ld_shlibs=no
5500     cat <<EOF 1>&2
5501
5502 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5503 *** to be unable to reliably create shared libraries on AIX.
5504 *** Therefore, libtool is disabling shared libraries support.  If you
5505 *** really care for shared libraries, you may want to modify your PATH
5506 *** so that a non-GNU linker is found, and then restart.
5507
5508 EOF
5509     ;;
5510
5511   amigaos*)
5512     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)'
5513     hardcode_libdir_flag_spec='-L$libdir'
5514     hardcode_minus_L=yes
5515
5516     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5517     # that the semantics of dynamic libraries on AmigaOS, at least up
5518     # to version 4, is to share data among multiple programs linked
5519     # with the same dynamic library.  Since this doesn't match the
5520     # behavior of shared libraries on other platforms, we can use
5521     # them.
5522     ld_shlibs=no
5523     ;;
5524
5525   beos*)
5526     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5527       allow_undefined_flag=unsupported
5528       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5529       # support --undefined.  This deserves some investigation.  FIXME
5530       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5531     else
5532       ld_shlibs=no
5533     fi
5534     ;;
5535
5536   cygwin* | mingw* | pw32*)
5537     # hardcode_libdir_flag_spec is actually meaningless, as there is
5538     # no search path for DLLs.
5539     hardcode_libdir_flag_spec='-L$libdir'
5540     allow_undefined_flag=unsupported
5541     always_export_symbols=yes
5542
5543     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5544       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5545       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5546       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5547       else $CC -o impgen impgen.c ; fi)~
5548       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5549
5550     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5551
5552     # cygwin and mingw dlls have different entry points and sets of symbols
5553     # to exclude.
5554     # FIXME: what about values for MSVC?
5555     dll_entry=__cygwin_dll_entry@12
5556     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5557     case $host_os in
5558     mingw*)
5559       # mingw values
5560       dll_entry=_DllMainCRTStartup@12
5561       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5562       ;;
5563     esac
5564
5565     # mingw and cygwin differ, and it's simplest to just exclude the union
5566     # of the two symbol sets.
5567     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5568
5569     # recent cygwin and mingw systems supply a stub DllMain which the user
5570     # can override, but on older systems we have to supply one (in ltdll.c)
5571     if test "x$lt_cv_need_dllmain" = "xyes"; then
5572       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5573       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~
5574         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5575     else
5576       ltdll_obj=
5577       ltdll_cmds=
5578     fi
5579
5580     # Extract the symbol export list from an `--export-all' def file,
5581     # then regenerate the def file from the symbol export list, so that
5582     # the compiled dll only exports the symbol export list.
5583     # Be careful not to strip the DATA tag left be newer dlltools.
5584     export_symbols_cmds="$ltdll_cmds"'
5585       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5586       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5587
5588     # If the export-symbols file already is a .def file (1st line
5589     # is EXPORTS), use it as is.
5590     # If DATA tags from a recent dlltool are present, honour them!
5591     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5592         cp $export_symbols $output_objdir/$soname-def;
5593       else
5594         echo EXPORTS > $output_objdir/$soname-def;
5595         _lt_hint=1;
5596         cat $export_symbols | while read symbol; do
5597          set dummy \$symbol;
5598          case \$# in
5599            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5600            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5601            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5602          esac;
5603          _lt_hint=`expr 1 + \$_lt_hint`;
5604         done;
5605       fi~
5606       '"$ltdll_cmds"'
5607       $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~
5608       $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~
5609       $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~
5610       $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~
5611       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5612     ;;
5613
5614   netbsd*)
5615     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5616       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5617       wlarc=
5618     else
5619       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5620       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5621     fi
5622     ;;
5623
5624   solaris* | sysv5*)
5625     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5626       ld_shlibs=no
5627       cat <<EOF 1>&2
5628
5629 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5630 *** create shared libraries on Solaris systems.  Therefore, libtool
5631 *** is disabling shared libraries support.  We urge you to upgrade GNU
5632 *** binutils to release 2.9.1 or newer.  Another option is to modify
5633 *** your PATH or compiler configuration so that the native linker is
5634 *** used, and then restart.
5635
5636 EOF
5637     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5638       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5639       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5640     else
5641       ld_shlibs=no
5642     fi
5643     ;;
5644
5645   sunos4*)
5646     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5647     wlarc=
5648     hardcode_direct=yes
5649     hardcode_shlibpath_var=no
5650     ;;
5651
5652   *)
5653     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5654       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5655       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5656     else
5657       ld_shlibs=no
5658     fi
5659     ;;
5660   esac
5661
5662   if test "$ld_shlibs" = yes; then
5663     runpath_var=LD_RUN_PATH
5664     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5665     export_dynamic_flag_spec='${wl}--export-dynamic'
5666     case $host_os in
5667     cygwin* | mingw* | pw32*)
5668       # dlltool doesn't understand --whole-archive et. al.
5669       whole_archive_flag_spec=
5670       ;;
5671     *)
5672       # ancient GNU ld didn't support --whole-archive et. al.
5673       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5674         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5675       else
5676         whole_archive_flag_spec=
5677       fi
5678       ;;
5679     esac
5680   fi
5681 else
5682   # PORTME fill in a description of your system's linker (not GNU ld)
5683   case $host_os in
5684   aix3*)
5685     allow_undefined_flag=unsupported
5686     always_export_symbols=yes
5687     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'
5688     # Note: this linker hardcodes the directories in LIBPATH if there
5689     # are no directories specified by -L.
5690     hardcode_minus_L=yes
5691     if test "$GCC" = yes && test -z "$link_static_flag"; then
5692       # Neither direct hardcoding nor static linking is supported with a
5693       # broken collect2.
5694       hardcode_direct=unsupported
5695     fi
5696     ;;
5697
5698   aix4* | aix5*)
5699     if test "$host_cpu" = ia64; then
5700       # On IA64, the linker does run time linking by default, so we don't
5701       # have to do anything special.
5702       aix_use_runtimelinking=no
5703       exp_sym_flag='-Bexport'
5704       no_entry_flag=""
5705     else
5706       aix_use_runtimelinking=no
5707
5708       # Test if we are trying to use run time linking or normal
5709       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5710       # need to do runtime linking.
5711       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5712         for ld_flag in $LDFLAGS; do
5713           case $ld_flag in
5714           *-brtl*)
5715             aix_use_runtimelinking=yes
5716             break
5717           ;;
5718           esac
5719         done
5720       esac
5721
5722       exp_sym_flag='-bexport'
5723       no_entry_flag='-bnoentry'
5724     fi
5725
5726     # When large executables or shared objects are built, AIX ld can
5727     # have problems creating the table of contents.  If linking a library
5728     # or program results in "error TOC overflow" add -mminimal-toc to
5729     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5730     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5731
5732     hardcode_direct=yes
5733     archive_cmds=''
5734     hardcode_libdir_separator=':'
5735     if test "$GCC" = yes; then
5736       case $host_os in aix4.[012]|aix4.[012].*)
5737         collect2name=`${CC} -print-prog-name=collect2`
5738         if test -f "$collect2name" && \
5739           strings "$collect2name" | grep resolve_lib_name >/dev/null
5740         then
5741           # We have reworked collect2
5742           hardcode_direct=yes
5743         else
5744           # We have old collect2
5745           hardcode_direct=unsupported
5746           # It fails to find uninstalled libraries when the uninstalled
5747           # path is not listed in the libpath.  Setting hardcode_minus_L
5748           # to unsupported forces relinking
5749           hardcode_minus_L=yes
5750           hardcode_libdir_flag_spec='-L$libdir'
5751           hardcode_libdir_separator=
5752         fi
5753       esac
5754
5755       shared_flag='-shared'
5756     else
5757       # not using gcc
5758       if test "$host_cpu" = ia64; then
5759         shared_flag='${wl}-G'
5760       else
5761         if test "$aix_use_runtimelinking" = yes; then
5762           shared_flag='${wl}-G'
5763         else
5764           shared_flag='${wl}-bM:SRE'
5765         fi
5766       fi
5767     fi
5768
5769     # It seems that -bexpall can do strange things, so it is better to
5770     # generate a list of symbols to export.
5771     always_export_symbols=yes
5772     if test "$aix_use_runtimelinking" = yes; then
5773       # Warning - without using the other runtime loading flags (-brtl),
5774       # -berok will link without error, but may produce a broken library.
5775       allow_undefined_flag='-berok'
5776       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5777       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"
5778     else
5779       if test "$host_cpu" = ia64; then
5780         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5781         allow_undefined_flag="-z nodefs"
5782         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"
5783       else
5784         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5785         # Warning - without using the other run time loading flags,
5786         # -berok will link without error, but may produce a broken library.
5787         allow_undefined_flag='${wl}-berok'
5788         # This is a bit strange, but is similar to how AIX traditionally builds
5789         # it's shared libraries.
5790         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'
5791       fi
5792     fi
5793     ;;
5794
5795   amigaos*)
5796     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)'
5797     hardcode_libdir_flag_spec='-L$libdir'
5798     hardcode_minus_L=yes
5799     # see comment about different semantics on the GNU ld section
5800     ld_shlibs=no
5801     ;;
5802
5803   cygwin* | mingw* | pw32*)
5804     # When not using gcc, we currently assume that we are using
5805     # Microsoft Visual C++.
5806     # hardcode_libdir_flag_spec is actually meaningless, as there is
5807     # no search path for DLLs.
5808     hardcode_libdir_flag_spec=' '
5809     allow_undefined_flag=unsupported
5810     # Tell ltmain to make .lib files, not .a files.
5811     libext=lib
5812     # FIXME: Setting linknames here is a bad hack.
5813     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5814     # The linker will automatically build a .lib file if we build a DLL.
5815     old_archive_from_new_cmds='true'
5816     # FIXME: Should let the user specify the lib program.
5817     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5818     fix_srcfile_path='`cygpath -w "$srcfile"`'
5819     ;;
5820
5821   darwin* | rhapsody*)
5822     case "$host_os" in
5823     rhapsody* | darwin1.[012])
5824       allow_undefined_flag='-undefined suppress'
5825       ;;
5826     *) # Darwin 1.3 on
5827       allow_undefined_flag='-flat_namespace -undefined suppress'
5828       ;;
5829     esac
5830     # FIXME: Relying on posixy $() will cause problems for
5831     #        cross-compilation, but unfortunately the echo tests do not
5832     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5833     #        `"' quotes if we put them in here... so don't!
5834     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)'
5835     # We need to add '_' to the symbols in $export_symbols first
5836     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5837     hardcode_direct=yes
5838     hardcode_shlibpath_var=no
5839     whole_archive_flag_spec='-all_load $convenience'
5840     ;;
5841
5842   freebsd1*)
5843     ld_shlibs=no
5844     ;;
5845
5846   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5847   # support.  Future versions do this automatically, but an explicit c++rt0.o
5848   # does not break anything, and helps significantly (at the cost of a little
5849   # extra space).
5850   freebsd2.2*)
5851     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5852     hardcode_libdir_flag_spec='-R$libdir'
5853     hardcode_direct=yes
5854     hardcode_shlibpath_var=no
5855     ;;
5856
5857   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5858   freebsd2*)
5859     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5860     hardcode_direct=yes
5861     hardcode_minus_L=yes
5862     hardcode_shlibpath_var=no
5863     ;;
5864
5865   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5866   freebsd*)
5867     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5868     hardcode_libdir_flag_spec='-R$libdir'
5869     hardcode_direct=yes
5870     hardcode_shlibpath_var=no
5871     ;;
5872
5873   hpux9* | hpux10* | hpux11*)
5874     case $host_os in
5875     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' ;;
5876     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5877     esac
5878     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5879     hardcode_libdir_separator=:
5880     hardcode_direct=yes
5881     hardcode_minus_L=yes # Not in the search PATH, but as the default
5882                          # location of the library.
5883     export_dynamic_flag_spec='${wl}-E'
5884     ;;
5885
5886   irix5* | irix6* | nonstopux*)
5887     if test "$GCC" = yes; then
5888       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'
5889       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5890     else
5891       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'
5892       hardcode_libdir_flag_spec='-rpath $libdir'
5893     fi
5894     hardcode_libdir_separator=:
5895     link_all_deplibs=yes
5896     ;;
5897
5898   netbsd*)
5899     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5900       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5901     else
5902       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5903     fi
5904     hardcode_libdir_flag_spec='-R$libdir'
5905     hardcode_direct=yes
5906     hardcode_shlibpath_var=no
5907     ;;
5908
5909   newsos6)
5910     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5911     hardcode_direct=yes
5912     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5913     hardcode_libdir_separator=:
5914     hardcode_shlibpath_var=no
5915     ;;
5916
5917   openbsd*)
5918     hardcode_direct=yes
5919     hardcode_shlibpath_var=no
5920     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5921       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5922       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5923       export_dynamic_flag_spec='${wl}-E'
5924     else
5925       case "$host_os" in
5926       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5927         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5928         hardcode_libdir_flag_spec='-R$libdir'
5929         ;;
5930       *)
5931         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5932         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5933         ;;
5934       esac
5935     fi
5936     ;;
5937
5938   openedition*)
5939     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5940         cp \$linknames \$output_objdir && linknames=''"
5941     export_dynamic_flag_spec="-Wl,DLL"
5942     ;;
5943
5944   os2*)
5945     hardcode_libdir_flag_spec='-L$libdir'
5946     hardcode_minus_L=yes
5947     allow_undefined_flag=unsupported
5948     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'
5949     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5950     ;;
5951
5952   osf3*)
5953     if test "$GCC" = yes; then
5954       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5955       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'
5956     else
5957       allow_undefined_flag=' -expect_unresolved \*'
5958       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'
5959     fi
5960     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5961     hardcode_libdir_separator=:
5962     ;;
5963
5964   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5965     if test "$GCC" = yes; then
5966       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5967       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'
5968       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5969     else
5970       allow_undefined_flag=' -expect_unresolved \*'
5971       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'
5972       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5973       $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'
5974
5975       #Both c and cxx compiler support -rpath directly
5976       hardcode_libdir_flag_spec='-rpath $libdir'
5977     fi
5978     hardcode_libdir_separator=:
5979     ;;
5980
5981   sco3.2v5*)
5982     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5983     hardcode_shlibpath_var=no
5984     runpath_var=LD_RUN_PATH
5985     hardcode_runpath_var=yes
5986     export_dynamic_flag_spec='${wl}-Bexport'
5987     ;;
5988
5989   solaris*)
5990     # gcc --version < 3.0 without binutils cannot create self contained
5991     # shared libraries reliably, requiring libgcc.a to resolve some of
5992     # the object symbols generated in some cases.  Libraries that use
5993     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5994     # a copy of libgcc.a into every shared library to guarantee resolving
5995     # such symbols causes other problems:  According to Tim Van Holder
5996     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5997     # (to the application) exception stack for one thing.
5998     no_undefined_flag=' -z defs'
5999     if test "$GCC" = yes; then
6000       case `$CC --version 2>/dev/null` in
6001       [12].*)
6002         cat <<EOF 1>&2
6003
6004 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6005 *** create self contained shared libraries on Solaris systems, without
6006 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6007 *** -no-undefined support, which will at least allow you to build shared
6008 *** libraries.  However, you may find that when you link such libraries
6009 *** into an application without using GCC, you have to manually add
6010 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6011 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6012 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6013
6014 EOF
6015         no_undefined_flag=
6016         ;;
6017       esac
6018     fi
6019     # $CC -shared without GNU ld will not create a library from C++
6020     # object files and a static libstdc++, better avoid it by now
6021     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6022     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6023                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6024     hardcode_libdir_flag_spec='-R$libdir'
6025     hardcode_shlibpath_var=no
6026     case $host_os in
6027     solaris2.[0-5] | solaris2.[0-5].*) ;;
6028     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6029       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6030     esac
6031     link_all_deplibs=yes
6032     ;;
6033
6034   sunos4*)
6035     if test "x$host_vendor" = xsequent; then
6036       # Use $CC to link under sequent, because it throws in some extra .o
6037       # files that make .init and .fini sections work.
6038       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6039     else
6040       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6041     fi
6042     hardcode_libdir_flag_spec='-L$libdir'
6043     hardcode_direct=yes
6044     hardcode_minus_L=yes
6045     hardcode_shlibpath_var=no
6046     ;;
6047
6048   sysv4)
6049     case $host_vendor in
6050       sni)
6051         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6052         hardcode_direct=yes # is this really true???
6053         ;;
6054       siemens)
6055         ## LD is ld it makes a PLAMLIB
6056         ## CC just makes a GrossModule.
6057         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6058         reload_cmds='$CC -r -o $output$reload_objs'
6059         hardcode_direct=no
6060         ;;
6061       motorola)
6062         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6063         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6064         ;;
6065     esac
6066     runpath_var='LD_RUN_PATH'
6067     hardcode_shlibpath_var=no
6068     ;;
6069
6070   sysv4.3*)
6071     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6072     hardcode_shlibpath_var=no
6073     export_dynamic_flag_spec='-Bexport'
6074     ;;
6075
6076   sysv5*)
6077     no_undefined_flag=' -z text'
6078     # $CC -shared without GNU ld will not create a library from C++
6079     # object files and a static libstdc++, better avoid it by now
6080     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6081     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6082                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6083     hardcode_libdir_flag_spec=
6084     hardcode_shlibpath_var=no
6085     runpath_var='LD_RUN_PATH'
6086     ;;
6087
6088   uts4*)
6089     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6090     hardcode_libdir_flag_spec='-L$libdir'
6091     hardcode_shlibpath_var=no
6092     ;;
6093
6094   dgux*)
6095     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6096     hardcode_libdir_flag_spec='-L$libdir'
6097     hardcode_shlibpath_var=no
6098     ;;
6099
6100   sysv4*MP*)
6101     if test -d /usr/nec; then
6102       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6103       hardcode_shlibpath_var=no
6104       runpath_var=LD_RUN_PATH
6105       hardcode_runpath_var=yes
6106       ld_shlibs=yes
6107     fi
6108     ;;
6109
6110   sysv4.2uw2*)
6111     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6112     hardcode_direct=yes
6113     hardcode_minus_L=no
6114     hardcode_shlibpath_var=no
6115     hardcode_runpath_var=yes
6116     runpath_var=LD_RUN_PATH
6117     ;;
6118
6119   sysv5uw7* | unixware7*)
6120     no_undefined_flag='${wl}-z ${wl}text'
6121     if test "$GCC" = yes; then
6122       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6123     else
6124       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6125     fi
6126     runpath_var='LD_RUN_PATH'
6127     hardcode_shlibpath_var=no
6128     ;;
6129
6130   *)
6131     ld_shlibs=no
6132     ;;
6133   esac
6134 fi
6135 echo "$ac_t""$ld_shlibs" 1>&6
6136 test "$ld_shlibs" = no && can_build_shared=no
6137
6138 # Check hardcoding attributes.
6139 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6140 echo "configure:6141: checking how to hardcode library paths into programs" >&5
6141 hardcode_action=
6142 if test -n "$hardcode_libdir_flag_spec" || \
6143    test -n "$runpath_var"; then
6144
6145   # We can hardcode non-existant directories.
6146   if test "$hardcode_direct" != no &&
6147      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6148      # have to relink, otherwise we might link with an installed library
6149      # when we should be linking with a yet-to-be-installed one
6150      ## test "$hardcode_shlibpath_var" != no &&
6151      test "$hardcode_minus_L" != no; then
6152     # Linking always hardcodes the temporary library directory.
6153     hardcode_action=relink
6154   else
6155     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6156     hardcode_action=immediate
6157   fi
6158 else
6159   # We cannot hardcode anything, or else we can only hardcode existing
6160   # directories.
6161   hardcode_action=unsupported
6162 fi
6163 echo "$ac_t""$hardcode_action" 1>&6
6164
6165 striplib=
6166 old_striplib=
6167 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6168 echo "configure:6169: checking whether stripping libraries is possible" >&5
6169 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6170   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6171   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6172   echo "$ac_t""yes" 1>&6
6173 else
6174   echo "$ac_t""no" 1>&6
6175 fi
6176
6177 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6178 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6179
6180 # PORTME Fill in your ld.so characteristics
6181 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6182 echo "configure:6183: checking dynamic linker characteristics" >&5
6183 library_names_spec=
6184 libname_spec='lib$name'
6185 soname_spec=
6186 postinstall_cmds=
6187 postuninstall_cmds=
6188 finish_cmds=
6189 finish_eval=
6190 shlibpath_var=
6191 shlibpath_overrides_runpath=unknown
6192 version_type=none
6193 dynamic_linker="$host_os ld.so"
6194 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6195 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6196
6197 case $host_os in
6198 aix3*)
6199   version_type=linux
6200   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6201   shlibpath_var=LIBPATH
6202
6203   # AIX has no versioning support, so we append a major version to the name.
6204   soname_spec='${libname}${release}.so$major'
6205   ;;
6206
6207 aix4* | aix5*)
6208   version_type=linux
6209   need_lib_prefix=no
6210   need_version=no
6211   hardcode_into_libs=yes
6212   if test "$host_cpu" = ia64; then
6213     # AIX 5 supports IA64
6214     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6215     shlibpath_var=LD_LIBRARY_PATH
6216   else
6217     # With GCC up to 2.95.x, collect2 would create an import file
6218     # for dependence libraries.  The import file would start with
6219     # the line `#! .'.  This would cause the generated library to
6220     # depend on `.', always an invalid library.  This was fixed in
6221     # development snapshots of GCC prior to 3.0.
6222     case $host_os in
6223       aix4 | aix4.[01] | aix4.[01].*)
6224         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6225              echo ' yes '
6226              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6227           :
6228         else
6229           can_build_shared=no
6230         fi
6231         ;;
6232     esac
6233     # AIX (on Power*) has no versioning support, so currently we can
6234     # not hardcode correct soname into executable. Probably we can
6235     # add versioning support to collect2, so additional links can
6236     # be useful in future.
6237     if test "$aix_use_runtimelinking" = yes; then
6238       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6239       # instead of lib<name>.a to let people know that these are not
6240       # typical AIX shared libraries.
6241       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6242     else
6243       # We preserve .a as extension for shared libraries through AIX4.2
6244       # and later when we are not doing run time linking.
6245       library_names_spec='${libname}${release}.a $libname.a'
6246       soname_spec='${libname}${release}.so$major'
6247     fi
6248     shlibpath_var=LIBPATH
6249   fi
6250   hardcode_into_libs=yes
6251   ;;
6252
6253 amigaos*)
6254   library_names_spec='$libname.ixlibrary $libname.a'
6255   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6256   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'
6257   ;;
6258
6259 beos*)
6260   library_names_spec='${libname}.so'
6261   dynamic_linker="$host_os ld.so"
6262   shlibpath_var=LIBRARY_PATH
6263   ;;
6264
6265 bsdi4*)
6266   version_type=linux
6267   need_version=no
6268   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6269   soname_spec='${libname}${release}.so$major'
6270   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6271   shlibpath_var=LD_LIBRARY_PATH
6272   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6273   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6274   export_dynamic_flag_spec=-rdynamic
6275   # the default ld.so.conf also contains /usr/contrib/lib and
6276   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6277   # libtool to hard-code these into programs
6278   ;;
6279
6280 cygwin* | mingw* | pw32*)
6281   version_type=windows
6282   need_version=no
6283   need_lib_prefix=no
6284   case $GCC,$host_os in
6285   yes,cygwin*)
6286     library_names_spec='$libname.dll.a'
6287     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6288     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6289       dldir=$destdir/`dirname \$dlpath`~
6290       test -d \$dldir || mkdir -p \$dldir~
6291       $install_prog .libs/$dlname \$dldir/$dlname'
6292     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6293       dlpath=$dir/\$dldll~
6294        $rm \$dlpath'
6295     ;;
6296   yes,mingw*)
6297     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6298     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6299     ;;
6300   yes,pw32*)
6301     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6302     ;;
6303   *)
6304     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6305     ;;
6306   esac
6307   dynamic_linker='Win32 ld.exe'
6308   # FIXME: first we should search . and the directory the executable is in
6309   shlibpath_var=PATH
6310   ;;
6311
6312 darwin* | rhapsody*)
6313   dynamic_linker="$host_os dyld"
6314   version_type=darwin
6315   need_lib_prefix=no
6316   need_version=no
6317   # FIXME: Relying on posixy $() will cause problems for
6318   #        cross-compilation, but unfortunately the echo tests do not
6319   #        yet detect zsh echo's removal of \ escapes.
6320   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)'
6321   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6322   shlibpath_overrides_runpath=yes
6323   shlibpath_var=DYLD_LIBRARY_PATH
6324   ;;
6325
6326 freebsd1*)
6327   dynamic_linker=no
6328   ;;
6329
6330 freebsd*)
6331   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6332   version_type=freebsd-$objformat
6333   case $version_type in
6334     freebsd-elf*)
6335       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6336       need_version=no
6337       need_lib_prefix=no
6338       ;;
6339     freebsd-*)
6340       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6341       need_version=yes
6342       ;;
6343   esac
6344   shlibpath_var=LD_LIBRARY_PATH
6345   case $host_os in
6346   freebsd2*)
6347     shlibpath_overrides_runpath=yes
6348     ;;
6349   *)
6350     shlibpath_overrides_runpath=no
6351     hardcode_into_libs=yes
6352     ;;
6353   esac
6354   ;;
6355
6356 gnu*)
6357   version_type=linux
6358   need_lib_prefix=no
6359   need_version=no
6360   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6361   soname_spec='${libname}${release}.so$major'
6362   shlibpath_var=LD_LIBRARY_PATH
6363   hardcode_into_libs=yes
6364   ;;
6365
6366 hpux9* | hpux10* | hpux11*)
6367   # Give a soname corresponding to the major version so that dld.sl refuses to
6368   # link against other versions.
6369   dynamic_linker="$host_os dld.sl"
6370   version_type=sunos
6371   need_lib_prefix=no
6372   need_version=no
6373   shlibpath_var=SHLIB_PATH
6374   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6375   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6376   soname_spec='${libname}${release}.sl$major'
6377   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6378   postinstall_cmds='chmod 555 $lib'
6379   ;;
6380
6381 irix5* | irix6* | nonstopux*)
6382   case $host_os in
6383     nonstopux*) version_type=nonstopux ;;
6384     *)          version_type=irix ;;
6385   esac
6386   need_lib_prefix=no
6387   need_version=no
6388   soname_spec='${libname}${release}.so$major'
6389   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6390   case $host_os in
6391   irix5* | nonstopux*)
6392     libsuff= shlibsuff=
6393     ;;
6394   *)
6395     case $LD in # libtool.m4 will add one of these switches to LD
6396     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6397     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6398     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6399     *) libsuff= shlibsuff= libmagic=never-match;;
6400     esac
6401     ;;
6402   esac
6403   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6404   shlibpath_overrides_runpath=no
6405   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6406   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6407   ;;
6408
6409 # No shared lib support for Linux oldld, aout, or coff.
6410 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6411   dynamic_linker=no
6412   ;;
6413
6414 # This must be Linux ELF.
6415 linux-gnu*)
6416   version_type=linux
6417   need_lib_prefix=no
6418   need_version=no
6419   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6420   soname_spec='${libname}${release}.so$major'
6421   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6422   shlibpath_var=LD_LIBRARY_PATH
6423   shlibpath_overrides_runpath=no
6424   # This implies no fast_install, which is unacceptable.
6425   # Some rework will be needed to allow for fast_install
6426   # before this can be enabled.
6427   hardcode_into_libs=yes
6428
6429   # We used to test for /lib/ld.so.1 and disable shared libraries on
6430   # powerpc, because MkLinux only supported shared libraries with the
6431   # GNU dynamic linker.  Since this was broken with cross compilers,
6432   # most powerpc-linux boxes support dynamic linking these days and
6433   # people can always --disable-shared, the test was removed, and we
6434   # assume the GNU/Linux dynamic linker is in use.
6435   dynamic_linker='GNU/Linux ld.so'
6436   ;;
6437
6438 netbsd*)
6439   version_type=sunos
6440   need_lib_prefix=no
6441   need_version=no
6442   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6443     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6444     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6445     dynamic_linker='NetBSD (a.out) ld.so'
6446   else
6447     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6448     soname_spec='${libname}${release}.so$major'
6449     dynamic_linker='NetBSD ld.elf_so'
6450   fi
6451   shlibpath_var=LD_LIBRARY_PATH
6452   shlibpath_overrides_runpath=yes
6453   hardcode_into_libs=yes
6454   ;;
6455
6456 newsos6)
6457   version_type=linux
6458   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6459   shlibpath_var=LD_LIBRARY_PATH
6460   shlibpath_overrides_runpath=yes
6461   ;;
6462
6463 openbsd*)
6464   version_type=sunos
6465   need_lib_prefix=no
6466   need_version=no
6467   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6468     case "$host_os" in
6469     openbsd2.[89] | openbsd2.[89].*)
6470       shlibpath_overrides_runpath=no
6471       ;;
6472     *)
6473       shlibpath_overrides_runpath=yes
6474       ;;
6475     esac
6476   else
6477     shlibpath_overrides_runpath=yes
6478   fi
6479   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6480   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6481   shlibpath_var=LD_LIBRARY_PATH
6482   ;;
6483
6484 openedition*)
6485   need_lib_prefix=no
6486   need_version=no
6487   shlibpath_overrides_runpath=yes
6488   shlibpath_var=LIBPATH
6489   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6490   # the library's exports are in libname.x; this is the file that must
6491   # actually be linked with to use a DLL.
6492   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6493   ;;
6494
6495 os2*)
6496   libname_spec='$name'
6497   need_lib_prefix=no
6498   library_names_spec='$libname.dll $libname.a'
6499   dynamic_linker='OS/2 ld.exe'
6500   shlibpath_var=LIBPATH
6501   ;;
6502
6503 osf3* | osf4* | osf5*)
6504   version_type=osf
6505   need_version=no
6506   soname_spec='${libname}${release}.so$major'
6507   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6508   shlibpath_var=LD_LIBRARY_PATH
6509   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6510   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6511   hardcode_into_libs=yes
6512   ;;
6513
6514 sco3.2v5*)
6515   version_type=osf
6516   soname_spec='${libname}${release}.so$major'
6517   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6518   shlibpath_var=LD_LIBRARY_PATH
6519   ;;
6520
6521 solaris*)
6522   version_type=linux
6523   need_lib_prefix=no
6524   need_version=no
6525   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6526   soname_spec='${libname}${release}.so$major'
6527   shlibpath_var=LD_LIBRARY_PATH
6528   shlibpath_overrides_runpath=yes
6529   hardcode_into_libs=yes
6530   # ldd complains unless libraries are executable
6531   postinstall_cmds='chmod +x $lib'
6532   ;;
6533
6534 sunos4*)
6535   version_type=sunos
6536   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6537   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6538   shlibpath_var=LD_LIBRARY_PATH
6539   shlibpath_overrides_runpath=yes
6540   if test "$with_gnu_ld" = yes; then
6541     need_lib_prefix=no
6542   fi
6543   need_version=yes
6544   ;;
6545
6546 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6547   version_type=linux
6548   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6549   soname_spec='${libname}${release}.so$major'
6550   shlibpath_var=LD_LIBRARY_PATH
6551   case $host_vendor in
6552     sni)
6553       shlibpath_overrides_runpath=no
6554       need_lib_prefix=no
6555       export_dynamic_flag_spec='${wl}-Blargedynsym'
6556       runpath_var=LD_RUN_PATH
6557       ;;
6558     siemens)
6559       need_lib_prefix=no
6560       ;;
6561     motorola)
6562       need_lib_prefix=no
6563       need_version=no
6564       shlibpath_overrides_runpath=no
6565       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6566       ;;
6567   esac
6568   ;;
6569
6570 uts4*)
6571   version_type=linux
6572   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6573   soname_spec='${libname}${release}.so$major'
6574   shlibpath_var=LD_LIBRARY_PATH
6575   ;;
6576
6577 dgux*)
6578   version_type=linux
6579   need_lib_prefix=no
6580   need_version=no
6581   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6582   soname_spec='${libname}${release}.so$major'
6583   shlibpath_var=LD_LIBRARY_PATH
6584   ;;
6585
6586 sysv4*MP*)
6587   if test -d /usr/nec ;then
6588     version_type=linux
6589     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6590     soname_spec='$libname.so.$major'
6591     shlibpath_var=LD_LIBRARY_PATH
6592   fi
6593   ;;
6594
6595 *)
6596   dynamic_linker=no
6597   ;;
6598 esac
6599 echo "$ac_t""$dynamic_linker" 1>&6
6600 test "$dynamic_linker" = no && can_build_shared=no
6601
6602 # Report the final consequences.
6603 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6604 echo "configure:6605: checking if libtool supports shared libraries" >&5
6605 echo "$ac_t""$can_build_shared" 1>&6
6606
6607 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6608 echo "configure:6609: checking whether to build shared libraries" >&5
6609 test "$can_build_shared" = "no" && enable_shared=no
6610
6611 # On AIX, shared libraries and static libraries use the same namespace, and
6612 # are all built from PIC.
6613 case "$host_os" in
6614 aix3*)
6615   test "$enable_shared" = yes && enable_static=no
6616   if test -n "$RANLIB"; then
6617     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6618     postinstall_cmds='$RANLIB $lib'
6619   fi
6620   ;;
6621
6622 aix4*)
6623   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6624     test "$enable_shared" = yes && enable_static=no
6625   fi
6626   ;;
6627 esac
6628 echo "$ac_t""$enable_shared" 1>&6
6629
6630 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6631 echo "configure:6632: checking whether to build static libraries" >&5
6632 # Make sure either enable_shared or enable_static is yes.
6633 test "$enable_shared" = yes || enable_static=yes
6634 echo "$ac_t""$enable_static" 1>&6
6635
6636 if test "$hardcode_action" = relink; then
6637   # Fast installation is not supported
6638   enable_fast_install=no
6639 elif test "$shlibpath_overrides_runpath" = yes ||
6640      test "$enable_shared" = no; then
6641   # Fast installation is not necessary
6642   enable_fast_install=needless
6643 fi
6644
6645 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6646 if test "$GCC" = yes; then
6647   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6648 fi
6649
6650 if test "x$enable_dlopen" != xyes; then
6651   enable_dlopen=unknown
6652   enable_dlopen_self=unknown
6653   enable_dlopen_self_static=unknown
6654 else
6655   lt_cv_dlopen=no
6656   lt_cv_dlopen_libs=
6657
6658   case $host_os in
6659   beos*)
6660     lt_cv_dlopen="load_add_on"
6661     lt_cv_dlopen_libs=
6662     lt_cv_dlopen_self=yes
6663     ;;
6664
6665   cygwin* | mingw* | pw32*)
6666     lt_cv_dlopen="LoadLibrary"
6667     lt_cv_dlopen_libs=
6668    ;;
6669
6670   *)
6671     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6672 echo "configure:6673: checking for dllload" >&5
6673 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6674   echo $ac_n "(cached) $ac_c" 1>&6
6675 else
6676   cat > conftest.$ac_ext <<EOF
6677 #line 6678 "configure"
6678 #include "confdefs.h"
6679 /* System header to define __stub macros and hopefully few prototypes,
6680     which can conflict with char dllload(); below.  */
6681 #include <assert.h>
6682 /* Override any gcc2 internal prototype to avoid an error.  */
6683 /* We use char because int might match the return type of a gcc2
6684     builtin and then its argument prototype would still apply.  */
6685 char dllload();
6686 char (*f)();
6687
6688 int main() {
6689
6690 /* The GNU C library defines this for functions which it implements
6691     to always fail with ENOSYS.  Some functions are actually named
6692     something starting with __ and the normal name is an alias.  */
6693 #if defined (__stub_dllload) || defined (__stub___dllload)
6694 choke me
6695 #else
6696 f = dllload;
6697 #endif
6698
6699 ; return 0; }
6700 EOF
6701 if { (eval echo configure:6702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6702   rm -rf conftest*
6703   eval "ac_cv_func_dllload=yes"
6704 else
6705   echo "configure: failed program was:" >&5
6706   cat conftest.$ac_ext >&5
6707   rm -rf conftest*
6708   eval "ac_cv_func_dllload=no"
6709 fi
6710 rm -f conftest*
6711 fi
6712
6713 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6714   echo "$ac_t""yes" 1>&6
6715   lt_cv_dlopen="dllload"
6716 else
6717   echo "$ac_t""no" 1>&6
6718 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6719 echo "configure:6720: checking for shl_load" >&5
6720 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6721   echo $ac_n "(cached) $ac_c" 1>&6
6722 else
6723   cat > conftest.$ac_ext <<EOF
6724 #line 6725 "configure"
6725 #include "confdefs.h"
6726 /* System header to define __stub macros and hopefully few prototypes,
6727     which can conflict with char shl_load(); below.  */
6728 #include <assert.h>
6729 /* Override any gcc2 internal prototype to avoid an error.  */
6730 /* We use char because int might match the return type of a gcc2
6731     builtin and then its argument prototype would still apply.  */
6732 char shl_load();
6733 char (*f)();
6734
6735 int main() {
6736
6737 /* The GNU C library defines this for functions which it implements
6738     to always fail with ENOSYS.  Some functions are actually named
6739     something starting with __ and the normal name is an alias.  */
6740 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6741 choke me
6742 #else
6743 f = shl_load;
6744 #endif
6745
6746 ; return 0; }
6747 EOF
6748 if { (eval echo configure:6749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6749   rm -rf conftest*
6750   eval "ac_cv_func_shl_load=yes"
6751 else
6752   echo "configure: failed program was:" >&5
6753   cat conftest.$ac_ext >&5
6754   rm -rf conftest*
6755   eval "ac_cv_func_shl_load=no"
6756 fi
6757 rm -f conftest*
6758 fi
6759
6760 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6761   echo "$ac_t""yes" 1>&6
6762   lt_cv_dlopen="shl_load"
6763 else
6764   echo "$ac_t""no" 1>&6
6765 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6766 echo "configure:6767: checking for shl_load in -ldld" >&5
6767 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6768 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6769   echo $ac_n "(cached) $ac_c" 1>&6
6770 else
6771   ac_save_LIBS="$LIBS"
6772 LIBS="-ldld  $LIBS"
6773 cat > conftest.$ac_ext <<EOF
6774 #line 6775 "configure"
6775 #include "confdefs.h"
6776 /* Override any gcc2 internal prototype to avoid an error.  */
6777 /* We use char because int might match the return type of a gcc2
6778     builtin and then its argument prototype would still apply.  */
6779 char shl_load();
6780
6781 int main() {
6782 shl_load()
6783 ; return 0; }
6784 EOF
6785 if { (eval echo configure:6786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6786   rm -rf conftest*
6787   eval "ac_cv_lib_$ac_lib_var=yes"
6788 else
6789   echo "configure: failed program was:" >&5
6790   cat conftest.$ac_ext >&5
6791   rm -rf conftest*
6792   eval "ac_cv_lib_$ac_lib_var=no"
6793 fi
6794 rm -f conftest*
6795 LIBS="$ac_save_LIBS"
6796
6797 fi
6798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6799   echo "$ac_t""yes" 1>&6
6800   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6801 else
6802   echo "$ac_t""no" 1>&6
6803 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6804 echo "configure:6805: checking for dlopen" >&5
6805 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6806   echo $ac_n "(cached) $ac_c" 1>&6
6807 else
6808   cat > conftest.$ac_ext <<EOF
6809 #line 6810 "configure"
6810 #include "confdefs.h"
6811 /* System header to define __stub macros and hopefully few prototypes,
6812     which can conflict with char dlopen(); below.  */
6813 #include <assert.h>
6814 /* Override any gcc2 internal prototype to avoid an error.  */
6815 /* We use char because int might match the return type of a gcc2
6816     builtin and then its argument prototype would still apply.  */
6817 char dlopen();
6818 char (*f)();
6819
6820 int main() {
6821
6822 /* The GNU C library defines this for functions which it implements
6823     to always fail with ENOSYS.  Some functions are actually named
6824     something starting with __ and the normal name is an alias.  */
6825 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6826 choke me
6827 #else
6828 f = dlopen;
6829 #endif
6830
6831 ; return 0; }
6832 EOF
6833 if { (eval echo configure:6834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6834   rm -rf conftest*
6835   eval "ac_cv_func_dlopen=yes"
6836 else
6837   echo "configure: failed program was:" >&5
6838   cat conftest.$ac_ext >&5
6839   rm -rf conftest*
6840   eval "ac_cv_func_dlopen=no"
6841 fi
6842 rm -f conftest*
6843 fi
6844
6845 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6846   echo "$ac_t""yes" 1>&6
6847   lt_cv_dlopen="dlopen"
6848 else
6849   echo "$ac_t""no" 1>&6
6850 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6851 echo "configure:6852: checking for dlopen in -ldl" >&5
6852 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6853 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6854   echo $ac_n "(cached) $ac_c" 1>&6
6855 else
6856   ac_save_LIBS="$LIBS"
6857 LIBS="-ldl  $LIBS"
6858 cat > conftest.$ac_ext <<EOF
6859 #line 6860 "configure"
6860 #include "confdefs.h"
6861 /* Override any gcc2 internal prototype to avoid an error.  */
6862 /* We use char because int might match the return type of a gcc2
6863     builtin and then its argument prototype would still apply.  */
6864 char dlopen();
6865
6866 int main() {
6867 dlopen()
6868 ; return 0; }
6869 EOF
6870 if { (eval echo configure:6871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6871   rm -rf conftest*
6872   eval "ac_cv_lib_$ac_lib_var=yes"
6873 else
6874   echo "configure: failed program was:" >&5
6875   cat conftest.$ac_ext >&5
6876   rm -rf conftest*
6877   eval "ac_cv_lib_$ac_lib_var=no"
6878 fi
6879 rm -f conftest*
6880 LIBS="$ac_save_LIBS"
6881
6882 fi
6883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6884   echo "$ac_t""yes" 1>&6
6885   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6886 else
6887   echo "$ac_t""no" 1>&6
6888 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6889 echo "configure:6890: checking for dlopen in -lsvld" >&5
6890 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6891 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6892   echo $ac_n "(cached) $ac_c" 1>&6
6893 else
6894   ac_save_LIBS="$LIBS"
6895 LIBS="-lsvld  $LIBS"
6896 cat > conftest.$ac_ext <<EOF
6897 #line 6898 "configure"
6898 #include "confdefs.h"
6899 /* Override any gcc2 internal prototype to avoid an error.  */
6900 /* We use char because int might match the return type of a gcc2
6901     builtin and then its argument prototype would still apply.  */
6902 char dlopen();
6903
6904 int main() {
6905 dlopen()
6906 ; return 0; }
6907 EOF
6908 if { (eval echo configure:6909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6909   rm -rf conftest*
6910   eval "ac_cv_lib_$ac_lib_var=yes"
6911 else
6912   echo "configure: failed program was:" >&5
6913   cat conftest.$ac_ext >&5
6914   rm -rf conftest*
6915   eval "ac_cv_lib_$ac_lib_var=no"
6916 fi
6917 rm -f conftest*
6918 LIBS="$ac_save_LIBS"
6919
6920 fi
6921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6922   echo "$ac_t""yes" 1>&6
6923   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6924 else
6925   echo "$ac_t""no" 1>&6
6926 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6927 echo "configure:6928: checking for dld_link in -ldld" >&5
6928 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6929 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6930   echo $ac_n "(cached) $ac_c" 1>&6
6931 else
6932   ac_save_LIBS="$LIBS"
6933 LIBS="-ldld  $LIBS"
6934 cat > conftest.$ac_ext <<EOF
6935 #line 6936 "configure"
6936 #include "confdefs.h"
6937 /* Override any gcc2 internal prototype to avoid an error.  */
6938 /* We use char because int might match the return type of a gcc2
6939     builtin and then its argument prototype would still apply.  */
6940 char dld_link();
6941
6942 int main() {
6943 dld_link()
6944 ; return 0; }
6945 EOF
6946 if { (eval echo configure:6947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6947   rm -rf conftest*
6948   eval "ac_cv_lib_$ac_lib_var=yes"
6949 else
6950   echo "configure: failed program was:" >&5
6951   cat conftest.$ac_ext >&5
6952   rm -rf conftest*
6953   eval "ac_cv_lib_$ac_lib_var=no"
6954 fi
6955 rm -f conftest*
6956 LIBS="$ac_save_LIBS"
6957
6958 fi
6959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6960   echo "$ac_t""yes" 1>&6
6961   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6962 else
6963   echo "$ac_t""no" 1>&6
6964 fi
6965
6966               
6967 fi
6968
6969             
6970 fi
6971
6972           
6973 fi
6974
6975         
6976 fi
6977
6978       
6979 fi
6980
6981     
6982 fi
6983
6984     ;;
6985   esac
6986
6987   if test "x$lt_cv_dlopen" != xno; then
6988     enable_dlopen=yes
6989   else
6990     enable_dlopen=no
6991   fi
6992
6993   case $lt_cv_dlopen in
6994   dlopen)
6995     save_CPPFLAGS="$CPPFLAGS"
6996         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6997
6998     save_LDFLAGS="$LDFLAGS"
6999     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7000
7001     save_LIBS="$LIBS"
7002     LIBS="$lt_cv_dlopen_libs $LIBS"
7003
7004     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
7005 echo "configure:7006: checking whether a program can dlopen itself" >&5
7006 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
7007   echo $ac_n "(cached) $ac_c" 1>&6
7008 else
7009           if test "$cross_compiling" = yes; then :
7010   lt_cv_dlopen_self=cross
7011 else
7012     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7013   lt_status=$lt_dlunknown
7014   cat > conftest.$ac_ext <<EOF
7015 #line 7016 "configure"
7016 #include "confdefs.h"
7017
7018 #if HAVE_DLFCN_H
7019 #include <dlfcn.h>
7020 #endif
7021
7022 #include <stdio.h>
7023
7024 #ifdef RTLD_GLOBAL
7025 #  define LT_DLGLOBAL           RTLD_GLOBAL
7026 #else
7027 #  ifdef DL_GLOBAL
7028 #    define LT_DLGLOBAL         DL_GLOBAL
7029 #  else
7030 #    define LT_DLGLOBAL         0
7031 #  endif
7032 #endif
7033
7034 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7035    find out it does not work in some platform. */
7036 #ifndef LT_DLLAZY_OR_NOW
7037 #  ifdef RTLD_LAZY
7038 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7039 #  else
7040 #    ifdef DL_LAZY
7041 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7042 #    else
7043 #      ifdef RTLD_NOW
7044 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7045 #      else
7046 #        ifdef DL_NOW
7047 #          define LT_DLLAZY_OR_NOW      DL_NOW
7048 #        else
7049 #          define LT_DLLAZY_OR_NOW      0
7050 #        endif
7051 #      endif
7052 #    endif
7053 #  endif
7054 #endif
7055
7056 #ifdef __cplusplus
7057 extern "C" void exit (int);
7058 #endif
7059
7060 void fnord() { int i=42;}
7061 int main ()
7062 {
7063   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7064   int status = $lt_dlunknown;
7065
7066   if (self)
7067     {
7068       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7069       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7070       /* dlclose (self); */
7071     }
7072
7073     exit (status);
7074 }
7075 EOF
7076   if { (eval echo configure:7077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7077     (./conftest; exit; ) 2>/dev/null
7078     lt_status=$?
7079     case x$lt_status in
7080       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7081       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7082       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7083     esac
7084   else :
7085     # compilation failed
7086     lt_cv_dlopen_self=no
7087   fi
7088 fi
7089 rm -fr conftest*
7090
7091     
7092 fi
7093
7094 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7095
7096     if test "x$lt_cv_dlopen_self" = xyes; then
7097       LDFLAGS="$LDFLAGS $link_static_flag"
7098       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7099 echo "configure:7100: checking whether a statically linked program can dlopen itself" >&5
7100 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7101   echo $ac_n "(cached) $ac_c" 1>&6
7102 else
7103           if test "$cross_compiling" = yes; then :
7104   lt_cv_dlopen_self_static=cross
7105 else
7106     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7107   lt_status=$lt_dlunknown
7108   cat > conftest.$ac_ext <<EOF
7109 #line 7110 "configure"
7110 #include "confdefs.h"
7111
7112 #if HAVE_DLFCN_H
7113 #include <dlfcn.h>
7114 #endif
7115
7116 #include <stdio.h>
7117
7118 #ifdef RTLD_GLOBAL
7119 #  define LT_DLGLOBAL           RTLD_GLOBAL
7120 #else
7121 #  ifdef DL_GLOBAL
7122 #    define LT_DLGLOBAL         DL_GLOBAL
7123 #  else
7124 #    define LT_DLGLOBAL         0
7125 #  endif
7126 #endif
7127
7128 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7129    find out it does not work in some platform. */
7130 #ifndef LT_DLLAZY_OR_NOW
7131 #  ifdef RTLD_LAZY
7132 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7133 #  else
7134 #    ifdef DL_LAZY
7135 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7136 #    else
7137 #      ifdef RTLD_NOW
7138 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7139 #      else
7140 #        ifdef DL_NOW
7141 #          define LT_DLLAZY_OR_NOW      DL_NOW
7142 #        else
7143 #          define LT_DLLAZY_OR_NOW      0
7144 #        endif
7145 #      endif
7146 #    endif
7147 #  endif
7148 #endif
7149
7150 #ifdef __cplusplus
7151 extern "C" void exit (int);
7152 #endif
7153
7154 void fnord() { int i=42;}
7155 int main ()
7156 {
7157   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7158   int status = $lt_dlunknown;
7159
7160   if (self)
7161     {
7162       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7163       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7164       /* dlclose (self); */
7165     }
7166
7167     exit (status);
7168 }
7169 EOF
7170   if { (eval echo configure:7171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7171     (./conftest; exit; ) 2>/dev/null
7172     lt_status=$?
7173     case x$lt_status in
7174       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7175       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7176       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7177     esac
7178   else :
7179     # compilation failed
7180     lt_cv_dlopen_self_static=no
7181   fi
7182 fi
7183 rm -fr conftest*
7184
7185       
7186 fi
7187
7188 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7189     fi
7190
7191     CPPFLAGS="$save_CPPFLAGS"
7192     LDFLAGS="$save_LDFLAGS"
7193     LIBS="$save_LIBS"
7194     ;;
7195   esac
7196
7197   case $lt_cv_dlopen_self in
7198   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7199   *) enable_dlopen_self=unknown ;;
7200   esac
7201
7202   case $lt_cv_dlopen_self_static in
7203   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7204   *) enable_dlopen_self_static=unknown ;;
7205   esac
7206 fi
7207
7208
7209 if test "$enable_shared" = yes && test "$GCC" = yes; then
7210   case $archive_cmds in
7211   *'~'*)
7212     # FIXME: we may have to deal with multi-command sequences.
7213     ;;
7214   '$CC '*)
7215     # Test whether the compiler implicitly links with -lc since on some
7216     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7217     # to ld, don't add -lc before -lgcc.
7218     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7219 echo "configure:7220: checking whether -lc should be explicitly linked in" >&5
7220     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7221   echo $ac_n "(cached) $ac_c" 1>&6
7222 else
7223   $rm conftest*
7224     echo 'static int dummy;' > conftest.$ac_ext
7225
7226     if { (eval echo configure:7227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7227       soname=conftest
7228       lib=conftest
7229       libobjs=conftest.$ac_objext
7230       deplibs=
7231       wl=$lt_cv_prog_cc_wl
7232       compiler_flags=-v
7233       linker_flags=-v
7234       verstring=
7235       output_objdir=.
7236       libname=conftest
7237       save_allow_undefined_flag=$allow_undefined_flag
7238       allow_undefined_flag=
7239       if { (eval echo configure:7240: \"$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; }
7240       then
7241         lt_cv_archive_cmds_need_lc=no
7242       else
7243         lt_cv_archive_cmds_need_lc=yes
7244       fi
7245       allow_undefined_flag=$save_allow_undefined_flag
7246     else
7247       cat conftest.err 1>&5
7248     fi
7249 fi
7250
7251     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7252     ;;
7253   esac
7254 fi
7255 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7256
7257 # The second clause should only fire when bootstrapping the
7258 # libtool distribution, otherwise you forgot to ship ltmain.sh
7259 # with your package, and you will get complaints that there are
7260 # no rules to generate ltmain.sh.
7261 if test -f "$ltmain"; then
7262   :
7263 else
7264   # If there is no Makefile yet, we rely on a make rule to execute
7265   # `config.status --recheck' to rerun these tests and create the
7266   # libtool script then.
7267   test -f Makefile && make "$ltmain"
7268 fi
7269
7270 if test -f "$ltmain"; then
7271   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7272   $rm -f "${ofile}T"
7273
7274   echo creating $ofile
7275
7276   # Now quote all the things that may contain metacharacters while being
7277   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7278   # variables and quote the copies for generation of the libtool script.
7279   for var in echo old_CC old_CFLAGS SED \
7280     AR AR_FLAGS CC LD LN_S NM SHELL \
7281     reload_flag reload_cmds wl \
7282     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7283     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7284     library_names_spec soname_spec \
7285     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7286     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7287     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7288     old_striplib striplib file_magic_cmd export_symbols_cmds \
7289     deplibs_check_method allow_undefined_flag no_undefined_flag \
7290     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7291     global_symbol_to_c_name_address \
7292     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7293     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7294     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7295
7296     case $var in
7297     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7298     old_postinstall_cmds | old_postuninstall_cmds | \
7299     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7300     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7301     postinstall_cmds | postuninstall_cmds | \
7302     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7303       # Double-quote double-evaled strings.
7304       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7305       ;;
7306     *)
7307       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7308       ;;
7309     esac
7310   done
7311
7312   cat <<__EOF__ > "${ofile}T"
7313 #! $SHELL
7314
7315 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7316 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7317 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7318 #
7319 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7320 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7321 #
7322 # This program is free software; you can redistribute it and/or modify
7323 # it under the terms of the GNU General Public License as published by
7324 # the Free Software Foundation; either version 2 of the License, or
7325 # (at your option) any later version.
7326 #
7327 # This program is distributed in the hope that it will be useful, but
7328 # WITHOUT ANY WARRANTY; without even the implied warranty of
7329 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7330 # General Public License for more details.
7331 #
7332 # You should have received a copy of the GNU General Public License
7333 # along with this program; if not, write to the Free Software
7334 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7335 #
7336 # As a special exception to the GNU General Public License, if you
7337 # distribute this file as part of a program that contains a
7338 # configuration script generated by Autoconf, you may include it under
7339 # the same distribution terms that you use for the rest of that program.
7340
7341 # A sed that does not truncate output.
7342 SED=$lt_SED
7343
7344 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7345 Xsed="${SED} -e s/^X//"
7346
7347 # The HP-UX ksh and POSIX shell print the target directory to stdout
7348 # if CDPATH is set.
7349 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7350
7351 # ### BEGIN LIBTOOL CONFIG
7352
7353 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7354
7355 # Shell to use when invoking shell scripts.
7356 SHELL=$lt_SHELL
7357
7358 # Whether or not to build shared libraries.
7359 build_libtool_libs=$enable_shared
7360
7361 # Whether or not to build static libraries.
7362 build_old_libs=$enable_static
7363
7364 # Whether or not to add -lc for building shared libraries.
7365 build_libtool_need_lc=$need_lc
7366
7367 # Whether or not to optimize for fast installation.
7368 fast_install=$enable_fast_install
7369
7370 # The host system.
7371 host_alias=$host_alias
7372 host=$host
7373
7374 # An echo program that does not interpret backslashes.
7375 echo=$lt_echo
7376
7377 # The archiver.
7378 AR=$lt_AR
7379 AR_FLAGS=$lt_AR_FLAGS
7380
7381 # The default C compiler.
7382 CC=$lt_CC
7383
7384 # Is the compiler the GNU C compiler?
7385 with_gcc=$GCC
7386
7387 # The linker used to build libraries.
7388 LD=$lt_LD
7389
7390 # Whether we need hard or soft links.
7391 LN_S=$lt_LN_S
7392
7393 # A BSD-compatible nm program.
7394 NM=$lt_NM
7395
7396 # A symbol stripping program
7397 STRIP=$STRIP
7398
7399 # Used to examine libraries when file_magic_cmd begins "file"
7400 MAGIC_CMD=$MAGIC_CMD
7401
7402 # Used on cygwin: DLL creation program.
7403 DLLTOOL="$DLLTOOL"
7404
7405 # Used on cygwin: object dumper.
7406 OBJDUMP="$OBJDUMP"
7407
7408 # Used on cygwin: assembler.
7409 AS="$AS"
7410
7411 # The name of the directory that contains temporary libtool files.
7412 objdir=$objdir
7413
7414 # How to create reloadable object files.
7415 reload_flag=$lt_reload_flag
7416 reload_cmds=$lt_reload_cmds
7417
7418 # How to pass a linker flag through the compiler.
7419 wl=$lt_wl
7420
7421 # Object file suffix (normally "o").
7422 objext="$ac_objext"
7423
7424 # Old archive suffix (normally "a").
7425 libext="$libext"
7426
7427 # Executable file suffix (normally "").
7428 exeext="$exeext"
7429
7430 # Additional compiler flags for building library objects.
7431 pic_flag=$lt_pic_flag
7432 pic_mode=$pic_mode
7433
7434 # Does compiler simultaneously support -c and -o options?
7435 compiler_c_o=$lt_compiler_c_o
7436
7437 # Can we write directly to a .lo ?
7438 compiler_o_lo=$lt_compiler_o_lo
7439
7440 # Must we lock files when doing compilation ?
7441 need_locks=$lt_need_locks
7442
7443 # Do we need the lib prefix for modules?
7444 need_lib_prefix=$need_lib_prefix
7445
7446 # Do we need a version for libraries?
7447 need_version=$need_version
7448
7449 # Whether dlopen is supported.
7450 dlopen_support=$enable_dlopen
7451
7452 # Whether dlopen of programs is supported.
7453 dlopen_self=$enable_dlopen_self
7454
7455 # Whether dlopen of statically linked programs is supported.
7456 dlopen_self_static=$enable_dlopen_self_static
7457
7458 # Compiler flag to prevent dynamic linking.
7459 link_static_flag=$lt_link_static_flag
7460
7461 # Compiler flag to turn off builtin functions.
7462 no_builtin_flag=$lt_no_builtin_flag
7463
7464 # Compiler flag to allow reflexive dlopens.
7465 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7466
7467 # Compiler flag to generate shared objects directly from archives.
7468 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7469
7470 # Compiler flag to generate thread-safe objects.
7471 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7472
7473 # Library versioning type.
7474 version_type=$version_type
7475
7476 # Format of library name prefix.
7477 libname_spec=$lt_libname_spec
7478
7479 # List of archive names.  First name is the real one, the rest are links.
7480 # The last name is the one that the linker finds with -lNAME.
7481 library_names_spec=$lt_library_names_spec
7482
7483 # The coded name of the library, if different from the real name.
7484 soname_spec=$lt_soname_spec
7485
7486 # Commands used to build and install an old-style archive.
7487 RANLIB=$lt_RANLIB
7488 old_archive_cmds=$lt_old_archive_cmds
7489 old_postinstall_cmds=$lt_old_postinstall_cmds
7490 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7491
7492 # Create an old-style archive from a shared archive.
7493 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7494
7495 # Create a temporary old-style archive to link instead of a shared archive.
7496 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7497
7498 # Commands used to build and install a shared archive.
7499 archive_cmds=$lt_archive_cmds
7500 archive_expsym_cmds=$lt_archive_expsym_cmds
7501 postinstall_cmds=$lt_postinstall_cmds
7502 postuninstall_cmds=$lt_postuninstall_cmds
7503
7504 # Commands to strip libraries.
7505 old_striplib=$lt_old_striplib
7506 striplib=$lt_striplib
7507
7508 # Method to check whether dependent libraries are shared objects.
7509 deplibs_check_method=$lt_deplibs_check_method
7510
7511 # Command to use when deplibs_check_method == file_magic.
7512 file_magic_cmd=$lt_file_magic_cmd
7513
7514 # Flag that allows shared libraries with undefined symbols to be built.
7515 allow_undefined_flag=$lt_allow_undefined_flag
7516
7517 # Flag that forces no undefined symbols.
7518 no_undefined_flag=$lt_no_undefined_flag
7519
7520 # Commands used to finish a libtool library installation in a directory.
7521 finish_cmds=$lt_finish_cmds
7522
7523 # Same as above, but a single script fragment to be evaled but not shown.
7524 finish_eval=$lt_finish_eval
7525
7526 # Take the output of nm and produce a listing of raw symbols and C names.
7527 global_symbol_pipe=$lt_global_symbol_pipe
7528
7529 # Transform the output of nm in a proper C declaration
7530 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7531
7532 # Transform the output of nm in a C name address pair
7533 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7534
7535 # This is the shared library runtime path variable.
7536 runpath_var=$runpath_var
7537
7538 # This is the shared library path variable.
7539 shlibpath_var=$shlibpath_var
7540
7541 # Is shlibpath searched before the hard-coded library search path?
7542 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7543
7544 # How to hardcode a shared library path into an executable.
7545 hardcode_action=$hardcode_action
7546
7547 # Whether we should hardcode library paths into libraries.
7548 hardcode_into_libs=$hardcode_into_libs
7549
7550 # Flag to hardcode \$libdir into a binary during linking.
7551 # This must work even if \$libdir does not exist.
7552 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7553
7554 # Whether we need a single -rpath flag with a separated argument.
7555 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7556
7557 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7558 # resulting binary.
7559 hardcode_direct=$hardcode_direct
7560
7561 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7562 # resulting binary.
7563 hardcode_minus_L=$hardcode_minus_L
7564
7565 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7566 # the resulting binary.
7567 hardcode_shlibpath_var=$hardcode_shlibpath_var
7568
7569 # Variables whose values should be saved in libtool wrapper scripts and
7570 # restored at relink time.
7571 variables_saved_for_relink="$variables_saved_for_relink"
7572
7573 # Whether libtool must link a program against all its dependency libraries.
7574 link_all_deplibs=$link_all_deplibs
7575
7576 # Compile-time system search path for libraries
7577 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7578
7579 # Run-time system search path for libraries
7580 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7581
7582 # Fix the shell variable \$srcfile for the compiler.
7583 fix_srcfile_path="$fix_srcfile_path"
7584
7585 # Set to yes if exported symbols are required.
7586 always_export_symbols=$always_export_symbols
7587
7588 # The commands to list exported symbols.
7589 export_symbols_cmds=$lt_export_symbols_cmds
7590
7591 # The commands to extract the exported symbol list from a shared archive.
7592 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7593
7594 # Symbols that should not be listed in the preloaded symbols.
7595 exclude_expsyms=$lt_exclude_expsyms
7596
7597 # Symbols that must always be exported.
7598 include_expsyms=$lt_include_expsyms
7599
7600 # ### END LIBTOOL CONFIG
7601
7602 __EOF__
7603
7604   case $host_os in
7605   aix3*)
7606     cat <<\EOF >> "${ofile}T"
7607
7608 # AIX sometimes has problems with the GCC collect2 program.  For some
7609 # reason, if we set the COLLECT_NAMES environment variable, the problems
7610 # vanish in a puff of smoke.
7611 if test "X${COLLECT_NAMES+set}" != Xset; then
7612   COLLECT_NAMES=
7613   export COLLECT_NAMES
7614 fi
7615 EOF
7616     ;;
7617   esac
7618
7619   case $host_os in
7620   cygwin* | mingw* | pw32* | os2*)
7621     cat <<'EOF' >> "${ofile}T"
7622       # This is a source program that is used to create dlls on Windows
7623       # Don't remove nor modify the starting and closing comments
7624 # /* ltdll.c starts here */
7625 # #define WIN32_LEAN_AND_MEAN
7626 # #include <windows.h>
7627 # #undef WIN32_LEAN_AND_MEAN
7628 # #include <stdio.h>
7629 #
7630 # #ifndef __CYGWIN__
7631 # #  ifdef __CYGWIN32__
7632 # #    define __CYGWIN__ __CYGWIN32__
7633 # #  endif
7634 # #endif
7635 #
7636 # #ifdef __cplusplus
7637 # extern "C" {
7638 # #endif
7639 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7640 # #ifdef __cplusplus
7641 # }
7642 # #endif
7643 #
7644 # #ifdef __CYGWIN__
7645 # #include <cygwin/cygwin_dll.h>
7646 # DECLARE_CYGWIN_DLL( DllMain );
7647 # #endif
7648 # HINSTANCE __hDllInstance_base;
7649 #
7650 # BOOL APIENTRY
7651 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7652 # {
7653 #   __hDllInstance_base = hInst;
7654 #   return TRUE;
7655 # }
7656 # /* ltdll.c ends here */
7657         # This is a source program that is used to create import libraries
7658         # on Windows for dlls which lack them. Don't remove nor modify the
7659         # starting and closing comments
7660 # /* impgen.c starts here */
7661 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7662 #
7663 #  This file is part of GNU libtool.
7664 #
7665 #  This program is free software; you can redistribute it and/or modify
7666 #  it under the terms of the GNU General Public License as published by
7667 #  the Free Software Foundation; either version 2 of the License, or
7668 #  (at your option) any later version.
7669 #
7670 #  This program is distributed in the hope that it will be useful,
7671 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7672 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7673 #  GNU General Public License for more details.
7674 #
7675 #  You should have received a copy of the GNU General Public License
7676 #  along with this program; if not, write to the Free Software
7677 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7678 #  */
7679 #
7680 # #include <stdio.h>            /* for printf() */
7681 # #include <unistd.h>           /* for open(), lseek(), read() */
7682 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7683 # #include <string.h>           /* for strdup() */
7684 #
7685 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7686 # #ifndef O_BINARY
7687 # #define O_BINARY 0
7688 # #endif
7689 #
7690 # static unsigned int
7691 # pe_get16 (fd, offset)
7692 #      int fd;
7693 #      int offset;
7694 # {
7695 #   unsigned char b[2];
7696 #   lseek (fd, offset, SEEK_SET);
7697 #   read (fd, b, 2);
7698 #   return b[0] + (b[1]<<8);
7699 # }
7700 #
7701 # static unsigned int
7702 # pe_get32 (fd, offset)
7703 #     int fd;
7704 #     int offset;
7705 # {
7706 #   unsigned char b[4];
7707 #   lseek (fd, offset, SEEK_SET);
7708 #   read (fd, b, 4);
7709 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7710 # }
7711 #
7712 # static unsigned int
7713 # pe_as32 (ptr)
7714 #      void *ptr;
7715 # {
7716 #   unsigned char *b = ptr;
7717 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7718 # }
7719 #
7720 # int
7721 # main (argc, argv)
7722 #     int argc;
7723 #     char *argv[];
7724 # {
7725 #     int dll;
7726 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7727 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7728 #     unsigned long name_rvas, nexp;
7729 #     unsigned char *expdata, *erva;
7730 #     char *filename, *dll_name;
7731 #
7732 #     filename = argv[1];
7733 #
7734 #     dll = open(filename, O_RDONLY|O_BINARY);
7735 #     if (dll < 1)
7736 #       return 1;
7737 #
7738 #     dll_name = filename;
7739 #
7740 #     for (i=0; filename[i]; i++)
7741 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7742 #           dll_name = filename + i +1;
7743 #
7744 #     pe_header_offset = pe_get32 (dll, 0x3c);
7745 #     opthdr_ofs = pe_header_offset + 4 + 20;
7746 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7747 #
7748 #     if (num_entries < 1) /* no exports */
7749 #       return 1;
7750 #
7751 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7752 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7753 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7754 #     secptr = (pe_header_offset + 4 + 20 +
7755 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7756 #
7757 #     expptr = 0;
7758 #     for (i = 0; i < nsections; i++)
7759 #     {
7760 #       char sname[8];
7761 #       unsigned long secptr1 = secptr + 40 * i;
7762 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7763 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7764 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7765 #       lseek(dll, secptr1, SEEK_SET);
7766 #       read(dll, sname, 8);
7767 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7768 #       {
7769 #           expptr = fptr + (export_rva - vaddr);
7770 #           if (export_rva + export_size > vaddr + vsize)
7771 #               export_size = vsize - (export_rva - vaddr);
7772 #           break;
7773 #       }
7774 #     }
7775 #
7776 #     expdata = (unsigned char*)malloc(export_size);
7777 #     lseek (dll, expptr, SEEK_SET);
7778 #     read (dll, expdata, export_size);
7779 #     erva = expdata - export_rva;
7780 #
7781 #     nexp = pe_as32 (expdata+24);
7782 #     name_rvas = pe_as32 (expdata+32);
7783 #
7784 #     printf ("EXPORTS\n");
7785 #     for (i = 0; i<nexp; i++)
7786 #     {
7787 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7788 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7789 #     }
7790 #
7791 #     return 0;
7792 # }
7793 # /* impgen.c ends here */
7794
7795 EOF
7796     ;;
7797   esac
7798
7799   # We use sed instead of cat because bash on DJGPP gets confused if
7800   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7801   # text mode, it properly converts lines to CR/LF.  This bash problem
7802   # is reportedly fixed, but why not run on old versions too?
7803   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7804
7805   mv -f "${ofile}T" "$ofile" || \
7806     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7807   chmod +x "$ofile"
7808 fi
7809
7810
7811
7812
7813
7814 # This can be used to rebuild libtool when needed
7815 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7816
7817 # Always use our own libtool.
7818 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7819
7820 # Prevent multiple expansion
7821
7822
7823
7824 # test for ln hardlink support
7825 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7826 echo "configure:7827: checking whether ln works" >&5
7827 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7828   echo $ac_n "(cached) $ac_c" 1>&6
7829 else
7830   rm -f conftest.src conftest.dst
7831 echo "conftest" > conftest.src
7832 if ln conftest.src conftest.dst 2>/dev/null
7833 then
7834   ol_cv_prog_LN_H="ln"
7835 else
7836   ol_cv_prog_LN_H="cp"
7837 fi
7838 rm -f conftest.src conftest.dst
7839
7840 fi
7841 LN_H="$ol_cv_prog_LN_H"
7842 if test "$ol_cv_prog_LN_H" = "ln"; then
7843         echo "$ac_t""yes" 1>&6
7844 else
7845         echo "$ac_t""no" 1>&6
7846 fi
7847
7848 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7849 echo "configure:7850: checking whether ln -s works" >&5
7850 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7851   echo $ac_n "(cached) $ac_c" 1>&6
7852 else
7853   rm -f conftestdata
7854 if ln -s X conftestdata 2>/dev/null
7855 then
7856   rm -f conftestdata
7857   ac_cv_prog_LN_S="ln -s"
7858 else
7859   ac_cv_prog_LN_S=ln
7860 fi
7861 fi
7862 LN_S="$ac_cv_prog_LN_S"
7863 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7864   echo "$ac_t""yes" 1>&6
7865 else
7866   echo "$ac_t""no" 1>&6
7867 fi
7868
7869
7870 ol_link_perl=no
7871 if test $ol_enable_perl != no ; then
7872         # Extract the first word of "perl", so it can be a program name with args.
7873 set dummy perl; ac_word=$2
7874 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7875 echo "configure:7876: checking for $ac_word" >&5
7876 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7877   echo $ac_n "(cached) $ac_c" 1>&6
7878 else
7879   case "$PERLBIN" in
7880   /*)
7881   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7882   ;;
7883   ?:/*)
7884   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7885   ;;
7886   *)
7887   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7888   ac_dummy="$PATH"
7889   for ac_dir in $ac_dummy; do 
7890     test -z "$ac_dir" && ac_dir=.
7891     if test -f $ac_dir/$ac_word; then
7892       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7893       break
7894     fi
7895   done
7896   IFS="$ac_save_ifs"
7897   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7898   ;;
7899 esac
7900 fi
7901 PERLBIN="$ac_cv_path_PERLBIN"
7902 if test -n "$PERLBIN"; then
7903   echo "$ac_t""$PERLBIN" 1>&6
7904 else
7905   echo "$ac_t""no" 1>&6
7906 fi
7907
7908
7909         if test "no$PERLBIN" = "no" ; then
7910                 if test $ol_enable_perl = yes ; then
7911                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7912                 fi
7913
7914         else
7915                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7916                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7917
7918                 if test x"$ol_with_perl_module" = "xstatic" ; then
7919                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7920                 else
7921                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7922                 fi
7923                                 ol_link_perl=yes
7924         fi
7925 fi
7926
7927 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7928 echo "configure:7929: checking how to run the C preprocessor" >&5
7929 # On Suns, sometimes $CPP names a directory.
7930 if test -n "$CPP" && test -d "$CPP"; then
7931   CPP=
7932 fi
7933 if test -z "$CPP"; then
7934 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7935   echo $ac_n "(cached) $ac_c" 1>&6
7936 else
7937     # This must be in double quotes, not single quotes, because CPP may get
7938   # substituted into the Makefile and "${CC-cc}" will confuse make.
7939   CPP="${CC-cc} -E"
7940   # On the NeXT, cc -E runs the code through the compiler's parser,
7941   # not just through cpp.
7942   cat > conftest.$ac_ext <<EOF
7943 #line 7944 "configure"
7944 #include "confdefs.h"
7945 #include <assert.h>
7946 Syntax Error
7947 EOF
7948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7949 { (eval echo configure:7950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7951 if test -z "$ac_err"; then
7952   :
7953 else
7954   echo "$ac_err" >&5
7955   echo "configure: failed program was:" >&5
7956   cat conftest.$ac_ext >&5
7957   rm -rf conftest*
7958   CPP="${CC-cc} -E -traditional-cpp"
7959   cat > conftest.$ac_ext <<EOF
7960 #line 7961 "configure"
7961 #include "confdefs.h"
7962 #include <assert.h>
7963 Syntax Error
7964 EOF
7965 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7966 { (eval echo configure:7967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7967 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7968 if test -z "$ac_err"; then
7969   :
7970 else
7971   echo "$ac_err" >&5
7972   echo "configure: failed program was:" >&5
7973   cat conftest.$ac_ext >&5
7974   rm -rf conftest*
7975   CPP="${CC-cc} -nologo -E"
7976   cat > conftest.$ac_ext <<EOF
7977 #line 7978 "configure"
7978 #include "confdefs.h"
7979 #include <assert.h>
7980 Syntax Error
7981 EOF
7982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7983 { (eval echo configure:7984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7985 if test -z "$ac_err"; then
7986   :
7987 else
7988   echo "$ac_err" >&5
7989   echo "configure: failed program was:" >&5
7990   cat conftest.$ac_ext >&5
7991   rm -rf conftest*
7992   CPP=/lib/cpp
7993 fi
7994 rm -f conftest*
7995 fi
7996 rm -f conftest*
7997 fi
7998 rm -f conftest*
7999   ac_cv_prog_CPP="$CPP"
8000 fi
8001   CPP="$ac_cv_prog_CPP"
8002 else
8003   ac_cv_prog_CPP="$CPP"
8004 fi
8005 echo "$ac_t""$CPP" 1>&6
8006
8007
8008
8009 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8010 echo "configure:8011: checking for Cygwin environment" >&5
8011 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
8012   echo $ac_n "(cached) $ac_c" 1>&6
8013 else
8014   cat > conftest.$ac_ext <<EOF
8015 #line 8016 "configure"
8016 #include "confdefs.h"
8017
8018 int main() {
8019
8020 #ifndef __CYGWIN__
8021 #define __CYGWIN__ __CYGWIN32__
8022 #endif
8023 return __CYGWIN__;
8024 ; return 0; }
8025 EOF
8026 if { (eval echo configure:8027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8027   rm -rf conftest*
8028   ac_cv_cygwin=yes
8029 else
8030   echo "configure: failed program was:" >&5
8031   cat conftest.$ac_ext >&5
8032   rm -rf conftest*
8033   ac_cv_cygwin=no
8034 fi
8035 rm -f conftest*
8036 fi
8037
8038 echo "$ac_t""$ac_cv_cygwin" 1>&6
8039 CYGWIN=
8040 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8041 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8042 echo "configure:8043: checking for mingw32 environment" >&5
8043 if eval "test \"\${ac_cv_mingw32+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 return __MINGW32__;
8052 ; return 0; }
8053 EOF
8054 if { (eval echo configure:8055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8055   rm -rf conftest*
8056   ac_cv_mingw32=yes
8057 else
8058   echo "configure: failed program was:" >&5
8059   cat conftest.$ac_ext >&5
8060   rm -rf conftest*
8061   ac_cv_mingw32=no
8062 fi
8063 rm -f conftest*
8064 fi
8065
8066 echo "$ac_t""$ac_cv_mingw32" 1>&6
8067 MINGW32=
8068 test "$ac_cv_mingw32" = yes && MINGW32=yes
8069
8070
8071
8072 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8073 echo "configure:8074: checking for executable suffix" >&5
8074 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8075   echo $ac_n "(cached) $ac_c" 1>&6
8076 else
8077   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8078   ac_cv_exeext=.exe
8079 else
8080   rm -f conftest*
8081   echo 'int main () { return 0; }' > conftest.$ac_ext
8082   ac_cv_exeext=
8083   if { (eval echo configure:8084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8084     for file in conftest.*; do
8085       case $file in
8086       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8087       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8088       esac
8089     done
8090   else
8091     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8092   fi
8093   rm -f conftest*
8094   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8095 fi
8096 fi
8097
8098 EXEEXT=""
8099 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8100 echo "$ac_t""${ac_cv_exeext}" 1>&6
8101 ac_exeext=$EXEEXT
8102
8103 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8104 echo "configure:8105: checking for object suffix" >&5
8105 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8106   echo $ac_n "(cached) $ac_c" 1>&6
8107 else
8108   rm -f conftest*
8109 echo 'int i = 1;' > conftest.$ac_ext
8110 if { (eval echo configure:8111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8111   for ac_file in conftest.*; do
8112     case $ac_file in
8113     *.c) ;;
8114     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8115     esac
8116   done
8117 else
8118   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8119 fi
8120 rm -f conftest*
8121 fi
8122
8123 echo "$ac_t""$ac_cv_objext" 1>&6
8124 OBJEXT=$ac_cv_objext
8125 ac_objext=$ac_cv_objext
8126
8127
8128 cat >> confdefs.h <<EOF
8129 #define EXEEXT "${EXEEXT}"
8130 EOF
8131
8132
8133 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8134 echo "configure:8135: checking for be_app in -lbe" >&5
8135 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8136 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8137   echo $ac_n "(cached) $ac_c" 1>&6
8138 else
8139   ac_save_LIBS="$LIBS"
8140 LIBS="-lbe -lroot -lnet $LIBS"
8141 cat > conftest.$ac_ext <<EOF
8142 #line 8143 "configure"
8143 #include "confdefs.h"
8144 /* Override any gcc2 internal prototype to avoid an error.  */
8145 /* We use char because int might match the return type of a gcc2
8146     builtin and then its argument prototype would still apply.  */
8147 char be_app();
8148
8149 int main() {
8150 be_app()
8151 ; return 0; }
8152 EOF
8153 if { (eval echo configure:8154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8154   rm -rf conftest*
8155   eval "ac_cv_lib_$ac_lib_var=yes"
8156 else
8157   echo "configure: failed program was:" >&5
8158   cat conftest.$ac_ext >&5
8159   rm -rf conftest*
8160   eval "ac_cv_lib_$ac_lib_var=no"
8161 fi
8162 rm -f conftest*
8163 LIBS="$ac_save_LIBS"
8164
8165 fi
8166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8167   echo "$ac_t""yes" 1>&6
8168   LIBS="$LIBS -lbe -lroot -lnet"
8169 else
8170   echo "$ac_t""no" 1>&6
8171 :
8172 fi
8173
8174
8175
8176
8177
8178 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8179 echo "configure:8180: checking for ${CC-cc} option to accept ANSI C" >&5
8180 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8181   echo $ac_n "(cached) $ac_c" 1>&6
8182 else
8183   am_cv_prog_cc_stdc=no
8184 ac_save_CC="$CC"
8185 # Don't try gcc -ansi; that turns off useful extensions and
8186 # breaks some systems' header files.
8187 # AIX                   -qlanglvl=ansi
8188 # Ultrix and OSF/1      -std1
8189 # HP-UX 10.20 and later -Ae
8190 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8191 # SVR4                  -Xc -D__EXTENSIONS__
8192 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8193 do
8194   CC="$ac_save_CC $ac_arg"
8195   cat > conftest.$ac_ext <<EOF
8196 #line 8197 "configure"
8197 #include "confdefs.h"
8198 #include <stdarg.h>
8199 #include <stdio.h>
8200 #include <sys/types.h>
8201 #include <sys/stat.h>
8202 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8203 struct buf { int x; };
8204 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8205 static char *e (p, i)
8206      char **p;
8207      int i;
8208 {
8209   return p[i];
8210 }
8211 static char *f (char * (*g) (char **, int), char **p, ...)
8212 {
8213   char *s;
8214   va_list v;
8215   va_start (v,p);
8216   s = g (p, va_arg (v,int));
8217   va_end (v);
8218   return s;
8219 }
8220 int test (int i, double x);
8221 struct s1 {int (*f) (int a);};
8222 struct s2 {int (*f) (double a);};
8223 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8224 int argc;
8225 char **argv;
8226
8227 int main() {
8228
8229 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8230
8231 ; return 0; }
8232 EOF
8233 if { (eval echo configure:8234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8234   rm -rf conftest*
8235   am_cv_prog_cc_stdc="$ac_arg"; break
8236 else
8237   echo "configure: failed program was:" >&5
8238   cat conftest.$ac_ext >&5
8239 fi
8240 rm -f conftest*
8241 done
8242 CC="$ac_save_CC"
8243
8244 fi
8245
8246 if test -z "$am_cv_prog_cc_stdc"; then
8247   echo "$ac_t""none needed" 1>&6
8248 else
8249   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8250 fi
8251 case "x$am_cv_prog_cc_stdc" in
8252   x|xno) ;;
8253   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8254 esac
8255
8256 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8257         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8258 fi
8259
8260 # test for make depend flag
8261 OL_MKDEP=
8262 OL_MKDEP_FLAGS=
8263 if test -z "${MKDEP}"; then
8264         OL_MKDEP="${CC-cc}"
8265         if test -z "${MKDEP_FLAGS}"; then
8266                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8267 echo "configure:8268: checking for ${OL_MKDEP} depend flag" >&5
8268 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8269   echo $ac_n "(cached) $ac_c" 1>&6
8270 else
8271   
8272                         ol_cv_mkdep=no
8273                         for flag in "-M" "-xM"; do
8274                                 cat > conftest.c <<EOF
8275  noCode;
8276 EOF
8277                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8278                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8279                                 then
8280                                         if test ! -f conftest."${ac_object}" ; then
8281                                                 ol_cv_mkdep=$flag
8282                                                 OL_MKDEP_FLAGS="$flag"
8283                                                 break
8284                                         fi
8285                                 fi
8286                         done
8287                         rm -f conftest*
8288                 
8289 fi
8290
8291 echo "$ac_t""$ol_cv_mkdep" 1>&6
8292         else
8293                 cc_cv_mkdep=yes
8294                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8295         fi
8296 else
8297         cc_cv_mkdep=yes
8298         OL_MKDEP="${MKDEP}"
8299         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8300 fi
8301
8302
8303
8304 if test "${ol_cv_mkdep}" = no ; then
8305         # this will soon become an error
8306         echo "configure: warning: do not know how to generate dependencies" 1>&2
8307 fi
8308
8309 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8310 echo "configure:8311: checking for afopen in -ls" >&5
8311 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8312 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8313   echo $ac_n "(cached) $ac_c" 1>&6
8314 else
8315   ac_save_LIBS="$LIBS"
8316 LIBS="-ls  $LIBS"
8317 cat > conftest.$ac_ext <<EOF
8318 #line 8319 "configure"
8319 #include "confdefs.h"
8320 /* Override any gcc2 internal prototype to avoid an error.  */
8321 /* We use char because int might match the return type of a gcc2
8322     builtin and then its argument prototype would still apply.  */
8323 char afopen();
8324
8325 int main() {
8326 afopen()
8327 ; return 0; }
8328 EOF
8329 if { (eval echo configure:8330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8330   rm -rf conftest*
8331   eval "ac_cv_lib_$ac_lib_var=yes"
8332 else
8333   echo "configure: failed program was:" >&5
8334   cat conftest.$ac_ext >&5
8335   rm -rf conftest*
8336   eval "ac_cv_lib_$ac_lib_var=no"
8337 fi
8338 rm -f conftest*
8339 LIBS="$ac_save_LIBS"
8340
8341 fi
8342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8343   echo "$ac_t""yes" 1>&6
8344   
8345         AUTH_LIBS=-ls
8346         cat >> confdefs.h <<\EOF
8347 #define HAVE_AIX_SECURITY 1
8348 EOF
8349
8350
8351 else
8352   echo "$ac_t""no" 1>&6
8353 fi
8354
8355
8356 case "$target" in
8357 *-ibm-openedition)
8358         ac_cv_func_getopt=no
8359         cat >> confdefs.h <<\EOF
8360 #define BOTH_STRINGS_H 1
8361 EOF
8362
8363         ;;
8364 esac
8365
8366 ol_link_modules=no
8367 if test $ol_enable_modules != no ; then
8368         for ac_hdr in ltdl.h
8369 do
8370 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8371 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8372 echo "configure:8373: checking for $ac_hdr" >&5
8373 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8374   echo $ac_n "(cached) $ac_c" 1>&6
8375 else
8376   cat > conftest.$ac_ext <<EOF
8377 #line 8378 "configure"
8378 #include "confdefs.h"
8379 #include <$ac_hdr>
8380 EOF
8381 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8382 { (eval echo configure:8383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8383 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8384 if test -z "$ac_err"; then
8385   rm -rf conftest*
8386   eval "ac_cv_header_$ac_safe=yes"
8387 else
8388   echo "$ac_err" >&5
8389   echo "configure: failed program was:" >&5
8390   cat conftest.$ac_ext >&5
8391   rm -rf conftest*
8392   eval "ac_cv_header_$ac_safe=no"
8393 fi
8394 rm -f conftest*
8395 fi
8396 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8397   echo "$ac_t""yes" 1>&6
8398     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8399   cat >> confdefs.h <<EOF
8400 #define $ac_tr_hdr 1
8401 EOF
8402  
8403 else
8404   echo "$ac_t""no" 1>&6
8405 fi
8406 done
8407
8408
8409         if test $ac_cv_header_ltdl_h = no ; then
8410                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8411         fi
8412
8413         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8414 echo "configure:8415: checking for lt_dlinit in -lltdl" >&5
8415 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8416 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8417   echo $ac_n "(cached) $ac_c" 1>&6
8418 else
8419   ac_save_LIBS="$LIBS"
8420 LIBS="-lltdl  $LIBS"
8421 cat > conftest.$ac_ext <<EOF
8422 #line 8423 "configure"
8423 #include "confdefs.h"
8424 /* Override any gcc2 internal prototype to avoid an error.  */
8425 /* We use char because int might match the return type of a gcc2
8426     builtin and then its argument prototype would still apply.  */
8427 char lt_dlinit();
8428
8429 int main() {
8430 lt_dlinit()
8431 ; return 0; }
8432 EOF
8433 if { (eval echo configure:8434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8434   rm -rf conftest*
8435   eval "ac_cv_lib_$ac_lib_var=yes"
8436 else
8437   echo "configure: failed program was:" >&5
8438   cat conftest.$ac_ext >&5
8439   rm -rf conftest*
8440   eval "ac_cv_lib_$ac_lib_var=no"
8441 fi
8442 rm -f conftest*
8443 LIBS="$ac_save_LIBS"
8444
8445 fi
8446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8447   echo "$ac_t""yes" 1>&6
8448   
8449                 MODULES_LIBS=-lltdl
8450                 cat >> confdefs.h <<\EOF
8451 #define HAVE_LIBLTDL 1
8452 EOF
8453
8454         
8455 else
8456   echo "$ac_t""no" 1>&6
8457 fi
8458
8459
8460         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8461                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8462         fi
8463         ol_link_modules=yes
8464 else
8465         ol_with_bdb_module=static
8466         ol_with_dnssrv_module=static
8467         ol_with_hdb_module=static
8468         ol_with_ldap_module=static
8469         ol_with_ldbm_module=static
8470         ol_with_meta_module=static
8471         ol_with_monitor_module=static
8472         ol_with_null_module=static
8473         ol_with_passwd_module=static
8474         ol_with_perl_module=static
8475         ol_with_shell_module=static
8476         ol_with_sql_module=static
8477         if test $ol_with_dyngroup = mod ; then
8478                 echo "configure: warning: building static dyngroup overlay" 1>&2
8479                 ol_with_dyngroup=yes
8480         fi
8481         if test $ol_with_proxycache = mod ; then
8482                 echo "configure: warning: building static proxycache overlay" 1>&2
8483                 ol_with_proxycache=yes
8484         fi
8485 fi
8486
8487 # test for EBCDIC
8488 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8489 echo "configure:8490: checking for EBCDIC" >&5
8490 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8491   echo $ac_n "(cached) $ac_c" 1>&6
8492 else
8493   
8494         cat > conftest.$ac_ext <<EOF
8495 #line 8496 "configure"
8496 #include "confdefs.h"
8497
8498 #if !('M' == 0xd4)
8499 #include <__ASCII__/generate_error.h>
8500 #endif
8501
8502 EOF
8503 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8504 { (eval echo configure:8505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8505 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8506 if test -z "$ac_err"; then
8507   rm -rf conftest*
8508   ol_cv_cpp_ebcdic=yes
8509 else
8510   echo "$ac_err" >&5
8511   echo "configure: failed program was:" >&5
8512   cat conftest.$ac_ext >&5
8513   rm -rf conftest*
8514   ol_cv_cpp_ebcdic=no
8515 fi
8516 rm -f conftest*
8517 fi
8518
8519 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8520 if test $ol_cv_cpp_ebcdic = yes ; then
8521         cat >> confdefs.h <<\EOF
8522 #define HAVE_EBCDIC 1
8523 EOF
8524
8525 fi
8526
8527 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8528 echo "configure:8529: checking for ANSI C header files" >&5
8529 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8530   echo $ac_n "(cached) $ac_c" 1>&6
8531 else
8532   cat > conftest.$ac_ext <<EOF
8533 #line 8534 "configure"
8534 #include "confdefs.h"
8535 #include <stdlib.h>
8536 #include <stdarg.h>
8537 #include <string.h>
8538 #include <float.h>
8539 EOF
8540 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8541 { (eval echo configure:8542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8542 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8543 if test -z "$ac_err"; then
8544   rm -rf conftest*
8545   ol_cv_header_stdc=yes
8546 else
8547   echo "$ac_err" >&5
8548   echo "configure: failed program was:" >&5
8549   cat conftest.$ac_ext >&5
8550   rm -rf conftest*
8551   ol_cv_header_stdc=no
8552 fi
8553 rm -f conftest*
8554
8555 if test $ol_cv_header_stdc = yes; then
8556   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8557 cat > conftest.$ac_ext <<EOF
8558 #line 8559 "configure"
8559 #include "confdefs.h"
8560 #include <string.h>
8561 EOF
8562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8563   egrep "memchr" >/dev/null 2>&1; then
8564   :
8565 else
8566   rm -rf conftest*
8567   ol_cv_header_stdc=no
8568 fi
8569 rm -f conftest*
8570
8571 fi
8572
8573 if test $ol_cv_header_stdc = yes; then
8574   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8575 cat > conftest.$ac_ext <<EOF
8576 #line 8577 "configure"
8577 #include "confdefs.h"
8578 #include <stdlib.h>
8579 EOF
8580 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8581   egrep "free" >/dev/null 2>&1; then
8582   :
8583 else
8584   rm -rf conftest*
8585   ol_cv_header_stdc=no
8586 fi
8587 rm -f conftest*
8588
8589 fi
8590
8591 if test $ol_cv_header_stdc = yes; then
8592   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8593 if test "$cross_compiling" = yes; then
8594   :
8595 else
8596   cat > conftest.$ac_ext <<EOF
8597 #line 8598 "configure"
8598 #include "confdefs.h"
8599 #include <ctype.h>
8600 #ifndef HAVE_EBCDIC
8601 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8602 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8603 #else
8604 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8605                 || ('j' <= (c) && (c) <= 'r') \
8606                 || ('s' <= (c) && (c) <= 'z'))
8607 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8608 #endif
8609 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8610 int main () { int i; for (i = 0; i < 256; i++)
8611 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8612 exit (0); }
8613
8614 EOF
8615 if { (eval echo configure:8616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8616 then
8617   :
8618 else
8619   echo "configure: failed program was:" >&5
8620   cat conftest.$ac_ext >&5
8621   rm -fr conftest*
8622   ol_cv_header_stdc=no
8623 fi
8624 rm -fr conftest*
8625 fi
8626
8627 fi
8628 fi
8629
8630 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8631 if test $ol_cv_header_stdc = yes; then
8632   cat >> confdefs.h <<\EOF
8633 #define STDC_HEADERS 1
8634 EOF
8635
8636 fi
8637 ac_cv_header_stdc=disable
8638
8639
8640 if test $ol_cv_header_stdc != yes; then
8641         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8642 fi
8643
8644 ac_header_dirent=no
8645 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8646 do
8647 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8648 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8649 echo "configure:8650: checking for $ac_hdr that defines DIR" >&5
8650 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8651   echo $ac_n "(cached) $ac_c" 1>&6
8652 else
8653   cat > conftest.$ac_ext <<EOF
8654 #line 8655 "configure"
8655 #include "confdefs.h"
8656 #include <sys/types.h>
8657 #include <$ac_hdr>
8658 int main() {
8659 DIR *dirp = 0;
8660 ; return 0; }
8661 EOF
8662 if { (eval echo configure:8663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8663   rm -rf conftest*
8664   eval "ac_cv_header_dirent_$ac_safe=yes"
8665 else
8666   echo "configure: failed program was:" >&5
8667   cat conftest.$ac_ext >&5
8668   rm -rf conftest*
8669   eval "ac_cv_header_dirent_$ac_safe=no"
8670 fi
8671 rm -f conftest*
8672 fi
8673 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8674   echo "$ac_t""yes" 1>&6
8675     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8676   cat >> confdefs.h <<EOF
8677 #define $ac_tr_hdr 1
8678 EOF
8679  ac_header_dirent=$ac_hdr; break
8680 else
8681   echo "$ac_t""no" 1>&6
8682 fi
8683 done
8684 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8685 if test $ac_header_dirent = dirent.h; then
8686 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8687 echo "configure:8688: checking for opendir in -ldir" >&5
8688 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8689 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8690   echo $ac_n "(cached) $ac_c" 1>&6
8691 else
8692   ac_save_LIBS="$LIBS"
8693 LIBS="-ldir  $LIBS"
8694 cat > conftest.$ac_ext <<EOF
8695 #line 8696 "configure"
8696 #include "confdefs.h"
8697 /* Override any gcc2 internal prototype to avoid an error.  */
8698 /* We use char because int might match the return type of a gcc2
8699     builtin and then its argument prototype would still apply.  */
8700 char opendir();
8701
8702 int main() {
8703 opendir()
8704 ; return 0; }
8705 EOF
8706 if { (eval echo configure:8707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8707   rm -rf conftest*
8708   eval "ac_cv_lib_$ac_lib_var=yes"
8709 else
8710   echo "configure: failed program was:" >&5
8711   cat conftest.$ac_ext >&5
8712   rm -rf conftest*
8713   eval "ac_cv_lib_$ac_lib_var=no"
8714 fi
8715 rm -f conftest*
8716 LIBS="$ac_save_LIBS"
8717
8718 fi
8719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8720   echo "$ac_t""yes" 1>&6
8721   LIBS="$LIBS -ldir"
8722 else
8723   echo "$ac_t""no" 1>&6
8724 fi
8725
8726 else
8727 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8728 echo "configure:8729: checking for opendir in -lx" >&5
8729 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8730 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8731   echo $ac_n "(cached) $ac_c" 1>&6
8732 else
8733   ac_save_LIBS="$LIBS"
8734 LIBS="-lx  $LIBS"
8735 cat > conftest.$ac_ext <<EOF
8736 #line 8737 "configure"
8737 #include "confdefs.h"
8738 /* Override any gcc2 internal prototype to avoid an error.  */
8739 /* We use char because int might match the return type of a gcc2
8740     builtin and then its argument prototype would still apply.  */
8741 char opendir();
8742
8743 int main() {
8744 opendir()
8745 ; return 0; }
8746 EOF
8747 if { (eval echo configure:8748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8748   rm -rf conftest*
8749   eval "ac_cv_lib_$ac_lib_var=yes"
8750 else
8751   echo "configure: failed program was:" >&5
8752   cat conftest.$ac_ext >&5
8753   rm -rf conftest*
8754   eval "ac_cv_lib_$ac_lib_var=no"
8755 fi
8756 rm -f conftest*
8757 LIBS="$ac_save_LIBS"
8758
8759 fi
8760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8761   echo "$ac_t""yes" 1>&6
8762   LIBS="$LIBS -lx"
8763 else
8764   echo "$ac_t""no" 1>&6
8765 fi
8766
8767 fi
8768
8769 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8770 echo "configure:8771: checking for sys/wait.h that is POSIX.1 compatible" >&5
8771 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8772   echo $ac_n "(cached) $ac_c" 1>&6
8773 else
8774   cat > conftest.$ac_ext <<EOF
8775 #line 8776 "configure"
8776 #include "confdefs.h"
8777 #include <sys/types.h>
8778 #include <sys/wait.h>
8779 #ifndef WEXITSTATUS
8780 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8781 #endif
8782 #ifndef WIFEXITED
8783 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8784 #endif
8785 int main() {
8786 int s;
8787 wait (&s);
8788 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8789 ; return 0; }
8790 EOF
8791 if { (eval echo configure:8792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8792   rm -rf conftest*
8793   ac_cv_header_sys_wait_h=yes
8794 else
8795   echo "configure: failed program was:" >&5
8796   cat conftest.$ac_ext >&5
8797   rm -rf conftest*
8798   ac_cv_header_sys_wait_h=no
8799 fi
8800 rm -f conftest*
8801 fi
8802
8803 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8804 if test $ac_cv_header_sys_wait_h = yes; then
8805   cat >> confdefs.h <<\EOF
8806 #define HAVE_SYS_WAIT_H 1
8807 EOF
8808
8809 fi
8810
8811 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8812 echo "configure:8813: checking POSIX termios" >&5
8813 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8814   echo $ac_n "(cached) $ac_c" 1>&6
8815 else
8816   cat > conftest.$ac_ext <<EOF
8817 #line 8818 "configure"
8818 #include "confdefs.h"
8819 #include <sys/types.h>
8820 #include <unistd.h>
8821 #include <termios.h>
8822 int main() {
8823 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8824    tcgetattr(0, 0);
8825 ; return 0; }
8826 EOF
8827 if { (eval echo configure:8828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8828   rm -rf conftest*
8829   am_cv_sys_posix_termios=yes
8830 else
8831   echo "configure: failed program was:" >&5
8832   cat conftest.$ac_ext >&5
8833   rm -rf conftest*
8834   am_cv_sys_posix_termios=no
8835 fi
8836 rm -f conftest*
8837 fi
8838
8839 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8840
8841
8842  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8843 echo "configure:8844: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8844 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8845   echo $ac_n "(cached) $ac_c" 1>&6
8846 else
8847   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8848
8849   gwinsz_in_termios_h=no
8850   if test $am_cv_sys_posix_termios = yes; then
8851     cat > conftest.$ac_ext <<EOF
8852 #line 8853 "configure"
8853 #include "confdefs.h"
8854 #include <sys/types.h>
8855 #     include <termios.h>
8856 #     ifdef TIOCGWINSZ
8857         yes
8858 #     endif
8859     
8860 EOF
8861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8862   egrep "yes" >/dev/null 2>&1; then
8863   rm -rf conftest*
8864   gwinsz_in_termios_h=yes
8865 fi
8866 rm -f conftest*
8867
8868   fi
8869
8870   if test $gwinsz_in_termios_h = no; then
8871     cat > conftest.$ac_ext <<EOF
8872 #line 8873 "configure"
8873 #include "confdefs.h"
8874 #include <sys/types.h>
8875 #     include <sys/ioctl.h>
8876 #     ifdef TIOCGWINSZ
8877         yes
8878 #     endif
8879     
8880 EOF
8881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8882   egrep "yes" >/dev/null 2>&1; then
8883   rm -rf conftest*
8884   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8885 fi
8886 rm -f conftest*
8887
8888   fi
8889   
8890 fi
8891
8892 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8893   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8894     cat >> confdefs.h <<\EOF
8895 #define GWINSZ_IN_SYS_IOCTL 1
8896 EOF
8897
8898   fi
8899
8900 if test $am_cv_sys_posix_termios = yes ; then
8901         cat >> confdefs.h <<\EOF
8902 #define HAVE_POSIX_TERMIOS 1
8903 EOF
8904
8905 fi
8906
8907 for ac_hdr in \
8908         arpa/inet.h             \
8909         arpa/nameser.h  \
8910         assert.h                \
8911         bits/types.h    \
8912         conio.h                 \
8913         crypt.h                 \
8914         direct.h                \
8915         errno.h                 \
8916         fcntl.h                 \
8917         filio.h                 \
8918         getopt.h                \
8919         grp.h                   \
8920         io.h                    \
8921         libutil.h               \
8922         limits.h                \
8923         locale.h                \
8924         netinet/tcp.h   \
8925         malloc.h                \
8926         memory.h                \
8927         psap.h                  \
8928         pwd.h                   \
8929         process.h               \
8930         resolv.h                \
8931         sgtty.h                 \
8932         shadow.h                \
8933         stddef.h                \
8934         string.h                \
8935         strings.h               \
8936         sysexits.h              \
8937         sys/file.h              \
8938         sys/filio.h             \
8939         sys/errno.h             \
8940         sys/ioctl.h             \
8941         sys/param.h             \
8942         sys/resource.h  \
8943         sys/select.h    \
8944         sys/socket.h    \
8945         sys/stat.h              \
8946         sys/syslog.h    \
8947         sys/time.h              \
8948         sys/types.h             \
8949         sys/ucred.h             \
8950         sys/uio.h               \
8951         syslog.h                \
8952         termios.h               \
8953         unistd.h                \
8954         winsock.h               \
8955         winsock2.h              \
8956
8957 do
8958 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8959 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8960 echo "configure:8961: checking for $ac_hdr" >&5
8961 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8962   echo $ac_n "(cached) $ac_c" 1>&6
8963 else
8964   cat > conftest.$ac_ext <<EOF
8965 #line 8966 "configure"
8966 #include "confdefs.h"
8967 #include <$ac_hdr>
8968 EOF
8969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8970 { (eval echo configure:8971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8972 if test -z "$ac_err"; then
8973   rm -rf conftest*
8974   eval "ac_cv_header_$ac_safe=yes"
8975 else
8976   echo "$ac_err" >&5
8977   echo "configure: failed program was:" >&5
8978   cat conftest.$ac_ext >&5
8979   rm -rf conftest*
8980   eval "ac_cv_header_$ac_safe=no"
8981 fi
8982 rm -f conftest*
8983 fi
8984 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8985   echo "$ac_t""yes" 1>&6
8986     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8987   cat >> confdefs.h <<EOF
8988 #define $ac_tr_hdr 1
8989 EOF
8990  
8991 else
8992   echo "$ac_t""no" 1>&6
8993 fi
8994 done
8995
8996
8997
8998
8999 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9000 echo "configure:9001: checking for sigset in -lV3" >&5
9001 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9002 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9003   echo $ac_n "(cached) $ac_c" 1>&6
9004 else
9005   ac_save_LIBS="$LIBS"
9006 LIBS="-lV3  $LIBS"
9007 cat > conftest.$ac_ext <<EOF
9008 #line 9009 "configure"
9009 #include "confdefs.h"
9010 /* Override any gcc2 internal prototype to avoid an error.  */
9011 /* We use char because int might match the return type of a gcc2
9012     builtin and then its argument prototype would still apply.  */
9013 char sigset();
9014
9015 int main() {
9016 sigset()
9017 ; return 0; }
9018 EOF
9019 if { (eval echo configure:9020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9020   rm -rf conftest*
9021   eval "ac_cv_lib_$ac_lib_var=yes"
9022 else
9023   echo "configure: failed program was:" >&5
9024   cat conftest.$ac_ext >&5
9025   rm -rf conftest*
9026   eval "ac_cv_lib_$ac_lib_var=no"
9027 fi
9028 rm -f conftest*
9029 LIBS="$ac_save_LIBS"
9030
9031 fi
9032 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9033   echo "$ac_t""yes" 1>&6
9034     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9035     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9036   cat >> confdefs.h <<EOF
9037 #define $ac_tr_lib 1
9038 EOF
9039
9040   LIBS="-lV3 $LIBS"
9041
9042 else
9043   echo "$ac_t""no" 1>&6
9044 fi
9045
9046
9047 if test "$ac_cv_header_winsock_h" = yes; then
9048 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9049 echo "configure:9050: checking for winsock" >&5
9050 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9051   echo $ac_n "(cached) $ac_c" 1>&6
9052 else
9053   save_LIBS="$LIBS"
9054 for curlib in ws2_32 wsock32; do
9055         LIBS="$LIBS -l$curlib"
9056         cat > conftest.$ac_ext <<EOF
9057 #line 9058 "configure"
9058 #include "confdefs.h"
9059 #include <winsock.h>
9060                         
9061 int main() {
9062
9063                         socket(0,0,0);
9064                         select(0,NULL,NULL,NULL,NULL);
9065                         closesocket(0);
9066                         gethostname(NULL,0);
9067                         
9068 ; return 0; }
9069 EOF
9070 if { (eval echo configure:9071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9071   rm -rf conftest*
9072   ol_cv_winsock=yes
9073 else
9074   echo "configure: failed program was:" >&5
9075   cat conftest.$ac_ext >&5
9076   rm -rf conftest*
9077   ol_cv_winsock=no
9078 fi
9079 rm -f conftest*
9080
9081         if test $ol_cv_winsock = yes; then
9082                 cat >> confdefs.h <<\EOF
9083 #define HAVE_WINSOCK 1
9084 EOF
9085
9086                 ac_cv_func_socket=yes
9087                 ac_cv_func_select=yes
9088                 ac_cv_func_closesocket=yes
9089                 ac_cv_func_gethostname=yes
9090                 if test $curlib = ws2_32; then
9091                         ol_cv_winsock=winsock2
9092                         cat >> confdefs.h <<\EOF
9093 #define HAVE_WINSOCK2 1
9094 EOF
9095
9096                 fi
9097                 break
9098         fi
9099         LIBS="$save_LIBS"
9100 done
9101 fi
9102
9103 echo "$ac_t""$ol_cv_winsock" 1>&6
9104 fi
9105
9106
9107 echo $ac_n "checking for socket""... $ac_c" 1>&6
9108 echo "configure:9109: checking for socket" >&5
9109 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9110   echo $ac_n "(cached) $ac_c" 1>&6
9111 else
9112   cat > conftest.$ac_ext <<EOF
9113 #line 9114 "configure"
9114 #include "confdefs.h"
9115 /* System header to define __stub macros and hopefully few prototypes,
9116     which can conflict with char socket(); below.  */
9117 #include <assert.h>
9118 /* Override any gcc2 internal prototype to avoid an error.  */
9119 /* We use char because int might match the return type of a gcc2
9120     builtin and then its argument prototype would still apply.  */
9121 char socket();
9122 char (*f)();
9123
9124 int main() {
9125
9126 /* The GNU C library defines this for functions which it implements
9127     to always fail with ENOSYS.  Some functions are actually named
9128     something starting with __ and the normal name is an alias.  */
9129 #if defined (__stub_socket) || defined (__stub___socket)
9130 choke me
9131 #else
9132 f = socket;
9133 #endif
9134
9135 ; return 0; }
9136 EOF
9137 if { (eval echo configure:9138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9138   rm -rf conftest*
9139   eval "ac_cv_func_socket=yes"
9140 else
9141   echo "configure: failed program was:" >&5
9142   cat conftest.$ac_ext >&5
9143   rm -rf conftest*
9144   eval "ac_cv_func_socket=no"
9145 fi
9146 rm -f conftest*
9147 fi
9148
9149 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9150   echo "$ac_t""yes" 1>&6
9151   :
9152 else
9153   echo "$ac_t""no" 1>&6
9154         
9155         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9156 echo "configure:9157: checking for main in -lsocket" >&5
9157 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9158 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9159   echo $ac_n "(cached) $ac_c" 1>&6
9160 else
9161   ac_save_LIBS="$LIBS"
9162 LIBS="-lsocket  $LIBS"
9163 cat > conftest.$ac_ext <<EOF
9164 #line 9165 "configure"
9165 #include "confdefs.h"
9166
9167 int main() {
9168 main()
9169 ; return 0; }
9170 EOF
9171 if { (eval echo configure:9172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9172   rm -rf conftest*
9173   eval "ac_cv_lib_$ac_lib_var=yes"
9174 else
9175   echo "configure: failed program was:" >&5
9176   cat conftest.$ac_ext >&5
9177   rm -rf conftest*
9178   eval "ac_cv_lib_$ac_lib_var=no"
9179 fi
9180 rm -f conftest*
9181 LIBS="$ac_save_LIBS"
9182
9183 fi
9184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9185   echo "$ac_t""yes" 1>&6
9186     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9187     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9188   cat >> confdefs.h <<EOF
9189 #define $ac_tr_lib 1
9190 EOF
9191
9192   LIBS="-lsocket $LIBS"
9193
9194 else
9195   echo "$ac_t""no" 1>&6
9196 fi
9197
9198         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9199 echo "configure:9200: checking for main in -lnet" >&5
9200 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9201 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9202   echo $ac_n "(cached) $ac_c" 1>&6
9203 else
9204   ac_save_LIBS="$LIBS"
9205 LIBS="-lnet  $LIBS"
9206 cat > conftest.$ac_ext <<EOF
9207 #line 9208 "configure"
9208 #include "confdefs.h"
9209
9210 int main() {
9211 main()
9212 ; return 0; }
9213 EOF
9214 if { (eval echo configure:9215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9215   rm -rf conftest*
9216   eval "ac_cv_lib_$ac_lib_var=yes"
9217 else
9218   echo "configure: failed program was:" >&5
9219   cat conftest.$ac_ext >&5
9220   rm -rf conftest*
9221   eval "ac_cv_lib_$ac_lib_var=no"
9222 fi
9223 rm -f conftest*
9224 LIBS="$ac_save_LIBS"
9225
9226 fi
9227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9228   echo "$ac_t""yes" 1>&6
9229     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9230     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9231   cat >> confdefs.h <<EOF
9232 #define $ac_tr_lib 1
9233 EOF
9234
9235   LIBS="-lnet $LIBS"
9236
9237 else
9238   echo "$ac_t""no" 1>&6
9239 fi
9240
9241         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9242 echo "configure:9243: checking for main in -lnsl_s" >&5
9243 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9245   echo $ac_n "(cached) $ac_c" 1>&6
9246 else
9247   ac_save_LIBS="$LIBS"
9248 LIBS="-lnsl_s  $LIBS"
9249 cat > conftest.$ac_ext <<EOF
9250 #line 9251 "configure"
9251 #include "confdefs.h"
9252
9253 int main() {
9254 main()
9255 ; return 0; }
9256 EOF
9257 if { (eval echo configure:9258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9258   rm -rf conftest*
9259   eval "ac_cv_lib_$ac_lib_var=yes"
9260 else
9261   echo "configure: failed program was:" >&5
9262   cat conftest.$ac_ext >&5
9263   rm -rf conftest*
9264   eval "ac_cv_lib_$ac_lib_var=no"
9265 fi
9266 rm -f conftest*
9267 LIBS="$ac_save_LIBS"
9268
9269 fi
9270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9271   echo "$ac_t""yes" 1>&6
9272     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9273     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9274   cat >> confdefs.h <<EOF
9275 #define $ac_tr_lib 1
9276 EOF
9277
9278   LIBS="-lnsl_s $LIBS"
9279
9280 else
9281   echo "$ac_t""no" 1>&6
9282 fi
9283
9284         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9285 echo "configure:9286: checking for main in -lnsl" >&5
9286 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9288   echo $ac_n "(cached) $ac_c" 1>&6
9289 else
9290   ac_save_LIBS="$LIBS"
9291 LIBS="-lnsl  $LIBS"
9292 cat > conftest.$ac_ext <<EOF
9293 #line 9294 "configure"
9294 #include "confdefs.h"
9295
9296 int main() {
9297 main()
9298 ; return 0; }
9299 EOF
9300 if { (eval echo configure:9301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9301   rm -rf conftest*
9302   eval "ac_cv_lib_$ac_lib_var=yes"
9303 else
9304   echo "configure: failed program was:" >&5
9305   cat conftest.$ac_ext >&5
9306   rm -rf conftest*
9307   eval "ac_cv_lib_$ac_lib_var=no"
9308 fi
9309 rm -f conftest*
9310 LIBS="$ac_save_LIBS"
9311
9312 fi
9313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9314   echo "$ac_t""yes" 1>&6
9315     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9316     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9317   cat >> confdefs.h <<EOF
9318 #define $ac_tr_lib 1
9319 EOF
9320
9321   LIBS="-lnsl $LIBS"
9322
9323 else
9324   echo "$ac_t""no" 1>&6
9325 fi
9326
9327         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9328 echo "configure:9329: checking for socket in -linet" >&5
9329 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9330 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9331   echo $ac_n "(cached) $ac_c" 1>&6
9332 else
9333   ac_save_LIBS="$LIBS"
9334 LIBS="-linet  $LIBS"
9335 cat > conftest.$ac_ext <<EOF
9336 #line 9337 "configure"
9337 #include "confdefs.h"
9338 /* Override any gcc2 internal prototype to avoid an error.  */
9339 /* We use char because int might match the return type of a gcc2
9340     builtin and then its argument prototype would still apply.  */
9341 char socket();
9342
9343 int main() {
9344 socket()
9345 ; return 0; }
9346 EOF
9347 if { (eval echo configure:9348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9348   rm -rf conftest*
9349   eval "ac_cv_lib_$ac_lib_var=yes"
9350 else
9351   echo "configure: failed program was:" >&5
9352   cat conftest.$ac_ext >&5
9353   rm -rf conftest*
9354   eval "ac_cv_lib_$ac_lib_var=no"
9355 fi
9356 rm -f conftest*
9357 LIBS="$ac_save_LIBS"
9358
9359 fi
9360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9361   echo "$ac_t""yes" 1>&6
9362     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9363     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9364   cat >> confdefs.h <<EOF
9365 #define $ac_tr_lib 1
9366 EOF
9367
9368   LIBS="-linet $LIBS"
9369
9370 else
9371   echo "$ac_t""no" 1>&6
9372 fi
9373
9374         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9375 echo "configure:9376: checking for main in -lgen" >&5
9376 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9377 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9378   echo $ac_n "(cached) $ac_c" 1>&6
9379 else
9380   ac_save_LIBS="$LIBS"
9381 LIBS="-lgen  $LIBS"
9382 cat > conftest.$ac_ext <<EOF
9383 #line 9384 "configure"
9384 #include "confdefs.h"
9385
9386 int main() {
9387 main()
9388 ; return 0; }
9389 EOF
9390 if { (eval echo configure:9391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9391   rm -rf conftest*
9392   eval "ac_cv_lib_$ac_lib_var=yes"
9393 else
9394   echo "configure: failed program was:" >&5
9395   cat conftest.$ac_ext >&5
9396   rm -rf conftest*
9397   eval "ac_cv_lib_$ac_lib_var=no"
9398 fi
9399 rm -f conftest*
9400 LIBS="$ac_save_LIBS"
9401
9402 fi
9403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9404   echo "$ac_t""yes" 1>&6
9405     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9406     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9407   cat >> confdefs.h <<EOF
9408 #define $ac_tr_lib 1
9409 EOF
9410
9411   LIBS="-lgen $LIBS"
9412
9413 else
9414   echo "$ac_t""no" 1>&6
9415 fi
9416
9417
9418 fi
9419
9420
9421 echo $ac_n "checking for select""... $ac_c" 1>&6
9422 echo "configure:9423: checking for select" >&5
9423 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9424   echo $ac_n "(cached) $ac_c" 1>&6
9425 else
9426   cat > conftest.$ac_ext <<EOF
9427 #line 9428 "configure"
9428 #include "confdefs.h"
9429 /* System header to define __stub macros and hopefully few prototypes,
9430     which can conflict with char select(); below.  */
9431 #include <assert.h>
9432 /* Override any gcc2 internal prototype to avoid an error.  */
9433 /* We use char because int might match the return type of a gcc2
9434     builtin and then its argument prototype would still apply.  */
9435 char select();
9436 char (*f)();
9437
9438 int main() {
9439
9440 /* The GNU C library defines this for functions which it implements
9441     to always fail with ENOSYS.  Some functions are actually named
9442     something starting with __ and the normal name is an alias.  */
9443 #if defined (__stub_select) || defined (__stub___select)
9444 choke me
9445 #else
9446 f = select;
9447 #endif
9448
9449 ; return 0; }
9450 EOF
9451 if { (eval echo configure:9452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9452   rm -rf conftest*
9453   eval "ac_cv_func_select=yes"
9454 else
9455   echo "configure: failed program was:" >&5
9456   cat conftest.$ac_ext >&5
9457   rm -rf conftest*
9458   eval "ac_cv_func_select=no"
9459 fi
9460 rm -f conftest*
9461 fi
9462
9463 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9464   echo "$ac_t""yes" 1>&6
9465   :
9466 else
9467   echo "$ac_t""no" 1>&6
9468 { echo "configure: error: select() required." 1>&2; exit 1; }
9469 fi
9470
9471
9472 if test "${ac_cv_header_winsock_h}" != yes; then
9473                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9474 echo "configure:9475: checking types of arguments for select()" >&5
9475  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9476   echo $ac_n "(cached) $ac_c" 1>&6
9477 else
9478    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9479   echo $ac_n "(cached) $ac_c" 1>&6
9480 else
9481     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9482   echo $ac_n "(cached) $ac_c" 1>&6
9483 else
9484      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9485      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9486       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9487        cat > conftest.$ac_ext <<EOF
9488 #line 9489 "configure"
9489 #include "confdefs.h"
9490 #ifdef HAVE_SYS_TYPES_H
9491 #include <sys/types.h>
9492 #endif
9493 #ifdef HAVE_SYS_TIME_H
9494 #include <sys/time.h>
9495 #endif
9496 #ifdef HAVE_SYS_SELECT_H
9497 #include <sys/select.h>
9498 #endif
9499 #ifdef HAVE_SYS_SOCKET_H
9500 #include <sys/socket.h>
9501 #endif
9502 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);
9503 int main() {
9504
9505 ; return 0; }
9506 EOF
9507 if { (eval echo configure:9508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9508   rm -rf conftest*
9509           ac_not_found=no ; break 3
9510 else
9511   echo "configure: failed program was:" >&5
9512   cat conftest.$ac_ext >&5
9513   rm -rf conftest*
9514   ac_not_found=yes
9515 fi
9516 rm -f conftest*
9517       done
9518      done
9519     done
9520    
9521 fi
9522   
9523 fi
9524  
9525 fi
9526  if test "$ac_not_found" = yes; then
9527   ac_cv_func_select_arg1=int 
9528   ac_cv_func_select_arg234='int *' 
9529   ac_cv_func_select_arg5='struct timeval *'
9530  fi
9531  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9532  cat >> confdefs.h <<EOF
9533 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9534 EOF
9535
9536  cat >> confdefs.h <<EOF
9537 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9538 EOF
9539
9540  cat >> confdefs.h <<EOF
9541 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9542 EOF
9543
9544
9545 fi
9546
9547
9548 for ac_hdr in regex.h 
9549 do
9550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9552 echo "configure:9553: checking for $ac_hdr" >&5
9553 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9554   echo $ac_n "(cached) $ac_c" 1>&6
9555 else
9556   cat > conftest.$ac_ext <<EOF
9557 #line 9558 "configure"
9558 #include "confdefs.h"
9559 #include <$ac_hdr>
9560 EOF
9561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9562 { (eval echo configure:9563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9564 if test -z "$ac_err"; then
9565   rm -rf conftest*
9566   eval "ac_cv_header_$ac_safe=yes"
9567 else
9568   echo "$ac_err" >&5
9569   echo "configure: failed program was:" >&5
9570   cat conftest.$ac_ext >&5
9571   rm -rf conftest*
9572   eval "ac_cv_header_$ac_safe=no"
9573 fi
9574 rm -f conftest*
9575 fi
9576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9577   echo "$ac_t""yes" 1>&6
9578     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9579   cat >> confdefs.h <<EOF
9580 #define $ac_tr_hdr 1
9581 EOF
9582  
9583 else
9584   echo "$ac_t""no" 1>&6
9585 fi
9586 done
9587
9588 if test "$ac_cv_header_regex_h" != yes ; then
9589         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9590 fi
9591
9592 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9593 echo "configure:9594: checking for library containing regfree" >&5
9594 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9595   echo $ac_n "(cached) $ac_c" 1>&6
9596 else
9597   ac_func_search_save_LIBS="$LIBS"
9598 ac_cv_search_regfree="no"
9599 cat > conftest.$ac_ext <<EOF
9600 #line 9601 "configure"
9601 #include "confdefs.h"
9602 /* Override any gcc2 internal prototype to avoid an error.  */
9603 /* We use char because int might match the return type of a gcc2
9604     builtin and then its argument prototype would still apply.  */
9605 char regfree();
9606
9607 int main() {
9608 regfree()
9609 ; return 0; }
9610 EOF
9611 if { (eval echo configure:9612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9612   rm -rf conftest*
9613   ac_cv_search_regfree="none required"
9614 else
9615   echo "configure: failed program was:" >&5
9616   cat conftest.$ac_ext >&5
9617 fi
9618 rm -f conftest*
9619 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9620 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9621 cat > conftest.$ac_ext <<EOF
9622 #line 9623 "configure"
9623 #include "confdefs.h"
9624 /* Override any gcc2 internal prototype to avoid an error.  */
9625 /* We use char because int might match the return type of a gcc2
9626     builtin and then its argument prototype would still apply.  */
9627 char regfree();
9628
9629 int main() {
9630 regfree()
9631 ; return 0; }
9632 EOF
9633 if { (eval echo configure:9634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9634   rm -rf conftest*
9635   ac_cv_search_regfree="-l$ac_lib"
9636 break
9637 else
9638   echo "configure: failed program was:" >&5
9639   cat conftest.$ac_ext >&5
9640 fi
9641 rm -f conftest*
9642 done
9643 LIBS="$ac_func_search_save_LIBS"
9644 fi
9645
9646 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9647 if test "$ac_cv_search_regfree" != "no"; then
9648   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9649   :
9650 else :
9651   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9652 fi
9653
9654
9655 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9656 echo "configure:9657: checking for compatible POSIX regex" >&5
9657 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9658   echo $ac_n "(cached) $ac_c" 1>&6
9659 else
9660   
9661         if test "$cross_compiling" = yes; then
9662   ol_cv_c_posix_regex=cross
9663 else
9664   cat > conftest.$ac_ext <<EOF
9665 #line 9666 "configure"
9666 #include "confdefs.h"
9667
9668 #include <sys/types.h>
9669 #include <regex.h>
9670 static char *pattern, *string;
9671 main()
9672 {
9673         int rc;
9674         regex_t re;
9675
9676         pattern = "^A";
9677
9678         if(regcomp(&re, pattern, 0)) {
9679                 return -1;
9680         }
9681         
9682         string = "ALL MATCH";
9683         
9684         rc = regexec(&re, string, 0, (void*)0, 0);
9685
9686         regfree(&re);
9687
9688         return rc;
9689 }
9690 EOF
9691 if { (eval echo configure:9692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9692 then
9693   ol_cv_c_posix_regex=yes
9694 else
9695   echo "configure: failed program was:" >&5
9696   cat conftest.$ac_ext >&5
9697   rm -fr conftest*
9698   ol_cv_c_posix_regex=no
9699 fi
9700 rm -fr conftest*
9701 fi
9702
9703 fi
9704
9705 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9706
9707 if test "$ol_cv_c_posix_regex" = no ; then
9708         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9709 fi
9710
9711
9712 have_uuid=no
9713 for ac_hdr in sys/uuid.h
9714 do
9715 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9716 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9717 echo "configure:9718: checking for $ac_hdr" >&5
9718 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9719   echo $ac_n "(cached) $ac_c" 1>&6
9720 else
9721   cat > conftest.$ac_ext <<EOF
9722 #line 9723 "configure"
9723 #include "confdefs.h"
9724 #include <$ac_hdr>
9725 EOF
9726 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9727 { (eval echo configure:9728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9728 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9729 if test -z "$ac_err"; then
9730   rm -rf conftest*
9731   eval "ac_cv_header_$ac_safe=yes"
9732 else
9733   echo "$ac_err" >&5
9734   echo "configure: failed program was:" >&5
9735   cat conftest.$ac_ext >&5
9736   rm -rf conftest*
9737   eval "ac_cv_header_$ac_safe=no"
9738 fi
9739 rm -f conftest*
9740 fi
9741 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9742   echo "$ac_t""yes" 1>&6
9743     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9744   cat >> confdefs.h <<EOF
9745 #define $ac_tr_hdr 1
9746 EOF
9747  
9748 else
9749   echo "$ac_t""no" 1>&6
9750 fi
9751 done
9752
9753 if test $ac_cv_header_sys_uuid_h = yes ; then
9754         save_LIBS="$LIBS"
9755         
9756 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9757 echo "configure:9758: checking for library containing uuid_to_str" >&5
9758 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9759   echo $ac_n "(cached) $ac_c" 1>&6
9760 else
9761   ac_func_search_save_LIBS="$LIBS"
9762 ac_cv_search_uuid_to_str="no"
9763 cat > conftest.$ac_ext <<EOF
9764 #line 9765 "configure"
9765 #include "confdefs.h"
9766 /* Override any gcc2 internal prototype to avoid an error.  */
9767 /* We use char because int might match the return type of a gcc2
9768     builtin and then its argument prototype would still apply.  */
9769 char uuid_to_str();
9770
9771 int main() {
9772 uuid_to_str()
9773 ; return 0; }
9774 EOF
9775 if { (eval echo configure:9776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9776   rm -rf conftest*
9777   ac_cv_search_uuid_to_str="none required"
9778 else
9779   echo "configure: failed program was:" >&5
9780   cat conftest.$ac_ext >&5
9781 fi
9782 rm -f conftest*
9783 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9784 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9785 cat > conftest.$ac_ext <<EOF
9786 #line 9787 "configure"
9787 #include "confdefs.h"
9788 /* Override any gcc2 internal prototype to avoid an error.  */
9789 /* We use char because int might match the return type of a gcc2
9790     builtin and then its argument prototype would still apply.  */
9791 char uuid_to_str();
9792
9793 int main() {
9794 uuid_to_str()
9795 ; return 0; }
9796 EOF
9797 if { (eval echo configure:9798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9798   rm -rf conftest*
9799   ac_cv_search_uuid_to_str="-l$ac_lib"
9800 break
9801 else
9802   echo "configure: failed program was:" >&5
9803   cat conftest.$ac_ext >&5
9804 fi
9805 rm -f conftest*
9806 done
9807 LIBS="$ac_func_search_save_LIBS"
9808 fi
9809
9810 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9811 if test "$ac_cv_search_uuid_to_str" != "no"; then
9812   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9813   have_uuid=yes
9814 else :
9815   :
9816 fi
9817         LIBS="$save_LIBS"
9818
9819         if test have_uuid = yes ; then
9820                 cat >> confdefs.h <<\EOF
9821 #define HAVE_UUID_TO_STR 1
9822 EOF
9823
9824
9825                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9826                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9827         fi
9828 fi
9829
9830 if test $have_uuid = no ; then
9831         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9832 echo "configure:9833: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9833         save_LIBS="$LIBS"
9834         LIBS="$LIBS -lrpcrt4"
9835         cat > conftest.$ac_ext <<EOF
9836 #line 9837 "configure"
9837 #include "confdefs.h"
9838
9839                 int __stdcall UuidCreate(void *);
9840                 int __stdcall UuidToStringA(void *,void **);
9841                 
9842 int main() {
9843
9844                 UuidCreate(0);
9845                 UuidToStringA(0,0);
9846                 
9847 ; return 0; }
9848 EOF
9849 if { (eval echo configure:9850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9850   rm -rf conftest*
9851   need_rpcrt=yes
9852 else
9853   echo "configure: failed program was:" >&5
9854   cat conftest.$ac_ext >&5
9855   rm -rf conftest*
9856   need_rpcrt=no
9857 fi
9858 rm -f conftest*
9859         if test $need_rpcrt = yes; then
9860                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9861         fi
9862         LIBS="$save_LIBS"
9863         echo "$ac_t""$need_rpcrt" 1>&6
9864 fi
9865
9866 ol_link_dnssrv=no
9867 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9868 echo "configure:9869: checking for res_query" >&5
9869 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9870   echo $ac_n "(cached) $ac_c" 1>&6
9871 else
9872   cat > conftest.$ac_ext <<EOF
9873 #line 9874 "configure"
9874 #include "confdefs.h"
9875 /* System header to define __stub macros and hopefully few prototypes,
9876     which can conflict with char res_query(); below.  */
9877 #include <assert.h>
9878 /* Override any gcc2 internal prototype to avoid an error.  */
9879 /* We use char because int might match the return type of a gcc2
9880     builtin and then its argument prototype would still apply.  */
9881 char res_query();
9882 char (*f)();
9883
9884 int main() {
9885
9886 /* The GNU C library defines this for functions which it implements
9887     to always fail with ENOSYS.  Some functions are actually named
9888     something starting with __ and the normal name is an alias.  */
9889 #if defined (__stub_res_query) || defined (__stub___res_query)
9890 choke me
9891 #else
9892 f = res_query;
9893 #endif
9894
9895 ; return 0; }
9896 EOF
9897 if { (eval echo configure:9898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9898   rm -rf conftest*
9899   eval "ac_cv_func_res_query=yes"
9900 else
9901   echo "configure: failed program was:" >&5
9902   cat conftest.$ac_ext >&5
9903   rm -rf conftest*
9904   eval "ac_cv_func_res_query=no"
9905 fi
9906 rm -f conftest*
9907 fi
9908
9909 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9910   echo "$ac_t""yes" 1>&6
9911   :
9912 else
9913   echo "$ac_t""no" 1>&6
9914 fi
9915
9916 if test $ac_cv_func_res_query = no ; then 
9917         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9918 echo "configure:9919: checking for __res_query" >&5
9919 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9920   echo $ac_n "(cached) $ac_c" 1>&6
9921 else
9922   cat > conftest.$ac_ext <<EOF
9923 #line 9924 "configure"
9924 #include "confdefs.h"
9925 /* System header to define __stub macros and hopefully few prototypes,
9926     which can conflict with char __res_query(); below.  */
9927 #include <assert.h>
9928 /* Override any gcc2 internal prototype to avoid an error.  */
9929 /* We use char because int might match the return type of a gcc2
9930     builtin and then its argument prototype would still apply.  */
9931 char __res_query();
9932 char (*f)();
9933
9934 int main() {
9935
9936 /* The GNU C library defines this for functions which it implements
9937     to always fail with ENOSYS.  Some functions are actually named
9938     something starting with __ and the normal name is an alias.  */
9939 #if defined (__stub___res_query) || defined (__stub_____res_query)
9940 choke me
9941 #else
9942 f = __res_query;
9943 #endif
9944
9945 ; return 0; }
9946 EOF
9947 if { (eval echo configure:9948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9948   rm -rf conftest*
9949   eval "ac_cv_func___res_query=yes"
9950 else
9951   echo "configure: failed program was:" >&5
9952   cat conftest.$ac_ext >&5
9953   rm -rf conftest*
9954   eval "ac_cv_func___res_query=no"
9955 fi
9956 rm -f conftest*
9957 fi
9958
9959 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9960   echo "$ac_t""yes" 1>&6
9961   :
9962 else
9963   echo "$ac_t""no" 1>&6
9964 fi
9965
9966         ac_cv_func_res_query=$ac_cv_func___res_query
9967 fi
9968
9969 if test $ac_cv_func_res_query = no ; then 
9970         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9971 echo "configure:9972: checking for res_query in -lbind" >&5
9972 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9973 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9974   echo $ac_n "(cached) $ac_c" 1>&6
9975 else
9976   ac_save_LIBS="$LIBS"
9977 LIBS="-lbind  $LIBS"
9978 cat > conftest.$ac_ext <<EOF
9979 #line 9980 "configure"
9980 #include "confdefs.h"
9981 /* Override any gcc2 internal prototype to avoid an error.  */
9982 /* We use char because int might match the return type of a gcc2
9983     builtin and then its argument prototype would still apply.  */
9984 char res_query();
9985
9986 int main() {
9987 res_query()
9988 ; return 0; }
9989 EOF
9990 if { (eval echo configure:9991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9991   rm -rf conftest*
9992   eval "ac_cv_lib_$ac_lib_var=yes"
9993 else
9994   echo "configure: failed program was:" >&5
9995   cat conftest.$ac_ext >&5
9996   rm -rf conftest*
9997   eval "ac_cv_lib_$ac_lib_var=no"
9998 fi
9999 rm -f conftest*
10000 LIBS="$ac_save_LIBS"
10001
10002 fi
10003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10004   echo "$ac_t""yes" 1>&6
10005     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10006     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10007   cat >> confdefs.h <<EOF
10008 #define $ac_tr_lib 1
10009 EOF
10010
10011   LIBS="-lbind $LIBS"
10012
10013 else
10014   echo "$ac_t""no" 1>&6
10015 fi
10016
10017         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10018 fi
10019
10020 if test $ac_cv_func_res_query = no ; then 
10021         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10022 echo "configure:10023: checking for __res_query in -lbind" >&5
10023 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10024 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10025   echo $ac_n "(cached) $ac_c" 1>&6
10026 else
10027   ac_save_LIBS="$LIBS"
10028 LIBS="-lbind  $LIBS"
10029 cat > conftest.$ac_ext <<EOF
10030 #line 10031 "configure"
10031 #include "confdefs.h"
10032 /* Override any gcc2 internal prototype to avoid an error.  */
10033 /* We use char because int might match the return type of a gcc2
10034     builtin and then its argument prototype would still apply.  */
10035 char __res_query();
10036
10037 int main() {
10038 __res_query()
10039 ; return 0; }
10040 EOF
10041 if { (eval echo configure:10042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10042   rm -rf conftest*
10043   eval "ac_cv_lib_$ac_lib_var=yes"
10044 else
10045   echo "configure: failed program was:" >&5
10046   cat conftest.$ac_ext >&5
10047   rm -rf conftest*
10048   eval "ac_cv_lib_$ac_lib_var=no"
10049 fi
10050 rm -f conftest*
10051 LIBS="$ac_save_LIBS"
10052
10053 fi
10054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10055   echo "$ac_t""yes" 1>&6
10056     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10057     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10058   cat >> confdefs.h <<EOF
10059 #define $ac_tr_lib 1
10060 EOF
10061
10062   LIBS="-lbind $LIBS"
10063
10064 else
10065   echo "$ac_t""no" 1>&6
10066 fi
10067
10068         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10069 fi
10070
10071 if test $ac_cv_func_res_query = no ; then 
10072         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10073 echo "configure:10074: checking for res_query in -lresolv" >&5
10074 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10076   echo $ac_n "(cached) $ac_c" 1>&6
10077 else
10078   ac_save_LIBS="$LIBS"
10079 LIBS="-lresolv  $LIBS"
10080 cat > conftest.$ac_ext <<EOF
10081 #line 10082 "configure"
10082 #include "confdefs.h"
10083 /* Override any gcc2 internal prototype to avoid an error.  */
10084 /* We use char because int might match the return type of a gcc2
10085     builtin and then its argument prototype would still apply.  */
10086 char res_query();
10087
10088 int main() {
10089 res_query()
10090 ; return 0; }
10091 EOF
10092 if { (eval echo configure:10093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10093   rm -rf conftest*
10094   eval "ac_cv_lib_$ac_lib_var=yes"
10095 else
10096   echo "configure: failed program was:" >&5
10097   cat conftest.$ac_ext >&5
10098   rm -rf conftest*
10099   eval "ac_cv_lib_$ac_lib_var=no"
10100 fi
10101 rm -f conftest*
10102 LIBS="$ac_save_LIBS"
10103
10104 fi
10105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10106   echo "$ac_t""yes" 1>&6
10107     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10108     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10109   cat >> confdefs.h <<EOF
10110 #define $ac_tr_lib 1
10111 EOF
10112
10113   LIBS="-lresolv $LIBS"
10114
10115 else
10116   echo "$ac_t""no" 1>&6
10117 fi
10118
10119         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10120 fi
10121
10122 if test $ac_cv_func_res_query = no ; then 
10123         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10124 echo "configure:10125: checking for __res_query in -lresolv" >&5
10125 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10126 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10127   echo $ac_n "(cached) $ac_c" 1>&6
10128 else
10129   ac_save_LIBS="$LIBS"
10130 LIBS="-lresolv  $LIBS"
10131 cat > conftest.$ac_ext <<EOF
10132 #line 10133 "configure"
10133 #include "confdefs.h"
10134 /* Override any gcc2 internal prototype to avoid an error.  */
10135 /* We use char because int might match the return type of a gcc2
10136     builtin and then its argument prototype would still apply.  */
10137 char __res_query();
10138
10139 int main() {
10140 __res_query()
10141 ; return 0; }
10142 EOF
10143 if { (eval echo configure:10144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10144   rm -rf conftest*
10145   eval "ac_cv_lib_$ac_lib_var=yes"
10146 else
10147   echo "configure: failed program was:" >&5
10148   cat conftest.$ac_ext >&5
10149   rm -rf conftest*
10150   eval "ac_cv_lib_$ac_lib_var=no"
10151 fi
10152 rm -f conftest*
10153 LIBS="$ac_save_LIBS"
10154
10155 fi
10156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10157   echo "$ac_t""yes" 1>&6
10158     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10159     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10160   cat >> confdefs.h <<EOF
10161 #define $ac_tr_lib 1
10162 EOF
10163
10164   LIBS="-lresolv $LIBS"
10165
10166 else
10167   echo "$ac_t""no" 1>&6
10168 fi
10169
10170         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10171 fi
10172
10173 if test "$ac_cv_func_res_query" = yes ; then
10174         cat >> confdefs.h <<\EOF
10175 #define HAVE_RES_QUERY 1
10176 EOF
10177
10178
10179         if test $ol_enable_dnssrv != no ; then
10180                 ol_link_dnssrv=yes
10181         fi
10182 fi
10183
10184 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10185         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10186 fi
10187
10188 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10189 do
10190 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10191 echo "configure:10192: checking for $ac_func" >&5
10192 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10193   echo $ac_n "(cached) $ac_c" 1>&6
10194 else
10195   cat > conftest.$ac_ext <<EOF
10196 #line 10197 "configure"
10197 #include "confdefs.h"
10198 /* System header to define __stub macros and hopefully few prototypes,
10199     which can conflict with char $ac_func(); below.  */
10200 #include <assert.h>
10201 /* Override any gcc2 internal prototype to avoid an error.  */
10202 /* We use char because int might match the return type of a gcc2
10203     builtin and then its argument prototype would still apply.  */
10204 char $ac_func();
10205 char (*f)();
10206
10207 int main() {
10208
10209 /* The GNU C library defines this for functions which it implements
10210     to always fail with ENOSYS.  Some functions are actually named
10211     something starting with __ and the normal name is an alias.  */
10212 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10213 choke me
10214 #else
10215 f = $ac_func;
10216 #endif
10217
10218 ; return 0; }
10219 EOF
10220 if { (eval echo configure:10221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10221   rm -rf conftest*
10222   eval "ac_cv_func_$ac_func=yes"
10223 else
10224   echo "configure: failed program was:" >&5
10225   cat conftest.$ac_ext >&5
10226   rm -rf conftest*
10227   eval "ac_cv_func_$ac_func=no"
10228 fi
10229 rm -f conftest*
10230 fi
10231
10232 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10233   echo "$ac_t""yes" 1>&6
10234     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10235   cat >> confdefs.h <<EOF
10236 #define $ac_tr_func 1
10237 EOF
10238  
10239 else
10240   echo "$ac_t""no" 1>&6
10241 fi
10242 done
10243
10244
10245 ol_link_ipv6=no
10246 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10247         if test $ol_enable_ipv6 = yes ; then
10248                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10249         fi
10250 elif test $ol_enable_ipv6 != no ; then
10251         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10252 echo "configure:10253: checking INET6_ADDRSTRLEN" >&5
10253 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10254   echo $ac_n "(cached) $ac_c" 1>&6
10255 else
10256   
10257                 cat > conftest.$ac_ext <<EOF
10258 #line 10259 "configure"
10259 #include "confdefs.h"
10260
10261 #                       include <netinet/in.h>
10262 #                       ifdef INET6_ADDRSTRLEN
10263                                 __has_inet6_addrstrlen__;
10264 #                       endif
10265                 
10266 EOF
10267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10268   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10269   rm -rf conftest*
10270   ol_cv_inet6_addrstrlen=yes
10271 else
10272   rm -rf conftest*
10273   ol_cv_inet6_addrstrlen=no
10274 fi
10275 rm -f conftest*
10276
10277 fi
10278
10279 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10280
10281
10282         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10283 echo "configure:10284: checking struct sockaddr_storage" >&5
10284 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10285   echo $ac_n "(cached) $ac_c" 1>&6
10286 else
10287   
10288                 cat > conftest.$ac_ext <<EOF
10289 #line 10290 "configure"
10290 #include "confdefs.h"
10291
10292 #include <sys/types.h>
10293 #include <sys/socket.h>
10294
10295 int main() {
10296
10297                         struct sockaddr_storage ss;
10298
10299 ; return 0; }
10300 EOF
10301 if { (eval echo configure:10302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10302   rm -rf conftest*
10303   ol_cv_struct_sockaddr_storage=yes
10304 else
10305   echo "configure: failed program was:" >&5
10306   cat conftest.$ac_ext >&5
10307   rm -rf conftest*
10308   ol_cv_struct_sockaddr_storage=no
10309 fi
10310 rm -f conftest*
10311 fi
10312
10313 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10314
10315         if test $ol_cv_inet6_addrstrlen = yes \
10316                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10317                 ol_link_ipv6=yes
10318         elif test $ol_enable_ipv6 = yes \
10319                         -a $ol_cv_inet6_addrstrlen = no ; then
10320                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10321         elif test $ol_enable_ipv6 = yes \
10322                         -a $ol_cv_struct_sockaddr_storage = no ; then
10323                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10324         fi
10325 fi
10326
10327 if test $ol_enable_local != no ; then
10328         for ac_hdr in sys/un.h 
10329 do
10330 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10331 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10332 echo "configure:10333: checking for $ac_hdr" >&5
10333 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10334   echo $ac_n "(cached) $ac_c" 1>&6
10335 else
10336   cat > conftest.$ac_ext <<EOF
10337 #line 10338 "configure"
10338 #include "confdefs.h"
10339 #include <$ac_hdr>
10340 EOF
10341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10342 { (eval echo configure:10343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10344 if test -z "$ac_err"; then
10345   rm -rf conftest*
10346   eval "ac_cv_header_$ac_safe=yes"
10347 else
10348   echo "$ac_err" >&5
10349   echo "configure: failed program was:" >&5
10350   cat conftest.$ac_ext >&5
10351   rm -rf conftest*
10352   eval "ac_cv_header_$ac_safe=no"
10353 fi
10354 rm -f conftest*
10355 fi
10356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10357   echo "$ac_t""yes" 1>&6
10358     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10359   cat >> confdefs.h <<EOF
10360 #define $ac_tr_hdr 1
10361 EOF
10362  
10363 else
10364   echo "$ac_t""no" 1>&6
10365 fi
10366 done
10367
10368
10369         if test $ol_enable_local = auto ; then
10370                 ol_enable_local=$ac_cv_header_sys_un_h
10371         elif test $ac_cv_header_sys_un_h = no ; then
10372                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10373         fi
10374 fi
10375
10376 ol_link_kbind=no
10377 ol_link_krb5=no
10378 ol_link_krb4=no
10379
10380 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10381         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10382         -o $ol_with_kerberos = k425 ; then
10383
10384         for ac_hdr in krb5.h
10385 do
10386 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10387 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10388 echo "configure:10389: checking for $ac_hdr" >&5
10389 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10390   echo $ac_n "(cached) $ac_c" 1>&6
10391 else
10392   cat > conftest.$ac_ext <<EOF
10393 #line 10394 "configure"
10394 #include "confdefs.h"
10395 #include <$ac_hdr>
10396 EOF
10397 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10398 { (eval echo configure:10399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10399 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10400 if test -z "$ac_err"; then
10401   rm -rf conftest*
10402   eval "ac_cv_header_$ac_safe=yes"
10403 else
10404   echo "$ac_err" >&5
10405   echo "configure: failed program was:" >&5
10406   cat conftest.$ac_ext >&5
10407   rm -rf conftest*
10408   eval "ac_cv_header_$ac_safe=no"
10409 fi
10410 rm -f conftest*
10411 fi
10412 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10413   echo "$ac_t""yes" 1>&6
10414     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10415   cat >> confdefs.h <<EOF
10416 #define $ac_tr_hdr 1
10417 EOF
10418  
10419 else
10420   echo "$ac_t""no" 1>&6
10421 fi
10422 done
10423
10424
10425         if test $ac_cv_header_krb5_h = yes ; then
10426                                 for ac_hdr in heim_err.h
10427 do
10428 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10429 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10430 echo "configure:10431: checking for $ac_hdr" >&5
10431 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10432   echo $ac_n "(cached) $ac_c" 1>&6
10433 else
10434   cat > conftest.$ac_ext <<EOF
10435 #line 10436 "configure"
10436 #include "confdefs.h"
10437 #include <$ac_hdr>
10438 EOF
10439 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10440 { (eval echo configure:10441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10441 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10442 if test -z "$ac_err"; then
10443   rm -rf conftest*
10444   eval "ac_cv_header_$ac_safe=yes"
10445 else
10446   echo "$ac_err" >&5
10447   echo "configure: failed program was:" >&5
10448   cat conftest.$ac_ext >&5
10449   rm -rf conftest*
10450   eval "ac_cv_header_$ac_safe=no"
10451 fi
10452 rm -f conftest*
10453 fi
10454 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10455   echo "$ac_t""yes" 1>&6
10456     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10457   cat >> confdefs.h <<EOF
10458 #define $ac_tr_hdr 1
10459 EOF
10460  
10461 else
10462   echo "$ac_t""no" 1>&6
10463 fi
10464 done
10465
10466                 if test $ac_cv_header_heim_err_h = yes ; then
10467                         krb5_impl=heimdal
10468                 else
10469                         krb5_impl=mit
10470                 fi
10471
10472                 if test $krb5_impl = mit; then
10473                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10474 echo "configure:10475: checking for main in -lk5crypto" >&5
10475 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10476 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10477   echo $ac_n "(cached) $ac_c" 1>&6
10478 else
10479   ac_save_LIBS="$LIBS"
10480 LIBS="-lk5crypto  $LIBS"
10481 cat > conftest.$ac_ext <<EOF
10482 #line 10483 "configure"
10483 #include "confdefs.h"
10484
10485 int main() {
10486 main()
10487 ; return 0; }
10488 EOF
10489 if { (eval echo configure:10490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10490   rm -rf conftest*
10491   eval "ac_cv_lib_$ac_lib_var=yes"
10492 else
10493   echo "configure: failed program was:" >&5
10494   cat conftest.$ac_ext >&5
10495   rm -rf conftest*
10496   eval "ac_cv_lib_$ac_lib_var=no"
10497 fi
10498 rm -f conftest*
10499 LIBS="$ac_save_LIBS"
10500
10501 fi
10502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10503   echo "$ac_t""yes" 1>&6
10504   krb5crypto=k5crypto
10505 else
10506   echo "$ac_t""no" 1>&6
10507 krb5crypto=crypto
10508 fi
10509
10510
10511                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10512 echo "configure:10513: checking for main in -lkrb5" >&5
10513 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10514 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10515   echo $ac_n "(cached) $ac_c" 1>&6
10516 else
10517   ac_save_LIBS="$LIBS"
10518 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10519 cat > conftest.$ac_ext <<EOF
10520 #line 10521 "configure"
10521 #include "confdefs.h"
10522
10523 int main() {
10524 main()
10525 ; return 0; }
10526 EOF
10527 if { (eval echo configure:10528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10528   rm -rf conftest*
10529   eval "ac_cv_lib_$ac_lib_var=yes"
10530 else
10531   echo "configure: failed program was:" >&5
10532   cat conftest.$ac_ext >&5
10533   rm -rf conftest*
10534   eval "ac_cv_lib_$ac_lib_var=no"
10535 fi
10536 rm -f conftest*
10537 LIBS="$ac_save_LIBS"
10538
10539 fi
10540 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10541   echo "$ac_t""yes" 1>&6
10542   have_krb5=yes
10543                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10544 else
10545   echo "$ac_t""no" 1>&6
10546 have_krb5=no
10547 fi
10548
10549
10550                 elif test $krb5_impl = heimdal; then
10551                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10552 echo "configure:10553: checking for main in -ldes" >&5
10553 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10554 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10555   echo $ac_n "(cached) $ac_c" 1>&6
10556 else
10557   ac_save_LIBS="$LIBS"
10558 LIBS="-ldes  $LIBS"
10559 cat > conftest.$ac_ext <<EOF
10560 #line 10561 "configure"
10561 #include "confdefs.h"
10562
10563 int main() {
10564 main()
10565 ; return 0; }
10566 EOF
10567 if { (eval echo configure:10568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10568   rm -rf conftest*
10569   eval "ac_cv_lib_$ac_lib_var=yes"
10570 else
10571   echo "configure: failed program was:" >&5
10572   cat conftest.$ac_ext >&5
10573   rm -rf conftest*
10574   eval "ac_cv_lib_$ac_lib_var=no"
10575 fi
10576 rm -f conftest*
10577 LIBS="$ac_save_LIBS"
10578
10579 fi
10580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10581   echo "$ac_t""yes" 1>&6
10582   krb5crypto=des
10583 else
10584   echo "$ac_t""no" 1>&6
10585 krb5crypto=crypto
10586 fi
10587
10588
10589                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10590 echo "configure:10591: checking for main in -lkrb5" >&5
10591 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10592 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10593   echo $ac_n "(cached) $ac_c" 1>&6
10594 else
10595   ac_save_LIBS="$LIBS"
10596 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10597 cat > conftest.$ac_ext <<EOF
10598 #line 10599 "configure"
10599 #include "confdefs.h"
10600
10601 int main() {
10602 main()
10603 ; return 0; }
10604 EOF
10605 if { (eval echo configure:10606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10606   rm -rf conftest*
10607   eval "ac_cv_lib_$ac_lib_var=yes"
10608 else
10609   echo "configure: failed program was:" >&5
10610   cat conftest.$ac_ext >&5
10611   rm -rf conftest*
10612   eval "ac_cv_lib_$ac_lib_var=no"
10613 fi
10614 rm -f conftest*
10615 LIBS="$ac_save_LIBS"
10616
10617 fi
10618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10619   echo "$ac_t""yes" 1>&6
10620   have_krb5=yes
10621                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10622 else
10623   echo "$ac_t""no" 1>&6
10624 have_krb5=no
10625 fi
10626
10627
10628                         cat >> confdefs.h <<\EOF
10629 #define HAVE_HEIMDAL_KERBEROS 1
10630 EOF
10631
10632
10633                 else
10634                         have_krb5=no
10635                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10636                 fi
10637
10638                 if test $have_krb5 = yes ; then
10639                         ol_link_krb5=yes
10640
10641                         cat >> confdefs.h <<\EOF
10642 #define HAVE_KRB5 1
10643 EOF
10644
10645
10646                         if test $ol_with_kerberos = k5only ; then
10647                                 ol_with_kerberos=found
10648                         fi
10649
10650                 elif test $ol_with_kerberos != auto ; then
10651                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10652                 fi
10653
10654         fi
10655 fi
10656
10657 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10658         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10659
10660         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10661 do
10662 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10663 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10664 echo "configure:10665: checking for $ac_hdr" >&5
10665 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10666   echo $ac_n "(cached) $ac_c" 1>&6
10667 else
10668   cat > conftest.$ac_ext <<EOF
10669 #line 10670 "configure"
10670 #include "confdefs.h"
10671 #include <$ac_hdr>
10672 EOF
10673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10674 { (eval echo configure:10675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10676 if test -z "$ac_err"; then
10677   rm -rf conftest*
10678   eval "ac_cv_header_$ac_safe=yes"
10679 else
10680   echo "$ac_err" >&5
10681   echo "configure: failed program was:" >&5
10682   cat conftest.$ac_ext >&5
10683   rm -rf conftest*
10684   eval "ac_cv_header_$ac_safe=no"
10685 fi
10686 rm -f conftest*
10687 fi
10688 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10689   echo "$ac_t""yes" 1>&6
10690     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10691   cat >> confdefs.h <<EOF
10692 #define $ac_tr_hdr 1
10693 EOF
10694  
10695 else
10696   echo "$ac_t""no" 1>&6
10697 fi
10698 done
10699
10700
10701         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10702                 if test $krb5_impl = mit; then
10703                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10704 echo "configure:10705: checking for main in -lkrb4" >&5
10705 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10706 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10707   echo $ac_n "(cached) $ac_c" 1>&6
10708 else
10709   ac_save_LIBS="$LIBS"
10710 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10711 cat > conftest.$ac_ext <<EOF
10712 #line 10713 "configure"
10713 #include "confdefs.h"
10714
10715 int main() {
10716 main()
10717 ; return 0; }
10718 EOF
10719 if { (eval echo configure:10720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10720   rm -rf conftest*
10721   eval "ac_cv_lib_$ac_lib_var=yes"
10722 else
10723   echo "configure: failed program was:" >&5
10724   cat conftest.$ac_ext >&5
10725   rm -rf conftest*
10726   eval "ac_cv_lib_$ac_lib_var=no"
10727 fi
10728 rm -f conftest*
10729 LIBS="$ac_save_LIBS"
10730
10731 fi
10732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10733   echo "$ac_t""yes" 1>&6
10734   have_k425=yes
10735                                 KRB4_LIBS="-lkrb4 -ldes425"
10736 else
10737   echo "$ac_t""no" 1>&6
10738 have_k425=no
10739 fi
10740
10741
10742                 elif test $krb5_impl = heimdal; then
10743                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10744 echo "configure:10745: checking for main in -lkrb4" >&5
10745 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10746 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10747   echo $ac_n "(cached) $ac_c" 1>&6
10748 else
10749   ac_save_LIBS="$LIBS"
10750 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10751 cat > conftest.$ac_ext <<EOF
10752 #line 10753 "configure"
10753 #include "confdefs.h"
10754
10755 int main() {
10756 main()
10757 ; return 0; }
10758 EOF
10759 if { (eval echo configure:10760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10760   rm -rf conftest*
10761   eval "ac_cv_lib_$ac_lib_var=yes"
10762 else
10763   echo "configure: failed program was:" >&5
10764   cat conftest.$ac_ext >&5
10765   rm -rf conftest*
10766   eval "ac_cv_lib_$ac_lib_var=no"
10767 fi
10768 rm -f conftest*
10769 LIBS="$ac_save_LIBS"
10770
10771 fi
10772 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10773   echo "$ac_t""yes" 1>&6
10774   have_k425=yes
10775                                 KRB4_LIBS="-lkrb4"
10776 else
10777   echo "$ac_t""no" 1>&6
10778 have_k425=no
10779 fi
10780
10781
10782                 else
10783                         have_425=no
10784                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10785                 fi
10786
10787                 if test $have_k425 = yes ; then
10788                         ol_with_kerberos=found
10789                         ol_link_krb4=yes
10790
10791                         cat >> confdefs.h <<\EOF
10792 #define HAVE_KRB425 1
10793 EOF
10794
10795                         cat >> confdefs.h <<\EOF
10796 #define HAVE_KRB4 1
10797 EOF
10798
10799
10800                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10801 echo "configure:10802: checking for des_debug in Kerberos libraries" >&5
10802 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10803   echo $ac_n "(cached) $ac_c" 1>&6
10804 else
10805   
10806                                                                 save_LIBS="$LIBS"
10807                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10808                                 cat > conftest.$ac_ext <<EOF
10809 #line 10810 "configure"
10810 #include "confdefs.h"
10811
10812 #include <kerberosIV/krb.h>
10813 #include <kerberosIV/des.h>
10814 extern int des_debug;
10815
10816 int main() {
10817
10818 des_debug = 1;
10819
10820 ; return 0; }
10821 EOF
10822 if { (eval echo configure:10823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10823   rm -rf conftest*
10824   ol_cv_var_des_debug=yes
10825 else
10826   echo "configure: failed program was:" >&5
10827   cat conftest.$ac_ext >&5
10828   rm -rf conftest*
10829   ol_cv_var_des_debug=no
10830 fi
10831 rm -f conftest*
10832                                                                 LIBS="$save_LIBS"
10833                         
10834 fi
10835
10836 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10837
10838                         if test $ol_cv_var_des_debug = yes ; then
10839                                 cat >> confdefs.h <<\EOF
10840 #define HAVE_DES_DEBUG 1
10841 EOF
10842
10843                         fi
10844
10845                         LIBS="$save_LIBS"
10846                 fi
10847         fi
10848 fi
10849
10850 if test $ol_link_krb5 = yes ; then
10851         ol_with_kerberos=found
10852 fi
10853
10854 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10855         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10856
10857         for ac_hdr in krb.h des.h krb-archaeology.h 
10858 do
10859 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10860 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10861 echo "configure:10862: checking for $ac_hdr" >&5
10862 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10863   echo $ac_n "(cached) $ac_c" 1>&6
10864 else
10865   cat > conftest.$ac_ext <<EOF
10866 #line 10867 "configure"
10867 #include "confdefs.h"
10868 #include <$ac_hdr>
10869 EOF
10870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10871 { (eval echo configure:10872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10873 if test -z "$ac_err"; then
10874   rm -rf conftest*
10875   eval "ac_cv_header_$ac_safe=yes"
10876 else
10877   echo "$ac_err" >&5
10878   echo "configure: failed program was:" >&5
10879   cat conftest.$ac_ext >&5
10880   rm -rf conftest*
10881   eval "ac_cv_header_$ac_safe=no"
10882 fi
10883 rm -f conftest*
10884 fi
10885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10886   echo "$ac_t""yes" 1>&6
10887     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10888   cat >> confdefs.h <<EOF
10889 #define $ac_tr_hdr 1
10890 EOF
10891  
10892 else
10893   echo "$ac_t""no" 1>&6
10894 fi
10895 done
10896
10897
10898         if test $ac_cv_header_krb_h = yes ; then
10899                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10900 echo "configure:10901: checking for main in -lkrb" >&5
10901 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10902 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10903   echo $ac_n "(cached) $ac_c" 1>&6
10904 else
10905   ac_save_LIBS="$LIBS"
10906 LIBS="-lkrb -ldes $LIBS"
10907 cat > conftest.$ac_ext <<EOF
10908 #line 10909 "configure"
10909 #include "confdefs.h"
10910
10911 int main() {
10912 main()
10913 ; return 0; }
10914 EOF
10915 if { (eval echo configure:10916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10916   rm -rf conftest*
10917   eval "ac_cv_lib_$ac_lib_var=yes"
10918 else
10919   echo "configure: failed program was:" >&5
10920   cat conftest.$ac_ext >&5
10921   rm -rf conftest*
10922   eval "ac_cv_lib_$ac_lib_var=no"
10923 fi
10924 rm -f conftest*
10925 LIBS="$ac_save_LIBS"
10926
10927 fi
10928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10929   echo "$ac_t""yes" 1>&6
10930   have_k4=yes
10931 else
10932   echo "$ac_t""no" 1>&6
10933 have_k4=no
10934 fi
10935
10936
10937                 if test $have_k4 = yes ; then
10938                         ol_with_kerberos=found
10939                         ol_link_krb4=yes
10940
10941                         cat >> confdefs.h <<\EOF
10942 #define HAVE_KRB4 1
10943 EOF
10944
10945
10946                         KRB4_LIBS="-lkrb -ldes"
10947
10948                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10949                                 cat >> confdefs.h <<\EOF
10950 #define HAVE_KTH_KERBEROS 1
10951 EOF
10952
10953                         fi
10954                 fi
10955         fi
10956 fi
10957
10958 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10959         ol_link_kbind=yes
10960
10961 elif test $ol_enable_kbind = yes ; then
10962         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10963 fi
10964
10965 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10966         cat >> confdefs.h <<\EOF
10967 #define HAVE_KERBEROS 1
10968 EOF
10969
10970
10971 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10972         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10973 fi
10974
10975 ol_link_tls=no
10976 if test $ol_with_tls != no ; then
10977         for ac_hdr in openssl/ssl.h ssl.h
10978 do
10979 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10980 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10981 echo "configure:10982: checking for $ac_hdr" >&5
10982 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10983   echo $ac_n "(cached) $ac_c" 1>&6
10984 else
10985   cat > conftest.$ac_ext <<EOF
10986 #line 10987 "configure"
10987 #include "confdefs.h"
10988 #include <$ac_hdr>
10989 EOF
10990 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10991 { (eval echo configure:10992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10992 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10993 if test -z "$ac_err"; then
10994   rm -rf conftest*
10995   eval "ac_cv_header_$ac_safe=yes"
10996 else
10997   echo "$ac_err" >&5
10998   echo "configure: failed program was:" >&5
10999   cat conftest.$ac_ext >&5
11000   rm -rf conftest*
11001   eval "ac_cv_header_$ac_safe=no"
11002 fi
11003 rm -f conftest*
11004 fi
11005 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11006   echo "$ac_t""yes" 1>&6
11007     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11008   cat >> confdefs.h <<EOF
11009 #define $ac_tr_hdr 1
11010 EOF
11011  
11012 else
11013   echo "$ac_t""no" 1>&6
11014 fi
11015 done
11016
11017         
11018         if test $ac_cv_header_openssl_ssl_h = yes \
11019                 -o $ac_cv_header_ssl_h = yes ; then
11020                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11021 echo "configure:11022: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11022 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11023 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11024   echo $ac_n "(cached) $ac_c" 1>&6
11025 else
11026   ac_save_LIBS="$LIBS"
11027 LIBS="-lssl -lcrypto $LIBS"
11028 cat > conftest.$ac_ext <<EOF
11029 #line 11030 "configure"
11030 #include "confdefs.h"
11031 /* Override any gcc2 internal prototype to avoid an error.  */
11032 /* We use char because int might match the return type of a gcc2
11033     builtin and then its argument prototype would still apply.  */
11034 char SSLeay_add_ssl_algorithms();
11035
11036 int main() {
11037 SSLeay_add_ssl_algorithms()
11038 ; return 0; }
11039 EOF
11040 if { (eval echo configure:11041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11041   rm -rf conftest*
11042   eval "ac_cv_lib_$ac_lib_var=yes"
11043 else
11044   echo "configure: failed program was:" >&5
11045   cat conftest.$ac_ext >&5
11046   rm -rf conftest*
11047   eval "ac_cv_lib_$ac_lib_var=no"
11048 fi
11049 rm -f conftest*
11050 LIBS="$ac_save_LIBS"
11051
11052 fi
11053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11054   echo "$ac_t""yes" 1>&6
11055   have_ssleay=yes
11056                         need_rsaref=no
11057 else
11058   echo "$ac_t""no" 1>&6
11059 have_ssleay=no
11060 fi
11061
11062                         
11063                 if test $have_ssleay = no ; then
11064                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11065 echo "configure:11066: checking for SSL_library_init in -lssl" >&5
11066 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11067 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11068   echo $ac_n "(cached) $ac_c" 1>&6
11069 else
11070   ac_save_LIBS="$LIBS"
11071 LIBS="-lssl -lcrypto $LIBS"
11072 cat > conftest.$ac_ext <<EOF
11073 #line 11074 "configure"
11074 #include "confdefs.h"
11075 /* Override any gcc2 internal prototype to avoid an error.  */
11076 /* We use char because int might match the return type of a gcc2
11077     builtin and then its argument prototype would still apply.  */
11078 char SSL_library_init();
11079
11080 int main() {
11081 SSL_library_init()
11082 ; return 0; }
11083 EOF
11084 if { (eval echo configure:11085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11085   rm -rf conftest*
11086   eval "ac_cv_lib_$ac_lib_var=yes"
11087 else
11088   echo "configure: failed program was:" >&5
11089   cat conftest.$ac_ext >&5
11090   rm -rf conftest*
11091   eval "ac_cv_lib_$ac_lib_var=no"
11092 fi
11093 rm -f conftest*
11094 LIBS="$ac_save_LIBS"
11095
11096 fi
11097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11098   echo "$ac_t""yes" 1>&6
11099   have_ssleay=yes
11100                                 need_rsaref=no
11101 else
11102   echo "$ac_t""no" 1>&6
11103 have_ssleay=no
11104 fi
11105
11106                 fi
11107
11108                 if test $have_ssleay = no ; then
11109                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11110 echo "configure:11111: checking for ssl3_accept in -lssl" >&5
11111 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11112 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11113   echo $ac_n "(cached) $ac_c" 1>&6
11114 else
11115   ac_save_LIBS="$LIBS"
11116 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11117 cat > conftest.$ac_ext <<EOF
11118 #line 11119 "configure"
11119 #include "confdefs.h"
11120 /* Override any gcc2 internal prototype to avoid an error.  */
11121 /* We use char because int might match the return type of a gcc2
11122     builtin and then its argument prototype would still apply.  */
11123 char ssl3_accept();
11124
11125 int main() {
11126 ssl3_accept()
11127 ; return 0; }
11128 EOF
11129 if { (eval echo configure:11130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11130   rm -rf conftest*
11131   eval "ac_cv_lib_$ac_lib_var=yes"
11132 else
11133   echo "configure: failed program was:" >&5
11134   cat conftest.$ac_ext >&5
11135   rm -rf conftest*
11136   eval "ac_cv_lib_$ac_lib_var=no"
11137 fi
11138 rm -f conftest*
11139 LIBS="$ac_save_LIBS"
11140
11141 fi
11142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11143   echo "$ac_t""yes" 1>&6
11144   have_ssleay=yes
11145                                 need_rsaref=yes
11146 else
11147   echo "$ac_t""no" 1>&6
11148 have_ssleay=no
11149 fi
11150
11151                 fi
11152
11153                 if test $have_ssleay = yes ; then
11154                         ol_with_tls=found
11155                         ol_link_tls=yes
11156
11157                         cat >> confdefs.h <<\EOF
11158 #define HAVE_SSLEAY 1
11159 EOF
11160
11161
11162                         if test $need_rsaref = yes; then
11163                                 cat >> confdefs.h <<\EOF
11164 #define HAVE_RSAREF 1
11165 EOF
11166
11167
11168                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11169                         else
11170                                 TLS_LIBS="-lssl -lcrypto"
11171                         fi
11172                 fi
11173         fi
11174
11175 else
11176         echo "configure: warning: TLS data protection not supported!" 1>&2
11177 fi
11178
11179 WITH_TLS=no
11180 if test $ol_link_tls = yes ; then
11181         cat >> confdefs.h <<\EOF
11182 #define HAVE_TLS 1
11183 EOF
11184
11185         WITH_TLS=yes
11186
11187 elif test $ol_with_tls = auto ; then
11188         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11189         echo "configure: warning: TLS data protection not supported!" 1>&2
11190
11191 elif test $ol_with_tls != no ; then
11192         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11193 fi
11194
11195 if test $ol_enable_lmpasswd != no; then
11196         if test $ol_link_tls != yes ; then
11197                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11198         fi
11199
11200         cat >> confdefs.h <<\EOF
11201 #define SLAPD_LMHASH 1
11202 EOF
11203
11204 fi
11205
11206 ol_link_threads=no
11207
11208 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11209         -o $ol_with_threads = nt ; then
11210
11211         
11212         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11213 echo "configure:11214: checking for _beginthread" >&5
11214 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11215   echo $ac_n "(cached) $ac_c" 1>&6
11216 else
11217   cat > conftest.$ac_ext <<EOF
11218 #line 11219 "configure"
11219 #include "confdefs.h"
11220 /* System header to define __stub macros and hopefully few prototypes,
11221     which can conflict with char _beginthread(); below.  */
11222 #include <assert.h>
11223 /* Override any gcc2 internal prototype to avoid an error.  */
11224 /* We use char because int might match the return type of a gcc2
11225     builtin and then its argument prototype would still apply.  */
11226 char _beginthread();
11227 char (*f)();
11228
11229 int main() {
11230
11231 /* The GNU C library defines this for functions which it implements
11232     to always fail with ENOSYS.  Some functions are actually named
11233     something starting with __ and the normal name is an alias.  */
11234 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11235 choke me
11236 #else
11237 f = _beginthread;
11238 #endif
11239
11240 ; return 0; }
11241 EOF
11242 if { (eval echo configure:11243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11243   rm -rf conftest*
11244   eval "ac_cv_func__beginthread=yes"
11245 else
11246   echo "configure: failed program was:" >&5
11247   cat conftest.$ac_ext >&5
11248   rm -rf conftest*
11249   eval "ac_cv_func__beginthread=no"
11250 fi
11251 rm -f conftest*
11252 fi
11253
11254 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11255   echo "$ac_t""yes" 1>&6
11256   :
11257 else
11258   echo "$ac_t""no" 1>&6
11259 fi
11260
11261
11262         if test $ac_cv_func__beginthread = yes ; then
11263                 cat >> confdefs.h <<\EOF
11264 #define HAVE_NT_THREADS 1
11265 EOF
11266
11267                 ol_cv_nt_threads=yes
11268         fi
11269
11270
11271         if test "$ol_cv_nt_threads" = yes ; then
11272                 ol_link_threads=nt
11273                 ol_with_threads=found
11274                 ol_with_yielding_select=yes
11275
11276                 cat >> confdefs.h <<\EOF
11277 #define HAVE_NT_SERVICE_MANAGER 1
11278 EOF
11279
11280                 cat >> confdefs.h <<\EOF
11281 #define HAVE_NT_EVENT_LOG 1
11282 EOF
11283
11284         fi
11285
11286         if test $ol_with_threads = nt ; then
11287                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11288         fi
11289 fi
11290
11291 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11292         -o $ol_with_threads = posix ; then
11293
11294         for ac_hdr in pthread.h
11295 do
11296 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11297 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11298 echo "configure:11299: checking for $ac_hdr" >&5
11299 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11300   echo $ac_n "(cached) $ac_c" 1>&6
11301 else
11302   cat > conftest.$ac_ext <<EOF
11303 #line 11304 "configure"
11304 #include "confdefs.h"
11305 #include <$ac_hdr>
11306 EOF
11307 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11308 { (eval echo configure:11309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11309 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11310 if test -z "$ac_err"; then
11311   rm -rf conftest*
11312   eval "ac_cv_header_$ac_safe=yes"
11313 else
11314   echo "$ac_err" >&5
11315   echo "configure: failed program was:" >&5
11316   cat conftest.$ac_ext >&5
11317   rm -rf conftest*
11318   eval "ac_cv_header_$ac_safe=no"
11319 fi
11320 rm -f conftest*
11321 fi
11322 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11323   echo "$ac_t""yes" 1>&6
11324     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11325   cat >> confdefs.h <<EOF
11326 #define $ac_tr_hdr 1
11327 EOF
11328  
11329 else
11330   echo "$ac_t""no" 1>&6
11331 fi
11332 done
11333
11334
11335         if test $ac_cv_header_pthread_h = yes ; then
11336                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11337 echo "configure:11338: checking POSIX thread version" >&5
11338 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11339   echo $ac_n "(cached) $ac_c" 1>&6
11340 else
11341   
11342         cat > conftest.$ac_ext <<EOF
11343 #line 11344 "configure"
11344 #include "confdefs.h"
11345
11346 #               include <pthread.h>
11347         
11348 int main() {
11349
11350                 int i = PTHREAD_CREATE_JOINABLE;
11351         
11352 ; return 0; }
11353 EOF
11354 if { (eval echo configure:11355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11355   rm -rf conftest*
11356   
11357         cat > conftest.$ac_ext <<EOF
11358 #line 11359 "configure"
11359 #include "confdefs.h"
11360 #include <pthread.h>
11361 EOF
11362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11363   egrep "pthread_detach" >/dev/null 2>&1; then
11364   rm -rf conftest*
11365   ol_cv_pthread_version=10
11366 else
11367   rm -rf conftest*
11368   ol_cv_pthread_version=8
11369 fi
11370 rm -f conftest*
11371
11372 else
11373   echo "configure: failed program was:" >&5
11374   cat conftest.$ac_ext >&5
11375   rm -rf conftest*
11376   
11377         cat > conftest.$ac_ext <<EOF
11378 #line 11379 "configure"
11379 #include "confdefs.h"
11380
11381 #               include <pthread.h>
11382 #               ifdef PTHREAD_CREATE_UNDETACHED
11383                 draft7
11384 #               endif
11385         
11386 EOF
11387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11388   egrep "draft7" >/dev/null 2>&1; then
11389   rm -rf conftest*
11390   ol_cv_pthread_version=7
11391 else
11392   rm -rf conftest*
11393   
11394         cat > conftest.$ac_ext <<EOF
11395 #line 11396 "configure"
11396 #include "confdefs.h"
11397 #include <pthread.h>
11398 EOF
11399 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11400   egrep "pthread_attr_init" >/dev/null 2>&1; then
11401   rm -rf conftest*
11402   ol_cv_pthread_version=6
11403 else
11404   rm -rf conftest*
11405   
11406         cat > conftest.$ac_ext <<EOF
11407 #line 11408 "configure"
11408 #include "confdefs.h"
11409
11410 #               include <pthread.h>
11411 #ifdef          PTHREAD_MUTEX_INITIALIZER
11412                 draft5
11413 #endif
11414         
11415 EOF
11416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11417   egrep "draft5" >/dev/null 2>&1; then
11418   rm -rf conftest*
11419   ol_cv_pthread_version=5
11420 else
11421   rm -rf conftest*
11422   ol_cv_pthread_version=4
11423 fi
11424 rm -f conftest*
11425  
11426 fi
11427 rm -f conftest*
11428  
11429 fi
11430 rm -f conftest*
11431  
11432 fi
11433 rm -f conftest*
11434
11435 fi
11436
11437 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11438
11439
11440                 if test $ol_cv_pthread_version != 0 ; then
11441                         cat >> confdefs.h <<EOF
11442 #define HAVE_PTHREADS $ol_cv_pthread_version
11443 EOF
11444
11445                 else
11446                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11447                 fi
11448
11449                 # consider threads found
11450                 ol_with_threads=found
11451
11452                 
11453         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11454 echo "configure:11455: checking for LinuxThreads pthread.h" >&5
11455 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11456   echo $ac_n "(cached) $ac_c" 1>&6
11457 else
11458   cat > conftest.$ac_ext <<EOF
11459 #line 11460 "configure"
11460 #include "confdefs.h"
11461 #include <pthread.h>
11462 EOF
11463 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11464   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11465   rm -rf conftest*
11466   ol_cv_header_linux_threads=yes
11467 else
11468   rm -rf conftest*
11469   ol_cv_header_linux_threads=no
11470 fi
11471 rm -f conftest*
11472
11473                 
11474 fi
11475
11476 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11477         if test $ol_cv_header_linux_threads = yes; then
11478                 cat >> confdefs.h <<\EOF
11479 #define HAVE_LINUX_THREADS 1
11480 EOF
11481
11482         fi
11483
11484                 
11485         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11486 echo "configure:11487: checking for GNU Pth pthread.h" >&5
11487 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+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 #ifdef _POSIX_THREAD_IS_GNU_PTH
11495         __gnu_pth__;
11496 #endif
11497
11498 EOF
11499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11500   egrep "__gnu_pth__" >/dev/null 2>&1; then
11501   rm -rf conftest*
11502   ol_cv_header_gnu_pth_pthread_h=yes
11503 else
11504   rm -rf conftest*
11505   ol_cv_header_gnu_pth_pthread_h=no
11506 fi
11507 rm -f conftest*
11508
11509                 
11510 fi
11511
11512 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11513
11514
11515                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11516                         for ac_hdr in sched.h
11517 do
11518 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11519 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11520 echo "configure:11521: checking for $ac_hdr" >&5
11521 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11522   echo $ac_n "(cached) $ac_c" 1>&6
11523 else
11524   cat > conftest.$ac_ext <<EOF
11525 #line 11526 "configure"
11526 #include "confdefs.h"
11527 #include <$ac_hdr>
11528 EOF
11529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11530 { (eval echo configure:11531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11532 if test -z "$ac_err"; then
11533   rm -rf conftest*
11534   eval "ac_cv_header_$ac_safe=yes"
11535 else
11536   echo "$ac_err" >&5
11537   echo "configure: failed program was:" >&5
11538   cat conftest.$ac_ext >&5
11539   rm -rf conftest*
11540   eval "ac_cv_header_$ac_safe=no"
11541 fi
11542 rm -f conftest*
11543 fi
11544 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11545   echo "$ac_t""yes" 1>&6
11546     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11547   cat >> confdefs.h <<EOF
11548 #define $ac_tr_hdr 1
11549 EOF
11550  
11551 else
11552   echo "$ac_t""no" 1>&6
11553 fi
11554 done
11555
11556                 fi
11557
11558                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11559                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11560 echo "configure:11561: checking for pthread_create in default libraries" >&5
11561 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11562   echo $ac_n "(cached) $ac_c" 1>&6
11563 else
11564   
11565                 if test "$cross_compiling" = yes; then
11566   cat > conftest.$ac_ext <<EOF
11567 #line 11568 "configure"
11568 #include "confdefs.h"
11569 /* pthread test headers */
11570 #include <pthread.h>
11571 #if HAVE_PTHREADS < 7
11572 #include <errno.h>
11573 #endif
11574 #ifndef NULL
11575 #define NULL (void*)0
11576 #endif
11577
11578 static void *task(p)
11579         void *p;
11580 {
11581         return (void *) (p == NULL);
11582 }
11583
11584 int main() {
11585
11586         /* pthread test function */
11587 #ifndef PTHREAD_CREATE_DETACHED
11588 #define PTHREAD_CREATE_DETACHED 1
11589 #endif
11590         pthread_t t;
11591         int status;
11592         int detach = PTHREAD_CREATE_DETACHED;
11593
11594 #if HAVE_PTHREADS > 4
11595         /* Final pthreads */
11596         pthread_attr_t attr;
11597
11598         status = pthread_attr_init(&attr);
11599         if( status ) return status;
11600
11601 #if HAVE_PTHREADS < 7
11602         status = pthread_attr_setdetachstate(&attr, &detach);
11603         if( status < 0 ) status = errno;
11604 #else
11605         status = pthread_attr_setdetachstate(&attr, detach);
11606 #endif
11607         if( status ) return status;
11608         status = pthread_create( &t, &attr, task, NULL );
11609 #if HAVE_PTHREADS < 7
11610         if( status < 0 ) status = errno;
11611 #endif
11612         if( status ) return status;
11613 #else
11614         /* Draft 4 pthreads */
11615         status = pthread_create( &t, pthread_attr_default, task, NULL );
11616         if( status ) return errno;
11617
11618         /* give thread a chance to complete */
11619         /* it should remain joinable and hence detachable */
11620         sleep( 1 );
11621
11622         status = pthread_detach( &t );
11623         if( status ) return errno;
11624 #endif
11625
11626 #ifdef HAVE_LINUX_THREADS
11627         pthread_kill_other_threads_np();
11628 #endif
11629
11630         return 0;
11631
11632 ; return 0; }
11633 EOF
11634 if { (eval echo configure:11635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11635   rm -rf conftest*
11636   ol_cv_pthread_create=yes
11637 else
11638   echo "configure: failed program was:" >&5
11639   cat conftest.$ac_ext >&5
11640   rm -rf conftest*
11641   ol_cv_pthread_create=no
11642 fi
11643 rm -f conftest*
11644 else
11645   cat > conftest.$ac_ext <<EOF
11646 #line 11647 "configure"
11647 #include "confdefs.h"
11648 /* pthread test headers */
11649 #include <pthread.h>
11650 #if HAVE_PTHREADS < 7
11651 #include <errno.h>
11652 #endif
11653 #ifndef NULL
11654 #define NULL (void*)0
11655 #endif
11656
11657 static void *task(p)
11658         void *p;
11659 {
11660         return (void *) (p == NULL);
11661 }
11662
11663
11664 int main(argc, argv)
11665         int argc;
11666         char **argv;
11667 {
11668
11669         /* pthread test function */
11670 #ifndef PTHREAD_CREATE_DETACHED
11671 #define PTHREAD_CREATE_DETACHED 1
11672 #endif
11673         pthread_t t;
11674         int status;
11675         int detach = PTHREAD_CREATE_DETACHED;
11676
11677 #if HAVE_PTHREADS > 4
11678         /* Final pthreads */
11679         pthread_attr_t attr;
11680
11681         status = pthread_attr_init(&attr);
11682         if( status ) return status;
11683
11684 #if HAVE_PTHREADS < 7
11685         status = pthread_attr_setdetachstate(&attr, &detach);
11686         if( status < 0 ) status = errno;
11687 #else
11688         status = pthread_attr_setdetachstate(&attr, detach);
11689 #endif
11690         if( status ) return status;
11691         status = pthread_create( &t, &attr, task, NULL );
11692 #if HAVE_PTHREADS < 7
11693         if( status < 0 ) status = errno;
11694 #endif
11695         if( status ) return status;
11696 #else
11697         /* Draft 4 pthreads */
11698         status = pthread_create( &t, pthread_attr_default, task, NULL );
11699         if( status ) return errno;
11700
11701         /* give thread a chance to complete */
11702         /* it should remain joinable and hence detachable */
11703         sleep( 1 );
11704
11705         status = pthread_detach( &t );
11706         if( status ) return errno;
11707 #endif
11708
11709 #ifdef HAVE_LINUX_THREADS
11710         pthread_kill_other_threads_np();
11711 #endif
11712
11713         return 0;
11714
11715 }
11716
11717 EOF
11718 if { (eval echo configure:11719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11719 then
11720   ol_cv_pthread_create=yes
11721 else
11722   echo "configure: failed program was:" >&5
11723   cat conftest.$ac_ext >&5
11724   rm -fr conftest*
11725   ol_cv_pthread_create=no
11726 fi
11727 rm -fr conftest*
11728 fi
11729
11730 fi
11731
11732 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11733
11734                 if test $ol_cv_pthread_create != no ; then
11735                         ol_link_threads=posix
11736                         ol_link_pthreads=""
11737                 fi
11738                 
11739                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11740 if test "$ol_link_threads" = no ; then
11741         # try -kthread
11742         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11743 echo "configure:11744: checking for pthread link with -kthread" >&5
11744 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11745   echo $ac_n "(cached) $ac_c" 1>&6
11746 else
11747   
11748                 # save the flags
11749                 ol_LIBS="$LIBS"
11750                 LIBS="-kthread $LIBS"
11751
11752                 if test "$cross_compiling" = yes; then
11753   cat > conftest.$ac_ext <<EOF
11754 #line 11755 "configure"
11755 #include "confdefs.h"
11756 /* pthread test headers */
11757 #include <pthread.h>
11758 #if HAVE_PTHREADS < 7
11759 #include <errno.h>
11760 #endif
11761 #ifndef NULL
11762 #define NULL (void*)0
11763 #endif
11764
11765 static void *task(p)
11766         void *p;
11767 {
11768         return (void *) (p == NULL);
11769 }
11770
11771 int main() {
11772
11773         /* pthread test function */
11774 #ifndef PTHREAD_CREATE_DETACHED
11775 #define PTHREAD_CREATE_DETACHED 1
11776 #endif
11777         pthread_t t;
11778         int status;
11779         int detach = PTHREAD_CREATE_DETACHED;
11780
11781 #if HAVE_PTHREADS > 4
11782         /* Final pthreads */
11783         pthread_attr_t attr;
11784
11785         status = pthread_attr_init(&attr);
11786         if( status ) return status;
11787
11788 #if HAVE_PTHREADS < 7
11789         status = pthread_attr_setdetachstate(&attr, &detach);
11790         if( status < 0 ) status = errno;
11791 #else
11792         status = pthread_attr_setdetachstate(&attr, detach);
11793 #endif
11794         if( status ) return status;
11795         status = pthread_create( &t, &attr, task, NULL );
11796 #if HAVE_PTHREADS < 7
11797         if( status < 0 ) status = errno;
11798 #endif
11799         if( status ) return status;
11800 #else
11801         /* Draft 4 pthreads */
11802         status = pthread_create( &t, pthread_attr_default, task, NULL );
11803         if( status ) return errno;
11804
11805         /* give thread a chance to complete */
11806         /* it should remain joinable and hence detachable */
11807         sleep( 1 );
11808
11809         status = pthread_detach( &t );
11810         if( status ) return errno;
11811 #endif
11812
11813 #ifdef HAVE_LINUX_THREADS
11814         pthread_kill_other_threads_np();
11815 #endif
11816
11817         return 0;
11818
11819 ; return 0; }
11820 EOF
11821 if { (eval echo configure:11822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11822   rm -rf conftest*
11823   ol_cv_pthread_kthread=yes
11824 else
11825   echo "configure: failed program was:" >&5
11826   cat conftest.$ac_ext >&5
11827   rm -rf conftest*
11828   ol_cv_pthread_kthread=no
11829 fi
11830 rm -f conftest*
11831 else
11832   cat > conftest.$ac_ext <<EOF
11833 #line 11834 "configure"
11834 #include "confdefs.h"
11835 /* pthread test headers */
11836 #include <pthread.h>
11837 #if HAVE_PTHREADS < 7
11838 #include <errno.h>
11839 #endif
11840 #ifndef NULL
11841 #define NULL (void*)0
11842 #endif
11843
11844 static void *task(p)
11845         void *p;
11846 {
11847         return (void *) (p == NULL);
11848 }
11849
11850
11851 int main(argc, argv)
11852         int argc;
11853         char **argv;
11854 {
11855
11856         /* pthread test function */
11857 #ifndef PTHREAD_CREATE_DETACHED
11858 #define PTHREAD_CREATE_DETACHED 1
11859 #endif
11860         pthread_t t;
11861         int status;
11862         int detach = PTHREAD_CREATE_DETACHED;
11863
11864 #if HAVE_PTHREADS > 4
11865         /* Final pthreads */
11866         pthread_attr_t attr;
11867
11868         status = pthread_attr_init(&attr);
11869         if( status ) return status;
11870
11871 #if HAVE_PTHREADS < 7
11872         status = pthread_attr_setdetachstate(&attr, &detach);
11873         if( status < 0 ) status = errno;
11874 #else
11875         status = pthread_attr_setdetachstate(&attr, detach);
11876 #endif
11877         if( status ) return status;
11878         status = pthread_create( &t, &attr, task, NULL );
11879 #if HAVE_PTHREADS < 7
11880         if( status < 0 ) status = errno;
11881 #endif
11882         if( status ) return status;
11883 #else
11884         /* Draft 4 pthreads */
11885         status = pthread_create( &t, pthread_attr_default, task, NULL );
11886         if( status ) return errno;
11887
11888         /* give thread a chance to complete */
11889         /* it should remain joinable and hence detachable */
11890         sleep( 1 );
11891
11892         status = pthread_detach( &t );
11893         if( status ) return errno;
11894 #endif
11895
11896 #ifdef HAVE_LINUX_THREADS
11897         pthread_kill_other_threads_np();
11898 #endif
11899
11900         return 0;
11901
11902 }
11903
11904 EOF
11905 if { (eval echo configure:11906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11906 then
11907   ol_cv_pthread_kthread=yes
11908 else
11909   echo "configure: failed program was:" >&5
11910   cat conftest.$ac_ext >&5
11911   rm -fr conftest*
11912   ol_cv_pthread_kthread=no
11913 fi
11914 rm -fr conftest*
11915 fi
11916
11917
11918                 # restore the LIBS
11919                 LIBS="$ol_LIBS"
11920         
11921 fi
11922
11923 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11924
11925         if test $ol_cv_pthread_kthread = yes ; then
11926                 ol_link_pthreads="-kthread"
11927                 ol_link_threads=posix
11928         fi
11929 fi
11930
11931                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11932 if test "$ol_link_threads" = no ; then
11933         # try -pthread
11934         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11935 echo "configure:11936: checking for pthread link with -pthread" >&5
11936 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11937   echo $ac_n "(cached) $ac_c" 1>&6
11938 else
11939   
11940                 # save the flags
11941                 ol_LIBS="$LIBS"
11942                 LIBS="-pthread $LIBS"
11943
11944                 if test "$cross_compiling" = yes; then
11945   cat > conftest.$ac_ext <<EOF
11946 #line 11947 "configure"
11947 #include "confdefs.h"
11948 /* pthread test headers */
11949 #include <pthread.h>
11950 #if HAVE_PTHREADS < 7
11951 #include <errno.h>
11952 #endif
11953 #ifndef NULL
11954 #define NULL (void*)0
11955 #endif
11956
11957 static void *task(p)
11958         void *p;
11959 {
11960         return (void *) (p == NULL);
11961 }
11962
11963 int main() {
11964
11965         /* pthread test function */
11966 #ifndef PTHREAD_CREATE_DETACHED
11967 #define PTHREAD_CREATE_DETACHED 1
11968 #endif
11969         pthread_t t;
11970         int status;
11971         int detach = PTHREAD_CREATE_DETACHED;
11972
11973 #if HAVE_PTHREADS > 4
11974         /* Final pthreads */
11975         pthread_attr_t attr;
11976
11977         status = pthread_attr_init(&attr);
11978         if( status ) return status;
11979
11980 #if HAVE_PTHREADS < 7
11981         status = pthread_attr_setdetachstate(&attr, &detach);
11982         if( status < 0 ) status = errno;
11983 #else
11984         status = pthread_attr_setdetachstate(&attr, detach);
11985 #endif
11986         if( status ) return status;
11987         status = pthread_create( &t, &attr, task, NULL );
11988 #if HAVE_PTHREADS < 7
11989         if( status < 0 ) status = errno;
11990 #endif
11991         if( status ) return status;
11992 #else
11993         /* Draft 4 pthreads */
11994         status = pthread_create( &t, pthread_attr_default, task, NULL );
11995         if( status ) return errno;
11996
11997         /* give thread a chance to complete */
11998         /* it should remain joinable and hence detachable */
11999         sleep( 1 );
12000
12001         status = pthread_detach( &t );
12002         if( status ) return errno;
12003 #endif
12004
12005 #ifdef HAVE_LINUX_THREADS
12006         pthread_kill_other_threads_np();
12007 #endif
12008
12009         return 0;
12010
12011 ; return 0; }
12012 EOF
12013 if { (eval echo configure:12014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12014   rm -rf conftest*
12015   ol_cv_pthread_pthread=yes
12016 else
12017   echo "configure: failed program was:" >&5
12018   cat conftest.$ac_ext >&5
12019   rm -rf conftest*
12020   ol_cv_pthread_pthread=no
12021 fi
12022 rm -f conftest*
12023 else
12024   cat > conftest.$ac_ext <<EOF
12025 #line 12026 "configure"
12026 #include "confdefs.h"
12027 /* pthread test headers */
12028 #include <pthread.h>
12029 #if HAVE_PTHREADS < 7
12030 #include <errno.h>
12031 #endif
12032 #ifndef NULL
12033 #define NULL (void*)0
12034 #endif
12035
12036 static void *task(p)
12037         void *p;
12038 {
12039         return (void *) (p == NULL);
12040 }
12041
12042
12043 int main(argc, argv)
12044         int argc;
12045         char **argv;
12046 {
12047
12048         /* pthread test function */
12049 #ifndef PTHREAD_CREATE_DETACHED
12050 #define PTHREAD_CREATE_DETACHED 1
12051 #endif
12052         pthread_t t;
12053         int status;
12054         int detach = PTHREAD_CREATE_DETACHED;
12055
12056 #if HAVE_PTHREADS > 4
12057         /* Final pthreads */
12058         pthread_attr_t attr;
12059
12060         status = pthread_attr_init(&attr);
12061         if( status ) return status;
12062
12063 #if HAVE_PTHREADS < 7
12064         status = pthread_attr_setdetachstate(&attr, &detach);
12065         if( status < 0 ) status = errno;
12066 #else
12067         status = pthread_attr_setdetachstate(&attr, detach);
12068 #endif
12069         if( status ) return status;
12070         status = pthread_create( &t, &attr, task, NULL );
12071 #if HAVE_PTHREADS < 7
12072         if( status < 0 ) status = errno;
12073 #endif
12074         if( status ) return status;
12075 #else
12076         /* Draft 4 pthreads */
12077         status = pthread_create( &t, pthread_attr_default, task, NULL );
12078         if( status ) return errno;
12079
12080         /* give thread a chance to complete */
12081         /* it should remain joinable and hence detachable */
12082         sleep( 1 );
12083
12084         status = pthread_detach( &t );
12085         if( status ) return errno;
12086 #endif
12087
12088 #ifdef HAVE_LINUX_THREADS
12089         pthread_kill_other_threads_np();
12090 #endif
12091
12092         return 0;
12093
12094 }
12095
12096 EOF
12097 if { (eval echo configure:12098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12098 then
12099   ol_cv_pthread_pthread=yes
12100 else
12101   echo "configure: failed program was:" >&5
12102   cat conftest.$ac_ext >&5
12103   rm -fr conftest*
12104   ol_cv_pthread_pthread=no
12105 fi
12106 rm -fr conftest*
12107 fi
12108
12109
12110                 # restore the LIBS
12111                 LIBS="$ol_LIBS"
12112         
12113 fi
12114
12115 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12116
12117         if test $ol_cv_pthread_pthread = yes ; then
12118                 ol_link_pthreads="-pthread"
12119                 ol_link_threads=posix
12120         fi
12121 fi
12122
12123                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12124 if test "$ol_link_threads" = no ; then
12125         # try -pthreads
12126         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12127 echo "configure:12128: checking for pthread link with -pthreads" >&5
12128 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12129   echo $ac_n "(cached) $ac_c" 1>&6
12130 else
12131   
12132                 # save the flags
12133                 ol_LIBS="$LIBS"
12134                 LIBS="-pthreads $LIBS"
12135
12136                 if test "$cross_compiling" = yes; then
12137   cat > conftest.$ac_ext <<EOF
12138 #line 12139 "configure"
12139 #include "confdefs.h"
12140 /* pthread test headers */
12141 #include <pthread.h>
12142 #if HAVE_PTHREADS < 7
12143 #include <errno.h>
12144 #endif
12145 #ifndef NULL
12146 #define NULL (void*)0
12147 #endif
12148
12149 static void *task(p)
12150         void *p;
12151 {
12152         return (void *) (p == NULL);
12153 }
12154
12155 int main() {
12156
12157         /* pthread test function */
12158 #ifndef PTHREAD_CREATE_DETACHED
12159 #define PTHREAD_CREATE_DETACHED 1
12160 #endif
12161         pthread_t t;
12162         int status;
12163         int detach = PTHREAD_CREATE_DETACHED;
12164
12165 #if HAVE_PTHREADS > 4
12166         /* Final pthreads */
12167         pthread_attr_t attr;
12168
12169         status = pthread_attr_init(&attr);
12170         if( status ) return status;
12171
12172 #if HAVE_PTHREADS < 7
12173         status = pthread_attr_setdetachstate(&attr, &detach);
12174         if( status < 0 ) status = errno;
12175 #else
12176         status = pthread_attr_setdetachstate(&attr, detach);
12177 #endif
12178         if( status ) return status;
12179         status = pthread_create( &t, &attr, task, NULL );
12180 #if HAVE_PTHREADS < 7
12181         if( status < 0 ) status = errno;
12182 #endif
12183         if( status ) return status;
12184 #else
12185         /* Draft 4 pthreads */
12186         status = pthread_create( &t, pthread_attr_default, task, NULL );
12187         if( status ) return errno;
12188
12189         /* give thread a chance to complete */
12190         /* it should remain joinable and hence detachable */
12191         sleep( 1 );
12192
12193         status = pthread_detach( &t );
12194         if( status ) return errno;
12195 #endif
12196
12197 #ifdef HAVE_LINUX_THREADS
12198         pthread_kill_other_threads_np();
12199 #endif
12200
12201         return 0;
12202
12203 ; return 0; }
12204 EOF
12205 if { (eval echo configure:12206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12206   rm -rf conftest*
12207   ol_cv_pthread_pthreads=yes
12208 else
12209   echo "configure: failed program was:" >&5
12210   cat conftest.$ac_ext >&5
12211   rm -rf conftest*
12212   ol_cv_pthread_pthreads=no
12213 fi
12214 rm -f conftest*
12215 else
12216   cat > conftest.$ac_ext <<EOF
12217 #line 12218 "configure"
12218 #include "confdefs.h"
12219 /* pthread test headers */
12220 #include <pthread.h>
12221 #if HAVE_PTHREADS < 7
12222 #include <errno.h>
12223 #endif
12224 #ifndef NULL
12225 #define NULL (void*)0
12226 #endif
12227
12228 static void *task(p)
12229         void *p;
12230 {
12231         return (void *) (p == NULL);
12232 }
12233
12234
12235 int main(argc, argv)
12236         int argc;
12237         char **argv;
12238 {
12239
12240         /* pthread test function */
12241 #ifndef PTHREAD_CREATE_DETACHED
12242 #define PTHREAD_CREATE_DETACHED 1
12243 #endif
12244         pthread_t t;
12245         int status;
12246         int detach = PTHREAD_CREATE_DETACHED;
12247
12248 #if HAVE_PTHREADS > 4
12249         /* Final pthreads */
12250         pthread_attr_t attr;
12251
12252         status = pthread_attr_init(&attr);
12253         if( status ) return status;
12254
12255 #if HAVE_PTHREADS < 7
12256         status = pthread_attr_setdetachstate(&attr, &detach);
12257         if( status < 0 ) status = errno;
12258 #else
12259         status = pthread_attr_setdetachstate(&attr, detach);
12260 #endif
12261         if( status ) return status;
12262         status = pthread_create( &t, &attr, task, NULL );
12263 #if HAVE_PTHREADS < 7
12264         if( status < 0 ) status = errno;
12265 #endif
12266         if( status ) return status;
12267 #else
12268         /* Draft 4 pthreads */
12269         status = pthread_create( &t, pthread_attr_default, task, NULL );
12270         if( status ) return errno;
12271
12272         /* give thread a chance to complete */
12273         /* it should remain joinable and hence detachable */
12274         sleep( 1 );
12275
12276         status = pthread_detach( &t );
12277         if( status ) return errno;
12278 #endif
12279
12280 #ifdef HAVE_LINUX_THREADS
12281         pthread_kill_other_threads_np();
12282 #endif
12283
12284         return 0;
12285
12286 }
12287
12288 EOF
12289 if { (eval echo configure:12290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12290 then
12291   ol_cv_pthread_pthreads=yes
12292 else
12293   echo "configure: failed program was:" >&5
12294   cat conftest.$ac_ext >&5
12295   rm -fr conftest*
12296   ol_cv_pthread_pthreads=no
12297 fi
12298 rm -fr conftest*
12299 fi
12300
12301
12302                 # restore the LIBS
12303                 LIBS="$ol_LIBS"
12304         
12305 fi
12306
12307 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12308
12309         if test $ol_cv_pthread_pthreads = yes ; then
12310                 ol_link_pthreads="-pthreads"
12311                 ol_link_threads=posix
12312         fi
12313 fi
12314
12315                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12316 if test "$ol_link_threads" = no ; then
12317         # try -mthreads
12318         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12319 echo "configure:12320: checking for pthread link with -mthreads" >&5
12320 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12321   echo $ac_n "(cached) $ac_c" 1>&6
12322 else
12323   
12324                 # save the flags
12325                 ol_LIBS="$LIBS"
12326                 LIBS="-mthreads $LIBS"
12327
12328                 if test "$cross_compiling" = yes; then
12329   cat > conftest.$ac_ext <<EOF
12330 #line 12331 "configure"
12331 #include "confdefs.h"
12332 /* pthread test headers */
12333 #include <pthread.h>
12334 #if HAVE_PTHREADS < 7
12335 #include <errno.h>
12336 #endif
12337 #ifndef NULL
12338 #define NULL (void*)0
12339 #endif
12340
12341 static void *task(p)
12342         void *p;
12343 {
12344         return (void *) (p == NULL);
12345 }
12346
12347 int main() {
12348
12349         /* pthread test function */
12350 #ifndef PTHREAD_CREATE_DETACHED
12351 #define PTHREAD_CREATE_DETACHED 1
12352 #endif
12353         pthread_t t;
12354         int status;
12355         int detach = PTHREAD_CREATE_DETACHED;
12356
12357 #if HAVE_PTHREADS > 4
12358         /* Final pthreads */
12359         pthread_attr_t attr;
12360
12361         status = pthread_attr_init(&attr);
12362         if( status ) return status;
12363
12364 #if HAVE_PTHREADS < 7
12365         status = pthread_attr_setdetachstate(&attr, &detach);
12366         if( status < 0 ) status = errno;
12367 #else
12368         status = pthread_attr_setdetachstate(&attr, detach);
12369 #endif
12370         if( status ) return status;
12371         status = pthread_create( &t, &attr, task, NULL );
12372 #if HAVE_PTHREADS < 7
12373         if( status < 0 ) status = errno;
12374 #endif
12375         if( status ) return status;
12376 #else
12377         /* Draft 4 pthreads */
12378         status = pthread_create( &t, pthread_attr_default, task, NULL );
12379         if( status ) return errno;
12380
12381         /* give thread a chance to complete */
12382         /* it should remain joinable and hence detachable */
12383         sleep( 1 );
12384
12385         status = pthread_detach( &t );
12386         if( status ) return errno;
12387 #endif
12388
12389 #ifdef HAVE_LINUX_THREADS
12390         pthread_kill_other_threads_np();
12391 #endif
12392
12393         return 0;
12394
12395 ; return 0; }
12396 EOF
12397 if { (eval echo configure:12398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12398   rm -rf conftest*
12399   ol_cv_pthread_mthreads=yes
12400 else
12401   echo "configure: failed program was:" >&5
12402   cat conftest.$ac_ext >&5
12403   rm -rf conftest*
12404   ol_cv_pthread_mthreads=no
12405 fi
12406 rm -f conftest*
12407 else
12408   cat > conftest.$ac_ext <<EOF
12409 #line 12410 "configure"
12410 #include "confdefs.h"
12411 /* pthread test headers */
12412 #include <pthread.h>
12413 #if HAVE_PTHREADS < 7
12414 #include <errno.h>
12415 #endif
12416 #ifndef NULL
12417 #define NULL (void*)0
12418 #endif
12419
12420 static void *task(p)
12421         void *p;
12422 {
12423         return (void *) (p == NULL);
12424 }
12425
12426
12427 int main(argc, argv)
12428         int argc;
12429         char **argv;
12430 {
12431
12432         /* pthread test function */
12433 #ifndef PTHREAD_CREATE_DETACHED
12434 #define PTHREAD_CREATE_DETACHED 1
12435 #endif
12436         pthread_t t;
12437         int status;
12438         int detach = PTHREAD_CREATE_DETACHED;
12439
12440 #if HAVE_PTHREADS > 4
12441         /* Final pthreads */
12442         pthread_attr_t attr;
12443
12444         status = pthread_attr_init(&attr);
12445         if( status ) return status;
12446
12447 #if HAVE_PTHREADS < 7
12448         status = pthread_attr_setdetachstate(&attr, &detach);
12449         if( status < 0 ) status = errno;
12450 #else
12451         status = pthread_attr_setdetachstate(&attr, detach);
12452 #endif
12453         if( status ) return status;
12454         status = pthread_create( &t, &attr, task, NULL );
12455 #if HAVE_PTHREADS < 7
12456         if( status < 0 ) status = errno;
12457 #endif
12458         if( status ) return status;
12459 #else
12460         /* Draft 4 pthreads */
12461         status = pthread_create( &t, pthread_attr_default, task, NULL );
12462         if( status ) return errno;
12463
12464         /* give thread a chance to complete */
12465         /* it should remain joinable and hence detachable */
12466         sleep( 1 );
12467
12468         status = pthread_detach( &t );
12469         if( status ) return errno;
12470 #endif
12471
12472 #ifdef HAVE_LINUX_THREADS
12473         pthread_kill_other_threads_np();
12474 #endif
12475
12476         return 0;
12477
12478 }
12479
12480 EOF
12481 if { (eval echo configure:12482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12482 then
12483   ol_cv_pthread_mthreads=yes
12484 else
12485   echo "configure: failed program was:" >&5
12486   cat conftest.$ac_ext >&5
12487   rm -fr conftest*
12488   ol_cv_pthread_mthreads=no
12489 fi
12490 rm -fr conftest*
12491 fi
12492
12493
12494                 # restore the LIBS
12495                 LIBS="$ol_LIBS"
12496         
12497 fi
12498
12499 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12500
12501         if test $ol_cv_pthread_mthreads = yes ; then
12502                 ol_link_pthreads="-mthreads"
12503                 ol_link_threads=posix
12504         fi
12505 fi
12506
12507                 # Pthread try link: -thread (ol_cv_pthread_thread)
12508 if test "$ol_link_threads" = no ; then
12509         # try -thread
12510         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12511 echo "configure:12512: checking for pthread link with -thread" >&5
12512 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12513   echo $ac_n "(cached) $ac_c" 1>&6
12514 else
12515   
12516                 # save the flags
12517                 ol_LIBS="$LIBS"
12518                 LIBS="-thread $LIBS"
12519
12520                 if test "$cross_compiling" = yes; then
12521   cat > conftest.$ac_ext <<EOF
12522 #line 12523 "configure"
12523 #include "confdefs.h"
12524 /* pthread test headers */
12525 #include <pthread.h>
12526 #if HAVE_PTHREADS < 7
12527 #include <errno.h>
12528 #endif
12529 #ifndef NULL
12530 #define NULL (void*)0
12531 #endif
12532
12533 static void *task(p)
12534         void *p;
12535 {
12536         return (void *) (p == NULL);
12537 }
12538
12539 int main() {
12540
12541         /* pthread test function */
12542 #ifndef PTHREAD_CREATE_DETACHED
12543 #define PTHREAD_CREATE_DETACHED 1
12544 #endif
12545         pthread_t t;
12546         int status;
12547         int detach = PTHREAD_CREATE_DETACHED;
12548
12549 #if HAVE_PTHREADS > 4
12550         /* Final pthreads */
12551         pthread_attr_t attr;
12552
12553         status = pthread_attr_init(&attr);
12554         if( status ) return status;
12555
12556 #if HAVE_PTHREADS < 7
12557         status = pthread_attr_setdetachstate(&attr, &detach);
12558         if( status < 0 ) status = errno;
12559 #else
12560         status = pthread_attr_setdetachstate(&attr, detach);
12561 #endif
12562         if( status ) return status;
12563         status = pthread_create( &t, &attr, task, NULL );
12564 #if HAVE_PTHREADS < 7
12565         if( status < 0 ) status = errno;
12566 #endif
12567         if( status ) return status;
12568 #else
12569         /* Draft 4 pthreads */
12570         status = pthread_create( &t, pthread_attr_default, task, NULL );
12571         if( status ) return errno;
12572
12573         /* give thread a chance to complete */
12574         /* it should remain joinable and hence detachable */
12575         sleep( 1 );
12576
12577         status = pthread_detach( &t );
12578         if( status ) return errno;
12579 #endif
12580
12581 #ifdef HAVE_LINUX_THREADS
12582         pthread_kill_other_threads_np();
12583 #endif
12584
12585         return 0;
12586
12587 ; return 0; }
12588 EOF
12589 if { (eval echo configure:12590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12590   rm -rf conftest*
12591   ol_cv_pthread_thread=yes
12592 else
12593   echo "configure: failed program was:" >&5
12594   cat conftest.$ac_ext >&5
12595   rm -rf conftest*
12596   ol_cv_pthread_thread=no
12597 fi
12598 rm -f conftest*
12599 else
12600   cat > conftest.$ac_ext <<EOF
12601 #line 12602 "configure"
12602 #include "confdefs.h"
12603 /* pthread test headers */
12604 #include <pthread.h>
12605 #if HAVE_PTHREADS < 7
12606 #include <errno.h>
12607 #endif
12608 #ifndef NULL
12609 #define NULL (void*)0
12610 #endif
12611
12612 static void *task(p)
12613         void *p;
12614 {
12615         return (void *) (p == NULL);
12616 }
12617
12618
12619 int main(argc, argv)
12620         int argc;
12621         char **argv;
12622 {
12623
12624         /* pthread test function */
12625 #ifndef PTHREAD_CREATE_DETACHED
12626 #define PTHREAD_CREATE_DETACHED 1
12627 #endif
12628         pthread_t t;
12629         int status;
12630         int detach = PTHREAD_CREATE_DETACHED;
12631
12632 #if HAVE_PTHREADS > 4
12633         /* Final pthreads */
12634         pthread_attr_t attr;
12635
12636         status = pthread_attr_init(&attr);
12637         if( status ) return status;
12638
12639 #if HAVE_PTHREADS < 7
12640         status = pthread_attr_setdetachstate(&attr, &detach);
12641         if( status < 0 ) status = errno;
12642 #else
12643         status = pthread_attr_setdetachstate(&attr, detach);
12644 #endif
12645         if( status ) return status;
12646         status = pthread_create( &t, &attr, task, NULL );
12647 #if HAVE_PTHREADS < 7
12648         if( status < 0 ) status = errno;
12649 #endif
12650         if( status ) return status;
12651 #else
12652         /* Draft 4 pthreads */
12653         status = pthread_create( &t, pthread_attr_default, task, NULL );
12654         if( status ) return errno;
12655
12656         /* give thread a chance to complete */
12657         /* it should remain joinable and hence detachable */
12658         sleep( 1 );
12659
12660         status = pthread_detach( &t );
12661         if( status ) return errno;
12662 #endif
12663
12664 #ifdef HAVE_LINUX_THREADS
12665         pthread_kill_other_threads_np();
12666 #endif
12667
12668         return 0;
12669
12670 }
12671
12672 EOF
12673 if { (eval echo configure:12674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12674 then
12675   ol_cv_pthread_thread=yes
12676 else
12677   echo "configure: failed program was:" >&5
12678   cat conftest.$ac_ext >&5
12679   rm -fr conftest*
12680   ol_cv_pthread_thread=no
12681 fi
12682 rm -fr conftest*
12683 fi
12684
12685
12686                 # restore the LIBS
12687                 LIBS="$ol_LIBS"
12688         
12689 fi
12690
12691 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12692
12693         if test $ol_cv_pthread_thread = yes ; then
12694                 ol_link_pthreads="-thread"
12695                 ol_link_threads=posix
12696         fi
12697 fi
12698
12699
12700                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12701 if test "$ol_link_threads" = no ; then
12702         # try -lpthread -lmach -lexc -lc_r
12703         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12704 echo "configure:12705: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12705 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12706   echo $ac_n "(cached) $ac_c" 1>&6
12707 else
12708   
12709                 # save the flags
12710                 ol_LIBS="$LIBS"
12711                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12712
12713                 if test "$cross_compiling" = yes; then
12714   cat > conftest.$ac_ext <<EOF
12715 #line 12716 "configure"
12716 #include "confdefs.h"
12717 /* pthread test headers */
12718 #include <pthread.h>
12719 #if HAVE_PTHREADS < 7
12720 #include <errno.h>
12721 #endif
12722 #ifndef NULL
12723 #define NULL (void*)0
12724 #endif
12725
12726 static void *task(p)
12727         void *p;
12728 {
12729         return (void *) (p == NULL);
12730 }
12731
12732 int main() {
12733
12734         /* pthread test function */
12735 #ifndef PTHREAD_CREATE_DETACHED
12736 #define PTHREAD_CREATE_DETACHED 1
12737 #endif
12738         pthread_t t;
12739         int status;
12740         int detach = PTHREAD_CREATE_DETACHED;
12741
12742 #if HAVE_PTHREADS > 4
12743         /* Final pthreads */
12744         pthread_attr_t attr;
12745
12746         status = pthread_attr_init(&attr);
12747         if( status ) return status;
12748
12749 #if HAVE_PTHREADS < 7
12750         status = pthread_attr_setdetachstate(&attr, &detach);
12751         if( status < 0 ) status = errno;
12752 #else
12753         status = pthread_attr_setdetachstate(&attr, detach);
12754 #endif
12755         if( status ) return status;
12756         status = pthread_create( &t, &attr, task, NULL );
12757 #if HAVE_PTHREADS < 7
12758         if( status < 0 ) status = errno;
12759 #endif
12760         if( status ) return status;
12761 #else
12762         /* Draft 4 pthreads */
12763         status = pthread_create( &t, pthread_attr_default, task, NULL );
12764         if( status ) return errno;
12765
12766         /* give thread a chance to complete */
12767         /* it should remain joinable and hence detachable */
12768         sleep( 1 );
12769
12770         status = pthread_detach( &t );
12771         if( status ) return errno;
12772 #endif
12773
12774 #ifdef HAVE_LINUX_THREADS
12775         pthread_kill_other_threads_np();
12776 #endif
12777
12778         return 0;
12779
12780 ; return 0; }
12781 EOF
12782 if { (eval echo configure:12783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12783   rm -rf conftest*
12784   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12785 else
12786   echo "configure: failed program was:" >&5
12787   cat conftest.$ac_ext >&5
12788   rm -rf conftest*
12789   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12790 fi
12791 rm -f conftest*
12792 else
12793   cat > conftest.$ac_ext <<EOF
12794 #line 12795 "configure"
12795 #include "confdefs.h"
12796 /* pthread test headers */
12797 #include <pthread.h>
12798 #if HAVE_PTHREADS < 7
12799 #include <errno.h>
12800 #endif
12801 #ifndef NULL
12802 #define NULL (void*)0
12803 #endif
12804
12805 static void *task(p)
12806         void *p;
12807 {
12808         return (void *) (p == NULL);
12809 }
12810
12811
12812 int main(argc, argv)
12813         int argc;
12814         char **argv;
12815 {
12816
12817         /* pthread test function */
12818 #ifndef PTHREAD_CREATE_DETACHED
12819 #define PTHREAD_CREATE_DETACHED 1
12820 #endif
12821         pthread_t t;
12822         int status;
12823         int detach = PTHREAD_CREATE_DETACHED;
12824
12825 #if HAVE_PTHREADS > 4
12826         /* Final pthreads */
12827         pthread_attr_t attr;
12828
12829         status = pthread_attr_init(&attr);
12830         if( status ) return status;
12831
12832 #if HAVE_PTHREADS < 7
12833         status = pthread_attr_setdetachstate(&attr, &detach);
12834         if( status < 0 ) status = errno;
12835 #else
12836         status = pthread_attr_setdetachstate(&attr, detach);
12837 #endif
12838         if( status ) return status;
12839         status = pthread_create( &t, &attr, task, NULL );
12840 #if HAVE_PTHREADS < 7
12841         if( status < 0 ) status = errno;
12842 #endif
12843         if( status ) return status;
12844 #else
12845         /* Draft 4 pthreads */
12846         status = pthread_create( &t, pthread_attr_default, task, NULL );
12847         if( status ) return errno;
12848
12849         /* give thread a chance to complete */
12850         /* it should remain joinable and hence detachable */
12851         sleep( 1 );
12852
12853         status = pthread_detach( &t );
12854         if( status ) return errno;
12855 #endif
12856
12857 #ifdef HAVE_LINUX_THREADS
12858         pthread_kill_other_threads_np();
12859 #endif
12860
12861         return 0;
12862
12863 }
12864
12865 EOF
12866 if { (eval echo configure:12867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12867 then
12868   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12869 else
12870   echo "configure: failed program was:" >&5
12871   cat conftest.$ac_ext >&5
12872   rm -fr conftest*
12873   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12874 fi
12875 rm -fr conftest*
12876 fi
12877
12878
12879                 # restore the LIBS
12880                 LIBS="$ol_LIBS"
12881         
12882 fi
12883
12884 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12885
12886         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12887                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12888                 ol_link_threads=posix
12889         fi
12890 fi
12891
12892                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12893 if test "$ol_link_threads" = no ; then
12894         # try -lpthread -lmach -lexc
12895         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12896 echo "configure:12897: checking for pthread link with -lpthread -lmach -lexc" >&5
12897 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12898   echo $ac_n "(cached) $ac_c" 1>&6
12899 else
12900   
12901                 # save the flags
12902                 ol_LIBS="$LIBS"
12903                 LIBS="-lpthread -lmach -lexc $LIBS"
12904
12905                 if test "$cross_compiling" = yes; then
12906   cat > conftest.$ac_ext <<EOF
12907 #line 12908 "configure"
12908 #include "confdefs.h"
12909 /* pthread test headers */
12910 #include <pthread.h>
12911 #if HAVE_PTHREADS < 7
12912 #include <errno.h>
12913 #endif
12914 #ifndef NULL
12915 #define NULL (void*)0
12916 #endif
12917
12918 static void *task(p)
12919         void *p;
12920 {
12921         return (void *) (p == NULL);
12922 }
12923
12924 int main() {
12925
12926         /* pthread test function */
12927 #ifndef PTHREAD_CREATE_DETACHED
12928 #define PTHREAD_CREATE_DETACHED 1
12929 #endif
12930         pthread_t t;
12931         int status;
12932         int detach = PTHREAD_CREATE_DETACHED;
12933
12934 #if HAVE_PTHREADS > 4
12935         /* Final pthreads */
12936         pthread_attr_t attr;
12937
12938         status = pthread_attr_init(&attr);
12939         if( status ) return status;
12940
12941 #if HAVE_PTHREADS < 7
12942         status = pthread_attr_setdetachstate(&attr, &detach);
12943         if( status < 0 ) status = errno;
12944 #else
12945         status = pthread_attr_setdetachstate(&attr, detach);
12946 #endif
12947         if( status ) return status;
12948         status = pthread_create( &t, &attr, task, NULL );
12949 #if HAVE_PTHREADS < 7
12950         if( status < 0 ) status = errno;
12951 #endif
12952         if( status ) return status;
12953 #else
12954         /* Draft 4 pthreads */
12955         status = pthread_create( &t, pthread_attr_default, task, NULL );
12956         if( status ) return errno;
12957
12958         /* give thread a chance to complete */
12959         /* it should remain joinable and hence detachable */
12960         sleep( 1 );
12961
12962         status = pthread_detach( &t );
12963         if( status ) return errno;
12964 #endif
12965
12966 #ifdef HAVE_LINUX_THREADS
12967         pthread_kill_other_threads_np();
12968 #endif
12969
12970         return 0;
12971
12972 ; return 0; }
12973 EOF
12974 if { (eval echo configure:12975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12975   rm -rf conftest*
12976   ol_cv_pthread_lpthread_lmach_lexc=yes
12977 else
12978   echo "configure: failed program was:" >&5
12979   cat conftest.$ac_ext >&5
12980   rm -rf conftest*
12981   ol_cv_pthread_lpthread_lmach_lexc=no
12982 fi
12983 rm -f conftest*
12984 else
12985   cat > conftest.$ac_ext <<EOF
12986 #line 12987 "configure"
12987 #include "confdefs.h"
12988 /* pthread test headers */
12989 #include <pthread.h>
12990 #if HAVE_PTHREADS < 7
12991 #include <errno.h>
12992 #endif
12993 #ifndef NULL
12994 #define NULL (void*)0
12995 #endif
12996
12997 static void *task(p)
12998         void *p;
12999 {
13000         return (void *) (p == NULL);
13001 }
13002
13003
13004 int main(argc, argv)
13005         int argc;
13006         char **argv;
13007 {
13008
13009         /* pthread test function */
13010 #ifndef PTHREAD_CREATE_DETACHED
13011 #define PTHREAD_CREATE_DETACHED 1
13012 #endif
13013         pthread_t t;
13014         int status;
13015         int detach = PTHREAD_CREATE_DETACHED;
13016
13017 #if HAVE_PTHREADS > 4
13018         /* Final pthreads */
13019         pthread_attr_t attr;
13020
13021         status = pthread_attr_init(&attr);
13022         if( status ) return status;
13023
13024 #if HAVE_PTHREADS < 7
13025         status = pthread_attr_setdetachstate(&attr, &detach);
13026         if( status < 0 ) status = errno;
13027 #else
13028         status = pthread_attr_setdetachstate(&attr, detach);
13029 #endif
13030         if( status ) return status;
13031         status = pthread_create( &t, &attr, task, NULL );
13032 #if HAVE_PTHREADS < 7
13033         if( status < 0 ) status = errno;
13034 #endif
13035         if( status ) return status;
13036 #else
13037         /* Draft 4 pthreads */
13038         status = pthread_create( &t, pthread_attr_default, task, NULL );
13039         if( status ) return errno;
13040
13041         /* give thread a chance to complete */
13042         /* it should remain joinable and hence detachable */
13043         sleep( 1 );
13044
13045         status = pthread_detach( &t );
13046         if( status ) return errno;
13047 #endif
13048
13049 #ifdef HAVE_LINUX_THREADS
13050         pthread_kill_other_threads_np();
13051 #endif
13052
13053         return 0;
13054
13055 }
13056
13057 EOF
13058 if { (eval echo configure:13059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13059 then
13060   ol_cv_pthread_lpthread_lmach_lexc=yes
13061 else
13062   echo "configure: failed program was:" >&5
13063   cat conftest.$ac_ext >&5
13064   rm -fr conftest*
13065   ol_cv_pthread_lpthread_lmach_lexc=no
13066 fi
13067 rm -fr conftest*
13068 fi
13069
13070
13071                 # restore the LIBS
13072                 LIBS="$ol_LIBS"
13073         
13074 fi
13075
13076 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13077
13078         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13079                 ol_link_pthreads="-lpthread -lmach -lexc"
13080                 ol_link_threads=posix
13081         fi
13082 fi
13083
13084
13085                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13086 if test "$ol_link_threads" = no ; then
13087         # try -lpthread -Wl,-woff,85
13088         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13089 echo "configure:13090: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13090 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13091   echo $ac_n "(cached) $ac_c" 1>&6
13092 else
13093   
13094                 # save the flags
13095                 ol_LIBS="$LIBS"
13096                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13097
13098                 if test "$cross_compiling" = yes; then
13099   cat > conftest.$ac_ext <<EOF
13100 #line 13101 "configure"
13101 #include "confdefs.h"
13102 /* pthread test headers */
13103 #include <pthread.h>
13104 #if HAVE_PTHREADS < 7
13105 #include <errno.h>
13106 #endif
13107 #ifndef NULL
13108 #define NULL (void*)0
13109 #endif
13110
13111 static void *task(p)
13112         void *p;
13113 {
13114         return (void *) (p == NULL);
13115 }
13116
13117 int main() {
13118
13119         /* pthread test function */
13120 #ifndef PTHREAD_CREATE_DETACHED
13121 #define PTHREAD_CREATE_DETACHED 1
13122 #endif
13123         pthread_t t;
13124         int status;
13125         int detach = PTHREAD_CREATE_DETACHED;
13126
13127 #if HAVE_PTHREADS > 4
13128         /* Final pthreads */
13129         pthread_attr_t attr;
13130
13131         status = pthread_attr_init(&attr);
13132         if( status ) return status;
13133
13134 #if HAVE_PTHREADS < 7
13135         status = pthread_attr_setdetachstate(&attr, &detach);
13136         if( status < 0 ) status = errno;
13137 #else
13138         status = pthread_attr_setdetachstate(&attr, detach);
13139 #endif
13140         if( status ) return status;
13141         status = pthread_create( &t, &attr, task, NULL );
13142 #if HAVE_PTHREADS < 7
13143         if( status < 0 ) status = errno;
13144 #endif
13145         if( status ) return status;
13146 #else
13147         /* Draft 4 pthreads */
13148         status = pthread_create( &t, pthread_attr_default, task, NULL );
13149         if( status ) return errno;
13150
13151         /* give thread a chance to complete */
13152         /* it should remain joinable and hence detachable */
13153         sleep( 1 );
13154
13155         status = pthread_detach( &t );
13156         if( status ) return errno;
13157 #endif
13158
13159 #ifdef HAVE_LINUX_THREADS
13160         pthread_kill_other_threads_np();
13161 #endif
13162
13163         return 0;
13164
13165 ; return 0; }
13166 EOF
13167 if { (eval echo configure:13168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13168   rm -rf conftest*
13169   ol_cv_pthread_lib_lpthread_woff=yes
13170 else
13171   echo "configure: failed program was:" >&5
13172   cat conftest.$ac_ext >&5
13173   rm -rf conftest*
13174   ol_cv_pthread_lib_lpthread_woff=no
13175 fi
13176 rm -f conftest*
13177 else
13178   cat > conftest.$ac_ext <<EOF
13179 #line 13180 "configure"
13180 #include "confdefs.h"
13181 /* pthread test headers */
13182 #include <pthread.h>
13183 #if HAVE_PTHREADS < 7
13184 #include <errno.h>
13185 #endif
13186 #ifndef NULL
13187 #define NULL (void*)0
13188 #endif
13189
13190 static void *task(p)
13191         void *p;
13192 {
13193         return (void *) (p == NULL);
13194 }
13195
13196
13197 int main(argc, argv)
13198         int argc;
13199         char **argv;
13200 {
13201
13202         /* pthread test function */
13203 #ifndef PTHREAD_CREATE_DETACHED
13204 #define PTHREAD_CREATE_DETACHED 1
13205 #endif
13206         pthread_t t;
13207         int status;
13208         int detach = PTHREAD_CREATE_DETACHED;
13209
13210 #if HAVE_PTHREADS > 4
13211         /* Final pthreads */
13212         pthread_attr_t attr;
13213
13214         status = pthread_attr_init(&attr);
13215         if( status ) return status;
13216
13217 #if HAVE_PTHREADS < 7
13218         status = pthread_attr_setdetachstate(&attr, &detach);
13219         if( status < 0 ) status = errno;
13220 #else
13221         status = pthread_attr_setdetachstate(&attr, detach);
13222 #endif
13223         if( status ) return status;
13224         status = pthread_create( &t, &attr, task, NULL );
13225 #if HAVE_PTHREADS < 7
13226         if( status < 0 ) status = errno;
13227 #endif
13228         if( status ) return status;
13229 #else
13230         /* Draft 4 pthreads */
13231         status = pthread_create( &t, pthread_attr_default, task, NULL );
13232         if( status ) return errno;
13233
13234         /* give thread a chance to complete */
13235         /* it should remain joinable and hence detachable */
13236         sleep( 1 );
13237
13238         status = pthread_detach( &t );
13239         if( status ) return errno;
13240 #endif
13241
13242 #ifdef HAVE_LINUX_THREADS
13243         pthread_kill_other_threads_np();
13244 #endif
13245
13246         return 0;
13247
13248 }
13249
13250 EOF
13251 if { (eval echo configure:13252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13252 then
13253   ol_cv_pthread_lib_lpthread_woff=yes
13254 else
13255   echo "configure: failed program was:" >&5
13256   cat conftest.$ac_ext >&5
13257   rm -fr conftest*
13258   ol_cv_pthread_lib_lpthread_woff=no
13259 fi
13260 rm -fr conftest*
13261 fi
13262
13263
13264                 # restore the LIBS
13265                 LIBS="$ol_LIBS"
13266         
13267 fi
13268
13269 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13270
13271         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13272                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13273                 ol_link_threads=posix
13274         fi
13275 fi
13276
13277
13278                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13279 if test "$ol_link_threads" = no ; then
13280         # try -lpthread
13281         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13282 echo "configure:13283: checking for pthread link with -lpthread" >&5
13283 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13284   echo $ac_n "(cached) $ac_c" 1>&6
13285 else
13286   
13287                 # save the flags
13288                 ol_LIBS="$LIBS"
13289                 LIBS="-lpthread $LIBS"
13290
13291                 if test "$cross_compiling" = yes; then
13292   cat > conftest.$ac_ext <<EOF
13293 #line 13294 "configure"
13294 #include "confdefs.h"
13295 /* pthread test headers */
13296 #include <pthread.h>
13297 #if HAVE_PTHREADS < 7
13298 #include <errno.h>
13299 #endif
13300 #ifndef NULL
13301 #define NULL (void*)0
13302 #endif
13303
13304 static void *task(p)
13305         void *p;
13306 {
13307         return (void *) (p == NULL);
13308 }
13309
13310 int main() {
13311
13312         /* pthread test function */
13313 #ifndef PTHREAD_CREATE_DETACHED
13314 #define PTHREAD_CREATE_DETACHED 1
13315 #endif
13316         pthread_t t;
13317         int status;
13318         int detach = PTHREAD_CREATE_DETACHED;
13319
13320 #if HAVE_PTHREADS > 4
13321         /* Final pthreads */
13322         pthread_attr_t attr;
13323
13324         status = pthread_attr_init(&attr);
13325         if( status ) return status;
13326
13327 #if HAVE_PTHREADS < 7
13328         status = pthread_attr_setdetachstate(&attr, &detach);
13329         if( status < 0 ) status = errno;
13330 #else
13331         status = pthread_attr_setdetachstate(&attr, detach);
13332 #endif
13333         if( status ) return status;
13334         status = pthread_create( &t, &attr, task, NULL );
13335 #if HAVE_PTHREADS < 7
13336         if( status < 0 ) status = errno;
13337 #endif
13338         if( status ) return status;
13339 #else
13340         /* Draft 4 pthreads */
13341         status = pthread_create( &t, pthread_attr_default, task, NULL );
13342         if( status ) return errno;
13343
13344         /* give thread a chance to complete */
13345         /* it should remain joinable and hence detachable */
13346         sleep( 1 );
13347
13348         status = pthread_detach( &t );
13349         if( status ) return errno;
13350 #endif
13351
13352 #ifdef HAVE_LINUX_THREADS
13353         pthread_kill_other_threads_np();
13354 #endif
13355
13356         return 0;
13357
13358 ; return 0; }
13359 EOF
13360 if { (eval echo configure:13361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13361   rm -rf conftest*
13362   ol_cv_pthread_lpthread=yes
13363 else
13364   echo "configure: failed program was:" >&5
13365   cat conftest.$ac_ext >&5
13366   rm -rf conftest*
13367   ol_cv_pthread_lpthread=no
13368 fi
13369 rm -f conftest*
13370 else
13371   cat > conftest.$ac_ext <<EOF
13372 #line 13373 "configure"
13373 #include "confdefs.h"
13374 /* pthread test headers */
13375 #include <pthread.h>
13376 #if HAVE_PTHREADS < 7
13377 #include <errno.h>
13378 #endif
13379 #ifndef NULL
13380 #define NULL (void*)0
13381 #endif
13382
13383 static void *task(p)
13384         void *p;
13385 {
13386         return (void *) (p == NULL);
13387 }
13388
13389
13390 int main(argc, argv)
13391         int argc;
13392         char **argv;
13393 {
13394
13395         /* pthread test function */
13396 #ifndef PTHREAD_CREATE_DETACHED
13397 #define PTHREAD_CREATE_DETACHED 1
13398 #endif
13399         pthread_t t;
13400         int status;
13401         int detach = PTHREAD_CREATE_DETACHED;
13402
13403 #if HAVE_PTHREADS > 4
13404         /* Final pthreads */
13405         pthread_attr_t attr;
13406
13407         status = pthread_attr_init(&attr);
13408         if( status ) return status;
13409
13410 #if HAVE_PTHREADS < 7
13411         status = pthread_attr_setdetachstate(&attr, &detach);
13412         if( status < 0 ) status = errno;
13413 #else
13414         status = pthread_attr_setdetachstate(&attr, detach);
13415 #endif
13416         if( status ) return status;
13417         status = pthread_create( &t, &attr, task, NULL );
13418 #if HAVE_PTHREADS < 7
13419         if( status < 0 ) status = errno;
13420 #endif
13421         if( status ) return status;
13422 #else
13423         /* Draft 4 pthreads */
13424         status = pthread_create( &t, pthread_attr_default, task, NULL );
13425         if( status ) return errno;
13426
13427         /* give thread a chance to complete */
13428         /* it should remain joinable and hence detachable */
13429         sleep( 1 );
13430
13431         status = pthread_detach( &t );
13432         if( status ) return errno;
13433 #endif
13434
13435 #ifdef HAVE_LINUX_THREADS
13436         pthread_kill_other_threads_np();
13437 #endif
13438
13439         return 0;
13440
13441 }
13442
13443 EOF
13444 if { (eval echo configure:13445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13445 then
13446   ol_cv_pthread_lpthread=yes
13447 else
13448   echo "configure: failed program was:" >&5
13449   cat conftest.$ac_ext >&5
13450   rm -fr conftest*
13451   ol_cv_pthread_lpthread=no
13452 fi
13453 rm -fr conftest*
13454 fi
13455
13456
13457                 # restore the LIBS
13458                 LIBS="$ol_LIBS"
13459         
13460 fi
13461
13462 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13463
13464         if test $ol_cv_pthread_lpthread = yes ; then
13465                 ol_link_pthreads="-lpthread"
13466                 ol_link_threads=posix
13467         fi
13468 fi
13469
13470                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13471 if test "$ol_link_threads" = no ; then
13472         # try -lc_r
13473         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13474 echo "configure:13475: checking for pthread link with -lc_r" >&5
13475 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13476   echo $ac_n "(cached) $ac_c" 1>&6
13477 else
13478   
13479                 # save the flags
13480                 ol_LIBS="$LIBS"
13481                 LIBS="-lc_r $LIBS"
13482
13483                 if test "$cross_compiling" = yes; then
13484   cat > conftest.$ac_ext <<EOF
13485 #line 13486 "configure"
13486 #include "confdefs.h"
13487 /* pthread test headers */
13488 #include <pthread.h>
13489 #if HAVE_PTHREADS < 7
13490 #include <errno.h>
13491 #endif
13492 #ifndef NULL
13493 #define NULL (void*)0
13494 #endif
13495
13496 static void *task(p)
13497         void *p;
13498 {
13499         return (void *) (p == NULL);
13500 }
13501
13502 int main() {
13503
13504         /* pthread test function */
13505 #ifndef PTHREAD_CREATE_DETACHED
13506 #define PTHREAD_CREATE_DETACHED 1
13507 #endif
13508         pthread_t t;
13509         int status;
13510         int detach = PTHREAD_CREATE_DETACHED;
13511
13512 #if HAVE_PTHREADS > 4
13513         /* Final pthreads */
13514         pthread_attr_t attr;
13515
13516         status = pthread_attr_init(&attr);
13517         if( status ) return status;
13518
13519 #if HAVE_PTHREADS < 7
13520         status = pthread_attr_setdetachstate(&attr, &detach);
13521         if( status < 0 ) status = errno;
13522 #else
13523         status = pthread_attr_setdetachstate(&attr, detach);
13524 #endif
13525         if( status ) return status;
13526         status = pthread_create( &t, &attr, task, NULL );
13527 #if HAVE_PTHREADS < 7
13528         if( status < 0 ) status = errno;
13529 #endif
13530         if( status ) return status;
13531 #else
13532         /* Draft 4 pthreads */
13533         status = pthread_create( &t, pthread_attr_default, task, NULL );
13534         if( status ) return errno;
13535
13536         /* give thread a chance to complete */
13537         /* it should remain joinable and hence detachable */
13538         sleep( 1 );
13539
13540         status = pthread_detach( &t );
13541         if( status ) return errno;
13542 #endif
13543
13544 #ifdef HAVE_LINUX_THREADS
13545         pthread_kill_other_threads_np();
13546 #endif
13547
13548         return 0;
13549
13550 ; return 0; }
13551 EOF
13552 if { (eval echo configure:13553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13553   rm -rf conftest*
13554   ol_cv_pthread_lc_r=yes
13555 else
13556   echo "configure: failed program was:" >&5
13557   cat conftest.$ac_ext >&5
13558   rm -rf conftest*
13559   ol_cv_pthread_lc_r=no
13560 fi
13561 rm -f conftest*
13562 else
13563   cat > conftest.$ac_ext <<EOF
13564 #line 13565 "configure"
13565 #include "confdefs.h"
13566 /* pthread test headers */
13567 #include <pthread.h>
13568 #if HAVE_PTHREADS < 7
13569 #include <errno.h>
13570 #endif
13571 #ifndef NULL
13572 #define NULL (void*)0
13573 #endif
13574
13575 static void *task(p)
13576         void *p;
13577 {
13578         return (void *) (p == NULL);
13579 }
13580
13581
13582 int main(argc, argv)
13583         int argc;
13584         char **argv;
13585 {
13586
13587         /* pthread test function */
13588 #ifndef PTHREAD_CREATE_DETACHED
13589 #define PTHREAD_CREATE_DETACHED 1
13590 #endif
13591         pthread_t t;
13592         int status;
13593         int detach = PTHREAD_CREATE_DETACHED;
13594
13595 #if HAVE_PTHREADS > 4
13596         /* Final pthreads */
13597         pthread_attr_t attr;
13598
13599         status = pthread_attr_init(&attr);
13600         if( status ) return status;
13601
13602 #if HAVE_PTHREADS < 7
13603         status = pthread_attr_setdetachstate(&attr, &detach);
13604         if( status < 0 ) status = errno;
13605 #else
13606         status = pthread_attr_setdetachstate(&attr, detach);
13607 #endif
13608         if( status ) return status;
13609         status = pthread_create( &t, &attr, task, NULL );
13610 #if HAVE_PTHREADS < 7
13611         if( status < 0 ) status = errno;
13612 #endif
13613         if( status ) return status;
13614 #else
13615         /* Draft 4 pthreads */
13616         status = pthread_create( &t, pthread_attr_default, task, NULL );
13617         if( status ) return errno;
13618
13619         /* give thread a chance to complete */
13620         /* it should remain joinable and hence detachable */
13621         sleep( 1 );
13622
13623         status = pthread_detach( &t );
13624         if( status ) return errno;
13625 #endif
13626
13627 #ifdef HAVE_LINUX_THREADS
13628         pthread_kill_other_threads_np();
13629 #endif
13630
13631         return 0;
13632
13633 }
13634
13635 EOF
13636 if { (eval echo configure:13637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13637 then
13638   ol_cv_pthread_lc_r=yes
13639 else
13640   echo "configure: failed program was:" >&5
13641   cat conftest.$ac_ext >&5
13642   rm -fr conftest*
13643   ol_cv_pthread_lc_r=no
13644 fi
13645 rm -fr conftest*
13646 fi
13647
13648
13649                 # restore the LIBS
13650                 LIBS="$ol_LIBS"
13651         
13652 fi
13653
13654 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13655
13656         if test $ol_cv_pthread_lc_r = yes ; then
13657                 ol_link_pthreads="-lc_r"
13658                 ol_link_threads=posix
13659         fi
13660 fi
13661
13662
13663                 # Pthread try link: -threads (ol_cv_pthread_threads)
13664 if test "$ol_link_threads" = no ; then
13665         # try -threads
13666         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13667 echo "configure:13668: checking for pthread link with -threads" >&5
13668 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13669   echo $ac_n "(cached) $ac_c" 1>&6
13670 else
13671   
13672                 # save the flags
13673                 ol_LIBS="$LIBS"
13674                 LIBS="-threads $LIBS"
13675
13676                 if test "$cross_compiling" = yes; then
13677   cat > conftest.$ac_ext <<EOF
13678 #line 13679 "configure"
13679 #include "confdefs.h"
13680 /* pthread test headers */
13681 #include <pthread.h>
13682 #if HAVE_PTHREADS < 7
13683 #include <errno.h>
13684 #endif
13685 #ifndef NULL
13686 #define NULL (void*)0
13687 #endif
13688
13689 static void *task(p)
13690         void *p;
13691 {
13692         return (void *) (p == NULL);
13693 }
13694
13695 int main() {
13696
13697         /* pthread test function */
13698 #ifndef PTHREAD_CREATE_DETACHED
13699 #define PTHREAD_CREATE_DETACHED 1
13700 #endif
13701         pthread_t t;
13702         int status;
13703         int detach = PTHREAD_CREATE_DETACHED;
13704
13705 #if HAVE_PTHREADS > 4
13706         /* Final pthreads */
13707         pthread_attr_t attr;
13708
13709         status = pthread_attr_init(&attr);
13710         if( status ) return status;
13711
13712 #if HAVE_PTHREADS < 7
13713         status = pthread_attr_setdetachstate(&attr, &detach);
13714         if( status < 0 ) status = errno;
13715 #else
13716         status = pthread_attr_setdetachstate(&attr, detach);
13717 #endif
13718         if( status ) return status;
13719         status = pthread_create( &t, &attr, task, NULL );
13720 #if HAVE_PTHREADS < 7
13721         if( status < 0 ) status = errno;
13722 #endif
13723         if( status ) return status;
13724 #else
13725         /* Draft 4 pthreads */
13726         status = pthread_create( &t, pthread_attr_default, task, NULL );
13727         if( status ) return errno;
13728
13729         /* give thread a chance to complete */
13730         /* it should remain joinable and hence detachable */
13731         sleep( 1 );
13732
13733         status = pthread_detach( &t );
13734         if( status ) return errno;
13735 #endif
13736
13737 #ifdef HAVE_LINUX_THREADS
13738         pthread_kill_other_threads_np();
13739 #endif
13740
13741         return 0;
13742
13743 ; return 0; }
13744 EOF
13745 if { (eval echo configure:13746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13746   rm -rf conftest*
13747   ol_cv_pthread_threads=yes
13748 else
13749   echo "configure: failed program was:" >&5
13750   cat conftest.$ac_ext >&5
13751   rm -rf conftest*
13752   ol_cv_pthread_threads=no
13753 fi
13754 rm -f conftest*
13755 else
13756   cat > conftest.$ac_ext <<EOF
13757 #line 13758 "configure"
13758 #include "confdefs.h"
13759 /* pthread test headers */
13760 #include <pthread.h>
13761 #if HAVE_PTHREADS < 7
13762 #include <errno.h>
13763 #endif
13764 #ifndef NULL
13765 #define NULL (void*)0
13766 #endif
13767
13768 static void *task(p)
13769         void *p;
13770 {
13771         return (void *) (p == NULL);
13772 }
13773
13774
13775 int main(argc, argv)
13776         int argc;
13777         char **argv;
13778 {
13779
13780         /* pthread test function */
13781 #ifndef PTHREAD_CREATE_DETACHED
13782 #define PTHREAD_CREATE_DETACHED 1
13783 #endif
13784         pthread_t t;
13785         int status;
13786         int detach = PTHREAD_CREATE_DETACHED;
13787
13788 #if HAVE_PTHREADS > 4
13789         /* Final pthreads */
13790         pthread_attr_t attr;
13791
13792         status = pthread_attr_init(&attr);
13793         if( status ) return status;
13794
13795 #if HAVE_PTHREADS < 7
13796         status = pthread_attr_setdetachstate(&attr, &detach);
13797         if( status < 0 ) status = errno;
13798 #else
13799         status = pthread_attr_setdetachstate(&attr, detach);
13800 #endif
13801         if( status ) return status;
13802         status = pthread_create( &t, &attr, task, NULL );
13803 #if HAVE_PTHREADS < 7
13804         if( status < 0 ) status = errno;
13805 #endif
13806         if( status ) return status;
13807 #else
13808         /* Draft 4 pthreads */
13809         status = pthread_create( &t, pthread_attr_default, task, NULL );
13810         if( status ) return errno;
13811
13812         /* give thread a chance to complete */
13813         /* it should remain joinable and hence detachable */
13814         sleep( 1 );
13815
13816         status = pthread_detach( &t );
13817         if( status ) return errno;
13818 #endif
13819
13820 #ifdef HAVE_LINUX_THREADS
13821         pthread_kill_other_threads_np();
13822 #endif
13823
13824         return 0;
13825
13826 }
13827
13828 EOF
13829 if { (eval echo configure:13830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13830 then
13831   ol_cv_pthread_threads=yes
13832 else
13833   echo "configure: failed program was:" >&5
13834   cat conftest.$ac_ext >&5
13835   rm -fr conftest*
13836   ol_cv_pthread_threads=no
13837 fi
13838 rm -fr conftest*
13839 fi
13840
13841
13842                 # restore the LIBS
13843                 LIBS="$ol_LIBS"
13844         
13845 fi
13846
13847 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13848
13849         if test $ol_cv_pthread_threads = yes ; then
13850                 ol_link_pthreads="-threads"
13851                 ol_link_threads=posix
13852         fi
13853 fi
13854
13855
13856                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13857 if test "$ol_link_threads" = no ; then
13858         # try -lpthreads -lmach -lexc -lc_r
13859         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13860 echo "configure:13861: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13861 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13862   echo $ac_n "(cached) $ac_c" 1>&6
13863 else
13864   
13865                 # save the flags
13866                 ol_LIBS="$LIBS"
13867                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13868
13869                 if test "$cross_compiling" = yes; then
13870   cat > conftest.$ac_ext <<EOF
13871 #line 13872 "configure"
13872 #include "confdefs.h"
13873 /* pthread test headers */
13874 #include <pthread.h>
13875 #if HAVE_PTHREADS < 7
13876 #include <errno.h>
13877 #endif
13878 #ifndef NULL
13879 #define NULL (void*)0
13880 #endif
13881
13882 static void *task(p)
13883         void *p;
13884 {
13885         return (void *) (p == NULL);
13886 }
13887
13888 int main() {
13889
13890         /* pthread test function */
13891 #ifndef PTHREAD_CREATE_DETACHED
13892 #define PTHREAD_CREATE_DETACHED 1
13893 #endif
13894         pthread_t t;
13895         int status;
13896         int detach = PTHREAD_CREATE_DETACHED;
13897
13898 #if HAVE_PTHREADS > 4
13899         /* Final pthreads */
13900         pthread_attr_t attr;
13901
13902         status = pthread_attr_init(&attr);
13903         if( status ) return status;
13904
13905 #if HAVE_PTHREADS < 7
13906         status = pthread_attr_setdetachstate(&attr, &detach);
13907         if( status < 0 ) status = errno;
13908 #else
13909         status = pthread_attr_setdetachstate(&attr, detach);
13910 #endif
13911         if( status ) return status;
13912         status = pthread_create( &t, &attr, task, NULL );
13913 #if HAVE_PTHREADS < 7
13914         if( status < 0 ) status = errno;
13915 #endif
13916         if( status ) return status;
13917 #else
13918         /* Draft 4 pthreads */
13919         status = pthread_create( &t, pthread_attr_default, task, NULL );
13920         if( status ) return errno;
13921
13922         /* give thread a chance to complete */
13923         /* it should remain joinable and hence detachable */
13924         sleep( 1 );
13925
13926         status = pthread_detach( &t );
13927         if( status ) return errno;
13928 #endif
13929
13930 #ifdef HAVE_LINUX_THREADS
13931         pthread_kill_other_threads_np();
13932 #endif
13933
13934         return 0;
13935
13936 ; return 0; }
13937 EOF
13938 if { (eval echo configure:13939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13939   rm -rf conftest*
13940   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13941 else
13942   echo "configure: failed program was:" >&5
13943   cat conftest.$ac_ext >&5
13944   rm -rf conftest*
13945   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13946 fi
13947 rm -f conftest*
13948 else
13949   cat > conftest.$ac_ext <<EOF
13950 #line 13951 "configure"
13951 #include "confdefs.h"
13952 /* pthread test headers */
13953 #include <pthread.h>
13954 #if HAVE_PTHREADS < 7
13955 #include <errno.h>
13956 #endif
13957 #ifndef NULL
13958 #define NULL (void*)0
13959 #endif
13960
13961 static void *task(p)
13962         void *p;
13963 {
13964         return (void *) (p == NULL);
13965 }
13966
13967
13968 int main(argc, argv)
13969         int argc;
13970         char **argv;
13971 {
13972
13973         /* pthread test function */
13974 #ifndef PTHREAD_CREATE_DETACHED
13975 #define PTHREAD_CREATE_DETACHED 1
13976 #endif
13977         pthread_t t;
13978         int status;
13979         int detach = PTHREAD_CREATE_DETACHED;
13980
13981 #if HAVE_PTHREADS > 4
13982         /* Final pthreads */
13983         pthread_attr_t attr;
13984
13985         status = pthread_attr_init(&attr);
13986         if( status ) return status;
13987
13988 #if HAVE_PTHREADS < 7
13989         status = pthread_attr_setdetachstate(&attr, &detach);
13990         if( status < 0 ) status = errno;
13991 #else
13992         status = pthread_attr_setdetachstate(&attr, detach);
13993 #endif
13994         if( status ) return status;
13995         status = pthread_create( &t, &attr, task, NULL );
13996 #if HAVE_PTHREADS < 7
13997         if( status < 0 ) status = errno;
13998 #endif
13999         if( status ) return status;
14000 #else
14001         /* Draft 4 pthreads */
14002         status = pthread_create( &t, pthread_attr_default, task, NULL );
14003         if( status ) return errno;
14004
14005         /* give thread a chance to complete */
14006         /* it should remain joinable and hence detachable */
14007         sleep( 1 );
14008
14009         status = pthread_detach( &t );
14010         if( status ) return errno;
14011 #endif
14012
14013 #ifdef HAVE_LINUX_THREADS
14014         pthread_kill_other_threads_np();
14015 #endif
14016
14017         return 0;
14018
14019 }
14020
14021 EOF
14022 if { (eval echo configure:14023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14023 then
14024   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14025 else
14026   echo "configure: failed program was:" >&5
14027   cat conftest.$ac_ext >&5
14028   rm -fr conftest*
14029   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14030 fi
14031 rm -fr conftest*
14032 fi
14033
14034
14035                 # restore the LIBS
14036                 LIBS="$ol_LIBS"
14037         
14038 fi
14039
14040 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14041
14042         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14043                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14044                 ol_link_threads=posix
14045         fi
14046 fi
14047
14048                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14049 if test "$ol_link_threads" = no ; then
14050         # try -lpthreads -lmach -lexc
14051         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14052 echo "configure:14053: checking for pthread link with -lpthreads -lmach -lexc" >&5
14053 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14054   echo $ac_n "(cached) $ac_c" 1>&6
14055 else
14056   
14057                 # save the flags
14058                 ol_LIBS="$LIBS"
14059                 LIBS="-lpthreads -lmach -lexc $LIBS"
14060
14061                 if test "$cross_compiling" = yes; then
14062   cat > conftest.$ac_ext <<EOF
14063 #line 14064 "configure"
14064 #include "confdefs.h"
14065 /* pthread test headers */
14066 #include <pthread.h>
14067 #if HAVE_PTHREADS < 7
14068 #include <errno.h>
14069 #endif
14070 #ifndef NULL
14071 #define NULL (void*)0
14072 #endif
14073
14074 static void *task(p)
14075         void *p;
14076 {
14077         return (void *) (p == NULL);
14078 }
14079
14080 int main() {
14081
14082         /* pthread test function */
14083 #ifndef PTHREAD_CREATE_DETACHED
14084 #define PTHREAD_CREATE_DETACHED 1
14085 #endif
14086         pthread_t t;
14087         int status;
14088         int detach = PTHREAD_CREATE_DETACHED;
14089
14090 #if HAVE_PTHREADS > 4
14091         /* Final pthreads */
14092         pthread_attr_t attr;
14093
14094         status = pthread_attr_init(&attr);
14095         if( status ) return status;
14096
14097 #if HAVE_PTHREADS < 7
14098         status = pthread_attr_setdetachstate(&attr, &detach);
14099         if( status < 0 ) status = errno;
14100 #else
14101         status = pthread_attr_setdetachstate(&attr, detach);
14102 #endif
14103         if( status ) return status;
14104         status = pthread_create( &t, &attr, task, NULL );
14105 #if HAVE_PTHREADS < 7
14106         if( status < 0 ) status = errno;
14107 #endif
14108         if( status ) return status;
14109 #else
14110         /* Draft 4 pthreads */
14111         status = pthread_create( &t, pthread_attr_default, task, NULL );
14112         if( status ) return errno;
14113
14114         /* give thread a chance to complete */
14115         /* it should remain joinable and hence detachable */
14116         sleep( 1 );
14117
14118         status = pthread_detach( &t );
14119         if( status ) return errno;
14120 #endif
14121
14122 #ifdef HAVE_LINUX_THREADS
14123         pthread_kill_other_threads_np();
14124 #endif
14125
14126         return 0;
14127
14128 ; return 0; }
14129 EOF
14130 if { (eval echo configure:14131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14131   rm -rf conftest*
14132   ol_cv_pthread_lpthreads_lmach_lexc=yes
14133 else
14134   echo "configure: failed program was:" >&5
14135   cat conftest.$ac_ext >&5
14136   rm -rf conftest*
14137   ol_cv_pthread_lpthreads_lmach_lexc=no
14138 fi
14139 rm -f conftest*
14140 else
14141   cat > conftest.$ac_ext <<EOF
14142 #line 14143 "configure"
14143 #include "confdefs.h"
14144 /* pthread test headers */
14145 #include <pthread.h>
14146 #if HAVE_PTHREADS < 7
14147 #include <errno.h>
14148 #endif
14149 #ifndef NULL
14150 #define NULL (void*)0
14151 #endif
14152
14153 static void *task(p)
14154         void *p;
14155 {
14156         return (void *) (p == NULL);
14157 }
14158
14159
14160 int main(argc, argv)
14161         int argc;
14162         char **argv;
14163 {
14164
14165         /* pthread test function */
14166 #ifndef PTHREAD_CREATE_DETACHED
14167 #define PTHREAD_CREATE_DETACHED 1
14168 #endif
14169         pthread_t t;
14170         int status;
14171         int detach = PTHREAD_CREATE_DETACHED;
14172
14173 #if HAVE_PTHREADS > 4
14174         /* Final pthreads */
14175         pthread_attr_t attr;
14176
14177         status = pthread_attr_init(&attr);
14178         if( status ) return status;
14179
14180 #if HAVE_PTHREADS < 7
14181         status = pthread_attr_setdetachstate(&attr, &detach);
14182         if( status < 0 ) status = errno;
14183 #else
14184         status = pthread_attr_setdetachstate(&attr, detach);
14185 #endif
14186         if( status ) return status;
14187         status = pthread_create( &t, &attr, task, NULL );
14188 #if HAVE_PTHREADS < 7
14189         if( status < 0 ) status = errno;
14190 #endif
14191         if( status ) return status;
14192 #else
14193         /* Draft 4 pthreads */
14194         status = pthread_create( &t, pthread_attr_default, task, NULL );
14195         if( status ) return errno;
14196
14197         /* give thread a chance to complete */
14198         /* it should remain joinable and hence detachable */
14199         sleep( 1 );
14200
14201         status = pthread_detach( &t );
14202         if( status ) return errno;
14203 #endif
14204
14205 #ifdef HAVE_LINUX_THREADS
14206         pthread_kill_other_threads_np();
14207 #endif
14208
14209         return 0;
14210
14211 }
14212
14213 EOF
14214 if { (eval echo configure:14215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14215 then
14216   ol_cv_pthread_lpthreads_lmach_lexc=yes
14217 else
14218   echo "configure: failed program was:" >&5
14219   cat conftest.$ac_ext >&5
14220   rm -fr conftest*
14221   ol_cv_pthread_lpthreads_lmach_lexc=no
14222 fi
14223 rm -fr conftest*
14224 fi
14225
14226
14227                 # restore the LIBS
14228                 LIBS="$ol_LIBS"
14229         
14230 fi
14231
14232 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14233
14234         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14235                 ol_link_pthreads="-lpthreads -lmach -lexc"
14236                 ol_link_threads=posix
14237         fi
14238 fi
14239
14240                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14241 if test "$ol_link_threads" = no ; then
14242         # try -lpthreads -lexc
14243         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14244 echo "configure:14245: checking for pthread link with -lpthreads -lexc" >&5
14245 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14246   echo $ac_n "(cached) $ac_c" 1>&6
14247 else
14248   
14249                 # save the flags
14250                 ol_LIBS="$LIBS"
14251                 LIBS="-lpthreads -lexc $LIBS"
14252
14253                 if test "$cross_compiling" = yes; then
14254   cat > conftest.$ac_ext <<EOF
14255 #line 14256 "configure"
14256 #include "confdefs.h"
14257 /* pthread test headers */
14258 #include <pthread.h>
14259 #if HAVE_PTHREADS < 7
14260 #include <errno.h>
14261 #endif
14262 #ifndef NULL
14263 #define NULL (void*)0
14264 #endif
14265
14266 static void *task(p)
14267         void *p;
14268 {
14269         return (void *) (p == NULL);
14270 }
14271
14272 int main() {
14273
14274         /* pthread test function */
14275 #ifndef PTHREAD_CREATE_DETACHED
14276 #define PTHREAD_CREATE_DETACHED 1
14277 #endif
14278         pthread_t t;
14279         int status;
14280         int detach = PTHREAD_CREATE_DETACHED;
14281
14282 #if HAVE_PTHREADS > 4
14283         /* Final pthreads */
14284         pthread_attr_t attr;
14285
14286         status = pthread_attr_init(&attr);
14287         if( status ) return status;
14288
14289 #if HAVE_PTHREADS < 7
14290         status = pthread_attr_setdetachstate(&attr, &detach);
14291         if( status < 0 ) status = errno;
14292 #else
14293         status = pthread_attr_setdetachstate(&attr, detach);
14294 #endif
14295         if( status ) return status;
14296         status = pthread_create( &t, &attr, task, NULL );
14297 #if HAVE_PTHREADS < 7
14298         if( status < 0 ) status = errno;
14299 #endif
14300         if( status ) return status;
14301 #else
14302         /* Draft 4 pthreads */
14303         status = pthread_create( &t, pthread_attr_default, task, NULL );
14304         if( status ) return errno;
14305
14306         /* give thread a chance to complete */
14307         /* it should remain joinable and hence detachable */
14308         sleep( 1 );
14309
14310         status = pthread_detach( &t );
14311         if( status ) return errno;
14312 #endif
14313
14314 #ifdef HAVE_LINUX_THREADS
14315         pthread_kill_other_threads_np();
14316 #endif
14317
14318         return 0;
14319
14320 ; return 0; }
14321 EOF
14322 if { (eval echo configure:14323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14323   rm -rf conftest*
14324   ol_cv_pthread_lpthreads_lexc=yes
14325 else
14326   echo "configure: failed program was:" >&5
14327   cat conftest.$ac_ext >&5
14328   rm -rf conftest*
14329   ol_cv_pthread_lpthreads_lexc=no
14330 fi
14331 rm -f conftest*
14332 else
14333   cat > conftest.$ac_ext <<EOF
14334 #line 14335 "configure"
14335 #include "confdefs.h"
14336 /* pthread test headers */
14337 #include <pthread.h>
14338 #if HAVE_PTHREADS < 7
14339 #include <errno.h>
14340 #endif
14341 #ifndef NULL
14342 #define NULL (void*)0
14343 #endif
14344
14345 static void *task(p)
14346         void *p;
14347 {
14348         return (void *) (p == NULL);
14349 }
14350
14351
14352 int main(argc, argv)
14353         int argc;
14354         char **argv;
14355 {
14356
14357         /* pthread test function */
14358 #ifndef PTHREAD_CREATE_DETACHED
14359 #define PTHREAD_CREATE_DETACHED 1
14360 #endif
14361         pthread_t t;
14362         int status;
14363         int detach = PTHREAD_CREATE_DETACHED;
14364
14365 #if HAVE_PTHREADS > 4
14366         /* Final pthreads */
14367         pthread_attr_t attr;
14368
14369         status = pthread_attr_init(&attr);
14370         if( status ) return status;
14371
14372 #if HAVE_PTHREADS < 7
14373         status = pthread_attr_setdetachstate(&attr, &detach);
14374         if( status < 0 ) status = errno;
14375 #else
14376         status = pthread_attr_setdetachstate(&attr, detach);
14377 #endif
14378         if( status ) return status;
14379         status = pthread_create( &t, &attr, task, NULL );
14380 #if HAVE_PTHREADS < 7
14381         if( status < 0 ) status = errno;
14382 #endif
14383         if( status ) return status;
14384 #else
14385         /* Draft 4 pthreads */
14386         status = pthread_create( &t, pthread_attr_default, task, NULL );
14387         if( status ) return errno;
14388
14389         /* give thread a chance to complete */
14390         /* it should remain joinable and hence detachable */
14391         sleep( 1 );
14392
14393         status = pthread_detach( &t );
14394         if( status ) return errno;
14395 #endif
14396
14397 #ifdef HAVE_LINUX_THREADS
14398         pthread_kill_other_threads_np();
14399 #endif
14400
14401         return 0;
14402
14403 }
14404
14405 EOF
14406 if { (eval echo configure:14407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14407 then
14408   ol_cv_pthread_lpthreads_lexc=yes
14409 else
14410   echo "configure: failed program was:" >&5
14411   cat conftest.$ac_ext >&5
14412   rm -fr conftest*
14413   ol_cv_pthread_lpthreads_lexc=no
14414 fi
14415 rm -fr conftest*
14416 fi
14417
14418
14419                 # restore the LIBS
14420                 LIBS="$ol_LIBS"
14421         
14422 fi
14423
14424 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14425
14426         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14427                 ol_link_pthreads="-lpthreads -lexc"
14428                 ol_link_threads=posix
14429         fi
14430 fi
14431
14432
14433                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14434 if test "$ol_link_threads" = no ; then
14435         # try -lpthreads
14436         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14437 echo "configure:14438: checking for pthread link with -lpthreads" >&5
14438 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14439   echo $ac_n "(cached) $ac_c" 1>&6
14440 else
14441   
14442                 # save the flags
14443                 ol_LIBS="$LIBS"
14444                 LIBS="-lpthreads $LIBS"
14445
14446                 if test "$cross_compiling" = yes; then
14447   cat > conftest.$ac_ext <<EOF
14448 #line 14449 "configure"
14449 #include "confdefs.h"
14450 /* pthread test headers */
14451 #include <pthread.h>
14452 #if HAVE_PTHREADS < 7
14453 #include <errno.h>
14454 #endif
14455 #ifndef NULL
14456 #define NULL (void*)0
14457 #endif
14458
14459 static void *task(p)
14460         void *p;
14461 {
14462         return (void *) (p == NULL);
14463 }
14464
14465 int main() {
14466
14467         /* pthread test function */
14468 #ifndef PTHREAD_CREATE_DETACHED
14469 #define PTHREAD_CREATE_DETACHED 1
14470 #endif
14471         pthread_t t;
14472         int status;
14473         int detach = PTHREAD_CREATE_DETACHED;
14474
14475 #if HAVE_PTHREADS > 4
14476         /* Final pthreads */
14477         pthread_attr_t attr;
14478
14479         status = pthread_attr_init(&attr);
14480         if( status ) return status;
14481
14482 #if HAVE_PTHREADS < 7
14483         status = pthread_attr_setdetachstate(&attr, &detach);
14484         if( status < 0 ) status = errno;
14485 #else
14486         status = pthread_attr_setdetachstate(&attr, detach);
14487 #endif
14488         if( status ) return status;
14489         status = pthread_create( &t, &attr, task, NULL );
14490 #if HAVE_PTHREADS < 7
14491         if( status < 0 ) status = errno;
14492 #endif
14493         if( status ) return status;
14494 #else
14495         /* Draft 4 pthreads */
14496         status = pthread_create( &t, pthread_attr_default, task, NULL );
14497         if( status ) return errno;
14498
14499         /* give thread a chance to complete */
14500         /* it should remain joinable and hence detachable */
14501         sleep( 1 );
14502
14503         status = pthread_detach( &t );
14504         if( status ) return errno;
14505 #endif
14506
14507 #ifdef HAVE_LINUX_THREADS
14508         pthread_kill_other_threads_np();
14509 #endif
14510
14511         return 0;
14512
14513 ; return 0; }
14514 EOF
14515 if { (eval echo configure:14516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14516   rm -rf conftest*
14517   ol_cv_pthread_lib_lpthreads=yes
14518 else
14519   echo "configure: failed program was:" >&5
14520   cat conftest.$ac_ext >&5
14521   rm -rf conftest*
14522   ol_cv_pthread_lib_lpthreads=no
14523 fi
14524 rm -f conftest*
14525 else
14526   cat > conftest.$ac_ext <<EOF
14527 #line 14528 "configure"
14528 #include "confdefs.h"
14529 /* pthread test headers */
14530 #include <pthread.h>
14531 #if HAVE_PTHREADS < 7
14532 #include <errno.h>
14533 #endif
14534 #ifndef NULL
14535 #define NULL (void*)0
14536 #endif
14537
14538 static void *task(p)
14539         void *p;
14540 {
14541         return (void *) (p == NULL);
14542 }
14543
14544
14545 int main(argc, argv)
14546         int argc;
14547         char **argv;
14548 {
14549
14550         /* pthread test function */
14551 #ifndef PTHREAD_CREATE_DETACHED
14552 #define PTHREAD_CREATE_DETACHED 1
14553 #endif
14554         pthread_t t;
14555         int status;
14556         int detach = PTHREAD_CREATE_DETACHED;
14557
14558 #if HAVE_PTHREADS > 4
14559         /* Final pthreads */
14560         pthread_attr_t attr;
14561
14562         status = pthread_attr_init(&attr);
14563         if( status ) return status;
14564
14565 #if HAVE_PTHREADS < 7
14566         status = pthread_attr_setdetachstate(&attr, &detach);
14567         if( status < 0 ) status = errno;
14568 #else
14569         status = pthread_attr_setdetachstate(&attr, detach);
14570 #endif
14571         if( status ) return status;
14572         status = pthread_create( &t, &attr, task, NULL );
14573 #if HAVE_PTHREADS < 7
14574         if( status < 0 ) status = errno;
14575 #endif
14576         if( status ) return status;
14577 #else
14578         /* Draft 4 pthreads */
14579         status = pthread_create( &t, pthread_attr_default, task, NULL );
14580         if( status ) return errno;
14581
14582         /* give thread a chance to complete */
14583         /* it should remain joinable and hence detachable */
14584         sleep( 1 );
14585
14586         status = pthread_detach( &t );
14587         if( status ) return errno;
14588 #endif
14589
14590 #ifdef HAVE_LINUX_THREADS
14591         pthread_kill_other_threads_np();
14592 #endif
14593
14594         return 0;
14595
14596 }
14597
14598 EOF
14599 if { (eval echo configure:14600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14600 then
14601   ol_cv_pthread_lib_lpthreads=yes
14602 else
14603   echo "configure: failed program was:" >&5
14604   cat conftest.$ac_ext >&5
14605   rm -fr conftest*
14606   ol_cv_pthread_lib_lpthreads=no
14607 fi
14608 rm -fr conftest*
14609 fi
14610
14611
14612                 # restore the LIBS
14613                 LIBS="$ol_LIBS"
14614         
14615 fi
14616
14617 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14618
14619         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14620                 ol_link_pthreads="-lpthreads"
14621                 ol_link_threads=posix
14622         fi
14623 fi
14624
14625
14626                 if test $ol_link_threads != no ; then
14627                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14628
14629                                                 save_CPPFLAGS="$CPPFLAGS"
14630                         save_LIBS="$LIBS"
14631                         LIBS="$LTHREAD_LIBS $LIBS"
14632
14633                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14634 do
14635 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14636 echo "configure:14637: checking for $ac_func" >&5
14637 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14638   echo $ac_n "(cached) $ac_c" 1>&6
14639 else
14640   cat > conftest.$ac_ext <<EOF
14641 #line 14642 "configure"
14642 #include "confdefs.h"
14643 /* System header to define __stub macros and hopefully few prototypes,
14644     which can conflict with char $ac_func(); below.  */
14645 #include <assert.h>
14646 /* Override any gcc2 internal prototype to avoid an error.  */
14647 /* We use char because int might match the return type of a gcc2
14648     builtin and then its argument prototype would still apply.  */
14649 char $ac_func();
14650 char (*f)();
14651
14652 int main() {
14653
14654 /* The GNU C library defines this for functions which it implements
14655     to always fail with ENOSYS.  Some functions are actually named
14656     something starting with __ and the normal name is an alias.  */
14657 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14658 choke me
14659 #else
14660 f = $ac_func;
14661 #endif
14662
14663 ; return 0; }
14664 EOF
14665 if { (eval echo configure:14666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14666   rm -rf conftest*
14667   eval "ac_cv_func_$ac_func=yes"
14668 else
14669   echo "configure: failed program was:" >&5
14670   cat conftest.$ac_ext >&5
14671   rm -rf conftest*
14672   eval "ac_cv_func_$ac_func=no"
14673 fi
14674 rm -f conftest*
14675 fi
14676
14677 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14678   echo "$ac_t""yes" 1>&6
14679     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14680   cat >> confdefs.h <<EOF
14681 #define $ac_tr_func 1
14682 EOF
14683  
14684 else
14685   echo "$ac_t""no" 1>&6
14686 fi
14687 done
14688
14689
14690                         if test $ac_cv_func_sched_yield = no -a \
14691                                 $ac_cv_func_pthread_yield = no -a \
14692                                 $ac_cv_func_thr_yield = no ; then
14693                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14694 echo "configure:14695: checking for sched_yield in -lrt" >&5
14695 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14696 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14697   echo $ac_n "(cached) $ac_c" 1>&6
14698 else
14699   ac_save_LIBS="$LIBS"
14700 LIBS="-lrt  $LIBS"
14701 cat > conftest.$ac_ext <<EOF
14702 #line 14703 "configure"
14703 #include "confdefs.h"
14704 /* Override any gcc2 internal prototype to avoid an error.  */
14705 /* We use char because int might match the return type of a gcc2
14706     builtin and then its argument prototype would still apply.  */
14707 char sched_yield();
14708
14709 int main() {
14710 sched_yield()
14711 ; return 0; }
14712 EOF
14713 if { (eval echo configure:14714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14714   rm -rf conftest*
14715   eval "ac_cv_lib_$ac_lib_var=yes"
14716 else
14717   echo "configure: failed program was:" >&5
14718   cat conftest.$ac_ext >&5
14719   rm -rf conftest*
14720   eval "ac_cv_lib_$ac_lib_var=no"
14721 fi
14722 rm -f conftest*
14723 LIBS="$ac_save_LIBS"
14724
14725 fi
14726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14727   echo "$ac_t""yes" 1>&6
14728   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14729                                         cat >> confdefs.h <<\EOF
14730 #define HAVE_SCHED_YIELD 1
14731 EOF
14732
14733                                         ac_cv_func_sched_yield=yes
14734 else
14735   echo "$ac_t""no" 1>&6
14736 ac_cv_func_sched_yield=no
14737 fi
14738
14739                         fi
14740                         if test $ac_cv_func_sched_yield = no -a \
14741                                 $ac_cv_func_pthread_yield = no -a \
14742                                 "$ac_cv_func_thr_yield" = no ; then
14743                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14744                         fi
14745
14746                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14747 do
14748 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14749 echo "configure:14750: checking for $ac_func" >&5
14750 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14751   echo $ac_n "(cached) $ac_c" 1>&6
14752 else
14753   cat > conftest.$ac_ext <<EOF
14754 #line 14755 "configure"
14755 #include "confdefs.h"
14756 /* System header to define __stub macros and hopefully few prototypes,
14757     which can conflict with char $ac_func(); below.  */
14758 #include <assert.h>
14759 /* Override any gcc2 internal prototype to avoid an error.  */
14760 /* We use char because int might match the return type of a gcc2
14761     builtin and then its argument prototype would still apply.  */
14762 char $ac_func();
14763 char (*f)();
14764
14765 int main() {
14766
14767 /* The GNU C library defines this for functions which it implements
14768     to always fail with ENOSYS.  Some functions are actually named
14769     something starting with __ and the normal name is an alias.  */
14770 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14771 choke me
14772 #else
14773 f = $ac_func;
14774 #endif
14775
14776 ; return 0; }
14777 EOF
14778 if { (eval echo configure:14779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14779   rm -rf conftest*
14780   eval "ac_cv_func_$ac_func=yes"
14781 else
14782   echo "configure: failed program was:" >&5
14783   cat conftest.$ac_ext >&5
14784   rm -rf conftest*
14785   eval "ac_cv_func_$ac_func=no"
14786 fi
14787 rm -f conftest*
14788 fi
14789
14790 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14791   echo "$ac_t""yes" 1>&6
14792     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14793   cat >> confdefs.h <<EOF
14794 #define $ac_tr_func 1
14795 EOF
14796  
14797 else
14798   echo "$ac_t""no" 1>&6
14799 fi
14800 done
14801
14802
14803                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14804 echo "configure:14805: checking for pthread_detach with <pthread.h>" >&5
14805 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14806   echo $ac_n "(cached) $ac_c" 1>&6
14807 else
14808   
14809                                                                 cat > conftest.$ac_ext <<EOF
14810 #line 14811 "configure"
14811 #include "confdefs.h"
14812
14813 #include <pthread.h>
14814 #ifndef NULL
14815 #define NULL (void*)0
14816 #endif
14817
14818 int main() {
14819 pthread_detach(NULL);
14820 ; return 0; }
14821 EOF
14822 if { (eval echo configure:14823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14823   rm -rf conftest*
14824   ol_cv_func_pthread_detach=yes
14825 else
14826   echo "configure: failed program was:" >&5
14827   cat conftest.$ac_ext >&5
14828   rm -rf conftest*
14829   ol_cv_func_pthread_detach=no
14830 fi
14831 rm -f conftest*
14832                         
14833 fi
14834
14835 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14836
14837                         if test $ol_cv_func_pthread_detach = no ; then
14838                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14839                         fi
14840
14841                         cat >> confdefs.h <<\EOF
14842 #define HAVE_PTHREAD_DETACH 1
14843 EOF
14844
14845
14846                                                 for ac_func in \
14847                                 pthread_setconcurrency \
14848                                 pthread_getconcurrency \
14849                                 thr_setconcurrency \
14850                                 thr_getconcurrency \
14851                         
14852 do
14853 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14854 echo "configure:14855: checking for $ac_func" >&5
14855 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14856   echo $ac_n "(cached) $ac_c" 1>&6
14857 else
14858   cat > conftest.$ac_ext <<EOF
14859 #line 14860 "configure"
14860 #include "confdefs.h"
14861 /* System header to define __stub macros and hopefully few prototypes,
14862     which can conflict with char $ac_func(); below.  */
14863 #include <assert.h>
14864 /* Override any gcc2 internal prototype to avoid an error.  */
14865 /* We use char because int might match the return type of a gcc2
14866     builtin and then its argument prototype would still apply.  */
14867 char $ac_func();
14868 char (*f)();
14869
14870 int main() {
14871
14872 /* The GNU C library defines this for functions which it implements
14873     to always fail with ENOSYS.  Some functions are actually named
14874     something starting with __ and the normal name is an alias.  */
14875 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14876 choke me
14877 #else
14878 f = $ac_func;
14879 #endif
14880
14881 ; return 0; }
14882 EOF
14883 if { (eval echo configure:14884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14884   rm -rf conftest*
14885   eval "ac_cv_func_$ac_func=yes"
14886 else
14887   echo "configure: failed program was:" >&5
14888   cat conftest.$ac_ext >&5
14889   rm -rf conftest*
14890   eval "ac_cv_func_$ac_func=no"
14891 fi
14892 rm -f conftest*
14893 fi
14894
14895 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14896   echo "$ac_t""yes" 1>&6
14897     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14898   cat >> confdefs.h <<EOF
14899 #define $ac_tr_func 1
14900 EOF
14901  
14902 else
14903   echo "$ac_t""no" 1>&6
14904 fi
14905 done
14906
14907
14908                         
14909         for ac_func in pthread_kill_other_threads_np
14910 do
14911 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14912 echo "configure:14913: checking for $ac_func" >&5
14913 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14914   echo $ac_n "(cached) $ac_c" 1>&6
14915 else
14916   cat > conftest.$ac_ext <<EOF
14917 #line 14918 "configure"
14918 #include "confdefs.h"
14919 /* System header to define __stub macros and hopefully few prototypes,
14920     which can conflict with char $ac_func(); below.  */
14921 #include <assert.h>
14922 /* Override any gcc2 internal prototype to avoid an error.  */
14923 /* We use char because int might match the return type of a gcc2
14924     builtin and then its argument prototype would still apply.  */
14925 char $ac_func();
14926 char (*f)();
14927
14928 int main() {
14929
14930 /* The GNU C library defines this for functions which it implements
14931     to always fail with ENOSYS.  Some functions are actually named
14932     something starting with __ and the normal name is an alias.  */
14933 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14934 choke me
14935 #else
14936 f = $ac_func;
14937 #endif
14938
14939 ; return 0; }
14940 EOF
14941 if { (eval echo configure:14942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14942   rm -rf conftest*
14943   eval "ac_cv_func_$ac_func=yes"
14944 else
14945   echo "configure: failed program was:" >&5
14946   cat conftest.$ac_ext >&5
14947   rm -rf conftest*
14948   eval "ac_cv_func_$ac_func=no"
14949 fi
14950 rm -f conftest*
14951 fi
14952
14953 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14954   echo "$ac_t""yes" 1>&6
14955     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14956   cat >> confdefs.h <<EOF
14957 #define $ac_tr_func 1
14958 EOF
14959  
14960 else
14961   echo "$ac_t""no" 1>&6
14962 fi
14963 done
14964
14965         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14966 echo "configure:14967: checking for LinuxThreads implementation" >&5
14967 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14968   echo $ac_n "(cached) $ac_c" 1>&6
14969 else
14970   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14971 fi
14972
14973 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14974
14975                         
14976         
14977         
14978         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14979 echo "configure:14980: checking for LinuxThreads consistency" >&5
14980 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14981   echo $ac_n "(cached) $ac_c" 1>&6
14982 else
14983   
14984                 if test $ol_cv_header_linux_threads = yes -a \
14985                         $ol_cv_sys_linux_threads = yes; then
14986                         ol_cv_linux_threads=yes
14987                 elif test $ol_cv_header_linux_threads = no -a \
14988                         $ol_cv_sys_linux_threads = no; then
14989                         ol_cv_linux_threads=no
14990                 else
14991                         ol_cv_linux_threads=error
14992                 fi
14993         
14994 fi
14995
14996 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14997
14998
14999                         if test $ol_cv_linux_threads = error; then
15000                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15001                         fi
15002
15003                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15004 echo "configure:15005: checking if pthread_create() works" >&5
15005 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15006   echo $ac_n "(cached) $ac_c" 1>&6
15007 else
15008   
15009                         if test "$cross_compiling" = yes; then
15010                                 ol_cv_pthread_create_works=yes
15011 else
15012   cat > conftest.$ac_ext <<EOF
15013 #line 15014 "configure"
15014 #include "confdefs.h"
15015 /* pthread test headers */
15016 #include <pthread.h>
15017 #if HAVE_PTHREADS < 7
15018 #include <errno.h>
15019 #endif
15020 #ifndef NULL
15021 #define NULL (void*)0
15022 #endif
15023
15024 static void *task(p)
15025         void *p;
15026 {
15027         return (void *) (p == NULL);
15028 }
15029
15030
15031 int main(argc, argv)
15032         int argc;
15033         char **argv;
15034 {
15035
15036         /* pthread test function */
15037 #ifndef PTHREAD_CREATE_DETACHED
15038 #define PTHREAD_CREATE_DETACHED 1
15039 #endif
15040         pthread_t t;
15041         int status;
15042         int detach = PTHREAD_CREATE_DETACHED;
15043
15044 #if HAVE_PTHREADS > 4
15045         /* Final pthreads */
15046         pthread_attr_t attr;
15047
15048         status = pthread_attr_init(&attr);
15049         if( status ) return status;
15050
15051 #if HAVE_PTHREADS < 7
15052         status = pthread_attr_setdetachstate(&attr, &detach);
15053         if( status < 0 ) status = errno;
15054 #else
15055         status = pthread_attr_setdetachstate(&attr, detach);
15056 #endif
15057         if( status ) return status;
15058         status = pthread_create( &t, &attr, task, NULL );
15059 #if HAVE_PTHREADS < 7
15060         if( status < 0 ) status = errno;
15061 #endif
15062         if( status ) return status;
15063 #else
15064         /* Draft 4 pthreads */
15065         status = pthread_create( &t, pthread_attr_default, task, NULL );
15066         if( status ) return errno;
15067
15068         /* give thread a chance to complete */
15069         /* it should remain joinable and hence detachable */
15070         sleep( 1 );
15071
15072         status = pthread_detach( &t );
15073         if( status ) return errno;
15074 #endif
15075
15076 #ifdef HAVE_LINUX_THREADS
15077         pthread_kill_other_threads_np();
15078 #endif
15079
15080         return 0;
15081
15082 }
15083
15084 EOF
15085 if { (eval echo configure:15086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15086 then
15087   ol_cv_pthread_create_works=yes
15088 else
15089   echo "configure: failed program was:" >&5
15090   cat conftest.$ac_ext >&5
15091   rm -fr conftest*
15092   ol_cv_pthread_create_works=no
15093 fi
15094 rm -fr conftest*
15095 fi
15096
15097 fi
15098
15099 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15100
15101                         if test $ol_cv_pthread_create_works = no ; then
15102                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15103                         fi
15104
15105                                                 if test $ol_with_yielding_select = auto ; then
15106                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15107 echo "configure:15108: checking if select yields when using pthreads" >&5
15108 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15109   echo $ac_n "(cached) $ac_c" 1>&6
15110 else
15111   
15112                                 if test "$cross_compiling" = yes; then
15113   ol_cv_pthread_select_yields=cross
15114 else
15115   cat > conftest.$ac_ext <<EOF
15116 #line 15117 "configure"
15117 #include "confdefs.h"
15118
15119 #include <sys/types.h>
15120 #include <sys/time.h>
15121 #include <unistd.h>
15122 #include <pthread.h>
15123 #ifndef NULL
15124 #define NULL (void*) 0
15125 #endif
15126
15127 static int fildes[2];
15128
15129 static void *task(p)
15130         void *p;
15131 {
15132         int i;
15133         struct timeval tv;
15134
15135         fd_set rfds;
15136
15137         tv.tv_sec=10;
15138         tv.tv_usec=0;
15139
15140         FD_ZERO(&rfds);
15141         FD_SET(fildes[0], &rfds);
15142
15143         /* we're not interested in any fds */
15144         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15145
15146         if(i < 0) {
15147                 perror("select");
15148                 exit(10);
15149         }
15150
15151         exit(0); /* if we exit here, the select blocked the whole process */
15152 }
15153
15154 int main(argc, argv)
15155         int argc;
15156         char **argv;
15157 {
15158         pthread_t t;
15159
15160         /* create a pipe to select */
15161         if(pipe(&fildes[0])) {
15162                 perror("select");
15163                 exit(1);
15164         }
15165
15166 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15167         (void) pthread_setconcurrency(2);
15168 #else
15169 #ifdef HAVE_THR_SETCONCURRENCY
15170         /* Set Solaris LWP concurrency to 2 */
15171         thr_setconcurrency(2);
15172 #endif
15173 #endif
15174
15175 #if HAVE_PTHREADS < 6
15176         pthread_create(&t, pthread_attr_default, task, NULL);
15177 #else
15178         pthread_create(&t, NULL, task, NULL);
15179 #endif
15180
15181         /* make sure task runs first */
15182 #if HAVE_THR_YIELD
15183         thr_yield();
15184 #elif defined( HAVE_SCHED_YIELD )
15185         sched_yield();
15186 #elif defined( HAVE_PTHREAD_YIELD )
15187         pthread_yield();
15188 #endif
15189
15190         exit(2);
15191 }
15192 EOF
15193 if { (eval echo configure:15194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15194 then
15195   ol_cv_pthread_select_yields=no
15196 else
15197   echo "configure: failed program was:" >&5
15198   cat conftest.$ac_ext >&5
15199   rm -fr conftest*
15200   ol_cv_pthread_select_yields=yes
15201 fi
15202 rm -fr conftest*
15203 fi
15204
15205 fi
15206
15207 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15208
15209                                 if test $ol_cv_pthread_select_yields = cross ; then
15210                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15211                                 fi
15212
15213                                 if test $ol_cv_pthread_select_yields = yes ; then
15214                                         ol_with_yielding_select=yes
15215                                 fi
15216                         fi
15217
15218                                                 CPPFLAGS="$save_CPPFLAGS"
15219                         LIBS="$save_LIBS"
15220                 else
15221                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15222                 fi
15223         fi
15224
15225         if test $ol_with_threads = posix ; then
15226                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15227         fi
15228 fi
15229
15230 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15231         -o $ol_with_threads = mach ; then
15232
15233                 for ac_hdr in mach/cthreads.h cthreads.h
15234 do
15235 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15236 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15237 echo "configure:15238: checking for $ac_hdr" >&5
15238 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15239   echo $ac_n "(cached) $ac_c" 1>&6
15240 else
15241   cat > conftest.$ac_ext <<EOF
15242 #line 15243 "configure"
15243 #include "confdefs.h"
15244 #include <$ac_hdr>
15245 EOF
15246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15247 { (eval echo configure:15248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15249 if test -z "$ac_err"; then
15250   rm -rf conftest*
15251   eval "ac_cv_header_$ac_safe=yes"
15252 else
15253   echo "$ac_err" >&5
15254   echo "configure: failed program was:" >&5
15255   cat conftest.$ac_ext >&5
15256   rm -rf conftest*
15257   eval "ac_cv_header_$ac_safe=no"
15258 fi
15259 rm -f conftest*
15260 fi
15261 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15262   echo "$ac_t""yes" 1>&6
15263     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15264   cat >> confdefs.h <<EOF
15265 #define $ac_tr_hdr 1
15266 EOF
15267  
15268 else
15269   echo "$ac_t""no" 1>&6
15270 fi
15271 done
15272
15273         if test $ac_cv_header_mach_cthreads_h = yes ; then
15274                 ol_with_threads=found
15275
15276                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15277 echo "configure:15278: checking for cthread_fork" >&5
15278 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15279   echo $ac_n "(cached) $ac_c" 1>&6
15280 else
15281   cat > conftest.$ac_ext <<EOF
15282 #line 15283 "configure"
15283 #include "confdefs.h"
15284 /* System header to define __stub macros and hopefully few prototypes,
15285     which can conflict with char cthread_fork(); below.  */
15286 #include <assert.h>
15287 /* Override any gcc2 internal prototype to avoid an error.  */
15288 /* We use char because int might match the return type of a gcc2
15289     builtin and then its argument prototype would still apply.  */
15290 char cthread_fork();
15291 char (*f)();
15292
15293 int main() {
15294
15295 /* The GNU C library defines this for functions which it implements
15296     to always fail with ENOSYS.  Some functions are actually named
15297     something starting with __ and the normal name is an alias.  */
15298 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15299 choke me
15300 #else
15301 f = cthread_fork;
15302 #endif
15303
15304 ; return 0; }
15305 EOF
15306 if { (eval echo configure:15307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15307   rm -rf conftest*
15308   eval "ac_cv_func_cthread_fork=yes"
15309 else
15310   echo "configure: failed program was:" >&5
15311   cat conftest.$ac_ext >&5
15312   rm -rf conftest*
15313   eval "ac_cv_func_cthread_fork=no"
15314 fi
15315 rm -f conftest*
15316 fi
15317
15318 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15319   echo "$ac_t""yes" 1>&6
15320   ol_link_threads=yes
15321 else
15322   echo "$ac_t""no" 1>&6
15323 fi
15324
15325
15326                 if test $ol_link_threads = no ; then
15327                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15328 echo "configure:15329: checking for cthread_fork with -all_load" >&5
15329 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15330   echo $ac_n "(cached) $ac_c" 1>&6
15331 else
15332   
15333                                                                 save_LIBS="$LIBS"
15334                                 LIBS="-all_load $LIBS"
15335                                 cat > conftest.$ac_ext <<EOF
15336 #line 15337 "configure"
15337 #include "confdefs.h"
15338 #include <mach/cthreads.h>
15339 int main() {
15340
15341                                         cthread_fork((void *)0, (void *)0);
15342                                         
15343 ; return 0; }
15344 EOF
15345 if { (eval echo configure:15346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15346   rm -rf conftest*
15347   ol_cv_cthread_all_load=yes
15348 else
15349   echo "configure: failed program was:" >&5
15350   cat conftest.$ac_ext >&5
15351   rm -rf conftest*
15352   ol_cv_cthread_all_load=no
15353 fi
15354 rm -f conftest*
15355                                                                 LIBS="$save_LIBS"
15356                         
15357 fi
15358
15359 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15360
15361                         if test $ol_cv_cthread_all_load = yes ; then
15362                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15363                                 ol_link_threads=mach
15364                                 ol_with_threads=found
15365                         fi
15366                 fi
15367
15368         elif test $ac_cv_header_cthreads_h = yes ; then
15369                                 
15370                 ol_with_threads=found
15371  
15372                                 save_LIBS="$LIBS"
15373                 LIBS="$LIBS -lthreads"
15374                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15375 echo "configure:15376: checking for cthread_fork" >&5
15376 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15377   echo $ac_n "(cached) $ac_c" 1>&6
15378 else
15379   cat > conftest.$ac_ext <<EOF
15380 #line 15381 "configure"
15381 #include "confdefs.h"
15382 /* System header to define __stub macros and hopefully few prototypes,
15383     which can conflict with char cthread_fork(); below.  */
15384 #include <assert.h>
15385 /* Override any gcc2 internal prototype to avoid an error.  */
15386 /* We use char because int might match the return type of a gcc2
15387     builtin and then its argument prototype would still apply.  */
15388 char cthread_fork();
15389 char (*f)();
15390
15391 int main() {
15392
15393 /* The GNU C library defines this for functions which it implements
15394     to always fail with ENOSYS.  Some functions are actually named
15395     something starting with __ and the normal name is an alias.  */
15396 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15397 choke me
15398 #else
15399 f = cthread_fork;
15400 #endif
15401
15402 ; return 0; }
15403 EOF
15404 if { (eval echo configure:15405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15405   rm -rf conftest*
15406   eval "ac_cv_func_cthread_fork=yes"
15407 else
15408   echo "configure: failed program was:" >&5
15409   cat conftest.$ac_ext >&5
15410   rm -rf conftest*
15411   eval "ac_cv_func_cthread_fork=no"
15412 fi
15413 rm -f conftest*
15414 fi
15415
15416 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15417   echo "$ac_t""yes" 1>&6
15418   ol_link_threads=yes
15419 else
15420   echo "$ac_t""no" 1>&6
15421 fi
15422
15423                 LIBS="$save_LIBS"
15424
15425                 if test $ol_link_threads = yes ; then
15426                         LTHREAD_LIBS="-lthreads"
15427                         ol_link_threads=mach
15428                         ol_with_threads=found
15429                 else
15430                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15431                 fi
15432
15433         elif test $ol_with_threads = mach ; then
15434                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15435         fi
15436
15437         if test $ol_link_threads = mach ; then
15438                 cat >> confdefs.h <<\EOF
15439 #define HAVE_MACH_CTHREADS 1
15440 EOF
15441
15442         elif test $ol_with_threads = found ; then
15443                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15444         fi
15445 fi
15446
15447 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15448         -o $ol_with_threads = pth ; then
15449
15450         for ac_hdr in pth.h
15451 do
15452 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15453 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15454 echo "configure:15455: checking for $ac_hdr" >&5
15455 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15456   echo $ac_n "(cached) $ac_c" 1>&6
15457 else
15458   cat > conftest.$ac_ext <<EOF
15459 #line 15460 "configure"
15460 #include "confdefs.h"
15461 #include <$ac_hdr>
15462 EOF
15463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15464 { (eval echo configure:15465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15466 if test -z "$ac_err"; then
15467   rm -rf conftest*
15468   eval "ac_cv_header_$ac_safe=yes"
15469 else
15470   echo "$ac_err" >&5
15471   echo "configure: failed program was:" >&5
15472   cat conftest.$ac_ext >&5
15473   rm -rf conftest*
15474   eval "ac_cv_header_$ac_safe=no"
15475 fi
15476 rm -f conftest*
15477 fi
15478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15479   echo "$ac_t""yes" 1>&6
15480     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15481   cat >> confdefs.h <<EOF
15482 #define $ac_tr_hdr 1
15483 EOF
15484  
15485 else
15486   echo "$ac_t""no" 1>&6
15487 fi
15488 done
15489
15490
15491         if test $ac_cv_header_pth_h = yes ; then
15492                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15493 echo "configure:15494: checking for pth_version in -lpth" >&5
15494 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15495 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15496   echo $ac_n "(cached) $ac_c" 1>&6
15497 else
15498   ac_save_LIBS="$LIBS"
15499 LIBS="-lpth  $LIBS"
15500 cat > conftest.$ac_ext <<EOF
15501 #line 15502 "configure"
15502 #include "confdefs.h"
15503 /* Override any gcc2 internal prototype to avoid an error.  */
15504 /* We use char because int might match the return type of a gcc2
15505     builtin and then its argument prototype would still apply.  */
15506 char pth_version();
15507
15508 int main() {
15509 pth_version()
15510 ; return 0; }
15511 EOF
15512 if { (eval echo configure:15513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15513   rm -rf conftest*
15514   eval "ac_cv_lib_$ac_lib_var=yes"
15515 else
15516   echo "configure: failed program was:" >&5
15517   cat conftest.$ac_ext >&5
15518   rm -rf conftest*
15519   eval "ac_cv_lib_$ac_lib_var=no"
15520 fi
15521 rm -f conftest*
15522 LIBS="$ac_save_LIBS"
15523
15524 fi
15525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15526   echo "$ac_t""yes" 1>&6
15527   have_pth=yes
15528 else
15529   echo "$ac_t""no" 1>&6
15530 have_pth=no
15531 fi
15532
15533
15534                 if test $have_pth = yes ; then
15535                         cat >> confdefs.h <<\EOF
15536 #define HAVE_GNU_PTH 1
15537 EOF
15538
15539                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15540                         ol_link_threads=pth
15541                         ol_with_threads=found
15542
15543                         if test $ol_with_yielding_select = auto ; then
15544                                 ol_with_yielding_select=yes
15545                         fi
15546                 fi
15547         fi
15548 fi
15549
15550 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15551         -o $ol_with_threads = lwp ; then
15552
15553                 for ac_hdr in thread.h synch.h
15554 do
15555 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15556 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15557 echo "configure:15558: checking for $ac_hdr" >&5
15558 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15559   echo $ac_n "(cached) $ac_c" 1>&6
15560 else
15561   cat > conftest.$ac_ext <<EOF
15562 #line 15563 "configure"
15563 #include "confdefs.h"
15564 #include <$ac_hdr>
15565 EOF
15566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15567 { (eval echo configure:15568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15569 if test -z "$ac_err"; then
15570   rm -rf conftest*
15571   eval "ac_cv_header_$ac_safe=yes"
15572 else
15573   echo "$ac_err" >&5
15574   echo "configure: failed program was:" >&5
15575   cat conftest.$ac_ext >&5
15576   rm -rf conftest*
15577   eval "ac_cv_header_$ac_safe=no"
15578 fi
15579 rm -f conftest*
15580 fi
15581 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15582   echo "$ac_t""yes" 1>&6
15583     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15584   cat >> confdefs.h <<EOF
15585 #define $ac_tr_hdr 1
15586 EOF
15587  
15588 else
15589   echo "$ac_t""no" 1>&6
15590 fi
15591 done
15592
15593         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15594                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15595 echo "configure:15596: checking for thr_create in -lthread" >&5
15596 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15597 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15598   echo $ac_n "(cached) $ac_c" 1>&6
15599 else
15600   ac_save_LIBS="$LIBS"
15601 LIBS="-lthread  $LIBS"
15602 cat > conftest.$ac_ext <<EOF
15603 #line 15604 "configure"
15604 #include "confdefs.h"
15605 /* Override any gcc2 internal prototype to avoid an error.  */
15606 /* We use char because int might match the return type of a gcc2
15607     builtin and then its argument prototype would still apply.  */
15608 char thr_create();
15609
15610 int main() {
15611 thr_create()
15612 ; return 0; }
15613 EOF
15614 if { (eval echo configure:15615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15615   rm -rf conftest*
15616   eval "ac_cv_lib_$ac_lib_var=yes"
15617 else
15618   echo "configure: failed program was:" >&5
15619   cat conftest.$ac_ext >&5
15620   rm -rf conftest*
15621   eval "ac_cv_lib_$ac_lib_var=no"
15622 fi
15623 rm -f conftest*
15624 LIBS="$ac_save_LIBS"
15625
15626 fi
15627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15628   echo "$ac_t""yes" 1>&6
15629   have_thr=yes
15630 else
15631   echo "$ac_t""no" 1>&6
15632 have_thr=no
15633 fi
15634
15635
15636                 if test $have_thr = yes ; then
15637                         cat >> confdefs.h <<\EOF
15638 #define HAVE_THR 1
15639 EOF
15640
15641                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15642                         ol_link_threads=thr
15643
15644                         if test $ol_with_yielding_select = auto ; then
15645                                 ol_with_yielding_select=yes
15646                         fi
15647
15648                                                 for ac_func in \
15649                                 thr_setconcurrency \
15650                                 thr_getconcurrency \
15651                         
15652 do
15653 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15654 echo "configure:15655: checking for $ac_func" >&5
15655 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15656   echo $ac_n "(cached) $ac_c" 1>&6
15657 else
15658   cat > conftest.$ac_ext <<EOF
15659 #line 15660 "configure"
15660 #include "confdefs.h"
15661 /* System header to define __stub macros and hopefully few prototypes,
15662     which can conflict with char $ac_func(); below.  */
15663 #include <assert.h>
15664 /* Override any gcc2 internal prototype to avoid an error.  */
15665 /* We use char because int might match the return type of a gcc2
15666     builtin and then its argument prototype would still apply.  */
15667 char $ac_func();
15668 char (*f)();
15669
15670 int main() {
15671
15672 /* The GNU C library defines this for functions which it implements
15673     to always fail with ENOSYS.  Some functions are actually named
15674     something starting with __ and the normal name is an alias.  */
15675 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15676 choke me
15677 #else
15678 f = $ac_func;
15679 #endif
15680
15681 ; return 0; }
15682 EOF
15683 if { (eval echo configure:15684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15684   rm -rf conftest*
15685   eval "ac_cv_func_$ac_func=yes"
15686 else
15687   echo "configure: failed program was:" >&5
15688   cat conftest.$ac_ext >&5
15689   rm -rf conftest*
15690   eval "ac_cv_func_$ac_func=no"
15691 fi
15692 rm -f conftest*
15693 fi
15694
15695 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15696   echo "$ac_t""yes" 1>&6
15697     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15698   cat >> confdefs.h <<EOF
15699 #define $ac_tr_func 1
15700 EOF
15701  
15702 else
15703   echo "$ac_t""no" 1>&6
15704 fi
15705 done
15706
15707                 fi
15708         fi
15709
15710                 for ac_hdr in lwp/lwp.h
15711 do
15712 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15713 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15714 echo "configure:15715: checking for $ac_hdr" >&5
15715 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15716   echo $ac_n "(cached) $ac_c" 1>&6
15717 else
15718   cat > conftest.$ac_ext <<EOF
15719 #line 15720 "configure"
15720 #include "confdefs.h"
15721 #include <$ac_hdr>
15722 EOF
15723 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15724 { (eval echo configure:15725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15725 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15726 if test -z "$ac_err"; then
15727   rm -rf conftest*
15728   eval "ac_cv_header_$ac_safe=yes"
15729 else
15730   echo "$ac_err" >&5
15731   echo "configure: failed program was:" >&5
15732   cat conftest.$ac_ext >&5
15733   rm -rf conftest*
15734   eval "ac_cv_header_$ac_safe=no"
15735 fi
15736 rm -f conftest*
15737 fi
15738 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15739   echo "$ac_t""yes" 1>&6
15740     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15741   cat >> confdefs.h <<EOF
15742 #define $ac_tr_hdr 1
15743 EOF
15744  
15745 else
15746   echo "$ac_t""no" 1>&6
15747 fi
15748 done
15749
15750         if test $ac_cv_header_lwp_lwp_h = yes ; then
15751                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15752 echo "configure:15753: checking for lwp_create in -llwp" >&5
15753 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15754 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15755   echo $ac_n "(cached) $ac_c" 1>&6
15756 else
15757   ac_save_LIBS="$LIBS"
15758 LIBS="-llwp  $LIBS"
15759 cat > conftest.$ac_ext <<EOF
15760 #line 15761 "configure"
15761 #include "confdefs.h"
15762 /* Override any gcc2 internal prototype to avoid an error.  */
15763 /* We use char because int might match the return type of a gcc2
15764     builtin and then its argument prototype would still apply.  */
15765 char lwp_create();
15766
15767 int main() {
15768 lwp_create()
15769 ; return 0; }
15770 EOF
15771 if { (eval echo configure:15772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15772   rm -rf conftest*
15773   eval "ac_cv_lib_$ac_lib_var=yes"
15774 else
15775   echo "configure: failed program was:" >&5
15776   cat conftest.$ac_ext >&5
15777   rm -rf conftest*
15778   eval "ac_cv_lib_$ac_lib_var=no"
15779 fi
15780 rm -f conftest*
15781 LIBS="$ac_save_LIBS"
15782
15783 fi
15784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15785   echo "$ac_t""yes" 1>&6
15786   have_lwp=yes
15787 else
15788   echo "$ac_t""no" 1>&6
15789 have_lwp=no
15790 fi
15791
15792
15793                 if test $have_lwp = yes ; then
15794                         cat >> confdefs.h <<\EOF
15795 #define HAVE_LWP 1
15796 EOF
15797
15798                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15799                         ol_link_threads=lwp
15800
15801                         if test $ol_with_yielding_select = auto ; then
15802                                 ol_with_yielding_select=no
15803                         fi
15804                 fi
15805         fi
15806 fi
15807
15808 if test $ol_with_yielding_select = yes ; then
15809         cat >> confdefs.h <<\EOF
15810 #define HAVE_YIELDING_SELECT 1
15811 EOF
15812
15813 fi
15814
15815 if test $ol_with_threads = manual ; then
15816                 ol_link_threads=yes
15817
15818         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15819
15820         for ac_hdr in pthread.h sched.h
15821 do
15822 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15823 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15824 echo "configure:15825: checking for $ac_hdr" >&5
15825 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15826   echo $ac_n "(cached) $ac_c" 1>&6
15827 else
15828   cat > conftest.$ac_ext <<EOF
15829 #line 15830 "configure"
15830 #include "confdefs.h"
15831 #include <$ac_hdr>
15832 EOF
15833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15834 { (eval echo configure:15835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15836 if test -z "$ac_err"; then
15837   rm -rf conftest*
15838   eval "ac_cv_header_$ac_safe=yes"
15839 else
15840   echo "$ac_err" >&5
15841   echo "configure: failed program was:" >&5
15842   cat conftest.$ac_ext >&5
15843   rm -rf conftest*
15844   eval "ac_cv_header_$ac_safe=no"
15845 fi
15846 rm -f conftest*
15847 fi
15848 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15849   echo "$ac_t""yes" 1>&6
15850     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15851   cat >> confdefs.h <<EOF
15852 #define $ac_tr_hdr 1
15853 EOF
15854  
15855 else
15856   echo "$ac_t""no" 1>&6
15857 fi
15858 done
15859
15860         for ac_func in sched_yield pthread_yield
15861 do
15862 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15863 echo "configure:15864: checking for $ac_func" >&5
15864 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15865   echo $ac_n "(cached) $ac_c" 1>&6
15866 else
15867   cat > conftest.$ac_ext <<EOF
15868 #line 15869 "configure"
15869 #include "confdefs.h"
15870 /* System header to define __stub macros and hopefully few prototypes,
15871     which can conflict with char $ac_func(); below.  */
15872 #include <assert.h>
15873 /* Override any gcc2 internal prototype to avoid an error.  */
15874 /* We use char because int might match the return type of a gcc2
15875     builtin and then its argument prototype would still apply.  */
15876 char $ac_func();
15877 char (*f)();
15878
15879 int main() {
15880
15881 /* The GNU C library defines this for functions which it implements
15882     to always fail with ENOSYS.  Some functions are actually named
15883     something starting with __ and the normal name is an alias.  */
15884 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15885 choke me
15886 #else
15887 f = $ac_func;
15888 #endif
15889
15890 ; return 0; }
15891 EOF
15892 if { (eval echo configure:15893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15893   rm -rf conftest*
15894   eval "ac_cv_func_$ac_func=yes"
15895 else
15896   echo "configure: failed program was:" >&5
15897   cat conftest.$ac_ext >&5
15898   rm -rf conftest*
15899   eval "ac_cv_func_$ac_func=no"
15900 fi
15901 rm -f conftest*
15902 fi
15903
15904 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15905   echo "$ac_t""yes" 1>&6
15906     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15907   cat >> confdefs.h <<EOF
15908 #define $ac_tr_func 1
15909 EOF
15910  
15911 else
15912   echo "$ac_t""no" 1>&6
15913 fi
15914 done
15915
15916         
15917         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15918 echo "configure:15919: checking for LinuxThreads pthread.h" >&5
15919 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15920   echo $ac_n "(cached) $ac_c" 1>&6
15921 else
15922   cat > conftest.$ac_ext <<EOF
15923 #line 15924 "configure"
15924 #include "confdefs.h"
15925 #include <pthread.h>
15926 EOF
15927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15928   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15929   rm -rf conftest*
15930   ol_cv_header_linux_threads=yes
15931 else
15932   rm -rf conftest*
15933   ol_cv_header_linux_threads=no
15934 fi
15935 rm -f conftest*
15936
15937                 
15938 fi
15939
15940 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15941         if test $ol_cv_header_linux_threads = yes; then
15942                 cat >> confdefs.h <<\EOF
15943 #define HAVE_LINUX_THREADS 1
15944 EOF
15945
15946         fi
15947
15948
15949         for ac_hdr in mach/cthreads.h
15950 do
15951 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15952 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15953 echo "configure:15954: checking for $ac_hdr" >&5
15954 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15955   echo $ac_n "(cached) $ac_c" 1>&6
15956 else
15957   cat > conftest.$ac_ext <<EOF
15958 #line 15959 "configure"
15959 #include "confdefs.h"
15960 #include <$ac_hdr>
15961 EOF
15962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15963 { (eval echo configure:15964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15964 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15965 if test -z "$ac_err"; then
15966   rm -rf conftest*
15967   eval "ac_cv_header_$ac_safe=yes"
15968 else
15969   echo "$ac_err" >&5
15970   echo "configure: failed program was:" >&5
15971   cat conftest.$ac_ext >&5
15972   rm -rf conftest*
15973   eval "ac_cv_header_$ac_safe=no"
15974 fi
15975 rm -f conftest*
15976 fi
15977 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15978   echo "$ac_t""yes" 1>&6
15979     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15980   cat >> confdefs.h <<EOF
15981 #define $ac_tr_hdr 1
15982 EOF
15983  
15984 else
15985   echo "$ac_t""no" 1>&6
15986 fi
15987 done
15988
15989         for ac_hdr in lwp/lwp.h
15990 do
15991 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15992 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15993 echo "configure:15994: checking for $ac_hdr" >&5
15994 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15995   echo $ac_n "(cached) $ac_c" 1>&6
15996 else
15997   cat > conftest.$ac_ext <<EOF
15998 #line 15999 "configure"
15999 #include "confdefs.h"
16000 #include <$ac_hdr>
16001 EOF
16002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16003 { (eval echo configure:16004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16005 if test -z "$ac_err"; then
16006   rm -rf conftest*
16007   eval "ac_cv_header_$ac_safe=yes"
16008 else
16009   echo "$ac_err" >&5
16010   echo "configure: failed program was:" >&5
16011   cat conftest.$ac_ext >&5
16012   rm -rf conftest*
16013   eval "ac_cv_header_$ac_safe=no"
16014 fi
16015 rm -f conftest*
16016 fi
16017 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16018   echo "$ac_t""yes" 1>&6
16019     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16020   cat >> confdefs.h <<EOF
16021 #define $ac_tr_hdr 1
16022 EOF
16023  
16024 else
16025   echo "$ac_t""no" 1>&6
16026 fi
16027 done
16028
16029         for ac_hdr in thread.h synch.h
16030 do
16031 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16032 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16033 echo "configure:16034: checking for $ac_hdr" >&5
16034 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16035   echo $ac_n "(cached) $ac_c" 1>&6
16036 else
16037   cat > conftest.$ac_ext <<EOF
16038 #line 16039 "configure"
16039 #include "confdefs.h"
16040 #include <$ac_hdr>
16041 EOF
16042 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16043 { (eval echo configure:16044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16044 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16045 if test -z "$ac_err"; then
16046   rm -rf conftest*
16047   eval "ac_cv_header_$ac_safe=yes"
16048 else
16049   echo "$ac_err" >&5
16050   echo "configure: failed program was:" >&5
16051   cat conftest.$ac_ext >&5
16052   rm -rf conftest*
16053   eval "ac_cv_header_$ac_safe=no"
16054 fi
16055 rm -f conftest*
16056 fi
16057 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16058   echo "$ac_t""yes" 1>&6
16059     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16060   cat >> confdefs.h <<EOF
16061 #define $ac_tr_hdr 1
16062 EOF
16063  
16064 else
16065   echo "$ac_t""no" 1>&6
16066 fi
16067 done
16068
16069 fi
16070
16071 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16072                         cat >> confdefs.h <<\EOF
16073 #define REENTRANT 1
16074 EOF
16075
16076         cat >> confdefs.h <<\EOF
16077 #define _REENTRANT 1
16078 EOF
16079
16080         cat >> confdefs.h <<\EOF
16081 #define THREAD_SAFE 1
16082 EOF
16083
16084         cat >> confdefs.h <<\EOF
16085 #define _THREAD_SAFE 1
16086 EOF
16087
16088         cat >> confdefs.h <<\EOF
16089 #define THREADSAFE 1
16090 EOF
16091
16092         cat >> confdefs.h <<\EOF
16093 #define _THREADSAFE 1
16094 EOF
16095
16096         cat >> confdefs.h <<\EOF
16097 #define _SGI_MP_SOURCE 1
16098 EOF
16099
16100
16101                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16102 echo "configure:16103: checking for thread specific errno" >&5
16103 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16104   echo $ac_n "(cached) $ac_c" 1>&6
16105 else
16106   
16107                 cat > conftest.$ac_ext <<EOF
16108 #line 16109 "configure"
16109 #include "confdefs.h"
16110 #include <errno.h>
16111 int main() {
16112 errno = 0;
16113 ; return 0; }
16114 EOF
16115 if { (eval echo configure:16116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16116   rm -rf conftest*
16117   ol_cv_errno_thread_specific=yes
16118 else
16119   echo "configure: failed program was:" >&5
16120   cat conftest.$ac_ext >&5
16121   rm -rf conftest*
16122   ol_cv_errno_thread_specific=no
16123 fi
16124 rm -f conftest*
16125         
16126 fi
16127
16128 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16129
16130                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16131 echo "configure:16132: checking for thread specific h_errno" >&5
16132 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16133   echo $ac_n "(cached) $ac_c" 1>&6
16134 else
16135   
16136                 cat > conftest.$ac_ext <<EOF
16137 #line 16138 "configure"
16138 #include "confdefs.h"
16139 #include <netdb.h>
16140 int main() {
16141 h_errno = 0;
16142 ; return 0; }
16143 EOF
16144 if { (eval echo configure:16145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16145   rm -rf conftest*
16146   ol_cv_h_errno_thread_specific=yes
16147 else
16148   echo "configure: failed program was:" >&5
16149   cat conftest.$ac_ext >&5
16150   rm -rf conftest*
16151   ol_cv_h_errno_thread_specific=no
16152 fi
16153 rm -f conftest*
16154         
16155 fi
16156
16157 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16158
16159         if test $ol_cv_errno_thread_specific != yes \
16160                 -o $ol_cv_h_errno_thread_specific != yes ; then
16161                 LIBS="$LTHREAD_LIBS $LIBS"
16162                 LTHREAD_LIBS=""
16163         fi
16164
16165 fi  
16166
16167 if test $ol_link_threads = no ; then
16168         if test $ol_with_threads = yes ; then
16169                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16170         fi
16171
16172         if test $ol_with_threads = auto ; then
16173                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16174                 ol_with_threads=no
16175         fi
16176
16177         cat >> confdefs.h <<\EOF
16178 #define NO_THREADS 1
16179 EOF
16180
16181         LTHREAD_LIBS=""
16182 fi
16183
16184 if test $ol_link_threads != no ; then
16185         cat >> confdefs.h <<\EOF
16186 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16187 EOF
16188
16189 fi
16190
16191 for ac_func in \
16192         ctime_r                 \
16193         gethostbyname_r gethostbyaddr_r \
16194
16195 do
16196 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16197 echo "configure:16198: checking for $ac_func" >&5
16198 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16199   echo $ac_n "(cached) $ac_c" 1>&6
16200 else
16201   cat > conftest.$ac_ext <<EOF
16202 #line 16203 "configure"
16203 #include "confdefs.h"
16204 /* System header to define __stub macros and hopefully few prototypes,
16205     which can conflict with char $ac_func(); below.  */
16206 #include <assert.h>
16207 /* Override any gcc2 internal prototype to avoid an error.  */
16208 /* We use char because int might match the return type of a gcc2
16209     builtin and then its argument prototype would still apply.  */
16210 char $ac_func();
16211 char (*f)();
16212
16213 int main() {
16214
16215 /* The GNU C library defines this for functions which it implements
16216     to always fail with ENOSYS.  Some functions are actually named
16217     something starting with __ and the normal name is an alias.  */
16218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16219 choke me
16220 #else
16221 f = $ac_func;
16222 #endif
16223
16224 ; return 0; }
16225 EOF
16226 if { (eval echo configure:16227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16227   rm -rf conftest*
16228   eval "ac_cv_func_$ac_func=yes"
16229 else
16230   echo "configure: failed program was:" >&5
16231   cat conftest.$ac_ext >&5
16232   rm -rf conftest*
16233   eval "ac_cv_func_$ac_func=no"
16234 fi
16235 rm -f conftest*
16236 fi
16237
16238 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16239   echo "$ac_t""yes" 1>&6
16240     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16241   cat >> confdefs.h <<EOF
16242 #define $ac_tr_func 1
16243 EOF
16244  
16245 else
16246   echo "$ac_t""no" 1>&6
16247 fi
16248 done
16249
16250
16251 if test "$ac_cv_func_ctime_r" = no ; then
16252         ol_cv_func_ctime_r_nargs=0
16253 else
16254         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16255 echo "configure:16256: checking number of arguments of ctime_r" >&5
16256 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16257   echo $ac_n "(cached) $ac_c" 1>&6
16258 else
16259   cat > conftest.$ac_ext <<EOF
16260 #line 16261 "configure"
16261 #include "confdefs.h"
16262 #include <time.h>
16263 int main() {
16264 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16265 ; return 0; }
16266 EOF
16267 if { (eval echo configure:16268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16268   rm -rf conftest*
16269   ol_cv_func_ctime_r_nargs3=yes
16270 else
16271   echo "configure: failed program was:" >&5
16272   cat conftest.$ac_ext >&5
16273   rm -rf conftest*
16274   ol_cv_func_ctime_r_nargs3=no
16275 fi
16276 rm -f conftest*
16277
16278         cat > conftest.$ac_ext <<EOF
16279 #line 16280 "configure"
16280 #include "confdefs.h"
16281 #include <time.h>
16282 int main() {
16283 time_t ti; char *buffer; ctime_r(&ti,buffer);
16284 ; return 0; }
16285 EOF
16286 if { (eval echo configure:16287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16287   rm -rf conftest*
16288   ol_cv_func_ctime_r_nargs2=yes
16289 else
16290   echo "configure: failed program was:" >&5
16291   cat conftest.$ac_ext >&5
16292   rm -rf conftest*
16293   ol_cv_func_ctime_r_nargs2=no
16294 fi
16295 rm -f conftest*
16296
16297         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16298                 $ol_cv_func_ctime_r_nargs2 = no ; then
16299
16300                 ol_cv_func_ctime_r_nargs=3
16301
16302         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16303                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16304
16305                 ol_cv_func_ctime_r_nargs=2
16306
16307         else
16308                 ol_cv_func_ctime_r_nargs=0
16309         fi
16310   
16311 fi
16312
16313 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16314
16315   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16316         cat >> confdefs.h <<EOF
16317 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16318 EOF
16319
16320   fi
16321
16322 fi
16323
16324 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16325         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16326 echo "configure:16327: checking number of arguments of gethostbyname_r" >&5
16327 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16328   echo $ac_n "(cached) $ac_c" 1>&6
16329 else
16330   cat > conftest.$ac_ext <<EOF
16331 #line 16332 "configure"
16332 #include "confdefs.h"
16333 #include <sys/types.h>
16334 #include <sys/socket.h>
16335 #include <netinet/in.h>
16336 #include <netdb.h>
16337 #define BUFSIZE (sizeof(struct hostent)+10)
16338 int main() {
16339 struct hostent hent; char buffer[BUFSIZE];
16340                 int bufsize=BUFSIZE;int h_errno;
16341                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16342                         buffer, bufsize, &h_errno);
16343 ; return 0; }
16344 EOF
16345 if { (eval echo configure:16346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16346   rm -rf conftest*
16347   ol_cv_func_gethostbyname_r_nargs5=yes
16348 else
16349   echo "configure: failed program was:" >&5
16350   cat conftest.$ac_ext >&5
16351   rm -rf conftest*
16352   ol_cv_func_gethostbyname_r_nargs5=no
16353 fi
16354 rm -f conftest*
16355
16356         cat > conftest.$ac_ext <<EOF
16357 #line 16358 "configure"
16358 #include "confdefs.h"
16359 #include <sys/types.h>
16360 #include <sys/socket.h>
16361 #include <netinet/in.h>
16362 #include <netdb.h>
16363 #define BUFSIZE (sizeof(struct hostent)+10)
16364 int main() {
16365 struct hostent hent;struct hostent *rhent;
16366                 char buffer[BUFSIZE];
16367                 int bufsize=BUFSIZE;int h_errno;
16368                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16369                         &rhent, &h_errno);
16370 ; return 0; }
16371 EOF
16372 if { (eval echo configure:16373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16373   rm -rf conftest*
16374   ol_cv_func_gethostbyname_r_nargs6=yes
16375 else
16376   echo "configure: failed program was:" >&5
16377   cat conftest.$ac_ext >&5
16378   rm -rf conftest*
16379   ol_cv_func_gethostbyname_r_nargs6=no
16380 fi
16381 rm -f conftest*
16382
16383         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16384                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16385
16386                 ol_cv_func_gethostbyname_r_nargs=5
16387
16388         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16389                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16390
16391                 ol_cv_func_gethostbyname_r_nargs=6
16392
16393         else
16394                 ol_cv_func_gethostbyname_r_nargs=0
16395         fi
16396   
16397 fi
16398
16399 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16400   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16401         cat >> confdefs.h <<EOF
16402 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16403 EOF
16404
16405   fi
16406
16407 else
16408         ol_cv_func_gethostbyname_r_nargs=0
16409 fi
16410  
16411 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16412         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16413 echo "configure:16414: checking number of arguments of gethostbyaddr_r" >&5
16414 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16415   echo $ac_n "(cached) $ac_c" 1>&6
16416 else
16417   cat > conftest.$ac_ext <<EOF
16418 #line 16419 "configure"
16419 #include "confdefs.h"
16420 #include <sys/types.h>
16421 #include <sys/socket.h>
16422 #include <netinet/in.h>
16423 #include <netdb.h>
16424 #define BUFSIZE (sizeof(struct hostent)+10)
16425 int main() {
16426 struct hostent hent; char buffer[BUFSIZE]; 
16427             struct in_addr add;
16428             size_t alen=sizeof(struct in_addr);
16429             int bufsize=BUFSIZE;int h_errno;
16430                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16431                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16432 ; return 0; }
16433 EOF
16434 if { (eval echo configure:16435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16435   rm -rf conftest*
16436   ol_cv_func_gethostbyaddr_r_nargs7=yes
16437 else
16438   echo "configure: failed program was:" >&5
16439   cat conftest.$ac_ext >&5
16440   rm -rf conftest*
16441   ol_cv_func_gethostbyaddr_r_nargs7=no
16442 fi
16443 rm -f conftest*
16444
16445         cat > conftest.$ac_ext <<EOF
16446 #line 16447 "configure"
16447 #include "confdefs.h"
16448 #include <sys/types.h>
16449 #include <sys/socket.h>
16450 #include <netinet/in.h>
16451 #include <netdb.h>
16452 #define BUFSIZE (sizeof(struct hostent)+10)
16453 int main() {
16454 struct hostent hent;
16455                 struct hostent *rhent; char buffer[BUFSIZE]; 
16456                 struct in_addr add;
16457                 size_t alen=sizeof(struct in_addr);
16458                 int bufsize=BUFSIZE;int h_errno;
16459                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16460                         alen, AF_INET, &hent, buffer, bufsize, 
16461                         &rhent, &h_errno);
16462 ; return 0; }
16463 EOF
16464 if { (eval echo configure:16465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16465   rm -rf conftest*
16466   ol_cv_func_gethostbyaddr_r_nargs8=yes
16467 else
16468   echo "configure: failed program was:" >&5
16469   cat conftest.$ac_ext >&5
16470   rm -rf conftest*
16471   ol_cv_func_gethostbyaddr_r_nargs8=no
16472 fi
16473 rm -f conftest*
16474
16475         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16476                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16477
16478                 ol_cv_func_gethostbyaddr_r_nargs=7
16479
16480         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16481                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16482
16483                 ol_cv_func_gethostbyaddr_r_nargs=8
16484
16485         else
16486                 ol_cv_func_gethostbyaddr_r_nargs=0
16487         fi
16488   
16489 fi
16490
16491 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16492   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16493     cat >> confdefs.h <<EOF
16494 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16495 EOF
16496
16497   fi
16498
16499 else
16500         ol_cv_func_gethostbyaddr_r_nargs=0
16501 fi
16502
16503 ol_link_ldbm=no 
16504
16505 if test $ol_with_ldbm_api = auto \
16506         -o $ol_with_ldbm_api = berkeley \
16507         -o $ol_with_ldbm_api = bcompat ; then
16508
16509         if test $ol_with_ldbm_api = bcompat; then \
16510                 for ac_hdr in db_185.h db.h
16511 do
16512 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16513 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16514 echo "configure:16515: checking for $ac_hdr" >&5
16515 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16516   echo $ac_n "(cached) $ac_c" 1>&6
16517 else
16518   cat > conftest.$ac_ext <<EOF
16519 #line 16520 "configure"
16520 #include "confdefs.h"
16521 #include <$ac_hdr>
16522 EOF
16523 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16524 { (eval echo configure:16525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16525 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16526 if test -z "$ac_err"; then
16527   rm -rf conftest*
16528   eval "ac_cv_header_$ac_safe=yes"
16529 else
16530   echo "$ac_err" >&5
16531   echo "configure: failed program was:" >&5
16532   cat conftest.$ac_ext >&5
16533   rm -rf conftest*
16534   eval "ac_cv_header_$ac_safe=no"
16535 fi
16536 rm -f conftest*
16537 fi
16538 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16539   echo "$ac_t""yes" 1>&6
16540     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16541   cat >> confdefs.h <<EOF
16542 #define $ac_tr_hdr 1
16543 EOF
16544  
16545 else
16546   echo "$ac_t""no" 1>&6
16547 fi
16548 done
16549
16550 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16551         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16552 echo "configure:16553: checking if Berkeley DB header compatibility" >&5
16553 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16554   echo $ac_n "(cached) $ac_c" 1>&6
16555 else
16556   
16557                 cat > conftest.$ac_ext <<EOF
16558 #line 16559 "configure"
16559 #include "confdefs.h"
16560
16561 #if HAVE_DB_185_H
16562 #       include <db_185.h>
16563 #else
16564 #       include <db.h>
16565 #endif
16566
16567  /* this check could be improved */
16568 #ifndef DB_VERSION_MAJOR
16569 #       define DB_VERSION_MAJOR 1
16570 #endif
16571
16572 #if DB_VERSION_MAJOR == 1 
16573         __db_version_1
16574 #endif
16575
16576 EOF
16577 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16578   egrep "__db_version_1" >/dev/null 2>&1; then
16579   rm -rf conftest*
16580   ol_cv_header_db1=yes
16581 else
16582   rm -rf conftest*
16583   ol_cv_header_db1=no
16584 fi
16585 rm -f conftest*
16586
16587 fi
16588
16589 echo "$ac_t""$ol_cv_header_db1" 1>&6
16590
16591         if test $ol_cv_header_db1 = yes ; then
16592                 ol_cv_lib_db=no
16593 if test $ol_cv_lib_db = no ; then
16594         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16595 echo "configure:16596: checking for Berkeley DB link (default)" >&5
16596 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16597   echo $ac_n "(cached) $ac_c" 1>&6
16598 else
16599   
16600         ol_DB_LIB=
16601         ol_LIBS=$LIBS
16602         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16603
16604         cat > conftest.$ac_ext <<EOF
16605 #line 16606 "configure"
16606 #include "confdefs.h"
16607
16608 #ifdef HAVE_DB_185_H
16609 # include <db_185.h>
16610 #else
16611 # include <db.h>
16612 #endif
16613
16614 #ifndef DB_VERSION_MAJOR
16615 # define DB_VERSION_MAJOR 1
16616 #endif
16617
16618 #ifndef NULL
16619 #define NULL ((void*)0)
16620 #endif
16621
16622 int main() {
16623
16624 #if DB_VERSION_MAJOR > 1
16625         {
16626                 char *version;
16627                 int major, minor, patch;
16628
16629                 version = db_version( &major, &minor, &patch );
16630
16631                 if( major != DB_VERSION_MAJOR ||
16632                         minor < DB_VERSION_MINOR )
16633                 {
16634                         printf("Berkeley DB version mismatch\n"
16635                                 "\texpected: %s\n\tgot: %s\n",
16636                                 DB_VERSION_STRING, version);
16637                         return 1;
16638                 }
16639         }
16640 #endif
16641
16642 #if DB_VERSION_MAJOR > 2
16643         db_env_create( NULL, 0 );
16644 #elif DB_VERSION_MAJOR > 1
16645         db_appexit( NULL );
16646 #else
16647         (void) dbopen( NULL, 0, 0, 0, NULL);
16648 #endif
16649
16650 ; return 0; }
16651 EOF
16652 if { (eval echo configure:16653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16653   rm -rf conftest*
16654   ol_cv_db_none=yes
16655 else
16656   echo "configure: failed program was:" >&5
16657   cat conftest.$ac_ext >&5
16658   rm -rf conftest*
16659   ol_cv_db_none=no
16660 fi
16661 rm -f conftest*
16662
16663         LIBS="$ol_LIBS"
16664
16665 fi
16666
16667 echo "$ac_t""$ol_cv_db_none" 1>&6
16668
16669         if test $ol_cv_db_none = yes ; then
16670                 ol_cv_lib_db=yes
16671         fi
16672 fi
16673
16674 if test $ol_cv_lib_db = no ; then
16675         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16676 echo "configure:16677: checking for Berkeley DB link (-ldb42)" >&5
16677 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16678   echo $ac_n "(cached) $ac_c" 1>&6
16679 else
16680   
16681         ol_DB_LIB=-ldb42
16682         ol_LIBS=$LIBS
16683         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16684
16685         cat > conftest.$ac_ext <<EOF
16686 #line 16687 "configure"
16687 #include "confdefs.h"
16688
16689 #ifdef HAVE_DB_185_H
16690 # include <db_185.h>
16691 #else
16692 # include <db.h>
16693 #endif
16694
16695 #ifndef DB_VERSION_MAJOR
16696 # define DB_VERSION_MAJOR 1
16697 #endif
16698
16699 #ifndef NULL
16700 #define NULL ((void*)0)
16701 #endif
16702
16703 int main() {
16704
16705 #if DB_VERSION_MAJOR > 1
16706         {
16707                 char *version;
16708                 int major, minor, patch;
16709
16710                 version = db_version( &major, &minor, &patch );
16711
16712                 if( major != DB_VERSION_MAJOR ||
16713                         minor < DB_VERSION_MINOR )
16714                 {
16715                         printf("Berkeley DB version mismatch\n"
16716                                 "\texpected: %s\n\tgot: %s\n",
16717                                 DB_VERSION_STRING, version);
16718                         return 1;
16719                 }
16720         }
16721 #endif
16722
16723 #if DB_VERSION_MAJOR > 2
16724         db_env_create( NULL, 0 );
16725 #elif DB_VERSION_MAJOR > 1
16726         db_appexit( NULL );
16727 #else
16728         (void) dbopen( NULL, 0, 0, 0, NULL);
16729 #endif
16730
16731 ; return 0; }
16732 EOF
16733 if { (eval echo configure:16734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16734   rm -rf conftest*
16735   ol_cv_db_db42=yes
16736 else
16737   echo "configure: failed program was:" >&5
16738   cat conftest.$ac_ext >&5
16739   rm -rf conftest*
16740   ol_cv_db_db42=no
16741 fi
16742 rm -f conftest*
16743
16744         LIBS="$ol_LIBS"
16745
16746 fi
16747
16748 echo "$ac_t""$ol_cv_db_db42" 1>&6
16749
16750         if test $ol_cv_db_db42 = yes ; then
16751                 ol_cv_lib_db=-ldb42
16752         fi
16753 fi
16754
16755 if test $ol_cv_lib_db = no ; then
16756         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16757 echo "configure:16758: checking for Berkeley DB link (-ldb-42)" >&5
16758 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16759   echo $ac_n "(cached) $ac_c" 1>&6
16760 else
16761   
16762         ol_DB_LIB=-ldb-42
16763         ol_LIBS=$LIBS
16764         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16765
16766         cat > conftest.$ac_ext <<EOF
16767 #line 16768 "configure"
16768 #include "confdefs.h"
16769
16770 #ifdef HAVE_DB_185_H
16771 # include <db_185.h>
16772 #else
16773 # include <db.h>
16774 #endif
16775
16776 #ifndef DB_VERSION_MAJOR
16777 # define DB_VERSION_MAJOR 1
16778 #endif
16779
16780 #ifndef NULL
16781 #define NULL ((void*)0)
16782 #endif
16783
16784 int main() {
16785
16786 #if DB_VERSION_MAJOR > 1
16787         {
16788                 char *version;
16789                 int major, minor, patch;
16790
16791                 version = db_version( &major, &minor, &patch );
16792
16793                 if( major != DB_VERSION_MAJOR ||
16794                         minor < DB_VERSION_MINOR )
16795                 {
16796                         printf("Berkeley DB version mismatch\n"
16797                                 "\texpected: %s\n\tgot: %s\n",
16798                                 DB_VERSION_STRING, version);
16799                         return 1;
16800                 }
16801         }
16802 #endif
16803
16804 #if DB_VERSION_MAJOR > 2
16805         db_env_create( NULL, 0 );
16806 #elif DB_VERSION_MAJOR > 1
16807         db_appexit( NULL );
16808 #else
16809         (void) dbopen( NULL, 0, 0, 0, NULL);
16810 #endif
16811
16812 ; return 0; }
16813 EOF
16814 if { (eval echo configure:16815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16815   rm -rf conftest*
16816   ol_cv_db_db_42=yes
16817 else
16818   echo "configure: failed program was:" >&5
16819   cat conftest.$ac_ext >&5
16820   rm -rf conftest*
16821   ol_cv_db_db_42=no
16822 fi
16823 rm -f conftest*
16824
16825         LIBS="$ol_LIBS"
16826
16827 fi
16828
16829 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16830
16831         if test $ol_cv_db_db_42 = yes ; then
16832                 ol_cv_lib_db=-ldb-42
16833         fi
16834 fi
16835
16836 if test $ol_cv_lib_db = no ; then
16837         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16838 echo "configure:16839: checking for Berkeley DB link (-ldb-4.2)" >&5
16839 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16840   echo $ac_n "(cached) $ac_c" 1>&6
16841 else
16842   
16843         ol_DB_LIB=-ldb-4.2
16844         ol_LIBS=$LIBS
16845         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16846
16847         cat > conftest.$ac_ext <<EOF
16848 #line 16849 "configure"
16849 #include "confdefs.h"
16850
16851 #ifdef HAVE_DB_185_H
16852 # include <db_185.h>
16853 #else
16854 # include <db.h>
16855 #endif
16856
16857 #ifndef DB_VERSION_MAJOR
16858 # define DB_VERSION_MAJOR 1
16859 #endif
16860
16861 #ifndef NULL
16862 #define NULL ((void*)0)
16863 #endif
16864
16865 int main() {
16866
16867 #if DB_VERSION_MAJOR > 1
16868         {
16869                 char *version;
16870                 int major, minor, patch;
16871
16872                 version = db_version( &major, &minor, &patch );
16873
16874                 if( major != DB_VERSION_MAJOR ||
16875                         minor < DB_VERSION_MINOR )
16876                 {
16877                         printf("Berkeley DB version mismatch\n"
16878                                 "\texpected: %s\n\tgot: %s\n",
16879                                 DB_VERSION_STRING, version);
16880                         return 1;
16881                 }
16882         }
16883 #endif
16884
16885 #if DB_VERSION_MAJOR > 2
16886         db_env_create( NULL, 0 );
16887 #elif DB_VERSION_MAJOR > 1
16888         db_appexit( NULL );
16889 #else
16890         (void) dbopen( NULL, 0, 0, 0, NULL);
16891 #endif
16892
16893 ; return 0; }
16894 EOF
16895 if { (eval echo configure:16896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16896   rm -rf conftest*
16897   ol_cv_db_db_4_dot_2=yes
16898 else
16899   echo "configure: failed program was:" >&5
16900   cat conftest.$ac_ext >&5
16901   rm -rf conftest*
16902   ol_cv_db_db_4_dot_2=no
16903 fi
16904 rm -f conftest*
16905
16906         LIBS="$ol_LIBS"
16907
16908 fi
16909
16910 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16911
16912         if test $ol_cv_db_db_4_dot_2 = yes ; then
16913                 ol_cv_lib_db=-ldb-4.2
16914         fi
16915 fi
16916
16917 if test $ol_cv_lib_db = no ; then
16918         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16919 echo "configure:16920: checking for Berkeley DB link (-ldb-4-2)" >&5
16920 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16921   echo $ac_n "(cached) $ac_c" 1>&6
16922 else
16923   
16924         ol_DB_LIB=-ldb-4-2
16925         ol_LIBS=$LIBS
16926         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16927
16928         cat > conftest.$ac_ext <<EOF
16929 #line 16930 "configure"
16930 #include "confdefs.h"
16931
16932 #ifdef HAVE_DB_185_H
16933 # include <db_185.h>
16934 #else
16935 # include <db.h>
16936 #endif
16937
16938 #ifndef DB_VERSION_MAJOR
16939 # define DB_VERSION_MAJOR 1
16940 #endif
16941
16942 #ifndef NULL
16943 #define NULL ((void*)0)
16944 #endif
16945
16946 int main() {
16947
16948 #if DB_VERSION_MAJOR > 1
16949         {
16950                 char *version;
16951                 int major, minor, patch;
16952
16953                 version = db_version( &major, &minor, &patch );
16954
16955                 if( major != DB_VERSION_MAJOR ||
16956                         minor < DB_VERSION_MINOR )
16957                 {
16958                         printf("Berkeley DB version mismatch\n"
16959                                 "\texpected: %s\n\tgot: %s\n",
16960                                 DB_VERSION_STRING, version);
16961                         return 1;
16962                 }
16963         }
16964 #endif
16965
16966 #if DB_VERSION_MAJOR > 2
16967         db_env_create( NULL, 0 );
16968 #elif DB_VERSION_MAJOR > 1
16969         db_appexit( NULL );
16970 #else
16971         (void) dbopen( NULL, 0, 0, 0, NULL);
16972 #endif
16973
16974 ; return 0; }
16975 EOF
16976 if { (eval echo configure:16977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16977   rm -rf conftest*
16978   ol_cv_db_db_4_2=yes
16979 else
16980   echo "configure: failed program was:" >&5
16981   cat conftest.$ac_ext >&5
16982   rm -rf conftest*
16983   ol_cv_db_db_4_2=no
16984 fi
16985 rm -f conftest*
16986
16987         LIBS="$ol_LIBS"
16988
16989 fi
16990
16991 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
16992
16993         if test $ol_cv_db_db_4_2 = yes ; then
16994                 ol_cv_lib_db=-ldb-4-2
16995         fi
16996 fi
16997
16998 if test $ol_cv_lib_db = no ; then
16999         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17000 echo "configure:17001: checking for Berkeley DB link (-ldb-4)" >&5
17001 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17002   echo $ac_n "(cached) $ac_c" 1>&6
17003 else
17004   
17005         ol_DB_LIB=-ldb-4
17006         ol_LIBS=$LIBS
17007         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17008
17009         cat > conftest.$ac_ext <<EOF
17010 #line 17011 "configure"
17011 #include "confdefs.h"
17012
17013 #ifdef HAVE_DB_185_H
17014 # include <db_185.h>
17015 #else
17016 # include <db.h>
17017 #endif
17018
17019 #ifndef DB_VERSION_MAJOR
17020 # define DB_VERSION_MAJOR 1
17021 #endif
17022
17023 #ifndef NULL
17024 #define NULL ((void*)0)
17025 #endif
17026
17027 int main() {
17028
17029 #if DB_VERSION_MAJOR > 1
17030         {
17031                 char *version;
17032                 int major, minor, patch;
17033
17034                 version = db_version( &major, &minor, &patch );
17035
17036                 if( major != DB_VERSION_MAJOR ||
17037                         minor < DB_VERSION_MINOR )
17038                 {
17039                         printf("Berkeley DB version mismatch\n"
17040                                 "\texpected: %s\n\tgot: %s\n",
17041                                 DB_VERSION_STRING, version);
17042                         return 1;
17043                 }
17044         }
17045 #endif
17046
17047 #if DB_VERSION_MAJOR > 2
17048         db_env_create( NULL, 0 );
17049 #elif DB_VERSION_MAJOR > 1
17050         db_appexit( NULL );
17051 #else
17052         (void) dbopen( NULL, 0, 0, 0, NULL);
17053 #endif
17054
17055 ; return 0; }
17056 EOF
17057 if { (eval echo configure:17058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17058   rm -rf conftest*
17059   ol_cv_db_db_4=yes
17060 else
17061   echo "configure: failed program was:" >&5
17062   cat conftest.$ac_ext >&5
17063   rm -rf conftest*
17064   ol_cv_db_db_4=no
17065 fi
17066 rm -f conftest*
17067
17068         LIBS="$ol_LIBS"
17069
17070 fi
17071
17072 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17073
17074         if test $ol_cv_db_db_4 = yes ; then
17075                 ol_cv_lib_db=-ldb-4
17076         fi
17077 fi
17078
17079 if test $ol_cv_lib_db = no ; then
17080         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17081 echo "configure:17082: checking for Berkeley DB link (-ldb4)" >&5
17082 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17083   echo $ac_n "(cached) $ac_c" 1>&6
17084 else
17085   
17086         ol_DB_LIB=-ldb4
17087         ol_LIBS=$LIBS
17088         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17089
17090         cat > conftest.$ac_ext <<EOF
17091 #line 17092 "configure"
17092 #include "confdefs.h"
17093
17094 #ifdef HAVE_DB_185_H
17095 # include <db_185.h>
17096 #else
17097 # include <db.h>
17098 #endif
17099
17100 #ifndef DB_VERSION_MAJOR
17101 # define DB_VERSION_MAJOR 1
17102 #endif
17103
17104 #ifndef NULL
17105 #define NULL ((void*)0)
17106 #endif
17107
17108 int main() {
17109
17110 #if DB_VERSION_MAJOR > 1
17111         {
17112                 char *version;
17113                 int major, minor, patch;
17114
17115                 version = db_version( &major, &minor, &patch );
17116
17117                 if( major != DB_VERSION_MAJOR ||
17118                         minor < DB_VERSION_MINOR )
17119                 {
17120                         printf("Berkeley DB version mismatch\n"
17121                                 "\texpected: %s\n\tgot: %s\n",
17122                                 DB_VERSION_STRING, version);
17123                         return 1;
17124                 }
17125         }
17126 #endif
17127
17128 #if DB_VERSION_MAJOR > 2
17129         db_env_create( NULL, 0 );
17130 #elif DB_VERSION_MAJOR > 1
17131         db_appexit( NULL );
17132 #else
17133         (void) dbopen( NULL, 0, 0, 0, NULL);
17134 #endif
17135
17136 ; return 0; }
17137 EOF
17138 if { (eval echo configure:17139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17139   rm -rf conftest*
17140   ol_cv_db_db4=yes
17141 else
17142   echo "configure: failed program was:" >&5
17143   cat conftest.$ac_ext >&5
17144   rm -rf conftest*
17145   ol_cv_db_db4=no
17146 fi
17147 rm -f conftest*
17148
17149         LIBS="$ol_LIBS"
17150
17151 fi
17152
17153 echo "$ac_t""$ol_cv_db_db4" 1>&6
17154
17155         if test $ol_cv_db_db4 = yes ; then
17156                 ol_cv_lib_db=-ldb4
17157         fi
17158 fi
17159
17160 if test $ol_cv_lib_db = no ; then
17161         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17162 echo "configure:17163: checking for Berkeley DB link (-ldb)" >&5
17163 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17164   echo $ac_n "(cached) $ac_c" 1>&6
17165 else
17166   
17167         ol_DB_LIB=-ldb
17168         ol_LIBS=$LIBS
17169         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17170
17171         cat > conftest.$ac_ext <<EOF
17172 #line 17173 "configure"
17173 #include "confdefs.h"
17174
17175 #ifdef HAVE_DB_185_H
17176 # include <db_185.h>
17177 #else
17178 # include <db.h>
17179 #endif
17180
17181 #ifndef DB_VERSION_MAJOR
17182 # define DB_VERSION_MAJOR 1
17183 #endif
17184
17185 #ifndef NULL
17186 #define NULL ((void*)0)
17187 #endif
17188
17189 int main() {
17190
17191 #if DB_VERSION_MAJOR > 1
17192         {
17193                 char *version;
17194                 int major, minor, patch;
17195
17196                 version = db_version( &major, &minor, &patch );
17197
17198                 if( major != DB_VERSION_MAJOR ||
17199                         minor < DB_VERSION_MINOR )
17200                 {
17201                         printf("Berkeley DB version mismatch\n"
17202                                 "\texpected: %s\n\tgot: %s\n",
17203                                 DB_VERSION_STRING, version);
17204                         return 1;
17205                 }
17206         }
17207 #endif
17208
17209 #if DB_VERSION_MAJOR > 2
17210         db_env_create( NULL, 0 );
17211 #elif DB_VERSION_MAJOR > 1
17212         db_appexit( NULL );
17213 #else
17214         (void) dbopen( NULL, 0, 0, 0, NULL);
17215 #endif
17216
17217 ; return 0; }
17218 EOF
17219 if { (eval echo configure:17220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17220   rm -rf conftest*
17221   ol_cv_db_db=yes
17222 else
17223   echo "configure: failed program was:" >&5
17224   cat conftest.$ac_ext >&5
17225   rm -rf conftest*
17226   ol_cv_db_db=no
17227 fi
17228 rm -f conftest*
17229
17230         LIBS="$ol_LIBS"
17231
17232 fi
17233
17234 echo "$ac_t""$ol_cv_db_db" 1>&6
17235
17236         if test $ol_cv_db_db = yes ; then
17237                 ol_cv_lib_db=-ldb
17238         fi
17239 fi
17240
17241 if test $ol_cv_lib_db = no ; then
17242         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17243 echo "configure:17244: checking for Berkeley DB link (-ldb41)" >&5
17244 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17245   echo $ac_n "(cached) $ac_c" 1>&6
17246 else
17247   
17248         ol_DB_LIB=-ldb41
17249         ol_LIBS=$LIBS
17250         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17251
17252         cat > conftest.$ac_ext <<EOF
17253 #line 17254 "configure"
17254 #include "confdefs.h"
17255
17256 #ifdef HAVE_DB_185_H
17257 # include <db_185.h>
17258 #else
17259 # include <db.h>
17260 #endif
17261
17262 #ifndef DB_VERSION_MAJOR
17263 # define DB_VERSION_MAJOR 1
17264 #endif
17265
17266 #ifndef NULL
17267 #define NULL ((void*)0)
17268 #endif
17269
17270 int main() {
17271
17272 #if DB_VERSION_MAJOR > 1
17273         {
17274                 char *version;
17275                 int major, minor, patch;
17276
17277                 version = db_version( &major, &minor, &patch );
17278
17279                 if( major != DB_VERSION_MAJOR ||
17280                         minor < DB_VERSION_MINOR )
17281                 {
17282                         printf("Berkeley DB version mismatch\n"
17283                                 "\texpected: %s\n\tgot: %s\n",
17284                                 DB_VERSION_STRING, version);
17285                         return 1;
17286                 }
17287         }
17288 #endif
17289
17290 #if DB_VERSION_MAJOR > 2
17291         db_env_create( NULL, 0 );
17292 #elif DB_VERSION_MAJOR > 1
17293         db_appexit( NULL );
17294 #else
17295         (void) dbopen( NULL, 0, 0, 0, NULL);
17296 #endif
17297
17298 ; return 0; }
17299 EOF
17300 if { (eval echo configure:17301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17301   rm -rf conftest*
17302   ol_cv_db_db41=yes
17303 else
17304   echo "configure: failed program was:" >&5
17305   cat conftest.$ac_ext >&5
17306   rm -rf conftest*
17307   ol_cv_db_db41=no
17308 fi
17309 rm -f conftest*
17310
17311         LIBS="$ol_LIBS"
17312
17313 fi
17314
17315 echo "$ac_t""$ol_cv_db_db41" 1>&6
17316
17317         if test $ol_cv_db_db41 = yes ; then
17318                 ol_cv_lib_db=-ldb41
17319         fi
17320 fi
17321
17322 if test $ol_cv_lib_db = no ; then
17323         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17324 echo "configure:17325: checking for Berkeley DB link (-ldb-41)" >&5
17325 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17326   echo $ac_n "(cached) $ac_c" 1>&6
17327 else
17328   
17329         ol_DB_LIB=-ldb-41
17330         ol_LIBS=$LIBS
17331         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17332
17333         cat > conftest.$ac_ext <<EOF
17334 #line 17335 "configure"
17335 #include "confdefs.h"
17336
17337 #ifdef HAVE_DB_185_H
17338 # include <db_185.h>
17339 #else
17340 # include <db.h>
17341 #endif
17342
17343 #ifndef DB_VERSION_MAJOR
17344 # define DB_VERSION_MAJOR 1
17345 #endif
17346
17347 #ifndef NULL
17348 #define NULL ((void*)0)
17349 #endif
17350
17351 int main() {
17352
17353 #if DB_VERSION_MAJOR > 1
17354         {
17355                 char *version;
17356                 int major, minor, patch;
17357
17358                 version = db_version( &major, &minor, &patch );
17359
17360                 if( major != DB_VERSION_MAJOR ||
17361                         minor < DB_VERSION_MINOR )
17362                 {
17363                         printf("Berkeley DB version mismatch\n"
17364                                 "\texpected: %s\n\tgot: %s\n",
17365                                 DB_VERSION_STRING, version);
17366                         return 1;
17367                 }
17368         }
17369 #endif
17370
17371 #if DB_VERSION_MAJOR > 2
17372         db_env_create( NULL, 0 );
17373 #elif DB_VERSION_MAJOR > 1
17374         db_appexit( NULL );
17375 #else
17376         (void) dbopen( NULL, 0, 0, 0, NULL);
17377 #endif
17378
17379 ; return 0; }
17380 EOF
17381 if { (eval echo configure:17382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17382   rm -rf conftest*
17383   ol_cv_db_db_41=yes
17384 else
17385   echo "configure: failed program was:" >&5
17386   cat conftest.$ac_ext >&5
17387   rm -rf conftest*
17388   ol_cv_db_db_41=no
17389 fi
17390 rm -f conftest*
17391
17392         LIBS="$ol_LIBS"
17393
17394 fi
17395
17396 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17397
17398         if test $ol_cv_db_db_41 = yes ; then
17399                 ol_cv_lib_db=-ldb-41
17400         fi
17401 fi
17402
17403 if test $ol_cv_lib_db = no ; then
17404         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17405 echo "configure:17406: checking for Berkeley DB link (-ldb-4.1)" >&5
17406 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17407   echo $ac_n "(cached) $ac_c" 1>&6
17408 else
17409   
17410         ol_DB_LIB=-ldb-4.1
17411         ol_LIBS=$LIBS
17412         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17413
17414         cat > conftest.$ac_ext <<EOF
17415 #line 17416 "configure"
17416 #include "confdefs.h"
17417
17418 #ifdef HAVE_DB_185_H
17419 # include <db_185.h>
17420 #else
17421 # include <db.h>
17422 #endif
17423
17424 #ifndef DB_VERSION_MAJOR
17425 # define DB_VERSION_MAJOR 1
17426 #endif
17427
17428 #ifndef NULL
17429 #define NULL ((void*)0)
17430 #endif
17431
17432 int main() {
17433
17434 #if DB_VERSION_MAJOR > 1
17435         {
17436                 char *version;
17437                 int major, minor, patch;
17438
17439                 version = db_version( &major, &minor, &patch );
17440
17441                 if( major != DB_VERSION_MAJOR ||
17442                         minor < DB_VERSION_MINOR )
17443                 {
17444                         printf("Berkeley DB version mismatch\n"
17445                                 "\texpected: %s\n\tgot: %s\n",
17446                                 DB_VERSION_STRING, version);
17447                         return 1;
17448                 }
17449         }
17450 #endif
17451
17452 #if DB_VERSION_MAJOR > 2
17453         db_env_create( NULL, 0 );
17454 #elif DB_VERSION_MAJOR > 1
17455         db_appexit( NULL );
17456 #else
17457         (void) dbopen( NULL, 0, 0, 0, NULL);
17458 #endif
17459
17460 ; return 0; }
17461 EOF
17462 if { (eval echo configure:17463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17463   rm -rf conftest*
17464   ol_cv_db_db_4_dot_1=yes
17465 else
17466   echo "configure: failed program was:" >&5
17467   cat conftest.$ac_ext >&5
17468   rm -rf conftest*
17469   ol_cv_db_db_4_dot_1=no
17470 fi
17471 rm -f conftest*
17472
17473         LIBS="$ol_LIBS"
17474
17475 fi
17476
17477 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17478
17479         if test $ol_cv_db_db_4_dot_1 = yes ; then
17480                 ol_cv_lib_db=-ldb-4.1
17481         fi
17482 fi
17483
17484 if test $ol_cv_lib_db = no ; then
17485         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17486 echo "configure:17487: checking for Berkeley DB link (-ldb-4-1)" >&5
17487 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17488   echo $ac_n "(cached) $ac_c" 1>&6
17489 else
17490   
17491         ol_DB_LIB=-ldb-4-1
17492         ol_LIBS=$LIBS
17493         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17494
17495         cat > conftest.$ac_ext <<EOF
17496 #line 17497 "configure"
17497 #include "confdefs.h"
17498
17499 #ifdef HAVE_DB_185_H
17500 # include <db_185.h>
17501 #else
17502 # include <db.h>
17503 #endif
17504
17505 #ifndef DB_VERSION_MAJOR
17506 # define DB_VERSION_MAJOR 1
17507 #endif
17508
17509 #ifndef NULL
17510 #define NULL ((void*)0)
17511 #endif
17512
17513 int main() {
17514
17515 #if DB_VERSION_MAJOR > 1
17516         {
17517                 char *version;
17518                 int major, minor, patch;
17519
17520                 version = db_version( &major, &minor, &patch );
17521
17522                 if( major != DB_VERSION_MAJOR ||
17523                         minor < DB_VERSION_MINOR )
17524                 {
17525                         printf("Berkeley DB version mismatch\n"
17526                                 "\texpected: %s\n\tgot: %s\n",
17527                                 DB_VERSION_STRING, version);
17528                         return 1;
17529                 }
17530         }
17531 #endif
17532
17533 #if DB_VERSION_MAJOR > 2
17534         db_env_create( NULL, 0 );
17535 #elif DB_VERSION_MAJOR > 1
17536         db_appexit( NULL );
17537 #else
17538         (void) dbopen( NULL, 0, 0, 0, NULL);
17539 #endif
17540
17541 ; return 0; }
17542 EOF
17543 if { (eval echo configure:17544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17544   rm -rf conftest*
17545   ol_cv_db_db_4_1=yes
17546 else
17547   echo "configure: failed program was:" >&5
17548   cat conftest.$ac_ext >&5
17549   rm -rf conftest*
17550   ol_cv_db_db_4_1=no
17551 fi
17552 rm -f conftest*
17553
17554         LIBS="$ol_LIBS"
17555
17556 fi
17557
17558 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17559
17560         if test $ol_cv_db_db_4_1 = yes ; then
17561                 ol_cv_lib_db=-ldb-4-1
17562         fi
17563 fi
17564
17565 if test $ol_cv_lib_db = no ; then
17566         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17567 echo "configure:17568: checking for Berkeley DB link (-ldb3)" >&5
17568 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17569   echo $ac_n "(cached) $ac_c" 1>&6
17570 else
17571   
17572         ol_DB_LIB=-ldb3
17573         ol_LIBS=$LIBS
17574         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17575
17576         cat > conftest.$ac_ext <<EOF
17577 #line 17578 "configure"
17578 #include "confdefs.h"
17579
17580 #ifdef HAVE_DB_185_H
17581 # include <db_185.h>
17582 #else
17583 # include <db.h>
17584 #endif
17585
17586 #ifndef DB_VERSION_MAJOR
17587 # define DB_VERSION_MAJOR 1
17588 #endif
17589
17590 #ifndef NULL
17591 #define NULL ((void*)0)
17592 #endif
17593
17594 int main() {
17595
17596 #if DB_VERSION_MAJOR > 1
17597         {
17598                 char *version;
17599                 int major, minor, patch;
17600
17601                 version = db_version( &major, &minor, &patch );
17602
17603                 if( major != DB_VERSION_MAJOR ||
17604                         minor < DB_VERSION_MINOR )
17605                 {
17606                         printf("Berkeley DB version mismatch\n"
17607                                 "\texpected: %s\n\tgot: %s\n",
17608                                 DB_VERSION_STRING, version);
17609                         return 1;
17610                 }
17611         }
17612 #endif
17613
17614 #if DB_VERSION_MAJOR > 2
17615         db_env_create( NULL, 0 );
17616 #elif DB_VERSION_MAJOR > 1
17617         db_appexit( NULL );
17618 #else
17619         (void) dbopen( NULL, 0, 0, 0, NULL);
17620 #endif
17621
17622 ; return 0; }
17623 EOF
17624 if { (eval echo configure:17625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17625   rm -rf conftest*
17626   ol_cv_db_db3=yes
17627 else
17628   echo "configure: failed program was:" >&5
17629   cat conftest.$ac_ext >&5
17630   rm -rf conftest*
17631   ol_cv_db_db3=no
17632 fi
17633 rm -f conftest*
17634
17635         LIBS="$ol_LIBS"
17636
17637 fi
17638
17639 echo "$ac_t""$ol_cv_db_db3" 1>&6
17640
17641         if test $ol_cv_db_db3 = yes ; then
17642                 ol_cv_lib_db=-ldb3
17643         fi
17644 fi
17645
17646 if test $ol_cv_lib_db = no ; then
17647         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17648 echo "configure:17649: checking for Berkeley DB link (-ldb-3)" >&5
17649 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17650   echo $ac_n "(cached) $ac_c" 1>&6
17651 else
17652   
17653         ol_DB_LIB=-ldb-3
17654         ol_LIBS=$LIBS
17655         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17656
17657         cat > conftest.$ac_ext <<EOF
17658 #line 17659 "configure"
17659 #include "confdefs.h"
17660
17661 #ifdef HAVE_DB_185_H
17662 # include <db_185.h>
17663 #else
17664 # include <db.h>
17665 #endif
17666
17667 #ifndef DB_VERSION_MAJOR
17668 # define DB_VERSION_MAJOR 1
17669 #endif
17670
17671 #ifndef NULL
17672 #define NULL ((void*)0)
17673 #endif
17674
17675 int main() {
17676
17677 #if DB_VERSION_MAJOR > 1
17678         {
17679                 char *version;
17680                 int major, minor, patch;
17681
17682                 version = db_version( &major, &minor, &patch );
17683
17684                 if( major != DB_VERSION_MAJOR ||
17685                         minor < DB_VERSION_MINOR )
17686                 {
17687                         printf("Berkeley DB version mismatch\n"
17688                                 "\texpected: %s\n\tgot: %s\n",
17689                                 DB_VERSION_STRING, version);
17690                         return 1;
17691                 }
17692         }
17693 #endif
17694
17695 #if DB_VERSION_MAJOR > 2
17696         db_env_create( NULL, 0 );
17697 #elif DB_VERSION_MAJOR > 1
17698         db_appexit( NULL );
17699 #else
17700         (void) dbopen( NULL, 0, 0, 0, NULL);
17701 #endif
17702
17703 ; return 0; }
17704 EOF
17705 if { (eval echo configure:17706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17706   rm -rf conftest*
17707   ol_cv_db_db_3=yes
17708 else
17709   echo "configure: failed program was:" >&5
17710   cat conftest.$ac_ext >&5
17711   rm -rf conftest*
17712   ol_cv_db_db_3=no
17713 fi
17714 rm -f conftest*
17715
17716         LIBS="$ol_LIBS"
17717
17718 fi
17719
17720 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17721
17722         if test $ol_cv_db_db_3 = yes ; then
17723                 ol_cv_lib_db=-ldb-3
17724         fi
17725 fi
17726
17727 if test $ol_cv_lib_db = no ; then
17728         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17729 echo "configure:17730: checking for Berkeley DB link (-ldb2)" >&5
17730 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17731   echo $ac_n "(cached) $ac_c" 1>&6
17732 else
17733   
17734         ol_DB_LIB=-ldb2
17735         ol_LIBS=$LIBS
17736         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17737
17738         cat > conftest.$ac_ext <<EOF
17739 #line 17740 "configure"
17740 #include "confdefs.h"
17741
17742 #ifdef HAVE_DB_185_H
17743 # include <db_185.h>
17744 #else
17745 # include <db.h>
17746 #endif
17747
17748 #ifndef DB_VERSION_MAJOR
17749 # define DB_VERSION_MAJOR 1
17750 #endif
17751
17752 #ifndef NULL
17753 #define NULL ((void*)0)
17754 #endif
17755
17756 int main() {
17757
17758 #if DB_VERSION_MAJOR > 1
17759         {
17760                 char *version;
17761                 int major, minor, patch;
17762
17763                 version = db_version( &major, &minor, &patch );
17764
17765                 if( major != DB_VERSION_MAJOR ||
17766                         minor < DB_VERSION_MINOR )
17767                 {
17768                         printf("Berkeley DB version mismatch\n"
17769                                 "\texpected: %s\n\tgot: %s\n",
17770                                 DB_VERSION_STRING, version);
17771                         return 1;
17772                 }
17773         }
17774 #endif
17775
17776 #if DB_VERSION_MAJOR > 2
17777         db_env_create( NULL, 0 );
17778 #elif DB_VERSION_MAJOR > 1
17779         db_appexit( NULL );
17780 #else
17781         (void) dbopen( NULL, 0, 0, 0, NULL);
17782 #endif
17783
17784 ; return 0; }
17785 EOF
17786 if { (eval echo configure:17787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17787   rm -rf conftest*
17788   ol_cv_db_db2=yes
17789 else
17790   echo "configure: failed program was:" >&5
17791   cat conftest.$ac_ext >&5
17792   rm -rf conftest*
17793   ol_cv_db_db2=no
17794 fi
17795 rm -f conftest*
17796
17797         LIBS="$ol_LIBS"
17798
17799 fi
17800
17801 echo "$ac_t""$ol_cv_db_db2" 1>&6
17802
17803         if test $ol_cv_db_db2 = yes ; then
17804                 ol_cv_lib_db=-ldb2
17805         fi
17806 fi
17807
17808 if test $ol_cv_lib_db = no ; then
17809         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17810 echo "configure:17811: checking for Berkeley DB link (-ldb-2)" >&5
17811 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17812   echo $ac_n "(cached) $ac_c" 1>&6
17813 else
17814   
17815         ol_DB_LIB=-ldb-2
17816         ol_LIBS=$LIBS
17817         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17818
17819         cat > conftest.$ac_ext <<EOF
17820 #line 17821 "configure"
17821 #include "confdefs.h"
17822
17823 #ifdef HAVE_DB_185_H
17824 # include <db_185.h>
17825 #else
17826 # include <db.h>
17827 #endif
17828
17829 #ifndef DB_VERSION_MAJOR
17830 # define DB_VERSION_MAJOR 1
17831 #endif
17832
17833 #ifndef NULL
17834 #define NULL ((void*)0)
17835 #endif
17836
17837 int main() {
17838
17839 #if DB_VERSION_MAJOR > 1
17840         {
17841                 char *version;
17842                 int major, minor, patch;
17843
17844                 version = db_version( &major, &minor, &patch );
17845
17846                 if( major != DB_VERSION_MAJOR ||
17847                         minor < DB_VERSION_MINOR )
17848                 {
17849                         printf("Berkeley DB version mismatch\n"
17850                                 "\texpected: %s\n\tgot: %s\n",
17851                                 DB_VERSION_STRING, version);
17852                         return 1;
17853                 }
17854         }
17855 #endif
17856
17857 #if DB_VERSION_MAJOR > 2
17858         db_env_create( NULL, 0 );
17859 #elif DB_VERSION_MAJOR > 1
17860         db_appexit( NULL );
17861 #else
17862         (void) dbopen( NULL, 0, 0, 0, NULL);
17863 #endif
17864
17865 ; return 0; }
17866 EOF
17867 if { (eval echo configure:17868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17868   rm -rf conftest*
17869   ol_cv_db_db_2=yes
17870 else
17871   echo "configure: failed program was:" >&5
17872   cat conftest.$ac_ext >&5
17873   rm -rf conftest*
17874   ol_cv_db_db_2=no
17875 fi
17876 rm -f conftest*
17877
17878         LIBS="$ol_LIBS"
17879
17880 fi
17881
17882 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17883
17884         if test $ol_cv_db_db_2 = yes ; then
17885                 ol_cv_lib_db=-ldb-2
17886         fi
17887 fi
17888
17889 if test $ol_cv_lib_db = no ; then
17890         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17891 echo "configure:17892: checking for Berkeley DB link (-ldb1)" >&5
17892 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17893   echo $ac_n "(cached) $ac_c" 1>&6
17894 else
17895   
17896         ol_DB_LIB=-ldb1
17897         ol_LIBS=$LIBS
17898         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17899
17900         cat > conftest.$ac_ext <<EOF
17901 #line 17902 "configure"
17902 #include "confdefs.h"
17903
17904 #ifdef HAVE_DB_185_H
17905 # include <db_185.h>
17906 #else
17907 # include <db.h>
17908 #endif
17909
17910 #ifndef DB_VERSION_MAJOR
17911 # define DB_VERSION_MAJOR 1
17912 #endif
17913
17914 #ifndef NULL
17915 #define NULL ((void*)0)
17916 #endif
17917
17918 int main() {
17919
17920 #if DB_VERSION_MAJOR > 1
17921         {
17922                 char *version;
17923                 int major, minor, patch;
17924
17925                 version = db_version( &major, &minor, &patch );
17926
17927                 if( major != DB_VERSION_MAJOR ||
17928                         minor < DB_VERSION_MINOR )
17929                 {
17930                         printf("Berkeley DB version mismatch\n"
17931                                 "\texpected: %s\n\tgot: %s\n",
17932                                 DB_VERSION_STRING, version);
17933                         return 1;
17934                 }
17935         }
17936 #endif
17937
17938 #if DB_VERSION_MAJOR > 2
17939         db_env_create( NULL, 0 );
17940 #elif DB_VERSION_MAJOR > 1
17941         db_appexit( NULL );
17942 #else
17943         (void) dbopen( NULL, 0, 0, 0, NULL);
17944 #endif
17945
17946 ; return 0; }
17947 EOF
17948 if { (eval echo configure:17949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17949   rm -rf conftest*
17950   ol_cv_db_db1=yes
17951 else
17952   echo "configure: failed program was:" >&5
17953   cat conftest.$ac_ext >&5
17954   rm -rf conftest*
17955   ol_cv_db_db1=no
17956 fi
17957 rm -f conftest*
17958
17959         LIBS="$ol_LIBS"
17960
17961 fi
17962
17963 echo "$ac_t""$ol_cv_db_db1" 1>&6
17964
17965         if test $ol_cv_db_db1 = yes ; then
17966                 ol_cv_lib_db=-ldb1
17967         fi
17968 fi
17969
17970 if test $ol_cv_lib_db = no ; then
17971         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17972 echo "configure:17973: checking for Berkeley DB link (-ldb-1)" >&5
17973 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17974   echo $ac_n "(cached) $ac_c" 1>&6
17975 else
17976   
17977         ol_DB_LIB=-ldb-1
17978         ol_LIBS=$LIBS
17979         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17980
17981         cat > conftest.$ac_ext <<EOF
17982 #line 17983 "configure"
17983 #include "confdefs.h"
17984
17985 #ifdef HAVE_DB_185_H
17986 # include <db_185.h>
17987 #else
17988 # include <db.h>
17989 #endif
17990
17991 #ifndef DB_VERSION_MAJOR
17992 # define DB_VERSION_MAJOR 1
17993 #endif
17994
17995 #ifndef NULL
17996 #define NULL ((void*)0)
17997 #endif
17998
17999 int main() {
18000
18001 #if DB_VERSION_MAJOR > 1
18002         {
18003                 char *version;
18004                 int major, minor, patch;
18005
18006                 version = db_version( &major, &minor, &patch );
18007
18008                 if( major != DB_VERSION_MAJOR ||
18009                         minor < DB_VERSION_MINOR )
18010                 {
18011                         printf("Berkeley DB version mismatch\n"
18012                                 "\texpected: %s\n\tgot: %s\n",
18013                                 DB_VERSION_STRING, version);
18014                         return 1;
18015                 }
18016         }
18017 #endif
18018
18019 #if DB_VERSION_MAJOR > 2
18020         db_env_create( NULL, 0 );
18021 #elif DB_VERSION_MAJOR > 1
18022         db_appexit( NULL );
18023 #else
18024         (void) dbopen( NULL, 0, 0, 0, NULL);
18025 #endif
18026
18027 ; return 0; }
18028 EOF
18029 if { (eval echo configure:18030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18030   rm -rf conftest*
18031   ol_cv_db_db_1=yes
18032 else
18033   echo "configure: failed program was:" >&5
18034   cat conftest.$ac_ext >&5
18035   rm -rf conftest*
18036   ol_cv_db_db_1=no
18037 fi
18038 rm -f conftest*
18039
18040         LIBS="$ol_LIBS"
18041
18042 fi
18043
18044 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18045
18046         if test $ol_cv_db_db_1 = yes ; then
18047                 ol_cv_lib_db=-ldb-1
18048         fi
18049 fi
18050
18051
18052                 if test "$ol_cv_lib_db" != no ; then
18053                         ol_cv_berkeley_db=yes
18054                 fi
18055         fi
18056 fi
18057
18058         else
18059                 ol_cv_berkeley_db=no
18060 for ac_hdr in db.h
18061 do
18062 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18063 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18064 echo "configure:18065: checking for $ac_hdr" >&5
18065 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18066   echo $ac_n "(cached) $ac_c" 1>&6
18067 else
18068   cat > conftest.$ac_ext <<EOF
18069 #line 18070 "configure"
18070 #include "confdefs.h"
18071 #include <$ac_hdr>
18072 EOF
18073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18074 { (eval echo configure:18075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18076 if test -z "$ac_err"; then
18077   rm -rf conftest*
18078   eval "ac_cv_header_$ac_safe=yes"
18079 else
18080   echo "$ac_err" >&5
18081   echo "configure: failed program was:" >&5
18082   cat conftest.$ac_ext >&5
18083   rm -rf conftest*
18084   eval "ac_cv_header_$ac_safe=no"
18085 fi
18086 rm -f conftest*
18087 fi
18088 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18089   echo "$ac_t""yes" 1>&6
18090     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18091   cat >> confdefs.h <<EOF
18092 #define $ac_tr_hdr 1
18093 EOF
18094  
18095 else
18096   echo "$ac_t""no" 1>&6
18097 fi
18098 done
18099
18100 if test $ac_cv_header_db_h = yes; then
18101         ol_cv_lib_db=no
18102 if test $ol_cv_lib_db = no ; then
18103         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18104 echo "configure:18105: checking for Berkeley DB link (default)" >&5
18105 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18106   echo $ac_n "(cached) $ac_c" 1>&6
18107 else
18108   
18109         ol_DB_LIB=
18110         ol_LIBS=$LIBS
18111         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18112
18113         cat > conftest.$ac_ext <<EOF
18114 #line 18115 "configure"
18115 #include "confdefs.h"
18116
18117 #ifdef HAVE_DB_185_H
18118 # include <db_185.h>
18119 #else
18120 # include <db.h>
18121 #endif
18122
18123 #ifndef DB_VERSION_MAJOR
18124 # define DB_VERSION_MAJOR 1
18125 #endif
18126
18127 #ifndef NULL
18128 #define NULL ((void*)0)
18129 #endif
18130
18131 int main() {
18132
18133 #if DB_VERSION_MAJOR > 1
18134         {
18135                 char *version;
18136                 int major, minor, patch;
18137
18138                 version = db_version( &major, &minor, &patch );
18139
18140                 if( major != DB_VERSION_MAJOR ||
18141                         minor < DB_VERSION_MINOR )
18142                 {
18143                         printf("Berkeley DB version mismatch\n"
18144                                 "\texpected: %s\n\tgot: %s\n",
18145                                 DB_VERSION_STRING, version);
18146                         return 1;
18147                 }
18148         }
18149 #endif
18150
18151 #if DB_VERSION_MAJOR > 2
18152         db_env_create( NULL, 0 );
18153 #elif DB_VERSION_MAJOR > 1
18154         db_appexit( NULL );
18155 #else
18156         (void) dbopen( NULL, 0, 0, 0, NULL);
18157 #endif
18158
18159 ; return 0; }
18160 EOF
18161 if { (eval echo configure:18162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18162   rm -rf conftest*
18163   ol_cv_db_none=yes
18164 else
18165   echo "configure: failed program was:" >&5
18166   cat conftest.$ac_ext >&5
18167   rm -rf conftest*
18168   ol_cv_db_none=no
18169 fi
18170 rm -f conftest*
18171
18172         LIBS="$ol_LIBS"
18173
18174 fi
18175
18176 echo "$ac_t""$ol_cv_db_none" 1>&6
18177
18178         if test $ol_cv_db_none = yes ; then
18179                 ol_cv_lib_db=yes
18180         fi
18181 fi
18182
18183 if test $ol_cv_lib_db = no ; then
18184         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18185 echo "configure:18186: checking for Berkeley DB link (-ldb42)" >&5
18186 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18187   echo $ac_n "(cached) $ac_c" 1>&6
18188 else
18189   
18190         ol_DB_LIB=-ldb42
18191         ol_LIBS=$LIBS
18192         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18193
18194         cat > conftest.$ac_ext <<EOF
18195 #line 18196 "configure"
18196 #include "confdefs.h"
18197
18198 #ifdef HAVE_DB_185_H
18199 # include <db_185.h>
18200 #else
18201 # include <db.h>
18202 #endif
18203
18204 #ifndef DB_VERSION_MAJOR
18205 # define DB_VERSION_MAJOR 1
18206 #endif
18207
18208 #ifndef NULL
18209 #define NULL ((void*)0)
18210 #endif
18211
18212 int main() {
18213
18214 #if DB_VERSION_MAJOR > 1
18215         {
18216                 char *version;
18217                 int major, minor, patch;
18218
18219                 version = db_version( &major, &minor, &patch );
18220
18221                 if( major != DB_VERSION_MAJOR ||
18222                         minor < DB_VERSION_MINOR )
18223                 {
18224                         printf("Berkeley DB version mismatch\n"
18225                                 "\texpected: %s\n\tgot: %s\n",
18226                                 DB_VERSION_STRING, version);
18227                         return 1;
18228                 }
18229         }
18230 #endif
18231
18232 #if DB_VERSION_MAJOR > 2
18233         db_env_create( NULL, 0 );
18234 #elif DB_VERSION_MAJOR > 1
18235         db_appexit( NULL );
18236 #else
18237         (void) dbopen( NULL, 0, 0, 0, NULL);
18238 #endif
18239
18240 ; return 0; }
18241 EOF
18242 if { (eval echo configure:18243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18243   rm -rf conftest*
18244   ol_cv_db_db42=yes
18245 else
18246   echo "configure: failed program was:" >&5
18247   cat conftest.$ac_ext >&5
18248   rm -rf conftest*
18249   ol_cv_db_db42=no
18250 fi
18251 rm -f conftest*
18252
18253         LIBS="$ol_LIBS"
18254
18255 fi
18256
18257 echo "$ac_t""$ol_cv_db_db42" 1>&6
18258
18259         if test $ol_cv_db_db42 = yes ; then
18260                 ol_cv_lib_db=-ldb42
18261         fi
18262 fi
18263
18264 if test $ol_cv_lib_db = no ; then
18265         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18266 echo "configure:18267: checking for Berkeley DB link (-ldb-42)" >&5
18267 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18268   echo $ac_n "(cached) $ac_c" 1>&6
18269 else
18270   
18271         ol_DB_LIB=-ldb-42
18272         ol_LIBS=$LIBS
18273         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18274
18275         cat > conftest.$ac_ext <<EOF
18276 #line 18277 "configure"
18277 #include "confdefs.h"
18278
18279 #ifdef HAVE_DB_185_H
18280 # include <db_185.h>
18281 #else
18282 # include <db.h>
18283 #endif
18284
18285 #ifndef DB_VERSION_MAJOR
18286 # define DB_VERSION_MAJOR 1
18287 #endif
18288
18289 #ifndef NULL
18290 #define NULL ((void*)0)
18291 #endif
18292
18293 int main() {
18294
18295 #if DB_VERSION_MAJOR > 1
18296         {
18297                 char *version;
18298                 int major, minor, patch;
18299
18300                 version = db_version( &major, &minor, &patch );
18301
18302                 if( major != DB_VERSION_MAJOR ||
18303                         minor < DB_VERSION_MINOR )
18304                 {
18305                         printf("Berkeley DB version mismatch\n"
18306                                 "\texpected: %s\n\tgot: %s\n",
18307                                 DB_VERSION_STRING, version);
18308                         return 1;
18309                 }
18310         }
18311 #endif
18312
18313 #if DB_VERSION_MAJOR > 2
18314         db_env_create( NULL, 0 );
18315 #elif DB_VERSION_MAJOR > 1
18316         db_appexit( NULL );
18317 #else
18318         (void) dbopen( NULL, 0, 0, 0, NULL);
18319 #endif
18320
18321 ; return 0; }
18322 EOF
18323 if { (eval echo configure:18324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18324   rm -rf conftest*
18325   ol_cv_db_db_42=yes
18326 else
18327   echo "configure: failed program was:" >&5
18328   cat conftest.$ac_ext >&5
18329   rm -rf conftest*
18330   ol_cv_db_db_42=no
18331 fi
18332 rm -f conftest*
18333
18334         LIBS="$ol_LIBS"
18335
18336 fi
18337
18338 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18339
18340         if test $ol_cv_db_db_42 = yes ; then
18341                 ol_cv_lib_db=-ldb-42
18342         fi
18343 fi
18344
18345 if test $ol_cv_lib_db = no ; then
18346         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18347 echo "configure:18348: checking for Berkeley DB link (-ldb-4.2)" >&5
18348 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18349   echo $ac_n "(cached) $ac_c" 1>&6
18350 else
18351   
18352         ol_DB_LIB=-ldb-4.2
18353         ol_LIBS=$LIBS
18354         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18355
18356         cat > conftest.$ac_ext <<EOF
18357 #line 18358 "configure"
18358 #include "confdefs.h"
18359
18360 #ifdef HAVE_DB_185_H
18361 # include <db_185.h>
18362 #else
18363 # include <db.h>
18364 #endif
18365
18366 #ifndef DB_VERSION_MAJOR
18367 # define DB_VERSION_MAJOR 1
18368 #endif
18369
18370 #ifndef NULL
18371 #define NULL ((void*)0)
18372 #endif
18373
18374 int main() {
18375
18376 #if DB_VERSION_MAJOR > 1
18377         {
18378                 char *version;
18379                 int major, minor, patch;
18380
18381                 version = db_version( &major, &minor, &patch );
18382
18383                 if( major != DB_VERSION_MAJOR ||
18384                         minor < DB_VERSION_MINOR )
18385                 {
18386                         printf("Berkeley DB version mismatch\n"
18387                                 "\texpected: %s\n\tgot: %s\n",
18388                                 DB_VERSION_STRING, version);
18389                         return 1;
18390                 }
18391         }
18392 #endif
18393
18394 #if DB_VERSION_MAJOR > 2
18395         db_env_create( NULL, 0 );
18396 #elif DB_VERSION_MAJOR > 1
18397         db_appexit( NULL );
18398 #else
18399         (void) dbopen( NULL, 0, 0, 0, NULL);
18400 #endif
18401
18402 ; return 0; }
18403 EOF
18404 if { (eval echo configure:18405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18405   rm -rf conftest*
18406   ol_cv_db_db_4_dot_2=yes
18407 else
18408   echo "configure: failed program was:" >&5
18409   cat conftest.$ac_ext >&5
18410   rm -rf conftest*
18411   ol_cv_db_db_4_dot_2=no
18412 fi
18413 rm -f conftest*
18414
18415         LIBS="$ol_LIBS"
18416
18417 fi
18418
18419 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18420
18421         if test $ol_cv_db_db_4_dot_2 = yes ; then
18422                 ol_cv_lib_db=-ldb-4.2
18423         fi
18424 fi
18425
18426 if test $ol_cv_lib_db = no ; then
18427         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18428 echo "configure:18429: checking for Berkeley DB link (-ldb-4-2)" >&5
18429 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18430   echo $ac_n "(cached) $ac_c" 1>&6
18431 else
18432   
18433         ol_DB_LIB=-ldb-4-2
18434         ol_LIBS=$LIBS
18435         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18436
18437         cat > conftest.$ac_ext <<EOF
18438 #line 18439 "configure"
18439 #include "confdefs.h"
18440
18441 #ifdef HAVE_DB_185_H
18442 # include <db_185.h>
18443 #else
18444 # include <db.h>
18445 #endif
18446
18447 #ifndef DB_VERSION_MAJOR
18448 # define DB_VERSION_MAJOR 1
18449 #endif
18450
18451 #ifndef NULL
18452 #define NULL ((void*)0)
18453 #endif
18454
18455 int main() {
18456
18457 #if DB_VERSION_MAJOR > 1
18458         {
18459                 char *version;
18460                 int major, minor, patch;
18461
18462                 version = db_version( &major, &minor, &patch );
18463
18464                 if( major != DB_VERSION_MAJOR ||
18465                         minor < DB_VERSION_MINOR )
18466                 {
18467                         printf("Berkeley DB version mismatch\n"
18468                                 "\texpected: %s\n\tgot: %s\n",
18469                                 DB_VERSION_STRING, version);
18470                         return 1;
18471                 }
18472         }
18473 #endif
18474
18475 #if DB_VERSION_MAJOR > 2
18476         db_env_create( NULL, 0 );
18477 #elif DB_VERSION_MAJOR > 1
18478         db_appexit( NULL );
18479 #else
18480         (void) dbopen( NULL, 0, 0, 0, NULL);
18481 #endif
18482
18483 ; return 0; }
18484 EOF
18485 if { (eval echo configure:18486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18486   rm -rf conftest*
18487   ol_cv_db_db_4_2=yes
18488 else
18489   echo "configure: failed program was:" >&5
18490   cat conftest.$ac_ext >&5
18491   rm -rf conftest*
18492   ol_cv_db_db_4_2=no
18493 fi
18494 rm -f conftest*
18495
18496         LIBS="$ol_LIBS"
18497
18498 fi
18499
18500 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18501
18502         if test $ol_cv_db_db_4_2 = yes ; then
18503                 ol_cv_lib_db=-ldb-4-2
18504         fi
18505 fi
18506
18507 if test $ol_cv_lib_db = no ; then
18508         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18509 echo "configure:18510: checking for Berkeley DB link (-ldb-4)" >&5
18510 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18511   echo $ac_n "(cached) $ac_c" 1>&6
18512 else
18513   
18514         ol_DB_LIB=-ldb-4
18515         ol_LIBS=$LIBS
18516         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18517
18518         cat > conftest.$ac_ext <<EOF
18519 #line 18520 "configure"
18520 #include "confdefs.h"
18521
18522 #ifdef HAVE_DB_185_H
18523 # include <db_185.h>
18524 #else
18525 # include <db.h>
18526 #endif
18527
18528 #ifndef DB_VERSION_MAJOR
18529 # define DB_VERSION_MAJOR 1
18530 #endif
18531
18532 #ifndef NULL
18533 #define NULL ((void*)0)
18534 #endif
18535
18536 int main() {
18537
18538 #if DB_VERSION_MAJOR > 1
18539         {
18540                 char *version;
18541                 int major, minor, patch;
18542
18543                 version = db_version( &major, &minor, &patch );
18544
18545                 if( major != DB_VERSION_MAJOR ||
18546                         minor < DB_VERSION_MINOR )
18547                 {
18548                         printf("Berkeley DB version mismatch\n"
18549                                 "\texpected: %s\n\tgot: %s\n",
18550                                 DB_VERSION_STRING, version);
18551                         return 1;
18552                 }
18553         }
18554 #endif
18555
18556 #if DB_VERSION_MAJOR > 2
18557         db_env_create( NULL, 0 );
18558 #elif DB_VERSION_MAJOR > 1
18559         db_appexit( NULL );
18560 #else
18561         (void) dbopen( NULL, 0, 0, 0, NULL);
18562 #endif
18563
18564 ; return 0; }
18565 EOF
18566 if { (eval echo configure:18567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18567   rm -rf conftest*
18568   ol_cv_db_db_4=yes
18569 else
18570   echo "configure: failed program was:" >&5
18571   cat conftest.$ac_ext >&5
18572   rm -rf conftest*
18573   ol_cv_db_db_4=no
18574 fi
18575 rm -f conftest*
18576
18577         LIBS="$ol_LIBS"
18578
18579 fi
18580
18581 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18582
18583         if test $ol_cv_db_db_4 = yes ; then
18584                 ol_cv_lib_db=-ldb-4
18585         fi
18586 fi
18587
18588 if test $ol_cv_lib_db = no ; then
18589         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18590 echo "configure:18591: checking for Berkeley DB link (-ldb4)" >&5
18591 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18592   echo $ac_n "(cached) $ac_c" 1>&6
18593 else
18594   
18595         ol_DB_LIB=-ldb4
18596         ol_LIBS=$LIBS
18597         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18598
18599         cat > conftest.$ac_ext <<EOF
18600 #line 18601 "configure"
18601 #include "confdefs.h"
18602
18603 #ifdef HAVE_DB_185_H
18604 # include <db_185.h>
18605 #else
18606 # include <db.h>
18607 #endif
18608
18609 #ifndef DB_VERSION_MAJOR
18610 # define DB_VERSION_MAJOR 1
18611 #endif
18612
18613 #ifndef NULL
18614 #define NULL ((void*)0)
18615 #endif
18616
18617 int main() {
18618
18619 #if DB_VERSION_MAJOR > 1
18620         {
18621                 char *version;
18622                 int major, minor, patch;
18623
18624                 version = db_version( &major, &minor, &patch );
18625
18626                 if( major != DB_VERSION_MAJOR ||
18627                         minor < DB_VERSION_MINOR )
18628                 {
18629                         printf("Berkeley DB version mismatch\n"
18630                                 "\texpected: %s\n\tgot: %s\n",
18631                                 DB_VERSION_STRING, version);
18632                         return 1;
18633                 }
18634         }
18635 #endif
18636
18637 #if DB_VERSION_MAJOR > 2
18638         db_env_create( NULL, 0 );
18639 #elif DB_VERSION_MAJOR > 1
18640         db_appexit( NULL );
18641 #else
18642         (void) dbopen( NULL, 0, 0, 0, NULL);
18643 #endif
18644
18645 ; return 0; }
18646 EOF
18647 if { (eval echo configure:18648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18648   rm -rf conftest*
18649   ol_cv_db_db4=yes
18650 else
18651   echo "configure: failed program was:" >&5
18652   cat conftest.$ac_ext >&5
18653   rm -rf conftest*
18654   ol_cv_db_db4=no
18655 fi
18656 rm -f conftest*
18657
18658         LIBS="$ol_LIBS"
18659
18660 fi
18661
18662 echo "$ac_t""$ol_cv_db_db4" 1>&6
18663
18664         if test $ol_cv_db_db4 = yes ; then
18665                 ol_cv_lib_db=-ldb4
18666         fi
18667 fi
18668
18669 if test $ol_cv_lib_db = no ; then
18670         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18671 echo "configure:18672: checking for Berkeley DB link (-ldb)" >&5
18672 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18673   echo $ac_n "(cached) $ac_c" 1>&6
18674 else
18675   
18676         ol_DB_LIB=-ldb
18677         ol_LIBS=$LIBS
18678         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18679
18680         cat > conftest.$ac_ext <<EOF
18681 #line 18682 "configure"
18682 #include "confdefs.h"
18683
18684 #ifdef HAVE_DB_185_H
18685 # include <db_185.h>
18686 #else
18687 # include <db.h>
18688 #endif
18689
18690 #ifndef DB_VERSION_MAJOR
18691 # define DB_VERSION_MAJOR 1
18692 #endif
18693
18694 #ifndef NULL
18695 #define NULL ((void*)0)
18696 #endif
18697
18698 int main() {
18699
18700 #if DB_VERSION_MAJOR > 1
18701         {
18702                 char *version;
18703                 int major, minor, patch;
18704
18705                 version = db_version( &major, &minor, &patch );
18706
18707                 if( major != DB_VERSION_MAJOR ||
18708                         minor < DB_VERSION_MINOR )
18709                 {
18710                         printf("Berkeley DB version mismatch\n"
18711                                 "\texpected: %s\n\tgot: %s\n",
18712                                 DB_VERSION_STRING, version);
18713                         return 1;
18714                 }
18715         }
18716 #endif
18717
18718 #if DB_VERSION_MAJOR > 2
18719         db_env_create( NULL, 0 );
18720 #elif DB_VERSION_MAJOR > 1
18721         db_appexit( NULL );
18722 #else
18723         (void) dbopen( NULL, 0, 0, 0, NULL);
18724 #endif
18725
18726 ; return 0; }
18727 EOF
18728 if { (eval echo configure:18729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18729   rm -rf conftest*
18730   ol_cv_db_db=yes
18731 else
18732   echo "configure: failed program was:" >&5
18733   cat conftest.$ac_ext >&5
18734   rm -rf conftest*
18735   ol_cv_db_db=no
18736 fi
18737 rm -f conftest*
18738
18739         LIBS="$ol_LIBS"
18740
18741 fi
18742
18743 echo "$ac_t""$ol_cv_db_db" 1>&6
18744
18745         if test $ol_cv_db_db = yes ; then
18746                 ol_cv_lib_db=-ldb
18747         fi
18748 fi
18749
18750 if test $ol_cv_lib_db = no ; then
18751         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18752 echo "configure:18753: checking for Berkeley DB link (-ldb41)" >&5
18753 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18754   echo $ac_n "(cached) $ac_c" 1>&6
18755 else
18756   
18757         ol_DB_LIB=-ldb41
18758         ol_LIBS=$LIBS
18759         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18760
18761         cat > conftest.$ac_ext <<EOF
18762 #line 18763 "configure"
18763 #include "confdefs.h"
18764
18765 #ifdef HAVE_DB_185_H
18766 # include <db_185.h>
18767 #else
18768 # include <db.h>
18769 #endif
18770
18771 #ifndef DB_VERSION_MAJOR
18772 # define DB_VERSION_MAJOR 1
18773 #endif
18774
18775 #ifndef NULL
18776 #define NULL ((void*)0)
18777 #endif
18778
18779 int main() {
18780
18781 #if DB_VERSION_MAJOR > 1
18782         {
18783                 char *version;
18784                 int major, minor, patch;
18785
18786                 version = db_version( &major, &minor, &patch );
18787
18788                 if( major != DB_VERSION_MAJOR ||
18789                         minor < DB_VERSION_MINOR )
18790                 {
18791                         printf("Berkeley DB version mismatch\n"
18792                                 "\texpected: %s\n\tgot: %s\n",
18793                                 DB_VERSION_STRING, version);
18794                         return 1;
18795                 }
18796         }
18797 #endif
18798
18799 #if DB_VERSION_MAJOR > 2
18800         db_env_create( NULL, 0 );
18801 #elif DB_VERSION_MAJOR > 1
18802         db_appexit( NULL );
18803 #else
18804         (void) dbopen( NULL, 0, 0, 0, NULL);
18805 #endif
18806
18807 ; return 0; }
18808 EOF
18809 if { (eval echo configure:18810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18810   rm -rf conftest*
18811   ol_cv_db_db41=yes
18812 else
18813   echo "configure: failed program was:" >&5
18814   cat conftest.$ac_ext >&5
18815   rm -rf conftest*
18816   ol_cv_db_db41=no
18817 fi
18818 rm -f conftest*
18819
18820         LIBS="$ol_LIBS"
18821
18822 fi
18823
18824 echo "$ac_t""$ol_cv_db_db41" 1>&6
18825
18826         if test $ol_cv_db_db41 = yes ; then
18827                 ol_cv_lib_db=-ldb41
18828         fi
18829 fi
18830
18831 if test $ol_cv_lib_db = no ; then
18832         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18833 echo "configure:18834: checking for Berkeley DB link (-ldb-41)" >&5
18834 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18835   echo $ac_n "(cached) $ac_c" 1>&6
18836 else
18837   
18838         ol_DB_LIB=-ldb-41
18839         ol_LIBS=$LIBS
18840         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18841
18842         cat > conftest.$ac_ext <<EOF
18843 #line 18844 "configure"
18844 #include "confdefs.h"
18845
18846 #ifdef HAVE_DB_185_H
18847 # include <db_185.h>
18848 #else
18849 # include <db.h>
18850 #endif
18851
18852 #ifndef DB_VERSION_MAJOR
18853 # define DB_VERSION_MAJOR 1
18854 #endif
18855
18856 #ifndef NULL
18857 #define NULL ((void*)0)
18858 #endif
18859
18860 int main() {
18861
18862 #if DB_VERSION_MAJOR > 1
18863         {
18864                 char *version;
18865                 int major, minor, patch;
18866
18867                 version = db_version( &major, &minor, &patch );
18868
18869                 if( major != DB_VERSION_MAJOR ||
18870                         minor < DB_VERSION_MINOR )
18871                 {
18872                         printf("Berkeley DB version mismatch\n"
18873                                 "\texpected: %s\n\tgot: %s\n",
18874                                 DB_VERSION_STRING, version);
18875                         return 1;
18876                 }
18877         }
18878 #endif
18879
18880 #if DB_VERSION_MAJOR > 2
18881         db_env_create( NULL, 0 );
18882 #elif DB_VERSION_MAJOR > 1
18883         db_appexit( NULL );
18884 #else
18885         (void) dbopen( NULL, 0, 0, 0, NULL);
18886 #endif
18887
18888 ; return 0; }
18889 EOF
18890 if { (eval echo configure:18891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18891   rm -rf conftest*
18892   ol_cv_db_db_41=yes
18893 else
18894   echo "configure: failed program was:" >&5
18895   cat conftest.$ac_ext >&5
18896   rm -rf conftest*
18897   ol_cv_db_db_41=no
18898 fi
18899 rm -f conftest*
18900
18901         LIBS="$ol_LIBS"
18902
18903 fi
18904
18905 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18906
18907         if test $ol_cv_db_db_41 = yes ; then
18908                 ol_cv_lib_db=-ldb-41
18909         fi
18910 fi
18911
18912 if test $ol_cv_lib_db = no ; then
18913         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18914 echo "configure:18915: checking for Berkeley DB link (-ldb-4.1)" >&5
18915 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18916   echo $ac_n "(cached) $ac_c" 1>&6
18917 else
18918   
18919         ol_DB_LIB=-ldb-4.1
18920         ol_LIBS=$LIBS
18921         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18922
18923         cat > conftest.$ac_ext <<EOF
18924 #line 18925 "configure"
18925 #include "confdefs.h"
18926
18927 #ifdef HAVE_DB_185_H
18928 # include <db_185.h>
18929 #else
18930 # include <db.h>
18931 #endif
18932
18933 #ifndef DB_VERSION_MAJOR
18934 # define DB_VERSION_MAJOR 1
18935 #endif
18936
18937 #ifndef NULL
18938 #define NULL ((void*)0)
18939 #endif
18940
18941 int main() {
18942
18943 #if DB_VERSION_MAJOR > 1
18944         {
18945                 char *version;
18946                 int major, minor, patch;
18947
18948                 version = db_version( &major, &minor, &patch );
18949
18950                 if( major != DB_VERSION_MAJOR ||
18951                         minor < DB_VERSION_MINOR )
18952                 {
18953                         printf("Berkeley DB version mismatch\n"
18954                                 "\texpected: %s\n\tgot: %s\n",
18955                                 DB_VERSION_STRING, version);
18956                         return 1;
18957                 }
18958         }
18959 #endif
18960
18961 #if DB_VERSION_MAJOR > 2
18962         db_env_create( NULL, 0 );
18963 #elif DB_VERSION_MAJOR > 1
18964         db_appexit( NULL );
18965 #else
18966         (void) dbopen( NULL, 0, 0, 0, NULL);
18967 #endif
18968
18969 ; return 0; }
18970 EOF
18971 if { (eval echo configure:18972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18972   rm -rf conftest*
18973   ol_cv_db_db_4_dot_1=yes
18974 else
18975   echo "configure: failed program was:" >&5
18976   cat conftest.$ac_ext >&5
18977   rm -rf conftest*
18978   ol_cv_db_db_4_dot_1=no
18979 fi
18980 rm -f conftest*
18981
18982         LIBS="$ol_LIBS"
18983
18984 fi
18985
18986 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18987
18988         if test $ol_cv_db_db_4_dot_1 = yes ; then
18989                 ol_cv_lib_db=-ldb-4.1
18990         fi
18991 fi
18992
18993 if test $ol_cv_lib_db = no ; then
18994         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18995 echo "configure:18996: checking for Berkeley DB link (-ldb-4-1)" >&5
18996 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18997   echo $ac_n "(cached) $ac_c" 1>&6
18998 else
18999   
19000         ol_DB_LIB=-ldb-4-1
19001         ol_LIBS=$LIBS
19002         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19003
19004         cat > conftest.$ac_ext <<EOF
19005 #line 19006 "configure"
19006 #include "confdefs.h"
19007
19008 #ifdef HAVE_DB_185_H
19009 # include <db_185.h>
19010 #else
19011 # include <db.h>
19012 #endif
19013
19014 #ifndef DB_VERSION_MAJOR
19015 # define DB_VERSION_MAJOR 1
19016 #endif
19017
19018 #ifndef NULL
19019 #define NULL ((void*)0)
19020 #endif
19021
19022 int main() {
19023
19024 #if DB_VERSION_MAJOR > 1
19025         {
19026                 char *version;
19027                 int major, minor, patch;
19028
19029                 version = db_version( &major, &minor, &patch );
19030
19031                 if( major != DB_VERSION_MAJOR ||
19032                         minor < DB_VERSION_MINOR )
19033                 {
19034                         printf("Berkeley DB version mismatch\n"
19035                                 "\texpected: %s\n\tgot: %s\n",
19036                                 DB_VERSION_STRING, version);
19037                         return 1;
19038                 }
19039         }
19040 #endif
19041
19042 #if DB_VERSION_MAJOR > 2
19043         db_env_create( NULL, 0 );
19044 #elif DB_VERSION_MAJOR > 1
19045         db_appexit( NULL );
19046 #else
19047         (void) dbopen( NULL, 0, 0, 0, NULL);
19048 #endif
19049
19050 ; return 0; }
19051 EOF
19052 if { (eval echo configure:19053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19053   rm -rf conftest*
19054   ol_cv_db_db_4_1=yes
19055 else
19056   echo "configure: failed program was:" >&5
19057   cat conftest.$ac_ext >&5
19058   rm -rf conftest*
19059   ol_cv_db_db_4_1=no
19060 fi
19061 rm -f conftest*
19062
19063         LIBS="$ol_LIBS"
19064
19065 fi
19066
19067 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19068
19069         if test $ol_cv_db_db_4_1 = yes ; then
19070                 ol_cv_lib_db=-ldb-4-1
19071         fi
19072 fi
19073
19074 if test $ol_cv_lib_db = no ; then
19075         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19076 echo "configure:19077: checking for Berkeley DB link (-ldb3)" >&5
19077 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19078   echo $ac_n "(cached) $ac_c" 1>&6
19079 else
19080   
19081         ol_DB_LIB=-ldb3
19082         ol_LIBS=$LIBS
19083         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19084
19085         cat > conftest.$ac_ext <<EOF
19086 #line 19087 "configure"
19087 #include "confdefs.h"
19088
19089 #ifdef HAVE_DB_185_H
19090 # include <db_185.h>
19091 #else
19092 # include <db.h>
19093 #endif
19094
19095 #ifndef DB_VERSION_MAJOR
19096 # define DB_VERSION_MAJOR 1
19097 #endif
19098
19099 #ifndef NULL
19100 #define NULL ((void*)0)
19101 #endif
19102
19103 int main() {
19104
19105 #if DB_VERSION_MAJOR > 1
19106         {
19107                 char *version;
19108                 int major, minor, patch;
19109
19110                 version = db_version( &major, &minor, &patch );
19111
19112                 if( major != DB_VERSION_MAJOR ||
19113                         minor < DB_VERSION_MINOR )
19114                 {
19115                         printf("Berkeley DB version mismatch\n"
19116                                 "\texpected: %s\n\tgot: %s\n",
19117                                 DB_VERSION_STRING, version);
19118                         return 1;
19119                 }
19120         }
19121 #endif
19122
19123 #if DB_VERSION_MAJOR > 2
19124         db_env_create( NULL, 0 );
19125 #elif DB_VERSION_MAJOR > 1
19126         db_appexit( NULL );
19127 #else
19128         (void) dbopen( NULL, 0, 0, 0, NULL);
19129 #endif
19130
19131 ; return 0; }
19132 EOF
19133 if { (eval echo configure:19134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19134   rm -rf conftest*
19135   ol_cv_db_db3=yes
19136 else
19137   echo "configure: failed program was:" >&5
19138   cat conftest.$ac_ext >&5
19139   rm -rf conftest*
19140   ol_cv_db_db3=no
19141 fi
19142 rm -f conftest*
19143
19144         LIBS="$ol_LIBS"
19145
19146 fi
19147
19148 echo "$ac_t""$ol_cv_db_db3" 1>&6
19149
19150         if test $ol_cv_db_db3 = yes ; then
19151                 ol_cv_lib_db=-ldb3
19152         fi
19153 fi
19154
19155 if test $ol_cv_lib_db = no ; then
19156         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19157 echo "configure:19158: checking for Berkeley DB link (-ldb-3)" >&5
19158 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19159   echo $ac_n "(cached) $ac_c" 1>&6
19160 else
19161   
19162         ol_DB_LIB=-ldb-3
19163         ol_LIBS=$LIBS
19164         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19165
19166         cat > conftest.$ac_ext <<EOF
19167 #line 19168 "configure"
19168 #include "confdefs.h"
19169
19170 #ifdef HAVE_DB_185_H
19171 # include <db_185.h>
19172 #else
19173 # include <db.h>
19174 #endif
19175
19176 #ifndef DB_VERSION_MAJOR
19177 # define DB_VERSION_MAJOR 1
19178 #endif
19179
19180 #ifndef NULL
19181 #define NULL ((void*)0)
19182 #endif
19183
19184 int main() {
19185
19186 #if DB_VERSION_MAJOR > 1
19187         {
19188                 char *version;
19189                 int major, minor, patch;
19190
19191                 version = db_version( &major, &minor, &patch );
19192
19193                 if( major != DB_VERSION_MAJOR ||
19194                         minor < DB_VERSION_MINOR )
19195                 {
19196                         printf("Berkeley DB version mismatch\n"
19197                                 "\texpected: %s\n\tgot: %s\n",
19198                                 DB_VERSION_STRING, version);
19199                         return 1;
19200                 }
19201         }
19202 #endif
19203
19204 #if DB_VERSION_MAJOR > 2
19205         db_env_create( NULL, 0 );
19206 #elif DB_VERSION_MAJOR > 1
19207         db_appexit( NULL );
19208 #else
19209         (void) dbopen( NULL, 0, 0, 0, NULL);
19210 #endif
19211
19212 ; return 0; }
19213 EOF
19214 if { (eval echo configure:19215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19215   rm -rf conftest*
19216   ol_cv_db_db_3=yes
19217 else
19218   echo "configure: failed program was:" >&5
19219   cat conftest.$ac_ext >&5
19220   rm -rf conftest*
19221   ol_cv_db_db_3=no
19222 fi
19223 rm -f conftest*
19224
19225         LIBS="$ol_LIBS"
19226
19227 fi
19228
19229 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19230
19231         if test $ol_cv_db_db_3 = yes ; then
19232                 ol_cv_lib_db=-ldb-3
19233         fi
19234 fi
19235
19236 if test $ol_cv_lib_db = no ; then
19237         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19238 echo "configure:19239: checking for Berkeley DB link (-ldb2)" >&5
19239 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19240   echo $ac_n "(cached) $ac_c" 1>&6
19241 else
19242   
19243         ol_DB_LIB=-ldb2
19244         ol_LIBS=$LIBS
19245         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19246
19247         cat > conftest.$ac_ext <<EOF
19248 #line 19249 "configure"
19249 #include "confdefs.h"
19250
19251 #ifdef HAVE_DB_185_H
19252 # include <db_185.h>
19253 #else
19254 # include <db.h>
19255 #endif
19256
19257 #ifndef DB_VERSION_MAJOR
19258 # define DB_VERSION_MAJOR 1
19259 #endif
19260
19261 #ifndef NULL
19262 #define NULL ((void*)0)
19263 #endif
19264
19265 int main() {
19266
19267 #if DB_VERSION_MAJOR > 1
19268         {
19269                 char *version;
19270                 int major, minor, patch;
19271
19272                 version = db_version( &major, &minor, &patch );
19273
19274                 if( major != DB_VERSION_MAJOR ||
19275                         minor < DB_VERSION_MINOR )
19276                 {
19277                         printf("Berkeley DB version mismatch\n"
19278                                 "\texpected: %s\n\tgot: %s\n",
19279                                 DB_VERSION_STRING, version);
19280                         return 1;
19281                 }
19282         }
19283 #endif
19284
19285 #if DB_VERSION_MAJOR > 2
19286         db_env_create( NULL, 0 );
19287 #elif DB_VERSION_MAJOR > 1
19288         db_appexit( NULL );
19289 #else
19290         (void) dbopen( NULL, 0, 0, 0, NULL);
19291 #endif
19292
19293 ; return 0; }
19294 EOF
19295 if { (eval echo configure:19296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19296   rm -rf conftest*
19297   ol_cv_db_db2=yes
19298 else
19299   echo "configure: failed program was:" >&5
19300   cat conftest.$ac_ext >&5
19301   rm -rf conftest*
19302   ol_cv_db_db2=no
19303 fi
19304 rm -f conftest*
19305
19306         LIBS="$ol_LIBS"
19307
19308 fi
19309
19310 echo "$ac_t""$ol_cv_db_db2" 1>&6
19311
19312         if test $ol_cv_db_db2 = yes ; then
19313                 ol_cv_lib_db=-ldb2
19314         fi
19315 fi
19316
19317 if test $ol_cv_lib_db = no ; then
19318         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19319 echo "configure:19320: checking for Berkeley DB link (-ldb-2)" >&5
19320 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19321   echo $ac_n "(cached) $ac_c" 1>&6
19322 else
19323   
19324         ol_DB_LIB=-ldb-2
19325         ol_LIBS=$LIBS
19326         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19327
19328         cat > conftest.$ac_ext <<EOF
19329 #line 19330 "configure"
19330 #include "confdefs.h"
19331
19332 #ifdef HAVE_DB_185_H
19333 # include <db_185.h>
19334 #else
19335 # include <db.h>
19336 #endif
19337
19338 #ifndef DB_VERSION_MAJOR
19339 # define DB_VERSION_MAJOR 1
19340 #endif
19341
19342 #ifndef NULL
19343 #define NULL ((void*)0)
19344 #endif
19345
19346 int main() {
19347
19348 #if DB_VERSION_MAJOR > 1
19349         {
19350                 char *version;
19351                 int major, minor, patch;
19352
19353                 version = db_version( &major, &minor, &patch );
19354
19355                 if( major != DB_VERSION_MAJOR ||
19356                         minor < DB_VERSION_MINOR )
19357                 {
19358                         printf("Berkeley DB version mismatch\n"
19359                                 "\texpected: %s\n\tgot: %s\n",
19360                                 DB_VERSION_STRING, version);
19361                         return 1;
19362                 }
19363         }
19364 #endif
19365
19366 #if DB_VERSION_MAJOR > 2
19367         db_env_create( NULL, 0 );
19368 #elif DB_VERSION_MAJOR > 1
19369         db_appexit( NULL );
19370 #else
19371         (void) dbopen( NULL, 0, 0, 0, NULL);
19372 #endif
19373
19374 ; return 0; }
19375 EOF
19376 if { (eval echo configure:19377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19377   rm -rf conftest*
19378   ol_cv_db_db_2=yes
19379 else
19380   echo "configure: failed program was:" >&5
19381   cat conftest.$ac_ext >&5
19382   rm -rf conftest*
19383   ol_cv_db_db_2=no
19384 fi
19385 rm -f conftest*
19386
19387         LIBS="$ol_LIBS"
19388
19389 fi
19390
19391 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19392
19393         if test $ol_cv_db_db_2 = yes ; then
19394                 ol_cv_lib_db=-ldb-2
19395         fi
19396 fi
19397
19398 if test $ol_cv_lib_db = no ; then
19399         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19400 echo "configure:19401: checking for Berkeley DB link (-ldb1)" >&5
19401 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19402   echo $ac_n "(cached) $ac_c" 1>&6
19403 else
19404   
19405         ol_DB_LIB=-ldb1
19406         ol_LIBS=$LIBS
19407         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19408
19409         cat > conftest.$ac_ext <<EOF
19410 #line 19411 "configure"
19411 #include "confdefs.h"
19412
19413 #ifdef HAVE_DB_185_H
19414 # include <db_185.h>
19415 #else
19416 # include <db.h>
19417 #endif
19418
19419 #ifndef DB_VERSION_MAJOR
19420 # define DB_VERSION_MAJOR 1
19421 #endif
19422
19423 #ifndef NULL
19424 #define NULL ((void*)0)
19425 #endif
19426
19427 int main() {
19428
19429 #if DB_VERSION_MAJOR > 1
19430         {
19431                 char *version;
19432                 int major, minor, patch;
19433
19434                 version = db_version( &major, &minor, &patch );
19435
19436                 if( major != DB_VERSION_MAJOR ||
19437                         minor < DB_VERSION_MINOR )
19438                 {
19439                         printf("Berkeley DB version mismatch\n"
19440                                 "\texpected: %s\n\tgot: %s\n",
19441                                 DB_VERSION_STRING, version);
19442                         return 1;
19443                 }
19444         }
19445 #endif
19446
19447 #if DB_VERSION_MAJOR > 2
19448         db_env_create( NULL, 0 );
19449 #elif DB_VERSION_MAJOR > 1
19450         db_appexit( NULL );
19451 #else
19452         (void) dbopen( NULL, 0, 0, 0, NULL);
19453 #endif
19454
19455 ; return 0; }
19456 EOF
19457 if { (eval echo configure:19458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19458   rm -rf conftest*
19459   ol_cv_db_db1=yes
19460 else
19461   echo "configure: failed program was:" >&5
19462   cat conftest.$ac_ext >&5
19463   rm -rf conftest*
19464   ol_cv_db_db1=no
19465 fi
19466 rm -f conftest*
19467
19468         LIBS="$ol_LIBS"
19469
19470 fi
19471
19472 echo "$ac_t""$ol_cv_db_db1" 1>&6
19473
19474         if test $ol_cv_db_db1 = yes ; then
19475                 ol_cv_lib_db=-ldb1
19476         fi
19477 fi
19478
19479 if test $ol_cv_lib_db = no ; then
19480         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19481 echo "configure:19482: checking for Berkeley DB link (-ldb-1)" >&5
19482 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19483   echo $ac_n "(cached) $ac_c" 1>&6
19484 else
19485   
19486         ol_DB_LIB=-ldb-1
19487         ol_LIBS=$LIBS
19488         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19489
19490         cat > conftest.$ac_ext <<EOF
19491 #line 19492 "configure"
19492 #include "confdefs.h"
19493
19494 #ifdef HAVE_DB_185_H
19495 # include <db_185.h>
19496 #else
19497 # include <db.h>
19498 #endif
19499
19500 #ifndef DB_VERSION_MAJOR
19501 # define DB_VERSION_MAJOR 1
19502 #endif
19503
19504 #ifndef NULL
19505 #define NULL ((void*)0)
19506 #endif
19507
19508 int main() {
19509
19510 #if DB_VERSION_MAJOR > 1
19511         {
19512                 char *version;
19513                 int major, minor, patch;
19514
19515                 version = db_version( &major, &minor, &patch );
19516
19517                 if( major != DB_VERSION_MAJOR ||
19518                         minor < DB_VERSION_MINOR )
19519                 {
19520                         printf("Berkeley DB version mismatch\n"
19521                                 "\texpected: %s\n\tgot: %s\n",
19522                                 DB_VERSION_STRING, version);
19523                         return 1;
19524                 }
19525         }
19526 #endif
19527
19528 #if DB_VERSION_MAJOR > 2
19529         db_env_create( NULL, 0 );
19530 #elif DB_VERSION_MAJOR > 1
19531         db_appexit( NULL );
19532 #else
19533         (void) dbopen( NULL, 0, 0, 0, NULL);
19534 #endif
19535
19536 ; return 0; }
19537 EOF
19538 if { (eval echo configure:19539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19539   rm -rf conftest*
19540   ol_cv_db_db_1=yes
19541 else
19542   echo "configure: failed program was:" >&5
19543   cat conftest.$ac_ext >&5
19544   rm -rf conftest*
19545   ol_cv_db_db_1=no
19546 fi
19547 rm -f conftest*
19548
19549         LIBS="$ol_LIBS"
19550
19551 fi
19552
19553 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19554
19555         if test $ol_cv_db_db_1 = yes ; then
19556                 ol_cv_lib_db=-ldb-1
19557         fi
19558 fi
19559
19560
19561         if test "$ol_cv_lib_db" != no ; then
19562                 ol_cv_berkeley_db=yes
19563                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19564 echo "configure:19565: checking for Berkeley DB thread support" >&5
19565 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19566   echo $ac_n "(cached) $ac_c" 1>&6
19567 else
19568   
19569         ol_LIBS="$LIBS"
19570         LIBS="$LTHREAD_LIBS $LIBS"
19571         if test $ol_cv_lib_db != yes ; then
19572                 LIBS="$ol_cv_lib_db $LIBS"
19573         fi
19574
19575         if test "$cross_compiling" = yes; then
19576   ol_cv_berkeley_db_thread=cross
19577 else
19578   cat > conftest.$ac_ext <<EOF
19579 #line 19580 "configure"
19580 #include "confdefs.h"
19581
19582 #ifdef HAVE_DB_185_H
19583         choke me;
19584 #else
19585 #include <db.h>
19586 #endif
19587 #ifndef NULL
19588 #define NULL ((void *)0)
19589 #endif
19590 main()
19591 {
19592         int rc;
19593         u_int32_t flags = DB_CREATE |
19594 #ifdef DB_PRIVATE
19595                 DB_PRIVATE |
19596 #endif
19597                 DB_THREAD;
19598
19599 #if DB_VERSION_MAJOR > 2
19600         DB_ENV *env = NULL;
19601
19602         rc = db_env_create( &env, 0 );
19603
19604         flags |= DB_INIT_MPOOL;
19605 #ifdef DB_MPOOL_PRIVATE
19606         flags |= DB_MPOOL_PRIVATE;
19607 #endif
19608
19609         if( rc ) {
19610                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19611                 return rc;
19612         }
19613
19614 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19615         rc = env->open( env, NULL, flags, 0 );
19616 #else
19617         rc = env->open( env, NULL, NULL, flags, 0 );
19618 #endif
19619
19620         if ( rc == 0 ) {
19621                 rc = env->close( env, 0 );
19622         }
19623
19624         if( rc ) {
19625                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19626                 return rc;
19627         }
19628
19629 #else
19630         DB_ENV env;
19631         memset( &env, '\0', sizeof(env) );
19632
19633         rc = db_appinit( NULL, NULL, &env, flags );
19634
19635         if( rc == 0 ) {
19636                 db_appexit( &env );
19637         }
19638
19639         unlink("__db_mpool.share");
19640         unlink("__db_lock.share");
19641 #endif
19642
19643         return rc;
19644 }
19645 EOF
19646 if { (eval echo configure:19647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19647 then
19648   ol_cv_berkeley_db_thread=yes
19649 else
19650   echo "configure: failed program was:" >&5
19651   cat conftest.$ac_ext >&5
19652   rm -fr conftest*
19653   ol_cv_berkeley_db_thread=no
19654 fi
19655 rm -fr conftest*
19656 fi
19657
19658
19659         LIBS="$ol_LIBS"
19660
19661 fi
19662
19663 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19664
19665         if test $ol_cv_berkeley_db_thread != no ; then
19666                 cat >> confdefs.h <<\EOF
19667 #define HAVE_BERKELEY_DB_THREAD 1
19668 EOF
19669
19670         fi
19671
19672         fi
19673 fi
19674
19675         fi
19676
19677         if test $ol_cv_berkeley_db != no ; then
19678                 cat >> confdefs.h <<\EOF
19679 #define HAVE_BERKELEY_DB 1
19680 EOF
19681
19682
19683                 ol_link_ldbm=berkeley
19684                 ol_with_ldbm_api=berkeley
19685
19686                 if test $ol_with_ldbm_type = hash ; then
19687                         cat >> confdefs.h <<\EOF
19688 #define LDBM_USE_DBHASH 1
19689 EOF
19690
19691                 else
19692                         cat >> confdefs.h <<\EOF
19693 #define LDBM_USE_DBBTREE 1
19694 EOF
19695
19696                 fi
19697
19698                                                 if test $ol_cv_lib_db != yes ; then
19699                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19700                 fi
19701         fi
19702 fi
19703
19704 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19705         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19706 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19707         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19708 echo "configure:19709: checking Berkeley DB version for BDB backend" >&5
19709 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19710   echo $ac_n "(cached) $ac_c" 1>&6
19711 else
19712   
19713         cat > conftest.$ac_ext <<EOF
19714 #line 19715 "configure"
19715 #include "confdefs.h"
19716
19717 #include <db.h>
19718
19719  /* this check could be improved */
19720 #ifndef DB_VERSION_MAJOR
19721 #       define DB_VERSION_MAJOR 1
19722 #endif
19723 #ifndef DB_VERSION_MINOR
19724 #       define DB_VERSION_MINOR 0
19725 #endif
19726
19727 /* require 4.2 or later */
19728 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19729         __db_version_compat
19730 #endif
19731         
19732 EOF
19733 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19734   egrep "__db_version_compat" >/dev/null 2>&1; then
19735   rm -rf conftest*
19736   ol_cv_bdb_compat=yes
19737 else
19738   rm -rf conftest*
19739   ol_cv_bdb_compat=no
19740 fi
19741 rm -f conftest*
19742
19743 fi
19744
19745 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19746
19747
19748         if test $ol_cv_bdb_compat = yes ; then
19749                 ol_enable_bdb=yes
19750         elif test $ol_enable_bdb = yes ; then
19751                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19752         else
19753                 ol_enable_bdb=no
19754         fi
19755 fi
19756 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19757         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19758 fi
19759
19760 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19761         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19762         ol_with_ldbm_api=none
19763 fi
19764
19765 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19766         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19767 echo "configure:19768: checking for MDBM library" >&5
19768 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19769   echo $ac_n "(cached) $ac_c" 1>&6
19770 else
19771         ol_LIBS="$LIBS"
19772         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19773 echo "configure:19774: checking for mdbm_set_chain" >&5
19774 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19775   echo $ac_n "(cached) $ac_c" 1>&6
19776 else
19777   cat > conftest.$ac_ext <<EOF
19778 #line 19779 "configure"
19779 #include "confdefs.h"
19780 /* System header to define __stub macros and hopefully few prototypes,
19781     which can conflict with char mdbm_set_chain(); below.  */
19782 #include <assert.h>
19783 /* Override any gcc2 internal prototype to avoid an error.  */
19784 /* We use char because int might match the return type of a gcc2
19785     builtin and then its argument prototype would still apply.  */
19786 char mdbm_set_chain();
19787 char (*f)();
19788
19789 int main() {
19790
19791 /* The GNU C library defines this for functions which it implements
19792     to always fail with ENOSYS.  Some functions are actually named
19793     something starting with __ and the normal name is an alias.  */
19794 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19795 choke me
19796 #else
19797 f = mdbm_set_chain;
19798 #endif
19799
19800 ; return 0; }
19801 EOF
19802 if { (eval echo configure:19803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19803   rm -rf conftest*
19804   eval "ac_cv_func_mdbm_set_chain=yes"
19805 else
19806   echo "configure: failed program was:" >&5
19807   cat conftest.$ac_ext >&5
19808   rm -rf conftest*
19809   eval "ac_cv_func_mdbm_set_chain=no"
19810 fi
19811 rm -f conftest*
19812 fi
19813
19814 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19815   echo "$ac_t""yes" 1>&6
19816   ol_cv_lib_mdbm=yes
19817 else
19818   echo "$ac_t""no" 1>&6
19819
19820                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19821 echo "configure:19822: checking for mdbm_set_chain in -lmdbm" >&5
19822 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19823 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19824   echo $ac_n "(cached) $ac_c" 1>&6
19825 else
19826   ac_save_LIBS="$LIBS"
19827 LIBS="-lmdbm  $LIBS"
19828 cat > conftest.$ac_ext <<EOF
19829 #line 19830 "configure"
19830 #include "confdefs.h"
19831 /* Override any gcc2 internal prototype to avoid an error.  */
19832 /* We use char because int might match the return type of a gcc2
19833     builtin and then its argument prototype would still apply.  */
19834 char mdbm_set_chain();
19835
19836 int main() {
19837 mdbm_set_chain()
19838 ; return 0; }
19839 EOF
19840 if { (eval echo configure:19841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19841   rm -rf conftest*
19842   eval "ac_cv_lib_$ac_lib_var=yes"
19843 else
19844   echo "configure: failed program was:" >&5
19845   cat conftest.$ac_ext >&5
19846   rm -rf conftest*
19847   eval "ac_cv_lib_$ac_lib_var=no"
19848 fi
19849 rm -f conftest*
19850 LIBS="$ac_save_LIBS"
19851
19852 fi
19853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19854   echo "$ac_t""yes" 1>&6
19855   ol_cv_lib_mdbm=-lmdbm
19856 else
19857   echo "$ac_t""no" 1>&6
19858 ol_cv_lib_mdbm=no
19859 fi
19860
19861         
19862 fi
19863
19864         LIBS="$ol_LIBS"
19865
19866 fi
19867
19868 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19869
19870
19871  for ac_hdr in mdbm.h
19872 do
19873 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19874 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19875 echo "configure:19876: checking for $ac_hdr" >&5
19876 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19877   echo $ac_n "(cached) $ac_c" 1>&6
19878 else
19879   cat > conftest.$ac_ext <<EOF
19880 #line 19881 "configure"
19881 #include "confdefs.h"
19882 #include <$ac_hdr>
19883 EOF
19884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19885 { (eval echo configure:19886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19887 if test -z "$ac_err"; then
19888   rm -rf conftest*
19889   eval "ac_cv_header_$ac_safe=yes"
19890 else
19891   echo "$ac_err" >&5
19892   echo "configure: failed program was:" >&5
19893   cat conftest.$ac_ext >&5
19894   rm -rf conftest*
19895   eval "ac_cv_header_$ac_safe=no"
19896 fi
19897 rm -f conftest*
19898 fi
19899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19900   echo "$ac_t""yes" 1>&6
19901     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19902   cat >> confdefs.h <<EOF
19903 #define $ac_tr_hdr 1
19904 EOF
19905  
19906 else
19907   echo "$ac_t""no" 1>&6
19908 fi
19909 done
19910
19911  echo $ac_n "checking for db""... $ac_c" 1>&6
19912 echo "configure:19913: checking for db" >&5
19913 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19914   echo $ac_n "(cached) $ac_c" 1>&6
19915 else
19916   
19917         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19918                 ol_cv_mdbm=no
19919         else
19920                 ol_cv_mdbm=yes
19921         fi
19922
19923 fi
19924
19925 echo "$ac_t""$ol_cv_mdbm" 1>&6
19926  if test $ol_cv_mdbm = yes ; then
19927         cat >> confdefs.h <<\EOF
19928 #define HAVE_MDBM 1
19929 EOF
19930
19931  fi
19932
19933
19934         if test $ol_cv_mdbm = yes ; then
19935                 ol_link_ldbm=mdbm
19936                 ol_with_ldbm_api=mdbm
19937                 if test $ol_cv_lib_mdbm != yes ; then
19938                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19939                 fi
19940         fi
19941 fi
19942
19943 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19944         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19945 echo "configure:19946: checking for GDBM library" >&5
19946 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19947   echo $ac_n "(cached) $ac_c" 1>&6
19948 else
19949         ol_LIBS="$LIBS"
19950         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19951 echo "configure:19952: checking for gdbm_open" >&5
19952 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19953   echo $ac_n "(cached) $ac_c" 1>&6
19954 else
19955   cat > conftest.$ac_ext <<EOF
19956 #line 19957 "configure"
19957 #include "confdefs.h"
19958 /* System header to define __stub macros and hopefully few prototypes,
19959     which can conflict with char gdbm_open(); below.  */
19960 #include <assert.h>
19961 /* Override any gcc2 internal prototype to avoid an error.  */
19962 /* We use char because int might match the return type of a gcc2
19963     builtin and then its argument prototype would still apply.  */
19964 char gdbm_open();
19965 char (*f)();
19966
19967 int main() {
19968
19969 /* The GNU C library defines this for functions which it implements
19970     to always fail with ENOSYS.  Some functions are actually named
19971     something starting with __ and the normal name is an alias.  */
19972 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19973 choke me
19974 #else
19975 f = gdbm_open;
19976 #endif
19977
19978 ; return 0; }
19979 EOF
19980 if { (eval echo configure:19981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19981   rm -rf conftest*
19982   eval "ac_cv_func_gdbm_open=yes"
19983 else
19984   echo "configure: failed program was:" >&5
19985   cat conftest.$ac_ext >&5
19986   rm -rf conftest*
19987   eval "ac_cv_func_gdbm_open=no"
19988 fi
19989 rm -f conftest*
19990 fi
19991
19992 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19993   echo "$ac_t""yes" 1>&6
19994   ol_cv_lib_gdbm=yes
19995 else
19996   echo "$ac_t""no" 1>&6
19997
19998                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19999 echo "configure:20000: checking for gdbm_open in -lgdbm" >&5
20000 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20001 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20002   echo $ac_n "(cached) $ac_c" 1>&6
20003 else
20004   ac_save_LIBS="$LIBS"
20005 LIBS="-lgdbm  $LIBS"
20006 cat > conftest.$ac_ext <<EOF
20007 #line 20008 "configure"
20008 #include "confdefs.h"
20009 /* Override any gcc2 internal prototype to avoid an error.  */
20010 /* We use char because int might match the return type of a gcc2
20011     builtin and then its argument prototype would still apply.  */
20012 char gdbm_open();
20013
20014 int main() {
20015 gdbm_open()
20016 ; return 0; }
20017 EOF
20018 if { (eval echo configure:20019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20019   rm -rf conftest*
20020   eval "ac_cv_lib_$ac_lib_var=yes"
20021 else
20022   echo "configure: failed program was:" >&5
20023   cat conftest.$ac_ext >&5
20024   rm -rf conftest*
20025   eval "ac_cv_lib_$ac_lib_var=no"
20026 fi
20027 rm -f conftest*
20028 LIBS="$ac_save_LIBS"
20029
20030 fi
20031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20032   echo "$ac_t""yes" 1>&6
20033   ol_cv_lib_gdbm=-lgdbm
20034 else
20035   echo "$ac_t""no" 1>&6
20036 ol_cv_lib_gdbm=no
20037 fi
20038
20039         
20040 fi
20041
20042         LIBS="$ol_LIBS"
20043
20044 fi
20045
20046 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20047
20048
20049  for ac_hdr in gdbm.h
20050 do
20051 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20052 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20053 echo "configure:20054: checking for $ac_hdr" >&5
20054 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20055   echo $ac_n "(cached) $ac_c" 1>&6
20056 else
20057   cat > conftest.$ac_ext <<EOF
20058 #line 20059 "configure"
20059 #include "confdefs.h"
20060 #include <$ac_hdr>
20061 EOF
20062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20063 { (eval echo configure:20064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20065 if test -z "$ac_err"; then
20066   rm -rf conftest*
20067   eval "ac_cv_header_$ac_safe=yes"
20068 else
20069   echo "$ac_err" >&5
20070   echo "configure: failed program was:" >&5
20071   cat conftest.$ac_ext >&5
20072   rm -rf conftest*
20073   eval "ac_cv_header_$ac_safe=no"
20074 fi
20075 rm -f conftest*
20076 fi
20077 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20078   echo "$ac_t""yes" 1>&6
20079     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20080   cat >> confdefs.h <<EOF
20081 #define $ac_tr_hdr 1
20082 EOF
20083  
20084 else
20085   echo "$ac_t""no" 1>&6
20086 fi
20087 done
20088
20089  echo $ac_n "checking for db""... $ac_c" 1>&6
20090 echo "configure:20091: checking for db" >&5
20091 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20092   echo $ac_n "(cached) $ac_c" 1>&6
20093 else
20094   
20095         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20096                 ol_cv_gdbm=no
20097         else
20098                 ol_cv_gdbm=yes
20099         fi
20100
20101 fi
20102
20103 echo "$ac_t""$ol_cv_gdbm" 1>&6
20104  if test $ol_cv_gdbm = yes ; then
20105         cat >> confdefs.h <<\EOF
20106 #define HAVE_GDBM 1
20107 EOF
20108
20109  fi
20110
20111
20112         if test $ol_cv_gdbm = yes ; then
20113                 ol_link_ldbm=gdbm
20114                 ol_with_ldbm_api=gdbm
20115
20116                 if test $ol_cv_lib_gdbm != yes ; then
20117                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20118                 fi
20119         fi
20120 fi
20121
20122 if test $ol_with_ldbm_api = ndbm ; then
20123         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20124 echo "configure:20125: checking for NDBM library" >&5
20125 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20126   echo $ac_n "(cached) $ac_c" 1>&6
20127 else
20128         ol_LIBS="$LIBS"
20129         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20130 echo "configure:20131: checking for dbm_open" >&5
20131 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20132   echo $ac_n "(cached) $ac_c" 1>&6
20133 else
20134   cat > conftest.$ac_ext <<EOF
20135 #line 20136 "configure"
20136 #include "confdefs.h"
20137 /* System header to define __stub macros and hopefully few prototypes,
20138     which can conflict with char dbm_open(); below.  */
20139 #include <assert.h>
20140 /* Override any gcc2 internal prototype to avoid an error.  */
20141 /* We use char because int might match the return type of a gcc2
20142     builtin and then its argument prototype would still apply.  */
20143 char dbm_open();
20144 char (*f)();
20145
20146 int main() {
20147
20148 /* The GNU C library defines this for functions which it implements
20149     to always fail with ENOSYS.  Some functions are actually named
20150     something starting with __ and the normal name is an alias.  */
20151 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20152 choke me
20153 #else
20154 f = dbm_open;
20155 #endif
20156
20157 ; return 0; }
20158 EOF
20159 if { (eval echo configure:20160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20160   rm -rf conftest*
20161   eval "ac_cv_func_dbm_open=yes"
20162 else
20163   echo "configure: failed program was:" >&5
20164   cat conftest.$ac_ext >&5
20165   rm -rf conftest*
20166   eval "ac_cv_func_dbm_open=no"
20167 fi
20168 rm -f conftest*
20169 fi
20170
20171 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20172   echo "$ac_t""yes" 1>&6
20173   ol_cv_lib_ndbm=yes
20174 else
20175   echo "$ac_t""no" 1>&6
20176
20177                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20178 echo "configure:20179: checking for dbm_open in -lndbm" >&5
20179 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20180 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20181   echo $ac_n "(cached) $ac_c" 1>&6
20182 else
20183   ac_save_LIBS="$LIBS"
20184 LIBS="-lndbm  $LIBS"
20185 cat > conftest.$ac_ext <<EOF
20186 #line 20187 "configure"
20187 #include "confdefs.h"
20188 /* Override any gcc2 internal prototype to avoid an error.  */
20189 /* We use char because int might match the return type of a gcc2
20190     builtin and then its argument prototype would still apply.  */
20191 char dbm_open();
20192
20193 int main() {
20194 dbm_open()
20195 ; return 0; }
20196 EOF
20197 if { (eval echo configure:20198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20198   rm -rf conftest*
20199   eval "ac_cv_lib_$ac_lib_var=yes"
20200 else
20201   echo "configure: failed program was:" >&5
20202   cat conftest.$ac_ext >&5
20203   rm -rf conftest*
20204   eval "ac_cv_lib_$ac_lib_var=no"
20205 fi
20206 rm -f conftest*
20207 LIBS="$ac_save_LIBS"
20208
20209 fi
20210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20211   echo "$ac_t""yes" 1>&6
20212   ol_cv_lib_ndbm=-lndbm
20213 else
20214   echo "$ac_t""no" 1>&6
20215
20216                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20217 echo "configure:20218: checking for dbm_open in -ldbm" >&5
20218 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20219 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20220   echo $ac_n "(cached) $ac_c" 1>&6
20221 else
20222   ac_save_LIBS="$LIBS"
20223 LIBS="-ldbm  $LIBS"
20224 cat > conftest.$ac_ext <<EOF
20225 #line 20226 "configure"
20226 #include "confdefs.h"
20227 /* Override any gcc2 internal prototype to avoid an error.  */
20228 /* We use char because int might match the return type of a gcc2
20229     builtin and then its argument prototype would still apply.  */
20230 char dbm_open();
20231
20232 int main() {
20233 dbm_open()
20234 ; return 0; }
20235 EOF
20236 if { (eval echo configure:20237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20237   rm -rf conftest*
20238   eval "ac_cv_lib_$ac_lib_var=yes"
20239 else
20240   echo "configure: failed program was:" >&5
20241   cat conftest.$ac_ext >&5
20242   rm -rf conftest*
20243   eval "ac_cv_lib_$ac_lib_var=no"
20244 fi
20245 rm -f conftest*
20246 LIBS="$ac_save_LIBS"
20247
20248 fi
20249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20250   echo "$ac_t""yes" 1>&6
20251   ol_cv_lib_ndbm=-ldbm
20252 else
20253   echo "$ac_t""no" 1>&6
20254 ol_cv_lib_ndbm=no
20255 fi
20256                 
20257 fi
20258
20259         
20260 fi
20261
20262         LIBS="$ol_LIBS"
20263
20264 fi
20265
20266 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20267
20268
20269  for ac_hdr in ndbm.h
20270 do
20271 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20272 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20273 echo "configure:20274: checking for $ac_hdr" >&5
20274 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20275   echo $ac_n "(cached) $ac_c" 1>&6
20276 else
20277   cat > conftest.$ac_ext <<EOF
20278 #line 20279 "configure"
20279 #include "confdefs.h"
20280 #include <$ac_hdr>
20281 EOF
20282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20283 { (eval echo configure:20284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20285 if test -z "$ac_err"; then
20286   rm -rf conftest*
20287   eval "ac_cv_header_$ac_safe=yes"
20288 else
20289   echo "$ac_err" >&5
20290   echo "configure: failed program was:" >&5
20291   cat conftest.$ac_ext >&5
20292   rm -rf conftest*
20293   eval "ac_cv_header_$ac_safe=no"
20294 fi
20295 rm -f conftest*
20296 fi
20297 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20298   echo "$ac_t""yes" 1>&6
20299     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20300   cat >> confdefs.h <<EOF
20301 #define $ac_tr_hdr 1
20302 EOF
20303  
20304 else
20305   echo "$ac_t""no" 1>&6
20306 fi
20307 done
20308
20309  echo $ac_n "checking for db""... $ac_c" 1>&6
20310 echo "configure:20311: checking for db" >&5
20311 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20312   echo $ac_n "(cached) $ac_c" 1>&6
20313 else
20314   
20315         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20316                 ol_cv_ndbm=no
20317         else
20318                 ol_cv_ndbm=yes
20319         fi
20320
20321 fi
20322
20323 echo "$ac_t""$ol_cv_ndbm" 1>&6
20324  if test $ol_cv_ndbm = yes ; then
20325         cat >> confdefs.h <<\EOF
20326 #define HAVE_NDBM 1
20327 EOF
20328
20329  fi
20330
20331
20332         if test $ol_cv_ndbm = yes ; then
20333                 ol_link_ldbm=ndbm
20334                 ol_with_ldbm_api=ndbm
20335
20336                 if test $ol_cv_lib_ndbm != yes ; then
20337                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20338                 fi
20339         fi
20340 fi
20341
20342 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20343         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20344         if test $ol_enable_ldbm = yes ; then
20345                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20346         fi
20347
20348         echo "configure: warning: disabling LDBM" 1>&2
20349         ol_enable_ldbm=no
20350 fi
20351
20352
20353 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20354         BUILD_LIBS_DYNAMIC=shared
20355         cat >> confdefs.h <<\EOF
20356 #define LDAP_LIBS_DYNAMIC 1
20357 EOF
20358
20359         LTSTATIC=""
20360 else
20361         BUILD_LIBS_DYNAMIC=static
20362         LTSTATIC="-static"
20363 fi
20364
20365 if test $ol_enable_wrappers != no ; then
20366         for ac_hdr in tcpd.h
20367 do
20368 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20369 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20370 echo "configure:20371: checking for $ac_hdr" >&5
20371 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20372   echo $ac_n "(cached) $ac_c" 1>&6
20373 else
20374   cat > conftest.$ac_ext <<EOF
20375 #line 20376 "configure"
20376 #include "confdefs.h"
20377 #include <$ac_hdr>
20378 EOF
20379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20380 { (eval echo configure:20381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20382 if test -z "$ac_err"; then
20383   rm -rf conftest*
20384   eval "ac_cv_header_$ac_safe=yes"
20385 else
20386   echo "$ac_err" >&5
20387   echo "configure: failed program was:" >&5
20388   cat conftest.$ac_ext >&5
20389   rm -rf conftest*
20390   eval "ac_cv_header_$ac_safe=no"
20391 fi
20392 rm -f conftest*
20393 fi
20394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20395   echo "$ac_t""yes" 1>&6
20396     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20397   cat >> confdefs.h <<EOF
20398 #define $ac_tr_hdr 1
20399 EOF
20400  
20401                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20402 echo "configure:20403: checking for TCP wrappers library" >&5
20403                 save_LIBS="$LIBS"
20404                 LIBS="$LIBS -lwrap"
20405                 cat > conftest.$ac_ext <<EOF
20406 #line 20407 "configure"
20407 #include "confdefs.h"
20408
20409 #include <tcpd.h>
20410 int allow_severity = 0;
20411 int deny_severity  = 0;
20412
20413 struct request_info *req;
20414                 
20415 int main() {
20416
20417 hosts_access(req)
20418                 
20419 ; return 0; }
20420 EOF
20421 if { (eval echo configure:20422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20422   rm -rf conftest*
20423   echo "$ac_t""-lwrap" 1>&6
20424                 have_wrappers=yes
20425                 LIBS="$save_LIBS"
20426 else
20427   echo "configure: failed program was:" >&5
20428   cat conftest.$ac_ext >&5
20429   rm -rf conftest*
20430   
20431                                 LIBS="$LIBS -lnsl"
20432                 cat > conftest.$ac_ext <<EOF
20433 #line 20434 "configure"
20434 #include "confdefs.h"
20435
20436 #include <tcpd.h>
20437 int allow_severity = 0;
20438 int deny_severity  = 0;
20439
20440 struct request_info *req;
20441                 
20442 int main() {
20443
20444 hosts_access(req)
20445                 
20446 ; return 0; }
20447 EOF
20448 if { (eval echo configure:20449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20449   rm -rf conftest*
20450   echo "$ac_t""-lwrap -lnsl" 1>&6
20451                 have_wrappers=yes
20452                 LIBS="$save_LIBS -lnsl"
20453 else
20454   echo "configure: failed program was:" >&5
20455   cat conftest.$ac_ext >&5
20456   rm -rf conftest*
20457   
20458                 echo "$ac_t""no" 1>&6
20459                 have_wrappers=no
20460                 LIBS=$save_LIBS
20461 fi
20462 rm -f conftest*
20463 fi
20464 rm -f conftest*
20465 else
20466   echo "$ac_t""no" 1>&6
20467 have_wrappers=no
20468 fi
20469 done
20470
20471
20472         if test $have_wrappers = yes ; then
20473                 cat >> confdefs.h <<\EOF
20474 #define HAVE_TCPD 1
20475 EOF
20476
20477                 WRAP_LIBS="-lwrap"
20478         elif test $ol_enable_wrappers = yes ; then
20479                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20480         else
20481                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20482                 WRAP_LIBS=""
20483         fi
20484 fi
20485
20486 if test $ol_enable_syslog != no ; then
20487         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20488 echo "configure:20489: checking for openlog" >&5
20489 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20490   echo $ac_n "(cached) $ac_c" 1>&6
20491 else
20492   cat > conftest.$ac_ext <<EOF
20493 #line 20494 "configure"
20494 #include "confdefs.h"
20495 /* System header to define __stub macros and hopefully few prototypes,
20496     which can conflict with char openlog(); below.  */
20497 #include <assert.h>
20498 /* Override any gcc2 internal prototype to avoid an error.  */
20499 /* We use char because int might match the return type of a gcc2
20500     builtin and then its argument prototype would still apply.  */
20501 char openlog();
20502 char (*f)();
20503
20504 int main() {
20505
20506 /* The GNU C library defines this for functions which it implements
20507     to always fail with ENOSYS.  Some functions are actually named
20508     something starting with __ and the normal name is an alias.  */
20509 #if defined (__stub_openlog) || defined (__stub___openlog)
20510 choke me
20511 #else
20512 f = openlog;
20513 #endif
20514
20515 ; return 0; }
20516 EOF
20517 if { (eval echo configure:20518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20518   rm -rf conftest*
20519   eval "ac_cv_func_openlog=yes"
20520 else
20521   echo "configure: failed program was:" >&5
20522   cat conftest.$ac_ext >&5
20523   rm -rf conftest*
20524   eval "ac_cv_func_openlog=no"
20525 fi
20526 rm -f conftest*
20527 fi
20528
20529 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20530   echo "$ac_t""yes" 1>&6
20531   :
20532 else
20533   echo "$ac_t""no" 1>&6
20534 fi
20535
20536         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20537                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20538         fi
20539         ol_enable_syslog=$ac_cv_func_openlog
20540 fi
20541
20542
20543 ol_link_sql=no
20544 if test $ol_enable_sql != no ; then
20545         for ac_hdr in sql.h sqlext.h
20546 do
20547 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20548 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20549 echo "configure:20550: checking for $ac_hdr" >&5
20550 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20551   echo $ac_n "(cached) $ac_c" 1>&6
20552 else
20553   cat > conftest.$ac_ext <<EOF
20554 #line 20555 "configure"
20555 #include "confdefs.h"
20556 #include <$ac_hdr>
20557 EOF
20558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20559 { (eval echo configure:20560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20560 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20561 if test -z "$ac_err"; then
20562   rm -rf conftest*
20563   eval "ac_cv_header_$ac_safe=yes"
20564 else
20565   echo "$ac_err" >&5
20566   echo "configure: failed program was:" >&5
20567   cat conftest.$ac_ext >&5
20568   rm -rf conftest*
20569   eval "ac_cv_header_$ac_safe=no"
20570 fi
20571 rm -f conftest*
20572 fi
20573 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20574   echo "$ac_t""yes" 1>&6
20575     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20576   cat >> confdefs.h <<EOF
20577 #define $ac_tr_hdr 1
20578 EOF
20579  
20580 else
20581   echo "$ac_t""no" 1>&6
20582 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20583         
20584 fi
20585 done
20586
20587
20588         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20589 echo "configure:20590: checking for SQLDriverConnect in -liodbc" >&5
20590 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20591 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20592   echo $ac_n "(cached) $ac_c" 1>&6
20593 else
20594   ac_save_LIBS="$LIBS"
20595 LIBS="-liodbc  $LIBS"
20596 cat > conftest.$ac_ext <<EOF
20597 #line 20598 "configure"
20598 #include "confdefs.h"
20599 /* Override any gcc2 internal prototype to avoid an error.  */
20600 /* We use char because int might match the return type of a gcc2
20601     builtin and then its argument prototype would still apply.  */
20602 char SQLDriverConnect();
20603
20604 int main() {
20605 SQLDriverConnect()
20606 ; return 0; }
20607 EOF
20608 if { (eval echo configure:20609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20609   rm -rf conftest*
20610   eval "ac_cv_lib_$ac_lib_var=yes"
20611 else
20612   echo "configure: failed program was:" >&5
20613   cat conftest.$ac_ext >&5
20614   rm -rf conftest*
20615   eval "ac_cv_lib_$ac_lib_var=no"
20616 fi
20617 rm -f conftest*
20618 LIBS="$ac_save_LIBS"
20619
20620 fi
20621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20622   echo "$ac_t""yes" 1>&6
20623   have_iodbc=yes
20624 else
20625   echo "$ac_t""no" 1>&6
20626 have_iodbc=no
20627 fi
20628
20629         if test $have_iodbc = yes ; then
20630                 ol_link_sql="-liodbc"
20631         else
20632                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20633 echo "configure:20634: checking for SQLDriverConnect in -lodbc" >&5
20634 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20635 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20636   echo $ac_n "(cached) $ac_c" 1>&6
20637 else
20638   ac_save_LIBS="$LIBS"
20639 LIBS="-lodbc  $LIBS"
20640 cat > conftest.$ac_ext <<EOF
20641 #line 20642 "configure"
20642 #include "confdefs.h"
20643 /* Override any gcc2 internal prototype to avoid an error.  */
20644 /* We use char because int might match the return type of a gcc2
20645     builtin and then its argument prototype would still apply.  */
20646 char SQLDriverConnect();
20647
20648 int main() {
20649 SQLDriverConnect()
20650 ; return 0; }
20651 EOF
20652 if { (eval echo configure:20653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20653   rm -rf conftest*
20654   eval "ac_cv_lib_$ac_lib_var=yes"
20655 else
20656   echo "configure: failed program was:" >&5
20657   cat conftest.$ac_ext >&5
20658   rm -rf conftest*
20659   eval "ac_cv_lib_$ac_lib_var=no"
20660 fi
20661 rm -f conftest*
20662 LIBS="$ac_save_LIBS"
20663
20664 fi
20665 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20666   echo "$ac_t""yes" 1>&6
20667   have_odbc=yes
20668 else
20669   echo "$ac_t""no" 1>&6
20670 have_odbc=no
20671 fi
20672
20673                 if test $have_odbc = yes ; then
20674                         ol_link_sql="-lodbc"
20675                 fi
20676         fi
20677
20678         if test $ol_link_sql != no ; then
20679                 SLAPD_SQL_LIBS="$ol_link_sql"
20680
20681         elif test $ol_enable_sql != auto ; then
20682                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20683         fi
20684 fi
20685
20686 ol_link_sasl=no
20687 ol_link_spasswd=no
20688 if test $ol_with_cyrus_sasl != no ; then
20689         for ac_hdr in sasl/sasl.h sasl.h
20690 do
20691 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20692 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20693 echo "configure:20694: checking for $ac_hdr" >&5
20694 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20695   echo $ac_n "(cached) $ac_c" 1>&6
20696 else
20697   cat > conftest.$ac_ext <<EOF
20698 #line 20699 "configure"
20699 #include "confdefs.h"
20700 #include <$ac_hdr>
20701 EOF
20702 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20703 { (eval echo configure:20704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20704 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20705 if test -z "$ac_err"; then
20706   rm -rf conftest*
20707   eval "ac_cv_header_$ac_safe=yes"
20708 else
20709   echo "$ac_err" >&5
20710   echo "configure: failed program was:" >&5
20711   cat conftest.$ac_ext >&5
20712   rm -rf conftest*
20713   eval "ac_cv_header_$ac_safe=no"
20714 fi
20715 rm -f conftest*
20716 fi
20717 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20718   echo "$ac_t""yes" 1>&6
20719     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20720   cat >> confdefs.h <<EOF
20721 #define $ac_tr_hdr 1
20722 EOF
20723  
20724 else
20725   echo "$ac_t""no" 1>&6
20726 fi
20727 done
20728
20729
20730         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20731                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20732 echo "configure:20733: checking for sasl_client_init in -lsasl2" >&5
20733 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20734 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20735   echo $ac_n "(cached) $ac_c" 1>&6
20736 else
20737   ac_save_LIBS="$LIBS"
20738 LIBS="-lsasl2  $LIBS"
20739 cat > conftest.$ac_ext <<EOF
20740 #line 20741 "configure"
20741 #include "confdefs.h"
20742 /* Override any gcc2 internal prototype to avoid an error.  */
20743 /* We use char because int might match the return type of a gcc2
20744     builtin and then its argument prototype would still apply.  */
20745 char sasl_client_init();
20746
20747 int main() {
20748 sasl_client_init()
20749 ; return 0; }
20750 EOF
20751 if { (eval echo configure:20752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20752   rm -rf conftest*
20753   eval "ac_cv_lib_$ac_lib_var=yes"
20754 else
20755   echo "configure: failed program was:" >&5
20756   cat conftest.$ac_ext >&5
20757   rm -rf conftest*
20758   eval "ac_cv_lib_$ac_lib_var=no"
20759 fi
20760 rm -f conftest*
20761 LIBS="$ac_save_LIBS"
20762
20763 fi
20764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20765   echo "$ac_t""yes" 1>&6
20766   ol_link_sasl="-lsasl2"
20767 else
20768   echo "$ac_t""no" 1>&6
20769 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20770 echo "configure:20771: checking for sasl_client_init in -lsasl" >&5
20771 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20772 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20773   echo $ac_n "(cached) $ac_c" 1>&6
20774 else
20775   ac_save_LIBS="$LIBS"
20776 LIBS="-lsasl  $LIBS"
20777 cat > conftest.$ac_ext <<EOF
20778 #line 20779 "configure"
20779 #include "confdefs.h"
20780 /* Override any gcc2 internal prototype to avoid an error.  */
20781 /* We use char because int might match the return type of a gcc2
20782     builtin and then its argument prototype would still apply.  */
20783 char sasl_client_init();
20784
20785 int main() {
20786 sasl_client_init()
20787 ; return 0; }
20788 EOF
20789 if { (eval echo configure:20790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20790   rm -rf conftest*
20791   eval "ac_cv_lib_$ac_lib_var=yes"
20792 else
20793   echo "configure: failed program was:" >&5
20794   cat conftest.$ac_ext >&5
20795   rm -rf conftest*
20796   eval "ac_cv_lib_$ac_lib_var=no"
20797 fi
20798 rm -f conftest*
20799 LIBS="$ac_save_LIBS"
20800
20801 fi
20802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20803   echo "$ac_t""yes" 1>&6
20804   ol_link_sasl="-lsasl"
20805 else
20806   echo "$ac_t""no" 1>&6
20807 fi
20808
20809 fi
20810
20811         fi
20812
20813         if test $ol_link_sasl = no ; then
20814                 if test $ol_with_cyrus_sasl != auto ; then
20815                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20816                 else
20817                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20818                         echo "configure: warning: SASL authentication not supported!" 1>&2
20819                         if test $ol_link_tls = no ; then
20820                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20821                         fi
20822                 fi
20823         else
20824                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20825 echo "configure:20826: checking Cyrus SASL library version" >&5
20826 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20827   echo $ac_n "(cached) $ac_c" 1>&6
20828 else
20829   
20830         cat > conftest.$ac_ext <<EOF
20831 #line 20832 "configure"
20832 #include "confdefs.h"
20833
20834 #ifdef HAVE_SASL_SASL_H
20835 #include <sasl/sasl.h>
20836 #else
20837 #include <sasl.h>
20838 #endif
20839
20840 /* Require 2.1.15+ */
20841 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20842         char *__sasl_compat = "2.2+ or better okay (we guess)";
20843 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20844         && SASL_VERSION_STEP >=15
20845         char *__sasl_compat = "2.1.15+ or better okay";
20846 #endif
20847         
20848 EOF
20849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20850   egrep "__sasl_compat" >/dev/null 2>&1; then
20851   rm -rf conftest*
20852   ol_cv_sasl_compat=yes
20853 else
20854   rm -rf conftest*
20855   ol_cv_sasl_compat=no
20856 fi
20857 rm -f conftest*
20858
20859 fi
20860
20861 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20862
20863                 if test $ol_cv_sasl_compat = no ; then
20864                         ol_link_sasl=no
20865                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20866                 fi
20867
20868                 cat >> confdefs.h <<\EOF
20869 #define HAVE_CYRUS_SASL 1
20870 EOF
20871
20872                 SASL_LIBS="$ol_link_sasl"
20873                 if test $ol_enable_spasswd != no ; then
20874                         ol_link_spasswd=yes
20875                 fi
20876
20877                 ac_save_LIBS="$LIBS"
20878                 LIBS="$LIBS $ol_link_sasl"
20879                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20880 echo "configure:20881: checking for sasl_version" >&5
20881 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20882   echo $ac_n "(cached) $ac_c" 1>&6
20883 else
20884   cat > conftest.$ac_ext <<EOF
20885 #line 20886 "configure"
20886 #include "confdefs.h"
20887 /* System header to define __stub macros and hopefully few prototypes,
20888     which can conflict with char sasl_version(); below.  */
20889 #include <assert.h>
20890 /* Override any gcc2 internal prototype to avoid an error.  */
20891 /* We use char because int might match the return type of a gcc2
20892     builtin and then its argument prototype would still apply.  */
20893 char sasl_version();
20894 char (*f)();
20895
20896 int main() {
20897
20898 /* The GNU C library defines this for functions which it implements
20899     to always fail with ENOSYS.  Some functions are actually named
20900     something starting with __ and the normal name is an alias.  */
20901 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20902 choke me
20903 #else
20904 f = sasl_version;
20905 #endif
20906
20907 ; return 0; }
20908 EOF
20909 if { (eval echo configure:20910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20910   rm -rf conftest*
20911   eval "ac_cv_func_sasl_version=yes"
20912 else
20913   echo "configure: failed program was:" >&5
20914   cat conftest.$ac_ext >&5
20915   rm -rf conftest*
20916   eval "ac_cv_func_sasl_version=no"
20917 fi
20918 rm -f conftest*
20919 fi
20920
20921 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20922   echo "$ac_t""yes" 1>&6
20923   cat >> confdefs.h <<\EOF
20924 #define HAVE_SASL_VERSION 1
20925 EOF
20926
20927 else
20928   echo "$ac_t""no" 1>&6
20929 fi
20930
20931                 LIBS="$ac_save_LIBS"
20932         fi
20933
20934 else
20935         echo "configure: warning: SASL authentication not supported!" 1>&2
20936         if test $ol_link_tls = no ; then
20937                 echo "configure: warning: Strong authentication not supported!" 1>&2
20938         fi
20939 fi
20940
20941 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20942         dev=no
20943         if test -r /dev/urandom ; then
20944                 dev="/dev/urandom";
20945         elif test -r /idev/urandom ; then
20946                 dev="/idev/urandom";
20947         elif test -r /dev/srandom ; then
20948                 dev="/dev/srandom";
20949         elif test -r /dev/random ; then
20950                 dev="/dev/random";
20951         elif test -r /idev/random ; then
20952                 dev="/idev/random";
20953         fi
20954
20955         if test $dev != no ; then
20956                 cat >> confdefs.h <<EOF
20957 #define URANDOM_DEVICE "$dev"
20958 EOF
20959
20960         fi
20961 fi
20962
20963 ol_link_fetch=no
20964 if test $ol_with_fetch != no ; then
20965         ol_LIBS=$LIBS
20966 LIBS="-lfetch -lcom_err $LIBS"
20967 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20968 echo "configure:20969: checking fetch(3) library" >&5
20969 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20970   echo $ac_n "(cached) $ac_c" 1>&6
20971 else
20972   
20973         cat > conftest.$ac_ext <<EOF
20974 #line 20975 "configure"
20975 #include "confdefs.h"
20976
20977 #include <sys/param.h>
20978 #include <stdio.h>
20979 #include <fetch.h>
20980 int main() {
20981 struct url *u = fetchParseURL("file:///"); 
20982 ; return 0; }
20983 EOF
20984 if { (eval echo configure:20985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20985   rm -rf conftest*
20986   ol_cv_lib_fetch=yes
20987 else
20988   echo "configure: failed program was:" >&5
20989   cat conftest.$ac_ext >&5
20990   rm -rf conftest*
20991   ol_cv_lib_fetch=no
20992 fi
20993 rm -f conftest*
20994 fi
20995
20996 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20997 LIBS=$ol_LIBS
20998 if test $ol_cv_lib_fetch != no ; then
20999         ol_link_fetch="-lfetch -lcom_err"
21000         cat >> confdefs.h <<\EOF
21001 #define HAVE_FETCH 1
21002 EOF
21003
21004 fi
21005
21006
21007         if test $ol_cv_lib_fetch != no ; then
21008                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21009                 ol_link_fetch=freebsd
21010
21011         elif test $ol_with_fetch != auto ; then
21012                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21013         fi 
21014 fi
21015
21016 if test $ol_enable_crypt != no ; then
21017         save_LIBS="$LIBS"
21018         LIBS="$TLS_LIBS $LIBS"
21019
21020         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21021 echo "configure:21022: checking for crypt" >&5
21022 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21023   echo $ac_n "(cached) $ac_c" 1>&6
21024 else
21025   cat > conftest.$ac_ext <<EOF
21026 #line 21027 "configure"
21027 #include "confdefs.h"
21028 /* System header to define __stub macros and hopefully few prototypes,
21029     which can conflict with char crypt(); below.  */
21030 #include <assert.h>
21031 /* Override any gcc2 internal prototype to avoid an error.  */
21032 /* We use char because int might match the return type of a gcc2
21033     builtin and then its argument prototype would still apply.  */
21034 char crypt();
21035 char (*f)();
21036
21037 int main() {
21038
21039 /* The GNU C library defines this for functions which it implements
21040     to always fail with ENOSYS.  Some functions are actually named
21041     something starting with __ and the normal name is an alias.  */
21042 #if defined (__stub_crypt) || defined (__stub___crypt)
21043 choke me
21044 #else
21045 f = crypt;
21046 #endif
21047
21048 ; return 0; }
21049 EOF
21050 if { (eval echo configure:21051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21051   rm -rf conftest*
21052   eval "ac_cv_func_crypt=yes"
21053 else
21054   echo "configure: failed program was:" >&5
21055   cat conftest.$ac_ext >&5
21056   rm -rf conftest*
21057   eval "ac_cv_func_crypt=no"
21058 fi
21059 rm -f conftest*
21060 fi
21061
21062 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21063   echo "$ac_t""yes" 1>&6
21064   have_crypt=yes
21065 else
21066   echo "$ac_t""no" 1>&6
21067
21068                 LIBS="$save_LIBS"
21069                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21070 echo "configure:21071: checking for crypt in -lcrypt" >&5
21071 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21072 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21073   echo $ac_n "(cached) $ac_c" 1>&6
21074 else
21075   ac_save_LIBS="$LIBS"
21076 LIBS="-lcrypt  $LIBS"
21077 cat > conftest.$ac_ext <<EOF
21078 #line 21079 "configure"
21079 #include "confdefs.h"
21080 /* Override any gcc2 internal prototype to avoid an error.  */
21081 /* We use char because int might match the return type of a gcc2
21082     builtin and then its argument prototype would still apply.  */
21083 char crypt();
21084
21085 int main() {
21086 crypt()
21087 ; return 0; }
21088 EOF
21089 if { (eval echo configure:21090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21090   rm -rf conftest*
21091   eval "ac_cv_lib_$ac_lib_var=yes"
21092 else
21093   echo "configure: failed program was:" >&5
21094   cat conftest.$ac_ext >&5
21095   rm -rf conftest*
21096   eval "ac_cv_lib_$ac_lib_var=no"
21097 fi
21098 rm -f conftest*
21099 LIBS="$ac_save_LIBS"
21100
21101 fi
21102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21103   echo "$ac_t""yes" 1>&6
21104   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21105                         have_crypt=yes
21106 else
21107   echo "$ac_t""no" 1>&6
21108 have_crypt=no
21109 fi
21110
21111 fi
21112
21113
21114         LIBS="$save_LIBS"
21115
21116         if test $have_crypt = yes ; then
21117                 cat >> confdefs.h <<\EOF
21118 #define HAVE_CRYPT 1
21119 EOF
21120
21121         else
21122                 echo "configure: warning: could not find crypt" 1>&2
21123                 if test $ol_enable_crypt = yes ; then
21124                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21125                 fi
21126
21127                 echo "configure: warning: disabling crypt support" 1>&2
21128                 ol_enable_crypt=no
21129         fi
21130 fi
21131
21132 if test $ol_enable_proctitle != no ; then
21133         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21134 echo "configure:21135: checking for setproctitle" >&5
21135 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21136   echo $ac_n "(cached) $ac_c" 1>&6
21137 else
21138   cat > conftest.$ac_ext <<EOF
21139 #line 21140 "configure"
21140 #include "confdefs.h"
21141 /* System header to define __stub macros and hopefully few prototypes,
21142     which can conflict with char setproctitle(); below.  */
21143 #include <assert.h>
21144 /* Override any gcc2 internal prototype to avoid an error.  */
21145 /* We use char because int might match the return type of a gcc2
21146     builtin and then its argument prototype would still apply.  */
21147 char setproctitle();
21148 char (*f)();
21149
21150 int main() {
21151
21152 /* The GNU C library defines this for functions which it implements
21153     to always fail with ENOSYS.  Some functions are actually named
21154     something starting with __ and the normal name is an alias.  */
21155 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21156 choke me
21157 #else
21158 f = setproctitle;
21159 #endif
21160
21161 ; return 0; }
21162 EOF
21163 if { (eval echo configure:21164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21164   rm -rf conftest*
21165   eval "ac_cv_func_setproctitle=yes"
21166 else
21167   echo "configure: failed program was:" >&5
21168   cat conftest.$ac_ext >&5
21169   rm -rf conftest*
21170   eval "ac_cv_func_setproctitle=no"
21171 fi
21172 rm -f conftest*
21173 fi
21174
21175 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21176   echo "$ac_t""yes" 1>&6
21177   have_setproctitle=yes
21178 else
21179   echo "$ac_t""no" 1>&6
21180
21181                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21182 echo "configure:21183: checking for setproctitle in -lutil" >&5
21183 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21184 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21185   echo $ac_n "(cached) $ac_c" 1>&6
21186 else
21187   ac_save_LIBS="$LIBS"
21188 LIBS="-lutil  $LIBS"
21189 cat > conftest.$ac_ext <<EOF
21190 #line 21191 "configure"
21191 #include "confdefs.h"
21192 /* Override any gcc2 internal prototype to avoid an error.  */
21193 /* We use char because int might match the return type of a gcc2
21194     builtin and then its argument prototype would still apply.  */
21195 char setproctitle();
21196
21197 int main() {
21198 setproctitle()
21199 ; return 0; }
21200 EOF
21201 if { (eval echo configure:21202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21202   rm -rf conftest*
21203   eval "ac_cv_lib_$ac_lib_var=yes"
21204 else
21205   echo "configure: failed program was:" >&5
21206   cat conftest.$ac_ext >&5
21207   rm -rf conftest*
21208   eval "ac_cv_lib_$ac_lib_var=no"
21209 fi
21210 rm -f conftest*
21211 LIBS="$ac_save_LIBS"
21212
21213 fi
21214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21215   echo "$ac_t""yes" 1>&6
21216   have_setproctitle=yes
21217                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21218 else
21219   echo "$ac_t""no" 1>&6
21220 have_setproctitle=no
21221                         LIBOBJS="$LIBOBJS setproctitle.o"
21222                         LIBSRCS="$LIBSRCS setproctitle.c"
21223 fi
21224
21225 fi
21226
21227
21228         if test $have_setproctitle = yes ; then
21229                 cat >> confdefs.h <<\EOF
21230 #define HAVE_SETPROCTITLE 1
21231 EOF
21232
21233         fi
21234 fi
21235
21236 if test $ol_enable_slp != no ; then
21237         for ac_hdr in slp.h 
21238 do
21239 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21240 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21241 echo "configure:21242: checking for $ac_hdr" >&5
21242 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21243   echo $ac_n "(cached) $ac_c" 1>&6
21244 else
21245   cat > conftest.$ac_ext <<EOF
21246 #line 21247 "configure"
21247 #include "confdefs.h"
21248 #include <$ac_hdr>
21249 EOF
21250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21251 { (eval echo configure:21252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21253 if test -z "$ac_err"; then
21254   rm -rf conftest*
21255   eval "ac_cv_header_$ac_safe=yes"
21256 else
21257   echo "$ac_err" >&5
21258   echo "configure: failed program was:" >&5
21259   cat conftest.$ac_ext >&5
21260   rm -rf conftest*
21261   eval "ac_cv_header_$ac_safe=no"
21262 fi
21263 rm -f conftest*
21264 fi
21265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21266   echo "$ac_t""yes" 1>&6
21267     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21268   cat >> confdefs.h <<EOF
21269 #define $ac_tr_hdr 1
21270 EOF
21271  
21272 else
21273   echo "$ac_t""no" 1>&6
21274 fi
21275 done
21276
21277
21278         if test $ac_cv_header_slp_h = yes ; then
21279                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21280 echo "configure:21281: checking for SLPOpen in -lslp" >&5
21281 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21282 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21283   echo $ac_n "(cached) $ac_c" 1>&6
21284 else
21285   ac_save_LIBS="$LIBS"
21286 LIBS="-lslp  $LIBS"
21287 cat > conftest.$ac_ext <<EOF
21288 #line 21289 "configure"
21289 #include "confdefs.h"
21290 /* Override any gcc2 internal prototype to avoid an error.  */
21291 /* We use char because int might match the return type of a gcc2
21292     builtin and then its argument prototype would still apply.  */
21293 char SLPOpen();
21294
21295 int main() {
21296 SLPOpen()
21297 ; return 0; }
21298 EOF
21299 if { (eval echo configure:21300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21300   rm -rf conftest*
21301   eval "ac_cv_lib_$ac_lib_var=yes"
21302 else
21303   echo "configure: failed program was:" >&5
21304   cat conftest.$ac_ext >&5
21305   rm -rf conftest*
21306   eval "ac_cv_lib_$ac_lib_var=no"
21307 fi
21308 rm -f conftest*
21309 LIBS="$ac_save_LIBS"
21310
21311 fi
21312 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21313   echo "$ac_t""yes" 1>&6
21314   have_slp=yes
21315 else
21316   echo "$ac_t""no" 1>&6
21317 have_slp=no
21318 fi
21319
21320                 if test $have_slp = yes ; then
21321                         cat >> confdefs.h <<\EOF
21322 #define HAVE_SLP 1
21323 EOF
21324
21325                         SLAPD_SLP_LIBS=-lslp
21326                 fi
21327
21328         elif test $ol_enable_slp = yes ; then
21329                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21330         fi
21331 fi
21332
21333
21334 echo $ac_n "checking long long""... $ac_c" 1>&6
21335 echo "configure:21336: checking long long" >&5
21336 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21337   echo $ac_n "(cached) $ac_c" 1>&6
21338 else
21339   
21340         cat > conftest.$ac_ext <<EOF
21341 #line 21342 "configure"
21342 #include "confdefs.h"
21343
21344 int main() {
21345 long long x;
21346 ; return 0; }
21347 EOF
21348 if { (eval echo configure:21349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21349   rm -rf conftest*
21350   ol_cv_type_long_long=yes
21351 else
21352   echo "configure: failed program was:" >&5
21353   cat conftest.$ac_ext >&5
21354   rm -rf conftest*
21355   ol_cv_type_long_long=no
21356 fi
21357 rm -f conftest*
21358 fi
21359
21360 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21361 if test $ol_cv_type_long_long = yes; then
21362         cat >> confdefs.h <<\EOF
21363 #define HAVE_LONG_LONG 1
21364 EOF
21365
21366 fi
21367
21368 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21369 echo "configure:21370: checking for ANSI C header files" >&5
21370 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21371   echo $ac_n "(cached) $ac_c" 1>&6
21372 else
21373   cat > conftest.$ac_ext <<EOF
21374 #line 21375 "configure"
21375 #include "confdefs.h"
21376 #include <stdlib.h>
21377 #include <stdarg.h>
21378 #include <string.h>
21379 #include <float.h>
21380 EOF
21381 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21382 { (eval echo configure:21383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21383 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21384 if test -z "$ac_err"; then
21385   rm -rf conftest*
21386   ac_cv_header_stdc=yes
21387 else
21388   echo "$ac_err" >&5
21389   echo "configure: failed program was:" >&5
21390   cat conftest.$ac_ext >&5
21391   rm -rf conftest*
21392   ac_cv_header_stdc=no
21393 fi
21394 rm -f conftest*
21395
21396 if test $ac_cv_header_stdc = yes; then
21397   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21398 cat > conftest.$ac_ext <<EOF
21399 #line 21400 "configure"
21400 #include "confdefs.h"
21401 #include <string.h>
21402 EOF
21403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21404   egrep "memchr" >/dev/null 2>&1; then
21405   :
21406 else
21407   rm -rf conftest*
21408   ac_cv_header_stdc=no
21409 fi
21410 rm -f conftest*
21411
21412 fi
21413
21414 if test $ac_cv_header_stdc = yes; then
21415   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21416 cat > conftest.$ac_ext <<EOF
21417 #line 21418 "configure"
21418 #include "confdefs.h"
21419 #include <stdlib.h>
21420 EOF
21421 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21422   egrep "free" >/dev/null 2>&1; then
21423   :
21424 else
21425   rm -rf conftest*
21426   ac_cv_header_stdc=no
21427 fi
21428 rm -f conftest*
21429
21430 fi
21431
21432 if test $ac_cv_header_stdc = yes; then
21433   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21434 if test "$cross_compiling" = yes; then
21435   :
21436 else
21437   cat > conftest.$ac_ext <<EOF
21438 #line 21439 "configure"
21439 #include "confdefs.h"
21440 #include <ctype.h>
21441 #if ((' ' & 0x0FF) == 0x020)
21442 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21443 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21444 #else
21445 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21446  || ('j' <= (c) && (c) <= 'r') \
21447  || ('s' <= (c) && (c) <= 'z'))
21448 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21449 #endif
21450 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21451 int main () { int i; for (i = 0; i < 256; i++)
21452 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21453 exit (0); }
21454
21455 EOF
21456 if { (eval echo configure:21457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21457 then
21458   :
21459 else
21460   echo "configure: failed program was:" >&5
21461   cat conftest.$ac_ext >&5
21462   rm -fr conftest*
21463   ac_cv_header_stdc=no
21464 fi
21465 rm -fr conftest*
21466 fi
21467
21468 fi
21469 fi
21470
21471 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21472 if test $ac_cv_header_stdc = yes; then
21473   cat >> confdefs.h <<\EOF
21474 #define STDC_HEADERS 1
21475 EOF
21476
21477 fi
21478
21479 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21480 echo "configure:21481: checking for mode_t" >&5
21481 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21482   echo $ac_n "(cached) $ac_c" 1>&6
21483 else
21484   cat > conftest.$ac_ext <<EOF
21485 #line 21486 "configure"
21486 #include "confdefs.h"
21487 #include <sys/types.h>
21488 #if STDC_HEADERS
21489 #include <stdlib.h>
21490 #include <stddef.h>
21491 #endif
21492
21493 EOF
21494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21495   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21496   rm -rf conftest*
21497   eval "ac_cv_type_mode_t=yes"
21498 else
21499   rm -rf conftest*
21500   eval "ac_cv_type_mode_t=no"
21501 fi
21502 rm -f conftest*
21503
21504 fi
21505 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21506   echo "$ac_t""yes" 1>&6
21507 else
21508   echo "$ac_t""no" 1>&6
21509   cat >> confdefs.h <<EOF
21510 #define mode_t int
21511 EOF
21512
21513 fi
21514
21515 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21516 echo "configure:21517: checking for off_t" >&5
21517 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21518   echo $ac_n "(cached) $ac_c" 1>&6
21519 else
21520   cat > conftest.$ac_ext <<EOF
21521 #line 21522 "configure"
21522 #include "confdefs.h"
21523 #include <sys/types.h>
21524 #if STDC_HEADERS
21525 #include <stdlib.h>
21526 #include <stddef.h>
21527 #endif
21528
21529 EOF
21530 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21531   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21532   rm -rf conftest*
21533   eval "ac_cv_type_off_t=yes"
21534 else
21535   rm -rf conftest*
21536   eval "ac_cv_type_off_t=no"
21537 fi
21538 rm -f conftest*
21539
21540 fi
21541 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21542   echo "$ac_t""yes" 1>&6
21543 else
21544   echo "$ac_t""no" 1>&6
21545   cat >> confdefs.h <<EOF
21546 #define off_t long
21547 EOF
21548
21549 fi
21550
21551 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21552 echo "configure:21553: checking for pid_t" >&5
21553 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21554   echo $ac_n "(cached) $ac_c" 1>&6
21555 else
21556   cat > conftest.$ac_ext <<EOF
21557 #line 21558 "configure"
21558 #include "confdefs.h"
21559 #include <sys/types.h>
21560 #if STDC_HEADERS
21561 #include <stdlib.h>
21562 #include <stddef.h>
21563 #endif
21564
21565 EOF
21566 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21567   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21568   rm -rf conftest*
21569   eval "ac_cv_type_pid_t=yes"
21570 else
21571   rm -rf conftest*
21572   eval "ac_cv_type_pid_t=no"
21573 fi
21574 rm -f conftest*
21575
21576 fi
21577 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21578   echo "$ac_t""yes" 1>&6
21579 else
21580   echo "$ac_t""no" 1>&6
21581   cat >> confdefs.h <<EOF
21582 #define pid_t int
21583 EOF
21584
21585 fi
21586
21587 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21588 echo "configure:21589: checking for ptrdiff_t" >&5
21589 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21590   echo $ac_n "(cached) $ac_c" 1>&6
21591 else
21592   cat > conftest.$ac_ext <<EOF
21593 #line 21594 "configure"
21594 #include "confdefs.h"
21595 #include <stddef.h>
21596 int main() {
21597 ptrdiff_t p
21598 ; return 0; }
21599 EOF
21600 if { (eval echo configure:21601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21601   rm -rf conftest*
21602   am_cv_type_ptrdiff_t=yes
21603 else
21604   echo "configure: failed program was:" >&5
21605   cat conftest.$ac_ext >&5
21606   rm -rf conftest*
21607   am_cv_type_ptrdiff_t=no
21608 fi
21609 rm -f conftest*
21610 fi
21611
21612 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21613    if test $am_cv_type_ptrdiff_t = yes; then
21614      cat >> confdefs.h <<\EOF
21615 #define HAVE_PTRDIFF_T 1
21616 EOF
21617
21618    fi
21619
21620 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21621 echo "configure:21622: checking return type of signal handlers" >&5
21622 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21623   echo $ac_n "(cached) $ac_c" 1>&6
21624 else
21625   cat > conftest.$ac_ext <<EOF
21626 #line 21627 "configure"
21627 #include "confdefs.h"
21628 #include <sys/types.h>
21629 #include <signal.h>
21630 #ifdef signal
21631 #undef signal
21632 #endif
21633 #ifdef __cplusplus
21634 extern "C" void (*signal (int, void (*)(int)))(int);
21635 #else
21636 void (*signal ()) ();
21637 #endif
21638
21639 int main() {
21640 int i;
21641 ; return 0; }
21642 EOF
21643 if { (eval echo configure:21644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21644   rm -rf conftest*
21645   ac_cv_type_signal=void
21646 else
21647   echo "configure: failed program was:" >&5
21648   cat conftest.$ac_ext >&5
21649   rm -rf conftest*
21650   ac_cv_type_signal=int
21651 fi
21652 rm -f conftest*
21653 fi
21654
21655 echo "$ac_t""$ac_cv_type_signal" 1>&6
21656 cat >> confdefs.h <<EOF
21657 #define RETSIGTYPE $ac_cv_type_signal
21658 EOF
21659
21660
21661 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21662 echo "configure:21663: checking for size_t" >&5
21663 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21664   echo $ac_n "(cached) $ac_c" 1>&6
21665 else
21666   cat > conftest.$ac_ext <<EOF
21667 #line 21668 "configure"
21668 #include "confdefs.h"
21669 #include <sys/types.h>
21670 #if STDC_HEADERS
21671 #include <stdlib.h>
21672 #include <stddef.h>
21673 #endif
21674
21675 EOF
21676 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21677   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21678   rm -rf conftest*
21679   eval "ac_cv_type_size_t=yes"
21680 else
21681   rm -rf conftest*
21682   eval "ac_cv_type_size_t=no"
21683 fi
21684 rm -f conftest*
21685
21686 fi
21687 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21688   echo "$ac_t""yes" 1>&6
21689 else
21690   echo "$ac_t""no" 1>&6
21691   cat >> confdefs.h <<EOF
21692 #define size_t unsigned
21693 EOF
21694
21695 fi
21696
21697
21698 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21699 echo "configure:21700: checking for ssize_t" >&5
21700 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21701   echo $ac_n "(cached) $ac_c" 1>&6
21702 else
21703   cat > conftest.$ac_ext <<EOF
21704 #line 21705 "configure"
21705 #include "confdefs.h"
21706 #include <sys/types.h>
21707 #if STDC_HEADERS
21708 #include <stdlib.h>
21709 #include <stddef.h>
21710 #endif
21711
21712 EOF
21713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21714   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21715   rm -rf conftest*
21716   eval "ac_cv_type_ssize_t=yes"
21717 else
21718   rm -rf conftest*
21719   eval "ac_cv_type_ssize_t=no"
21720 fi
21721 rm -f conftest*
21722
21723 fi
21724 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21725   echo "$ac_t""yes" 1>&6
21726 else
21727   echo "$ac_t""no" 1>&6
21728   cat >> confdefs.h <<EOF
21729 #define ssize_t signed int
21730 EOF
21731
21732 fi
21733
21734 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21735 echo "configure:21736: checking for caddr_t" >&5
21736 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21737   echo $ac_n "(cached) $ac_c" 1>&6
21738 else
21739   cat > conftest.$ac_ext <<EOF
21740 #line 21741 "configure"
21741 #include "confdefs.h"
21742 #include <sys/types.h>
21743 #if STDC_HEADERS
21744 #include <stdlib.h>
21745 #include <stddef.h>
21746 #endif
21747
21748 EOF
21749 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21750   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21751   rm -rf conftest*
21752   eval "ac_cv_type_caddr_t=yes"
21753 else
21754   rm -rf conftest*
21755   eval "ac_cv_type_caddr_t=no"
21756 fi
21757 rm -f conftest*
21758
21759 fi
21760 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21761   echo "$ac_t""yes" 1>&6
21762 else
21763   echo "$ac_t""no" 1>&6
21764   cat >> confdefs.h <<EOF
21765 #define caddr_t char *
21766 EOF
21767
21768 fi
21769
21770
21771 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21772 echo "configure:21773: checking for socklen_t" >&5
21773 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21774   echo $ac_n "(cached) $ac_c" 1>&6
21775 else
21776   cat > conftest.$ac_ext <<EOF
21777 #line 21778 "configure"
21778 #include "confdefs.h"
21779
21780 #ifdef HAVE_SYS_TYPES_H
21781 #include <sys/types.h>
21782 #endif
21783 #ifdef HAVE_SYS_SOCKET_H
21784 #include <sys/socket.h>
21785 #endif
21786
21787 int main() {
21788 socklen_t len;
21789 ; return 0; }
21790 EOF
21791 if { (eval echo configure:21792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21792   rm -rf conftest*
21793   ol_cv_type_socklen_t=yes
21794 else
21795   echo "configure: failed program was:" >&5
21796   cat conftest.$ac_ext >&5
21797   rm -rf conftest*
21798   ol_cv_type_socklen_t=no
21799 fi
21800 rm -f conftest*
21801 fi
21802
21803 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21804   if test $ol_cv_type_socklen_t = no; then
21805     cat >> confdefs.h <<\EOF
21806 #define socklen_t int
21807 EOF
21808
21809   fi
21810  
21811 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21812 echo "configure:21813: checking for member st_blksize in aggregate type struct stat" >&5
21813 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21814   echo $ac_n "(cached) $ac_c" 1>&6
21815 else
21816   cat > conftest.$ac_ext <<EOF
21817 #line 21818 "configure"
21818 #include "confdefs.h"
21819 #include <sys/types.h>
21820 #include <sys/stat.h>
21821 int main() {
21822 struct stat foo; foo.st_blksize;
21823 ; return 0; }
21824 EOF
21825 if { (eval echo configure:21826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21826   rm -rf conftest*
21827   ac_cv_c_struct_member_st_blksize=yes
21828 else
21829   echo "configure: failed program was:" >&5
21830   cat conftest.$ac_ext >&5
21831   rm -rf conftest*
21832   ac_cv_c_struct_member_st_blksize=no
21833 fi
21834 rm -f conftest*
21835 fi
21836
21837 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21838 st_blksize="$ac_cv_c_struct_member_st_blksize"
21839 if test $ac_cv_c_struct_member_st_blksize = yes; then
21840   cat >> confdefs.h <<\EOF
21841 #define HAVE_ST_BLKSIZE 1
21842 EOF
21843
21844 fi
21845
21846 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21847 echo "configure:21848: checking whether time.h and sys/time.h may both be included" >&5
21848 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21849   echo $ac_n "(cached) $ac_c" 1>&6
21850 else
21851   cat > conftest.$ac_ext <<EOF
21852 #line 21853 "configure"
21853 #include "confdefs.h"
21854 #include <sys/types.h>
21855 #include <sys/time.h>
21856 #include <time.h>
21857 int main() {
21858 struct tm *tp;
21859 ; return 0; }
21860 EOF
21861 if { (eval echo configure:21862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21862   rm -rf conftest*
21863   ac_cv_header_time=yes
21864 else
21865   echo "configure: failed program was:" >&5
21866   cat conftest.$ac_ext >&5
21867   rm -rf conftest*
21868   ac_cv_header_time=no
21869 fi
21870 rm -f conftest*
21871 fi
21872
21873 echo "$ac_t""$ac_cv_header_time" 1>&6
21874 if test $ac_cv_header_time = yes; then
21875   cat >> confdefs.h <<\EOF
21876 #define TIME_WITH_SYS_TIME 1
21877 EOF
21878
21879 fi
21880
21881 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21882 echo "configure:21883: checking whether struct tm is in sys/time.h or time.h" >&5
21883 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21884   echo $ac_n "(cached) $ac_c" 1>&6
21885 else
21886   cat > conftest.$ac_ext <<EOF
21887 #line 21888 "configure"
21888 #include "confdefs.h"
21889 #include <sys/types.h>
21890 #include <time.h>
21891 int main() {
21892 struct tm *tp; tp->tm_sec;
21893 ; return 0; }
21894 EOF
21895 if { (eval echo configure:21896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21896   rm -rf conftest*
21897   ac_cv_struct_tm=time.h
21898 else
21899   echo "configure: failed program was:" >&5
21900   cat conftest.$ac_ext >&5
21901   rm -rf conftest*
21902   ac_cv_struct_tm=sys/time.h
21903 fi
21904 rm -f conftest*
21905 fi
21906
21907 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21908 if test $ac_cv_struct_tm = sys/time.h; then
21909   cat >> confdefs.h <<\EOF
21910 #define TM_IN_SYS_TIME 1
21911 EOF
21912
21913 fi
21914
21915 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21916 echo "configure:21917: checking for uid_t in sys/types.h" >&5
21917 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21918   echo $ac_n "(cached) $ac_c" 1>&6
21919 else
21920   cat > conftest.$ac_ext <<EOF
21921 #line 21922 "configure"
21922 #include "confdefs.h"
21923 #include <sys/types.h>
21924 EOF
21925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21926   egrep "uid_t" >/dev/null 2>&1; then
21927   rm -rf conftest*
21928   ac_cv_type_uid_t=yes
21929 else
21930   rm -rf conftest*
21931   ac_cv_type_uid_t=no
21932 fi
21933 rm -f conftest*
21934
21935 fi
21936
21937 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21938 if test $ac_cv_type_uid_t = no; then
21939   cat >> confdefs.h <<\EOF
21940 #define uid_t int
21941 EOF
21942
21943   cat >> confdefs.h <<\EOF
21944 #define gid_t int
21945 EOF
21946
21947 fi
21948
21949 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21950 echo "configure:21951: checking for sig_atomic_t" >&5
21951 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21952   echo $ac_n "(cached) $ac_c" 1>&6
21953 else
21954   cat > conftest.$ac_ext <<EOF
21955 #line 21956 "configure"
21956 #include "confdefs.h"
21957 #include <signal.h>
21958 int main() {
21959 sig_atomic_t atomic;
21960 ; return 0; }
21961 EOF
21962 if { (eval echo configure:21963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21963   rm -rf conftest*
21964   ol_cv_type_sig_atomic_t=yes
21965 else
21966   echo "configure: failed program was:" >&5
21967   cat conftest.$ac_ext >&5
21968   rm -rf conftest*
21969   ol_cv_type_sig_atomic_t=no
21970 fi
21971 rm -f conftest*
21972 fi
21973
21974 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21975   if test $ol_cv_type_sig_atomic_t = no; then
21976     cat >> confdefs.h <<\EOF
21977 #define sig_atomic_t int
21978 EOF
21979
21980   fi
21981  
21982
21983
21984 # test for pw_gecos in struct passwd
21985 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21986 echo "configure:21987: checking struct passwd for pw_gecos" >&5
21987 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21988   echo $ac_n "(cached) $ac_c" 1>&6
21989 else
21990   
21991         cat > conftest.$ac_ext <<EOF
21992 #line 21993 "configure"
21993 #include "confdefs.h"
21994 #include <pwd.h>
21995 int main() {
21996
21997         struct passwd pwd;
21998         pwd.pw_gecos = pwd.pw_name;
21999
22000 ; return 0; }
22001 EOF
22002 if { (eval echo configure:22003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22003   rm -rf conftest*
22004   ol_cv_struct_passwd_pw_gecos=yes
22005 else
22006   echo "configure: failed program was:" >&5
22007   cat conftest.$ac_ext >&5
22008   rm -rf conftest*
22009   ol_cv_struct_passwd_pw_gecos=no
22010 fi
22011 rm -f conftest*
22012 fi
22013
22014 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22015 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22016         cat >> confdefs.h <<\EOF
22017 #define HAVE_PW_GECOS 1
22018 EOF
22019
22020 fi
22021
22022 # test for pw_passwd in struct passwd
22023 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22024 echo "configure:22025: checking struct passwd for pw_passwd" >&5
22025 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22026   echo $ac_n "(cached) $ac_c" 1>&6
22027 else
22028   
22029         cat > conftest.$ac_ext <<EOF
22030 #line 22031 "configure"
22031 #include "confdefs.h"
22032 #include <pwd.h>
22033 int main() {
22034
22035         struct passwd pwd;
22036         pwd.pw_passwd = pwd.pw_name;
22037
22038 ; return 0; }
22039 EOF
22040 if { (eval echo configure:22041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22041   rm -rf conftest*
22042   ol_cv_struct_passwd_pw_passwd=yes
22043 else
22044   echo "configure: failed program was:" >&5
22045   cat conftest.$ac_ext >&5
22046   rm -rf conftest*
22047   ol_cv_struct_passwd_pw_passwd=no
22048 fi
22049 rm -f conftest*
22050 fi
22051
22052 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22053 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22054         cat >> confdefs.h <<\EOF
22055 #define HAVE_PW_PASSWD 1
22056 EOF
22057
22058 fi
22059
22060
22061 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22062 echo "configure:22063: checking if toupper() requires islower()" >&5
22063 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22064   echo $ac_n "(cached) $ac_c" 1>&6
22065 else
22066   
22067         if test "$cross_compiling" = yes; then
22068   ol_cv_c_upper_lower=safe
22069 else
22070   cat > conftest.$ac_ext <<EOF
22071 #line 22072 "configure"
22072 #include "confdefs.h"
22073
22074 #include <ctype.h>
22075 main()
22076 {
22077         if ('C' == toupper('C'))
22078                 exit(0);
22079         else
22080                 exit(1);
22081 }
22082 EOF
22083 if { (eval echo configure:22084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22084 then
22085   ol_cv_c_upper_lower=no
22086 else
22087   echo "configure: failed program was:" >&5
22088   cat conftest.$ac_ext >&5
22089   rm -fr conftest*
22090   ol_cv_c_upper_lower=yes
22091 fi
22092 rm -fr conftest*
22093 fi
22094
22095 fi
22096
22097 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22098 if test $ol_cv_c_upper_lower != no ; then
22099         cat >> confdefs.h <<\EOF
22100 #define C_UPPER_LOWER 1
22101 EOF
22102
22103 fi
22104
22105 echo $ac_n "checking for working const""... $ac_c" 1>&6
22106 echo "configure:22107: checking for working const" >&5
22107 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22108   echo $ac_n "(cached) $ac_c" 1>&6
22109 else
22110   cat > conftest.$ac_ext <<EOF
22111 #line 22112 "configure"
22112 #include "confdefs.h"
22113
22114 int main() {
22115
22116 /* Ultrix mips cc rejects this.  */
22117 typedef int charset[2]; const charset x;
22118 /* SunOS 4.1.1 cc rejects this.  */
22119 char const *const *ccp;
22120 char **p;
22121 /* NEC SVR4.0.2 mips cc rejects this.  */
22122 struct point {int x, y;};
22123 static struct point const zero = {0,0};
22124 /* AIX XL C 1.02.0.0 rejects this.
22125    It does not let you subtract one const X* pointer from another in an arm
22126    of an if-expression whose if-part is not a constant expression */
22127 const char *g = "string";
22128 ccp = &g + (g ? g-g : 0);
22129 /* HPUX 7.0 cc rejects these. */
22130 ++ccp;
22131 p = (char**) ccp;
22132 ccp = (char const *const *) p;
22133 { /* SCO 3.2v4 cc rejects this.  */
22134   char *t;
22135   char const *s = 0 ? (char *) 0 : (char const *) 0;
22136
22137   *t++ = 0;
22138 }
22139 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22140   int x[] = {25, 17};
22141   const int *foo = &x[0];
22142   ++foo;
22143 }
22144 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22145   typedef const int *iptr;
22146   iptr p = 0;
22147   ++p;
22148 }
22149 { /* AIX XL C 1.02.0.0 rejects this saying
22150      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22151   struct s { int j; const int *ap[3]; };
22152   struct s *b; b->j = 5;
22153 }
22154 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22155   const int foo = 10;
22156 }
22157
22158 ; return 0; }
22159 EOF
22160 if { (eval echo configure:22161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22161   rm -rf conftest*
22162   ac_cv_c_const=yes
22163 else
22164   echo "configure: failed program was:" >&5
22165   cat conftest.$ac_ext >&5
22166   rm -rf conftest*
22167   ac_cv_c_const=no
22168 fi
22169 rm -f conftest*
22170 fi
22171
22172 echo "$ac_t""$ac_cv_c_const" 1>&6
22173 if test $ac_cv_c_const = no; then
22174   cat >> confdefs.h <<\EOF
22175 #define const 
22176 EOF
22177
22178 fi
22179
22180 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22181 echo "configure:22182: checking if compiler understands volatile" >&5
22182 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22183   echo $ac_n "(cached) $ac_c" 1>&6
22184 else
22185   cat > conftest.$ac_ext <<EOF
22186 #line 22187 "configure"
22187 #include "confdefs.h"
22188 int x, y, z;
22189 int main() {
22190 volatile int a; int * volatile b = x ? &y : &z;
22191       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22192       *b = 0;
22193 ; return 0; }
22194 EOF
22195 if { (eval echo configure:22196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22196   rm -rf conftest*
22197   ol_cv_c_volatile=yes
22198 else
22199   echo "configure: failed program was:" >&5
22200   cat conftest.$ac_ext >&5
22201   rm -rf conftest*
22202   ol_cv_c_volatile=no
22203 fi
22204 rm -f conftest*
22205 fi
22206
22207 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22208   if test $ol_cv_c_volatile = yes; then
22209     : 
22210   else
22211     cat >> confdefs.h <<\EOF
22212 #define volatile 
22213 EOF
22214
22215   fi
22216  
22217
22218 if test $cross_compiling = yes ; then
22219         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22220         cat >> confdefs.h <<\EOF
22221 #define CROSS_COMPILING 1
22222 EOF
22223
22224 else
22225         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22226 echo "configure:22227: checking whether byte ordering is bigendian" >&5
22227 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22228   echo $ac_n "(cached) $ac_c" 1>&6
22229 else
22230   ac_cv_c_bigendian=unknown
22231 # See if sys/param.h defines the BYTE_ORDER macro.
22232 cat > conftest.$ac_ext <<EOF
22233 #line 22234 "configure"
22234 #include "confdefs.h"
22235 #include <sys/types.h>
22236 #include <sys/param.h>
22237 int main() {
22238
22239 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22240  bogus endian macros
22241 #endif
22242 ; return 0; }
22243 EOF
22244 if { (eval echo configure:22245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22245   rm -rf conftest*
22246   # It does; now see whether it defined to BIG_ENDIAN or not.
22247 cat > conftest.$ac_ext <<EOF
22248 #line 22249 "configure"
22249 #include "confdefs.h"
22250 #include <sys/types.h>
22251 #include <sys/param.h>
22252 int main() {
22253
22254 #if BYTE_ORDER != BIG_ENDIAN
22255  not big endian
22256 #endif
22257 ; return 0; }
22258 EOF
22259 if { (eval echo configure:22260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22260   rm -rf conftest*
22261   ac_cv_c_bigendian=yes
22262 else
22263   echo "configure: failed program was:" >&5
22264   cat conftest.$ac_ext >&5
22265   rm -rf conftest*
22266   ac_cv_c_bigendian=no
22267 fi
22268 rm -f conftest*
22269 else
22270   echo "configure: failed program was:" >&5
22271   cat conftest.$ac_ext >&5
22272 fi
22273 rm -f conftest*
22274 if test $ac_cv_c_bigendian = unknown; then
22275 if test "$cross_compiling" = yes; then
22276     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22277 else
22278   cat > conftest.$ac_ext <<EOF
22279 #line 22280 "configure"
22280 #include "confdefs.h"
22281 main () {
22282   /* Are we little or big endian?  From Harbison&Steele.  */
22283   union
22284   {
22285     long l;
22286     char c[sizeof (long)];
22287   } u;
22288   u.l = 1;
22289   exit (u.c[sizeof (long) - 1] == 1);
22290 }
22291 EOF
22292 if { (eval echo configure:22293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22293 then
22294   ac_cv_c_bigendian=no
22295 else
22296   echo "configure: failed program was:" >&5
22297   cat conftest.$ac_ext >&5
22298   rm -fr conftest*
22299   ac_cv_c_bigendian=yes
22300 fi
22301 rm -fr conftest*
22302 fi
22303
22304 fi
22305 fi
22306
22307 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22308 if test $ac_cv_c_bigendian = yes; then
22309   cat >> confdefs.h <<\EOF
22310 #define WORDS_BIGENDIAN 1
22311 EOF
22312
22313 fi
22314
22315 fi
22316
22317 echo $ac_n "checking size of short""... $ac_c" 1>&6
22318 echo "configure:22319: checking size of short" >&5 
22319 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22320   echo $ac_n "(cached) $ac_c" 1>&6
22321 else
22322   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22323   cat > conftest.$ac_ext <<EOF
22324 #line 22325 "configure"
22325 #include "confdefs.h"
22326 #include "confdefs.h" 
22327 #include <sys/types.h> 
22328  
22329
22330 int main() {
22331 switch (0) case 0: case (sizeof (short) == $ac_size):;
22332 ; return 0; }
22333 EOF
22334 if { (eval echo configure:22335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22335   rm -rf conftest*
22336   ac_cv_sizeof_short=$ac_size
22337 else
22338   echo "configure: failed program was:" >&5
22339   cat conftest.$ac_ext >&5
22340 fi
22341 rm -f conftest* 
22342   if test x$ac_cv_sizeof_short != x ; then break; fi 
22343 done 
22344
22345 fi
22346  
22347 if test x$ac_cv_sizeof_short = x ; then 
22348   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22349 fi 
22350 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22351 cat >> confdefs.h <<EOF
22352 #define SIZEOF_SHORT $ac_cv_sizeof_short
22353 EOF
22354  
22355  
22356 echo $ac_n "checking size of int""... $ac_c" 1>&6
22357 echo "configure:22358: checking size of int" >&5 
22358 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22359   echo $ac_n "(cached) $ac_c" 1>&6
22360 else
22361   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22362   cat > conftest.$ac_ext <<EOF
22363 #line 22364 "configure"
22364 #include "confdefs.h"
22365 #include "confdefs.h" 
22366 #include <sys/types.h> 
22367  
22368
22369 int main() {
22370 switch (0) case 0: case (sizeof (int) == $ac_size):;
22371 ; return 0; }
22372 EOF
22373 if { (eval echo configure:22374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22374   rm -rf conftest*
22375   ac_cv_sizeof_int=$ac_size
22376 else
22377   echo "configure: failed program was:" >&5
22378   cat conftest.$ac_ext >&5
22379 fi
22380 rm -f conftest* 
22381   if test x$ac_cv_sizeof_int != x ; then break; fi 
22382 done 
22383
22384 fi
22385  
22386 if test x$ac_cv_sizeof_int = x ; then 
22387   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22388 fi 
22389 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22390 cat >> confdefs.h <<EOF
22391 #define SIZEOF_INT $ac_cv_sizeof_int
22392 EOF
22393  
22394  
22395 echo $ac_n "checking size of long""... $ac_c" 1>&6
22396 echo "configure:22397: checking size of long" >&5 
22397 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22398   echo $ac_n "(cached) $ac_c" 1>&6
22399 else
22400   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22401   cat > conftest.$ac_ext <<EOF
22402 #line 22403 "configure"
22403 #include "confdefs.h"
22404 #include "confdefs.h" 
22405 #include <sys/types.h> 
22406  
22407
22408 int main() {
22409 switch (0) case 0: case (sizeof (long) == $ac_size):;
22410 ; return 0; }
22411 EOF
22412 if { (eval echo configure:22413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22413   rm -rf conftest*
22414   ac_cv_sizeof_long=$ac_size
22415 else
22416   echo "configure: failed program was:" >&5
22417   cat conftest.$ac_ext >&5
22418 fi
22419 rm -f conftest* 
22420   if test x$ac_cv_sizeof_long != x ; then break; fi 
22421 done 
22422
22423 fi
22424  
22425 if test x$ac_cv_sizeof_long = x ; then 
22426   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22427 fi 
22428 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22429 cat >> confdefs.h <<EOF
22430 #define SIZEOF_LONG $ac_cv_sizeof_long
22431 EOF
22432  
22433
22434
22435 if test "$ac_cv_sizeof_int" -lt 4 ; then
22436         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22437
22438         cat >> confdefs.h <<\EOF
22439 #define LBER_INT_T long
22440 EOF
22441
22442 else
22443         cat >> confdefs.h <<\EOF
22444 #define LBER_INT_T int
22445 EOF
22446
22447 fi
22448
22449 cat >> confdefs.h <<\EOF
22450 #define LBER_LEN_T long
22451 EOF
22452
22453 cat >> confdefs.h <<\EOF
22454 #define LBER_SOCKET_T int
22455 EOF
22456
22457 cat >> confdefs.h <<\EOF
22458 #define LBER_TAG_T long
22459 EOF
22460
22461
22462 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22463 echo "configure:22464: checking for 8-bit clean memcmp" >&5
22464 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22465   echo $ac_n "(cached) $ac_c" 1>&6
22466 else
22467   if test "$cross_compiling" = yes; then
22468   ac_cv_func_memcmp_clean=no
22469 else
22470   cat > conftest.$ac_ext <<EOF
22471 #line 22472 "configure"
22472 #include "confdefs.h"
22473
22474 main()
22475 {
22476   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22477   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22478 }
22479
22480 EOF
22481 if { (eval echo configure:22482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22482 then
22483   ac_cv_func_memcmp_clean=yes
22484 else
22485   echo "configure: failed program was:" >&5
22486   cat conftest.$ac_ext >&5
22487   rm -fr conftest*
22488   ac_cv_func_memcmp_clean=no
22489 fi
22490 rm -fr conftest*
22491 fi
22492
22493 fi
22494
22495 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22496 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22497
22498 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22499 echo "configure:22500: checking for strftime" >&5
22500 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22501   echo $ac_n "(cached) $ac_c" 1>&6
22502 else
22503   cat > conftest.$ac_ext <<EOF
22504 #line 22505 "configure"
22505 #include "confdefs.h"
22506 /* System header to define __stub macros and hopefully few prototypes,
22507     which can conflict with char strftime(); below.  */
22508 #include <assert.h>
22509 /* Override any gcc2 internal prototype to avoid an error.  */
22510 /* We use char because int might match the return type of a gcc2
22511     builtin and then its argument prototype would still apply.  */
22512 char strftime();
22513 char (*f)();
22514
22515 int main() {
22516
22517 /* The GNU C library defines this for functions which it implements
22518     to always fail with ENOSYS.  Some functions are actually named
22519     something starting with __ and the normal name is an alias.  */
22520 #if defined (__stub_strftime) || defined (__stub___strftime)
22521 choke me
22522 #else
22523 f = strftime;
22524 #endif
22525
22526 ; return 0; }
22527 EOF
22528 if { (eval echo configure:22529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22529   rm -rf conftest*
22530   eval "ac_cv_func_strftime=yes"
22531 else
22532   echo "configure: failed program was:" >&5
22533   cat conftest.$ac_ext >&5
22534   rm -rf conftest*
22535   eval "ac_cv_func_strftime=no"
22536 fi
22537 rm -f conftest*
22538 fi
22539
22540 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22541   echo "$ac_t""yes" 1>&6
22542   cat >> confdefs.h <<\EOF
22543 #define HAVE_STRFTIME 1
22544 EOF
22545
22546 else
22547   echo "$ac_t""no" 1>&6
22548 # strftime is in -lintl on SCO UNIX.
22549 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22550 echo "configure:22551: checking for strftime in -lintl" >&5
22551 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22552 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22553   echo $ac_n "(cached) $ac_c" 1>&6
22554 else
22555   ac_save_LIBS="$LIBS"
22556 LIBS="-lintl  $LIBS"
22557 cat > conftest.$ac_ext <<EOF
22558 #line 22559 "configure"
22559 #include "confdefs.h"
22560 /* Override any gcc2 internal prototype to avoid an error.  */
22561 /* We use char because int might match the return type of a gcc2
22562     builtin and then its argument prototype would still apply.  */
22563 char strftime();
22564
22565 int main() {
22566 strftime()
22567 ; return 0; }
22568 EOF
22569 if { (eval echo configure:22570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22570   rm -rf conftest*
22571   eval "ac_cv_lib_$ac_lib_var=yes"
22572 else
22573   echo "configure: failed program was:" >&5
22574   cat conftest.$ac_ext >&5
22575   rm -rf conftest*
22576   eval "ac_cv_lib_$ac_lib_var=no"
22577 fi
22578 rm -f conftest*
22579 LIBS="$ac_save_LIBS"
22580
22581 fi
22582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22583   echo "$ac_t""yes" 1>&6
22584   cat >> confdefs.h <<\EOF
22585 #define HAVE_STRFTIME 1
22586 EOF
22587
22588 LIBS="-lintl $LIBS"
22589 else
22590   echo "$ac_t""no" 1>&6
22591 fi
22592
22593 fi
22594
22595
22596 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22597 echo "configure:22598: checking for inet_aton()" >&5
22598 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22599   echo $ac_n "(cached) $ac_c" 1>&6
22600 else
22601   cat > conftest.$ac_ext <<EOF
22602 #line 22603 "configure"
22603 #include "confdefs.h"
22604
22605 #ifdef HAVE_SYS_TYPES_H
22606 #       include <sys/types.h>
22607 #endif
22608 #ifdef HAVE_SYS_SOCKET_H
22609 #       include <sys/socket.h>
22610 #       ifdef HAVE_SYS_SELECT_H
22611 #               include <sys/select.h>
22612 #       endif
22613 #       include <netinet/in.h>
22614 #       ifdef HAVE_ARPA_INET_H
22615 #               include <arpa/inet.h>
22616 #       endif
22617 #endif
22618
22619 int main() {
22620 struct in_addr in;
22621 int rc = inet_aton( "255.255.255.255", &in );
22622 ; return 0; }
22623 EOF
22624 if { (eval echo configure:22625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22625   rm -rf conftest*
22626   ol_cv_func_inet_aton=yes
22627 else
22628   echo "configure: failed program was:" >&5
22629   cat conftest.$ac_ext >&5
22630   rm -rf conftest*
22631   ol_cv_func_inet_aton=no
22632 fi
22633 rm -f conftest*
22634 fi
22635
22636 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22637   if test $ol_cv_func_inet_aton != no; then
22638     cat >> confdefs.h <<\EOF
22639 #define HAVE_INET_ATON 1
22640 EOF
22641
22642   fi
22643  
22644
22645 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22646 echo "configure:22647: checking for _spawnlp" >&5
22647 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22648   echo $ac_n "(cached) $ac_c" 1>&6
22649 else
22650   cat > conftest.$ac_ext <<EOF
22651 #line 22652 "configure"
22652 #include "confdefs.h"
22653 /* System header to define __stub macros and hopefully few prototypes,
22654     which can conflict with char _spawnlp(); below.  */
22655 #include <assert.h>
22656 /* Override any gcc2 internal prototype to avoid an error.  */
22657 /* We use char because int might match the return type of a gcc2
22658     builtin and then its argument prototype would still apply.  */
22659 char _spawnlp();
22660 char (*f)();
22661
22662 int main() {
22663
22664 /* The GNU C library defines this for functions which it implements
22665     to always fail with ENOSYS.  Some functions are actually named
22666     something starting with __ and the normal name is an alias.  */
22667 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22668 choke me
22669 #else
22670 f = _spawnlp;
22671 #endif
22672
22673 ; return 0; }
22674 EOF
22675 if { (eval echo configure:22676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22676   rm -rf conftest*
22677   eval "ac_cv_func__spawnlp=yes"
22678 else
22679   echo "configure: failed program was:" >&5
22680   cat conftest.$ac_ext >&5
22681   rm -rf conftest*
22682   eval "ac_cv_func__spawnlp=no"
22683 fi
22684 rm -f conftest*
22685 fi
22686
22687 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22688   echo "$ac_t""yes" 1>&6
22689   cat >> confdefs.h <<\EOF
22690 #define HAVE_SPAWNLP 1
22691 EOF
22692
22693 else
22694   echo "$ac_t""no" 1>&6
22695 fi
22696
22697
22698 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22699 echo "configure:22700: checking for _snprintf" >&5
22700 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22701   echo $ac_n "(cached) $ac_c" 1>&6
22702 else
22703   cat > conftest.$ac_ext <<EOF
22704 #line 22705 "configure"
22705 #include "confdefs.h"
22706 /* System header to define __stub macros and hopefully few prototypes,
22707     which can conflict with char _snprintf(); below.  */
22708 #include <assert.h>
22709 /* Override any gcc2 internal prototype to avoid an error.  */
22710 /* We use char because int might match the return type of a gcc2
22711     builtin and then its argument prototype would still apply.  */
22712 char _snprintf();
22713 char (*f)();
22714
22715 int main() {
22716
22717 /* The GNU C library defines this for functions which it implements
22718     to always fail with ENOSYS.  Some functions are actually named
22719     something starting with __ and the normal name is an alias.  */
22720 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22721 choke me
22722 #else
22723 f = _snprintf;
22724 #endif
22725
22726 ; return 0; }
22727 EOF
22728 if { (eval echo configure:22729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22729   rm -rf conftest*
22730   eval "ac_cv_func__snprintf=yes"
22731 else
22732   echo "configure: failed program was:" >&5
22733   cat conftest.$ac_ext >&5
22734   rm -rf conftest*
22735   eval "ac_cv_func__snprintf=no"
22736 fi
22737 rm -f conftest*
22738 fi
22739
22740 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22741   echo "$ac_t""yes" 1>&6
22742   ac_cv_func_snprintf=yes
22743         cat >> confdefs.h <<\EOF
22744 #define snprintf _snprintf
22745 EOF
22746
22747
22748 else
22749   echo "$ac_t""no" 1>&6
22750 fi
22751
22752
22753 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22754 echo "configure:22755: checking for _vsnprintf" >&5
22755 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22756   echo $ac_n "(cached) $ac_c" 1>&6
22757 else
22758   cat > conftest.$ac_ext <<EOF
22759 #line 22760 "configure"
22760 #include "confdefs.h"
22761 /* System header to define __stub macros and hopefully few prototypes,
22762     which can conflict with char _vsnprintf(); below.  */
22763 #include <assert.h>
22764 /* Override any gcc2 internal prototype to avoid an error.  */
22765 /* We use char because int might match the return type of a gcc2
22766     builtin and then its argument prototype would still apply.  */
22767 char _vsnprintf();
22768 char (*f)();
22769
22770 int main() {
22771
22772 /* The GNU C library defines this for functions which it implements
22773     to always fail with ENOSYS.  Some functions are actually named
22774     something starting with __ and the normal name is an alias.  */
22775 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22776 choke me
22777 #else
22778 f = _vsnprintf;
22779 #endif
22780
22781 ; return 0; }
22782 EOF
22783 if { (eval echo configure:22784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22784   rm -rf conftest*
22785   eval "ac_cv_func__vsnprintf=yes"
22786 else
22787   echo "configure: failed program was:" >&5
22788   cat conftest.$ac_ext >&5
22789   rm -rf conftest*
22790   eval "ac_cv_func__vsnprintf=no"
22791 fi
22792 rm -f conftest*
22793 fi
22794
22795 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22796   echo "$ac_t""yes" 1>&6
22797   ac_cv_func_vsnprintf=yes
22798         cat >> confdefs.h <<\EOF
22799 #define vsnprintf _vsnprintf
22800 EOF
22801
22802
22803 else
22804   echo "$ac_t""no" 1>&6
22805 fi
22806
22807
22808 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22809 echo "configure:22810: checking for vprintf" >&5
22810 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22811   echo $ac_n "(cached) $ac_c" 1>&6
22812 else
22813   cat > conftest.$ac_ext <<EOF
22814 #line 22815 "configure"
22815 #include "confdefs.h"
22816 /* System header to define __stub macros and hopefully few prototypes,
22817     which can conflict with char vprintf(); below.  */
22818 #include <assert.h>
22819 /* Override any gcc2 internal prototype to avoid an error.  */
22820 /* We use char because int might match the return type of a gcc2
22821     builtin and then its argument prototype would still apply.  */
22822 char vprintf();
22823 char (*f)();
22824
22825 int main() {
22826
22827 /* The GNU C library defines this for functions which it implements
22828     to always fail with ENOSYS.  Some functions are actually named
22829     something starting with __ and the normal name is an alias.  */
22830 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22831 choke me
22832 #else
22833 f = vprintf;
22834 #endif
22835
22836 ; return 0; }
22837 EOF
22838 if { (eval echo configure:22839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22839   rm -rf conftest*
22840   eval "ac_cv_func_vprintf=yes"
22841 else
22842   echo "configure: failed program was:" >&5
22843   cat conftest.$ac_ext >&5
22844   rm -rf conftest*
22845   eval "ac_cv_func_vprintf=no"
22846 fi
22847 rm -f conftest*
22848 fi
22849
22850 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22851   echo "$ac_t""yes" 1>&6
22852   cat >> confdefs.h <<\EOF
22853 #define HAVE_VPRINTF 1
22854 EOF
22855
22856 else
22857   echo "$ac_t""no" 1>&6
22858 fi
22859
22860 if test "$ac_cv_func_vprintf" != yes; then
22861 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22862 echo "configure:22863: checking for _doprnt" >&5
22863 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22864   echo $ac_n "(cached) $ac_c" 1>&6
22865 else
22866   cat > conftest.$ac_ext <<EOF
22867 #line 22868 "configure"
22868 #include "confdefs.h"
22869 /* System header to define __stub macros and hopefully few prototypes,
22870     which can conflict with char _doprnt(); below.  */
22871 #include <assert.h>
22872 /* Override any gcc2 internal prototype to avoid an error.  */
22873 /* We use char because int might match the return type of a gcc2
22874     builtin and then its argument prototype would still apply.  */
22875 char _doprnt();
22876 char (*f)();
22877
22878 int main() {
22879
22880 /* The GNU C library defines this for functions which it implements
22881     to always fail with ENOSYS.  Some functions are actually named
22882     something starting with __ and the normal name is an alias.  */
22883 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22884 choke me
22885 #else
22886 f = _doprnt;
22887 #endif
22888
22889 ; return 0; }
22890 EOF
22891 if { (eval echo configure:22892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22892   rm -rf conftest*
22893   eval "ac_cv_func__doprnt=yes"
22894 else
22895   echo "configure: failed program was:" >&5
22896   cat conftest.$ac_ext >&5
22897   rm -rf conftest*
22898   eval "ac_cv_func__doprnt=no"
22899 fi
22900 rm -f conftest*
22901 fi
22902
22903 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22904   echo "$ac_t""yes" 1>&6
22905   cat >> confdefs.h <<\EOF
22906 #define HAVE_DOPRNT 1
22907 EOF
22908
22909 else
22910   echo "$ac_t""no" 1>&6
22911 fi
22912
22913 fi
22914
22915
22916 if test $ac_cv_func_vprintf = yes ; then
22917                 for ac_func in snprintf vsnprintf
22918 do
22919 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22920 echo "configure:22921: checking for $ac_func" >&5
22921 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22922   echo $ac_n "(cached) $ac_c" 1>&6
22923 else
22924   cat > conftest.$ac_ext <<EOF
22925 #line 22926 "configure"
22926 #include "confdefs.h"
22927 /* System header to define __stub macros and hopefully few prototypes,
22928     which can conflict with char $ac_func(); below.  */
22929 #include <assert.h>
22930 /* Override any gcc2 internal prototype to avoid an error.  */
22931 /* We use char because int might match the return type of a gcc2
22932     builtin and then its argument prototype would still apply.  */
22933 char $ac_func();
22934 char (*f)();
22935
22936 int main() {
22937
22938 /* The GNU C library defines this for functions which it implements
22939     to always fail with ENOSYS.  Some functions are actually named
22940     something starting with __ and the normal name is an alias.  */
22941 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22942 choke me
22943 #else
22944 f = $ac_func;
22945 #endif
22946
22947 ; return 0; }
22948 EOF
22949 if { (eval echo configure:22950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22950   rm -rf conftest*
22951   eval "ac_cv_func_$ac_func=yes"
22952 else
22953   echo "configure: failed program was:" >&5
22954   cat conftest.$ac_ext >&5
22955   rm -rf conftest*
22956   eval "ac_cv_func_$ac_func=no"
22957 fi
22958 rm -f conftest*
22959 fi
22960
22961 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22962   echo "$ac_t""yes" 1>&6
22963     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22964   cat >> confdefs.h <<EOF
22965 #define $ac_tr_func 1
22966 EOF
22967  
22968 else
22969   echo "$ac_t""no" 1>&6
22970 fi
22971 done
22972
22973 fi
22974
22975 for ac_func in \
22976         bcopy                   \
22977         closesocket             \
22978         chroot                  \
22979         endgrent                \
22980         endpwent                \
22981         fcntl                   \
22982         flock                   \
22983         fstat                   \
22984         getdtablesize   \
22985         getgrgid                \
22986         gethostname             \
22987         getpass                 \
22988         getpassphrase   \
22989         getpwuid                \
22990         getpwnam                \
22991         getspnam                \
22992         gettimeofday    \
22993         initgroups              \
22994         lockf                   \
22995         memcpy                  \
22996         memmove                 \
22997         mkstemp                 \
22998         mktemp                  \
22999         pipe                    \
23000         read                    \
23001         recv                    \
23002         recvfrom                \
23003         setpwfile               \
23004         setgid                  \
23005         setegid                 \
23006         setsid                  \
23007         setuid                  \
23008         seteuid                 \
23009         sigaction               \
23010         signal                  \
23011         sigset                  \
23012         strdup                  \
23013         strerror                \
23014         strpbrk                 \
23015         strrchr                 \
23016         strsep                  \
23017         strstr                  \
23018         strtol                  \
23019         strtoul                 \
23020         strtoq                  \
23021         strtouq                 \
23022         strtoll                 \
23023         strspn                  \
23024         sysconf                 \
23025         usleep                  \
23026         waitpid                 \
23027         wait4                   \
23028         write                   \
23029         send                    \
23030         sendmsg                 \
23031         sendto                  \
23032
23033 do
23034 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23035 echo "configure:23036: checking for $ac_func" >&5
23036 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23037   echo $ac_n "(cached) $ac_c" 1>&6
23038 else
23039   cat > conftest.$ac_ext <<EOF
23040 #line 23041 "configure"
23041 #include "confdefs.h"
23042 /* System header to define __stub macros and hopefully few prototypes,
23043     which can conflict with char $ac_func(); below.  */
23044 #include <assert.h>
23045 /* Override any gcc2 internal prototype to avoid an error.  */
23046 /* We use char because int might match the return type of a gcc2
23047     builtin and then its argument prototype would still apply.  */
23048 char $ac_func();
23049 char (*f)();
23050
23051 int main() {
23052
23053 /* The GNU C library defines this for functions which it implements
23054     to always fail with ENOSYS.  Some functions are actually named
23055     something starting with __ and the normal name is an alias.  */
23056 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23057 choke me
23058 #else
23059 f = $ac_func;
23060 #endif
23061
23062 ; return 0; }
23063 EOF
23064 if { (eval echo configure:23065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23065   rm -rf conftest*
23066   eval "ac_cv_func_$ac_func=yes"
23067 else
23068   echo "configure: failed program was:" >&5
23069   cat conftest.$ac_ext >&5
23070   rm -rf conftest*
23071   eval "ac_cv_func_$ac_func=no"
23072 fi
23073 rm -f conftest*
23074 fi
23075
23076 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23077   echo "$ac_t""yes" 1>&6
23078     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23079   cat >> confdefs.h <<EOF
23080 #define $ac_tr_func 1
23081 EOF
23082  
23083 else
23084   echo "$ac_t""no" 1>&6
23085 fi
23086 done
23087
23088
23089 for ac_func in getopt getpeereid
23090 do
23091 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23092 echo "configure:23093: checking for $ac_func" >&5
23093 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23094   echo $ac_n "(cached) $ac_c" 1>&6
23095 else
23096   cat > conftest.$ac_ext <<EOF
23097 #line 23098 "configure"
23098 #include "confdefs.h"
23099 /* System header to define __stub macros and hopefully few prototypes,
23100     which can conflict with char $ac_func(); below.  */
23101 #include <assert.h>
23102 /* Override any gcc2 internal prototype to avoid an error.  */
23103 /* We use char because int might match the return type of a gcc2
23104     builtin and then its argument prototype would still apply.  */
23105 char $ac_func();
23106 char (*f)();
23107
23108 int main() {
23109
23110 /* The GNU C library defines this for functions which it implements
23111     to always fail with ENOSYS.  Some functions are actually named
23112     something starting with __ and the normal name is an alias.  */
23113 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23114 choke me
23115 #else
23116 f = $ac_func;
23117 #endif
23118
23119 ; return 0; }
23120 EOF
23121 if { (eval echo configure:23122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23122   rm -rf conftest*
23123   eval "ac_cv_func_$ac_func=yes"
23124 else
23125   echo "configure: failed program was:" >&5
23126   cat conftest.$ac_ext >&5
23127   rm -rf conftest*
23128   eval "ac_cv_func_$ac_func=no"
23129 fi
23130 rm -f conftest*
23131 fi
23132
23133 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23134   echo "$ac_t""yes" 1>&6
23135     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23136   cat >> confdefs.h <<EOF
23137 #define $ac_tr_func 1
23138 EOF
23139  
23140 else
23141   echo "$ac_t""no" 1>&6
23142 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23143 fi
23144 done
23145
23146
23147
23148 if test "$ac_cv_func_getopt" != yes; then
23149         LIBSRCS="$LIBSRCS getopt.c"
23150 fi
23151 if test "$ac_cv_func_getpeereid" != yes; then
23152         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23153 echo "configure:23154: checking for msg_accrights in msghdr" >&5
23154 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23155   echo $ac_n "(cached) $ac_c" 1>&6
23156 else
23157   cat > conftest.$ac_ext <<EOF
23158 #line 23159 "configure"
23159 #include "confdefs.h"
23160 #include <sys/socket.h>
23161 int main() {
23162 struct msghdr m; m.msg_accrightslen=0
23163 ; return 0; }
23164 EOF
23165 if { (eval echo configure:23166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23166   rm -rf conftest*
23167   ol_cv_msghdr_msg_accrights=yes
23168 else
23169   echo "configure: failed program was:" >&5
23170   cat conftest.$ac_ext >&5
23171   rm -rf conftest*
23172   ol_cv_msghdr_msg_accrights=no
23173 fi
23174 rm -f conftest*
23175         
23176 fi
23177
23178 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23179   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23180         cat >> confdefs.h <<\EOF
23181 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23182 EOF
23183
23184   fi
23185
23186         LIBSRCS="$LIBSRCS getpeereid.c"
23187 fi
23188 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23189         if test "$ac_cv_func_snprintf" != yes; then
23190                 cat >> confdefs.h <<\EOF
23191 #define snprintf ber_pvt_snprintf
23192 EOF
23193
23194         fi
23195         if test "$ac_cv_func_vsnprintf" != yes; then
23196                 cat >> confdefs.h <<\EOF
23197 #define vsnprintf ber_pvt_vsnprintf
23198 EOF
23199
23200         fi
23201 fi
23202
23203 # Check Configuration
23204 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23205 echo "configure:23206: checking declaration of sys_errlist" >&5
23206 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23207   echo $ac_n "(cached) $ac_c" 1>&6
23208 else
23209   
23210         cat > conftest.$ac_ext <<EOF
23211 #line 23212 "configure"
23212 #include "confdefs.h"
23213
23214 #include <stdio.h>
23215 #include <sys/types.h>
23216 #include <errno.h>
23217 #ifdef WINNT
23218 #include <stdlib.h>
23219 #endif 
23220 int main() {
23221 char *c = (char *) *sys_errlist
23222 ; return 0; }
23223 EOF
23224 if { (eval echo configure:23225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23225   rm -rf conftest*
23226   ol_cv_dcl_sys_errlist=yes
23227         ol_cv_have_sys_errlist=yes
23228 else
23229   echo "configure: failed program was:" >&5
23230   cat conftest.$ac_ext >&5
23231   rm -rf conftest*
23232   ol_cv_dcl_sys_errlist=no
23233 fi
23234 rm -f conftest*
23235 fi
23236
23237 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23238 #
23239 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23240 if test $ol_cv_dcl_sys_errlist = no ; then
23241         cat >> confdefs.h <<\EOF
23242 #define DECL_SYS_ERRLIST 1
23243 EOF
23244
23245
23246         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23247 echo "configure:23248: checking existence of sys_errlist" >&5
23248 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23249   echo $ac_n "(cached) $ac_c" 1>&6
23250 else
23251   
23252                 cat > conftest.$ac_ext <<EOF
23253 #line 23254 "configure"
23254 #include "confdefs.h"
23255 #include <errno.h>
23256 int main() {
23257 char *c = (char *) *sys_errlist
23258 ; return 0; }
23259 EOF
23260 if { (eval echo configure:23261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23261   rm -rf conftest*
23262   ol_cv_have_sys_errlist=yes
23263 else
23264   echo "configure: failed program was:" >&5
23265   cat conftest.$ac_ext >&5
23266   rm -rf conftest*
23267   ol_cv_have_sys_errlist=no
23268 fi
23269 rm -f conftest*
23270 fi
23271
23272 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23273 fi
23274 if test $ol_cv_have_sys_errlist = yes ; then
23275         cat >> confdefs.h <<\EOF
23276 #define HAVE_SYS_ERRLIST 1
23277 EOF
23278
23279 fi
23280
23281
23282
23283 if test "$ol_enable_slapi" != no ; then
23284                         for ac_hdr in ltdl.h
23285 do
23286 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23287 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23288 echo "configure:23289: checking for $ac_hdr" >&5
23289 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23290   echo $ac_n "(cached) $ac_c" 1>&6
23291 else
23292   cat > conftest.$ac_ext <<EOF
23293 #line 23294 "configure"
23294 #include "confdefs.h"
23295 #include <$ac_hdr>
23296 EOF
23297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23298 { (eval echo configure:23299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23300 if test -z "$ac_err"; then
23301   rm -rf conftest*
23302   eval "ac_cv_header_$ac_safe=yes"
23303 else
23304   echo "$ac_err" >&5
23305   echo "configure: failed program was:" >&5
23306   cat conftest.$ac_ext >&5
23307   rm -rf conftest*
23308   eval "ac_cv_header_$ac_safe=no"
23309 fi
23310 rm -f conftest*
23311 fi
23312 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23313   echo "$ac_t""yes" 1>&6
23314     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23315   cat >> confdefs.h <<EOF
23316 #define $ac_tr_hdr 1
23317 EOF
23318  
23319 else
23320   echo "$ac_t""no" 1>&6
23321 fi
23322 done
23323
23324
23325         if test $ac_cv_header_ltdl_h != yes ; then
23326                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23327         fi
23328         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23329 echo "configure:23330: checking for lt_dlinit in -lltdl" >&5
23330 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23331 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23332   echo $ac_n "(cached) $ac_c" 1>&6
23333 else
23334   ac_save_LIBS="$LIBS"
23335 LIBS="-lltdl  $LIBS"
23336 cat > conftest.$ac_ext <<EOF
23337 #line 23338 "configure"
23338 #include "confdefs.h"
23339 /* Override any gcc2 internal prototype to avoid an error.  */
23340 /* We use char because int might match the return type of a gcc2
23341     builtin and then its argument prototype would still apply.  */
23342 char lt_dlinit();
23343
23344 int main() {
23345 lt_dlinit()
23346 ; return 0; }
23347 EOF
23348 if { (eval echo configure:23349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23349   rm -rf conftest*
23350   eval "ac_cv_lib_$ac_lib_var=yes"
23351 else
23352   echo "configure: failed program was:" >&5
23353   cat conftest.$ac_ext >&5
23354   rm -rf conftest*
23355   eval "ac_cv_lib_$ac_lib_var=no"
23356 fi
23357 rm -f conftest*
23358 LIBS="$ac_save_LIBS"
23359
23360 fi
23361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23362   echo "$ac_t""yes" 1>&6
23363   
23364                 SLAPI_LIBS=-lltdl
23365                 LIBSLAPI=libslapi.a
23366                 LIBSLAPITOOLS=../libslapi.a
23367                 cat >> confdefs.h <<\EOF
23368 #define HAVE_LIBLTDL 1
23369 EOF
23370
23371         
23372 else
23373   echo "$ac_t""no" 1>&6
23374 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23375 fi
23376
23377
23378         cat >> confdefs.h <<\EOF
23379 #define LDAP_SLAPI 1
23380 EOF
23381
23382 fi
23383
23384 if test "$ol_enable_debug" != no ; then
23385         cat >> confdefs.h <<\EOF
23386 #define LDAP_DEBUG 1
23387 EOF
23388
23389 fi
23390 if test "$ol_enable_syslog" = yes ; then
23391         cat >> confdefs.h <<\EOF
23392 #define LDAP_SYSLOG 1
23393 EOF
23394
23395 fi
23396 if test "$ol_link_kbind" != no ; then
23397         cat >> confdefs.h <<\EOF
23398 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23399 EOF
23400
23401 fi
23402 if test "$ol_enable_proctitle" != no ; then
23403         cat >> confdefs.h <<\EOF
23404 #define LDAP_PROCTITLE 1
23405 EOF
23406
23407 fi
23408 if test "$ol_enable_referrals" != no ; then
23409         cat >> confdefs.h <<\EOF
23410 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23411 EOF
23412
23413 fi
23414 if test "$ol_enable_local" != no; then
23415         cat >> confdefs.h <<\EOF
23416 #define LDAP_PF_LOCAL 1
23417 EOF
23418
23419 fi
23420 if test "$ol_link_ipv6" != no; then
23421         cat >> confdefs.h <<\EOF
23422 #define LDAP_PF_INET6 1
23423 EOF
23424
23425 fi
23426 if test "$ol_enable_cleartext" != no ; then
23427         cat >> confdefs.h <<\EOF
23428 #define SLAPD_CLEARTEXT 1
23429 EOF
23430
23431 fi
23432 if test "$ol_enable_crypt" != no ; then
23433         cat >> confdefs.h <<\EOF
23434 #define SLAPD_CRYPT 1
23435 EOF
23436
23437 fi
23438 if test "$ol_link_spasswd" != no ; then
23439         cat >> confdefs.h <<\EOF
23440 #define SLAPD_SPASSWD 1
23441 EOF
23442
23443 fi
23444 if test "$ol_enable_multimaster" != no ; then
23445         cat >> confdefs.h <<\EOF
23446 #define SLAPD_MULTIMASTER 1
23447 EOF
23448
23449 fi
23450 if test "$ol_enable_rlookups" != no ; then
23451         cat >> confdefs.h <<\EOF
23452 #define SLAPD_RLOOKUPS 1
23453 EOF
23454
23455 fi
23456 if test "$ol_enable_aci" != no ; then
23457         cat >> confdefs.h <<\EOF
23458 #define SLAPD_ACI_ENABLED 1
23459 EOF
23460
23461 fi
23462
23463 if test "$ol_link_modules" != no ; then
23464         cat >> confdefs.h <<\EOF
23465 #define SLAPD_MODULES 1
23466 EOF
23467
23468         BUILD_SLAPD=yes
23469         SLAPD_MODULES_LDFLAGS="-dlopen self"
23470 fi
23471
23472 cat >> confdefs.h <<\EOF
23473 #define SLAPD_MOD_STATIC 1
23474 EOF
23475
23476 cat >> confdefs.h <<\EOF
23477 #define SLAPD_MOD_DYNAMIC 2
23478 EOF
23479
23480
23481 if test "$ol_enable_bdb" != no ; then
23482         cat >> confdefs.h <<\EOF
23483 #define SLAPD_BDB 1
23484 EOF
23485
23486         BUILD_SLAPD=yes
23487         BUILD_BDB=yes
23488         if test "$ol_with_bdb_module" != static ; then
23489                 cat >> confdefs.h <<\EOF
23490 #define SLAPD_BDB_DYNAMIC 1
23491 EOF
23492
23493                 BUILD_BDB=mod
23494                 BUILD_BDB_DYNAMIC=shared
23495                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23496         else
23497                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23498         fi
23499 fi
23500
23501 if test "$ol_link_dnssrv" != no ; then
23502         cat >> confdefs.h <<\EOF
23503 #define SLAPD_DNSSRV 1
23504 EOF
23505
23506         BUILD_SLAPD=yes
23507         BUILD_DNSSRV=yes
23508         if test "$ol_with_dnssrv_module" != static ; then
23509                 cat >> confdefs.h <<\EOF
23510 #define SLAPD_DNSSRV_DYNAMIC 1
23511 EOF
23512
23513                 BUILD_DNSSRV=mod
23514                 BUILD_DNSSRV_DYNAMIC=shared
23515                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23516         else
23517                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23518         fi
23519 fi
23520
23521 if test "$ol_enable_hdb" != no ; then
23522         cat >> confdefs.h <<\EOF
23523 #define SLAPD_HDB 1
23524 EOF
23525
23526         BUILD_SLAPD=yes
23527         BUILD_HDB=yes
23528         if test "$ol_with_hdb_module" != static ; then
23529                 cat >> confdefs.h <<\EOF
23530 #define SLAPD_HDB_DYNAMIC 1
23531 EOF
23532
23533                 BUILD_HDB=mod
23534                 BUILD_HDB_DYNAMIC=shared
23535                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23536         else
23537                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23538         fi
23539 fi
23540
23541 if test "$ol_enable_ldap" != no ; then
23542         cat >> confdefs.h <<\EOF
23543 #define SLAPD_LDAP 1
23544 EOF
23545
23546         BUILD_SLAPD=yes
23547         BUILD_LDAP=yes
23548         if test "$ol_with_ldap_module" != static ; then
23549                 cat >> confdefs.h <<\EOF
23550 #define SLAPD_LDAP_DYNAMIC 1
23551 EOF
23552
23553                 BUILD_LDAP=mod
23554                 BUILD_LDAP_DYNAMIC=shared
23555                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23556         else
23557                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23558         fi
23559 fi
23560
23561 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23562         cat >> confdefs.h <<\EOF
23563 #define SLAPD_LDBM 1
23564 EOF
23565
23566         BUILD_SLAPD=yes
23567         BUILD_LDBM=yes
23568         if test "$ol_with_ldbm_module" != static ; then
23569                 cat >> confdefs.h <<\EOF
23570 #define SLAPD_LDBM_DYNAMIC 1
23571 EOF
23572
23573                 BUILD_LDBM=mod
23574                 BUILD_LDBM_DYNAMIC=shared
23575                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23576         else
23577                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23578         fi
23579 fi
23580
23581 if test "$ol_enable_meta" != no ; then
23582         if test "$ol_enable_ldap" = no ; then
23583                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23584         fi
23585         if test "$ol_enable_rewrite" = no ; then
23586                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23587         fi
23588         cat >> confdefs.h <<\EOF
23589 #define SLAPD_META 1
23590 EOF
23591
23592         BUILD_SLAPD=yes
23593         BUILD_META=yes
23594         BUILD_REWRITE=yes
23595         if test "$ol_with_meta_module" != static ; then
23596                 cat >> confdefs.h <<\EOF
23597 #define SLAPD_META_DYNAMIC 1
23598 EOF
23599
23600                 BUILD_META=mod
23601                 BUILD_META_DYNAMIC=shared
23602                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23603         else
23604                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23605         fi
23606 fi
23607
23608 if test "$ol_enable_monitor" != no ; then
23609         cat >> confdefs.h <<\EOF
23610 #define SLAPD_MONITOR 1
23611 EOF
23612
23613         BUILD_SLAPD=yes
23614         BUILD_MONITOR=yes
23615         if test "$ol_with_monitor_module" != static ; then
23616                 cat >> confdefs.h <<\EOF
23617 #define SLAPD_MONITOR_DYNAMIC 1
23618 EOF
23619
23620                 BUILD_MONITOR=mod
23621                 BUILD_MONITOR_DYNAMIC=shared
23622                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23623         else
23624                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23625         fi
23626 fi
23627
23628 if test "$ol_enable_null" != no ; then
23629         cat >> confdefs.h <<\EOF
23630 #define SLAPD_NULL 1
23631 EOF
23632
23633         BUILD_SLAPD=yes
23634         BUILD_NULL=yes
23635         if test "$ol_with_null_module" != static ; then
23636                 cat >> confdefs.h <<\EOF
23637 #define SLAPD_NULL_DYNAMIC 1
23638 EOF
23639
23640                 BUILD_NULL=mod
23641                 BUILD_NULL_DYNAMIC=shared
23642                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23643         else
23644                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23645         fi
23646 fi
23647
23648 if test "$ol_enable_passwd" != no ; then
23649         cat >> confdefs.h <<\EOF
23650 #define SLAPD_PASSWD 1
23651 EOF
23652
23653         BUILD_SLAPD=yes
23654         BUILD_PASSWD=yes
23655         if test "$ol_with_passwd_module" != static ; then
23656                 cat >> confdefs.h <<\EOF
23657 #define SLAPD_PASSWD_DYNAMIC 1
23658 EOF
23659
23660                 BUILD_PASSWD=mod
23661                 BUILD_PASSWD_DYNAMIC=shared
23662                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23663         else
23664                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23665         fi
23666 fi
23667
23668 if test "$ol_link_perl" != no ; then
23669         cat >> confdefs.h <<\EOF
23670 #define SLAPD_PERL 1
23671 EOF
23672
23673         BUILD_SLAPD=yes
23674         BUILD_PERL=yes
23675         if test "$ol_with_perl_module" != static ; then
23676                 cat >> confdefs.h <<\EOF
23677 #define SLAPD_PERL_DYNAMIC 1
23678 EOF
23679
23680                 BUILD_PERL=mod
23681                 BUILD_PERL_DYNAMIC=shared
23682                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23683         else
23684                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23685         fi
23686 fi
23687
23688 if test "$ol_enable_shell" != no ; then
23689         if test "$ol_link_thread" != no ; then
23690                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23691         fi
23692         cat >> confdefs.h <<\EOF
23693 #define SLAPD_SHELL 1
23694 EOF
23695
23696         BUILD_SLAPD=yes
23697         BUILD_SHELL=yes
23698         if test "$ol_with_shell_module" != static ; then
23699                 cat >> confdefs.h <<\EOF
23700 #define SLAPD_SHELL_DYNAMIC 1
23701 EOF
23702
23703                 BUILD_SHELL=mod
23704                 BUILD_SHELL_DYNAMIC=shared
23705                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23706         else
23707                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23708         fi
23709 fi
23710
23711 if test "$ol_link_sql" != no ; then
23712         cat >> confdefs.h <<\EOF
23713 #define SLAPD_SQL 1
23714 EOF
23715
23716         BUILD_SLAPD=yes
23717         BUILD_SQL=yes
23718         if test "$ol_with_sql_module" != static; then
23719                 cat >> confdefs.h <<\EOF
23720 #define SLAPD_SQL_DYNAMIC 1
23721 EOF
23722
23723                 BUILD_SQL=mod
23724                 BUILD_SQL_DYNAMIC=shared
23725                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23726         else
23727                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23728         fi
23729 fi
23730
23731 if test "$ol_with_dyngroup" != no ; then
23732         BUILD_DYNGROUP=$ol_with_dyngroup
23733         if test "$ol_with_dyngroup" = mod ; then
23734                 MFLAG=SLAPD_MOD_DYNAMIC
23735                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23736         else
23737                 MFLAG=SLAPD_MOD_STATIC
23738         fi
23739         cat >> confdefs.h <<EOF
23740 #define SLAPD_OVER_DYNGROUP $MFLAG
23741 EOF
23742
23743 fi
23744
23745 if test "$ol_with_proxycache" != no ; then
23746         BUILD_PROXYCACHE=$ol_with_proxycache
23747         if test "$ol_with_proxycache" = mod ; then
23748                 MFLAG=SLAPD_MOD_DYNAMIC
23749                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23750         else
23751                 MFLAG=SLAPD_MOD_STATIC
23752         fi
23753         cat >> confdefs.h <<EOF
23754 #define SLAPD_OVER_PROXYCACHE $MFLAG
23755 EOF
23756
23757 fi
23758
23759 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23760         $BUILD_SLAPD = yes ; then
23761         BUILD_SLURPD=yes
23762 fi
23763
23764 if test "$ol_enable_rewrite" != no ; then
23765         cat >> confdefs.h <<\EOF
23766 #define ENABLE_REWRITE 1
23767 EOF
23768
23769         BUILD_REWRITE=yes
23770 fi
23771
23772 if test "$ol_enable_slapi" != no ; then
23773         cat >> confdefs.h <<\EOF
23774 #define ENABLE_SLAPI 1
23775 EOF
23776
23777         BUILD_SLAPI=yes
23778         SLAPD_SLAPI_DEPEND=libslapi.a
23779 fi
23780
23781
23782
23783 if test "$ac_cv_mingw32" = yes ; then
23784         PLAT=NT
23785         SLAPD_MODULES_LDFLAGS=
23786 else
23787         PLAT=UNIX
23788 fi
23789
23790 if test -z "$SLAPD_STATIC_BACKENDS"; then
23791         SLAPD_NO_STATIC='#'
23792 else
23793         SLAPD_NO_STATIC=
23794 fi
23795
23796
23797
23798
23799
23800
23801
23802   
23803   
23804   
23805   
23806   
23807   
23808   
23809   
23810   
23811   
23812   
23813   
23814   
23815   
23816   
23817   
23818   
23819   
23820   
23821   
23822   
23823   
23824   
23825   
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 # Check whether --with-xxinstall or --without-xxinstall was given.
23869 if test "${with_xxinstall+set}" = set; then
23870   withval="$with_xxinstall"
23871   :
23872 fi
23873
23874
23875
23876 trap '' 1 2 15
23877
23878 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23879
23880 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23881 # Let make expand exec_prefix.
23882 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23883
23884 # Any assignment to VPATH causes Sun make to only execute
23885 # the first set of double-colon rules, so remove it if not needed.
23886 # If there is a colon in the path, we need to keep it.
23887 if test "x$srcdir" = x.; then
23888   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23889 fi
23890
23891 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23892
23893 DEFS=-DHAVE_CONFIG_H
23894
23895 # Without the "./", some shells look in PATH for config.status.
23896 : ${CONFIG_STATUS=./config.status}
23897
23898 echo creating $CONFIG_STATUS
23899 rm -f $CONFIG_STATUS
23900 cat > $CONFIG_STATUS <<EOF
23901 #! /bin/sh
23902 # Generated automatically by configure.
23903 # Run this file to recreate the current configuration.
23904 # This directory was configured as follows,
23905 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23906 #
23907 # $0 $ac_configure_args
23908 #
23909 # Compiler output produced by configure, useful for debugging
23910 # configure, is in ./config.log if it exists.
23911
23912 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23913 for ac_option
23914 do
23915   case "\$ac_option" in
23916   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23917     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23918     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23919   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23920     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23921     exit 0 ;;
23922   -help | --help | --hel | --he | --h)
23923     echo "\$ac_cs_usage"; exit 0 ;;
23924   *) echo "\$ac_cs_usage"; exit 1 ;;
23925   esac
23926 done
23927
23928 ac_given_srcdir=$srcdir
23929 ac_given_INSTALL="$INSTALL"
23930
23931 trap 'rm -fr `echo "\
23932 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23933 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23934 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23935 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23936 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23937 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23938 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23939 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23940 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23941 include/Makefile:build/top.mk:include/Makefile.in \
23942 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23943 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23944 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23945 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23946 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23947 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23948 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23949 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23950 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23951 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23952 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23953 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23954 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23955 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23956 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23957 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23958 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23959 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23960 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23961 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23962 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23963 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23964 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23965 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
23966 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23967 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23968 tests/run \
23969 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23970  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23971 EOF
23972 cat >> $CONFIG_STATUS <<EOF
23973
23974 # Protect against being on the right side of a sed subst in config.status.
23975 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23976  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23977 $ac_vpsub
23978 $extrasub
23979 s%@SHELL@%$SHELL%g
23980 s%@CFLAGS@%$CFLAGS%g
23981 s%@CPPFLAGS@%$CPPFLAGS%g
23982 s%@CXXFLAGS@%$CXXFLAGS%g
23983 s%@FFLAGS@%$FFLAGS%g
23984 s%@DEFS@%$DEFS%g
23985 s%@LDFLAGS@%$LDFLAGS%g
23986 s%@LIBS@%$LIBS%g
23987 s%@exec_prefix@%$exec_prefix%g
23988 s%@prefix@%$prefix%g
23989 s%@program_transform_name@%$program_transform_name%g
23990 s%@bindir@%$bindir%g
23991 s%@sbindir@%$sbindir%g
23992 s%@libexecdir@%$libexecdir%g
23993 s%@datadir@%$datadir%g
23994 s%@sysconfdir@%$sysconfdir%g
23995 s%@sharedstatedir@%$sharedstatedir%g
23996 s%@localstatedir@%$localstatedir%g
23997 s%@libdir@%$libdir%g
23998 s%@includedir@%$includedir%g
23999 s%@oldincludedir@%$oldincludedir%g
24000 s%@infodir@%$infodir%g
24001 s%@mandir@%$mandir%g
24002 s%@host@%$host%g
24003 s%@host_alias@%$host_alias%g
24004 s%@host_cpu@%$host_cpu%g
24005 s%@host_vendor@%$host_vendor%g
24006 s%@host_os@%$host_os%g
24007 s%@target@%$target%g
24008 s%@target_alias@%$target_alias%g
24009 s%@target_cpu@%$target_cpu%g
24010 s%@target_vendor@%$target_vendor%g
24011 s%@target_os@%$target_os%g
24012 s%@build@%$build%g
24013 s%@build_alias@%$build_alias%g
24014 s%@build_cpu@%$build_cpu%g
24015 s%@build_vendor@%$build_vendor%g
24016 s%@build_os@%$build_os%g
24017 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24018 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24019 s%@INSTALL_DATA@%$INSTALL_DATA%g
24020 s%@PACKAGE@%$PACKAGE%g
24021 s%@VERSION@%$VERSION%g
24022 s%@ACLOCAL@%$ACLOCAL%g
24023 s%@AUTOCONF@%$AUTOCONF%g
24024 s%@AUTOMAKE@%$AUTOMAKE%g
24025 s%@AUTOHEADER@%$AUTOHEADER%g
24026 s%@MAKEINFO@%$MAKEINFO%g
24027 s%@install_sh@%$install_sh%g
24028 s%@AMTAR@%$AMTAR%g
24029 s%@AWK@%$AWK%g
24030 s%@AMTARFLAGS@%$AMTARFLAGS%g
24031 s%@SET_MAKE@%$SET_MAKE%g
24032 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24033 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24034 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24035 s%@top_builddir@%$top_builddir%g
24036 s%@ldap_subdir@%$ldap_subdir%g
24037 s%@CC@%$CC%g
24038 s%@AR@%$AR%g
24039 s%@LN_S@%$LN_S%g
24040 s%@OBJEXT@%$OBJEXT%g
24041 s%@EXEEXT@%$EXEEXT%g
24042 s%@ECHO@%$ECHO%g
24043 s%@RANLIB@%$RANLIB%g
24044 s%@STRIP@%$STRIP%g
24045 s%@DLLTOOL@%$DLLTOOL%g
24046 s%@AS@%$AS%g
24047 s%@OBJDUMP@%$OBJDUMP%g
24048 s%@CPP@%$CPP%g
24049 s%@LIBTOOL@%$LIBTOOL%g
24050 s%@LN_H@%$LN_H%g
24051 s%@PERLBIN@%$PERLBIN%g
24052 s%@OL_MKDEP@%$OL_MKDEP%g
24053 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24054 s%@LTSTATIC@%$LTSTATIC%g
24055 s%@LIBOBJS@%$LIBOBJS%g
24056 s%@LIBSRCS@%$LIBSRCS%g
24057 s%@PLAT@%$PLAT%g
24058 s%@WITH_TLS@%$WITH_TLS%g
24059 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24060 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24061 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24062 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24063 s%@BUILD_BDB@%$BUILD_BDB%g
24064 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24065 s%@BUILD_HDB@%$BUILD_HDB%g
24066 s%@BUILD_LDAP@%$BUILD_LDAP%g
24067 s%@BUILD_LDBM@%$BUILD_LDBM%g
24068 s%@BUILD_META@%$BUILD_META%g
24069 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24070 s%@BUILD_NULL@%$BUILD_NULL%g
24071 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24072 s%@BUILD_PERL@%$BUILD_PERL%g
24073 s%@BUILD_SHELL@%$BUILD_SHELL%g
24074 s%@BUILD_SQL@%$BUILD_SQL%g
24075 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24076 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24077 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24078 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24079 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24080 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24081 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24082 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24083 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24084 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24085 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24086 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24087 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24088 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24089 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24090 s%@LDAP_LIBS@%$LDAP_LIBS%g
24091 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24092 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24093 s%@LDBM_LIBS@%$LDBM_LIBS%g
24094 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24095 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24096 s%@WRAP_LIBS@%$WRAP_LIBS%g
24097 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24098 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24099 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24100 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24101 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24102 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24103 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24104 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24105 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24106 s%@KRB4_LIBS@%$KRB4_LIBS%g
24107 s%@KRB5_LIBS@%$KRB5_LIBS%g
24108 s%@SASL_LIBS@%$SASL_LIBS%g
24109 s%@TLS_LIBS@%$TLS_LIBS%g
24110 s%@MODULES_LIBS@%$MODULES_LIBS%g
24111 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24112 s%@LIBSLAPI@%$LIBSLAPI%g
24113 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24114 s%@AUTH_LIBS@%$AUTH_LIBS%g
24115 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24116 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24117 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24118 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24119
24120 CEOF
24121 EOF
24122
24123 cat >> $CONFIG_STATUS <<\EOF
24124
24125 # Split the substitutions into bite-sized pieces for seds with
24126 # small command number limits, like on Digital OSF/1 and HP-UX.
24127 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24128 ac_file=1 # Number of current file.
24129 ac_beg=1 # First line for current file.
24130 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24131 ac_more_lines=:
24132 ac_sed_cmds=""
24133 while $ac_more_lines; do
24134   if test $ac_beg -gt 1; then
24135     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24136   else
24137     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24138   fi
24139   if test ! -s conftest.s$ac_file; then
24140     ac_more_lines=false
24141     rm -f conftest.s$ac_file
24142   else
24143     if test -z "$ac_sed_cmds"; then
24144       ac_sed_cmds="sed -f conftest.s$ac_file"
24145     else
24146       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24147     fi
24148     ac_file=`expr $ac_file + 1`
24149     ac_beg=$ac_end
24150     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24151   fi
24152 done
24153 if test -z "$ac_sed_cmds"; then
24154   ac_sed_cmds=cat
24155 fi
24156 EOF
24157
24158 cat >> $CONFIG_STATUS <<EOF
24159
24160 CONFIG_FILES=\${CONFIG_FILES-"\
24161 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24162 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24163 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24164 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24165 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24166 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24167 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24168 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24169 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24170 include/Makefile:build/top.mk:include/Makefile.in \
24171 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24172 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24173 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24174 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24175 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24176 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24177 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24178 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24179 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24180 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24181 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24182 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24183 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24184 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24185 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24186 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24187 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24188 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24189 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24190 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24191 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24192 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24193 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24194 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24195 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24196 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24197 tests/run \
24198 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24199 "}
24200 EOF
24201 cat >> $CONFIG_STATUS <<\EOF
24202 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24203   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24204   case "$ac_file" in
24205   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24206        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24207   *) ac_file_in="${ac_file}.in" ;;
24208   esac
24209
24210   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24211
24212   # Remove last slash and all that follows it.  Not all systems have dirname.
24213   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24214   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24215     # The file is in a subdirectory.
24216     test ! -d "$ac_dir" && mkdir "$ac_dir"
24217     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24218     # A "../" for each directory in $ac_dir_suffix.
24219     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24220   else
24221     ac_dir_suffix= ac_dots=
24222   fi
24223
24224   case "$ac_given_srcdir" in
24225   .)  srcdir=.
24226       if test -z "$ac_dots"; then top_srcdir=.
24227       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24228   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24229   *) # Relative path.
24230     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24231     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24232   esac
24233
24234   case "$ac_given_INSTALL" in
24235   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24236   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24237   esac
24238
24239   echo creating "$ac_file"
24240   rm -f "$ac_file"
24241   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24242   case "$ac_file" in
24243   *[Mm]akefile*) ac_comsub="1i\\
24244 # $configure_input" ;;
24245   *) ac_comsub= ;;
24246   esac
24247
24248   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24249   sed -e "$ac_comsub
24250 s%@configure_input@%$configure_input%g
24251 s%@srcdir@%$srcdir%g
24252 s%@top_srcdir@%$top_srcdir%g
24253 s%@INSTALL@%$INSTALL%g
24254 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24255 fi; done
24256 rm -f conftest.s*
24257
24258 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24259 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24260 #
24261 # ac_d sets the value in "#define NAME VALUE" lines.
24262 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24263 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24264 ac_dC='\3'
24265 ac_dD='%g'
24266 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24267 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24268 ac_uB='\([      ]\)%\1#\2define\3'
24269 ac_uC=' '
24270 ac_uD='\4%g'
24271 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24272 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24273 ac_eB='$%\1#\2define\3'
24274 ac_eC=' '
24275 ac_eD='%g'
24276
24277 if test "${CONFIG_HEADERS+set}" != set; then
24278 EOF
24279 cat >> $CONFIG_STATUS <<EOF
24280   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24281 EOF
24282 cat >> $CONFIG_STATUS <<\EOF
24283 fi
24284 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24285   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24286   case "$ac_file" in
24287   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24288        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24289   *) ac_file_in="${ac_file}.in" ;;
24290   esac
24291
24292   echo creating $ac_file
24293
24294   rm -f conftest.frag conftest.in conftest.out
24295   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24296   cat $ac_file_inputs > conftest.in
24297
24298 EOF
24299
24300 # Transform confdefs.h into a sed script conftest.vals that substitutes
24301 # the proper values into config.h.in to produce config.h.  And first:
24302 # Protect against being on the right side of a sed subst in config.status.
24303 # Protect against being in an unquoted here document in config.status.
24304 rm -f conftest.vals
24305 cat > conftest.hdr <<\EOF
24306 s/[\\&%]/\\&/g
24307 s%[\\$`]%\\&%g
24308 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24309 s%ac_d%ac_u%gp
24310 s%ac_u%ac_e%gp
24311 EOF
24312 sed -n -f conftest.hdr confdefs.h > conftest.vals
24313 rm -f conftest.hdr
24314
24315 # This sed command replaces #undef with comments.  This is necessary, for
24316 # example, in the case of _POSIX_SOURCE, which is predefined and required
24317 # on some systems where configure will not decide to define it.
24318 cat >> conftest.vals <<\EOF
24319 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24320 EOF
24321
24322 # Break up conftest.vals because some shells have a limit on
24323 # the size of here documents, and old seds have small limits too.
24324
24325 rm -f conftest.tail
24326 while :
24327 do
24328   ac_lines=`grep -c . conftest.vals`
24329   # grep -c gives empty output for an empty file on some AIX systems.
24330   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24331   # Write a limited-size here document to conftest.frag.
24332   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24333   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24334   echo 'CEOF
24335   sed -f conftest.frag conftest.in > conftest.out
24336   rm -f conftest.in
24337   mv conftest.out conftest.in
24338 ' >> $CONFIG_STATUS
24339   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24340   rm -f conftest.vals
24341   mv conftest.tail conftest.vals
24342 done
24343 rm -f conftest.vals
24344
24345 cat >> $CONFIG_STATUS <<\EOF
24346   rm -f conftest.frag conftest.h
24347   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24348   cat conftest.in >> conftest.h
24349   rm -f conftest.in
24350   if cmp -s $ac_file conftest.h 2>/dev/null; then
24351     echo "$ac_file is unchanged"
24352     rm -f conftest.h
24353   else
24354     # Remove last slash and all that follows it.  Not all systems have dirname.
24355       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24356       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24357       # The file is in a subdirectory.
24358       test ! -d "$ac_dir" && mkdir "$ac_dir"
24359     fi
24360     rm -f $ac_file
24361     mv conftest.h $ac_file
24362   fi
24363 fi; done
24364
24365 EOF
24366 cat >> $CONFIG_STATUS <<EOF
24367
24368 EOF
24369 cat >> $CONFIG_STATUS <<\EOF
24370
24371 chmod +x tests/run
24372 date > stamp-h
24373 echo Please run \"make depend\" to build dependencies
24374
24375 exit 0
24376 EOF
24377 chmod +x $CONFIG_STATUS
24378 rm -fr confdefs* $ac_clean_files
24379 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24380