]> git.sur5r.net Git - openldap/blob - configure
2b28a8017e269b91e85518ba9e5dcd2cb712185a
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.520 2004/04/04 16:26:56 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-relay        enable relay backend [yes]"
130 ac_help="$ac_help
131     --with-relay-module   module type static|dynamic [static]"
132 ac_help="$ac_help
133     --enable-shell        enable shell backend [no]"
134 ac_help="$ac_help
135     --with-shell-module   module type static|dynamic [static]"
136 ac_help="$ac_help
137     --enable-sql          enable sql backend [no]"
138 ac_help="$ac_help
139     --with-sql-module     module type static|dynamic [static]"
140 ac_help="$ac_help
141
142 SLAPD Overlay Options:"
143 ac_help="$ac_help
144     --enable-chain        LDAP Chain Response no|yes|mod [no]"
145 ac_help="$ac_help
146     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
147 ac_help="$ac_help
148     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
149 ac_help="$ac_help
150     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
151 ac_help="$ac_help
152     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
153 ac_help="$ac_help
154     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
155 ac_help="$ac_help
156
157 SLURPD (Replication Daemon) Options:"
158 ac_help="$ac_help
159   --enable-slurpd         enable building slurpd [auto]"
160 ac_help="$ac_help
161
162 Library Generation & Linking Options"
163 ac_help="$ac_help
164   --enable-static[=PKGS]  build static libraries [default=yes]"
165 ac_help="$ac_help
166   --enable-shared[=PKGS]  build shared libraries [default=yes]"
167 ac_help="$ac_help
168   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
169 ac_help="$ac_help
170   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
171
172 # Find the correct PATH separator.  Usually this is `:', but
173 # DJGPP uses `;' like DOS.
174 if test "X${PATH_SEPARATOR+set}" != Xset; then
175   UNAME=${UNAME-`uname 2>/dev/null`}
176   case X$UNAME in
177     *-DOS) lt_cv_sys_path_separator=';' ;;
178     *)     lt_cv_sys_path_separator=':' ;;
179   esac
180   PATH_SEPARATOR=$lt_cv_sys_path_separator
181 fi
182
183
184 # Check that we are running under the correct shell.
185 SHELL=${CONFIG_SHELL-/bin/sh}
186
187 case X$ECHO in
188 X*--fallback-echo)
189   # Remove one level of quotation (which was required for Make).
190   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
191   ;;
192 esac
193
194 echo=${ECHO-echo}
195 if test "X$1" = X--no-reexec; then
196   # Discard the --no-reexec flag, and continue.
197   shift
198 elif test "X$1" = X--fallback-echo; then
199   # Avoid inline document here, it may be left over
200   :
201 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
202   # Yippee, $echo works!
203   :
204 else
205   # Restart under the correct shell.
206   exec $SHELL "$0" --no-reexec ${1+"$@"}
207 fi
208
209 if test "X$1" = X--fallback-echo; then
210   # used as fallback echo
211   shift
212   cat <<EOF
213
214 EOF
215   exit 0
216 fi
217
218 # The HP-UX ksh and POSIX shell print the target directory to stdout
219 # if CDPATH is set.
220 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
221
222 if test -z "$ECHO"; then
223 if test "X${echo_test_string+set}" != Xset; then
224 # find a string as large as possible, as long as the shell can cope with it
225   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
226     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
227     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
228        echo_test_string="`eval $cmd`" &&
229        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
230     then
231       break
232     fi
233   done
234 fi
235
236 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
237    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
238    test "X$echo_testing_string" = "X$echo_test_string"; then
239   :
240 else
241   # The Solaris, AIX, and Digital Unix default echo programs unquote
242   # backslashes.  This makes it impossible to quote backslashes using
243   #   echo "$something" | sed 's/\\/\\\\/g'
244   #
245   # So, first we look for a working echo in the user's PATH.
246
247   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
248   for dir in $PATH /usr/ucb; do
249     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
250        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
251        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
252        test "X$echo_testing_string" = "X$echo_test_string"; then
253       echo="$dir/echo"
254       break
255     fi
256   done
257   IFS="$save_ifs"
258
259   if test "X$echo" = Xecho; then
260     # We didn't find a better echo, so look for alternatives.
261     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
262        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
263        test "X$echo_testing_string" = "X$echo_test_string"; then
264       # This shell has a builtin print -r that does the trick.
265       echo='print -r'
266     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
267          test "X$CONFIG_SHELL" != X/bin/ksh; then
268       # If we have ksh, try running configure again with it.
269       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
270       export ORIGINAL_CONFIG_SHELL
271       CONFIG_SHELL=/bin/ksh
272       export CONFIG_SHELL
273       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
274     else
275       # Try using printf.
276       echo='printf %s\n'
277       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
278          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
279          test "X$echo_testing_string" = "X$echo_test_string"; then
280         # Cool, printf works
281         :
282       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
283            test "X$echo_testing_string" = 'X\t' &&
284            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
285            test "X$echo_testing_string" = "X$echo_test_string"; then
286         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
287         export CONFIG_SHELL
288         SHELL="$CONFIG_SHELL"
289         export SHELL
290         echo="$CONFIG_SHELL $0 --fallback-echo"
291       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
292            test "X$echo_testing_string" = 'X\t' &&
293            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
294            test "X$echo_testing_string" = "X$echo_test_string"; then
295         echo="$CONFIG_SHELL $0 --fallback-echo"
296       else
297         # maybe with a smaller string...
298         prev=:
299
300         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
301           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
302           then
303             break
304           fi
305           prev="$cmd"
306         done
307
308         if test "$prev" != 'sed 50q "$0"'; then
309           echo_test_string=`eval $prev`
310           export echo_test_string
311           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
312         else
313           # Oops.  We lost completely, so just stick with echo.
314           echo=echo
315         fi
316       fi
317     fi
318   fi
319 fi
320 fi
321
322 # Copy echo and quote the copy suitably for passing to libtool from
323 # the Makefile, instead of quoting the original, which is used later.
324 ECHO=$echo
325 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
326    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
327 fi
328
329
330 ac_help="$ac_help
331   --disable-libtool-lock  avoid locking (might break parallel builds)"
332 ac_help="$ac_help
333   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
334 ac_help="$ac_help
335
336 See INSTALL file for further details."
337
338 # Initialize some variables set by options.
339 # The variables have the same names as the options, with
340 # dashes changed to underlines.
341 build=NONE
342 cache_file=./config.cache
343 exec_prefix=NONE
344 host=NONE
345 no_create=
346 nonopt=NONE
347 no_recursion=
348 prefix=NONE
349 program_prefix=NONE
350 program_suffix=NONE
351 program_transform_name=s,x,x,
352 silent=
353 site=
354 srcdir=
355 target=NONE
356 verbose=
357 x_includes=NONE
358 x_libraries=NONE
359 bindir='${exec_prefix}/bin'
360 sbindir='${exec_prefix}/sbin'
361 libexecdir='${exec_prefix}/libexec'
362 datadir='${prefix}/share'
363 sysconfdir='${prefix}/etc'
364 sharedstatedir='${prefix}/com'
365 localstatedir='${prefix}/var'
366 libdir='${exec_prefix}/lib'
367 includedir='${prefix}/include'
368 oldincludedir='/usr/include'
369 infodir='${prefix}/info'
370 mandir='${prefix}/man'
371
372 # Initialize some other variables.
373 subdirs=
374 MFLAGS= MAKEFLAGS=
375 SHELL=${CONFIG_SHELL-/bin/sh}
376 # Maximum number of lines to put in a shell here document.
377 ac_max_here_lines=12
378
379 ac_prev=
380 for ac_option
381 do
382
383   # If the previous option needs an argument, assign it.
384   if test -n "$ac_prev"; then
385     eval "$ac_prev=\$ac_option"
386     ac_prev=
387     continue
388   fi
389
390   case "$ac_option" in
391   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
392   *) ac_optarg= ;;
393   esac
394
395   # Accept the important Cygnus configure options, so we can diagnose typos.
396
397   case "$ac_option" in
398
399   -bindir | --bindir | --bindi | --bind | --bin | --bi)
400     ac_prev=bindir ;;
401   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
402     bindir="$ac_optarg" ;;
403
404   -build | --build | --buil | --bui | --bu)
405     ac_prev=build ;;
406   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
407     build="$ac_optarg" ;;
408
409   -cache-file | --cache-file | --cache-fil | --cache-fi \
410   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
411     ac_prev=cache_file ;;
412   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
413   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
414     cache_file="$ac_optarg" ;;
415
416   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
417     ac_prev=datadir ;;
418   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
419   | --da=*)
420     datadir="$ac_optarg" ;;
421
422   -disable-* | --disable-*)
423     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
424     # Reject names that are not valid shell variable names.
425     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
426       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
427     fi
428     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
429     eval "enable_${ac_feature}=no" ;;
430
431   -enable-* | --enable-*)
432     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
433     # Reject names that are not valid shell variable names.
434     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
435       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
436     fi
437     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
438     case "$ac_option" in
439       *=*) ;;
440       *) ac_optarg=yes ;;
441     esac
442     eval "enable_${ac_feature}='$ac_optarg'" ;;
443
444   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
445   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
446   | --exec | --exe | --ex)
447     ac_prev=exec_prefix ;;
448   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
449   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
450   | --exec=* | --exe=* | --ex=*)
451     exec_prefix="$ac_optarg" ;;
452
453   -gas | --gas | --ga | --g)
454     # Obsolete; use --with-gas.
455     with_gas=yes ;;
456
457   -help | --help | --hel | --he)
458     # Omit some internal or obsolete options to make the list less imposing.
459     # This message is too long to be a string in the A/UX 3.1 sh.
460     cat << EOF
461 Usage: configure [options] [host]
462 Options: [defaults in brackets after descriptions]
463 Configuration:
464   --cache-file=FILE       cache test results in FILE
465   --help                  print this message
466   --no-create             do not create output files
467   --quiet, --silent       do not print \`checking...' messages
468   --version               print the version of autoconf that created configure
469 Directory and file names:
470   --prefix=PREFIX         install architecture-independent files in PREFIX
471                           [$ac_default_prefix]
472   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
473                           [same as prefix]
474   --bindir=DIR            user executables in DIR [EPREFIX/bin]
475   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
476   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
477   --datadir=DIR           read-only architecture-independent data in DIR
478                           [PREFIX/share]
479   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
480   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
481                           [PREFIX/com]
482   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
483   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
484   --includedir=DIR        C header files in DIR [PREFIX/include]
485   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
486   --infodir=DIR           info documentation in DIR [PREFIX/info]
487   --mandir=DIR            man documentation in DIR [PREFIX/man]
488   --srcdir=DIR            find the sources in DIR [configure dir or ..]
489   --program-prefix=PREFIX prepend PREFIX to installed program names
490   --program-suffix=SUFFIX append SUFFIX to installed program names
491   --program-transform-name=PROGRAM
492                           run sed PROGRAM on installed program names
493 EOF
494     cat << EOF
495 Host type:
496   --build=BUILD           configure for building on BUILD [BUILD=HOST]
497   --host=HOST             configure for HOST [guessed]
498   --target=TARGET         configure for TARGET [TARGET=HOST]
499 Features and packages:
500   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
501   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
502   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
503   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
504   --x-includes=DIR        X include files are in DIR
505   --x-libraries=DIR       X library files are in DIR
506 EOF
507     if test -n "$ac_help"; then
508       echo "--enable and --with options recognized:$ac_help"
509     fi
510     exit 0 ;;
511
512   -host | --host | --hos | --ho)
513     ac_prev=host ;;
514   -host=* | --host=* | --hos=* | --ho=*)
515     host="$ac_optarg" ;;
516
517   -includedir | --includedir | --includedi | --included | --include \
518   | --includ | --inclu | --incl | --inc)
519     ac_prev=includedir ;;
520   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
521   | --includ=* | --inclu=* | --incl=* | --inc=*)
522     includedir="$ac_optarg" ;;
523
524   -infodir | --infodir | --infodi | --infod | --info | --inf)
525     ac_prev=infodir ;;
526   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
527     infodir="$ac_optarg" ;;
528
529   -libdir | --libdir | --libdi | --libd)
530     ac_prev=libdir ;;
531   -libdir=* | --libdir=* | --libdi=* | --libd=*)
532     libdir="$ac_optarg" ;;
533
534   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
535   | --libexe | --libex | --libe)
536     ac_prev=libexecdir ;;
537   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
538   | --libexe=* | --libex=* | --libe=*)
539     libexecdir="$ac_optarg" ;;
540
541   -localstatedir | --localstatedir | --localstatedi | --localstated \
542   | --localstate | --localstat | --localsta | --localst \
543   | --locals | --local | --loca | --loc | --lo)
544     ac_prev=localstatedir ;;
545   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
546   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
547   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
548     localstatedir="$ac_optarg" ;;
549
550   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
551     ac_prev=mandir ;;
552   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
553     mandir="$ac_optarg" ;;
554
555   -nfp | --nfp | --nf)
556     # Obsolete; use --without-fp.
557     with_fp=no ;;
558
559   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
560   | --no-cr | --no-c)
561     no_create=yes ;;
562
563   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
564   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
565     no_recursion=yes ;;
566
567   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
568   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
569   | --oldin | --oldi | --old | --ol | --o)
570     ac_prev=oldincludedir ;;
571   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
572   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
573   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
574     oldincludedir="$ac_optarg" ;;
575
576   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
577     ac_prev=prefix ;;
578   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
579     prefix="$ac_optarg" ;;
580
581   -program-prefix | --program-prefix | --program-prefi | --program-pref \
582   | --program-pre | --program-pr | --program-p)
583     ac_prev=program_prefix ;;
584   -program-prefix=* | --program-prefix=* | --program-prefi=* \
585   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
586     program_prefix="$ac_optarg" ;;
587
588   -program-suffix | --program-suffix | --program-suffi | --program-suff \
589   | --program-suf | --program-su | --program-s)
590     ac_prev=program_suffix ;;
591   -program-suffix=* | --program-suffix=* | --program-suffi=* \
592   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
593     program_suffix="$ac_optarg" ;;
594
595   -program-transform-name | --program-transform-name \
596   | --program-transform-nam | --program-transform-na \
597   | --program-transform-n | --program-transform- \
598   | --program-transform | --program-transfor \
599   | --program-transfo | --program-transf \
600   | --program-trans | --program-tran \
601   | --progr-tra | --program-tr | --program-t)
602     ac_prev=program_transform_name ;;
603   -program-transform-name=* | --program-transform-name=* \
604   | --program-transform-nam=* | --program-transform-na=* \
605   | --program-transform-n=* | --program-transform-=* \
606   | --program-transform=* | --program-transfor=* \
607   | --program-transfo=* | --program-transf=* \
608   | --program-trans=* | --program-tran=* \
609   | --progr-tra=* | --program-tr=* | --program-t=*)
610     program_transform_name="$ac_optarg" ;;
611
612   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
613   | -silent | --silent | --silen | --sile | --sil)
614     silent=yes ;;
615
616   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
617     ac_prev=sbindir ;;
618   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
619   | --sbi=* | --sb=*)
620     sbindir="$ac_optarg" ;;
621
622   -sharedstatedir | --sharedstatedir | --sharedstatedi \
623   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
624   | --sharedst | --shareds | --shared | --share | --shar \
625   | --sha | --sh)
626     ac_prev=sharedstatedir ;;
627   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
628   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
629   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
630   | --sha=* | --sh=*)
631     sharedstatedir="$ac_optarg" ;;
632
633   -site | --site | --sit)
634     ac_prev=site ;;
635   -site=* | --site=* | --sit=*)
636     site="$ac_optarg" ;;
637
638   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
639     ac_prev=srcdir ;;
640   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
641     srcdir="$ac_optarg" ;;
642
643   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
644   | --syscon | --sysco | --sysc | --sys | --sy)
645     ac_prev=sysconfdir ;;
646   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
647   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
648     sysconfdir="$ac_optarg" ;;
649
650   -target | --target | --targe | --targ | --tar | --ta | --t)
651     ac_prev=target ;;
652   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
653     target="$ac_optarg" ;;
654
655   -v | -verbose | --verbose | --verbos | --verbo | --verb)
656     verbose=yes ;;
657
658   -version | --version | --versio | --versi | --vers)
659     echo "configure generated by autoconf version 2.13.1"
660     exit 0 ;;
661
662   -with-* | --with-*)
663     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
664     # Reject names that are not valid shell variable names.
665     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
666       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
667     fi
668     ac_package=`echo $ac_package| sed 's/-/_/g'`
669     case "$ac_option" in
670       *=*) ;;
671       *) ac_optarg=yes ;;
672     esac
673     eval "with_${ac_package}='$ac_optarg'" ;;
674
675   -without-* | --without-*)
676     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
677     # Reject names that are not valid shell variable names.
678     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
679       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
680     fi
681     ac_package=`echo $ac_package| sed 's/-/_/g'`
682     eval "with_${ac_package}=no" ;;
683
684   --x)
685     # Obsolete; use --with-x.
686     with_x=yes ;;
687
688   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
689   | --x-incl | --x-inc | --x-in | --x-i)
690     ac_prev=x_includes ;;
691   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
692   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
693     x_includes="$ac_optarg" ;;
694
695   -x-libraries | --x-libraries | --x-librarie | --x-librari \
696   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
697     ac_prev=x_libraries ;;
698   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
699   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
700     x_libraries="$ac_optarg" ;;
701
702   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
703     ;;
704
705   *)
706     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
707       echo "configure: warning: $ac_option: invalid host type" 1>&2
708     fi
709     if test "x$nonopt" != xNONE; then
710       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
711     fi
712     nonopt="$ac_option"
713     ;;
714
715   esac
716 done
717
718 if test -n "$ac_prev"; then
719   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
720 fi
721
722 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
723
724 # File descriptor usage:
725 # 0 standard input
726 # 1 file creation
727 # 2 errors and warnings
728 # 3 some systems may open it to /dev/tty
729 # 4 used on the Kubota Titan
730 # 6 checking for... messages and results
731 # 5 compiler messages saved in config.log
732 if test "$silent" = yes; then
733   exec 6>/dev/null
734 else
735   exec 6>&1
736 fi
737 exec 5>./config.log
738
739 echo "\
740 This file contains any messages produced by compilers while
741 running configure, to aid debugging if configure makes a mistake.
742 " 1>&5
743
744 # Strip out --no-create and --no-recursion so they do not pile up.
745 # Also quote any args containing shell metacharacters.
746 ac_configure_args=
747 for ac_arg
748 do
749   case "$ac_arg" in
750   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
751   | --no-cr | --no-c) ;;
752   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
753   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
754   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
755   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
756   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
757   esac
758 done
759
760 # NLS nuisances.
761 # Only set these to C if already set.  These must not be set unconditionally
762 # because not all systems understand e.g. LANG=C (notably SCO).
763 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
764 # Non-C LC_CTYPE values break the ctype check.
765 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
766 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
767 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
768 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
769
770 # confdefs.h avoids OS command line length limits that DEFS can exceed.
771 rm -rf conftest* confdefs.h
772 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
773 echo > confdefs.h
774
775 # A filename unique to this package, relative to the directory that
776 # configure is in, which we can look for to find out if srcdir is correct.
777 ac_unique_file=build/version.sh
778
779 # Find the source files, if location was not specified.
780 if test -z "$srcdir"; then
781   ac_srcdir_defaulted=yes
782   # Try the directory containing this script, then its parent.
783   ac_prog=$0
784   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
785   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
786   srcdir=$ac_confdir
787   if test ! -r $srcdir/$ac_unique_file; then
788     srcdir=..
789   fi
790 else
791   ac_srcdir_defaulted=no
792 fi
793 if test ! -r $srcdir/$ac_unique_file; then
794   if test "$ac_srcdir_defaulted" = yes; then
795     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
796   else
797     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
798   fi
799 fi
800 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
801
802 # Prefer explicitly selected file to automatically selected ones.
803 if test -z "$CONFIG_SITE"; then
804   if test "x$prefix" != xNONE; then
805     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
806   else
807     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
808   fi
809 fi
810 for ac_site_file in $CONFIG_SITE; do
811   if test -r "$ac_site_file"; then
812     echo "loading site script $ac_site_file"
813     . "$ac_site_file"
814   fi
815 done
816
817
818 ac_ext=c
819 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
820 ac_cpp='$CPP $CPPFLAGS'
821 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
822 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
823 cross_compiling=$ac_cv_prog_cc_cross
824
825 ac_exeext=
826 ac_objext=o
827 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
828   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
829   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
830     ac_n= ac_c='
831 ' ac_t='        '
832   else
833     ac_n=-n ac_c= ac_t=
834   fi
835 else
836   ac_n= ac_c='\c' ac_t=
837 fi
838
839
840 # set unset (borrowed from autoconf 2.49c)
841 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
842   ol_unset=unset
843 else
844   ol_unset=false
845 fi
846 # unset CDPATH
847 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
848
849 ac_aux_dir=
850 for ac_dir in build $srcdir/build; do
851   if test -f $ac_dir/install-sh; then
852     ac_aux_dir=$ac_dir
853     ac_install_sh="$ac_aux_dir/install-sh -c"
854     break
855   elif test -f $ac_dir/install.sh; then
856     ac_aux_dir=$ac_dir
857     ac_install_sh="$ac_aux_dir/install.sh -c"
858     break
859   elif test -f $ac_dir/shtool; then
860     ac_aux_dir=$ac_dir
861     ac_install_sh="$ac_aux_dir/shtool install -c"
862     break
863   fi
864 done
865 if test -z "$ac_aux_dir"; then
866   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
867 fi
868 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
869 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
870 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
871
872 eval `$ac_aux_dir/version.sh`
873 if test -z "$OL_STRING"; then
874         { echo "configure: error: could not determine version" 1>&2; exit 1; }
875 fi
876
877 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
878         ac_cv_shtool="$ac_aux_dir/shtool"
879 else
880         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
881 fi
882
883 SHTOOL="$ac_cv_shtool"
884
885 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
886 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
887
888 OPENLDAP_CVS=""
889 if test -d $ac_aux_dir/CVS; then
890         OPENLDAP_CVS="(from CVS sources) "
891 fi
892
893 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
894
895
896 echo $ac_n "checking host system type""... $ac_c" 1>&6
897 echo "configure:898: checking host system type" >&5
898 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
899
900 # Make sure we can run config.sub.
901   if $ac_config_sub sun4 >/dev/null 2>&1; then :
902     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
903   fi
904
905   ac_cv_host_alias=$host
906   case "$ac_cv_host_alias" in
907   NONE)
908     case $nonopt in
909     NONE)
910       if ac_cv_host_alias=`$ac_config_guess`; then :
911       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
912       fi ;;
913     *) ac_cv_host_alias=$nonopt ;;
914     esac ;;
915   esac
916
917   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
918   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
919   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
920   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
921 else
922   echo $ac_n "(cached) $ac_c" 1>&6
923 fi
924
925 echo "$ac_t""$ac_cv_host" 1>&6
926
927 host=$ac_cv_host
928 host_alias=$ac_cv_host_alias
929 host_cpu=$ac_cv_host_cpu
930 host_vendor=$ac_cv_host_vendor
931 host_os=$ac_cv_host_os
932
933
934
935
936
937 echo $ac_n "checking target system type""... $ac_c" 1>&6
938 echo "configure:939: checking target system type" >&5
939 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
940
941 # Make sure we can run config.sub.
942   if $ac_config_sub sun4 >/dev/null 2>&1; then :
943     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
944   fi
945
946   ac_cv_target_alias=$target
947   case "$ac_cv_target_alias" in
948   NONE)
949     case $nonopt in
950     NONE)
951       ac_cv_target_alias=$host_alias ;;
952
953     *) ac_cv_target_alias=$nonopt ;;
954     esac ;;
955   esac
956
957   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
958   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
959   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
960   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
961 else
962   echo $ac_n "(cached) $ac_c" 1>&6
963 fi
964
965 echo "$ac_t""$ac_cv_target" 1>&6
966
967 target=$ac_cv_target
968 target_alias=$ac_cv_target_alias
969 target_cpu=$ac_cv_target_cpu
970 target_vendor=$ac_cv_target_vendor
971 target_os=$ac_cv_target_os
972
973
974
975
976
977 echo $ac_n "checking build system type""... $ac_c" 1>&6
978 echo "configure:979: checking build system type" >&5
979 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
980
981 # Make sure we can run config.sub.
982   if $ac_config_sub sun4 >/dev/null 2>&1; then :
983     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
984   fi
985
986   ac_cv_build_alias=$build
987   case "$ac_cv_build_alias" in
988   NONE)
989     case $nonopt in
990     NONE)
991       ac_cv_build_alias=$host_alias ;;
992
993     *) ac_cv_build_alias=$nonopt ;;
994     esac ;;
995   esac
996
997   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
998   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
999   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1000   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1001 else
1002   echo $ac_n "(cached) $ac_c" 1>&6
1003 fi
1004
1005 echo "$ac_t""$ac_cv_build" 1>&6
1006
1007 build=$ac_cv_build
1008 build_alias=$ac_cv_build_alias
1009 build_cpu=$ac_cv_build_cpu
1010 build_vendor=$ac_cv_build_vendor
1011 build_os=$ac_cv_build_os
1012
1013
1014
1015
1016
1017 # Do some error checking and defaulting for the host and target type.
1018 # The inputs are:
1019 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1020 #
1021 # The rules are:
1022 # 1. You are not allowed to specify --host, --target, and nonopt at the
1023 #    same time.
1024 # 2. Host defaults to nonopt.
1025 # 3. If nonopt is not specified, then host defaults to the current host,
1026 #    as determined by config.guess.
1027 # 4. Target and build default to nonopt.
1028 # 5. If nonopt is not specified, then target and build default to host.
1029
1030 # The aliases save the names the user supplied, while $host etc.
1031 # will get canonicalized.
1032 case $host---$target---$nonopt in
1033 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1034 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1035 esac
1036
1037 test "$host_alias" != "$target_alias" &&
1038   test "$program_prefix$program_suffix$program_transform_name" = \
1039     NONENONEs,x,x, &&
1040   program_prefix=${target_alias}-
1041
1042
1043 # Find a good install program.  We prefer a C program (faster),
1044 # so one script is as good as another.  But avoid the broken or
1045 # incompatible versions:
1046 # SysV /etc/install, /usr/sbin/install
1047 # SunOS /usr/etc/install
1048 # IRIX /sbin/install
1049 # AIX /bin/install
1050 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1051 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1052 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1053 # ./install, which can be erroneously created by make from ./install.sh.
1054 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1055 echo "configure:1056: checking for a BSD compatible install" >&5
1056 if test -z "$INSTALL"; then
1057 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1058   echo $ac_n "(cached) $ac_c" 1>&6
1059 else
1060     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1061   for ac_dir in $PATH; do
1062     # Account for people who put trailing slashes in PATH elements.
1063     case "$ac_dir/" in
1064     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1065     *)
1066       # OSF1 and SCO ODT 3.0 have their own names for install.
1067       # Don't use installbsd from OSF since it installs stuff as root
1068       # by default.
1069       for ac_prog in ginstall scoinst install; do
1070         if test -f $ac_dir/$ac_prog; then
1071           if test $ac_prog = install &&
1072             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1073             # AIX install.  It has an incompatible calling convention.
1074             :
1075           elif test $ac_prog = install &&
1076             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1077             # program-specific install script used by HP pwplus--don't use.
1078             :
1079           else
1080             ac_cv_path_install="$ac_dir/$ac_prog -c"
1081             break 2
1082           fi
1083         fi
1084       done
1085       ;;
1086     esac
1087   done
1088   IFS="$ac_save_IFS"
1089
1090 fi
1091   if test "${ac_cv_path_install+set}" = set; then
1092     INSTALL="$ac_cv_path_install"
1093   else
1094     # As a last resort, use the slow shell script.  We don't cache a
1095     # path for INSTALL within a source directory, because that will
1096     # break other packages using the cache if that directory is
1097     # removed, or if the path is relative.
1098     INSTALL="$ac_install_sh"
1099   fi
1100 fi
1101 echo "$ac_t""$INSTALL" 1>&6
1102
1103 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1104 # It thinks the first close brace ends the variable substitution.
1105 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1106
1107 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1108
1109 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1110
1111 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1112 echo "configure:1113: checking whether build environment is sane" >&5
1113 # Just in case
1114 sleep 1
1115 echo timestamp > conftestfile
1116 # Do `set' in a subshell so we don't clobber the current shell's
1117 # arguments.  Must try -L first in case configure is actually a
1118 # symlink; some systems play weird games with the mod time of symlinks
1119 # (eg FreeBSD returns the mod time of the symlink's containing
1120 # directory).
1121 if (
1122    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1123    if test "$*" = "X"; then
1124       # -L didn't work.
1125       set X `ls -t $srcdir/configure conftestfile`
1126    fi
1127    if test "$*" != "X $srcdir/configure conftestfile" \
1128       && test "$*" != "X conftestfile $srcdir/configure"; then
1129
1130       # If neither matched, then we have a broken ls.  This can happen
1131       # if, for instance, CONFIG_SHELL is bash and it inherits a
1132       # broken ls alias from the environment.  This has actually
1133       # happened.  Such a system could not be considered "sane".
1134       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1135 alias in your environment" 1>&2; exit 1; }
1136    fi
1137
1138    test "$2" = conftestfile
1139    )
1140 then
1141    # Ok.
1142    :
1143 else
1144    { echo "configure: error: newly created file is older than distributed files!
1145 Check your system clock" 1>&2; exit 1; }
1146 fi
1147 rm -f conftest*
1148 echo "$ac_t""yes" 1>&6
1149 if test "$program_transform_name" = s,x,x,; then
1150   program_transform_name=
1151 else
1152   # Double any \ or $.  echo might interpret backslashes.
1153   cat <<\EOF_SED > conftestsed
1154 s,\\,\\\\,g; s,\$,$$,g
1155 EOF_SED
1156   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1157   rm -f conftestsed
1158 fi
1159 test "$program_prefix" != NONE &&
1160   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1161 # Use a double $ so make ignores it.
1162 test "$program_suffix" != NONE &&
1163   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1164
1165 # sed with no file args requires a program.
1166 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1167
1168 for ac_prog in mawk gawk nawk awk
1169 do
1170 # Extract the first word of "$ac_prog", so it can be a program name with args.
1171 set dummy $ac_prog; ac_word=$2
1172 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1173 echo "configure:1174: checking for $ac_word" >&5
1174 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1175   echo $ac_n "(cached) $ac_c" 1>&6
1176 else
1177   if test -n "$AWK"; then
1178   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1179 else
1180   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1181   ac_dummy="$PATH"
1182   for ac_dir in $ac_dummy; do
1183     test -z "$ac_dir" && ac_dir=.
1184     if test -f $ac_dir/$ac_word; then
1185       ac_cv_prog_AWK="$ac_prog"
1186       break
1187     fi
1188   done
1189   IFS="$ac_save_ifs"
1190 fi
1191 fi
1192 AWK="$ac_cv_prog_AWK"
1193 if test -n "$AWK"; then
1194   echo "$ac_t""$AWK" 1>&6
1195 else
1196   echo "$ac_t""no" 1>&6
1197 fi
1198
1199 test -n "$AWK" && break
1200 done
1201
1202 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1203 echo "configure:1204: checking whether ${MAKE-make} sets \${MAKE}" >&5
1204 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1205 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1206   echo $ac_n "(cached) $ac_c" 1>&6
1207 else
1208   cat > conftestmake <<\EOF
1209 all:
1210         @echo 'ac_maketemp="${MAKE}"'
1211 EOF
1212 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1213 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1214 if test -n "$ac_maketemp"; then
1215   eval ac_cv_prog_make_${ac_make}_set=yes
1216 else
1217   eval ac_cv_prog_make_${ac_make}_set=no
1218 fi
1219 rm -f conftestmake
1220 fi
1221 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1222   echo "$ac_t""yes" 1>&6
1223   SET_MAKE=
1224 else
1225   echo "$ac_t""no" 1>&6
1226   SET_MAKE="MAKE=${MAKE-make}"
1227 fi
1228
1229
1230
1231 PACKAGE=$OL_PACKAGE
1232
1233 VERSION=$OL_VERSION
1234
1235 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1236   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1237 fi
1238
1239
1240
1241 missing_dir=`cd $ac_aux_dir && pwd`
1242 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1243 echo "configure:1244: checking for working aclocal" >&5
1244 # Run test in a subshell; some versions of sh will print an error if
1245 # an executable is not found, even if stderr is redirected.
1246 # Redirect stdin to placate older versions of autoconf.  Sigh.
1247 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1248    ACLOCAL=aclocal
1249    echo "$ac_t""found" 1>&6
1250 else
1251    ACLOCAL="$missing_dir/missing aclocal"
1252    echo "$ac_t""missing" 1>&6
1253 fi
1254
1255 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1256 echo "configure:1257: checking for working autoconf" >&5
1257 # Run test in a subshell; some versions of sh will print an error if
1258 # an executable is not found, even if stderr is redirected.
1259 # Redirect stdin to placate older versions of autoconf.  Sigh.
1260 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1261    AUTOCONF=autoconf
1262    echo "$ac_t""found" 1>&6
1263 else
1264    AUTOCONF="$missing_dir/missing autoconf"
1265    echo "$ac_t""missing" 1>&6
1266 fi
1267
1268 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1269 echo "configure:1270: checking for working automake" >&5
1270 # Run test in a subshell; some versions of sh will print an error if
1271 # an executable is not found, even if stderr is redirected.
1272 # Redirect stdin to placate older versions of autoconf.  Sigh.
1273 if (automake --version) < /dev/null > /dev/null 2>&1; then
1274    AUTOMAKE=automake
1275    echo "$ac_t""found" 1>&6
1276 else
1277    AUTOMAKE="$missing_dir/missing automake"
1278    echo "$ac_t""missing" 1>&6
1279 fi
1280
1281 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1282 echo "configure:1283: checking for working autoheader" >&5
1283 # Run test in a subshell; some versions of sh will print an error if
1284 # an executable is not found, even if stderr is redirected.
1285 # Redirect stdin to placate older versions of autoconf.  Sigh.
1286 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1287    AUTOHEADER=autoheader
1288    echo "$ac_t""found" 1>&6
1289 else
1290    AUTOHEADER="$missing_dir/missing autoheader"
1291    echo "$ac_t""missing" 1>&6
1292 fi
1293
1294 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1295 echo "configure:1296: checking for working makeinfo" >&5
1296 # Run test in a subshell; some versions of sh will print an error if
1297 # an executable is not found, even if stderr is redirected.
1298 # Redirect stdin to placate older versions of autoconf.  Sigh.
1299 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1300    MAKEINFO=makeinfo
1301    echo "$ac_t""found" 1>&6
1302 else
1303    MAKEINFO="$missing_dir/missing makeinfo"
1304    echo "$ac_t""missing" 1>&6
1305 fi
1306
1307 install_sh="$missing_dir/install-sh"
1308 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1309
1310 for ac_prog in gnutar gtar tar
1311 do
1312 # Extract the first word of "$ac_prog", so it can be a program name with args.
1313 set dummy $ac_prog; ac_word=$2
1314 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1315 echo "configure:1316: checking for $ac_word" >&5
1316 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1317   echo $ac_n "(cached) $ac_c" 1>&6
1318 else
1319   if test -n "$AMTAR"; then
1320   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1321 else
1322   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1323   ac_dummy="$PATH"
1324   for ac_dir in $ac_dummy; do
1325     test -z "$ac_dir" && ac_dir=.
1326     if test -f $ac_dir/$ac_word; then
1327       ac_cv_prog_AMTAR="$ac_prog"
1328       break
1329     fi
1330   done
1331   IFS="$ac_save_ifs"
1332 fi
1333 fi
1334 AMTAR="$ac_cv_prog_AMTAR"
1335 if test -n "$AMTAR"; then
1336   echo "$ac_t""$AMTAR" 1>&6
1337 else
1338   echo "$ac_t""no" 1>&6
1339 fi
1340
1341 test -n "$AMTAR" && break
1342 done
1343
1344
1345 AMTARFLAGS=
1346 if test -n "$AMTAR"; then
1347   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1348         AMTARFLAGS=o
1349   fi
1350 fi
1351
1352 cat >> confdefs.h <<EOF
1353 #define OPENLDAP_PACKAGE "$PACKAGE"
1354 EOF
1355
1356 cat >> confdefs.h <<EOF
1357 #define OPENLDAP_VERSION "$VERSION"
1358 EOF
1359
1360
1361 cat >> confdefs.h <<EOF
1362 #define LDAP_VENDOR_VERSION $OL_API_INC
1363 EOF
1364
1365 cat >> confdefs.h <<EOF
1366 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1367 EOF
1368
1369 cat >> confdefs.h <<EOF
1370 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1371 EOF
1372
1373 cat >> confdefs.h <<EOF
1374 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1375 EOF
1376
1377
1378 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1379
1380 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1381
1382 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1383
1384
1385
1386 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1387 echo "configure:1388: checking configure arguments" >&5
1388
1389
1390 top_builddir=`pwd`
1391
1392 ldap_subdir="/openldap"
1393
1394 # Check whether --with-subdir or --without-subdir was given.
1395 if test "${with_subdir+set}" = set; then
1396   withval="$with_subdir"
1397   case "$withval" in
1398         no) ldap_subdir=""
1399                 ;;
1400         yes)
1401                 ;;
1402         /*|\\*)
1403                 ldap_subdir="$withval"
1404                 ;;
1405         *)
1406                 ldap_subdir="/$withval"
1407                 ;;
1408 esac
1409
1410 fi
1411
1412
1413 # OpenLDAP --enable-debug
1414         # Check whether --enable-debug or --disable-debug was given.
1415 if test "${enable_debug+set}" = set; then
1416   enableval="$enable_debug"
1417   
1418         ol_arg=invalid
1419         for ol_val in auto yes no ; do
1420                 if test "$enableval" = "$ol_val" ; then
1421                         ol_arg="$ol_val"
1422                 fi
1423         done
1424         if test "$ol_arg" = "invalid" ; then
1425                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1426         fi
1427         ol_enable_debug="$ol_arg"
1428
1429 else
1430         ol_enable_debug="yes"
1431 fi
1432 # end --enable-debug
1433 # OpenLDAP --enable-dynamic
1434         # Check whether --enable-dynamic or --disable-dynamic was given.
1435 if test "${enable_dynamic+set}" = set; then
1436   enableval="$enable_dynamic"
1437   
1438         ol_arg=invalid
1439         for ol_val in auto yes no ; do
1440                 if test "$enableval" = "$ol_val" ; then
1441                         ol_arg="$ol_val"
1442                 fi
1443         done
1444         if test "$ol_arg" = "invalid" ; then
1445                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1446         fi
1447         ol_enable_dynamic="$ol_arg"
1448
1449 else
1450         ol_enable_dynamic="no"
1451 fi
1452 # end --enable-dynamic
1453 # OpenLDAP --enable-syslog
1454         # Check whether --enable-syslog or --disable-syslog was given.
1455 if test "${enable_syslog+set}" = set; then
1456   enableval="$enable_syslog"
1457   
1458         ol_arg=invalid
1459         for ol_val in auto yes no ; do
1460                 if test "$enableval" = "$ol_val" ; then
1461                         ol_arg="$ol_val"
1462                 fi
1463         done
1464         if test "$ol_arg" = "invalid" ; then
1465                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1466         fi
1467         ol_enable_syslog="$ol_arg"
1468
1469 else
1470         ol_enable_syslog="auto"
1471 fi
1472 # end --enable-syslog
1473 # OpenLDAP --enable-proctitle
1474         # Check whether --enable-proctitle or --disable-proctitle was given.
1475 if test "${enable_proctitle+set}" = set; then
1476   enableval="$enable_proctitle"
1477   
1478         ol_arg=invalid
1479         for ol_val in auto yes no ; do
1480                 if test "$enableval" = "$ol_val" ; then
1481                         ol_arg="$ol_val"
1482                 fi
1483         done
1484         if test "$ol_arg" = "invalid" ; then
1485                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1486         fi
1487         ol_enable_proctitle="$ol_arg"
1488
1489 else
1490         ol_enable_proctitle="yes"
1491 fi
1492 # end --enable-proctitle
1493 ol_enable_referrals=${ol_enable_referrals-no}
1494 ol_enable_kbind=${ol_enable_kbind-no}
1495 # OpenLDAP --enable-ipv6
1496         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1497 if test "${enable_ipv6+set}" = set; then
1498   enableval="$enable_ipv6"
1499   
1500         ol_arg=invalid
1501         for ol_val in auto yes no ; do
1502                 if test "$enableval" = "$ol_val" ; then
1503                         ol_arg="$ol_val"
1504                 fi
1505         done
1506         if test "$ol_arg" = "invalid" ; then
1507                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1508         fi
1509         ol_enable_ipv6="$ol_arg"
1510
1511 else
1512         ol_enable_ipv6="auto"
1513 fi
1514 # end --enable-ipv6
1515 # OpenLDAP --enable-local
1516         # Check whether --enable-local or --disable-local was given.
1517 if test "${enable_local+set}" = set; then
1518   enableval="$enable_local"
1519   
1520         ol_arg=invalid
1521         for ol_val in auto yes no ; do
1522                 if test "$enableval" = "$ol_val" ; then
1523                         ol_arg="$ol_val"
1524                 fi
1525         done
1526         if test "$ol_arg" = "invalid" ; then
1527                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1528         fi
1529         ol_enable_local="$ol_arg"
1530
1531 else
1532         ol_enable_local="auto"
1533 fi
1534 # end --enable-local
1535
1536
1537 # OpenLDAP --with-cyrus_sasl
1538         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1539 if test "${with_cyrus_sasl+set}" = set; then
1540   withval="$with_cyrus_sasl"
1541   
1542         ol_arg=invalid
1543         for ol_val in auto yes no  ; do
1544                 if test "$withval" = "$ol_val" ; then
1545                         ol_arg="$ol_val"
1546                 fi
1547         done
1548         if test "$ol_arg" = "invalid" ; then
1549                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1550         fi
1551         ol_with_cyrus_sasl="$ol_arg"
1552
1553 else
1554         ol_with_cyrus_sasl="auto"
1555 fi
1556 # end --with-cyrus_sasl
1557
1558 # OpenLDAP --with-fetch
1559         # Check whether --with-fetch or --without-fetch was given.
1560 if test "${with_fetch+set}" = set; then
1561   withval="$with_fetch"
1562   
1563         ol_arg=invalid
1564         for ol_val in auto yes no  ; do
1565                 if test "$withval" = "$ol_val" ; then
1566                         ol_arg="$ol_val"
1567                 fi
1568         done
1569         if test "$ol_arg" = "invalid" ; then
1570                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1571         fi
1572         ol_with_fetch="$ol_arg"
1573
1574 else
1575         ol_with_fetch="auto"
1576 fi
1577 # end --with-fetch
1578
1579 ol_with_kerberos=${ol_with_kerberos-auto}
1580 # OpenLDAP --with-threads
1581         # Check whether --with-threads or --without-threads was given.
1582 if test "${with_threads+set}" = set; then
1583   withval="$with_threads"
1584   
1585         ol_arg=invalid
1586         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1587                 if test "$withval" = "$ol_val" ; then
1588                         ol_arg="$ol_val"
1589                 fi
1590         done
1591         if test "$ol_arg" = "invalid" ; then
1592                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1593         fi
1594         ol_with_threads="$ol_arg"
1595
1596 else
1597         ol_with_threads="auto"
1598 fi
1599 # end --with-threads
1600
1601 # OpenLDAP --with-tls
1602         # Check whether --with-tls or --without-tls was given.
1603 if test "${with_tls+set}" = set; then
1604   withval="$with_tls"
1605   
1606         ol_arg=invalid
1607         for ol_val in auto ssleay openssl yes no  ; do
1608                 if test "$withval" = "$ol_val" ; then
1609                         ol_arg="$ol_val"
1610                 fi
1611         done
1612         if test "$ol_arg" = "invalid" ; then
1613                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1614         fi
1615         ol_with_tls="$ol_arg"
1616
1617 else
1618         ol_with_tls="auto"
1619 fi
1620 # end --with-tls
1621
1622 # OpenLDAP --with-yielding_select
1623         # Check whether --with-yielding_select or --without-yielding_select was given.
1624 if test "${with_yielding_select+set}" = set; then
1625   withval="$with_yielding_select"
1626   
1627         ol_arg=invalid
1628         for ol_val in auto yes no manual  ; do
1629                 if test "$withval" = "$ol_val" ; then
1630                         ol_arg="$ol_val"
1631                 fi
1632         done
1633         if test "$ol_arg" = "invalid" ; then
1634                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1635         fi
1636         ol_with_yielding_select="$ol_arg"
1637
1638 else
1639         ol_with_yielding_select="auto"
1640 fi
1641 # end --with-yielding_select
1642
1643
1644
1645 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1646 if test "${with_xxslapdoptions+set}" = set; then
1647   withval="$with_xxslapdoptions"
1648   :
1649 fi
1650
1651 # OpenLDAP --enable-slapd
1652         # Check whether --enable-slapd or --disable-slapd was given.
1653 if test "${enable_slapd+set}" = set; then
1654   enableval="$enable_slapd"
1655   
1656         ol_arg=invalid
1657         for ol_val in auto yes no ; do
1658                 if test "$enableval" = "$ol_val" ; then
1659                         ol_arg="$ol_val"
1660                 fi
1661         done
1662         if test "$ol_arg" = "invalid" ; then
1663                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1664         fi
1665         ol_enable_slapd="$ol_arg"
1666
1667 else
1668         ol_enable_slapd="yes"
1669 fi
1670 # end --enable-slapd
1671 # OpenLDAP --enable-aci
1672         # Check whether --enable-aci or --disable-aci was given.
1673 if test "${enable_aci+set}" = set; then
1674   enableval="$enable_aci"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto yes no ; do
1678                 if test "$enableval" = "$ol_val" ; then
1679                         ol_arg="$ol_val"
1680                 fi
1681         done
1682         if test "$ol_arg" = "invalid" ; then
1683                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1684         fi
1685         ol_enable_aci="$ol_arg"
1686
1687 else
1688         ol_enable_aci="no"
1689 fi
1690 # end --enable-aci
1691 # OpenLDAP --enable-cleartext
1692         # Check whether --enable-cleartext or --disable-cleartext was given.
1693 if test "${enable_cleartext+set}" = set; then
1694   enableval="$enable_cleartext"
1695   
1696         ol_arg=invalid
1697         for ol_val in auto yes no ; do
1698                 if test "$enableval" = "$ol_val" ; then
1699                         ol_arg="$ol_val"
1700                 fi
1701         done
1702         if test "$ol_arg" = "invalid" ; then
1703                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1704         fi
1705         ol_enable_cleartext="$ol_arg"
1706
1707 else
1708         ol_enable_cleartext="yes"
1709 fi
1710 # end --enable-cleartext
1711 # OpenLDAP --enable-crypt
1712         # Check whether --enable-crypt or --disable-crypt was given.
1713 if test "${enable_crypt+set}" = set; then
1714   enableval="$enable_crypt"
1715   
1716         ol_arg=invalid
1717         for ol_val in auto yes no ; do
1718                 if test "$enableval" = "$ol_val" ; then
1719                         ol_arg="$ol_val"
1720                 fi
1721         done
1722         if test "$ol_arg" = "invalid" ; then
1723                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1724         fi
1725         ol_enable_crypt="$ol_arg"
1726
1727 else
1728         ol_enable_crypt="no"
1729 fi
1730 # end --enable-crypt
1731 # OpenLDAP --enable-lmpasswd
1732         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1733 if test "${enable_lmpasswd+set}" = set; then
1734   enableval="$enable_lmpasswd"
1735   
1736         ol_arg=invalid
1737         for ol_val in auto yes no ; do
1738                 if test "$enableval" = "$ol_val" ; then
1739                         ol_arg="$ol_val"
1740                 fi
1741         done
1742         if test "$ol_arg" = "invalid" ; then
1743                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1744         fi
1745         ol_enable_lmpasswd="$ol_arg"
1746
1747 else
1748         ol_enable_lmpasswd="no"
1749 fi
1750 # end --enable-lmpasswd
1751 # OpenLDAP --enable-spasswd
1752         # Check whether --enable-spasswd or --disable-spasswd was given.
1753 if test "${enable_spasswd+set}" = set; then
1754   enableval="$enable_spasswd"
1755   
1756         ol_arg=invalid
1757         for ol_val in auto yes no ; do
1758                 if test "$enableval" = "$ol_val" ; then
1759                         ol_arg="$ol_val"
1760                 fi
1761         done
1762         if test "$ol_arg" = "invalid" ; then
1763                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1764         fi
1765         ol_enable_spasswd="$ol_arg"
1766
1767 else
1768         ol_enable_spasswd="no"
1769 fi
1770 # end --enable-spasswd
1771 # OpenLDAP --enable-modules
1772         # Check whether --enable-modules or --disable-modules was given.
1773 if test "${enable_modules+set}" = set; then
1774   enableval="$enable_modules"
1775   
1776         ol_arg=invalid
1777         for ol_val in auto yes no ; do
1778                 if test "$enableval" = "$ol_val" ; then
1779                         ol_arg="$ol_val"
1780                 fi
1781         done
1782         if test "$ol_arg" = "invalid" ; then
1783                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1784         fi
1785         ol_enable_modules="$ol_arg"
1786
1787 else
1788         ol_enable_modules="no"
1789 fi
1790 # end --enable-modules
1791 ol_enable_multimaster=${ol_enable_multimaster-no}
1792 # OpenLDAP --enable-rewrite
1793         # Check whether --enable-rewrite or --disable-rewrite was given.
1794 if test "${enable_rewrite+set}" = set; then
1795   enableval="$enable_rewrite"
1796   
1797         ol_arg=invalid
1798         for ol_val in auto yes no ; do
1799                 if test "$enableval" = "$ol_val" ; then
1800                         ol_arg="$ol_val"
1801                 fi
1802         done
1803         if test "$ol_arg" = "invalid" ; then
1804                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1805         fi
1806         ol_enable_rewrite="$ol_arg"
1807
1808 else
1809         ol_enable_rewrite="no"
1810 fi
1811 # end --enable-rewrite
1812 # OpenLDAP --enable-rlookups
1813         # Check whether --enable-rlookups or --disable-rlookups was given.
1814 if test "${enable_rlookups+set}" = set; then
1815   enableval="$enable_rlookups"
1816   
1817         ol_arg=invalid
1818         for ol_val in auto yes no ; do
1819                 if test "$enableval" = "$ol_val" ; then
1820                         ol_arg="$ol_val"
1821                 fi
1822         done
1823         if test "$ol_arg" = "invalid" ; then
1824                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1825         fi
1826         ol_enable_rlookups="$ol_arg"
1827
1828 else
1829         ol_enable_rlookups="no"
1830 fi
1831 # end --enable-rlookups
1832 # OpenLDAP --enable-slapi
1833         # Check whether --enable-slapi or --disable-slapi was given.
1834 if test "${enable_slapi+set}" = set; then
1835   enableval="$enable_slapi"
1836   
1837         ol_arg=invalid
1838         for ol_val in auto yes no ; do
1839                 if test "$enableval" = "$ol_val" ; then
1840                         ol_arg="$ol_val"
1841                 fi
1842         done
1843         if test "$ol_arg" = "invalid" ; then
1844                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1845         fi
1846         ol_enable_slapi="$ol_arg"
1847
1848 else
1849         ol_enable_slapi="no"
1850 fi
1851 # end --enable-slapi
1852 # OpenLDAP --enable-slp
1853         # Check whether --enable-slp or --disable-slp was given.
1854 if test "${enable_slp+set}" = set; then
1855   enableval="$enable_slp"
1856   
1857         ol_arg=invalid
1858         for ol_val in auto yes no ; do
1859                 if test "$enableval" = "$ol_val" ; then
1860                         ol_arg="$ol_val"
1861                 fi
1862         done
1863         if test "$ol_arg" = "invalid" ; then
1864                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1865         fi
1866         ol_enable_slp="$ol_arg"
1867
1868 else
1869         ol_enable_slp="no"
1870 fi
1871 # end --enable-slp
1872 # OpenLDAP --enable-wrappers
1873         # Check whether --enable-wrappers or --disable-wrappers was given.
1874 if test "${enable_wrappers+set}" = set; then
1875   enableval="$enable_wrappers"
1876   
1877         ol_arg=invalid
1878         for ol_val in auto yes no ; do
1879                 if test "$enableval" = "$ol_val" ; then
1880                         ol_arg="$ol_val"
1881                 fi
1882         done
1883         if test "$ol_arg" = "invalid" ; then
1884                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1885         fi
1886         ol_enable_wrappers="$ol_arg"
1887
1888 else
1889         ol_enable_wrappers="no"
1890 fi
1891 # end --enable-wrappers
1892
1893
1894 # OpenLDAP --enable-bdb
1895         # Check whether --enable-bdb or --disable-bdb was given.
1896 if test "${enable_bdb+set}" = set; then
1897   enableval="$enable_bdb"
1898   
1899         ol_arg=invalid
1900         for ol_val in auto yes no ; do
1901                 if test "$enableval" = "$ol_val" ; then
1902                         ol_arg="$ol_val"
1903                 fi
1904         done
1905         if test "$ol_arg" = "invalid" ; then
1906                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1907         fi
1908         ol_enable_bdb="$ol_arg"
1909
1910 else
1911         ol_enable_bdb="yes"
1912 fi
1913 # end --enable-bdb
1914 # OpenLDAP --with-bdb_module
1915         # Check whether --with-bdb_module or --without-bdb_module was given.
1916 if test "${with_bdb_module+set}" = set; then
1917   withval="$with_bdb_module"
1918   
1919         ol_arg=invalid
1920         for ol_val in static dynamic ; do
1921                 if test "$withval" = "$ol_val" ; then
1922                         ol_arg="$ol_val"
1923                 fi
1924         done
1925         if test "$ol_arg" = "invalid" ; then
1926                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1927         fi
1928         ol_with_bdb_module="$ol_arg"
1929
1930 else
1931         ol_with_bdb_module="static"
1932 fi
1933 # end --with-bdb_module
1934
1935 # OpenLDAP --enable-dnssrv
1936         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1937 if test "${enable_dnssrv+set}" = set; then
1938   enableval="$enable_dnssrv"
1939   
1940         ol_arg=invalid
1941         for ol_val in auto yes no ; do
1942                 if test "$enableval" = "$ol_val" ; then
1943                         ol_arg="$ol_val"
1944                 fi
1945         done
1946         if test "$ol_arg" = "invalid" ; then
1947                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1948         fi
1949         ol_enable_dnssrv="$ol_arg"
1950
1951 else
1952         ol_enable_dnssrv="no"
1953 fi
1954 # end --enable-dnssrv
1955 # OpenLDAP --with-dnssrv_module
1956         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1957 if test "${with_dnssrv_module+set}" = set; then
1958   withval="$with_dnssrv_module"
1959   
1960         ol_arg=invalid
1961         for ol_val in static dynamic ; do
1962                 if test "$withval" = "$ol_val" ; then
1963                         ol_arg="$ol_val"
1964                 fi
1965         done
1966         if test "$ol_arg" = "invalid" ; then
1967                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1968         fi
1969         ol_with_dnssrv_module="$ol_arg"
1970
1971 else
1972         ol_with_dnssrv_module="static"
1973 fi
1974 # end --with-dnssrv_module
1975
1976 # OpenLDAP --enable-hdb
1977         # Check whether --enable-hdb or --disable-hdb was given.
1978 if test "${enable_hdb+set}" = set; then
1979   enableval="$enable_hdb"
1980   
1981         ol_arg=invalid
1982         for ol_val in auto yes no ; do
1983                 if test "$enableval" = "$ol_val" ; then
1984                         ol_arg="$ol_val"
1985                 fi
1986         done
1987         if test "$ol_arg" = "invalid" ; then
1988                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1989         fi
1990         ol_enable_hdb="$ol_arg"
1991
1992 else
1993         ol_enable_hdb="no"
1994 fi
1995 # end --enable-hdb
1996 # OpenLDAP --with-hdb_module
1997         # Check whether --with-hdb_module or --without-hdb_module was given.
1998 if test "${with_hdb_module+set}" = set; then
1999   withval="$with_hdb_module"
2000   
2001         ol_arg=invalid
2002         for ol_val in static dynamic ; do
2003                 if test "$withval" = "$ol_val" ; then
2004                         ol_arg="$ol_val"
2005                 fi
2006         done
2007         if test "$ol_arg" = "invalid" ; then
2008                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2009         fi
2010         ol_with_hdb_module="$ol_arg"
2011
2012 else
2013         ol_with_hdb_module="static"
2014 fi
2015 # end --with-hdb_module
2016
2017 # OpenLDAP --enable-ldap
2018         # Check whether --enable-ldap or --disable-ldap was given.
2019 if test "${enable_ldap+set}" = set; then
2020   enableval="$enable_ldap"
2021   
2022         ol_arg=invalid
2023         for ol_val in auto yes no ; do
2024                 if test "$enableval" = "$ol_val" ; then
2025                         ol_arg="$ol_val"
2026                 fi
2027         done
2028         if test "$ol_arg" = "invalid" ; then
2029                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2030         fi
2031         ol_enable_ldap="$ol_arg"
2032
2033 else
2034         ol_enable_ldap="no"
2035 fi
2036 # end --enable-ldap
2037 # OpenLDAP --with-ldap_module
2038         # Check whether --with-ldap_module or --without-ldap_module was given.
2039 if test "${with_ldap_module+set}" = set; then
2040   withval="$with_ldap_module"
2041   
2042         ol_arg=invalid
2043         for ol_val in static dynamic ; do
2044                 if test "$withval" = "$ol_val" ; then
2045                         ol_arg="$ol_val"
2046                 fi
2047         done
2048         if test "$ol_arg" = "invalid" ; then
2049                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2050         fi
2051         ol_with_ldap_module="$ol_arg"
2052
2053 else
2054         ol_with_ldap_module="static"
2055 fi
2056 # end --with-ldap_module
2057
2058 # OpenLDAP --enable-ldbm
2059         # Check whether --enable-ldbm or --disable-ldbm was given.
2060 if test "${enable_ldbm+set}" = set; then
2061   enableval="$enable_ldbm"
2062   
2063         ol_arg=invalid
2064         for ol_val in auto yes no ; do
2065                 if test "$enableval" = "$ol_val" ; then
2066                         ol_arg="$ol_val"
2067                 fi
2068         done
2069         if test "$ol_arg" = "invalid" ; then
2070                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2071         fi
2072         ol_enable_ldbm="$ol_arg"
2073
2074 else
2075         ol_enable_ldbm="no"
2076 fi
2077 # end --enable-ldbm
2078 # OpenLDAP --with-ldbm_api
2079         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2080 if test "${with_ldbm_api+set}" = set; then
2081   withval="$with_ldbm_api"
2082   
2083         ol_arg=invalid
2084         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2085                 if test "$withval" = "$ol_val" ; then
2086                         ol_arg="$ol_val"
2087                 fi
2088         done
2089         if test "$ol_arg" = "invalid" ; then
2090                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2091         fi
2092         ol_with_ldbm_api="$ol_arg"
2093
2094 else
2095         ol_with_ldbm_api="auto"
2096 fi
2097 # end --with-ldbm_api
2098
2099 # OpenLDAP --with-ldbm_module
2100         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2101 if test "${with_ldbm_module+set}" = set; then
2102   withval="$with_ldbm_module"
2103   
2104         ol_arg=invalid
2105         for ol_val in static dynamic ; do
2106                 if test "$withval" = "$ol_val" ; then
2107                         ol_arg="$ol_val"
2108                 fi
2109         done
2110         if test "$ol_arg" = "invalid" ; then
2111                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2112         fi
2113         ol_with_ldbm_module="$ol_arg"
2114
2115 else
2116         ol_with_ldbm_module="static"
2117 fi
2118 # end --with-ldbm_module
2119
2120 # OpenLDAP --with-ldbm_type
2121         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2122 if test "${with_ldbm_type+set}" = set; then
2123   withval="$with_ldbm_type"
2124   
2125         ol_arg=invalid
2126         for ol_val in auto btree hash ; do
2127                 if test "$withval" = "$ol_val" ; then
2128                         ol_arg="$ol_val"
2129                 fi
2130         done
2131         if test "$ol_arg" = "invalid" ; then
2132                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2133         fi
2134         ol_with_ldbm_type="$ol_arg"
2135
2136 else
2137         ol_with_ldbm_type="auto"
2138 fi
2139 # end --with-ldbm_type
2140
2141 # OpenLDAP --enable-meta
2142         # Check whether --enable-meta or --disable-meta was given.
2143 if test "${enable_meta+set}" = set; then
2144   enableval="$enable_meta"
2145   
2146         ol_arg=invalid
2147         for ol_val in auto yes no ; do
2148                 if test "$enableval" = "$ol_val" ; then
2149                         ol_arg="$ol_val"
2150                 fi
2151         done
2152         if test "$ol_arg" = "invalid" ; then
2153                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2154         fi
2155         ol_enable_meta="$ol_arg"
2156
2157 else
2158         ol_enable_meta="no"
2159 fi
2160 # end --enable-meta
2161 # OpenLDAP --with-meta_module
2162         # Check whether --with-meta_module or --without-meta_module was given.
2163 if test "${with_meta_module+set}" = set; then
2164   withval="$with_meta_module"
2165   
2166         ol_arg=invalid
2167         for ol_val in static dynamic ; do
2168                 if test "$withval" = "$ol_val" ; then
2169                         ol_arg="$ol_val"
2170                 fi
2171         done
2172         if test "$ol_arg" = "invalid" ; then
2173                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2174         fi
2175         ol_with_meta_module="$ol_arg"
2176
2177 else
2178         ol_with_meta_module="static"
2179 fi
2180 # end --with-meta_module
2181
2182 # OpenLDAP --enable-monitor
2183         # Check whether --enable-monitor or --disable-monitor was given.
2184 if test "${enable_monitor+set}" = set; then
2185   enableval="$enable_monitor"
2186   
2187         ol_arg=invalid
2188         for ol_val in auto yes no ; do
2189                 if test "$enableval" = "$ol_val" ; then
2190                         ol_arg="$ol_val"
2191                 fi
2192         done
2193         if test "$ol_arg" = "invalid" ; then
2194                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2195         fi
2196         ol_enable_monitor="$ol_arg"
2197
2198 else
2199         ol_enable_monitor="yes"
2200 fi
2201 # end --enable-monitor
2202 # OpenLDAP --with-monitor_module
2203         # Check whether --with-monitor_module or --without-monitor_module was given.
2204 if test "${with_monitor_module+set}" = set; then
2205   withval="$with_monitor_module"
2206   
2207         ol_arg=invalid
2208         for ol_val in static dynamic ; do
2209                 if test "$withval" = "$ol_val" ; then
2210                         ol_arg="$ol_val"
2211                 fi
2212         done
2213         if test "$ol_arg" = "invalid" ; then
2214                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2215         fi
2216         ol_with_monitor_module="$ol_arg"
2217
2218 else
2219         ol_with_monitor_module="static"
2220 fi
2221 # end --with-monitor_module
2222
2223 # OpenLDAP --enable-null
2224         # Check whether --enable-null or --disable-null was given.
2225 if test "${enable_null+set}" = set; then
2226   enableval="$enable_null"
2227   
2228         ol_arg=invalid
2229         for ol_val in auto yes no ; do
2230                 if test "$enableval" = "$ol_val" ; then
2231                         ol_arg="$ol_val"
2232                 fi
2233         done
2234         if test "$ol_arg" = "invalid" ; then
2235                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2236         fi
2237         ol_enable_null="$ol_arg"
2238
2239 else
2240         ol_enable_null="no"
2241 fi
2242 # end --enable-null
2243 # OpenLDAP --with-null_module
2244         # Check whether --with-null_module or --without-null_module was given.
2245 if test "${with_null_module+set}" = set; then
2246   withval="$with_null_module"
2247   
2248         ol_arg=invalid
2249         for ol_val in static dynamic ; do
2250                 if test "$withval" = "$ol_val" ; then
2251                         ol_arg="$ol_val"
2252                 fi
2253         done
2254         if test "$ol_arg" = "invalid" ; then
2255                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2256         fi
2257         ol_with_null_module="$ol_arg"
2258
2259 else
2260         ol_with_null_module="static"
2261 fi
2262 # end --with-null_module
2263
2264 # OpenLDAP --enable-passwd
2265         # Check whether --enable-passwd or --disable-passwd was given.
2266 if test "${enable_passwd+set}" = set; then
2267   enableval="$enable_passwd"
2268   
2269         ol_arg=invalid
2270         for ol_val in auto yes no ; do
2271                 if test "$enableval" = "$ol_val" ; then
2272                         ol_arg="$ol_val"
2273                 fi
2274         done
2275         if test "$ol_arg" = "invalid" ; then
2276                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2277         fi
2278         ol_enable_passwd="$ol_arg"
2279
2280 else
2281         ol_enable_passwd="no"
2282 fi
2283 # end --enable-passwd
2284 # OpenLDAP --with-passwd_module
2285         # Check whether --with-passwd_module or --without-passwd_module was given.
2286 if test "${with_passwd_module+set}" = set; then
2287   withval="$with_passwd_module"
2288   
2289         ol_arg=invalid
2290         for ol_val in static dynamic ; do
2291                 if test "$withval" = "$ol_val" ; then
2292                         ol_arg="$ol_val"
2293                 fi
2294         done
2295         if test "$ol_arg" = "invalid" ; then
2296                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2297         fi
2298         ol_with_passwd_module="$ol_arg"
2299
2300 else
2301         ol_with_passwd_module="static"
2302 fi
2303 # end --with-passwd_module
2304
2305 # OpenLDAP --enable-perl
2306         # Check whether --enable-perl or --disable-perl was given.
2307 if test "${enable_perl+set}" = set; then
2308   enableval="$enable_perl"
2309   
2310         ol_arg=invalid
2311         for ol_val in auto yes no ; do
2312                 if test "$enableval" = "$ol_val" ; then
2313                         ol_arg="$ol_val"
2314                 fi
2315         done
2316         if test "$ol_arg" = "invalid" ; then
2317                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2318         fi
2319         ol_enable_perl="$ol_arg"
2320
2321 else
2322         ol_enable_perl="no"
2323 fi
2324 # end --enable-perl
2325 # OpenLDAP --with-perl_module
2326         # Check whether --with-perl_module or --without-perl_module was given.
2327 if test "${with_perl_module+set}" = set; then
2328   withval="$with_perl_module"
2329   
2330         ol_arg=invalid
2331         for ol_val in static dynamic ; do
2332                 if test "$withval" = "$ol_val" ; then
2333                         ol_arg="$ol_val"
2334                 fi
2335         done
2336         if test "$ol_arg" = "invalid" ; then
2337                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2338         fi
2339         ol_with_perl_module="$ol_arg"
2340
2341 else
2342         ol_with_perl_module="static"
2343 fi
2344 # end --with-perl_module
2345
2346 # OpenLDAP --enable-relay
2347         # Check whether --enable-relay or --disable-relay was given.
2348 if test "${enable_relay+set}" = set; then
2349   enableval="$enable_relay"
2350   
2351         ol_arg=invalid
2352         for ol_val in auto yes no ; do
2353                 if test "$enableval" = "$ol_val" ; then
2354                         ol_arg="$ol_val"
2355                 fi
2356         done
2357         if test "$ol_arg" = "invalid" ; then
2358                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2359         fi
2360         ol_enable_relay="$ol_arg"
2361
2362 else
2363         ol_enable_relay="yes"
2364 fi
2365 # end --enable-relay
2366 # OpenLDAP --with-relay_module
2367         # Check whether --with-relay_module or --without-relay_module was given.
2368 if test "${with_relay_module+set}" = set; then
2369   withval="$with_relay_module"
2370   
2371         ol_arg=invalid
2372         for ol_val in static dynamic ; do
2373                 if test "$withval" = "$ol_val" ; then
2374                         ol_arg="$ol_val"
2375                 fi
2376         done
2377         if test "$ol_arg" = "invalid" ; then
2378                 { echo "configure: error: bad value $withval for --with-relay_module" 1>&2; exit 1; }
2379         fi
2380         ol_with_relay_module="$ol_arg"
2381
2382 else
2383         ol_with_relay_module="static"
2384 fi
2385 # end --with-relay_module
2386
2387 # OpenLDAP --enable-shell
2388         # Check whether --enable-shell or --disable-shell was given.
2389 if test "${enable_shell+set}" = set; then
2390   enableval="$enable_shell"
2391   
2392         ol_arg=invalid
2393         for ol_val in auto yes no ; do
2394                 if test "$enableval" = "$ol_val" ; then
2395                         ol_arg="$ol_val"
2396                 fi
2397         done
2398         if test "$ol_arg" = "invalid" ; then
2399                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2400         fi
2401         ol_enable_shell="$ol_arg"
2402
2403 else
2404         ol_enable_shell="no"
2405 fi
2406 # end --enable-shell
2407 # OpenLDAP --with-shell_module
2408         # Check whether --with-shell_module or --without-shell_module was given.
2409 if test "${with_shell_module+set}" = set; then
2410   withval="$with_shell_module"
2411   
2412         ol_arg=invalid
2413         for ol_val in static dynamic ; do
2414                 if test "$withval" = "$ol_val" ; then
2415                         ol_arg="$ol_val"
2416                 fi
2417         done
2418         if test "$ol_arg" = "invalid" ; then
2419                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2420         fi
2421         ol_with_shell_module="$ol_arg"
2422
2423 else
2424         ol_with_shell_module="static"
2425 fi
2426 # end --with-shell_module
2427
2428 # OpenLDAP --enable-sql
2429         # Check whether --enable-sql or --disable-sql was given.
2430 if test "${enable_sql+set}" = set; then
2431   enableval="$enable_sql"
2432   
2433         ol_arg=invalid
2434         for ol_val in auto yes no ; do
2435                 if test "$enableval" = "$ol_val" ; then
2436                         ol_arg="$ol_val"
2437                 fi
2438         done
2439         if test "$ol_arg" = "invalid" ; then
2440                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2441         fi
2442         ol_enable_sql="$ol_arg"
2443
2444 else
2445         ol_enable_sql="no"
2446 fi
2447 # end --enable-sql
2448 # OpenLDAP --with-sql_module
2449         # Check whether --with-sql_module or --without-sql_module was given.
2450 if test "${with_sql_module+set}" = set; then
2451   withval="$with_sql_module"
2452   
2453         ol_arg=invalid
2454         for ol_val in static dynamic ; do
2455                 if test "$withval" = "$ol_val" ; then
2456                         ol_arg="$ol_val"
2457                 fi
2458         done
2459         if test "$ol_arg" = "invalid" ; then
2460                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2461         fi
2462         ol_with_sql_module="$ol_arg"
2463
2464 else
2465         ol_with_sql_module="static"
2466 fi
2467 # end --with-sql_module
2468
2469
2470 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2471 if test "${with_xxslapoverlays+set}" = set; then
2472   withval="$with_xxslapoverlays"
2473   :
2474 fi
2475
2476 # OpenLDAP --enable-chain
2477         # Check whether --enable-chain or --disable-chain was given.
2478 if test "${enable_chain+set}" = set; then
2479   enableval="$enable_chain"
2480   
2481         ol_arg=invalid
2482         for ol_val in no yes mod ; do
2483                 if test "$enableval" = "$ol_val" ; then
2484                         ol_arg="$ol_val"
2485                 fi
2486         done
2487         if test "$ol_arg" = "invalid" ; then
2488                 { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; }
2489         fi
2490         ol_enable_chain="$ol_arg"
2491
2492 else
2493         ol_enable_chain="no"
2494 fi
2495 # end --enable-chain
2496
2497 # OpenLDAP --enable-denyop
2498         # Check whether --enable-denyop or --disable-denyop was given.
2499 if test "${enable_denyop+set}" = set; then
2500   enableval="$enable_denyop"
2501   
2502         ol_arg=invalid
2503         for ol_val in no yes mod ; do
2504                 if test "$enableval" = "$ol_val" ; then
2505                         ol_arg="$ol_val"
2506                 fi
2507         done
2508         if test "$ol_arg" = "invalid" ; then
2509                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2510         fi
2511         ol_enable_denyop="$ol_arg"
2512
2513 else
2514         ol_enable_denyop="no"
2515 fi
2516 # end --enable-denyop
2517
2518 # OpenLDAP --enable-dyngroup
2519         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2520 if test "${enable_dyngroup+set}" = set; then
2521   enableval="$enable_dyngroup"
2522   
2523         ol_arg=invalid
2524         for ol_val in no yes mod ; do
2525                 if test "$enableval" = "$ol_val" ; then
2526                         ol_arg="$ol_val"
2527                 fi
2528         done
2529         if test "$ol_arg" = "invalid" ; then
2530                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2531         fi
2532         ol_enable_dyngroup="$ol_arg"
2533
2534 else
2535         ol_enable_dyngroup="no"
2536 fi
2537 # end --enable-dyngroup
2538
2539 # OpenLDAP --enable-ppolicy
2540         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2541 if test "${enable_ppolicy+set}" = set; then
2542   enableval="$enable_ppolicy"
2543   
2544         ol_arg=invalid
2545         for ol_val in no yes mod ; do
2546                 if test "$enableval" = "$ol_val" ; then
2547                         ol_arg="$ol_val"
2548                 fi
2549         done
2550         if test "$ol_arg" = "invalid" ; then
2551                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2552         fi
2553         ol_enable_ppolicy="$ol_arg"
2554
2555 else
2556         ol_enable_ppolicy="no"
2557 fi
2558 # end --enable-ppolicy
2559
2560 # OpenLDAP --enable-proxycache
2561         # Check whether --enable-proxycache or --disable-proxycache was given.
2562 if test "${enable_proxycache+set}" = set; then
2563   enableval="$enable_proxycache"
2564   
2565         ol_arg=invalid
2566         for ol_val in no yes mod ; do
2567                 if test "$enableval" = "$ol_val" ; then
2568                         ol_arg="$ol_val"
2569                 fi
2570         done
2571         if test "$ol_arg" = "invalid" ; then
2572                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2573         fi
2574         ol_enable_proxycache="$ol_arg"
2575
2576 else
2577         ol_enable_proxycache="no"
2578 fi
2579 # end --enable-proxycache
2580
2581 # OpenLDAP --enable-rwm
2582         # Check whether --enable-rwm or --disable-rwm was given.
2583 if test "${enable_rwm+set}" = set; then
2584   enableval="$enable_rwm"
2585   
2586         ol_arg=invalid
2587         for ol_val in no yes mod ; do
2588                 if test "$enableval" = "$ol_val" ; then
2589                         ol_arg="$ol_val"
2590                 fi
2591         done
2592         if test "$ol_arg" = "invalid" ; then
2593                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2594         fi
2595         ol_enable_rwm="$ol_arg"
2596
2597 else
2598         ol_enable_rwm="no"
2599 fi
2600 # end --enable-rwm
2601
2602
2603 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2604 if test "${with_xxslurpdoptions+set}" = set; then
2605   withval="$with_xxslurpdoptions"
2606   :
2607 fi
2608
2609 # OpenLDAP --enable-slurpd
2610         # Check whether --enable-slurpd or --disable-slurpd was given.
2611 if test "${enable_slurpd+set}" = set; then
2612   enableval="$enable_slurpd"
2613   
2614         ol_arg=invalid
2615         for ol_val in auto yes no ; do
2616                 if test "$enableval" = "$ol_val" ; then
2617                         ol_arg="$ol_val"
2618                 fi
2619         done
2620         if test "$ol_arg" = "invalid" ; then
2621                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2622         fi
2623         ol_enable_slurpd="$ol_arg"
2624
2625 else
2626         ol_enable_slurpd="auto"
2627 fi
2628 # end --enable-slurpd
2629
2630 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2631 if test "${with_xxliboptions+set}" = set; then
2632   withval="$with_xxliboptions"
2633   :
2634 fi
2635
2636 # Check whether --enable-static or --disable-static was given.
2637 if test "${enable_static+set}" = set; then
2638   enableval="$enable_static"
2639   p=${PACKAGE-default}
2640 case $enableval in
2641 yes) enable_static=yes ;;
2642 no) enable_static=no ;;
2643 *)
2644   enable_static=no
2645   # Look at the argument we got.  We use all the common list separators.
2646   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2647   for pkg in $enableval; do
2648     if test "X$pkg" = "X$p"; then
2649       enable_static=yes
2650     fi
2651   done
2652   IFS="$ac_save_ifs"
2653   ;;
2654 esac
2655 else
2656   enable_static=yes
2657 fi
2658
2659 # Check whether --enable-shared or --disable-shared was given.
2660 if test "${enable_shared+set}" = set; then
2661   enableval="$enable_shared"
2662   p=${PACKAGE-default}
2663 case $enableval in
2664 yes) enable_shared=yes ;;
2665 no) enable_shared=no ;;
2666 *)
2667   enable_shared=no
2668   # Look at the argument we got.  We use all the common list separators.
2669   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2670   for pkg in $enableval; do
2671     if test "X$pkg" = "X$p"; then
2672       enable_shared=yes
2673     fi
2674   done
2675   IFS="$ac_save_ifs"
2676   ;;
2677 esac
2678 else
2679   enable_shared=yes
2680 fi
2681
2682
2683
2684 # validate options
2685 if test $ol_enable_slapd = no ; then
2686                 if test $ol_enable_slapi = yes ; then
2687                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2688         fi
2689         if test $ol_enable_bdb = yes ; then
2690                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2691         fi
2692         if test $ol_enable_dnssrv = yes ; then
2693                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2694         fi
2695         if test $ol_enable_hdb = yes ; then
2696                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2697         fi
2698         if test $ol_enable_ldap = yes ; then
2699                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2700         fi
2701         if test $ol_enable_ldbm = yes ; then
2702                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2703         fi
2704         if test $ol_enable_meta = yes ; then
2705                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2706         fi
2707         if test $ol_enable_monitor = yes ; then
2708                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2709         fi
2710         if test $ol_enable_null = yes ; then
2711                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2712         fi
2713         if test $ol_enable_passwd = yes ; then
2714                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2715         fi
2716         if test $ol_enable_perl = yes ; then
2717                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2718         fi
2719         if test $ol_enable_relay = yes ; then
2720                 echo "configure: warning: slapd disabled, ignoring --enable-relay argument" 1>&2
2721         fi
2722         if test $ol_enable_shell = yes ; then
2723                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2724         fi
2725         if test $ol_enable_sql = yes ; then
2726                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2727         fi
2728         if test $ol_enable_modules = yes ; then
2729                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2730         fi
2731         if test $ol_enable_multimaster = yes ; then
2732                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2733         fi
2734         if test $ol_enable_wrappers = yes ; then
2735                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2736         fi
2737         if test $ol_enable_rlookups = yes ; then
2738                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2739         fi
2740         if test $ol_enable_aci = yes ; then
2741                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2742         fi
2743         if test $ol_with_ldbm_api != auto ; then
2744                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2745         fi
2746         if test $ol_with_ldbm_type != auto ; then
2747                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2748         fi
2749         if test $ol_with_bdb_module != static ; then
2750                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2751         fi
2752         if test $ol_with_dnssrv_module != static ; then
2753                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2754         fi
2755         if test $ol_with_hdb_module != static ; then
2756                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2757         fi
2758         if test $ol_with_ldap_module != static ; then
2759                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2760         fi
2761         if test $ol_with_ldbm_module != static ; then
2762                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2763         fi
2764         if test $ol_with_meta_module != static ; then
2765                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2766         fi
2767         if test $ol_with_monitor_module != static ; then
2768                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2769         fi
2770         if test $ol_with_null_module != static ; then
2771                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2772         fi
2773         if test $ol_with_passwd_module != static ; then
2774                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2775         fi
2776         if test $ol_with_perl_module != static ; then
2777                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2778         fi
2779         if test $ol_with_relay_module != static ; then
2780                 echo "configure: warning: slapd disabled, ignoring --with-relay-module argument" 1>&2
2781         fi
2782         if test $ol_with_shell_module != static ; then
2783                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2784         fi
2785         if test $ol_with_sql_module != static ; then
2786                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2787         fi
2788         if test $ol_enable_slurpd = yes ; then
2789                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2790         fi
2791         if test $ol_enable_rewrite = yes ; then
2792                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2793         fi
2794                 if test $ol_with_chain != no ; then
2795                 echo "configure: warning: slapd disabled, ignoring --with-chain argument" 1>&2
2796         fi
2797         if test $ol_with_denyop != no ; then
2798                 echo "configure: warning: slapd disabled, ignoring --with-denyop argument" 1>&2
2799         fi
2800         if test $ol_with_dyngroup != no ; then
2801                 echo "configure: warning: slapd disabled, ignoring --with-dyngroup argument" 1>&2
2802         fi
2803         if test $ol_with_ppolicy != no ; then
2804                 echo "configure: warning: slapd disabled, ignoring --with-ppolicy argument" 1>&2
2805         fi
2806         if test $ol_with_proxycache != no ; then
2807                 echo "configure: warning: slapd disabled, ignoring --with-proxycache argument" 1>&2
2808         fi
2809         if test $ol_with_rwm != no ; then
2810                 echo "configure: warning: slapd disabled, ignoring --with-rwm argument" 1>&2
2811         fi
2812
2813         # force settings to no
2814         ol_enable_slapi=no
2815         ol_enable_bdb=no
2816         ol_enable_dnssrv=no
2817         ol_enable_hdb=no
2818         ol_enable_ldap=no
2819         ol_enable_ldbm=no
2820         ol_enable_meta=no
2821         ol_enable_monitor=no
2822         ol_enable_null=no
2823         ol_enable_passwd=no
2824         ol_enable_perl=no
2825         ol_enable_relay=no
2826         ol_enable_shell=no
2827         ol_enable_sql=no
2828
2829         ol_enable_modules=no
2830         ol_enable_multimaster=no
2831         ol_enable_rlookups=no
2832         ol_enable_aci=no
2833         ol_enable_wrappers=no
2834
2835         ol_with_ldbm_api=no
2836         ol_with_ldbm_type=no
2837
2838         ol_with_bdb_module=static
2839         ol_with_dnssrv_module=static
2840         ol_with_hdb_module=static
2841         ol_with_ldap_module=static
2842         ol_with_ldbm_module=static
2843         ol_with_meta_module=static
2844         ol_with_monitor_module=static
2845         ol_with_null_module=static
2846         ol_with_passwd_module=static
2847         ol_with_perl_module=static
2848         ol_with_relay_module=static
2849         ol_with_shell_module=static
2850         ol_with_sql_module=static
2851
2852         ol_enable_slurpd=no
2853
2854         ol_enable_rewrite=no
2855
2856         ol_enable_chain=no
2857         ol_enable_denyop=no
2858         ol_enable_dyngroup=no
2859         ol_enable_ppolicy=no
2860         ol_enable_proxycache=no
2861         ol_enable_rwm=no
2862
2863 elif test $ol_enable_ldbm = no ; then
2864         
2865         if test $ol_with_ldbm_api != auto ; then
2866                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2867         fi
2868
2869         if test $ol_with_ldbm_type != auto ; then
2870                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2871         fi
2872
2873         if test $ol_with_ldbm_module != static ; then
2874                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2875         fi
2876
2877         if test $ol_enable_modules != yes -a \
2878                 $ol_enable_bdb = no -a \
2879                 $ol_enable_dnssrv = no -a \
2880                 $ol_enable_hdb = no -a \
2881                 $ol_enable_ldap = no -a \
2882                 $ol_enable_meta = no -a \
2883                 $ol_enable_monitor = no -a \
2884                 $ol_enable_null = no -a \
2885                 $ol_enable_passwd = no -a \
2886                 $ol_enable_perl = no -a \
2887                 $ol_enable_relay = no -a \
2888                 $ol_enable_shell = no -a \
2889                 $ol_enable_sql = no ; then
2890
2891                 if test $ol_enable_slapd = yes ; then
2892                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2893                 else
2894                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2895                         ol_enable_slapd=no
2896                 fi
2897         fi
2898
2899         ol_with_ldbm_api=no
2900         ol_with_ldbm_type=no
2901         ol_with_ldbm_module=static
2902
2903         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2904                 ol_with_ldbm_api=berkeley
2905         fi
2906
2907 else
2908                 if test $ol_with_ldbm_api = gdbm -a \
2909                 $ol_with_ldbm_type = btree ; then
2910                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2911         fi
2912         if test $ol_with_ldbm_api = mdbm -a \
2913                 $ol_with_ldbm_type = btree ; then
2914                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2915         fi
2916         if test $ol_with_ldbm_api = ndbm -a \
2917                 $ol_with_ldbm_type = btree ; then
2918                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2919         fi
2920
2921         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2922                 if test $ol_with_ldbm_api = auto ; then
2923                         ol_with_ldbm_api=berkeley
2924                 elif test $ol_with_ldbm_api != berkeley ; then
2925                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2926                 fi
2927
2928         elif test $ol_enable_bdb = auto ; then
2929                 if test $ol_with_ldbm_api != berkeley \
2930                         -o $ol_with_ldbm_api != auto ; then
2931                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2932                         ol_enable_bdb=no
2933                 fi
2934         fi
2935 fi
2936
2937 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2938         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2939 fi
2940
2941 if test $ol_enable_slurpd = yes ; then
2942                 if test $ol_with_threads = no ; then
2943                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2944         fi
2945 fi
2946
2947 if test $ol_enable_lmpasswd = yes ; then
2948         if test $ol_with_tls = no ; then
2949                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2950         fi
2951 fi
2952
2953 if test $ol_enable_kbind = yes ; then
2954         if test $ol_with_kerberos = no ; then
2955                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2956         elif test $ol_with_kerberos = auto ; then
2957                 ol_with_kerberos=yes
2958         fi
2959
2960 elif test $ol_enable_kbind = no ; then
2961         if test $ol_with_kerberos = auto ; then
2962                 ol_with_kerberos=no
2963         elif test $ol_with_kerberos != no ; then
2964                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2965                 ol_with_kerberos=no
2966         fi
2967 fi
2968
2969 if test $ol_enable_spasswd = yes ; then
2970         if test $ol_with_cyrus_sasl = no ; then
2971                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2972         fi
2973         ol_with_cyrus_sasl=yes
2974 fi
2975
2976 echo "$ac_t""done" 1>&6
2977
2978 LDAP_LIBS=
2979 LDBM_LIBS=
2980 LTHREAD_LIBS=
2981 LUTIL_LIBS=
2982
2983 SLAPD_LIBS=
2984 SLURPD_LIBS=
2985
2986 BUILD_SLAPD=no
2987 BUILD_SLURPD=no
2988
2989 BUILD_THREAD=no
2990
2991 BUILD_SLAPI=no
2992 SLAPD_SLAPI_DEPEND=
2993
2994 BUILD_BDB=no
2995 BUILD_DNSSRV=no
2996 BUILD_HDB=no
2997 BUILD_LDAP=no
2998 BUILD_LDBM=no
2999 BUILD_META=no
3000 BUILD_MONITOR=no
3001 BUILD_NULL=no
3002 BUILD_PASSWD=no
3003 BUILD_PERL=no
3004 BUILD_RELAY=no
3005 BUILD_SHELL=no
3006 BUILD_SQL=no
3007
3008 BUILD_BDB_DYNAMIC=static
3009 BUILD_DNSSRV_DYNAMIC=static
3010 BUILD_HDB_DYNAMIC=static
3011 BUILD_LDAP_DYNAMIC=static
3012 BUILD_LDBM_DYNAMIC=static
3013 BUILD_META_DYNAMIC=static
3014 BUILD_MONITOR_DYNAMIC=static
3015 BUILD_NULL_DYNAMIC=static
3016 BUILD_PASSWD_DYNAMIC=static
3017 BUILD_PERL_DYNAMIC=static
3018 BUILD_RELAY_DYNAMIC=static
3019 BUILD_SHELL_DYNAMIC=static
3020 BUILD_SQL_DYNAMIC=static
3021
3022 BUILD_CHAIN=no
3023 BUILD_DENYOP=no
3024 BUILD_DYNGROUP=no
3025 BUILD_PPOLICY=no
3026 BUILD_PROXYCACHE=no
3027 BUILD_RWM=no
3028
3029 SLAPD_DYNAMIC_OVERLAYS=
3030
3031 SLAPD_MODULES_LDFLAGS=
3032 SLAPD_MODULES_CPPFLAGS=
3033
3034 SLAPD_STATIC_BACKENDS=
3035 SLAPD_DYNAMIC_BACKENDS=
3036
3037 SLAPD_PERL_LDFLAGS=
3038 MOD_PERL_LDFLAGS=
3039 PERL_CPPFLAGS=
3040
3041 SLAPD_SQL_LDFLAGS=
3042 SLAPD_SQL_LIBS=
3043 SLAPD_SQL_INCLUDES=
3044
3045 KRB4_LIBS=
3046 KRB5_LIBS=
3047 SASL_LIBS=
3048 TLS_LIBS=
3049 MODULES_LIBS=
3050 SLAPI_LIBS=
3051 LIBSLAPI=
3052 LIBSLAPITOOLS=
3053 AUTH_LIBS=
3054
3055 SLAPD_SLP_LIBS=
3056
3057
3058 # Find a good install program.  We prefer a C program (faster),
3059 # so one script is as good as another.  But avoid the broken or
3060 # incompatible versions:
3061 # SysV /etc/install, /usr/sbin/install
3062 # SunOS /usr/etc/install
3063 # IRIX /sbin/install
3064 # AIX /bin/install
3065 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3066 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3067 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3068 # ./install, which can be erroneously created by make from ./install.sh.
3069 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3070 echo "configure:3071: checking for a BSD compatible install" >&5
3071 if test -z "$INSTALL"; then
3072 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
3073   echo $ac_n "(cached) $ac_c" 1>&6
3074 else
3075     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
3076   for ac_dir in $PATH; do
3077     # Account for people who put trailing slashes in PATH elements.
3078     case "$ac_dir/" in
3079     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3080     *)
3081       # OSF1 and SCO ODT 3.0 have their own names for install.
3082       # Don't use installbsd from OSF since it installs stuff as root
3083       # by default.
3084       for ac_prog in ginstall scoinst install; do
3085         if test -f $ac_dir/$ac_prog; then
3086           if test $ac_prog = install &&
3087             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3088             # AIX install.  It has an incompatible calling convention.
3089             :
3090           elif test $ac_prog = install &&
3091             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
3092             # program-specific install script used by HP pwplus--don't use.
3093             :
3094           else
3095             ac_cv_path_install="$ac_dir/$ac_prog -c"
3096             break 2
3097           fi
3098         fi
3099       done
3100       ;;
3101     esac
3102   done
3103   IFS="$ac_save_IFS"
3104
3105 fi
3106   if test "${ac_cv_path_install+set}" = set; then
3107     INSTALL="$ac_cv_path_install"
3108   else
3109     # As a last resort, use the slow shell script.  We don't cache a
3110     # path for INSTALL within a source directory, because that will
3111     # break other packages using the cache if that directory is
3112     # removed, or if the path is relative.
3113     INSTALL="$ac_install_sh"
3114   fi
3115 fi
3116 echo "$ac_t""$INSTALL" 1>&6
3117
3118 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3119 # It thinks the first close brace ends the variable substitution.
3120 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3121
3122 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3123
3124 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3125
3126
3127 cat >> confdefs.h <<\EOF
3128 #define HAVE_MKVERSION 1
3129 EOF
3130
3131
3132
3133
3134 ol_aix_threads=no
3135 case "$target" in
3136 *-*-aix*)       if test -z "$CC" ; then
3137                 case "$ol_with_threads" in
3138                 auto | yes |  posix) ol_aix_threads=yes ;;
3139                 esac
3140         fi
3141 ;;
3142 esac
3143
3144 if test $ol_aix_threads = yes ; then
3145         if test -z "${CC}" ; then
3146                 for ac_prog in cc_r xlc_r cc
3147 do
3148 # Extract the first word of "$ac_prog", so it can be a program name with args.
3149 set dummy $ac_prog; ac_word=$2
3150 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3151 echo "configure:3152: checking for $ac_word" >&5
3152 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3153   echo $ac_n "(cached) $ac_c" 1>&6
3154 else
3155   if test -n "$CC"; then
3156   ac_cv_prog_CC="$CC" # Let the user override the test.
3157 else
3158   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3159   ac_dummy="$PATH"
3160   for ac_dir in $ac_dummy; do
3161     test -z "$ac_dir" && ac_dir=.
3162     if test -f $ac_dir/$ac_word; then
3163       ac_cv_prog_CC="$ac_prog"
3164       break
3165     fi
3166   done
3167   IFS="$ac_save_ifs"
3168 fi
3169 fi
3170 CC="$ac_cv_prog_CC"
3171 if test -n "$CC"; then
3172   echo "$ac_t""$CC" 1>&6
3173 else
3174   echo "$ac_t""no" 1>&6
3175 fi
3176
3177 test -n "$CC" && break
3178 done
3179
3180
3181                 if test "$CC" = cc ; then
3182                                                 if test $ol_with_threads != auto ; then
3183                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3184                         else
3185                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3186                         fi
3187                         ol_with_threads=no
3188                 fi
3189         fi
3190
3191         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3192                 ol_with_threads=posix
3193                 ol_cv_pthread_create=yes
3194         fi
3195 fi
3196
3197 if test -z "${CC}"; then
3198         for ac_prog in cc gcc
3199 do
3200 # Extract the first word of "$ac_prog", so it can be a program name with args.
3201 set dummy $ac_prog; ac_word=$2
3202 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3203 echo "configure:3204: checking for $ac_word" >&5
3204 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3205   echo $ac_n "(cached) $ac_c" 1>&6
3206 else
3207   if test -n "$CC"; then
3208   ac_cv_prog_CC="$CC" # Let the user override the test.
3209 else
3210   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3211   ac_dummy="$PATH"
3212   for ac_dir in $ac_dummy; do
3213     test -z "$ac_dir" && ac_dir=.
3214     if test -f $ac_dir/$ac_word; then
3215       ac_cv_prog_CC="$ac_prog"
3216       break
3217     fi
3218   done
3219   IFS="$ac_save_ifs"
3220 fi
3221 fi
3222 CC="$ac_cv_prog_CC"
3223 if test -n "$CC"; then
3224   echo "$ac_t""$CC" 1>&6
3225 else
3226   echo "$ac_t""no" 1>&6
3227 fi
3228
3229 test -n "$CC" && break
3230 done
3231 test -n "$CC" || CC="missing"
3232
3233
3234         if test "${CC}" = "missing" ; then
3235                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3236         fi
3237 fi
3238
3239 if test -z "${AR}"; then
3240         for ac_prog in ar gar
3241 do
3242 # Extract the first word of "$ac_prog", so it can be a program name with args.
3243 set dummy $ac_prog; ac_word=$2
3244 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3245 echo "configure:3246: checking for $ac_word" >&5
3246 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3247   echo $ac_n "(cached) $ac_c" 1>&6
3248 else
3249   if test -n "$AR"; then
3250   ac_cv_prog_AR="$AR" # Let the user override the test.
3251 else
3252   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3253   ac_dummy="$PATH"
3254   for ac_dir in $ac_dummy; do
3255     test -z "$ac_dir" && ac_dir=.
3256     if test -f $ac_dir/$ac_word; then
3257       ac_cv_prog_AR="$ac_prog"
3258       break
3259     fi
3260   done
3261   IFS="$ac_save_ifs"
3262 fi
3263 fi
3264 AR="$ac_cv_prog_AR"
3265 if test -n "$AR"; then
3266   echo "$ac_t""$AR" 1>&6
3267 else
3268   echo "$ac_t""no" 1>&6
3269 fi
3270
3271 test -n "$AR" && break
3272 done
3273 test -n "$AR" || AR="missing"
3274
3275
3276         if test "${AR}" = "missing" ; then
3277                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3278         fi
3279 fi
3280
3281
3282
3283 # Find the correct PATH separator.  Usually this is `:', but
3284 # DJGPP uses `;' like DOS.
3285 if test "X${PATH_SEPARATOR+set}" != Xset; then
3286   UNAME=${UNAME-`uname 2>/dev/null`}
3287   case X$UNAME in
3288     *-DOS) lt_cv_sys_path_separator=';' ;;
3289     *)     lt_cv_sys_path_separator=':' ;;
3290   esac
3291   PATH_SEPARATOR=$lt_cv_sys_path_separator
3292 fi
3293
3294 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3295 echo "configure:3296: checking for Cygwin environment" >&5
3296 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3297   echo $ac_n "(cached) $ac_c" 1>&6
3298 else
3299   cat > conftest.$ac_ext <<EOF
3300 #line 3301 "configure"
3301 #include "confdefs.h"
3302
3303 int main() {
3304
3305 #ifndef __CYGWIN__
3306 #define __CYGWIN__ __CYGWIN32__
3307 #endif
3308 return __CYGWIN__;
3309 ; return 0; }
3310 EOF
3311 if { (eval echo configure:3312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3312   rm -rf conftest*
3313   ac_cv_cygwin=yes
3314 else
3315   echo "configure: failed program was:" >&5
3316   cat conftest.$ac_ext >&5
3317   rm -rf conftest*
3318   ac_cv_cygwin=no
3319 fi
3320 rm -f conftest*
3321 fi
3322
3323 echo "$ac_t""$ac_cv_cygwin" 1>&6
3324 CYGWIN=
3325 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3326 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3327 echo "configure:3328: checking for mingw32 environment" >&5
3328 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3329   echo $ac_n "(cached) $ac_c" 1>&6
3330 else
3331   cat > conftest.$ac_ext <<EOF
3332 #line 3333 "configure"
3333 #include "confdefs.h"
3334
3335 int main() {
3336 return __MINGW32__;
3337 ; return 0; }
3338 EOF
3339 if { (eval echo configure:3340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3340   rm -rf conftest*
3341   ac_cv_mingw32=yes
3342 else
3343   echo "configure: failed program was:" >&5
3344   cat conftest.$ac_ext >&5
3345   rm -rf conftest*
3346   ac_cv_mingw32=no
3347 fi
3348 rm -f conftest*
3349 fi
3350
3351 echo "$ac_t""$ac_cv_mingw32" 1>&6
3352 MINGW32=
3353 test "$ac_cv_mingw32" = yes && MINGW32=yes
3354 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3355 echo "configure:3356: checking for EMX OS/2 environment" >&5
3356 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3357   echo $ac_n "(cached) $ac_c" 1>&6
3358 else
3359   cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3362
3363 int main() {
3364 return __EMX__;
3365 ; return 0; }
3366 EOF
3367 if { (eval echo configure:3368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3368   rm -rf conftest*
3369   ac_cv_emxos2=yes
3370 else
3371   echo "configure: failed program was:" >&5
3372   cat conftest.$ac_ext >&5
3373   rm -rf conftest*
3374   ac_cv_emxos2=no
3375 fi
3376 rm -f conftest*
3377 fi
3378
3379 echo "$ac_t""$ac_cv_emxos2" 1>&6
3380 EMXOS2=
3381 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3382 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3383 echo "configure:3384: checking how to run the C preprocessor" >&5
3384 # On Suns, sometimes $CPP names a directory.
3385 if test -n "$CPP" && test -d "$CPP"; then
3386   CPP=
3387 fi
3388 if test -z "$CPP"; then
3389 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3390   echo $ac_n "(cached) $ac_c" 1>&6
3391 else
3392     # This must be in double quotes, not single quotes, because CPP may get
3393   # substituted into the Makefile and "${CC-cc}" will confuse make.
3394   CPP="${CC-cc} -E"
3395   # On the NeXT, cc -E runs the code through the compiler's parser,
3396   # not just through cpp.
3397   cat > conftest.$ac_ext <<EOF
3398 #line 3399 "configure"
3399 #include "confdefs.h"
3400 #include <assert.h>
3401 Syntax Error
3402 EOF
3403 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3404 { (eval echo configure:3405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3405 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3406 if test -z "$ac_err"; then
3407   :
3408 else
3409   echo "$ac_err" >&5
3410   echo "configure: failed program was:" >&5
3411   cat conftest.$ac_ext >&5
3412   rm -rf conftest*
3413   CPP="${CC-cc} -E -traditional-cpp"
3414   cat > conftest.$ac_ext <<EOF
3415 #line 3416 "configure"
3416 #include "confdefs.h"
3417 #include <assert.h>
3418 Syntax Error
3419 EOF
3420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3421 { (eval echo configure:3422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3423 if test -z "$ac_err"; then
3424   :
3425 else
3426   echo "$ac_err" >&5
3427   echo "configure: failed program was:" >&5
3428   cat conftest.$ac_ext >&5
3429   rm -rf conftest*
3430   CPP="${CC-cc} -nologo -E"
3431   cat > conftest.$ac_ext <<EOF
3432 #line 3433 "configure"
3433 #include "confdefs.h"
3434 #include <assert.h>
3435 Syntax Error
3436 EOF
3437 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3438 { (eval echo configure:3439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3439 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3440 if test -z "$ac_err"; then
3441   :
3442 else
3443   echo "$ac_err" >&5
3444   echo "configure: failed program was:" >&5
3445   cat conftest.$ac_ext >&5
3446   rm -rf conftest*
3447   CPP=/lib/cpp
3448 fi
3449 rm -f conftest*
3450 fi
3451 rm -f conftest*
3452 fi
3453 rm -f conftest*
3454   ac_cv_prog_CPP="$CPP"
3455 fi
3456   CPP="$ac_cv_prog_CPP"
3457 else
3458   ac_cv_prog_CPP="$CPP"
3459 fi
3460 echo "$ac_t""$CPP" 1>&6
3461
3462 # Check whether --enable-fast-install or --disable-fast-install was given.
3463 if test "${enable_fast_install+set}" = set; then
3464   enableval="$enable_fast_install"
3465   p=${PACKAGE-default}
3466 case $enableval in
3467 yes) enable_fast_install=yes ;;
3468 no) enable_fast_install=no ;;
3469 *)
3470   enable_fast_install=no
3471   # Look at the argument we got.  We use all the common list separators.
3472   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3473   for pkg in $enableval; do
3474     if test "X$pkg" = "X$p"; then
3475       enable_fast_install=yes
3476     fi
3477   done
3478   IFS="$ac_save_ifs"
3479   ;;
3480 esac
3481 else
3482   enable_fast_install=yes
3483 fi
3484
3485 # Extract the first word of "gcc", so it can be a program name with args.
3486 set dummy gcc; ac_word=$2
3487 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3488 echo "configure:3489: checking for $ac_word" >&5
3489 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3490   echo $ac_n "(cached) $ac_c" 1>&6
3491 else
3492   if test -n "$CC"; then
3493   ac_cv_prog_CC="$CC" # Let the user override the test.
3494 else
3495   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3496   ac_dummy="$PATH"
3497   for ac_dir in $ac_dummy; do
3498     test -z "$ac_dir" && ac_dir=.
3499     if test -f $ac_dir/$ac_word; then
3500       ac_cv_prog_CC="gcc"
3501       break
3502     fi
3503   done
3504   IFS="$ac_save_ifs"
3505 fi
3506 fi
3507 CC="$ac_cv_prog_CC"
3508 if test -n "$CC"; then
3509   echo "$ac_t""$CC" 1>&6
3510 else
3511   echo "$ac_t""no" 1>&6
3512 fi
3513
3514 if test -z "$CC"; then
3515   # Extract the first word of "cc", so it can be a program name with args.
3516 set dummy cc; ac_word=$2
3517 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3518 echo "configure:3519: checking for $ac_word" >&5
3519 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3520   echo $ac_n "(cached) $ac_c" 1>&6
3521 else
3522   if test -n "$CC"; then
3523   ac_cv_prog_CC="$CC" # Let the user override the test.
3524 else
3525   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3526   ac_prog_rejected=no
3527   ac_dummy="$PATH"
3528   for ac_dir in $ac_dummy; do
3529     test -z "$ac_dir" && ac_dir=.
3530     if test -f $ac_dir/$ac_word; then
3531       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3532         ac_prog_rejected=yes
3533         continue
3534       fi
3535       ac_cv_prog_CC="cc"
3536       break
3537     fi
3538   done
3539   IFS="$ac_save_ifs"
3540 if test $ac_prog_rejected = yes; then
3541   # We found a bogon in the path, so make sure we never use it.
3542   set dummy $ac_cv_prog_CC
3543   shift
3544   if test $# -gt 0; then
3545     # We chose a different compiler from the bogus one.
3546     # However, it has the same basename, so the bogon will be chosen
3547     # first if we set CC to just the basename; use the full file name.
3548     shift
3549     set dummy "$ac_dir/$ac_word" "$@"
3550     shift
3551     ac_cv_prog_CC="$@"
3552   fi
3553 fi
3554 fi
3555 fi
3556 CC="$ac_cv_prog_CC"
3557 if test -n "$CC"; then
3558   echo "$ac_t""$CC" 1>&6
3559 else
3560   echo "$ac_t""no" 1>&6
3561 fi
3562
3563   if test -z "$CC"; then
3564     case "`uname -s`" in
3565     *win32* | *WIN32* | *CYGWIN*)
3566       # Extract the first word of "cl", so it can be a program name with args.
3567 set dummy cl; ac_word=$2
3568 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3569 echo "configure:3570: checking for $ac_word" >&5
3570 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3571   echo $ac_n "(cached) $ac_c" 1>&6
3572 else
3573   if test -n "$CC"; then
3574   ac_cv_prog_CC="$CC" # Let the user override the test.
3575 else
3576   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3577   ac_dummy="$PATH"
3578   for ac_dir in $ac_dummy; do
3579     test -z "$ac_dir" && ac_dir=.
3580     if test -f $ac_dir/$ac_word; then
3581       ac_cv_prog_CC="cl"
3582       break
3583     fi
3584   done
3585   IFS="$ac_save_ifs"
3586 fi
3587 fi
3588 CC="$ac_cv_prog_CC"
3589 if test -n "$CC"; then
3590   echo "$ac_t""$CC" 1>&6
3591 else
3592   echo "$ac_t""no" 1>&6
3593 fi
3594  ;;
3595     esac
3596   fi
3597   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3598 fi
3599
3600 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3601 echo "configure:3602: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3602
3603 ac_ext=c
3604 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3605 ac_cpp='$CPP $CPPFLAGS'
3606 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3607 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3608 cross_compiling=$ac_cv_prog_cc_cross
3609
3610 cat > conftest.$ac_ext << EOF
3611
3612 #line 3613 "configure"
3613 #include "confdefs.h"
3614
3615 main(){return(0);}
3616 EOF
3617 if { (eval echo configure:3618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3618   ac_cv_prog_cc_works=yes
3619   # If we can't run a trivial program, we are probably using a cross compiler.
3620   if (./conftest; exit) 2>/dev/null; then
3621     ac_cv_prog_cc_cross=no
3622   else
3623     ac_cv_prog_cc_cross=yes
3624   fi
3625 else
3626   echo "configure: failed program was:" >&5
3627   cat conftest.$ac_ext >&5
3628   ac_cv_prog_cc_works=no
3629 fi
3630 rm -fr conftest*
3631 ac_ext=c
3632 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3633 ac_cpp='$CPP $CPPFLAGS'
3634 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3635 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3636 cross_compiling=$ac_cv_prog_cc_cross
3637
3638 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3639 if test $ac_cv_prog_cc_works = no; then
3640   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3641 fi
3642 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3643 echo "configure:3644: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3644 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3645 cross_compiling=$ac_cv_prog_cc_cross
3646
3647 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3648 echo "configure:3649: checking whether we are using GNU C" >&5
3649 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3650   echo $ac_n "(cached) $ac_c" 1>&6
3651 else
3652   cat > conftest.c <<EOF
3653 #ifdef __GNUC__
3654   yes;
3655 #endif
3656 EOF
3657 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3658   ac_cv_prog_gcc=yes
3659 else
3660   ac_cv_prog_gcc=no
3661 fi
3662 fi
3663
3664 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3665
3666 if test $ac_cv_prog_gcc = yes; then
3667   GCC=yes
3668 else
3669   GCC=
3670 fi
3671
3672 ac_test_CFLAGS="${CFLAGS+set}"
3673 ac_save_CFLAGS="$CFLAGS"
3674 CFLAGS=
3675 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3676 echo "configure:3677: checking whether ${CC-cc} accepts -g" >&5
3677 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3678   echo $ac_n "(cached) $ac_c" 1>&6
3679 else
3680   echo 'void f(){}' > conftest.c
3681 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3682   ac_cv_prog_cc_g=yes
3683 else
3684   ac_cv_prog_cc_g=no
3685 fi
3686 rm -f conftest*
3687
3688 fi
3689
3690 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3691 if test "$ac_test_CFLAGS" = set; then
3692   CFLAGS="$ac_save_CFLAGS"
3693 elif test $ac_cv_prog_cc_g = yes; then
3694   if test "$GCC" = yes; then
3695     CFLAGS="-g -O2"
3696   else
3697     CFLAGS="-g"
3698   fi
3699 else
3700   if test "$GCC" = yes; then
3701     CFLAGS="-O2"
3702   else
3703     CFLAGS=
3704   fi
3705 fi
3706
3707 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3708 if test "${with_gnu_ld+set}" = set; then
3709   withval="$with_gnu_ld"
3710   test "$withval" = no || with_gnu_ld=yes
3711 else
3712   with_gnu_ld=no
3713 fi
3714
3715 ac_prog=ld
3716 if test "$GCC" = yes; then
3717   # Check if gcc -print-prog-name=ld gives a path.
3718   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3719 echo "configure:3720: checking for ld used by GCC" >&5
3720   case $host in
3721   *-*-mingw*)
3722     # gcc leaves a trailing carriage return which upsets mingw
3723     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3724   *)
3725     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3726   esac
3727   case $ac_prog in
3728     # Accept absolute paths.
3729     [\\/]* | [A-Za-z]:[\\/]*)
3730       re_direlt='/[^/][^/]*/\.\./'
3731       # Canonicalize the path of ld
3732       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3733       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3734         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3735       done
3736       test -z "$LD" && LD="$ac_prog"
3737       ;;
3738   "")
3739     # If it fails, then pretend we aren't using GCC.
3740     ac_prog=ld
3741     ;;
3742   *)
3743     # If it is relative, then search for the first ld in PATH.
3744     with_gnu_ld=unknown
3745     ;;
3746   esac
3747 elif test "$with_gnu_ld" = yes; then
3748   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3749 echo "configure:3750: checking for GNU ld" >&5
3750 else
3751   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3752 echo "configure:3753: checking for non-GNU ld" >&5
3753 fi
3754 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3755   echo $ac_n "(cached) $ac_c" 1>&6
3756 else
3757   if test -z "$LD"; then
3758   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3759   for ac_dir in $PATH; do
3760     test -z "$ac_dir" && ac_dir=.
3761     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3762       lt_cv_path_LD="$ac_dir/$ac_prog"
3763       # Check to see if the program is GNU ld.  I'd rather use --version,
3764       # but apparently some GNU ld's only accept -v.
3765       # Break only if it was the GNU/non-GNU ld that we prefer.
3766       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3767         test "$with_gnu_ld" != no && break
3768       else
3769         test "$with_gnu_ld" != yes && break
3770       fi
3771     fi
3772   done
3773   IFS="$ac_save_ifs"
3774 else
3775   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3776 fi
3777 fi
3778
3779 LD="$lt_cv_path_LD"
3780 if test -n "$LD"; then
3781   echo "$ac_t""$LD" 1>&6
3782 else
3783   echo "$ac_t""no" 1>&6
3784 fi
3785 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3786 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3787 echo "configure:3788: checking if the linker ($LD) is GNU ld" >&5
3788 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3789   echo $ac_n "(cached) $ac_c" 1>&6
3790 else
3791   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3792 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3793   lt_cv_prog_gnu_ld=yes
3794 else
3795   lt_cv_prog_gnu_ld=no
3796 fi
3797 fi
3798
3799 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3800 with_gnu_ld=$lt_cv_prog_gnu_ld
3801
3802
3803 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3804 echo "configure:3805: checking for $LD option to reload object files" >&5
3805 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3806   echo $ac_n "(cached) $ac_c" 1>&6
3807 else
3808   lt_cv_ld_reload_flag='-r'
3809 fi
3810
3811 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3812 reload_flag=$lt_cv_ld_reload_flag
3813 test -n "$reload_flag" && reload_flag=" $reload_flag"
3814
3815 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3816 echo "configure:3817: checking for BSD-compatible nm" >&5
3817 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3818   echo $ac_n "(cached) $ac_c" 1>&6
3819 else
3820   if test -n "$NM"; then
3821   # Let the user override the test.
3822   lt_cv_path_NM="$NM"
3823 else
3824   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3825   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3826     test -z "$ac_dir" && ac_dir=.
3827     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3828     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3829       # Check to see if the nm accepts a BSD-compat flag.
3830       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3831       #   nm: unknown option "B" ignored
3832       # Tru64's nm complains that /dev/null is an invalid object file
3833       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3834         lt_cv_path_NM="$tmp_nm -B"
3835         break
3836       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3837         lt_cv_path_NM="$tmp_nm -p"
3838         break
3839       else
3840         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3841         continue # so that we can try to find one that supports BSD flags
3842       fi
3843     fi
3844   done
3845   IFS="$ac_save_ifs"
3846   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3847 fi
3848 fi
3849
3850 NM="$lt_cv_path_NM"
3851 echo "$ac_t""$NM" 1>&6
3852
3853 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3854 echo "configure:3855: checking for a sed that does not truncate output" >&5
3855 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3856   echo $ac_n "(cached) $ac_c" 1>&6
3857 else
3858   # Loop through the user's path and test for sed and gsed.
3859 # Then use that list of sed's as ones to test for truncation.
3860 as_executable_p="test -f"
3861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3862 for as_dir in $PATH
3863 do
3864   IFS=$as_save_IFS
3865   test -z "$as_dir" && as_dir=.
3866   for ac_prog in sed gsed; do
3867     for ac_exec_ext in '' $ac_executable_extensions; do
3868       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3869         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3870       fi
3871     done
3872   done
3873 done
3874
3875   # Create a temporary directory, and hook for its removal unless debugging.
3876 $debug ||
3877 {
3878   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3879   trap '{ (exit 1); exit 1; }' 1 2 13 15
3880 }
3881
3882 # Create a (secure) tmp directory for tmp files.
3883 : ${TMPDIR=/tmp}
3884 {
3885   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3886   test -n "$tmp" && test -d "$tmp"
3887 }  ||
3888 {
3889   tmp=$TMPDIR/sed$$-$RANDOM
3890   (umask 077 && mkdir $tmp)
3891 } ||
3892 {
3893    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3894    { (exit 1); exit 1; }
3895 }
3896   _max=0
3897   _count=0
3898   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3899   # along with /bin/sed that truncates output.
3900   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3901     test ! -f ${_sed} && break
3902     cat /dev/null > "$tmp/sed.in"
3903     _count=0
3904     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3905     # Check for GNU sed and select it if it is found.
3906     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3907       lt_cv_path_SED=${_sed}
3908       break
3909     fi
3910     while true; do
3911       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3912       mv "$tmp/sed.tmp" "$tmp/sed.in"
3913       cp "$tmp/sed.in" "$tmp/sed.nl"
3914       echo >>"$tmp/sed.nl"
3915       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3916       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3917       # 40000 chars as input seems more than enough
3918       test $_count -gt 10 && break
3919       _count=`expr $_count + 1`
3920       if test $_count -gt $_max; then
3921         _max=$_count
3922         lt_cv_path_SED=$_sed
3923       fi
3924     done
3925   done
3926   rm -rf "$tmp"
3927
3928 fi
3929
3930 if test "X$SED" != "X"; then
3931   lt_cv_path_SED=$SED
3932 else
3933   SED=$lt_cv_path_SED
3934 fi
3935 echo "$ac_t""$SED" 1>&6
3936
3937 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3938 echo "configure:3939: checking whether ln -s works" >&5
3939 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3940   echo $ac_n "(cached) $ac_c" 1>&6
3941 else
3942   rm -f conftestdata
3943 if ln -s X conftestdata 2>/dev/null
3944 then
3945   rm -f conftestdata
3946   ac_cv_prog_LN_S="ln -s"
3947 else
3948   ac_cv_prog_LN_S=ln
3949 fi
3950 fi
3951 LN_S="$ac_cv_prog_LN_S"
3952 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3953   echo "$ac_t""yes" 1>&6
3954 else
3955   echo "$ac_t""no" 1>&6
3956 fi
3957
3958 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3959 echo "configure:3960: checking how to recognise dependent libraries" >&5
3960 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3961   echo $ac_n "(cached) $ac_c" 1>&6
3962 else
3963   lt_cv_file_magic_cmd='$MAGIC_CMD'
3964 lt_cv_file_magic_test_file=
3965 lt_cv_deplibs_check_method='unknown'
3966 # Need to set the preceding variable on all platforms that support
3967 # interlibrary dependencies.
3968 # 'none' -- dependencies not supported.
3969 # `unknown' -- same as none, but documents that we really don't know.
3970 # 'pass_all' -- all dependencies passed with no checks.
3971 # 'test_compile' -- check by making test program.
3972 # 'file_magic [[regex]]' -- check by looking for files in library path
3973 # which responds to the $file_magic_cmd with a given egrep regex.
3974 # If you have `file' or equivalent on your system and you're not sure
3975 # whether `pass_all' will *always* work, you probably want this one.
3976
3977 case $host_os in
3978 aix4* | aix5*)
3979   lt_cv_deplibs_check_method=pass_all
3980   ;;
3981
3982 beos*)
3983   lt_cv_deplibs_check_method=pass_all
3984   ;;
3985
3986 bsdi4*)
3987   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3988   lt_cv_file_magic_cmd='/usr/bin/file -L'
3989   lt_cv_file_magic_test_file=/shlib/libc.so
3990   ;;
3991
3992 cygwin* | mingw* | pw32*)
3993   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3994   lt_cv_file_magic_cmd='$OBJDUMP -f'
3995   ;;
3996
3997 darwin* | rhapsody*)
3998   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3999   lt_cv_file_magic_cmd='/usr/bin/file -L'
4000   case "$host_os" in
4001   rhapsody* | darwin1.[012])
4002     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4003     ;;
4004   *) # Darwin 1.3 on
4005     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4006     ;;
4007   esac
4008   ;;
4009
4010 freebsd*)
4011   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4012     case $host_cpu in
4013     i*86 )
4014       # Not sure whether the presence of OpenBSD here was a mistake.
4015       # Let's accept both of them until this is cleared up.
4016       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
4017       lt_cv_file_magic_cmd=/usr/bin/file
4018       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4019       ;;
4020     esac
4021   else
4022     lt_cv_deplibs_check_method=pass_all
4023   fi
4024   ;;
4025
4026 gnu*)
4027   lt_cv_deplibs_check_method=pass_all
4028   ;;
4029
4030 hpux10.20*|hpux11*)
4031   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
4032   lt_cv_file_magic_cmd=/usr/bin/file
4033   lt_cv_file_magic_test_file=/usr/lib/libc.sl
4034   ;;
4035
4036 irix5* | irix6* | nonstopux*)
4037   case $host_os in
4038   irix5* | nonstopux*)
4039     # this will be overridden with pass_all, but let us keep it just in case
4040     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4041     ;;
4042   *)
4043     case $LD in
4044     *-32|*"-32 ") libmagic=32-bit;;
4045     *-n32|*"-n32 ") libmagic=N32;;
4046     *-64|*"-64 ") libmagic=64-bit;;
4047     *) libmagic=never-match;;
4048     esac
4049     # this will be overridden with pass_all, but let us keep it just in case
4050     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
4051     ;;
4052   esac
4053   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4054   lt_cv_deplibs_check_method=pass_all
4055   ;;
4056
4057 # This must be Linux ELF.
4058 linux-gnu*)
4059   case $host_cpu in
4060   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
4061     lt_cv_deplibs_check_method=pass_all ;;
4062   *)
4063     # glibc up to 2.1.1 does not perform some relocations on ARM
4064     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
4065   esac
4066   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4067   ;;
4068
4069 netbsd*)
4070   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4071     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
4072   else
4073     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
4074   fi
4075   ;;
4076
4077 newos6*)
4078   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
4079   lt_cv_file_magic_cmd=/usr/bin/file
4080   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4081   ;;
4082
4083 openbsd*)
4084   lt_cv_file_magic_cmd=/usr/bin/file
4085   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4086   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4087     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
4088   else
4089     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4090   fi
4091   ;;
4092
4093 openedition*)
4094   lt_cv_deplibs_check_method=pass_all
4095   ;;
4096
4097 osf3* | osf4* | osf5*)
4098   # this will be overridden with pass_all, but let us keep it just in case
4099   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4100   lt_cv_file_magic_test_file=/shlib/libc.so
4101   lt_cv_deplibs_check_method=pass_all
4102   ;;
4103
4104 sco3.2v5*)
4105   lt_cv_deplibs_check_method=pass_all
4106   ;;
4107
4108 solaris*)
4109   lt_cv_deplibs_check_method=pass_all
4110   lt_cv_file_magic_test_file=/lib/libc.so
4111   ;;
4112
4113 sysv5uw[78]* | sysv4*uw2*)
4114   lt_cv_deplibs_check_method=pass_all
4115   ;;
4116
4117 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4118   case $host_vendor in
4119   motorola)
4120     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]'
4121     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4122     ;;
4123   ncr)
4124     lt_cv_deplibs_check_method=pass_all
4125     ;;
4126   sequent)
4127     lt_cv_file_magic_cmd='/bin/file'
4128     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4129     ;;
4130   sni)
4131     lt_cv_file_magic_cmd='/bin/file'
4132     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4133     lt_cv_file_magic_test_file=/lib/libc.so
4134     ;;
4135   siemens)
4136     lt_cv_deplibs_check_method=pass_all
4137     ;;
4138   esac
4139   ;;
4140 esac
4141
4142 fi
4143
4144 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
4145 file_magic_cmd=$lt_cv_file_magic_cmd
4146 deplibs_check_method=$lt_cv_deplibs_check_method
4147
4148 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4149 echo "configure:4150: checking for object suffix" >&5
4150 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4151   echo $ac_n "(cached) $ac_c" 1>&6
4152 else
4153   rm -f conftest*
4154 echo 'int i = 1;' > conftest.$ac_ext
4155 if { (eval echo configure:4156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4156   for ac_file in conftest.*; do
4157     case $ac_file in
4158     *.c) ;;
4159     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4160     esac
4161   done
4162 else
4163   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4164 fi
4165 rm -f conftest*
4166 fi
4167
4168 echo "$ac_t""$ac_cv_objext" 1>&6
4169 OBJEXT=$ac_cv_objext
4170 ac_objext=$ac_cv_objext
4171
4172
4173
4174
4175 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4176 echo "configure:4177: checking for executable suffix" >&5
4177 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4178   echo $ac_n "(cached) $ac_c" 1>&6
4179 else
4180   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4181   ac_cv_exeext=.exe
4182 else
4183   rm -f conftest*
4184   echo 'int main () { return 0; }' > conftest.$ac_ext
4185   ac_cv_exeext=
4186   if { (eval echo configure:4187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4187     for file in conftest.*; do
4188       case $file in
4189       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4190       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4191       esac
4192     done
4193   else
4194     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4195   fi
4196   rm -f conftest*
4197   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4198 fi
4199 fi
4200
4201 EXEEXT=""
4202 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4203 echo "$ac_t""${ac_cv_exeext}" 1>&6
4204 ac_exeext=$EXEEXT
4205
4206 if test $host != $build; then
4207   ac_tool_prefix=${host_alias}-
4208 else
4209   ac_tool_prefix=
4210 fi
4211
4212
4213
4214
4215 # Check for command to grab the raw symbol name followed by C symbol from nm.
4216 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4217 echo "configure:4218: checking command to parse $NM output" >&5
4218 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4219   echo $ac_n "(cached) $ac_c" 1>&6
4220 else
4221   
4222 # These are sane defaults that work on at least a few old systems.
4223 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4224
4225 # Character class describing NM global symbol codes.
4226 symcode='[BCDEGRST]'
4227
4228 # Regexp to match symbols that can be accessed directly from C.
4229 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4230
4231 # Transform the above into a raw symbol and a C symbol.
4232 symxfrm='\1 \2\3 \3'
4233
4234 # Transform an extracted symbol line into a proper C declaration
4235 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4236
4237 # Transform an extracted symbol line into symbol name and symbol address
4238 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'"
4239
4240 # Define system-specific variables.
4241 case $host_os in
4242 aix*)
4243   symcode='[BCDT]'
4244   ;;
4245 cygwin* | mingw* | pw32*)
4246   symcode='[ABCDGISTW]'
4247   ;;
4248 hpux*) # Its linker distinguishes data from code symbols
4249   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4250   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'"
4251   ;;
4252 irix* | nonstopux*)
4253   symcode='[BCDEGRST]'
4254   ;;
4255 osf*)
4256   symcode='[BCDEGQRST]'
4257   ;;
4258 solaris* | sysv5*)
4259   symcode='[BDT]'
4260   ;;
4261 sysv4)
4262   symcode='[DFNSTU]'
4263   ;;
4264 esac
4265
4266 # Handle CRLF in mingw tool chain
4267 opt_cr=
4268 case $host_os in
4269 mingw*)
4270   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4271   ;;
4272 esac
4273
4274 # If we're using GNU nm, then use its standard symbol codes.
4275 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4276   symcode='[ABCDGISTW]'
4277 fi
4278
4279 # Try without a prefix undercore, then with it.
4280 for ac_symprfx in "" "_"; do
4281
4282   # Write the raw and C identifiers.
4283 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4284
4285   # Check to see that the pipe works correctly.
4286   pipe_works=no
4287   rm -f conftest*
4288   cat > conftest.$ac_ext <<EOF
4289 #ifdef __cplusplus
4290 extern "C" {
4291 #endif
4292 char nm_test_var;
4293 void nm_test_func(){}
4294 #ifdef __cplusplus
4295 }
4296 #endif
4297 int main(){nm_test_var='a';nm_test_func();return(0);}
4298 EOF
4299
4300   if { (eval echo configure:4301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4301     # Now try to grab the symbols.
4302     nlist=conftest.nm
4303     if { (eval echo configure:4304: \"$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
4304       # Try sorting and uniquifying the output.
4305       if sort "$nlist" | uniq > "$nlist"T; then
4306         mv -f "$nlist"T "$nlist"
4307       else
4308         rm -f "$nlist"T
4309       fi
4310
4311       # Make sure that we snagged all the symbols we need.
4312       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4313         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4314           cat <<EOF > conftest.$ac_ext
4315 #ifdef __cplusplus
4316 extern "C" {
4317 #endif
4318
4319 EOF
4320           # Now generate the symbol file.
4321           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4322
4323           cat <<EOF >> conftest.$ac_ext
4324 #if defined (__STDC__) && __STDC__
4325 # define lt_ptr void *
4326 #else
4327 # define lt_ptr char *
4328 # define const
4329 #endif
4330
4331 /* The mapping between symbol names and symbols. */
4332 const struct {
4333   const char *name;
4334   lt_ptr address;
4335 }
4336 lt_preloaded_symbols[] =
4337 {
4338 EOF
4339           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4340           cat <<\EOF >> conftest.$ac_ext
4341   {0, (lt_ptr) 0}
4342 };
4343
4344 #ifdef __cplusplus
4345 }
4346 #endif
4347 EOF
4348           # Now try linking the two files.
4349           mv conftest.$ac_objext conftstm.$ac_objext
4350           save_LIBS="$LIBS"
4351           save_CFLAGS="$CFLAGS"
4352           LIBS="conftstm.$ac_objext"
4353           CFLAGS="$CFLAGS$no_builtin_flag"
4354           if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4355             pipe_works=yes
4356           fi
4357           LIBS="$save_LIBS"
4358           CFLAGS="$save_CFLAGS"
4359         else
4360           echo "cannot find nm_test_func in $nlist" >&5
4361         fi
4362       else
4363         echo "cannot find nm_test_var in $nlist" >&5
4364       fi
4365     else
4366       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4367     fi
4368   else
4369     echo "$progname: failed program was:" >&5
4370     cat conftest.$ac_ext >&5
4371   fi
4372   rm -f conftest* conftst*
4373
4374   # Do not use the global_symbol_pipe unless it works.
4375   if test "$pipe_works" = yes; then
4376     break
4377   else
4378     lt_cv_sys_global_symbol_pipe=
4379   fi
4380 done
4381
4382 fi
4383
4384 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4385 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4386   global_symbol_to_cdecl=
4387   global_symbol_to_c_name_address=
4388 else
4389   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4390   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4391 fi
4392 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4393 then
4394   echo "$ac_t""failed" 1>&6
4395 else
4396   echo "$ac_t""ok" 1>&6
4397 fi
4398
4399 for ac_hdr in dlfcn.h
4400 do
4401 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4402 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4403 echo "configure:4404: checking for $ac_hdr" >&5
4404 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4405   echo $ac_n "(cached) $ac_c" 1>&6
4406 else
4407   cat > conftest.$ac_ext <<EOF
4408 #line 4409 "configure"
4409 #include "confdefs.h"
4410 #include <$ac_hdr>
4411 EOF
4412 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4413 { (eval echo configure:4414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4414 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4415 if test -z "$ac_err"; then
4416   rm -rf conftest*
4417   eval "ac_cv_header_$ac_safe=yes"
4418 else
4419   echo "$ac_err" >&5
4420   echo "configure: failed program was:" >&5
4421   cat conftest.$ac_ext >&5
4422   rm -rf conftest*
4423   eval "ac_cv_header_$ac_safe=no"
4424 fi
4425 rm -f conftest*
4426 fi
4427 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4428   echo "$ac_t""yes" 1>&6
4429     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4430   cat >> confdefs.h <<EOF
4431 #define $ac_tr_hdr 1
4432 EOF
4433  
4434 else
4435   echo "$ac_t""no" 1>&6
4436 fi
4437 done
4438
4439
4440
4441
4442
4443
4444 # Only perform the check for file, if the check method requires it
4445 case $deplibs_check_method in
4446 file_magic*)
4447   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4448     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4449 echo "configure:4450: checking for ${ac_tool_prefix}file" >&5
4450 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4451   echo $ac_n "(cached) $ac_c" 1>&6
4452 else
4453   case $MAGIC_CMD in
4454   /*)
4455   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4456   ;;
4457   ?:/*)
4458   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4459   ;;
4460   *)
4461   ac_save_MAGIC_CMD="$MAGIC_CMD"
4462   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4463   ac_dummy="/usr/bin:$PATH"
4464   for ac_dir in $ac_dummy; do
4465     test -z "$ac_dir" && ac_dir=.
4466     if test -f $ac_dir/${ac_tool_prefix}file; then
4467       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4468       if test -n "$file_magic_test_file"; then
4469         case $deplibs_check_method in
4470         "file_magic "*)
4471           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4472           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4473           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4474             egrep "$file_magic_regex" > /dev/null; then
4475             :
4476           else
4477             cat <<EOF 1>&2
4478
4479 *** Warning: the command libtool uses to detect shared libraries,
4480 *** $file_magic_cmd, produces output that libtool cannot recognize.
4481 *** The result is that libtool may fail to recognize shared libraries
4482 *** as such.  This will affect the creation of libtool libraries that
4483 *** depend on shared libraries, but programs linked with such libtool
4484 *** libraries will work regardless of this problem.  Nevertheless, you
4485 *** may want to report the problem to your system manager and/or to
4486 *** bug-libtool@gnu.org
4487
4488 EOF
4489           fi ;;
4490         esac
4491       fi
4492       break
4493     fi
4494   done
4495   IFS="$ac_save_ifs"
4496   MAGIC_CMD="$ac_save_MAGIC_CMD"
4497   ;;
4498 esac
4499 fi
4500
4501 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4502 if test -n "$MAGIC_CMD"; then
4503   echo "$ac_t""$MAGIC_CMD" 1>&6
4504 else
4505   echo "$ac_t""no" 1>&6
4506 fi
4507
4508 if test -z "$lt_cv_path_MAGIC_CMD"; then
4509   if test -n "$ac_tool_prefix"; then
4510     echo $ac_n "checking for file""... $ac_c" 1>&6
4511 echo "configure:4512: checking for file" >&5
4512 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4513   echo $ac_n "(cached) $ac_c" 1>&6
4514 else
4515   case $MAGIC_CMD in
4516   /*)
4517   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4518   ;;
4519   ?:/*)
4520   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4521   ;;
4522   *)
4523   ac_save_MAGIC_CMD="$MAGIC_CMD"
4524   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4525   ac_dummy="/usr/bin:$PATH"
4526   for ac_dir in $ac_dummy; do
4527     test -z "$ac_dir" && ac_dir=.
4528     if test -f $ac_dir/file; then
4529       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4530       if test -n "$file_magic_test_file"; then
4531         case $deplibs_check_method in
4532         "file_magic "*)
4533           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4534           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4535           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4536             egrep "$file_magic_regex" > /dev/null; then
4537             :
4538           else
4539             cat <<EOF 1>&2
4540
4541 *** Warning: the command libtool uses to detect shared libraries,
4542 *** $file_magic_cmd, produces output that libtool cannot recognize.
4543 *** The result is that libtool may fail to recognize shared libraries
4544 *** as such.  This will affect the creation of libtool libraries that
4545 *** depend on shared libraries, but programs linked with such libtool
4546 *** libraries will work regardless of this problem.  Nevertheless, you
4547 *** may want to report the problem to your system manager and/or to
4548 *** bug-libtool@gnu.org
4549
4550 EOF
4551           fi ;;
4552         esac
4553       fi
4554       break
4555     fi
4556   done
4557   IFS="$ac_save_ifs"
4558   MAGIC_CMD="$ac_save_MAGIC_CMD"
4559   ;;
4560 esac
4561 fi
4562
4563 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4564 if test -n "$MAGIC_CMD"; then
4565   echo "$ac_t""$MAGIC_CMD" 1>&6
4566 else
4567   echo "$ac_t""no" 1>&6
4568 fi
4569
4570   else
4571     MAGIC_CMD=:
4572   fi
4573 fi
4574
4575   fi
4576   ;;
4577 esac
4578
4579 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4580 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4581 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4582 echo "configure:4583: checking for $ac_word" >&5
4583 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4584   echo $ac_n "(cached) $ac_c" 1>&6
4585 else
4586   if test -n "$RANLIB"; then
4587   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4588 else
4589   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4590   ac_dummy="$PATH"
4591   for ac_dir in $ac_dummy; do
4592     test -z "$ac_dir" && ac_dir=.
4593     if test -f $ac_dir/$ac_word; then
4594       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4595       break
4596     fi
4597   done
4598   IFS="$ac_save_ifs"
4599 fi
4600 fi
4601 RANLIB="$ac_cv_prog_RANLIB"
4602 if test -n "$RANLIB"; then
4603   echo "$ac_t""$RANLIB" 1>&6
4604 else
4605   echo "$ac_t""no" 1>&6
4606 fi
4607
4608
4609 if test -z "$ac_cv_prog_RANLIB"; then
4610 if test -n "$ac_tool_prefix"; then
4611   # Extract the first word of "ranlib", so it can be a program name with args.
4612 set dummy ranlib; ac_word=$2
4613 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4614 echo "configure:4615: checking for $ac_word" >&5
4615 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4616   echo $ac_n "(cached) $ac_c" 1>&6
4617 else
4618   if test -n "$RANLIB"; then
4619   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4620 else
4621   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4622   ac_dummy="$PATH"
4623   for ac_dir in $ac_dummy; do
4624     test -z "$ac_dir" && ac_dir=.
4625     if test -f $ac_dir/$ac_word; then
4626       ac_cv_prog_RANLIB="ranlib"
4627       break
4628     fi
4629   done
4630   IFS="$ac_save_ifs"
4631   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4632 fi
4633 fi
4634 RANLIB="$ac_cv_prog_RANLIB"
4635 if test -n "$RANLIB"; then
4636   echo "$ac_t""$RANLIB" 1>&6
4637 else
4638   echo "$ac_t""no" 1>&6
4639 fi
4640
4641 else
4642   RANLIB=":"
4643 fi
4644 fi
4645
4646 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4647 set dummy ${ac_tool_prefix}strip; ac_word=$2
4648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4649 echo "configure:4650: checking for $ac_word" >&5
4650 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4651   echo $ac_n "(cached) $ac_c" 1>&6
4652 else
4653   if test -n "$STRIP"; then
4654   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4655 else
4656   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4657   ac_dummy="$PATH"
4658   for ac_dir in $ac_dummy; do
4659     test -z "$ac_dir" && ac_dir=.
4660     if test -f $ac_dir/$ac_word; then
4661       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4662       break
4663     fi
4664   done
4665   IFS="$ac_save_ifs"
4666 fi
4667 fi
4668 STRIP="$ac_cv_prog_STRIP"
4669 if test -n "$STRIP"; then
4670   echo "$ac_t""$STRIP" 1>&6
4671 else
4672   echo "$ac_t""no" 1>&6
4673 fi
4674
4675
4676 if test -z "$ac_cv_prog_STRIP"; then
4677 if test -n "$ac_tool_prefix"; then
4678   # Extract the first word of "strip", so it can be a program name with args.
4679 set dummy strip; ac_word=$2
4680 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4681 echo "configure:4682: checking for $ac_word" >&5
4682 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4683   echo $ac_n "(cached) $ac_c" 1>&6
4684 else
4685   if test -n "$STRIP"; then
4686   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4687 else
4688   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4689   ac_dummy="$PATH"
4690   for ac_dir in $ac_dummy; do
4691     test -z "$ac_dir" && ac_dir=.
4692     if test -f $ac_dir/$ac_word; then
4693       ac_cv_prog_STRIP="strip"
4694       break
4695     fi
4696   done
4697   IFS="$ac_save_ifs"
4698   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4699 fi
4700 fi
4701 STRIP="$ac_cv_prog_STRIP"
4702 if test -n "$STRIP"; then
4703   echo "$ac_t""$STRIP" 1>&6
4704 else
4705   echo "$ac_t""no" 1>&6
4706 fi
4707
4708 else
4709   STRIP=":"
4710 fi
4711 fi
4712
4713
4714 enable_dlopen=yes
4715 enable_win32_dll=yes
4716
4717 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4718 if test "${enable_libtool_lock+set}" = set; then
4719   enableval="$enable_libtool_lock"
4720   :
4721 fi
4722
4723 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4724
4725 # Some flags need to be propagated to the compiler or linker for good
4726 # libtool support.
4727 case $host in
4728 *-*-irix6*)
4729   # Find out which ABI we are using.
4730   echo '#line 4731 "configure"' > conftest.$ac_ext
4731   if { (eval echo configure:4732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4732     case `/usr/bin/file conftest.$ac_objext` in
4733     *32-bit*)
4734       LD="${LD-ld} -32"
4735       ;;
4736     *N32*)
4737       LD="${LD-ld} -n32"
4738       ;;
4739     *64-bit*)
4740       LD="${LD-ld} -64"
4741       ;;
4742     esac
4743   fi
4744   rm -rf conftest*
4745   ;;
4746
4747 *-*-sco3.2v5*)
4748   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4749   SAVE_CFLAGS="$CFLAGS"
4750   CFLAGS="$CFLAGS -belf"
4751   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4752 echo "configure:4753: checking whether the C compiler needs -belf" >&5
4753 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4754   echo $ac_n "(cached) $ac_c" 1>&6
4755 else
4756   
4757      ac_ext=c
4758 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4759 ac_cpp='$CPP $CPPFLAGS'
4760 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4761 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4762 cross_compiling=$ac_cv_prog_cc_cross
4763
4764      cat > conftest.$ac_ext <<EOF
4765 #line 4766 "configure"
4766 #include "confdefs.h"
4767
4768 int main() {
4769
4770 ; return 0; }
4771 EOF
4772 if { (eval echo configure:4773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4773   rm -rf conftest*
4774   lt_cv_cc_needs_belf=yes
4775 else
4776   echo "configure: failed program was:" >&5
4777   cat conftest.$ac_ext >&5
4778   rm -rf conftest*
4779   lt_cv_cc_needs_belf=no
4780 fi
4781 rm -f conftest*
4782      ac_ext=c
4783 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4784 ac_cpp='$CPP $CPPFLAGS'
4785 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4786 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4787 cross_compiling=$ac_cv_prog_cc_cross
4788
4789 fi
4790
4791 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4792   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4793     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4794     CFLAGS="$SAVE_CFLAGS"
4795   fi
4796   ;;
4797
4798 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4799   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4800 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4801 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4802 echo "configure:4803: checking for $ac_word" >&5
4803 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4804   echo $ac_n "(cached) $ac_c" 1>&6
4805 else
4806   if test -n "$DLLTOOL"; then
4807   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4808 else
4809   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4810   ac_dummy="$PATH"
4811   for ac_dir in $ac_dummy; do
4812     test -z "$ac_dir" && ac_dir=.
4813     if test -f $ac_dir/$ac_word; then
4814       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4815       break
4816     fi
4817   done
4818   IFS="$ac_save_ifs"
4819 fi
4820 fi
4821 DLLTOOL="$ac_cv_prog_DLLTOOL"
4822 if test -n "$DLLTOOL"; then
4823   echo "$ac_t""$DLLTOOL" 1>&6
4824 else
4825   echo "$ac_t""no" 1>&6
4826 fi
4827
4828
4829 if test -z "$ac_cv_prog_DLLTOOL"; then
4830 if test -n "$ac_tool_prefix"; then
4831   # Extract the first word of "dlltool", so it can be a program name with args.
4832 set dummy dlltool; ac_word=$2
4833 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4834 echo "configure:4835: checking for $ac_word" >&5
4835 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4836   echo $ac_n "(cached) $ac_c" 1>&6
4837 else
4838   if test -n "$DLLTOOL"; then
4839   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4840 else
4841   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4842   ac_dummy="$PATH"
4843   for ac_dir in $ac_dummy; do
4844     test -z "$ac_dir" && ac_dir=.
4845     if test -f $ac_dir/$ac_word; then
4846       ac_cv_prog_DLLTOOL="dlltool"
4847       break
4848     fi
4849   done
4850   IFS="$ac_save_ifs"
4851   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4852 fi
4853 fi
4854 DLLTOOL="$ac_cv_prog_DLLTOOL"
4855 if test -n "$DLLTOOL"; then
4856   echo "$ac_t""$DLLTOOL" 1>&6
4857 else
4858   echo "$ac_t""no" 1>&6
4859 fi
4860
4861 else
4862   DLLTOOL="false"
4863 fi
4864 fi
4865
4866   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4867 set dummy ${ac_tool_prefix}as; ac_word=$2
4868 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4869 echo "configure:4870: checking for $ac_word" >&5
4870 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873   if test -n "$AS"; then
4874   ac_cv_prog_AS="$AS" # Let the user override the test.
4875 else
4876   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4877   ac_dummy="$PATH"
4878   for ac_dir in $ac_dummy; do
4879     test -z "$ac_dir" && ac_dir=.
4880     if test -f $ac_dir/$ac_word; then
4881       ac_cv_prog_AS="${ac_tool_prefix}as"
4882       break
4883     fi
4884   done
4885   IFS="$ac_save_ifs"
4886 fi
4887 fi
4888 AS="$ac_cv_prog_AS"
4889 if test -n "$AS"; then
4890   echo "$ac_t""$AS" 1>&6
4891 else
4892   echo "$ac_t""no" 1>&6
4893 fi
4894
4895
4896 if test -z "$ac_cv_prog_AS"; then
4897 if test -n "$ac_tool_prefix"; then
4898   # Extract the first word of "as", so it can be a program name with args.
4899 set dummy as; ac_word=$2
4900 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4901 echo "configure:4902: checking for $ac_word" >&5
4902 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4903   echo $ac_n "(cached) $ac_c" 1>&6
4904 else
4905   if test -n "$AS"; then
4906   ac_cv_prog_AS="$AS" # Let the user override the test.
4907 else
4908   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4909   ac_dummy="$PATH"
4910   for ac_dir in $ac_dummy; do
4911     test -z "$ac_dir" && ac_dir=.
4912     if test -f $ac_dir/$ac_word; then
4913       ac_cv_prog_AS="as"
4914       break
4915     fi
4916   done
4917   IFS="$ac_save_ifs"
4918   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4919 fi
4920 fi
4921 AS="$ac_cv_prog_AS"
4922 if test -n "$AS"; then
4923   echo "$ac_t""$AS" 1>&6
4924 else
4925   echo "$ac_t""no" 1>&6
4926 fi
4927
4928 else
4929   AS="false"
4930 fi
4931 fi
4932
4933   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4934 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4935 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4936 echo "configure:4937: checking for $ac_word" >&5
4937 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4938   echo $ac_n "(cached) $ac_c" 1>&6
4939 else
4940   if test -n "$OBJDUMP"; then
4941   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4942 else
4943   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4944   ac_dummy="$PATH"
4945   for ac_dir in $ac_dummy; do
4946     test -z "$ac_dir" && ac_dir=.
4947     if test -f $ac_dir/$ac_word; then
4948       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4949       break
4950     fi
4951   done
4952   IFS="$ac_save_ifs"
4953 fi
4954 fi
4955 OBJDUMP="$ac_cv_prog_OBJDUMP"
4956 if test -n "$OBJDUMP"; then
4957   echo "$ac_t""$OBJDUMP" 1>&6
4958 else
4959   echo "$ac_t""no" 1>&6
4960 fi
4961
4962
4963 if test -z "$ac_cv_prog_OBJDUMP"; then
4964 if test -n "$ac_tool_prefix"; then
4965   # Extract the first word of "objdump", so it can be a program name with args.
4966 set dummy objdump; ac_word=$2
4967 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4968 echo "configure:4969: checking for $ac_word" >&5
4969 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4970   echo $ac_n "(cached) $ac_c" 1>&6
4971 else
4972   if test -n "$OBJDUMP"; then
4973   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4974 else
4975   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4976   ac_dummy="$PATH"
4977   for ac_dir in $ac_dummy; do
4978     test -z "$ac_dir" && ac_dir=.
4979     if test -f $ac_dir/$ac_word; then
4980       ac_cv_prog_OBJDUMP="objdump"
4981       break
4982     fi
4983   done
4984   IFS="$ac_save_ifs"
4985   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4986 fi
4987 fi
4988 OBJDUMP="$ac_cv_prog_OBJDUMP"
4989 if test -n "$OBJDUMP"; then
4990   echo "$ac_t""$OBJDUMP" 1>&6
4991 else
4992   echo "$ac_t""no" 1>&6
4993 fi
4994
4995 else
4996   OBJDUMP="false"
4997 fi
4998 fi
4999
5000
5001   # recent cygwin and mingw systems supply a stub DllMain which the user
5002   # can override, but on older systems we have to supply one
5003   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
5004 echo "configure:5005: checking if libtool should supply DllMain function" >&5
5005 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
5006   echo $ac_n "(cached) $ac_c" 1>&6
5007 else
5008   cat > conftest.$ac_ext <<EOF
5009 #line 5010 "configure"
5010 #include "confdefs.h"
5011
5012 int main() {
5013 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
5014       DllMain (0, 0, 0);
5015 ; return 0; }
5016 EOF
5017 if { (eval echo configure:5018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5018   rm -rf conftest*
5019   lt_cv_need_dllmain=no
5020 else
5021   echo "configure: failed program was:" >&5
5022   cat conftest.$ac_ext >&5
5023   rm -rf conftest*
5024   lt_cv_need_dllmain=yes
5025 fi
5026 rm -f conftest*
5027 fi
5028
5029 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
5030
5031   case $host/$CC in
5032   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
5033     # old mingw systems require "-dll" to link a DLL, while more recent ones
5034     # require "-mdll"
5035     SAVE_CFLAGS="$CFLAGS"
5036     CFLAGS="$CFLAGS -mdll"
5037     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
5038 echo "configure:5039: checking how to link DLLs" >&5
5039 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
5040   echo $ac_n "(cached) $ac_c" 1>&6
5041 else
5042   cat > conftest.$ac_ext <<EOF
5043 #line 5044 "configure"
5044 #include "confdefs.h"
5045
5046 int main() {
5047
5048 ; return 0; }
5049 EOF
5050 if { (eval echo configure:5051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5051   rm -rf conftest*
5052   lt_cv_cc_dll_switch=-mdll
5053 else
5054   echo "configure: failed program was:" >&5
5055   cat conftest.$ac_ext >&5
5056   rm -rf conftest*
5057   lt_cv_cc_dll_switch=-dll
5058 fi
5059 rm -f conftest*
5060 fi
5061
5062 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
5063     CFLAGS="$SAVE_CFLAGS" ;;
5064   *-*-cygwin* | *-*-pw32*)
5065     # cygwin systems need to pass --dll to the linker, and not link
5066     # crt.o which will require a WinMain@16 definition.
5067     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
5068   esac
5069   ;;
5070   
5071 esac
5072
5073 # Sed substitution that helps us do robust quoting.  It backslashifies
5074 # metacharacters that are still active within double-quoted strings.
5075 Xsed='sed -e s/^X//'
5076 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
5077
5078 # Same as above, but do not quote variable references.
5079 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
5080
5081 # Sed substitution to delay expansion of an escaped shell variable in a
5082 # double_quote_subst'ed string.
5083 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5084
5085 # Constants:
5086 rm="rm -f"
5087
5088 # Global variables:
5089 default_ofile=libtool
5090 can_build_shared=yes
5091
5092 # All known linkers require a `.a' archive for static linking (except M$VC,
5093 # which needs '.lib').
5094 libext=a
5095 ltmain="$ac_aux_dir/ltmain.sh"
5096 ofile="$default_ofile"
5097 with_gnu_ld="$lt_cv_prog_gnu_ld"
5098 need_locks="$enable_libtool_lock"
5099
5100 old_CC="$CC"
5101 old_CFLAGS="$CFLAGS"
5102
5103 # Set sane defaults for various variables
5104 test -z "$AR" && AR=ar
5105 test -z "$AR_FLAGS" && AR_FLAGS=cru
5106 test -z "$AS" && AS=as
5107 test -z "$CC" && CC=cc
5108 test -z "$DLLTOOL" && DLLTOOL=dlltool
5109 test -z "$LD" && LD=ld
5110 test -z "$LN_S" && LN_S="ln -s"
5111 test -z "$MAGIC_CMD" && MAGIC_CMD=file
5112 test -z "$NM" && NM=nm
5113 test -z "$OBJDUMP" && OBJDUMP=objdump
5114 test -z "$RANLIB" && RANLIB=:
5115 test -z "$STRIP" && STRIP=:
5116 test -z "$ac_objext" && ac_objext=o
5117
5118 if test x"$host" != x"$build"; then
5119   ac_tool_prefix=${host_alias}-
5120 else
5121   ac_tool_prefix=
5122 fi
5123
5124 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
5125 case $host_os in
5126 linux-gnu*) ;;
5127 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5128 esac
5129
5130 case $host_os in
5131 aix3*)
5132   # AIX sometimes has problems with the GCC collect2 program.  For some
5133   # reason, if we set the COLLECT_NAMES environment variable, the problems
5134   # vanish in a puff of smoke.
5135   if test "X${COLLECT_NAMES+set}" != Xset; then
5136     COLLECT_NAMES=
5137     export COLLECT_NAMES
5138   fi
5139   ;;
5140 esac
5141
5142 # Determine commands to create old-style static archives.
5143 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5144 old_postinstall_cmds='chmod 644 $oldlib'
5145 old_postuninstall_cmds=
5146
5147 if test -n "$RANLIB"; then
5148   case $host_os in
5149   openbsd*)
5150     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5151     ;;
5152   *)
5153     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5154     ;;
5155   esac
5156   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5157 fi
5158
5159 # Allow CC to be a program name with arguments.
5160 set dummy $CC
5161 compiler="$2"
5162
5163 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5164 echo "configure:5165: checking for objdir" >&5
5165 rm -f .libs 2>/dev/null
5166 mkdir .libs 2>/dev/null
5167 if test -d .libs; then
5168   objdir=.libs
5169 else
5170   # MS-DOS does not allow filenames that begin with a dot.
5171   objdir=_libs
5172 fi
5173 rmdir .libs 2>/dev/null
5174 echo "$ac_t""$objdir" 1>&6
5175
5176
5177 # Check whether --with-pic or --without-pic was given.
5178 if test "${with_pic+set}" = set; then
5179   withval="$with_pic"
5180   pic_mode="$withval"
5181 else
5182   pic_mode=default
5183 fi
5184
5185 test -z "$pic_mode" && pic_mode=default
5186
5187 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5188 # in isolation, and that seeing it set (from the cache) indicates that
5189 # the associated values are set (in the cache) correctly too.
5190 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5191 echo "configure:5192: checking for $compiler option to produce PIC" >&5
5192 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5193   echo $ac_n "(cached) $ac_c" 1>&6
5194 else
5195    lt_cv_prog_cc_pic=
5196   lt_cv_prog_cc_shlib=
5197   lt_cv_prog_cc_wl=
5198   lt_cv_prog_cc_static=
5199   lt_cv_prog_cc_no_builtin=
5200   lt_cv_prog_cc_can_build_shared=$can_build_shared
5201
5202   if test "$GCC" = yes; then
5203     lt_cv_prog_cc_wl='-Wl,'
5204     lt_cv_prog_cc_static='-static'
5205
5206     case $host_os in
5207     aix*)
5208       # Below there is a dirty hack to force normal static linking with -ldl
5209       # The problem is because libdl dynamically linked with both libc and
5210       # libC (AIX C++ library), which obviously doesn't included in libraries
5211       # list by gcc. This cause undefined symbols with -static flags.
5212       # This hack allows C programs to be linked with "-static -ldl", but
5213       # not sure about C++ programs.
5214       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5215       ;;
5216     amigaos*)
5217       # FIXME: we need at least 68020 code to build shared libraries, but
5218       # adding the `-m68020' flag to GCC prevents building anything better,
5219       # like `-m68040'.
5220       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5221       ;;
5222     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5223       # PIC is the default for these OSes.
5224       ;;
5225     darwin* | rhapsody*)
5226       # PIC is the default on this platform
5227       # Common symbols not allowed in MH_DYLIB files
5228       lt_cv_prog_cc_pic='-fno-common'
5229       ;;
5230     cygwin* | mingw* | pw32* | os2*)
5231       # This hack is so that the source file can tell whether it is being
5232       # built for inclusion in a dll (and should export symbols for example).
5233       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5234       ;;
5235     sysv4*MP*)
5236       if test -d /usr/nec; then
5237          lt_cv_prog_cc_pic=-Kconform_pic
5238       fi
5239       ;;
5240     *)
5241       lt_cv_prog_cc_pic='-fPIC'
5242       ;;
5243     esac
5244   else
5245     # PORTME Check for PIC flags for the system compiler.
5246     case $host_os in
5247     aix3* | aix4* | aix5*)
5248       lt_cv_prog_cc_wl='-Wl,'
5249       # All AIX code is PIC.
5250       if test "$host_cpu" = ia64; then
5251         # AIX 5 now supports IA64 processor
5252         lt_cv_prog_cc_static='-Bstatic'
5253       else
5254         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5255       fi
5256       ;;
5257
5258     hpux9* | hpux10* | hpux11*)
5259       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5260       lt_cv_prog_cc_wl='-Wl,'
5261       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5262       lt_cv_prog_cc_pic='+Z'
5263       ;;
5264
5265     irix5* | irix6* | nonstopux*)
5266       lt_cv_prog_cc_wl='-Wl,'
5267       lt_cv_prog_cc_static='-non_shared'
5268       # PIC (with -KPIC) is the default.
5269       ;;
5270
5271     cygwin* | mingw* | pw32* | os2*)
5272       # This hack is so that the source file can tell whether it is being
5273       # built for inclusion in a dll (and should export symbols for example).
5274       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5275       ;;
5276
5277     newsos6)
5278       lt_cv_prog_cc_pic='-KPIC'
5279       lt_cv_prog_cc_static='-Bstatic'
5280       ;;
5281     
5282     openedition)
5283       # XPLINK code is PIC by default
5284       ;;
5285
5286     osf3* | osf4* | osf5*)
5287       # All OSF/1 code is PIC.
5288       lt_cv_prog_cc_wl='-Wl,'
5289       lt_cv_prog_cc_static='-non_shared'
5290       ;;
5291
5292     sco3.2v5*)
5293       lt_cv_prog_cc_pic='-Kpic'
5294       lt_cv_prog_cc_static='-dn'
5295       lt_cv_prog_cc_shlib='-belf'
5296       ;;
5297
5298     solaris*)
5299       lt_cv_prog_cc_pic='-KPIC'
5300       lt_cv_prog_cc_static='-Bstatic'
5301       lt_cv_prog_cc_wl='-Wl,'
5302       ;;
5303
5304     sunos4*)
5305       lt_cv_prog_cc_pic='-PIC'
5306       lt_cv_prog_cc_static='-Bstatic'
5307       lt_cv_prog_cc_wl='-Qoption ld '
5308       ;;
5309
5310     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5311       lt_cv_prog_cc_pic='-KPIC'
5312       lt_cv_prog_cc_static='-Bstatic'
5313       lt_cv_prog_cc_wl='-Wl,'
5314       ;;
5315
5316     uts4*)
5317       lt_cv_prog_cc_pic='-pic'
5318       lt_cv_prog_cc_static='-Bstatic'
5319       ;;
5320
5321     sysv4*MP*)
5322       if test -d /usr/nec ;then
5323         lt_cv_prog_cc_pic='-Kconform_pic'
5324         lt_cv_prog_cc_static='-Bstatic'
5325       fi
5326       ;;
5327
5328     *)
5329       lt_cv_prog_cc_can_build_shared=no
5330       ;;
5331     esac
5332   fi
5333
5334 fi
5335
5336 if test -z "$lt_cv_prog_cc_pic"; then
5337   echo "$ac_t""none" 1>&6
5338 else
5339   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5340
5341   # Check to make sure the pic_flag actually works.
5342   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5343 echo "configure:5344: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5344   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5345   echo $ac_n "(cached) $ac_c" 1>&6
5346 else
5347       save_CFLAGS="$CFLAGS"
5348     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5349     cat > conftest.$ac_ext <<EOF
5350 #line 5351 "configure"
5351 #include "confdefs.h"
5352
5353 int main() {
5354
5355 ; return 0; }
5356 EOF
5357 if { (eval echo configure:5358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5358   rm -rf conftest*
5359         case $host_os in
5360       hpux9* | hpux10* | hpux11*)
5361         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5362         # they create non-PIC objects.  So, if there were any warnings, we
5363         # assume that PIC is not supported.
5364         if test -s conftest.err; then
5365           lt_cv_prog_cc_pic_works=no
5366         else
5367           lt_cv_prog_cc_pic_works=yes
5368         fi
5369         ;;
5370       *)
5371         lt_cv_prog_cc_pic_works=yes
5372         ;;
5373       esac
5374     
5375 else
5376   echo "configure: failed program was:" >&5
5377   cat conftest.$ac_ext >&5
5378   rm -rf conftest*
5379         lt_cv_prog_cc_pic_works=no
5380     
5381 fi
5382 rm -f conftest*
5383     CFLAGS="$save_CFLAGS"
5384   
5385 fi
5386
5387
5388   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5389     lt_cv_prog_cc_pic=
5390     lt_cv_prog_cc_can_build_shared=no
5391   else
5392     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5393   fi
5394
5395   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5396 fi
5397
5398 # Check for any special shared library compilation flags.
5399 if test -n "$lt_cv_prog_cc_shlib"; then
5400   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5401   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5402   else
5403    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5404     lt_cv_prog_cc_can_build_shared=no
5405   fi
5406 fi
5407
5408 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5409 echo "configure:5410: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5410 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5411   echo $ac_n "(cached) $ac_c" 1>&6
5412 else
5413     lt_cv_prog_cc_static_works=no
5414   save_LDFLAGS="$LDFLAGS"
5415   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5416   cat > conftest.$ac_ext <<EOF
5417 #line 5418 "configure"
5418 #include "confdefs.h"
5419
5420 int main() {
5421
5422 ; return 0; }
5423 EOF
5424 if { (eval echo configure:5425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5425   rm -rf conftest*
5426   lt_cv_prog_cc_static_works=yes
5427 else
5428   echo "configure: failed program was:" >&5
5429   cat conftest.$ac_ext >&5
5430 fi
5431 rm -f conftest*
5432   LDFLAGS="$save_LDFLAGS"
5433
5434 fi
5435
5436
5437 # Belt *and* braces to stop my trousers falling down:
5438 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5439 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5440
5441 pic_flag="$lt_cv_prog_cc_pic"
5442 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5443 wl="$lt_cv_prog_cc_wl"
5444 link_static_flag="$lt_cv_prog_cc_static"
5445 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5446 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5447
5448
5449 # Check to see if options -o and -c are simultaneously supported by compiler
5450 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5451 echo "configure:5452: checking if $compiler supports -c -o file.$ac_objext" >&5
5452 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5453   echo $ac_n "(cached) $ac_c" 1>&6
5454 else
5455   
5456 $rm -r conftest 2>/dev/null
5457 mkdir conftest
5458 cd conftest
5459 echo "int some_variable = 0;" > conftest.$ac_ext
5460 mkdir out
5461 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5462 # that will create temporary files in the current directory regardless of
5463 # the output directory.  Thus, making CWD read-only will cause this test
5464 # to fail, enabling locking or at least warning the user not to do parallel
5465 # builds.
5466 chmod -w .
5467 save_CFLAGS="$CFLAGS"
5468 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5469 compiler_c_o=no
5470 if { (eval echo configure:5471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5471   # The compiler can only warn and ignore the option if not recognized
5472   # So say no if there are warnings
5473   if test -s out/conftest.err; then
5474     lt_cv_compiler_c_o=no
5475   else
5476     lt_cv_compiler_c_o=yes
5477   fi
5478 else
5479   # Append any errors to the config.log.
5480   cat out/conftest.err 1>&5
5481   lt_cv_compiler_c_o=no
5482 fi
5483 CFLAGS="$save_CFLAGS"
5484 chmod u+w .
5485 $rm conftest* out/*
5486 rmdir out
5487 cd ..
5488 rmdir conftest
5489 $rm -r conftest 2>/dev/null
5490
5491 fi
5492
5493 compiler_c_o=$lt_cv_compiler_c_o
5494 echo "$ac_t""$compiler_c_o" 1>&6
5495
5496 if test x"$compiler_c_o" = x"yes"; then
5497   # Check to see if we can write to a .lo
5498   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5499 echo "configure:5500: checking if $compiler supports -c -o file.lo" >&5
5500   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5501   echo $ac_n "(cached) $ac_c" 1>&6
5502 else
5503   
5504   lt_cv_compiler_o_lo=no
5505   save_CFLAGS="$CFLAGS"
5506   CFLAGS="$CFLAGS -c -o conftest.lo"
5507   save_objext="$ac_objext"
5508   ac_objext=lo
5509   cat > conftest.$ac_ext <<EOF
5510 #line 5511 "configure"
5511 #include "confdefs.h"
5512
5513 int main() {
5514 int some_variable = 0;
5515 ; return 0; }
5516 EOF
5517 if { (eval echo configure:5518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5518   rm -rf conftest*
5519       # The compiler can only warn and ignore the option if not recognized
5520     # So say no if there are warnings
5521     if test -s conftest.err; then
5522       lt_cv_compiler_o_lo=no
5523     else
5524       lt_cv_compiler_o_lo=yes
5525     fi
5526   
5527 else
5528   echo "configure: failed program was:" >&5
5529   cat conftest.$ac_ext >&5
5530 fi
5531 rm -f conftest*
5532   ac_objext="$save_objext"
5533   CFLAGS="$save_CFLAGS"
5534   
5535 fi
5536
5537   compiler_o_lo=$lt_cv_compiler_o_lo
5538   echo "$ac_t""$compiler_o_lo" 1>&6
5539 else
5540   compiler_o_lo=no
5541 fi
5542
5543 # Check to see if we can do hard links to lock some files if needed
5544 hard_links="nottested"
5545 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5546   # do not overwrite the value of need_locks provided by the user
5547   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5548 echo "configure:5549: checking if we can lock with hard links" >&5
5549   hard_links=yes
5550   $rm conftest*
5551   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5552   touch conftest.a
5553   ln conftest.a conftest.b 2>&5 || hard_links=no
5554   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5555   echo "$ac_t""$hard_links" 1>&6
5556   if test "$hard_links" = no; then
5557     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5558     need_locks=warn
5559   fi
5560 else
5561   need_locks=no
5562 fi
5563
5564 if test "$GCC" = yes; then
5565   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5566   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5567 echo "configure:5568: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5568   echo "int some_variable = 0;" > conftest.$ac_ext
5569   save_CFLAGS="$CFLAGS"
5570   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5571   compiler_rtti_exceptions=no
5572   cat > conftest.$ac_ext <<EOF
5573 #line 5574 "configure"
5574 #include "confdefs.h"
5575
5576 int main() {
5577 int some_variable = 0;
5578 ; return 0; }
5579 EOF
5580 if { (eval echo configure:5581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5581   rm -rf conftest*
5582       # The compiler can only warn and ignore the option if not recognized
5583     # So say no if there are warnings
5584     if test -s conftest.err; then
5585       compiler_rtti_exceptions=no
5586     else
5587       compiler_rtti_exceptions=yes
5588     fi
5589   
5590 else
5591   echo "configure: failed program was:" >&5
5592   cat conftest.$ac_ext >&5
5593 fi
5594 rm -f conftest*
5595   CFLAGS="$save_CFLAGS"
5596   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5597
5598   if test "$compiler_rtti_exceptions" = "yes"; then
5599     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5600   else
5601     no_builtin_flag=' -fno-builtin'
5602   fi
5603 fi
5604
5605 # See if the linker supports building shared libraries.
5606 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5607 echo "configure:5608: checking whether the linker ($LD) supports shared libraries" >&5
5608
5609 allow_undefined_flag=
5610 no_undefined_flag=
5611 need_lib_prefix=unknown
5612 need_version=unknown
5613 # when you set need_version to no, make sure it does not cause -set_version
5614 # flags to be left without arguments
5615 archive_cmds=
5616 archive_expsym_cmds=
5617 old_archive_from_new_cmds=
5618 old_archive_from_expsyms_cmds=
5619 export_dynamic_flag_spec=
5620 whole_archive_flag_spec=
5621 thread_safe_flag_spec=
5622 hardcode_into_libs=no
5623 hardcode_libdir_flag_spec=
5624 hardcode_libdir_separator=
5625 hardcode_direct=no
5626 hardcode_minus_L=no
5627 hardcode_shlibpath_var=unsupported
5628 runpath_var=
5629 link_all_deplibs=unknown
5630 always_export_symbols=no
5631 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5632 # include_expsyms should be a list of space-separated symbols to be *always*
5633 # included in the symbol list
5634 include_expsyms=
5635 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5636 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5637 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5638 # as well as any symbol that contains `d'.
5639 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5640 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5641 # platforms (ab)use it in PIC code, but their linkers get confused if
5642 # the symbol is explicitly referenced.  Since portable code cannot
5643 # rely on this symbol name, it's probably fine to never include it in
5644 # preloaded symbol tables.
5645 extract_expsyms_cmds=
5646
5647 case $host_os in
5648 cygwin* | mingw* | pw32*)
5649   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5650   # When not using gcc, we currently assume that we are using
5651   # Microsoft Visual C++.
5652   if test "$GCC" != yes; then
5653     with_gnu_ld=no
5654   fi
5655   ;;
5656 openbsd*)
5657   with_gnu_ld=no
5658   ;;
5659 esac
5660
5661 ld_shlibs=yes
5662 if test "$with_gnu_ld" = yes; then
5663   # If archive_cmds runs LD, not CC, wlarc should be empty
5664   wlarc='${wl}'
5665
5666   # See if GNU ld supports shared libraries.
5667   case $host_os in
5668   aix3* | aix4* | aix5*)
5669     # On AIX, the GNU linker is very broken
5670     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5671     ld_shlibs=no
5672     cat <<EOF 1>&2
5673
5674 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5675 *** to be unable to reliably create shared libraries on AIX.
5676 *** Therefore, libtool is disabling shared libraries support.  If you
5677 *** really care for shared libraries, you may want to modify your PATH
5678 *** so that a non-GNU linker is found, and then restart.
5679
5680 EOF
5681     ;;
5682
5683   amigaos*)
5684     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)'
5685     hardcode_libdir_flag_spec='-L$libdir'
5686     hardcode_minus_L=yes
5687
5688     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5689     # that the semantics of dynamic libraries on AmigaOS, at least up
5690     # to version 4, is to share data among multiple programs linked
5691     # with the same dynamic library.  Since this doesn't match the
5692     # behavior of shared libraries on other platforms, we can use
5693     # them.
5694     ld_shlibs=no
5695     ;;
5696
5697   beos*)
5698     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5699       allow_undefined_flag=unsupported
5700       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5701       # support --undefined.  This deserves some investigation.  FIXME
5702       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5703     else
5704       ld_shlibs=no
5705     fi
5706     ;;
5707
5708   cygwin* | mingw* | pw32*)
5709     # hardcode_libdir_flag_spec is actually meaningless, as there is
5710     # no search path for DLLs.
5711     hardcode_libdir_flag_spec='-L$libdir'
5712     allow_undefined_flag=unsupported
5713     always_export_symbols=yes
5714
5715     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5716       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5717       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5718       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5719       else $CC -o impgen impgen.c ; fi)~
5720       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5721
5722     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5723
5724     # cygwin and mingw dlls have different entry points and sets of symbols
5725     # to exclude.
5726     # FIXME: what about values for MSVC?
5727     dll_entry=__cygwin_dll_entry@12
5728     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5729     case $host_os in
5730     mingw*)
5731       # mingw values
5732       dll_entry=_DllMainCRTStartup@12
5733       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5734       ;;
5735     esac
5736
5737     # mingw and cygwin differ, and it's simplest to just exclude the union
5738     # of the two symbol sets.
5739     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5740
5741     # recent cygwin and mingw systems supply a stub DllMain which the user
5742     # can override, but on older systems we have to supply one (in ltdll.c)
5743     if test "x$lt_cv_need_dllmain" = "xyes"; then
5744       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5745       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~
5746         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5747     else
5748       ltdll_obj=
5749       ltdll_cmds=
5750     fi
5751
5752     # Extract the symbol export list from an `--export-all' def file,
5753     # then regenerate the def file from the symbol export list, so that
5754     # the compiled dll only exports the symbol export list.
5755     # Be careful not to strip the DATA tag left be newer dlltools.
5756     export_symbols_cmds="$ltdll_cmds"'
5757       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5758       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5759
5760     # If the export-symbols file already is a .def file (1st line
5761     # is EXPORTS), use it as is.
5762     # If DATA tags from a recent dlltool are present, honour them!
5763     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5764         cp $export_symbols $output_objdir/$soname-def;
5765       else
5766         echo EXPORTS > $output_objdir/$soname-def;
5767         _lt_hint=1;
5768         cat $export_symbols | while read symbol; do
5769          set dummy \$symbol;
5770          case \$# in
5771            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5772            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5773            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5774          esac;
5775          _lt_hint=`expr 1 + \$_lt_hint`;
5776         done;
5777       fi~
5778       '"$ltdll_cmds"'
5779       $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~
5780       $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~
5781       $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~
5782       $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~
5783       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5784     ;;
5785
5786   netbsd*)
5787     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5788       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5789       wlarc=
5790     else
5791       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5792       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5793     fi
5794     ;;
5795
5796   solaris* | sysv5*)
5797     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5798       ld_shlibs=no
5799       cat <<EOF 1>&2
5800
5801 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5802 *** create shared libraries on Solaris systems.  Therefore, libtool
5803 *** is disabling shared libraries support.  We urge you to upgrade GNU
5804 *** binutils to release 2.9.1 or newer.  Another option is to modify
5805 *** your PATH or compiler configuration so that the native linker is
5806 *** used, and then restart.
5807
5808 EOF
5809     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5810       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5811       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5812     else
5813       ld_shlibs=no
5814     fi
5815     ;;
5816
5817   sunos4*)
5818     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5819     wlarc=
5820     hardcode_direct=yes
5821     hardcode_shlibpath_var=no
5822     ;;
5823
5824   *)
5825     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5826       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5827       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5828     else
5829       ld_shlibs=no
5830     fi
5831     ;;
5832   esac
5833
5834   if test "$ld_shlibs" = yes; then
5835     runpath_var=LD_RUN_PATH
5836     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5837     export_dynamic_flag_spec='${wl}--export-dynamic'
5838     case $host_os in
5839     cygwin* | mingw* | pw32*)
5840       # dlltool doesn't understand --whole-archive et. al.
5841       whole_archive_flag_spec=
5842       ;;
5843     *)
5844       # ancient GNU ld didn't support --whole-archive et. al.
5845       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5846         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5847       else
5848         whole_archive_flag_spec=
5849       fi
5850       ;;
5851     esac
5852   fi
5853 else
5854   # PORTME fill in a description of your system's linker (not GNU ld)
5855   case $host_os in
5856   aix3*)
5857     allow_undefined_flag=unsupported
5858     always_export_symbols=yes
5859     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'
5860     # Note: this linker hardcodes the directories in LIBPATH if there
5861     # are no directories specified by -L.
5862     hardcode_minus_L=yes
5863     if test "$GCC" = yes && test -z "$link_static_flag"; then
5864       # Neither direct hardcoding nor static linking is supported with a
5865       # broken collect2.
5866       hardcode_direct=unsupported
5867     fi
5868     ;;
5869
5870   aix4* | aix5*)
5871     if test "$host_cpu" = ia64; then
5872       # On IA64, the linker does run time linking by default, so we don't
5873       # have to do anything special.
5874       aix_use_runtimelinking=no
5875       exp_sym_flag='-Bexport'
5876       no_entry_flag=""
5877     else
5878       aix_use_runtimelinking=no
5879
5880       # Test if we are trying to use run time linking or normal
5881       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5882       # need to do runtime linking.
5883       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5884         for ld_flag in $LDFLAGS; do
5885           case $ld_flag in
5886           *-brtl*)
5887             aix_use_runtimelinking=yes
5888             break
5889           ;;
5890           esac
5891         done
5892       esac
5893
5894       exp_sym_flag='-bexport'
5895       no_entry_flag='-bnoentry'
5896     fi
5897
5898     # When large executables or shared objects are built, AIX ld can
5899     # have problems creating the table of contents.  If linking a library
5900     # or program results in "error TOC overflow" add -mminimal-toc to
5901     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5902     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5903
5904     hardcode_direct=yes
5905     archive_cmds=''
5906     hardcode_libdir_separator=':'
5907     if test "$GCC" = yes; then
5908       case $host_os in aix4.[012]|aix4.[012].*)
5909         collect2name=`${CC} -print-prog-name=collect2`
5910         if test -f "$collect2name" && \
5911           strings "$collect2name" | grep resolve_lib_name >/dev/null
5912         then
5913           # We have reworked collect2
5914           hardcode_direct=yes
5915         else
5916           # We have old collect2
5917           hardcode_direct=unsupported
5918           # It fails to find uninstalled libraries when the uninstalled
5919           # path is not listed in the libpath.  Setting hardcode_minus_L
5920           # to unsupported forces relinking
5921           hardcode_minus_L=yes
5922           hardcode_libdir_flag_spec='-L$libdir'
5923           hardcode_libdir_separator=
5924         fi
5925       esac
5926
5927       shared_flag='-shared'
5928     else
5929       # not using gcc
5930       if test "$host_cpu" = ia64; then
5931         shared_flag='${wl}-G'
5932       else
5933         if test "$aix_use_runtimelinking" = yes; then
5934           shared_flag='${wl}-G'
5935         else
5936           shared_flag='${wl}-bM:SRE'
5937         fi
5938       fi
5939     fi
5940
5941     # It seems that -bexpall can do strange things, so it is better to
5942     # generate a list of symbols to export.
5943     always_export_symbols=yes
5944     if test "$aix_use_runtimelinking" = yes; then
5945       # Warning - without using the other runtime loading flags (-brtl),
5946       # -berok will link without error, but may produce a broken library.
5947       allow_undefined_flag='-berok'
5948       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5949       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"
5950     else
5951       if test "$host_cpu" = ia64; then
5952         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5953         allow_undefined_flag="-z nodefs"
5954         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"
5955       else
5956         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5957         # Warning - without using the other run time loading flags,
5958         # -berok will link without error, but may produce a broken library.
5959         allow_undefined_flag='${wl}-berok'
5960         # This is a bit strange, but is similar to how AIX traditionally builds
5961         # it's shared libraries.
5962         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'
5963       fi
5964     fi
5965     ;;
5966
5967   amigaos*)
5968     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)'
5969     hardcode_libdir_flag_spec='-L$libdir'
5970     hardcode_minus_L=yes
5971     # see comment about different semantics on the GNU ld section
5972     ld_shlibs=no
5973     ;;
5974
5975   cygwin* | mingw* | pw32*)
5976     # When not using gcc, we currently assume that we are using
5977     # Microsoft Visual C++.
5978     # hardcode_libdir_flag_spec is actually meaningless, as there is
5979     # no search path for DLLs.
5980     hardcode_libdir_flag_spec=' '
5981     allow_undefined_flag=unsupported
5982     # Tell ltmain to make .lib files, not .a files.
5983     libext=lib
5984     # FIXME: Setting linknames here is a bad hack.
5985     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5986     # The linker will automatically build a .lib file if we build a DLL.
5987     old_archive_from_new_cmds='true'
5988     # FIXME: Should let the user specify the lib program.
5989     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5990     fix_srcfile_path='`cygpath -w "$srcfile"`'
5991     ;;
5992
5993   darwin* | rhapsody*)
5994     case "$host_os" in
5995     rhapsody* | darwin1.[012])
5996       allow_undefined_flag='-undefined suppress'
5997       ;;
5998     *) # Darwin 1.3 on
5999       allow_undefined_flag='-flat_namespace -undefined suppress'
6000       ;;
6001     esac
6002     # FIXME: Relying on posixy $() will cause problems for
6003     #        cross-compilation, but unfortunately the echo tests do not
6004     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
6005     #        `"' quotes if we put them in here... so don't!
6006     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)'
6007     # We need to add '_' to the symbols in $export_symbols first
6008     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
6009     hardcode_direct=yes
6010     hardcode_shlibpath_var=no
6011     whole_archive_flag_spec='-all_load $convenience'
6012     ;;
6013
6014   freebsd1*)
6015     ld_shlibs=no
6016     ;;
6017
6018   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6019   # support.  Future versions do this automatically, but an explicit c++rt0.o
6020   # does not break anything, and helps significantly (at the cost of a little
6021   # extra space).
6022   freebsd2.2*)
6023     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6024     hardcode_libdir_flag_spec='-R$libdir'
6025     hardcode_direct=yes
6026     hardcode_shlibpath_var=no
6027     ;;
6028
6029   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6030   freebsd2*)
6031     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6032     hardcode_direct=yes
6033     hardcode_minus_L=yes
6034     hardcode_shlibpath_var=no
6035     ;;
6036
6037   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6038   freebsd*)
6039     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6040     hardcode_libdir_flag_spec='-R$libdir'
6041     hardcode_direct=yes
6042     hardcode_shlibpath_var=no
6043     ;;
6044
6045   hpux9* | hpux10* | hpux11*)
6046     case $host_os in
6047     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' ;;
6048     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
6049     esac
6050     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6051     hardcode_libdir_separator=:
6052     hardcode_direct=yes
6053     hardcode_minus_L=yes # Not in the search PATH, but as the default
6054                          # location of the library.
6055     export_dynamic_flag_spec='${wl}-E'
6056     ;;
6057
6058   irix5* | irix6* | nonstopux*)
6059     if test "$GCC" = yes; then
6060       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'
6061       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6062     else
6063       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'
6064       hardcode_libdir_flag_spec='-rpath $libdir'
6065     fi
6066     hardcode_libdir_separator=:
6067     link_all_deplibs=yes
6068     ;;
6069
6070   netbsd*)
6071     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6072       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6073     else
6074       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6075     fi
6076     hardcode_libdir_flag_spec='-R$libdir'
6077     hardcode_direct=yes
6078     hardcode_shlibpath_var=no
6079     ;;
6080
6081   newsos6)
6082     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6083     hardcode_direct=yes
6084     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6085     hardcode_libdir_separator=:
6086     hardcode_shlibpath_var=no
6087     ;;
6088
6089   openbsd*)
6090     hardcode_direct=yes
6091     hardcode_shlibpath_var=no
6092     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6093       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6094       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6095       export_dynamic_flag_spec='${wl}-E'
6096     else
6097       case "$host_os" in
6098       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
6099         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6100         hardcode_libdir_flag_spec='-R$libdir'
6101         ;;
6102       *)
6103         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6104         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6105         ;;
6106       esac
6107     fi
6108     ;;
6109
6110   openedition*)
6111     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
6112         cp \$linknames \$output_objdir && linknames=''"
6113     export_dynamic_flag_spec="-Wl,DLL"
6114     ;;
6115
6116   os2*)
6117     hardcode_libdir_flag_spec='-L$libdir'
6118     hardcode_minus_L=yes
6119     allow_undefined_flag=unsupported
6120     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'
6121     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6122     ;;
6123
6124   osf3*)
6125     if test "$GCC" = yes; then
6126       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6127       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'
6128     else
6129       allow_undefined_flag=' -expect_unresolved \*'
6130       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'
6131     fi
6132     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6133     hardcode_libdir_separator=:
6134     ;;
6135
6136   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6137     if test "$GCC" = yes; then
6138       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6139       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'
6140       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6141     else
6142       allow_undefined_flag=' -expect_unresolved \*'
6143       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'
6144       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6145       $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'
6146
6147       #Both c and cxx compiler support -rpath directly
6148       hardcode_libdir_flag_spec='-rpath $libdir'
6149     fi
6150     hardcode_libdir_separator=:
6151     ;;
6152
6153   sco3.2v5*)
6154     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6155     hardcode_shlibpath_var=no
6156     runpath_var=LD_RUN_PATH
6157     hardcode_runpath_var=yes
6158     export_dynamic_flag_spec='${wl}-Bexport'
6159     ;;
6160
6161   solaris*)
6162     # gcc --version < 3.0 without binutils cannot create self contained
6163     # shared libraries reliably, requiring libgcc.a to resolve some of
6164     # the object symbols generated in some cases.  Libraries that use
6165     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6166     # a copy of libgcc.a into every shared library to guarantee resolving
6167     # such symbols causes other problems:  According to Tim Van Holder
6168     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6169     # (to the application) exception stack for one thing.
6170     no_undefined_flag=' -z defs'
6171     if test "$GCC" = yes; then
6172       case `$CC --version 2>/dev/null` in
6173       [12].*)
6174         cat <<EOF 1>&2
6175
6176 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6177 *** create self contained shared libraries on Solaris systems, without
6178 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6179 *** -no-undefined support, which will at least allow you to build shared
6180 *** libraries.  However, you may find that when you link such libraries
6181 *** into an application without using GCC, you have to manually add
6182 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6183 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6184 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6185
6186 EOF
6187         no_undefined_flag=
6188         ;;
6189       esac
6190     fi
6191     # $CC -shared without GNU ld will not create a library from C++
6192     # object files and a static libstdc++, better avoid it by now
6193     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6194     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6195                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6196     hardcode_libdir_flag_spec='-R$libdir'
6197     hardcode_shlibpath_var=no
6198     case $host_os in
6199     solaris2.[0-5] | solaris2.[0-5].*) ;;
6200     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6201       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6202     esac
6203     link_all_deplibs=yes
6204     ;;
6205
6206   sunos4*)
6207     if test "x$host_vendor" = xsequent; then
6208       # Use $CC to link under sequent, because it throws in some extra .o
6209       # files that make .init and .fini sections work.
6210       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6211     else
6212       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6213     fi
6214     hardcode_libdir_flag_spec='-L$libdir'
6215     hardcode_direct=yes
6216     hardcode_minus_L=yes
6217     hardcode_shlibpath_var=no
6218     ;;
6219
6220   sysv4)
6221     case $host_vendor in
6222       sni)
6223         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6224         hardcode_direct=yes # is this really true???
6225         ;;
6226       siemens)
6227         ## LD is ld it makes a PLAMLIB
6228         ## CC just makes a GrossModule.
6229         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6230         reload_cmds='$CC -r -o $output$reload_objs'
6231         hardcode_direct=no
6232         ;;
6233       motorola)
6234         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6235         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6236         ;;
6237     esac
6238     runpath_var='LD_RUN_PATH'
6239     hardcode_shlibpath_var=no
6240     ;;
6241
6242   sysv4.3*)
6243     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6244     hardcode_shlibpath_var=no
6245     export_dynamic_flag_spec='-Bexport'
6246     ;;
6247
6248   sysv5*)
6249     no_undefined_flag=' -z text'
6250     # $CC -shared without GNU ld will not create a library from C++
6251     # object files and a static libstdc++, better avoid it by now
6252     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6253     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6254                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6255     hardcode_libdir_flag_spec=
6256     hardcode_shlibpath_var=no
6257     runpath_var='LD_RUN_PATH'
6258     ;;
6259
6260   uts4*)
6261     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6262     hardcode_libdir_flag_spec='-L$libdir'
6263     hardcode_shlibpath_var=no
6264     ;;
6265
6266   dgux*)
6267     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6268     hardcode_libdir_flag_spec='-L$libdir'
6269     hardcode_shlibpath_var=no
6270     ;;
6271
6272   sysv4*MP*)
6273     if test -d /usr/nec; then
6274       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6275       hardcode_shlibpath_var=no
6276       runpath_var=LD_RUN_PATH
6277       hardcode_runpath_var=yes
6278       ld_shlibs=yes
6279     fi
6280     ;;
6281
6282   sysv4.2uw2*)
6283     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6284     hardcode_direct=yes
6285     hardcode_minus_L=no
6286     hardcode_shlibpath_var=no
6287     hardcode_runpath_var=yes
6288     runpath_var=LD_RUN_PATH
6289     ;;
6290
6291   sysv5uw7* | unixware7*)
6292     no_undefined_flag='${wl}-z ${wl}text'
6293     if test "$GCC" = yes; then
6294       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6295     else
6296       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6297     fi
6298     runpath_var='LD_RUN_PATH'
6299     hardcode_shlibpath_var=no
6300     ;;
6301
6302   *)
6303     ld_shlibs=no
6304     ;;
6305   esac
6306 fi
6307 echo "$ac_t""$ld_shlibs" 1>&6
6308 test "$ld_shlibs" = no && can_build_shared=no
6309
6310 # Check hardcoding attributes.
6311 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6312 echo "configure:6313: checking how to hardcode library paths into programs" >&5
6313 hardcode_action=
6314 if test -n "$hardcode_libdir_flag_spec" || \
6315    test -n "$runpath_var"; then
6316
6317   # We can hardcode non-existant directories.
6318   if test "$hardcode_direct" != no &&
6319      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6320      # have to relink, otherwise we might link with an installed library
6321      # when we should be linking with a yet-to-be-installed one
6322      ## test "$hardcode_shlibpath_var" != no &&
6323      test "$hardcode_minus_L" != no; then
6324     # Linking always hardcodes the temporary library directory.
6325     hardcode_action=relink
6326   else
6327     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6328     hardcode_action=immediate
6329   fi
6330 else
6331   # We cannot hardcode anything, or else we can only hardcode existing
6332   # directories.
6333   hardcode_action=unsupported
6334 fi
6335 echo "$ac_t""$hardcode_action" 1>&6
6336
6337 striplib=
6338 old_striplib=
6339 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6340 echo "configure:6341: checking whether stripping libraries is possible" >&5
6341 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6342   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6343   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6344   echo "$ac_t""yes" 1>&6
6345 else
6346   echo "$ac_t""no" 1>&6
6347 fi
6348
6349 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6350 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6351
6352 # PORTME Fill in your ld.so characteristics
6353 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6354 echo "configure:6355: checking dynamic linker characteristics" >&5
6355 library_names_spec=
6356 libname_spec='lib$name'
6357 soname_spec=
6358 postinstall_cmds=
6359 postuninstall_cmds=
6360 finish_cmds=
6361 finish_eval=
6362 shlibpath_var=
6363 shlibpath_overrides_runpath=unknown
6364 version_type=none
6365 dynamic_linker="$host_os ld.so"
6366 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6367 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6368
6369 case $host_os in
6370 aix3*)
6371   version_type=linux
6372   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6373   shlibpath_var=LIBPATH
6374
6375   # AIX has no versioning support, so we append a major version to the name.
6376   soname_spec='${libname}${release}.so$major'
6377   ;;
6378
6379 aix4* | aix5*)
6380   version_type=linux
6381   need_lib_prefix=no
6382   need_version=no
6383   hardcode_into_libs=yes
6384   if test "$host_cpu" = ia64; then
6385     # AIX 5 supports IA64
6386     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6387     shlibpath_var=LD_LIBRARY_PATH
6388   else
6389     # With GCC up to 2.95.x, collect2 would create an import file
6390     # for dependence libraries.  The import file would start with
6391     # the line `#! .'.  This would cause the generated library to
6392     # depend on `.', always an invalid library.  This was fixed in
6393     # development snapshots of GCC prior to 3.0.
6394     case $host_os in
6395       aix4 | aix4.[01] | aix4.[01].*)
6396         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6397              echo ' yes '
6398              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6399           :
6400         else
6401           can_build_shared=no
6402         fi
6403         ;;
6404     esac
6405     # AIX (on Power*) has no versioning support, so currently we can
6406     # not hardcode correct soname into executable. Probably we can
6407     # add versioning support to collect2, so additional links can
6408     # be useful in future.
6409     if test "$aix_use_runtimelinking" = yes; then
6410       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6411       # instead of lib<name>.a to let people know that these are not
6412       # typical AIX shared libraries.
6413       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6414     else
6415       # We preserve .a as extension for shared libraries through AIX4.2
6416       # and later when we are not doing run time linking.
6417       library_names_spec='${libname}${release}.a $libname.a'
6418       soname_spec='${libname}${release}.so$major'
6419     fi
6420     shlibpath_var=LIBPATH
6421   fi
6422   hardcode_into_libs=yes
6423   ;;
6424
6425 amigaos*)
6426   library_names_spec='$libname.ixlibrary $libname.a'
6427   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6428   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'
6429   ;;
6430
6431 beos*)
6432   library_names_spec='${libname}.so'
6433   dynamic_linker="$host_os ld.so"
6434   shlibpath_var=LIBRARY_PATH
6435   ;;
6436
6437 bsdi4*)
6438   version_type=linux
6439   need_version=no
6440   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6441   soname_spec='${libname}${release}.so$major'
6442   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6443   shlibpath_var=LD_LIBRARY_PATH
6444   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6445   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6446   export_dynamic_flag_spec=-rdynamic
6447   # the default ld.so.conf also contains /usr/contrib/lib and
6448   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6449   # libtool to hard-code these into programs
6450   ;;
6451
6452 cygwin* | mingw* | pw32*)
6453   version_type=windows
6454   need_version=no
6455   need_lib_prefix=no
6456   case $GCC,$host_os in
6457   yes,cygwin*)
6458     library_names_spec='$libname.dll.a'
6459     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6460     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6461       dldir=$destdir/`dirname \$dlpath`~
6462       test -d \$dldir || mkdir -p \$dldir~
6463       $install_prog .libs/$dlname \$dldir/$dlname'
6464     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6465       dlpath=$dir/\$dldll~
6466        $rm \$dlpath'
6467     ;;
6468   yes,mingw*)
6469     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6470     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6471     ;;
6472   yes,pw32*)
6473     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6474     ;;
6475   *)
6476     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6477     ;;
6478   esac
6479   dynamic_linker='Win32 ld.exe'
6480   # FIXME: first we should search . and the directory the executable is in
6481   shlibpath_var=PATH
6482   ;;
6483
6484 darwin* | rhapsody*)
6485   dynamic_linker="$host_os dyld"
6486   version_type=darwin
6487   need_lib_prefix=no
6488   need_version=no
6489   # FIXME: Relying on posixy $() will cause problems for
6490   #        cross-compilation, but unfortunately the echo tests do not
6491   #        yet detect zsh echo's removal of \ escapes.
6492   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)'
6493   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6494   shlibpath_overrides_runpath=yes
6495   shlibpath_var=DYLD_LIBRARY_PATH
6496   ;;
6497
6498 freebsd1*)
6499   dynamic_linker=no
6500   ;;
6501
6502 freebsd*)
6503   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6504   version_type=freebsd-$objformat
6505   case $version_type in
6506     freebsd-elf*)
6507       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6508       need_version=no
6509       need_lib_prefix=no
6510       ;;
6511     freebsd-*)
6512       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6513       need_version=yes
6514       ;;
6515   esac
6516   shlibpath_var=LD_LIBRARY_PATH
6517   case $host_os in
6518   freebsd2*)
6519     shlibpath_overrides_runpath=yes
6520     ;;
6521   *)
6522     shlibpath_overrides_runpath=no
6523     hardcode_into_libs=yes
6524     ;;
6525   esac
6526   ;;
6527
6528 gnu*)
6529   version_type=linux
6530   need_lib_prefix=no
6531   need_version=no
6532   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6533   soname_spec='${libname}${release}.so$major'
6534   shlibpath_var=LD_LIBRARY_PATH
6535   hardcode_into_libs=yes
6536   ;;
6537
6538 hpux9* | hpux10* | hpux11*)
6539   # Give a soname corresponding to the major version so that dld.sl refuses to
6540   # link against other versions.
6541   dynamic_linker="$host_os dld.sl"
6542   version_type=sunos
6543   need_lib_prefix=no
6544   need_version=no
6545   shlibpath_var=SHLIB_PATH
6546   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6547   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6548   soname_spec='${libname}${release}.sl$major'
6549   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6550   postinstall_cmds='chmod 555 $lib'
6551   ;;
6552
6553 irix5* | irix6* | nonstopux*)
6554   case $host_os in
6555     nonstopux*) version_type=nonstopux ;;
6556     *)          version_type=irix ;;
6557   esac
6558   need_lib_prefix=no
6559   need_version=no
6560   soname_spec='${libname}${release}.so$major'
6561   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6562   case $host_os in
6563   irix5* | nonstopux*)
6564     libsuff= shlibsuff=
6565     ;;
6566   *)
6567     case $LD in # libtool.m4 will add one of these switches to LD
6568     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6569     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6570     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6571     *) libsuff= shlibsuff= libmagic=never-match;;
6572     esac
6573     ;;
6574   esac
6575   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6576   shlibpath_overrides_runpath=no
6577   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6578   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6579   ;;
6580
6581 # No shared lib support for Linux oldld, aout, or coff.
6582 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6583   dynamic_linker=no
6584   ;;
6585
6586 # This must be Linux ELF.
6587 linux-gnu*)
6588   version_type=linux
6589   need_lib_prefix=no
6590   need_version=no
6591   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6592   soname_spec='${libname}${release}.so$major'
6593   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6594   shlibpath_var=LD_LIBRARY_PATH
6595   shlibpath_overrides_runpath=no
6596   # This implies no fast_install, which is unacceptable.
6597   # Some rework will be needed to allow for fast_install
6598   # before this can be enabled.
6599   hardcode_into_libs=yes
6600
6601   # We used to test for /lib/ld.so.1 and disable shared libraries on
6602   # powerpc, because MkLinux only supported shared libraries with the
6603   # GNU dynamic linker.  Since this was broken with cross compilers,
6604   # most powerpc-linux boxes support dynamic linking these days and
6605   # people can always --disable-shared, the test was removed, and we
6606   # assume the GNU/Linux dynamic linker is in use.
6607   dynamic_linker='GNU/Linux ld.so'
6608   ;;
6609
6610 netbsd*)
6611   version_type=sunos
6612   need_lib_prefix=no
6613   need_version=no
6614   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6615     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6616     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6617     dynamic_linker='NetBSD (a.out) ld.so'
6618   else
6619     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6620     soname_spec='${libname}${release}.so$major'
6621     dynamic_linker='NetBSD ld.elf_so'
6622   fi
6623   shlibpath_var=LD_LIBRARY_PATH
6624   shlibpath_overrides_runpath=yes
6625   hardcode_into_libs=yes
6626   ;;
6627
6628 newsos6)
6629   version_type=linux
6630   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6631   shlibpath_var=LD_LIBRARY_PATH
6632   shlibpath_overrides_runpath=yes
6633   ;;
6634
6635 openbsd*)
6636   version_type=sunos
6637   need_lib_prefix=no
6638   need_version=no
6639   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6640     case "$host_os" in
6641     openbsd2.[89] | openbsd2.[89].*)
6642       shlibpath_overrides_runpath=no
6643       ;;
6644     *)
6645       shlibpath_overrides_runpath=yes
6646       ;;
6647     esac
6648   else
6649     shlibpath_overrides_runpath=yes
6650   fi
6651   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6652   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6653   shlibpath_var=LD_LIBRARY_PATH
6654   ;;
6655
6656 openedition*)
6657   need_lib_prefix=no
6658   need_version=no
6659   shlibpath_overrides_runpath=yes
6660   shlibpath_var=LIBPATH
6661   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6662   # the library's exports are in libname.x; this is the file that must
6663   # actually be linked with to use a DLL.
6664   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6665   ;;
6666
6667 os2*)
6668   libname_spec='$name'
6669   need_lib_prefix=no
6670   library_names_spec='$libname.dll $libname.a'
6671   dynamic_linker='OS/2 ld.exe'
6672   shlibpath_var=LIBPATH
6673   ;;
6674
6675 osf3* | osf4* | osf5*)
6676   version_type=osf
6677   need_version=no
6678   soname_spec='${libname}${release}.so$major'
6679   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6680   shlibpath_var=LD_LIBRARY_PATH
6681   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6682   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6683   hardcode_into_libs=yes
6684   ;;
6685
6686 sco3.2v5*)
6687   version_type=osf
6688   soname_spec='${libname}${release}.so$major'
6689   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6690   shlibpath_var=LD_LIBRARY_PATH
6691   ;;
6692
6693 solaris*)
6694   version_type=linux
6695   need_lib_prefix=no
6696   need_version=no
6697   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6698   soname_spec='${libname}${release}.so$major'
6699   shlibpath_var=LD_LIBRARY_PATH
6700   shlibpath_overrides_runpath=yes
6701   hardcode_into_libs=yes
6702   # ldd complains unless libraries are executable
6703   postinstall_cmds='chmod +x $lib'
6704   ;;
6705
6706 sunos4*)
6707   version_type=sunos
6708   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6709   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6710   shlibpath_var=LD_LIBRARY_PATH
6711   shlibpath_overrides_runpath=yes
6712   if test "$with_gnu_ld" = yes; then
6713     need_lib_prefix=no
6714   fi
6715   need_version=yes
6716   ;;
6717
6718 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6719   version_type=linux
6720   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6721   soname_spec='${libname}${release}.so$major'
6722   shlibpath_var=LD_LIBRARY_PATH
6723   case $host_vendor in
6724     sni)
6725       shlibpath_overrides_runpath=no
6726       need_lib_prefix=no
6727       export_dynamic_flag_spec='${wl}-Blargedynsym'
6728       runpath_var=LD_RUN_PATH
6729       ;;
6730     siemens)
6731       need_lib_prefix=no
6732       ;;
6733     motorola)
6734       need_lib_prefix=no
6735       need_version=no
6736       shlibpath_overrides_runpath=no
6737       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6738       ;;
6739   esac
6740   ;;
6741
6742 uts4*)
6743   version_type=linux
6744   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6745   soname_spec='${libname}${release}.so$major'
6746   shlibpath_var=LD_LIBRARY_PATH
6747   ;;
6748
6749 dgux*)
6750   version_type=linux
6751   need_lib_prefix=no
6752   need_version=no
6753   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6754   soname_spec='${libname}${release}.so$major'
6755   shlibpath_var=LD_LIBRARY_PATH
6756   ;;
6757
6758 sysv4*MP*)
6759   if test -d /usr/nec ;then
6760     version_type=linux
6761     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6762     soname_spec='$libname.so.$major'
6763     shlibpath_var=LD_LIBRARY_PATH
6764   fi
6765   ;;
6766
6767 *)
6768   dynamic_linker=no
6769   ;;
6770 esac
6771 echo "$ac_t""$dynamic_linker" 1>&6
6772 test "$dynamic_linker" = no && can_build_shared=no
6773
6774 # Report the final consequences.
6775 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6776 echo "configure:6777: checking if libtool supports shared libraries" >&5
6777 echo "$ac_t""$can_build_shared" 1>&6
6778
6779 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6780 echo "configure:6781: checking whether to build shared libraries" >&5
6781 test "$can_build_shared" = "no" && enable_shared=no
6782
6783 # On AIX, shared libraries and static libraries use the same namespace, and
6784 # are all built from PIC.
6785 case "$host_os" in
6786 aix3*)
6787   test "$enable_shared" = yes && enable_static=no
6788   if test -n "$RANLIB"; then
6789     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6790     postinstall_cmds='$RANLIB $lib'
6791   fi
6792   ;;
6793
6794 aix4*)
6795   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6796     test "$enable_shared" = yes && enable_static=no
6797   fi
6798   ;;
6799 esac
6800 echo "$ac_t""$enable_shared" 1>&6
6801
6802 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6803 echo "configure:6804: checking whether to build static libraries" >&5
6804 # Make sure either enable_shared or enable_static is yes.
6805 test "$enable_shared" = yes || enable_static=yes
6806 echo "$ac_t""$enable_static" 1>&6
6807
6808 if test "$hardcode_action" = relink; then
6809   # Fast installation is not supported
6810   enable_fast_install=no
6811 elif test "$shlibpath_overrides_runpath" = yes ||
6812      test "$enable_shared" = no; then
6813   # Fast installation is not necessary
6814   enable_fast_install=needless
6815 fi
6816
6817 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6818 if test "$GCC" = yes; then
6819   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6820 fi
6821
6822 if test "x$enable_dlopen" != xyes; then
6823   enable_dlopen=unknown
6824   enable_dlopen_self=unknown
6825   enable_dlopen_self_static=unknown
6826 else
6827   lt_cv_dlopen=no
6828   lt_cv_dlopen_libs=
6829
6830   case $host_os in
6831   beos*)
6832     lt_cv_dlopen="load_add_on"
6833     lt_cv_dlopen_libs=
6834     lt_cv_dlopen_self=yes
6835     ;;
6836
6837   cygwin* | mingw* | pw32*)
6838     lt_cv_dlopen="LoadLibrary"
6839     lt_cv_dlopen_libs=
6840    ;;
6841
6842   *)
6843     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6844 echo "configure:6845: checking for dllload" >&5
6845 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6846   echo $ac_n "(cached) $ac_c" 1>&6
6847 else
6848   cat > conftest.$ac_ext <<EOF
6849 #line 6850 "configure"
6850 #include "confdefs.h"
6851 /* System header to define __stub macros and hopefully few prototypes,
6852     which can conflict with char dllload(); below.  */
6853 #include <assert.h>
6854 /* Override any gcc2 internal prototype to avoid an error.  */
6855 /* We use char because int might match the return type of a gcc2
6856     builtin and then its argument prototype would still apply.  */
6857 char dllload();
6858 char (*f)();
6859
6860 int main() {
6861
6862 /* The GNU C library defines this for functions which it implements
6863     to always fail with ENOSYS.  Some functions are actually named
6864     something starting with __ and the normal name is an alias.  */
6865 #if defined (__stub_dllload) || defined (__stub___dllload)
6866 choke me
6867 #else
6868 f = dllload;
6869 #endif
6870
6871 ; return 0; }
6872 EOF
6873 if { (eval echo configure:6874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6874   rm -rf conftest*
6875   eval "ac_cv_func_dllload=yes"
6876 else
6877   echo "configure: failed program was:" >&5
6878   cat conftest.$ac_ext >&5
6879   rm -rf conftest*
6880   eval "ac_cv_func_dllload=no"
6881 fi
6882 rm -f conftest*
6883 fi
6884
6885 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6886   echo "$ac_t""yes" 1>&6
6887   lt_cv_dlopen="dllload"
6888 else
6889   echo "$ac_t""no" 1>&6
6890 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6891 echo "configure:6892: checking for shl_load" >&5
6892 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6893   echo $ac_n "(cached) $ac_c" 1>&6
6894 else
6895   cat > conftest.$ac_ext <<EOF
6896 #line 6897 "configure"
6897 #include "confdefs.h"
6898 /* System header to define __stub macros and hopefully few prototypes,
6899     which can conflict with char shl_load(); below.  */
6900 #include <assert.h>
6901 /* Override any gcc2 internal prototype to avoid an error.  */
6902 /* We use char because int might match the return type of a gcc2
6903     builtin and then its argument prototype would still apply.  */
6904 char shl_load();
6905 char (*f)();
6906
6907 int main() {
6908
6909 /* The GNU C library defines this for functions which it implements
6910     to always fail with ENOSYS.  Some functions are actually named
6911     something starting with __ and the normal name is an alias.  */
6912 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6913 choke me
6914 #else
6915 f = shl_load;
6916 #endif
6917
6918 ; return 0; }
6919 EOF
6920 if { (eval echo configure:6921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6921   rm -rf conftest*
6922   eval "ac_cv_func_shl_load=yes"
6923 else
6924   echo "configure: failed program was:" >&5
6925   cat conftest.$ac_ext >&5
6926   rm -rf conftest*
6927   eval "ac_cv_func_shl_load=no"
6928 fi
6929 rm -f conftest*
6930 fi
6931
6932 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6933   echo "$ac_t""yes" 1>&6
6934   lt_cv_dlopen="shl_load"
6935 else
6936   echo "$ac_t""no" 1>&6
6937 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6938 echo "configure:6939: checking for shl_load in -ldld" >&5
6939 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6940 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6941   echo $ac_n "(cached) $ac_c" 1>&6
6942 else
6943   ac_save_LIBS="$LIBS"
6944 LIBS="-ldld  $LIBS"
6945 cat > conftest.$ac_ext <<EOF
6946 #line 6947 "configure"
6947 #include "confdefs.h"
6948 /* Override any gcc2 internal prototype to avoid an error.  */
6949 /* We use char because int might match the return type of a gcc2
6950     builtin and then its argument prototype would still apply.  */
6951 char shl_load();
6952
6953 int main() {
6954 shl_load()
6955 ; return 0; }
6956 EOF
6957 if { (eval echo configure:6958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6958   rm -rf conftest*
6959   eval "ac_cv_lib_$ac_lib_var=yes"
6960 else
6961   echo "configure: failed program was:" >&5
6962   cat conftest.$ac_ext >&5
6963   rm -rf conftest*
6964   eval "ac_cv_lib_$ac_lib_var=no"
6965 fi
6966 rm -f conftest*
6967 LIBS="$ac_save_LIBS"
6968
6969 fi
6970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6971   echo "$ac_t""yes" 1>&6
6972   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6973 else
6974   echo "$ac_t""no" 1>&6
6975 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6976 echo "configure:6977: checking for dlopen" >&5
6977 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6978   echo $ac_n "(cached) $ac_c" 1>&6
6979 else
6980   cat > conftest.$ac_ext <<EOF
6981 #line 6982 "configure"
6982 #include "confdefs.h"
6983 /* System header to define __stub macros and hopefully few prototypes,
6984     which can conflict with char dlopen(); below.  */
6985 #include <assert.h>
6986 /* Override any gcc2 internal prototype to avoid an error.  */
6987 /* We use char because int might match the return type of a gcc2
6988     builtin and then its argument prototype would still apply.  */
6989 char dlopen();
6990 char (*f)();
6991
6992 int main() {
6993
6994 /* The GNU C library defines this for functions which it implements
6995     to always fail with ENOSYS.  Some functions are actually named
6996     something starting with __ and the normal name is an alias.  */
6997 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6998 choke me
6999 #else
7000 f = dlopen;
7001 #endif
7002
7003 ; return 0; }
7004 EOF
7005 if { (eval echo configure:7006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7006   rm -rf conftest*
7007   eval "ac_cv_func_dlopen=yes"
7008 else
7009   echo "configure: failed program was:" >&5
7010   cat conftest.$ac_ext >&5
7011   rm -rf conftest*
7012   eval "ac_cv_func_dlopen=no"
7013 fi
7014 rm -f conftest*
7015 fi
7016
7017 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
7018   echo "$ac_t""yes" 1>&6
7019   lt_cv_dlopen="dlopen"
7020 else
7021   echo "$ac_t""no" 1>&6
7022 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
7023 echo "configure:7024: checking for dlopen in -ldl" >&5
7024 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
7025 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7026   echo $ac_n "(cached) $ac_c" 1>&6
7027 else
7028   ac_save_LIBS="$LIBS"
7029 LIBS="-ldl  $LIBS"
7030 cat > conftest.$ac_ext <<EOF
7031 #line 7032 "configure"
7032 #include "confdefs.h"
7033 /* Override any gcc2 internal prototype to avoid an error.  */
7034 /* We use char because int might match the return type of a gcc2
7035     builtin and then its argument prototype would still apply.  */
7036 char dlopen();
7037
7038 int main() {
7039 dlopen()
7040 ; return 0; }
7041 EOF
7042 if { (eval echo configure:7043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7043   rm -rf conftest*
7044   eval "ac_cv_lib_$ac_lib_var=yes"
7045 else
7046   echo "configure: failed program was:" >&5
7047   cat conftest.$ac_ext >&5
7048   rm -rf conftest*
7049   eval "ac_cv_lib_$ac_lib_var=no"
7050 fi
7051 rm -f conftest*
7052 LIBS="$ac_save_LIBS"
7053
7054 fi
7055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7056   echo "$ac_t""yes" 1>&6
7057   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
7058 else
7059   echo "$ac_t""no" 1>&6
7060 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
7061 echo "configure:7062: checking for dlopen in -lsvld" >&5
7062 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
7063 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7064   echo $ac_n "(cached) $ac_c" 1>&6
7065 else
7066   ac_save_LIBS="$LIBS"
7067 LIBS="-lsvld  $LIBS"
7068 cat > conftest.$ac_ext <<EOF
7069 #line 7070 "configure"
7070 #include "confdefs.h"
7071 /* Override any gcc2 internal prototype to avoid an error.  */
7072 /* We use char because int might match the return type of a gcc2
7073     builtin and then its argument prototype would still apply.  */
7074 char dlopen();
7075
7076 int main() {
7077 dlopen()
7078 ; return 0; }
7079 EOF
7080 if { (eval echo configure:7081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7081   rm -rf conftest*
7082   eval "ac_cv_lib_$ac_lib_var=yes"
7083 else
7084   echo "configure: failed program was:" >&5
7085   cat conftest.$ac_ext >&5
7086   rm -rf conftest*
7087   eval "ac_cv_lib_$ac_lib_var=no"
7088 fi
7089 rm -f conftest*
7090 LIBS="$ac_save_LIBS"
7091
7092 fi
7093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7094   echo "$ac_t""yes" 1>&6
7095   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
7096 else
7097   echo "$ac_t""no" 1>&6
7098 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
7099 echo "configure:7100: checking for dld_link in -ldld" >&5
7100 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
7101 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7102   echo $ac_n "(cached) $ac_c" 1>&6
7103 else
7104   ac_save_LIBS="$LIBS"
7105 LIBS="-ldld  $LIBS"
7106 cat > conftest.$ac_ext <<EOF
7107 #line 7108 "configure"
7108 #include "confdefs.h"
7109 /* Override any gcc2 internal prototype to avoid an error.  */
7110 /* We use char because int might match the return type of a gcc2
7111     builtin and then its argument prototype would still apply.  */
7112 char dld_link();
7113
7114 int main() {
7115 dld_link()
7116 ; return 0; }
7117 EOF
7118 if { (eval echo configure:7119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7119   rm -rf conftest*
7120   eval "ac_cv_lib_$ac_lib_var=yes"
7121 else
7122   echo "configure: failed program was:" >&5
7123   cat conftest.$ac_ext >&5
7124   rm -rf conftest*
7125   eval "ac_cv_lib_$ac_lib_var=no"
7126 fi
7127 rm -f conftest*
7128 LIBS="$ac_save_LIBS"
7129
7130 fi
7131 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7132   echo "$ac_t""yes" 1>&6
7133   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
7134 else
7135   echo "$ac_t""no" 1>&6
7136 fi
7137
7138               
7139 fi
7140
7141             
7142 fi
7143
7144           
7145 fi
7146
7147         
7148 fi
7149
7150       
7151 fi
7152
7153     
7154 fi
7155
7156     ;;
7157   esac
7158
7159   if test "x$lt_cv_dlopen" != xno; then
7160     enable_dlopen=yes
7161   else
7162     enable_dlopen=no
7163   fi
7164
7165   case $lt_cv_dlopen in
7166   dlopen)
7167     save_CPPFLAGS="$CPPFLAGS"
7168         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
7169
7170     save_LDFLAGS="$LDFLAGS"
7171     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7172
7173     save_LIBS="$LIBS"
7174     LIBS="$lt_cv_dlopen_libs $LIBS"
7175
7176     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
7177 echo "configure:7178: checking whether a program can dlopen itself" >&5
7178 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
7179   echo $ac_n "(cached) $ac_c" 1>&6
7180 else
7181           if test "$cross_compiling" = yes; then :
7182   lt_cv_dlopen_self=cross
7183 else
7184     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7185   lt_status=$lt_dlunknown
7186   cat > conftest.$ac_ext <<EOF
7187 #line 7188 "configure"
7188 #include "confdefs.h"
7189
7190 #if HAVE_DLFCN_H
7191 #include <dlfcn.h>
7192 #endif
7193
7194 #include <stdio.h>
7195
7196 #ifdef RTLD_GLOBAL
7197 #  define LT_DLGLOBAL           RTLD_GLOBAL
7198 #else
7199 #  ifdef DL_GLOBAL
7200 #    define LT_DLGLOBAL         DL_GLOBAL
7201 #  else
7202 #    define LT_DLGLOBAL         0
7203 #  endif
7204 #endif
7205
7206 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7207    find out it does not work in some platform. */
7208 #ifndef LT_DLLAZY_OR_NOW
7209 #  ifdef RTLD_LAZY
7210 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7211 #  else
7212 #    ifdef DL_LAZY
7213 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7214 #    else
7215 #      ifdef RTLD_NOW
7216 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7217 #      else
7218 #        ifdef DL_NOW
7219 #          define LT_DLLAZY_OR_NOW      DL_NOW
7220 #        else
7221 #          define LT_DLLAZY_OR_NOW      0
7222 #        endif
7223 #      endif
7224 #    endif
7225 #  endif
7226 #endif
7227
7228 #ifdef __cplusplus
7229 extern "C" void exit (int);
7230 #endif
7231
7232 void fnord() { int i=42;}
7233 int main ()
7234 {
7235   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7236   int status = $lt_dlunknown;
7237
7238   if (self)
7239     {
7240       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7241       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7242       /* dlclose (self); */
7243     }
7244
7245     exit (status);
7246 }
7247 EOF
7248   if { (eval echo configure:7249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7249     (./conftest; exit; ) 2>/dev/null
7250     lt_status=$?
7251     case x$lt_status in
7252       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7253       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7254       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7255     esac
7256   else :
7257     # compilation failed
7258     lt_cv_dlopen_self=no
7259   fi
7260 fi
7261 rm -fr conftest*
7262
7263     
7264 fi
7265
7266 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7267
7268     if test "x$lt_cv_dlopen_self" = xyes; then
7269       LDFLAGS="$LDFLAGS $link_static_flag"
7270       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7271 echo "configure:7272: checking whether a statically linked program can dlopen itself" >&5
7272 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7273   echo $ac_n "(cached) $ac_c" 1>&6
7274 else
7275           if test "$cross_compiling" = yes; then :
7276   lt_cv_dlopen_self_static=cross
7277 else
7278     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7279   lt_status=$lt_dlunknown
7280   cat > conftest.$ac_ext <<EOF
7281 #line 7282 "configure"
7282 #include "confdefs.h"
7283
7284 #if HAVE_DLFCN_H
7285 #include <dlfcn.h>
7286 #endif
7287
7288 #include <stdio.h>
7289
7290 #ifdef RTLD_GLOBAL
7291 #  define LT_DLGLOBAL           RTLD_GLOBAL
7292 #else
7293 #  ifdef DL_GLOBAL
7294 #    define LT_DLGLOBAL         DL_GLOBAL
7295 #  else
7296 #    define LT_DLGLOBAL         0
7297 #  endif
7298 #endif
7299
7300 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7301    find out it does not work in some platform. */
7302 #ifndef LT_DLLAZY_OR_NOW
7303 #  ifdef RTLD_LAZY
7304 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7305 #  else
7306 #    ifdef DL_LAZY
7307 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7308 #    else
7309 #      ifdef RTLD_NOW
7310 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7311 #      else
7312 #        ifdef DL_NOW
7313 #          define LT_DLLAZY_OR_NOW      DL_NOW
7314 #        else
7315 #          define LT_DLLAZY_OR_NOW      0
7316 #        endif
7317 #      endif
7318 #    endif
7319 #  endif
7320 #endif
7321
7322 #ifdef __cplusplus
7323 extern "C" void exit (int);
7324 #endif
7325
7326 void fnord() { int i=42;}
7327 int main ()
7328 {
7329   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7330   int status = $lt_dlunknown;
7331
7332   if (self)
7333     {
7334       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7335       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7336       /* dlclose (self); */
7337     }
7338
7339     exit (status);
7340 }
7341 EOF
7342   if { (eval echo configure:7343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7343     (./conftest; exit; ) 2>/dev/null
7344     lt_status=$?
7345     case x$lt_status in
7346       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7347       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7348       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7349     esac
7350   else :
7351     # compilation failed
7352     lt_cv_dlopen_self_static=no
7353   fi
7354 fi
7355 rm -fr conftest*
7356
7357       
7358 fi
7359
7360 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7361     fi
7362
7363     CPPFLAGS="$save_CPPFLAGS"
7364     LDFLAGS="$save_LDFLAGS"
7365     LIBS="$save_LIBS"
7366     ;;
7367   esac
7368
7369   case $lt_cv_dlopen_self in
7370   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7371   *) enable_dlopen_self=unknown ;;
7372   esac
7373
7374   case $lt_cv_dlopen_self_static in
7375   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7376   *) enable_dlopen_self_static=unknown ;;
7377   esac
7378 fi
7379
7380
7381 if test "$enable_shared" = yes && test "$GCC" = yes; then
7382   case $archive_cmds in
7383   *'~'*)
7384     # FIXME: we may have to deal with multi-command sequences.
7385     ;;
7386   '$CC '*)
7387     # Test whether the compiler implicitly links with -lc since on some
7388     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7389     # to ld, don't add -lc before -lgcc.
7390     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7391 echo "configure:7392: checking whether -lc should be explicitly linked in" >&5
7392     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7393   echo $ac_n "(cached) $ac_c" 1>&6
7394 else
7395   $rm conftest*
7396     echo 'static int dummy;' > conftest.$ac_ext
7397
7398     if { (eval echo configure:7399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7399       soname=conftest
7400       lib=conftest
7401       libobjs=conftest.$ac_objext
7402       deplibs=
7403       wl=$lt_cv_prog_cc_wl
7404       compiler_flags=-v
7405       linker_flags=-v
7406       verstring=
7407       output_objdir=.
7408       libname=conftest
7409       save_allow_undefined_flag=$allow_undefined_flag
7410       allow_undefined_flag=
7411       if { (eval echo configure:7412: \"$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; }
7412       then
7413         lt_cv_archive_cmds_need_lc=no
7414       else
7415         lt_cv_archive_cmds_need_lc=yes
7416       fi
7417       allow_undefined_flag=$save_allow_undefined_flag
7418     else
7419       cat conftest.err 1>&5
7420     fi
7421 fi
7422
7423     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7424     ;;
7425   esac
7426 fi
7427 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7428
7429 # The second clause should only fire when bootstrapping the
7430 # libtool distribution, otherwise you forgot to ship ltmain.sh
7431 # with your package, and you will get complaints that there are
7432 # no rules to generate ltmain.sh.
7433 if test -f "$ltmain"; then
7434   :
7435 else
7436   # If there is no Makefile yet, we rely on a make rule to execute
7437   # `config.status --recheck' to rerun these tests and create the
7438   # libtool script then.
7439   test -f Makefile && make "$ltmain"
7440 fi
7441
7442 if test -f "$ltmain"; then
7443   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7444   $rm -f "${ofile}T"
7445
7446   echo creating $ofile
7447
7448   # Now quote all the things that may contain metacharacters while being
7449   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7450   # variables and quote the copies for generation of the libtool script.
7451   for var in echo old_CC old_CFLAGS SED \
7452     AR AR_FLAGS CC LD LN_S NM SHELL \
7453     reload_flag reload_cmds wl \
7454     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7455     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7456     library_names_spec soname_spec \
7457     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7458     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7459     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7460     old_striplib striplib file_magic_cmd export_symbols_cmds \
7461     deplibs_check_method allow_undefined_flag no_undefined_flag \
7462     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7463     global_symbol_to_c_name_address \
7464     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7465     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7466     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7467
7468     case $var in
7469     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7470     old_postinstall_cmds | old_postuninstall_cmds | \
7471     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7472     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7473     postinstall_cmds | postuninstall_cmds | \
7474     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7475       # Double-quote double-evaled strings.
7476       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7477       ;;
7478     *)
7479       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7480       ;;
7481     esac
7482   done
7483
7484   cat <<__EOF__ > "${ofile}T"
7485 #! $SHELL
7486
7487 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7488 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7489 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7490 #
7491 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7492 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7493 #
7494 # This program is free software; you can redistribute it and/or modify
7495 # it under the terms of the GNU General Public License as published by
7496 # the Free Software Foundation; either version 2 of the License, or
7497 # (at your option) any later version.
7498 #
7499 # This program is distributed in the hope that it will be useful, but
7500 # WITHOUT ANY WARRANTY; without even the implied warranty of
7501 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7502 # General Public License for more details.
7503 #
7504 # You should have received a copy of the GNU General Public License
7505 # along with this program; if not, write to the Free Software
7506 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7507 #
7508 # As a special exception to the GNU General Public License, if you
7509 # distribute this file as part of a program that contains a
7510 # configuration script generated by Autoconf, you may include it under
7511 # the same distribution terms that you use for the rest of that program.
7512
7513 # A sed that does not truncate output.
7514 SED=$lt_SED
7515
7516 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7517 Xsed="${SED} -e s/^X//"
7518
7519 # The HP-UX ksh and POSIX shell print the target directory to stdout
7520 # if CDPATH is set.
7521 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7522
7523 # ### BEGIN LIBTOOL CONFIG
7524
7525 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7526
7527 # Shell to use when invoking shell scripts.
7528 SHELL=$lt_SHELL
7529
7530 # Whether or not to build shared libraries.
7531 build_libtool_libs=$enable_shared
7532
7533 # Whether or not to build static libraries.
7534 build_old_libs=$enable_static
7535
7536 # Whether or not to add -lc for building shared libraries.
7537 build_libtool_need_lc=$need_lc
7538
7539 # Whether or not to optimize for fast installation.
7540 fast_install=$enable_fast_install
7541
7542 # The host system.
7543 host_alias=$host_alias
7544 host=$host
7545
7546 # An echo program that does not interpret backslashes.
7547 echo=$lt_echo
7548
7549 # The archiver.
7550 AR=$lt_AR
7551 AR_FLAGS=$lt_AR_FLAGS
7552
7553 # The default C compiler.
7554 CC=$lt_CC
7555
7556 # Is the compiler the GNU C compiler?
7557 with_gcc=$GCC
7558
7559 # The linker used to build libraries.
7560 LD=$lt_LD
7561
7562 # Whether we need hard or soft links.
7563 LN_S=$lt_LN_S
7564
7565 # A BSD-compatible nm program.
7566 NM=$lt_NM
7567
7568 # A symbol stripping program
7569 STRIP=$STRIP
7570
7571 # Used to examine libraries when file_magic_cmd begins "file"
7572 MAGIC_CMD=$MAGIC_CMD
7573
7574 # Used on cygwin: DLL creation program.
7575 DLLTOOL="$DLLTOOL"
7576
7577 # Used on cygwin: object dumper.
7578 OBJDUMP="$OBJDUMP"
7579
7580 # Used on cygwin: assembler.
7581 AS="$AS"
7582
7583 # The name of the directory that contains temporary libtool files.
7584 objdir=$objdir
7585
7586 # How to create reloadable object files.
7587 reload_flag=$lt_reload_flag
7588 reload_cmds=$lt_reload_cmds
7589
7590 # How to pass a linker flag through the compiler.
7591 wl=$lt_wl
7592
7593 # Object file suffix (normally "o").
7594 objext="$ac_objext"
7595
7596 # Old archive suffix (normally "a").
7597 libext="$libext"
7598
7599 # Executable file suffix (normally "").
7600 exeext="$exeext"
7601
7602 # Additional compiler flags for building library objects.
7603 pic_flag=$lt_pic_flag
7604 pic_mode=$pic_mode
7605
7606 # Does compiler simultaneously support -c and -o options?
7607 compiler_c_o=$lt_compiler_c_o
7608
7609 # Can we write directly to a .lo ?
7610 compiler_o_lo=$lt_compiler_o_lo
7611
7612 # Must we lock files when doing compilation ?
7613 need_locks=$lt_need_locks
7614
7615 # Do we need the lib prefix for modules?
7616 need_lib_prefix=$need_lib_prefix
7617
7618 # Do we need a version for libraries?
7619 need_version=$need_version
7620
7621 # Whether dlopen is supported.
7622 dlopen_support=$enable_dlopen
7623
7624 # Whether dlopen of programs is supported.
7625 dlopen_self=$enable_dlopen_self
7626
7627 # Whether dlopen of statically linked programs is supported.
7628 dlopen_self_static=$enable_dlopen_self_static
7629
7630 # Compiler flag to prevent dynamic linking.
7631 link_static_flag=$lt_link_static_flag
7632
7633 # Compiler flag to turn off builtin functions.
7634 no_builtin_flag=$lt_no_builtin_flag
7635
7636 # Compiler flag to allow reflexive dlopens.
7637 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7638
7639 # Compiler flag to generate shared objects directly from archives.
7640 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7641
7642 # Compiler flag to generate thread-safe objects.
7643 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7644
7645 # Library versioning type.
7646 version_type=$version_type
7647
7648 # Format of library name prefix.
7649 libname_spec=$lt_libname_spec
7650
7651 # List of archive names.  First name is the real one, the rest are links.
7652 # The last name is the one that the linker finds with -lNAME.
7653 library_names_spec=$lt_library_names_spec
7654
7655 # The coded name of the library, if different from the real name.
7656 soname_spec=$lt_soname_spec
7657
7658 # Commands used to build and install an old-style archive.
7659 RANLIB=$lt_RANLIB
7660 old_archive_cmds=$lt_old_archive_cmds
7661 old_postinstall_cmds=$lt_old_postinstall_cmds
7662 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7663
7664 # Create an old-style archive from a shared archive.
7665 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7666
7667 # Create a temporary old-style archive to link instead of a shared archive.
7668 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7669
7670 # Commands used to build and install a shared archive.
7671 archive_cmds=$lt_archive_cmds
7672 archive_expsym_cmds=$lt_archive_expsym_cmds
7673 postinstall_cmds=$lt_postinstall_cmds
7674 postuninstall_cmds=$lt_postuninstall_cmds
7675
7676 # Commands to strip libraries.
7677 old_striplib=$lt_old_striplib
7678 striplib=$lt_striplib
7679
7680 # Method to check whether dependent libraries are shared objects.
7681 deplibs_check_method=$lt_deplibs_check_method
7682
7683 # Command to use when deplibs_check_method == file_magic.
7684 file_magic_cmd=$lt_file_magic_cmd
7685
7686 # Flag that allows shared libraries with undefined symbols to be built.
7687 allow_undefined_flag=$lt_allow_undefined_flag
7688
7689 # Flag that forces no undefined symbols.
7690 no_undefined_flag=$lt_no_undefined_flag
7691
7692 # Commands used to finish a libtool library installation in a directory.
7693 finish_cmds=$lt_finish_cmds
7694
7695 # Same as above, but a single script fragment to be evaled but not shown.
7696 finish_eval=$lt_finish_eval
7697
7698 # Take the output of nm and produce a listing of raw symbols and C names.
7699 global_symbol_pipe=$lt_global_symbol_pipe
7700
7701 # Transform the output of nm in a proper C declaration
7702 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7703
7704 # Transform the output of nm in a C name address pair
7705 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7706
7707 # This is the shared library runtime path variable.
7708 runpath_var=$runpath_var
7709
7710 # This is the shared library path variable.
7711 shlibpath_var=$shlibpath_var
7712
7713 # Is shlibpath searched before the hard-coded library search path?
7714 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7715
7716 # How to hardcode a shared library path into an executable.
7717 hardcode_action=$hardcode_action
7718
7719 # Whether we should hardcode library paths into libraries.
7720 hardcode_into_libs=$hardcode_into_libs
7721
7722 # Flag to hardcode \$libdir into a binary during linking.
7723 # This must work even if \$libdir does not exist.
7724 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7725
7726 # Whether we need a single -rpath flag with a separated argument.
7727 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7728
7729 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7730 # resulting binary.
7731 hardcode_direct=$hardcode_direct
7732
7733 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7734 # resulting binary.
7735 hardcode_minus_L=$hardcode_minus_L
7736
7737 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7738 # the resulting binary.
7739 hardcode_shlibpath_var=$hardcode_shlibpath_var
7740
7741 # Variables whose values should be saved in libtool wrapper scripts and
7742 # restored at relink time.
7743 variables_saved_for_relink="$variables_saved_for_relink"
7744
7745 # Whether libtool must link a program against all its dependency libraries.
7746 link_all_deplibs=$link_all_deplibs
7747
7748 # Compile-time system search path for libraries
7749 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7750
7751 # Run-time system search path for libraries
7752 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7753
7754 # Fix the shell variable \$srcfile for the compiler.
7755 fix_srcfile_path="$fix_srcfile_path"
7756
7757 # Set to yes if exported symbols are required.
7758 always_export_symbols=$always_export_symbols
7759
7760 # The commands to list exported symbols.
7761 export_symbols_cmds=$lt_export_symbols_cmds
7762
7763 # The commands to extract the exported symbol list from a shared archive.
7764 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7765
7766 # Symbols that should not be listed in the preloaded symbols.
7767 exclude_expsyms=$lt_exclude_expsyms
7768
7769 # Symbols that must always be exported.
7770 include_expsyms=$lt_include_expsyms
7771
7772 # ### END LIBTOOL CONFIG
7773
7774 __EOF__
7775
7776   case $host_os in
7777   aix3*)
7778     cat <<\EOF >> "${ofile}T"
7779
7780 # AIX sometimes has problems with the GCC collect2 program.  For some
7781 # reason, if we set the COLLECT_NAMES environment variable, the problems
7782 # vanish in a puff of smoke.
7783 if test "X${COLLECT_NAMES+set}" != Xset; then
7784   COLLECT_NAMES=
7785   export COLLECT_NAMES
7786 fi
7787 EOF
7788     ;;
7789   esac
7790
7791   case $host_os in
7792   cygwin* | mingw* | pw32* | os2*)
7793     cat <<'EOF' >> "${ofile}T"
7794       # This is a source program that is used to create dlls on Windows
7795       # Don't remove nor modify the starting and closing comments
7796 # /* ltdll.c starts here */
7797 # #define WIN32_LEAN_AND_MEAN
7798 # #include <windows.h>
7799 # #undef WIN32_LEAN_AND_MEAN
7800 # #include <stdio.h>
7801 #
7802 # #ifndef __CYGWIN__
7803 # #  ifdef __CYGWIN32__
7804 # #    define __CYGWIN__ __CYGWIN32__
7805 # #  endif
7806 # #endif
7807 #
7808 # #ifdef __cplusplus
7809 # extern "C" {
7810 # #endif
7811 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7812 # #ifdef __cplusplus
7813 # }
7814 # #endif
7815 #
7816 # #ifdef __CYGWIN__
7817 # #include <cygwin/cygwin_dll.h>
7818 # DECLARE_CYGWIN_DLL( DllMain );
7819 # #endif
7820 # HINSTANCE __hDllInstance_base;
7821 #
7822 # BOOL APIENTRY
7823 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7824 # {
7825 #   __hDllInstance_base = hInst;
7826 #   return TRUE;
7827 # }
7828 # /* ltdll.c ends here */
7829         # This is a source program that is used to create import libraries
7830         # on Windows for dlls which lack them. Don't remove nor modify the
7831         # starting and closing comments
7832 # /* impgen.c starts here */
7833 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7834 #
7835 #  This file is part of GNU libtool.
7836 #
7837 #  This program is free software; you can redistribute it and/or modify
7838 #  it under the terms of the GNU General Public License as published by
7839 #  the Free Software Foundation; either version 2 of the License, or
7840 #  (at your option) any later version.
7841 #
7842 #  This program is distributed in the hope that it will be useful,
7843 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7844 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7845 #  GNU General Public License for more details.
7846 #
7847 #  You should have received a copy of the GNU General Public License
7848 #  along with this program; if not, write to the Free Software
7849 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7850 #  */
7851 #
7852 # #include <stdio.h>            /* for printf() */
7853 # #include <unistd.h>           /* for open(), lseek(), read() */
7854 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7855 # #include <string.h>           /* for strdup() */
7856 #
7857 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7858 # #ifndef O_BINARY
7859 # #define O_BINARY 0
7860 # #endif
7861 #
7862 # static unsigned int
7863 # pe_get16 (fd, offset)
7864 #      int fd;
7865 #      int offset;
7866 # {
7867 #   unsigned char b[2];
7868 #   lseek (fd, offset, SEEK_SET);
7869 #   read (fd, b, 2);
7870 #   return b[0] + (b[1]<<8);
7871 # }
7872 #
7873 # static unsigned int
7874 # pe_get32 (fd, offset)
7875 #     int fd;
7876 #     int offset;
7877 # {
7878 #   unsigned char b[4];
7879 #   lseek (fd, offset, SEEK_SET);
7880 #   read (fd, b, 4);
7881 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7882 # }
7883 #
7884 # static unsigned int
7885 # pe_as32 (ptr)
7886 #      void *ptr;
7887 # {
7888 #   unsigned char *b = ptr;
7889 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7890 # }
7891 #
7892 # int
7893 # main (argc, argv)
7894 #     int argc;
7895 #     char *argv[];
7896 # {
7897 #     int dll;
7898 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7899 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7900 #     unsigned long name_rvas, nexp;
7901 #     unsigned char *expdata, *erva;
7902 #     char *filename, *dll_name;
7903 #
7904 #     filename = argv[1];
7905 #
7906 #     dll = open(filename, O_RDONLY|O_BINARY);
7907 #     if (dll < 1)
7908 #       return 1;
7909 #
7910 #     dll_name = filename;
7911 #
7912 #     for (i=0; filename[i]; i++)
7913 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7914 #           dll_name = filename + i +1;
7915 #
7916 #     pe_header_offset = pe_get32 (dll, 0x3c);
7917 #     opthdr_ofs = pe_header_offset + 4 + 20;
7918 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7919 #
7920 #     if (num_entries < 1) /* no exports */
7921 #       return 1;
7922 #
7923 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7924 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7925 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7926 #     secptr = (pe_header_offset + 4 + 20 +
7927 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7928 #
7929 #     expptr = 0;
7930 #     for (i = 0; i < nsections; i++)
7931 #     {
7932 #       char sname[8];
7933 #       unsigned long secptr1 = secptr + 40 * i;
7934 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7935 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7936 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7937 #       lseek(dll, secptr1, SEEK_SET);
7938 #       read(dll, sname, 8);
7939 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7940 #       {
7941 #           expptr = fptr + (export_rva - vaddr);
7942 #           if (export_rva + export_size > vaddr + vsize)
7943 #               export_size = vsize - (export_rva - vaddr);
7944 #           break;
7945 #       }
7946 #     }
7947 #
7948 #     expdata = (unsigned char*)malloc(export_size);
7949 #     lseek (dll, expptr, SEEK_SET);
7950 #     read (dll, expdata, export_size);
7951 #     erva = expdata - export_rva;
7952 #
7953 #     nexp = pe_as32 (expdata+24);
7954 #     name_rvas = pe_as32 (expdata+32);
7955 #
7956 #     printf ("EXPORTS\n");
7957 #     for (i = 0; i<nexp; i++)
7958 #     {
7959 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7960 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7961 #     }
7962 #
7963 #     return 0;
7964 # }
7965 # /* impgen.c ends here */
7966
7967 EOF
7968     ;;
7969   esac
7970
7971   # We use sed instead of cat because bash on DJGPP gets confused if
7972   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7973   # text mode, it properly converts lines to CR/LF.  This bash problem
7974   # is reportedly fixed, but why not run on old versions too?
7975   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7976
7977   mv -f "${ofile}T" "$ofile" || \
7978     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7979   chmod +x "$ofile"
7980 fi
7981
7982
7983
7984
7985
7986 # This can be used to rebuild libtool when needed
7987 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7988
7989 # Always use our own libtool.
7990 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7991
7992 # Prevent multiple expansion
7993
7994
7995
7996 # test for ln hardlink support
7997 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7998 echo "configure:7999: checking whether ln works" >&5
7999 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
8000   echo $ac_n "(cached) $ac_c" 1>&6
8001 else
8002   rm -f conftest.src conftest.dst
8003 echo "conftest" > conftest.src
8004 if ln conftest.src conftest.dst 2>/dev/null
8005 then
8006   ol_cv_prog_LN_H="ln"
8007 else
8008   ol_cv_prog_LN_H="cp"
8009 fi
8010 rm -f conftest.src conftest.dst
8011
8012 fi
8013 LN_H="$ol_cv_prog_LN_H"
8014 if test "$ol_cv_prog_LN_H" = "ln"; then
8015         echo "$ac_t""yes" 1>&6
8016 else
8017         echo "$ac_t""no" 1>&6
8018 fi
8019
8020 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
8021 echo "configure:8022: checking whether ln -s works" >&5
8022 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
8023   echo $ac_n "(cached) $ac_c" 1>&6
8024 else
8025   rm -f conftestdata
8026 if ln -s X conftestdata 2>/dev/null
8027 then
8028   rm -f conftestdata
8029   ac_cv_prog_LN_S="ln -s"
8030 else
8031   ac_cv_prog_LN_S=ln
8032 fi
8033 fi
8034 LN_S="$ac_cv_prog_LN_S"
8035 if test "$ac_cv_prog_LN_S" = "ln -s"; then
8036   echo "$ac_t""yes" 1>&6
8037 else
8038   echo "$ac_t""no" 1>&6
8039 fi
8040
8041
8042 ol_link_perl=no
8043 if test $ol_enable_perl != no ; then
8044         # Extract the first word of "perl", so it can be a program name with args.
8045 set dummy perl; ac_word=$2
8046 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8047 echo "configure:8048: checking for $ac_word" >&5
8048 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
8049   echo $ac_n "(cached) $ac_c" 1>&6
8050 else
8051   case "$PERLBIN" in
8052   /*)
8053   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
8054   ;;
8055   ?:/*)
8056   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
8057   ;;
8058   *)
8059   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8060   ac_dummy="$PATH"
8061   for ac_dir in $ac_dummy; do 
8062     test -z "$ac_dir" && ac_dir=.
8063     if test -f $ac_dir/$ac_word; then
8064       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
8065       break
8066     fi
8067   done
8068   IFS="$ac_save_ifs"
8069   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
8070   ;;
8071 esac
8072 fi
8073 PERLBIN="$ac_cv_path_PERLBIN"
8074 if test -n "$PERLBIN"; then
8075   echo "$ac_t""$PERLBIN" 1>&6
8076 else
8077   echo "$ac_t""no" 1>&6
8078 fi
8079
8080
8081         if test "no$PERLBIN" = "no" ; then
8082                 if test $ol_enable_perl = yes ; then
8083                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
8084                 fi
8085
8086         else
8087                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
8088                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
8089
8090                 if test x"$ol_with_perl_module" = "xstatic" ; then
8091                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
8092                 else
8093                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
8094                 fi
8095                                 ol_link_perl=yes
8096         fi
8097 fi
8098
8099 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
8100 echo "configure:8101: checking how to run the C preprocessor" >&5
8101 # On Suns, sometimes $CPP names a directory.
8102 if test -n "$CPP" && test -d "$CPP"; then
8103   CPP=
8104 fi
8105 if test -z "$CPP"; then
8106 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
8107   echo $ac_n "(cached) $ac_c" 1>&6
8108 else
8109     # This must be in double quotes, not single quotes, because CPP may get
8110   # substituted into the Makefile and "${CC-cc}" will confuse make.
8111   CPP="${CC-cc} -E"
8112   # On the NeXT, cc -E runs the code through the compiler's parser,
8113   # not just through cpp.
8114   cat > conftest.$ac_ext <<EOF
8115 #line 8116 "configure"
8116 #include "confdefs.h"
8117 #include <assert.h>
8118 Syntax Error
8119 EOF
8120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8121 { (eval echo configure:8122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8123 if test -z "$ac_err"; then
8124   :
8125 else
8126   echo "$ac_err" >&5
8127   echo "configure: failed program was:" >&5
8128   cat conftest.$ac_ext >&5
8129   rm -rf conftest*
8130   CPP="${CC-cc} -E -traditional-cpp"
8131   cat > conftest.$ac_ext <<EOF
8132 #line 8133 "configure"
8133 #include "confdefs.h"
8134 #include <assert.h>
8135 Syntax Error
8136 EOF
8137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8138 { (eval echo configure:8139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8140 if test -z "$ac_err"; then
8141   :
8142 else
8143   echo "$ac_err" >&5
8144   echo "configure: failed program was:" >&5
8145   cat conftest.$ac_ext >&5
8146   rm -rf conftest*
8147   CPP="${CC-cc} -nologo -E"
8148   cat > conftest.$ac_ext <<EOF
8149 #line 8150 "configure"
8150 #include "confdefs.h"
8151 #include <assert.h>
8152 Syntax Error
8153 EOF
8154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8155 { (eval echo configure:8156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8157 if test -z "$ac_err"; then
8158   :
8159 else
8160   echo "$ac_err" >&5
8161   echo "configure: failed program was:" >&5
8162   cat conftest.$ac_ext >&5
8163   rm -rf conftest*
8164   CPP=/lib/cpp
8165 fi
8166 rm -f conftest*
8167 fi
8168 rm -f conftest*
8169 fi
8170 rm -f conftest*
8171   ac_cv_prog_CPP="$CPP"
8172 fi
8173   CPP="$ac_cv_prog_CPP"
8174 else
8175   ac_cv_prog_CPP="$CPP"
8176 fi
8177 echo "$ac_t""$CPP" 1>&6
8178
8179
8180
8181 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8182 echo "configure:8183: checking for Cygwin environment" >&5
8183 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
8184   echo $ac_n "(cached) $ac_c" 1>&6
8185 else
8186   cat > conftest.$ac_ext <<EOF
8187 #line 8188 "configure"
8188 #include "confdefs.h"
8189
8190 int main() {
8191
8192 #ifndef __CYGWIN__
8193 #define __CYGWIN__ __CYGWIN32__
8194 #endif
8195 return __CYGWIN__;
8196 ; return 0; }
8197 EOF
8198 if { (eval echo configure:8199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8199   rm -rf conftest*
8200   ac_cv_cygwin=yes
8201 else
8202   echo "configure: failed program was:" >&5
8203   cat conftest.$ac_ext >&5
8204   rm -rf conftest*
8205   ac_cv_cygwin=no
8206 fi
8207 rm -f conftest*
8208 fi
8209
8210 echo "$ac_t""$ac_cv_cygwin" 1>&6
8211 CYGWIN=
8212 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8213 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8214 echo "configure:8215: checking for mingw32 environment" >&5
8215 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8216   echo $ac_n "(cached) $ac_c" 1>&6
8217 else
8218   cat > conftest.$ac_ext <<EOF
8219 #line 8220 "configure"
8220 #include "confdefs.h"
8221
8222 int main() {
8223 return __MINGW32__;
8224 ; return 0; }
8225 EOF
8226 if { (eval echo configure:8227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8227   rm -rf conftest*
8228   ac_cv_mingw32=yes
8229 else
8230   echo "configure: failed program was:" >&5
8231   cat conftest.$ac_ext >&5
8232   rm -rf conftest*
8233   ac_cv_mingw32=no
8234 fi
8235 rm -f conftest*
8236 fi
8237
8238 echo "$ac_t""$ac_cv_mingw32" 1>&6
8239 MINGW32=
8240 test "$ac_cv_mingw32" = yes && MINGW32=yes
8241
8242
8243
8244 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8245 echo "configure:8246: checking for executable suffix" >&5
8246 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8247   echo $ac_n "(cached) $ac_c" 1>&6
8248 else
8249   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8250   ac_cv_exeext=.exe
8251 else
8252   rm -f conftest*
8253   echo 'int main () { return 0; }' > conftest.$ac_ext
8254   ac_cv_exeext=
8255   if { (eval echo configure:8256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8256     for file in conftest.*; do
8257       case $file in
8258       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8259       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8260       esac
8261     done
8262   else
8263     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8264   fi
8265   rm -f conftest*
8266   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8267 fi
8268 fi
8269
8270 EXEEXT=""
8271 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8272 echo "$ac_t""${ac_cv_exeext}" 1>&6
8273 ac_exeext=$EXEEXT
8274
8275 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8276 echo "configure:8277: checking for object suffix" >&5
8277 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8278   echo $ac_n "(cached) $ac_c" 1>&6
8279 else
8280   rm -f conftest*
8281 echo 'int i = 1;' > conftest.$ac_ext
8282 if { (eval echo configure:8283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8283   for ac_file in conftest.*; do
8284     case $ac_file in
8285     *.c) ;;
8286     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8287     esac
8288   done
8289 else
8290   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8291 fi
8292 rm -f conftest*
8293 fi
8294
8295 echo "$ac_t""$ac_cv_objext" 1>&6
8296 OBJEXT=$ac_cv_objext
8297 ac_objext=$ac_cv_objext
8298
8299
8300 cat >> confdefs.h <<EOF
8301 #define EXEEXT "${EXEEXT}"
8302 EOF
8303
8304
8305 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8306 echo "configure:8307: checking for be_app in -lbe" >&5
8307 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8308 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8309   echo $ac_n "(cached) $ac_c" 1>&6
8310 else
8311   ac_save_LIBS="$LIBS"
8312 LIBS="-lbe -lroot -lnet $LIBS"
8313 cat > conftest.$ac_ext <<EOF
8314 #line 8315 "configure"
8315 #include "confdefs.h"
8316 /* Override any gcc2 internal prototype to avoid an error.  */
8317 /* We use char because int might match the return type of a gcc2
8318     builtin and then its argument prototype would still apply.  */
8319 char be_app();
8320
8321 int main() {
8322 be_app()
8323 ; return 0; }
8324 EOF
8325 if { (eval echo configure:8326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8326   rm -rf conftest*
8327   eval "ac_cv_lib_$ac_lib_var=yes"
8328 else
8329   echo "configure: failed program was:" >&5
8330   cat conftest.$ac_ext >&5
8331   rm -rf conftest*
8332   eval "ac_cv_lib_$ac_lib_var=no"
8333 fi
8334 rm -f conftest*
8335 LIBS="$ac_save_LIBS"
8336
8337 fi
8338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8339   echo "$ac_t""yes" 1>&6
8340   LIBS="$LIBS -lbe -lroot -lnet"
8341 else
8342   echo "$ac_t""no" 1>&6
8343 :
8344 fi
8345
8346
8347
8348
8349
8350 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8351 echo "configure:8352: checking for ${CC-cc} option to accept ANSI C" >&5
8352 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8353   echo $ac_n "(cached) $ac_c" 1>&6
8354 else
8355   am_cv_prog_cc_stdc=no
8356 ac_save_CC="$CC"
8357 # Don't try gcc -ansi; that turns off useful extensions and
8358 # breaks some systems' header files.
8359 # AIX                   -qlanglvl=ansi
8360 # Ultrix and OSF/1      -std1
8361 # HP-UX 10.20 and later -Ae
8362 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8363 # SVR4                  -Xc -D__EXTENSIONS__
8364 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8365 do
8366   CC="$ac_save_CC $ac_arg"
8367   cat > conftest.$ac_ext <<EOF
8368 #line 8369 "configure"
8369 #include "confdefs.h"
8370 #include <stdarg.h>
8371 #include <stdio.h>
8372 #include <sys/types.h>
8373 #include <sys/stat.h>
8374 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8375 struct buf { int x; };
8376 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8377 static char *e (p, i)
8378      char **p;
8379      int i;
8380 {
8381   return p[i];
8382 }
8383 static char *f (char * (*g) (char **, int), char **p, ...)
8384 {
8385   char *s;
8386   va_list v;
8387   va_start (v,p);
8388   s = g (p, va_arg (v,int));
8389   va_end (v);
8390   return s;
8391 }
8392 int test (int i, double x);
8393 struct s1 {int (*f) (int a);};
8394 struct s2 {int (*f) (double a);};
8395 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8396 int argc;
8397 char **argv;
8398
8399 int main() {
8400
8401 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8402
8403 ; return 0; }
8404 EOF
8405 if { (eval echo configure:8406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8406   rm -rf conftest*
8407   am_cv_prog_cc_stdc="$ac_arg"; break
8408 else
8409   echo "configure: failed program was:" >&5
8410   cat conftest.$ac_ext >&5
8411 fi
8412 rm -f conftest*
8413 done
8414 CC="$ac_save_CC"
8415
8416 fi
8417
8418 if test -z "$am_cv_prog_cc_stdc"; then
8419   echo "$ac_t""none needed" 1>&6
8420 else
8421   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8422 fi
8423 case "x$am_cv_prog_cc_stdc" in
8424   x|xno) ;;
8425   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8426 esac
8427
8428 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8429         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8430 fi
8431
8432 # test for make depend flag
8433 OL_MKDEP=
8434 OL_MKDEP_FLAGS=
8435 if test -z "${MKDEP}"; then
8436         OL_MKDEP="${CC-cc}"
8437         if test -z "${MKDEP_FLAGS}"; then
8438                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8439 echo "configure:8440: checking for ${OL_MKDEP} depend flag" >&5
8440 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8441   echo $ac_n "(cached) $ac_c" 1>&6
8442 else
8443   
8444                         ol_cv_mkdep=no
8445                         for flag in "-M" "-xM"; do
8446                                 cat > conftest.c <<EOF
8447  noCode;
8448 EOF
8449                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8450                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8451                                 then
8452                                         if test ! -f conftest."${ac_object}" ; then
8453                                                 ol_cv_mkdep=$flag
8454                                                 OL_MKDEP_FLAGS="$flag"
8455                                                 break
8456                                         fi
8457                                 fi
8458                         done
8459                         rm -f conftest*
8460                 
8461 fi
8462
8463 echo "$ac_t""$ol_cv_mkdep" 1>&6
8464         else
8465                 cc_cv_mkdep=yes
8466                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8467         fi
8468 else
8469         cc_cv_mkdep=yes
8470         OL_MKDEP="${MKDEP}"
8471         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8472 fi
8473
8474
8475
8476 if test "${ol_cv_mkdep}" = no ; then
8477         # this will soon become an error
8478         echo "configure: warning: do not know how to generate dependencies" 1>&2
8479 fi
8480
8481 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8482 echo "configure:8483: checking for afopen in -ls" >&5
8483 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8484 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8485   echo $ac_n "(cached) $ac_c" 1>&6
8486 else
8487   ac_save_LIBS="$LIBS"
8488 LIBS="-ls  $LIBS"
8489 cat > conftest.$ac_ext <<EOF
8490 #line 8491 "configure"
8491 #include "confdefs.h"
8492 /* Override any gcc2 internal prototype to avoid an error.  */
8493 /* We use char because int might match the return type of a gcc2
8494     builtin and then its argument prototype would still apply.  */
8495 char afopen();
8496
8497 int main() {
8498 afopen()
8499 ; return 0; }
8500 EOF
8501 if { (eval echo configure:8502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8502   rm -rf conftest*
8503   eval "ac_cv_lib_$ac_lib_var=yes"
8504 else
8505   echo "configure: failed program was:" >&5
8506   cat conftest.$ac_ext >&5
8507   rm -rf conftest*
8508   eval "ac_cv_lib_$ac_lib_var=no"
8509 fi
8510 rm -f conftest*
8511 LIBS="$ac_save_LIBS"
8512
8513 fi
8514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8515   echo "$ac_t""yes" 1>&6
8516   
8517         AUTH_LIBS=-ls
8518         cat >> confdefs.h <<\EOF
8519 #define HAVE_AIX_SECURITY 1
8520 EOF
8521
8522
8523 else
8524   echo "$ac_t""no" 1>&6
8525 fi
8526
8527
8528 case "$target" in
8529 *-ibm-openedition)
8530         ac_cv_func_getopt=no
8531         cat >> confdefs.h <<\EOF
8532 #define BOTH_STRINGS_H 1
8533 EOF
8534
8535         ;;
8536 esac
8537
8538 ol_link_modules=no
8539 if test $ol_enable_modules != no ; then
8540         for ac_hdr in ltdl.h
8541 do
8542 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8543 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8544 echo "configure:8545: checking for $ac_hdr" >&5
8545 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8546   echo $ac_n "(cached) $ac_c" 1>&6
8547 else
8548   cat > conftest.$ac_ext <<EOF
8549 #line 8550 "configure"
8550 #include "confdefs.h"
8551 #include <$ac_hdr>
8552 EOF
8553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8554 { (eval echo configure:8555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8556 if test -z "$ac_err"; then
8557   rm -rf conftest*
8558   eval "ac_cv_header_$ac_safe=yes"
8559 else
8560   echo "$ac_err" >&5
8561   echo "configure: failed program was:" >&5
8562   cat conftest.$ac_ext >&5
8563   rm -rf conftest*
8564   eval "ac_cv_header_$ac_safe=no"
8565 fi
8566 rm -f conftest*
8567 fi
8568 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8569   echo "$ac_t""yes" 1>&6
8570     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8571   cat >> confdefs.h <<EOF
8572 #define $ac_tr_hdr 1
8573 EOF
8574  
8575 else
8576   echo "$ac_t""no" 1>&6
8577 fi
8578 done
8579
8580
8581         if test $ac_cv_header_ltdl_h = no ; then
8582                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8583         fi
8584
8585         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8586 echo "configure:8587: checking for lt_dlinit in -lltdl" >&5
8587 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8588 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8589   echo $ac_n "(cached) $ac_c" 1>&6
8590 else
8591   ac_save_LIBS="$LIBS"
8592 LIBS="-lltdl  $LIBS"
8593 cat > conftest.$ac_ext <<EOF
8594 #line 8595 "configure"
8595 #include "confdefs.h"
8596 /* Override any gcc2 internal prototype to avoid an error.  */
8597 /* We use char because int might match the return type of a gcc2
8598     builtin and then its argument prototype would still apply.  */
8599 char lt_dlinit();
8600
8601 int main() {
8602 lt_dlinit()
8603 ; return 0; }
8604 EOF
8605 if { (eval echo configure:8606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8606   rm -rf conftest*
8607   eval "ac_cv_lib_$ac_lib_var=yes"
8608 else
8609   echo "configure: failed program was:" >&5
8610   cat conftest.$ac_ext >&5
8611   rm -rf conftest*
8612   eval "ac_cv_lib_$ac_lib_var=no"
8613 fi
8614 rm -f conftest*
8615 LIBS="$ac_save_LIBS"
8616
8617 fi
8618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8619   echo "$ac_t""yes" 1>&6
8620   
8621                 MODULES_LIBS=-lltdl
8622                 cat >> confdefs.h <<\EOF
8623 #define HAVE_LIBLTDL 1
8624 EOF
8625
8626         
8627 else
8628   echo "$ac_t""no" 1>&6
8629 fi
8630
8631
8632         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8633                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8634         fi
8635         ol_link_modules=yes
8636
8637 else
8638         ol_with_bdb_module=static
8639         ol_with_dnssrv_module=static
8640         ol_with_hdb_module=static
8641         ol_with_ldap_module=static
8642         ol_with_ldbm_module=static
8643         ol_with_meta_module=static
8644         ol_with_monitor_module=static
8645         ol_with_null_module=static
8646         ol_with_passwd_module=static
8647         ol_with_perl_module=static
8648         ol_with_relay_module=static
8649         ol_with_shell_module=static
8650         ol_with_sql_module=static
8651         if test $ol_enable_chain = mod ; then
8652                 echo "configure: warning: building static chain overlay" 1>&2
8653                 ol_enable_chain=yes
8654         fi
8655         if test $ol_enable_denyop = mod ; then
8656                 echo "configure: warning: building static denyop overlay" 1>&2
8657                 ol_enable_denyop=yes
8658         fi
8659         if test $ol_enable_dyngroup = mod ; then
8660                 echo "configure: warning: building static dyngroup overlay" 1>&2
8661                 ol_enable_dyngroup=yes
8662         fi
8663         if test $ol_enable_ppolicy = mod ; then
8664                 echo "configure: warning: building static ppolicy overlay" 1>&2
8665                 ol_enable_ppolicy=yes
8666         fi
8667         if test $ol_enable_proxycache = mod ; then
8668                 echo "configure: warning: building static proxycache overlay" 1>&2
8669                 ol_enable_proxycache=yes
8670         fi
8671         if test $ol_enable_rwm = mod ; then
8672                 echo "configure: warning: building static rwm overlay" 1>&2
8673                 ol_enable_rwm=yes
8674         fi
8675 fi
8676
8677 # test for EBCDIC
8678 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8679 echo "configure:8680: checking for EBCDIC" >&5
8680 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8681   echo $ac_n "(cached) $ac_c" 1>&6
8682 else
8683   
8684         cat > conftest.$ac_ext <<EOF
8685 #line 8686 "configure"
8686 #include "confdefs.h"
8687
8688 #if !('M' == 0xd4)
8689 #include <__ASCII__/generate_error.h>
8690 #endif
8691
8692 EOF
8693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8694 { (eval echo configure:8695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8696 if test -z "$ac_err"; then
8697   rm -rf conftest*
8698   ol_cv_cpp_ebcdic=yes
8699 else
8700   echo "$ac_err" >&5
8701   echo "configure: failed program was:" >&5
8702   cat conftest.$ac_ext >&5
8703   rm -rf conftest*
8704   ol_cv_cpp_ebcdic=no
8705 fi
8706 rm -f conftest*
8707 fi
8708
8709 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8710 if test $ol_cv_cpp_ebcdic = yes ; then
8711         cat >> confdefs.h <<\EOF
8712 #define HAVE_EBCDIC 1
8713 EOF
8714
8715 fi
8716
8717 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8718 echo "configure:8719: checking for ANSI C header files" >&5
8719 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8720   echo $ac_n "(cached) $ac_c" 1>&6
8721 else
8722   cat > conftest.$ac_ext <<EOF
8723 #line 8724 "configure"
8724 #include "confdefs.h"
8725 #include <stdlib.h>
8726 #include <stdarg.h>
8727 #include <string.h>
8728 #include <float.h>
8729 EOF
8730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8731 { (eval echo configure:8732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8733 if test -z "$ac_err"; then
8734   rm -rf conftest*
8735   ol_cv_header_stdc=yes
8736 else
8737   echo "$ac_err" >&5
8738   echo "configure: failed program was:" >&5
8739   cat conftest.$ac_ext >&5
8740   rm -rf conftest*
8741   ol_cv_header_stdc=no
8742 fi
8743 rm -f conftest*
8744
8745 if test $ol_cv_header_stdc = yes; then
8746   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8747 cat > conftest.$ac_ext <<EOF
8748 #line 8749 "configure"
8749 #include "confdefs.h"
8750 #include <string.h>
8751 EOF
8752 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8753   egrep "memchr" >/dev/null 2>&1; then
8754   :
8755 else
8756   rm -rf conftest*
8757   ol_cv_header_stdc=no
8758 fi
8759 rm -f conftest*
8760
8761 fi
8762
8763 if test $ol_cv_header_stdc = yes; then
8764   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8765 cat > conftest.$ac_ext <<EOF
8766 #line 8767 "configure"
8767 #include "confdefs.h"
8768 #include <stdlib.h>
8769 EOF
8770 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8771   egrep "free" >/dev/null 2>&1; then
8772   :
8773 else
8774   rm -rf conftest*
8775   ol_cv_header_stdc=no
8776 fi
8777 rm -f conftest*
8778
8779 fi
8780
8781 if test $ol_cv_header_stdc = yes; then
8782   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8783 if test "$cross_compiling" = yes; then
8784   :
8785 else
8786   cat > conftest.$ac_ext <<EOF
8787 #line 8788 "configure"
8788 #include "confdefs.h"
8789 #include <ctype.h>
8790 #ifndef HAVE_EBCDIC
8791 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8792 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8793 #else
8794 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8795                 || ('j' <= (c) && (c) <= 'r') \
8796                 || ('s' <= (c) && (c) <= 'z'))
8797 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8798 #endif
8799 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8800 int main () { int i; for (i = 0; i < 256; i++)
8801 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8802 exit (0); }
8803
8804 EOF
8805 if { (eval echo configure:8806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8806 then
8807   :
8808 else
8809   echo "configure: failed program was:" >&5
8810   cat conftest.$ac_ext >&5
8811   rm -fr conftest*
8812   ol_cv_header_stdc=no
8813 fi
8814 rm -fr conftest*
8815 fi
8816
8817 fi
8818 fi
8819
8820 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8821 if test $ol_cv_header_stdc = yes; then
8822   cat >> confdefs.h <<\EOF
8823 #define STDC_HEADERS 1
8824 EOF
8825
8826 fi
8827 ac_cv_header_stdc=disable
8828
8829
8830 if test $ol_cv_header_stdc != yes; then
8831         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8832 fi
8833
8834 ac_header_dirent=no
8835 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8836 do
8837 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8838 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8839 echo "configure:8840: checking for $ac_hdr that defines DIR" >&5
8840 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8841   echo $ac_n "(cached) $ac_c" 1>&6
8842 else
8843   cat > conftest.$ac_ext <<EOF
8844 #line 8845 "configure"
8845 #include "confdefs.h"
8846 #include <sys/types.h>
8847 #include <$ac_hdr>
8848 int main() {
8849 DIR *dirp = 0;
8850 ; return 0; }
8851 EOF
8852 if { (eval echo configure:8853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8853   rm -rf conftest*
8854   eval "ac_cv_header_dirent_$ac_safe=yes"
8855 else
8856   echo "configure: failed program was:" >&5
8857   cat conftest.$ac_ext >&5
8858   rm -rf conftest*
8859   eval "ac_cv_header_dirent_$ac_safe=no"
8860 fi
8861 rm -f conftest*
8862 fi
8863 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8864   echo "$ac_t""yes" 1>&6
8865     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8866   cat >> confdefs.h <<EOF
8867 #define $ac_tr_hdr 1
8868 EOF
8869  ac_header_dirent=$ac_hdr; break
8870 else
8871   echo "$ac_t""no" 1>&6
8872 fi
8873 done
8874 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8875 if test $ac_header_dirent = dirent.h; then
8876 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8877 echo "configure:8878: checking for opendir in -ldir" >&5
8878 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8879 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8880   echo $ac_n "(cached) $ac_c" 1>&6
8881 else
8882   ac_save_LIBS="$LIBS"
8883 LIBS="-ldir  $LIBS"
8884 cat > conftest.$ac_ext <<EOF
8885 #line 8886 "configure"
8886 #include "confdefs.h"
8887 /* Override any gcc2 internal prototype to avoid an error.  */
8888 /* We use char because int might match the return type of a gcc2
8889     builtin and then its argument prototype would still apply.  */
8890 char opendir();
8891
8892 int main() {
8893 opendir()
8894 ; return 0; }
8895 EOF
8896 if { (eval echo configure:8897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8897   rm -rf conftest*
8898   eval "ac_cv_lib_$ac_lib_var=yes"
8899 else
8900   echo "configure: failed program was:" >&5
8901   cat conftest.$ac_ext >&5
8902   rm -rf conftest*
8903   eval "ac_cv_lib_$ac_lib_var=no"
8904 fi
8905 rm -f conftest*
8906 LIBS="$ac_save_LIBS"
8907
8908 fi
8909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8910   echo "$ac_t""yes" 1>&6
8911   LIBS="$LIBS -ldir"
8912 else
8913   echo "$ac_t""no" 1>&6
8914 fi
8915
8916 else
8917 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8918 echo "configure:8919: checking for opendir in -lx" >&5
8919 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8920 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8921   echo $ac_n "(cached) $ac_c" 1>&6
8922 else
8923   ac_save_LIBS="$LIBS"
8924 LIBS="-lx  $LIBS"
8925 cat > conftest.$ac_ext <<EOF
8926 #line 8927 "configure"
8927 #include "confdefs.h"
8928 /* Override any gcc2 internal prototype to avoid an error.  */
8929 /* We use char because int might match the return type of a gcc2
8930     builtin and then its argument prototype would still apply.  */
8931 char opendir();
8932
8933 int main() {
8934 opendir()
8935 ; return 0; }
8936 EOF
8937 if { (eval echo configure:8938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8938   rm -rf conftest*
8939   eval "ac_cv_lib_$ac_lib_var=yes"
8940 else
8941   echo "configure: failed program was:" >&5
8942   cat conftest.$ac_ext >&5
8943   rm -rf conftest*
8944   eval "ac_cv_lib_$ac_lib_var=no"
8945 fi
8946 rm -f conftest*
8947 LIBS="$ac_save_LIBS"
8948
8949 fi
8950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8951   echo "$ac_t""yes" 1>&6
8952   LIBS="$LIBS -lx"
8953 else
8954   echo "$ac_t""no" 1>&6
8955 fi
8956
8957 fi
8958
8959 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8960 echo "configure:8961: checking for sys/wait.h that is POSIX.1 compatible" >&5
8961 if eval "test \"\${ac_cv_header_sys_wait_h+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 <sys/types.h>
8968 #include <sys/wait.h>
8969 #ifndef WEXITSTATUS
8970 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8971 #endif
8972 #ifndef WIFEXITED
8973 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8974 #endif
8975 int main() {
8976 int s;
8977 wait (&s);
8978 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8979 ; return 0; }
8980 EOF
8981 if { (eval echo configure:8982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8982   rm -rf conftest*
8983   ac_cv_header_sys_wait_h=yes
8984 else
8985   echo "configure: failed program was:" >&5
8986   cat conftest.$ac_ext >&5
8987   rm -rf conftest*
8988   ac_cv_header_sys_wait_h=no
8989 fi
8990 rm -f conftest*
8991 fi
8992
8993 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8994 if test $ac_cv_header_sys_wait_h = yes; then
8995   cat >> confdefs.h <<\EOF
8996 #define HAVE_SYS_WAIT_H 1
8997 EOF
8998
8999 fi
9000
9001 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
9002 echo "configure:9003: checking POSIX termios" >&5
9003 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
9004   echo $ac_n "(cached) $ac_c" 1>&6
9005 else
9006   cat > conftest.$ac_ext <<EOF
9007 #line 9008 "configure"
9008 #include "confdefs.h"
9009 #include <sys/types.h>
9010 #include <unistd.h>
9011 #include <termios.h>
9012 int main() {
9013 /* SunOS 4.0.3 has termios.h but not the library calls.  */
9014    tcgetattr(0, 0);
9015 ; return 0; }
9016 EOF
9017 if { (eval echo configure:9018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9018   rm -rf conftest*
9019   am_cv_sys_posix_termios=yes
9020 else
9021   echo "configure: failed program was:" >&5
9022   cat conftest.$ac_ext >&5
9023   rm -rf conftest*
9024   am_cv_sys_posix_termios=no
9025 fi
9026 rm -f conftest*
9027 fi
9028
9029 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
9030
9031
9032  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
9033 echo "configure:9034: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
9034 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
9035   echo $ac_n "(cached) $ac_c" 1>&6
9036 else
9037   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
9038
9039   gwinsz_in_termios_h=no
9040   if test $am_cv_sys_posix_termios = yes; then
9041     cat > conftest.$ac_ext <<EOF
9042 #line 9043 "configure"
9043 #include "confdefs.h"
9044 #include <sys/types.h>
9045 #     include <termios.h>
9046 #     ifdef TIOCGWINSZ
9047         yes
9048 #     endif
9049     
9050 EOF
9051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9052   egrep "yes" >/dev/null 2>&1; then
9053   rm -rf conftest*
9054   gwinsz_in_termios_h=yes
9055 fi
9056 rm -f conftest*
9057
9058   fi
9059
9060   if test $gwinsz_in_termios_h = no; then
9061     cat > conftest.$ac_ext <<EOF
9062 #line 9063 "configure"
9063 #include "confdefs.h"
9064 #include <sys/types.h>
9065 #     include <sys/ioctl.h>
9066 #     ifdef TIOCGWINSZ
9067         yes
9068 #     endif
9069     
9070 EOF
9071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9072   egrep "yes" >/dev/null 2>&1; then
9073   rm -rf conftest*
9074   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
9075 fi
9076 rm -f conftest*
9077
9078   fi
9079   
9080 fi
9081
9082 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
9083   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
9084     cat >> confdefs.h <<\EOF
9085 #define GWINSZ_IN_SYS_IOCTL 1
9086 EOF
9087
9088   fi
9089
9090 if test $am_cv_sys_posix_termios = yes ; then
9091         cat >> confdefs.h <<\EOF
9092 #define HAVE_POSIX_TERMIOS 1
9093 EOF
9094
9095 fi
9096
9097 for ac_hdr in \
9098         arpa/inet.h             \
9099         arpa/nameser.h  \
9100         assert.h                \
9101         bits/types.h    \
9102         conio.h                 \
9103         crypt.h                 \
9104         direct.h                \
9105         errno.h                 \
9106         fcntl.h                 \
9107         filio.h                 \
9108         getopt.h                \
9109         grp.h                   \
9110         io.h                    \
9111         libutil.h               \
9112         limits.h                \
9113         locale.h                \
9114         netinet/tcp.h   \
9115         malloc.h                \
9116         memory.h                \
9117         psap.h                  \
9118         pwd.h                   \
9119         process.h               \
9120         resolv.h                \
9121         sgtty.h                 \
9122         shadow.h                \
9123         stddef.h                \
9124         string.h                \
9125         strings.h               \
9126         sysexits.h              \
9127         sys/file.h              \
9128         sys/filio.h             \
9129         sys/errno.h             \
9130         sys/ioctl.h             \
9131         sys/param.h             \
9132         sys/resource.h  \
9133         sys/select.h    \
9134         sys/socket.h    \
9135         sys/stat.h              \
9136         sys/syslog.h    \
9137         sys/time.h              \
9138         sys/types.h             \
9139         sys/ucred.h             \
9140         sys/uio.h               \
9141         syslog.h                \
9142         termios.h               \
9143         unistd.h                \
9144         winsock.h               \
9145         winsock2.h              \
9146
9147 do
9148 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9149 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9150 echo "configure:9151: checking for $ac_hdr" >&5
9151 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9152   echo $ac_n "(cached) $ac_c" 1>&6
9153 else
9154   cat > conftest.$ac_ext <<EOF
9155 #line 9156 "configure"
9156 #include "confdefs.h"
9157 #include <$ac_hdr>
9158 EOF
9159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9160 { (eval echo configure:9161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9161 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9162 if test -z "$ac_err"; then
9163   rm -rf conftest*
9164   eval "ac_cv_header_$ac_safe=yes"
9165 else
9166   echo "$ac_err" >&5
9167   echo "configure: failed program was:" >&5
9168   cat conftest.$ac_ext >&5
9169   rm -rf conftest*
9170   eval "ac_cv_header_$ac_safe=no"
9171 fi
9172 rm -f conftest*
9173 fi
9174 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9175   echo "$ac_t""yes" 1>&6
9176     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9177   cat >> confdefs.h <<EOF
9178 #define $ac_tr_hdr 1
9179 EOF
9180  
9181 else
9182   echo "$ac_t""no" 1>&6
9183 fi
9184 done
9185
9186
9187
9188
9189 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9190 echo "configure:9191: checking for sigset in -lV3" >&5
9191 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9192 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9193   echo $ac_n "(cached) $ac_c" 1>&6
9194 else
9195   ac_save_LIBS="$LIBS"
9196 LIBS="-lV3  $LIBS"
9197 cat > conftest.$ac_ext <<EOF
9198 #line 9199 "configure"
9199 #include "confdefs.h"
9200 /* Override any gcc2 internal prototype to avoid an error.  */
9201 /* We use char because int might match the return type of a gcc2
9202     builtin and then its argument prototype would still apply.  */
9203 char sigset();
9204
9205 int main() {
9206 sigset()
9207 ; return 0; }
9208 EOF
9209 if { (eval echo configure:9210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9210   rm -rf conftest*
9211   eval "ac_cv_lib_$ac_lib_var=yes"
9212 else
9213   echo "configure: failed program was:" >&5
9214   cat conftest.$ac_ext >&5
9215   rm -rf conftest*
9216   eval "ac_cv_lib_$ac_lib_var=no"
9217 fi
9218 rm -f conftest*
9219 LIBS="$ac_save_LIBS"
9220
9221 fi
9222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9223   echo "$ac_t""yes" 1>&6
9224     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9225     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9226   cat >> confdefs.h <<EOF
9227 #define $ac_tr_lib 1
9228 EOF
9229
9230   LIBS="-lV3 $LIBS"
9231
9232 else
9233   echo "$ac_t""no" 1>&6
9234 fi
9235
9236
9237 if test "$ac_cv_header_winsock_h" = yes; then
9238 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9239 echo "configure:9240: checking for winsock" >&5
9240 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9241   echo $ac_n "(cached) $ac_c" 1>&6
9242 else
9243   save_LIBS="$LIBS"
9244 for curlib in ws2_32 wsock32; do
9245         LIBS="$LIBS -l$curlib"
9246         cat > conftest.$ac_ext <<EOF
9247 #line 9248 "configure"
9248 #include "confdefs.h"
9249 #include <winsock.h>
9250                         
9251 int main() {
9252
9253                         socket(0,0,0);
9254                         select(0,NULL,NULL,NULL,NULL);
9255                         closesocket(0);
9256                         gethostname(NULL,0);
9257                         
9258 ; return 0; }
9259 EOF
9260 if { (eval echo configure:9261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9261   rm -rf conftest*
9262   ol_cv_winsock=yes
9263 else
9264   echo "configure: failed program was:" >&5
9265   cat conftest.$ac_ext >&5
9266   rm -rf conftest*
9267   ol_cv_winsock=no
9268 fi
9269 rm -f conftest*
9270
9271         if test $ol_cv_winsock = yes; then
9272                 cat >> confdefs.h <<\EOF
9273 #define HAVE_WINSOCK 1
9274 EOF
9275
9276                 ac_cv_func_socket=yes
9277                 ac_cv_func_select=yes
9278                 ac_cv_func_closesocket=yes
9279                 ac_cv_func_gethostname=yes
9280                 if test $curlib = ws2_32; then
9281                         ol_cv_winsock=winsock2
9282                         cat >> confdefs.h <<\EOF
9283 #define HAVE_WINSOCK2 1
9284 EOF
9285
9286                 fi
9287                 break
9288         fi
9289         LIBS="$save_LIBS"
9290 done
9291 fi
9292
9293 echo "$ac_t""$ol_cv_winsock" 1>&6
9294 fi
9295
9296
9297 echo $ac_n "checking for socket""... $ac_c" 1>&6
9298 echo "configure:9299: checking for socket" >&5
9299 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9300   echo $ac_n "(cached) $ac_c" 1>&6
9301 else
9302   cat > conftest.$ac_ext <<EOF
9303 #line 9304 "configure"
9304 #include "confdefs.h"
9305 /* System header to define __stub macros and hopefully few prototypes,
9306     which can conflict with char socket(); below.  */
9307 #include <assert.h>
9308 /* Override any gcc2 internal prototype to avoid an error.  */
9309 /* We use char because int might match the return type of a gcc2
9310     builtin and then its argument prototype would still apply.  */
9311 char socket();
9312 char (*f)();
9313
9314 int main() {
9315
9316 /* The GNU C library defines this for functions which it implements
9317     to always fail with ENOSYS.  Some functions are actually named
9318     something starting with __ and the normal name is an alias.  */
9319 #if defined (__stub_socket) || defined (__stub___socket)
9320 choke me
9321 #else
9322 f = socket;
9323 #endif
9324
9325 ; return 0; }
9326 EOF
9327 if { (eval echo configure:9328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9328   rm -rf conftest*
9329   eval "ac_cv_func_socket=yes"
9330 else
9331   echo "configure: failed program was:" >&5
9332   cat conftest.$ac_ext >&5
9333   rm -rf conftest*
9334   eval "ac_cv_func_socket=no"
9335 fi
9336 rm -f conftest*
9337 fi
9338
9339 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9340   echo "$ac_t""yes" 1>&6
9341   :
9342 else
9343   echo "$ac_t""no" 1>&6
9344         
9345         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9346 echo "configure:9347: checking for main in -lsocket" >&5
9347 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9348 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9349   echo $ac_n "(cached) $ac_c" 1>&6
9350 else
9351   ac_save_LIBS="$LIBS"
9352 LIBS="-lsocket  $LIBS"
9353 cat > conftest.$ac_ext <<EOF
9354 #line 9355 "configure"
9355 #include "confdefs.h"
9356
9357 int main() {
9358 main()
9359 ; return 0; }
9360 EOF
9361 if { (eval echo configure:9362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9362   rm -rf conftest*
9363   eval "ac_cv_lib_$ac_lib_var=yes"
9364 else
9365   echo "configure: failed program was:" >&5
9366   cat conftest.$ac_ext >&5
9367   rm -rf conftest*
9368   eval "ac_cv_lib_$ac_lib_var=no"
9369 fi
9370 rm -f conftest*
9371 LIBS="$ac_save_LIBS"
9372
9373 fi
9374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9375   echo "$ac_t""yes" 1>&6
9376     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9377     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9378   cat >> confdefs.h <<EOF
9379 #define $ac_tr_lib 1
9380 EOF
9381
9382   LIBS="-lsocket $LIBS"
9383
9384 else
9385   echo "$ac_t""no" 1>&6
9386 fi
9387
9388         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9389 echo "configure:9390: checking for main in -lnet" >&5
9390 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9391 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9392   echo $ac_n "(cached) $ac_c" 1>&6
9393 else
9394   ac_save_LIBS="$LIBS"
9395 LIBS="-lnet  $LIBS"
9396 cat > conftest.$ac_ext <<EOF
9397 #line 9398 "configure"
9398 #include "confdefs.h"
9399
9400 int main() {
9401 main()
9402 ; return 0; }
9403 EOF
9404 if { (eval echo configure:9405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9405   rm -rf conftest*
9406   eval "ac_cv_lib_$ac_lib_var=yes"
9407 else
9408   echo "configure: failed program was:" >&5
9409   cat conftest.$ac_ext >&5
9410   rm -rf conftest*
9411   eval "ac_cv_lib_$ac_lib_var=no"
9412 fi
9413 rm -f conftest*
9414 LIBS="$ac_save_LIBS"
9415
9416 fi
9417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9418   echo "$ac_t""yes" 1>&6
9419     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9420     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9421   cat >> confdefs.h <<EOF
9422 #define $ac_tr_lib 1
9423 EOF
9424
9425   LIBS="-lnet $LIBS"
9426
9427 else
9428   echo "$ac_t""no" 1>&6
9429 fi
9430
9431         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9432 echo "configure:9433: checking for main in -lnsl_s" >&5
9433 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9434 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9435   echo $ac_n "(cached) $ac_c" 1>&6
9436 else
9437   ac_save_LIBS="$LIBS"
9438 LIBS="-lnsl_s  $LIBS"
9439 cat > conftest.$ac_ext <<EOF
9440 #line 9441 "configure"
9441 #include "confdefs.h"
9442
9443 int main() {
9444 main()
9445 ; return 0; }
9446 EOF
9447 if { (eval echo configure:9448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9448   rm -rf conftest*
9449   eval "ac_cv_lib_$ac_lib_var=yes"
9450 else
9451   echo "configure: failed program was:" >&5
9452   cat conftest.$ac_ext >&5
9453   rm -rf conftest*
9454   eval "ac_cv_lib_$ac_lib_var=no"
9455 fi
9456 rm -f conftest*
9457 LIBS="$ac_save_LIBS"
9458
9459 fi
9460 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9461   echo "$ac_t""yes" 1>&6
9462     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9463     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9464   cat >> confdefs.h <<EOF
9465 #define $ac_tr_lib 1
9466 EOF
9467
9468   LIBS="-lnsl_s $LIBS"
9469
9470 else
9471   echo "$ac_t""no" 1>&6
9472 fi
9473
9474         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9475 echo "configure:9476: checking for main in -lnsl" >&5
9476 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9477 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9478   echo $ac_n "(cached) $ac_c" 1>&6
9479 else
9480   ac_save_LIBS="$LIBS"
9481 LIBS="-lnsl  $LIBS"
9482 cat > conftest.$ac_ext <<EOF
9483 #line 9484 "configure"
9484 #include "confdefs.h"
9485
9486 int main() {
9487 main()
9488 ; return 0; }
9489 EOF
9490 if { (eval echo configure:9491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9491   rm -rf conftest*
9492   eval "ac_cv_lib_$ac_lib_var=yes"
9493 else
9494   echo "configure: failed program was:" >&5
9495   cat conftest.$ac_ext >&5
9496   rm -rf conftest*
9497   eval "ac_cv_lib_$ac_lib_var=no"
9498 fi
9499 rm -f conftest*
9500 LIBS="$ac_save_LIBS"
9501
9502 fi
9503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9504   echo "$ac_t""yes" 1>&6
9505     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9506     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9507   cat >> confdefs.h <<EOF
9508 #define $ac_tr_lib 1
9509 EOF
9510
9511   LIBS="-lnsl $LIBS"
9512
9513 else
9514   echo "$ac_t""no" 1>&6
9515 fi
9516
9517         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9518 echo "configure:9519: checking for socket in -linet" >&5
9519 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9520 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9521   echo $ac_n "(cached) $ac_c" 1>&6
9522 else
9523   ac_save_LIBS="$LIBS"
9524 LIBS="-linet  $LIBS"
9525 cat > conftest.$ac_ext <<EOF
9526 #line 9527 "configure"
9527 #include "confdefs.h"
9528 /* Override any gcc2 internal prototype to avoid an error.  */
9529 /* We use char because int might match the return type of a gcc2
9530     builtin and then its argument prototype would still apply.  */
9531 char socket();
9532
9533 int main() {
9534 socket()
9535 ; return 0; }
9536 EOF
9537 if { (eval echo configure:9538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9538   rm -rf conftest*
9539   eval "ac_cv_lib_$ac_lib_var=yes"
9540 else
9541   echo "configure: failed program was:" >&5
9542   cat conftest.$ac_ext >&5
9543   rm -rf conftest*
9544   eval "ac_cv_lib_$ac_lib_var=no"
9545 fi
9546 rm -f conftest*
9547 LIBS="$ac_save_LIBS"
9548
9549 fi
9550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9551   echo "$ac_t""yes" 1>&6
9552     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9553     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9554   cat >> confdefs.h <<EOF
9555 #define $ac_tr_lib 1
9556 EOF
9557
9558   LIBS="-linet $LIBS"
9559
9560 else
9561   echo "$ac_t""no" 1>&6
9562 fi
9563
9564         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9565 echo "configure:9566: checking for main in -lgen" >&5
9566 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9567 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9568   echo $ac_n "(cached) $ac_c" 1>&6
9569 else
9570   ac_save_LIBS="$LIBS"
9571 LIBS="-lgen  $LIBS"
9572 cat > conftest.$ac_ext <<EOF
9573 #line 9574 "configure"
9574 #include "confdefs.h"
9575
9576 int main() {
9577 main()
9578 ; return 0; }
9579 EOF
9580 if { (eval echo configure:9581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9581   rm -rf conftest*
9582   eval "ac_cv_lib_$ac_lib_var=yes"
9583 else
9584   echo "configure: failed program was:" >&5
9585   cat conftest.$ac_ext >&5
9586   rm -rf conftest*
9587   eval "ac_cv_lib_$ac_lib_var=no"
9588 fi
9589 rm -f conftest*
9590 LIBS="$ac_save_LIBS"
9591
9592 fi
9593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9594   echo "$ac_t""yes" 1>&6
9595     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9596     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9597   cat >> confdefs.h <<EOF
9598 #define $ac_tr_lib 1
9599 EOF
9600
9601   LIBS="-lgen $LIBS"
9602
9603 else
9604   echo "$ac_t""no" 1>&6
9605 fi
9606
9607
9608 fi
9609
9610
9611 echo $ac_n "checking for select""... $ac_c" 1>&6
9612 echo "configure:9613: checking for select" >&5
9613 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9614   echo $ac_n "(cached) $ac_c" 1>&6
9615 else
9616   cat > conftest.$ac_ext <<EOF
9617 #line 9618 "configure"
9618 #include "confdefs.h"
9619 /* System header to define __stub macros and hopefully few prototypes,
9620     which can conflict with char select(); below.  */
9621 #include <assert.h>
9622 /* Override any gcc2 internal prototype to avoid an error.  */
9623 /* We use char because int might match the return type of a gcc2
9624     builtin and then its argument prototype would still apply.  */
9625 char select();
9626 char (*f)();
9627
9628 int main() {
9629
9630 /* The GNU C library defines this for functions which it implements
9631     to always fail with ENOSYS.  Some functions are actually named
9632     something starting with __ and the normal name is an alias.  */
9633 #if defined (__stub_select) || defined (__stub___select)
9634 choke me
9635 #else
9636 f = select;
9637 #endif
9638
9639 ; return 0; }
9640 EOF
9641 if { (eval echo configure:9642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9642   rm -rf conftest*
9643   eval "ac_cv_func_select=yes"
9644 else
9645   echo "configure: failed program was:" >&5
9646   cat conftest.$ac_ext >&5
9647   rm -rf conftest*
9648   eval "ac_cv_func_select=no"
9649 fi
9650 rm -f conftest*
9651 fi
9652
9653 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9654   echo "$ac_t""yes" 1>&6
9655   :
9656 else
9657   echo "$ac_t""no" 1>&6
9658 { echo "configure: error: select() required." 1>&2; exit 1; }
9659 fi
9660
9661
9662 if test "${ac_cv_header_winsock_h}" != yes; then
9663                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9664 echo "configure:9665: checking types of arguments for select()" >&5
9665  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9666   echo $ac_n "(cached) $ac_c" 1>&6
9667 else
9668    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9669   echo $ac_n "(cached) $ac_c" 1>&6
9670 else
9671     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9672   echo $ac_n "(cached) $ac_c" 1>&6
9673 else
9674      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9675      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9676       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9677        cat > conftest.$ac_ext <<EOF
9678 #line 9679 "configure"
9679 #include "confdefs.h"
9680 #ifdef HAVE_SYS_TYPES_H
9681 #include <sys/types.h>
9682 #endif
9683 #ifdef HAVE_SYS_TIME_H
9684 #include <sys/time.h>
9685 #endif
9686 #ifdef HAVE_SYS_SELECT_H
9687 #include <sys/select.h>
9688 #endif
9689 #ifdef HAVE_SYS_SOCKET_H
9690 #include <sys/socket.h>
9691 #endif
9692 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);
9693 int main() {
9694
9695 ; return 0; }
9696 EOF
9697 if { (eval echo configure:9698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9698   rm -rf conftest*
9699           ac_not_found=no ; break 3
9700 else
9701   echo "configure: failed program was:" >&5
9702   cat conftest.$ac_ext >&5
9703   rm -rf conftest*
9704   ac_not_found=yes
9705 fi
9706 rm -f conftest*
9707       done
9708      done
9709     done
9710    
9711 fi
9712   
9713 fi
9714  
9715 fi
9716  if test "$ac_not_found" = yes; then
9717   ac_cv_func_select_arg1=int 
9718   ac_cv_func_select_arg234='int *' 
9719   ac_cv_func_select_arg5='struct timeval *'
9720  fi
9721  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9722  cat >> confdefs.h <<EOF
9723 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9724 EOF
9725
9726  cat >> confdefs.h <<EOF
9727 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9728 EOF
9729
9730  cat >> confdefs.h <<EOF
9731 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9732 EOF
9733
9734
9735 fi
9736
9737
9738 for ac_hdr in regex.h 
9739 do
9740 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9741 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9742 echo "configure:9743: checking for $ac_hdr" >&5
9743 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9744   echo $ac_n "(cached) $ac_c" 1>&6
9745 else
9746   cat > conftest.$ac_ext <<EOF
9747 #line 9748 "configure"
9748 #include "confdefs.h"
9749 #include <$ac_hdr>
9750 EOF
9751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9752 { (eval echo configure:9753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9754 if test -z "$ac_err"; then
9755   rm -rf conftest*
9756   eval "ac_cv_header_$ac_safe=yes"
9757 else
9758   echo "$ac_err" >&5
9759   echo "configure: failed program was:" >&5
9760   cat conftest.$ac_ext >&5
9761   rm -rf conftest*
9762   eval "ac_cv_header_$ac_safe=no"
9763 fi
9764 rm -f conftest*
9765 fi
9766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9767   echo "$ac_t""yes" 1>&6
9768     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9769   cat >> confdefs.h <<EOF
9770 #define $ac_tr_hdr 1
9771 EOF
9772  
9773 else
9774   echo "$ac_t""no" 1>&6
9775 fi
9776 done
9777
9778 if test "$ac_cv_header_regex_h" != yes ; then
9779         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9780 fi
9781
9782 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9783 echo "configure:9784: checking for library containing regfree" >&5
9784 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9785   echo $ac_n "(cached) $ac_c" 1>&6
9786 else
9787   ac_func_search_save_LIBS="$LIBS"
9788 ac_cv_search_regfree="no"
9789 cat > conftest.$ac_ext <<EOF
9790 #line 9791 "configure"
9791 #include "confdefs.h"
9792 /* Override any gcc2 internal prototype to avoid an error.  */
9793 /* We use char because int might match the return type of a gcc2
9794     builtin and then its argument prototype would still apply.  */
9795 char regfree();
9796
9797 int main() {
9798 regfree()
9799 ; return 0; }
9800 EOF
9801 if { (eval echo configure:9802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9802   rm -rf conftest*
9803   ac_cv_search_regfree="none required"
9804 else
9805   echo "configure: failed program was:" >&5
9806   cat conftest.$ac_ext >&5
9807 fi
9808 rm -f conftest*
9809 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9810 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9811 cat > conftest.$ac_ext <<EOF
9812 #line 9813 "configure"
9813 #include "confdefs.h"
9814 /* Override any gcc2 internal prototype to avoid an error.  */
9815 /* We use char because int might match the return type of a gcc2
9816     builtin and then its argument prototype would still apply.  */
9817 char regfree();
9818
9819 int main() {
9820 regfree()
9821 ; return 0; }
9822 EOF
9823 if { (eval echo configure:9824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9824   rm -rf conftest*
9825   ac_cv_search_regfree="-l$ac_lib"
9826 break
9827 else
9828   echo "configure: failed program was:" >&5
9829   cat conftest.$ac_ext >&5
9830 fi
9831 rm -f conftest*
9832 done
9833 LIBS="$ac_func_search_save_LIBS"
9834 fi
9835
9836 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9837 if test "$ac_cv_search_regfree" != "no"; then
9838   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9839   :
9840 else :
9841   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9842 fi
9843
9844
9845 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9846 echo "configure:9847: checking for compatible POSIX regex" >&5
9847 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9848   echo $ac_n "(cached) $ac_c" 1>&6
9849 else
9850   
9851         if test "$cross_compiling" = yes; then
9852   ol_cv_c_posix_regex=cross
9853 else
9854   cat > conftest.$ac_ext <<EOF
9855 #line 9856 "configure"
9856 #include "confdefs.h"
9857
9858 #include <sys/types.h>
9859 #include <regex.h>
9860 static char *pattern, *string;
9861 main()
9862 {
9863         int rc;
9864         regex_t re;
9865
9866         pattern = "^A";
9867
9868         if(regcomp(&re, pattern, 0)) {
9869                 return -1;
9870         }
9871         
9872         string = "ALL MATCH";
9873         
9874         rc = regexec(&re, string, 0, (void*)0, 0);
9875
9876         regfree(&re);
9877
9878         return rc;
9879 }
9880 EOF
9881 if { (eval echo configure:9882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9882 then
9883   ol_cv_c_posix_regex=yes
9884 else
9885   echo "configure: failed program was:" >&5
9886   cat conftest.$ac_ext >&5
9887   rm -fr conftest*
9888   ol_cv_c_posix_regex=no
9889 fi
9890 rm -fr conftest*
9891 fi
9892
9893 fi
9894
9895 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9896
9897 if test "$ol_cv_c_posix_regex" = no ; then
9898         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9899 fi
9900
9901
9902 have_uuid=no
9903 for ac_hdr in sys/uuid.h
9904 do
9905 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9906 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9907 echo "configure:9908: checking for $ac_hdr" >&5
9908 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9909   echo $ac_n "(cached) $ac_c" 1>&6
9910 else
9911   cat > conftest.$ac_ext <<EOF
9912 #line 9913 "configure"
9913 #include "confdefs.h"
9914 #include <$ac_hdr>
9915 EOF
9916 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9917 { (eval echo configure:9918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9918 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9919 if test -z "$ac_err"; then
9920   rm -rf conftest*
9921   eval "ac_cv_header_$ac_safe=yes"
9922 else
9923   echo "$ac_err" >&5
9924   echo "configure: failed program was:" >&5
9925   cat conftest.$ac_ext >&5
9926   rm -rf conftest*
9927   eval "ac_cv_header_$ac_safe=no"
9928 fi
9929 rm -f conftest*
9930 fi
9931 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9932   echo "$ac_t""yes" 1>&6
9933     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9934   cat >> confdefs.h <<EOF
9935 #define $ac_tr_hdr 1
9936 EOF
9937  
9938 else
9939   echo "$ac_t""no" 1>&6
9940 fi
9941 done
9942
9943 if test $ac_cv_header_sys_uuid_h = yes ; then
9944         save_LIBS="$LIBS"
9945         
9946 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9947 echo "configure:9948: checking for library containing uuid_to_str" >&5
9948 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9949   echo $ac_n "(cached) $ac_c" 1>&6
9950 else
9951   ac_func_search_save_LIBS="$LIBS"
9952 ac_cv_search_uuid_to_str="no"
9953 cat > conftest.$ac_ext <<EOF
9954 #line 9955 "configure"
9955 #include "confdefs.h"
9956 /* Override any gcc2 internal prototype to avoid an error.  */
9957 /* We use char because int might match the return type of a gcc2
9958     builtin and then its argument prototype would still apply.  */
9959 char uuid_to_str();
9960
9961 int main() {
9962 uuid_to_str()
9963 ; return 0; }
9964 EOF
9965 if { (eval echo configure:9966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9966   rm -rf conftest*
9967   ac_cv_search_uuid_to_str="none required"
9968 else
9969   echo "configure: failed program was:" >&5
9970   cat conftest.$ac_ext >&5
9971 fi
9972 rm -f conftest*
9973 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9974 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9975 cat > conftest.$ac_ext <<EOF
9976 #line 9977 "configure"
9977 #include "confdefs.h"
9978 /* Override any gcc2 internal prototype to avoid an error.  */
9979 /* We use char because int might match the return type of a gcc2
9980     builtin and then its argument prototype would still apply.  */
9981 char uuid_to_str();
9982
9983 int main() {
9984 uuid_to_str()
9985 ; return 0; }
9986 EOF
9987 if { (eval echo configure:9988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9988   rm -rf conftest*
9989   ac_cv_search_uuid_to_str="-l$ac_lib"
9990 break
9991 else
9992   echo "configure: failed program was:" >&5
9993   cat conftest.$ac_ext >&5
9994 fi
9995 rm -f conftest*
9996 done
9997 LIBS="$ac_func_search_save_LIBS"
9998 fi
9999
10000 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10001 if test "$ac_cv_search_uuid_to_str" != "no"; then
10002   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10003   have_uuid=yes
10004 else :
10005   :
10006 fi
10007         LIBS="$save_LIBS"
10008
10009         if test have_uuid = yes ; then
10010                 cat >> confdefs.h <<\EOF
10011 #define HAVE_UUID_TO_STR 1
10012 EOF
10013
10014
10015                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10016                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10017         fi
10018 fi
10019
10020 if test $have_uuid = no ; then
10021         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10022 echo "configure:10023: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10023         save_LIBS="$LIBS"
10024         LIBS="$LIBS -lrpcrt4"
10025         cat > conftest.$ac_ext <<EOF
10026 #line 10027 "configure"
10027 #include "confdefs.h"
10028
10029                 int __stdcall UuidCreate(void *);
10030                 int __stdcall UuidToStringA(void *,void **);
10031                 
10032 int main() {
10033
10034                 UuidCreate(0);
10035                 UuidToStringA(0,0);
10036                 
10037 ; return 0; }
10038 EOF
10039 if { (eval echo configure:10040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10040   rm -rf conftest*
10041   need_rpcrt=yes
10042 else
10043   echo "configure: failed program was:" >&5
10044   cat conftest.$ac_ext >&5
10045   rm -rf conftest*
10046   need_rpcrt=no
10047 fi
10048 rm -f conftest*
10049         if test $need_rpcrt = yes; then
10050                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10051         fi
10052         LIBS="$save_LIBS"
10053         echo "$ac_t""$need_rpcrt" 1>&6
10054 fi
10055
10056 ol_link_dnssrv=no
10057 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10058 echo "configure:10059: checking for res_query" >&5
10059 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10060   echo $ac_n "(cached) $ac_c" 1>&6
10061 else
10062   cat > conftest.$ac_ext <<EOF
10063 #line 10064 "configure"
10064 #include "confdefs.h"
10065 /* System header to define __stub macros and hopefully few prototypes,
10066     which can conflict with char res_query(); below.  */
10067 #include <assert.h>
10068 /* Override any gcc2 internal prototype to avoid an error.  */
10069 /* We use char because int might match the return type of a gcc2
10070     builtin and then its argument prototype would still apply.  */
10071 char res_query();
10072 char (*f)();
10073
10074 int main() {
10075
10076 /* The GNU C library defines this for functions which it implements
10077     to always fail with ENOSYS.  Some functions are actually named
10078     something starting with __ and the normal name is an alias.  */
10079 #if defined (__stub_res_query) || defined (__stub___res_query)
10080 choke me
10081 #else
10082 f = res_query;
10083 #endif
10084
10085 ; return 0; }
10086 EOF
10087 if { (eval echo configure:10088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10088   rm -rf conftest*
10089   eval "ac_cv_func_res_query=yes"
10090 else
10091   echo "configure: failed program was:" >&5
10092   cat conftest.$ac_ext >&5
10093   rm -rf conftest*
10094   eval "ac_cv_func_res_query=no"
10095 fi
10096 rm -f conftest*
10097 fi
10098
10099 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10100   echo "$ac_t""yes" 1>&6
10101   :
10102 else
10103   echo "$ac_t""no" 1>&6
10104 fi
10105
10106 if test $ac_cv_func_res_query = no ; then 
10107         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10108 echo "configure:10109: checking for __res_query" >&5
10109 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10110   echo $ac_n "(cached) $ac_c" 1>&6
10111 else
10112   cat > conftest.$ac_ext <<EOF
10113 #line 10114 "configure"
10114 #include "confdefs.h"
10115 /* System header to define __stub macros and hopefully few prototypes,
10116     which can conflict with char __res_query(); below.  */
10117 #include <assert.h>
10118 /* Override any gcc2 internal prototype to avoid an error.  */
10119 /* We use char because int might match the return type of a gcc2
10120     builtin and then its argument prototype would still apply.  */
10121 char __res_query();
10122 char (*f)();
10123
10124 int main() {
10125
10126 /* The GNU C library defines this for functions which it implements
10127     to always fail with ENOSYS.  Some functions are actually named
10128     something starting with __ and the normal name is an alias.  */
10129 #if defined (__stub___res_query) || defined (__stub_____res_query)
10130 choke me
10131 #else
10132 f = __res_query;
10133 #endif
10134
10135 ; return 0; }
10136 EOF
10137 if { (eval echo configure:10138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10138   rm -rf conftest*
10139   eval "ac_cv_func___res_query=yes"
10140 else
10141   echo "configure: failed program was:" >&5
10142   cat conftest.$ac_ext >&5
10143   rm -rf conftest*
10144   eval "ac_cv_func___res_query=no"
10145 fi
10146 rm -f conftest*
10147 fi
10148
10149 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10150   echo "$ac_t""yes" 1>&6
10151   :
10152 else
10153   echo "$ac_t""no" 1>&6
10154 fi
10155
10156         ac_cv_func_res_query=$ac_cv_func___res_query
10157 fi
10158
10159 if test $ac_cv_func_res_query = no ; then 
10160         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10161 echo "configure:10162: checking for res_query in -lbind" >&5
10162 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10164   echo $ac_n "(cached) $ac_c" 1>&6
10165 else
10166   ac_save_LIBS="$LIBS"
10167 LIBS="-lbind  $LIBS"
10168 cat > conftest.$ac_ext <<EOF
10169 #line 10170 "configure"
10170 #include "confdefs.h"
10171 /* Override any gcc2 internal prototype to avoid an error.  */
10172 /* We use char because int might match the return type of a gcc2
10173     builtin and then its argument prototype would still apply.  */
10174 char res_query();
10175
10176 int main() {
10177 res_query()
10178 ; return 0; }
10179 EOF
10180 if { (eval echo configure:10181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10181   rm -rf conftest*
10182   eval "ac_cv_lib_$ac_lib_var=yes"
10183 else
10184   echo "configure: failed program was:" >&5
10185   cat conftest.$ac_ext >&5
10186   rm -rf conftest*
10187   eval "ac_cv_lib_$ac_lib_var=no"
10188 fi
10189 rm -f conftest*
10190 LIBS="$ac_save_LIBS"
10191
10192 fi
10193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10194   echo "$ac_t""yes" 1>&6
10195     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10196     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10197   cat >> confdefs.h <<EOF
10198 #define $ac_tr_lib 1
10199 EOF
10200
10201   LIBS="-lbind $LIBS"
10202
10203 else
10204   echo "$ac_t""no" 1>&6
10205 fi
10206
10207         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10208 fi
10209
10210 if test $ac_cv_func_res_query = no ; then 
10211         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10212 echo "configure:10213: checking for __res_query in -lbind" >&5
10213 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10215   echo $ac_n "(cached) $ac_c" 1>&6
10216 else
10217   ac_save_LIBS="$LIBS"
10218 LIBS="-lbind  $LIBS"
10219 cat > conftest.$ac_ext <<EOF
10220 #line 10221 "configure"
10221 #include "confdefs.h"
10222 /* Override any gcc2 internal prototype to avoid an error.  */
10223 /* We use char because int might match the return type of a gcc2
10224     builtin and then its argument prototype would still apply.  */
10225 char __res_query();
10226
10227 int main() {
10228 __res_query()
10229 ; return 0; }
10230 EOF
10231 if { (eval echo configure:10232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10232   rm -rf conftest*
10233   eval "ac_cv_lib_$ac_lib_var=yes"
10234 else
10235   echo "configure: failed program was:" >&5
10236   cat conftest.$ac_ext >&5
10237   rm -rf conftest*
10238   eval "ac_cv_lib_$ac_lib_var=no"
10239 fi
10240 rm -f conftest*
10241 LIBS="$ac_save_LIBS"
10242
10243 fi
10244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10245   echo "$ac_t""yes" 1>&6
10246     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10247     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10248   cat >> confdefs.h <<EOF
10249 #define $ac_tr_lib 1
10250 EOF
10251
10252   LIBS="-lbind $LIBS"
10253
10254 else
10255   echo "$ac_t""no" 1>&6
10256 fi
10257
10258         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10259 fi
10260
10261 if test $ac_cv_func_res_query = no ; then 
10262         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10263 echo "configure:10264: checking for res_query in -lresolv" >&5
10264 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10265 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10266   echo $ac_n "(cached) $ac_c" 1>&6
10267 else
10268   ac_save_LIBS="$LIBS"
10269 LIBS="-lresolv  $LIBS"
10270 cat > conftest.$ac_ext <<EOF
10271 #line 10272 "configure"
10272 #include "confdefs.h"
10273 /* Override any gcc2 internal prototype to avoid an error.  */
10274 /* We use char because int might match the return type of a gcc2
10275     builtin and then its argument prototype would still apply.  */
10276 char res_query();
10277
10278 int main() {
10279 res_query()
10280 ; return 0; }
10281 EOF
10282 if { (eval echo configure:10283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10283   rm -rf conftest*
10284   eval "ac_cv_lib_$ac_lib_var=yes"
10285 else
10286   echo "configure: failed program was:" >&5
10287   cat conftest.$ac_ext >&5
10288   rm -rf conftest*
10289   eval "ac_cv_lib_$ac_lib_var=no"
10290 fi
10291 rm -f conftest*
10292 LIBS="$ac_save_LIBS"
10293
10294 fi
10295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10296   echo "$ac_t""yes" 1>&6
10297     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10298     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10299   cat >> confdefs.h <<EOF
10300 #define $ac_tr_lib 1
10301 EOF
10302
10303   LIBS="-lresolv $LIBS"
10304
10305 else
10306   echo "$ac_t""no" 1>&6
10307 fi
10308
10309         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10310 fi
10311
10312 if test $ac_cv_func_res_query = no ; then 
10313         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10314 echo "configure:10315: checking for __res_query in -lresolv" >&5
10315 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10316 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10317   echo $ac_n "(cached) $ac_c" 1>&6
10318 else
10319   ac_save_LIBS="$LIBS"
10320 LIBS="-lresolv  $LIBS"
10321 cat > conftest.$ac_ext <<EOF
10322 #line 10323 "configure"
10323 #include "confdefs.h"
10324 /* Override any gcc2 internal prototype to avoid an error.  */
10325 /* We use char because int might match the return type of a gcc2
10326     builtin and then its argument prototype would still apply.  */
10327 char __res_query();
10328
10329 int main() {
10330 __res_query()
10331 ; return 0; }
10332 EOF
10333 if { (eval echo configure:10334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10334   rm -rf conftest*
10335   eval "ac_cv_lib_$ac_lib_var=yes"
10336 else
10337   echo "configure: failed program was:" >&5
10338   cat conftest.$ac_ext >&5
10339   rm -rf conftest*
10340   eval "ac_cv_lib_$ac_lib_var=no"
10341 fi
10342 rm -f conftest*
10343 LIBS="$ac_save_LIBS"
10344
10345 fi
10346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10347   echo "$ac_t""yes" 1>&6
10348     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10349     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10350   cat >> confdefs.h <<EOF
10351 #define $ac_tr_lib 1
10352 EOF
10353
10354   LIBS="-lresolv $LIBS"
10355
10356 else
10357   echo "$ac_t""no" 1>&6
10358 fi
10359
10360         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10361 fi
10362
10363 if test "$ac_cv_func_res_query" = yes ; then
10364         cat >> confdefs.h <<\EOF
10365 #define HAVE_RES_QUERY 1
10366 EOF
10367
10368
10369         if test $ol_enable_dnssrv != no ; then
10370                 ol_link_dnssrv=yes
10371         fi
10372 fi
10373
10374 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10375         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10376 fi
10377
10378 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10379 do
10380 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10381 echo "configure:10382: checking for $ac_func" >&5
10382 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10383   echo $ac_n "(cached) $ac_c" 1>&6
10384 else
10385   cat > conftest.$ac_ext <<EOF
10386 #line 10387 "configure"
10387 #include "confdefs.h"
10388 /* System header to define __stub macros and hopefully few prototypes,
10389     which can conflict with char $ac_func(); below.  */
10390 #include <assert.h>
10391 /* Override any gcc2 internal prototype to avoid an error.  */
10392 /* We use char because int might match the return type of a gcc2
10393     builtin and then its argument prototype would still apply.  */
10394 char $ac_func();
10395 char (*f)();
10396
10397 int main() {
10398
10399 /* The GNU C library defines this for functions which it implements
10400     to always fail with ENOSYS.  Some functions are actually named
10401     something starting with __ and the normal name is an alias.  */
10402 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10403 choke me
10404 #else
10405 f = $ac_func;
10406 #endif
10407
10408 ; return 0; }
10409 EOF
10410 if { (eval echo configure:10411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10411   rm -rf conftest*
10412   eval "ac_cv_func_$ac_func=yes"
10413 else
10414   echo "configure: failed program was:" >&5
10415   cat conftest.$ac_ext >&5
10416   rm -rf conftest*
10417   eval "ac_cv_func_$ac_func=no"
10418 fi
10419 rm -f conftest*
10420 fi
10421
10422 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10423   echo "$ac_t""yes" 1>&6
10424     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10425   cat >> confdefs.h <<EOF
10426 #define $ac_tr_func 1
10427 EOF
10428  
10429 else
10430   echo "$ac_t""no" 1>&6
10431 fi
10432 done
10433
10434
10435 ol_link_ipv6=no
10436 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10437         if test $ol_enable_ipv6 = yes ; then
10438                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10439         fi
10440 elif test $ol_enable_ipv6 != no ; then
10441         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10442 echo "configure:10443: checking INET6_ADDRSTRLEN" >&5
10443 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10444   echo $ac_n "(cached) $ac_c" 1>&6
10445 else
10446   
10447                 cat > conftest.$ac_ext <<EOF
10448 #line 10449 "configure"
10449 #include "confdefs.h"
10450
10451 #                       include <netinet/in.h>
10452 #                       ifdef INET6_ADDRSTRLEN
10453                                 __has_inet6_addrstrlen__;
10454 #                       endif
10455                 
10456 EOF
10457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10458   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10459   rm -rf conftest*
10460   ol_cv_inet6_addrstrlen=yes
10461 else
10462   rm -rf conftest*
10463   ol_cv_inet6_addrstrlen=no
10464 fi
10465 rm -f conftest*
10466
10467 fi
10468
10469 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10470
10471
10472         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10473 echo "configure:10474: checking struct sockaddr_storage" >&5
10474 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10475   echo $ac_n "(cached) $ac_c" 1>&6
10476 else
10477   
10478                 cat > conftest.$ac_ext <<EOF
10479 #line 10480 "configure"
10480 #include "confdefs.h"
10481
10482 #include <sys/types.h>
10483 #include <sys/socket.h>
10484
10485 int main() {
10486
10487                         struct sockaddr_storage ss;
10488
10489 ; return 0; }
10490 EOF
10491 if { (eval echo configure:10492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10492   rm -rf conftest*
10493   ol_cv_struct_sockaddr_storage=yes
10494 else
10495   echo "configure: failed program was:" >&5
10496   cat conftest.$ac_ext >&5
10497   rm -rf conftest*
10498   ol_cv_struct_sockaddr_storage=no
10499 fi
10500 rm -f conftest*
10501 fi
10502
10503 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10504
10505         if test $ol_cv_inet6_addrstrlen = yes \
10506                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10507                 ol_link_ipv6=yes
10508         elif test $ol_enable_ipv6 = yes \
10509                         -a $ol_cv_inet6_addrstrlen = no ; then
10510                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10511         elif test $ol_enable_ipv6 = yes \
10512                         -a $ol_cv_struct_sockaddr_storage = no ; then
10513                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10514         fi
10515 fi
10516
10517 if test $ol_enable_local != no ; then
10518         for ac_hdr in sys/un.h 
10519 do
10520 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10521 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10522 echo "configure:10523: checking for $ac_hdr" >&5
10523 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10524   echo $ac_n "(cached) $ac_c" 1>&6
10525 else
10526   cat > conftest.$ac_ext <<EOF
10527 #line 10528 "configure"
10528 #include "confdefs.h"
10529 #include <$ac_hdr>
10530 EOF
10531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10532 { (eval echo configure:10533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10534 if test -z "$ac_err"; then
10535   rm -rf conftest*
10536   eval "ac_cv_header_$ac_safe=yes"
10537 else
10538   echo "$ac_err" >&5
10539   echo "configure: failed program was:" >&5
10540   cat conftest.$ac_ext >&5
10541   rm -rf conftest*
10542   eval "ac_cv_header_$ac_safe=no"
10543 fi
10544 rm -f conftest*
10545 fi
10546 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10547   echo "$ac_t""yes" 1>&6
10548     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10549   cat >> confdefs.h <<EOF
10550 #define $ac_tr_hdr 1
10551 EOF
10552  
10553 else
10554   echo "$ac_t""no" 1>&6
10555 fi
10556 done
10557
10558
10559         if test $ol_enable_local = auto ; then
10560                 ol_enable_local=$ac_cv_header_sys_un_h
10561         elif test $ac_cv_header_sys_un_h = no ; then
10562                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10563         fi
10564 fi
10565
10566 ol_link_kbind=no
10567 ol_link_krb5=no
10568 ol_link_krb4=no
10569
10570 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10571         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10572         -o $ol_with_kerberos = k425 ; then
10573
10574         for ac_hdr in krb5.h
10575 do
10576 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10577 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10578 echo "configure:10579: checking for $ac_hdr" >&5
10579 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10580   echo $ac_n "(cached) $ac_c" 1>&6
10581 else
10582   cat > conftest.$ac_ext <<EOF
10583 #line 10584 "configure"
10584 #include "confdefs.h"
10585 #include <$ac_hdr>
10586 EOF
10587 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10588 { (eval echo configure:10589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10589 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10590 if test -z "$ac_err"; then
10591   rm -rf conftest*
10592   eval "ac_cv_header_$ac_safe=yes"
10593 else
10594   echo "$ac_err" >&5
10595   echo "configure: failed program was:" >&5
10596   cat conftest.$ac_ext >&5
10597   rm -rf conftest*
10598   eval "ac_cv_header_$ac_safe=no"
10599 fi
10600 rm -f conftest*
10601 fi
10602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10603   echo "$ac_t""yes" 1>&6
10604     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10605   cat >> confdefs.h <<EOF
10606 #define $ac_tr_hdr 1
10607 EOF
10608  
10609 else
10610   echo "$ac_t""no" 1>&6
10611 fi
10612 done
10613
10614
10615         if test $ac_cv_header_krb5_h = yes ; then
10616                                 for ac_hdr in heim_err.h
10617 do
10618 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10619 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10620 echo "configure:10621: checking for $ac_hdr" >&5
10621 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10622   echo $ac_n "(cached) $ac_c" 1>&6
10623 else
10624   cat > conftest.$ac_ext <<EOF
10625 #line 10626 "configure"
10626 #include "confdefs.h"
10627 #include <$ac_hdr>
10628 EOF
10629 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10630 { (eval echo configure:10631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10631 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10632 if test -z "$ac_err"; then
10633   rm -rf conftest*
10634   eval "ac_cv_header_$ac_safe=yes"
10635 else
10636   echo "$ac_err" >&5
10637   echo "configure: failed program was:" >&5
10638   cat conftest.$ac_ext >&5
10639   rm -rf conftest*
10640   eval "ac_cv_header_$ac_safe=no"
10641 fi
10642 rm -f conftest*
10643 fi
10644 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10645   echo "$ac_t""yes" 1>&6
10646     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10647   cat >> confdefs.h <<EOF
10648 #define $ac_tr_hdr 1
10649 EOF
10650  
10651 else
10652   echo "$ac_t""no" 1>&6
10653 fi
10654 done
10655
10656                 if test $ac_cv_header_heim_err_h = yes ; then
10657                         krb5_impl=heimdal
10658                 else
10659                         krb5_impl=mit
10660                 fi
10661
10662                 if test $krb5_impl = mit; then
10663                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10664 echo "configure:10665: checking for main in -lk5crypto" >&5
10665 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10666 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10667   echo $ac_n "(cached) $ac_c" 1>&6
10668 else
10669   ac_save_LIBS="$LIBS"
10670 LIBS="-lk5crypto  $LIBS"
10671 cat > conftest.$ac_ext <<EOF
10672 #line 10673 "configure"
10673 #include "confdefs.h"
10674
10675 int main() {
10676 main()
10677 ; return 0; }
10678 EOF
10679 if { (eval echo configure:10680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10680   rm -rf conftest*
10681   eval "ac_cv_lib_$ac_lib_var=yes"
10682 else
10683   echo "configure: failed program was:" >&5
10684   cat conftest.$ac_ext >&5
10685   rm -rf conftest*
10686   eval "ac_cv_lib_$ac_lib_var=no"
10687 fi
10688 rm -f conftest*
10689 LIBS="$ac_save_LIBS"
10690
10691 fi
10692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10693   echo "$ac_t""yes" 1>&6
10694   krb5crypto=k5crypto
10695 else
10696   echo "$ac_t""no" 1>&6
10697 krb5crypto=crypto
10698 fi
10699
10700
10701                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10702 echo "configure:10703: checking for main in -lkrb5" >&5
10703 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10704 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10705   echo $ac_n "(cached) $ac_c" 1>&6
10706 else
10707   ac_save_LIBS="$LIBS"
10708 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10709 cat > conftest.$ac_ext <<EOF
10710 #line 10711 "configure"
10711 #include "confdefs.h"
10712
10713 int main() {
10714 main()
10715 ; return 0; }
10716 EOF
10717 if { (eval echo configure:10718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10718   rm -rf conftest*
10719   eval "ac_cv_lib_$ac_lib_var=yes"
10720 else
10721   echo "configure: failed program was:" >&5
10722   cat conftest.$ac_ext >&5
10723   rm -rf conftest*
10724   eval "ac_cv_lib_$ac_lib_var=no"
10725 fi
10726 rm -f conftest*
10727 LIBS="$ac_save_LIBS"
10728
10729 fi
10730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10731   echo "$ac_t""yes" 1>&6
10732   have_krb5=yes
10733                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10734 else
10735   echo "$ac_t""no" 1>&6
10736 have_krb5=no
10737 fi
10738
10739
10740                 elif test $krb5_impl = heimdal; then
10741                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10742 echo "configure:10743: checking for main in -ldes" >&5
10743 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10744 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10745   echo $ac_n "(cached) $ac_c" 1>&6
10746 else
10747   ac_save_LIBS="$LIBS"
10748 LIBS="-ldes  $LIBS"
10749 cat > conftest.$ac_ext <<EOF
10750 #line 10751 "configure"
10751 #include "confdefs.h"
10752
10753 int main() {
10754 main()
10755 ; return 0; }
10756 EOF
10757 if { (eval echo configure:10758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10758   rm -rf conftest*
10759   eval "ac_cv_lib_$ac_lib_var=yes"
10760 else
10761   echo "configure: failed program was:" >&5
10762   cat conftest.$ac_ext >&5
10763   rm -rf conftest*
10764   eval "ac_cv_lib_$ac_lib_var=no"
10765 fi
10766 rm -f conftest*
10767 LIBS="$ac_save_LIBS"
10768
10769 fi
10770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10771   echo "$ac_t""yes" 1>&6
10772   krb5crypto=des
10773 else
10774   echo "$ac_t""no" 1>&6
10775 krb5crypto=crypto
10776 fi
10777
10778
10779                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10780 echo "configure:10781: checking for main in -lkrb5" >&5
10781 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10782 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10783   echo $ac_n "(cached) $ac_c" 1>&6
10784 else
10785   ac_save_LIBS="$LIBS"
10786 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10787 cat > conftest.$ac_ext <<EOF
10788 #line 10789 "configure"
10789 #include "confdefs.h"
10790
10791 int main() {
10792 main()
10793 ; return 0; }
10794 EOF
10795 if { (eval echo configure:10796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10796   rm -rf conftest*
10797   eval "ac_cv_lib_$ac_lib_var=yes"
10798 else
10799   echo "configure: failed program was:" >&5
10800   cat conftest.$ac_ext >&5
10801   rm -rf conftest*
10802   eval "ac_cv_lib_$ac_lib_var=no"
10803 fi
10804 rm -f conftest*
10805 LIBS="$ac_save_LIBS"
10806
10807 fi
10808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10809   echo "$ac_t""yes" 1>&6
10810   have_krb5=yes
10811                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10812 else
10813   echo "$ac_t""no" 1>&6
10814 have_krb5=no
10815 fi
10816
10817
10818                         cat >> confdefs.h <<\EOF
10819 #define HAVE_HEIMDAL_KERBEROS 1
10820 EOF
10821
10822
10823                 else
10824                         have_krb5=no
10825                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10826                 fi
10827
10828                 if test $have_krb5 = yes ; then
10829                         ol_link_krb5=yes
10830
10831                         cat >> confdefs.h <<\EOF
10832 #define HAVE_KRB5 1
10833 EOF
10834
10835
10836                         if test $ol_with_kerberos = k5only ; then
10837                                 ol_with_kerberos=found
10838                         fi
10839
10840                 elif test $ol_with_kerberos != auto ; then
10841                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10842                 fi
10843
10844         fi
10845 fi
10846
10847 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10848         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10849
10850         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10851 do
10852 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10853 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10854 echo "configure:10855: checking for $ac_hdr" >&5
10855 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10856   echo $ac_n "(cached) $ac_c" 1>&6
10857 else
10858   cat > conftest.$ac_ext <<EOF
10859 #line 10860 "configure"
10860 #include "confdefs.h"
10861 #include <$ac_hdr>
10862 EOF
10863 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10864 { (eval echo configure:10865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10865 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10866 if test -z "$ac_err"; then
10867   rm -rf conftest*
10868   eval "ac_cv_header_$ac_safe=yes"
10869 else
10870   echo "$ac_err" >&5
10871   echo "configure: failed program was:" >&5
10872   cat conftest.$ac_ext >&5
10873   rm -rf conftest*
10874   eval "ac_cv_header_$ac_safe=no"
10875 fi
10876 rm -f conftest*
10877 fi
10878 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10879   echo "$ac_t""yes" 1>&6
10880     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10881   cat >> confdefs.h <<EOF
10882 #define $ac_tr_hdr 1
10883 EOF
10884  
10885 else
10886   echo "$ac_t""no" 1>&6
10887 fi
10888 done
10889
10890
10891         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10892                 if test $krb5_impl = mit; then
10893                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10894 echo "configure:10895: checking for main in -lkrb4" >&5
10895 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10896 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10897   echo $ac_n "(cached) $ac_c" 1>&6
10898 else
10899   ac_save_LIBS="$LIBS"
10900 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10901 cat > conftest.$ac_ext <<EOF
10902 #line 10903 "configure"
10903 #include "confdefs.h"
10904
10905 int main() {
10906 main()
10907 ; return 0; }
10908 EOF
10909 if { (eval echo configure:10910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10910   rm -rf conftest*
10911   eval "ac_cv_lib_$ac_lib_var=yes"
10912 else
10913   echo "configure: failed program was:" >&5
10914   cat conftest.$ac_ext >&5
10915   rm -rf conftest*
10916   eval "ac_cv_lib_$ac_lib_var=no"
10917 fi
10918 rm -f conftest*
10919 LIBS="$ac_save_LIBS"
10920
10921 fi
10922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10923   echo "$ac_t""yes" 1>&6
10924   have_k425=yes
10925                                 KRB4_LIBS="-lkrb4 -ldes425"
10926 else
10927   echo "$ac_t""no" 1>&6
10928 have_k425=no
10929 fi
10930
10931
10932                 elif test $krb5_impl = heimdal; then
10933                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10934 echo "configure:10935: checking for main in -lkrb4" >&5
10935 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10936 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10937   echo $ac_n "(cached) $ac_c" 1>&6
10938 else
10939   ac_save_LIBS="$LIBS"
10940 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10941 cat > conftest.$ac_ext <<EOF
10942 #line 10943 "configure"
10943 #include "confdefs.h"
10944
10945 int main() {
10946 main()
10947 ; return 0; }
10948 EOF
10949 if { (eval echo configure:10950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10950   rm -rf conftest*
10951   eval "ac_cv_lib_$ac_lib_var=yes"
10952 else
10953   echo "configure: failed program was:" >&5
10954   cat conftest.$ac_ext >&5
10955   rm -rf conftest*
10956   eval "ac_cv_lib_$ac_lib_var=no"
10957 fi
10958 rm -f conftest*
10959 LIBS="$ac_save_LIBS"
10960
10961 fi
10962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10963   echo "$ac_t""yes" 1>&6
10964   have_k425=yes
10965                                 KRB4_LIBS="-lkrb4"
10966 else
10967   echo "$ac_t""no" 1>&6
10968 have_k425=no
10969 fi
10970
10971
10972                 else
10973                         have_425=no
10974                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10975                 fi
10976
10977                 if test $have_k425 = yes ; then
10978                         ol_with_kerberos=found
10979                         ol_link_krb4=yes
10980
10981                         cat >> confdefs.h <<\EOF
10982 #define HAVE_KRB425 1
10983 EOF
10984
10985                         cat >> confdefs.h <<\EOF
10986 #define HAVE_KRB4 1
10987 EOF
10988
10989
10990                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10991 echo "configure:10992: checking for des_debug in Kerberos libraries" >&5
10992 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10993   echo $ac_n "(cached) $ac_c" 1>&6
10994 else
10995   
10996                                                                 save_LIBS="$LIBS"
10997                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10998                                 cat > conftest.$ac_ext <<EOF
10999 #line 11000 "configure"
11000 #include "confdefs.h"
11001
11002 #include <kerberosIV/krb.h>
11003 #include <kerberosIV/des.h>
11004 extern int des_debug;
11005
11006 int main() {
11007
11008 des_debug = 1;
11009
11010 ; return 0; }
11011 EOF
11012 if { (eval echo configure:11013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11013   rm -rf conftest*
11014   ol_cv_var_des_debug=yes
11015 else
11016   echo "configure: failed program was:" >&5
11017   cat conftest.$ac_ext >&5
11018   rm -rf conftest*
11019   ol_cv_var_des_debug=no
11020 fi
11021 rm -f conftest*
11022                                                                 LIBS="$save_LIBS"
11023                         
11024 fi
11025
11026 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11027
11028                         if test $ol_cv_var_des_debug = yes ; then
11029                                 cat >> confdefs.h <<\EOF
11030 #define HAVE_DES_DEBUG 1
11031 EOF
11032
11033                         fi
11034
11035                         LIBS="$save_LIBS"
11036                 fi
11037         fi
11038 fi
11039
11040 if test $ol_link_krb5 = yes ; then
11041         ol_with_kerberos=found
11042 fi
11043
11044 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11045         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11046
11047         for ac_hdr in krb.h des.h krb-archaeology.h 
11048 do
11049 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11050 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11051 echo "configure:11052: checking for $ac_hdr" >&5
11052 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11053   echo $ac_n "(cached) $ac_c" 1>&6
11054 else
11055   cat > conftest.$ac_ext <<EOF
11056 #line 11057 "configure"
11057 #include "confdefs.h"
11058 #include <$ac_hdr>
11059 EOF
11060 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11061 { (eval echo configure:11062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11062 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11063 if test -z "$ac_err"; then
11064   rm -rf conftest*
11065   eval "ac_cv_header_$ac_safe=yes"
11066 else
11067   echo "$ac_err" >&5
11068   echo "configure: failed program was:" >&5
11069   cat conftest.$ac_ext >&5
11070   rm -rf conftest*
11071   eval "ac_cv_header_$ac_safe=no"
11072 fi
11073 rm -f conftest*
11074 fi
11075 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11076   echo "$ac_t""yes" 1>&6
11077     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11078   cat >> confdefs.h <<EOF
11079 #define $ac_tr_hdr 1
11080 EOF
11081  
11082 else
11083   echo "$ac_t""no" 1>&6
11084 fi
11085 done
11086
11087
11088         if test $ac_cv_header_krb_h = yes ; then
11089                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11090 echo "configure:11091: checking for main in -lkrb" >&5
11091 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11092 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11093   echo $ac_n "(cached) $ac_c" 1>&6
11094 else
11095   ac_save_LIBS="$LIBS"
11096 LIBS="-lkrb -ldes $LIBS"
11097 cat > conftest.$ac_ext <<EOF
11098 #line 11099 "configure"
11099 #include "confdefs.h"
11100
11101 int main() {
11102 main()
11103 ; return 0; }
11104 EOF
11105 if { (eval echo configure:11106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11106   rm -rf conftest*
11107   eval "ac_cv_lib_$ac_lib_var=yes"
11108 else
11109   echo "configure: failed program was:" >&5
11110   cat conftest.$ac_ext >&5
11111   rm -rf conftest*
11112   eval "ac_cv_lib_$ac_lib_var=no"
11113 fi
11114 rm -f conftest*
11115 LIBS="$ac_save_LIBS"
11116
11117 fi
11118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11119   echo "$ac_t""yes" 1>&6
11120   have_k4=yes
11121 else
11122   echo "$ac_t""no" 1>&6
11123 have_k4=no
11124 fi
11125
11126
11127                 if test $have_k4 = yes ; then
11128                         ol_with_kerberos=found
11129                         ol_link_krb4=yes
11130
11131                         cat >> confdefs.h <<\EOF
11132 #define HAVE_KRB4 1
11133 EOF
11134
11135
11136                         KRB4_LIBS="-lkrb -ldes"
11137
11138                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11139                                 cat >> confdefs.h <<\EOF
11140 #define HAVE_KTH_KERBEROS 1
11141 EOF
11142
11143                         fi
11144                 fi
11145         fi
11146 fi
11147
11148 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11149         ol_link_kbind=yes
11150
11151 elif test $ol_enable_kbind = yes ; then
11152         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11153 fi
11154
11155 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11156         cat >> confdefs.h <<\EOF
11157 #define HAVE_KERBEROS 1
11158 EOF
11159
11160
11161 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11162         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11163 fi
11164
11165 ol_link_tls=no
11166 if test $ol_with_tls != no ; then
11167         for ac_hdr in openssl/ssl.h ssl.h
11168 do
11169 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11170 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11171 echo "configure:11172: checking for $ac_hdr" >&5
11172 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11173   echo $ac_n "(cached) $ac_c" 1>&6
11174 else
11175   cat > conftest.$ac_ext <<EOF
11176 #line 11177 "configure"
11177 #include "confdefs.h"
11178 #include <$ac_hdr>
11179 EOF
11180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11181 { (eval echo configure:11182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11183 if test -z "$ac_err"; then
11184   rm -rf conftest*
11185   eval "ac_cv_header_$ac_safe=yes"
11186 else
11187   echo "$ac_err" >&5
11188   echo "configure: failed program was:" >&5
11189   cat conftest.$ac_ext >&5
11190   rm -rf conftest*
11191   eval "ac_cv_header_$ac_safe=no"
11192 fi
11193 rm -f conftest*
11194 fi
11195 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11196   echo "$ac_t""yes" 1>&6
11197     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11198   cat >> confdefs.h <<EOF
11199 #define $ac_tr_hdr 1
11200 EOF
11201  
11202 else
11203   echo "$ac_t""no" 1>&6
11204 fi
11205 done
11206
11207         
11208         if test $ac_cv_header_openssl_ssl_h = yes \
11209                 -o $ac_cv_header_ssl_h = yes ; then
11210                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11211 echo "configure:11212: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11212 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11213 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11214   echo $ac_n "(cached) $ac_c" 1>&6
11215 else
11216   ac_save_LIBS="$LIBS"
11217 LIBS="-lssl -lcrypto $LIBS"
11218 cat > conftest.$ac_ext <<EOF
11219 #line 11220 "configure"
11220 #include "confdefs.h"
11221 /* Override any gcc2 internal prototype to avoid an error.  */
11222 /* We use char because int might match the return type of a gcc2
11223     builtin and then its argument prototype would still apply.  */
11224 char SSLeay_add_ssl_algorithms();
11225
11226 int main() {
11227 SSLeay_add_ssl_algorithms()
11228 ; return 0; }
11229 EOF
11230 if { (eval echo configure:11231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11231   rm -rf conftest*
11232   eval "ac_cv_lib_$ac_lib_var=yes"
11233 else
11234   echo "configure: failed program was:" >&5
11235   cat conftest.$ac_ext >&5
11236   rm -rf conftest*
11237   eval "ac_cv_lib_$ac_lib_var=no"
11238 fi
11239 rm -f conftest*
11240 LIBS="$ac_save_LIBS"
11241
11242 fi
11243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11244   echo "$ac_t""yes" 1>&6
11245   have_ssleay=yes
11246                         need_rsaref=no
11247 else
11248   echo "$ac_t""no" 1>&6
11249 have_ssleay=no
11250 fi
11251
11252                         
11253                 if test $have_ssleay = no ; then
11254                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11255 echo "configure:11256: checking for SSL_library_init in -lssl" >&5
11256 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11257 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11258   echo $ac_n "(cached) $ac_c" 1>&6
11259 else
11260   ac_save_LIBS="$LIBS"
11261 LIBS="-lssl -lcrypto $LIBS"
11262 cat > conftest.$ac_ext <<EOF
11263 #line 11264 "configure"
11264 #include "confdefs.h"
11265 /* Override any gcc2 internal prototype to avoid an error.  */
11266 /* We use char because int might match the return type of a gcc2
11267     builtin and then its argument prototype would still apply.  */
11268 char SSL_library_init();
11269
11270 int main() {
11271 SSL_library_init()
11272 ; return 0; }
11273 EOF
11274 if { (eval echo configure:11275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11275   rm -rf conftest*
11276   eval "ac_cv_lib_$ac_lib_var=yes"
11277 else
11278   echo "configure: failed program was:" >&5
11279   cat conftest.$ac_ext >&5
11280   rm -rf conftest*
11281   eval "ac_cv_lib_$ac_lib_var=no"
11282 fi
11283 rm -f conftest*
11284 LIBS="$ac_save_LIBS"
11285
11286 fi
11287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11288   echo "$ac_t""yes" 1>&6
11289   have_ssleay=yes
11290                                 need_rsaref=no
11291 else
11292   echo "$ac_t""no" 1>&6
11293 have_ssleay=no
11294 fi
11295
11296                 fi
11297
11298                 if test $have_ssleay = no ; then
11299                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11300 echo "configure:11301: checking for ssl3_accept in -lssl" >&5
11301 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11302 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11303   echo $ac_n "(cached) $ac_c" 1>&6
11304 else
11305   ac_save_LIBS="$LIBS"
11306 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11307 cat > conftest.$ac_ext <<EOF
11308 #line 11309 "configure"
11309 #include "confdefs.h"
11310 /* Override any gcc2 internal prototype to avoid an error.  */
11311 /* We use char because int might match the return type of a gcc2
11312     builtin and then its argument prototype would still apply.  */
11313 char ssl3_accept();
11314
11315 int main() {
11316 ssl3_accept()
11317 ; return 0; }
11318 EOF
11319 if { (eval echo configure:11320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11320   rm -rf conftest*
11321   eval "ac_cv_lib_$ac_lib_var=yes"
11322 else
11323   echo "configure: failed program was:" >&5
11324   cat conftest.$ac_ext >&5
11325   rm -rf conftest*
11326   eval "ac_cv_lib_$ac_lib_var=no"
11327 fi
11328 rm -f conftest*
11329 LIBS="$ac_save_LIBS"
11330
11331 fi
11332 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11333   echo "$ac_t""yes" 1>&6
11334   have_ssleay=yes
11335                                 need_rsaref=yes
11336 else
11337   echo "$ac_t""no" 1>&6
11338 have_ssleay=no
11339 fi
11340
11341                 fi
11342
11343                 if test $have_ssleay = yes ; then
11344                         ol_with_tls=found
11345                         ol_link_tls=yes
11346
11347                         cat >> confdefs.h <<\EOF
11348 #define HAVE_SSLEAY 1
11349 EOF
11350
11351
11352                         if test $need_rsaref = yes; then
11353                                 cat >> confdefs.h <<\EOF
11354 #define HAVE_RSAREF 1
11355 EOF
11356
11357
11358                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11359                         else
11360                                 TLS_LIBS="-lssl -lcrypto"
11361                         fi
11362                 fi
11363         fi
11364
11365 else
11366         echo "configure: warning: TLS data protection not supported!" 1>&2
11367 fi
11368
11369 WITH_TLS=no
11370 if test $ol_link_tls = yes ; then
11371         cat >> confdefs.h <<\EOF
11372 #define HAVE_TLS 1
11373 EOF
11374
11375         WITH_TLS=yes
11376
11377 elif test $ol_with_tls = auto ; then
11378         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11379         echo "configure: warning: TLS data protection not supported!" 1>&2
11380
11381 elif test $ol_with_tls != no ; then
11382         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11383 fi
11384
11385 if test $ol_enable_lmpasswd != no; then
11386         if test $ol_link_tls != yes ; then
11387                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11388         fi
11389
11390         cat >> confdefs.h <<\EOF
11391 #define SLAPD_LMHASH 1
11392 EOF
11393
11394 fi
11395
11396 ol_link_threads=no
11397
11398 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11399         -o $ol_with_threads = nt ; then
11400
11401         
11402         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11403 echo "configure:11404: checking for _beginthread" >&5
11404 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11405   echo $ac_n "(cached) $ac_c" 1>&6
11406 else
11407   cat > conftest.$ac_ext <<EOF
11408 #line 11409 "configure"
11409 #include "confdefs.h"
11410 /* System header to define __stub macros and hopefully few prototypes,
11411     which can conflict with char _beginthread(); below.  */
11412 #include <assert.h>
11413 /* Override any gcc2 internal prototype to avoid an error.  */
11414 /* We use char because int might match the return type of a gcc2
11415     builtin and then its argument prototype would still apply.  */
11416 char _beginthread();
11417 char (*f)();
11418
11419 int main() {
11420
11421 /* The GNU C library defines this for functions which it implements
11422     to always fail with ENOSYS.  Some functions are actually named
11423     something starting with __ and the normal name is an alias.  */
11424 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11425 choke me
11426 #else
11427 f = _beginthread;
11428 #endif
11429
11430 ; return 0; }
11431 EOF
11432 if { (eval echo configure:11433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11433   rm -rf conftest*
11434   eval "ac_cv_func__beginthread=yes"
11435 else
11436   echo "configure: failed program was:" >&5
11437   cat conftest.$ac_ext >&5
11438   rm -rf conftest*
11439   eval "ac_cv_func__beginthread=no"
11440 fi
11441 rm -f conftest*
11442 fi
11443
11444 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11445   echo "$ac_t""yes" 1>&6
11446   :
11447 else
11448   echo "$ac_t""no" 1>&6
11449 fi
11450
11451
11452         if test $ac_cv_func__beginthread = yes ; then
11453                 cat >> confdefs.h <<\EOF
11454 #define HAVE_NT_THREADS 1
11455 EOF
11456
11457                 ol_cv_nt_threads=yes
11458         fi
11459
11460
11461         if test "$ol_cv_nt_threads" = yes ; then
11462                 ol_link_threads=nt
11463                 ol_with_threads=found
11464                 ol_with_yielding_select=yes
11465
11466                 cat >> confdefs.h <<\EOF
11467 #define HAVE_NT_SERVICE_MANAGER 1
11468 EOF
11469
11470                 cat >> confdefs.h <<\EOF
11471 #define HAVE_NT_EVENT_LOG 1
11472 EOF
11473
11474         fi
11475
11476         if test $ol_with_threads = nt ; then
11477                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11478         fi
11479 fi
11480
11481 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11482         -o $ol_with_threads = posix ; then
11483
11484         for ac_hdr in pthread.h
11485 do
11486 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11487 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11488 echo "configure:11489: checking for $ac_hdr" >&5
11489 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11490   echo $ac_n "(cached) $ac_c" 1>&6
11491 else
11492   cat > conftest.$ac_ext <<EOF
11493 #line 11494 "configure"
11494 #include "confdefs.h"
11495 #include <$ac_hdr>
11496 EOF
11497 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11498 { (eval echo configure:11499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11499 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11500 if test -z "$ac_err"; then
11501   rm -rf conftest*
11502   eval "ac_cv_header_$ac_safe=yes"
11503 else
11504   echo "$ac_err" >&5
11505   echo "configure: failed program was:" >&5
11506   cat conftest.$ac_ext >&5
11507   rm -rf conftest*
11508   eval "ac_cv_header_$ac_safe=no"
11509 fi
11510 rm -f conftest*
11511 fi
11512 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11513   echo "$ac_t""yes" 1>&6
11514     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11515   cat >> confdefs.h <<EOF
11516 #define $ac_tr_hdr 1
11517 EOF
11518  
11519 else
11520   echo "$ac_t""no" 1>&6
11521 fi
11522 done
11523
11524
11525         if test $ac_cv_header_pthread_h = yes ; then
11526                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11527 echo "configure:11528: checking POSIX thread version" >&5
11528 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11529   echo $ac_n "(cached) $ac_c" 1>&6
11530 else
11531   
11532         cat > conftest.$ac_ext <<EOF
11533 #line 11534 "configure"
11534 #include "confdefs.h"
11535
11536 #               include <pthread.h>
11537         
11538 int main() {
11539
11540                 int i = PTHREAD_CREATE_JOINABLE;
11541         
11542 ; return 0; }
11543 EOF
11544 if { (eval echo configure:11545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11545   rm -rf conftest*
11546   
11547         cat > conftest.$ac_ext <<EOF
11548 #line 11549 "configure"
11549 #include "confdefs.h"
11550 #include <pthread.h>
11551 EOF
11552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11553   egrep "pthread_detach" >/dev/null 2>&1; then
11554   rm -rf conftest*
11555   ol_cv_pthread_version=10
11556 else
11557   rm -rf conftest*
11558   ol_cv_pthread_version=8
11559 fi
11560 rm -f conftest*
11561
11562 else
11563   echo "configure: failed program was:" >&5
11564   cat conftest.$ac_ext >&5
11565   rm -rf conftest*
11566   
11567         cat > conftest.$ac_ext <<EOF
11568 #line 11569 "configure"
11569 #include "confdefs.h"
11570
11571 #               include <pthread.h>
11572 #               ifdef PTHREAD_CREATE_UNDETACHED
11573                 draft7
11574 #               endif
11575         
11576 EOF
11577 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11578   egrep "draft7" >/dev/null 2>&1; then
11579   rm -rf conftest*
11580   ol_cv_pthread_version=7
11581 else
11582   rm -rf conftest*
11583   
11584         cat > conftest.$ac_ext <<EOF
11585 #line 11586 "configure"
11586 #include "confdefs.h"
11587 #include <pthread.h>
11588 EOF
11589 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11590   egrep "pthread_attr_init" >/dev/null 2>&1; then
11591   rm -rf conftest*
11592   ol_cv_pthread_version=6
11593 else
11594   rm -rf conftest*
11595   
11596         cat > conftest.$ac_ext <<EOF
11597 #line 11598 "configure"
11598 #include "confdefs.h"
11599
11600 #               include <pthread.h>
11601 #ifdef          PTHREAD_MUTEX_INITIALIZER
11602                 draft5
11603 #endif
11604         
11605 EOF
11606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11607   egrep "draft5" >/dev/null 2>&1; then
11608   rm -rf conftest*
11609   ol_cv_pthread_version=5
11610 else
11611   rm -rf conftest*
11612   ol_cv_pthread_version=4
11613 fi
11614 rm -f conftest*
11615  
11616 fi
11617 rm -f conftest*
11618  
11619 fi
11620 rm -f conftest*
11621  
11622 fi
11623 rm -f conftest*
11624
11625 fi
11626
11627 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11628
11629
11630                 if test $ol_cv_pthread_version != 0 ; then
11631                         cat >> confdefs.h <<EOF
11632 #define HAVE_PTHREADS $ol_cv_pthread_version
11633 EOF
11634
11635                 else
11636                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11637                 fi
11638
11639                 # consider threads found
11640                 ol_with_threads=found
11641
11642                 
11643         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11644 echo "configure:11645: checking for LinuxThreads pthread.h" >&5
11645 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11646   echo $ac_n "(cached) $ac_c" 1>&6
11647 else
11648   cat > conftest.$ac_ext <<EOF
11649 #line 11650 "configure"
11650 #include "confdefs.h"
11651 #include <pthread.h>
11652 EOF
11653 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11654   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11655   rm -rf conftest*
11656   ol_cv_header_linux_threads=yes
11657 else
11658   rm -rf conftest*
11659   ol_cv_header_linux_threads=no
11660 fi
11661 rm -f conftest*
11662
11663                 
11664 fi
11665
11666 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11667         if test $ol_cv_header_linux_threads = yes; then
11668                 cat >> confdefs.h <<\EOF
11669 #define HAVE_LINUX_THREADS 1
11670 EOF
11671
11672         fi
11673
11674                 
11675         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11676 echo "configure:11677: checking for GNU Pth pthread.h" >&5
11677 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11678   echo $ac_n "(cached) $ac_c" 1>&6
11679 else
11680   cat > conftest.$ac_ext <<EOF
11681 #line 11682 "configure"
11682 #include "confdefs.h"
11683 #include <pthread.h>
11684 #ifdef _POSIX_THREAD_IS_GNU_PTH
11685         __gnu_pth__;
11686 #endif
11687
11688 EOF
11689 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11690   egrep "__gnu_pth__" >/dev/null 2>&1; then
11691   rm -rf conftest*
11692   ol_cv_header_gnu_pth_pthread_h=yes
11693 else
11694   rm -rf conftest*
11695   ol_cv_header_gnu_pth_pthread_h=no
11696 fi
11697 rm -f conftest*
11698
11699                 
11700 fi
11701
11702 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11703
11704
11705                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11706                         for ac_hdr in sched.h
11707 do
11708 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11709 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11710 echo "configure:11711: checking for $ac_hdr" >&5
11711 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11712   echo $ac_n "(cached) $ac_c" 1>&6
11713 else
11714   cat > conftest.$ac_ext <<EOF
11715 #line 11716 "configure"
11716 #include "confdefs.h"
11717 #include <$ac_hdr>
11718 EOF
11719 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11720 { (eval echo configure:11721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11721 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11722 if test -z "$ac_err"; then
11723   rm -rf conftest*
11724   eval "ac_cv_header_$ac_safe=yes"
11725 else
11726   echo "$ac_err" >&5
11727   echo "configure: failed program was:" >&5
11728   cat conftest.$ac_ext >&5
11729   rm -rf conftest*
11730   eval "ac_cv_header_$ac_safe=no"
11731 fi
11732 rm -f conftest*
11733 fi
11734 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11735   echo "$ac_t""yes" 1>&6
11736     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11737   cat >> confdefs.h <<EOF
11738 #define $ac_tr_hdr 1
11739 EOF
11740  
11741 else
11742   echo "$ac_t""no" 1>&6
11743 fi
11744 done
11745
11746                 fi
11747
11748                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11749                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11750 echo "configure:11751: checking for pthread_create in default libraries" >&5
11751 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11752   echo $ac_n "(cached) $ac_c" 1>&6
11753 else
11754   
11755                 if test "$cross_compiling" = yes; then
11756   cat > conftest.$ac_ext <<EOF
11757 #line 11758 "configure"
11758 #include "confdefs.h"
11759 /* pthread test headers */
11760 #include <pthread.h>
11761 #if HAVE_PTHREADS < 7
11762 #include <errno.h>
11763 #endif
11764 #ifndef NULL
11765 #define NULL (void*)0
11766 #endif
11767
11768 static void *task(p)
11769         void *p;
11770 {
11771         return (void *) (p == NULL);
11772 }
11773
11774 int main() {
11775
11776         /* pthread test function */
11777 #ifndef PTHREAD_CREATE_DETACHED
11778 #define PTHREAD_CREATE_DETACHED 1
11779 #endif
11780         pthread_t t;
11781         int status;
11782         int detach = PTHREAD_CREATE_DETACHED;
11783
11784 #if HAVE_PTHREADS > 4
11785         /* Final pthreads */
11786         pthread_attr_t attr;
11787
11788         status = pthread_attr_init(&attr);
11789         if( status ) return status;
11790
11791 #if HAVE_PTHREADS < 7
11792         status = pthread_attr_setdetachstate(&attr, &detach);
11793         if( status < 0 ) status = errno;
11794 #else
11795         status = pthread_attr_setdetachstate(&attr, detach);
11796 #endif
11797         if( status ) return status;
11798         status = pthread_create( &t, &attr, task, NULL );
11799 #if HAVE_PTHREADS < 7
11800         if( status < 0 ) status = errno;
11801 #endif
11802         if( status ) return status;
11803 #else
11804         /* Draft 4 pthreads */
11805         status = pthread_create( &t, pthread_attr_default, task, NULL );
11806         if( status ) return errno;
11807
11808         /* give thread a chance to complete */
11809         /* it should remain joinable and hence detachable */
11810         sleep( 1 );
11811
11812         status = pthread_detach( &t );
11813         if( status ) return errno;
11814 #endif
11815
11816 #ifdef HAVE_LINUX_THREADS
11817         pthread_kill_other_threads_np();
11818 #endif
11819
11820         return 0;
11821
11822 ; return 0; }
11823 EOF
11824 if { (eval echo configure:11825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11825   rm -rf conftest*
11826   ol_cv_pthread_create=yes
11827 else
11828   echo "configure: failed program was:" >&5
11829   cat conftest.$ac_ext >&5
11830   rm -rf conftest*
11831   ol_cv_pthread_create=no
11832 fi
11833 rm -f conftest*
11834 else
11835   cat > conftest.$ac_ext <<EOF
11836 #line 11837 "configure"
11837 #include "confdefs.h"
11838 /* pthread test headers */
11839 #include <pthread.h>
11840 #if HAVE_PTHREADS < 7
11841 #include <errno.h>
11842 #endif
11843 #ifndef NULL
11844 #define NULL (void*)0
11845 #endif
11846
11847 static void *task(p)
11848         void *p;
11849 {
11850         return (void *) (p == NULL);
11851 }
11852
11853
11854 int main(argc, argv)
11855         int argc;
11856         char **argv;
11857 {
11858
11859         /* pthread test function */
11860 #ifndef PTHREAD_CREATE_DETACHED
11861 #define PTHREAD_CREATE_DETACHED 1
11862 #endif
11863         pthread_t t;
11864         int status;
11865         int detach = PTHREAD_CREATE_DETACHED;
11866
11867 #if HAVE_PTHREADS > 4
11868         /* Final pthreads */
11869         pthread_attr_t attr;
11870
11871         status = pthread_attr_init(&attr);
11872         if( status ) return status;
11873
11874 #if HAVE_PTHREADS < 7
11875         status = pthread_attr_setdetachstate(&attr, &detach);
11876         if( status < 0 ) status = errno;
11877 #else
11878         status = pthread_attr_setdetachstate(&attr, detach);
11879 #endif
11880         if( status ) return status;
11881         status = pthread_create( &t, &attr, task, NULL );
11882 #if HAVE_PTHREADS < 7
11883         if( status < 0 ) status = errno;
11884 #endif
11885         if( status ) return status;
11886 #else
11887         /* Draft 4 pthreads */
11888         status = pthread_create( &t, pthread_attr_default, task, NULL );
11889         if( status ) return errno;
11890
11891         /* give thread a chance to complete */
11892         /* it should remain joinable and hence detachable */
11893         sleep( 1 );
11894
11895         status = pthread_detach( &t );
11896         if( status ) return errno;
11897 #endif
11898
11899 #ifdef HAVE_LINUX_THREADS
11900         pthread_kill_other_threads_np();
11901 #endif
11902
11903         return 0;
11904
11905 }
11906
11907 EOF
11908 if { (eval echo configure:11909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11909 then
11910   ol_cv_pthread_create=yes
11911 else
11912   echo "configure: failed program was:" >&5
11913   cat conftest.$ac_ext >&5
11914   rm -fr conftest*
11915   ol_cv_pthread_create=no
11916 fi
11917 rm -fr conftest*
11918 fi
11919
11920 fi
11921
11922 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11923
11924                 if test $ol_cv_pthread_create != no ; then
11925                         ol_link_threads=posix
11926                         ol_link_pthreads=""
11927                 fi
11928                 
11929                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11930 if test "$ol_link_threads" = no ; then
11931         # try -kthread
11932         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11933 echo "configure:11934: checking for pthread link with -kthread" >&5
11934 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11935   echo $ac_n "(cached) $ac_c" 1>&6
11936 else
11937   
11938                 # save the flags
11939                 ol_LIBS="$LIBS"
11940                 LIBS="-kthread $LIBS"
11941
11942                 if test "$cross_compiling" = yes; then
11943   cat > conftest.$ac_ext <<EOF
11944 #line 11945 "configure"
11945 #include "confdefs.h"
11946 /* pthread test headers */
11947 #include <pthread.h>
11948 #if HAVE_PTHREADS < 7
11949 #include <errno.h>
11950 #endif
11951 #ifndef NULL
11952 #define NULL (void*)0
11953 #endif
11954
11955 static void *task(p)
11956         void *p;
11957 {
11958         return (void *) (p == NULL);
11959 }
11960
11961 int main() {
11962
11963         /* pthread test function */
11964 #ifndef PTHREAD_CREATE_DETACHED
11965 #define PTHREAD_CREATE_DETACHED 1
11966 #endif
11967         pthread_t t;
11968         int status;
11969         int detach = PTHREAD_CREATE_DETACHED;
11970
11971 #if HAVE_PTHREADS > 4
11972         /* Final pthreads */
11973         pthread_attr_t attr;
11974
11975         status = pthread_attr_init(&attr);
11976         if( status ) return status;
11977
11978 #if HAVE_PTHREADS < 7
11979         status = pthread_attr_setdetachstate(&attr, &detach);
11980         if( status < 0 ) status = errno;
11981 #else
11982         status = pthread_attr_setdetachstate(&attr, detach);
11983 #endif
11984         if( status ) return status;
11985         status = pthread_create( &t, &attr, task, NULL );
11986 #if HAVE_PTHREADS < 7
11987         if( status < 0 ) status = errno;
11988 #endif
11989         if( status ) return status;
11990 #else
11991         /* Draft 4 pthreads */
11992         status = pthread_create( &t, pthread_attr_default, task, NULL );
11993         if( status ) return errno;
11994
11995         /* give thread a chance to complete */
11996         /* it should remain joinable and hence detachable */
11997         sleep( 1 );
11998
11999         status = pthread_detach( &t );
12000         if( status ) return errno;
12001 #endif
12002
12003 #ifdef HAVE_LINUX_THREADS
12004         pthread_kill_other_threads_np();
12005 #endif
12006
12007         return 0;
12008
12009 ; return 0; }
12010 EOF
12011 if { (eval echo configure:12012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12012   rm -rf conftest*
12013   ol_cv_pthread_kthread=yes
12014 else
12015   echo "configure: failed program was:" >&5
12016   cat conftest.$ac_ext >&5
12017   rm -rf conftest*
12018   ol_cv_pthread_kthread=no
12019 fi
12020 rm -f conftest*
12021 else
12022   cat > conftest.$ac_ext <<EOF
12023 #line 12024 "configure"
12024 #include "confdefs.h"
12025 /* pthread test headers */
12026 #include <pthread.h>
12027 #if HAVE_PTHREADS < 7
12028 #include <errno.h>
12029 #endif
12030 #ifndef NULL
12031 #define NULL (void*)0
12032 #endif
12033
12034 static void *task(p)
12035         void *p;
12036 {
12037         return (void *) (p == NULL);
12038 }
12039
12040
12041 int main(argc, argv)
12042         int argc;
12043         char **argv;
12044 {
12045
12046         /* pthread test function */
12047 #ifndef PTHREAD_CREATE_DETACHED
12048 #define PTHREAD_CREATE_DETACHED 1
12049 #endif
12050         pthread_t t;
12051         int status;
12052         int detach = PTHREAD_CREATE_DETACHED;
12053
12054 #if HAVE_PTHREADS > 4
12055         /* Final pthreads */
12056         pthread_attr_t attr;
12057
12058         status = pthread_attr_init(&attr);
12059         if( status ) return status;
12060
12061 #if HAVE_PTHREADS < 7
12062         status = pthread_attr_setdetachstate(&attr, &detach);
12063         if( status < 0 ) status = errno;
12064 #else
12065         status = pthread_attr_setdetachstate(&attr, detach);
12066 #endif
12067         if( status ) return status;
12068         status = pthread_create( &t, &attr, task, NULL );
12069 #if HAVE_PTHREADS < 7
12070         if( status < 0 ) status = errno;
12071 #endif
12072         if( status ) return status;
12073 #else
12074         /* Draft 4 pthreads */
12075         status = pthread_create( &t, pthread_attr_default, task, NULL );
12076         if( status ) return errno;
12077
12078         /* give thread a chance to complete */
12079         /* it should remain joinable and hence detachable */
12080         sleep( 1 );
12081
12082         status = pthread_detach( &t );
12083         if( status ) return errno;
12084 #endif
12085
12086 #ifdef HAVE_LINUX_THREADS
12087         pthread_kill_other_threads_np();
12088 #endif
12089
12090         return 0;
12091
12092 }
12093
12094 EOF
12095 if { (eval echo configure:12096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12096 then
12097   ol_cv_pthread_kthread=yes
12098 else
12099   echo "configure: failed program was:" >&5
12100   cat conftest.$ac_ext >&5
12101   rm -fr conftest*
12102   ol_cv_pthread_kthread=no
12103 fi
12104 rm -fr conftest*
12105 fi
12106
12107
12108                 # restore the LIBS
12109                 LIBS="$ol_LIBS"
12110         
12111 fi
12112
12113 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12114
12115         if test $ol_cv_pthread_kthread = yes ; then
12116                 ol_link_pthreads="-kthread"
12117                 ol_link_threads=posix
12118         fi
12119 fi
12120
12121                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12122 if test "$ol_link_threads" = no ; then
12123         # try -pthread
12124         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12125 echo "configure:12126: checking for pthread link with -pthread" >&5
12126 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12127   echo $ac_n "(cached) $ac_c" 1>&6
12128 else
12129   
12130                 # save the flags
12131                 ol_LIBS="$LIBS"
12132                 LIBS="-pthread $LIBS"
12133
12134                 if test "$cross_compiling" = yes; then
12135   cat > conftest.$ac_ext <<EOF
12136 #line 12137 "configure"
12137 #include "confdefs.h"
12138 /* pthread test headers */
12139 #include <pthread.h>
12140 #if HAVE_PTHREADS < 7
12141 #include <errno.h>
12142 #endif
12143 #ifndef NULL
12144 #define NULL (void*)0
12145 #endif
12146
12147 static void *task(p)
12148         void *p;
12149 {
12150         return (void *) (p == NULL);
12151 }
12152
12153 int main() {
12154
12155         /* pthread test function */
12156 #ifndef PTHREAD_CREATE_DETACHED
12157 #define PTHREAD_CREATE_DETACHED 1
12158 #endif
12159         pthread_t t;
12160         int status;
12161         int detach = PTHREAD_CREATE_DETACHED;
12162
12163 #if HAVE_PTHREADS > 4
12164         /* Final pthreads */
12165         pthread_attr_t attr;
12166
12167         status = pthread_attr_init(&attr);
12168         if( status ) return status;
12169
12170 #if HAVE_PTHREADS < 7
12171         status = pthread_attr_setdetachstate(&attr, &detach);
12172         if( status < 0 ) status = errno;
12173 #else
12174         status = pthread_attr_setdetachstate(&attr, detach);
12175 #endif
12176         if( status ) return status;
12177         status = pthread_create( &t, &attr, task, NULL );
12178 #if HAVE_PTHREADS < 7
12179         if( status < 0 ) status = errno;
12180 #endif
12181         if( status ) return status;
12182 #else
12183         /* Draft 4 pthreads */
12184         status = pthread_create( &t, pthread_attr_default, task, NULL );
12185         if( status ) return errno;
12186
12187         /* give thread a chance to complete */
12188         /* it should remain joinable and hence detachable */
12189         sleep( 1 );
12190
12191         status = pthread_detach( &t );
12192         if( status ) return errno;
12193 #endif
12194
12195 #ifdef HAVE_LINUX_THREADS
12196         pthread_kill_other_threads_np();
12197 #endif
12198
12199         return 0;
12200
12201 ; return 0; }
12202 EOF
12203 if { (eval echo configure:12204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12204   rm -rf conftest*
12205   ol_cv_pthread_pthread=yes
12206 else
12207   echo "configure: failed program was:" >&5
12208   cat conftest.$ac_ext >&5
12209   rm -rf conftest*
12210   ol_cv_pthread_pthread=no
12211 fi
12212 rm -f conftest*
12213 else
12214   cat > conftest.$ac_ext <<EOF
12215 #line 12216 "configure"
12216 #include "confdefs.h"
12217 /* pthread test headers */
12218 #include <pthread.h>
12219 #if HAVE_PTHREADS < 7
12220 #include <errno.h>
12221 #endif
12222 #ifndef NULL
12223 #define NULL (void*)0
12224 #endif
12225
12226 static void *task(p)
12227         void *p;
12228 {
12229         return (void *) (p == NULL);
12230 }
12231
12232
12233 int main(argc, argv)
12234         int argc;
12235         char **argv;
12236 {
12237
12238         /* pthread test function */
12239 #ifndef PTHREAD_CREATE_DETACHED
12240 #define PTHREAD_CREATE_DETACHED 1
12241 #endif
12242         pthread_t t;
12243         int status;
12244         int detach = PTHREAD_CREATE_DETACHED;
12245
12246 #if HAVE_PTHREADS > 4
12247         /* Final pthreads */
12248         pthread_attr_t attr;
12249
12250         status = pthread_attr_init(&attr);
12251         if( status ) return status;
12252
12253 #if HAVE_PTHREADS < 7
12254         status = pthread_attr_setdetachstate(&attr, &detach);
12255         if( status < 0 ) status = errno;
12256 #else
12257         status = pthread_attr_setdetachstate(&attr, detach);
12258 #endif
12259         if( status ) return status;
12260         status = pthread_create( &t, &attr, task, NULL );
12261 #if HAVE_PTHREADS < 7
12262         if( status < 0 ) status = errno;
12263 #endif
12264         if( status ) return status;
12265 #else
12266         /* Draft 4 pthreads */
12267         status = pthread_create( &t, pthread_attr_default, task, NULL );
12268         if( status ) return errno;
12269
12270         /* give thread a chance to complete */
12271         /* it should remain joinable and hence detachable */
12272         sleep( 1 );
12273
12274         status = pthread_detach( &t );
12275         if( status ) return errno;
12276 #endif
12277
12278 #ifdef HAVE_LINUX_THREADS
12279         pthread_kill_other_threads_np();
12280 #endif
12281
12282         return 0;
12283
12284 }
12285
12286 EOF
12287 if { (eval echo configure:12288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12288 then
12289   ol_cv_pthread_pthread=yes
12290 else
12291   echo "configure: failed program was:" >&5
12292   cat conftest.$ac_ext >&5
12293   rm -fr conftest*
12294   ol_cv_pthread_pthread=no
12295 fi
12296 rm -fr conftest*
12297 fi
12298
12299
12300                 # restore the LIBS
12301                 LIBS="$ol_LIBS"
12302         
12303 fi
12304
12305 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12306
12307         if test $ol_cv_pthread_pthread = yes ; then
12308                 ol_link_pthreads="-pthread"
12309                 ol_link_threads=posix
12310         fi
12311 fi
12312
12313                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12314 if test "$ol_link_threads" = no ; then
12315         # try -pthreads
12316         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12317 echo "configure:12318: checking for pthread link with -pthreads" >&5
12318 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12319   echo $ac_n "(cached) $ac_c" 1>&6
12320 else
12321   
12322                 # save the flags
12323                 ol_LIBS="$LIBS"
12324                 LIBS="-pthreads $LIBS"
12325
12326                 if test "$cross_compiling" = yes; then
12327   cat > conftest.$ac_ext <<EOF
12328 #line 12329 "configure"
12329 #include "confdefs.h"
12330 /* pthread test headers */
12331 #include <pthread.h>
12332 #if HAVE_PTHREADS < 7
12333 #include <errno.h>
12334 #endif
12335 #ifndef NULL
12336 #define NULL (void*)0
12337 #endif
12338
12339 static void *task(p)
12340         void *p;
12341 {
12342         return (void *) (p == NULL);
12343 }
12344
12345 int main() {
12346
12347         /* pthread test function */
12348 #ifndef PTHREAD_CREATE_DETACHED
12349 #define PTHREAD_CREATE_DETACHED 1
12350 #endif
12351         pthread_t t;
12352         int status;
12353         int detach = PTHREAD_CREATE_DETACHED;
12354
12355 #if HAVE_PTHREADS > 4
12356         /* Final pthreads */
12357         pthread_attr_t attr;
12358
12359         status = pthread_attr_init(&attr);
12360         if( status ) return status;
12361
12362 #if HAVE_PTHREADS < 7
12363         status = pthread_attr_setdetachstate(&attr, &detach);
12364         if( status < 0 ) status = errno;
12365 #else
12366         status = pthread_attr_setdetachstate(&attr, detach);
12367 #endif
12368         if( status ) return status;
12369         status = pthread_create( &t, &attr, task, NULL );
12370 #if HAVE_PTHREADS < 7
12371         if( status < 0 ) status = errno;
12372 #endif
12373         if( status ) return status;
12374 #else
12375         /* Draft 4 pthreads */
12376         status = pthread_create( &t, pthread_attr_default, task, NULL );
12377         if( status ) return errno;
12378
12379         /* give thread a chance to complete */
12380         /* it should remain joinable and hence detachable */
12381         sleep( 1 );
12382
12383         status = pthread_detach( &t );
12384         if( status ) return errno;
12385 #endif
12386
12387 #ifdef HAVE_LINUX_THREADS
12388         pthread_kill_other_threads_np();
12389 #endif
12390
12391         return 0;
12392
12393 ; return 0; }
12394 EOF
12395 if { (eval echo configure:12396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12396   rm -rf conftest*
12397   ol_cv_pthread_pthreads=yes
12398 else
12399   echo "configure: failed program was:" >&5
12400   cat conftest.$ac_ext >&5
12401   rm -rf conftest*
12402   ol_cv_pthread_pthreads=no
12403 fi
12404 rm -f conftest*
12405 else
12406   cat > conftest.$ac_ext <<EOF
12407 #line 12408 "configure"
12408 #include "confdefs.h"
12409 /* pthread test headers */
12410 #include <pthread.h>
12411 #if HAVE_PTHREADS < 7
12412 #include <errno.h>
12413 #endif
12414 #ifndef NULL
12415 #define NULL (void*)0
12416 #endif
12417
12418 static void *task(p)
12419         void *p;
12420 {
12421         return (void *) (p == NULL);
12422 }
12423
12424
12425 int main(argc, argv)
12426         int argc;
12427         char **argv;
12428 {
12429
12430         /* pthread test function */
12431 #ifndef PTHREAD_CREATE_DETACHED
12432 #define PTHREAD_CREATE_DETACHED 1
12433 #endif
12434         pthread_t t;
12435         int status;
12436         int detach = PTHREAD_CREATE_DETACHED;
12437
12438 #if HAVE_PTHREADS > 4
12439         /* Final pthreads */
12440         pthread_attr_t attr;
12441
12442         status = pthread_attr_init(&attr);
12443         if( status ) return status;
12444
12445 #if HAVE_PTHREADS < 7
12446         status = pthread_attr_setdetachstate(&attr, &detach);
12447         if( status < 0 ) status = errno;
12448 #else
12449         status = pthread_attr_setdetachstate(&attr, detach);
12450 #endif
12451         if( status ) return status;
12452         status = pthread_create( &t, &attr, task, NULL );
12453 #if HAVE_PTHREADS < 7
12454         if( status < 0 ) status = errno;
12455 #endif
12456         if( status ) return status;
12457 #else
12458         /* Draft 4 pthreads */
12459         status = pthread_create( &t, pthread_attr_default, task, NULL );
12460         if( status ) return errno;
12461
12462         /* give thread a chance to complete */
12463         /* it should remain joinable and hence detachable */
12464         sleep( 1 );
12465
12466         status = pthread_detach( &t );
12467         if( status ) return errno;
12468 #endif
12469
12470 #ifdef HAVE_LINUX_THREADS
12471         pthread_kill_other_threads_np();
12472 #endif
12473
12474         return 0;
12475
12476 }
12477
12478 EOF
12479 if { (eval echo configure:12480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12480 then
12481   ol_cv_pthread_pthreads=yes
12482 else
12483   echo "configure: failed program was:" >&5
12484   cat conftest.$ac_ext >&5
12485   rm -fr conftest*
12486   ol_cv_pthread_pthreads=no
12487 fi
12488 rm -fr conftest*
12489 fi
12490
12491
12492                 # restore the LIBS
12493                 LIBS="$ol_LIBS"
12494         
12495 fi
12496
12497 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12498
12499         if test $ol_cv_pthread_pthreads = yes ; then
12500                 ol_link_pthreads="-pthreads"
12501                 ol_link_threads=posix
12502         fi
12503 fi
12504
12505                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12506 if test "$ol_link_threads" = no ; then
12507         # try -mthreads
12508         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12509 echo "configure:12510: checking for pthread link with -mthreads" >&5
12510 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12511   echo $ac_n "(cached) $ac_c" 1>&6
12512 else
12513   
12514                 # save the flags
12515                 ol_LIBS="$LIBS"
12516                 LIBS="-mthreads $LIBS"
12517
12518                 if test "$cross_compiling" = yes; then
12519   cat > conftest.$ac_ext <<EOF
12520 #line 12521 "configure"
12521 #include "confdefs.h"
12522 /* pthread test headers */
12523 #include <pthread.h>
12524 #if HAVE_PTHREADS < 7
12525 #include <errno.h>
12526 #endif
12527 #ifndef NULL
12528 #define NULL (void*)0
12529 #endif
12530
12531 static void *task(p)
12532         void *p;
12533 {
12534         return (void *) (p == NULL);
12535 }
12536
12537 int main() {
12538
12539         /* pthread test function */
12540 #ifndef PTHREAD_CREATE_DETACHED
12541 #define PTHREAD_CREATE_DETACHED 1
12542 #endif
12543         pthread_t t;
12544         int status;
12545         int detach = PTHREAD_CREATE_DETACHED;
12546
12547 #if HAVE_PTHREADS > 4
12548         /* Final pthreads */
12549         pthread_attr_t attr;
12550
12551         status = pthread_attr_init(&attr);
12552         if( status ) return status;
12553
12554 #if HAVE_PTHREADS < 7
12555         status = pthread_attr_setdetachstate(&attr, &detach);
12556         if( status < 0 ) status = errno;
12557 #else
12558         status = pthread_attr_setdetachstate(&attr, detach);
12559 #endif
12560         if( status ) return status;
12561         status = pthread_create( &t, &attr, task, NULL );
12562 #if HAVE_PTHREADS < 7
12563         if( status < 0 ) status = errno;
12564 #endif
12565         if( status ) return status;
12566 #else
12567         /* Draft 4 pthreads */
12568         status = pthread_create( &t, pthread_attr_default, task, NULL );
12569         if( status ) return errno;
12570
12571         /* give thread a chance to complete */
12572         /* it should remain joinable and hence detachable */
12573         sleep( 1 );
12574
12575         status = pthread_detach( &t );
12576         if( status ) return errno;
12577 #endif
12578
12579 #ifdef HAVE_LINUX_THREADS
12580         pthread_kill_other_threads_np();
12581 #endif
12582
12583         return 0;
12584
12585 ; return 0; }
12586 EOF
12587 if { (eval echo configure:12588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12588   rm -rf conftest*
12589   ol_cv_pthread_mthreads=yes
12590 else
12591   echo "configure: failed program was:" >&5
12592   cat conftest.$ac_ext >&5
12593   rm -rf conftest*
12594   ol_cv_pthread_mthreads=no
12595 fi
12596 rm -f conftest*
12597 else
12598   cat > conftest.$ac_ext <<EOF
12599 #line 12600 "configure"
12600 #include "confdefs.h"
12601 /* pthread test headers */
12602 #include <pthread.h>
12603 #if HAVE_PTHREADS < 7
12604 #include <errno.h>
12605 #endif
12606 #ifndef NULL
12607 #define NULL (void*)0
12608 #endif
12609
12610 static void *task(p)
12611         void *p;
12612 {
12613         return (void *) (p == NULL);
12614 }
12615
12616
12617 int main(argc, argv)
12618         int argc;
12619         char **argv;
12620 {
12621
12622         /* pthread test function */
12623 #ifndef PTHREAD_CREATE_DETACHED
12624 #define PTHREAD_CREATE_DETACHED 1
12625 #endif
12626         pthread_t t;
12627         int status;
12628         int detach = PTHREAD_CREATE_DETACHED;
12629
12630 #if HAVE_PTHREADS > 4
12631         /* Final pthreads */
12632         pthread_attr_t attr;
12633
12634         status = pthread_attr_init(&attr);
12635         if( status ) return status;
12636
12637 #if HAVE_PTHREADS < 7
12638         status = pthread_attr_setdetachstate(&attr, &detach);
12639         if( status < 0 ) status = errno;
12640 #else
12641         status = pthread_attr_setdetachstate(&attr, detach);
12642 #endif
12643         if( status ) return status;
12644         status = pthread_create( &t, &attr, task, NULL );
12645 #if HAVE_PTHREADS < 7
12646         if( status < 0 ) status = errno;
12647 #endif
12648         if( status ) return status;
12649 #else
12650         /* Draft 4 pthreads */
12651         status = pthread_create( &t, pthread_attr_default, task, NULL );
12652         if( status ) return errno;
12653
12654         /* give thread a chance to complete */
12655         /* it should remain joinable and hence detachable */
12656         sleep( 1 );
12657
12658         status = pthread_detach( &t );
12659         if( status ) return errno;
12660 #endif
12661
12662 #ifdef HAVE_LINUX_THREADS
12663         pthread_kill_other_threads_np();
12664 #endif
12665
12666         return 0;
12667
12668 }
12669
12670 EOF
12671 if { (eval echo configure:12672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12672 then
12673   ol_cv_pthread_mthreads=yes
12674 else
12675   echo "configure: failed program was:" >&5
12676   cat conftest.$ac_ext >&5
12677   rm -fr conftest*
12678   ol_cv_pthread_mthreads=no
12679 fi
12680 rm -fr conftest*
12681 fi
12682
12683
12684                 # restore the LIBS
12685                 LIBS="$ol_LIBS"
12686         
12687 fi
12688
12689 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12690
12691         if test $ol_cv_pthread_mthreads = yes ; then
12692                 ol_link_pthreads="-mthreads"
12693                 ol_link_threads=posix
12694         fi
12695 fi
12696
12697                 # Pthread try link: -thread (ol_cv_pthread_thread)
12698 if test "$ol_link_threads" = no ; then
12699         # try -thread
12700         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12701 echo "configure:12702: checking for pthread link with -thread" >&5
12702 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12703   echo $ac_n "(cached) $ac_c" 1>&6
12704 else
12705   
12706                 # save the flags
12707                 ol_LIBS="$LIBS"
12708                 LIBS="-thread $LIBS"
12709
12710                 if test "$cross_compiling" = yes; then
12711   cat > conftest.$ac_ext <<EOF
12712 #line 12713 "configure"
12713 #include "confdefs.h"
12714 /* pthread test headers */
12715 #include <pthread.h>
12716 #if HAVE_PTHREADS < 7
12717 #include <errno.h>
12718 #endif
12719 #ifndef NULL
12720 #define NULL (void*)0
12721 #endif
12722
12723 static void *task(p)
12724         void *p;
12725 {
12726         return (void *) (p == NULL);
12727 }
12728
12729 int main() {
12730
12731         /* pthread test function */
12732 #ifndef PTHREAD_CREATE_DETACHED
12733 #define PTHREAD_CREATE_DETACHED 1
12734 #endif
12735         pthread_t t;
12736         int status;
12737         int detach = PTHREAD_CREATE_DETACHED;
12738
12739 #if HAVE_PTHREADS > 4
12740         /* Final pthreads */
12741         pthread_attr_t attr;
12742
12743         status = pthread_attr_init(&attr);
12744         if( status ) return status;
12745
12746 #if HAVE_PTHREADS < 7
12747         status = pthread_attr_setdetachstate(&attr, &detach);
12748         if( status < 0 ) status = errno;
12749 #else
12750         status = pthread_attr_setdetachstate(&attr, detach);
12751 #endif
12752         if( status ) return status;
12753         status = pthread_create( &t, &attr, task, NULL );
12754 #if HAVE_PTHREADS < 7
12755         if( status < 0 ) status = errno;
12756 #endif
12757         if( status ) return status;
12758 #else
12759         /* Draft 4 pthreads */
12760         status = pthread_create( &t, pthread_attr_default, task, NULL );
12761         if( status ) return errno;
12762
12763         /* give thread a chance to complete */
12764         /* it should remain joinable and hence detachable */
12765         sleep( 1 );
12766
12767         status = pthread_detach( &t );
12768         if( status ) return errno;
12769 #endif
12770
12771 #ifdef HAVE_LINUX_THREADS
12772         pthread_kill_other_threads_np();
12773 #endif
12774
12775         return 0;
12776
12777 ; return 0; }
12778 EOF
12779 if { (eval echo configure:12780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12780   rm -rf conftest*
12781   ol_cv_pthread_thread=yes
12782 else
12783   echo "configure: failed program was:" >&5
12784   cat conftest.$ac_ext >&5
12785   rm -rf conftest*
12786   ol_cv_pthread_thread=no
12787 fi
12788 rm -f conftest*
12789 else
12790   cat > conftest.$ac_ext <<EOF
12791 #line 12792 "configure"
12792 #include "confdefs.h"
12793 /* pthread test headers */
12794 #include <pthread.h>
12795 #if HAVE_PTHREADS < 7
12796 #include <errno.h>
12797 #endif
12798 #ifndef NULL
12799 #define NULL (void*)0
12800 #endif
12801
12802 static void *task(p)
12803         void *p;
12804 {
12805         return (void *) (p == NULL);
12806 }
12807
12808
12809 int main(argc, argv)
12810         int argc;
12811         char **argv;
12812 {
12813
12814         /* pthread test function */
12815 #ifndef PTHREAD_CREATE_DETACHED
12816 #define PTHREAD_CREATE_DETACHED 1
12817 #endif
12818         pthread_t t;
12819         int status;
12820         int detach = PTHREAD_CREATE_DETACHED;
12821
12822 #if HAVE_PTHREADS > 4
12823         /* Final pthreads */
12824         pthread_attr_t attr;
12825
12826         status = pthread_attr_init(&attr);
12827         if( status ) return status;
12828
12829 #if HAVE_PTHREADS < 7
12830         status = pthread_attr_setdetachstate(&attr, &detach);
12831         if( status < 0 ) status = errno;
12832 #else
12833         status = pthread_attr_setdetachstate(&attr, detach);
12834 #endif
12835         if( status ) return status;
12836         status = pthread_create( &t, &attr, task, NULL );
12837 #if HAVE_PTHREADS < 7
12838         if( status < 0 ) status = errno;
12839 #endif
12840         if( status ) return status;
12841 #else
12842         /* Draft 4 pthreads */
12843         status = pthread_create( &t, pthread_attr_default, task, NULL );
12844         if( status ) return errno;
12845
12846         /* give thread a chance to complete */
12847         /* it should remain joinable and hence detachable */
12848         sleep( 1 );
12849
12850         status = pthread_detach( &t );
12851         if( status ) return errno;
12852 #endif
12853
12854 #ifdef HAVE_LINUX_THREADS
12855         pthread_kill_other_threads_np();
12856 #endif
12857
12858         return 0;
12859
12860 }
12861
12862 EOF
12863 if { (eval echo configure:12864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12864 then
12865   ol_cv_pthread_thread=yes
12866 else
12867   echo "configure: failed program was:" >&5
12868   cat conftest.$ac_ext >&5
12869   rm -fr conftest*
12870   ol_cv_pthread_thread=no
12871 fi
12872 rm -fr conftest*
12873 fi
12874
12875
12876                 # restore the LIBS
12877                 LIBS="$ol_LIBS"
12878         
12879 fi
12880
12881 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12882
12883         if test $ol_cv_pthread_thread = yes ; then
12884                 ol_link_pthreads="-thread"
12885                 ol_link_threads=posix
12886         fi
12887 fi
12888
12889
12890                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12891 if test "$ol_link_threads" = no ; then
12892         # try -lpthread -lmach -lexc -lc_r
12893         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12894 echo "configure:12895: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12895 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12896   echo $ac_n "(cached) $ac_c" 1>&6
12897 else
12898   
12899                 # save the flags
12900                 ol_LIBS="$LIBS"
12901                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12902
12903                 if test "$cross_compiling" = yes; then
12904   cat > conftest.$ac_ext <<EOF
12905 #line 12906 "configure"
12906 #include "confdefs.h"
12907 /* pthread test headers */
12908 #include <pthread.h>
12909 #if HAVE_PTHREADS < 7
12910 #include <errno.h>
12911 #endif
12912 #ifndef NULL
12913 #define NULL (void*)0
12914 #endif
12915
12916 static void *task(p)
12917         void *p;
12918 {
12919         return (void *) (p == NULL);
12920 }
12921
12922 int main() {
12923
12924         /* pthread test function */
12925 #ifndef PTHREAD_CREATE_DETACHED
12926 #define PTHREAD_CREATE_DETACHED 1
12927 #endif
12928         pthread_t t;
12929         int status;
12930         int detach = PTHREAD_CREATE_DETACHED;
12931
12932 #if HAVE_PTHREADS > 4
12933         /* Final pthreads */
12934         pthread_attr_t attr;
12935
12936         status = pthread_attr_init(&attr);
12937         if( status ) return status;
12938
12939 #if HAVE_PTHREADS < 7
12940         status = pthread_attr_setdetachstate(&attr, &detach);
12941         if( status < 0 ) status = errno;
12942 #else
12943         status = pthread_attr_setdetachstate(&attr, detach);
12944 #endif
12945         if( status ) return status;
12946         status = pthread_create( &t, &attr, task, NULL );
12947 #if HAVE_PTHREADS < 7
12948         if( status < 0 ) status = errno;
12949 #endif
12950         if( status ) return status;
12951 #else
12952         /* Draft 4 pthreads */
12953         status = pthread_create( &t, pthread_attr_default, task, NULL );
12954         if( status ) return errno;
12955
12956         /* give thread a chance to complete */
12957         /* it should remain joinable and hence detachable */
12958         sleep( 1 );
12959
12960         status = pthread_detach( &t );
12961         if( status ) return errno;
12962 #endif
12963
12964 #ifdef HAVE_LINUX_THREADS
12965         pthread_kill_other_threads_np();
12966 #endif
12967
12968         return 0;
12969
12970 ; return 0; }
12971 EOF
12972 if { (eval echo configure:12973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12973   rm -rf conftest*
12974   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12975 else
12976   echo "configure: failed program was:" >&5
12977   cat conftest.$ac_ext >&5
12978   rm -rf conftest*
12979   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12980 fi
12981 rm -f conftest*
12982 else
12983   cat > conftest.$ac_ext <<EOF
12984 #line 12985 "configure"
12985 #include "confdefs.h"
12986 /* pthread test headers */
12987 #include <pthread.h>
12988 #if HAVE_PTHREADS < 7
12989 #include <errno.h>
12990 #endif
12991 #ifndef NULL
12992 #define NULL (void*)0
12993 #endif
12994
12995 static void *task(p)
12996         void *p;
12997 {
12998         return (void *) (p == NULL);
12999 }
13000
13001
13002 int main(argc, argv)
13003         int argc;
13004         char **argv;
13005 {
13006
13007         /* pthread test function */
13008 #ifndef PTHREAD_CREATE_DETACHED
13009 #define PTHREAD_CREATE_DETACHED 1
13010 #endif
13011         pthread_t t;
13012         int status;
13013         int detach = PTHREAD_CREATE_DETACHED;
13014
13015 #if HAVE_PTHREADS > 4
13016         /* Final pthreads */
13017         pthread_attr_t attr;
13018
13019         status = pthread_attr_init(&attr);
13020         if( status ) return status;
13021
13022 #if HAVE_PTHREADS < 7
13023         status = pthread_attr_setdetachstate(&attr, &detach);
13024         if( status < 0 ) status = errno;
13025 #else
13026         status = pthread_attr_setdetachstate(&attr, detach);
13027 #endif
13028         if( status ) return status;
13029         status = pthread_create( &t, &attr, task, NULL );
13030 #if HAVE_PTHREADS < 7
13031         if( status < 0 ) status = errno;
13032 #endif
13033         if( status ) return status;
13034 #else
13035         /* Draft 4 pthreads */
13036         status = pthread_create( &t, pthread_attr_default, task, NULL );
13037         if( status ) return errno;
13038
13039         /* give thread a chance to complete */
13040         /* it should remain joinable and hence detachable */
13041         sleep( 1 );
13042
13043         status = pthread_detach( &t );
13044         if( status ) return errno;
13045 #endif
13046
13047 #ifdef HAVE_LINUX_THREADS
13048         pthread_kill_other_threads_np();
13049 #endif
13050
13051         return 0;
13052
13053 }
13054
13055 EOF
13056 if { (eval echo configure:13057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13057 then
13058   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13059 else
13060   echo "configure: failed program was:" >&5
13061   cat conftest.$ac_ext >&5
13062   rm -fr conftest*
13063   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13064 fi
13065 rm -fr conftest*
13066 fi
13067
13068
13069                 # restore the LIBS
13070                 LIBS="$ol_LIBS"
13071         
13072 fi
13073
13074 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13075
13076         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13077                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13078                 ol_link_threads=posix
13079         fi
13080 fi
13081
13082                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13083 if test "$ol_link_threads" = no ; then
13084         # try -lpthread -lmach -lexc
13085         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13086 echo "configure:13087: checking for pthread link with -lpthread -lmach -lexc" >&5
13087 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13088   echo $ac_n "(cached) $ac_c" 1>&6
13089 else
13090   
13091                 # save the flags
13092                 ol_LIBS="$LIBS"
13093                 LIBS="-lpthread -lmach -lexc $LIBS"
13094
13095                 if test "$cross_compiling" = yes; then
13096   cat > conftest.$ac_ext <<EOF
13097 #line 13098 "configure"
13098 #include "confdefs.h"
13099 /* pthread test headers */
13100 #include <pthread.h>
13101 #if HAVE_PTHREADS < 7
13102 #include <errno.h>
13103 #endif
13104 #ifndef NULL
13105 #define NULL (void*)0
13106 #endif
13107
13108 static void *task(p)
13109         void *p;
13110 {
13111         return (void *) (p == NULL);
13112 }
13113
13114 int main() {
13115
13116         /* pthread test function */
13117 #ifndef PTHREAD_CREATE_DETACHED
13118 #define PTHREAD_CREATE_DETACHED 1
13119 #endif
13120         pthread_t t;
13121         int status;
13122         int detach = PTHREAD_CREATE_DETACHED;
13123
13124 #if HAVE_PTHREADS > 4
13125         /* Final pthreads */
13126         pthread_attr_t attr;
13127
13128         status = pthread_attr_init(&attr);
13129         if( status ) return status;
13130
13131 #if HAVE_PTHREADS < 7
13132         status = pthread_attr_setdetachstate(&attr, &detach);
13133         if( status < 0 ) status = errno;
13134 #else
13135         status = pthread_attr_setdetachstate(&attr, detach);
13136 #endif
13137         if( status ) return status;
13138         status = pthread_create( &t, &attr, task, NULL );
13139 #if HAVE_PTHREADS < 7
13140         if( status < 0 ) status = errno;
13141 #endif
13142         if( status ) return status;
13143 #else
13144         /* Draft 4 pthreads */
13145         status = pthread_create( &t, pthread_attr_default, task, NULL );
13146         if( status ) return errno;
13147
13148         /* give thread a chance to complete */
13149         /* it should remain joinable and hence detachable */
13150         sleep( 1 );
13151
13152         status = pthread_detach( &t );
13153         if( status ) return errno;
13154 #endif
13155
13156 #ifdef HAVE_LINUX_THREADS
13157         pthread_kill_other_threads_np();
13158 #endif
13159
13160         return 0;
13161
13162 ; return 0; }
13163 EOF
13164 if { (eval echo configure:13165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13165   rm -rf conftest*
13166   ol_cv_pthread_lpthread_lmach_lexc=yes
13167 else
13168   echo "configure: failed program was:" >&5
13169   cat conftest.$ac_ext >&5
13170   rm -rf conftest*
13171   ol_cv_pthread_lpthread_lmach_lexc=no
13172 fi
13173 rm -f conftest*
13174 else
13175   cat > conftest.$ac_ext <<EOF
13176 #line 13177 "configure"
13177 #include "confdefs.h"
13178 /* pthread test headers */
13179 #include <pthread.h>
13180 #if HAVE_PTHREADS < 7
13181 #include <errno.h>
13182 #endif
13183 #ifndef NULL
13184 #define NULL (void*)0
13185 #endif
13186
13187 static void *task(p)
13188         void *p;
13189 {
13190         return (void *) (p == NULL);
13191 }
13192
13193
13194 int main(argc, argv)
13195         int argc;
13196         char **argv;
13197 {
13198
13199         /* pthread test function */
13200 #ifndef PTHREAD_CREATE_DETACHED
13201 #define PTHREAD_CREATE_DETACHED 1
13202 #endif
13203         pthread_t t;
13204         int status;
13205         int detach = PTHREAD_CREATE_DETACHED;
13206
13207 #if HAVE_PTHREADS > 4
13208         /* Final pthreads */
13209         pthread_attr_t attr;
13210
13211         status = pthread_attr_init(&attr);
13212         if( status ) return status;
13213
13214 #if HAVE_PTHREADS < 7
13215         status = pthread_attr_setdetachstate(&attr, &detach);
13216         if( status < 0 ) status = errno;
13217 #else
13218         status = pthread_attr_setdetachstate(&attr, detach);
13219 #endif
13220         if( status ) return status;
13221         status = pthread_create( &t, &attr, task, NULL );
13222 #if HAVE_PTHREADS < 7
13223         if( status < 0 ) status = errno;
13224 #endif
13225         if( status ) return status;
13226 #else
13227         /* Draft 4 pthreads */
13228         status = pthread_create( &t, pthread_attr_default, task, NULL );
13229         if( status ) return errno;
13230
13231         /* give thread a chance to complete */
13232         /* it should remain joinable and hence detachable */
13233         sleep( 1 );
13234
13235         status = pthread_detach( &t );
13236         if( status ) return errno;
13237 #endif
13238
13239 #ifdef HAVE_LINUX_THREADS
13240         pthread_kill_other_threads_np();
13241 #endif
13242
13243         return 0;
13244
13245 }
13246
13247 EOF
13248 if { (eval echo configure:13249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13249 then
13250   ol_cv_pthread_lpthread_lmach_lexc=yes
13251 else
13252   echo "configure: failed program was:" >&5
13253   cat conftest.$ac_ext >&5
13254   rm -fr conftest*
13255   ol_cv_pthread_lpthread_lmach_lexc=no
13256 fi
13257 rm -fr conftest*
13258 fi
13259
13260
13261                 # restore the LIBS
13262                 LIBS="$ol_LIBS"
13263         
13264 fi
13265
13266 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13267
13268         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13269                 ol_link_pthreads="-lpthread -lmach -lexc"
13270                 ol_link_threads=posix
13271         fi
13272 fi
13273
13274
13275                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13276 if test "$ol_link_threads" = no ; then
13277         # try -lpthread -Wl,-woff,85
13278         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13279 echo "configure:13280: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13280 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13281   echo $ac_n "(cached) $ac_c" 1>&6
13282 else
13283   
13284                 # save the flags
13285                 ol_LIBS="$LIBS"
13286                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13287
13288                 if test "$cross_compiling" = yes; then
13289   cat > conftest.$ac_ext <<EOF
13290 #line 13291 "configure"
13291 #include "confdefs.h"
13292 /* pthread test headers */
13293 #include <pthread.h>
13294 #if HAVE_PTHREADS < 7
13295 #include <errno.h>
13296 #endif
13297 #ifndef NULL
13298 #define NULL (void*)0
13299 #endif
13300
13301 static void *task(p)
13302         void *p;
13303 {
13304         return (void *) (p == NULL);
13305 }
13306
13307 int main() {
13308
13309         /* pthread test function */
13310 #ifndef PTHREAD_CREATE_DETACHED
13311 #define PTHREAD_CREATE_DETACHED 1
13312 #endif
13313         pthread_t t;
13314         int status;
13315         int detach = PTHREAD_CREATE_DETACHED;
13316
13317 #if HAVE_PTHREADS > 4
13318         /* Final pthreads */
13319         pthread_attr_t attr;
13320
13321         status = pthread_attr_init(&attr);
13322         if( status ) return status;
13323
13324 #if HAVE_PTHREADS < 7
13325         status = pthread_attr_setdetachstate(&attr, &detach);
13326         if( status < 0 ) status = errno;
13327 #else
13328         status = pthread_attr_setdetachstate(&attr, detach);
13329 #endif
13330         if( status ) return status;
13331         status = pthread_create( &t, &attr, task, NULL );
13332 #if HAVE_PTHREADS < 7
13333         if( status < 0 ) status = errno;
13334 #endif
13335         if( status ) return status;
13336 #else
13337         /* Draft 4 pthreads */
13338         status = pthread_create( &t, pthread_attr_default, task, NULL );
13339         if( status ) return errno;
13340
13341         /* give thread a chance to complete */
13342         /* it should remain joinable and hence detachable */
13343         sleep( 1 );
13344
13345         status = pthread_detach( &t );
13346         if( status ) return errno;
13347 #endif
13348
13349 #ifdef HAVE_LINUX_THREADS
13350         pthread_kill_other_threads_np();
13351 #endif
13352
13353         return 0;
13354
13355 ; return 0; }
13356 EOF
13357 if { (eval echo configure:13358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13358   rm -rf conftest*
13359   ol_cv_pthread_lib_lpthread_woff=yes
13360 else
13361   echo "configure: failed program was:" >&5
13362   cat conftest.$ac_ext >&5
13363   rm -rf conftest*
13364   ol_cv_pthread_lib_lpthread_woff=no
13365 fi
13366 rm -f conftest*
13367 else
13368   cat > conftest.$ac_ext <<EOF
13369 #line 13370 "configure"
13370 #include "confdefs.h"
13371 /* pthread test headers */
13372 #include <pthread.h>
13373 #if HAVE_PTHREADS < 7
13374 #include <errno.h>
13375 #endif
13376 #ifndef NULL
13377 #define NULL (void*)0
13378 #endif
13379
13380 static void *task(p)
13381         void *p;
13382 {
13383         return (void *) (p == NULL);
13384 }
13385
13386
13387 int main(argc, argv)
13388         int argc;
13389         char **argv;
13390 {
13391
13392         /* pthread test function */
13393 #ifndef PTHREAD_CREATE_DETACHED
13394 #define PTHREAD_CREATE_DETACHED 1
13395 #endif
13396         pthread_t t;
13397         int status;
13398         int detach = PTHREAD_CREATE_DETACHED;
13399
13400 #if HAVE_PTHREADS > 4
13401         /* Final pthreads */
13402         pthread_attr_t attr;
13403
13404         status = pthread_attr_init(&attr);
13405         if( status ) return status;
13406
13407 #if HAVE_PTHREADS < 7
13408         status = pthread_attr_setdetachstate(&attr, &detach);
13409         if( status < 0 ) status = errno;
13410 #else
13411         status = pthread_attr_setdetachstate(&attr, detach);
13412 #endif
13413         if( status ) return status;
13414         status = pthread_create( &t, &attr, task, NULL );
13415 #if HAVE_PTHREADS < 7
13416         if( status < 0 ) status = errno;
13417 #endif
13418         if( status ) return status;
13419 #else
13420         /* Draft 4 pthreads */
13421         status = pthread_create( &t, pthread_attr_default, task, NULL );
13422         if( status ) return errno;
13423
13424         /* give thread a chance to complete */
13425         /* it should remain joinable and hence detachable */
13426         sleep( 1 );
13427
13428         status = pthread_detach( &t );
13429         if( status ) return errno;
13430 #endif
13431
13432 #ifdef HAVE_LINUX_THREADS
13433         pthread_kill_other_threads_np();
13434 #endif
13435
13436         return 0;
13437
13438 }
13439
13440 EOF
13441 if { (eval echo configure:13442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13442 then
13443   ol_cv_pthread_lib_lpthread_woff=yes
13444 else
13445   echo "configure: failed program was:" >&5
13446   cat conftest.$ac_ext >&5
13447   rm -fr conftest*
13448   ol_cv_pthread_lib_lpthread_woff=no
13449 fi
13450 rm -fr conftest*
13451 fi
13452
13453
13454                 # restore the LIBS
13455                 LIBS="$ol_LIBS"
13456         
13457 fi
13458
13459 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13460
13461         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13462                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13463                 ol_link_threads=posix
13464         fi
13465 fi
13466
13467
13468                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13469 if test "$ol_link_threads" = no ; then
13470         # try -lpthread
13471         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13472 echo "configure:13473: checking for pthread link with -lpthread" >&5
13473 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13474   echo $ac_n "(cached) $ac_c" 1>&6
13475 else
13476   
13477                 # save the flags
13478                 ol_LIBS="$LIBS"
13479                 LIBS="-lpthread $LIBS"
13480
13481                 if test "$cross_compiling" = yes; then
13482   cat > conftest.$ac_ext <<EOF
13483 #line 13484 "configure"
13484 #include "confdefs.h"
13485 /* pthread test headers */
13486 #include <pthread.h>
13487 #if HAVE_PTHREADS < 7
13488 #include <errno.h>
13489 #endif
13490 #ifndef NULL
13491 #define NULL (void*)0
13492 #endif
13493
13494 static void *task(p)
13495         void *p;
13496 {
13497         return (void *) (p == NULL);
13498 }
13499
13500 int main() {
13501
13502         /* pthread test function */
13503 #ifndef PTHREAD_CREATE_DETACHED
13504 #define PTHREAD_CREATE_DETACHED 1
13505 #endif
13506         pthread_t t;
13507         int status;
13508         int detach = PTHREAD_CREATE_DETACHED;
13509
13510 #if HAVE_PTHREADS > 4
13511         /* Final pthreads */
13512         pthread_attr_t attr;
13513
13514         status = pthread_attr_init(&attr);
13515         if( status ) return status;
13516
13517 #if HAVE_PTHREADS < 7
13518         status = pthread_attr_setdetachstate(&attr, &detach);
13519         if( status < 0 ) status = errno;
13520 #else
13521         status = pthread_attr_setdetachstate(&attr, detach);
13522 #endif
13523         if( status ) return status;
13524         status = pthread_create( &t, &attr, task, NULL );
13525 #if HAVE_PTHREADS < 7
13526         if( status < 0 ) status = errno;
13527 #endif
13528         if( status ) return status;
13529 #else
13530         /* Draft 4 pthreads */
13531         status = pthread_create( &t, pthread_attr_default, task, NULL );
13532         if( status ) return errno;
13533
13534         /* give thread a chance to complete */
13535         /* it should remain joinable and hence detachable */
13536         sleep( 1 );
13537
13538         status = pthread_detach( &t );
13539         if( status ) return errno;
13540 #endif
13541
13542 #ifdef HAVE_LINUX_THREADS
13543         pthread_kill_other_threads_np();
13544 #endif
13545
13546         return 0;
13547
13548 ; return 0; }
13549 EOF
13550 if { (eval echo configure:13551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13551   rm -rf conftest*
13552   ol_cv_pthread_lpthread=yes
13553 else
13554   echo "configure: failed program was:" >&5
13555   cat conftest.$ac_ext >&5
13556   rm -rf conftest*
13557   ol_cv_pthread_lpthread=no
13558 fi
13559 rm -f conftest*
13560 else
13561   cat > conftest.$ac_ext <<EOF
13562 #line 13563 "configure"
13563 #include "confdefs.h"
13564 /* pthread test headers */
13565 #include <pthread.h>
13566 #if HAVE_PTHREADS < 7
13567 #include <errno.h>
13568 #endif
13569 #ifndef NULL
13570 #define NULL (void*)0
13571 #endif
13572
13573 static void *task(p)
13574         void *p;
13575 {
13576         return (void *) (p == NULL);
13577 }
13578
13579
13580 int main(argc, argv)
13581         int argc;
13582         char **argv;
13583 {
13584
13585         /* pthread test function */
13586 #ifndef PTHREAD_CREATE_DETACHED
13587 #define PTHREAD_CREATE_DETACHED 1
13588 #endif
13589         pthread_t t;
13590         int status;
13591         int detach = PTHREAD_CREATE_DETACHED;
13592
13593 #if HAVE_PTHREADS > 4
13594         /* Final pthreads */
13595         pthread_attr_t attr;
13596
13597         status = pthread_attr_init(&attr);
13598         if( status ) return status;
13599
13600 #if HAVE_PTHREADS < 7
13601         status = pthread_attr_setdetachstate(&attr, &detach);
13602         if( status < 0 ) status = errno;
13603 #else
13604         status = pthread_attr_setdetachstate(&attr, detach);
13605 #endif
13606         if( status ) return status;
13607         status = pthread_create( &t, &attr, task, NULL );
13608 #if HAVE_PTHREADS < 7
13609         if( status < 0 ) status = errno;
13610 #endif
13611         if( status ) return status;
13612 #else
13613         /* Draft 4 pthreads */
13614         status = pthread_create( &t, pthread_attr_default, task, NULL );
13615         if( status ) return errno;
13616
13617         /* give thread a chance to complete */
13618         /* it should remain joinable and hence detachable */
13619         sleep( 1 );
13620
13621         status = pthread_detach( &t );
13622         if( status ) return errno;
13623 #endif
13624
13625 #ifdef HAVE_LINUX_THREADS
13626         pthread_kill_other_threads_np();
13627 #endif
13628
13629         return 0;
13630
13631 }
13632
13633 EOF
13634 if { (eval echo configure:13635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13635 then
13636   ol_cv_pthread_lpthread=yes
13637 else
13638   echo "configure: failed program was:" >&5
13639   cat conftest.$ac_ext >&5
13640   rm -fr conftest*
13641   ol_cv_pthread_lpthread=no
13642 fi
13643 rm -fr conftest*
13644 fi
13645
13646
13647                 # restore the LIBS
13648                 LIBS="$ol_LIBS"
13649         
13650 fi
13651
13652 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13653
13654         if test $ol_cv_pthread_lpthread = yes ; then
13655                 ol_link_pthreads="-lpthread"
13656                 ol_link_threads=posix
13657         fi
13658 fi
13659
13660                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13661 if test "$ol_link_threads" = no ; then
13662         # try -lc_r
13663         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13664 echo "configure:13665: checking for pthread link with -lc_r" >&5
13665 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13666   echo $ac_n "(cached) $ac_c" 1>&6
13667 else
13668   
13669                 # save the flags
13670                 ol_LIBS="$LIBS"
13671                 LIBS="-lc_r $LIBS"
13672
13673                 if test "$cross_compiling" = yes; then
13674   cat > conftest.$ac_ext <<EOF
13675 #line 13676 "configure"
13676 #include "confdefs.h"
13677 /* pthread test headers */
13678 #include <pthread.h>
13679 #if HAVE_PTHREADS < 7
13680 #include <errno.h>
13681 #endif
13682 #ifndef NULL
13683 #define NULL (void*)0
13684 #endif
13685
13686 static void *task(p)
13687         void *p;
13688 {
13689         return (void *) (p == NULL);
13690 }
13691
13692 int main() {
13693
13694         /* pthread test function */
13695 #ifndef PTHREAD_CREATE_DETACHED
13696 #define PTHREAD_CREATE_DETACHED 1
13697 #endif
13698         pthread_t t;
13699         int status;
13700         int detach = PTHREAD_CREATE_DETACHED;
13701
13702 #if HAVE_PTHREADS > 4
13703         /* Final pthreads */
13704         pthread_attr_t attr;
13705
13706         status = pthread_attr_init(&attr);
13707         if( status ) return status;
13708
13709 #if HAVE_PTHREADS < 7
13710         status = pthread_attr_setdetachstate(&attr, &detach);
13711         if( status < 0 ) status = errno;
13712 #else
13713         status = pthread_attr_setdetachstate(&attr, detach);
13714 #endif
13715         if( status ) return status;
13716         status = pthread_create( &t, &attr, task, NULL );
13717 #if HAVE_PTHREADS < 7
13718         if( status < 0 ) status = errno;
13719 #endif
13720         if( status ) return status;
13721 #else
13722         /* Draft 4 pthreads */
13723         status = pthread_create( &t, pthread_attr_default, task, NULL );
13724         if( status ) return errno;
13725
13726         /* give thread a chance to complete */
13727         /* it should remain joinable and hence detachable */
13728         sleep( 1 );
13729
13730         status = pthread_detach( &t );
13731         if( status ) return errno;
13732 #endif
13733
13734 #ifdef HAVE_LINUX_THREADS
13735         pthread_kill_other_threads_np();
13736 #endif
13737
13738         return 0;
13739
13740 ; return 0; }
13741 EOF
13742 if { (eval echo configure:13743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13743   rm -rf conftest*
13744   ol_cv_pthread_lc_r=yes
13745 else
13746   echo "configure: failed program was:" >&5
13747   cat conftest.$ac_ext >&5
13748   rm -rf conftest*
13749   ol_cv_pthread_lc_r=no
13750 fi
13751 rm -f conftest*
13752 else
13753   cat > conftest.$ac_ext <<EOF
13754 #line 13755 "configure"
13755 #include "confdefs.h"
13756 /* pthread test headers */
13757 #include <pthread.h>
13758 #if HAVE_PTHREADS < 7
13759 #include <errno.h>
13760 #endif
13761 #ifndef NULL
13762 #define NULL (void*)0
13763 #endif
13764
13765 static void *task(p)
13766         void *p;
13767 {
13768         return (void *) (p == NULL);
13769 }
13770
13771
13772 int main(argc, argv)
13773         int argc;
13774         char **argv;
13775 {
13776
13777         /* pthread test function */
13778 #ifndef PTHREAD_CREATE_DETACHED
13779 #define PTHREAD_CREATE_DETACHED 1
13780 #endif
13781         pthread_t t;
13782         int status;
13783         int detach = PTHREAD_CREATE_DETACHED;
13784
13785 #if HAVE_PTHREADS > 4
13786         /* Final pthreads */
13787         pthread_attr_t attr;
13788
13789         status = pthread_attr_init(&attr);
13790         if( status ) return status;
13791
13792 #if HAVE_PTHREADS < 7
13793         status = pthread_attr_setdetachstate(&attr, &detach);
13794         if( status < 0 ) status = errno;
13795 #else
13796         status = pthread_attr_setdetachstate(&attr, detach);
13797 #endif
13798         if( status ) return status;
13799         status = pthread_create( &t, &attr, task, NULL );
13800 #if HAVE_PTHREADS < 7
13801         if( status < 0 ) status = errno;
13802 #endif
13803         if( status ) return status;
13804 #else
13805         /* Draft 4 pthreads */
13806         status = pthread_create( &t, pthread_attr_default, task, NULL );
13807         if( status ) return errno;
13808
13809         /* give thread a chance to complete */
13810         /* it should remain joinable and hence detachable */
13811         sleep( 1 );
13812
13813         status = pthread_detach( &t );
13814         if( status ) return errno;
13815 #endif
13816
13817 #ifdef HAVE_LINUX_THREADS
13818         pthread_kill_other_threads_np();
13819 #endif
13820
13821         return 0;
13822
13823 }
13824
13825 EOF
13826 if { (eval echo configure:13827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13827 then
13828   ol_cv_pthread_lc_r=yes
13829 else
13830   echo "configure: failed program was:" >&5
13831   cat conftest.$ac_ext >&5
13832   rm -fr conftest*
13833   ol_cv_pthread_lc_r=no
13834 fi
13835 rm -fr conftest*
13836 fi
13837
13838
13839                 # restore the LIBS
13840                 LIBS="$ol_LIBS"
13841         
13842 fi
13843
13844 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13845
13846         if test $ol_cv_pthread_lc_r = yes ; then
13847                 ol_link_pthreads="-lc_r"
13848                 ol_link_threads=posix
13849         fi
13850 fi
13851
13852
13853                 # Pthread try link: -threads (ol_cv_pthread_threads)
13854 if test "$ol_link_threads" = no ; then
13855         # try -threads
13856         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13857 echo "configure:13858: checking for pthread link with -threads" >&5
13858 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13859   echo $ac_n "(cached) $ac_c" 1>&6
13860 else
13861   
13862                 # save the flags
13863                 ol_LIBS="$LIBS"
13864                 LIBS="-threads $LIBS"
13865
13866                 if test "$cross_compiling" = yes; then
13867   cat > conftest.$ac_ext <<EOF
13868 #line 13869 "configure"
13869 #include "confdefs.h"
13870 /* pthread test headers */
13871 #include <pthread.h>
13872 #if HAVE_PTHREADS < 7
13873 #include <errno.h>
13874 #endif
13875 #ifndef NULL
13876 #define NULL (void*)0
13877 #endif
13878
13879 static void *task(p)
13880         void *p;
13881 {
13882         return (void *) (p == NULL);
13883 }
13884
13885 int main() {
13886
13887         /* pthread test function */
13888 #ifndef PTHREAD_CREATE_DETACHED
13889 #define PTHREAD_CREATE_DETACHED 1
13890 #endif
13891         pthread_t t;
13892         int status;
13893         int detach = PTHREAD_CREATE_DETACHED;
13894
13895 #if HAVE_PTHREADS > 4
13896         /* Final pthreads */
13897         pthread_attr_t attr;
13898
13899         status = pthread_attr_init(&attr);
13900         if( status ) return status;
13901
13902 #if HAVE_PTHREADS < 7
13903         status = pthread_attr_setdetachstate(&attr, &detach);
13904         if( status < 0 ) status = errno;
13905 #else
13906         status = pthread_attr_setdetachstate(&attr, detach);
13907 #endif
13908         if( status ) return status;
13909         status = pthread_create( &t, &attr, task, NULL );
13910 #if HAVE_PTHREADS < 7
13911         if( status < 0 ) status = errno;
13912 #endif
13913         if( status ) return status;
13914 #else
13915         /* Draft 4 pthreads */
13916         status = pthread_create( &t, pthread_attr_default, task, NULL );
13917         if( status ) return errno;
13918
13919         /* give thread a chance to complete */
13920         /* it should remain joinable and hence detachable */
13921         sleep( 1 );
13922
13923         status = pthread_detach( &t );
13924         if( status ) return errno;
13925 #endif
13926
13927 #ifdef HAVE_LINUX_THREADS
13928         pthread_kill_other_threads_np();
13929 #endif
13930
13931         return 0;
13932
13933 ; return 0; }
13934 EOF
13935 if { (eval echo configure:13936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13936   rm -rf conftest*
13937   ol_cv_pthread_threads=yes
13938 else
13939   echo "configure: failed program was:" >&5
13940   cat conftest.$ac_ext >&5
13941   rm -rf conftest*
13942   ol_cv_pthread_threads=no
13943 fi
13944 rm -f conftest*
13945 else
13946   cat > conftest.$ac_ext <<EOF
13947 #line 13948 "configure"
13948 #include "confdefs.h"
13949 /* pthread test headers */
13950 #include <pthread.h>
13951 #if HAVE_PTHREADS < 7
13952 #include <errno.h>
13953 #endif
13954 #ifndef NULL
13955 #define NULL (void*)0
13956 #endif
13957
13958 static void *task(p)
13959         void *p;
13960 {
13961         return (void *) (p == NULL);
13962 }
13963
13964
13965 int main(argc, argv)
13966         int argc;
13967         char **argv;
13968 {
13969
13970         /* pthread test function */
13971 #ifndef PTHREAD_CREATE_DETACHED
13972 #define PTHREAD_CREATE_DETACHED 1
13973 #endif
13974         pthread_t t;
13975         int status;
13976         int detach = PTHREAD_CREATE_DETACHED;
13977
13978 #if HAVE_PTHREADS > 4
13979         /* Final pthreads */
13980         pthread_attr_t attr;
13981
13982         status = pthread_attr_init(&attr);
13983         if( status ) return status;
13984
13985 #if HAVE_PTHREADS < 7
13986         status = pthread_attr_setdetachstate(&attr, &detach);
13987         if( status < 0 ) status = errno;
13988 #else
13989         status = pthread_attr_setdetachstate(&attr, detach);
13990 #endif
13991         if( status ) return status;
13992         status = pthread_create( &t, &attr, task, NULL );
13993 #if HAVE_PTHREADS < 7
13994         if( status < 0 ) status = errno;
13995 #endif
13996         if( status ) return status;
13997 #else
13998         /* Draft 4 pthreads */
13999         status = pthread_create( &t, pthread_attr_default, task, NULL );
14000         if( status ) return errno;
14001
14002         /* give thread a chance to complete */
14003         /* it should remain joinable and hence detachable */
14004         sleep( 1 );
14005
14006         status = pthread_detach( &t );
14007         if( status ) return errno;
14008 #endif
14009
14010 #ifdef HAVE_LINUX_THREADS
14011         pthread_kill_other_threads_np();
14012 #endif
14013
14014         return 0;
14015
14016 }
14017
14018 EOF
14019 if { (eval echo configure:14020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14020 then
14021   ol_cv_pthread_threads=yes
14022 else
14023   echo "configure: failed program was:" >&5
14024   cat conftest.$ac_ext >&5
14025   rm -fr conftest*
14026   ol_cv_pthread_threads=no
14027 fi
14028 rm -fr conftest*
14029 fi
14030
14031
14032                 # restore the LIBS
14033                 LIBS="$ol_LIBS"
14034         
14035 fi
14036
14037 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14038
14039         if test $ol_cv_pthread_threads = yes ; then
14040                 ol_link_pthreads="-threads"
14041                 ol_link_threads=posix
14042         fi
14043 fi
14044
14045
14046                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14047 if test "$ol_link_threads" = no ; then
14048         # try -lpthreads -lmach -lexc -lc_r
14049         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14050 echo "configure:14051: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14051 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14052   echo $ac_n "(cached) $ac_c" 1>&6
14053 else
14054   
14055                 # save the flags
14056                 ol_LIBS="$LIBS"
14057                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14058
14059                 if test "$cross_compiling" = yes; then
14060   cat > conftest.$ac_ext <<EOF
14061 #line 14062 "configure"
14062 #include "confdefs.h"
14063 /* pthread test headers */
14064 #include <pthread.h>
14065 #if HAVE_PTHREADS < 7
14066 #include <errno.h>
14067 #endif
14068 #ifndef NULL
14069 #define NULL (void*)0
14070 #endif
14071
14072 static void *task(p)
14073         void *p;
14074 {
14075         return (void *) (p == NULL);
14076 }
14077
14078 int main() {
14079
14080         /* pthread test function */
14081 #ifndef PTHREAD_CREATE_DETACHED
14082 #define PTHREAD_CREATE_DETACHED 1
14083 #endif
14084         pthread_t t;
14085         int status;
14086         int detach = PTHREAD_CREATE_DETACHED;
14087
14088 #if HAVE_PTHREADS > 4
14089         /* Final pthreads */
14090         pthread_attr_t attr;
14091
14092         status = pthread_attr_init(&attr);
14093         if( status ) return status;
14094
14095 #if HAVE_PTHREADS < 7
14096         status = pthread_attr_setdetachstate(&attr, &detach);
14097         if( status < 0 ) status = errno;
14098 #else
14099         status = pthread_attr_setdetachstate(&attr, detach);
14100 #endif
14101         if( status ) return status;
14102         status = pthread_create( &t, &attr, task, NULL );
14103 #if HAVE_PTHREADS < 7
14104         if( status < 0 ) status = errno;
14105 #endif
14106         if( status ) return status;
14107 #else
14108         /* Draft 4 pthreads */
14109         status = pthread_create( &t, pthread_attr_default, task, NULL );
14110         if( status ) return errno;
14111
14112         /* give thread a chance to complete */
14113         /* it should remain joinable and hence detachable */
14114         sleep( 1 );
14115
14116         status = pthread_detach( &t );
14117         if( status ) return errno;
14118 #endif
14119
14120 #ifdef HAVE_LINUX_THREADS
14121         pthread_kill_other_threads_np();
14122 #endif
14123
14124         return 0;
14125
14126 ; return 0; }
14127 EOF
14128 if { (eval echo configure:14129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14129   rm -rf conftest*
14130   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14131 else
14132   echo "configure: failed program was:" >&5
14133   cat conftest.$ac_ext >&5
14134   rm -rf conftest*
14135   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14136 fi
14137 rm -f conftest*
14138 else
14139   cat > conftest.$ac_ext <<EOF
14140 #line 14141 "configure"
14141 #include "confdefs.h"
14142 /* pthread test headers */
14143 #include <pthread.h>
14144 #if HAVE_PTHREADS < 7
14145 #include <errno.h>
14146 #endif
14147 #ifndef NULL
14148 #define NULL (void*)0
14149 #endif
14150
14151 static void *task(p)
14152         void *p;
14153 {
14154         return (void *) (p == NULL);
14155 }
14156
14157
14158 int main(argc, argv)
14159         int argc;
14160         char **argv;
14161 {
14162
14163         /* pthread test function */
14164 #ifndef PTHREAD_CREATE_DETACHED
14165 #define PTHREAD_CREATE_DETACHED 1
14166 #endif
14167         pthread_t t;
14168         int status;
14169         int detach = PTHREAD_CREATE_DETACHED;
14170
14171 #if HAVE_PTHREADS > 4
14172         /* Final pthreads */
14173         pthread_attr_t attr;
14174
14175         status = pthread_attr_init(&attr);
14176         if( status ) return status;
14177
14178 #if HAVE_PTHREADS < 7
14179         status = pthread_attr_setdetachstate(&attr, &detach);
14180         if( status < 0 ) status = errno;
14181 #else
14182         status = pthread_attr_setdetachstate(&attr, detach);
14183 #endif
14184         if( status ) return status;
14185         status = pthread_create( &t, &attr, task, NULL );
14186 #if HAVE_PTHREADS < 7
14187         if( status < 0 ) status = errno;
14188 #endif
14189         if( status ) return status;
14190 #else
14191         /* Draft 4 pthreads */
14192         status = pthread_create( &t, pthread_attr_default, task, NULL );
14193         if( status ) return errno;
14194
14195         /* give thread a chance to complete */
14196         /* it should remain joinable and hence detachable */
14197         sleep( 1 );
14198
14199         status = pthread_detach( &t );
14200         if( status ) return errno;
14201 #endif
14202
14203 #ifdef HAVE_LINUX_THREADS
14204         pthread_kill_other_threads_np();
14205 #endif
14206
14207         return 0;
14208
14209 }
14210
14211 EOF
14212 if { (eval echo configure:14213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14213 then
14214   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14215 else
14216   echo "configure: failed program was:" >&5
14217   cat conftest.$ac_ext >&5
14218   rm -fr conftest*
14219   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14220 fi
14221 rm -fr conftest*
14222 fi
14223
14224
14225                 # restore the LIBS
14226                 LIBS="$ol_LIBS"
14227         
14228 fi
14229
14230 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14231
14232         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14233                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14234                 ol_link_threads=posix
14235         fi
14236 fi
14237
14238                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14239 if test "$ol_link_threads" = no ; then
14240         # try -lpthreads -lmach -lexc
14241         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14242 echo "configure:14243: checking for pthread link with -lpthreads -lmach -lexc" >&5
14243 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14244   echo $ac_n "(cached) $ac_c" 1>&6
14245 else
14246   
14247                 # save the flags
14248                 ol_LIBS="$LIBS"
14249                 LIBS="-lpthreads -lmach -lexc $LIBS"
14250
14251                 if test "$cross_compiling" = yes; then
14252   cat > conftest.$ac_ext <<EOF
14253 #line 14254 "configure"
14254 #include "confdefs.h"
14255 /* pthread test headers */
14256 #include <pthread.h>
14257 #if HAVE_PTHREADS < 7
14258 #include <errno.h>
14259 #endif
14260 #ifndef NULL
14261 #define NULL (void*)0
14262 #endif
14263
14264 static void *task(p)
14265         void *p;
14266 {
14267         return (void *) (p == NULL);
14268 }
14269
14270 int main() {
14271
14272         /* pthread test function */
14273 #ifndef PTHREAD_CREATE_DETACHED
14274 #define PTHREAD_CREATE_DETACHED 1
14275 #endif
14276         pthread_t t;
14277         int status;
14278         int detach = PTHREAD_CREATE_DETACHED;
14279
14280 #if HAVE_PTHREADS > 4
14281         /* Final pthreads */
14282         pthread_attr_t attr;
14283
14284         status = pthread_attr_init(&attr);
14285         if( status ) return status;
14286
14287 #if HAVE_PTHREADS < 7
14288         status = pthread_attr_setdetachstate(&attr, &detach);
14289         if( status < 0 ) status = errno;
14290 #else
14291         status = pthread_attr_setdetachstate(&attr, detach);
14292 #endif
14293         if( status ) return status;
14294         status = pthread_create( &t, &attr, task, NULL );
14295 #if HAVE_PTHREADS < 7
14296         if( status < 0 ) status = errno;
14297 #endif
14298         if( status ) return status;
14299 #else
14300         /* Draft 4 pthreads */
14301         status = pthread_create( &t, pthread_attr_default, task, NULL );
14302         if( status ) return errno;
14303
14304         /* give thread a chance to complete */
14305         /* it should remain joinable and hence detachable */
14306         sleep( 1 );
14307
14308         status = pthread_detach( &t );
14309         if( status ) return errno;
14310 #endif
14311
14312 #ifdef HAVE_LINUX_THREADS
14313         pthread_kill_other_threads_np();
14314 #endif
14315
14316         return 0;
14317
14318 ; return 0; }
14319 EOF
14320 if { (eval echo configure:14321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14321   rm -rf conftest*
14322   ol_cv_pthread_lpthreads_lmach_lexc=yes
14323 else
14324   echo "configure: failed program was:" >&5
14325   cat conftest.$ac_ext >&5
14326   rm -rf conftest*
14327   ol_cv_pthread_lpthreads_lmach_lexc=no
14328 fi
14329 rm -f conftest*
14330 else
14331   cat > conftest.$ac_ext <<EOF
14332 #line 14333 "configure"
14333 #include "confdefs.h"
14334 /* pthread test headers */
14335 #include <pthread.h>
14336 #if HAVE_PTHREADS < 7
14337 #include <errno.h>
14338 #endif
14339 #ifndef NULL
14340 #define NULL (void*)0
14341 #endif
14342
14343 static void *task(p)
14344         void *p;
14345 {
14346         return (void *) (p == NULL);
14347 }
14348
14349
14350 int main(argc, argv)
14351         int argc;
14352         char **argv;
14353 {
14354
14355         /* pthread test function */
14356 #ifndef PTHREAD_CREATE_DETACHED
14357 #define PTHREAD_CREATE_DETACHED 1
14358 #endif
14359         pthread_t t;
14360         int status;
14361         int detach = PTHREAD_CREATE_DETACHED;
14362
14363 #if HAVE_PTHREADS > 4
14364         /* Final pthreads */
14365         pthread_attr_t attr;
14366
14367         status = pthread_attr_init(&attr);
14368         if( status ) return status;
14369
14370 #if HAVE_PTHREADS < 7
14371         status = pthread_attr_setdetachstate(&attr, &detach);
14372         if( status < 0 ) status = errno;
14373 #else
14374         status = pthread_attr_setdetachstate(&attr, detach);
14375 #endif
14376         if( status ) return status;
14377         status = pthread_create( &t, &attr, task, NULL );
14378 #if HAVE_PTHREADS < 7
14379         if( status < 0 ) status = errno;
14380 #endif
14381         if( status ) return status;
14382 #else
14383         /* Draft 4 pthreads */
14384         status = pthread_create( &t, pthread_attr_default, task, NULL );
14385         if( status ) return errno;
14386
14387         /* give thread a chance to complete */
14388         /* it should remain joinable and hence detachable */
14389         sleep( 1 );
14390
14391         status = pthread_detach( &t );
14392         if( status ) return errno;
14393 #endif
14394
14395 #ifdef HAVE_LINUX_THREADS
14396         pthread_kill_other_threads_np();
14397 #endif
14398
14399         return 0;
14400
14401 }
14402
14403 EOF
14404 if { (eval echo configure:14405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14405 then
14406   ol_cv_pthread_lpthreads_lmach_lexc=yes
14407 else
14408   echo "configure: failed program was:" >&5
14409   cat conftest.$ac_ext >&5
14410   rm -fr conftest*
14411   ol_cv_pthread_lpthreads_lmach_lexc=no
14412 fi
14413 rm -fr conftest*
14414 fi
14415
14416
14417                 # restore the LIBS
14418                 LIBS="$ol_LIBS"
14419         
14420 fi
14421
14422 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14423
14424         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14425                 ol_link_pthreads="-lpthreads -lmach -lexc"
14426                 ol_link_threads=posix
14427         fi
14428 fi
14429
14430                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14431 if test "$ol_link_threads" = no ; then
14432         # try -lpthreads -lexc
14433         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14434 echo "configure:14435: checking for pthread link with -lpthreads -lexc" >&5
14435 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14436   echo $ac_n "(cached) $ac_c" 1>&6
14437 else
14438   
14439                 # save the flags
14440                 ol_LIBS="$LIBS"
14441                 LIBS="-lpthreads -lexc $LIBS"
14442
14443                 if test "$cross_compiling" = yes; then
14444   cat > conftest.$ac_ext <<EOF
14445 #line 14446 "configure"
14446 #include "confdefs.h"
14447 /* pthread test headers */
14448 #include <pthread.h>
14449 #if HAVE_PTHREADS < 7
14450 #include <errno.h>
14451 #endif
14452 #ifndef NULL
14453 #define NULL (void*)0
14454 #endif
14455
14456 static void *task(p)
14457         void *p;
14458 {
14459         return (void *) (p == NULL);
14460 }
14461
14462 int main() {
14463
14464         /* pthread test function */
14465 #ifndef PTHREAD_CREATE_DETACHED
14466 #define PTHREAD_CREATE_DETACHED 1
14467 #endif
14468         pthread_t t;
14469         int status;
14470         int detach = PTHREAD_CREATE_DETACHED;
14471
14472 #if HAVE_PTHREADS > 4
14473         /* Final pthreads */
14474         pthread_attr_t attr;
14475
14476         status = pthread_attr_init(&attr);
14477         if( status ) return status;
14478
14479 #if HAVE_PTHREADS < 7
14480         status = pthread_attr_setdetachstate(&attr, &detach);
14481         if( status < 0 ) status = errno;
14482 #else
14483         status = pthread_attr_setdetachstate(&attr, detach);
14484 #endif
14485         if( status ) return status;
14486         status = pthread_create( &t, &attr, task, NULL );
14487 #if HAVE_PTHREADS < 7
14488         if( status < 0 ) status = errno;
14489 #endif
14490         if( status ) return status;
14491 #else
14492         /* Draft 4 pthreads */
14493         status = pthread_create( &t, pthread_attr_default, task, NULL );
14494         if( status ) return errno;
14495
14496         /* give thread a chance to complete */
14497         /* it should remain joinable and hence detachable */
14498         sleep( 1 );
14499
14500         status = pthread_detach( &t );
14501         if( status ) return errno;
14502 #endif
14503
14504 #ifdef HAVE_LINUX_THREADS
14505         pthread_kill_other_threads_np();
14506 #endif
14507
14508         return 0;
14509
14510 ; return 0; }
14511 EOF
14512 if { (eval echo configure:14513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14513   rm -rf conftest*
14514   ol_cv_pthread_lpthreads_lexc=yes
14515 else
14516   echo "configure: failed program was:" >&5
14517   cat conftest.$ac_ext >&5
14518   rm -rf conftest*
14519   ol_cv_pthread_lpthreads_lexc=no
14520 fi
14521 rm -f conftest*
14522 else
14523   cat > conftest.$ac_ext <<EOF
14524 #line 14525 "configure"
14525 #include "confdefs.h"
14526 /* pthread test headers */
14527 #include <pthread.h>
14528 #if HAVE_PTHREADS < 7
14529 #include <errno.h>
14530 #endif
14531 #ifndef NULL
14532 #define NULL (void*)0
14533 #endif
14534
14535 static void *task(p)
14536         void *p;
14537 {
14538         return (void *) (p == NULL);
14539 }
14540
14541
14542 int main(argc, argv)
14543         int argc;
14544         char **argv;
14545 {
14546
14547         /* pthread test function */
14548 #ifndef PTHREAD_CREATE_DETACHED
14549 #define PTHREAD_CREATE_DETACHED 1
14550 #endif
14551         pthread_t t;
14552         int status;
14553         int detach = PTHREAD_CREATE_DETACHED;
14554
14555 #if HAVE_PTHREADS > 4
14556         /* Final pthreads */
14557         pthread_attr_t attr;
14558
14559         status = pthread_attr_init(&attr);
14560         if( status ) return status;
14561
14562 #if HAVE_PTHREADS < 7
14563         status = pthread_attr_setdetachstate(&attr, &detach);
14564         if( status < 0 ) status = errno;
14565 #else
14566         status = pthread_attr_setdetachstate(&attr, detach);
14567 #endif
14568         if( status ) return status;
14569         status = pthread_create( &t, &attr, task, NULL );
14570 #if HAVE_PTHREADS < 7
14571         if( status < 0 ) status = errno;
14572 #endif
14573         if( status ) return status;
14574 #else
14575         /* Draft 4 pthreads */
14576         status = pthread_create( &t, pthread_attr_default, task, NULL );
14577         if( status ) return errno;
14578
14579         /* give thread a chance to complete */
14580         /* it should remain joinable and hence detachable */
14581         sleep( 1 );
14582
14583         status = pthread_detach( &t );
14584         if( status ) return errno;
14585 #endif
14586
14587 #ifdef HAVE_LINUX_THREADS
14588         pthread_kill_other_threads_np();
14589 #endif
14590
14591         return 0;
14592
14593 }
14594
14595 EOF
14596 if { (eval echo configure:14597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14597 then
14598   ol_cv_pthread_lpthreads_lexc=yes
14599 else
14600   echo "configure: failed program was:" >&5
14601   cat conftest.$ac_ext >&5
14602   rm -fr conftest*
14603   ol_cv_pthread_lpthreads_lexc=no
14604 fi
14605 rm -fr conftest*
14606 fi
14607
14608
14609                 # restore the LIBS
14610                 LIBS="$ol_LIBS"
14611         
14612 fi
14613
14614 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14615
14616         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14617                 ol_link_pthreads="-lpthreads -lexc"
14618                 ol_link_threads=posix
14619         fi
14620 fi
14621
14622
14623                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14624 if test "$ol_link_threads" = no ; then
14625         # try -lpthreads
14626         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14627 echo "configure:14628: checking for pthread link with -lpthreads" >&5
14628 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14629   echo $ac_n "(cached) $ac_c" 1>&6
14630 else
14631   
14632                 # save the flags
14633                 ol_LIBS="$LIBS"
14634                 LIBS="-lpthreads $LIBS"
14635
14636                 if test "$cross_compiling" = yes; then
14637   cat > conftest.$ac_ext <<EOF
14638 #line 14639 "configure"
14639 #include "confdefs.h"
14640 /* pthread test headers */
14641 #include <pthread.h>
14642 #if HAVE_PTHREADS < 7
14643 #include <errno.h>
14644 #endif
14645 #ifndef NULL
14646 #define NULL (void*)0
14647 #endif
14648
14649 static void *task(p)
14650         void *p;
14651 {
14652         return (void *) (p == NULL);
14653 }
14654
14655 int main() {
14656
14657         /* pthread test function */
14658 #ifndef PTHREAD_CREATE_DETACHED
14659 #define PTHREAD_CREATE_DETACHED 1
14660 #endif
14661         pthread_t t;
14662         int status;
14663         int detach = PTHREAD_CREATE_DETACHED;
14664
14665 #if HAVE_PTHREADS > 4
14666         /* Final pthreads */
14667         pthread_attr_t attr;
14668
14669         status = pthread_attr_init(&attr);
14670         if( status ) return status;
14671
14672 #if HAVE_PTHREADS < 7
14673         status = pthread_attr_setdetachstate(&attr, &detach);
14674         if( status < 0 ) status = errno;
14675 #else
14676         status = pthread_attr_setdetachstate(&attr, detach);
14677 #endif
14678         if( status ) return status;
14679         status = pthread_create( &t, &attr, task, NULL );
14680 #if HAVE_PTHREADS < 7
14681         if( status < 0 ) status = errno;
14682 #endif
14683         if( status ) return status;
14684 #else
14685         /* Draft 4 pthreads */
14686         status = pthread_create( &t, pthread_attr_default, task, NULL );
14687         if( status ) return errno;
14688
14689         /* give thread a chance to complete */
14690         /* it should remain joinable and hence detachable */
14691         sleep( 1 );
14692
14693         status = pthread_detach( &t );
14694         if( status ) return errno;
14695 #endif
14696
14697 #ifdef HAVE_LINUX_THREADS
14698         pthread_kill_other_threads_np();
14699 #endif
14700
14701         return 0;
14702
14703 ; return 0; }
14704 EOF
14705 if { (eval echo configure:14706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14706   rm -rf conftest*
14707   ol_cv_pthread_lib_lpthreads=yes
14708 else
14709   echo "configure: failed program was:" >&5
14710   cat conftest.$ac_ext >&5
14711   rm -rf conftest*
14712   ol_cv_pthread_lib_lpthreads=no
14713 fi
14714 rm -f conftest*
14715 else
14716   cat > conftest.$ac_ext <<EOF
14717 #line 14718 "configure"
14718 #include "confdefs.h"
14719 /* pthread test headers */
14720 #include <pthread.h>
14721 #if HAVE_PTHREADS < 7
14722 #include <errno.h>
14723 #endif
14724 #ifndef NULL
14725 #define NULL (void*)0
14726 #endif
14727
14728 static void *task(p)
14729         void *p;
14730 {
14731         return (void *) (p == NULL);
14732 }
14733
14734
14735 int main(argc, argv)
14736         int argc;
14737         char **argv;
14738 {
14739
14740         /* pthread test function */
14741 #ifndef PTHREAD_CREATE_DETACHED
14742 #define PTHREAD_CREATE_DETACHED 1
14743 #endif
14744         pthread_t t;
14745         int status;
14746         int detach = PTHREAD_CREATE_DETACHED;
14747
14748 #if HAVE_PTHREADS > 4
14749         /* Final pthreads */
14750         pthread_attr_t attr;
14751
14752         status = pthread_attr_init(&attr);
14753         if( status ) return status;
14754
14755 #if HAVE_PTHREADS < 7
14756         status = pthread_attr_setdetachstate(&attr, &detach);
14757         if( status < 0 ) status = errno;
14758 #else
14759         status = pthread_attr_setdetachstate(&attr, detach);
14760 #endif
14761         if( status ) return status;
14762         status = pthread_create( &t, &attr, task, NULL );
14763 #if HAVE_PTHREADS < 7
14764         if( status < 0 ) status = errno;
14765 #endif
14766         if( status ) return status;
14767 #else
14768         /* Draft 4 pthreads */
14769         status = pthread_create( &t, pthread_attr_default, task, NULL );
14770         if( status ) return errno;
14771
14772         /* give thread a chance to complete */
14773         /* it should remain joinable and hence detachable */
14774         sleep( 1 );
14775
14776         status = pthread_detach( &t );
14777         if( status ) return errno;
14778 #endif
14779
14780 #ifdef HAVE_LINUX_THREADS
14781         pthread_kill_other_threads_np();
14782 #endif
14783
14784         return 0;
14785
14786 }
14787
14788 EOF
14789 if { (eval echo configure:14790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14790 then
14791   ol_cv_pthread_lib_lpthreads=yes
14792 else
14793   echo "configure: failed program was:" >&5
14794   cat conftest.$ac_ext >&5
14795   rm -fr conftest*
14796   ol_cv_pthread_lib_lpthreads=no
14797 fi
14798 rm -fr conftest*
14799 fi
14800
14801
14802                 # restore the LIBS
14803                 LIBS="$ol_LIBS"
14804         
14805 fi
14806
14807 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14808
14809         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14810                 ol_link_pthreads="-lpthreads"
14811                 ol_link_threads=posix
14812         fi
14813 fi
14814
14815
14816                 if test $ol_link_threads != no ; then
14817                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14818
14819                                                 save_CPPFLAGS="$CPPFLAGS"
14820                         save_LIBS="$LIBS"
14821                         LIBS="$LTHREAD_LIBS $LIBS"
14822
14823                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14824 do
14825 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14826 echo "configure:14827: checking for $ac_func" >&5
14827 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14828   echo $ac_n "(cached) $ac_c" 1>&6
14829 else
14830   cat > conftest.$ac_ext <<EOF
14831 #line 14832 "configure"
14832 #include "confdefs.h"
14833 /* System header to define __stub macros and hopefully few prototypes,
14834     which can conflict with char $ac_func(); below.  */
14835 #include <assert.h>
14836 /* Override any gcc2 internal prototype to avoid an error.  */
14837 /* We use char because int might match the return type of a gcc2
14838     builtin and then its argument prototype would still apply.  */
14839 char $ac_func();
14840 char (*f)();
14841
14842 int main() {
14843
14844 /* The GNU C library defines this for functions which it implements
14845     to always fail with ENOSYS.  Some functions are actually named
14846     something starting with __ and the normal name is an alias.  */
14847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14848 choke me
14849 #else
14850 f = $ac_func;
14851 #endif
14852
14853 ; return 0; }
14854 EOF
14855 if { (eval echo configure:14856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14856   rm -rf conftest*
14857   eval "ac_cv_func_$ac_func=yes"
14858 else
14859   echo "configure: failed program was:" >&5
14860   cat conftest.$ac_ext >&5
14861   rm -rf conftest*
14862   eval "ac_cv_func_$ac_func=no"
14863 fi
14864 rm -f conftest*
14865 fi
14866
14867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14868   echo "$ac_t""yes" 1>&6
14869     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14870   cat >> confdefs.h <<EOF
14871 #define $ac_tr_func 1
14872 EOF
14873  
14874 else
14875   echo "$ac_t""no" 1>&6
14876 fi
14877 done
14878
14879
14880                         if test $ac_cv_func_sched_yield = no -a \
14881                                 $ac_cv_func_pthread_yield = no -a \
14882                                 $ac_cv_func_thr_yield = no ; then
14883                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14884 echo "configure:14885: checking for sched_yield in -lrt" >&5
14885 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14886 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14887   echo $ac_n "(cached) $ac_c" 1>&6
14888 else
14889   ac_save_LIBS="$LIBS"
14890 LIBS="-lrt  $LIBS"
14891 cat > conftest.$ac_ext <<EOF
14892 #line 14893 "configure"
14893 #include "confdefs.h"
14894 /* Override any gcc2 internal prototype to avoid an error.  */
14895 /* We use char because int might match the return type of a gcc2
14896     builtin and then its argument prototype would still apply.  */
14897 char sched_yield();
14898
14899 int main() {
14900 sched_yield()
14901 ; return 0; }
14902 EOF
14903 if { (eval echo configure:14904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14904   rm -rf conftest*
14905   eval "ac_cv_lib_$ac_lib_var=yes"
14906 else
14907   echo "configure: failed program was:" >&5
14908   cat conftest.$ac_ext >&5
14909   rm -rf conftest*
14910   eval "ac_cv_lib_$ac_lib_var=no"
14911 fi
14912 rm -f conftest*
14913 LIBS="$ac_save_LIBS"
14914
14915 fi
14916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14917   echo "$ac_t""yes" 1>&6
14918   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14919                                         cat >> confdefs.h <<\EOF
14920 #define HAVE_SCHED_YIELD 1
14921 EOF
14922
14923                                         ac_cv_func_sched_yield=yes
14924 else
14925   echo "$ac_t""no" 1>&6
14926 ac_cv_func_sched_yield=no
14927 fi
14928
14929                         fi
14930                         if test $ac_cv_func_sched_yield = no -a \
14931                                 $ac_cv_func_pthread_yield = no -a \
14932                                 "$ac_cv_func_thr_yield" = no ; then
14933                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14934                         fi
14935
14936                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14937 do
14938 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14939 echo "configure:14940: checking for $ac_func" >&5
14940 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14941   echo $ac_n "(cached) $ac_c" 1>&6
14942 else
14943   cat > conftest.$ac_ext <<EOF
14944 #line 14945 "configure"
14945 #include "confdefs.h"
14946 /* System header to define __stub macros and hopefully few prototypes,
14947     which can conflict with char $ac_func(); below.  */
14948 #include <assert.h>
14949 /* Override any gcc2 internal prototype to avoid an error.  */
14950 /* We use char because int might match the return type of a gcc2
14951     builtin and then its argument prototype would still apply.  */
14952 char $ac_func();
14953 char (*f)();
14954
14955 int main() {
14956
14957 /* The GNU C library defines this for functions which it implements
14958     to always fail with ENOSYS.  Some functions are actually named
14959     something starting with __ and the normal name is an alias.  */
14960 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14961 choke me
14962 #else
14963 f = $ac_func;
14964 #endif
14965
14966 ; return 0; }
14967 EOF
14968 if { (eval echo configure:14969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14969   rm -rf conftest*
14970   eval "ac_cv_func_$ac_func=yes"
14971 else
14972   echo "configure: failed program was:" >&5
14973   cat conftest.$ac_ext >&5
14974   rm -rf conftest*
14975   eval "ac_cv_func_$ac_func=no"
14976 fi
14977 rm -f conftest*
14978 fi
14979
14980 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14981   echo "$ac_t""yes" 1>&6
14982     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14983   cat >> confdefs.h <<EOF
14984 #define $ac_tr_func 1
14985 EOF
14986  
14987 else
14988   echo "$ac_t""no" 1>&6
14989 fi
14990 done
14991
14992
14993                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14994 echo "configure:14995: checking for pthread_detach with <pthread.h>" >&5
14995 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14996   echo $ac_n "(cached) $ac_c" 1>&6
14997 else
14998   
14999                                                                 cat > conftest.$ac_ext <<EOF
15000 #line 15001 "configure"
15001 #include "confdefs.h"
15002
15003 #include <pthread.h>
15004 #ifndef NULL
15005 #define NULL (void*)0
15006 #endif
15007
15008 int main() {
15009 pthread_detach(NULL);
15010 ; return 0; }
15011 EOF
15012 if { (eval echo configure:15013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15013   rm -rf conftest*
15014   ol_cv_func_pthread_detach=yes
15015 else
15016   echo "configure: failed program was:" >&5
15017   cat conftest.$ac_ext >&5
15018   rm -rf conftest*
15019   ol_cv_func_pthread_detach=no
15020 fi
15021 rm -f conftest*
15022                         
15023 fi
15024
15025 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15026
15027                         if test $ol_cv_func_pthread_detach = no ; then
15028                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15029                         fi
15030
15031                         cat >> confdefs.h <<\EOF
15032 #define HAVE_PTHREAD_DETACH 1
15033 EOF
15034
15035
15036                                                 for ac_func in \
15037                                 pthread_setconcurrency \
15038                                 pthread_getconcurrency \
15039                                 thr_setconcurrency \
15040                                 thr_getconcurrency \
15041                         
15042 do
15043 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15044 echo "configure:15045: checking for $ac_func" >&5
15045 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15046   echo $ac_n "(cached) $ac_c" 1>&6
15047 else
15048   cat > conftest.$ac_ext <<EOF
15049 #line 15050 "configure"
15050 #include "confdefs.h"
15051 /* System header to define __stub macros and hopefully few prototypes,
15052     which can conflict with char $ac_func(); below.  */
15053 #include <assert.h>
15054 /* Override any gcc2 internal prototype to avoid an error.  */
15055 /* We use char because int might match the return type of a gcc2
15056     builtin and then its argument prototype would still apply.  */
15057 char $ac_func();
15058 char (*f)();
15059
15060 int main() {
15061
15062 /* The GNU C library defines this for functions which it implements
15063     to always fail with ENOSYS.  Some functions are actually named
15064     something starting with __ and the normal name is an alias.  */
15065 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15066 choke me
15067 #else
15068 f = $ac_func;
15069 #endif
15070
15071 ; return 0; }
15072 EOF
15073 if { (eval echo configure:15074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15074   rm -rf conftest*
15075   eval "ac_cv_func_$ac_func=yes"
15076 else
15077   echo "configure: failed program was:" >&5
15078   cat conftest.$ac_ext >&5
15079   rm -rf conftest*
15080   eval "ac_cv_func_$ac_func=no"
15081 fi
15082 rm -f conftest*
15083 fi
15084
15085 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15086   echo "$ac_t""yes" 1>&6
15087     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15088   cat >> confdefs.h <<EOF
15089 #define $ac_tr_func 1
15090 EOF
15091  
15092 else
15093   echo "$ac_t""no" 1>&6
15094 fi
15095 done
15096
15097
15098                         
15099         for ac_func in pthread_kill_other_threads_np
15100 do
15101 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15102 echo "configure:15103: checking for $ac_func" >&5
15103 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15104   echo $ac_n "(cached) $ac_c" 1>&6
15105 else
15106   cat > conftest.$ac_ext <<EOF
15107 #line 15108 "configure"
15108 #include "confdefs.h"
15109 /* System header to define __stub macros and hopefully few prototypes,
15110     which can conflict with char $ac_func(); below.  */
15111 #include <assert.h>
15112 /* Override any gcc2 internal prototype to avoid an error.  */
15113 /* We use char because int might match the return type of a gcc2
15114     builtin and then its argument prototype would still apply.  */
15115 char $ac_func();
15116 char (*f)();
15117
15118 int main() {
15119
15120 /* The GNU C library defines this for functions which it implements
15121     to always fail with ENOSYS.  Some functions are actually named
15122     something starting with __ and the normal name is an alias.  */
15123 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15124 choke me
15125 #else
15126 f = $ac_func;
15127 #endif
15128
15129 ; return 0; }
15130 EOF
15131 if { (eval echo configure:15132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15132   rm -rf conftest*
15133   eval "ac_cv_func_$ac_func=yes"
15134 else
15135   echo "configure: failed program was:" >&5
15136   cat conftest.$ac_ext >&5
15137   rm -rf conftest*
15138   eval "ac_cv_func_$ac_func=no"
15139 fi
15140 rm -f conftest*
15141 fi
15142
15143 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15144   echo "$ac_t""yes" 1>&6
15145     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15146   cat >> confdefs.h <<EOF
15147 #define $ac_tr_func 1
15148 EOF
15149  
15150 else
15151   echo "$ac_t""no" 1>&6
15152 fi
15153 done
15154
15155         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15156 echo "configure:15157: checking for LinuxThreads implementation" >&5
15157 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15158   echo $ac_n "(cached) $ac_c" 1>&6
15159 else
15160   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15161 fi
15162
15163 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15164
15165                         
15166         
15167         
15168         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15169 echo "configure:15170: checking for LinuxThreads consistency" >&5
15170 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15171   echo $ac_n "(cached) $ac_c" 1>&6
15172 else
15173   
15174                 if test $ol_cv_header_linux_threads = yes -a \
15175                         $ol_cv_sys_linux_threads = yes; then
15176                         ol_cv_linux_threads=yes
15177                 elif test $ol_cv_header_linux_threads = no -a \
15178                         $ol_cv_sys_linux_threads = no; then
15179                         ol_cv_linux_threads=no
15180                 else
15181                         ol_cv_linux_threads=error
15182                 fi
15183         
15184 fi
15185
15186 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15187
15188
15189                         if test $ol_cv_linux_threads = error; then
15190                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15191                         fi
15192
15193                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15194 echo "configure:15195: checking if pthread_create() works" >&5
15195 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15196   echo $ac_n "(cached) $ac_c" 1>&6
15197 else
15198   
15199                         if test "$cross_compiling" = yes; then
15200                                 ol_cv_pthread_create_works=yes
15201 else
15202   cat > conftest.$ac_ext <<EOF
15203 #line 15204 "configure"
15204 #include "confdefs.h"
15205 /* pthread test headers */
15206 #include <pthread.h>
15207 #if HAVE_PTHREADS < 7
15208 #include <errno.h>
15209 #endif
15210 #ifndef NULL
15211 #define NULL (void*)0
15212 #endif
15213
15214 static void *task(p)
15215         void *p;
15216 {
15217         return (void *) (p == NULL);
15218 }
15219
15220
15221 int main(argc, argv)
15222         int argc;
15223         char **argv;
15224 {
15225
15226         /* pthread test function */
15227 #ifndef PTHREAD_CREATE_DETACHED
15228 #define PTHREAD_CREATE_DETACHED 1
15229 #endif
15230         pthread_t t;
15231         int status;
15232         int detach = PTHREAD_CREATE_DETACHED;
15233
15234 #if HAVE_PTHREADS > 4
15235         /* Final pthreads */
15236         pthread_attr_t attr;
15237
15238         status = pthread_attr_init(&attr);
15239         if( status ) return status;
15240
15241 #if HAVE_PTHREADS < 7
15242         status = pthread_attr_setdetachstate(&attr, &detach);
15243         if( status < 0 ) status = errno;
15244 #else
15245         status = pthread_attr_setdetachstate(&attr, detach);
15246 #endif
15247         if( status ) return status;
15248         status = pthread_create( &t, &attr, task, NULL );
15249 #if HAVE_PTHREADS < 7
15250         if( status < 0 ) status = errno;
15251 #endif
15252         if( status ) return status;
15253 #else
15254         /* Draft 4 pthreads */
15255         status = pthread_create( &t, pthread_attr_default, task, NULL );
15256         if( status ) return errno;
15257
15258         /* give thread a chance to complete */
15259         /* it should remain joinable and hence detachable */
15260         sleep( 1 );
15261
15262         status = pthread_detach( &t );
15263         if( status ) return errno;
15264 #endif
15265
15266 #ifdef HAVE_LINUX_THREADS
15267         pthread_kill_other_threads_np();
15268 #endif
15269
15270         return 0;
15271
15272 }
15273
15274 EOF
15275 if { (eval echo configure:15276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15276 then
15277   ol_cv_pthread_create_works=yes
15278 else
15279   echo "configure: failed program was:" >&5
15280   cat conftest.$ac_ext >&5
15281   rm -fr conftest*
15282   ol_cv_pthread_create_works=no
15283 fi
15284 rm -fr conftest*
15285 fi
15286
15287 fi
15288
15289 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15290
15291                         if test $ol_cv_pthread_create_works = no ; then
15292                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15293                         fi
15294
15295                                                 if test $ol_with_yielding_select = auto ; then
15296                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15297 echo "configure:15298: checking if select yields when using pthreads" >&5
15298 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15299   echo $ac_n "(cached) $ac_c" 1>&6
15300 else
15301   
15302                                 if test "$cross_compiling" = yes; then
15303   ol_cv_pthread_select_yields=cross
15304 else
15305   cat > conftest.$ac_ext <<EOF
15306 #line 15307 "configure"
15307 #include "confdefs.h"
15308
15309 #include <sys/types.h>
15310 #include <sys/time.h>
15311 #include <unistd.h>
15312 #include <pthread.h>
15313 #ifndef NULL
15314 #define NULL (void*) 0
15315 #endif
15316
15317 static int fildes[2];
15318
15319 static void *task(p)
15320         void *p;
15321 {
15322         int i;
15323         struct timeval tv;
15324
15325         fd_set rfds;
15326
15327         tv.tv_sec=10;
15328         tv.tv_usec=0;
15329
15330         FD_ZERO(&rfds);
15331         FD_SET(fildes[0], &rfds);
15332
15333         /* we're not interested in any fds */
15334         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15335
15336         if(i < 0) {
15337                 perror("select");
15338                 exit(10);
15339         }
15340
15341         exit(0); /* if we exit here, the select blocked the whole process */
15342 }
15343
15344 int main(argc, argv)
15345         int argc;
15346         char **argv;
15347 {
15348         pthread_t t;
15349
15350         /* create a pipe to select */
15351         if(pipe(&fildes[0])) {
15352                 perror("select");
15353                 exit(1);
15354         }
15355
15356 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15357         (void) pthread_setconcurrency(2);
15358 #else
15359 #ifdef HAVE_THR_SETCONCURRENCY
15360         /* Set Solaris LWP concurrency to 2 */
15361         thr_setconcurrency(2);
15362 #endif
15363 #endif
15364
15365 #if HAVE_PTHREADS < 6
15366         pthread_create(&t, pthread_attr_default, task, NULL);
15367 #else
15368         pthread_create(&t, NULL, task, NULL);
15369 #endif
15370
15371         /* make sure task runs first */
15372 #if HAVE_THR_YIELD
15373         thr_yield();
15374 #elif defined( HAVE_SCHED_YIELD )
15375         sched_yield();
15376 #elif defined( HAVE_PTHREAD_YIELD )
15377         pthread_yield();
15378 #endif
15379
15380         exit(2);
15381 }
15382 EOF
15383 if { (eval echo configure:15384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15384 then
15385   ol_cv_pthread_select_yields=no
15386 else
15387   echo "configure: failed program was:" >&5
15388   cat conftest.$ac_ext >&5
15389   rm -fr conftest*
15390   ol_cv_pthread_select_yields=yes
15391 fi
15392 rm -fr conftest*
15393 fi
15394
15395 fi
15396
15397 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15398
15399                                 if test $ol_cv_pthread_select_yields = cross ; then
15400                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15401                                 fi
15402
15403                                 if test $ol_cv_pthread_select_yields = yes ; then
15404                                         ol_with_yielding_select=yes
15405                                 fi
15406                         fi
15407
15408                                                 CPPFLAGS="$save_CPPFLAGS"
15409                         LIBS="$save_LIBS"
15410                 else
15411                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15412                 fi
15413         fi
15414
15415         if test $ol_with_threads = posix ; then
15416                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15417         fi
15418 fi
15419
15420 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15421         -o $ol_with_threads = mach ; then
15422
15423                 for ac_hdr in mach/cthreads.h cthreads.h
15424 do
15425 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15426 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15427 echo "configure:15428: checking for $ac_hdr" >&5
15428 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15429   echo $ac_n "(cached) $ac_c" 1>&6
15430 else
15431   cat > conftest.$ac_ext <<EOF
15432 #line 15433 "configure"
15433 #include "confdefs.h"
15434 #include <$ac_hdr>
15435 EOF
15436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15437 { (eval echo configure:15438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15439 if test -z "$ac_err"; then
15440   rm -rf conftest*
15441   eval "ac_cv_header_$ac_safe=yes"
15442 else
15443   echo "$ac_err" >&5
15444   echo "configure: failed program was:" >&5
15445   cat conftest.$ac_ext >&5
15446   rm -rf conftest*
15447   eval "ac_cv_header_$ac_safe=no"
15448 fi
15449 rm -f conftest*
15450 fi
15451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15452   echo "$ac_t""yes" 1>&6
15453     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15454   cat >> confdefs.h <<EOF
15455 #define $ac_tr_hdr 1
15456 EOF
15457  
15458 else
15459   echo "$ac_t""no" 1>&6
15460 fi
15461 done
15462
15463         if test $ac_cv_header_mach_cthreads_h = yes ; then
15464                 ol_with_threads=found
15465
15466                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15467 echo "configure:15468: checking for cthread_fork" >&5
15468 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15469   echo $ac_n "(cached) $ac_c" 1>&6
15470 else
15471   cat > conftest.$ac_ext <<EOF
15472 #line 15473 "configure"
15473 #include "confdefs.h"
15474 /* System header to define __stub macros and hopefully few prototypes,
15475     which can conflict with char cthread_fork(); below.  */
15476 #include <assert.h>
15477 /* Override any gcc2 internal prototype to avoid an error.  */
15478 /* We use char because int might match the return type of a gcc2
15479     builtin and then its argument prototype would still apply.  */
15480 char cthread_fork();
15481 char (*f)();
15482
15483 int main() {
15484
15485 /* The GNU C library defines this for functions which it implements
15486     to always fail with ENOSYS.  Some functions are actually named
15487     something starting with __ and the normal name is an alias.  */
15488 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15489 choke me
15490 #else
15491 f = cthread_fork;
15492 #endif
15493
15494 ; return 0; }
15495 EOF
15496 if { (eval echo configure:15497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15497   rm -rf conftest*
15498   eval "ac_cv_func_cthread_fork=yes"
15499 else
15500   echo "configure: failed program was:" >&5
15501   cat conftest.$ac_ext >&5
15502   rm -rf conftest*
15503   eval "ac_cv_func_cthread_fork=no"
15504 fi
15505 rm -f conftest*
15506 fi
15507
15508 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15509   echo "$ac_t""yes" 1>&6
15510   ol_link_threads=yes
15511 else
15512   echo "$ac_t""no" 1>&6
15513 fi
15514
15515
15516                 if test $ol_link_threads = no ; then
15517                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15518 echo "configure:15519: checking for cthread_fork with -all_load" >&5
15519 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15520   echo $ac_n "(cached) $ac_c" 1>&6
15521 else
15522   
15523                                                                 save_LIBS="$LIBS"
15524                                 LIBS="-all_load $LIBS"
15525                                 cat > conftest.$ac_ext <<EOF
15526 #line 15527 "configure"
15527 #include "confdefs.h"
15528 #include <mach/cthreads.h>
15529 int main() {
15530
15531                                         cthread_fork((void *)0, (void *)0);
15532                                         
15533 ; return 0; }
15534 EOF
15535 if { (eval echo configure:15536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15536   rm -rf conftest*
15537   ol_cv_cthread_all_load=yes
15538 else
15539   echo "configure: failed program was:" >&5
15540   cat conftest.$ac_ext >&5
15541   rm -rf conftest*
15542   ol_cv_cthread_all_load=no
15543 fi
15544 rm -f conftest*
15545                                                                 LIBS="$save_LIBS"
15546                         
15547 fi
15548
15549 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15550
15551                         if test $ol_cv_cthread_all_load = yes ; then
15552                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15553                                 ol_link_threads=mach
15554                                 ol_with_threads=found
15555                         fi
15556                 fi
15557
15558         elif test $ac_cv_header_cthreads_h = yes ; then
15559                                 
15560                 ol_with_threads=found
15561  
15562                                 save_LIBS="$LIBS"
15563                 LIBS="$LIBS -lthreads"
15564                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15565 echo "configure:15566: checking for cthread_fork" >&5
15566 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15567   echo $ac_n "(cached) $ac_c" 1>&6
15568 else
15569   cat > conftest.$ac_ext <<EOF
15570 #line 15571 "configure"
15571 #include "confdefs.h"
15572 /* System header to define __stub macros and hopefully few prototypes,
15573     which can conflict with char cthread_fork(); below.  */
15574 #include <assert.h>
15575 /* Override any gcc2 internal prototype to avoid an error.  */
15576 /* We use char because int might match the return type of a gcc2
15577     builtin and then its argument prototype would still apply.  */
15578 char cthread_fork();
15579 char (*f)();
15580
15581 int main() {
15582
15583 /* The GNU C library defines this for functions which it implements
15584     to always fail with ENOSYS.  Some functions are actually named
15585     something starting with __ and the normal name is an alias.  */
15586 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15587 choke me
15588 #else
15589 f = cthread_fork;
15590 #endif
15591
15592 ; return 0; }
15593 EOF
15594 if { (eval echo configure:15595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15595   rm -rf conftest*
15596   eval "ac_cv_func_cthread_fork=yes"
15597 else
15598   echo "configure: failed program was:" >&5
15599   cat conftest.$ac_ext >&5
15600   rm -rf conftest*
15601   eval "ac_cv_func_cthread_fork=no"
15602 fi
15603 rm -f conftest*
15604 fi
15605
15606 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15607   echo "$ac_t""yes" 1>&6
15608   ol_link_threads=yes
15609 else
15610   echo "$ac_t""no" 1>&6
15611 fi
15612
15613                 LIBS="$save_LIBS"
15614
15615                 if test $ol_link_threads = yes ; then
15616                         LTHREAD_LIBS="-lthreads"
15617                         ol_link_threads=mach
15618                         ol_with_threads=found
15619                 else
15620                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15621                 fi
15622
15623         elif test $ol_with_threads = mach ; then
15624                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15625         fi
15626
15627         if test $ol_link_threads = mach ; then
15628                 cat >> confdefs.h <<\EOF
15629 #define HAVE_MACH_CTHREADS 1
15630 EOF
15631
15632         elif test $ol_with_threads = found ; then
15633                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15634         fi
15635 fi
15636
15637 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15638         -o $ol_with_threads = pth ; then
15639
15640         for ac_hdr in pth.h
15641 do
15642 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15643 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15644 echo "configure:15645: checking for $ac_hdr" >&5
15645 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15646   echo $ac_n "(cached) $ac_c" 1>&6
15647 else
15648   cat > conftest.$ac_ext <<EOF
15649 #line 15650 "configure"
15650 #include "confdefs.h"
15651 #include <$ac_hdr>
15652 EOF
15653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15654 { (eval echo configure:15655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15656 if test -z "$ac_err"; then
15657   rm -rf conftest*
15658   eval "ac_cv_header_$ac_safe=yes"
15659 else
15660   echo "$ac_err" >&5
15661   echo "configure: failed program was:" >&5
15662   cat conftest.$ac_ext >&5
15663   rm -rf conftest*
15664   eval "ac_cv_header_$ac_safe=no"
15665 fi
15666 rm -f conftest*
15667 fi
15668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15669   echo "$ac_t""yes" 1>&6
15670     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15671   cat >> confdefs.h <<EOF
15672 #define $ac_tr_hdr 1
15673 EOF
15674  
15675 else
15676   echo "$ac_t""no" 1>&6
15677 fi
15678 done
15679
15680
15681         if test $ac_cv_header_pth_h = yes ; then
15682                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15683 echo "configure:15684: checking for pth_version in -lpth" >&5
15684 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15685 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15686   echo $ac_n "(cached) $ac_c" 1>&6
15687 else
15688   ac_save_LIBS="$LIBS"
15689 LIBS="-lpth  $LIBS"
15690 cat > conftest.$ac_ext <<EOF
15691 #line 15692 "configure"
15692 #include "confdefs.h"
15693 /* Override any gcc2 internal prototype to avoid an error.  */
15694 /* We use char because int might match the return type of a gcc2
15695     builtin and then its argument prototype would still apply.  */
15696 char pth_version();
15697
15698 int main() {
15699 pth_version()
15700 ; return 0; }
15701 EOF
15702 if { (eval echo configure:15703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15703   rm -rf conftest*
15704   eval "ac_cv_lib_$ac_lib_var=yes"
15705 else
15706   echo "configure: failed program was:" >&5
15707   cat conftest.$ac_ext >&5
15708   rm -rf conftest*
15709   eval "ac_cv_lib_$ac_lib_var=no"
15710 fi
15711 rm -f conftest*
15712 LIBS="$ac_save_LIBS"
15713
15714 fi
15715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15716   echo "$ac_t""yes" 1>&6
15717   have_pth=yes
15718 else
15719   echo "$ac_t""no" 1>&6
15720 have_pth=no
15721 fi
15722
15723
15724                 if test $have_pth = yes ; then
15725                         cat >> confdefs.h <<\EOF
15726 #define HAVE_GNU_PTH 1
15727 EOF
15728
15729                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15730                         ol_link_threads=pth
15731                         ol_with_threads=found
15732
15733                         if test $ol_with_yielding_select = auto ; then
15734                                 ol_with_yielding_select=yes
15735                         fi
15736                 fi
15737         fi
15738 fi
15739
15740 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15741         -o $ol_with_threads = lwp ; then
15742
15743                 for ac_hdr in thread.h synch.h
15744 do
15745 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15746 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15747 echo "configure:15748: checking for $ac_hdr" >&5
15748 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15749   echo $ac_n "(cached) $ac_c" 1>&6
15750 else
15751   cat > conftest.$ac_ext <<EOF
15752 #line 15753 "configure"
15753 #include "confdefs.h"
15754 #include <$ac_hdr>
15755 EOF
15756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15757 { (eval echo configure:15758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15758 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15759 if test -z "$ac_err"; then
15760   rm -rf conftest*
15761   eval "ac_cv_header_$ac_safe=yes"
15762 else
15763   echo "$ac_err" >&5
15764   echo "configure: failed program was:" >&5
15765   cat conftest.$ac_ext >&5
15766   rm -rf conftest*
15767   eval "ac_cv_header_$ac_safe=no"
15768 fi
15769 rm -f conftest*
15770 fi
15771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15772   echo "$ac_t""yes" 1>&6
15773     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15774   cat >> confdefs.h <<EOF
15775 #define $ac_tr_hdr 1
15776 EOF
15777  
15778 else
15779   echo "$ac_t""no" 1>&6
15780 fi
15781 done
15782
15783         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15784                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15785 echo "configure:15786: checking for thr_create in -lthread" >&5
15786 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15787 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15788   echo $ac_n "(cached) $ac_c" 1>&6
15789 else
15790   ac_save_LIBS="$LIBS"
15791 LIBS="-lthread  $LIBS"
15792 cat > conftest.$ac_ext <<EOF
15793 #line 15794 "configure"
15794 #include "confdefs.h"
15795 /* Override any gcc2 internal prototype to avoid an error.  */
15796 /* We use char because int might match the return type of a gcc2
15797     builtin and then its argument prototype would still apply.  */
15798 char thr_create();
15799
15800 int main() {
15801 thr_create()
15802 ; return 0; }
15803 EOF
15804 if { (eval echo configure:15805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15805   rm -rf conftest*
15806   eval "ac_cv_lib_$ac_lib_var=yes"
15807 else
15808   echo "configure: failed program was:" >&5
15809   cat conftest.$ac_ext >&5
15810   rm -rf conftest*
15811   eval "ac_cv_lib_$ac_lib_var=no"
15812 fi
15813 rm -f conftest*
15814 LIBS="$ac_save_LIBS"
15815
15816 fi
15817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15818   echo "$ac_t""yes" 1>&6
15819   have_thr=yes
15820 else
15821   echo "$ac_t""no" 1>&6
15822 have_thr=no
15823 fi
15824
15825
15826                 if test $have_thr = yes ; then
15827                         cat >> confdefs.h <<\EOF
15828 #define HAVE_THR 1
15829 EOF
15830
15831                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15832                         ol_link_threads=thr
15833
15834                         if test $ol_with_yielding_select = auto ; then
15835                                 ol_with_yielding_select=yes
15836                         fi
15837
15838                                                 for ac_func in \
15839                                 thr_setconcurrency \
15840                                 thr_getconcurrency \
15841                         
15842 do
15843 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15844 echo "configure:15845: checking for $ac_func" >&5
15845 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15846   echo $ac_n "(cached) $ac_c" 1>&6
15847 else
15848   cat > conftest.$ac_ext <<EOF
15849 #line 15850 "configure"
15850 #include "confdefs.h"
15851 /* System header to define __stub macros and hopefully few prototypes,
15852     which can conflict with char $ac_func(); below.  */
15853 #include <assert.h>
15854 /* Override any gcc2 internal prototype to avoid an error.  */
15855 /* We use char because int might match the return type of a gcc2
15856     builtin and then its argument prototype would still apply.  */
15857 char $ac_func();
15858 char (*f)();
15859
15860 int main() {
15861
15862 /* The GNU C library defines this for functions which it implements
15863     to always fail with ENOSYS.  Some functions are actually named
15864     something starting with __ and the normal name is an alias.  */
15865 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15866 choke me
15867 #else
15868 f = $ac_func;
15869 #endif
15870
15871 ; return 0; }
15872 EOF
15873 if { (eval echo configure:15874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15874   rm -rf conftest*
15875   eval "ac_cv_func_$ac_func=yes"
15876 else
15877   echo "configure: failed program was:" >&5
15878   cat conftest.$ac_ext >&5
15879   rm -rf conftest*
15880   eval "ac_cv_func_$ac_func=no"
15881 fi
15882 rm -f conftest*
15883 fi
15884
15885 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15886   echo "$ac_t""yes" 1>&6
15887     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15888   cat >> confdefs.h <<EOF
15889 #define $ac_tr_func 1
15890 EOF
15891  
15892 else
15893   echo "$ac_t""no" 1>&6
15894 fi
15895 done
15896
15897                 fi
15898         fi
15899
15900                 for ac_hdr in lwp/lwp.h
15901 do
15902 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15903 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15904 echo "configure:15905: checking for $ac_hdr" >&5
15905 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15906   echo $ac_n "(cached) $ac_c" 1>&6
15907 else
15908   cat > conftest.$ac_ext <<EOF
15909 #line 15910 "configure"
15910 #include "confdefs.h"
15911 #include <$ac_hdr>
15912 EOF
15913 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15914 { (eval echo configure:15915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15915 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15916 if test -z "$ac_err"; then
15917   rm -rf conftest*
15918   eval "ac_cv_header_$ac_safe=yes"
15919 else
15920   echo "$ac_err" >&5
15921   echo "configure: failed program was:" >&5
15922   cat conftest.$ac_ext >&5
15923   rm -rf conftest*
15924   eval "ac_cv_header_$ac_safe=no"
15925 fi
15926 rm -f conftest*
15927 fi
15928 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15929   echo "$ac_t""yes" 1>&6
15930     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15931   cat >> confdefs.h <<EOF
15932 #define $ac_tr_hdr 1
15933 EOF
15934  
15935 else
15936   echo "$ac_t""no" 1>&6
15937 fi
15938 done
15939
15940         if test $ac_cv_header_lwp_lwp_h = yes ; then
15941                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15942 echo "configure:15943: checking for lwp_create in -llwp" >&5
15943 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15944 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15945   echo $ac_n "(cached) $ac_c" 1>&6
15946 else
15947   ac_save_LIBS="$LIBS"
15948 LIBS="-llwp  $LIBS"
15949 cat > conftest.$ac_ext <<EOF
15950 #line 15951 "configure"
15951 #include "confdefs.h"
15952 /* Override any gcc2 internal prototype to avoid an error.  */
15953 /* We use char because int might match the return type of a gcc2
15954     builtin and then its argument prototype would still apply.  */
15955 char lwp_create();
15956
15957 int main() {
15958 lwp_create()
15959 ; return 0; }
15960 EOF
15961 if { (eval echo configure:15962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15962   rm -rf conftest*
15963   eval "ac_cv_lib_$ac_lib_var=yes"
15964 else
15965   echo "configure: failed program was:" >&5
15966   cat conftest.$ac_ext >&5
15967   rm -rf conftest*
15968   eval "ac_cv_lib_$ac_lib_var=no"
15969 fi
15970 rm -f conftest*
15971 LIBS="$ac_save_LIBS"
15972
15973 fi
15974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15975   echo "$ac_t""yes" 1>&6
15976   have_lwp=yes
15977 else
15978   echo "$ac_t""no" 1>&6
15979 have_lwp=no
15980 fi
15981
15982
15983                 if test $have_lwp = yes ; then
15984                         cat >> confdefs.h <<\EOF
15985 #define HAVE_LWP 1
15986 EOF
15987
15988                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15989                         ol_link_threads=lwp
15990
15991                         if test $ol_with_yielding_select = auto ; then
15992                                 ol_with_yielding_select=no
15993                         fi
15994                 fi
15995         fi
15996 fi
15997
15998 if test $ol_with_yielding_select = yes ; then
15999         cat >> confdefs.h <<\EOF
16000 #define HAVE_YIELDING_SELECT 1
16001 EOF
16002
16003 fi
16004
16005 if test $ol_with_threads = manual ; then
16006                 ol_link_threads=yes
16007
16008         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16009
16010         for ac_hdr in pthread.h sched.h
16011 do
16012 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16013 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16014 echo "configure:16015: checking for $ac_hdr" >&5
16015 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16016   echo $ac_n "(cached) $ac_c" 1>&6
16017 else
16018   cat > conftest.$ac_ext <<EOF
16019 #line 16020 "configure"
16020 #include "confdefs.h"
16021 #include <$ac_hdr>
16022 EOF
16023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16024 { (eval echo configure:16025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16026 if test -z "$ac_err"; then
16027   rm -rf conftest*
16028   eval "ac_cv_header_$ac_safe=yes"
16029 else
16030   echo "$ac_err" >&5
16031   echo "configure: failed program was:" >&5
16032   cat conftest.$ac_ext >&5
16033   rm -rf conftest*
16034   eval "ac_cv_header_$ac_safe=no"
16035 fi
16036 rm -f conftest*
16037 fi
16038 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16039   echo "$ac_t""yes" 1>&6
16040     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16041   cat >> confdefs.h <<EOF
16042 #define $ac_tr_hdr 1
16043 EOF
16044  
16045 else
16046   echo "$ac_t""no" 1>&6
16047 fi
16048 done
16049
16050         for ac_func in sched_yield pthread_yield
16051 do
16052 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16053 echo "configure:16054: checking for $ac_func" >&5
16054 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16055   echo $ac_n "(cached) $ac_c" 1>&6
16056 else
16057   cat > conftest.$ac_ext <<EOF
16058 #line 16059 "configure"
16059 #include "confdefs.h"
16060 /* System header to define __stub macros and hopefully few prototypes,
16061     which can conflict with char $ac_func(); below.  */
16062 #include <assert.h>
16063 /* Override any gcc2 internal prototype to avoid an error.  */
16064 /* We use char because int might match the return type of a gcc2
16065     builtin and then its argument prototype would still apply.  */
16066 char $ac_func();
16067 char (*f)();
16068
16069 int main() {
16070
16071 /* The GNU C library defines this for functions which it implements
16072     to always fail with ENOSYS.  Some functions are actually named
16073     something starting with __ and the normal name is an alias.  */
16074 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16075 choke me
16076 #else
16077 f = $ac_func;
16078 #endif
16079
16080 ; return 0; }
16081 EOF
16082 if { (eval echo configure:16083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16083   rm -rf conftest*
16084   eval "ac_cv_func_$ac_func=yes"
16085 else
16086   echo "configure: failed program was:" >&5
16087   cat conftest.$ac_ext >&5
16088   rm -rf conftest*
16089   eval "ac_cv_func_$ac_func=no"
16090 fi
16091 rm -f conftest*
16092 fi
16093
16094 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16095   echo "$ac_t""yes" 1>&6
16096     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16097   cat >> confdefs.h <<EOF
16098 #define $ac_tr_func 1
16099 EOF
16100  
16101 else
16102   echo "$ac_t""no" 1>&6
16103 fi
16104 done
16105
16106         
16107         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16108 echo "configure:16109: checking for LinuxThreads pthread.h" >&5
16109 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16110   echo $ac_n "(cached) $ac_c" 1>&6
16111 else
16112   cat > conftest.$ac_ext <<EOF
16113 #line 16114 "configure"
16114 #include "confdefs.h"
16115 #include <pthread.h>
16116 EOF
16117 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16118   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16119   rm -rf conftest*
16120   ol_cv_header_linux_threads=yes
16121 else
16122   rm -rf conftest*
16123   ol_cv_header_linux_threads=no
16124 fi
16125 rm -f conftest*
16126
16127                 
16128 fi
16129
16130 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16131         if test $ol_cv_header_linux_threads = yes; then
16132                 cat >> confdefs.h <<\EOF
16133 #define HAVE_LINUX_THREADS 1
16134 EOF
16135
16136         fi
16137
16138
16139         for ac_hdr in mach/cthreads.h
16140 do
16141 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16142 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16143 echo "configure:16144: checking for $ac_hdr" >&5
16144 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16145   echo $ac_n "(cached) $ac_c" 1>&6
16146 else
16147   cat > conftest.$ac_ext <<EOF
16148 #line 16149 "configure"
16149 #include "confdefs.h"
16150 #include <$ac_hdr>
16151 EOF
16152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16153 { (eval echo configure:16154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16155 if test -z "$ac_err"; then
16156   rm -rf conftest*
16157   eval "ac_cv_header_$ac_safe=yes"
16158 else
16159   echo "$ac_err" >&5
16160   echo "configure: failed program was:" >&5
16161   cat conftest.$ac_ext >&5
16162   rm -rf conftest*
16163   eval "ac_cv_header_$ac_safe=no"
16164 fi
16165 rm -f conftest*
16166 fi
16167 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16168   echo "$ac_t""yes" 1>&6
16169     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16170   cat >> confdefs.h <<EOF
16171 #define $ac_tr_hdr 1
16172 EOF
16173  
16174 else
16175   echo "$ac_t""no" 1>&6
16176 fi
16177 done
16178
16179         for ac_hdr in lwp/lwp.h
16180 do
16181 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16182 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16183 echo "configure:16184: checking for $ac_hdr" >&5
16184 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16185   echo $ac_n "(cached) $ac_c" 1>&6
16186 else
16187   cat > conftest.$ac_ext <<EOF
16188 #line 16189 "configure"
16189 #include "confdefs.h"
16190 #include <$ac_hdr>
16191 EOF
16192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16193 { (eval echo configure:16194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16195 if test -z "$ac_err"; then
16196   rm -rf conftest*
16197   eval "ac_cv_header_$ac_safe=yes"
16198 else
16199   echo "$ac_err" >&5
16200   echo "configure: failed program was:" >&5
16201   cat conftest.$ac_ext >&5
16202   rm -rf conftest*
16203   eval "ac_cv_header_$ac_safe=no"
16204 fi
16205 rm -f conftest*
16206 fi
16207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16208   echo "$ac_t""yes" 1>&6
16209     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16210   cat >> confdefs.h <<EOF
16211 #define $ac_tr_hdr 1
16212 EOF
16213  
16214 else
16215   echo "$ac_t""no" 1>&6
16216 fi
16217 done
16218
16219         for ac_hdr in thread.h synch.h
16220 do
16221 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16222 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16223 echo "configure:16224: checking for $ac_hdr" >&5
16224 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16225   echo $ac_n "(cached) $ac_c" 1>&6
16226 else
16227   cat > conftest.$ac_ext <<EOF
16228 #line 16229 "configure"
16229 #include "confdefs.h"
16230 #include <$ac_hdr>
16231 EOF
16232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16233 { (eval echo configure:16234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16235 if test -z "$ac_err"; then
16236   rm -rf conftest*
16237   eval "ac_cv_header_$ac_safe=yes"
16238 else
16239   echo "$ac_err" >&5
16240   echo "configure: failed program was:" >&5
16241   cat conftest.$ac_ext >&5
16242   rm -rf conftest*
16243   eval "ac_cv_header_$ac_safe=no"
16244 fi
16245 rm -f conftest*
16246 fi
16247 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16248   echo "$ac_t""yes" 1>&6
16249     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16250   cat >> confdefs.h <<EOF
16251 #define $ac_tr_hdr 1
16252 EOF
16253  
16254 else
16255   echo "$ac_t""no" 1>&6
16256 fi
16257 done
16258
16259 fi
16260
16261 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16262                         cat >> confdefs.h <<\EOF
16263 #define REENTRANT 1
16264 EOF
16265
16266         cat >> confdefs.h <<\EOF
16267 #define _REENTRANT 1
16268 EOF
16269
16270         cat >> confdefs.h <<\EOF
16271 #define THREAD_SAFE 1
16272 EOF
16273
16274         cat >> confdefs.h <<\EOF
16275 #define _THREAD_SAFE 1
16276 EOF
16277
16278         cat >> confdefs.h <<\EOF
16279 #define THREADSAFE 1
16280 EOF
16281
16282         cat >> confdefs.h <<\EOF
16283 #define _THREADSAFE 1
16284 EOF
16285
16286         cat >> confdefs.h <<\EOF
16287 #define _SGI_MP_SOURCE 1
16288 EOF
16289
16290
16291                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16292 echo "configure:16293: checking for thread specific errno" >&5
16293 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16294   echo $ac_n "(cached) $ac_c" 1>&6
16295 else
16296   
16297                 cat > conftest.$ac_ext <<EOF
16298 #line 16299 "configure"
16299 #include "confdefs.h"
16300 #include <errno.h>
16301 int main() {
16302 errno = 0;
16303 ; return 0; }
16304 EOF
16305 if { (eval echo configure:16306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16306   rm -rf conftest*
16307   ol_cv_errno_thread_specific=yes
16308 else
16309   echo "configure: failed program was:" >&5
16310   cat conftest.$ac_ext >&5
16311   rm -rf conftest*
16312   ol_cv_errno_thread_specific=no
16313 fi
16314 rm -f conftest*
16315         
16316 fi
16317
16318 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16319
16320                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16321 echo "configure:16322: checking for thread specific h_errno" >&5
16322 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16323   echo $ac_n "(cached) $ac_c" 1>&6
16324 else
16325   
16326                 cat > conftest.$ac_ext <<EOF
16327 #line 16328 "configure"
16328 #include "confdefs.h"
16329 #include <netdb.h>
16330 int main() {
16331 h_errno = 0;
16332 ; return 0; }
16333 EOF
16334 if { (eval echo configure:16335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16335   rm -rf conftest*
16336   ol_cv_h_errno_thread_specific=yes
16337 else
16338   echo "configure: failed program was:" >&5
16339   cat conftest.$ac_ext >&5
16340   rm -rf conftest*
16341   ol_cv_h_errno_thread_specific=no
16342 fi
16343 rm -f conftest*
16344         
16345 fi
16346
16347 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16348
16349         if test $ol_cv_errno_thread_specific != yes \
16350                 -o $ol_cv_h_errno_thread_specific != yes ; then
16351                 LIBS="$LTHREAD_LIBS $LIBS"
16352                 LTHREAD_LIBS=""
16353         fi
16354
16355 fi  
16356
16357 if test $ol_link_threads = no ; then
16358         if test $ol_with_threads = yes ; then
16359                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16360         fi
16361
16362         if test $ol_with_threads = auto ; then
16363                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16364                 ol_with_threads=no
16365         fi
16366
16367         cat >> confdefs.h <<\EOF
16368 #define NO_THREADS 1
16369 EOF
16370
16371         LTHREAD_LIBS=""
16372 fi
16373
16374 if test $ol_link_threads != no ; then
16375         cat >> confdefs.h <<\EOF
16376 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16377 EOF
16378
16379 fi
16380
16381 for ac_func in \
16382         ctime_r                 \
16383         gethostbyname_r gethostbyaddr_r \
16384
16385 do
16386 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16387 echo "configure:16388: checking for $ac_func" >&5
16388 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16389   echo $ac_n "(cached) $ac_c" 1>&6
16390 else
16391   cat > conftest.$ac_ext <<EOF
16392 #line 16393 "configure"
16393 #include "confdefs.h"
16394 /* System header to define __stub macros and hopefully few prototypes,
16395     which can conflict with char $ac_func(); below.  */
16396 #include <assert.h>
16397 /* Override any gcc2 internal prototype to avoid an error.  */
16398 /* We use char because int might match the return type of a gcc2
16399     builtin and then its argument prototype would still apply.  */
16400 char $ac_func();
16401 char (*f)();
16402
16403 int main() {
16404
16405 /* The GNU C library defines this for functions which it implements
16406     to always fail with ENOSYS.  Some functions are actually named
16407     something starting with __ and the normal name is an alias.  */
16408 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16409 choke me
16410 #else
16411 f = $ac_func;
16412 #endif
16413
16414 ; return 0; }
16415 EOF
16416 if { (eval echo configure:16417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16417   rm -rf conftest*
16418   eval "ac_cv_func_$ac_func=yes"
16419 else
16420   echo "configure: failed program was:" >&5
16421   cat conftest.$ac_ext >&5
16422   rm -rf conftest*
16423   eval "ac_cv_func_$ac_func=no"
16424 fi
16425 rm -f conftest*
16426 fi
16427
16428 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16429   echo "$ac_t""yes" 1>&6
16430     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16431   cat >> confdefs.h <<EOF
16432 #define $ac_tr_func 1
16433 EOF
16434  
16435 else
16436   echo "$ac_t""no" 1>&6
16437 fi
16438 done
16439
16440
16441 if test "$ac_cv_func_ctime_r" = no ; then
16442         ol_cv_func_ctime_r_nargs=0
16443 else
16444         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16445 echo "configure:16446: checking number of arguments of ctime_r" >&5
16446 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16447   echo $ac_n "(cached) $ac_c" 1>&6
16448 else
16449   cat > conftest.$ac_ext <<EOF
16450 #line 16451 "configure"
16451 #include "confdefs.h"
16452 #include <time.h>
16453 int main() {
16454 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16455 ; return 0; }
16456 EOF
16457 if { (eval echo configure:16458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16458   rm -rf conftest*
16459   ol_cv_func_ctime_r_nargs3=yes
16460 else
16461   echo "configure: failed program was:" >&5
16462   cat conftest.$ac_ext >&5
16463   rm -rf conftest*
16464   ol_cv_func_ctime_r_nargs3=no
16465 fi
16466 rm -f conftest*
16467
16468         cat > conftest.$ac_ext <<EOF
16469 #line 16470 "configure"
16470 #include "confdefs.h"
16471 #include <time.h>
16472 int main() {
16473 time_t ti; char *buffer; ctime_r(&ti,buffer);
16474 ; return 0; }
16475 EOF
16476 if { (eval echo configure:16477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16477   rm -rf conftest*
16478   ol_cv_func_ctime_r_nargs2=yes
16479 else
16480   echo "configure: failed program was:" >&5
16481   cat conftest.$ac_ext >&5
16482   rm -rf conftest*
16483   ol_cv_func_ctime_r_nargs2=no
16484 fi
16485 rm -f conftest*
16486
16487         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16488                 $ol_cv_func_ctime_r_nargs2 = no ; then
16489
16490                 ol_cv_func_ctime_r_nargs=3
16491
16492         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16493                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16494
16495                 ol_cv_func_ctime_r_nargs=2
16496
16497         else
16498                 ol_cv_func_ctime_r_nargs=0
16499         fi
16500   
16501 fi
16502
16503 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16504
16505   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16506         cat >> confdefs.h <<EOF
16507 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16508 EOF
16509
16510   fi
16511
16512 fi
16513
16514 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16515         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16516 echo "configure:16517: checking number of arguments of gethostbyname_r" >&5
16517 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16518   echo $ac_n "(cached) $ac_c" 1>&6
16519 else
16520   cat > conftest.$ac_ext <<EOF
16521 #line 16522 "configure"
16522 #include "confdefs.h"
16523 #include <sys/types.h>
16524 #include <sys/socket.h>
16525 #include <netinet/in.h>
16526 #include <netdb.h>
16527 #define BUFSIZE (sizeof(struct hostent)+10)
16528 int main() {
16529 struct hostent hent; char buffer[BUFSIZE];
16530                 int bufsize=BUFSIZE;int h_errno;
16531                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16532                         buffer, bufsize, &h_errno);
16533 ; return 0; }
16534 EOF
16535 if { (eval echo configure:16536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16536   rm -rf conftest*
16537   ol_cv_func_gethostbyname_r_nargs5=yes
16538 else
16539   echo "configure: failed program was:" >&5
16540   cat conftest.$ac_ext >&5
16541   rm -rf conftest*
16542   ol_cv_func_gethostbyname_r_nargs5=no
16543 fi
16544 rm -f conftest*
16545
16546         cat > conftest.$ac_ext <<EOF
16547 #line 16548 "configure"
16548 #include "confdefs.h"
16549 #include <sys/types.h>
16550 #include <sys/socket.h>
16551 #include <netinet/in.h>
16552 #include <netdb.h>
16553 #define BUFSIZE (sizeof(struct hostent)+10)
16554 int main() {
16555 struct hostent hent;struct hostent *rhent;
16556                 char buffer[BUFSIZE];
16557                 int bufsize=BUFSIZE;int h_errno;
16558                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16559                         &rhent, &h_errno);
16560 ; return 0; }
16561 EOF
16562 if { (eval echo configure:16563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16563   rm -rf conftest*
16564   ol_cv_func_gethostbyname_r_nargs6=yes
16565 else
16566   echo "configure: failed program was:" >&5
16567   cat conftest.$ac_ext >&5
16568   rm -rf conftest*
16569   ol_cv_func_gethostbyname_r_nargs6=no
16570 fi
16571 rm -f conftest*
16572
16573         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16574                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16575
16576                 ol_cv_func_gethostbyname_r_nargs=5
16577
16578         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16579                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16580
16581                 ol_cv_func_gethostbyname_r_nargs=6
16582
16583         else
16584                 ol_cv_func_gethostbyname_r_nargs=0
16585         fi
16586   
16587 fi
16588
16589 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16590   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16591         cat >> confdefs.h <<EOF
16592 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16593 EOF
16594
16595   fi
16596
16597 else
16598         ol_cv_func_gethostbyname_r_nargs=0
16599 fi
16600  
16601 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16602         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16603 echo "configure:16604: checking number of arguments of gethostbyaddr_r" >&5
16604 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16605   echo $ac_n "(cached) $ac_c" 1>&6
16606 else
16607   cat > conftest.$ac_ext <<EOF
16608 #line 16609 "configure"
16609 #include "confdefs.h"
16610 #include <sys/types.h>
16611 #include <sys/socket.h>
16612 #include <netinet/in.h>
16613 #include <netdb.h>
16614 #define BUFSIZE (sizeof(struct hostent)+10)
16615 int main() {
16616 struct hostent hent; char buffer[BUFSIZE]; 
16617             struct in_addr add;
16618             size_t alen=sizeof(struct in_addr);
16619             int bufsize=BUFSIZE;int h_errno;
16620                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16621                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16622 ; return 0; }
16623 EOF
16624 if { (eval echo configure:16625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16625   rm -rf conftest*
16626   ol_cv_func_gethostbyaddr_r_nargs7=yes
16627 else
16628   echo "configure: failed program was:" >&5
16629   cat conftest.$ac_ext >&5
16630   rm -rf conftest*
16631   ol_cv_func_gethostbyaddr_r_nargs7=no
16632 fi
16633 rm -f conftest*
16634
16635         cat > conftest.$ac_ext <<EOF
16636 #line 16637 "configure"
16637 #include "confdefs.h"
16638 #include <sys/types.h>
16639 #include <sys/socket.h>
16640 #include <netinet/in.h>
16641 #include <netdb.h>
16642 #define BUFSIZE (sizeof(struct hostent)+10)
16643 int main() {
16644 struct hostent hent;
16645                 struct hostent *rhent; char buffer[BUFSIZE]; 
16646                 struct in_addr add;
16647                 size_t alen=sizeof(struct in_addr);
16648                 int bufsize=BUFSIZE;int h_errno;
16649                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16650                         alen, AF_INET, &hent, buffer, bufsize, 
16651                         &rhent, &h_errno);
16652 ; return 0; }
16653 EOF
16654 if { (eval echo configure:16655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16655   rm -rf conftest*
16656   ol_cv_func_gethostbyaddr_r_nargs8=yes
16657 else
16658   echo "configure: failed program was:" >&5
16659   cat conftest.$ac_ext >&5
16660   rm -rf conftest*
16661   ol_cv_func_gethostbyaddr_r_nargs8=no
16662 fi
16663 rm -f conftest*
16664
16665         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16666                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16667
16668                 ol_cv_func_gethostbyaddr_r_nargs=7
16669
16670         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16671                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16672
16673                 ol_cv_func_gethostbyaddr_r_nargs=8
16674
16675         else
16676                 ol_cv_func_gethostbyaddr_r_nargs=0
16677         fi
16678   
16679 fi
16680
16681 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16682   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16683     cat >> confdefs.h <<EOF
16684 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16685 EOF
16686
16687   fi
16688
16689 else
16690         ol_cv_func_gethostbyaddr_r_nargs=0
16691 fi
16692
16693 ol_link_ldbm=no 
16694
16695 if test $ol_with_ldbm_api = auto \
16696         -o $ol_with_ldbm_api = berkeley \
16697         -o $ol_with_ldbm_api = bcompat ; then
16698
16699         if test $ol_with_ldbm_api = bcompat; then \
16700                 for ac_hdr in db_185.h db.h
16701 do
16702 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16703 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16704 echo "configure:16705: checking for $ac_hdr" >&5
16705 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16706   echo $ac_n "(cached) $ac_c" 1>&6
16707 else
16708   cat > conftest.$ac_ext <<EOF
16709 #line 16710 "configure"
16710 #include "confdefs.h"
16711 #include <$ac_hdr>
16712 EOF
16713 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16714 { (eval echo configure:16715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16715 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16716 if test -z "$ac_err"; then
16717   rm -rf conftest*
16718   eval "ac_cv_header_$ac_safe=yes"
16719 else
16720   echo "$ac_err" >&5
16721   echo "configure: failed program was:" >&5
16722   cat conftest.$ac_ext >&5
16723   rm -rf conftest*
16724   eval "ac_cv_header_$ac_safe=no"
16725 fi
16726 rm -f conftest*
16727 fi
16728 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16729   echo "$ac_t""yes" 1>&6
16730     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16731   cat >> confdefs.h <<EOF
16732 #define $ac_tr_hdr 1
16733 EOF
16734  
16735 else
16736   echo "$ac_t""no" 1>&6
16737 fi
16738 done
16739
16740 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16741         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16742 echo "configure:16743: checking if Berkeley DB header compatibility" >&5
16743 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16744   echo $ac_n "(cached) $ac_c" 1>&6
16745 else
16746   
16747                 cat > conftest.$ac_ext <<EOF
16748 #line 16749 "configure"
16749 #include "confdefs.h"
16750
16751 #if HAVE_DB_185_H
16752 #       include <db_185.h>
16753 #else
16754 #       include <db.h>
16755 #endif
16756
16757  /* this check could be improved */
16758 #ifndef DB_VERSION_MAJOR
16759 #       define DB_VERSION_MAJOR 1
16760 #endif
16761
16762 #if DB_VERSION_MAJOR == 1 
16763         __db_version_1
16764 #endif
16765
16766 EOF
16767 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16768   egrep "__db_version_1" >/dev/null 2>&1; then
16769   rm -rf conftest*
16770   ol_cv_header_db1=yes
16771 else
16772   rm -rf conftest*
16773   ol_cv_header_db1=no
16774 fi
16775 rm -f conftest*
16776
16777 fi
16778
16779 echo "$ac_t""$ol_cv_header_db1" 1>&6
16780
16781         if test $ol_cv_header_db1 = yes ; then
16782                 ol_cv_lib_db=no
16783 if test $ol_cv_lib_db = no ; then
16784         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16785 echo "configure:16786: checking for Berkeley DB link (default)" >&5
16786 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16787   echo $ac_n "(cached) $ac_c" 1>&6
16788 else
16789   
16790         ol_DB_LIB=
16791         ol_LIBS=$LIBS
16792         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16793
16794         cat > conftest.$ac_ext <<EOF
16795 #line 16796 "configure"
16796 #include "confdefs.h"
16797
16798 #ifdef HAVE_DB_185_H
16799 # include <db_185.h>
16800 #else
16801 # include <db.h>
16802 #endif
16803
16804 #ifndef DB_VERSION_MAJOR
16805 # define DB_VERSION_MAJOR 1
16806 #endif
16807
16808 #ifndef NULL
16809 #define NULL ((void*)0)
16810 #endif
16811
16812 int main() {
16813
16814 #if DB_VERSION_MAJOR > 1
16815         {
16816                 char *version;
16817                 int major, minor, patch;
16818
16819                 version = db_version( &major, &minor, &patch );
16820
16821                 if( major != DB_VERSION_MAJOR ||
16822                         minor < DB_VERSION_MINOR )
16823                 {
16824                         printf("Berkeley DB version mismatch\n"
16825                                 "\texpected: %s\n\tgot: %s\n",
16826                                 DB_VERSION_STRING, version);
16827                         return 1;
16828                 }
16829         }
16830 #endif
16831
16832 #if DB_VERSION_MAJOR > 2
16833         db_env_create( NULL, 0 );
16834 #elif DB_VERSION_MAJOR > 1
16835         db_appexit( NULL );
16836 #else
16837         (void) dbopen( NULL, 0, 0, 0, NULL);
16838 #endif
16839
16840 ; return 0; }
16841 EOF
16842 if { (eval echo configure:16843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16843   rm -rf conftest*
16844   ol_cv_db_none=yes
16845 else
16846   echo "configure: failed program was:" >&5
16847   cat conftest.$ac_ext >&5
16848   rm -rf conftest*
16849   ol_cv_db_none=no
16850 fi
16851 rm -f conftest*
16852
16853         LIBS="$ol_LIBS"
16854
16855 fi
16856
16857 echo "$ac_t""$ol_cv_db_none" 1>&6
16858
16859         if test $ol_cv_db_none = yes ; then
16860                 ol_cv_lib_db=yes
16861         fi
16862 fi
16863
16864 if test $ol_cv_lib_db = no ; then
16865         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16866 echo "configure:16867: checking for Berkeley DB link (-ldb42)" >&5
16867 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16868   echo $ac_n "(cached) $ac_c" 1>&6
16869 else
16870   
16871         ol_DB_LIB=-ldb42
16872         ol_LIBS=$LIBS
16873         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16874
16875         cat > conftest.$ac_ext <<EOF
16876 #line 16877 "configure"
16877 #include "confdefs.h"
16878
16879 #ifdef HAVE_DB_185_H
16880 # include <db_185.h>
16881 #else
16882 # include <db.h>
16883 #endif
16884
16885 #ifndef DB_VERSION_MAJOR
16886 # define DB_VERSION_MAJOR 1
16887 #endif
16888
16889 #ifndef NULL
16890 #define NULL ((void*)0)
16891 #endif
16892
16893 int main() {
16894
16895 #if DB_VERSION_MAJOR > 1
16896         {
16897                 char *version;
16898                 int major, minor, patch;
16899
16900                 version = db_version( &major, &minor, &patch );
16901
16902                 if( major != DB_VERSION_MAJOR ||
16903                         minor < DB_VERSION_MINOR )
16904                 {
16905                         printf("Berkeley DB version mismatch\n"
16906                                 "\texpected: %s\n\tgot: %s\n",
16907                                 DB_VERSION_STRING, version);
16908                         return 1;
16909                 }
16910         }
16911 #endif
16912
16913 #if DB_VERSION_MAJOR > 2
16914         db_env_create( NULL, 0 );
16915 #elif DB_VERSION_MAJOR > 1
16916         db_appexit( NULL );
16917 #else
16918         (void) dbopen( NULL, 0, 0, 0, NULL);
16919 #endif
16920
16921 ; return 0; }
16922 EOF
16923 if { (eval echo configure:16924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16924   rm -rf conftest*
16925   ol_cv_db_db42=yes
16926 else
16927   echo "configure: failed program was:" >&5
16928   cat conftest.$ac_ext >&5
16929   rm -rf conftest*
16930   ol_cv_db_db42=no
16931 fi
16932 rm -f conftest*
16933
16934         LIBS="$ol_LIBS"
16935
16936 fi
16937
16938 echo "$ac_t""$ol_cv_db_db42" 1>&6
16939
16940         if test $ol_cv_db_db42 = yes ; then
16941                 ol_cv_lib_db=-ldb42
16942         fi
16943 fi
16944
16945 if test $ol_cv_lib_db = no ; then
16946         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16947 echo "configure:16948: checking for Berkeley DB link (-ldb-42)" >&5
16948 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16949   echo $ac_n "(cached) $ac_c" 1>&6
16950 else
16951   
16952         ol_DB_LIB=-ldb-42
16953         ol_LIBS=$LIBS
16954         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16955
16956         cat > conftest.$ac_ext <<EOF
16957 #line 16958 "configure"
16958 #include "confdefs.h"
16959
16960 #ifdef HAVE_DB_185_H
16961 # include <db_185.h>
16962 #else
16963 # include <db.h>
16964 #endif
16965
16966 #ifndef DB_VERSION_MAJOR
16967 # define DB_VERSION_MAJOR 1
16968 #endif
16969
16970 #ifndef NULL
16971 #define NULL ((void*)0)
16972 #endif
16973
16974 int main() {
16975
16976 #if DB_VERSION_MAJOR > 1
16977         {
16978                 char *version;
16979                 int major, minor, patch;
16980
16981                 version = db_version( &major, &minor, &patch );
16982
16983                 if( major != DB_VERSION_MAJOR ||
16984                         minor < DB_VERSION_MINOR )
16985                 {
16986                         printf("Berkeley DB version mismatch\n"
16987                                 "\texpected: %s\n\tgot: %s\n",
16988                                 DB_VERSION_STRING, version);
16989                         return 1;
16990                 }
16991         }
16992 #endif
16993
16994 #if DB_VERSION_MAJOR > 2
16995         db_env_create( NULL, 0 );
16996 #elif DB_VERSION_MAJOR > 1
16997         db_appexit( NULL );
16998 #else
16999         (void) dbopen( NULL, 0, 0, 0, NULL);
17000 #endif
17001
17002 ; return 0; }
17003 EOF
17004 if { (eval echo configure:17005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17005   rm -rf conftest*
17006   ol_cv_db_db_42=yes
17007 else
17008   echo "configure: failed program was:" >&5
17009   cat conftest.$ac_ext >&5
17010   rm -rf conftest*
17011   ol_cv_db_db_42=no
17012 fi
17013 rm -f conftest*
17014
17015         LIBS="$ol_LIBS"
17016
17017 fi
17018
17019 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17020
17021         if test $ol_cv_db_db_42 = yes ; then
17022                 ol_cv_lib_db=-ldb-42
17023         fi
17024 fi
17025
17026 if test $ol_cv_lib_db = no ; then
17027         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17028 echo "configure:17029: checking for Berkeley DB link (-ldb-4.2)" >&5
17029 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17030   echo $ac_n "(cached) $ac_c" 1>&6
17031 else
17032   
17033         ol_DB_LIB=-ldb-4.2
17034         ol_LIBS=$LIBS
17035         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17036
17037         cat > conftest.$ac_ext <<EOF
17038 #line 17039 "configure"
17039 #include "confdefs.h"
17040
17041 #ifdef HAVE_DB_185_H
17042 # include <db_185.h>
17043 #else
17044 # include <db.h>
17045 #endif
17046
17047 #ifndef DB_VERSION_MAJOR
17048 # define DB_VERSION_MAJOR 1
17049 #endif
17050
17051 #ifndef NULL
17052 #define NULL ((void*)0)
17053 #endif
17054
17055 int main() {
17056
17057 #if DB_VERSION_MAJOR > 1
17058         {
17059                 char *version;
17060                 int major, minor, patch;
17061
17062                 version = db_version( &major, &minor, &patch );
17063
17064                 if( major != DB_VERSION_MAJOR ||
17065                         minor < DB_VERSION_MINOR )
17066                 {
17067                         printf("Berkeley DB version mismatch\n"
17068                                 "\texpected: %s\n\tgot: %s\n",
17069                                 DB_VERSION_STRING, version);
17070                         return 1;
17071                 }
17072         }
17073 #endif
17074
17075 #if DB_VERSION_MAJOR > 2
17076         db_env_create( NULL, 0 );
17077 #elif DB_VERSION_MAJOR > 1
17078         db_appexit( NULL );
17079 #else
17080         (void) dbopen( NULL, 0, 0, 0, NULL);
17081 #endif
17082
17083 ; return 0; }
17084 EOF
17085 if { (eval echo configure:17086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17086   rm -rf conftest*
17087   ol_cv_db_db_4_dot_2=yes
17088 else
17089   echo "configure: failed program was:" >&5
17090   cat conftest.$ac_ext >&5
17091   rm -rf conftest*
17092   ol_cv_db_db_4_dot_2=no
17093 fi
17094 rm -f conftest*
17095
17096         LIBS="$ol_LIBS"
17097
17098 fi
17099
17100 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17101
17102         if test $ol_cv_db_db_4_dot_2 = yes ; then
17103                 ol_cv_lib_db=-ldb-4.2
17104         fi
17105 fi
17106
17107 if test $ol_cv_lib_db = no ; then
17108         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17109 echo "configure:17110: checking for Berkeley DB link (-ldb-4-2)" >&5
17110 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17111   echo $ac_n "(cached) $ac_c" 1>&6
17112 else
17113   
17114         ol_DB_LIB=-ldb-4-2
17115         ol_LIBS=$LIBS
17116         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17117
17118         cat > conftest.$ac_ext <<EOF
17119 #line 17120 "configure"
17120 #include "confdefs.h"
17121
17122 #ifdef HAVE_DB_185_H
17123 # include <db_185.h>
17124 #else
17125 # include <db.h>
17126 #endif
17127
17128 #ifndef DB_VERSION_MAJOR
17129 # define DB_VERSION_MAJOR 1
17130 #endif
17131
17132 #ifndef NULL
17133 #define NULL ((void*)0)
17134 #endif
17135
17136 int main() {
17137
17138 #if DB_VERSION_MAJOR > 1
17139         {
17140                 char *version;
17141                 int major, minor, patch;
17142
17143                 version = db_version( &major, &minor, &patch );
17144
17145                 if( major != DB_VERSION_MAJOR ||
17146                         minor < DB_VERSION_MINOR )
17147                 {
17148                         printf("Berkeley DB version mismatch\n"
17149                                 "\texpected: %s\n\tgot: %s\n",
17150                                 DB_VERSION_STRING, version);
17151                         return 1;
17152                 }
17153         }
17154 #endif
17155
17156 #if DB_VERSION_MAJOR > 2
17157         db_env_create( NULL, 0 );
17158 #elif DB_VERSION_MAJOR > 1
17159         db_appexit( NULL );
17160 #else
17161         (void) dbopen( NULL, 0, 0, 0, NULL);
17162 #endif
17163
17164 ; return 0; }
17165 EOF
17166 if { (eval echo configure:17167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17167   rm -rf conftest*
17168   ol_cv_db_db_4_2=yes
17169 else
17170   echo "configure: failed program was:" >&5
17171   cat conftest.$ac_ext >&5
17172   rm -rf conftest*
17173   ol_cv_db_db_4_2=no
17174 fi
17175 rm -f conftest*
17176
17177         LIBS="$ol_LIBS"
17178
17179 fi
17180
17181 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17182
17183         if test $ol_cv_db_db_4_2 = yes ; then
17184                 ol_cv_lib_db=-ldb-4-2
17185         fi
17186 fi
17187
17188 if test $ol_cv_lib_db = no ; then
17189         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17190 echo "configure:17191: checking for Berkeley DB link (-ldb-4)" >&5
17191 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17192   echo $ac_n "(cached) $ac_c" 1>&6
17193 else
17194   
17195         ol_DB_LIB=-ldb-4
17196         ol_LIBS=$LIBS
17197         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17198
17199         cat > conftest.$ac_ext <<EOF
17200 #line 17201 "configure"
17201 #include "confdefs.h"
17202
17203 #ifdef HAVE_DB_185_H
17204 # include <db_185.h>
17205 #else
17206 # include <db.h>
17207 #endif
17208
17209 #ifndef DB_VERSION_MAJOR
17210 # define DB_VERSION_MAJOR 1
17211 #endif
17212
17213 #ifndef NULL
17214 #define NULL ((void*)0)
17215 #endif
17216
17217 int main() {
17218
17219 #if DB_VERSION_MAJOR > 1
17220         {
17221                 char *version;
17222                 int major, minor, patch;
17223
17224                 version = db_version( &major, &minor, &patch );
17225
17226                 if( major != DB_VERSION_MAJOR ||
17227                         minor < DB_VERSION_MINOR )
17228                 {
17229                         printf("Berkeley DB version mismatch\n"
17230                                 "\texpected: %s\n\tgot: %s\n",
17231                                 DB_VERSION_STRING, version);
17232                         return 1;
17233                 }
17234         }
17235 #endif
17236
17237 #if DB_VERSION_MAJOR > 2
17238         db_env_create( NULL, 0 );
17239 #elif DB_VERSION_MAJOR > 1
17240         db_appexit( NULL );
17241 #else
17242         (void) dbopen( NULL, 0, 0, 0, NULL);
17243 #endif
17244
17245 ; return 0; }
17246 EOF
17247 if { (eval echo configure:17248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17248   rm -rf conftest*
17249   ol_cv_db_db_4=yes
17250 else
17251   echo "configure: failed program was:" >&5
17252   cat conftest.$ac_ext >&5
17253   rm -rf conftest*
17254   ol_cv_db_db_4=no
17255 fi
17256 rm -f conftest*
17257
17258         LIBS="$ol_LIBS"
17259
17260 fi
17261
17262 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17263
17264         if test $ol_cv_db_db_4 = yes ; then
17265                 ol_cv_lib_db=-ldb-4
17266         fi
17267 fi
17268
17269 if test $ol_cv_lib_db = no ; then
17270         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17271 echo "configure:17272: checking for Berkeley DB link (-ldb4)" >&5
17272 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17273   echo $ac_n "(cached) $ac_c" 1>&6
17274 else
17275   
17276         ol_DB_LIB=-ldb4
17277         ol_LIBS=$LIBS
17278         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17279
17280         cat > conftest.$ac_ext <<EOF
17281 #line 17282 "configure"
17282 #include "confdefs.h"
17283
17284 #ifdef HAVE_DB_185_H
17285 # include <db_185.h>
17286 #else
17287 # include <db.h>
17288 #endif
17289
17290 #ifndef DB_VERSION_MAJOR
17291 # define DB_VERSION_MAJOR 1
17292 #endif
17293
17294 #ifndef NULL
17295 #define NULL ((void*)0)
17296 #endif
17297
17298 int main() {
17299
17300 #if DB_VERSION_MAJOR > 1
17301         {
17302                 char *version;
17303                 int major, minor, patch;
17304
17305                 version = db_version( &major, &minor, &patch );
17306
17307                 if( major != DB_VERSION_MAJOR ||
17308                         minor < DB_VERSION_MINOR )
17309                 {
17310                         printf("Berkeley DB version mismatch\n"
17311                                 "\texpected: %s\n\tgot: %s\n",
17312                                 DB_VERSION_STRING, version);
17313                         return 1;
17314                 }
17315         }
17316 #endif
17317
17318 #if DB_VERSION_MAJOR > 2
17319         db_env_create( NULL, 0 );
17320 #elif DB_VERSION_MAJOR > 1
17321         db_appexit( NULL );
17322 #else
17323         (void) dbopen( NULL, 0, 0, 0, NULL);
17324 #endif
17325
17326 ; return 0; }
17327 EOF
17328 if { (eval echo configure:17329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17329   rm -rf conftest*
17330   ol_cv_db_db4=yes
17331 else
17332   echo "configure: failed program was:" >&5
17333   cat conftest.$ac_ext >&5
17334   rm -rf conftest*
17335   ol_cv_db_db4=no
17336 fi
17337 rm -f conftest*
17338
17339         LIBS="$ol_LIBS"
17340
17341 fi
17342
17343 echo "$ac_t""$ol_cv_db_db4" 1>&6
17344
17345         if test $ol_cv_db_db4 = yes ; then
17346                 ol_cv_lib_db=-ldb4
17347         fi
17348 fi
17349
17350 if test $ol_cv_lib_db = no ; then
17351         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17352 echo "configure:17353: checking for Berkeley DB link (-ldb)" >&5
17353 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17354   echo $ac_n "(cached) $ac_c" 1>&6
17355 else
17356   
17357         ol_DB_LIB=-ldb
17358         ol_LIBS=$LIBS
17359         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17360
17361         cat > conftest.$ac_ext <<EOF
17362 #line 17363 "configure"
17363 #include "confdefs.h"
17364
17365 #ifdef HAVE_DB_185_H
17366 # include <db_185.h>
17367 #else
17368 # include <db.h>
17369 #endif
17370
17371 #ifndef DB_VERSION_MAJOR
17372 # define DB_VERSION_MAJOR 1
17373 #endif
17374
17375 #ifndef NULL
17376 #define NULL ((void*)0)
17377 #endif
17378
17379 int main() {
17380
17381 #if DB_VERSION_MAJOR > 1
17382         {
17383                 char *version;
17384                 int major, minor, patch;
17385
17386                 version = db_version( &major, &minor, &patch );
17387
17388                 if( major != DB_VERSION_MAJOR ||
17389                         minor < DB_VERSION_MINOR )
17390                 {
17391                         printf("Berkeley DB version mismatch\n"
17392                                 "\texpected: %s\n\tgot: %s\n",
17393                                 DB_VERSION_STRING, version);
17394                         return 1;
17395                 }
17396         }
17397 #endif
17398
17399 #if DB_VERSION_MAJOR > 2
17400         db_env_create( NULL, 0 );
17401 #elif DB_VERSION_MAJOR > 1
17402         db_appexit( NULL );
17403 #else
17404         (void) dbopen( NULL, 0, 0, 0, NULL);
17405 #endif
17406
17407 ; return 0; }
17408 EOF
17409 if { (eval echo configure:17410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17410   rm -rf conftest*
17411   ol_cv_db_db=yes
17412 else
17413   echo "configure: failed program was:" >&5
17414   cat conftest.$ac_ext >&5
17415   rm -rf conftest*
17416   ol_cv_db_db=no
17417 fi
17418 rm -f conftest*
17419
17420         LIBS="$ol_LIBS"
17421
17422 fi
17423
17424 echo "$ac_t""$ol_cv_db_db" 1>&6
17425
17426         if test $ol_cv_db_db = yes ; then
17427                 ol_cv_lib_db=-ldb
17428         fi
17429 fi
17430
17431 if test $ol_cv_lib_db = no ; then
17432         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17433 echo "configure:17434: checking for Berkeley DB link (-ldb41)" >&5
17434 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17435   echo $ac_n "(cached) $ac_c" 1>&6
17436 else
17437   
17438         ol_DB_LIB=-ldb41
17439         ol_LIBS=$LIBS
17440         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17441
17442         cat > conftest.$ac_ext <<EOF
17443 #line 17444 "configure"
17444 #include "confdefs.h"
17445
17446 #ifdef HAVE_DB_185_H
17447 # include <db_185.h>
17448 #else
17449 # include <db.h>
17450 #endif
17451
17452 #ifndef DB_VERSION_MAJOR
17453 # define DB_VERSION_MAJOR 1
17454 #endif
17455
17456 #ifndef NULL
17457 #define NULL ((void*)0)
17458 #endif
17459
17460 int main() {
17461
17462 #if DB_VERSION_MAJOR > 1
17463         {
17464                 char *version;
17465                 int major, minor, patch;
17466
17467                 version = db_version( &major, &minor, &patch );
17468
17469                 if( major != DB_VERSION_MAJOR ||
17470                         minor < DB_VERSION_MINOR )
17471                 {
17472                         printf("Berkeley DB version mismatch\n"
17473                                 "\texpected: %s\n\tgot: %s\n",
17474                                 DB_VERSION_STRING, version);
17475                         return 1;
17476                 }
17477         }
17478 #endif
17479
17480 #if DB_VERSION_MAJOR > 2
17481         db_env_create( NULL, 0 );
17482 #elif DB_VERSION_MAJOR > 1
17483         db_appexit( NULL );
17484 #else
17485         (void) dbopen( NULL, 0, 0, 0, NULL);
17486 #endif
17487
17488 ; return 0; }
17489 EOF
17490 if { (eval echo configure:17491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17491   rm -rf conftest*
17492   ol_cv_db_db41=yes
17493 else
17494   echo "configure: failed program was:" >&5
17495   cat conftest.$ac_ext >&5
17496   rm -rf conftest*
17497   ol_cv_db_db41=no
17498 fi
17499 rm -f conftest*
17500
17501         LIBS="$ol_LIBS"
17502
17503 fi
17504
17505 echo "$ac_t""$ol_cv_db_db41" 1>&6
17506
17507         if test $ol_cv_db_db41 = yes ; then
17508                 ol_cv_lib_db=-ldb41
17509         fi
17510 fi
17511
17512 if test $ol_cv_lib_db = no ; then
17513         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17514 echo "configure:17515: checking for Berkeley DB link (-ldb-41)" >&5
17515 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17516   echo $ac_n "(cached) $ac_c" 1>&6
17517 else
17518   
17519         ol_DB_LIB=-ldb-41
17520         ol_LIBS=$LIBS
17521         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17522
17523         cat > conftest.$ac_ext <<EOF
17524 #line 17525 "configure"
17525 #include "confdefs.h"
17526
17527 #ifdef HAVE_DB_185_H
17528 # include <db_185.h>
17529 #else
17530 # include <db.h>
17531 #endif
17532
17533 #ifndef DB_VERSION_MAJOR
17534 # define DB_VERSION_MAJOR 1
17535 #endif
17536
17537 #ifndef NULL
17538 #define NULL ((void*)0)
17539 #endif
17540
17541 int main() {
17542
17543 #if DB_VERSION_MAJOR > 1
17544         {
17545                 char *version;
17546                 int major, minor, patch;
17547
17548                 version = db_version( &major, &minor, &patch );
17549
17550                 if( major != DB_VERSION_MAJOR ||
17551                         minor < DB_VERSION_MINOR )
17552                 {
17553                         printf("Berkeley DB version mismatch\n"
17554                                 "\texpected: %s\n\tgot: %s\n",
17555                                 DB_VERSION_STRING, version);
17556                         return 1;
17557                 }
17558         }
17559 #endif
17560
17561 #if DB_VERSION_MAJOR > 2
17562         db_env_create( NULL, 0 );
17563 #elif DB_VERSION_MAJOR > 1
17564         db_appexit( NULL );
17565 #else
17566         (void) dbopen( NULL, 0, 0, 0, NULL);
17567 #endif
17568
17569 ; return 0; }
17570 EOF
17571 if { (eval echo configure:17572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17572   rm -rf conftest*
17573   ol_cv_db_db_41=yes
17574 else
17575   echo "configure: failed program was:" >&5
17576   cat conftest.$ac_ext >&5
17577   rm -rf conftest*
17578   ol_cv_db_db_41=no
17579 fi
17580 rm -f conftest*
17581
17582         LIBS="$ol_LIBS"
17583
17584 fi
17585
17586 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17587
17588         if test $ol_cv_db_db_41 = yes ; then
17589                 ol_cv_lib_db=-ldb-41
17590         fi
17591 fi
17592
17593 if test $ol_cv_lib_db = no ; then
17594         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17595 echo "configure:17596: checking for Berkeley DB link (-ldb-4.1)" >&5
17596 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17597   echo $ac_n "(cached) $ac_c" 1>&6
17598 else
17599   
17600         ol_DB_LIB=-ldb-4.1
17601         ol_LIBS=$LIBS
17602         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17603
17604         cat > conftest.$ac_ext <<EOF
17605 #line 17606 "configure"
17606 #include "confdefs.h"
17607
17608 #ifdef HAVE_DB_185_H
17609 # include <db_185.h>
17610 #else
17611 # include <db.h>
17612 #endif
17613
17614 #ifndef DB_VERSION_MAJOR
17615 # define DB_VERSION_MAJOR 1
17616 #endif
17617
17618 #ifndef NULL
17619 #define NULL ((void*)0)
17620 #endif
17621
17622 int main() {
17623
17624 #if DB_VERSION_MAJOR > 1
17625         {
17626                 char *version;
17627                 int major, minor, patch;
17628
17629                 version = db_version( &major, &minor, &patch );
17630
17631                 if( major != DB_VERSION_MAJOR ||
17632                         minor < DB_VERSION_MINOR )
17633                 {
17634                         printf("Berkeley DB version mismatch\n"
17635                                 "\texpected: %s\n\tgot: %s\n",
17636                                 DB_VERSION_STRING, version);
17637                         return 1;
17638                 }
17639         }
17640 #endif
17641
17642 #if DB_VERSION_MAJOR > 2
17643         db_env_create( NULL, 0 );
17644 #elif DB_VERSION_MAJOR > 1
17645         db_appexit( NULL );
17646 #else
17647         (void) dbopen( NULL, 0, 0, 0, NULL);
17648 #endif
17649
17650 ; return 0; }
17651 EOF
17652 if { (eval echo configure:17653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17653   rm -rf conftest*
17654   ol_cv_db_db_4_dot_1=yes
17655 else
17656   echo "configure: failed program was:" >&5
17657   cat conftest.$ac_ext >&5
17658   rm -rf conftest*
17659   ol_cv_db_db_4_dot_1=no
17660 fi
17661 rm -f conftest*
17662
17663         LIBS="$ol_LIBS"
17664
17665 fi
17666
17667 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17668
17669         if test $ol_cv_db_db_4_dot_1 = yes ; then
17670                 ol_cv_lib_db=-ldb-4.1
17671         fi
17672 fi
17673
17674 if test $ol_cv_lib_db = no ; then
17675         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17676 echo "configure:17677: checking for Berkeley DB link (-ldb-4-1)" >&5
17677 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17678   echo $ac_n "(cached) $ac_c" 1>&6
17679 else
17680   
17681         ol_DB_LIB=-ldb-4-1
17682         ol_LIBS=$LIBS
17683         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17684
17685         cat > conftest.$ac_ext <<EOF
17686 #line 17687 "configure"
17687 #include "confdefs.h"
17688
17689 #ifdef HAVE_DB_185_H
17690 # include <db_185.h>
17691 #else
17692 # include <db.h>
17693 #endif
17694
17695 #ifndef DB_VERSION_MAJOR
17696 # define DB_VERSION_MAJOR 1
17697 #endif
17698
17699 #ifndef NULL
17700 #define NULL ((void*)0)
17701 #endif
17702
17703 int main() {
17704
17705 #if DB_VERSION_MAJOR > 1
17706         {
17707                 char *version;
17708                 int major, minor, patch;
17709
17710                 version = db_version( &major, &minor, &patch );
17711
17712                 if( major != DB_VERSION_MAJOR ||
17713                         minor < DB_VERSION_MINOR )
17714                 {
17715                         printf("Berkeley DB version mismatch\n"
17716                                 "\texpected: %s\n\tgot: %s\n",
17717                                 DB_VERSION_STRING, version);
17718                         return 1;
17719                 }
17720         }
17721 #endif
17722
17723 #if DB_VERSION_MAJOR > 2
17724         db_env_create( NULL, 0 );
17725 #elif DB_VERSION_MAJOR > 1
17726         db_appexit( NULL );
17727 #else
17728         (void) dbopen( NULL, 0, 0, 0, NULL);
17729 #endif
17730
17731 ; return 0; }
17732 EOF
17733 if { (eval echo configure:17734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17734   rm -rf conftest*
17735   ol_cv_db_db_4_1=yes
17736 else
17737   echo "configure: failed program was:" >&5
17738   cat conftest.$ac_ext >&5
17739   rm -rf conftest*
17740   ol_cv_db_db_4_1=no
17741 fi
17742 rm -f conftest*
17743
17744         LIBS="$ol_LIBS"
17745
17746 fi
17747
17748 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17749
17750         if test $ol_cv_db_db_4_1 = yes ; then
17751                 ol_cv_lib_db=-ldb-4-1
17752         fi
17753 fi
17754
17755 if test $ol_cv_lib_db = no ; then
17756         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17757 echo "configure:17758: checking for Berkeley DB link (-ldb3)" >&5
17758 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17759   echo $ac_n "(cached) $ac_c" 1>&6
17760 else
17761   
17762         ol_DB_LIB=-ldb3
17763         ol_LIBS=$LIBS
17764         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17765
17766         cat > conftest.$ac_ext <<EOF
17767 #line 17768 "configure"
17768 #include "confdefs.h"
17769
17770 #ifdef HAVE_DB_185_H
17771 # include <db_185.h>
17772 #else
17773 # include <db.h>
17774 #endif
17775
17776 #ifndef DB_VERSION_MAJOR
17777 # define DB_VERSION_MAJOR 1
17778 #endif
17779
17780 #ifndef NULL
17781 #define NULL ((void*)0)
17782 #endif
17783
17784 int main() {
17785
17786 #if DB_VERSION_MAJOR > 1
17787         {
17788                 char *version;
17789                 int major, minor, patch;
17790
17791                 version = db_version( &major, &minor, &patch );
17792
17793                 if( major != DB_VERSION_MAJOR ||
17794                         minor < DB_VERSION_MINOR )
17795                 {
17796                         printf("Berkeley DB version mismatch\n"
17797                                 "\texpected: %s\n\tgot: %s\n",
17798                                 DB_VERSION_STRING, version);
17799                         return 1;
17800                 }
17801         }
17802 #endif
17803
17804 #if DB_VERSION_MAJOR > 2
17805         db_env_create( NULL, 0 );
17806 #elif DB_VERSION_MAJOR > 1
17807         db_appexit( NULL );
17808 #else
17809         (void) dbopen( NULL, 0, 0, 0, NULL);
17810 #endif
17811
17812 ; return 0; }
17813 EOF
17814 if { (eval echo configure:17815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17815   rm -rf conftest*
17816   ol_cv_db_db3=yes
17817 else
17818   echo "configure: failed program was:" >&5
17819   cat conftest.$ac_ext >&5
17820   rm -rf conftest*
17821   ol_cv_db_db3=no
17822 fi
17823 rm -f conftest*
17824
17825         LIBS="$ol_LIBS"
17826
17827 fi
17828
17829 echo "$ac_t""$ol_cv_db_db3" 1>&6
17830
17831         if test $ol_cv_db_db3 = yes ; then
17832                 ol_cv_lib_db=-ldb3
17833         fi
17834 fi
17835
17836 if test $ol_cv_lib_db = no ; then
17837         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17838 echo "configure:17839: checking for Berkeley DB link (-ldb-3)" >&5
17839 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17840   echo $ac_n "(cached) $ac_c" 1>&6
17841 else
17842   
17843         ol_DB_LIB=-ldb-3
17844         ol_LIBS=$LIBS
17845         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17846
17847         cat > conftest.$ac_ext <<EOF
17848 #line 17849 "configure"
17849 #include "confdefs.h"
17850
17851 #ifdef HAVE_DB_185_H
17852 # include <db_185.h>
17853 #else
17854 # include <db.h>
17855 #endif
17856
17857 #ifndef DB_VERSION_MAJOR
17858 # define DB_VERSION_MAJOR 1
17859 #endif
17860
17861 #ifndef NULL
17862 #define NULL ((void*)0)
17863 #endif
17864
17865 int main() {
17866
17867 #if DB_VERSION_MAJOR > 1
17868         {
17869                 char *version;
17870                 int major, minor, patch;
17871
17872                 version = db_version( &major, &minor, &patch );
17873
17874                 if( major != DB_VERSION_MAJOR ||
17875                         minor < DB_VERSION_MINOR )
17876                 {
17877                         printf("Berkeley DB version mismatch\n"
17878                                 "\texpected: %s\n\tgot: %s\n",
17879                                 DB_VERSION_STRING, version);
17880                         return 1;
17881                 }
17882         }
17883 #endif
17884
17885 #if DB_VERSION_MAJOR > 2
17886         db_env_create( NULL, 0 );
17887 #elif DB_VERSION_MAJOR > 1
17888         db_appexit( NULL );
17889 #else
17890         (void) dbopen( NULL, 0, 0, 0, NULL);
17891 #endif
17892
17893 ; return 0; }
17894 EOF
17895 if { (eval echo configure:17896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17896   rm -rf conftest*
17897   ol_cv_db_db_3=yes
17898 else
17899   echo "configure: failed program was:" >&5
17900   cat conftest.$ac_ext >&5
17901   rm -rf conftest*
17902   ol_cv_db_db_3=no
17903 fi
17904 rm -f conftest*
17905
17906         LIBS="$ol_LIBS"
17907
17908 fi
17909
17910 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17911
17912         if test $ol_cv_db_db_3 = yes ; then
17913                 ol_cv_lib_db=-ldb-3
17914         fi
17915 fi
17916
17917 if test $ol_cv_lib_db = no ; then
17918         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17919 echo "configure:17920: checking for Berkeley DB link (-ldb2)" >&5
17920 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17921   echo $ac_n "(cached) $ac_c" 1>&6
17922 else
17923   
17924         ol_DB_LIB=-ldb2
17925         ol_LIBS=$LIBS
17926         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17927
17928         cat > conftest.$ac_ext <<EOF
17929 #line 17930 "configure"
17930 #include "confdefs.h"
17931
17932 #ifdef HAVE_DB_185_H
17933 # include <db_185.h>
17934 #else
17935 # include <db.h>
17936 #endif
17937
17938 #ifndef DB_VERSION_MAJOR
17939 # define DB_VERSION_MAJOR 1
17940 #endif
17941
17942 #ifndef NULL
17943 #define NULL ((void*)0)
17944 #endif
17945
17946 int main() {
17947
17948 #if DB_VERSION_MAJOR > 1
17949         {
17950                 char *version;
17951                 int major, minor, patch;
17952
17953                 version = db_version( &major, &minor, &patch );
17954
17955                 if( major != DB_VERSION_MAJOR ||
17956                         minor < DB_VERSION_MINOR )
17957                 {
17958                         printf("Berkeley DB version mismatch\n"
17959                                 "\texpected: %s\n\tgot: %s\n",
17960                                 DB_VERSION_STRING, version);
17961                         return 1;
17962                 }
17963         }
17964 #endif
17965
17966 #if DB_VERSION_MAJOR > 2
17967         db_env_create( NULL, 0 );
17968 #elif DB_VERSION_MAJOR > 1
17969         db_appexit( NULL );
17970 #else
17971         (void) dbopen( NULL, 0, 0, 0, NULL);
17972 #endif
17973
17974 ; return 0; }
17975 EOF
17976 if { (eval echo configure:17977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17977   rm -rf conftest*
17978   ol_cv_db_db2=yes
17979 else
17980   echo "configure: failed program was:" >&5
17981   cat conftest.$ac_ext >&5
17982   rm -rf conftest*
17983   ol_cv_db_db2=no
17984 fi
17985 rm -f conftest*
17986
17987         LIBS="$ol_LIBS"
17988
17989 fi
17990
17991 echo "$ac_t""$ol_cv_db_db2" 1>&6
17992
17993         if test $ol_cv_db_db2 = yes ; then
17994                 ol_cv_lib_db=-ldb2
17995         fi
17996 fi
17997
17998 if test $ol_cv_lib_db = no ; then
17999         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18000 echo "configure:18001: checking for Berkeley DB link (-ldb-2)" >&5
18001 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18002   echo $ac_n "(cached) $ac_c" 1>&6
18003 else
18004   
18005         ol_DB_LIB=-ldb-2
18006         ol_LIBS=$LIBS
18007         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18008
18009         cat > conftest.$ac_ext <<EOF
18010 #line 18011 "configure"
18011 #include "confdefs.h"
18012
18013 #ifdef HAVE_DB_185_H
18014 # include <db_185.h>
18015 #else
18016 # include <db.h>
18017 #endif
18018
18019 #ifndef DB_VERSION_MAJOR
18020 # define DB_VERSION_MAJOR 1
18021 #endif
18022
18023 #ifndef NULL
18024 #define NULL ((void*)0)
18025 #endif
18026
18027 int main() {
18028
18029 #if DB_VERSION_MAJOR > 1
18030         {
18031                 char *version;
18032                 int major, minor, patch;
18033
18034                 version = db_version( &major, &minor, &patch );
18035
18036                 if( major != DB_VERSION_MAJOR ||
18037                         minor < DB_VERSION_MINOR )
18038                 {
18039                         printf("Berkeley DB version mismatch\n"
18040                                 "\texpected: %s\n\tgot: %s\n",
18041                                 DB_VERSION_STRING, version);
18042                         return 1;
18043                 }
18044         }
18045 #endif
18046
18047 #if DB_VERSION_MAJOR > 2
18048         db_env_create( NULL, 0 );
18049 #elif DB_VERSION_MAJOR > 1
18050         db_appexit( NULL );
18051 #else
18052         (void) dbopen( NULL, 0, 0, 0, NULL);
18053 #endif
18054
18055 ; return 0; }
18056 EOF
18057 if { (eval echo configure:18058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18058   rm -rf conftest*
18059   ol_cv_db_db_2=yes
18060 else
18061   echo "configure: failed program was:" >&5
18062   cat conftest.$ac_ext >&5
18063   rm -rf conftest*
18064   ol_cv_db_db_2=no
18065 fi
18066 rm -f conftest*
18067
18068         LIBS="$ol_LIBS"
18069
18070 fi
18071
18072 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18073
18074         if test $ol_cv_db_db_2 = yes ; then
18075                 ol_cv_lib_db=-ldb-2
18076         fi
18077 fi
18078
18079 if test $ol_cv_lib_db = no ; then
18080         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18081 echo "configure:18082: checking for Berkeley DB link (-ldb1)" >&5
18082 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18083   echo $ac_n "(cached) $ac_c" 1>&6
18084 else
18085   
18086         ol_DB_LIB=-ldb1
18087         ol_LIBS=$LIBS
18088         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18089
18090         cat > conftest.$ac_ext <<EOF
18091 #line 18092 "configure"
18092 #include "confdefs.h"
18093
18094 #ifdef HAVE_DB_185_H
18095 # include <db_185.h>
18096 #else
18097 # include <db.h>
18098 #endif
18099
18100 #ifndef DB_VERSION_MAJOR
18101 # define DB_VERSION_MAJOR 1
18102 #endif
18103
18104 #ifndef NULL
18105 #define NULL ((void*)0)
18106 #endif
18107
18108 int main() {
18109
18110 #if DB_VERSION_MAJOR > 1
18111         {
18112                 char *version;
18113                 int major, minor, patch;
18114
18115                 version = db_version( &major, &minor, &patch );
18116
18117                 if( major != DB_VERSION_MAJOR ||
18118                         minor < DB_VERSION_MINOR )
18119                 {
18120                         printf("Berkeley DB version mismatch\n"
18121                                 "\texpected: %s\n\tgot: %s\n",
18122                                 DB_VERSION_STRING, version);
18123                         return 1;
18124                 }
18125         }
18126 #endif
18127
18128 #if DB_VERSION_MAJOR > 2
18129         db_env_create( NULL, 0 );
18130 #elif DB_VERSION_MAJOR > 1
18131         db_appexit( NULL );
18132 #else
18133         (void) dbopen( NULL, 0, 0, 0, NULL);
18134 #endif
18135
18136 ; return 0; }
18137 EOF
18138 if { (eval echo configure:18139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18139   rm -rf conftest*
18140   ol_cv_db_db1=yes
18141 else
18142   echo "configure: failed program was:" >&5
18143   cat conftest.$ac_ext >&5
18144   rm -rf conftest*
18145   ol_cv_db_db1=no
18146 fi
18147 rm -f conftest*
18148
18149         LIBS="$ol_LIBS"
18150
18151 fi
18152
18153 echo "$ac_t""$ol_cv_db_db1" 1>&6
18154
18155         if test $ol_cv_db_db1 = yes ; then
18156                 ol_cv_lib_db=-ldb1
18157         fi
18158 fi
18159
18160 if test $ol_cv_lib_db = no ; then
18161         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18162 echo "configure:18163: checking for Berkeley DB link (-ldb-1)" >&5
18163 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18164   echo $ac_n "(cached) $ac_c" 1>&6
18165 else
18166   
18167         ol_DB_LIB=-ldb-1
18168         ol_LIBS=$LIBS
18169         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18170
18171         cat > conftest.$ac_ext <<EOF
18172 #line 18173 "configure"
18173 #include "confdefs.h"
18174
18175 #ifdef HAVE_DB_185_H
18176 # include <db_185.h>
18177 #else
18178 # include <db.h>
18179 #endif
18180
18181 #ifndef DB_VERSION_MAJOR
18182 # define DB_VERSION_MAJOR 1
18183 #endif
18184
18185 #ifndef NULL
18186 #define NULL ((void*)0)
18187 #endif
18188
18189 int main() {
18190
18191 #if DB_VERSION_MAJOR > 1
18192         {
18193                 char *version;
18194                 int major, minor, patch;
18195
18196                 version = db_version( &major, &minor, &patch );
18197
18198                 if( major != DB_VERSION_MAJOR ||
18199                         minor < DB_VERSION_MINOR )
18200                 {
18201                         printf("Berkeley DB version mismatch\n"
18202                                 "\texpected: %s\n\tgot: %s\n",
18203                                 DB_VERSION_STRING, version);
18204                         return 1;
18205                 }
18206         }
18207 #endif
18208
18209 #if DB_VERSION_MAJOR > 2
18210         db_env_create( NULL, 0 );
18211 #elif DB_VERSION_MAJOR > 1
18212         db_appexit( NULL );
18213 #else
18214         (void) dbopen( NULL, 0, 0, 0, NULL);
18215 #endif
18216
18217 ; return 0; }
18218 EOF
18219 if { (eval echo configure:18220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18220   rm -rf conftest*
18221   ol_cv_db_db_1=yes
18222 else
18223   echo "configure: failed program was:" >&5
18224   cat conftest.$ac_ext >&5
18225   rm -rf conftest*
18226   ol_cv_db_db_1=no
18227 fi
18228 rm -f conftest*
18229
18230         LIBS="$ol_LIBS"
18231
18232 fi
18233
18234 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18235
18236         if test $ol_cv_db_db_1 = yes ; then
18237                 ol_cv_lib_db=-ldb-1
18238         fi
18239 fi
18240
18241
18242                 if test "$ol_cv_lib_db" != no ; then
18243                         ol_cv_berkeley_db=yes
18244                 fi
18245         fi
18246 fi
18247
18248         else
18249                 ol_cv_berkeley_db=no
18250 for ac_hdr in db.h
18251 do
18252 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18253 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18254 echo "configure:18255: checking for $ac_hdr" >&5
18255 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18256   echo $ac_n "(cached) $ac_c" 1>&6
18257 else
18258   cat > conftest.$ac_ext <<EOF
18259 #line 18260 "configure"
18260 #include "confdefs.h"
18261 #include <$ac_hdr>
18262 EOF
18263 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18264 { (eval echo configure:18265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18265 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18266 if test -z "$ac_err"; then
18267   rm -rf conftest*
18268   eval "ac_cv_header_$ac_safe=yes"
18269 else
18270   echo "$ac_err" >&5
18271   echo "configure: failed program was:" >&5
18272   cat conftest.$ac_ext >&5
18273   rm -rf conftest*
18274   eval "ac_cv_header_$ac_safe=no"
18275 fi
18276 rm -f conftest*
18277 fi
18278 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18279   echo "$ac_t""yes" 1>&6
18280     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18281   cat >> confdefs.h <<EOF
18282 #define $ac_tr_hdr 1
18283 EOF
18284  
18285 else
18286   echo "$ac_t""no" 1>&6
18287 fi
18288 done
18289
18290 if test $ac_cv_header_db_h = yes; then
18291         ol_cv_lib_db=no
18292 if test $ol_cv_lib_db = no ; then
18293         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18294 echo "configure:18295: checking for Berkeley DB link (default)" >&5
18295 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18296   echo $ac_n "(cached) $ac_c" 1>&6
18297 else
18298   
18299         ol_DB_LIB=
18300         ol_LIBS=$LIBS
18301         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18302
18303         cat > conftest.$ac_ext <<EOF
18304 #line 18305 "configure"
18305 #include "confdefs.h"
18306
18307 #ifdef HAVE_DB_185_H
18308 # include <db_185.h>
18309 #else
18310 # include <db.h>
18311 #endif
18312
18313 #ifndef DB_VERSION_MAJOR
18314 # define DB_VERSION_MAJOR 1
18315 #endif
18316
18317 #ifndef NULL
18318 #define NULL ((void*)0)
18319 #endif
18320
18321 int main() {
18322
18323 #if DB_VERSION_MAJOR > 1
18324         {
18325                 char *version;
18326                 int major, minor, patch;
18327
18328                 version = db_version( &major, &minor, &patch );
18329
18330                 if( major != DB_VERSION_MAJOR ||
18331                         minor < DB_VERSION_MINOR )
18332                 {
18333                         printf("Berkeley DB version mismatch\n"
18334                                 "\texpected: %s\n\tgot: %s\n",
18335                                 DB_VERSION_STRING, version);
18336                         return 1;
18337                 }
18338         }
18339 #endif
18340
18341 #if DB_VERSION_MAJOR > 2
18342         db_env_create( NULL, 0 );
18343 #elif DB_VERSION_MAJOR > 1
18344         db_appexit( NULL );
18345 #else
18346         (void) dbopen( NULL, 0, 0, 0, NULL);
18347 #endif
18348
18349 ; return 0; }
18350 EOF
18351 if { (eval echo configure:18352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18352   rm -rf conftest*
18353   ol_cv_db_none=yes
18354 else
18355   echo "configure: failed program was:" >&5
18356   cat conftest.$ac_ext >&5
18357   rm -rf conftest*
18358   ol_cv_db_none=no
18359 fi
18360 rm -f conftest*
18361
18362         LIBS="$ol_LIBS"
18363
18364 fi
18365
18366 echo "$ac_t""$ol_cv_db_none" 1>&6
18367
18368         if test $ol_cv_db_none = yes ; then
18369                 ol_cv_lib_db=yes
18370         fi
18371 fi
18372
18373 if test $ol_cv_lib_db = no ; then
18374         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18375 echo "configure:18376: checking for Berkeley DB link (-ldb42)" >&5
18376 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18377   echo $ac_n "(cached) $ac_c" 1>&6
18378 else
18379   
18380         ol_DB_LIB=-ldb42
18381         ol_LIBS=$LIBS
18382         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18383
18384         cat > conftest.$ac_ext <<EOF
18385 #line 18386 "configure"
18386 #include "confdefs.h"
18387
18388 #ifdef HAVE_DB_185_H
18389 # include <db_185.h>
18390 #else
18391 # include <db.h>
18392 #endif
18393
18394 #ifndef DB_VERSION_MAJOR
18395 # define DB_VERSION_MAJOR 1
18396 #endif
18397
18398 #ifndef NULL
18399 #define NULL ((void*)0)
18400 #endif
18401
18402 int main() {
18403
18404 #if DB_VERSION_MAJOR > 1
18405         {
18406                 char *version;
18407                 int major, minor, patch;
18408
18409                 version = db_version( &major, &minor, &patch );
18410
18411                 if( major != DB_VERSION_MAJOR ||
18412                         minor < DB_VERSION_MINOR )
18413                 {
18414                         printf("Berkeley DB version mismatch\n"
18415                                 "\texpected: %s\n\tgot: %s\n",
18416                                 DB_VERSION_STRING, version);
18417                         return 1;
18418                 }
18419         }
18420 #endif
18421
18422 #if DB_VERSION_MAJOR > 2
18423         db_env_create( NULL, 0 );
18424 #elif DB_VERSION_MAJOR > 1
18425         db_appexit( NULL );
18426 #else
18427         (void) dbopen( NULL, 0, 0, 0, NULL);
18428 #endif
18429
18430 ; return 0; }
18431 EOF
18432 if { (eval echo configure:18433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18433   rm -rf conftest*
18434   ol_cv_db_db42=yes
18435 else
18436   echo "configure: failed program was:" >&5
18437   cat conftest.$ac_ext >&5
18438   rm -rf conftest*
18439   ol_cv_db_db42=no
18440 fi
18441 rm -f conftest*
18442
18443         LIBS="$ol_LIBS"
18444
18445 fi
18446
18447 echo "$ac_t""$ol_cv_db_db42" 1>&6
18448
18449         if test $ol_cv_db_db42 = yes ; then
18450                 ol_cv_lib_db=-ldb42
18451         fi
18452 fi
18453
18454 if test $ol_cv_lib_db = no ; then
18455         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18456 echo "configure:18457: checking for Berkeley DB link (-ldb-42)" >&5
18457 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18458   echo $ac_n "(cached) $ac_c" 1>&6
18459 else
18460   
18461         ol_DB_LIB=-ldb-42
18462         ol_LIBS=$LIBS
18463         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18464
18465         cat > conftest.$ac_ext <<EOF
18466 #line 18467 "configure"
18467 #include "confdefs.h"
18468
18469 #ifdef HAVE_DB_185_H
18470 # include <db_185.h>
18471 #else
18472 # include <db.h>
18473 #endif
18474
18475 #ifndef DB_VERSION_MAJOR
18476 # define DB_VERSION_MAJOR 1
18477 #endif
18478
18479 #ifndef NULL
18480 #define NULL ((void*)0)
18481 #endif
18482
18483 int main() {
18484
18485 #if DB_VERSION_MAJOR > 1
18486         {
18487                 char *version;
18488                 int major, minor, patch;
18489
18490                 version = db_version( &major, &minor, &patch );
18491
18492                 if( major != DB_VERSION_MAJOR ||
18493                         minor < DB_VERSION_MINOR )
18494                 {
18495                         printf("Berkeley DB version mismatch\n"
18496                                 "\texpected: %s\n\tgot: %s\n",
18497                                 DB_VERSION_STRING, version);
18498                         return 1;
18499                 }
18500         }
18501 #endif
18502
18503 #if DB_VERSION_MAJOR > 2
18504         db_env_create( NULL, 0 );
18505 #elif DB_VERSION_MAJOR > 1
18506         db_appexit( NULL );
18507 #else
18508         (void) dbopen( NULL, 0, 0, 0, NULL);
18509 #endif
18510
18511 ; return 0; }
18512 EOF
18513 if { (eval echo configure:18514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18514   rm -rf conftest*
18515   ol_cv_db_db_42=yes
18516 else
18517   echo "configure: failed program was:" >&5
18518   cat conftest.$ac_ext >&5
18519   rm -rf conftest*
18520   ol_cv_db_db_42=no
18521 fi
18522 rm -f conftest*
18523
18524         LIBS="$ol_LIBS"
18525
18526 fi
18527
18528 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18529
18530         if test $ol_cv_db_db_42 = yes ; then
18531                 ol_cv_lib_db=-ldb-42
18532         fi
18533 fi
18534
18535 if test $ol_cv_lib_db = no ; then
18536         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18537 echo "configure:18538: checking for Berkeley DB link (-ldb-4.2)" >&5
18538 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18539   echo $ac_n "(cached) $ac_c" 1>&6
18540 else
18541   
18542         ol_DB_LIB=-ldb-4.2
18543         ol_LIBS=$LIBS
18544         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18545
18546         cat > conftest.$ac_ext <<EOF
18547 #line 18548 "configure"
18548 #include "confdefs.h"
18549
18550 #ifdef HAVE_DB_185_H
18551 # include <db_185.h>
18552 #else
18553 # include <db.h>
18554 #endif
18555
18556 #ifndef DB_VERSION_MAJOR
18557 # define DB_VERSION_MAJOR 1
18558 #endif
18559
18560 #ifndef NULL
18561 #define NULL ((void*)0)
18562 #endif
18563
18564 int main() {
18565
18566 #if DB_VERSION_MAJOR > 1
18567         {
18568                 char *version;
18569                 int major, minor, patch;
18570
18571                 version = db_version( &major, &minor, &patch );
18572
18573                 if( major != DB_VERSION_MAJOR ||
18574                         minor < DB_VERSION_MINOR )
18575                 {
18576                         printf("Berkeley DB version mismatch\n"
18577                                 "\texpected: %s\n\tgot: %s\n",
18578                                 DB_VERSION_STRING, version);
18579                         return 1;
18580                 }
18581         }
18582 #endif
18583
18584 #if DB_VERSION_MAJOR > 2
18585         db_env_create( NULL, 0 );
18586 #elif DB_VERSION_MAJOR > 1
18587         db_appexit( NULL );
18588 #else
18589         (void) dbopen( NULL, 0, 0, 0, NULL);
18590 #endif
18591
18592 ; return 0; }
18593 EOF
18594 if { (eval echo configure:18595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18595   rm -rf conftest*
18596   ol_cv_db_db_4_dot_2=yes
18597 else
18598   echo "configure: failed program was:" >&5
18599   cat conftest.$ac_ext >&5
18600   rm -rf conftest*
18601   ol_cv_db_db_4_dot_2=no
18602 fi
18603 rm -f conftest*
18604
18605         LIBS="$ol_LIBS"
18606
18607 fi
18608
18609 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18610
18611         if test $ol_cv_db_db_4_dot_2 = yes ; then
18612                 ol_cv_lib_db=-ldb-4.2
18613         fi
18614 fi
18615
18616 if test $ol_cv_lib_db = no ; then
18617         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18618 echo "configure:18619: checking for Berkeley DB link (-ldb-4-2)" >&5
18619 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18620   echo $ac_n "(cached) $ac_c" 1>&6
18621 else
18622   
18623         ol_DB_LIB=-ldb-4-2
18624         ol_LIBS=$LIBS
18625         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18626
18627         cat > conftest.$ac_ext <<EOF
18628 #line 18629 "configure"
18629 #include "confdefs.h"
18630
18631 #ifdef HAVE_DB_185_H
18632 # include <db_185.h>
18633 #else
18634 # include <db.h>
18635 #endif
18636
18637 #ifndef DB_VERSION_MAJOR
18638 # define DB_VERSION_MAJOR 1
18639 #endif
18640
18641 #ifndef NULL
18642 #define NULL ((void*)0)
18643 #endif
18644
18645 int main() {
18646
18647 #if DB_VERSION_MAJOR > 1
18648         {
18649                 char *version;
18650                 int major, minor, patch;
18651
18652                 version = db_version( &major, &minor, &patch );
18653
18654                 if( major != DB_VERSION_MAJOR ||
18655                         minor < DB_VERSION_MINOR )
18656                 {
18657                         printf("Berkeley DB version mismatch\n"
18658                                 "\texpected: %s\n\tgot: %s\n",
18659                                 DB_VERSION_STRING, version);
18660                         return 1;
18661                 }
18662         }
18663 #endif
18664
18665 #if DB_VERSION_MAJOR > 2
18666         db_env_create( NULL, 0 );
18667 #elif DB_VERSION_MAJOR > 1
18668         db_appexit( NULL );
18669 #else
18670         (void) dbopen( NULL, 0, 0, 0, NULL);
18671 #endif
18672
18673 ; return 0; }
18674 EOF
18675 if { (eval echo configure:18676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18676   rm -rf conftest*
18677   ol_cv_db_db_4_2=yes
18678 else
18679   echo "configure: failed program was:" >&5
18680   cat conftest.$ac_ext >&5
18681   rm -rf conftest*
18682   ol_cv_db_db_4_2=no
18683 fi
18684 rm -f conftest*
18685
18686         LIBS="$ol_LIBS"
18687
18688 fi
18689
18690 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18691
18692         if test $ol_cv_db_db_4_2 = yes ; then
18693                 ol_cv_lib_db=-ldb-4-2
18694         fi
18695 fi
18696
18697 if test $ol_cv_lib_db = no ; then
18698         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18699 echo "configure:18700: checking for Berkeley DB link (-ldb-4)" >&5
18700 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18701   echo $ac_n "(cached) $ac_c" 1>&6
18702 else
18703   
18704         ol_DB_LIB=-ldb-4
18705         ol_LIBS=$LIBS
18706         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18707
18708         cat > conftest.$ac_ext <<EOF
18709 #line 18710 "configure"
18710 #include "confdefs.h"
18711
18712 #ifdef HAVE_DB_185_H
18713 # include <db_185.h>
18714 #else
18715 # include <db.h>
18716 #endif
18717
18718 #ifndef DB_VERSION_MAJOR
18719 # define DB_VERSION_MAJOR 1
18720 #endif
18721
18722 #ifndef NULL
18723 #define NULL ((void*)0)
18724 #endif
18725
18726 int main() {
18727
18728 #if DB_VERSION_MAJOR > 1
18729         {
18730                 char *version;
18731                 int major, minor, patch;
18732
18733                 version = db_version( &major, &minor, &patch );
18734
18735                 if( major != DB_VERSION_MAJOR ||
18736                         minor < DB_VERSION_MINOR )
18737                 {
18738                         printf("Berkeley DB version mismatch\n"
18739                                 "\texpected: %s\n\tgot: %s\n",
18740                                 DB_VERSION_STRING, version);
18741                         return 1;
18742                 }
18743         }
18744 #endif
18745
18746 #if DB_VERSION_MAJOR > 2
18747         db_env_create( NULL, 0 );
18748 #elif DB_VERSION_MAJOR > 1
18749         db_appexit( NULL );
18750 #else
18751         (void) dbopen( NULL, 0, 0, 0, NULL);
18752 #endif
18753
18754 ; return 0; }
18755 EOF
18756 if { (eval echo configure:18757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18757   rm -rf conftest*
18758   ol_cv_db_db_4=yes
18759 else
18760   echo "configure: failed program was:" >&5
18761   cat conftest.$ac_ext >&5
18762   rm -rf conftest*
18763   ol_cv_db_db_4=no
18764 fi
18765 rm -f conftest*
18766
18767         LIBS="$ol_LIBS"
18768
18769 fi
18770
18771 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18772
18773         if test $ol_cv_db_db_4 = yes ; then
18774                 ol_cv_lib_db=-ldb-4
18775         fi
18776 fi
18777
18778 if test $ol_cv_lib_db = no ; then
18779         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18780 echo "configure:18781: checking for Berkeley DB link (-ldb4)" >&5
18781 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18782   echo $ac_n "(cached) $ac_c" 1>&6
18783 else
18784   
18785         ol_DB_LIB=-ldb4
18786         ol_LIBS=$LIBS
18787         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18788
18789         cat > conftest.$ac_ext <<EOF
18790 #line 18791 "configure"
18791 #include "confdefs.h"
18792
18793 #ifdef HAVE_DB_185_H
18794 # include <db_185.h>
18795 #else
18796 # include <db.h>
18797 #endif
18798
18799 #ifndef DB_VERSION_MAJOR
18800 # define DB_VERSION_MAJOR 1
18801 #endif
18802
18803 #ifndef NULL
18804 #define NULL ((void*)0)
18805 #endif
18806
18807 int main() {
18808
18809 #if DB_VERSION_MAJOR > 1
18810         {
18811                 char *version;
18812                 int major, minor, patch;
18813
18814                 version = db_version( &major, &minor, &patch );
18815
18816                 if( major != DB_VERSION_MAJOR ||
18817                         minor < DB_VERSION_MINOR )
18818                 {
18819                         printf("Berkeley DB version mismatch\n"
18820                                 "\texpected: %s\n\tgot: %s\n",
18821                                 DB_VERSION_STRING, version);
18822                         return 1;
18823                 }
18824         }
18825 #endif
18826
18827 #if DB_VERSION_MAJOR > 2
18828         db_env_create( NULL, 0 );
18829 #elif DB_VERSION_MAJOR > 1
18830         db_appexit( NULL );
18831 #else
18832         (void) dbopen( NULL, 0, 0, 0, NULL);
18833 #endif
18834
18835 ; return 0; }
18836 EOF
18837 if { (eval echo configure:18838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18838   rm -rf conftest*
18839   ol_cv_db_db4=yes
18840 else
18841   echo "configure: failed program was:" >&5
18842   cat conftest.$ac_ext >&5
18843   rm -rf conftest*
18844   ol_cv_db_db4=no
18845 fi
18846 rm -f conftest*
18847
18848         LIBS="$ol_LIBS"
18849
18850 fi
18851
18852 echo "$ac_t""$ol_cv_db_db4" 1>&6
18853
18854         if test $ol_cv_db_db4 = yes ; then
18855                 ol_cv_lib_db=-ldb4
18856         fi
18857 fi
18858
18859 if test $ol_cv_lib_db = no ; then
18860         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18861 echo "configure:18862: checking for Berkeley DB link (-ldb)" >&5
18862 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18863   echo $ac_n "(cached) $ac_c" 1>&6
18864 else
18865   
18866         ol_DB_LIB=-ldb
18867         ol_LIBS=$LIBS
18868         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18869
18870         cat > conftest.$ac_ext <<EOF
18871 #line 18872 "configure"
18872 #include "confdefs.h"
18873
18874 #ifdef HAVE_DB_185_H
18875 # include <db_185.h>
18876 #else
18877 # include <db.h>
18878 #endif
18879
18880 #ifndef DB_VERSION_MAJOR
18881 # define DB_VERSION_MAJOR 1
18882 #endif
18883
18884 #ifndef NULL
18885 #define NULL ((void*)0)
18886 #endif
18887
18888 int main() {
18889
18890 #if DB_VERSION_MAJOR > 1
18891         {
18892                 char *version;
18893                 int major, minor, patch;
18894
18895                 version = db_version( &major, &minor, &patch );
18896
18897                 if( major != DB_VERSION_MAJOR ||
18898                         minor < DB_VERSION_MINOR )
18899                 {
18900                         printf("Berkeley DB version mismatch\n"
18901                                 "\texpected: %s\n\tgot: %s\n",
18902                                 DB_VERSION_STRING, version);
18903                         return 1;
18904                 }
18905         }
18906 #endif
18907
18908 #if DB_VERSION_MAJOR > 2
18909         db_env_create( NULL, 0 );
18910 #elif DB_VERSION_MAJOR > 1
18911         db_appexit( NULL );
18912 #else
18913         (void) dbopen( NULL, 0, 0, 0, NULL);
18914 #endif
18915
18916 ; return 0; }
18917 EOF
18918 if { (eval echo configure:18919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18919   rm -rf conftest*
18920   ol_cv_db_db=yes
18921 else
18922   echo "configure: failed program was:" >&5
18923   cat conftest.$ac_ext >&5
18924   rm -rf conftest*
18925   ol_cv_db_db=no
18926 fi
18927 rm -f conftest*
18928
18929         LIBS="$ol_LIBS"
18930
18931 fi
18932
18933 echo "$ac_t""$ol_cv_db_db" 1>&6
18934
18935         if test $ol_cv_db_db = yes ; then
18936                 ol_cv_lib_db=-ldb
18937         fi
18938 fi
18939
18940 if test $ol_cv_lib_db = no ; then
18941         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18942 echo "configure:18943: checking for Berkeley DB link (-ldb41)" >&5
18943 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18944   echo $ac_n "(cached) $ac_c" 1>&6
18945 else
18946   
18947         ol_DB_LIB=-ldb41
18948         ol_LIBS=$LIBS
18949         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18950
18951         cat > conftest.$ac_ext <<EOF
18952 #line 18953 "configure"
18953 #include "confdefs.h"
18954
18955 #ifdef HAVE_DB_185_H
18956 # include <db_185.h>
18957 #else
18958 # include <db.h>
18959 #endif
18960
18961 #ifndef DB_VERSION_MAJOR
18962 # define DB_VERSION_MAJOR 1
18963 #endif
18964
18965 #ifndef NULL
18966 #define NULL ((void*)0)
18967 #endif
18968
18969 int main() {
18970
18971 #if DB_VERSION_MAJOR > 1
18972         {
18973                 char *version;
18974                 int major, minor, patch;
18975
18976                 version = db_version( &major, &minor, &patch );
18977
18978                 if( major != DB_VERSION_MAJOR ||
18979                         minor < DB_VERSION_MINOR )
18980                 {
18981                         printf("Berkeley DB version mismatch\n"
18982                                 "\texpected: %s\n\tgot: %s\n",
18983                                 DB_VERSION_STRING, version);
18984                         return 1;
18985                 }
18986         }
18987 #endif
18988
18989 #if DB_VERSION_MAJOR > 2
18990         db_env_create( NULL, 0 );
18991 #elif DB_VERSION_MAJOR > 1
18992         db_appexit( NULL );
18993 #else
18994         (void) dbopen( NULL, 0, 0, 0, NULL);
18995 #endif
18996
18997 ; return 0; }
18998 EOF
18999 if { (eval echo configure:19000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19000   rm -rf conftest*
19001   ol_cv_db_db41=yes
19002 else
19003   echo "configure: failed program was:" >&5
19004   cat conftest.$ac_ext >&5
19005   rm -rf conftest*
19006   ol_cv_db_db41=no
19007 fi
19008 rm -f conftest*
19009
19010         LIBS="$ol_LIBS"
19011
19012 fi
19013
19014 echo "$ac_t""$ol_cv_db_db41" 1>&6
19015
19016         if test $ol_cv_db_db41 = yes ; then
19017                 ol_cv_lib_db=-ldb41
19018         fi
19019 fi
19020
19021 if test $ol_cv_lib_db = no ; then
19022         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19023 echo "configure:19024: checking for Berkeley DB link (-ldb-41)" >&5
19024 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19025   echo $ac_n "(cached) $ac_c" 1>&6
19026 else
19027   
19028         ol_DB_LIB=-ldb-41
19029         ol_LIBS=$LIBS
19030         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19031
19032         cat > conftest.$ac_ext <<EOF
19033 #line 19034 "configure"
19034 #include "confdefs.h"
19035
19036 #ifdef HAVE_DB_185_H
19037 # include <db_185.h>
19038 #else
19039 # include <db.h>
19040 #endif
19041
19042 #ifndef DB_VERSION_MAJOR
19043 # define DB_VERSION_MAJOR 1
19044 #endif
19045
19046 #ifndef NULL
19047 #define NULL ((void*)0)
19048 #endif
19049
19050 int main() {
19051
19052 #if DB_VERSION_MAJOR > 1
19053         {
19054                 char *version;
19055                 int major, minor, patch;
19056
19057                 version = db_version( &major, &minor, &patch );
19058
19059                 if( major != DB_VERSION_MAJOR ||
19060                         minor < DB_VERSION_MINOR )
19061                 {
19062                         printf("Berkeley DB version mismatch\n"
19063                                 "\texpected: %s\n\tgot: %s\n",
19064                                 DB_VERSION_STRING, version);
19065                         return 1;
19066                 }
19067         }
19068 #endif
19069
19070 #if DB_VERSION_MAJOR > 2
19071         db_env_create( NULL, 0 );
19072 #elif DB_VERSION_MAJOR > 1
19073         db_appexit( NULL );
19074 #else
19075         (void) dbopen( NULL, 0, 0, 0, NULL);
19076 #endif
19077
19078 ; return 0; }
19079 EOF
19080 if { (eval echo configure:19081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19081   rm -rf conftest*
19082   ol_cv_db_db_41=yes
19083 else
19084   echo "configure: failed program was:" >&5
19085   cat conftest.$ac_ext >&5
19086   rm -rf conftest*
19087   ol_cv_db_db_41=no
19088 fi
19089 rm -f conftest*
19090
19091         LIBS="$ol_LIBS"
19092
19093 fi
19094
19095 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19096
19097         if test $ol_cv_db_db_41 = yes ; then
19098                 ol_cv_lib_db=-ldb-41
19099         fi
19100 fi
19101
19102 if test $ol_cv_lib_db = no ; then
19103         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19104 echo "configure:19105: checking for Berkeley DB link (-ldb-4.1)" >&5
19105 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19106   echo $ac_n "(cached) $ac_c" 1>&6
19107 else
19108   
19109         ol_DB_LIB=-ldb-4.1
19110         ol_LIBS=$LIBS
19111         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19112
19113         cat > conftest.$ac_ext <<EOF
19114 #line 19115 "configure"
19115 #include "confdefs.h"
19116
19117 #ifdef HAVE_DB_185_H
19118 # include <db_185.h>
19119 #else
19120 # include <db.h>
19121 #endif
19122
19123 #ifndef DB_VERSION_MAJOR
19124 # define DB_VERSION_MAJOR 1
19125 #endif
19126
19127 #ifndef NULL
19128 #define NULL ((void*)0)
19129 #endif
19130
19131 int main() {
19132
19133 #if DB_VERSION_MAJOR > 1
19134         {
19135                 char *version;
19136                 int major, minor, patch;
19137
19138                 version = db_version( &major, &minor, &patch );
19139
19140                 if( major != DB_VERSION_MAJOR ||
19141                         minor < DB_VERSION_MINOR )
19142                 {
19143                         printf("Berkeley DB version mismatch\n"
19144                                 "\texpected: %s\n\tgot: %s\n",
19145                                 DB_VERSION_STRING, version);
19146                         return 1;
19147                 }
19148         }
19149 #endif
19150
19151 #if DB_VERSION_MAJOR > 2
19152         db_env_create( NULL, 0 );
19153 #elif DB_VERSION_MAJOR > 1
19154         db_appexit( NULL );
19155 #else
19156         (void) dbopen( NULL, 0, 0, 0, NULL);
19157 #endif
19158
19159 ; return 0; }
19160 EOF
19161 if { (eval echo configure:19162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19162   rm -rf conftest*
19163   ol_cv_db_db_4_dot_1=yes
19164 else
19165   echo "configure: failed program was:" >&5
19166   cat conftest.$ac_ext >&5
19167   rm -rf conftest*
19168   ol_cv_db_db_4_dot_1=no
19169 fi
19170 rm -f conftest*
19171
19172         LIBS="$ol_LIBS"
19173
19174 fi
19175
19176 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19177
19178         if test $ol_cv_db_db_4_dot_1 = yes ; then
19179                 ol_cv_lib_db=-ldb-4.1
19180         fi
19181 fi
19182
19183 if test $ol_cv_lib_db = no ; then
19184         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19185 echo "configure:19186: checking for Berkeley DB link (-ldb-4-1)" >&5
19186 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19187   echo $ac_n "(cached) $ac_c" 1>&6
19188 else
19189   
19190         ol_DB_LIB=-ldb-4-1
19191         ol_LIBS=$LIBS
19192         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19193
19194         cat > conftest.$ac_ext <<EOF
19195 #line 19196 "configure"
19196 #include "confdefs.h"
19197
19198 #ifdef HAVE_DB_185_H
19199 # include <db_185.h>
19200 #else
19201 # include <db.h>
19202 #endif
19203
19204 #ifndef DB_VERSION_MAJOR
19205 # define DB_VERSION_MAJOR 1
19206 #endif
19207
19208 #ifndef NULL
19209 #define NULL ((void*)0)
19210 #endif
19211
19212 int main() {
19213
19214 #if DB_VERSION_MAJOR > 1
19215         {
19216                 char *version;
19217                 int major, minor, patch;
19218
19219                 version = db_version( &major, &minor, &patch );
19220
19221                 if( major != DB_VERSION_MAJOR ||
19222                         minor < DB_VERSION_MINOR )
19223                 {
19224                         printf("Berkeley DB version mismatch\n"
19225                                 "\texpected: %s\n\tgot: %s\n",
19226                                 DB_VERSION_STRING, version);
19227                         return 1;
19228                 }
19229         }
19230 #endif
19231
19232 #if DB_VERSION_MAJOR > 2
19233         db_env_create( NULL, 0 );
19234 #elif DB_VERSION_MAJOR > 1
19235         db_appexit( NULL );
19236 #else
19237         (void) dbopen( NULL, 0, 0, 0, NULL);
19238 #endif
19239
19240 ; return 0; }
19241 EOF
19242 if { (eval echo configure:19243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19243   rm -rf conftest*
19244   ol_cv_db_db_4_1=yes
19245 else
19246   echo "configure: failed program was:" >&5
19247   cat conftest.$ac_ext >&5
19248   rm -rf conftest*
19249   ol_cv_db_db_4_1=no
19250 fi
19251 rm -f conftest*
19252
19253         LIBS="$ol_LIBS"
19254
19255 fi
19256
19257 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19258
19259         if test $ol_cv_db_db_4_1 = yes ; then
19260                 ol_cv_lib_db=-ldb-4-1
19261         fi
19262 fi
19263
19264 if test $ol_cv_lib_db = no ; then
19265         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19266 echo "configure:19267: checking for Berkeley DB link (-ldb3)" >&5
19267 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19268   echo $ac_n "(cached) $ac_c" 1>&6
19269 else
19270   
19271         ol_DB_LIB=-ldb3
19272         ol_LIBS=$LIBS
19273         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19274
19275         cat > conftest.$ac_ext <<EOF
19276 #line 19277 "configure"
19277 #include "confdefs.h"
19278
19279 #ifdef HAVE_DB_185_H
19280 # include <db_185.h>
19281 #else
19282 # include <db.h>
19283 #endif
19284
19285 #ifndef DB_VERSION_MAJOR
19286 # define DB_VERSION_MAJOR 1
19287 #endif
19288
19289 #ifndef NULL
19290 #define NULL ((void*)0)
19291 #endif
19292
19293 int main() {
19294
19295 #if DB_VERSION_MAJOR > 1
19296         {
19297                 char *version;
19298                 int major, minor, patch;
19299
19300                 version = db_version( &major, &minor, &patch );
19301
19302                 if( major != DB_VERSION_MAJOR ||
19303                         minor < DB_VERSION_MINOR )
19304                 {
19305                         printf("Berkeley DB version mismatch\n"
19306                                 "\texpected: %s\n\tgot: %s\n",
19307                                 DB_VERSION_STRING, version);
19308                         return 1;
19309                 }
19310         }
19311 #endif
19312
19313 #if DB_VERSION_MAJOR > 2
19314         db_env_create( NULL, 0 );
19315 #elif DB_VERSION_MAJOR > 1
19316         db_appexit( NULL );
19317 #else
19318         (void) dbopen( NULL, 0, 0, 0, NULL);
19319 #endif
19320
19321 ; return 0; }
19322 EOF
19323 if { (eval echo configure:19324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19324   rm -rf conftest*
19325   ol_cv_db_db3=yes
19326 else
19327   echo "configure: failed program was:" >&5
19328   cat conftest.$ac_ext >&5
19329   rm -rf conftest*
19330   ol_cv_db_db3=no
19331 fi
19332 rm -f conftest*
19333
19334         LIBS="$ol_LIBS"
19335
19336 fi
19337
19338 echo "$ac_t""$ol_cv_db_db3" 1>&6
19339
19340         if test $ol_cv_db_db3 = yes ; then
19341                 ol_cv_lib_db=-ldb3
19342         fi
19343 fi
19344
19345 if test $ol_cv_lib_db = no ; then
19346         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19347 echo "configure:19348: checking for Berkeley DB link (-ldb-3)" >&5
19348 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19349   echo $ac_n "(cached) $ac_c" 1>&6
19350 else
19351   
19352         ol_DB_LIB=-ldb-3
19353         ol_LIBS=$LIBS
19354         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19355
19356         cat > conftest.$ac_ext <<EOF
19357 #line 19358 "configure"
19358 #include "confdefs.h"
19359
19360 #ifdef HAVE_DB_185_H
19361 # include <db_185.h>
19362 #else
19363 # include <db.h>
19364 #endif
19365
19366 #ifndef DB_VERSION_MAJOR
19367 # define DB_VERSION_MAJOR 1
19368 #endif
19369
19370 #ifndef NULL
19371 #define NULL ((void*)0)
19372 #endif
19373
19374 int main() {
19375
19376 #if DB_VERSION_MAJOR > 1
19377         {
19378                 char *version;
19379                 int major, minor, patch;
19380
19381                 version = db_version( &major, &minor, &patch );
19382
19383                 if( major != DB_VERSION_MAJOR ||
19384                         minor < DB_VERSION_MINOR )
19385                 {
19386                         printf("Berkeley DB version mismatch\n"
19387                                 "\texpected: %s\n\tgot: %s\n",
19388                                 DB_VERSION_STRING, version);
19389                         return 1;
19390                 }
19391         }
19392 #endif
19393
19394 #if DB_VERSION_MAJOR > 2
19395         db_env_create( NULL, 0 );
19396 #elif DB_VERSION_MAJOR > 1
19397         db_appexit( NULL );
19398 #else
19399         (void) dbopen( NULL, 0, 0, 0, NULL);
19400 #endif
19401
19402 ; return 0; }
19403 EOF
19404 if { (eval echo configure:19405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19405   rm -rf conftest*
19406   ol_cv_db_db_3=yes
19407 else
19408   echo "configure: failed program was:" >&5
19409   cat conftest.$ac_ext >&5
19410   rm -rf conftest*
19411   ol_cv_db_db_3=no
19412 fi
19413 rm -f conftest*
19414
19415         LIBS="$ol_LIBS"
19416
19417 fi
19418
19419 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19420
19421         if test $ol_cv_db_db_3 = yes ; then
19422                 ol_cv_lib_db=-ldb-3
19423         fi
19424 fi
19425
19426 if test $ol_cv_lib_db = no ; then
19427         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19428 echo "configure:19429: checking for Berkeley DB link (-ldb2)" >&5
19429 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19430   echo $ac_n "(cached) $ac_c" 1>&6
19431 else
19432   
19433         ol_DB_LIB=-ldb2
19434         ol_LIBS=$LIBS
19435         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19436
19437         cat > conftest.$ac_ext <<EOF
19438 #line 19439 "configure"
19439 #include "confdefs.h"
19440
19441 #ifdef HAVE_DB_185_H
19442 # include <db_185.h>
19443 #else
19444 # include <db.h>
19445 #endif
19446
19447 #ifndef DB_VERSION_MAJOR
19448 # define DB_VERSION_MAJOR 1
19449 #endif
19450
19451 #ifndef NULL
19452 #define NULL ((void*)0)
19453 #endif
19454
19455 int main() {
19456
19457 #if DB_VERSION_MAJOR > 1
19458         {
19459                 char *version;
19460                 int major, minor, patch;
19461
19462                 version = db_version( &major, &minor, &patch );
19463
19464                 if( major != DB_VERSION_MAJOR ||
19465                         minor < DB_VERSION_MINOR )
19466                 {
19467                         printf("Berkeley DB version mismatch\n"
19468                                 "\texpected: %s\n\tgot: %s\n",
19469                                 DB_VERSION_STRING, version);
19470                         return 1;
19471                 }
19472         }
19473 #endif
19474
19475 #if DB_VERSION_MAJOR > 2
19476         db_env_create( NULL, 0 );
19477 #elif DB_VERSION_MAJOR > 1
19478         db_appexit( NULL );
19479 #else
19480         (void) dbopen( NULL, 0, 0, 0, NULL);
19481 #endif
19482
19483 ; return 0; }
19484 EOF
19485 if { (eval echo configure:19486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19486   rm -rf conftest*
19487   ol_cv_db_db2=yes
19488 else
19489   echo "configure: failed program was:" >&5
19490   cat conftest.$ac_ext >&5
19491   rm -rf conftest*
19492   ol_cv_db_db2=no
19493 fi
19494 rm -f conftest*
19495
19496         LIBS="$ol_LIBS"
19497
19498 fi
19499
19500 echo "$ac_t""$ol_cv_db_db2" 1>&6
19501
19502         if test $ol_cv_db_db2 = yes ; then
19503                 ol_cv_lib_db=-ldb2
19504         fi
19505 fi
19506
19507 if test $ol_cv_lib_db = no ; then
19508         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19509 echo "configure:19510: checking for Berkeley DB link (-ldb-2)" >&5
19510 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19511   echo $ac_n "(cached) $ac_c" 1>&6
19512 else
19513   
19514         ol_DB_LIB=-ldb-2
19515         ol_LIBS=$LIBS
19516         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19517
19518         cat > conftest.$ac_ext <<EOF
19519 #line 19520 "configure"
19520 #include "confdefs.h"
19521
19522 #ifdef HAVE_DB_185_H
19523 # include <db_185.h>
19524 #else
19525 # include <db.h>
19526 #endif
19527
19528 #ifndef DB_VERSION_MAJOR
19529 # define DB_VERSION_MAJOR 1
19530 #endif
19531
19532 #ifndef NULL
19533 #define NULL ((void*)0)
19534 #endif
19535
19536 int main() {
19537
19538 #if DB_VERSION_MAJOR > 1
19539         {
19540                 char *version;
19541                 int major, minor, patch;
19542
19543                 version = db_version( &major, &minor, &patch );
19544
19545                 if( major != DB_VERSION_MAJOR ||
19546                         minor < DB_VERSION_MINOR )
19547                 {
19548                         printf("Berkeley DB version mismatch\n"
19549                                 "\texpected: %s\n\tgot: %s\n",
19550                                 DB_VERSION_STRING, version);
19551                         return 1;
19552                 }
19553         }
19554 #endif
19555
19556 #if DB_VERSION_MAJOR > 2
19557         db_env_create( NULL, 0 );
19558 #elif DB_VERSION_MAJOR > 1
19559         db_appexit( NULL );
19560 #else
19561         (void) dbopen( NULL, 0, 0, 0, NULL);
19562 #endif
19563
19564 ; return 0; }
19565 EOF
19566 if { (eval echo configure:19567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19567   rm -rf conftest*
19568   ol_cv_db_db_2=yes
19569 else
19570   echo "configure: failed program was:" >&5
19571   cat conftest.$ac_ext >&5
19572   rm -rf conftest*
19573   ol_cv_db_db_2=no
19574 fi
19575 rm -f conftest*
19576
19577         LIBS="$ol_LIBS"
19578
19579 fi
19580
19581 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19582
19583         if test $ol_cv_db_db_2 = yes ; then
19584                 ol_cv_lib_db=-ldb-2
19585         fi
19586 fi
19587
19588 if test $ol_cv_lib_db = no ; then
19589         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19590 echo "configure:19591: checking for Berkeley DB link (-ldb1)" >&5
19591 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19592   echo $ac_n "(cached) $ac_c" 1>&6
19593 else
19594   
19595         ol_DB_LIB=-ldb1
19596         ol_LIBS=$LIBS
19597         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19598
19599         cat > conftest.$ac_ext <<EOF
19600 #line 19601 "configure"
19601 #include "confdefs.h"
19602
19603 #ifdef HAVE_DB_185_H
19604 # include <db_185.h>
19605 #else
19606 # include <db.h>
19607 #endif
19608
19609 #ifndef DB_VERSION_MAJOR
19610 # define DB_VERSION_MAJOR 1
19611 #endif
19612
19613 #ifndef NULL
19614 #define NULL ((void*)0)
19615 #endif
19616
19617 int main() {
19618
19619 #if DB_VERSION_MAJOR > 1
19620         {
19621                 char *version;
19622                 int major, minor, patch;
19623
19624                 version = db_version( &major, &minor, &patch );
19625
19626                 if( major != DB_VERSION_MAJOR ||
19627                         minor < DB_VERSION_MINOR )
19628                 {
19629                         printf("Berkeley DB version mismatch\n"
19630                                 "\texpected: %s\n\tgot: %s\n",
19631                                 DB_VERSION_STRING, version);
19632                         return 1;
19633                 }
19634         }
19635 #endif
19636
19637 #if DB_VERSION_MAJOR > 2
19638         db_env_create( NULL, 0 );
19639 #elif DB_VERSION_MAJOR > 1
19640         db_appexit( NULL );
19641 #else
19642         (void) dbopen( NULL, 0, 0, 0, NULL);
19643 #endif
19644
19645 ; return 0; }
19646 EOF
19647 if { (eval echo configure:19648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19648   rm -rf conftest*
19649   ol_cv_db_db1=yes
19650 else
19651   echo "configure: failed program was:" >&5
19652   cat conftest.$ac_ext >&5
19653   rm -rf conftest*
19654   ol_cv_db_db1=no
19655 fi
19656 rm -f conftest*
19657
19658         LIBS="$ol_LIBS"
19659
19660 fi
19661
19662 echo "$ac_t""$ol_cv_db_db1" 1>&6
19663
19664         if test $ol_cv_db_db1 = yes ; then
19665                 ol_cv_lib_db=-ldb1
19666         fi
19667 fi
19668
19669 if test $ol_cv_lib_db = no ; then
19670         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19671 echo "configure:19672: checking for Berkeley DB link (-ldb-1)" >&5
19672 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19673   echo $ac_n "(cached) $ac_c" 1>&6
19674 else
19675   
19676         ol_DB_LIB=-ldb-1
19677         ol_LIBS=$LIBS
19678         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19679
19680         cat > conftest.$ac_ext <<EOF
19681 #line 19682 "configure"
19682 #include "confdefs.h"
19683
19684 #ifdef HAVE_DB_185_H
19685 # include <db_185.h>
19686 #else
19687 # include <db.h>
19688 #endif
19689
19690 #ifndef DB_VERSION_MAJOR
19691 # define DB_VERSION_MAJOR 1
19692 #endif
19693
19694 #ifndef NULL
19695 #define NULL ((void*)0)
19696 #endif
19697
19698 int main() {
19699
19700 #if DB_VERSION_MAJOR > 1
19701         {
19702                 char *version;
19703                 int major, minor, patch;
19704
19705                 version = db_version( &major, &minor, &patch );
19706
19707                 if( major != DB_VERSION_MAJOR ||
19708                         minor < DB_VERSION_MINOR )
19709                 {
19710                         printf("Berkeley DB version mismatch\n"
19711                                 "\texpected: %s\n\tgot: %s\n",
19712                                 DB_VERSION_STRING, version);
19713                         return 1;
19714                 }
19715         }
19716 #endif
19717
19718 #if DB_VERSION_MAJOR > 2
19719         db_env_create( NULL, 0 );
19720 #elif DB_VERSION_MAJOR > 1
19721         db_appexit( NULL );
19722 #else
19723         (void) dbopen( NULL, 0, 0, 0, NULL);
19724 #endif
19725
19726 ; return 0; }
19727 EOF
19728 if { (eval echo configure:19729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19729   rm -rf conftest*
19730   ol_cv_db_db_1=yes
19731 else
19732   echo "configure: failed program was:" >&5
19733   cat conftest.$ac_ext >&5
19734   rm -rf conftest*
19735   ol_cv_db_db_1=no
19736 fi
19737 rm -f conftest*
19738
19739         LIBS="$ol_LIBS"
19740
19741 fi
19742
19743 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19744
19745         if test $ol_cv_db_db_1 = yes ; then
19746                 ol_cv_lib_db=-ldb-1
19747         fi
19748 fi
19749
19750
19751         if test "$ol_cv_lib_db" != no ; then
19752                 ol_cv_berkeley_db=yes
19753                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19754 echo "configure:19755: checking for Berkeley DB thread support" >&5
19755 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19756   echo $ac_n "(cached) $ac_c" 1>&6
19757 else
19758   
19759         ol_LIBS="$LIBS"
19760         LIBS="$LTHREAD_LIBS $LIBS"
19761         if test $ol_cv_lib_db != yes ; then
19762                 LIBS="$ol_cv_lib_db $LIBS"
19763         fi
19764
19765         if test "$cross_compiling" = yes; then
19766   ol_cv_berkeley_db_thread=cross
19767 else
19768   cat > conftest.$ac_ext <<EOF
19769 #line 19770 "configure"
19770 #include "confdefs.h"
19771
19772 #ifdef HAVE_DB_185_H
19773         choke me;
19774 #else
19775 #include <db.h>
19776 #endif
19777 #ifndef NULL
19778 #define NULL ((void *)0)
19779 #endif
19780 main()
19781 {
19782         int rc;
19783         u_int32_t flags = DB_CREATE |
19784 #ifdef DB_PRIVATE
19785                 DB_PRIVATE |
19786 #endif
19787                 DB_THREAD;
19788
19789 #if DB_VERSION_MAJOR > 2
19790         DB_ENV *env = NULL;
19791
19792         rc = db_env_create( &env, 0 );
19793
19794         flags |= DB_INIT_MPOOL;
19795 #ifdef DB_MPOOL_PRIVATE
19796         flags |= DB_MPOOL_PRIVATE;
19797 #endif
19798
19799         if( rc ) {
19800                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19801                 return rc;
19802         }
19803
19804 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19805         rc = env->open( env, NULL, flags, 0 );
19806 #else
19807         rc = env->open( env, NULL, NULL, flags, 0 );
19808 #endif
19809
19810         if ( rc == 0 ) {
19811                 rc = env->close( env, 0 );
19812         }
19813
19814         if( rc ) {
19815                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19816                 return rc;
19817         }
19818
19819 #else
19820         DB_ENV env;
19821         memset( &env, '\0', sizeof(env) );
19822
19823         rc = db_appinit( NULL, NULL, &env, flags );
19824
19825         if( rc == 0 ) {
19826                 db_appexit( &env );
19827         }
19828
19829         unlink("__db_mpool.share");
19830         unlink("__db_lock.share");
19831 #endif
19832
19833         return rc;
19834 }
19835 EOF
19836 if { (eval echo configure:19837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19837 then
19838   ol_cv_berkeley_db_thread=yes
19839 else
19840   echo "configure: failed program was:" >&5
19841   cat conftest.$ac_ext >&5
19842   rm -fr conftest*
19843   ol_cv_berkeley_db_thread=no
19844 fi
19845 rm -fr conftest*
19846 fi
19847
19848
19849         LIBS="$ol_LIBS"
19850
19851 fi
19852
19853 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19854
19855         if test $ol_cv_berkeley_db_thread != no ; then
19856                 cat >> confdefs.h <<\EOF
19857 #define HAVE_BERKELEY_DB_THREAD 1
19858 EOF
19859
19860         fi
19861
19862         fi
19863 fi
19864
19865         fi
19866
19867         if test $ol_cv_berkeley_db != no ; then
19868                 cat >> confdefs.h <<\EOF
19869 #define HAVE_BERKELEY_DB 1
19870 EOF
19871
19872
19873                 ol_link_ldbm=berkeley
19874                 ol_with_ldbm_api=berkeley
19875
19876                 if test $ol_with_ldbm_type = hash ; then
19877                         cat >> confdefs.h <<\EOF
19878 #define LDBM_USE_DBHASH 1
19879 EOF
19880
19881                 else
19882                         cat >> confdefs.h <<\EOF
19883 #define LDBM_USE_DBBTREE 1
19884 EOF
19885
19886                 fi
19887
19888                                                 if test $ol_cv_lib_db != yes ; then
19889                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19890                 fi
19891         fi
19892 fi
19893
19894 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19895         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19896 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19897         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19898 echo "configure:19899: checking Berkeley DB version for BDB backend" >&5
19899 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19900   echo $ac_n "(cached) $ac_c" 1>&6
19901 else
19902   
19903         cat > conftest.$ac_ext <<EOF
19904 #line 19905 "configure"
19905 #include "confdefs.h"
19906
19907 #include <db.h>
19908
19909  /* this check could be improved */
19910 #ifndef DB_VERSION_MAJOR
19911 #       define DB_VERSION_MAJOR 1
19912 #endif
19913 #ifndef DB_VERSION_MINOR
19914 #       define DB_VERSION_MINOR 0
19915 #endif
19916
19917 /* require 4.2 or later */
19918 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19919         __db_version_compat
19920 #endif
19921         
19922 EOF
19923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19924   egrep "__db_version_compat" >/dev/null 2>&1; then
19925   rm -rf conftest*
19926   ol_cv_bdb_compat=yes
19927 else
19928   rm -rf conftest*
19929   ol_cv_bdb_compat=no
19930 fi
19931 rm -f conftest*
19932
19933 fi
19934
19935 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19936
19937
19938         if test $ol_cv_bdb_compat = yes ; then
19939                 ol_enable_bdb=yes
19940         elif test $ol_enable_bdb = yes ; then
19941                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19942         else
19943                 ol_enable_bdb=no
19944         fi
19945 fi
19946 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19947         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19948 fi
19949
19950 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19951         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19952         ol_with_ldbm_api=none
19953 fi
19954
19955 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19956         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19957 echo "configure:19958: checking for MDBM library" >&5
19958 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19959   echo $ac_n "(cached) $ac_c" 1>&6
19960 else
19961         ol_LIBS="$LIBS"
19962         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19963 echo "configure:19964: checking for mdbm_set_chain" >&5
19964 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19965   echo $ac_n "(cached) $ac_c" 1>&6
19966 else
19967   cat > conftest.$ac_ext <<EOF
19968 #line 19969 "configure"
19969 #include "confdefs.h"
19970 /* System header to define __stub macros and hopefully few prototypes,
19971     which can conflict with char mdbm_set_chain(); below.  */
19972 #include <assert.h>
19973 /* Override any gcc2 internal prototype to avoid an error.  */
19974 /* We use char because int might match the return type of a gcc2
19975     builtin and then its argument prototype would still apply.  */
19976 char mdbm_set_chain();
19977 char (*f)();
19978
19979 int main() {
19980
19981 /* The GNU C library defines this for functions which it implements
19982     to always fail with ENOSYS.  Some functions are actually named
19983     something starting with __ and the normal name is an alias.  */
19984 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19985 choke me
19986 #else
19987 f = mdbm_set_chain;
19988 #endif
19989
19990 ; return 0; }
19991 EOF
19992 if { (eval echo configure:19993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19993   rm -rf conftest*
19994   eval "ac_cv_func_mdbm_set_chain=yes"
19995 else
19996   echo "configure: failed program was:" >&5
19997   cat conftest.$ac_ext >&5
19998   rm -rf conftest*
19999   eval "ac_cv_func_mdbm_set_chain=no"
20000 fi
20001 rm -f conftest*
20002 fi
20003
20004 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20005   echo "$ac_t""yes" 1>&6
20006   ol_cv_lib_mdbm=yes
20007 else
20008   echo "$ac_t""no" 1>&6
20009
20010                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20011 echo "configure:20012: checking for mdbm_set_chain in -lmdbm" >&5
20012 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20013 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20014   echo $ac_n "(cached) $ac_c" 1>&6
20015 else
20016   ac_save_LIBS="$LIBS"
20017 LIBS="-lmdbm  $LIBS"
20018 cat > conftest.$ac_ext <<EOF
20019 #line 20020 "configure"
20020 #include "confdefs.h"
20021 /* Override any gcc2 internal prototype to avoid an error.  */
20022 /* We use char because int might match the return type of a gcc2
20023     builtin and then its argument prototype would still apply.  */
20024 char mdbm_set_chain();
20025
20026 int main() {
20027 mdbm_set_chain()
20028 ; return 0; }
20029 EOF
20030 if { (eval echo configure:20031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20031   rm -rf conftest*
20032   eval "ac_cv_lib_$ac_lib_var=yes"
20033 else
20034   echo "configure: failed program was:" >&5
20035   cat conftest.$ac_ext >&5
20036   rm -rf conftest*
20037   eval "ac_cv_lib_$ac_lib_var=no"
20038 fi
20039 rm -f conftest*
20040 LIBS="$ac_save_LIBS"
20041
20042 fi
20043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20044   echo "$ac_t""yes" 1>&6
20045   ol_cv_lib_mdbm=-lmdbm
20046 else
20047   echo "$ac_t""no" 1>&6
20048 ol_cv_lib_mdbm=no
20049 fi
20050
20051         
20052 fi
20053
20054         LIBS="$ol_LIBS"
20055
20056 fi
20057
20058 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20059
20060
20061  for ac_hdr in mdbm.h
20062 do
20063 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20064 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20065 echo "configure:20066: checking for $ac_hdr" >&5
20066 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20067   echo $ac_n "(cached) $ac_c" 1>&6
20068 else
20069   cat > conftest.$ac_ext <<EOF
20070 #line 20071 "configure"
20071 #include "confdefs.h"
20072 #include <$ac_hdr>
20073 EOF
20074 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20075 { (eval echo configure:20076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20076 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20077 if test -z "$ac_err"; then
20078   rm -rf conftest*
20079   eval "ac_cv_header_$ac_safe=yes"
20080 else
20081   echo "$ac_err" >&5
20082   echo "configure: failed program was:" >&5
20083   cat conftest.$ac_ext >&5
20084   rm -rf conftest*
20085   eval "ac_cv_header_$ac_safe=no"
20086 fi
20087 rm -f conftest*
20088 fi
20089 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20090   echo "$ac_t""yes" 1>&6
20091     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20092   cat >> confdefs.h <<EOF
20093 #define $ac_tr_hdr 1
20094 EOF
20095  
20096 else
20097   echo "$ac_t""no" 1>&6
20098 fi
20099 done
20100
20101  echo $ac_n "checking for db""... $ac_c" 1>&6
20102 echo "configure:20103: checking for db" >&5
20103 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20104   echo $ac_n "(cached) $ac_c" 1>&6
20105 else
20106   
20107         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20108                 ol_cv_mdbm=no
20109         else
20110                 ol_cv_mdbm=yes
20111         fi
20112
20113 fi
20114
20115 echo "$ac_t""$ol_cv_mdbm" 1>&6
20116  if test $ol_cv_mdbm = yes ; then
20117         cat >> confdefs.h <<\EOF
20118 #define HAVE_MDBM 1
20119 EOF
20120
20121  fi
20122
20123
20124         if test $ol_cv_mdbm = yes ; then
20125                 ol_link_ldbm=mdbm
20126                 ol_with_ldbm_api=mdbm
20127                 if test $ol_cv_lib_mdbm != yes ; then
20128                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20129                 fi
20130         fi
20131 fi
20132
20133 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20134         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20135 echo "configure:20136: checking for GDBM library" >&5
20136 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20137   echo $ac_n "(cached) $ac_c" 1>&6
20138 else
20139         ol_LIBS="$LIBS"
20140         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20141 echo "configure:20142: checking for gdbm_open" >&5
20142 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20143   echo $ac_n "(cached) $ac_c" 1>&6
20144 else
20145   cat > conftest.$ac_ext <<EOF
20146 #line 20147 "configure"
20147 #include "confdefs.h"
20148 /* System header to define __stub macros and hopefully few prototypes,
20149     which can conflict with char gdbm_open(); below.  */
20150 #include <assert.h>
20151 /* Override any gcc2 internal prototype to avoid an error.  */
20152 /* We use char because int might match the return type of a gcc2
20153     builtin and then its argument prototype would still apply.  */
20154 char gdbm_open();
20155 char (*f)();
20156
20157 int main() {
20158
20159 /* The GNU C library defines this for functions which it implements
20160     to always fail with ENOSYS.  Some functions are actually named
20161     something starting with __ and the normal name is an alias.  */
20162 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20163 choke me
20164 #else
20165 f = gdbm_open;
20166 #endif
20167
20168 ; return 0; }
20169 EOF
20170 if { (eval echo configure:20171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20171   rm -rf conftest*
20172   eval "ac_cv_func_gdbm_open=yes"
20173 else
20174   echo "configure: failed program was:" >&5
20175   cat conftest.$ac_ext >&5
20176   rm -rf conftest*
20177   eval "ac_cv_func_gdbm_open=no"
20178 fi
20179 rm -f conftest*
20180 fi
20181
20182 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20183   echo "$ac_t""yes" 1>&6
20184   ol_cv_lib_gdbm=yes
20185 else
20186   echo "$ac_t""no" 1>&6
20187
20188                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20189 echo "configure:20190: checking for gdbm_open in -lgdbm" >&5
20190 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20191 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20192   echo $ac_n "(cached) $ac_c" 1>&6
20193 else
20194   ac_save_LIBS="$LIBS"
20195 LIBS="-lgdbm  $LIBS"
20196 cat > conftest.$ac_ext <<EOF
20197 #line 20198 "configure"
20198 #include "confdefs.h"
20199 /* Override any gcc2 internal prototype to avoid an error.  */
20200 /* We use char because int might match the return type of a gcc2
20201     builtin and then its argument prototype would still apply.  */
20202 char gdbm_open();
20203
20204 int main() {
20205 gdbm_open()
20206 ; return 0; }
20207 EOF
20208 if { (eval echo configure:20209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20209   rm -rf conftest*
20210   eval "ac_cv_lib_$ac_lib_var=yes"
20211 else
20212   echo "configure: failed program was:" >&5
20213   cat conftest.$ac_ext >&5
20214   rm -rf conftest*
20215   eval "ac_cv_lib_$ac_lib_var=no"
20216 fi
20217 rm -f conftest*
20218 LIBS="$ac_save_LIBS"
20219
20220 fi
20221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20222   echo "$ac_t""yes" 1>&6
20223   ol_cv_lib_gdbm=-lgdbm
20224 else
20225   echo "$ac_t""no" 1>&6
20226 ol_cv_lib_gdbm=no
20227 fi
20228
20229         
20230 fi
20231
20232         LIBS="$ol_LIBS"
20233
20234 fi
20235
20236 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20237
20238
20239  for ac_hdr in gdbm.h
20240 do
20241 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20242 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20243 echo "configure:20244: checking for $ac_hdr" >&5
20244 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20245   echo $ac_n "(cached) $ac_c" 1>&6
20246 else
20247   cat > conftest.$ac_ext <<EOF
20248 #line 20249 "configure"
20249 #include "confdefs.h"
20250 #include <$ac_hdr>
20251 EOF
20252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20253 { (eval echo configure:20254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20255 if test -z "$ac_err"; then
20256   rm -rf conftest*
20257   eval "ac_cv_header_$ac_safe=yes"
20258 else
20259   echo "$ac_err" >&5
20260   echo "configure: failed program was:" >&5
20261   cat conftest.$ac_ext >&5
20262   rm -rf conftest*
20263   eval "ac_cv_header_$ac_safe=no"
20264 fi
20265 rm -f conftest*
20266 fi
20267 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20268   echo "$ac_t""yes" 1>&6
20269     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20270   cat >> confdefs.h <<EOF
20271 #define $ac_tr_hdr 1
20272 EOF
20273  
20274 else
20275   echo "$ac_t""no" 1>&6
20276 fi
20277 done
20278
20279  echo $ac_n "checking for db""... $ac_c" 1>&6
20280 echo "configure:20281: checking for db" >&5
20281 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20282   echo $ac_n "(cached) $ac_c" 1>&6
20283 else
20284   
20285         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20286                 ol_cv_gdbm=no
20287         else
20288                 ol_cv_gdbm=yes
20289         fi
20290
20291 fi
20292
20293 echo "$ac_t""$ol_cv_gdbm" 1>&6
20294  if test $ol_cv_gdbm = yes ; then
20295         cat >> confdefs.h <<\EOF
20296 #define HAVE_GDBM 1
20297 EOF
20298
20299  fi
20300
20301
20302         if test $ol_cv_gdbm = yes ; then
20303                 ol_link_ldbm=gdbm
20304                 ol_with_ldbm_api=gdbm
20305
20306                 if test $ol_cv_lib_gdbm != yes ; then
20307                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20308                 fi
20309         fi
20310 fi
20311
20312 if test $ol_with_ldbm_api = ndbm ; then
20313         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20314 echo "configure:20315: checking for NDBM library" >&5
20315 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20316   echo $ac_n "(cached) $ac_c" 1>&6
20317 else
20318         ol_LIBS="$LIBS"
20319         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20320 echo "configure:20321: checking for dbm_open" >&5
20321 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20322   echo $ac_n "(cached) $ac_c" 1>&6
20323 else
20324   cat > conftest.$ac_ext <<EOF
20325 #line 20326 "configure"
20326 #include "confdefs.h"
20327 /* System header to define __stub macros and hopefully few prototypes,
20328     which can conflict with char dbm_open(); below.  */
20329 #include <assert.h>
20330 /* Override any gcc2 internal prototype to avoid an error.  */
20331 /* We use char because int might match the return type of a gcc2
20332     builtin and then its argument prototype would still apply.  */
20333 char dbm_open();
20334 char (*f)();
20335
20336 int main() {
20337
20338 /* The GNU C library defines this for functions which it implements
20339     to always fail with ENOSYS.  Some functions are actually named
20340     something starting with __ and the normal name is an alias.  */
20341 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20342 choke me
20343 #else
20344 f = dbm_open;
20345 #endif
20346
20347 ; return 0; }
20348 EOF
20349 if { (eval echo configure:20350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20350   rm -rf conftest*
20351   eval "ac_cv_func_dbm_open=yes"
20352 else
20353   echo "configure: failed program was:" >&5
20354   cat conftest.$ac_ext >&5
20355   rm -rf conftest*
20356   eval "ac_cv_func_dbm_open=no"
20357 fi
20358 rm -f conftest*
20359 fi
20360
20361 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20362   echo "$ac_t""yes" 1>&6
20363   ol_cv_lib_ndbm=yes
20364 else
20365   echo "$ac_t""no" 1>&6
20366
20367                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20368 echo "configure:20369: checking for dbm_open in -lndbm" >&5
20369 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20370 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20371   echo $ac_n "(cached) $ac_c" 1>&6
20372 else
20373   ac_save_LIBS="$LIBS"
20374 LIBS="-lndbm  $LIBS"
20375 cat > conftest.$ac_ext <<EOF
20376 #line 20377 "configure"
20377 #include "confdefs.h"
20378 /* Override any gcc2 internal prototype to avoid an error.  */
20379 /* We use char because int might match the return type of a gcc2
20380     builtin and then its argument prototype would still apply.  */
20381 char dbm_open();
20382
20383 int main() {
20384 dbm_open()
20385 ; return 0; }
20386 EOF
20387 if { (eval echo configure:20388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20388   rm -rf conftest*
20389   eval "ac_cv_lib_$ac_lib_var=yes"
20390 else
20391   echo "configure: failed program was:" >&5
20392   cat conftest.$ac_ext >&5
20393   rm -rf conftest*
20394   eval "ac_cv_lib_$ac_lib_var=no"
20395 fi
20396 rm -f conftest*
20397 LIBS="$ac_save_LIBS"
20398
20399 fi
20400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20401   echo "$ac_t""yes" 1>&6
20402   ol_cv_lib_ndbm=-lndbm
20403 else
20404   echo "$ac_t""no" 1>&6
20405
20406                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20407 echo "configure:20408: checking for dbm_open in -ldbm" >&5
20408 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20409 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20410   echo $ac_n "(cached) $ac_c" 1>&6
20411 else
20412   ac_save_LIBS="$LIBS"
20413 LIBS="-ldbm  $LIBS"
20414 cat > conftest.$ac_ext <<EOF
20415 #line 20416 "configure"
20416 #include "confdefs.h"
20417 /* Override any gcc2 internal prototype to avoid an error.  */
20418 /* We use char because int might match the return type of a gcc2
20419     builtin and then its argument prototype would still apply.  */
20420 char dbm_open();
20421
20422 int main() {
20423 dbm_open()
20424 ; return 0; }
20425 EOF
20426 if { (eval echo configure:20427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20427   rm -rf conftest*
20428   eval "ac_cv_lib_$ac_lib_var=yes"
20429 else
20430   echo "configure: failed program was:" >&5
20431   cat conftest.$ac_ext >&5
20432   rm -rf conftest*
20433   eval "ac_cv_lib_$ac_lib_var=no"
20434 fi
20435 rm -f conftest*
20436 LIBS="$ac_save_LIBS"
20437
20438 fi
20439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20440   echo "$ac_t""yes" 1>&6
20441   ol_cv_lib_ndbm=-ldbm
20442 else
20443   echo "$ac_t""no" 1>&6
20444 ol_cv_lib_ndbm=no
20445 fi
20446                 
20447 fi
20448
20449         
20450 fi
20451
20452         LIBS="$ol_LIBS"
20453
20454 fi
20455
20456 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20457
20458
20459  for ac_hdr in ndbm.h
20460 do
20461 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20462 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20463 echo "configure:20464: checking for $ac_hdr" >&5
20464 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20465   echo $ac_n "(cached) $ac_c" 1>&6
20466 else
20467   cat > conftest.$ac_ext <<EOF
20468 #line 20469 "configure"
20469 #include "confdefs.h"
20470 #include <$ac_hdr>
20471 EOF
20472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20473 { (eval echo configure:20474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20475 if test -z "$ac_err"; then
20476   rm -rf conftest*
20477   eval "ac_cv_header_$ac_safe=yes"
20478 else
20479   echo "$ac_err" >&5
20480   echo "configure: failed program was:" >&5
20481   cat conftest.$ac_ext >&5
20482   rm -rf conftest*
20483   eval "ac_cv_header_$ac_safe=no"
20484 fi
20485 rm -f conftest*
20486 fi
20487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20488   echo "$ac_t""yes" 1>&6
20489     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20490   cat >> confdefs.h <<EOF
20491 #define $ac_tr_hdr 1
20492 EOF
20493  
20494 else
20495   echo "$ac_t""no" 1>&6
20496 fi
20497 done
20498
20499  echo $ac_n "checking for db""... $ac_c" 1>&6
20500 echo "configure:20501: checking for db" >&5
20501 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20502   echo $ac_n "(cached) $ac_c" 1>&6
20503 else
20504   
20505         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20506                 ol_cv_ndbm=no
20507         else
20508                 ol_cv_ndbm=yes
20509         fi
20510
20511 fi
20512
20513 echo "$ac_t""$ol_cv_ndbm" 1>&6
20514  if test $ol_cv_ndbm = yes ; then
20515         cat >> confdefs.h <<\EOF
20516 #define HAVE_NDBM 1
20517 EOF
20518
20519  fi
20520
20521
20522         if test $ol_cv_ndbm = yes ; then
20523                 ol_link_ldbm=ndbm
20524                 ol_with_ldbm_api=ndbm
20525
20526                 if test $ol_cv_lib_ndbm != yes ; then
20527                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20528                 fi
20529         fi
20530 fi
20531
20532 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20533         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20534         if test $ol_enable_ldbm = yes ; then
20535                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20536         fi
20537
20538         echo "configure: warning: disabling LDBM" 1>&2
20539         ol_enable_ldbm=no
20540 fi
20541
20542
20543 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20544         BUILD_LIBS_DYNAMIC=shared
20545         cat >> confdefs.h <<\EOF
20546 #define LDAP_LIBS_DYNAMIC 1
20547 EOF
20548
20549         LTSTATIC=""
20550 else
20551         BUILD_LIBS_DYNAMIC=static
20552         LTSTATIC="-static"
20553 fi
20554
20555 if test $ol_enable_wrappers != no ; then
20556         for ac_hdr in tcpd.h
20557 do
20558 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20559 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20560 echo "configure:20561: checking for $ac_hdr" >&5
20561 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20562   echo $ac_n "(cached) $ac_c" 1>&6
20563 else
20564   cat > conftest.$ac_ext <<EOF
20565 #line 20566 "configure"
20566 #include "confdefs.h"
20567 #include <$ac_hdr>
20568 EOF
20569 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20570 { (eval echo configure:20571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20571 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20572 if test -z "$ac_err"; then
20573   rm -rf conftest*
20574   eval "ac_cv_header_$ac_safe=yes"
20575 else
20576   echo "$ac_err" >&5
20577   echo "configure: failed program was:" >&5
20578   cat conftest.$ac_ext >&5
20579   rm -rf conftest*
20580   eval "ac_cv_header_$ac_safe=no"
20581 fi
20582 rm -f conftest*
20583 fi
20584 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20585   echo "$ac_t""yes" 1>&6
20586     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20587   cat >> confdefs.h <<EOF
20588 #define $ac_tr_hdr 1
20589 EOF
20590  
20591                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20592 echo "configure:20593: checking for TCP wrappers library" >&5
20593                 save_LIBS="$LIBS"
20594                 LIBS="$LIBS -lwrap"
20595                 cat > conftest.$ac_ext <<EOF
20596 #line 20597 "configure"
20597 #include "confdefs.h"
20598
20599 #include <tcpd.h>
20600 int allow_severity = 0;
20601 int deny_severity  = 0;
20602
20603 struct request_info *req;
20604                 
20605 int main() {
20606
20607 hosts_access(req)
20608                 
20609 ; return 0; }
20610 EOF
20611 if { (eval echo configure:20612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20612   rm -rf conftest*
20613   echo "$ac_t""-lwrap" 1>&6
20614                 have_wrappers=yes
20615                 LIBS="$save_LIBS"
20616 else
20617   echo "configure: failed program was:" >&5
20618   cat conftest.$ac_ext >&5
20619   rm -rf conftest*
20620   
20621                                 LIBS="$LIBS -lnsl"
20622                 cat > conftest.$ac_ext <<EOF
20623 #line 20624 "configure"
20624 #include "confdefs.h"
20625
20626 #include <tcpd.h>
20627 int allow_severity = 0;
20628 int deny_severity  = 0;
20629
20630 struct request_info *req;
20631                 
20632 int main() {
20633
20634 hosts_access(req)
20635                 
20636 ; return 0; }
20637 EOF
20638 if { (eval echo configure:20639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20639   rm -rf conftest*
20640   echo "$ac_t""-lwrap -lnsl" 1>&6
20641                 have_wrappers=yes
20642                 LIBS="$save_LIBS -lnsl"
20643 else
20644   echo "configure: failed program was:" >&5
20645   cat conftest.$ac_ext >&5
20646   rm -rf conftest*
20647   
20648                 echo "$ac_t""no" 1>&6
20649                 have_wrappers=no
20650                 LIBS=$save_LIBS
20651 fi
20652 rm -f conftest*
20653 fi
20654 rm -f conftest*
20655 else
20656   echo "$ac_t""no" 1>&6
20657 have_wrappers=no
20658 fi
20659 done
20660
20661
20662         if test $have_wrappers = yes ; then
20663                 cat >> confdefs.h <<\EOF
20664 #define HAVE_TCPD 1
20665 EOF
20666
20667                 WRAP_LIBS="-lwrap"
20668         elif test $ol_enable_wrappers = yes ; then
20669                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20670         else
20671                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20672                 WRAP_LIBS=""
20673         fi
20674 fi
20675
20676 if test $ol_enable_syslog != no ; then
20677         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20678 echo "configure:20679: checking for openlog" >&5
20679 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20680   echo $ac_n "(cached) $ac_c" 1>&6
20681 else
20682   cat > conftest.$ac_ext <<EOF
20683 #line 20684 "configure"
20684 #include "confdefs.h"
20685 /* System header to define __stub macros and hopefully few prototypes,
20686     which can conflict with char openlog(); below.  */
20687 #include <assert.h>
20688 /* Override any gcc2 internal prototype to avoid an error.  */
20689 /* We use char because int might match the return type of a gcc2
20690     builtin and then its argument prototype would still apply.  */
20691 char openlog();
20692 char (*f)();
20693
20694 int main() {
20695
20696 /* The GNU C library defines this for functions which it implements
20697     to always fail with ENOSYS.  Some functions are actually named
20698     something starting with __ and the normal name is an alias.  */
20699 #if defined (__stub_openlog) || defined (__stub___openlog)
20700 choke me
20701 #else
20702 f = openlog;
20703 #endif
20704
20705 ; return 0; }
20706 EOF
20707 if { (eval echo configure:20708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20708   rm -rf conftest*
20709   eval "ac_cv_func_openlog=yes"
20710 else
20711   echo "configure: failed program was:" >&5
20712   cat conftest.$ac_ext >&5
20713   rm -rf conftest*
20714   eval "ac_cv_func_openlog=no"
20715 fi
20716 rm -f conftest*
20717 fi
20718
20719 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20720   echo "$ac_t""yes" 1>&6
20721   :
20722 else
20723   echo "$ac_t""no" 1>&6
20724 fi
20725
20726         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20727                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20728         fi
20729         ol_enable_syslog=$ac_cv_func_openlog
20730 fi
20731
20732
20733 ol_link_sql=no
20734 if test $ol_enable_sql != no ; then
20735         for ac_hdr in sql.h sqlext.h
20736 do
20737 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20738 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20739 echo "configure:20740: checking for $ac_hdr" >&5
20740 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20741   echo $ac_n "(cached) $ac_c" 1>&6
20742 else
20743   cat > conftest.$ac_ext <<EOF
20744 #line 20745 "configure"
20745 #include "confdefs.h"
20746 #include <$ac_hdr>
20747 EOF
20748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20749 { (eval echo configure:20750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20751 if test -z "$ac_err"; then
20752   rm -rf conftest*
20753   eval "ac_cv_header_$ac_safe=yes"
20754 else
20755   echo "$ac_err" >&5
20756   echo "configure: failed program was:" >&5
20757   cat conftest.$ac_ext >&5
20758   rm -rf conftest*
20759   eval "ac_cv_header_$ac_safe=no"
20760 fi
20761 rm -f conftest*
20762 fi
20763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20764   echo "$ac_t""yes" 1>&6
20765     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20766   cat >> confdefs.h <<EOF
20767 #define $ac_tr_hdr 1
20768 EOF
20769  
20770 else
20771   echo "$ac_t""no" 1>&6
20772 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20773         
20774 fi
20775 done
20776
20777
20778         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20779 echo "configure:20780: checking for SQLDriverConnect in -liodbc" >&5
20780 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20781 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20782   echo $ac_n "(cached) $ac_c" 1>&6
20783 else
20784   ac_save_LIBS="$LIBS"
20785 LIBS="-liodbc  $LIBS"
20786 cat > conftest.$ac_ext <<EOF
20787 #line 20788 "configure"
20788 #include "confdefs.h"
20789 /* Override any gcc2 internal prototype to avoid an error.  */
20790 /* We use char because int might match the return type of a gcc2
20791     builtin and then its argument prototype would still apply.  */
20792 char SQLDriverConnect();
20793
20794 int main() {
20795 SQLDriverConnect()
20796 ; return 0; }
20797 EOF
20798 if { (eval echo configure:20799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20799   rm -rf conftest*
20800   eval "ac_cv_lib_$ac_lib_var=yes"
20801 else
20802   echo "configure: failed program was:" >&5
20803   cat conftest.$ac_ext >&5
20804   rm -rf conftest*
20805   eval "ac_cv_lib_$ac_lib_var=no"
20806 fi
20807 rm -f conftest*
20808 LIBS="$ac_save_LIBS"
20809
20810 fi
20811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20812   echo "$ac_t""yes" 1>&6
20813   have_iodbc=yes
20814 else
20815   echo "$ac_t""no" 1>&6
20816 have_iodbc=no
20817 fi
20818
20819         if test $have_iodbc = yes ; then
20820                 ol_link_sql="-liodbc"
20821         else
20822                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20823 echo "configure:20824: checking for SQLDriverConnect in -lodbc" >&5
20824 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20825 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20826   echo $ac_n "(cached) $ac_c" 1>&6
20827 else
20828   ac_save_LIBS="$LIBS"
20829 LIBS="-lodbc  $LIBS"
20830 cat > conftest.$ac_ext <<EOF
20831 #line 20832 "configure"
20832 #include "confdefs.h"
20833 /* Override any gcc2 internal prototype to avoid an error.  */
20834 /* We use char because int might match the return type of a gcc2
20835     builtin and then its argument prototype would still apply.  */
20836 char SQLDriverConnect();
20837
20838 int main() {
20839 SQLDriverConnect()
20840 ; return 0; }
20841 EOF
20842 if { (eval echo configure:20843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20843   rm -rf conftest*
20844   eval "ac_cv_lib_$ac_lib_var=yes"
20845 else
20846   echo "configure: failed program was:" >&5
20847   cat conftest.$ac_ext >&5
20848   rm -rf conftest*
20849   eval "ac_cv_lib_$ac_lib_var=no"
20850 fi
20851 rm -f conftest*
20852 LIBS="$ac_save_LIBS"
20853
20854 fi
20855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20856   echo "$ac_t""yes" 1>&6
20857   have_odbc=yes
20858 else
20859   echo "$ac_t""no" 1>&6
20860 have_odbc=no
20861 fi
20862
20863                 if test $have_odbc = yes ; then
20864                         ol_link_sql="-lodbc"
20865                 fi
20866         fi
20867
20868         if test $ol_link_sql != no ; then
20869                 SLAPD_SQL_LIBS="$ol_link_sql"
20870
20871         elif test $ol_enable_sql != auto ; then
20872                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20873         fi
20874 fi
20875
20876 ol_link_sasl=no
20877 ol_link_spasswd=no
20878 if test $ol_with_cyrus_sasl != no ; then
20879         for ac_hdr in sasl/sasl.h sasl.h
20880 do
20881 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20882 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20883 echo "configure:20884: checking for $ac_hdr" >&5
20884 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20885   echo $ac_n "(cached) $ac_c" 1>&6
20886 else
20887   cat > conftest.$ac_ext <<EOF
20888 #line 20889 "configure"
20889 #include "confdefs.h"
20890 #include <$ac_hdr>
20891 EOF
20892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20893 { (eval echo configure:20894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20895 if test -z "$ac_err"; then
20896   rm -rf conftest*
20897   eval "ac_cv_header_$ac_safe=yes"
20898 else
20899   echo "$ac_err" >&5
20900   echo "configure: failed program was:" >&5
20901   cat conftest.$ac_ext >&5
20902   rm -rf conftest*
20903   eval "ac_cv_header_$ac_safe=no"
20904 fi
20905 rm -f conftest*
20906 fi
20907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20908   echo "$ac_t""yes" 1>&6
20909     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20910   cat >> confdefs.h <<EOF
20911 #define $ac_tr_hdr 1
20912 EOF
20913  
20914 else
20915   echo "$ac_t""no" 1>&6
20916 fi
20917 done
20918
20919
20920         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20921                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20922 echo "configure:20923: checking for sasl_client_init in -lsasl2" >&5
20923 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20924 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20925   echo $ac_n "(cached) $ac_c" 1>&6
20926 else
20927   ac_save_LIBS="$LIBS"
20928 LIBS="-lsasl2  $LIBS"
20929 cat > conftest.$ac_ext <<EOF
20930 #line 20931 "configure"
20931 #include "confdefs.h"
20932 /* Override any gcc2 internal prototype to avoid an error.  */
20933 /* We use char because int might match the return type of a gcc2
20934     builtin and then its argument prototype would still apply.  */
20935 char sasl_client_init();
20936
20937 int main() {
20938 sasl_client_init()
20939 ; return 0; }
20940 EOF
20941 if { (eval echo configure:20942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20942   rm -rf conftest*
20943   eval "ac_cv_lib_$ac_lib_var=yes"
20944 else
20945   echo "configure: failed program was:" >&5
20946   cat conftest.$ac_ext >&5
20947   rm -rf conftest*
20948   eval "ac_cv_lib_$ac_lib_var=no"
20949 fi
20950 rm -f conftest*
20951 LIBS="$ac_save_LIBS"
20952
20953 fi
20954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20955   echo "$ac_t""yes" 1>&6
20956   ol_link_sasl="-lsasl2"
20957 else
20958   echo "$ac_t""no" 1>&6
20959 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20960 echo "configure:20961: checking for sasl_client_init in -lsasl" >&5
20961 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20962 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20963   echo $ac_n "(cached) $ac_c" 1>&6
20964 else
20965   ac_save_LIBS="$LIBS"
20966 LIBS="-lsasl  $LIBS"
20967 cat > conftest.$ac_ext <<EOF
20968 #line 20969 "configure"
20969 #include "confdefs.h"
20970 /* Override any gcc2 internal prototype to avoid an error.  */
20971 /* We use char because int might match the return type of a gcc2
20972     builtin and then its argument prototype would still apply.  */
20973 char sasl_client_init();
20974
20975 int main() {
20976 sasl_client_init()
20977 ; return 0; }
20978 EOF
20979 if { (eval echo configure:20980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20980   rm -rf conftest*
20981   eval "ac_cv_lib_$ac_lib_var=yes"
20982 else
20983   echo "configure: failed program was:" >&5
20984   cat conftest.$ac_ext >&5
20985   rm -rf conftest*
20986   eval "ac_cv_lib_$ac_lib_var=no"
20987 fi
20988 rm -f conftest*
20989 LIBS="$ac_save_LIBS"
20990
20991 fi
20992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20993   echo "$ac_t""yes" 1>&6
20994   ol_link_sasl="-lsasl"
20995 else
20996   echo "$ac_t""no" 1>&6
20997 fi
20998
20999 fi
21000
21001         fi
21002
21003         if test $ol_link_sasl = no ; then
21004                 if test $ol_with_cyrus_sasl != auto ; then
21005                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21006                 else
21007                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21008                         echo "configure: warning: SASL authentication not supported!" 1>&2
21009                         if test $ol_link_tls = no ; then
21010                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21011                         fi
21012                 fi
21013         else
21014                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21015 echo "configure:21016: checking Cyrus SASL library version" >&5
21016 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21017   echo $ac_n "(cached) $ac_c" 1>&6
21018 else
21019   
21020         cat > conftest.$ac_ext <<EOF
21021 #line 21022 "configure"
21022 #include "confdefs.h"
21023
21024 #ifdef HAVE_SASL_SASL_H
21025 #include <sasl/sasl.h>
21026 #else
21027 #include <sasl.h>
21028 #endif
21029
21030 /* Require 2.1.15+ */
21031 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21032         char *__sasl_compat = "2.2+ or better okay (we guess)";
21033 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21034         && SASL_VERSION_STEP >=15
21035         char *__sasl_compat = "2.1.15+ or better okay";
21036 #endif
21037         
21038 EOF
21039 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21040   egrep "__sasl_compat" >/dev/null 2>&1; then
21041   rm -rf conftest*
21042   ol_cv_sasl_compat=yes
21043 else
21044   rm -rf conftest*
21045   ol_cv_sasl_compat=no
21046 fi
21047 rm -f conftest*
21048
21049 fi
21050
21051 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21052
21053                 if test $ol_cv_sasl_compat = no ; then
21054                         ol_link_sasl=no
21055                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
21056                 fi
21057
21058                 cat >> confdefs.h <<\EOF
21059 #define HAVE_CYRUS_SASL 1
21060 EOF
21061
21062                 SASL_LIBS="$ol_link_sasl"
21063                 if test $ol_enable_spasswd != no ; then
21064                         ol_link_spasswd=yes
21065                 fi
21066
21067                 ac_save_LIBS="$LIBS"
21068                 LIBS="$LIBS $ol_link_sasl"
21069                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21070 echo "configure:21071: checking for sasl_version" >&5
21071 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21072   echo $ac_n "(cached) $ac_c" 1>&6
21073 else
21074   cat > conftest.$ac_ext <<EOF
21075 #line 21076 "configure"
21076 #include "confdefs.h"
21077 /* System header to define __stub macros and hopefully few prototypes,
21078     which can conflict with char sasl_version(); below.  */
21079 #include <assert.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 sasl_version();
21084 char (*f)();
21085
21086 int main() {
21087
21088 /* The GNU C library defines this for functions which it implements
21089     to always fail with ENOSYS.  Some functions are actually named
21090     something starting with __ and the normal name is an alias.  */
21091 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21092 choke me
21093 #else
21094 f = sasl_version;
21095 #endif
21096
21097 ; return 0; }
21098 EOF
21099 if { (eval echo configure:21100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21100   rm -rf conftest*
21101   eval "ac_cv_func_sasl_version=yes"
21102 else
21103   echo "configure: failed program was:" >&5
21104   cat conftest.$ac_ext >&5
21105   rm -rf conftest*
21106   eval "ac_cv_func_sasl_version=no"
21107 fi
21108 rm -f conftest*
21109 fi
21110
21111 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21112   echo "$ac_t""yes" 1>&6
21113   cat >> confdefs.h <<\EOF
21114 #define HAVE_SASL_VERSION 1
21115 EOF
21116
21117 else
21118   echo "$ac_t""no" 1>&6
21119 fi
21120
21121                 LIBS="$ac_save_LIBS"
21122         fi
21123
21124 else
21125         echo "configure: warning: SASL authentication not supported!" 1>&2
21126         if test $ol_link_tls = no ; then
21127                 echo "configure: warning: Strong authentication not supported!" 1>&2
21128         fi
21129 fi
21130
21131 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21132         dev=no
21133         if test -r /dev/urandom ; then
21134                 dev="/dev/urandom";
21135         elif test -r /idev/urandom ; then
21136                 dev="/idev/urandom";
21137         elif test -r /dev/srandom ; then
21138                 dev="/dev/srandom";
21139         elif test -r /dev/random ; then
21140                 dev="/dev/random";
21141         elif test -r /idev/random ; then
21142                 dev="/idev/random";
21143         fi
21144
21145         if test $dev != no ; then
21146                 cat >> confdefs.h <<EOF
21147 #define URANDOM_DEVICE "$dev"
21148 EOF
21149
21150         fi
21151 fi
21152
21153 ol_link_fetch=no
21154 if test $ol_with_fetch != no ; then
21155         ol_LIBS=$LIBS
21156 LIBS="-lfetch -lcom_err $LIBS"
21157 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21158 echo "configure:21159: checking fetch(3) library" >&5
21159 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21160   echo $ac_n "(cached) $ac_c" 1>&6
21161 else
21162   
21163         cat > conftest.$ac_ext <<EOF
21164 #line 21165 "configure"
21165 #include "confdefs.h"
21166
21167 #include <sys/param.h>
21168 #include <stdio.h>
21169 #include <fetch.h>
21170 int main() {
21171 struct url *u = fetchParseURL("file:///"); 
21172 ; return 0; }
21173 EOF
21174 if { (eval echo configure:21175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21175   rm -rf conftest*
21176   ol_cv_lib_fetch=yes
21177 else
21178   echo "configure: failed program was:" >&5
21179   cat conftest.$ac_ext >&5
21180   rm -rf conftest*
21181   ol_cv_lib_fetch=no
21182 fi
21183 rm -f conftest*
21184 fi
21185
21186 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21187 LIBS=$ol_LIBS
21188 if test $ol_cv_lib_fetch != no ; then
21189         ol_link_fetch="-lfetch -lcom_err"
21190         cat >> confdefs.h <<\EOF
21191 #define HAVE_FETCH 1
21192 EOF
21193
21194 fi
21195
21196
21197         if test $ol_cv_lib_fetch != no ; then
21198                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21199                 ol_link_fetch=freebsd
21200
21201         elif test $ol_with_fetch != auto ; then
21202                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21203         fi 
21204 fi
21205
21206 if test $ol_enable_crypt != no ; then
21207         save_LIBS="$LIBS"
21208         LIBS="$TLS_LIBS $LIBS"
21209
21210         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21211 echo "configure:21212: checking for crypt" >&5
21212 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21213   echo $ac_n "(cached) $ac_c" 1>&6
21214 else
21215   cat > conftest.$ac_ext <<EOF
21216 #line 21217 "configure"
21217 #include "confdefs.h"
21218 /* System header to define __stub macros and hopefully few prototypes,
21219     which can conflict with char crypt(); below.  */
21220 #include <assert.h>
21221 /* Override any gcc2 internal prototype to avoid an error.  */
21222 /* We use char because int might match the return type of a gcc2
21223     builtin and then its argument prototype would still apply.  */
21224 char crypt();
21225 char (*f)();
21226
21227 int main() {
21228
21229 /* The GNU C library defines this for functions which it implements
21230     to always fail with ENOSYS.  Some functions are actually named
21231     something starting with __ and the normal name is an alias.  */
21232 #if defined (__stub_crypt) || defined (__stub___crypt)
21233 choke me
21234 #else
21235 f = crypt;
21236 #endif
21237
21238 ; return 0; }
21239 EOF
21240 if { (eval echo configure:21241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21241   rm -rf conftest*
21242   eval "ac_cv_func_crypt=yes"
21243 else
21244   echo "configure: failed program was:" >&5
21245   cat conftest.$ac_ext >&5
21246   rm -rf conftest*
21247   eval "ac_cv_func_crypt=no"
21248 fi
21249 rm -f conftest*
21250 fi
21251
21252 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21253   echo "$ac_t""yes" 1>&6
21254   have_crypt=yes
21255 else
21256   echo "$ac_t""no" 1>&6
21257
21258                 LIBS="$save_LIBS"
21259                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21260 echo "configure:21261: checking for crypt in -lcrypt" >&5
21261 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21262 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21263   echo $ac_n "(cached) $ac_c" 1>&6
21264 else
21265   ac_save_LIBS="$LIBS"
21266 LIBS="-lcrypt  $LIBS"
21267 cat > conftest.$ac_ext <<EOF
21268 #line 21269 "configure"
21269 #include "confdefs.h"
21270 /* Override any gcc2 internal prototype to avoid an error.  */
21271 /* We use char because int might match the return type of a gcc2
21272     builtin and then its argument prototype would still apply.  */
21273 char crypt();
21274
21275 int main() {
21276 crypt()
21277 ; return 0; }
21278 EOF
21279 if { (eval echo configure:21280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21280   rm -rf conftest*
21281   eval "ac_cv_lib_$ac_lib_var=yes"
21282 else
21283   echo "configure: failed program was:" >&5
21284   cat conftest.$ac_ext >&5
21285   rm -rf conftest*
21286   eval "ac_cv_lib_$ac_lib_var=no"
21287 fi
21288 rm -f conftest*
21289 LIBS="$ac_save_LIBS"
21290
21291 fi
21292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21293   echo "$ac_t""yes" 1>&6
21294   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21295                         have_crypt=yes
21296 else
21297   echo "$ac_t""no" 1>&6
21298 have_crypt=no
21299 fi
21300
21301 fi
21302
21303
21304         LIBS="$save_LIBS"
21305
21306         if test $have_crypt = yes ; then
21307                 cat >> confdefs.h <<\EOF
21308 #define HAVE_CRYPT 1
21309 EOF
21310
21311         else
21312                 echo "configure: warning: could not find crypt" 1>&2
21313                 if test $ol_enable_crypt = yes ; then
21314                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21315                 fi
21316
21317                 echo "configure: warning: disabling crypt support" 1>&2
21318                 ol_enable_crypt=no
21319         fi
21320 fi
21321
21322 if test $ol_enable_proctitle != no ; then
21323         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21324 echo "configure:21325: checking for setproctitle" >&5
21325 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21326   echo $ac_n "(cached) $ac_c" 1>&6
21327 else
21328   cat > conftest.$ac_ext <<EOF
21329 #line 21330 "configure"
21330 #include "confdefs.h"
21331 /* System header to define __stub macros and hopefully few prototypes,
21332     which can conflict with char setproctitle(); below.  */
21333 #include <assert.h>
21334 /* Override any gcc2 internal prototype to avoid an error.  */
21335 /* We use char because int might match the return type of a gcc2
21336     builtin and then its argument prototype would still apply.  */
21337 char setproctitle();
21338 char (*f)();
21339
21340 int main() {
21341
21342 /* The GNU C library defines this for functions which it implements
21343     to always fail with ENOSYS.  Some functions are actually named
21344     something starting with __ and the normal name is an alias.  */
21345 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21346 choke me
21347 #else
21348 f = setproctitle;
21349 #endif
21350
21351 ; return 0; }
21352 EOF
21353 if { (eval echo configure:21354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21354   rm -rf conftest*
21355   eval "ac_cv_func_setproctitle=yes"
21356 else
21357   echo "configure: failed program was:" >&5
21358   cat conftest.$ac_ext >&5
21359   rm -rf conftest*
21360   eval "ac_cv_func_setproctitle=no"
21361 fi
21362 rm -f conftest*
21363 fi
21364
21365 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21366   echo "$ac_t""yes" 1>&6
21367   have_setproctitle=yes
21368 else
21369   echo "$ac_t""no" 1>&6
21370
21371                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21372 echo "configure:21373: checking for setproctitle in -lutil" >&5
21373 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21374 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21375   echo $ac_n "(cached) $ac_c" 1>&6
21376 else
21377   ac_save_LIBS="$LIBS"
21378 LIBS="-lutil  $LIBS"
21379 cat > conftest.$ac_ext <<EOF
21380 #line 21381 "configure"
21381 #include "confdefs.h"
21382 /* Override any gcc2 internal prototype to avoid an error.  */
21383 /* We use char because int might match the return type of a gcc2
21384     builtin and then its argument prototype would still apply.  */
21385 char setproctitle();
21386
21387 int main() {
21388 setproctitle()
21389 ; return 0; }
21390 EOF
21391 if { (eval echo configure:21392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21392   rm -rf conftest*
21393   eval "ac_cv_lib_$ac_lib_var=yes"
21394 else
21395   echo "configure: failed program was:" >&5
21396   cat conftest.$ac_ext >&5
21397   rm -rf conftest*
21398   eval "ac_cv_lib_$ac_lib_var=no"
21399 fi
21400 rm -f conftest*
21401 LIBS="$ac_save_LIBS"
21402
21403 fi
21404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21405   echo "$ac_t""yes" 1>&6
21406   have_setproctitle=yes
21407                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21408 else
21409   echo "$ac_t""no" 1>&6
21410 have_setproctitle=no
21411                         LIBOBJS="$LIBOBJS setproctitle.o"
21412                         LIBSRCS="$LIBSRCS setproctitle.c"
21413 fi
21414
21415 fi
21416
21417
21418         if test $have_setproctitle = yes ; then
21419                 cat >> confdefs.h <<\EOF
21420 #define HAVE_SETPROCTITLE 1
21421 EOF
21422
21423         fi
21424 fi
21425
21426 if test $ol_enable_slp != no ; then
21427         for ac_hdr in slp.h 
21428 do
21429 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21430 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21431 echo "configure:21432: checking for $ac_hdr" >&5
21432 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21433   echo $ac_n "(cached) $ac_c" 1>&6
21434 else
21435   cat > conftest.$ac_ext <<EOF
21436 #line 21437 "configure"
21437 #include "confdefs.h"
21438 #include <$ac_hdr>
21439 EOF
21440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21441 { (eval echo configure:21442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21443 if test -z "$ac_err"; then
21444   rm -rf conftest*
21445   eval "ac_cv_header_$ac_safe=yes"
21446 else
21447   echo "$ac_err" >&5
21448   echo "configure: failed program was:" >&5
21449   cat conftest.$ac_ext >&5
21450   rm -rf conftest*
21451   eval "ac_cv_header_$ac_safe=no"
21452 fi
21453 rm -f conftest*
21454 fi
21455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21456   echo "$ac_t""yes" 1>&6
21457     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21458   cat >> confdefs.h <<EOF
21459 #define $ac_tr_hdr 1
21460 EOF
21461  
21462 else
21463   echo "$ac_t""no" 1>&6
21464 fi
21465 done
21466
21467
21468         if test $ac_cv_header_slp_h = yes ; then
21469                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21470 echo "configure:21471: checking for SLPOpen in -lslp" >&5
21471 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21472 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21473   echo $ac_n "(cached) $ac_c" 1>&6
21474 else
21475   ac_save_LIBS="$LIBS"
21476 LIBS="-lslp  $LIBS"
21477 cat > conftest.$ac_ext <<EOF
21478 #line 21479 "configure"
21479 #include "confdefs.h"
21480 /* Override any gcc2 internal prototype to avoid an error.  */
21481 /* We use char because int might match the return type of a gcc2
21482     builtin and then its argument prototype would still apply.  */
21483 char SLPOpen();
21484
21485 int main() {
21486 SLPOpen()
21487 ; return 0; }
21488 EOF
21489 if { (eval echo configure:21490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21490   rm -rf conftest*
21491   eval "ac_cv_lib_$ac_lib_var=yes"
21492 else
21493   echo "configure: failed program was:" >&5
21494   cat conftest.$ac_ext >&5
21495   rm -rf conftest*
21496   eval "ac_cv_lib_$ac_lib_var=no"
21497 fi
21498 rm -f conftest*
21499 LIBS="$ac_save_LIBS"
21500
21501 fi
21502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21503   echo "$ac_t""yes" 1>&6
21504   have_slp=yes
21505 else
21506   echo "$ac_t""no" 1>&6
21507 have_slp=no
21508 fi
21509
21510                 if test $have_slp = yes ; then
21511                         cat >> confdefs.h <<\EOF
21512 #define HAVE_SLP 1
21513 EOF
21514
21515                         SLAPD_SLP_LIBS=-lslp
21516                 fi
21517
21518         elif test $ol_enable_slp = yes ; then
21519                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21520         fi
21521 fi
21522
21523
21524 echo $ac_n "checking long long""... $ac_c" 1>&6
21525 echo "configure:21526: checking long long" >&5
21526 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21527   echo $ac_n "(cached) $ac_c" 1>&6
21528 else
21529   
21530         cat > conftest.$ac_ext <<EOF
21531 #line 21532 "configure"
21532 #include "confdefs.h"
21533
21534 int main() {
21535 long long x;
21536 ; return 0; }
21537 EOF
21538 if { (eval echo configure:21539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21539   rm -rf conftest*
21540   ol_cv_type_long_long=yes
21541 else
21542   echo "configure: failed program was:" >&5
21543   cat conftest.$ac_ext >&5
21544   rm -rf conftest*
21545   ol_cv_type_long_long=no
21546 fi
21547 rm -f conftest*
21548 fi
21549
21550 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21551 if test $ol_cv_type_long_long = yes; then
21552         cat >> confdefs.h <<\EOF
21553 #define HAVE_LONG_LONG 1
21554 EOF
21555
21556 fi
21557
21558 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21559 echo "configure:21560: checking for ANSI C header files" >&5
21560 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21561   echo $ac_n "(cached) $ac_c" 1>&6
21562 else
21563   cat > conftest.$ac_ext <<EOF
21564 #line 21565 "configure"
21565 #include "confdefs.h"
21566 #include <stdlib.h>
21567 #include <stdarg.h>
21568 #include <string.h>
21569 #include <float.h>
21570 EOF
21571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21572 { (eval echo configure:21573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21574 if test -z "$ac_err"; then
21575   rm -rf conftest*
21576   ac_cv_header_stdc=yes
21577 else
21578   echo "$ac_err" >&5
21579   echo "configure: failed program was:" >&5
21580   cat conftest.$ac_ext >&5
21581   rm -rf conftest*
21582   ac_cv_header_stdc=no
21583 fi
21584 rm -f conftest*
21585
21586 if test $ac_cv_header_stdc = yes; then
21587   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21588 cat > conftest.$ac_ext <<EOF
21589 #line 21590 "configure"
21590 #include "confdefs.h"
21591 #include <string.h>
21592 EOF
21593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21594   egrep "memchr" >/dev/null 2>&1; then
21595   :
21596 else
21597   rm -rf conftest*
21598   ac_cv_header_stdc=no
21599 fi
21600 rm -f conftest*
21601
21602 fi
21603
21604 if test $ac_cv_header_stdc = yes; then
21605   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21606 cat > conftest.$ac_ext <<EOF
21607 #line 21608 "configure"
21608 #include "confdefs.h"
21609 #include <stdlib.h>
21610 EOF
21611 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21612   egrep "free" >/dev/null 2>&1; then
21613   :
21614 else
21615   rm -rf conftest*
21616   ac_cv_header_stdc=no
21617 fi
21618 rm -f conftest*
21619
21620 fi
21621
21622 if test $ac_cv_header_stdc = yes; then
21623   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21624 if test "$cross_compiling" = yes; then
21625   :
21626 else
21627   cat > conftest.$ac_ext <<EOF
21628 #line 21629 "configure"
21629 #include "confdefs.h"
21630 #include <ctype.h>
21631 #if ((' ' & 0x0FF) == 0x020)
21632 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21633 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21634 #else
21635 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21636  || ('j' <= (c) && (c) <= 'r') \
21637  || ('s' <= (c) && (c) <= 'z'))
21638 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21639 #endif
21640 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21641 int main () { int i; for (i = 0; i < 256; i++)
21642 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21643 exit (0); }
21644
21645 EOF
21646 if { (eval echo configure:21647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21647 then
21648   :
21649 else
21650   echo "configure: failed program was:" >&5
21651   cat conftest.$ac_ext >&5
21652   rm -fr conftest*
21653   ac_cv_header_stdc=no
21654 fi
21655 rm -fr conftest*
21656 fi
21657
21658 fi
21659 fi
21660
21661 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21662 if test $ac_cv_header_stdc = yes; then
21663   cat >> confdefs.h <<\EOF
21664 #define STDC_HEADERS 1
21665 EOF
21666
21667 fi
21668
21669 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21670 echo "configure:21671: checking for mode_t" >&5
21671 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21672   echo $ac_n "(cached) $ac_c" 1>&6
21673 else
21674   cat > conftest.$ac_ext <<EOF
21675 #line 21676 "configure"
21676 #include "confdefs.h"
21677 #include <sys/types.h>
21678 #if STDC_HEADERS
21679 #include <stdlib.h>
21680 #include <stddef.h>
21681 #endif
21682
21683 EOF
21684 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21685   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21686   rm -rf conftest*
21687   eval "ac_cv_type_mode_t=yes"
21688 else
21689   rm -rf conftest*
21690   eval "ac_cv_type_mode_t=no"
21691 fi
21692 rm -f conftest*
21693
21694 fi
21695 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21696   echo "$ac_t""yes" 1>&6
21697 else
21698   echo "$ac_t""no" 1>&6
21699   cat >> confdefs.h <<EOF
21700 #define mode_t int
21701 EOF
21702
21703 fi
21704
21705 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21706 echo "configure:21707: checking for off_t" >&5
21707 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21708   echo $ac_n "(cached) $ac_c" 1>&6
21709 else
21710   cat > conftest.$ac_ext <<EOF
21711 #line 21712 "configure"
21712 #include "confdefs.h"
21713 #include <sys/types.h>
21714 #if STDC_HEADERS
21715 #include <stdlib.h>
21716 #include <stddef.h>
21717 #endif
21718
21719 EOF
21720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21721   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21722   rm -rf conftest*
21723   eval "ac_cv_type_off_t=yes"
21724 else
21725   rm -rf conftest*
21726   eval "ac_cv_type_off_t=no"
21727 fi
21728 rm -f conftest*
21729
21730 fi
21731 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21732   echo "$ac_t""yes" 1>&6
21733 else
21734   echo "$ac_t""no" 1>&6
21735   cat >> confdefs.h <<EOF
21736 #define off_t long
21737 EOF
21738
21739 fi
21740
21741 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21742 echo "configure:21743: checking for pid_t" >&5
21743 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21744   echo $ac_n "(cached) $ac_c" 1>&6
21745 else
21746   cat > conftest.$ac_ext <<EOF
21747 #line 21748 "configure"
21748 #include "confdefs.h"
21749 #include <sys/types.h>
21750 #if STDC_HEADERS
21751 #include <stdlib.h>
21752 #include <stddef.h>
21753 #endif
21754
21755 EOF
21756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21757   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21758   rm -rf conftest*
21759   eval "ac_cv_type_pid_t=yes"
21760 else
21761   rm -rf conftest*
21762   eval "ac_cv_type_pid_t=no"
21763 fi
21764 rm -f conftest*
21765
21766 fi
21767 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21768   echo "$ac_t""yes" 1>&6
21769 else
21770   echo "$ac_t""no" 1>&6
21771   cat >> confdefs.h <<EOF
21772 #define pid_t int
21773 EOF
21774
21775 fi
21776
21777 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21778 echo "configure:21779: checking for ptrdiff_t" >&5
21779 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21780   echo $ac_n "(cached) $ac_c" 1>&6
21781 else
21782   cat > conftest.$ac_ext <<EOF
21783 #line 21784 "configure"
21784 #include "confdefs.h"
21785 #include <stddef.h>
21786 int main() {
21787 ptrdiff_t p
21788 ; return 0; }
21789 EOF
21790 if { (eval echo configure:21791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21791   rm -rf conftest*
21792   am_cv_type_ptrdiff_t=yes
21793 else
21794   echo "configure: failed program was:" >&5
21795   cat conftest.$ac_ext >&5
21796   rm -rf conftest*
21797   am_cv_type_ptrdiff_t=no
21798 fi
21799 rm -f conftest*
21800 fi
21801
21802 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21803    if test $am_cv_type_ptrdiff_t = yes; then
21804      cat >> confdefs.h <<\EOF
21805 #define HAVE_PTRDIFF_T 1
21806 EOF
21807
21808    fi
21809
21810 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21811 echo "configure:21812: checking return type of signal handlers" >&5
21812 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21813   echo $ac_n "(cached) $ac_c" 1>&6
21814 else
21815   cat > conftest.$ac_ext <<EOF
21816 #line 21817 "configure"
21817 #include "confdefs.h"
21818 #include <sys/types.h>
21819 #include <signal.h>
21820 #ifdef signal
21821 #undef signal
21822 #endif
21823 #ifdef __cplusplus
21824 extern "C" void (*signal (int, void (*)(int)))(int);
21825 #else
21826 void (*signal ()) ();
21827 #endif
21828
21829 int main() {
21830 int i;
21831 ; return 0; }
21832 EOF
21833 if { (eval echo configure:21834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21834   rm -rf conftest*
21835   ac_cv_type_signal=void
21836 else
21837   echo "configure: failed program was:" >&5
21838   cat conftest.$ac_ext >&5
21839   rm -rf conftest*
21840   ac_cv_type_signal=int
21841 fi
21842 rm -f conftest*
21843 fi
21844
21845 echo "$ac_t""$ac_cv_type_signal" 1>&6
21846 cat >> confdefs.h <<EOF
21847 #define RETSIGTYPE $ac_cv_type_signal
21848 EOF
21849
21850
21851 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21852 echo "configure:21853: checking for size_t" >&5
21853 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21854   echo $ac_n "(cached) $ac_c" 1>&6
21855 else
21856   cat > conftest.$ac_ext <<EOF
21857 #line 21858 "configure"
21858 #include "confdefs.h"
21859 #include <sys/types.h>
21860 #if STDC_HEADERS
21861 #include <stdlib.h>
21862 #include <stddef.h>
21863 #endif
21864
21865 EOF
21866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21867   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21868   rm -rf conftest*
21869   eval "ac_cv_type_size_t=yes"
21870 else
21871   rm -rf conftest*
21872   eval "ac_cv_type_size_t=no"
21873 fi
21874 rm -f conftest*
21875
21876 fi
21877 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21878   echo "$ac_t""yes" 1>&6
21879 else
21880   echo "$ac_t""no" 1>&6
21881   cat >> confdefs.h <<EOF
21882 #define size_t unsigned
21883 EOF
21884
21885 fi
21886
21887
21888 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21889 echo "configure:21890: checking for ssize_t" >&5
21890 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21891   echo $ac_n "(cached) $ac_c" 1>&6
21892 else
21893   cat > conftest.$ac_ext <<EOF
21894 #line 21895 "configure"
21895 #include "confdefs.h"
21896 #include <sys/types.h>
21897 #if STDC_HEADERS
21898 #include <stdlib.h>
21899 #include <stddef.h>
21900 #endif
21901
21902 EOF
21903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21904   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21905   rm -rf conftest*
21906   eval "ac_cv_type_ssize_t=yes"
21907 else
21908   rm -rf conftest*
21909   eval "ac_cv_type_ssize_t=no"
21910 fi
21911 rm -f conftest*
21912
21913 fi
21914 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21915   echo "$ac_t""yes" 1>&6
21916 else
21917   echo "$ac_t""no" 1>&6
21918   cat >> confdefs.h <<EOF
21919 #define ssize_t signed int
21920 EOF
21921
21922 fi
21923
21924 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21925 echo "configure:21926: checking for caddr_t" >&5
21926 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21927   echo $ac_n "(cached) $ac_c" 1>&6
21928 else
21929   cat > conftest.$ac_ext <<EOF
21930 #line 21931 "configure"
21931 #include "confdefs.h"
21932 #include <sys/types.h>
21933 #if STDC_HEADERS
21934 #include <stdlib.h>
21935 #include <stddef.h>
21936 #endif
21937
21938 EOF
21939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21940   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21941   rm -rf conftest*
21942   eval "ac_cv_type_caddr_t=yes"
21943 else
21944   rm -rf conftest*
21945   eval "ac_cv_type_caddr_t=no"
21946 fi
21947 rm -f conftest*
21948
21949 fi
21950 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21951   echo "$ac_t""yes" 1>&6
21952 else
21953   echo "$ac_t""no" 1>&6
21954   cat >> confdefs.h <<EOF
21955 #define caddr_t char *
21956 EOF
21957
21958 fi
21959
21960
21961 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21962 echo "configure:21963: checking for socklen_t" >&5
21963 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21964   echo $ac_n "(cached) $ac_c" 1>&6
21965 else
21966   cat > conftest.$ac_ext <<EOF
21967 #line 21968 "configure"
21968 #include "confdefs.h"
21969
21970 #ifdef HAVE_SYS_TYPES_H
21971 #include <sys/types.h>
21972 #endif
21973 #ifdef HAVE_SYS_SOCKET_H
21974 #include <sys/socket.h>
21975 #endif
21976
21977 int main() {
21978 socklen_t len;
21979 ; return 0; }
21980 EOF
21981 if { (eval echo configure:21982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21982   rm -rf conftest*
21983   ol_cv_type_socklen_t=yes
21984 else
21985   echo "configure: failed program was:" >&5
21986   cat conftest.$ac_ext >&5
21987   rm -rf conftest*
21988   ol_cv_type_socklen_t=no
21989 fi
21990 rm -f conftest*
21991 fi
21992
21993 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21994   if test $ol_cv_type_socklen_t = no; then
21995     cat >> confdefs.h <<\EOF
21996 #define socklen_t int
21997 EOF
21998
21999   fi
22000  
22001 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
22002 echo "configure:22003: checking for member st_blksize in aggregate type struct stat" >&5
22003 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
22004   echo $ac_n "(cached) $ac_c" 1>&6
22005 else
22006   cat > conftest.$ac_ext <<EOF
22007 #line 22008 "configure"
22008 #include "confdefs.h"
22009 #include <sys/types.h>
22010 #include <sys/stat.h>
22011 int main() {
22012 struct stat foo; foo.st_blksize;
22013 ; return 0; }
22014 EOF
22015 if { (eval echo configure:22016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22016   rm -rf conftest*
22017   ac_cv_c_struct_member_st_blksize=yes
22018 else
22019   echo "configure: failed program was:" >&5
22020   cat conftest.$ac_ext >&5
22021   rm -rf conftest*
22022   ac_cv_c_struct_member_st_blksize=no
22023 fi
22024 rm -f conftest*
22025 fi
22026
22027 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22028 st_blksize="$ac_cv_c_struct_member_st_blksize"
22029 if test $ac_cv_c_struct_member_st_blksize = yes; then
22030   cat >> confdefs.h <<\EOF
22031 #define HAVE_ST_BLKSIZE 1
22032 EOF
22033
22034 fi
22035
22036 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22037 echo "configure:22038: checking whether time.h and sys/time.h may both be included" >&5
22038 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22039   echo $ac_n "(cached) $ac_c" 1>&6
22040 else
22041   cat > conftest.$ac_ext <<EOF
22042 #line 22043 "configure"
22043 #include "confdefs.h"
22044 #include <sys/types.h>
22045 #include <sys/time.h>
22046 #include <time.h>
22047 int main() {
22048 struct tm *tp;
22049 ; return 0; }
22050 EOF
22051 if { (eval echo configure:22052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22052   rm -rf conftest*
22053   ac_cv_header_time=yes
22054 else
22055   echo "configure: failed program was:" >&5
22056   cat conftest.$ac_ext >&5
22057   rm -rf conftest*
22058   ac_cv_header_time=no
22059 fi
22060 rm -f conftest*
22061 fi
22062
22063 echo "$ac_t""$ac_cv_header_time" 1>&6
22064 if test $ac_cv_header_time = yes; then
22065   cat >> confdefs.h <<\EOF
22066 #define TIME_WITH_SYS_TIME 1
22067 EOF
22068
22069 fi
22070
22071 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22072 echo "configure:22073: checking whether struct tm is in sys/time.h or time.h" >&5
22073 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22074   echo $ac_n "(cached) $ac_c" 1>&6
22075 else
22076   cat > conftest.$ac_ext <<EOF
22077 #line 22078 "configure"
22078 #include "confdefs.h"
22079 #include <sys/types.h>
22080 #include <time.h>
22081 int main() {
22082 struct tm *tp; tp->tm_sec;
22083 ; return 0; }
22084 EOF
22085 if { (eval echo configure:22086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22086   rm -rf conftest*
22087   ac_cv_struct_tm=time.h
22088 else
22089   echo "configure: failed program was:" >&5
22090   cat conftest.$ac_ext >&5
22091   rm -rf conftest*
22092   ac_cv_struct_tm=sys/time.h
22093 fi
22094 rm -f conftest*
22095 fi
22096
22097 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22098 if test $ac_cv_struct_tm = sys/time.h; then
22099   cat >> confdefs.h <<\EOF
22100 #define TM_IN_SYS_TIME 1
22101 EOF
22102
22103 fi
22104
22105 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22106 echo "configure:22107: checking for uid_t in sys/types.h" >&5
22107 if eval "test \"\${ac_cv_type_uid_t+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 #include <sys/types.h>
22114 EOF
22115 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22116   egrep "uid_t" >/dev/null 2>&1; then
22117   rm -rf conftest*
22118   ac_cv_type_uid_t=yes
22119 else
22120   rm -rf conftest*
22121   ac_cv_type_uid_t=no
22122 fi
22123 rm -f conftest*
22124
22125 fi
22126
22127 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22128 if test $ac_cv_type_uid_t = no; then
22129   cat >> confdefs.h <<\EOF
22130 #define uid_t int
22131 EOF
22132
22133   cat >> confdefs.h <<\EOF
22134 #define gid_t int
22135 EOF
22136
22137 fi
22138
22139 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22140 echo "configure:22141: checking for sig_atomic_t" >&5
22141 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22142   echo $ac_n "(cached) $ac_c" 1>&6
22143 else
22144   cat > conftest.$ac_ext <<EOF
22145 #line 22146 "configure"
22146 #include "confdefs.h"
22147 #include <signal.h>
22148 int main() {
22149 sig_atomic_t atomic;
22150 ; return 0; }
22151 EOF
22152 if { (eval echo configure:22153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22153   rm -rf conftest*
22154   ol_cv_type_sig_atomic_t=yes
22155 else
22156   echo "configure: failed program was:" >&5
22157   cat conftest.$ac_ext >&5
22158   rm -rf conftest*
22159   ol_cv_type_sig_atomic_t=no
22160 fi
22161 rm -f conftest*
22162 fi
22163
22164 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22165   if test $ol_cv_type_sig_atomic_t = no; then
22166     cat >> confdefs.h <<\EOF
22167 #define sig_atomic_t int
22168 EOF
22169
22170   fi
22171  
22172
22173
22174 # test for pw_gecos in struct passwd
22175 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22176 echo "configure:22177: checking struct passwd for pw_gecos" >&5
22177 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22178   echo $ac_n "(cached) $ac_c" 1>&6
22179 else
22180   
22181         cat > conftest.$ac_ext <<EOF
22182 #line 22183 "configure"
22183 #include "confdefs.h"
22184 #include <pwd.h>
22185 int main() {
22186
22187         struct passwd pwd;
22188         pwd.pw_gecos = pwd.pw_name;
22189
22190 ; return 0; }
22191 EOF
22192 if { (eval echo configure:22193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22193   rm -rf conftest*
22194   ol_cv_struct_passwd_pw_gecos=yes
22195 else
22196   echo "configure: failed program was:" >&5
22197   cat conftest.$ac_ext >&5
22198   rm -rf conftest*
22199   ol_cv_struct_passwd_pw_gecos=no
22200 fi
22201 rm -f conftest*
22202 fi
22203
22204 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22205 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22206         cat >> confdefs.h <<\EOF
22207 #define HAVE_PW_GECOS 1
22208 EOF
22209
22210 fi
22211
22212 # test for pw_passwd in struct passwd
22213 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22214 echo "configure:22215: checking struct passwd for pw_passwd" >&5
22215 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22216   echo $ac_n "(cached) $ac_c" 1>&6
22217 else
22218   
22219         cat > conftest.$ac_ext <<EOF
22220 #line 22221 "configure"
22221 #include "confdefs.h"
22222 #include <pwd.h>
22223 int main() {
22224
22225         struct passwd pwd;
22226         pwd.pw_passwd = pwd.pw_name;
22227
22228 ; return 0; }
22229 EOF
22230 if { (eval echo configure:22231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22231   rm -rf conftest*
22232   ol_cv_struct_passwd_pw_passwd=yes
22233 else
22234   echo "configure: failed program was:" >&5
22235   cat conftest.$ac_ext >&5
22236   rm -rf conftest*
22237   ol_cv_struct_passwd_pw_passwd=no
22238 fi
22239 rm -f conftest*
22240 fi
22241
22242 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22243 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22244         cat >> confdefs.h <<\EOF
22245 #define HAVE_PW_PASSWD 1
22246 EOF
22247
22248 fi
22249
22250
22251 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22252 echo "configure:22253: checking if toupper() requires islower()" >&5
22253 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22254   echo $ac_n "(cached) $ac_c" 1>&6
22255 else
22256   
22257         if test "$cross_compiling" = yes; then
22258   ol_cv_c_upper_lower=safe
22259 else
22260   cat > conftest.$ac_ext <<EOF
22261 #line 22262 "configure"
22262 #include "confdefs.h"
22263
22264 #include <ctype.h>
22265 main()
22266 {
22267         if ('C' == toupper('C'))
22268                 exit(0);
22269         else
22270                 exit(1);
22271 }
22272 EOF
22273 if { (eval echo configure:22274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22274 then
22275   ol_cv_c_upper_lower=no
22276 else
22277   echo "configure: failed program was:" >&5
22278   cat conftest.$ac_ext >&5
22279   rm -fr conftest*
22280   ol_cv_c_upper_lower=yes
22281 fi
22282 rm -fr conftest*
22283 fi
22284
22285 fi
22286
22287 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22288 if test $ol_cv_c_upper_lower != no ; then
22289         cat >> confdefs.h <<\EOF
22290 #define C_UPPER_LOWER 1
22291 EOF
22292
22293 fi
22294
22295 echo $ac_n "checking for working const""... $ac_c" 1>&6
22296 echo "configure:22297: checking for working const" >&5
22297 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22298   echo $ac_n "(cached) $ac_c" 1>&6
22299 else
22300   cat > conftest.$ac_ext <<EOF
22301 #line 22302 "configure"
22302 #include "confdefs.h"
22303
22304 int main() {
22305
22306 /* Ultrix mips cc rejects this.  */
22307 typedef int charset[2]; const charset x;
22308 /* SunOS 4.1.1 cc rejects this.  */
22309 char const *const *ccp;
22310 char **p;
22311 /* NEC SVR4.0.2 mips cc rejects this.  */
22312 struct point {int x, y;};
22313 static struct point const zero = {0,0};
22314 /* AIX XL C 1.02.0.0 rejects this.
22315    It does not let you subtract one const X* pointer from another in an arm
22316    of an if-expression whose if-part is not a constant expression */
22317 const char *g = "string";
22318 ccp = &g + (g ? g-g : 0);
22319 /* HPUX 7.0 cc rejects these. */
22320 ++ccp;
22321 p = (char**) ccp;
22322 ccp = (char const *const *) p;
22323 { /* SCO 3.2v4 cc rejects this.  */
22324   char *t;
22325   char const *s = 0 ? (char *) 0 : (char const *) 0;
22326
22327   *t++ = 0;
22328 }
22329 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22330   int x[] = {25, 17};
22331   const int *foo = &x[0];
22332   ++foo;
22333 }
22334 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22335   typedef const int *iptr;
22336   iptr p = 0;
22337   ++p;
22338 }
22339 { /* AIX XL C 1.02.0.0 rejects this saying
22340      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22341   struct s { int j; const int *ap[3]; };
22342   struct s *b; b->j = 5;
22343 }
22344 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22345   const int foo = 10;
22346 }
22347
22348 ; return 0; }
22349 EOF
22350 if { (eval echo configure:22351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22351   rm -rf conftest*
22352   ac_cv_c_const=yes
22353 else
22354   echo "configure: failed program was:" >&5
22355   cat conftest.$ac_ext >&5
22356   rm -rf conftest*
22357   ac_cv_c_const=no
22358 fi
22359 rm -f conftest*
22360 fi
22361
22362 echo "$ac_t""$ac_cv_c_const" 1>&6
22363 if test $ac_cv_c_const = no; then
22364   cat >> confdefs.h <<\EOF
22365 #define const 
22366 EOF
22367
22368 fi
22369
22370 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22371 echo "configure:22372: checking if compiler understands volatile" >&5
22372 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22373   echo $ac_n "(cached) $ac_c" 1>&6
22374 else
22375   cat > conftest.$ac_ext <<EOF
22376 #line 22377 "configure"
22377 #include "confdefs.h"
22378 int x, y, z;
22379 int main() {
22380 volatile int a; int * volatile b = x ? &y : &z;
22381       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22382       *b = 0;
22383 ; return 0; }
22384 EOF
22385 if { (eval echo configure:22386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22386   rm -rf conftest*
22387   ol_cv_c_volatile=yes
22388 else
22389   echo "configure: failed program was:" >&5
22390   cat conftest.$ac_ext >&5
22391   rm -rf conftest*
22392   ol_cv_c_volatile=no
22393 fi
22394 rm -f conftest*
22395 fi
22396
22397 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22398   if test $ol_cv_c_volatile = yes; then
22399     : 
22400   else
22401     cat >> confdefs.h <<\EOF
22402 #define volatile 
22403 EOF
22404
22405   fi
22406  
22407
22408 if test $cross_compiling = yes ; then
22409         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22410         cat >> confdefs.h <<\EOF
22411 #define CROSS_COMPILING 1
22412 EOF
22413
22414 else
22415         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22416 echo "configure:22417: checking whether byte ordering is bigendian" >&5
22417 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22418   echo $ac_n "(cached) $ac_c" 1>&6
22419 else
22420   ac_cv_c_bigendian=unknown
22421 # See if sys/param.h defines the BYTE_ORDER macro.
22422 cat > conftest.$ac_ext <<EOF
22423 #line 22424 "configure"
22424 #include "confdefs.h"
22425 #include <sys/types.h>
22426 #include <sys/param.h>
22427 int main() {
22428
22429 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22430  bogus endian macros
22431 #endif
22432 ; return 0; }
22433 EOF
22434 if { (eval echo configure:22435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22435   rm -rf conftest*
22436   # It does; now see whether it defined to BIG_ENDIAN or not.
22437 cat > conftest.$ac_ext <<EOF
22438 #line 22439 "configure"
22439 #include "confdefs.h"
22440 #include <sys/types.h>
22441 #include <sys/param.h>
22442 int main() {
22443
22444 #if BYTE_ORDER != BIG_ENDIAN
22445  not big endian
22446 #endif
22447 ; return 0; }
22448 EOF
22449 if { (eval echo configure:22450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22450   rm -rf conftest*
22451   ac_cv_c_bigendian=yes
22452 else
22453   echo "configure: failed program was:" >&5
22454   cat conftest.$ac_ext >&5
22455   rm -rf conftest*
22456   ac_cv_c_bigendian=no
22457 fi
22458 rm -f conftest*
22459 else
22460   echo "configure: failed program was:" >&5
22461   cat conftest.$ac_ext >&5
22462 fi
22463 rm -f conftest*
22464 if test $ac_cv_c_bigendian = unknown; then
22465 if test "$cross_compiling" = yes; then
22466     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22467 else
22468   cat > conftest.$ac_ext <<EOF
22469 #line 22470 "configure"
22470 #include "confdefs.h"
22471 main () {
22472   /* Are we little or big endian?  From Harbison&Steele.  */
22473   union
22474   {
22475     long l;
22476     char c[sizeof (long)];
22477   } u;
22478   u.l = 1;
22479   exit (u.c[sizeof (long) - 1] == 1);
22480 }
22481 EOF
22482 if { (eval echo configure:22483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22483 then
22484   ac_cv_c_bigendian=no
22485 else
22486   echo "configure: failed program was:" >&5
22487   cat conftest.$ac_ext >&5
22488   rm -fr conftest*
22489   ac_cv_c_bigendian=yes
22490 fi
22491 rm -fr conftest*
22492 fi
22493
22494 fi
22495 fi
22496
22497 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22498 if test $ac_cv_c_bigendian = yes; then
22499   cat >> confdefs.h <<\EOF
22500 #define WORDS_BIGENDIAN 1
22501 EOF
22502
22503 fi
22504
22505 fi
22506
22507 echo $ac_n "checking size of short""... $ac_c" 1>&6
22508 echo "configure:22509: checking size of short" >&5 
22509 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22510   echo $ac_n "(cached) $ac_c" 1>&6
22511 else
22512   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22513   cat > conftest.$ac_ext <<EOF
22514 #line 22515 "configure"
22515 #include "confdefs.h"
22516 #include "confdefs.h" 
22517 #include <sys/types.h> 
22518  
22519
22520 int main() {
22521 switch (0) case 0: case (sizeof (short) == $ac_size):;
22522 ; return 0; }
22523 EOF
22524 if { (eval echo configure:22525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22525   rm -rf conftest*
22526   ac_cv_sizeof_short=$ac_size
22527 else
22528   echo "configure: failed program was:" >&5
22529   cat conftest.$ac_ext >&5
22530 fi
22531 rm -f conftest* 
22532   if test x$ac_cv_sizeof_short != x ; then break; fi 
22533 done 
22534
22535 fi
22536  
22537 if test x$ac_cv_sizeof_short = x ; then 
22538   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22539 fi 
22540 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22541 cat >> confdefs.h <<EOF
22542 #define SIZEOF_SHORT $ac_cv_sizeof_short
22543 EOF
22544  
22545  
22546 echo $ac_n "checking size of int""... $ac_c" 1>&6
22547 echo "configure:22548: checking size of int" >&5 
22548 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22549   echo $ac_n "(cached) $ac_c" 1>&6
22550 else
22551   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22552   cat > conftest.$ac_ext <<EOF
22553 #line 22554 "configure"
22554 #include "confdefs.h"
22555 #include "confdefs.h" 
22556 #include <sys/types.h> 
22557  
22558
22559 int main() {
22560 switch (0) case 0: case (sizeof (int) == $ac_size):;
22561 ; return 0; }
22562 EOF
22563 if { (eval echo configure:22564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22564   rm -rf conftest*
22565   ac_cv_sizeof_int=$ac_size
22566 else
22567   echo "configure: failed program was:" >&5
22568   cat conftest.$ac_ext >&5
22569 fi
22570 rm -f conftest* 
22571   if test x$ac_cv_sizeof_int != x ; then break; fi 
22572 done 
22573
22574 fi
22575  
22576 if test x$ac_cv_sizeof_int = x ; then 
22577   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22578 fi 
22579 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22580 cat >> confdefs.h <<EOF
22581 #define SIZEOF_INT $ac_cv_sizeof_int
22582 EOF
22583  
22584  
22585 echo $ac_n "checking size of long""... $ac_c" 1>&6
22586 echo "configure:22587: checking size of long" >&5 
22587 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22588   echo $ac_n "(cached) $ac_c" 1>&6
22589 else
22590   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22591   cat > conftest.$ac_ext <<EOF
22592 #line 22593 "configure"
22593 #include "confdefs.h"
22594 #include "confdefs.h" 
22595 #include <sys/types.h> 
22596  
22597
22598 int main() {
22599 switch (0) case 0: case (sizeof (long) == $ac_size):;
22600 ; return 0; }
22601 EOF
22602 if { (eval echo configure:22603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22603   rm -rf conftest*
22604   ac_cv_sizeof_long=$ac_size
22605 else
22606   echo "configure: failed program was:" >&5
22607   cat conftest.$ac_ext >&5
22608 fi
22609 rm -f conftest* 
22610   if test x$ac_cv_sizeof_long != x ; then break; fi 
22611 done 
22612
22613 fi
22614  
22615 if test x$ac_cv_sizeof_long = x ; then 
22616   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22617 fi 
22618 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22619 cat >> confdefs.h <<EOF
22620 #define SIZEOF_LONG $ac_cv_sizeof_long
22621 EOF
22622  
22623
22624
22625 if test "$ac_cv_sizeof_int" -lt 4 ; then
22626         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22627
22628         cat >> confdefs.h <<\EOF
22629 #define LBER_INT_T long
22630 EOF
22631
22632 else
22633         cat >> confdefs.h <<\EOF
22634 #define LBER_INT_T int
22635 EOF
22636
22637 fi
22638
22639 cat >> confdefs.h <<\EOF
22640 #define LBER_LEN_T long
22641 EOF
22642
22643 cat >> confdefs.h <<\EOF
22644 #define LBER_SOCKET_T int
22645 EOF
22646
22647 cat >> confdefs.h <<\EOF
22648 #define LBER_TAG_T long
22649 EOF
22650
22651
22652 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22653 echo "configure:22654: checking for 8-bit clean memcmp" >&5
22654 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22655   echo $ac_n "(cached) $ac_c" 1>&6
22656 else
22657   if test "$cross_compiling" = yes; then
22658   ac_cv_func_memcmp_clean=no
22659 else
22660   cat > conftest.$ac_ext <<EOF
22661 #line 22662 "configure"
22662 #include "confdefs.h"
22663
22664 main()
22665 {
22666   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22667   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22668 }
22669
22670 EOF
22671 if { (eval echo configure:22672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22672 then
22673   ac_cv_func_memcmp_clean=yes
22674 else
22675   echo "configure: failed program was:" >&5
22676   cat conftest.$ac_ext >&5
22677   rm -fr conftest*
22678   ac_cv_func_memcmp_clean=no
22679 fi
22680 rm -fr conftest*
22681 fi
22682
22683 fi
22684
22685 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22686 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22687
22688 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22689 echo "configure:22690: checking for strftime" >&5
22690 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22691   echo $ac_n "(cached) $ac_c" 1>&6
22692 else
22693   cat > conftest.$ac_ext <<EOF
22694 #line 22695 "configure"
22695 #include "confdefs.h"
22696 /* System header to define __stub macros and hopefully few prototypes,
22697     which can conflict with char strftime(); below.  */
22698 #include <assert.h>
22699 /* Override any gcc2 internal prototype to avoid an error.  */
22700 /* We use char because int might match the return type of a gcc2
22701     builtin and then its argument prototype would still apply.  */
22702 char strftime();
22703 char (*f)();
22704
22705 int main() {
22706
22707 /* The GNU C library defines this for functions which it implements
22708     to always fail with ENOSYS.  Some functions are actually named
22709     something starting with __ and the normal name is an alias.  */
22710 #if defined (__stub_strftime) || defined (__stub___strftime)
22711 choke me
22712 #else
22713 f = strftime;
22714 #endif
22715
22716 ; return 0; }
22717 EOF
22718 if { (eval echo configure:22719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22719   rm -rf conftest*
22720   eval "ac_cv_func_strftime=yes"
22721 else
22722   echo "configure: failed program was:" >&5
22723   cat conftest.$ac_ext >&5
22724   rm -rf conftest*
22725   eval "ac_cv_func_strftime=no"
22726 fi
22727 rm -f conftest*
22728 fi
22729
22730 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22731   echo "$ac_t""yes" 1>&6
22732   cat >> confdefs.h <<\EOF
22733 #define HAVE_STRFTIME 1
22734 EOF
22735
22736 else
22737   echo "$ac_t""no" 1>&6
22738 # strftime is in -lintl on SCO UNIX.
22739 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22740 echo "configure:22741: checking for strftime in -lintl" >&5
22741 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22742 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22743   echo $ac_n "(cached) $ac_c" 1>&6
22744 else
22745   ac_save_LIBS="$LIBS"
22746 LIBS="-lintl  $LIBS"
22747 cat > conftest.$ac_ext <<EOF
22748 #line 22749 "configure"
22749 #include "confdefs.h"
22750 /* Override any gcc2 internal prototype to avoid an error.  */
22751 /* We use char because int might match the return type of a gcc2
22752     builtin and then its argument prototype would still apply.  */
22753 char strftime();
22754
22755 int main() {
22756 strftime()
22757 ; return 0; }
22758 EOF
22759 if { (eval echo configure:22760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22760   rm -rf conftest*
22761   eval "ac_cv_lib_$ac_lib_var=yes"
22762 else
22763   echo "configure: failed program was:" >&5
22764   cat conftest.$ac_ext >&5
22765   rm -rf conftest*
22766   eval "ac_cv_lib_$ac_lib_var=no"
22767 fi
22768 rm -f conftest*
22769 LIBS="$ac_save_LIBS"
22770
22771 fi
22772 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22773   echo "$ac_t""yes" 1>&6
22774   cat >> confdefs.h <<\EOF
22775 #define HAVE_STRFTIME 1
22776 EOF
22777
22778 LIBS="-lintl $LIBS"
22779 else
22780   echo "$ac_t""no" 1>&6
22781 fi
22782
22783 fi
22784
22785
22786 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22787 echo "configure:22788: checking for inet_aton()" >&5
22788 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22789   echo $ac_n "(cached) $ac_c" 1>&6
22790 else
22791   cat > conftest.$ac_ext <<EOF
22792 #line 22793 "configure"
22793 #include "confdefs.h"
22794
22795 #ifdef HAVE_SYS_TYPES_H
22796 #       include <sys/types.h>
22797 #endif
22798 #ifdef HAVE_SYS_SOCKET_H
22799 #       include <sys/socket.h>
22800 #       ifdef HAVE_SYS_SELECT_H
22801 #               include <sys/select.h>
22802 #       endif
22803 #       include <netinet/in.h>
22804 #       ifdef HAVE_ARPA_INET_H
22805 #               include <arpa/inet.h>
22806 #       endif
22807 #endif
22808
22809 int main() {
22810 struct in_addr in;
22811 int rc = inet_aton( "255.255.255.255", &in );
22812 ; return 0; }
22813 EOF
22814 if { (eval echo configure:22815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22815   rm -rf conftest*
22816   ol_cv_func_inet_aton=yes
22817 else
22818   echo "configure: failed program was:" >&5
22819   cat conftest.$ac_ext >&5
22820   rm -rf conftest*
22821   ol_cv_func_inet_aton=no
22822 fi
22823 rm -f conftest*
22824 fi
22825
22826 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22827   if test $ol_cv_func_inet_aton != no; then
22828     cat >> confdefs.h <<\EOF
22829 #define HAVE_INET_ATON 1
22830 EOF
22831
22832   fi
22833  
22834
22835 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22836 echo "configure:22837: checking for _spawnlp" >&5
22837 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22838   echo $ac_n "(cached) $ac_c" 1>&6
22839 else
22840   cat > conftest.$ac_ext <<EOF
22841 #line 22842 "configure"
22842 #include "confdefs.h"
22843 /* System header to define __stub macros and hopefully few prototypes,
22844     which can conflict with char _spawnlp(); below.  */
22845 #include <assert.h>
22846 /* Override any gcc2 internal prototype to avoid an error.  */
22847 /* We use char because int might match the return type of a gcc2
22848     builtin and then its argument prototype would still apply.  */
22849 char _spawnlp();
22850 char (*f)();
22851
22852 int main() {
22853
22854 /* The GNU C library defines this for functions which it implements
22855     to always fail with ENOSYS.  Some functions are actually named
22856     something starting with __ and the normal name is an alias.  */
22857 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22858 choke me
22859 #else
22860 f = _spawnlp;
22861 #endif
22862
22863 ; return 0; }
22864 EOF
22865 if { (eval echo configure:22866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22866   rm -rf conftest*
22867   eval "ac_cv_func__spawnlp=yes"
22868 else
22869   echo "configure: failed program was:" >&5
22870   cat conftest.$ac_ext >&5
22871   rm -rf conftest*
22872   eval "ac_cv_func__spawnlp=no"
22873 fi
22874 rm -f conftest*
22875 fi
22876
22877 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22878   echo "$ac_t""yes" 1>&6
22879   cat >> confdefs.h <<\EOF
22880 #define HAVE_SPAWNLP 1
22881 EOF
22882
22883 else
22884   echo "$ac_t""no" 1>&6
22885 fi
22886
22887
22888 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22889 echo "configure:22890: checking for _snprintf" >&5
22890 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22891   echo $ac_n "(cached) $ac_c" 1>&6
22892 else
22893   cat > conftest.$ac_ext <<EOF
22894 #line 22895 "configure"
22895 #include "confdefs.h"
22896 /* System header to define __stub macros and hopefully few prototypes,
22897     which can conflict with char _snprintf(); below.  */
22898 #include <assert.h>
22899 /* Override any gcc2 internal prototype to avoid an error.  */
22900 /* We use char because int might match the return type of a gcc2
22901     builtin and then its argument prototype would still apply.  */
22902 char _snprintf();
22903 char (*f)();
22904
22905 int main() {
22906
22907 /* The GNU C library defines this for functions which it implements
22908     to always fail with ENOSYS.  Some functions are actually named
22909     something starting with __ and the normal name is an alias.  */
22910 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22911 choke me
22912 #else
22913 f = _snprintf;
22914 #endif
22915
22916 ; return 0; }
22917 EOF
22918 if { (eval echo configure:22919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22919   rm -rf conftest*
22920   eval "ac_cv_func__snprintf=yes"
22921 else
22922   echo "configure: failed program was:" >&5
22923   cat conftest.$ac_ext >&5
22924   rm -rf conftest*
22925   eval "ac_cv_func__snprintf=no"
22926 fi
22927 rm -f conftest*
22928 fi
22929
22930 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22931   echo "$ac_t""yes" 1>&6
22932   ac_cv_func_snprintf=yes
22933         cat >> confdefs.h <<\EOF
22934 #define snprintf _snprintf
22935 EOF
22936
22937
22938 else
22939   echo "$ac_t""no" 1>&6
22940 fi
22941
22942
22943 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22944 echo "configure:22945: checking for _vsnprintf" >&5
22945 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22946   echo $ac_n "(cached) $ac_c" 1>&6
22947 else
22948   cat > conftest.$ac_ext <<EOF
22949 #line 22950 "configure"
22950 #include "confdefs.h"
22951 /* System header to define __stub macros and hopefully few prototypes,
22952     which can conflict with char _vsnprintf(); below.  */
22953 #include <assert.h>
22954 /* Override any gcc2 internal prototype to avoid an error.  */
22955 /* We use char because int might match the return type of a gcc2
22956     builtin and then its argument prototype would still apply.  */
22957 char _vsnprintf();
22958 char (*f)();
22959
22960 int main() {
22961
22962 /* The GNU C library defines this for functions which it implements
22963     to always fail with ENOSYS.  Some functions are actually named
22964     something starting with __ and the normal name is an alias.  */
22965 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22966 choke me
22967 #else
22968 f = _vsnprintf;
22969 #endif
22970
22971 ; return 0; }
22972 EOF
22973 if { (eval echo configure:22974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22974   rm -rf conftest*
22975   eval "ac_cv_func__vsnprintf=yes"
22976 else
22977   echo "configure: failed program was:" >&5
22978   cat conftest.$ac_ext >&5
22979   rm -rf conftest*
22980   eval "ac_cv_func__vsnprintf=no"
22981 fi
22982 rm -f conftest*
22983 fi
22984
22985 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22986   echo "$ac_t""yes" 1>&6
22987   ac_cv_func_vsnprintf=yes
22988         cat >> confdefs.h <<\EOF
22989 #define vsnprintf _vsnprintf
22990 EOF
22991
22992
22993 else
22994   echo "$ac_t""no" 1>&6
22995 fi
22996
22997
22998 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22999 echo "configure:23000: checking for vprintf" >&5
23000 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23001   echo $ac_n "(cached) $ac_c" 1>&6
23002 else
23003   cat > conftest.$ac_ext <<EOF
23004 #line 23005 "configure"
23005 #include "confdefs.h"
23006 /* System header to define __stub macros and hopefully few prototypes,
23007     which can conflict with char vprintf(); below.  */
23008 #include <assert.h>
23009 /* Override any gcc2 internal prototype to avoid an error.  */
23010 /* We use char because int might match the return type of a gcc2
23011     builtin and then its argument prototype would still apply.  */
23012 char vprintf();
23013 char (*f)();
23014
23015 int main() {
23016
23017 /* The GNU C library defines this for functions which it implements
23018     to always fail with ENOSYS.  Some functions are actually named
23019     something starting with __ and the normal name is an alias.  */
23020 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23021 choke me
23022 #else
23023 f = vprintf;
23024 #endif
23025
23026 ; return 0; }
23027 EOF
23028 if { (eval echo configure:23029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23029   rm -rf conftest*
23030   eval "ac_cv_func_vprintf=yes"
23031 else
23032   echo "configure: failed program was:" >&5
23033   cat conftest.$ac_ext >&5
23034   rm -rf conftest*
23035   eval "ac_cv_func_vprintf=no"
23036 fi
23037 rm -f conftest*
23038 fi
23039
23040 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23041   echo "$ac_t""yes" 1>&6
23042   cat >> confdefs.h <<\EOF
23043 #define HAVE_VPRINTF 1
23044 EOF
23045
23046 else
23047   echo "$ac_t""no" 1>&6
23048 fi
23049
23050 if test "$ac_cv_func_vprintf" != yes; then
23051 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23052 echo "configure:23053: checking for _doprnt" >&5
23053 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23054   echo $ac_n "(cached) $ac_c" 1>&6
23055 else
23056   cat > conftest.$ac_ext <<EOF
23057 #line 23058 "configure"
23058 #include "confdefs.h"
23059 /* System header to define __stub macros and hopefully few prototypes,
23060     which can conflict with char _doprnt(); below.  */
23061 #include <assert.h>
23062 /* Override any gcc2 internal prototype to avoid an error.  */
23063 /* We use char because int might match the return type of a gcc2
23064     builtin and then its argument prototype would still apply.  */
23065 char _doprnt();
23066 char (*f)();
23067
23068 int main() {
23069
23070 /* The GNU C library defines this for functions which it implements
23071     to always fail with ENOSYS.  Some functions are actually named
23072     something starting with __ and the normal name is an alias.  */
23073 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23074 choke me
23075 #else
23076 f = _doprnt;
23077 #endif
23078
23079 ; return 0; }
23080 EOF
23081 if { (eval echo configure:23082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23082   rm -rf conftest*
23083   eval "ac_cv_func__doprnt=yes"
23084 else
23085   echo "configure: failed program was:" >&5
23086   cat conftest.$ac_ext >&5
23087   rm -rf conftest*
23088   eval "ac_cv_func__doprnt=no"
23089 fi
23090 rm -f conftest*
23091 fi
23092
23093 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23094   echo "$ac_t""yes" 1>&6
23095   cat >> confdefs.h <<\EOF
23096 #define HAVE_DOPRNT 1
23097 EOF
23098
23099 else
23100   echo "$ac_t""no" 1>&6
23101 fi
23102
23103 fi
23104
23105
23106 if test $ac_cv_func_vprintf = yes ; then
23107                 for ac_func in snprintf vsnprintf
23108 do
23109 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23110 echo "configure:23111: checking for $ac_func" >&5
23111 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23112   echo $ac_n "(cached) $ac_c" 1>&6
23113 else
23114   cat > conftest.$ac_ext <<EOF
23115 #line 23116 "configure"
23116 #include "confdefs.h"
23117 /* System header to define __stub macros and hopefully few prototypes,
23118     which can conflict with char $ac_func(); below.  */
23119 #include <assert.h>
23120 /* Override any gcc2 internal prototype to avoid an error.  */
23121 /* We use char because int might match the return type of a gcc2
23122     builtin and then its argument prototype would still apply.  */
23123 char $ac_func();
23124 char (*f)();
23125
23126 int main() {
23127
23128 /* The GNU C library defines this for functions which it implements
23129     to always fail with ENOSYS.  Some functions are actually named
23130     something starting with __ and the normal name is an alias.  */
23131 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23132 choke me
23133 #else
23134 f = $ac_func;
23135 #endif
23136
23137 ; return 0; }
23138 EOF
23139 if { (eval echo configure:23140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23140   rm -rf conftest*
23141   eval "ac_cv_func_$ac_func=yes"
23142 else
23143   echo "configure: failed program was:" >&5
23144   cat conftest.$ac_ext >&5
23145   rm -rf conftest*
23146   eval "ac_cv_func_$ac_func=no"
23147 fi
23148 rm -f conftest*
23149 fi
23150
23151 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23152   echo "$ac_t""yes" 1>&6
23153     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23154   cat >> confdefs.h <<EOF
23155 #define $ac_tr_func 1
23156 EOF
23157  
23158 else
23159   echo "$ac_t""no" 1>&6
23160 fi
23161 done
23162
23163 fi
23164
23165 for ac_func in \
23166         bcopy                   \
23167         closesocket             \
23168         chroot                  \
23169         endgrent                \
23170         endpwent                \
23171         fcntl                   \
23172         flock                   \
23173         fstat                   \
23174         getdtablesize   \
23175         getgrgid                \
23176         gethostname             \
23177         getpass                 \
23178         getpassphrase   \
23179         getpwuid                \
23180         getpwnam                \
23181         getspnam                \
23182         gettimeofday    \
23183         initgroups              \
23184         lockf                   \
23185         memcpy                  \
23186         memmove                 \
23187         mkstemp                 \
23188         mktemp                  \
23189         pipe                    \
23190         read                    \
23191         recv                    \
23192         recvfrom                \
23193         setpwfile               \
23194         setgid                  \
23195         setegid                 \
23196         setsid                  \
23197         setuid                  \
23198         seteuid                 \
23199         sigaction               \
23200         signal                  \
23201         sigset                  \
23202         strdup                  \
23203         strerror                \
23204         strpbrk                 \
23205         strrchr                 \
23206         strsep                  \
23207         strstr                  \
23208         strtol                  \
23209         strtoul                 \
23210         strtoq                  \
23211         strtouq                 \
23212         strtoll                 \
23213         strspn                  \
23214         sysconf                 \
23215         usleep                  \
23216         waitpid                 \
23217         wait4                   \
23218         write                   \
23219         send                    \
23220         sendmsg                 \
23221         sendto                  \
23222
23223 do
23224 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23225 echo "configure:23226: checking for $ac_func" >&5
23226 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23227   echo $ac_n "(cached) $ac_c" 1>&6
23228 else
23229   cat > conftest.$ac_ext <<EOF
23230 #line 23231 "configure"
23231 #include "confdefs.h"
23232 /* System header to define __stub macros and hopefully few prototypes,
23233     which can conflict with char $ac_func(); below.  */
23234 #include <assert.h>
23235 /* Override any gcc2 internal prototype to avoid an error.  */
23236 /* We use char because int might match the return type of a gcc2
23237     builtin and then its argument prototype would still apply.  */
23238 char $ac_func();
23239 char (*f)();
23240
23241 int main() {
23242
23243 /* The GNU C library defines this for functions which it implements
23244     to always fail with ENOSYS.  Some functions are actually named
23245     something starting with __ and the normal name is an alias.  */
23246 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23247 choke me
23248 #else
23249 f = $ac_func;
23250 #endif
23251
23252 ; return 0; }
23253 EOF
23254 if { (eval echo configure:23255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23255   rm -rf conftest*
23256   eval "ac_cv_func_$ac_func=yes"
23257 else
23258   echo "configure: failed program was:" >&5
23259   cat conftest.$ac_ext >&5
23260   rm -rf conftest*
23261   eval "ac_cv_func_$ac_func=no"
23262 fi
23263 rm -f conftest*
23264 fi
23265
23266 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23267   echo "$ac_t""yes" 1>&6
23268     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23269   cat >> confdefs.h <<EOF
23270 #define $ac_tr_func 1
23271 EOF
23272  
23273 else
23274   echo "$ac_t""no" 1>&6
23275 fi
23276 done
23277
23278
23279 for ac_func in getopt getpeereid
23280 do
23281 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23282 echo "configure:23283: checking for $ac_func" >&5
23283 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23284   echo $ac_n "(cached) $ac_c" 1>&6
23285 else
23286   cat > conftest.$ac_ext <<EOF
23287 #line 23288 "configure"
23288 #include "confdefs.h"
23289 /* System header to define __stub macros and hopefully few prototypes,
23290     which can conflict with char $ac_func(); below.  */
23291 #include <assert.h>
23292 /* Override any gcc2 internal prototype to avoid an error.  */
23293 /* We use char because int might match the return type of a gcc2
23294     builtin and then its argument prototype would still apply.  */
23295 char $ac_func();
23296 char (*f)();
23297
23298 int main() {
23299
23300 /* The GNU C library defines this for functions which it implements
23301     to always fail with ENOSYS.  Some functions are actually named
23302     something starting with __ and the normal name is an alias.  */
23303 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23304 choke me
23305 #else
23306 f = $ac_func;
23307 #endif
23308
23309 ; return 0; }
23310 EOF
23311 if { (eval echo configure:23312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23312   rm -rf conftest*
23313   eval "ac_cv_func_$ac_func=yes"
23314 else
23315   echo "configure: failed program was:" >&5
23316   cat conftest.$ac_ext >&5
23317   rm -rf conftest*
23318   eval "ac_cv_func_$ac_func=no"
23319 fi
23320 rm -f conftest*
23321 fi
23322
23323 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23324   echo "$ac_t""yes" 1>&6
23325     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23326   cat >> confdefs.h <<EOF
23327 #define $ac_tr_func 1
23328 EOF
23329  
23330 else
23331   echo "$ac_t""no" 1>&6
23332 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23333 fi
23334 done
23335
23336
23337
23338 if test "$ac_cv_func_getopt" != yes; then
23339         LIBSRCS="$LIBSRCS getopt.c"
23340 fi
23341 if test "$ac_cv_func_getpeereid" != yes; then
23342         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23343 echo "configure:23344: checking for msg_accrights in msghdr" >&5
23344 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23345   echo $ac_n "(cached) $ac_c" 1>&6
23346 else
23347   cat > conftest.$ac_ext <<EOF
23348 #line 23349 "configure"
23349 #include "confdefs.h"
23350 #include <sys/socket.h>
23351 int main() {
23352 struct msghdr m; m.msg_accrightslen=0
23353 ; return 0; }
23354 EOF
23355 if { (eval echo configure:23356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23356   rm -rf conftest*
23357   ol_cv_msghdr_msg_accrights=yes
23358 else
23359   echo "configure: failed program was:" >&5
23360   cat conftest.$ac_ext >&5
23361   rm -rf conftest*
23362   ol_cv_msghdr_msg_accrights=no
23363 fi
23364 rm -f conftest*
23365         
23366 fi
23367
23368 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23369   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23370         cat >> confdefs.h <<\EOF
23371 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23372 EOF
23373
23374   fi
23375
23376         LIBSRCS="$LIBSRCS getpeereid.c"
23377 fi
23378 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23379         if test "$ac_cv_func_snprintf" != yes; then
23380                 cat >> confdefs.h <<\EOF
23381 #define snprintf ber_pvt_snprintf
23382 EOF
23383
23384         fi
23385         if test "$ac_cv_func_vsnprintf" != yes; then
23386                 cat >> confdefs.h <<\EOF
23387 #define vsnprintf ber_pvt_vsnprintf
23388 EOF
23389
23390         fi
23391 fi
23392
23393 # Check Configuration
23394 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23395 echo "configure:23396: checking declaration of sys_errlist" >&5
23396 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23397   echo $ac_n "(cached) $ac_c" 1>&6
23398 else
23399   
23400         cat > conftest.$ac_ext <<EOF
23401 #line 23402 "configure"
23402 #include "confdefs.h"
23403
23404 #include <stdio.h>
23405 #include <sys/types.h>
23406 #include <errno.h>
23407 #ifdef WINNT
23408 #include <stdlib.h>
23409 #endif 
23410 int main() {
23411 char *c = (char *) *sys_errlist
23412 ; return 0; }
23413 EOF
23414 if { (eval echo configure:23415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23415   rm -rf conftest*
23416   ol_cv_dcl_sys_errlist=yes
23417         ol_cv_have_sys_errlist=yes
23418 else
23419   echo "configure: failed program was:" >&5
23420   cat conftest.$ac_ext >&5
23421   rm -rf conftest*
23422   ol_cv_dcl_sys_errlist=no
23423 fi
23424 rm -f conftest*
23425 fi
23426
23427 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23428 #
23429 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23430 if test $ol_cv_dcl_sys_errlist = no ; then
23431         cat >> confdefs.h <<\EOF
23432 #define DECL_SYS_ERRLIST 1
23433 EOF
23434
23435
23436         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23437 echo "configure:23438: checking existence of sys_errlist" >&5
23438 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23439   echo $ac_n "(cached) $ac_c" 1>&6
23440 else
23441   
23442                 cat > conftest.$ac_ext <<EOF
23443 #line 23444 "configure"
23444 #include "confdefs.h"
23445 #include <errno.h>
23446 int main() {
23447 char *c = (char *) *sys_errlist
23448 ; return 0; }
23449 EOF
23450 if { (eval echo configure:23451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23451   rm -rf conftest*
23452   ol_cv_have_sys_errlist=yes
23453 else
23454   echo "configure: failed program was:" >&5
23455   cat conftest.$ac_ext >&5
23456   rm -rf conftest*
23457   ol_cv_have_sys_errlist=no
23458 fi
23459 rm -f conftest*
23460 fi
23461
23462 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23463 fi
23464 if test $ol_cv_have_sys_errlist = yes ; then
23465         cat >> confdefs.h <<\EOF
23466 #define HAVE_SYS_ERRLIST 1
23467 EOF
23468
23469 fi
23470
23471
23472
23473 if test "$ol_enable_slapi" != no ; then
23474                         for ac_hdr in ltdl.h
23475 do
23476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23478 echo "configure:23479: checking for $ac_hdr" >&5
23479 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23480   echo $ac_n "(cached) $ac_c" 1>&6
23481 else
23482   cat > conftest.$ac_ext <<EOF
23483 #line 23484 "configure"
23484 #include "confdefs.h"
23485 #include <$ac_hdr>
23486 EOF
23487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23488 { (eval echo configure:23489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23490 if test -z "$ac_err"; then
23491   rm -rf conftest*
23492   eval "ac_cv_header_$ac_safe=yes"
23493 else
23494   echo "$ac_err" >&5
23495   echo "configure: failed program was:" >&5
23496   cat conftest.$ac_ext >&5
23497   rm -rf conftest*
23498   eval "ac_cv_header_$ac_safe=no"
23499 fi
23500 rm -f conftest*
23501 fi
23502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23503   echo "$ac_t""yes" 1>&6
23504     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23505   cat >> confdefs.h <<EOF
23506 #define $ac_tr_hdr 1
23507 EOF
23508  
23509 else
23510   echo "$ac_t""no" 1>&6
23511 fi
23512 done
23513
23514
23515         if test $ac_cv_header_ltdl_h != yes ; then
23516                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23517         fi
23518         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23519 echo "configure:23520: checking for lt_dlinit in -lltdl" >&5
23520 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23521 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23522   echo $ac_n "(cached) $ac_c" 1>&6
23523 else
23524   ac_save_LIBS="$LIBS"
23525 LIBS="-lltdl  $LIBS"
23526 cat > conftest.$ac_ext <<EOF
23527 #line 23528 "configure"
23528 #include "confdefs.h"
23529 /* Override any gcc2 internal prototype to avoid an error.  */
23530 /* We use char because int might match the return type of a gcc2
23531     builtin and then its argument prototype would still apply.  */
23532 char lt_dlinit();
23533
23534 int main() {
23535 lt_dlinit()
23536 ; return 0; }
23537 EOF
23538 if { (eval echo configure:23539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23539   rm -rf conftest*
23540   eval "ac_cv_lib_$ac_lib_var=yes"
23541 else
23542   echo "configure: failed program was:" >&5
23543   cat conftest.$ac_ext >&5
23544   rm -rf conftest*
23545   eval "ac_cv_lib_$ac_lib_var=no"
23546 fi
23547 rm -f conftest*
23548 LIBS="$ac_save_LIBS"
23549
23550 fi
23551 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23552   echo "$ac_t""yes" 1>&6
23553   
23554                 SLAPI_LIBS=-lltdl
23555                 LIBSLAPI=libslapi.a
23556                 LIBSLAPITOOLS=../libslapi.a
23557                 cat >> confdefs.h <<\EOF
23558 #define HAVE_LIBLTDL 1
23559 EOF
23560
23561         
23562 else
23563   echo "$ac_t""no" 1>&6
23564 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23565 fi
23566
23567
23568         cat >> confdefs.h <<\EOF
23569 #define LDAP_SLAPI 1
23570 EOF
23571
23572 fi
23573
23574 if test "$ol_enable_debug" != no ; then
23575         cat >> confdefs.h <<\EOF
23576 #define LDAP_DEBUG 1
23577 EOF
23578
23579 fi
23580 if test "$ol_enable_syslog" = yes ; then
23581         cat >> confdefs.h <<\EOF
23582 #define LDAP_SYSLOG 1
23583 EOF
23584
23585 fi
23586 if test "$ol_link_kbind" != no ; then
23587         cat >> confdefs.h <<\EOF
23588 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23589 EOF
23590
23591 fi
23592 if test "$ol_enable_proctitle" != no ; then
23593         cat >> confdefs.h <<\EOF
23594 #define LDAP_PROCTITLE 1
23595 EOF
23596
23597 fi
23598 if test "$ol_enable_referrals" != no ; then
23599         cat >> confdefs.h <<\EOF
23600 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23601 EOF
23602
23603 fi
23604 if test "$ol_enable_local" != no; then
23605         cat >> confdefs.h <<\EOF
23606 #define LDAP_PF_LOCAL 1
23607 EOF
23608
23609 fi
23610 if test "$ol_link_ipv6" != no; then
23611         cat >> confdefs.h <<\EOF
23612 #define LDAP_PF_INET6 1
23613 EOF
23614
23615 fi
23616 if test "$ol_enable_cleartext" != no ; then
23617         cat >> confdefs.h <<\EOF
23618 #define SLAPD_CLEARTEXT 1
23619 EOF
23620
23621 fi
23622 if test "$ol_enable_crypt" != no ; then
23623         cat >> confdefs.h <<\EOF
23624 #define SLAPD_CRYPT 1
23625 EOF
23626
23627 fi
23628 if test "$ol_link_spasswd" != no ; then
23629         cat >> confdefs.h <<\EOF
23630 #define SLAPD_SPASSWD 1
23631 EOF
23632
23633 fi
23634 if test "$ol_enable_multimaster" != no ; then
23635         cat >> confdefs.h <<\EOF
23636 #define SLAPD_MULTIMASTER 1
23637 EOF
23638
23639 fi
23640 if test "$ol_enable_rlookups" != no ; then
23641         cat >> confdefs.h <<\EOF
23642 #define SLAPD_RLOOKUPS 1
23643 EOF
23644
23645 fi
23646 if test "$ol_enable_aci" != no ; then
23647         cat >> confdefs.h <<\EOF
23648 #define SLAPD_ACI_ENABLED 1
23649 EOF
23650
23651 fi
23652
23653 if test "$ol_link_modules" != no ; then
23654         cat >> confdefs.h <<\EOF
23655 #define SLAPD_MODULES 1
23656 EOF
23657
23658         BUILD_SLAPD=yes
23659         SLAPD_MODULES_LDFLAGS="-dlopen self"
23660 fi
23661
23662 cat >> confdefs.h <<\EOF
23663 #define SLAPD_MOD_STATIC 1
23664 EOF
23665
23666 cat >> confdefs.h <<\EOF
23667 #define SLAPD_MOD_DYNAMIC 2
23668 EOF
23669
23670
23671 if test "$ol_enable_bdb" != no ; then
23672         cat >> confdefs.h <<\EOF
23673 #define SLAPD_BDB 1
23674 EOF
23675
23676         BUILD_SLAPD=yes
23677         BUILD_BDB=yes
23678         if test "$ol_with_bdb_module" != static ; then
23679                 cat >> confdefs.h <<\EOF
23680 #define SLAPD_BDB_DYNAMIC 1
23681 EOF
23682
23683                 BUILD_BDB=mod
23684                 BUILD_BDB_DYNAMIC=shared
23685                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23686         else
23687                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23688         fi
23689 fi
23690
23691 if test "$ol_link_dnssrv" != no ; then
23692         cat >> confdefs.h <<\EOF
23693 #define SLAPD_DNSSRV 1
23694 EOF
23695
23696         BUILD_SLAPD=yes
23697         BUILD_DNSSRV=yes
23698         if test "$ol_with_dnssrv_module" != static ; then
23699                 cat >> confdefs.h <<\EOF
23700 #define SLAPD_DNSSRV_DYNAMIC 1
23701 EOF
23702
23703                 BUILD_DNSSRV=mod
23704                 BUILD_DNSSRV_DYNAMIC=shared
23705                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23706         else
23707                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23708         fi
23709 fi
23710
23711 if test "$ol_enable_hdb" != no ; then
23712         cat >> confdefs.h <<\EOF
23713 #define SLAPD_HDB 1
23714 EOF
23715
23716         BUILD_SLAPD=yes
23717         BUILD_HDB=yes
23718         if test "$ol_with_hdb_module" != static ; then
23719                 cat >> confdefs.h <<\EOF
23720 #define SLAPD_HDB_DYNAMIC 1
23721 EOF
23722
23723                 BUILD_HDB=mod
23724                 BUILD_HDB_DYNAMIC=shared
23725                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23726         else
23727                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23728         fi
23729 fi
23730
23731 if test "$ol_enable_ldap" != no ; then
23732         cat >> confdefs.h <<\EOF
23733 #define SLAPD_LDAP 1
23734 EOF
23735
23736         BUILD_SLAPD=yes
23737         BUILD_LDAP=yes
23738         if test "$ol_with_ldap_module" != static ; then
23739                 cat >> confdefs.h <<\EOF
23740 #define SLAPD_LDAP_DYNAMIC 1
23741 EOF
23742
23743                 BUILD_LDAP=mod
23744                 BUILD_LDAP_DYNAMIC=shared
23745                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23746         else
23747                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23748         fi
23749 fi
23750
23751 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23752         cat >> confdefs.h <<\EOF
23753 #define SLAPD_LDBM 1
23754 EOF
23755
23756         BUILD_SLAPD=yes
23757         BUILD_LDBM=yes
23758         if test "$ol_with_ldbm_module" != static ; then
23759                 cat >> confdefs.h <<\EOF
23760 #define SLAPD_LDBM_DYNAMIC 1
23761 EOF
23762
23763                 BUILD_LDBM=mod
23764                 BUILD_LDBM_DYNAMIC=shared
23765                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23766         else
23767                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23768         fi
23769 fi
23770
23771 if test "$ol_enable_meta" != no ; then
23772         if test "$ol_enable_ldap" = no ; then
23773                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23774         fi
23775         if test "$ol_enable_rewrite" = no ; then
23776                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23777         fi
23778         cat >> confdefs.h <<\EOF
23779 #define SLAPD_META 1
23780 EOF
23781
23782         BUILD_SLAPD=yes
23783         BUILD_META=yes
23784         BUILD_REWRITE=yes
23785         if test "$ol_with_meta_module" != static ; then
23786                 cat >> confdefs.h <<\EOF
23787 #define SLAPD_META_DYNAMIC 1
23788 EOF
23789
23790                 BUILD_META=mod
23791                 BUILD_META_DYNAMIC=shared
23792                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23793         else
23794                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23795         fi
23796 fi
23797
23798 if test "$ol_enable_monitor" != no ; then
23799         cat >> confdefs.h <<\EOF
23800 #define SLAPD_MONITOR 1
23801 EOF
23802
23803         BUILD_SLAPD=yes
23804         BUILD_MONITOR=yes
23805         if test "$ol_with_monitor_module" != static ; then
23806                 cat >> confdefs.h <<\EOF
23807 #define SLAPD_MONITOR_DYNAMIC 1
23808 EOF
23809
23810                 BUILD_MONITOR=mod
23811                 BUILD_MONITOR_DYNAMIC=shared
23812                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23813         else
23814                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23815         fi
23816 fi
23817
23818 if test "$ol_enable_null" != no ; then
23819         cat >> confdefs.h <<\EOF
23820 #define SLAPD_NULL 1
23821 EOF
23822
23823         BUILD_SLAPD=yes
23824         BUILD_NULL=yes
23825         if test "$ol_with_null_module" != static ; then
23826                 cat >> confdefs.h <<\EOF
23827 #define SLAPD_NULL_DYNAMIC 1
23828 EOF
23829
23830                 BUILD_NULL=mod
23831                 BUILD_NULL_DYNAMIC=shared
23832                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23833         else
23834                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23835         fi
23836 fi
23837
23838 if test "$ol_enable_passwd" != no ; then
23839         cat >> confdefs.h <<\EOF
23840 #define SLAPD_PASSWD 1
23841 EOF
23842
23843         BUILD_SLAPD=yes
23844         BUILD_PASSWD=yes
23845         if test "$ol_with_passwd_module" != static ; then
23846                 cat >> confdefs.h <<\EOF
23847 #define SLAPD_PASSWD_DYNAMIC 1
23848 EOF
23849
23850                 BUILD_PASSWD=mod
23851                 BUILD_PASSWD_DYNAMIC=shared
23852                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23853         else
23854                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23855         fi
23856 fi
23857
23858 if test "$ol_link_perl" != no ; then
23859         cat >> confdefs.h <<\EOF
23860 #define SLAPD_PERL 1
23861 EOF
23862
23863         BUILD_SLAPD=yes
23864         BUILD_PERL=yes
23865         if test "$ol_with_perl_module" != static ; then
23866                 cat >> confdefs.h <<\EOF
23867 #define SLAPD_PERL_DYNAMIC 1
23868 EOF
23869
23870                 BUILD_PERL=mod
23871                 BUILD_PERL_DYNAMIC=shared
23872                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23873         else
23874                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23875         fi
23876 fi
23877
23878 if test "$ol_enable_relay" != no ; then
23879         cat >> confdefs.h <<\EOF
23880 #define SLAPD_RELAY 1
23881 EOF
23882
23883         BUILD_SLAPD=yes
23884         BUILD_RELAY=yes
23885         if test "$ol_with_relay_module" != static ; then
23886                 cat >> confdefs.h <<\EOF
23887 #define SLAPD_RELAY_DYNAMIC 1
23888 EOF
23889
23890                 BUILD_RELAY=mod
23891                 BUILD_RELAY_DYNAMIC=shared
23892                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
23893         else
23894                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
23895         fi
23896 fi
23897
23898 if test "$ol_enable_shell" != no ; then
23899         if test "$ol_link_thread" != no ; then
23900                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23901         fi
23902         cat >> confdefs.h <<\EOF
23903 #define SLAPD_SHELL 1
23904 EOF
23905
23906         BUILD_SLAPD=yes
23907         BUILD_SHELL=yes
23908         if test "$ol_with_shell_module" != static ; then
23909                 cat >> confdefs.h <<\EOF
23910 #define SLAPD_SHELL_DYNAMIC 1
23911 EOF
23912
23913                 BUILD_SHELL=mod
23914                 BUILD_SHELL_DYNAMIC=shared
23915                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23916         else
23917                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23918         fi
23919 fi
23920
23921 if test "$ol_link_sql" != no ; then
23922         cat >> confdefs.h <<\EOF
23923 #define SLAPD_SQL 1
23924 EOF
23925
23926         BUILD_SLAPD=yes
23927         BUILD_SQL=yes
23928         if test "$ol_with_sql_module" != static; then
23929                 cat >> confdefs.h <<\EOF
23930 #define SLAPD_SQL_DYNAMIC 1
23931 EOF
23932
23933                 BUILD_SQL=mod
23934                 BUILD_SQL_DYNAMIC=shared
23935                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23936         else
23937                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23938         fi
23939 fi
23940
23941 if test "$ol_enable_chain" != no ; then
23942         BUILD_CHAIN=$ol_enable_chain
23943         if test "$ol_enable_chain" = mod ; then
23944                 MFLAG=SLAPD_MOD_DYNAMIC
23945                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
23946         else
23947                 MFLAG=SLAPD_MOD_STATIC
23948         fi
23949         cat >> confdefs.h <<EOF
23950 #define SLAPD_OVER_CHAIN $MFLAG
23951 EOF
23952
23953 fi
23954
23955 if test "$ol_enable_denyop" != no ; then
23956         BUILD_DENYOP=$ol_enable_denyop
23957         if test "$ol_enable_denyop" = mod ; then
23958                 MFLAG=SLAPD_MOD_DYNAMIC
23959                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
23960         else
23961                 MFLAG=SLAPD_MOD_STATIC
23962         fi
23963         cat >> confdefs.h <<EOF
23964 #define SLAPD_OVER_DENYOP $MFLAG
23965 EOF
23966
23967 fi
23968
23969 if test "$ol_enable_dyngroup" != no ; then
23970         BUILD_DYNGROUP=$ol_enable_dyngroup
23971         if test "$ol_enable_dyngroup" = mod ; then
23972                 MFLAG=SLAPD_MOD_DYNAMIC
23973                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23974         else
23975                 MFLAG=SLAPD_MOD_STATIC
23976         fi
23977         cat >> confdefs.h <<EOF
23978 #define SLAPD_OVER_DYNGROUP $MFLAG
23979 EOF
23980
23981 fi
23982
23983 if test "$ol_enable_ppolicy" != no ; then
23984         BUILD_PPOLICY=$ol_enable_ppolicy
23985         if test "$ol_enable_ppolicy" = mod ; then
23986                 MFLAG=SLAPD_MOD_DYNAMIC
23987                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
23988         else
23989                 MFLAG=SLAPD_MOD_STATIC
23990         fi
23991         cat >> confdefs.h <<EOF
23992 #define SLAPD_OVER_PPOLICY $MFLAG
23993 EOF
23994
23995 fi
23996
23997 if test "$ol_enable_proxycache" != no ; then
23998         BUILD_PROXYCACHE=$ol_enable_proxycache
23999         if test "$ol_enable_proxycache" = mod ; then
24000                 MFLAG=SLAPD_MOD_DYNAMIC
24001                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24002         else
24003                 MFLAG=SLAPD_MOD_STATIC
24004         fi
24005         cat >> confdefs.h <<EOF
24006 #define SLAPD_OVER_PROXYCACHE $MFLAG
24007 EOF
24008
24009 fi
24010
24011 if test "$ol_enable_rwm " != no ; then
24012         BUILD_REWRITE=yes
24013         BUILD_RWM=$ol_enable_rwm
24014         if test "$ol_enable_rwm" = mod ; then
24015                 MFLAG=SLAPD_MOD_DYNAMIC
24016                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24017         else
24018                 MFLAG=SLAPD_MOD_STATIC
24019         fi
24020         cat >> confdefs.h <<EOF
24021 #define SLAPD_OVER_RWM $MFLAG
24022 EOF
24023
24024 fi
24025
24026 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
24027         $BUILD_SLAPD = yes ; then
24028         BUILD_SLURPD=yes
24029 fi
24030
24031 if test "$ol_enable_rewrite" != no ; then
24032         cat >> confdefs.h <<\EOF
24033 #define ENABLE_REWRITE 1
24034 EOF
24035
24036         BUILD_REWRITE=yes
24037 fi
24038
24039 if test "$ol_enable_slapi" != no ; then
24040         cat >> confdefs.h <<\EOF
24041 #define ENABLE_SLAPI 1
24042 EOF
24043
24044         BUILD_SLAPI=yes
24045         SLAPD_SLAPI_DEPEND=libslapi.a
24046 fi
24047
24048
24049
24050 if test "$ac_cv_mingw32" = yes ; then
24051         PLAT=NT
24052         SLAPD_MODULES_LDFLAGS=
24053 else
24054         PLAT=UNIX
24055 fi
24056
24057 if test -z "$SLAPD_STATIC_BACKENDS"; then
24058         SLAPD_NO_STATIC='#'
24059 else
24060         SLAPD_NO_STATIC=
24061 fi
24062
24063
24064
24065
24066
24067
24068
24069   
24070   
24071   
24072   
24073   
24074   
24075   
24076   
24077   
24078   
24079   
24080   
24081   
24082   
24083   
24084   
24085   
24086   
24087   
24088   
24089   
24090   
24091   
24092   
24093   
24094   
24095   
24096   
24097   
24098   
24099   
24100   
24101   
24102   
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141 # Check whether --with-xxinstall or --without-xxinstall was given.
24142 if test "${with_xxinstall+set}" = set; then
24143   withval="$with_xxinstall"
24144   :
24145 fi
24146
24147
24148
24149 trap '' 1 2 15
24150
24151 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24152
24153 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24154 # Let make expand exec_prefix.
24155 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24156
24157 # Any assignment to VPATH causes Sun make to only execute
24158 # the first set of double-colon rules, so remove it if not needed.
24159 # If there is a colon in the path, we need to keep it.
24160 if test "x$srcdir" = x.; then
24161   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24162 fi
24163
24164 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24165
24166 DEFS=-DHAVE_CONFIG_H
24167
24168 # Without the "./", some shells look in PATH for config.status.
24169 : ${CONFIG_STATUS=./config.status}
24170
24171 echo creating $CONFIG_STATUS
24172 rm -f $CONFIG_STATUS
24173 cat > $CONFIG_STATUS <<EOF
24174 #! /bin/sh
24175 # Generated automatically by configure.
24176 # Run this file to recreate the current configuration.
24177 # This directory was configured as follows,
24178 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24179 #
24180 # $0 $ac_configure_args
24181 #
24182 # Compiler output produced by configure, useful for debugging
24183 # configure, is in ./config.log if it exists.
24184
24185 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24186 for ac_option
24187 do
24188   case "\$ac_option" in
24189   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24190     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24191     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24192   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24193     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24194     exit 0 ;;
24195   -help | --help | --hel | --he | --h)
24196     echo "\$ac_cs_usage"; exit 0 ;;
24197   *) echo "\$ac_cs_usage"; exit 1 ;;
24198   esac
24199 done
24200
24201 ac_given_srcdir=$srcdir
24202 ac_given_INSTALL="$INSTALL"
24203
24204 trap 'rm -fr `echo "\
24205 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24206 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24207 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24208 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24209 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24210 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24211 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24212 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24213 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24214 include/Makefile:build/top.mk:include/Makefile.in \
24215 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24216 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24217 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24218 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24219 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24220 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24221 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24222 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24223 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24224 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24225 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24226 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24227 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24228 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24229 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24230 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24231 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24232 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24233 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24234 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24235 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24236 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24237 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24238 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24239 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24240 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24241 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24242 tests/run \
24243 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24244  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24245 EOF
24246 cat >> $CONFIG_STATUS <<EOF
24247
24248 # Protect against being on the right side of a sed subst in config.status.
24249 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24250  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24251 $ac_vpsub
24252 $extrasub
24253 s%@SHELL@%$SHELL%g
24254 s%@CFLAGS@%$CFLAGS%g
24255 s%@CPPFLAGS@%$CPPFLAGS%g
24256 s%@CXXFLAGS@%$CXXFLAGS%g
24257 s%@FFLAGS@%$FFLAGS%g
24258 s%@DEFS@%$DEFS%g
24259 s%@LDFLAGS@%$LDFLAGS%g
24260 s%@LIBS@%$LIBS%g
24261 s%@exec_prefix@%$exec_prefix%g
24262 s%@prefix@%$prefix%g
24263 s%@program_transform_name@%$program_transform_name%g
24264 s%@bindir@%$bindir%g
24265 s%@sbindir@%$sbindir%g
24266 s%@libexecdir@%$libexecdir%g
24267 s%@datadir@%$datadir%g
24268 s%@sysconfdir@%$sysconfdir%g
24269 s%@sharedstatedir@%$sharedstatedir%g
24270 s%@localstatedir@%$localstatedir%g
24271 s%@libdir@%$libdir%g
24272 s%@includedir@%$includedir%g
24273 s%@oldincludedir@%$oldincludedir%g
24274 s%@infodir@%$infodir%g
24275 s%@mandir@%$mandir%g
24276 s%@host@%$host%g
24277 s%@host_alias@%$host_alias%g
24278 s%@host_cpu@%$host_cpu%g
24279 s%@host_vendor@%$host_vendor%g
24280 s%@host_os@%$host_os%g
24281 s%@target@%$target%g
24282 s%@target_alias@%$target_alias%g
24283 s%@target_cpu@%$target_cpu%g
24284 s%@target_vendor@%$target_vendor%g
24285 s%@target_os@%$target_os%g
24286 s%@build@%$build%g
24287 s%@build_alias@%$build_alias%g
24288 s%@build_cpu@%$build_cpu%g
24289 s%@build_vendor@%$build_vendor%g
24290 s%@build_os@%$build_os%g
24291 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24292 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24293 s%@INSTALL_DATA@%$INSTALL_DATA%g
24294 s%@PACKAGE@%$PACKAGE%g
24295 s%@VERSION@%$VERSION%g
24296 s%@ACLOCAL@%$ACLOCAL%g
24297 s%@AUTOCONF@%$AUTOCONF%g
24298 s%@AUTOMAKE@%$AUTOMAKE%g
24299 s%@AUTOHEADER@%$AUTOHEADER%g
24300 s%@MAKEINFO@%$MAKEINFO%g
24301 s%@install_sh@%$install_sh%g
24302 s%@AMTAR@%$AMTAR%g
24303 s%@AWK@%$AWK%g
24304 s%@AMTARFLAGS@%$AMTARFLAGS%g
24305 s%@SET_MAKE@%$SET_MAKE%g
24306 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24307 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24308 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24309 s%@top_builddir@%$top_builddir%g
24310 s%@ldap_subdir@%$ldap_subdir%g
24311 s%@CC@%$CC%g
24312 s%@AR@%$AR%g
24313 s%@LN_S@%$LN_S%g
24314 s%@OBJEXT@%$OBJEXT%g
24315 s%@EXEEXT@%$EXEEXT%g
24316 s%@ECHO@%$ECHO%g
24317 s%@RANLIB@%$RANLIB%g
24318 s%@STRIP@%$STRIP%g
24319 s%@DLLTOOL@%$DLLTOOL%g
24320 s%@AS@%$AS%g
24321 s%@OBJDUMP@%$OBJDUMP%g
24322 s%@CPP@%$CPP%g
24323 s%@LIBTOOL@%$LIBTOOL%g
24324 s%@LN_H@%$LN_H%g
24325 s%@PERLBIN@%$PERLBIN%g
24326 s%@OL_MKDEP@%$OL_MKDEP%g
24327 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24328 s%@LTSTATIC@%$LTSTATIC%g
24329 s%@LIBOBJS@%$LIBOBJS%g
24330 s%@LIBSRCS@%$LIBSRCS%g
24331 s%@PLAT@%$PLAT%g
24332 s%@WITH_TLS@%$WITH_TLS%g
24333 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24334 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24335 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24336 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24337 s%@BUILD_BDB@%$BUILD_BDB%g
24338 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24339 s%@BUILD_HDB@%$BUILD_HDB%g
24340 s%@BUILD_LDAP@%$BUILD_LDAP%g
24341 s%@BUILD_LDBM@%$BUILD_LDBM%g
24342 s%@BUILD_META@%$BUILD_META%g
24343 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24344 s%@BUILD_NULL@%$BUILD_NULL%g
24345 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24346 s%@BUILD_RELAY@%$BUILD_RELAY%g
24347 s%@BUILD_PERL@%$BUILD_PERL%g
24348 s%@BUILD_SHELL@%$BUILD_SHELL%g
24349 s%@BUILD_SQL@%$BUILD_SQL%g
24350 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24351 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24352 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24353 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24354 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24355 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24356 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24357 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24358 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24359 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24360 s%@BUILD_RELAY_DYNAMIC@%$BUILD_RELAY_DYNAMIC%g
24361 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24362 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24363 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
24364 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
24365 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24366 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
24367 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24368 s%@BUILD_RWM@%$BUILD_RWM%g
24369 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24370 s%@LDAP_LIBS@%$LDAP_LIBS%g
24371 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24372 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24373 s%@LDBM_LIBS@%$LDBM_LIBS%g
24374 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24375 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24376 s%@WRAP_LIBS@%$WRAP_LIBS%g
24377 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24378 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24379 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24380 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24381 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24382 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24383 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24384 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24385 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24386 s%@KRB4_LIBS@%$KRB4_LIBS%g
24387 s%@KRB5_LIBS@%$KRB5_LIBS%g
24388 s%@SASL_LIBS@%$SASL_LIBS%g
24389 s%@TLS_LIBS@%$TLS_LIBS%g
24390 s%@MODULES_LIBS@%$MODULES_LIBS%g
24391 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24392 s%@LIBSLAPI@%$LIBSLAPI%g
24393 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24394 s%@AUTH_LIBS@%$AUTH_LIBS%g
24395 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24396 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24397 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24398 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24399
24400 CEOF
24401 EOF
24402
24403 cat >> $CONFIG_STATUS <<\EOF
24404
24405 # Split the substitutions into bite-sized pieces for seds with
24406 # small command number limits, like on Digital OSF/1 and HP-UX.
24407 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24408 ac_file=1 # Number of current file.
24409 ac_beg=1 # First line for current file.
24410 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24411 ac_more_lines=:
24412 ac_sed_cmds=""
24413 while $ac_more_lines; do
24414   if test $ac_beg -gt 1; then
24415     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24416   else
24417     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24418   fi
24419   if test ! -s conftest.s$ac_file; then
24420     ac_more_lines=false
24421     rm -f conftest.s$ac_file
24422   else
24423     if test -z "$ac_sed_cmds"; then
24424       ac_sed_cmds="sed -f conftest.s$ac_file"
24425     else
24426       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24427     fi
24428     ac_file=`expr $ac_file + 1`
24429     ac_beg=$ac_end
24430     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24431   fi
24432 done
24433 if test -z "$ac_sed_cmds"; then
24434   ac_sed_cmds=cat
24435 fi
24436 EOF
24437
24438 cat >> $CONFIG_STATUS <<EOF
24439
24440 CONFIG_FILES=\${CONFIG_FILES-"\
24441 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24442 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24443 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24444 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24445 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24446 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24447 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24448 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24449 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24450 include/Makefile:build/top.mk:include/Makefile.in \
24451 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24452 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24453 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24454 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24455 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24456 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24457 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24458 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24459 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24460 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24461 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24462 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24463 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24464 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24465 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24466 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24467 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24468 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24469 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24470 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24471 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24472 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24473 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24474 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24475 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24476 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24477 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24478 tests/run \
24479 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24480 "}
24481 EOF
24482 cat >> $CONFIG_STATUS <<\EOF
24483 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24484   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24485   case "$ac_file" in
24486   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24487        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24488   *) ac_file_in="${ac_file}.in" ;;
24489   esac
24490
24491   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24492
24493   # Remove last slash and all that follows it.  Not all systems have dirname.
24494   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24495   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24496     # The file is in a subdirectory.
24497     test ! -d "$ac_dir" && mkdir "$ac_dir"
24498     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24499     # A "../" for each directory in $ac_dir_suffix.
24500     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24501   else
24502     ac_dir_suffix= ac_dots=
24503   fi
24504
24505   case "$ac_given_srcdir" in
24506   .)  srcdir=.
24507       if test -z "$ac_dots"; then top_srcdir=.
24508       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24509   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24510   *) # Relative path.
24511     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24512     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24513   esac
24514
24515   case "$ac_given_INSTALL" in
24516   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24517   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24518   esac
24519
24520   echo creating "$ac_file"
24521   rm -f "$ac_file"
24522   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24523   case "$ac_file" in
24524   *[Mm]akefile*) ac_comsub="1i\\
24525 # $configure_input" ;;
24526   *) ac_comsub= ;;
24527   esac
24528
24529   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24530   sed -e "$ac_comsub
24531 s%@configure_input@%$configure_input%g
24532 s%@srcdir@%$srcdir%g
24533 s%@top_srcdir@%$top_srcdir%g
24534 s%@INSTALL@%$INSTALL%g
24535 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24536 fi; done
24537 rm -f conftest.s*
24538
24539 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24540 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24541 #
24542 # ac_d sets the value in "#define NAME VALUE" lines.
24543 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24544 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24545 ac_dC='\3'
24546 ac_dD='%g'
24547 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24548 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24549 ac_uB='\([      ]\)%\1#\2define\3'
24550 ac_uC=' '
24551 ac_uD='\4%g'
24552 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24553 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24554 ac_eB='$%\1#\2define\3'
24555 ac_eC=' '
24556 ac_eD='%g'
24557
24558 if test "${CONFIG_HEADERS+set}" != set; then
24559 EOF
24560 cat >> $CONFIG_STATUS <<EOF
24561   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24562 EOF
24563 cat >> $CONFIG_STATUS <<\EOF
24564 fi
24565 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24566   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24567   case "$ac_file" in
24568   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24569        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24570   *) ac_file_in="${ac_file}.in" ;;
24571   esac
24572
24573   echo creating $ac_file
24574
24575   rm -f conftest.frag conftest.in conftest.out
24576   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24577   cat $ac_file_inputs > conftest.in
24578
24579 EOF
24580
24581 # Transform confdefs.h into a sed script conftest.vals that substitutes
24582 # the proper values into config.h.in to produce config.h.  And first:
24583 # Protect against being on the right side of a sed subst in config.status.
24584 # Protect against being in an unquoted here document in config.status.
24585 rm -f conftest.vals
24586 cat > conftest.hdr <<\EOF
24587 s/[\\&%]/\\&/g
24588 s%[\\$`]%\\&%g
24589 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24590 s%ac_d%ac_u%gp
24591 s%ac_u%ac_e%gp
24592 EOF
24593 sed -n -f conftest.hdr confdefs.h > conftest.vals
24594 rm -f conftest.hdr
24595
24596 # This sed command replaces #undef with comments.  This is necessary, for
24597 # example, in the case of _POSIX_SOURCE, which is predefined and required
24598 # on some systems where configure will not decide to define it.
24599 cat >> conftest.vals <<\EOF
24600 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24601 EOF
24602
24603 # Break up conftest.vals because some shells have a limit on
24604 # the size of here documents, and old seds have small limits too.
24605
24606 rm -f conftest.tail
24607 while :
24608 do
24609   ac_lines=`grep -c . conftest.vals`
24610   # grep -c gives empty output for an empty file on some AIX systems.
24611   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24612   # Write a limited-size here document to conftest.frag.
24613   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24614   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24615   echo 'CEOF
24616   sed -f conftest.frag conftest.in > conftest.out
24617   rm -f conftest.in
24618   mv conftest.out conftest.in
24619 ' >> $CONFIG_STATUS
24620   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24621   rm -f conftest.vals
24622   mv conftest.tail conftest.vals
24623 done
24624 rm -f conftest.vals
24625
24626 cat >> $CONFIG_STATUS <<\EOF
24627   rm -f conftest.frag conftest.h
24628   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24629   cat conftest.in >> conftest.h
24630   rm -f conftest.in
24631   if cmp -s $ac_file conftest.h 2>/dev/null; then
24632     echo "$ac_file is unchanged"
24633     rm -f conftest.h
24634   else
24635     # Remove last slash and all that follows it.  Not all systems have dirname.
24636       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24637       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24638       # The file is in a subdirectory.
24639       test ! -d "$ac_dir" && mkdir "$ac_dir"
24640     fi
24641     rm -f $ac_file
24642     mv conftest.h $ac_file
24643   fi
24644 fi; done
24645
24646 EOF
24647 cat >> $CONFIG_STATUS <<EOF
24648
24649 EOF
24650 cat >> $CONFIG_STATUS <<\EOF
24651
24652 chmod +x tests/run
24653 date > stamp-h
24654 echo Please run \"make depend\" to build dependencies
24655
24656 exit 0
24657 EOF
24658 chmod +x $CONFIG_STATUS
24659 rm -fr confdefs* $ac_clean_files
24660 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24661