]> git.sur5r.net Git - openldap/blob - configure
Rebuild
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.516 2004/03/18 18:00:08 ando Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --enable-x-compile      enable cross compiling [no]"
49 ac_help="$ac_help
50   --with-cyrus-sasl       with Cyrus SASL support [auto]"
51 ac_help="$ac_help
52   --with-fetch            with fetch(3) URL support [auto]"
53 ac_help="$ac_help
54   --with-threads          with threads [auto]"
55 ac_help="$ac_help
56   --with-tls              with TLS/SSL support [auto]"
57 ac_help="$ac_help
58   --with-yielding-select  with implicitly yielding select [auto]"
59 ac_help="$ac_help
60
61 SLAPD (Standalone LDAP Daemon) Options:"
62 ac_help="$ac_help
63   --enable-slapd          enable building slapd [yes]"
64 ac_help="$ac_help
65     --enable-aci          enable per-object ACIs (experimental) [no]"
66 ac_help="$ac_help
67     --enable-cleartext    enable cleartext passwords [yes]"
68 ac_help="$ac_help
69     --enable-crypt        enable crypt(3) passwords [no]"
70 ac_help="$ac_help
71     --enable-lmpasswd     enable LAN Manager passwords [no]"
72 ac_help="$ac_help
73     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
74 ac_help="$ac_help
75     --enable-modules      enable dynamic module support [no]"
76 ac_help="$ac_help
77     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
78 ac_help="$ac_help
79     --enable-rlookups     enable reverse lookups of client hostnames [no]"
80 ac_help="$ac_help
81     --enable-slapi        enable SLAPI support (experimental) [no]"
82 ac_help="$ac_help
83     --enable-slp          enable SLPv2 support [no]"
84 ac_help="$ac_help
85     --enable-wrappers     enable tcp wrapper support [no]"
86 ac_help="$ac_help
87     --enable-bdb          enable Berkeley DB backend [yes]"
88 ac_help="$ac_help
89     --with-bdb-module     module type static|dynamic [static]"
90 ac_help="$ac_help
91     --enable-dnssrv       enable dnssrv backend [no]"
92 ac_help="$ac_help
93     --with-dnssrv-module  module type static|dynamic [static]"
94 ac_help="$ac_help
95     --enable-hdb          enable Hierarchical DB backend [no]"
96 ac_help="$ac_help
97     --with-hdb-module     module type static|dynamic [static]"
98 ac_help="$ac_help
99     --enable-ldap         enable ldap backend [no]"
100 ac_help="$ac_help
101     --with-ldap-module    module type static|dynamic [static]"
102 ac_help="$ac_help
103     --enable-ldbm         enable ldbm backend [no]"
104 ac_help="$ac_help
105     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
106 ac_help="$ac_help
107     --with-ldbm-module    module type static|dynamic [static]"
108 ac_help="$ac_help
109     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
110 ac_help="$ac_help
111     --enable-meta         enable metadirectory backend [no]"
112 ac_help="$ac_help
113     --with-meta-module    module type static|dynamic [static]"
114 ac_help="$ac_help
115     --enable-monitor      enable monitor backend [yes]"
116 ac_help="$ac_help
117     --with-monitor-module module type static|dynamic [static]"
118 ac_help="$ac_help
119     --enable-null         enable null backend [no]"
120 ac_help="$ac_help
121     --with-null-module    module type static|dynamic [static]"
122 ac_help="$ac_help
123     --enable-passwd       enable passwd backend [no]"
124 ac_help="$ac_help
125     --with-passwd-module  module type static|dynamic [static]"
126 ac_help="$ac_help
127     --enable-perl         enable perl backend [no]"
128 ac_help="$ac_help
129     --with-perl-module    module type static|dynamic [static]"
130 ac_help="$ac_help
131     --enable-relay        enable relay backend [yes]"
132 ac_help="$ac_help
133     --with-relay-module   module type static|dynamic [static]"
134 ac_help="$ac_help
135     --enable-shell        enable shell backend [no]"
136 ac_help="$ac_help
137     --with-shell-module   module type static|dynamic [static]"
138 ac_help="$ac_help
139     --enable-sql          enable sql backend [no]"
140 ac_help="$ac_help
141     --with-sql-module     module type static|dynamic [static]"
142 ac_help="$ac_help
143
144 SLAPD Overlay Options:"
145 ac_help="$ac_help
146     --with-chain          LDAP Chain Response no|yes|mod [no]"
147 ac_help="$ac_help
148     --with-denyop         Deny Operation overlay no|yes|mod [no]"
149 ac_help="$ac_help
150     --with-dyngroup       Dynamic Group overlay no|yes|mod [no]"
151 ac_help="$ac_help
152     --with-proxycache     Proxy Cache overlay no|yes|mod [no]"
153 ac_help="$ac_help
154     --with-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_LIBVERSION=$OL_API_LIB
1379
1380 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1381
1382
1383
1384 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1385 echo "configure:1386: checking configure arguments" >&5
1386
1387
1388 top_builddir=`pwd`
1389
1390 ldap_subdir="/openldap"
1391
1392 # Check whether --with-subdir or --without-subdir was given.
1393 if test "${with_subdir+set}" = set; then
1394   withval="$with_subdir"
1395   case "$withval" in
1396         no) ldap_subdir=""
1397                 ;;
1398         yes)
1399                 ;;
1400         /*|\\*)
1401                 ldap_subdir="$withval"
1402                 ;;
1403         *)
1404                 ldap_subdir="/$withval"
1405                 ;;
1406 esac
1407
1408 fi
1409
1410
1411 # OpenLDAP --enable-debug
1412         # Check whether --enable-debug or --disable-debug was given.
1413 if test "${enable_debug+set}" = set; then
1414   enableval="$enable_debug"
1415   
1416         ol_arg=invalid
1417         for ol_val in auto yes no ; do
1418                 if test "$enableval" = "$ol_val" ; then
1419                         ol_arg="$ol_val"
1420                 fi
1421         done
1422         if test "$ol_arg" = "invalid" ; then
1423                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1424         fi
1425         ol_enable_debug="$ol_arg"
1426
1427 else
1428         ol_enable_debug="yes"
1429 fi
1430 # end --enable-debug
1431 # OpenLDAP --enable-dynamic
1432         # Check whether --enable-dynamic or --disable-dynamic was given.
1433 if test "${enable_dynamic+set}" = set; then
1434   enableval="$enable_dynamic"
1435   
1436         ol_arg=invalid
1437         for ol_val in auto yes no ; do
1438                 if test "$enableval" = "$ol_val" ; then
1439                         ol_arg="$ol_val"
1440                 fi
1441         done
1442         if test "$ol_arg" = "invalid" ; then
1443                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1444         fi
1445         ol_enable_dynamic="$ol_arg"
1446
1447 else
1448         ol_enable_dynamic="no"
1449 fi
1450 # end --enable-dynamic
1451 # OpenLDAP --enable-syslog
1452         # Check whether --enable-syslog or --disable-syslog was given.
1453 if test "${enable_syslog+set}" = set; then
1454   enableval="$enable_syslog"
1455   
1456         ol_arg=invalid
1457         for ol_val in auto yes no ; do
1458                 if test "$enableval" = "$ol_val" ; then
1459                         ol_arg="$ol_val"
1460                 fi
1461         done
1462         if test "$ol_arg" = "invalid" ; then
1463                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1464         fi
1465         ol_enable_syslog="$ol_arg"
1466
1467 else
1468         ol_enable_syslog="auto"
1469 fi
1470 # end --enable-syslog
1471 # OpenLDAP --enable-proctitle
1472         # Check whether --enable-proctitle or --disable-proctitle was given.
1473 if test "${enable_proctitle+set}" = set; then
1474   enableval="$enable_proctitle"
1475   
1476         ol_arg=invalid
1477         for ol_val in auto yes no ; do
1478                 if test "$enableval" = "$ol_val" ; then
1479                         ol_arg="$ol_val"
1480                 fi
1481         done
1482         if test "$ol_arg" = "invalid" ; then
1483                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1484         fi
1485         ol_enable_proctitle="$ol_arg"
1486
1487 else
1488         ol_enable_proctitle="yes"
1489 fi
1490 # end --enable-proctitle
1491 ol_enable_referrals=${ol_enable_referrals-no}
1492 ol_enable_kbind=${ol_enable_kbind-no}
1493 # OpenLDAP --enable-ipv6
1494         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1495 if test "${enable_ipv6+set}" = set; then
1496   enableval="$enable_ipv6"
1497   
1498         ol_arg=invalid
1499         for ol_val in auto yes no ; do
1500                 if test "$enableval" = "$ol_val" ; then
1501                         ol_arg="$ol_val"
1502                 fi
1503         done
1504         if test "$ol_arg" = "invalid" ; then
1505                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1506         fi
1507         ol_enable_ipv6="$ol_arg"
1508
1509 else
1510         ol_enable_ipv6="auto"
1511 fi
1512 # end --enable-ipv6
1513 # OpenLDAP --enable-local
1514         # Check whether --enable-local or --disable-local was given.
1515 if test "${enable_local+set}" = set; then
1516   enableval="$enable_local"
1517   
1518         ol_arg=invalid
1519         for ol_val in auto yes no ; do
1520                 if test "$enableval" = "$ol_val" ; then
1521                         ol_arg="$ol_val"
1522                 fi
1523         done
1524         if test "$ol_arg" = "invalid" ; then
1525                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1526         fi
1527         ol_enable_local="$ol_arg"
1528
1529 else
1530         ol_enable_local="auto"
1531 fi
1532 # end --enable-local
1533 # OpenLDAP --enable-x_compile
1534         # Check whether --enable-x_compile or --disable-x_compile was given.
1535 if test "${enable_x_compile+set}" = set; then
1536   enableval="$enable_x_compile"
1537   
1538         ol_arg=invalid
1539         for ol_val in yes no ; do
1540                 if test "$enableval" = "$ol_val" ; then
1541                         ol_arg="$ol_val"
1542                 fi
1543         done
1544         if test "$ol_arg" = "invalid" ; then
1545                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1546         fi
1547         ol_enable_x_compile="$ol_arg"
1548
1549 else
1550         ol_enable_x_compile="no"
1551 fi
1552 # end --enable-x_compile
1553
1554
1555 # OpenLDAP --with-cyrus_sasl
1556         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1557 if test "${with_cyrus_sasl+set}" = set; then
1558   withval="$with_cyrus_sasl"
1559   
1560         ol_arg=invalid
1561         for ol_val in auto yes no  ; do
1562                 if test "$withval" = "$ol_val" ; then
1563                         ol_arg="$ol_val"
1564                 fi
1565         done
1566         if test "$ol_arg" = "invalid" ; then
1567                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1568         fi
1569         ol_with_cyrus_sasl="$ol_arg"
1570
1571 else
1572         ol_with_cyrus_sasl="auto"
1573 fi
1574 # end --with-cyrus_sasl
1575
1576 # OpenLDAP --with-fetch
1577         # Check whether --with-fetch or --without-fetch was given.
1578 if test "${with_fetch+set}" = set; then
1579   withval="$with_fetch"
1580   
1581         ol_arg=invalid
1582         for ol_val in auto yes no  ; do
1583                 if test "$withval" = "$ol_val" ; then
1584                         ol_arg="$ol_val"
1585                 fi
1586         done
1587         if test "$ol_arg" = "invalid" ; then
1588                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1589         fi
1590         ol_with_fetch="$ol_arg"
1591
1592 else
1593         ol_with_fetch="auto"
1594 fi
1595 # end --with-fetch
1596
1597 ol_with_kerberos=${ol_with_kerberos-auto}
1598 # OpenLDAP --with-threads
1599         # Check whether --with-threads or --without-threads was given.
1600 if test "${with_threads+set}" = set; then
1601   withval="$with_threads"
1602   
1603         ol_arg=invalid
1604         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1605                 if test "$withval" = "$ol_val" ; then
1606                         ol_arg="$ol_val"
1607                 fi
1608         done
1609         if test "$ol_arg" = "invalid" ; then
1610                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1611         fi
1612         ol_with_threads="$ol_arg"
1613
1614 else
1615         ol_with_threads="auto"
1616 fi
1617 # end --with-threads
1618
1619 # OpenLDAP --with-tls
1620         # Check whether --with-tls or --without-tls was given.
1621 if test "${with_tls+set}" = set; then
1622   withval="$with_tls"
1623   
1624         ol_arg=invalid
1625         for ol_val in auto ssleay openssl yes no  ; do
1626                 if test "$withval" = "$ol_val" ; then
1627                         ol_arg="$ol_val"
1628                 fi
1629         done
1630         if test "$ol_arg" = "invalid" ; then
1631                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1632         fi
1633         ol_with_tls="$ol_arg"
1634
1635 else
1636         ol_with_tls="auto"
1637 fi
1638 # end --with-tls
1639
1640 # OpenLDAP --with-yielding_select
1641         # Check whether --with-yielding_select or --without-yielding_select was given.
1642 if test "${with_yielding_select+set}" = set; then
1643   withval="$with_yielding_select"
1644   
1645         ol_arg=invalid
1646         for ol_val in auto yes no manual  ; do
1647                 if test "$withval" = "$ol_val" ; then
1648                         ol_arg="$ol_val"
1649                 fi
1650         done
1651         if test "$ol_arg" = "invalid" ; then
1652                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1653         fi
1654         ol_with_yielding_select="$ol_arg"
1655
1656 else
1657         ol_with_yielding_select="auto"
1658 fi
1659 # end --with-yielding_select
1660
1661
1662
1663 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1664 if test "${with_xxslapdoptions+set}" = set; then
1665   withval="$with_xxslapdoptions"
1666   :
1667 fi
1668
1669 # OpenLDAP --enable-slapd
1670         # Check whether --enable-slapd or --disable-slapd was given.
1671 if test "${enable_slapd+set}" = set; then
1672   enableval="$enable_slapd"
1673   
1674         ol_arg=invalid
1675         for ol_val in auto yes no ; do
1676                 if test "$enableval" = "$ol_val" ; then
1677                         ol_arg="$ol_val"
1678                 fi
1679         done
1680         if test "$ol_arg" = "invalid" ; then
1681                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1682         fi
1683         ol_enable_slapd="$ol_arg"
1684
1685 else
1686         ol_enable_slapd="yes"
1687 fi
1688 # end --enable-slapd
1689 # OpenLDAP --enable-aci
1690         # Check whether --enable-aci or --disable-aci was given.
1691 if test "${enable_aci+set}" = set; then
1692   enableval="$enable_aci"
1693   
1694         ol_arg=invalid
1695         for ol_val in auto yes no ; do
1696                 if test "$enableval" = "$ol_val" ; then
1697                         ol_arg="$ol_val"
1698                 fi
1699         done
1700         if test "$ol_arg" = "invalid" ; then
1701                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1702         fi
1703         ol_enable_aci="$ol_arg"
1704
1705 else
1706         ol_enable_aci="no"
1707 fi
1708 # end --enable-aci
1709 # OpenLDAP --enable-cleartext
1710         # Check whether --enable-cleartext or --disable-cleartext was given.
1711 if test "${enable_cleartext+set}" = set; then
1712   enableval="$enable_cleartext"
1713   
1714         ol_arg=invalid
1715         for ol_val in auto yes no ; do
1716                 if test "$enableval" = "$ol_val" ; then
1717                         ol_arg="$ol_val"
1718                 fi
1719         done
1720         if test "$ol_arg" = "invalid" ; then
1721                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1722         fi
1723         ol_enable_cleartext="$ol_arg"
1724
1725 else
1726         ol_enable_cleartext="yes"
1727 fi
1728 # end --enable-cleartext
1729 # OpenLDAP --enable-crypt
1730         # Check whether --enable-crypt or --disable-crypt was given.
1731 if test "${enable_crypt+set}" = set; then
1732   enableval="$enable_crypt"
1733   
1734         ol_arg=invalid
1735         for ol_val in auto yes no ; do
1736                 if test "$enableval" = "$ol_val" ; then
1737                         ol_arg="$ol_val"
1738                 fi
1739         done
1740         if test "$ol_arg" = "invalid" ; then
1741                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1742         fi
1743         ol_enable_crypt="$ol_arg"
1744
1745 else
1746         ol_enable_crypt="no"
1747 fi
1748 # end --enable-crypt
1749 # OpenLDAP --enable-lmpasswd
1750         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1751 if test "${enable_lmpasswd+set}" = set; then
1752   enableval="$enable_lmpasswd"
1753   
1754         ol_arg=invalid
1755         for ol_val in auto yes no ; do
1756                 if test "$enableval" = "$ol_val" ; then
1757                         ol_arg="$ol_val"
1758                 fi
1759         done
1760         if test "$ol_arg" = "invalid" ; then
1761                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1762         fi
1763         ol_enable_lmpasswd="$ol_arg"
1764
1765 else
1766         ol_enable_lmpasswd="no"
1767 fi
1768 # end --enable-lmpasswd
1769 # OpenLDAP --enable-spasswd
1770         # Check whether --enable-spasswd or --disable-spasswd was given.
1771 if test "${enable_spasswd+set}" = set; then
1772   enableval="$enable_spasswd"
1773   
1774         ol_arg=invalid
1775         for ol_val in auto yes no ; do
1776                 if test "$enableval" = "$ol_val" ; then
1777                         ol_arg="$ol_val"
1778                 fi
1779         done
1780         if test "$ol_arg" = "invalid" ; then
1781                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1782         fi
1783         ol_enable_spasswd="$ol_arg"
1784
1785 else
1786         ol_enable_spasswd="no"
1787 fi
1788 # end --enable-spasswd
1789 # OpenLDAP --enable-modules
1790         # Check whether --enable-modules or --disable-modules was given.
1791 if test "${enable_modules+set}" = set; then
1792   enableval="$enable_modules"
1793   
1794         ol_arg=invalid
1795         for ol_val in auto yes no ; do
1796                 if test "$enableval" = "$ol_val" ; then
1797                         ol_arg="$ol_val"
1798                 fi
1799         done
1800         if test "$ol_arg" = "invalid" ; then
1801                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1802         fi
1803         ol_enable_modules="$ol_arg"
1804
1805 else
1806         ol_enable_modules="no"
1807 fi
1808 # end --enable-modules
1809 ol_enable_multimaster=${ol_enable_multimaster-no}
1810 # OpenLDAP --enable-rewrite
1811         # Check whether --enable-rewrite or --disable-rewrite was given.
1812 if test "${enable_rewrite+set}" = set; then
1813   enableval="$enable_rewrite"
1814   
1815         ol_arg=invalid
1816         for ol_val in auto yes no ; do
1817                 if test "$enableval" = "$ol_val" ; then
1818                         ol_arg="$ol_val"
1819                 fi
1820         done
1821         if test "$ol_arg" = "invalid" ; then
1822                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1823         fi
1824         ol_enable_rewrite="$ol_arg"
1825
1826 else
1827         ol_enable_rewrite="no"
1828 fi
1829 # end --enable-rewrite
1830 # OpenLDAP --enable-rlookups
1831         # Check whether --enable-rlookups or --disable-rlookups was given.
1832 if test "${enable_rlookups+set}" = set; then
1833   enableval="$enable_rlookups"
1834   
1835         ol_arg=invalid
1836         for ol_val in auto yes no ; do
1837                 if test "$enableval" = "$ol_val" ; then
1838                         ol_arg="$ol_val"
1839                 fi
1840         done
1841         if test "$ol_arg" = "invalid" ; then
1842                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1843         fi
1844         ol_enable_rlookups="$ol_arg"
1845
1846 else
1847         ol_enable_rlookups="no"
1848 fi
1849 # end --enable-rlookups
1850 # OpenLDAP --enable-slapi
1851         # Check whether --enable-slapi or --disable-slapi was given.
1852 if test "${enable_slapi+set}" = set; then
1853   enableval="$enable_slapi"
1854   
1855         ol_arg=invalid
1856         for ol_val in auto yes no ; do
1857                 if test "$enableval" = "$ol_val" ; then
1858                         ol_arg="$ol_val"
1859                 fi
1860         done
1861         if test "$ol_arg" = "invalid" ; then
1862                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1863         fi
1864         ol_enable_slapi="$ol_arg"
1865
1866 else
1867         ol_enable_slapi="no"
1868 fi
1869 # end --enable-slapi
1870 # OpenLDAP --enable-slp
1871         # Check whether --enable-slp or --disable-slp was given.
1872 if test "${enable_slp+set}" = set; then
1873   enableval="$enable_slp"
1874   
1875         ol_arg=invalid
1876         for ol_val in auto yes no ; do
1877                 if test "$enableval" = "$ol_val" ; then
1878                         ol_arg="$ol_val"
1879                 fi
1880         done
1881         if test "$ol_arg" = "invalid" ; then
1882                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1883         fi
1884         ol_enable_slp="$ol_arg"
1885
1886 else
1887         ol_enable_slp="no"
1888 fi
1889 # end --enable-slp
1890 # OpenLDAP --enable-wrappers
1891         # Check whether --enable-wrappers or --disable-wrappers was given.
1892 if test "${enable_wrappers+set}" = set; then
1893   enableval="$enable_wrappers"
1894   
1895         ol_arg=invalid
1896         for ol_val in auto yes no ; do
1897                 if test "$enableval" = "$ol_val" ; then
1898                         ol_arg="$ol_val"
1899                 fi
1900         done
1901         if test "$ol_arg" = "invalid" ; then
1902                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1903         fi
1904         ol_enable_wrappers="$ol_arg"
1905
1906 else
1907         ol_enable_wrappers="no"
1908 fi
1909 # end --enable-wrappers
1910
1911
1912 # OpenLDAP --enable-bdb
1913         # Check whether --enable-bdb or --disable-bdb was given.
1914 if test "${enable_bdb+set}" = set; then
1915   enableval="$enable_bdb"
1916   
1917         ol_arg=invalid
1918         for ol_val in auto yes no ; do
1919                 if test "$enableval" = "$ol_val" ; then
1920                         ol_arg="$ol_val"
1921                 fi
1922         done
1923         if test "$ol_arg" = "invalid" ; then
1924                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1925         fi
1926         ol_enable_bdb="$ol_arg"
1927
1928 else
1929         ol_enable_bdb="yes"
1930 fi
1931 # end --enable-bdb
1932 # OpenLDAP --with-bdb_module
1933         # Check whether --with-bdb_module or --without-bdb_module was given.
1934 if test "${with_bdb_module+set}" = set; then
1935   withval="$with_bdb_module"
1936   
1937         ol_arg=invalid
1938         for ol_val in static dynamic ; do
1939                 if test "$withval" = "$ol_val" ; then
1940                         ol_arg="$ol_val"
1941                 fi
1942         done
1943         if test "$ol_arg" = "invalid" ; then
1944                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1945         fi
1946         ol_with_bdb_module="$ol_arg"
1947
1948 else
1949         ol_with_bdb_module="static"
1950 fi
1951 # end --with-bdb_module
1952
1953 # OpenLDAP --enable-dnssrv
1954         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1955 if test "${enable_dnssrv+set}" = set; then
1956   enableval="$enable_dnssrv"
1957   
1958         ol_arg=invalid
1959         for ol_val in auto yes no ; do
1960                 if test "$enableval" = "$ol_val" ; then
1961                         ol_arg="$ol_val"
1962                 fi
1963         done
1964         if test "$ol_arg" = "invalid" ; then
1965                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1966         fi
1967         ol_enable_dnssrv="$ol_arg"
1968
1969 else
1970         ol_enable_dnssrv="no"
1971 fi
1972 # end --enable-dnssrv
1973 # OpenLDAP --with-dnssrv_module
1974         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1975 if test "${with_dnssrv_module+set}" = set; then
1976   withval="$with_dnssrv_module"
1977   
1978         ol_arg=invalid
1979         for ol_val in static dynamic ; do
1980                 if test "$withval" = "$ol_val" ; then
1981                         ol_arg="$ol_val"
1982                 fi
1983         done
1984         if test "$ol_arg" = "invalid" ; then
1985                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1986         fi
1987         ol_with_dnssrv_module="$ol_arg"
1988
1989 else
1990         ol_with_dnssrv_module="static"
1991 fi
1992 # end --with-dnssrv_module
1993
1994 # OpenLDAP --enable-hdb
1995         # Check whether --enable-hdb or --disable-hdb was given.
1996 if test "${enable_hdb+set}" = set; then
1997   enableval="$enable_hdb"
1998   
1999         ol_arg=invalid
2000         for ol_val in auto yes no ; do
2001                 if test "$enableval" = "$ol_val" ; then
2002                         ol_arg="$ol_val"
2003                 fi
2004         done
2005         if test "$ol_arg" = "invalid" ; then
2006                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
2007         fi
2008         ol_enable_hdb="$ol_arg"
2009
2010 else
2011         ol_enable_hdb="no"
2012 fi
2013 # end --enable-hdb
2014 # OpenLDAP --with-hdb_module
2015         # Check whether --with-hdb_module or --without-hdb_module was given.
2016 if test "${with_hdb_module+set}" = set; then
2017   withval="$with_hdb_module"
2018   
2019         ol_arg=invalid
2020         for ol_val in static dynamic ; do
2021                 if test "$withval" = "$ol_val" ; then
2022                         ol_arg="$ol_val"
2023                 fi
2024         done
2025         if test "$ol_arg" = "invalid" ; then
2026                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2027         fi
2028         ol_with_hdb_module="$ol_arg"
2029
2030 else
2031         ol_with_hdb_module="static"
2032 fi
2033 # end --with-hdb_module
2034
2035 # OpenLDAP --enable-ldap
2036         # Check whether --enable-ldap or --disable-ldap was given.
2037 if test "${enable_ldap+set}" = set; then
2038   enableval="$enable_ldap"
2039   
2040         ol_arg=invalid
2041         for ol_val in auto yes no ; do
2042                 if test "$enableval" = "$ol_val" ; then
2043                         ol_arg="$ol_val"
2044                 fi
2045         done
2046         if test "$ol_arg" = "invalid" ; then
2047                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2048         fi
2049         ol_enable_ldap="$ol_arg"
2050
2051 else
2052         ol_enable_ldap="no"
2053 fi
2054 # end --enable-ldap
2055 # OpenLDAP --with-ldap_module
2056         # Check whether --with-ldap_module or --without-ldap_module was given.
2057 if test "${with_ldap_module+set}" = set; then
2058   withval="$with_ldap_module"
2059   
2060         ol_arg=invalid
2061         for ol_val in static dynamic ; do
2062                 if test "$withval" = "$ol_val" ; then
2063                         ol_arg="$ol_val"
2064                 fi
2065         done
2066         if test "$ol_arg" = "invalid" ; then
2067                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2068         fi
2069         ol_with_ldap_module="$ol_arg"
2070
2071 else
2072         ol_with_ldap_module="static"
2073 fi
2074 # end --with-ldap_module
2075
2076 # OpenLDAP --enable-ldbm
2077         # Check whether --enable-ldbm or --disable-ldbm was given.
2078 if test "${enable_ldbm+set}" = set; then
2079   enableval="$enable_ldbm"
2080   
2081         ol_arg=invalid
2082         for ol_val in auto yes no ; do
2083                 if test "$enableval" = "$ol_val" ; then
2084                         ol_arg="$ol_val"
2085                 fi
2086         done
2087         if test "$ol_arg" = "invalid" ; then
2088                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2089         fi
2090         ol_enable_ldbm="$ol_arg"
2091
2092 else
2093         ol_enable_ldbm="no"
2094 fi
2095 # end --enable-ldbm
2096 # OpenLDAP --with-ldbm_api
2097         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2098 if test "${with_ldbm_api+set}" = set; then
2099   withval="$with_ldbm_api"
2100   
2101         ol_arg=invalid
2102         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2103                 if test "$withval" = "$ol_val" ; then
2104                         ol_arg="$ol_val"
2105                 fi
2106         done
2107         if test "$ol_arg" = "invalid" ; then
2108                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2109         fi
2110         ol_with_ldbm_api="$ol_arg"
2111
2112 else
2113         ol_with_ldbm_api="auto"
2114 fi
2115 # end --with-ldbm_api
2116
2117 # OpenLDAP --with-ldbm_module
2118         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2119 if test "${with_ldbm_module+set}" = set; then
2120   withval="$with_ldbm_module"
2121   
2122         ol_arg=invalid
2123         for ol_val in static dynamic ; do
2124                 if test "$withval" = "$ol_val" ; then
2125                         ol_arg="$ol_val"
2126                 fi
2127         done
2128         if test "$ol_arg" = "invalid" ; then
2129                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2130         fi
2131         ol_with_ldbm_module="$ol_arg"
2132
2133 else
2134         ol_with_ldbm_module="static"
2135 fi
2136 # end --with-ldbm_module
2137
2138 # OpenLDAP --with-ldbm_type
2139         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2140 if test "${with_ldbm_type+set}" = set; then
2141   withval="$with_ldbm_type"
2142   
2143         ol_arg=invalid
2144         for ol_val in auto btree hash ; do
2145                 if test "$withval" = "$ol_val" ; then
2146                         ol_arg="$ol_val"
2147                 fi
2148         done
2149         if test "$ol_arg" = "invalid" ; then
2150                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2151         fi
2152         ol_with_ldbm_type="$ol_arg"
2153
2154 else
2155         ol_with_ldbm_type="auto"
2156 fi
2157 # end --with-ldbm_type
2158
2159 # OpenLDAP --enable-meta
2160         # Check whether --enable-meta or --disable-meta was given.
2161 if test "${enable_meta+set}" = set; then
2162   enableval="$enable_meta"
2163   
2164         ol_arg=invalid
2165         for ol_val in auto yes no ; do
2166                 if test "$enableval" = "$ol_val" ; then
2167                         ol_arg="$ol_val"
2168                 fi
2169         done
2170         if test "$ol_arg" = "invalid" ; then
2171                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2172         fi
2173         ol_enable_meta="$ol_arg"
2174
2175 else
2176         ol_enable_meta="no"
2177 fi
2178 # end --enable-meta
2179 # OpenLDAP --with-meta_module
2180         # Check whether --with-meta_module or --without-meta_module was given.
2181 if test "${with_meta_module+set}" = set; then
2182   withval="$with_meta_module"
2183   
2184         ol_arg=invalid
2185         for ol_val in static dynamic ; do
2186                 if test "$withval" = "$ol_val" ; then
2187                         ol_arg="$ol_val"
2188                 fi
2189         done
2190         if test "$ol_arg" = "invalid" ; then
2191                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2192         fi
2193         ol_with_meta_module="$ol_arg"
2194
2195 else
2196         ol_with_meta_module="static"
2197 fi
2198 # end --with-meta_module
2199
2200 # OpenLDAP --enable-monitor
2201         # Check whether --enable-monitor or --disable-monitor was given.
2202 if test "${enable_monitor+set}" = set; then
2203   enableval="$enable_monitor"
2204   
2205         ol_arg=invalid
2206         for ol_val in auto yes no ; do
2207                 if test "$enableval" = "$ol_val" ; then
2208                         ol_arg="$ol_val"
2209                 fi
2210         done
2211         if test "$ol_arg" = "invalid" ; then
2212                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2213         fi
2214         ol_enable_monitor="$ol_arg"
2215
2216 else
2217         ol_enable_monitor="yes"
2218 fi
2219 # end --enable-monitor
2220 # OpenLDAP --with-monitor_module
2221         # Check whether --with-monitor_module or --without-monitor_module was given.
2222 if test "${with_monitor_module+set}" = set; then
2223   withval="$with_monitor_module"
2224   
2225         ol_arg=invalid
2226         for ol_val in static dynamic ; do
2227                 if test "$withval" = "$ol_val" ; then
2228                         ol_arg="$ol_val"
2229                 fi
2230         done
2231         if test "$ol_arg" = "invalid" ; then
2232                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2233         fi
2234         ol_with_monitor_module="$ol_arg"
2235
2236 else
2237         ol_with_monitor_module="static"
2238 fi
2239 # end --with-monitor_module
2240
2241 # OpenLDAP --enable-null
2242         # Check whether --enable-null or --disable-null was given.
2243 if test "${enable_null+set}" = set; then
2244   enableval="$enable_null"
2245   
2246         ol_arg=invalid
2247         for ol_val in auto yes no ; do
2248                 if test "$enableval" = "$ol_val" ; then
2249                         ol_arg="$ol_val"
2250                 fi
2251         done
2252         if test "$ol_arg" = "invalid" ; then
2253                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2254         fi
2255         ol_enable_null="$ol_arg"
2256
2257 else
2258         ol_enable_null="no"
2259 fi
2260 # end --enable-null
2261 # OpenLDAP --with-null_module
2262         # Check whether --with-null_module or --without-null_module was given.
2263 if test "${with_null_module+set}" = set; then
2264   withval="$with_null_module"
2265   
2266         ol_arg=invalid
2267         for ol_val in static dynamic ; do
2268                 if test "$withval" = "$ol_val" ; then
2269                         ol_arg="$ol_val"
2270                 fi
2271         done
2272         if test "$ol_arg" = "invalid" ; then
2273                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2274         fi
2275         ol_with_null_module="$ol_arg"
2276
2277 else
2278         ol_with_null_module="static"
2279 fi
2280 # end --with-null_module
2281
2282 # OpenLDAP --enable-passwd
2283         # Check whether --enable-passwd or --disable-passwd was given.
2284 if test "${enable_passwd+set}" = set; then
2285   enableval="$enable_passwd"
2286   
2287         ol_arg=invalid
2288         for ol_val in auto yes no ; do
2289                 if test "$enableval" = "$ol_val" ; then
2290                         ol_arg="$ol_val"
2291                 fi
2292         done
2293         if test "$ol_arg" = "invalid" ; then
2294                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2295         fi
2296         ol_enable_passwd="$ol_arg"
2297
2298 else
2299         ol_enable_passwd="no"
2300 fi
2301 # end --enable-passwd
2302 # OpenLDAP --with-passwd_module
2303         # Check whether --with-passwd_module or --without-passwd_module was given.
2304 if test "${with_passwd_module+set}" = set; then
2305   withval="$with_passwd_module"
2306   
2307         ol_arg=invalid
2308         for ol_val in static dynamic ; do
2309                 if test "$withval" = "$ol_val" ; then
2310                         ol_arg="$ol_val"
2311                 fi
2312         done
2313         if test "$ol_arg" = "invalid" ; then
2314                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2315         fi
2316         ol_with_passwd_module="$ol_arg"
2317
2318 else
2319         ol_with_passwd_module="static"
2320 fi
2321 # end --with-passwd_module
2322
2323 # OpenLDAP --enable-perl
2324         # Check whether --enable-perl or --disable-perl was given.
2325 if test "${enable_perl+set}" = set; then
2326   enableval="$enable_perl"
2327   
2328         ol_arg=invalid
2329         for ol_val in auto yes no ; do
2330                 if test "$enableval" = "$ol_val" ; then
2331                         ol_arg="$ol_val"
2332                 fi
2333         done
2334         if test "$ol_arg" = "invalid" ; then
2335                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2336         fi
2337         ol_enable_perl="$ol_arg"
2338
2339 else
2340         ol_enable_perl="no"
2341 fi
2342 # end --enable-perl
2343 # OpenLDAP --with-perl_module
2344         # Check whether --with-perl_module or --without-perl_module was given.
2345 if test "${with_perl_module+set}" = set; then
2346   withval="$with_perl_module"
2347   
2348         ol_arg=invalid
2349         for ol_val in static dynamic ; do
2350                 if test "$withval" = "$ol_val" ; then
2351                         ol_arg="$ol_val"
2352                 fi
2353         done
2354         if test "$ol_arg" = "invalid" ; then
2355                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2356         fi
2357         ol_with_perl_module="$ol_arg"
2358
2359 else
2360         ol_with_perl_module="static"
2361 fi
2362 # end --with-perl_module
2363
2364 # OpenLDAP --enable-relay
2365         # Check whether --enable-relay or --disable-relay was given.
2366 if test "${enable_relay+set}" = set; then
2367   enableval="$enable_relay"
2368   
2369         ol_arg=invalid
2370         for ol_val in auto yes no ; do
2371                 if test "$enableval" = "$ol_val" ; then
2372                         ol_arg="$ol_val"
2373                 fi
2374         done
2375         if test "$ol_arg" = "invalid" ; then
2376                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2377         fi
2378         ol_enable_relay="$ol_arg"
2379
2380 else
2381         ol_enable_relay="yes"
2382 fi
2383 # end --enable-relay
2384 # OpenLDAP --with-relay_module
2385         # Check whether --with-relay_module or --without-relay_module was given.
2386 if test "${with_relay_module+set}" = set; then
2387   withval="$with_relay_module"
2388   
2389         ol_arg=invalid
2390         for ol_val in static dynamic ; do
2391                 if test "$withval" = "$ol_val" ; then
2392                         ol_arg="$ol_val"
2393                 fi
2394         done
2395         if test "$ol_arg" = "invalid" ; then
2396                 { echo "configure: error: bad value $withval for --with-relay_module" 1>&2; exit 1; }
2397         fi
2398         ol_with_relay_module="$ol_arg"
2399
2400 else
2401         ol_with_relay_module="static"
2402 fi
2403 # end --with-relay_module
2404
2405 # OpenLDAP --enable-shell
2406         # Check whether --enable-shell or --disable-shell was given.
2407 if test "${enable_shell+set}" = set; then
2408   enableval="$enable_shell"
2409   
2410         ol_arg=invalid
2411         for ol_val in auto yes no ; do
2412                 if test "$enableval" = "$ol_val" ; then
2413                         ol_arg="$ol_val"
2414                 fi
2415         done
2416         if test "$ol_arg" = "invalid" ; then
2417                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2418         fi
2419         ol_enable_shell="$ol_arg"
2420
2421 else
2422         ol_enable_shell="no"
2423 fi
2424 # end --enable-shell
2425 # OpenLDAP --with-shell_module
2426         # Check whether --with-shell_module or --without-shell_module was given.
2427 if test "${with_shell_module+set}" = set; then
2428   withval="$with_shell_module"
2429   
2430         ol_arg=invalid
2431         for ol_val in static dynamic ; do
2432                 if test "$withval" = "$ol_val" ; then
2433                         ol_arg="$ol_val"
2434                 fi
2435         done
2436         if test "$ol_arg" = "invalid" ; then
2437                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2438         fi
2439         ol_with_shell_module="$ol_arg"
2440
2441 else
2442         ol_with_shell_module="static"
2443 fi
2444 # end --with-shell_module
2445
2446 # OpenLDAP --enable-sql
2447         # Check whether --enable-sql or --disable-sql was given.
2448 if test "${enable_sql+set}" = set; then
2449   enableval="$enable_sql"
2450   
2451         ol_arg=invalid
2452         for ol_val in auto yes no ; do
2453                 if test "$enableval" = "$ol_val" ; then
2454                         ol_arg="$ol_val"
2455                 fi
2456         done
2457         if test "$ol_arg" = "invalid" ; then
2458                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2459         fi
2460         ol_enable_sql="$ol_arg"
2461
2462 else
2463         ol_enable_sql="no"
2464 fi
2465 # end --enable-sql
2466 # OpenLDAP --with-sql_module
2467         # Check whether --with-sql_module or --without-sql_module was given.
2468 if test "${with_sql_module+set}" = set; then
2469   withval="$with_sql_module"
2470   
2471         ol_arg=invalid
2472         for ol_val in static dynamic ; do
2473                 if test "$withval" = "$ol_val" ; then
2474                         ol_arg="$ol_val"
2475                 fi
2476         done
2477         if test "$ol_arg" = "invalid" ; then
2478                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2479         fi
2480         ol_with_sql_module="$ol_arg"
2481
2482 else
2483         ol_with_sql_module="static"
2484 fi
2485 # end --with-sql_module
2486
2487
2488 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2489 if test "${with_xxslapoverlays+set}" = set; then
2490   withval="$with_xxslapoverlays"
2491   :
2492 fi
2493
2494 # OpenLDAP --with-chain
2495         # Check whether --with-chain or --without-chain was given.
2496 if test "${with_chain+set}" = set; then
2497   withval="$with_chain"
2498   
2499         ol_arg=invalid
2500         for ol_val in no yes mod ; do
2501                 if test "$withval" = "$ol_val" ; then
2502                         ol_arg="$ol_val"
2503                 fi
2504         done
2505         if test "$ol_arg" = "invalid" ; then
2506                 { echo "configure: error: bad value $withval for --with-chain" 1>&2; exit 1; }
2507         fi
2508         ol_with_chain="$ol_arg"
2509
2510 else
2511         ol_with_chain="no"
2512 fi
2513 # end --with-chain
2514
2515 # OpenLDAP --with-denyop
2516         # Check whether --with-denyop or --without-denyop was given.
2517 if test "${with_denyop+set}" = set; then
2518   withval="$with_denyop"
2519   
2520         ol_arg=invalid
2521         for ol_val in no yes mod ; do
2522                 if test "$withval" = "$ol_val" ; then
2523                         ol_arg="$ol_val"
2524                 fi
2525         done
2526         if test "$ol_arg" = "invalid" ; then
2527                 { echo "configure: error: bad value $withval for --with-denyop" 1>&2; exit 1; }
2528         fi
2529         ol_with_denyop="$ol_arg"
2530
2531 else
2532         ol_with_denyop="no"
2533 fi
2534 # end --with-denyop
2535
2536 # OpenLDAP --with-dyngroup
2537         # Check whether --with-dyngroup or --without-dyngroup was given.
2538 if test "${with_dyngroup+set}" = set; then
2539   withval="$with_dyngroup"
2540   
2541         ol_arg=invalid
2542         for ol_val in no yes mod ; do
2543                 if test "$withval" = "$ol_val" ; then
2544                         ol_arg="$ol_val"
2545                 fi
2546         done
2547         if test "$ol_arg" = "invalid" ; then
2548                 { echo "configure: error: bad value $withval for --with-dyngroup" 1>&2; exit 1; }
2549         fi
2550         ol_with_dyngroup="$ol_arg"
2551
2552 else
2553         ol_with_dyngroup="no"
2554 fi
2555 # end --with-dyngroup
2556
2557 # OpenLDAP --with-proxycache
2558         # Check whether --with-proxycache or --without-proxycache was given.
2559 if test "${with_proxycache+set}" = set; then
2560   withval="$with_proxycache"
2561   
2562         ol_arg=invalid
2563         for ol_val in no yes mod ; do
2564                 if test "$withval" = "$ol_val" ; then
2565                         ol_arg="$ol_val"
2566                 fi
2567         done
2568         if test "$ol_arg" = "invalid" ; then
2569                 { echo "configure: error: bad value $withval for --with-proxycache" 1>&2; exit 1; }
2570         fi
2571         ol_with_proxycache="$ol_arg"
2572
2573 else
2574         ol_with_proxycache="no"
2575 fi
2576 # end --with-proxycache
2577
2578 # OpenLDAP --with-rwm
2579         # Check whether --with-rwm or --without-rwm was given.
2580 if test "${with_rwm+set}" = set; then
2581   withval="$with_rwm"
2582   
2583         ol_arg=invalid
2584         for ol_val in no yes mod ; do
2585                 if test "$withval" = "$ol_val" ; then
2586                         ol_arg="$ol_val"
2587                 fi
2588         done
2589         if test "$ol_arg" = "invalid" ; then
2590                 { echo "configure: error: bad value $withval for --with-rwm" 1>&2; exit 1; }
2591         fi
2592         ol_with_rwm="$ol_arg"
2593
2594 else
2595         ol_with_rwm="no"
2596 fi
2597 # end --with-rwm
2598
2599
2600 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2601 if test "${with_xxslurpdoptions+set}" = set; then
2602   withval="$with_xxslurpdoptions"
2603   :
2604 fi
2605
2606 # OpenLDAP --enable-slurpd
2607         # Check whether --enable-slurpd or --disable-slurpd was given.
2608 if test "${enable_slurpd+set}" = set; then
2609   enableval="$enable_slurpd"
2610   
2611         ol_arg=invalid
2612         for ol_val in auto yes no ; do
2613                 if test "$enableval" = "$ol_val" ; then
2614                         ol_arg="$ol_val"
2615                 fi
2616         done
2617         if test "$ol_arg" = "invalid" ; then
2618                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2619         fi
2620         ol_enable_slurpd="$ol_arg"
2621
2622 else
2623         ol_enable_slurpd="auto"
2624 fi
2625 # end --enable-slurpd
2626
2627 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2628 if test "${with_xxliboptions+set}" = set; then
2629   withval="$with_xxliboptions"
2630   :
2631 fi
2632
2633 # Check whether --enable-static or --disable-static was given.
2634 if test "${enable_static+set}" = set; then
2635   enableval="$enable_static"
2636   p=${PACKAGE-default}
2637 case $enableval in
2638 yes) enable_static=yes ;;
2639 no) enable_static=no ;;
2640 *)
2641   enable_static=no
2642   # Look at the argument we got.  We use all the common list separators.
2643   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2644   for pkg in $enableval; do
2645     if test "X$pkg" = "X$p"; then
2646       enable_static=yes
2647     fi
2648   done
2649   IFS="$ac_save_ifs"
2650   ;;
2651 esac
2652 else
2653   enable_static=yes
2654 fi
2655
2656 # Check whether --enable-shared or --disable-shared was given.
2657 if test "${enable_shared+set}" = set; then
2658   enableval="$enable_shared"
2659   p=${PACKAGE-default}
2660 case $enableval in
2661 yes) enable_shared=yes ;;
2662 no) enable_shared=no ;;
2663 *)
2664   enable_shared=no
2665   # Look at the argument we got.  We use all the common list separators.
2666   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2667   for pkg in $enableval; do
2668     if test "X$pkg" = "X$p"; then
2669       enable_shared=yes
2670     fi
2671   done
2672   IFS="$ac_save_ifs"
2673   ;;
2674 esac
2675 else
2676   enable_shared=yes
2677 fi
2678
2679
2680
2681 # validate options
2682 if test $ol_enable_slapd = no ; then
2683                 if test $ol_enable_slapi = yes ; then
2684                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2685         fi
2686         if test $ol_enable_bdb = yes ; then
2687                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2688         fi
2689         if test $ol_enable_dnssrv = yes ; then
2690                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2691         fi
2692         if test $ol_enable_hdb = yes ; then
2693                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2694         fi
2695         if test $ol_enable_ldap = yes ; then
2696                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2697         fi
2698         if test $ol_enable_ldbm = yes ; then
2699                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2700         fi
2701         if test $ol_enable_meta = yes ; then
2702                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2703         fi
2704         if test $ol_enable_monitor = yes ; then
2705                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2706         fi
2707         if test $ol_enable_null = yes ; then
2708                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2709         fi
2710         if test $ol_enable_passwd = yes ; then
2711                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2712         fi
2713         if test $ol_enable_perl = yes ; then
2714                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2715         fi
2716         if test $ol_enable_relay = yes ; then
2717                 echo "configure: warning: slapd disabled, ignoring --enable-relay argument" 1>&2
2718         fi
2719         if test $ol_enable_shell = yes ; then
2720                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2721         fi
2722         if test $ol_enable_sql = yes ; then
2723                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2724         fi
2725         if test $ol_enable_modules = yes ; then
2726                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2727         fi
2728         if test $ol_enable_multimaster = yes ; then
2729                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2730         fi
2731         if test $ol_enable_wrappers = yes ; then
2732                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2733         fi
2734         if test $ol_enable_rlookups = yes ; then
2735                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2736         fi
2737         if test $ol_enable_aci = yes ; then
2738                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2739         fi
2740         if test $ol_with_ldbm_api != auto ; then
2741                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2742         fi
2743         if test $ol_with_ldbm_type != auto ; then
2744                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2745         fi
2746         if test $ol_with_bdb_module != static ; then
2747                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2748         fi
2749         if test $ol_with_dnssrv_module != static ; then
2750                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2751         fi
2752         if test $ol_with_hdb_module != static ; then
2753                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2754         fi
2755         if test $ol_with_ldap_module != static ; then
2756                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2757         fi
2758         if test $ol_with_ldbm_module != static ; then
2759                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2760         fi
2761         if test $ol_with_meta_module != static ; then
2762                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2763         fi
2764         if test $ol_with_monitor_module != static ; then
2765                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2766         fi
2767         if test $ol_with_null_module != static ; then
2768                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2769         fi
2770         if test $ol_with_passwd_module != static ; then
2771                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2772         fi
2773         if test $ol_with_perl_module != static ; then
2774                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2775         fi
2776         if test $ol_with_relay_module != static ; then
2777                 echo "configure: warning: slapd disabled, ignoring --with-relay-module argument" 1>&2
2778         fi
2779         if test $ol_with_shell_module != static ; then
2780                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2781         fi
2782         if test $ol_with_sql_module != static ; then
2783                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2784         fi
2785         if test $ol_enable_slurpd = yes ; then
2786                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2787         fi
2788         if test $ol_enable_rewrite = yes ; then
2789                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2790         fi
2791                 if test $ol_with_chain != no ; then
2792                 echo "configure: warning: slapd disabled, ignoring --with-chain argument" 1>&2
2793         fi
2794         if test $ol_with_denyop != no ; then
2795                 echo "configure: warning: slapd disabled, ignoring --with-denyop argument" 1>&2
2796         fi
2797         if test $ol_with_dyngroup != no ; then
2798                 echo "configure: warning: slapd disabled, ignoring --with-dyngroup argument" 1>&2
2799         fi
2800         if test $ol_with_proxycache != no ; then
2801                 echo "configure: warning: slapd disabled, ignoring --with-proxycache argument" 1>&2
2802         fi
2803         if test $ol_with_rwm != no ; then
2804                 echo "configure: warning: slapd disabled, ignoring --with-rwm argument" 1>&2
2805         fi
2806
2807         # force settings to no
2808         ol_enable_slapi=no
2809         ol_enable_bdb=no
2810         ol_enable_dnssrv=no
2811         ol_enable_hdb=no
2812         ol_enable_ldap=no
2813         ol_enable_ldbm=no
2814         ol_enable_meta=no
2815         ol_enable_monitor=no
2816         ol_enable_null=no
2817         ol_enable_passwd=no
2818         ol_enable_perl=no
2819         ol_enable_relay=no
2820         ol_enable_shell=no
2821         ol_enable_sql=no
2822
2823         ol_enable_modules=no
2824         ol_enable_multimaster=no
2825         ol_enable_rlookups=no
2826         ol_enable_aci=no
2827         ol_enable_wrappers=no
2828
2829         ol_with_ldbm_api=no
2830         ol_with_ldbm_type=no
2831
2832         ol_with_bdb_module=static
2833         ol_with_dnssrv_module=static
2834         ol_with_hdb_module=static
2835         ol_with_ldap_module=static
2836         ol_with_ldbm_module=static
2837         ol_with_meta_module=static
2838         ol_with_monitor_module=static
2839         ol_with_null_module=static
2840         ol_with_passwd_module=static
2841         ol_with_perl_module=static
2842         ol_with_relay_module=static
2843         ol_with_shell_module=static
2844         ol_with_sql_module=static
2845
2846         ol_enable_slurpd=no
2847
2848         ol_enable_rewrite=no
2849
2850         ol_with_chain=no
2851         ol_with_denyop=no
2852         ol_with_dyngroup=no
2853         ol_with_proxycache=no
2854         ol_with_rwm=no
2855
2856 elif test $ol_enable_ldbm = no ; then
2857         
2858         if test $ol_with_ldbm_api != auto ; then
2859                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2860         fi
2861
2862         if test $ol_with_ldbm_type != auto ; then
2863                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2864         fi
2865
2866         if test $ol_with_ldbm_module != static ; then
2867                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2868         fi
2869
2870         if test $ol_enable_modules != yes -a \
2871                 $ol_enable_bdb = no -a \
2872                 $ol_enable_dnssrv = no -a \
2873                 $ol_enable_hdb = no -a \
2874                 $ol_enable_ldap = no -a \
2875                 $ol_enable_meta = no -a \
2876                 $ol_enable_monitor = no -a \
2877                 $ol_enable_null = no -a \
2878                 $ol_enable_passwd = no -a \
2879                 $ol_enable_perl = no -a \
2880                 $ol_enable_relay = no -a \
2881                 $ol_enable_shell = no -a \
2882                 $ol_enable_sql = no ; then
2883
2884                 if test $ol_enable_slapd = yes ; then
2885                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2886                 else
2887                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2888                         ol_enable_slapd=no
2889                 fi
2890         fi
2891
2892         ol_with_ldbm_api=no
2893         ol_with_ldbm_type=no
2894         ol_with_ldbm_module=static
2895
2896         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2897                 ol_with_ldbm_api=berkeley
2898         fi
2899
2900 else
2901                 if test $ol_with_ldbm_api = gdbm -a \
2902                 $ol_with_ldbm_type = btree ; then
2903                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2904         fi
2905         if test $ol_with_ldbm_api = mdbm -a \
2906                 $ol_with_ldbm_type = btree ; then
2907                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2908         fi
2909         if test $ol_with_ldbm_api = ndbm -a \
2910                 $ol_with_ldbm_type = btree ; then
2911                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2912         fi
2913
2914         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2915                 if test $ol_with_ldbm_api = auto ; then
2916                         ol_with_ldbm_api=berkeley
2917                 elif test $ol_with_ldbm_api != berkeley ; then
2918                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2919                 fi
2920
2921         elif test $ol_enable_bdb = auto ; then
2922                 if test $ol_with_ldbm_api != berkeley \
2923                         -o $ol_with_ldbm_api != auto ; then
2924                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2925                         ol_enable_bdb=no
2926                 fi
2927         fi
2928 fi
2929
2930 if test $ol_enable_slurpd = yes ; then
2931                 if test $ol_with_threads = no ; then
2932                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2933         fi
2934 fi
2935
2936 if test $ol_enable_lmpasswd = yes ; then
2937         if test $ol_with_tls = no ; then
2938                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2939         fi
2940 fi
2941
2942 if test $ol_enable_kbind = yes ; then
2943         if test $ol_with_kerberos = no ; then
2944                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2945         elif test $ol_with_kerberos = auto ; then
2946                 ol_with_kerberos=yes
2947         fi
2948
2949 elif test $ol_enable_kbind = no ; then
2950         if test $ol_with_kerberos = auto ; then
2951                 ol_with_kerberos=no
2952         elif test $ol_with_kerberos != no ; then
2953                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2954                 ol_with_kerberos=no
2955         fi
2956 fi
2957
2958 if test $ol_enable_spasswd = yes ; then
2959         if test $ol_with_cyrus_sasl = no ; then
2960                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2961         fi
2962         ol_with_cyrus_sasl=yes
2963 fi
2964
2965 echo "$ac_t""done" 1>&6
2966
2967 LDAP_LIBS=
2968 LDBM_LIBS=
2969 LTHREAD_LIBS=
2970 LUTIL_LIBS=
2971
2972 SLAPD_LIBS=
2973 SLURPD_LIBS=
2974
2975 BUILD_SLAPD=no
2976 BUILD_SLURPD=no
2977
2978 BUILD_THREAD=no
2979
2980 BUILD_SLAPI=no
2981 SLAPD_SLAPI_DEPEND=
2982
2983 BUILD_BDB=no
2984 BUILD_DNSSRV=no
2985 BUILD_HDB=no
2986 BUILD_LDAP=no
2987 BUILD_LDBM=no
2988 BUILD_META=no
2989 BUILD_MONITOR=no
2990 BUILD_NULL=no
2991 BUILD_PASSWD=no
2992 BUILD_PERL=no
2993 BUILD_RELAY=no
2994 BUILD_SHELL=no
2995 BUILD_SQL=no
2996
2997 BUILD_BDB_DYNAMIC=static
2998 BUILD_DNSSRV_DYNAMIC=static
2999 BUILD_HDB_DYNAMIC=static
3000 BUILD_LDAP_DYNAMIC=static
3001 BUILD_LDBM_DYNAMIC=static
3002 BUILD_META_DYNAMIC=static
3003 BUILD_MONITOR_DYNAMIC=static
3004 BUILD_NULL_DYNAMIC=static
3005 BUILD_PASSWD_DYNAMIC=static
3006 BUILD_PERL_DYNAMIC=static
3007 BUILD_RELAY_DYNAMIC=static
3008 BUILD_SHELL_DYNAMIC=static
3009 BUILD_SQL_DYNAMIC=static
3010
3011 BUILD_CHAIN=no
3012 BUILD_DENYOP=no
3013 BUILD_DYNGROUP=no
3014 BUILD_PROXYCACHE=no
3015 BUILD_RWM=no
3016
3017 SLAPD_DYNAMIC_OVERLAYS=
3018
3019 SLAPD_MODULES_LDFLAGS=
3020 SLAPD_MODULES_CPPFLAGS=
3021
3022 SLAPD_STATIC_BACKENDS=
3023 SLAPD_DYNAMIC_BACKENDS=
3024
3025 SLAPD_PERL_LDFLAGS=
3026 MOD_PERL_LDFLAGS=
3027 PERL_CPPFLAGS=
3028
3029 SLAPD_SQL_LDFLAGS=
3030 SLAPD_SQL_LIBS=
3031 SLAPD_SQL_INCLUDES=
3032
3033 KRB4_LIBS=
3034 KRB5_LIBS=
3035 SASL_LIBS=
3036 TLS_LIBS=
3037 MODULES_LIBS=
3038 SLAPI_LIBS=
3039 LIBSLAPI=
3040 LIBSLAPITOOLS=
3041 AUTH_LIBS=
3042
3043 SLAPD_SLP_LIBS=
3044
3045
3046 # Find a good install program.  We prefer a C program (faster),
3047 # so one script is as good as another.  But avoid the broken or
3048 # incompatible versions:
3049 # SysV /etc/install, /usr/sbin/install
3050 # SunOS /usr/etc/install
3051 # IRIX /sbin/install
3052 # AIX /bin/install
3053 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3054 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3055 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3056 # ./install, which can be erroneously created by make from ./install.sh.
3057 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3058 echo "configure:3059: checking for a BSD compatible install" >&5
3059 if test -z "$INSTALL"; then
3060 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
3061   echo $ac_n "(cached) $ac_c" 1>&6
3062 else
3063     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
3064   for ac_dir in $PATH; do
3065     # Account for people who put trailing slashes in PATH elements.
3066     case "$ac_dir/" in
3067     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3068     *)
3069       # OSF1 and SCO ODT 3.0 have their own names for install.
3070       # Don't use installbsd from OSF since it installs stuff as root
3071       # by default.
3072       for ac_prog in ginstall scoinst install; do
3073         if test -f $ac_dir/$ac_prog; then
3074           if test $ac_prog = install &&
3075             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3076             # AIX install.  It has an incompatible calling convention.
3077             :
3078           elif test $ac_prog = install &&
3079             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
3080             # program-specific install script used by HP pwplus--don't use.
3081             :
3082           else
3083             ac_cv_path_install="$ac_dir/$ac_prog -c"
3084             break 2
3085           fi
3086         fi
3087       done
3088       ;;
3089     esac
3090   done
3091   IFS="$ac_save_IFS"
3092
3093 fi
3094   if test "${ac_cv_path_install+set}" = set; then
3095     INSTALL="$ac_cv_path_install"
3096   else
3097     # As a last resort, use the slow shell script.  We don't cache a
3098     # path for INSTALL within a source directory, because that will
3099     # break other packages using the cache if that directory is
3100     # removed, or if the path is relative.
3101     INSTALL="$ac_install_sh"
3102   fi
3103 fi
3104 echo "$ac_t""$INSTALL" 1>&6
3105
3106 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3107 # It thinks the first close brace ends the variable substitution.
3108 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3109
3110 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3111
3112 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3113
3114
3115 cat >> confdefs.h <<\EOF
3116 #define HAVE_MKVERSION 1
3117 EOF
3118
3119
3120
3121
3122 ol_aix_threads=no
3123 case "$target" in
3124 *-*-aix*)       if test -z "$CC" ; then
3125                 case "$ol_with_threads" in
3126                 auto | yes |  posix) ol_aix_threads=yes ;;
3127                 esac
3128         fi
3129 ;;
3130 esac
3131
3132 if test $ol_aix_threads = yes ; then
3133         if test -z "${CC}" ; then
3134                 for ac_prog in cc_r xlc_r cc
3135 do
3136 # Extract the first word of "$ac_prog", so it can be a program name with args.
3137 set dummy $ac_prog; ac_word=$2
3138 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3139 echo "configure:3140: checking for $ac_word" >&5
3140 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3141   echo $ac_n "(cached) $ac_c" 1>&6
3142 else
3143   if test -n "$CC"; then
3144   ac_cv_prog_CC="$CC" # Let the user override the test.
3145 else
3146   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3147   ac_dummy="$PATH"
3148   for ac_dir in $ac_dummy; do
3149     test -z "$ac_dir" && ac_dir=.
3150     if test -f $ac_dir/$ac_word; then
3151       ac_cv_prog_CC="$ac_prog"
3152       break
3153     fi
3154   done
3155   IFS="$ac_save_ifs"
3156 fi
3157 fi
3158 CC="$ac_cv_prog_CC"
3159 if test -n "$CC"; then
3160   echo "$ac_t""$CC" 1>&6
3161 else
3162   echo "$ac_t""no" 1>&6
3163 fi
3164
3165 test -n "$CC" && break
3166 done
3167
3168
3169                 if test "$CC" = cc ; then
3170                                                 if test $ol_with_threads != auto ; then
3171                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3172                         else
3173                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3174                         fi
3175                         ol_with_threads=no
3176                 fi
3177         fi
3178
3179         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3180                 ol_with_threads=posix
3181                 ol_cv_pthread_create=yes
3182         fi
3183 fi
3184
3185 if test -z "${CC}"; then
3186         for ac_prog in cc gcc
3187 do
3188 # Extract the first word of "$ac_prog", so it can be a program name with args.
3189 set dummy $ac_prog; ac_word=$2
3190 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3191 echo "configure:3192: checking for $ac_word" >&5
3192 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3193   echo $ac_n "(cached) $ac_c" 1>&6
3194 else
3195   if test -n "$CC"; then
3196   ac_cv_prog_CC="$CC" # Let the user override the test.
3197 else
3198   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3199   ac_dummy="$PATH"
3200   for ac_dir in $ac_dummy; do
3201     test -z "$ac_dir" && ac_dir=.
3202     if test -f $ac_dir/$ac_word; then
3203       ac_cv_prog_CC="$ac_prog"
3204       break
3205     fi
3206   done
3207   IFS="$ac_save_ifs"
3208 fi
3209 fi
3210 CC="$ac_cv_prog_CC"
3211 if test -n "$CC"; then
3212   echo "$ac_t""$CC" 1>&6
3213 else
3214   echo "$ac_t""no" 1>&6
3215 fi
3216
3217 test -n "$CC" && break
3218 done
3219 test -n "$CC" || CC="missing"
3220
3221
3222         if test "${CC}" = "missing" ; then
3223                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3224         fi
3225 fi
3226
3227 if test -z "${AR}"; then
3228         for ac_prog in ar gar
3229 do
3230 # Extract the first word of "$ac_prog", so it can be a program name with args.
3231 set dummy $ac_prog; ac_word=$2
3232 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3233 echo "configure:3234: checking for $ac_word" >&5
3234 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3235   echo $ac_n "(cached) $ac_c" 1>&6
3236 else
3237   if test -n "$AR"; then
3238   ac_cv_prog_AR="$AR" # Let the user override the test.
3239 else
3240   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3241   ac_dummy="$PATH"
3242   for ac_dir in $ac_dummy; do
3243     test -z "$ac_dir" && ac_dir=.
3244     if test -f $ac_dir/$ac_word; then
3245       ac_cv_prog_AR="$ac_prog"
3246       break
3247     fi
3248   done
3249   IFS="$ac_save_ifs"
3250 fi
3251 fi
3252 AR="$ac_cv_prog_AR"
3253 if test -n "$AR"; then
3254   echo "$ac_t""$AR" 1>&6
3255 else
3256   echo "$ac_t""no" 1>&6
3257 fi
3258
3259 test -n "$AR" && break
3260 done
3261 test -n "$AR" || AR="missing"
3262
3263
3264         if test "${AR}" = "missing" ; then
3265                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3266         fi
3267 fi
3268
3269
3270
3271 # Find the correct PATH separator.  Usually this is `:', but
3272 # DJGPP uses `;' like DOS.
3273 if test "X${PATH_SEPARATOR+set}" != Xset; then
3274   UNAME=${UNAME-`uname 2>/dev/null`}
3275   case X$UNAME in
3276     *-DOS) lt_cv_sys_path_separator=';' ;;
3277     *)     lt_cv_sys_path_separator=':' ;;
3278   esac
3279   PATH_SEPARATOR=$lt_cv_sys_path_separator
3280 fi
3281
3282 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3283 echo "configure:3284: checking for Cygwin environment" >&5
3284 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3285   echo $ac_n "(cached) $ac_c" 1>&6
3286 else
3287   cat > conftest.$ac_ext <<EOF
3288 #line 3289 "configure"
3289 #include "confdefs.h"
3290
3291 int main() {
3292
3293 #ifndef __CYGWIN__
3294 #define __CYGWIN__ __CYGWIN32__
3295 #endif
3296 return __CYGWIN__;
3297 ; return 0; }
3298 EOF
3299 if { (eval echo configure:3300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3300   rm -rf conftest*
3301   ac_cv_cygwin=yes
3302 else
3303   echo "configure: failed program was:" >&5
3304   cat conftest.$ac_ext >&5
3305   rm -rf conftest*
3306   ac_cv_cygwin=no
3307 fi
3308 rm -f conftest*
3309 fi
3310
3311 echo "$ac_t""$ac_cv_cygwin" 1>&6
3312 CYGWIN=
3313 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3314 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3315 echo "configure:3316: checking for mingw32 environment" >&5
3316 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3317   echo $ac_n "(cached) $ac_c" 1>&6
3318 else
3319   cat > conftest.$ac_ext <<EOF
3320 #line 3321 "configure"
3321 #include "confdefs.h"
3322
3323 int main() {
3324 return __MINGW32__;
3325 ; return 0; }
3326 EOF
3327 if { (eval echo configure:3328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3328   rm -rf conftest*
3329   ac_cv_mingw32=yes
3330 else
3331   echo "configure: failed program was:" >&5
3332   cat conftest.$ac_ext >&5
3333   rm -rf conftest*
3334   ac_cv_mingw32=no
3335 fi
3336 rm -f conftest*
3337 fi
3338
3339 echo "$ac_t""$ac_cv_mingw32" 1>&6
3340 MINGW32=
3341 test "$ac_cv_mingw32" = yes && MINGW32=yes
3342 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3343 echo "configure:3344: checking for EMX OS/2 environment" >&5
3344 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3345   echo $ac_n "(cached) $ac_c" 1>&6
3346 else
3347   cat > conftest.$ac_ext <<EOF
3348 #line 3349 "configure"
3349 #include "confdefs.h"
3350
3351 int main() {
3352 return __EMX__;
3353 ; return 0; }
3354 EOF
3355 if { (eval echo configure:3356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3356   rm -rf conftest*
3357   ac_cv_emxos2=yes
3358 else
3359   echo "configure: failed program was:" >&5
3360   cat conftest.$ac_ext >&5
3361   rm -rf conftest*
3362   ac_cv_emxos2=no
3363 fi
3364 rm -f conftest*
3365 fi
3366
3367 echo "$ac_t""$ac_cv_emxos2" 1>&6
3368 EMXOS2=
3369 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3370 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3371 echo "configure:3372: checking how to run the C preprocessor" >&5
3372 # On Suns, sometimes $CPP names a directory.
3373 if test -n "$CPP" && test -d "$CPP"; then
3374   CPP=
3375 fi
3376 if test -z "$CPP"; then
3377 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3378   echo $ac_n "(cached) $ac_c" 1>&6
3379 else
3380     # This must be in double quotes, not single quotes, because CPP may get
3381   # substituted into the Makefile and "${CC-cc}" will confuse make.
3382   CPP="${CC-cc} -E"
3383   # On the NeXT, cc -E runs the code through the compiler's parser,
3384   # not just through cpp.
3385   cat > conftest.$ac_ext <<EOF
3386 #line 3387 "configure"
3387 #include "confdefs.h"
3388 #include <assert.h>
3389 Syntax Error
3390 EOF
3391 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3392 { (eval echo configure:3393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3393 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3394 if test -z "$ac_err"; then
3395   :
3396 else
3397   echo "$ac_err" >&5
3398   echo "configure: failed program was:" >&5
3399   cat conftest.$ac_ext >&5
3400   rm -rf conftest*
3401   CPP="${CC-cc} -E -traditional-cpp"
3402   cat > conftest.$ac_ext <<EOF
3403 #line 3404 "configure"
3404 #include "confdefs.h"
3405 #include <assert.h>
3406 Syntax Error
3407 EOF
3408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3409 { (eval echo configure:3410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3411 if test -z "$ac_err"; then
3412   :
3413 else
3414   echo "$ac_err" >&5
3415   echo "configure: failed program was:" >&5
3416   cat conftest.$ac_ext >&5
3417   rm -rf conftest*
3418   CPP="${CC-cc} -nologo -E"
3419   cat > conftest.$ac_ext <<EOF
3420 #line 3421 "configure"
3421 #include "confdefs.h"
3422 #include <assert.h>
3423 Syntax Error
3424 EOF
3425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3426 { (eval echo configure:3427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3428 if test -z "$ac_err"; then
3429   :
3430 else
3431   echo "$ac_err" >&5
3432   echo "configure: failed program was:" >&5
3433   cat conftest.$ac_ext >&5
3434   rm -rf conftest*
3435   CPP=/lib/cpp
3436 fi
3437 rm -f conftest*
3438 fi
3439 rm -f conftest*
3440 fi
3441 rm -f conftest*
3442   ac_cv_prog_CPP="$CPP"
3443 fi
3444   CPP="$ac_cv_prog_CPP"
3445 else
3446   ac_cv_prog_CPP="$CPP"
3447 fi
3448 echo "$ac_t""$CPP" 1>&6
3449
3450 # Check whether --enable-fast-install or --disable-fast-install was given.
3451 if test "${enable_fast_install+set}" = set; then
3452   enableval="$enable_fast_install"
3453   p=${PACKAGE-default}
3454 case $enableval in
3455 yes) enable_fast_install=yes ;;
3456 no) enable_fast_install=no ;;
3457 *)
3458   enable_fast_install=no
3459   # Look at the argument we got.  We use all the common list separators.
3460   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3461   for pkg in $enableval; do
3462     if test "X$pkg" = "X$p"; then
3463       enable_fast_install=yes
3464     fi
3465   done
3466   IFS="$ac_save_ifs"
3467   ;;
3468 esac
3469 else
3470   enable_fast_install=yes
3471 fi
3472
3473 # Extract the first word of "gcc", so it can be a program name with args.
3474 set dummy gcc; ac_word=$2
3475 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3476 echo "configure:3477: checking for $ac_word" >&5
3477 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3478   echo $ac_n "(cached) $ac_c" 1>&6
3479 else
3480   if test -n "$CC"; then
3481   ac_cv_prog_CC="$CC" # Let the user override the test.
3482 else
3483   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3484   ac_dummy="$PATH"
3485   for ac_dir in $ac_dummy; do
3486     test -z "$ac_dir" && ac_dir=.
3487     if test -f $ac_dir/$ac_word; then
3488       ac_cv_prog_CC="gcc"
3489       break
3490     fi
3491   done
3492   IFS="$ac_save_ifs"
3493 fi
3494 fi
3495 CC="$ac_cv_prog_CC"
3496 if test -n "$CC"; then
3497   echo "$ac_t""$CC" 1>&6
3498 else
3499   echo "$ac_t""no" 1>&6
3500 fi
3501
3502 if test -z "$CC"; then
3503   # Extract the first word of "cc", so it can be a program name with args.
3504 set dummy cc; ac_word=$2
3505 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3506 echo "configure:3507: checking for $ac_word" >&5
3507 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3508   echo $ac_n "(cached) $ac_c" 1>&6
3509 else
3510   if test -n "$CC"; then
3511   ac_cv_prog_CC="$CC" # Let the user override the test.
3512 else
3513   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3514   ac_prog_rejected=no
3515   ac_dummy="$PATH"
3516   for ac_dir in $ac_dummy; do
3517     test -z "$ac_dir" && ac_dir=.
3518     if test -f $ac_dir/$ac_word; then
3519       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3520         ac_prog_rejected=yes
3521         continue
3522       fi
3523       ac_cv_prog_CC="cc"
3524       break
3525     fi
3526   done
3527   IFS="$ac_save_ifs"
3528 if test $ac_prog_rejected = yes; then
3529   # We found a bogon in the path, so make sure we never use it.
3530   set dummy $ac_cv_prog_CC
3531   shift
3532   if test $# -gt 0; then
3533     # We chose a different compiler from the bogus one.
3534     # However, it has the same basename, so the bogon will be chosen
3535     # first if we set CC to just the basename; use the full file name.
3536     shift
3537     set dummy "$ac_dir/$ac_word" "$@"
3538     shift
3539     ac_cv_prog_CC="$@"
3540   fi
3541 fi
3542 fi
3543 fi
3544 CC="$ac_cv_prog_CC"
3545 if test -n "$CC"; then
3546   echo "$ac_t""$CC" 1>&6
3547 else
3548   echo "$ac_t""no" 1>&6
3549 fi
3550
3551   if test -z "$CC"; then
3552     case "`uname -s`" in
3553     *win32* | *WIN32* | *CYGWIN*)
3554       # Extract the first word of "cl", so it can be a program name with args.
3555 set dummy cl; ac_word=$2
3556 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3557 echo "configure:3558: checking for $ac_word" >&5
3558 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3559   echo $ac_n "(cached) $ac_c" 1>&6
3560 else
3561   if test -n "$CC"; then
3562   ac_cv_prog_CC="$CC" # Let the user override the test.
3563 else
3564   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3565   ac_dummy="$PATH"
3566   for ac_dir in $ac_dummy; do
3567     test -z "$ac_dir" && ac_dir=.
3568     if test -f $ac_dir/$ac_word; then
3569       ac_cv_prog_CC="cl"
3570       break
3571     fi
3572   done
3573   IFS="$ac_save_ifs"
3574 fi
3575 fi
3576 CC="$ac_cv_prog_CC"
3577 if test -n "$CC"; then
3578   echo "$ac_t""$CC" 1>&6
3579 else
3580   echo "$ac_t""no" 1>&6
3581 fi
3582  ;;
3583     esac
3584   fi
3585   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3586 fi
3587
3588 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3589 echo "configure:3590: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3590
3591 ac_ext=c
3592 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3593 ac_cpp='$CPP $CPPFLAGS'
3594 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3595 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3596 cross_compiling=$ac_cv_prog_cc_cross
3597
3598 cat > conftest.$ac_ext << EOF
3599
3600 #line 3601 "configure"
3601 #include "confdefs.h"
3602
3603 main(){return(0);}
3604 EOF
3605 if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3606   ac_cv_prog_cc_works=yes
3607   # If we can't run a trivial program, we are probably using a cross compiler.
3608   if (./conftest; exit) 2>/dev/null; then
3609     ac_cv_prog_cc_cross=no
3610   else
3611     ac_cv_prog_cc_cross=yes
3612   fi
3613 else
3614   echo "configure: failed program was:" >&5
3615   cat conftest.$ac_ext >&5
3616   ac_cv_prog_cc_works=no
3617 fi
3618 rm -fr conftest*
3619 ac_ext=c
3620 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3621 ac_cpp='$CPP $CPPFLAGS'
3622 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3623 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3624 cross_compiling=$ac_cv_prog_cc_cross
3625
3626 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3627 if test $ac_cv_prog_cc_works = no; then
3628   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3629 fi
3630 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3631 echo "configure:3632: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3632 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3633 cross_compiling=$ac_cv_prog_cc_cross
3634
3635 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3636 echo "configure:3637: checking whether we are using GNU C" >&5
3637 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3638   echo $ac_n "(cached) $ac_c" 1>&6
3639 else
3640   cat > conftest.c <<EOF
3641 #ifdef __GNUC__
3642   yes;
3643 #endif
3644 EOF
3645 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3646   ac_cv_prog_gcc=yes
3647 else
3648   ac_cv_prog_gcc=no
3649 fi
3650 fi
3651
3652 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3653
3654 if test $ac_cv_prog_gcc = yes; then
3655   GCC=yes
3656 else
3657   GCC=
3658 fi
3659
3660 ac_test_CFLAGS="${CFLAGS+set}"
3661 ac_save_CFLAGS="$CFLAGS"
3662 CFLAGS=
3663 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3664 echo "configure:3665: checking whether ${CC-cc} accepts -g" >&5
3665 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3666   echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668   echo 'void f(){}' > conftest.c
3669 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3670   ac_cv_prog_cc_g=yes
3671 else
3672   ac_cv_prog_cc_g=no
3673 fi
3674 rm -f conftest*
3675
3676 fi
3677
3678 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3679 if test "$ac_test_CFLAGS" = set; then
3680   CFLAGS="$ac_save_CFLAGS"
3681 elif test $ac_cv_prog_cc_g = yes; then
3682   if test "$GCC" = yes; then
3683     CFLAGS="-g -O2"
3684   else
3685     CFLAGS="-g"
3686   fi
3687 else
3688   if test "$GCC" = yes; then
3689     CFLAGS="-O2"
3690   else
3691     CFLAGS=
3692   fi
3693 fi
3694
3695 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3696 if test "${with_gnu_ld+set}" = set; then
3697   withval="$with_gnu_ld"
3698   test "$withval" = no || with_gnu_ld=yes
3699 else
3700   with_gnu_ld=no
3701 fi
3702
3703 ac_prog=ld
3704 if test "$GCC" = yes; then
3705   # Check if gcc -print-prog-name=ld gives a path.
3706   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3707 echo "configure:3708: checking for ld used by GCC" >&5
3708   case $host in
3709   *-*-mingw*)
3710     # gcc leaves a trailing carriage return which upsets mingw
3711     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3712   *)
3713     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3714   esac
3715   case $ac_prog in
3716     # Accept absolute paths.
3717     [\\/]* | [A-Za-z]:[\\/]*)
3718       re_direlt='/[^/][^/]*/\.\./'
3719       # Canonicalize the path of ld
3720       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3721       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3722         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3723       done
3724       test -z "$LD" && LD="$ac_prog"
3725       ;;
3726   "")
3727     # If it fails, then pretend we aren't using GCC.
3728     ac_prog=ld
3729     ;;
3730   *)
3731     # If it is relative, then search for the first ld in PATH.
3732     with_gnu_ld=unknown
3733     ;;
3734   esac
3735 elif test "$with_gnu_ld" = yes; then
3736   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3737 echo "configure:3738: checking for GNU ld" >&5
3738 else
3739   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3740 echo "configure:3741: checking for non-GNU ld" >&5
3741 fi
3742 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3743   echo $ac_n "(cached) $ac_c" 1>&6
3744 else
3745   if test -z "$LD"; then
3746   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3747   for ac_dir in $PATH; do
3748     test -z "$ac_dir" && ac_dir=.
3749     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3750       lt_cv_path_LD="$ac_dir/$ac_prog"
3751       # Check to see if the program is GNU ld.  I'd rather use --version,
3752       # but apparently some GNU ld's only accept -v.
3753       # Break only if it was the GNU/non-GNU ld that we prefer.
3754       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3755         test "$with_gnu_ld" != no && break
3756       else
3757         test "$with_gnu_ld" != yes && break
3758       fi
3759     fi
3760   done
3761   IFS="$ac_save_ifs"
3762 else
3763   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3764 fi
3765 fi
3766
3767 LD="$lt_cv_path_LD"
3768 if test -n "$LD"; then
3769   echo "$ac_t""$LD" 1>&6
3770 else
3771   echo "$ac_t""no" 1>&6
3772 fi
3773 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3774 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3775 echo "configure:3776: checking if the linker ($LD) is GNU ld" >&5
3776 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3777   echo $ac_n "(cached) $ac_c" 1>&6
3778 else
3779   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3780 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3781   lt_cv_prog_gnu_ld=yes
3782 else
3783   lt_cv_prog_gnu_ld=no
3784 fi
3785 fi
3786
3787 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3788 with_gnu_ld=$lt_cv_prog_gnu_ld
3789
3790
3791 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3792 echo "configure:3793: checking for $LD option to reload object files" >&5
3793 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3794   echo $ac_n "(cached) $ac_c" 1>&6
3795 else
3796   lt_cv_ld_reload_flag='-r'
3797 fi
3798
3799 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3800 reload_flag=$lt_cv_ld_reload_flag
3801 test -n "$reload_flag" && reload_flag=" $reload_flag"
3802
3803 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3804 echo "configure:3805: checking for BSD-compatible nm" >&5
3805 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3806   echo $ac_n "(cached) $ac_c" 1>&6
3807 else
3808   if test -n "$NM"; then
3809   # Let the user override the test.
3810   lt_cv_path_NM="$NM"
3811 else
3812   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3813   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3814     test -z "$ac_dir" && ac_dir=.
3815     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3816     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3817       # Check to see if the nm accepts a BSD-compat flag.
3818       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3819       #   nm: unknown option "B" ignored
3820       # Tru64's nm complains that /dev/null is an invalid object file
3821       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3822         lt_cv_path_NM="$tmp_nm -B"
3823         break
3824       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3825         lt_cv_path_NM="$tmp_nm -p"
3826         break
3827       else
3828         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3829         continue # so that we can try to find one that supports BSD flags
3830       fi
3831     fi
3832   done
3833   IFS="$ac_save_ifs"
3834   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3835 fi
3836 fi
3837
3838 NM="$lt_cv_path_NM"
3839 echo "$ac_t""$NM" 1>&6
3840
3841 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3842 echo "configure:3843: checking for a sed that does not truncate output" >&5
3843 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3844   echo $ac_n "(cached) $ac_c" 1>&6
3845 else
3846   # Loop through the user's path and test for sed and gsed.
3847 # Then use that list of sed's as ones to test for truncation.
3848 as_executable_p="test -f"
3849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3850 for as_dir in $PATH
3851 do
3852   IFS=$as_save_IFS
3853   test -z "$as_dir" && as_dir=.
3854   for ac_prog in sed gsed; do
3855     for ac_exec_ext in '' $ac_executable_extensions; do
3856       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3857         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3858       fi
3859     done
3860   done
3861 done
3862
3863   # Create a temporary directory, and hook for its removal unless debugging.
3864 $debug ||
3865 {
3866   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3867   trap '{ (exit 1); exit 1; }' 1 2 13 15
3868 }
3869
3870 # Create a (secure) tmp directory for tmp files.
3871 : ${TMPDIR=/tmp}
3872 {
3873   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3874   test -n "$tmp" && test -d "$tmp"
3875 }  ||
3876 {
3877   tmp=$TMPDIR/sed$$-$RANDOM
3878   (umask 077 && mkdir $tmp)
3879 } ||
3880 {
3881    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3882    { (exit 1); exit 1; }
3883 }
3884   _max=0
3885   _count=0
3886   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3887   # along with /bin/sed that truncates output.
3888   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3889     test ! -f ${_sed} && break
3890     cat /dev/null > "$tmp/sed.in"
3891     _count=0
3892     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3893     # Check for GNU sed and select it if it is found.
3894     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3895       lt_cv_path_SED=${_sed}
3896       break
3897     fi
3898     while true; do
3899       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3900       mv "$tmp/sed.tmp" "$tmp/sed.in"
3901       cp "$tmp/sed.in" "$tmp/sed.nl"
3902       echo >>"$tmp/sed.nl"
3903       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3904       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3905       # 40000 chars as input seems more than enough
3906       test $_count -gt 10 && break
3907       _count=`expr $_count + 1`
3908       if test $_count -gt $_max; then
3909         _max=$_count
3910         lt_cv_path_SED=$_sed
3911       fi
3912     done
3913   done
3914   rm -rf "$tmp"
3915
3916 fi
3917
3918 if test "X$SED" != "X"; then
3919   lt_cv_path_SED=$SED
3920 else
3921   SED=$lt_cv_path_SED
3922 fi
3923 echo "$ac_t""$SED" 1>&6
3924
3925 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3926 echo "configure:3927: checking whether ln -s works" >&5
3927 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3928   echo $ac_n "(cached) $ac_c" 1>&6
3929 else
3930   rm -f conftestdata
3931 if ln -s X conftestdata 2>/dev/null
3932 then
3933   rm -f conftestdata
3934   ac_cv_prog_LN_S="ln -s"
3935 else
3936   ac_cv_prog_LN_S=ln
3937 fi
3938 fi
3939 LN_S="$ac_cv_prog_LN_S"
3940 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3941   echo "$ac_t""yes" 1>&6
3942 else
3943   echo "$ac_t""no" 1>&6
3944 fi
3945
3946 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3947 echo "configure:3948: checking how to recognise dependent libraries" >&5
3948 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3949   echo $ac_n "(cached) $ac_c" 1>&6
3950 else
3951   lt_cv_file_magic_cmd='$MAGIC_CMD'
3952 lt_cv_file_magic_test_file=
3953 lt_cv_deplibs_check_method='unknown'
3954 # Need to set the preceding variable on all platforms that support
3955 # interlibrary dependencies.
3956 # 'none' -- dependencies not supported.
3957 # `unknown' -- same as none, but documents that we really don't know.
3958 # 'pass_all' -- all dependencies passed with no checks.
3959 # 'test_compile' -- check by making test program.
3960 # 'file_magic [[regex]]' -- check by looking for files in library path
3961 # which responds to the $file_magic_cmd with a given egrep regex.
3962 # If you have `file' or equivalent on your system and you're not sure
3963 # whether `pass_all' will *always* work, you probably want this one.
3964
3965 case $host_os in
3966 aix4* | aix5*)
3967   lt_cv_deplibs_check_method=pass_all
3968   ;;
3969
3970 beos*)
3971   lt_cv_deplibs_check_method=pass_all
3972   ;;
3973
3974 bsdi4*)
3975   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3976   lt_cv_file_magic_cmd='/usr/bin/file -L'
3977   lt_cv_file_magic_test_file=/shlib/libc.so
3978   ;;
3979
3980 cygwin* | mingw* | pw32*)
3981   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3982   lt_cv_file_magic_cmd='$OBJDUMP -f'
3983   ;;
3984
3985 darwin* | rhapsody*)
3986   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3987   lt_cv_file_magic_cmd='/usr/bin/file -L'
3988   case "$host_os" in
3989   rhapsody* | darwin1.[012])
3990     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3991     ;;
3992   *) # Darwin 1.3 on
3993     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3994     ;;
3995   esac
3996   ;;
3997
3998 freebsd*)
3999   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4000     case $host_cpu in
4001     i*86 )
4002       # Not sure whether the presence of OpenBSD here was a mistake.
4003       # Let's accept both of them until this is cleared up.
4004       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
4005       lt_cv_file_magic_cmd=/usr/bin/file
4006       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4007       ;;
4008     esac
4009   else
4010     lt_cv_deplibs_check_method=pass_all
4011   fi
4012   ;;
4013
4014 gnu*)
4015   lt_cv_deplibs_check_method=pass_all
4016   ;;
4017
4018 hpux10.20*|hpux11*)
4019   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
4020   lt_cv_file_magic_cmd=/usr/bin/file
4021   lt_cv_file_magic_test_file=/usr/lib/libc.sl
4022   ;;
4023
4024 irix5* | irix6* | nonstopux*)
4025   case $host_os in
4026   irix5* | nonstopux*)
4027     # this will be overridden with pass_all, but let us keep it just in case
4028     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4029     ;;
4030   *)
4031     case $LD in
4032     *-32|*"-32 ") libmagic=32-bit;;
4033     *-n32|*"-n32 ") libmagic=N32;;
4034     *-64|*"-64 ") libmagic=64-bit;;
4035     *) libmagic=never-match;;
4036     esac
4037     # this will be overridden with pass_all, but let us keep it just in case
4038     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
4039     ;;
4040   esac
4041   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4042   lt_cv_deplibs_check_method=pass_all
4043   ;;
4044
4045 # This must be Linux ELF.
4046 linux-gnu*)
4047   case $host_cpu in
4048   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
4049     lt_cv_deplibs_check_method=pass_all ;;
4050   *)
4051     # glibc up to 2.1.1 does not perform some relocations on ARM
4052     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
4053   esac
4054   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4055   ;;
4056
4057 netbsd*)
4058   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4059     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
4060   else
4061     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
4062   fi
4063   ;;
4064
4065 newos6*)
4066   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
4067   lt_cv_file_magic_cmd=/usr/bin/file
4068   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4069   ;;
4070
4071 openbsd*)
4072   lt_cv_file_magic_cmd=/usr/bin/file
4073   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4074   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4075     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
4076   else
4077     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4078   fi
4079   ;;
4080
4081 openedition*)
4082   lt_cv_deplibs_check_method=pass_all
4083   ;;
4084
4085 osf3* | osf4* | osf5*)
4086   # this will be overridden with pass_all, but let us keep it just in case
4087   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4088   lt_cv_file_magic_test_file=/shlib/libc.so
4089   lt_cv_deplibs_check_method=pass_all
4090   ;;
4091
4092 sco3.2v5*)
4093   lt_cv_deplibs_check_method=pass_all
4094   ;;
4095
4096 solaris*)
4097   lt_cv_deplibs_check_method=pass_all
4098   lt_cv_file_magic_test_file=/lib/libc.so
4099   ;;
4100
4101 sysv5uw[78]* | sysv4*uw2*)
4102   lt_cv_deplibs_check_method=pass_all
4103   ;;
4104
4105 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4106   case $host_vendor in
4107   motorola)
4108     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]'
4109     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4110     ;;
4111   ncr)
4112     lt_cv_deplibs_check_method=pass_all
4113     ;;
4114   sequent)
4115     lt_cv_file_magic_cmd='/bin/file'
4116     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4117     ;;
4118   sni)
4119     lt_cv_file_magic_cmd='/bin/file'
4120     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4121     lt_cv_file_magic_test_file=/lib/libc.so
4122     ;;
4123   siemens)
4124     lt_cv_deplibs_check_method=pass_all
4125     ;;
4126   esac
4127   ;;
4128 esac
4129
4130 fi
4131
4132 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
4133 file_magic_cmd=$lt_cv_file_magic_cmd
4134 deplibs_check_method=$lt_cv_deplibs_check_method
4135
4136 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4137 echo "configure:4138: checking for object suffix" >&5
4138 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4139   echo $ac_n "(cached) $ac_c" 1>&6
4140 else
4141   rm -f conftest*
4142 echo 'int i = 1;' > conftest.$ac_ext
4143 if { (eval echo configure:4144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4144   for ac_file in conftest.*; do
4145     case $ac_file in
4146     *.c) ;;
4147     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4148     esac
4149   done
4150 else
4151   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4152 fi
4153 rm -f conftest*
4154 fi
4155
4156 echo "$ac_t""$ac_cv_objext" 1>&6
4157 OBJEXT=$ac_cv_objext
4158 ac_objext=$ac_cv_objext
4159
4160
4161
4162
4163 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4164 echo "configure:4165: checking for executable suffix" >&5
4165 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4166   echo $ac_n "(cached) $ac_c" 1>&6
4167 else
4168   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4169   ac_cv_exeext=.exe
4170 else
4171   rm -f conftest*
4172   echo 'int main () { return 0; }' > conftest.$ac_ext
4173   ac_cv_exeext=
4174   if { (eval echo configure:4175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4175     for file in conftest.*; do
4176       case $file in
4177       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4178       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4179       esac
4180     done
4181   else
4182     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4183   fi
4184   rm -f conftest*
4185   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4186 fi
4187 fi
4188
4189 EXEEXT=""
4190 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4191 echo "$ac_t""${ac_cv_exeext}" 1>&6
4192 ac_exeext=$EXEEXT
4193
4194 if test $host != $build; then
4195   ac_tool_prefix=${host_alias}-
4196 else
4197   ac_tool_prefix=
4198 fi
4199
4200
4201
4202
4203 # Check for command to grab the raw symbol name followed by C symbol from nm.
4204 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4205 echo "configure:4206: checking command to parse $NM output" >&5
4206 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4207   echo $ac_n "(cached) $ac_c" 1>&6
4208 else
4209   
4210 # These are sane defaults that work on at least a few old systems.
4211 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4212
4213 # Character class describing NM global symbol codes.
4214 symcode='[BCDEGRST]'
4215
4216 # Regexp to match symbols that can be accessed directly from C.
4217 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4218
4219 # Transform the above into a raw symbol and a C symbol.
4220 symxfrm='\1 \2\3 \3'
4221
4222 # Transform an extracted symbol line into a proper C declaration
4223 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4224
4225 # Transform an extracted symbol line into symbol name and symbol address
4226 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'"
4227
4228 # Define system-specific variables.
4229 case $host_os in
4230 aix*)
4231   symcode='[BCDT]'
4232   ;;
4233 cygwin* | mingw* | pw32*)
4234   symcode='[ABCDGISTW]'
4235   ;;
4236 hpux*) # Its linker distinguishes data from code symbols
4237   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
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 irix* | nonstopux*)
4241   symcode='[BCDEGRST]'
4242   ;;
4243 osf*)
4244   symcode='[BCDEGQRST]'
4245   ;;
4246 solaris* | sysv5*)
4247   symcode='[BDT]'
4248   ;;
4249 sysv4)
4250   symcode='[DFNSTU]'
4251   ;;
4252 esac
4253
4254 # Handle CRLF in mingw tool chain
4255 opt_cr=
4256 case $host_os in
4257 mingw*)
4258   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4259   ;;
4260 esac
4261
4262 # If we're using GNU nm, then use its standard symbol codes.
4263 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4264   symcode='[ABCDGISTW]'
4265 fi
4266
4267 # Try without a prefix undercore, then with it.
4268 for ac_symprfx in "" "_"; do
4269
4270   # Write the raw and C identifiers.
4271 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4272
4273   # Check to see that the pipe works correctly.
4274   pipe_works=no
4275   rm -f conftest*
4276   cat > conftest.$ac_ext <<EOF
4277 #ifdef __cplusplus
4278 extern "C" {
4279 #endif
4280 char nm_test_var;
4281 void nm_test_func(){}
4282 #ifdef __cplusplus
4283 }
4284 #endif
4285 int main(){nm_test_var='a';nm_test_func();return(0);}
4286 EOF
4287
4288   if { (eval echo configure:4289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4289     # Now try to grab the symbols.
4290     nlist=conftest.nm
4291     if { (eval echo configure:4292: \"$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
4292       # Try sorting and uniquifying the output.
4293       if sort "$nlist" | uniq > "$nlist"T; then
4294         mv -f "$nlist"T "$nlist"
4295       else
4296         rm -f "$nlist"T
4297       fi
4298
4299       # Make sure that we snagged all the symbols we need.
4300       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4301         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4302           cat <<EOF > conftest.$ac_ext
4303 #ifdef __cplusplus
4304 extern "C" {
4305 #endif
4306
4307 EOF
4308           # Now generate the symbol file.
4309           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4310
4311           cat <<EOF >> conftest.$ac_ext
4312 #if defined (__STDC__) && __STDC__
4313 # define lt_ptr void *
4314 #else
4315 # define lt_ptr char *
4316 # define const
4317 #endif
4318
4319 /* The mapping between symbol names and symbols. */
4320 const struct {
4321   const char *name;
4322   lt_ptr address;
4323 }
4324 lt_preloaded_symbols[] =
4325 {
4326 EOF
4327           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4328           cat <<\EOF >> conftest.$ac_ext
4329   {0, (lt_ptr) 0}
4330 };
4331
4332 #ifdef __cplusplus
4333 }
4334 #endif
4335 EOF
4336           # Now try linking the two files.
4337           mv conftest.$ac_objext conftstm.$ac_objext
4338           save_LIBS="$LIBS"
4339           save_CFLAGS="$CFLAGS"
4340           LIBS="conftstm.$ac_objext"
4341           CFLAGS="$CFLAGS$no_builtin_flag"
4342           if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4343             pipe_works=yes
4344           fi
4345           LIBS="$save_LIBS"
4346           CFLAGS="$save_CFLAGS"
4347         else
4348           echo "cannot find nm_test_func in $nlist" >&5
4349         fi
4350       else
4351         echo "cannot find nm_test_var in $nlist" >&5
4352       fi
4353     else
4354       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4355     fi
4356   else
4357     echo "$progname: failed program was:" >&5
4358     cat conftest.$ac_ext >&5
4359   fi
4360   rm -f conftest* conftst*
4361
4362   # Do not use the global_symbol_pipe unless it works.
4363   if test "$pipe_works" = yes; then
4364     break
4365   else
4366     lt_cv_sys_global_symbol_pipe=
4367   fi
4368 done
4369
4370 fi
4371
4372 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4373 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4374   global_symbol_to_cdecl=
4375   global_symbol_to_c_name_address=
4376 else
4377   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4378   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4379 fi
4380 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4381 then
4382   echo "$ac_t""failed" 1>&6
4383 else
4384   echo "$ac_t""ok" 1>&6
4385 fi
4386
4387 for ac_hdr in dlfcn.h
4388 do
4389 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4390 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4391 echo "configure:4392: checking for $ac_hdr" >&5
4392 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4393   echo $ac_n "(cached) $ac_c" 1>&6
4394 else
4395   cat > conftest.$ac_ext <<EOF
4396 #line 4397 "configure"
4397 #include "confdefs.h"
4398 #include <$ac_hdr>
4399 EOF
4400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4401 { (eval echo configure:4402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4403 if test -z "$ac_err"; then
4404   rm -rf conftest*
4405   eval "ac_cv_header_$ac_safe=yes"
4406 else
4407   echo "$ac_err" >&5
4408   echo "configure: failed program was:" >&5
4409   cat conftest.$ac_ext >&5
4410   rm -rf conftest*
4411   eval "ac_cv_header_$ac_safe=no"
4412 fi
4413 rm -f conftest*
4414 fi
4415 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4416   echo "$ac_t""yes" 1>&6
4417     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4418   cat >> confdefs.h <<EOF
4419 #define $ac_tr_hdr 1
4420 EOF
4421  
4422 else
4423   echo "$ac_t""no" 1>&6
4424 fi
4425 done
4426
4427
4428
4429
4430
4431
4432 # Only perform the check for file, if the check method requires it
4433 case $deplibs_check_method in
4434 file_magic*)
4435   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4436     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4437 echo "configure:4438: checking for ${ac_tool_prefix}file" >&5
4438 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4439   echo $ac_n "(cached) $ac_c" 1>&6
4440 else
4441   case $MAGIC_CMD in
4442   /*)
4443   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4444   ;;
4445   ?:/*)
4446   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4447   ;;
4448   *)
4449   ac_save_MAGIC_CMD="$MAGIC_CMD"
4450   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4451   ac_dummy="/usr/bin:$PATH"
4452   for ac_dir in $ac_dummy; do
4453     test -z "$ac_dir" && ac_dir=.
4454     if test -f $ac_dir/${ac_tool_prefix}file; then
4455       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4456       if test -n "$file_magic_test_file"; then
4457         case $deplibs_check_method in
4458         "file_magic "*)
4459           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4460           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4461           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4462             egrep "$file_magic_regex" > /dev/null; then
4463             :
4464           else
4465             cat <<EOF 1>&2
4466
4467 *** Warning: the command libtool uses to detect shared libraries,
4468 *** $file_magic_cmd, produces output that libtool cannot recognize.
4469 *** The result is that libtool may fail to recognize shared libraries
4470 *** as such.  This will affect the creation of libtool libraries that
4471 *** depend on shared libraries, but programs linked with such libtool
4472 *** libraries will work regardless of this problem.  Nevertheless, you
4473 *** may want to report the problem to your system manager and/or to
4474 *** bug-libtool@gnu.org
4475
4476 EOF
4477           fi ;;
4478         esac
4479       fi
4480       break
4481     fi
4482   done
4483   IFS="$ac_save_ifs"
4484   MAGIC_CMD="$ac_save_MAGIC_CMD"
4485   ;;
4486 esac
4487 fi
4488
4489 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4490 if test -n "$MAGIC_CMD"; then
4491   echo "$ac_t""$MAGIC_CMD" 1>&6
4492 else
4493   echo "$ac_t""no" 1>&6
4494 fi
4495
4496 if test -z "$lt_cv_path_MAGIC_CMD"; then
4497   if test -n "$ac_tool_prefix"; then
4498     echo $ac_n "checking for file""... $ac_c" 1>&6
4499 echo "configure:4500: checking for file" >&5
4500 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4501   echo $ac_n "(cached) $ac_c" 1>&6
4502 else
4503   case $MAGIC_CMD in
4504   /*)
4505   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4506   ;;
4507   ?:/*)
4508   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4509   ;;
4510   *)
4511   ac_save_MAGIC_CMD="$MAGIC_CMD"
4512   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4513   ac_dummy="/usr/bin:$PATH"
4514   for ac_dir in $ac_dummy; do
4515     test -z "$ac_dir" && ac_dir=.
4516     if test -f $ac_dir/file; then
4517       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4518       if test -n "$file_magic_test_file"; then
4519         case $deplibs_check_method in
4520         "file_magic "*)
4521           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4522           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4523           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4524             egrep "$file_magic_regex" > /dev/null; then
4525             :
4526           else
4527             cat <<EOF 1>&2
4528
4529 *** Warning: the command libtool uses to detect shared libraries,
4530 *** $file_magic_cmd, produces output that libtool cannot recognize.
4531 *** The result is that libtool may fail to recognize shared libraries
4532 *** as such.  This will affect the creation of libtool libraries that
4533 *** depend on shared libraries, but programs linked with such libtool
4534 *** libraries will work regardless of this problem.  Nevertheless, you
4535 *** may want to report the problem to your system manager and/or to
4536 *** bug-libtool@gnu.org
4537
4538 EOF
4539           fi ;;
4540         esac
4541       fi
4542       break
4543     fi
4544   done
4545   IFS="$ac_save_ifs"
4546   MAGIC_CMD="$ac_save_MAGIC_CMD"
4547   ;;
4548 esac
4549 fi
4550
4551 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4552 if test -n "$MAGIC_CMD"; then
4553   echo "$ac_t""$MAGIC_CMD" 1>&6
4554 else
4555   echo "$ac_t""no" 1>&6
4556 fi
4557
4558   else
4559     MAGIC_CMD=:
4560   fi
4561 fi
4562
4563   fi
4564   ;;
4565 esac
4566
4567 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4568 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4569 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4570 echo "configure:4571: checking for $ac_word" >&5
4571 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4572   echo $ac_n "(cached) $ac_c" 1>&6
4573 else
4574   if test -n "$RANLIB"; then
4575   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4576 else
4577   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4578   ac_dummy="$PATH"
4579   for ac_dir in $ac_dummy; do
4580     test -z "$ac_dir" && ac_dir=.
4581     if test -f $ac_dir/$ac_word; then
4582       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4583       break
4584     fi
4585   done
4586   IFS="$ac_save_ifs"
4587 fi
4588 fi
4589 RANLIB="$ac_cv_prog_RANLIB"
4590 if test -n "$RANLIB"; then
4591   echo "$ac_t""$RANLIB" 1>&6
4592 else
4593   echo "$ac_t""no" 1>&6
4594 fi
4595
4596
4597 if test -z "$ac_cv_prog_RANLIB"; then
4598 if test -n "$ac_tool_prefix"; then
4599   # Extract the first word of "ranlib", so it can be a program name with args.
4600 set dummy ranlib; ac_word=$2
4601 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4602 echo "configure:4603: checking for $ac_word" >&5
4603 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4604   echo $ac_n "(cached) $ac_c" 1>&6
4605 else
4606   if test -n "$RANLIB"; then
4607   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4608 else
4609   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4610   ac_dummy="$PATH"
4611   for ac_dir in $ac_dummy; do
4612     test -z "$ac_dir" && ac_dir=.
4613     if test -f $ac_dir/$ac_word; then
4614       ac_cv_prog_RANLIB="ranlib"
4615       break
4616     fi
4617   done
4618   IFS="$ac_save_ifs"
4619   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4620 fi
4621 fi
4622 RANLIB="$ac_cv_prog_RANLIB"
4623 if test -n "$RANLIB"; then
4624   echo "$ac_t""$RANLIB" 1>&6
4625 else
4626   echo "$ac_t""no" 1>&6
4627 fi
4628
4629 else
4630   RANLIB=":"
4631 fi
4632 fi
4633
4634 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4635 set dummy ${ac_tool_prefix}strip; ac_word=$2
4636 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4637 echo "configure:4638: checking for $ac_word" >&5
4638 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4639   echo $ac_n "(cached) $ac_c" 1>&6
4640 else
4641   if test -n "$STRIP"; then
4642   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4643 else
4644   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4645   ac_dummy="$PATH"
4646   for ac_dir in $ac_dummy; do
4647     test -z "$ac_dir" && ac_dir=.
4648     if test -f $ac_dir/$ac_word; then
4649       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4650       break
4651     fi
4652   done
4653   IFS="$ac_save_ifs"
4654 fi
4655 fi
4656 STRIP="$ac_cv_prog_STRIP"
4657 if test -n "$STRIP"; then
4658   echo "$ac_t""$STRIP" 1>&6
4659 else
4660   echo "$ac_t""no" 1>&6
4661 fi
4662
4663
4664 if test -z "$ac_cv_prog_STRIP"; then
4665 if test -n "$ac_tool_prefix"; then
4666   # Extract the first word of "strip", so it can be a program name with args.
4667 set dummy strip; ac_word=$2
4668 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4669 echo "configure:4670: checking for $ac_word" >&5
4670 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4671   echo $ac_n "(cached) $ac_c" 1>&6
4672 else
4673   if test -n "$STRIP"; then
4674   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4675 else
4676   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4677   ac_dummy="$PATH"
4678   for ac_dir in $ac_dummy; do
4679     test -z "$ac_dir" && ac_dir=.
4680     if test -f $ac_dir/$ac_word; then
4681       ac_cv_prog_STRIP="strip"
4682       break
4683     fi
4684   done
4685   IFS="$ac_save_ifs"
4686   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4687 fi
4688 fi
4689 STRIP="$ac_cv_prog_STRIP"
4690 if test -n "$STRIP"; then
4691   echo "$ac_t""$STRIP" 1>&6
4692 else
4693   echo "$ac_t""no" 1>&6
4694 fi
4695
4696 else
4697   STRIP=":"
4698 fi
4699 fi
4700
4701
4702 enable_dlopen=yes
4703 enable_win32_dll=yes
4704
4705 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4706 if test "${enable_libtool_lock+set}" = set; then
4707   enableval="$enable_libtool_lock"
4708   :
4709 fi
4710
4711 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4712
4713 # Some flags need to be propagated to the compiler or linker for good
4714 # libtool support.
4715 case $host in
4716 *-*-irix6*)
4717   # Find out which ABI we are using.
4718   echo '#line 4719 "configure"' > conftest.$ac_ext
4719   if { (eval echo configure:4720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4720     case `/usr/bin/file conftest.$ac_objext` in
4721     *32-bit*)
4722       LD="${LD-ld} -32"
4723       ;;
4724     *N32*)
4725       LD="${LD-ld} -n32"
4726       ;;
4727     *64-bit*)
4728       LD="${LD-ld} -64"
4729       ;;
4730     esac
4731   fi
4732   rm -rf conftest*
4733   ;;
4734
4735 *-*-sco3.2v5*)
4736   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4737   SAVE_CFLAGS="$CFLAGS"
4738   CFLAGS="$CFLAGS -belf"
4739   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4740 echo "configure:4741: checking whether the C compiler needs -belf" >&5
4741 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4742   echo $ac_n "(cached) $ac_c" 1>&6
4743 else
4744   
4745      ac_ext=c
4746 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4747 ac_cpp='$CPP $CPPFLAGS'
4748 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4749 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4750 cross_compiling=$ac_cv_prog_cc_cross
4751
4752      cat > conftest.$ac_ext <<EOF
4753 #line 4754 "configure"
4754 #include "confdefs.h"
4755
4756 int main() {
4757
4758 ; return 0; }
4759 EOF
4760 if { (eval echo configure:4761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4761   rm -rf conftest*
4762   lt_cv_cc_needs_belf=yes
4763 else
4764   echo "configure: failed program was:" >&5
4765   cat conftest.$ac_ext >&5
4766   rm -rf conftest*
4767   lt_cv_cc_needs_belf=no
4768 fi
4769 rm -f conftest*
4770      ac_ext=c
4771 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4772 ac_cpp='$CPP $CPPFLAGS'
4773 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4774 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4775 cross_compiling=$ac_cv_prog_cc_cross
4776
4777 fi
4778
4779 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4780   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4781     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4782     CFLAGS="$SAVE_CFLAGS"
4783   fi
4784   ;;
4785
4786 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4787   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4788 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4789 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4790 echo "configure:4791: checking for $ac_word" >&5
4791 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4792   echo $ac_n "(cached) $ac_c" 1>&6
4793 else
4794   if test -n "$DLLTOOL"; then
4795   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4796 else
4797   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4798   ac_dummy="$PATH"
4799   for ac_dir in $ac_dummy; do
4800     test -z "$ac_dir" && ac_dir=.
4801     if test -f $ac_dir/$ac_word; then
4802       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4803       break
4804     fi
4805   done
4806   IFS="$ac_save_ifs"
4807 fi
4808 fi
4809 DLLTOOL="$ac_cv_prog_DLLTOOL"
4810 if test -n "$DLLTOOL"; then
4811   echo "$ac_t""$DLLTOOL" 1>&6
4812 else
4813   echo "$ac_t""no" 1>&6
4814 fi
4815
4816
4817 if test -z "$ac_cv_prog_DLLTOOL"; then
4818 if test -n "$ac_tool_prefix"; then
4819   # Extract the first word of "dlltool", so it can be a program name with args.
4820 set dummy dlltool; ac_word=$2
4821 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4822 echo "configure:4823: checking for $ac_word" >&5
4823 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4824   echo $ac_n "(cached) $ac_c" 1>&6
4825 else
4826   if test -n "$DLLTOOL"; then
4827   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4828 else
4829   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4830   ac_dummy="$PATH"
4831   for ac_dir in $ac_dummy; do
4832     test -z "$ac_dir" && ac_dir=.
4833     if test -f $ac_dir/$ac_word; then
4834       ac_cv_prog_DLLTOOL="dlltool"
4835       break
4836     fi
4837   done
4838   IFS="$ac_save_ifs"
4839   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4840 fi
4841 fi
4842 DLLTOOL="$ac_cv_prog_DLLTOOL"
4843 if test -n "$DLLTOOL"; then
4844   echo "$ac_t""$DLLTOOL" 1>&6
4845 else
4846   echo "$ac_t""no" 1>&6
4847 fi
4848
4849 else
4850   DLLTOOL="false"
4851 fi
4852 fi
4853
4854   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4855 set dummy ${ac_tool_prefix}as; ac_word=$2
4856 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4857 echo "configure:4858: checking for $ac_word" >&5
4858 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4859   echo $ac_n "(cached) $ac_c" 1>&6
4860 else
4861   if test -n "$AS"; then
4862   ac_cv_prog_AS="$AS" # Let the user override the test.
4863 else
4864   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4865   ac_dummy="$PATH"
4866   for ac_dir in $ac_dummy; do
4867     test -z "$ac_dir" && ac_dir=.
4868     if test -f $ac_dir/$ac_word; then
4869       ac_cv_prog_AS="${ac_tool_prefix}as"
4870       break
4871     fi
4872   done
4873   IFS="$ac_save_ifs"
4874 fi
4875 fi
4876 AS="$ac_cv_prog_AS"
4877 if test -n "$AS"; then
4878   echo "$ac_t""$AS" 1>&6
4879 else
4880   echo "$ac_t""no" 1>&6
4881 fi
4882
4883
4884 if test -z "$ac_cv_prog_AS"; then
4885 if test -n "$ac_tool_prefix"; then
4886   # Extract the first word of "as", so it can be a program name with args.
4887 set dummy as; ac_word=$2
4888 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4889 echo "configure:4890: checking for $ac_word" >&5
4890 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4891   echo $ac_n "(cached) $ac_c" 1>&6
4892 else
4893   if test -n "$AS"; then
4894   ac_cv_prog_AS="$AS" # Let the user override the test.
4895 else
4896   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4897   ac_dummy="$PATH"
4898   for ac_dir in $ac_dummy; do
4899     test -z "$ac_dir" && ac_dir=.
4900     if test -f $ac_dir/$ac_word; then
4901       ac_cv_prog_AS="as"
4902       break
4903     fi
4904   done
4905   IFS="$ac_save_ifs"
4906   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4907 fi
4908 fi
4909 AS="$ac_cv_prog_AS"
4910 if test -n "$AS"; then
4911   echo "$ac_t""$AS" 1>&6
4912 else
4913   echo "$ac_t""no" 1>&6
4914 fi
4915
4916 else
4917   AS="false"
4918 fi
4919 fi
4920
4921   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4922 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4923 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4924 echo "configure:4925: checking for $ac_word" >&5
4925 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4926   echo $ac_n "(cached) $ac_c" 1>&6
4927 else
4928   if test -n "$OBJDUMP"; then
4929   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4930 else
4931   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4932   ac_dummy="$PATH"
4933   for ac_dir in $ac_dummy; do
4934     test -z "$ac_dir" && ac_dir=.
4935     if test -f $ac_dir/$ac_word; then
4936       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4937       break
4938     fi
4939   done
4940   IFS="$ac_save_ifs"
4941 fi
4942 fi
4943 OBJDUMP="$ac_cv_prog_OBJDUMP"
4944 if test -n "$OBJDUMP"; then
4945   echo "$ac_t""$OBJDUMP" 1>&6
4946 else
4947   echo "$ac_t""no" 1>&6
4948 fi
4949
4950
4951 if test -z "$ac_cv_prog_OBJDUMP"; then
4952 if test -n "$ac_tool_prefix"; then
4953   # Extract the first word of "objdump", so it can be a program name with args.
4954 set dummy objdump; ac_word=$2
4955 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4956 echo "configure:4957: checking for $ac_word" >&5
4957 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4958   echo $ac_n "(cached) $ac_c" 1>&6
4959 else
4960   if test -n "$OBJDUMP"; then
4961   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4962 else
4963   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4964   ac_dummy="$PATH"
4965   for ac_dir in $ac_dummy; do
4966     test -z "$ac_dir" && ac_dir=.
4967     if test -f $ac_dir/$ac_word; then
4968       ac_cv_prog_OBJDUMP="objdump"
4969       break
4970     fi
4971   done
4972   IFS="$ac_save_ifs"
4973   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4974 fi
4975 fi
4976 OBJDUMP="$ac_cv_prog_OBJDUMP"
4977 if test -n "$OBJDUMP"; then
4978   echo "$ac_t""$OBJDUMP" 1>&6
4979 else
4980   echo "$ac_t""no" 1>&6
4981 fi
4982
4983 else
4984   OBJDUMP="false"
4985 fi
4986 fi
4987
4988
4989   # recent cygwin and mingw systems supply a stub DllMain which the user
4990   # can override, but on older systems we have to supply one
4991   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4992 echo "configure:4993: checking if libtool should supply DllMain function" >&5
4993 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4994   echo $ac_n "(cached) $ac_c" 1>&6
4995 else
4996   cat > conftest.$ac_ext <<EOF
4997 #line 4998 "configure"
4998 #include "confdefs.h"
4999
5000 int main() {
5001 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
5002       DllMain (0, 0, 0);
5003 ; return 0; }
5004 EOF
5005 if { (eval echo configure:5006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5006   rm -rf conftest*
5007   lt_cv_need_dllmain=no
5008 else
5009   echo "configure: failed program was:" >&5
5010   cat conftest.$ac_ext >&5
5011   rm -rf conftest*
5012   lt_cv_need_dllmain=yes
5013 fi
5014 rm -f conftest*
5015 fi
5016
5017 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
5018
5019   case $host/$CC in
5020   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
5021     # old mingw systems require "-dll" to link a DLL, while more recent ones
5022     # require "-mdll"
5023     SAVE_CFLAGS="$CFLAGS"
5024     CFLAGS="$CFLAGS -mdll"
5025     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
5026 echo "configure:5027: checking how to link DLLs" >&5
5027 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
5028   echo $ac_n "(cached) $ac_c" 1>&6
5029 else
5030   cat > conftest.$ac_ext <<EOF
5031 #line 5032 "configure"
5032 #include "confdefs.h"
5033
5034 int main() {
5035
5036 ; return 0; }
5037 EOF
5038 if { (eval echo configure:5039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5039   rm -rf conftest*
5040   lt_cv_cc_dll_switch=-mdll
5041 else
5042   echo "configure: failed program was:" >&5
5043   cat conftest.$ac_ext >&5
5044   rm -rf conftest*
5045   lt_cv_cc_dll_switch=-dll
5046 fi
5047 rm -f conftest*
5048 fi
5049
5050 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
5051     CFLAGS="$SAVE_CFLAGS" ;;
5052   *-*-cygwin* | *-*-pw32*)
5053     # cygwin systems need to pass --dll to the linker, and not link
5054     # crt.o which will require a WinMain@16 definition.
5055     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
5056   esac
5057   ;;
5058   
5059 esac
5060
5061 # Sed substitution that helps us do robust quoting.  It backslashifies
5062 # metacharacters that are still active within double-quoted strings.
5063 Xsed='sed -e s/^X//'
5064 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
5065
5066 # Same as above, but do not quote variable references.
5067 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
5068
5069 # Sed substitution to delay expansion of an escaped shell variable in a
5070 # double_quote_subst'ed string.
5071 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5072
5073 # Constants:
5074 rm="rm -f"
5075
5076 # Global variables:
5077 default_ofile=libtool
5078 can_build_shared=yes
5079
5080 # All known linkers require a `.a' archive for static linking (except M$VC,
5081 # which needs '.lib').
5082 libext=a
5083 ltmain="$ac_aux_dir/ltmain.sh"
5084 ofile="$default_ofile"
5085 with_gnu_ld="$lt_cv_prog_gnu_ld"
5086 need_locks="$enable_libtool_lock"
5087
5088 old_CC="$CC"
5089 old_CFLAGS="$CFLAGS"
5090
5091 # Set sane defaults for various variables
5092 test -z "$AR" && AR=ar
5093 test -z "$AR_FLAGS" && AR_FLAGS=cru
5094 test -z "$AS" && AS=as
5095 test -z "$CC" && CC=cc
5096 test -z "$DLLTOOL" && DLLTOOL=dlltool
5097 test -z "$LD" && LD=ld
5098 test -z "$LN_S" && LN_S="ln -s"
5099 test -z "$MAGIC_CMD" && MAGIC_CMD=file
5100 test -z "$NM" && NM=nm
5101 test -z "$OBJDUMP" && OBJDUMP=objdump
5102 test -z "$RANLIB" && RANLIB=:
5103 test -z "$STRIP" && STRIP=:
5104 test -z "$ac_objext" && ac_objext=o
5105
5106 if test x"$host" != x"$build"; then
5107   ac_tool_prefix=${host_alias}-
5108 else
5109   ac_tool_prefix=
5110 fi
5111
5112 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
5113 case $host_os in
5114 linux-gnu*) ;;
5115 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5116 esac
5117
5118 case $host_os in
5119 aix3*)
5120   # AIX sometimes has problems with the GCC collect2 program.  For some
5121   # reason, if we set the COLLECT_NAMES environment variable, the problems
5122   # vanish in a puff of smoke.
5123   if test "X${COLLECT_NAMES+set}" != Xset; then
5124     COLLECT_NAMES=
5125     export COLLECT_NAMES
5126   fi
5127   ;;
5128 esac
5129
5130 # Determine commands to create old-style static archives.
5131 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5132 old_postinstall_cmds='chmod 644 $oldlib'
5133 old_postuninstall_cmds=
5134
5135 if test -n "$RANLIB"; then
5136   case $host_os in
5137   openbsd*)
5138     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5139     ;;
5140   *)
5141     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5142     ;;
5143   esac
5144   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5145 fi
5146
5147 # Allow CC to be a program name with arguments.
5148 set dummy $CC
5149 compiler="$2"
5150
5151 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5152 echo "configure:5153: checking for objdir" >&5
5153 rm -f .libs 2>/dev/null
5154 mkdir .libs 2>/dev/null
5155 if test -d .libs; then
5156   objdir=.libs
5157 else
5158   # MS-DOS does not allow filenames that begin with a dot.
5159   objdir=_libs
5160 fi
5161 rmdir .libs 2>/dev/null
5162 echo "$ac_t""$objdir" 1>&6
5163
5164
5165 # Check whether --with-pic or --without-pic was given.
5166 if test "${with_pic+set}" = set; then
5167   withval="$with_pic"
5168   pic_mode="$withval"
5169 else
5170   pic_mode=default
5171 fi
5172
5173 test -z "$pic_mode" && pic_mode=default
5174
5175 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5176 # in isolation, and that seeing it set (from the cache) indicates that
5177 # the associated values are set (in the cache) correctly too.
5178 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5179 echo "configure:5180: checking for $compiler option to produce PIC" >&5
5180 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5181   echo $ac_n "(cached) $ac_c" 1>&6
5182 else
5183    lt_cv_prog_cc_pic=
5184   lt_cv_prog_cc_shlib=
5185   lt_cv_prog_cc_wl=
5186   lt_cv_prog_cc_static=
5187   lt_cv_prog_cc_no_builtin=
5188   lt_cv_prog_cc_can_build_shared=$can_build_shared
5189
5190   if test "$GCC" = yes; then
5191     lt_cv_prog_cc_wl='-Wl,'
5192     lt_cv_prog_cc_static='-static'
5193
5194     case $host_os in
5195     aix*)
5196       # Below there is a dirty hack to force normal static linking with -ldl
5197       # The problem is because libdl dynamically linked with both libc and
5198       # libC (AIX C++ library), which obviously doesn't included in libraries
5199       # list by gcc. This cause undefined symbols with -static flags.
5200       # This hack allows C programs to be linked with "-static -ldl", but
5201       # not sure about C++ programs.
5202       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5203       ;;
5204     amigaos*)
5205       # FIXME: we need at least 68020 code to build shared libraries, but
5206       # adding the `-m68020' flag to GCC prevents building anything better,
5207       # like `-m68040'.
5208       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5209       ;;
5210     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5211       # PIC is the default for these OSes.
5212       ;;
5213     darwin* | rhapsody*)
5214       # PIC is the default on this platform
5215       # Common symbols not allowed in MH_DYLIB files
5216       lt_cv_prog_cc_pic='-fno-common'
5217       ;;
5218     cygwin* | mingw* | pw32* | os2*)
5219       # This hack is so that the source file can tell whether it is being
5220       # built for inclusion in a dll (and should export symbols for example).
5221       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5222       ;;
5223     sysv4*MP*)
5224       if test -d /usr/nec; then
5225          lt_cv_prog_cc_pic=-Kconform_pic
5226       fi
5227       ;;
5228     *)
5229       lt_cv_prog_cc_pic='-fPIC'
5230       ;;
5231     esac
5232   else
5233     # PORTME Check for PIC flags for the system compiler.
5234     case $host_os in
5235     aix3* | aix4* | aix5*)
5236       lt_cv_prog_cc_wl='-Wl,'
5237       # All AIX code is PIC.
5238       if test "$host_cpu" = ia64; then
5239         # AIX 5 now supports IA64 processor
5240         lt_cv_prog_cc_static='-Bstatic'
5241       else
5242         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5243       fi
5244       ;;
5245
5246     hpux9* | hpux10* | hpux11*)
5247       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5248       lt_cv_prog_cc_wl='-Wl,'
5249       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5250       lt_cv_prog_cc_pic='+Z'
5251       ;;
5252
5253     irix5* | irix6* | nonstopux*)
5254       lt_cv_prog_cc_wl='-Wl,'
5255       lt_cv_prog_cc_static='-non_shared'
5256       # PIC (with -KPIC) is the default.
5257       ;;
5258
5259     cygwin* | mingw* | pw32* | os2*)
5260       # This hack is so that the source file can tell whether it is being
5261       # built for inclusion in a dll (and should export symbols for example).
5262       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5263       ;;
5264
5265     newsos6)
5266       lt_cv_prog_cc_pic='-KPIC'
5267       lt_cv_prog_cc_static='-Bstatic'
5268       ;;
5269     
5270     openedition)
5271       # XPLINK code is PIC by default
5272       ;;
5273
5274     osf3* | osf4* | osf5*)
5275       # All OSF/1 code is PIC.
5276       lt_cv_prog_cc_wl='-Wl,'
5277       lt_cv_prog_cc_static='-non_shared'
5278       ;;
5279
5280     sco3.2v5*)
5281       lt_cv_prog_cc_pic='-Kpic'
5282       lt_cv_prog_cc_static='-dn'
5283       lt_cv_prog_cc_shlib='-belf'
5284       ;;
5285
5286     solaris*)
5287       lt_cv_prog_cc_pic='-KPIC'
5288       lt_cv_prog_cc_static='-Bstatic'
5289       lt_cv_prog_cc_wl='-Wl,'
5290       ;;
5291
5292     sunos4*)
5293       lt_cv_prog_cc_pic='-PIC'
5294       lt_cv_prog_cc_static='-Bstatic'
5295       lt_cv_prog_cc_wl='-Qoption ld '
5296       ;;
5297
5298     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5299       lt_cv_prog_cc_pic='-KPIC'
5300       lt_cv_prog_cc_static='-Bstatic'
5301       lt_cv_prog_cc_wl='-Wl,'
5302       ;;
5303
5304     uts4*)
5305       lt_cv_prog_cc_pic='-pic'
5306       lt_cv_prog_cc_static='-Bstatic'
5307       ;;
5308
5309     sysv4*MP*)
5310       if test -d /usr/nec ;then
5311         lt_cv_prog_cc_pic='-Kconform_pic'
5312         lt_cv_prog_cc_static='-Bstatic'
5313       fi
5314       ;;
5315
5316     *)
5317       lt_cv_prog_cc_can_build_shared=no
5318       ;;
5319     esac
5320   fi
5321
5322 fi
5323
5324 if test -z "$lt_cv_prog_cc_pic"; then
5325   echo "$ac_t""none" 1>&6
5326 else
5327   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5328
5329   # Check to make sure the pic_flag actually works.
5330   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5331 echo "configure:5332: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5332   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5333   echo $ac_n "(cached) $ac_c" 1>&6
5334 else
5335       save_CFLAGS="$CFLAGS"
5336     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5337     cat > conftest.$ac_ext <<EOF
5338 #line 5339 "configure"
5339 #include "confdefs.h"
5340
5341 int main() {
5342
5343 ; return 0; }
5344 EOF
5345 if { (eval echo configure:5346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5346   rm -rf conftest*
5347         case $host_os in
5348       hpux9* | hpux10* | hpux11*)
5349         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5350         # they create non-PIC objects.  So, if there were any warnings, we
5351         # assume that PIC is not supported.
5352         if test -s conftest.err; then
5353           lt_cv_prog_cc_pic_works=no
5354         else
5355           lt_cv_prog_cc_pic_works=yes
5356         fi
5357         ;;
5358       *)
5359         lt_cv_prog_cc_pic_works=yes
5360         ;;
5361       esac
5362     
5363 else
5364   echo "configure: failed program was:" >&5
5365   cat conftest.$ac_ext >&5
5366   rm -rf conftest*
5367         lt_cv_prog_cc_pic_works=no
5368     
5369 fi
5370 rm -f conftest*
5371     CFLAGS="$save_CFLAGS"
5372   
5373 fi
5374
5375
5376   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5377     lt_cv_prog_cc_pic=
5378     lt_cv_prog_cc_can_build_shared=no
5379   else
5380     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5381   fi
5382
5383   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5384 fi
5385
5386 # Check for any special shared library compilation flags.
5387 if test -n "$lt_cv_prog_cc_shlib"; then
5388   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5389   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5390   else
5391    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5392     lt_cv_prog_cc_can_build_shared=no
5393   fi
5394 fi
5395
5396 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5397 echo "configure:5398: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5398 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5399   echo $ac_n "(cached) $ac_c" 1>&6
5400 else
5401     lt_cv_prog_cc_static_works=no
5402   save_LDFLAGS="$LDFLAGS"
5403   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5404   cat > conftest.$ac_ext <<EOF
5405 #line 5406 "configure"
5406 #include "confdefs.h"
5407
5408 int main() {
5409
5410 ; return 0; }
5411 EOF
5412 if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5413   rm -rf conftest*
5414   lt_cv_prog_cc_static_works=yes
5415 else
5416   echo "configure: failed program was:" >&5
5417   cat conftest.$ac_ext >&5
5418 fi
5419 rm -f conftest*
5420   LDFLAGS="$save_LDFLAGS"
5421
5422 fi
5423
5424
5425 # Belt *and* braces to stop my trousers falling down:
5426 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5427 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5428
5429 pic_flag="$lt_cv_prog_cc_pic"
5430 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5431 wl="$lt_cv_prog_cc_wl"
5432 link_static_flag="$lt_cv_prog_cc_static"
5433 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5434 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5435
5436
5437 # Check to see if options -o and -c are simultaneously supported by compiler
5438 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5439 echo "configure:5440: checking if $compiler supports -c -o file.$ac_objext" >&5
5440 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5441   echo $ac_n "(cached) $ac_c" 1>&6
5442 else
5443   
5444 $rm -r conftest 2>/dev/null
5445 mkdir conftest
5446 cd conftest
5447 echo "int some_variable = 0;" > conftest.$ac_ext
5448 mkdir out
5449 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5450 # that will create temporary files in the current directory regardless of
5451 # the output directory.  Thus, making CWD read-only will cause this test
5452 # to fail, enabling locking or at least warning the user not to do parallel
5453 # builds.
5454 chmod -w .
5455 save_CFLAGS="$CFLAGS"
5456 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5457 compiler_c_o=no
5458 if { (eval echo configure:5459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5459   # The compiler can only warn and ignore the option if not recognized
5460   # So say no if there are warnings
5461   if test -s out/conftest.err; then
5462     lt_cv_compiler_c_o=no
5463   else
5464     lt_cv_compiler_c_o=yes
5465   fi
5466 else
5467   # Append any errors to the config.log.
5468   cat out/conftest.err 1>&5
5469   lt_cv_compiler_c_o=no
5470 fi
5471 CFLAGS="$save_CFLAGS"
5472 chmod u+w .
5473 $rm conftest* out/*
5474 rmdir out
5475 cd ..
5476 rmdir conftest
5477 $rm -r conftest 2>/dev/null
5478
5479 fi
5480
5481 compiler_c_o=$lt_cv_compiler_c_o
5482 echo "$ac_t""$compiler_c_o" 1>&6
5483
5484 if test x"$compiler_c_o" = x"yes"; then
5485   # Check to see if we can write to a .lo
5486   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5487 echo "configure:5488: checking if $compiler supports -c -o file.lo" >&5
5488   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5489   echo $ac_n "(cached) $ac_c" 1>&6
5490 else
5491   
5492   lt_cv_compiler_o_lo=no
5493   save_CFLAGS="$CFLAGS"
5494   CFLAGS="$CFLAGS -c -o conftest.lo"
5495   save_objext="$ac_objext"
5496   ac_objext=lo
5497   cat > conftest.$ac_ext <<EOF
5498 #line 5499 "configure"
5499 #include "confdefs.h"
5500
5501 int main() {
5502 int some_variable = 0;
5503 ; return 0; }
5504 EOF
5505 if { (eval echo configure:5506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5506   rm -rf conftest*
5507       # The compiler can only warn and ignore the option if not recognized
5508     # So say no if there are warnings
5509     if test -s conftest.err; then
5510       lt_cv_compiler_o_lo=no
5511     else
5512       lt_cv_compiler_o_lo=yes
5513     fi
5514   
5515 else
5516   echo "configure: failed program was:" >&5
5517   cat conftest.$ac_ext >&5
5518 fi
5519 rm -f conftest*
5520   ac_objext="$save_objext"
5521   CFLAGS="$save_CFLAGS"
5522   
5523 fi
5524
5525   compiler_o_lo=$lt_cv_compiler_o_lo
5526   echo "$ac_t""$compiler_o_lo" 1>&6
5527 else
5528   compiler_o_lo=no
5529 fi
5530
5531 # Check to see if we can do hard links to lock some files if needed
5532 hard_links="nottested"
5533 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5534   # do not overwrite the value of need_locks provided by the user
5535   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5536 echo "configure:5537: checking if we can lock with hard links" >&5
5537   hard_links=yes
5538   $rm conftest*
5539   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5540   touch conftest.a
5541   ln conftest.a conftest.b 2>&5 || hard_links=no
5542   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5543   echo "$ac_t""$hard_links" 1>&6
5544   if test "$hard_links" = no; then
5545     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5546     need_locks=warn
5547   fi
5548 else
5549   need_locks=no
5550 fi
5551
5552 if test "$GCC" = yes; then
5553   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5554   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5555 echo "configure:5556: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5556   echo "int some_variable = 0;" > conftest.$ac_ext
5557   save_CFLAGS="$CFLAGS"
5558   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5559   compiler_rtti_exceptions=no
5560   cat > conftest.$ac_ext <<EOF
5561 #line 5562 "configure"
5562 #include "confdefs.h"
5563
5564 int main() {
5565 int some_variable = 0;
5566 ; return 0; }
5567 EOF
5568 if { (eval echo configure:5569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5569   rm -rf conftest*
5570       # The compiler can only warn and ignore the option if not recognized
5571     # So say no if there are warnings
5572     if test -s conftest.err; then
5573       compiler_rtti_exceptions=no
5574     else
5575       compiler_rtti_exceptions=yes
5576     fi
5577   
5578 else
5579   echo "configure: failed program was:" >&5
5580   cat conftest.$ac_ext >&5
5581 fi
5582 rm -f conftest*
5583   CFLAGS="$save_CFLAGS"
5584   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5585
5586   if test "$compiler_rtti_exceptions" = "yes"; then
5587     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5588   else
5589     no_builtin_flag=' -fno-builtin'
5590   fi
5591 fi
5592
5593 # See if the linker supports building shared libraries.
5594 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5595 echo "configure:5596: checking whether the linker ($LD) supports shared libraries" >&5
5596
5597 allow_undefined_flag=
5598 no_undefined_flag=
5599 need_lib_prefix=unknown
5600 need_version=unknown
5601 # when you set need_version to no, make sure it does not cause -set_version
5602 # flags to be left without arguments
5603 archive_cmds=
5604 archive_expsym_cmds=
5605 old_archive_from_new_cmds=
5606 old_archive_from_expsyms_cmds=
5607 export_dynamic_flag_spec=
5608 whole_archive_flag_spec=
5609 thread_safe_flag_spec=
5610 hardcode_into_libs=no
5611 hardcode_libdir_flag_spec=
5612 hardcode_libdir_separator=
5613 hardcode_direct=no
5614 hardcode_minus_L=no
5615 hardcode_shlibpath_var=unsupported
5616 runpath_var=
5617 link_all_deplibs=unknown
5618 always_export_symbols=no
5619 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5620 # include_expsyms should be a list of space-separated symbols to be *always*
5621 # included in the symbol list
5622 include_expsyms=
5623 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5624 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5625 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5626 # as well as any symbol that contains `d'.
5627 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5628 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5629 # platforms (ab)use it in PIC code, but their linkers get confused if
5630 # the symbol is explicitly referenced.  Since portable code cannot
5631 # rely on this symbol name, it's probably fine to never include it in
5632 # preloaded symbol tables.
5633 extract_expsyms_cmds=
5634
5635 case $host_os in
5636 cygwin* | mingw* | pw32*)
5637   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5638   # When not using gcc, we currently assume that we are using
5639   # Microsoft Visual C++.
5640   if test "$GCC" != yes; then
5641     with_gnu_ld=no
5642   fi
5643   ;;
5644 openbsd*)
5645   with_gnu_ld=no
5646   ;;
5647 esac
5648
5649 ld_shlibs=yes
5650 if test "$with_gnu_ld" = yes; then
5651   # If archive_cmds runs LD, not CC, wlarc should be empty
5652   wlarc='${wl}'
5653
5654   # See if GNU ld supports shared libraries.
5655   case $host_os in
5656   aix3* | aix4* | aix5*)
5657     # On AIX, the GNU linker is very broken
5658     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5659     ld_shlibs=no
5660     cat <<EOF 1>&2
5661
5662 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5663 *** to be unable to reliably create shared libraries on AIX.
5664 *** Therefore, libtool is disabling shared libraries support.  If you
5665 *** really care for shared libraries, you may want to modify your PATH
5666 *** so that a non-GNU linker is found, and then restart.
5667
5668 EOF
5669     ;;
5670
5671   amigaos*)
5672     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)'
5673     hardcode_libdir_flag_spec='-L$libdir'
5674     hardcode_minus_L=yes
5675
5676     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5677     # that the semantics of dynamic libraries on AmigaOS, at least up
5678     # to version 4, is to share data among multiple programs linked
5679     # with the same dynamic library.  Since this doesn't match the
5680     # behavior of shared libraries on other platforms, we can use
5681     # them.
5682     ld_shlibs=no
5683     ;;
5684
5685   beos*)
5686     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5687       allow_undefined_flag=unsupported
5688       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5689       # support --undefined.  This deserves some investigation.  FIXME
5690       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5691     else
5692       ld_shlibs=no
5693     fi
5694     ;;
5695
5696   cygwin* | mingw* | pw32*)
5697     # hardcode_libdir_flag_spec is actually meaningless, as there is
5698     # no search path for DLLs.
5699     hardcode_libdir_flag_spec='-L$libdir'
5700     allow_undefined_flag=unsupported
5701     always_export_symbols=yes
5702
5703     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5704       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5705       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5706       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5707       else $CC -o impgen impgen.c ; fi)~
5708       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5709
5710     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5711
5712     # cygwin and mingw dlls have different entry points and sets of symbols
5713     # to exclude.
5714     # FIXME: what about values for MSVC?
5715     dll_entry=__cygwin_dll_entry@12
5716     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5717     case $host_os in
5718     mingw*)
5719       # mingw values
5720       dll_entry=_DllMainCRTStartup@12
5721       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5722       ;;
5723     esac
5724
5725     # mingw and cygwin differ, and it's simplest to just exclude the union
5726     # of the two symbol sets.
5727     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5728
5729     # recent cygwin and mingw systems supply a stub DllMain which the user
5730     # can override, but on older systems we have to supply one (in ltdll.c)
5731     if test "x$lt_cv_need_dllmain" = "xyes"; then
5732       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5733       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~
5734         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5735     else
5736       ltdll_obj=
5737       ltdll_cmds=
5738     fi
5739
5740     # Extract the symbol export list from an `--export-all' def file,
5741     # then regenerate the def file from the symbol export list, so that
5742     # the compiled dll only exports the symbol export list.
5743     # Be careful not to strip the DATA tag left be newer dlltools.
5744     export_symbols_cmds="$ltdll_cmds"'
5745       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5746       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5747
5748     # If the export-symbols file already is a .def file (1st line
5749     # is EXPORTS), use it as is.
5750     # If DATA tags from a recent dlltool are present, honour them!
5751     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5752         cp $export_symbols $output_objdir/$soname-def;
5753       else
5754         echo EXPORTS > $output_objdir/$soname-def;
5755         _lt_hint=1;
5756         cat $export_symbols | while read symbol; do
5757          set dummy \$symbol;
5758          case \$# in
5759            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5760            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5761            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5762          esac;
5763          _lt_hint=`expr 1 + \$_lt_hint`;
5764         done;
5765       fi~
5766       '"$ltdll_cmds"'
5767       $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~
5768       $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~
5769       $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~
5770       $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~
5771       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5772     ;;
5773
5774   netbsd*)
5775     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5776       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5777       wlarc=
5778     else
5779       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5780       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5781     fi
5782     ;;
5783
5784   solaris* | sysv5*)
5785     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5786       ld_shlibs=no
5787       cat <<EOF 1>&2
5788
5789 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5790 *** create shared libraries on Solaris systems.  Therefore, libtool
5791 *** is disabling shared libraries support.  We urge you to upgrade GNU
5792 *** binutils to release 2.9.1 or newer.  Another option is to modify
5793 *** your PATH or compiler configuration so that the native linker is
5794 *** used, and then restart.
5795
5796 EOF
5797     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5798       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5799       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5800     else
5801       ld_shlibs=no
5802     fi
5803     ;;
5804
5805   sunos4*)
5806     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5807     wlarc=
5808     hardcode_direct=yes
5809     hardcode_shlibpath_var=no
5810     ;;
5811
5812   *)
5813     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5814       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5815       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5816     else
5817       ld_shlibs=no
5818     fi
5819     ;;
5820   esac
5821
5822   if test "$ld_shlibs" = yes; then
5823     runpath_var=LD_RUN_PATH
5824     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5825     export_dynamic_flag_spec='${wl}--export-dynamic'
5826     case $host_os in
5827     cygwin* | mingw* | pw32*)
5828       # dlltool doesn't understand --whole-archive et. al.
5829       whole_archive_flag_spec=
5830       ;;
5831     *)
5832       # ancient GNU ld didn't support --whole-archive et. al.
5833       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5834         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5835       else
5836         whole_archive_flag_spec=
5837       fi
5838       ;;
5839     esac
5840   fi
5841 else
5842   # PORTME fill in a description of your system's linker (not GNU ld)
5843   case $host_os in
5844   aix3*)
5845     allow_undefined_flag=unsupported
5846     always_export_symbols=yes
5847     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'
5848     # Note: this linker hardcodes the directories in LIBPATH if there
5849     # are no directories specified by -L.
5850     hardcode_minus_L=yes
5851     if test "$GCC" = yes && test -z "$link_static_flag"; then
5852       # Neither direct hardcoding nor static linking is supported with a
5853       # broken collect2.
5854       hardcode_direct=unsupported
5855     fi
5856     ;;
5857
5858   aix4* | aix5*)
5859     if test "$host_cpu" = ia64; then
5860       # On IA64, the linker does run time linking by default, so we don't
5861       # have to do anything special.
5862       aix_use_runtimelinking=no
5863       exp_sym_flag='-Bexport'
5864       no_entry_flag=""
5865     else
5866       aix_use_runtimelinking=no
5867
5868       # Test if we are trying to use run time linking or normal
5869       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5870       # need to do runtime linking.
5871       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5872         for ld_flag in $LDFLAGS; do
5873           case $ld_flag in
5874           *-brtl*)
5875             aix_use_runtimelinking=yes
5876             break
5877           ;;
5878           esac
5879         done
5880       esac
5881
5882       exp_sym_flag='-bexport'
5883       no_entry_flag='-bnoentry'
5884     fi
5885
5886     # When large executables or shared objects are built, AIX ld can
5887     # have problems creating the table of contents.  If linking a library
5888     # or program results in "error TOC overflow" add -mminimal-toc to
5889     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5890     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5891
5892     hardcode_direct=yes
5893     archive_cmds=''
5894     hardcode_libdir_separator=':'
5895     if test "$GCC" = yes; then
5896       case $host_os in aix4.[012]|aix4.[012].*)
5897         collect2name=`${CC} -print-prog-name=collect2`
5898         if test -f "$collect2name" && \
5899           strings "$collect2name" | grep resolve_lib_name >/dev/null
5900         then
5901           # We have reworked collect2
5902           hardcode_direct=yes
5903         else
5904           # We have old collect2
5905           hardcode_direct=unsupported
5906           # It fails to find uninstalled libraries when the uninstalled
5907           # path is not listed in the libpath.  Setting hardcode_minus_L
5908           # to unsupported forces relinking
5909           hardcode_minus_L=yes
5910           hardcode_libdir_flag_spec='-L$libdir'
5911           hardcode_libdir_separator=
5912         fi
5913       esac
5914
5915       shared_flag='-shared'
5916     else
5917       # not using gcc
5918       if test "$host_cpu" = ia64; then
5919         shared_flag='${wl}-G'
5920       else
5921         if test "$aix_use_runtimelinking" = yes; then
5922           shared_flag='${wl}-G'
5923         else
5924           shared_flag='${wl}-bM:SRE'
5925         fi
5926       fi
5927     fi
5928
5929     # It seems that -bexpall can do strange things, so it is better to
5930     # generate a list of symbols to export.
5931     always_export_symbols=yes
5932     if test "$aix_use_runtimelinking" = yes; then
5933       # Warning - without using the other runtime loading flags (-brtl),
5934       # -berok will link without error, but may produce a broken library.
5935       allow_undefined_flag='-berok'
5936       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5937       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"
5938     else
5939       if test "$host_cpu" = ia64; then
5940         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5941         allow_undefined_flag="-z nodefs"
5942         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"
5943       else
5944         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5945         # Warning - without using the other run time loading flags,
5946         # -berok will link without error, but may produce a broken library.
5947         allow_undefined_flag='${wl}-berok'
5948         # This is a bit strange, but is similar to how AIX traditionally builds
5949         # it's shared libraries.
5950         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'
5951       fi
5952     fi
5953     ;;
5954
5955   amigaos*)
5956     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)'
5957     hardcode_libdir_flag_spec='-L$libdir'
5958     hardcode_minus_L=yes
5959     # see comment about different semantics on the GNU ld section
5960     ld_shlibs=no
5961     ;;
5962
5963   cygwin* | mingw* | pw32*)
5964     # When not using gcc, we currently assume that we are using
5965     # Microsoft Visual C++.
5966     # hardcode_libdir_flag_spec is actually meaningless, as there is
5967     # no search path for DLLs.
5968     hardcode_libdir_flag_spec=' '
5969     allow_undefined_flag=unsupported
5970     # Tell ltmain to make .lib files, not .a files.
5971     libext=lib
5972     # FIXME: Setting linknames here is a bad hack.
5973     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5974     # The linker will automatically build a .lib file if we build a DLL.
5975     old_archive_from_new_cmds='true'
5976     # FIXME: Should let the user specify the lib program.
5977     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5978     fix_srcfile_path='`cygpath -w "$srcfile"`'
5979     ;;
5980
5981   darwin* | rhapsody*)
5982     case "$host_os" in
5983     rhapsody* | darwin1.[012])
5984       allow_undefined_flag='-undefined suppress'
5985       ;;
5986     *) # Darwin 1.3 on
5987       allow_undefined_flag='-flat_namespace -undefined suppress'
5988       ;;
5989     esac
5990     # FIXME: Relying on posixy $() will cause problems for
5991     #        cross-compilation, but unfortunately the echo tests do not
5992     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5993     #        `"' quotes if we put them in here... so don't!
5994     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)'
5995     # We need to add '_' to the symbols in $export_symbols first
5996     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5997     hardcode_direct=yes
5998     hardcode_shlibpath_var=no
5999     whole_archive_flag_spec='-all_load $convenience'
6000     ;;
6001
6002   freebsd1*)
6003     ld_shlibs=no
6004     ;;
6005
6006   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6007   # support.  Future versions do this automatically, but an explicit c++rt0.o
6008   # does not break anything, and helps significantly (at the cost of a little
6009   # extra space).
6010   freebsd2.2*)
6011     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6012     hardcode_libdir_flag_spec='-R$libdir'
6013     hardcode_direct=yes
6014     hardcode_shlibpath_var=no
6015     ;;
6016
6017   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6018   freebsd2*)
6019     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6020     hardcode_direct=yes
6021     hardcode_minus_L=yes
6022     hardcode_shlibpath_var=no
6023     ;;
6024
6025   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6026   freebsd*)
6027     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6028     hardcode_libdir_flag_spec='-R$libdir'
6029     hardcode_direct=yes
6030     hardcode_shlibpath_var=no
6031     ;;
6032
6033   hpux9* | hpux10* | hpux11*)
6034     case $host_os in
6035     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' ;;
6036     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
6037     esac
6038     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6039     hardcode_libdir_separator=:
6040     hardcode_direct=yes
6041     hardcode_minus_L=yes # Not in the search PATH, but as the default
6042                          # location of the library.
6043     export_dynamic_flag_spec='${wl}-E'
6044     ;;
6045
6046   irix5* | irix6* | nonstopux*)
6047     if test "$GCC" = yes; then
6048       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'
6049       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6050     else
6051       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'
6052       hardcode_libdir_flag_spec='-rpath $libdir'
6053     fi
6054     hardcode_libdir_separator=:
6055     link_all_deplibs=yes
6056     ;;
6057
6058   netbsd*)
6059     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6060       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6061     else
6062       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6063     fi
6064     hardcode_libdir_flag_spec='-R$libdir'
6065     hardcode_direct=yes
6066     hardcode_shlibpath_var=no
6067     ;;
6068
6069   newsos6)
6070     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6071     hardcode_direct=yes
6072     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6073     hardcode_libdir_separator=:
6074     hardcode_shlibpath_var=no
6075     ;;
6076
6077   openbsd*)
6078     hardcode_direct=yes
6079     hardcode_shlibpath_var=no
6080     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6081       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6082       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6083       export_dynamic_flag_spec='${wl}-E'
6084     else
6085       case "$host_os" in
6086       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
6087         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6088         hardcode_libdir_flag_spec='-R$libdir'
6089         ;;
6090       *)
6091         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6092         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6093         ;;
6094       esac
6095     fi
6096     ;;
6097
6098   openedition*)
6099     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
6100         cp \$linknames \$output_objdir && linknames=''"
6101     export_dynamic_flag_spec="-Wl,DLL"
6102     ;;
6103
6104   os2*)
6105     hardcode_libdir_flag_spec='-L$libdir'
6106     hardcode_minus_L=yes
6107     allow_undefined_flag=unsupported
6108     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'
6109     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6110     ;;
6111
6112   osf3*)
6113     if test "$GCC" = yes; then
6114       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6115       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'
6116     else
6117       allow_undefined_flag=' -expect_unresolved \*'
6118       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'
6119     fi
6120     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6121     hardcode_libdir_separator=:
6122     ;;
6123
6124   osf4* | osf5*)        # as osf3* with the addition of -msym flag
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}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6128       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6129     else
6130       allow_undefined_flag=' -expect_unresolved \*'
6131       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'
6132       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6133       $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'
6134
6135       #Both c and cxx compiler support -rpath directly
6136       hardcode_libdir_flag_spec='-rpath $libdir'
6137     fi
6138     hardcode_libdir_separator=:
6139     ;;
6140
6141   sco3.2v5*)
6142     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6143     hardcode_shlibpath_var=no
6144     runpath_var=LD_RUN_PATH
6145     hardcode_runpath_var=yes
6146     export_dynamic_flag_spec='${wl}-Bexport'
6147     ;;
6148
6149   solaris*)
6150     # gcc --version < 3.0 without binutils cannot create self contained
6151     # shared libraries reliably, requiring libgcc.a to resolve some of
6152     # the object symbols generated in some cases.  Libraries that use
6153     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6154     # a copy of libgcc.a into every shared library to guarantee resolving
6155     # such symbols causes other problems:  According to Tim Van Holder
6156     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6157     # (to the application) exception stack for one thing.
6158     no_undefined_flag=' -z defs'
6159     if test "$GCC" = yes; then
6160       case `$CC --version 2>/dev/null` in
6161       [12].*)
6162         cat <<EOF 1>&2
6163
6164 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6165 *** create self contained shared libraries on Solaris systems, without
6166 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6167 *** -no-undefined support, which will at least allow you to build shared
6168 *** libraries.  However, you may find that when you link such libraries
6169 *** into an application without using GCC, you have to manually add
6170 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6171 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6172 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6173
6174 EOF
6175         no_undefined_flag=
6176         ;;
6177       esac
6178     fi
6179     # $CC -shared without GNU ld will not create a library from C++
6180     # object files and a static libstdc++, better avoid it by now
6181     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6182     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6183                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6184     hardcode_libdir_flag_spec='-R$libdir'
6185     hardcode_shlibpath_var=no
6186     case $host_os in
6187     solaris2.[0-5] | solaris2.[0-5].*) ;;
6188     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6189       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6190     esac
6191     link_all_deplibs=yes
6192     ;;
6193
6194   sunos4*)
6195     if test "x$host_vendor" = xsequent; then
6196       # Use $CC to link under sequent, because it throws in some extra .o
6197       # files that make .init and .fini sections work.
6198       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6199     else
6200       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6201     fi
6202     hardcode_libdir_flag_spec='-L$libdir'
6203     hardcode_direct=yes
6204     hardcode_minus_L=yes
6205     hardcode_shlibpath_var=no
6206     ;;
6207
6208   sysv4)
6209     case $host_vendor in
6210       sni)
6211         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6212         hardcode_direct=yes # is this really true???
6213         ;;
6214       siemens)
6215         ## LD is ld it makes a PLAMLIB
6216         ## CC just makes a GrossModule.
6217         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6218         reload_cmds='$CC -r -o $output$reload_objs'
6219         hardcode_direct=no
6220         ;;
6221       motorola)
6222         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6223         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6224         ;;
6225     esac
6226     runpath_var='LD_RUN_PATH'
6227     hardcode_shlibpath_var=no
6228     ;;
6229
6230   sysv4.3*)
6231     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6232     hardcode_shlibpath_var=no
6233     export_dynamic_flag_spec='-Bexport'
6234     ;;
6235
6236   sysv5*)
6237     no_undefined_flag=' -z text'
6238     # $CC -shared without GNU ld will not create a library from C++
6239     # object files and a static libstdc++, better avoid it by now
6240     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6241     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6242                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6243     hardcode_libdir_flag_spec=
6244     hardcode_shlibpath_var=no
6245     runpath_var='LD_RUN_PATH'
6246     ;;
6247
6248   uts4*)
6249     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6250     hardcode_libdir_flag_spec='-L$libdir'
6251     hardcode_shlibpath_var=no
6252     ;;
6253
6254   dgux*)
6255     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6256     hardcode_libdir_flag_spec='-L$libdir'
6257     hardcode_shlibpath_var=no
6258     ;;
6259
6260   sysv4*MP*)
6261     if test -d /usr/nec; then
6262       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6263       hardcode_shlibpath_var=no
6264       runpath_var=LD_RUN_PATH
6265       hardcode_runpath_var=yes
6266       ld_shlibs=yes
6267     fi
6268     ;;
6269
6270   sysv4.2uw2*)
6271     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6272     hardcode_direct=yes
6273     hardcode_minus_L=no
6274     hardcode_shlibpath_var=no
6275     hardcode_runpath_var=yes
6276     runpath_var=LD_RUN_PATH
6277     ;;
6278
6279   sysv5uw7* | unixware7*)
6280     no_undefined_flag='${wl}-z ${wl}text'
6281     if test "$GCC" = yes; then
6282       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6283     else
6284       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6285     fi
6286     runpath_var='LD_RUN_PATH'
6287     hardcode_shlibpath_var=no
6288     ;;
6289
6290   *)
6291     ld_shlibs=no
6292     ;;
6293   esac
6294 fi
6295 echo "$ac_t""$ld_shlibs" 1>&6
6296 test "$ld_shlibs" = no && can_build_shared=no
6297
6298 # Check hardcoding attributes.
6299 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6300 echo "configure:6301: checking how to hardcode library paths into programs" >&5
6301 hardcode_action=
6302 if test -n "$hardcode_libdir_flag_spec" || \
6303    test -n "$runpath_var"; then
6304
6305   # We can hardcode non-existant directories.
6306   if test "$hardcode_direct" != no &&
6307      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6308      # have to relink, otherwise we might link with an installed library
6309      # when we should be linking with a yet-to-be-installed one
6310      ## test "$hardcode_shlibpath_var" != no &&
6311      test "$hardcode_minus_L" != no; then
6312     # Linking always hardcodes the temporary library directory.
6313     hardcode_action=relink
6314   else
6315     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6316     hardcode_action=immediate
6317   fi
6318 else
6319   # We cannot hardcode anything, or else we can only hardcode existing
6320   # directories.
6321   hardcode_action=unsupported
6322 fi
6323 echo "$ac_t""$hardcode_action" 1>&6
6324
6325 striplib=
6326 old_striplib=
6327 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6328 echo "configure:6329: checking whether stripping libraries is possible" >&5
6329 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6330   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6331   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6332   echo "$ac_t""yes" 1>&6
6333 else
6334   echo "$ac_t""no" 1>&6
6335 fi
6336
6337 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6338 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6339
6340 # PORTME Fill in your ld.so characteristics
6341 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6342 echo "configure:6343: checking dynamic linker characteristics" >&5
6343 library_names_spec=
6344 libname_spec='lib$name'
6345 soname_spec=
6346 postinstall_cmds=
6347 postuninstall_cmds=
6348 finish_cmds=
6349 finish_eval=
6350 shlibpath_var=
6351 shlibpath_overrides_runpath=unknown
6352 version_type=none
6353 dynamic_linker="$host_os ld.so"
6354 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6355 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6356
6357 case $host_os in
6358 aix3*)
6359   version_type=linux
6360   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6361   shlibpath_var=LIBPATH
6362
6363   # AIX has no versioning support, so we append a major version to the name.
6364   soname_spec='${libname}${release}.so$major'
6365   ;;
6366
6367 aix4* | aix5*)
6368   version_type=linux
6369   need_lib_prefix=no
6370   need_version=no
6371   hardcode_into_libs=yes
6372   if test "$host_cpu" = ia64; then
6373     # AIX 5 supports IA64
6374     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6375     shlibpath_var=LD_LIBRARY_PATH
6376   else
6377     # With GCC up to 2.95.x, collect2 would create an import file
6378     # for dependence libraries.  The import file would start with
6379     # the line `#! .'.  This would cause the generated library to
6380     # depend on `.', always an invalid library.  This was fixed in
6381     # development snapshots of GCC prior to 3.0.
6382     case $host_os in
6383       aix4 | aix4.[01] | aix4.[01].*)
6384         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6385              echo ' yes '
6386              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6387           :
6388         else
6389           can_build_shared=no
6390         fi
6391         ;;
6392     esac
6393     # AIX (on Power*) has no versioning support, so currently we can
6394     # not hardcode correct soname into executable. Probably we can
6395     # add versioning support to collect2, so additional links can
6396     # be useful in future.
6397     if test "$aix_use_runtimelinking" = yes; then
6398       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6399       # instead of lib<name>.a to let people know that these are not
6400       # typical AIX shared libraries.
6401       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6402     else
6403       # We preserve .a as extension for shared libraries through AIX4.2
6404       # and later when we are not doing run time linking.
6405       library_names_spec='${libname}${release}.a $libname.a'
6406       soname_spec='${libname}${release}.so$major'
6407     fi
6408     shlibpath_var=LIBPATH
6409   fi
6410   hardcode_into_libs=yes
6411   ;;
6412
6413 amigaos*)
6414   library_names_spec='$libname.ixlibrary $libname.a'
6415   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6416   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'
6417   ;;
6418
6419 beos*)
6420   library_names_spec='${libname}.so'
6421   dynamic_linker="$host_os ld.so"
6422   shlibpath_var=LIBRARY_PATH
6423   ;;
6424
6425 bsdi4*)
6426   version_type=linux
6427   need_version=no
6428   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6429   soname_spec='${libname}${release}.so$major'
6430   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6431   shlibpath_var=LD_LIBRARY_PATH
6432   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6433   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6434   export_dynamic_flag_spec=-rdynamic
6435   # the default ld.so.conf also contains /usr/contrib/lib and
6436   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6437   # libtool to hard-code these into programs
6438   ;;
6439
6440 cygwin* | mingw* | pw32*)
6441   version_type=windows
6442   need_version=no
6443   need_lib_prefix=no
6444   case $GCC,$host_os in
6445   yes,cygwin*)
6446     library_names_spec='$libname.dll.a'
6447     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6448     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6449       dldir=$destdir/`dirname \$dlpath`~
6450       test -d \$dldir || mkdir -p \$dldir~
6451       $install_prog .libs/$dlname \$dldir/$dlname'
6452     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6453       dlpath=$dir/\$dldll~
6454        $rm \$dlpath'
6455     ;;
6456   yes,mingw*)
6457     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6458     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6459     ;;
6460   yes,pw32*)
6461     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6462     ;;
6463   *)
6464     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6465     ;;
6466   esac
6467   dynamic_linker='Win32 ld.exe'
6468   # FIXME: first we should search . and the directory the executable is in
6469   shlibpath_var=PATH
6470   ;;
6471
6472 darwin* | rhapsody*)
6473   dynamic_linker="$host_os dyld"
6474   version_type=darwin
6475   need_lib_prefix=no
6476   need_version=no
6477   # FIXME: Relying on posixy $() will cause problems for
6478   #        cross-compilation, but unfortunately the echo tests do not
6479   #        yet detect zsh echo's removal of \ escapes.
6480   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)'
6481   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6482   shlibpath_overrides_runpath=yes
6483   shlibpath_var=DYLD_LIBRARY_PATH
6484   ;;
6485
6486 freebsd1*)
6487   dynamic_linker=no
6488   ;;
6489
6490 freebsd*)
6491   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6492   version_type=freebsd-$objformat
6493   case $version_type in
6494     freebsd-elf*)
6495       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6496       need_version=no
6497       need_lib_prefix=no
6498       ;;
6499     freebsd-*)
6500       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6501       need_version=yes
6502       ;;
6503   esac
6504   shlibpath_var=LD_LIBRARY_PATH
6505   case $host_os in
6506   freebsd2*)
6507     shlibpath_overrides_runpath=yes
6508     ;;
6509   *)
6510     shlibpath_overrides_runpath=no
6511     hardcode_into_libs=yes
6512     ;;
6513   esac
6514   ;;
6515
6516 gnu*)
6517   version_type=linux
6518   need_lib_prefix=no
6519   need_version=no
6520   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6521   soname_spec='${libname}${release}.so$major'
6522   shlibpath_var=LD_LIBRARY_PATH
6523   hardcode_into_libs=yes
6524   ;;
6525
6526 hpux9* | hpux10* | hpux11*)
6527   # Give a soname corresponding to the major version so that dld.sl refuses to
6528   # link against other versions.
6529   dynamic_linker="$host_os dld.sl"
6530   version_type=sunos
6531   need_lib_prefix=no
6532   need_version=no
6533   shlibpath_var=SHLIB_PATH
6534   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6535   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6536   soname_spec='${libname}${release}.sl$major'
6537   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6538   postinstall_cmds='chmod 555 $lib'
6539   ;;
6540
6541 irix5* | irix6* | nonstopux*)
6542   case $host_os in
6543     nonstopux*) version_type=nonstopux ;;
6544     *)          version_type=irix ;;
6545   esac
6546   need_lib_prefix=no
6547   need_version=no
6548   soname_spec='${libname}${release}.so$major'
6549   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6550   case $host_os in
6551   irix5* | nonstopux*)
6552     libsuff= shlibsuff=
6553     ;;
6554   *)
6555     case $LD in # libtool.m4 will add one of these switches to LD
6556     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6557     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6558     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6559     *) libsuff= shlibsuff= libmagic=never-match;;
6560     esac
6561     ;;
6562   esac
6563   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6564   shlibpath_overrides_runpath=no
6565   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6566   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6567   ;;
6568
6569 # No shared lib support for Linux oldld, aout, or coff.
6570 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6571   dynamic_linker=no
6572   ;;
6573
6574 # This must be Linux ELF.
6575 linux-gnu*)
6576   version_type=linux
6577   need_lib_prefix=no
6578   need_version=no
6579   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6580   soname_spec='${libname}${release}.so$major'
6581   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6582   shlibpath_var=LD_LIBRARY_PATH
6583   shlibpath_overrides_runpath=no
6584   # This implies no fast_install, which is unacceptable.
6585   # Some rework will be needed to allow for fast_install
6586   # before this can be enabled.
6587   hardcode_into_libs=yes
6588
6589   # We used to test for /lib/ld.so.1 and disable shared libraries on
6590   # powerpc, because MkLinux only supported shared libraries with the
6591   # GNU dynamic linker.  Since this was broken with cross compilers,
6592   # most powerpc-linux boxes support dynamic linking these days and
6593   # people can always --disable-shared, the test was removed, and we
6594   # assume the GNU/Linux dynamic linker is in use.
6595   dynamic_linker='GNU/Linux ld.so'
6596   ;;
6597
6598 netbsd*)
6599   version_type=sunos
6600   need_lib_prefix=no
6601   need_version=no
6602   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6603     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6604     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6605     dynamic_linker='NetBSD (a.out) ld.so'
6606   else
6607     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6608     soname_spec='${libname}${release}.so$major'
6609     dynamic_linker='NetBSD ld.elf_so'
6610   fi
6611   shlibpath_var=LD_LIBRARY_PATH
6612   shlibpath_overrides_runpath=yes
6613   hardcode_into_libs=yes
6614   ;;
6615
6616 newsos6)
6617   version_type=linux
6618   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6619   shlibpath_var=LD_LIBRARY_PATH
6620   shlibpath_overrides_runpath=yes
6621   ;;
6622
6623 openbsd*)
6624   version_type=sunos
6625   need_lib_prefix=no
6626   need_version=no
6627   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6628     case "$host_os" in
6629     openbsd2.[89] | openbsd2.[89].*)
6630       shlibpath_overrides_runpath=no
6631       ;;
6632     *)
6633       shlibpath_overrides_runpath=yes
6634       ;;
6635     esac
6636   else
6637     shlibpath_overrides_runpath=yes
6638   fi
6639   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6640   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6641   shlibpath_var=LD_LIBRARY_PATH
6642   ;;
6643
6644 openedition*)
6645   need_lib_prefix=no
6646   need_version=no
6647   shlibpath_overrides_runpath=yes
6648   shlibpath_var=LIBPATH
6649   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6650   # the library's exports are in libname.x; this is the file that must
6651   # actually be linked with to use a DLL.
6652   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6653   ;;
6654
6655 os2*)
6656   libname_spec='$name'
6657   need_lib_prefix=no
6658   library_names_spec='$libname.dll $libname.a'
6659   dynamic_linker='OS/2 ld.exe'
6660   shlibpath_var=LIBPATH
6661   ;;
6662
6663 osf3* | osf4* | osf5*)
6664   version_type=osf
6665   need_version=no
6666   soname_spec='${libname}${release}.so$major'
6667   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6668   shlibpath_var=LD_LIBRARY_PATH
6669   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6670   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6671   hardcode_into_libs=yes
6672   ;;
6673
6674 sco3.2v5*)
6675   version_type=osf
6676   soname_spec='${libname}${release}.so$major'
6677   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6678   shlibpath_var=LD_LIBRARY_PATH
6679   ;;
6680
6681 solaris*)
6682   version_type=linux
6683   need_lib_prefix=no
6684   need_version=no
6685   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6686   soname_spec='${libname}${release}.so$major'
6687   shlibpath_var=LD_LIBRARY_PATH
6688   shlibpath_overrides_runpath=yes
6689   hardcode_into_libs=yes
6690   # ldd complains unless libraries are executable
6691   postinstall_cmds='chmod +x $lib'
6692   ;;
6693
6694 sunos4*)
6695   version_type=sunos
6696   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6697   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6698   shlibpath_var=LD_LIBRARY_PATH
6699   shlibpath_overrides_runpath=yes
6700   if test "$with_gnu_ld" = yes; then
6701     need_lib_prefix=no
6702   fi
6703   need_version=yes
6704   ;;
6705
6706 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6707   version_type=linux
6708   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6709   soname_spec='${libname}${release}.so$major'
6710   shlibpath_var=LD_LIBRARY_PATH
6711   case $host_vendor in
6712     sni)
6713       shlibpath_overrides_runpath=no
6714       need_lib_prefix=no
6715       export_dynamic_flag_spec='${wl}-Blargedynsym'
6716       runpath_var=LD_RUN_PATH
6717       ;;
6718     siemens)
6719       need_lib_prefix=no
6720       ;;
6721     motorola)
6722       need_lib_prefix=no
6723       need_version=no
6724       shlibpath_overrides_runpath=no
6725       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6726       ;;
6727   esac
6728   ;;
6729
6730 uts4*)
6731   version_type=linux
6732   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6733   soname_spec='${libname}${release}.so$major'
6734   shlibpath_var=LD_LIBRARY_PATH
6735   ;;
6736
6737 dgux*)
6738   version_type=linux
6739   need_lib_prefix=no
6740   need_version=no
6741   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6742   soname_spec='${libname}${release}.so$major'
6743   shlibpath_var=LD_LIBRARY_PATH
6744   ;;
6745
6746 sysv4*MP*)
6747   if test -d /usr/nec ;then
6748     version_type=linux
6749     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6750     soname_spec='$libname.so.$major'
6751     shlibpath_var=LD_LIBRARY_PATH
6752   fi
6753   ;;
6754
6755 *)
6756   dynamic_linker=no
6757   ;;
6758 esac
6759 echo "$ac_t""$dynamic_linker" 1>&6
6760 test "$dynamic_linker" = no && can_build_shared=no
6761
6762 # Report the final consequences.
6763 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6764 echo "configure:6765: checking if libtool supports shared libraries" >&5
6765 echo "$ac_t""$can_build_shared" 1>&6
6766
6767 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6768 echo "configure:6769: checking whether to build shared libraries" >&5
6769 test "$can_build_shared" = "no" && enable_shared=no
6770
6771 # On AIX, shared libraries and static libraries use the same namespace, and
6772 # are all built from PIC.
6773 case "$host_os" in
6774 aix3*)
6775   test "$enable_shared" = yes && enable_static=no
6776   if test -n "$RANLIB"; then
6777     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6778     postinstall_cmds='$RANLIB $lib'
6779   fi
6780   ;;
6781
6782 aix4*)
6783   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6784     test "$enable_shared" = yes && enable_static=no
6785   fi
6786   ;;
6787 esac
6788 echo "$ac_t""$enable_shared" 1>&6
6789
6790 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6791 echo "configure:6792: checking whether to build static libraries" >&5
6792 # Make sure either enable_shared or enable_static is yes.
6793 test "$enable_shared" = yes || enable_static=yes
6794 echo "$ac_t""$enable_static" 1>&6
6795
6796 if test "$hardcode_action" = relink; then
6797   # Fast installation is not supported
6798   enable_fast_install=no
6799 elif test "$shlibpath_overrides_runpath" = yes ||
6800      test "$enable_shared" = no; then
6801   # Fast installation is not necessary
6802   enable_fast_install=needless
6803 fi
6804
6805 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6806 if test "$GCC" = yes; then
6807   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6808 fi
6809
6810 if test "x$enable_dlopen" != xyes; then
6811   enable_dlopen=unknown
6812   enable_dlopen_self=unknown
6813   enable_dlopen_self_static=unknown
6814 else
6815   lt_cv_dlopen=no
6816   lt_cv_dlopen_libs=
6817
6818   case $host_os in
6819   beos*)
6820     lt_cv_dlopen="load_add_on"
6821     lt_cv_dlopen_libs=
6822     lt_cv_dlopen_self=yes
6823     ;;
6824
6825   cygwin* | mingw* | pw32*)
6826     lt_cv_dlopen="LoadLibrary"
6827     lt_cv_dlopen_libs=
6828    ;;
6829
6830   *)
6831     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6832 echo "configure:6833: checking for dllload" >&5
6833 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6834   echo $ac_n "(cached) $ac_c" 1>&6
6835 else
6836   cat > conftest.$ac_ext <<EOF
6837 #line 6838 "configure"
6838 #include "confdefs.h"
6839 /* System header to define __stub macros and hopefully few prototypes,
6840     which can conflict with char dllload(); below.  */
6841 #include <assert.h>
6842 /* Override any gcc2 internal prototype to avoid an error.  */
6843 /* We use char because int might match the return type of a gcc2
6844     builtin and then its argument prototype would still apply.  */
6845 char dllload();
6846 char (*f)();
6847
6848 int main() {
6849
6850 /* The GNU C library defines this for functions which it implements
6851     to always fail with ENOSYS.  Some functions are actually named
6852     something starting with __ and the normal name is an alias.  */
6853 #if defined (__stub_dllload) || defined (__stub___dllload)
6854 choke me
6855 #else
6856 f = dllload;
6857 #endif
6858
6859 ; return 0; }
6860 EOF
6861 if { (eval echo configure:6862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6862   rm -rf conftest*
6863   eval "ac_cv_func_dllload=yes"
6864 else
6865   echo "configure: failed program was:" >&5
6866   cat conftest.$ac_ext >&5
6867   rm -rf conftest*
6868   eval "ac_cv_func_dllload=no"
6869 fi
6870 rm -f conftest*
6871 fi
6872
6873 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6874   echo "$ac_t""yes" 1>&6
6875   lt_cv_dlopen="dllload"
6876 else
6877   echo "$ac_t""no" 1>&6
6878 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6879 echo "configure:6880: checking for shl_load" >&5
6880 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6881   echo $ac_n "(cached) $ac_c" 1>&6
6882 else
6883   cat > conftest.$ac_ext <<EOF
6884 #line 6885 "configure"
6885 #include "confdefs.h"
6886 /* System header to define __stub macros and hopefully few prototypes,
6887     which can conflict with char shl_load(); below.  */
6888 #include <assert.h>
6889 /* Override any gcc2 internal prototype to avoid an error.  */
6890 /* We use char because int might match the return type of a gcc2
6891     builtin and then its argument prototype would still apply.  */
6892 char shl_load();
6893 char (*f)();
6894
6895 int main() {
6896
6897 /* The GNU C library defines this for functions which it implements
6898     to always fail with ENOSYS.  Some functions are actually named
6899     something starting with __ and the normal name is an alias.  */
6900 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6901 choke me
6902 #else
6903 f = shl_load;
6904 #endif
6905
6906 ; return 0; }
6907 EOF
6908 if { (eval echo configure:6909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6909   rm -rf conftest*
6910   eval "ac_cv_func_shl_load=yes"
6911 else
6912   echo "configure: failed program was:" >&5
6913   cat conftest.$ac_ext >&5
6914   rm -rf conftest*
6915   eval "ac_cv_func_shl_load=no"
6916 fi
6917 rm -f conftest*
6918 fi
6919
6920 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6921   echo "$ac_t""yes" 1>&6
6922   lt_cv_dlopen="shl_load"
6923 else
6924   echo "$ac_t""no" 1>&6
6925 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6926 echo "configure:6927: checking for shl_load in -ldld" >&5
6927 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6928 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6929   echo $ac_n "(cached) $ac_c" 1>&6
6930 else
6931   ac_save_LIBS="$LIBS"
6932 LIBS="-ldld  $LIBS"
6933 cat > conftest.$ac_ext <<EOF
6934 #line 6935 "configure"
6935 #include "confdefs.h"
6936 /* Override any gcc2 internal prototype to avoid an error.  */
6937 /* We use char because int might match the return type of a gcc2
6938     builtin and then its argument prototype would still apply.  */
6939 char shl_load();
6940
6941 int main() {
6942 shl_load()
6943 ; return 0; }
6944 EOF
6945 if { (eval echo configure:6946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6946   rm -rf conftest*
6947   eval "ac_cv_lib_$ac_lib_var=yes"
6948 else
6949   echo "configure: failed program was:" >&5
6950   cat conftest.$ac_ext >&5
6951   rm -rf conftest*
6952   eval "ac_cv_lib_$ac_lib_var=no"
6953 fi
6954 rm -f conftest*
6955 LIBS="$ac_save_LIBS"
6956
6957 fi
6958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6959   echo "$ac_t""yes" 1>&6
6960   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6961 else
6962   echo "$ac_t""no" 1>&6
6963 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6964 echo "configure:6965: checking for dlopen" >&5
6965 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6966   echo $ac_n "(cached) $ac_c" 1>&6
6967 else
6968   cat > conftest.$ac_ext <<EOF
6969 #line 6970 "configure"
6970 #include "confdefs.h"
6971 /* System header to define __stub macros and hopefully few prototypes,
6972     which can conflict with char dlopen(); below.  */
6973 #include <assert.h>
6974 /* Override any gcc2 internal prototype to avoid an error.  */
6975 /* We use char because int might match the return type of a gcc2
6976     builtin and then its argument prototype would still apply.  */
6977 char dlopen();
6978 char (*f)();
6979
6980 int main() {
6981
6982 /* The GNU C library defines this for functions which it implements
6983     to always fail with ENOSYS.  Some functions are actually named
6984     something starting with __ and the normal name is an alias.  */
6985 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6986 choke me
6987 #else
6988 f = dlopen;
6989 #endif
6990
6991 ; return 0; }
6992 EOF
6993 if { (eval echo configure:6994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6994   rm -rf conftest*
6995   eval "ac_cv_func_dlopen=yes"
6996 else
6997   echo "configure: failed program was:" >&5
6998   cat conftest.$ac_ext >&5
6999   rm -rf conftest*
7000   eval "ac_cv_func_dlopen=no"
7001 fi
7002 rm -f conftest*
7003 fi
7004
7005 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
7006   echo "$ac_t""yes" 1>&6
7007   lt_cv_dlopen="dlopen"
7008 else
7009   echo "$ac_t""no" 1>&6
7010 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
7011 echo "configure:7012: checking for dlopen in -ldl" >&5
7012 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
7013 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7014   echo $ac_n "(cached) $ac_c" 1>&6
7015 else
7016   ac_save_LIBS="$LIBS"
7017 LIBS="-ldl  $LIBS"
7018 cat > conftest.$ac_ext <<EOF
7019 #line 7020 "configure"
7020 #include "confdefs.h"
7021 /* Override any gcc2 internal prototype to avoid an error.  */
7022 /* We use char because int might match the return type of a gcc2
7023     builtin and then its argument prototype would still apply.  */
7024 char dlopen();
7025
7026 int main() {
7027 dlopen()
7028 ; return 0; }
7029 EOF
7030 if { (eval echo configure:7031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7031   rm -rf conftest*
7032   eval "ac_cv_lib_$ac_lib_var=yes"
7033 else
7034   echo "configure: failed program was:" >&5
7035   cat conftest.$ac_ext >&5
7036   rm -rf conftest*
7037   eval "ac_cv_lib_$ac_lib_var=no"
7038 fi
7039 rm -f conftest*
7040 LIBS="$ac_save_LIBS"
7041
7042 fi
7043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7044   echo "$ac_t""yes" 1>&6
7045   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
7046 else
7047   echo "$ac_t""no" 1>&6
7048 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
7049 echo "configure:7050: checking for dlopen in -lsvld" >&5
7050 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
7051 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7052   echo $ac_n "(cached) $ac_c" 1>&6
7053 else
7054   ac_save_LIBS="$LIBS"
7055 LIBS="-lsvld  $LIBS"
7056 cat > conftest.$ac_ext <<EOF
7057 #line 7058 "configure"
7058 #include "confdefs.h"
7059 /* Override any gcc2 internal prototype to avoid an error.  */
7060 /* We use char because int might match the return type of a gcc2
7061     builtin and then its argument prototype would still apply.  */
7062 char dlopen();
7063
7064 int main() {
7065 dlopen()
7066 ; return 0; }
7067 EOF
7068 if { (eval echo configure:7069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7069   rm -rf conftest*
7070   eval "ac_cv_lib_$ac_lib_var=yes"
7071 else
7072   echo "configure: failed program was:" >&5
7073   cat conftest.$ac_ext >&5
7074   rm -rf conftest*
7075   eval "ac_cv_lib_$ac_lib_var=no"
7076 fi
7077 rm -f conftest*
7078 LIBS="$ac_save_LIBS"
7079
7080 fi
7081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7082   echo "$ac_t""yes" 1>&6
7083   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
7084 else
7085   echo "$ac_t""no" 1>&6
7086 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
7087 echo "configure:7088: checking for dld_link in -ldld" >&5
7088 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
7089 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7090   echo $ac_n "(cached) $ac_c" 1>&6
7091 else
7092   ac_save_LIBS="$LIBS"
7093 LIBS="-ldld  $LIBS"
7094 cat > conftest.$ac_ext <<EOF
7095 #line 7096 "configure"
7096 #include "confdefs.h"
7097 /* Override any gcc2 internal prototype to avoid an error.  */
7098 /* We use char because int might match the return type of a gcc2
7099     builtin and then its argument prototype would still apply.  */
7100 char dld_link();
7101
7102 int main() {
7103 dld_link()
7104 ; return 0; }
7105 EOF
7106 if { (eval echo configure:7107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7107   rm -rf conftest*
7108   eval "ac_cv_lib_$ac_lib_var=yes"
7109 else
7110   echo "configure: failed program was:" >&5
7111   cat conftest.$ac_ext >&5
7112   rm -rf conftest*
7113   eval "ac_cv_lib_$ac_lib_var=no"
7114 fi
7115 rm -f conftest*
7116 LIBS="$ac_save_LIBS"
7117
7118 fi
7119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7120   echo "$ac_t""yes" 1>&6
7121   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
7122 else
7123   echo "$ac_t""no" 1>&6
7124 fi
7125
7126               
7127 fi
7128
7129             
7130 fi
7131
7132           
7133 fi
7134
7135         
7136 fi
7137
7138       
7139 fi
7140
7141     
7142 fi
7143
7144     ;;
7145   esac
7146
7147   if test "x$lt_cv_dlopen" != xno; then
7148     enable_dlopen=yes
7149   else
7150     enable_dlopen=no
7151   fi
7152
7153   case $lt_cv_dlopen in
7154   dlopen)
7155     save_CPPFLAGS="$CPPFLAGS"
7156         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
7157
7158     save_LDFLAGS="$LDFLAGS"
7159     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7160
7161     save_LIBS="$LIBS"
7162     LIBS="$lt_cv_dlopen_libs $LIBS"
7163
7164     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
7165 echo "configure:7166: checking whether a program can dlopen itself" >&5
7166 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
7167   echo $ac_n "(cached) $ac_c" 1>&6
7168 else
7169           if test "$cross_compiling" = yes; then :
7170   lt_cv_dlopen_self=cross
7171 else
7172     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7173   lt_status=$lt_dlunknown
7174   cat > conftest.$ac_ext <<EOF
7175 #line 7176 "configure"
7176 #include "confdefs.h"
7177
7178 #if HAVE_DLFCN_H
7179 #include <dlfcn.h>
7180 #endif
7181
7182 #include <stdio.h>
7183
7184 #ifdef RTLD_GLOBAL
7185 #  define LT_DLGLOBAL           RTLD_GLOBAL
7186 #else
7187 #  ifdef DL_GLOBAL
7188 #    define LT_DLGLOBAL         DL_GLOBAL
7189 #  else
7190 #    define LT_DLGLOBAL         0
7191 #  endif
7192 #endif
7193
7194 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7195    find out it does not work in some platform. */
7196 #ifndef LT_DLLAZY_OR_NOW
7197 #  ifdef RTLD_LAZY
7198 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7199 #  else
7200 #    ifdef DL_LAZY
7201 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7202 #    else
7203 #      ifdef RTLD_NOW
7204 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7205 #      else
7206 #        ifdef DL_NOW
7207 #          define LT_DLLAZY_OR_NOW      DL_NOW
7208 #        else
7209 #          define LT_DLLAZY_OR_NOW      0
7210 #        endif
7211 #      endif
7212 #    endif
7213 #  endif
7214 #endif
7215
7216 #ifdef __cplusplus
7217 extern "C" void exit (int);
7218 #endif
7219
7220 void fnord() { int i=42;}
7221 int main ()
7222 {
7223   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7224   int status = $lt_dlunknown;
7225
7226   if (self)
7227     {
7228       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7229       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7230       /* dlclose (self); */
7231     }
7232
7233     exit (status);
7234 }
7235 EOF
7236   if { (eval echo configure:7237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7237     (./conftest; exit; ) 2>/dev/null
7238     lt_status=$?
7239     case x$lt_status in
7240       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7241       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7242       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7243     esac
7244   else :
7245     # compilation failed
7246     lt_cv_dlopen_self=no
7247   fi
7248 fi
7249 rm -fr conftest*
7250
7251     
7252 fi
7253
7254 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7255
7256     if test "x$lt_cv_dlopen_self" = xyes; then
7257       LDFLAGS="$LDFLAGS $link_static_flag"
7258       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7259 echo "configure:7260: checking whether a statically linked program can dlopen itself" >&5
7260 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7261   echo $ac_n "(cached) $ac_c" 1>&6
7262 else
7263           if test "$cross_compiling" = yes; then :
7264   lt_cv_dlopen_self_static=cross
7265 else
7266     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7267   lt_status=$lt_dlunknown
7268   cat > conftest.$ac_ext <<EOF
7269 #line 7270 "configure"
7270 #include "confdefs.h"
7271
7272 #if HAVE_DLFCN_H
7273 #include <dlfcn.h>
7274 #endif
7275
7276 #include <stdio.h>
7277
7278 #ifdef RTLD_GLOBAL
7279 #  define LT_DLGLOBAL           RTLD_GLOBAL
7280 #else
7281 #  ifdef DL_GLOBAL
7282 #    define LT_DLGLOBAL         DL_GLOBAL
7283 #  else
7284 #    define LT_DLGLOBAL         0
7285 #  endif
7286 #endif
7287
7288 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7289    find out it does not work in some platform. */
7290 #ifndef LT_DLLAZY_OR_NOW
7291 #  ifdef RTLD_LAZY
7292 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7293 #  else
7294 #    ifdef DL_LAZY
7295 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7296 #    else
7297 #      ifdef RTLD_NOW
7298 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7299 #      else
7300 #        ifdef DL_NOW
7301 #          define LT_DLLAZY_OR_NOW      DL_NOW
7302 #        else
7303 #          define LT_DLLAZY_OR_NOW      0
7304 #        endif
7305 #      endif
7306 #    endif
7307 #  endif
7308 #endif
7309
7310 #ifdef __cplusplus
7311 extern "C" void exit (int);
7312 #endif
7313
7314 void fnord() { int i=42;}
7315 int main ()
7316 {
7317   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7318   int status = $lt_dlunknown;
7319
7320   if (self)
7321     {
7322       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7323       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7324       /* dlclose (self); */
7325     }
7326
7327     exit (status);
7328 }
7329 EOF
7330   if { (eval echo configure:7331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7331     (./conftest; exit; ) 2>/dev/null
7332     lt_status=$?
7333     case x$lt_status in
7334       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7335       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7336       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7337     esac
7338   else :
7339     # compilation failed
7340     lt_cv_dlopen_self_static=no
7341   fi
7342 fi
7343 rm -fr conftest*
7344
7345       
7346 fi
7347
7348 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7349     fi
7350
7351     CPPFLAGS="$save_CPPFLAGS"
7352     LDFLAGS="$save_LDFLAGS"
7353     LIBS="$save_LIBS"
7354     ;;
7355   esac
7356
7357   case $lt_cv_dlopen_self in
7358   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7359   *) enable_dlopen_self=unknown ;;
7360   esac
7361
7362   case $lt_cv_dlopen_self_static in
7363   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7364   *) enable_dlopen_self_static=unknown ;;
7365   esac
7366 fi
7367
7368
7369 if test "$enable_shared" = yes && test "$GCC" = yes; then
7370   case $archive_cmds in
7371   *'~'*)
7372     # FIXME: we may have to deal with multi-command sequences.
7373     ;;
7374   '$CC '*)
7375     # Test whether the compiler implicitly links with -lc since on some
7376     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7377     # to ld, don't add -lc before -lgcc.
7378     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7379 echo "configure:7380: checking whether -lc should be explicitly linked in" >&5
7380     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7381   echo $ac_n "(cached) $ac_c" 1>&6
7382 else
7383   $rm conftest*
7384     echo 'static int dummy;' > conftest.$ac_ext
7385
7386     if { (eval echo configure:7387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7387       soname=conftest
7388       lib=conftest
7389       libobjs=conftest.$ac_objext
7390       deplibs=
7391       wl=$lt_cv_prog_cc_wl
7392       compiler_flags=-v
7393       linker_flags=-v
7394       verstring=
7395       output_objdir=.
7396       libname=conftest
7397       save_allow_undefined_flag=$allow_undefined_flag
7398       allow_undefined_flag=
7399       if { (eval echo configure:7400: \"$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; }
7400       then
7401         lt_cv_archive_cmds_need_lc=no
7402       else
7403         lt_cv_archive_cmds_need_lc=yes
7404       fi
7405       allow_undefined_flag=$save_allow_undefined_flag
7406     else
7407       cat conftest.err 1>&5
7408     fi
7409 fi
7410
7411     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7412     ;;
7413   esac
7414 fi
7415 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7416
7417 # The second clause should only fire when bootstrapping the
7418 # libtool distribution, otherwise you forgot to ship ltmain.sh
7419 # with your package, and you will get complaints that there are
7420 # no rules to generate ltmain.sh.
7421 if test -f "$ltmain"; then
7422   :
7423 else
7424   # If there is no Makefile yet, we rely on a make rule to execute
7425   # `config.status --recheck' to rerun these tests and create the
7426   # libtool script then.
7427   test -f Makefile && make "$ltmain"
7428 fi
7429
7430 if test -f "$ltmain"; then
7431   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7432   $rm -f "${ofile}T"
7433
7434   echo creating $ofile
7435
7436   # Now quote all the things that may contain metacharacters while being
7437   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7438   # variables and quote the copies for generation of the libtool script.
7439   for var in echo old_CC old_CFLAGS SED \
7440     AR AR_FLAGS CC LD LN_S NM SHELL \
7441     reload_flag reload_cmds wl \
7442     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7443     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7444     library_names_spec soname_spec \
7445     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7446     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7447     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7448     old_striplib striplib file_magic_cmd export_symbols_cmds \
7449     deplibs_check_method allow_undefined_flag no_undefined_flag \
7450     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7451     global_symbol_to_c_name_address \
7452     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7453     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7454     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7455
7456     case $var in
7457     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7458     old_postinstall_cmds | old_postuninstall_cmds | \
7459     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7460     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7461     postinstall_cmds | postuninstall_cmds | \
7462     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7463       # Double-quote double-evaled strings.
7464       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7465       ;;
7466     *)
7467       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7468       ;;
7469     esac
7470   done
7471
7472   cat <<__EOF__ > "${ofile}T"
7473 #! $SHELL
7474
7475 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7476 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7477 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7478 #
7479 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7480 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7481 #
7482 # This program is free software; you can redistribute it and/or modify
7483 # it under the terms of the GNU General Public License as published by
7484 # the Free Software Foundation; either version 2 of the License, or
7485 # (at your option) any later version.
7486 #
7487 # This program is distributed in the hope that it will be useful, but
7488 # WITHOUT ANY WARRANTY; without even the implied warranty of
7489 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7490 # General Public License for more details.
7491 #
7492 # You should have received a copy of the GNU General Public License
7493 # along with this program; if not, write to the Free Software
7494 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7495 #
7496 # As a special exception to the GNU General Public License, if you
7497 # distribute this file as part of a program that contains a
7498 # configuration script generated by Autoconf, you may include it under
7499 # the same distribution terms that you use for the rest of that program.
7500
7501 # A sed that does not truncate output.
7502 SED=$lt_SED
7503
7504 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7505 Xsed="${SED} -e s/^X//"
7506
7507 # The HP-UX ksh and POSIX shell print the target directory to stdout
7508 # if CDPATH is set.
7509 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7510
7511 # ### BEGIN LIBTOOL CONFIG
7512
7513 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7514
7515 # Shell to use when invoking shell scripts.
7516 SHELL=$lt_SHELL
7517
7518 # Whether or not to build shared libraries.
7519 build_libtool_libs=$enable_shared
7520
7521 # Whether or not to build static libraries.
7522 build_old_libs=$enable_static
7523
7524 # Whether or not to add -lc for building shared libraries.
7525 build_libtool_need_lc=$need_lc
7526
7527 # Whether or not to optimize for fast installation.
7528 fast_install=$enable_fast_install
7529
7530 # The host system.
7531 host_alias=$host_alias
7532 host=$host
7533
7534 # An echo program that does not interpret backslashes.
7535 echo=$lt_echo
7536
7537 # The archiver.
7538 AR=$lt_AR
7539 AR_FLAGS=$lt_AR_FLAGS
7540
7541 # The default C compiler.
7542 CC=$lt_CC
7543
7544 # Is the compiler the GNU C compiler?
7545 with_gcc=$GCC
7546
7547 # The linker used to build libraries.
7548 LD=$lt_LD
7549
7550 # Whether we need hard or soft links.
7551 LN_S=$lt_LN_S
7552
7553 # A BSD-compatible nm program.
7554 NM=$lt_NM
7555
7556 # A symbol stripping program
7557 STRIP=$STRIP
7558
7559 # Used to examine libraries when file_magic_cmd begins "file"
7560 MAGIC_CMD=$MAGIC_CMD
7561
7562 # Used on cygwin: DLL creation program.
7563 DLLTOOL="$DLLTOOL"
7564
7565 # Used on cygwin: object dumper.
7566 OBJDUMP="$OBJDUMP"
7567
7568 # Used on cygwin: assembler.
7569 AS="$AS"
7570
7571 # The name of the directory that contains temporary libtool files.
7572 objdir=$objdir
7573
7574 # How to create reloadable object files.
7575 reload_flag=$lt_reload_flag
7576 reload_cmds=$lt_reload_cmds
7577
7578 # How to pass a linker flag through the compiler.
7579 wl=$lt_wl
7580
7581 # Object file suffix (normally "o").
7582 objext="$ac_objext"
7583
7584 # Old archive suffix (normally "a").
7585 libext="$libext"
7586
7587 # Executable file suffix (normally "").
7588 exeext="$exeext"
7589
7590 # Additional compiler flags for building library objects.
7591 pic_flag=$lt_pic_flag
7592 pic_mode=$pic_mode
7593
7594 # Does compiler simultaneously support -c and -o options?
7595 compiler_c_o=$lt_compiler_c_o
7596
7597 # Can we write directly to a .lo ?
7598 compiler_o_lo=$lt_compiler_o_lo
7599
7600 # Must we lock files when doing compilation ?
7601 need_locks=$lt_need_locks
7602
7603 # Do we need the lib prefix for modules?
7604 need_lib_prefix=$need_lib_prefix
7605
7606 # Do we need a version for libraries?
7607 need_version=$need_version
7608
7609 # Whether dlopen is supported.
7610 dlopen_support=$enable_dlopen
7611
7612 # Whether dlopen of programs is supported.
7613 dlopen_self=$enable_dlopen_self
7614
7615 # Whether dlopen of statically linked programs is supported.
7616 dlopen_self_static=$enable_dlopen_self_static
7617
7618 # Compiler flag to prevent dynamic linking.
7619 link_static_flag=$lt_link_static_flag
7620
7621 # Compiler flag to turn off builtin functions.
7622 no_builtin_flag=$lt_no_builtin_flag
7623
7624 # Compiler flag to allow reflexive dlopens.
7625 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7626
7627 # Compiler flag to generate shared objects directly from archives.
7628 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7629
7630 # Compiler flag to generate thread-safe objects.
7631 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7632
7633 # Library versioning type.
7634 version_type=$version_type
7635
7636 # Format of library name prefix.
7637 libname_spec=$lt_libname_spec
7638
7639 # List of archive names.  First name is the real one, the rest are links.
7640 # The last name is the one that the linker finds with -lNAME.
7641 library_names_spec=$lt_library_names_spec
7642
7643 # The coded name of the library, if different from the real name.
7644 soname_spec=$lt_soname_spec
7645
7646 # Commands used to build and install an old-style archive.
7647 RANLIB=$lt_RANLIB
7648 old_archive_cmds=$lt_old_archive_cmds
7649 old_postinstall_cmds=$lt_old_postinstall_cmds
7650 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7651
7652 # Create an old-style archive from a shared archive.
7653 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7654
7655 # Create a temporary old-style archive to link instead of a shared archive.
7656 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7657
7658 # Commands used to build and install a shared archive.
7659 archive_cmds=$lt_archive_cmds
7660 archive_expsym_cmds=$lt_archive_expsym_cmds
7661 postinstall_cmds=$lt_postinstall_cmds
7662 postuninstall_cmds=$lt_postuninstall_cmds
7663
7664 # Commands to strip libraries.
7665 old_striplib=$lt_old_striplib
7666 striplib=$lt_striplib
7667
7668 # Method to check whether dependent libraries are shared objects.
7669 deplibs_check_method=$lt_deplibs_check_method
7670
7671 # Command to use when deplibs_check_method == file_magic.
7672 file_magic_cmd=$lt_file_magic_cmd
7673
7674 # Flag that allows shared libraries with undefined symbols to be built.
7675 allow_undefined_flag=$lt_allow_undefined_flag
7676
7677 # Flag that forces no undefined symbols.
7678 no_undefined_flag=$lt_no_undefined_flag
7679
7680 # Commands used to finish a libtool library installation in a directory.
7681 finish_cmds=$lt_finish_cmds
7682
7683 # Same as above, but a single script fragment to be evaled but not shown.
7684 finish_eval=$lt_finish_eval
7685
7686 # Take the output of nm and produce a listing of raw symbols and C names.
7687 global_symbol_pipe=$lt_global_symbol_pipe
7688
7689 # Transform the output of nm in a proper C declaration
7690 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7691
7692 # Transform the output of nm in a C name address pair
7693 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7694
7695 # This is the shared library runtime path variable.
7696 runpath_var=$runpath_var
7697
7698 # This is the shared library path variable.
7699 shlibpath_var=$shlibpath_var
7700
7701 # Is shlibpath searched before the hard-coded library search path?
7702 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7703
7704 # How to hardcode a shared library path into an executable.
7705 hardcode_action=$hardcode_action
7706
7707 # Whether we should hardcode library paths into libraries.
7708 hardcode_into_libs=$hardcode_into_libs
7709
7710 # Flag to hardcode \$libdir into a binary during linking.
7711 # This must work even if \$libdir does not exist.
7712 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7713
7714 # Whether we need a single -rpath flag with a separated argument.
7715 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7716
7717 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7718 # resulting binary.
7719 hardcode_direct=$hardcode_direct
7720
7721 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7722 # resulting binary.
7723 hardcode_minus_L=$hardcode_minus_L
7724
7725 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7726 # the resulting binary.
7727 hardcode_shlibpath_var=$hardcode_shlibpath_var
7728
7729 # Variables whose values should be saved in libtool wrapper scripts and
7730 # restored at relink time.
7731 variables_saved_for_relink="$variables_saved_for_relink"
7732
7733 # Whether libtool must link a program against all its dependency libraries.
7734 link_all_deplibs=$link_all_deplibs
7735
7736 # Compile-time system search path for libraries
7737 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7738
7739 # Run-time system search path for libraries
7740 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7741
7742 # Fix the shell variable \$srcfile for the compiler.
7743 fix_srcfile_path="$fix_srcfile_path"
7744
7745 # Set to yes if exported symbols are required.
7746 always_export_symbols=$always_export_symbols
7747
7748 # The commands to list exported symbols.
7749 export_symbols_cmds=$lt_export_symbols_cmds
7750
7751 # The commands to extract the exported symbol list from a shared archive.
7752 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7753
7754 # Symbols that should not be listed in the preloaded symbols.
7755 exclude_expsyms=$lt_exclude_expsyms
7756
7757 # Symbols that must always be exported.
7758 include_expsyms=$lt_include_expsyms
7759
7760 # ### END LIBTOOL CONFIG
7761
7762 __EOF__
7763
7764   case $host_os in
7765   aix3*)
7766     cat <<\EOF >> "${ofile}T"
7767
7768 # AIX sometimes has problems with the GCC collect2 program.  For some
7769 # reason, if we set the COLLECT_NAMES environment variable, the problems
7770 # vanish in a puff of smoke.
7771 if test "X${COLLECT_NAMES+set}" != Xset; then
7772   COLLECT_NAMES=
7773   export COLLECT_NAMES
7774 fi
7775 EOF
7776     ;;
7777   esac
7778
7779   case $host_os in
7780   cygwin* | mingw* | pw32* | os2*)
7781     cat <<'EOF' >> "${ofile}T"
7782       # This is a source program that is used to create dlls on Windows
7783       # Don't remove nor modify the starting and closing comments
7784 # /* ltdll.c starts here */
7785 # #define WIN32_LEAN_AND_MEAN
7786 # #include <windows.h>
7787 # #undef WIN32_LEAN_AND_MEAN
7788 # #include <stdio.h>
7789 #
7790 # #ifndef __CYGWIN__
7791 # #  ifdef __CYGWIN32__
7792 # #    define __CYGWIN__ __CYGWIN32__
7793 # #  endif
7794 # #endif
7795 #
7796 # #ifdef __cplusplus
7797 # extern "C" {
7798 # #endif
7799 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7800 # #ifdef __cplusplus
7801 # }
7802 # #endif
7803 #
7804 # #ifdef __CYGWIN__
7805 # #include <cygwin/cygwin_dll.h>
7806 # DECLARE_CYGWIN_DLL( DllMain );
7807 # #endif
7808 # HINSTANCE __hDllInstance_base;
7809 #
7810 # BOOL APIENTRY
7811 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7812 # {
7813 #   __hDllInstance_base = hInst;
7814 #   return TRUE;
7815 # }
7816 # /* ltdll.c ends here */
7817         # This is a source program that is used to create import libraries
7818         # on Windows for dlls which lack them. Don't remove nor modify the
7819         # starting and closing comments
7820 # /* impgen.c starts here */
7821 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7822 #
7823 #  This file is part of GNU libtool.
7824 #
7825 #  This program is free software; you can redistribute it and/or modify
7826 #  it under the terms of the GNU General Public License as published by
7827 #  the Free Software Foundation; either version 2 of the License, or
7828 #  (at your option) any later version.
7829 #
7830 #  This program is distributed in the hope that it will be useful,
7831 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7832 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7833 #  GNU General Public License for more details.
7834 #
7835 #  You should have received a copy of the GNU General Public License
7836 #  along with this program; if not, write to the Free Software
7837 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7838 #  */
7839 #
7840 # #include <stdio.h>            /* for printf() */
7841 # #include <unistd.h>           /* for open(), lseek(), read() */
7842 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7843 # #include <string.h>           /* for strdup() */
7844 #
7845 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7846 # #ifndef O_BINARY
7847 # #define O_BINARY 0
7848 # #endif
7849 #
7850 # static unsigned int
7851 # pe_get16 (fd, offset)
7852 #      int fd;
7853 #      int offset;
7854 # {
7855 #   unsigned char b[2];
7856 #   lseek (fd, offset, SEEK_SET);
7857 #   read (fd, b, 2);
7858 #   return b[0] + (b[1]<<8);
7859 # }
7860 #
7861 # static unsigned int
7862 # pe_get32 (fd, offset)
7863 #     int fd;
7864 #     int offset;
7865 # {
7866 #   unsigned char b[4];
7867 #   lseek (fd, offset, SEEK_SET);
7868 #   read (fd, b, 4);
7869 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7870 # }
7871 #
7872 # static unsigned int
7873 # pe_as32 (ptr)
7874 #      void *ptr;
7875 # {
7876 #   unsigned char *b = ptr;
7877 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7878 # }
7879 #
7880 # int
7881 # main (argc, argv)
7882 #     int argc;
7883 #     char *argv[];
7884 # {
7885 #     int dll;
7886 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7887 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7888 #     unsigned long name_rvas, nexp;
7889 #     unsigned char *expdata, *erva;
7890 #     char *filename, *dll_name;
7891 #
7892 #     filename = argv[1];
7893 #
7894 #     dll = open(filename, O_RDONLY|O_BINARY);
7895 #     if (dll < 1)
7896 #       return 1;
7897 #
7898 #     dll_name = filename;
7899 #
7900 #     for (i=0; filename[i]; i++)
7901 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7902 #           dll_name = filename + i +1;
7903 #
7904 #     pe_header_offset = pe_get32 (dll, 0x3c);
7905 #     opthdr_ofs = pe_header_offset + 4 + 20;
7906 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7907 #
7908 #     if (num_entries < 1) /* no exports */
7909 #       return 1;
7910 #
7911 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7912 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7913 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7914 #     secptr = (pe_header_offset + 4 + 20 +
7915 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7916 #
7917 #     expptr = 0;
7918 #     for (i = 0; i < nsections; i++)
7919 #     {
7920 #       char sname[8];
7921 #       unsigned long secptr1 = secptr + 40 * i;
7922 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7923 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7924 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7925 #       lseek(dll, secptr1, SEEK_SET);
7926 #       read(dll, sname, 8);
7927 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7928 #       {
7929 #           expptr = fptr + (export_rva - vaddr);
7930 #           if (export_rva + export_size > vaddr + vsize)
7931 #               export_size = vsize - (export_rva - vaddr);
7932 #           break;
7933 #       }
7934 #     }
7935 #
7936 #     expdata = (unsigned char*)malloc(export_size);
7937 #     lseek (dll, expptr, SEEK_SET);
7938 #     read (dll, expdata, export_size);
7939 #     erva = expdata - export_rva;
7940 #
7941 #     nexp = pe_as32 (expdata+24);
7942 #     name_rvas = pe_as32 (expdata+32);
7943 #
7944 #     printf ("EXPORTS\n");
7945 #     for (i = 0; i<nexp; i++)
7946 #     {
7947 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7948 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7949 #     }
7950 #
7951 #     return 0;
7952 # }
7953 # /* impgen.c ends here */
7954
7955 EOF
7956     ;;
7957   esac
7958
7959   # We use sed instead of cat because bash on DJGPP gets confused if
7960   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7961   # text mode, it properly converts lines to CR/LF.  This bash problem
7962   # is reportedly fixed, but why not run on old versions too?
7963   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7964
7965   mv -f "${ofile}T" "$ofile" || \
7966     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7967   chmod +x "$ofile"
7968 fi
7969
7970
7971
7972
7973
7974 # This can be used to rebuild libtool when needed
7975 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7976
7977 # Always use our own libtool.
7978 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7979
7980 # Prevent multiple expansion
7981
7982
7983
7984 # test for ln hardlink support
7985 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7986 echo "configure:7987: checking whether ln works" >&5
7987 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7988   echo $ac_n "(cached) $ac_c" 1>&6
7989 else
7990   rm -f conftest.src conftest.dst
7991 echo "conftest" > conftest.src
7992 if ln conftest.src conftest.dst 2>/dev/null
7993 then
7994   ol_cv_prog_LN_H="ln"
7995 else
7996   ol_cv_prog_LN_H="cp"
7997 fi
7998 rm -f conftest.src conftest.dst
7999
8000 fi
8001 LN_H="$ol_cv_prog_LN_H"
8002 if test "$ol_cv_prog_LN_H" = "ln"; then
8003         echo "$ac_t""yes" 1>&6
8004 else
8005         echo "$ac_t""no" 1>&6
8006 fi
8007
8008 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
8009 echo "configure:8010: checking whether ln -s works" >&5
8010 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
8011   echo $ac_n "(cached) $ac_c" 1>&6
8012 else
8013   rm -f conftestdata
8014 if ln -s X conftestdata 2>/dev/null
8015 then
8016   rm -f conftestdata
8017   ac_cv_prog_LN_S="ln -s"
8018 else
8019   ac_cv_prog_LN_S=ln
8020 fi
8021 fi
8022 LN_S="$ac_cv_prog_LN_S"
8023 if test "$ac_cv_prog_LN_S" = "ln -s"; then
8024   echo "$ac_t""yes" 1>&6
8025 else
8026   echo "$ac_t""no" 1>&6
8027 fi
8028
8029
8030 ol_link_perl=no
8031 if test $ol_enable_perl != no ; then
8032         # Extract the first word of "perl", so it can be a program name with args.
8033 set dummy perl; ac_word=$2
8034 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8035 echo "configure:8036: checking for $ac_word" >&5
8036 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
8037   echo $ac_n "(cached) $ac_c" 1>&6
8038 else
8039   case "$PERLBIN" in
8040   /*)
8041   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
8042   ;;
8043   ?:/*)
8044   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
8045   ;;
8046   *)
8047   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8048   ac_dummy="$PATH"
8049   for ac_dir in $ac_dummy; do 
8050     test -z "$ac_dir" && ac_dir=.
8051     if test -f $ac_dir/$ac_word; then
8052       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
8053       break
8054     fi
8055   done
8056   IFS="$ac_save_ifs"
8057   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
8058   ;;
8059 esac
8060 fi
8061 PERLBIN="$ac_cv_path_PERLBIN"
8062 if test -n "$PERLBIN"; then
8063   echo "$ac_t""$PERLBIN" 1>&6
8064 else
8065   echo "$ac_t""no" 1>&6
8066 fi
8067
8068
8069         if test "no$PERLBIN" = "no" ; then
8070                 if test $ol_enable_perl = yes ; then
8071                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
8072                 fi
8073
8074         else
8075                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
8076                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
8077
8078                 if test x"$ol_with_perl_module" = "xstatic" ; then
8079                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
8080                 else
8081                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
8082                 fi
8083                                 ol_link_perl=yes
8084         fi
8085 fi
8086
8087 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
8088 echo "configure:8089: checking how to run the C preprocessor" >&5
8089 # On Suns, sometimes $CPP names a directory.
8090 if test -n "$CPP" && test -d "$CPP"; then
8091   CPP=
8092 fi
8093 if test -z "$CPP"; then
8094 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
8095   echo $ac_n "(cached) $ac_c" 1>&6
8096 else
8097     # This must be in double quotes, not single quotes, because CPP may get
8098   # substituted into the Makefile and "${CC-cc}" will confuse make.
8099   CPP="${CC-cc} -E"
8100   # On the NeXT, cc -E runs the code through the compiler's parser,
8101   # not just through cpp.
8102   cat > conftest.$ac_ext <<EOF
8103 #line 8104 "configure"
8104 #include "confdefs.h"
8105 #include <assert.h>
8106 Syntax Error
8107 EOF
8108 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8109 { (eval echo configure:8110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8110 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8111 if test -z "$ac_err"; then
8112   :
8113 else
8114   echo "$ac_err" >&5
8115   echo "configure: failed program was:" >&5
8116   cat conftest.$ac_ext >&5
8117   rm -rf conftest*
8118   CPP="${CC-cc} -E -traditional-cpp"
8119   cat > conftest.$ac_ext <<EOF
8120 #line 8121 "configure"
8121 #include "confdefs.h"
8122 #include <assert.h>
8123 Syntax Error
8124 EOF
8125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8126 { (eval echo configure:8127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8128 if test -z "$ac_err"; then
8129   :
8130 else
8131   echo "$ac_err" >&5
8132   echo "configure: failed program was:" >&5
8133   cat conftest.$ac_ext >&5
8134   rm -rf conftest*
8135   CPP="${CC-cc} -nologo -E"
8136   cat > conftest.$ac_ext <<EOF
8137 #line 8138 "configure"
8138 #include "confdefs.h"
8139 #include <assert.h>
8140 Syntax Error
8141 EOF
8142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8143 { (eval echo configure:8144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8144 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8145 if test -z "$ac_err"; then
8146   :
8147 else
8148   echo "$ac_err" >&5
8149   echo "configure: failed program was:" >&5
8150   cat conftest.$ac_ext >&5
8151   rm -rf conftest*
8152   CPP=/lib/cpp
8153 fi
8154 rm -f conftest*
8155 fi
8156 rm -f conftest*
8157 fi
8158 rm -f conftest*
8159   ac_cv_prog_CPP="$CPP"
8160 fi
8161   CPP="$ac_cv_prog_CPP"
8162 else
8163   ac_cv_prog_CPP="$CPP"
8164 fi
8165 echo "$ac_t""$CPP" 1>&6
8166
8167
8168 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
8169         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
8170
8171 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
8172         echo "configure: warning: programs compiled here do run here..." 1>&2
8173         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
8174
8175 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
8176         echo "configure: warning: programs compiled here do not run here..." 1>&2
8177         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
8178 fi
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 else
8637         ol_with_bdb_module=static
8638         ol_with_dnssrv_module=static
8639         ol_with_hdb_module=static
8640         ol_with_ldap_module=static
8641         ol_with_ldbm_module=static
8642         ol_with_meta_module=static
8643         ol_with_monitor_module=static
8644         ol_with_null_module=static
8645         ol_with_passwd_module=static
8646         ol_with_perl_module=static
8647         ol_with_relay_module=static
8648         ol_with_shell_module=static
8649         ol_with_sql_module=static
8650         if test $ol_with_chain = mod ; then
8651                 echo "configure: warning: building static chain overlay" 1>&2
8652                 ol_with_chain=yes
8653         fi
8654         if test $ol_with_denyop = mod ; then
8655                 echo "configure: warning: building static denyop overlay" 1>&2
8656                 ol_with_denyop=yes
8657         fi
8658         if test $ol_with_dyngroup = mod ; then
8659                 echo "configure: warning: building static dyngroup overlay" 1>&2
8660                 ol_with_dyngroup=yes
8661         fi
8662         if test $ol_with_proxycache = mod ; then
8663                 echo "configure: warning: building static proxycache overlay" 1>&2
8664                 ol_with_proxycache=yes
8665         fi
8666         if test $ol_with_rwm = mod ; then
8667                 echo "configure: warning: building static rwm overlay" 1>&2
8668                 ol_with_rwm=yes
8669         fi
8670 fi
8671
8672 # test for EBCDIC
8673 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8674 echo "configure:8675: checking for EBCDIC" >&5
8675 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8676   echo $ac_n "(cached) $ac_c" 1>&6
8677 else
8678   
8679         cat > conftest.$ac_ext <<EOF
8680 #line 8681 "configure"
8681 #include "confdefs.h"
8682
8683 #if !('M' == 0xd4)
8684 #include <__ASCII__/generate_error.h>
8685 #endif
8686
8687 EOF
8688 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8689 { (eval echo configure:8690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8690 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8691 if test -z "$ac_err"; then
8692   rm -rf conftest*
8693   ol_cv_cpp_ebcdic=yes
8694 else
8695   echo "$ac_err" >&5
8696   echo "configure: failed program was:" >&5
8697   cat conftest.$ac_ext >&5
8698   rm -rf conftest*
8699   ol_cv_cpp_ebcdic=no
8700 fi
8701 rm -f conftest*
8702 fi
8703
8704 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8705 if test $ol_cv_cpp_ebcdic = yes ; then
8706         cat >> confdefs.h <<\EOF
8707 #define HAVE_EBCDIC 1
8708 EOF
8709
8710 fi
8711
8712 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8713 echo "configure:8714: checking for ANSI C header files" >&5
8714 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8715   echo $ac_n "(cached) $ac_c" 1>&6
8716 else
8717   cat > conftest.$ac_ext <<EOF
8718 #line 8719 "configure"
8719 #include "confdefs.h"
8720 #include <stdlib.h>
8721 #include <stdarg.h>
8722 #include <string.h>
8723 #include <float.h>
8724 EOF
8725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8726 { (eval echo configure:8727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8728 if test -z "$ac_err"; then
8729   rm -rf conftest*
8730   ol_cv_header_stdc=yes
8731 else
8732   echo "$ac_err" >&5
8733   echo "configure: failed program was:" >&5
8734   cat conftest.$ac_ext >&5
8735   rm -rf conftest*
8736   ol_cv_header_stdc=no
8737 fi
8738 rm -f conftest*
8739
8740 if test $ol_cv_header_stdc = yes; then
8741   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8742 cat > conftest.$ac_ext <<EOF
8743 #line 8744 "configure"
8744 #include "confdefs.h"
8745 #include <string.h>
8746 EOF
8747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8748   egrep "memchr" >/dev/null 2>&1; then
8749   :
8750 else
8751   rm -rf conftest*
8752   ol_cv_header_stdc=no
8753 fi
8754 rm -f conftest*
8755
8756 fi
8757
8758 if test $ol_cv_header_stdc = yes; then
8759   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8760 cat > conftest.$ac_ext <<EOF
8761 #line 8762 "configure"
8762 #include "confdefs.h"
8763 #include <stdlib.h>
8764 EOF
8765 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8766   egrep "free" >/dev/null 2>&1; then
8767   :
8768 else
8769   rm -rf conftest*
8770   ol_cv_header_stdc=no
8771 fi
8772 rm -f conftest*
8773
8774 fi
8775
8776 if test $ol_cv_header_stdc = yes; then
8777   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8778 if test "$cross_compiling" = yes; then
8779   :
8780 else
8781   cat > conftest.$ac_ext <<EOF
8782 #line 8783 "configure"
8783 #include "confdefs.h"
8784 #include <ctype.h>
8785 #ifndef HAVE_EBCDIC
8786 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8787 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8788 #else
8789 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8790                 || ('j' <= (c) && (c) <= 'r') \
8791                 || ('s' <= (c) && (c) <= 'z'))
8792 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8793 #endif
8794 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8795 int main () { int i; for (i = 0; i < 256; i++)
8796 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8797 exit (0); }
8798
8799 EOF
8800 if { (eval echo configure:8801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8801 then
8802   :
8803 else
8804   echo "configure: failed program was:" >&5
8805   cat conftest.$ac_ext >&5
8806   rm -fr conftest*
8807   ol_cv_header_stdc=no
8808 fi
8809 rm -fr conftest*
8810 fi
8811
8812 fi
8813 fi
8814
8815 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8816 if test $ol_cv_header_stdc = yes; then
8817   cat >> confdefs.h <<\EOF
8818 #define STDC_HEADERS 1
8819 EOF
8820
8821 fi
8822 ac_cv_header_stdc=disable
8823
8824
8825 if test $ol_cv_header_stdc != yes; then
8826         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8827 fi
8828
8829 ac_header_dirent=no
8830 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8831 do
8832 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8833 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8834 echo "configure:8835: checking for $ac_hdr that defines DIR" >&5
8835 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8836   echo $ac_n "(cached) $ac_c" 1>&6
8837 else
8838   cat > conftest.$ac_ext <<EOF
8839 #line 8840 "configure"
8840 #include "confdefs.h"
8841 #include <sys/types.h>
8842 #include <$ac_hdr>
8843 int main() {
8844 DIR *dirp = 0;
8845 ; return 0; }
8846 EOF
8847 if { (eval echo configure:8848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8848   rm -rf conftest*
8849   eval "ac_cv_header_dirent_$ac_safe=yes"
8850 else
8851   echo "configure: failed program was:" >&5
8852   cat conftest.$ac_ext >&5
8853   rm -rf conftest*
8854   eval "ac_cv_header_dirent_$ac_safe=no"
8855 fi
8856 rm -f conftest*
8857 fi
8858 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8859   echo "$ac_t""yes" 1>&6
8860     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8861   cat >> confdefs.h <<EOF
8862 #define $ac_tr_hdr 1
8863 EOF
8864  ac_header_dirent=$ac_hdr; break
8865 else
8866   echo "$ac_t""no" 1>&6
8867 fi
8868 done
8869 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8870 if test $ac_header_dirent = dirent.h; then
8871 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8872 echo "configure:8873: checking for opendir in -ldir" >&5
8873 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8874 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8875   echo $ac_n "(cached) $ac_c" 1>&6
8876 else
8877   ac_save_LIBS="$LIBS"
8878 LIBS="-ldir  $LIBS"
8879 cat > conftest.$ac_ext <<EOF
8880 #line 8881 "configure"
8881 #include "confdefs.h"
8882 /* Override any gcc2 internal prototype to avoid an error.  */
8883 /* We use char because int might match the return type of a gcc2
8884     builtin and then its argument prototype would still apply.  */
8885 char opendir();
8886
8887 int main() {
8888 opendir()
8889 ; return 0; }
8890 EOF
8891 if { (eval echo configure:8892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8892   rm -rf conftest*
8893   eval "ac_cv_lib_$ac_lib_var=yes"
8894 else
8895   echo "configure: failed program was:" >&5
8896   cat conftest.$ac_ext >&5
8897   rm -rf conftest*
8898   eval "ac_cv_lib_$ac_lib_var=no"
8899 fi
8900 rm -f conftest*
8901 LIBS="$ac_save_LIBS"
8902
8903 fi
8904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8905   echo "$ac_t""yes" 1>&6
8906   LIBS="$LIBS -ldir"
8907 else
8908   echo "$ac_t""no" 1>&6
8909 fi
8910
8911 else
8912 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8913 echo "configure:8914: checking for opendir in -lx" >&5
8914 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8915 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8916   echo $ac_n "(cached) $ac_c" 1>&6
8917 else
8918   ac_save_LIBS="$LIBS"
8919 LIBS="-lx  $LIBS"
8920 cat > conftest.$ac_ext <<EOF
8921 #line 8922 "configure"
8922 #include "confdefs.h"
8923 /* Override any gcc2 internal prototype to avoid an error.  */
8924 /* We use char because int might match the return type of a gcc2
8925     builtin and then its argument prototype would still apply.  */
8926 char opendir();
8927
8928 int main() {
8929 opendir()
8930 ; return 0; }
8931 EOF
8932 if { (eval echo configure:8933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8933   rm -rf conftest*
8934   eval "ac_cv_lib_$ac_lib_var=yes"
8935 else
8936   echo "configure: failed program was:" >&5
8937   cat conftest.$ac_ext >&5
8938   rm -rf conftest*
8939   eval "ac_cv_lib_$ac_lib_var=no"
8940 fi
8941 rm -f conftest*
8942 LIBS="$ac_save_LIBS"
8943
8944 fi
8945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8946   echo "$ac_t""yes" 1>&6
8947   LIBS="$LIBS -lx"
8948 else
8949   echo "$ac_t""no" 1>&6
8950 fi
8951
8952 fi
8953
8954 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8955 echo "configure:8956: checking for sys/wait.h that is POSIX.1 compatible" >&5
8956 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8957   echo $ac_n "(cached) $ac_c" 1>&6
8958 else
8959   cat > conftest.$ac_ext <<EOF
8960 #line 8961 "configure"
8961 #include "confdefs.h"
8962 #include <sys/types.h>
8963 #include <sys/wait.h>
8964 #ifndef WEXITSTATUS
8965 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8966 #endif
8967 #ifndef WIFEXITED
8968 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8969 #endif
8970 int main() {
8971 int s;
8972 wait (&s);
8973 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8974 ; return 0; }
8975 EOF
8976 if { (eval echo configure:8977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8977   rm -rf conftest*
8978   ac_cv_header_sys_wait_h=yes
8979 else
8980   echo "configure: failed program was:" >&5
8981   cat conftest.$ac_ext >&5
8982   rm -rf conftest*
8983   ac_cv_header_sys_wait_h=no
8984 fi
8985 rm -f conftest*
8986 fi
8987
8988 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8989 if test $ac_cv_header_sys_wait_h = yes; then
8990   cat >> confdefs.h <<\EOF
8991 #define HAVE_SYS_WAIT_H 1
8992 EOF
8993
8994 fi
8995
8996 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8997 echo "configure:8998: checking POSIX termios" >&5
8998 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8999   echo $ac_n "(cached) $ac_c" 1>&6
9000 else
9001   cat > conftest.$ac_ext <<EOF
9002 #line 9003 "configure"
9003 #include "confdefs.h"
9004 #include <sys/types.h>
9005 #include <unistd.h>
9006 #include <termios.h>
9007 int main() {
9008 /* SunOS 4.0.3 has termios.h but not the library calls.  */
9009    tcgetattr(0, 0);
9010 ; return 0; }
9011 EOF
9012 if { (eval echo configure:9013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9013   rm -rf conftest*
9014   am_cv_sys_posix_termios=yes
9015 else
9016   echo "configure: failed program was:" >&5
9017   cat conftest.$ac_ext >&5
9018   rm -rf conftest*
9019   am_cv_sys_posix_termios=no
9020 fi
9021 rm -f conftest*
9022 fi
9023
9024 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
9025
9026
9027  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
9028 echo "configure:9029: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
9029 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
9030   echo $ac_n "(cached) $ac_c" 1>&6
9031 else
9032   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
9033
9034   gwinsz_in_termios_h=no
9035   if test $am_cv_sys_posix_termios = yes; then
9036     cat > conftest.$ac_ext <<EOF
9037 #line 9038 "configure"
9038 #include "confdefs.h"
9039 #include <sys/types.h>
9040 #     include <termios.h>
9041 #     ifdef TIOCGWINSZ
9042         yes
9043 #     endif
9044     
9045 EOF
9046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9047   egrep "yes" >/dev/null 2>&1; then
9048   rm -rf conftest*
9049   gwinsz_in_termios_h=yes
9050 fi
9051 rm -f conftest*
9052
9053   fi
9054
9055   if test $gwinsz_in_termios_h = no; then
9056     cat > conftest.$ac_ext <<EOF
9057 #line 9058 "configure"
9058 #include "confdefs.h"
9059 #include <sys/types.h>
9060 #     include <sys/ioctl.h>
9061 #     ifdef TIOCGWINSZ
9062         yes
9063 #     endif
9064     
9065 EOF
9066 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9067   egrep "yes" >/dev/null 2>&1; then
9068   rm -rf conftest*
9069   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
9070 fi
9071 rm -f conftest*
9072
9073   fi
9074   
9075 fi
9076
9077 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
9078   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
9079     cat >> confdefs.h <<\EOF
9080 #define GWINSZ_IN_SYS_IOCTL 1
9081 EOF
9082
9083   fi
9084
9085 if test $am_cv_sys_posix_termios = yes ; then
9086         cat >> confdefs.h <<\EOF
9087 #define HAVE_POSIX_TERMIOS 1
9088 EOF
9089
9090 fi
9091
9092 for ac_hdr in \
9093         arpa/inet.h             \
9094         arpa/nameser.h  \
9095         assert.h                \
9096         bits/types.h    \
9097         conio.h                 \
9098         crypt.h                 \
9099         direct.h                \
9100         errno.h                 \
9101         fcntl.h                 \
9102         filio.h                 \
9103         getopt.h                \
9104         grp.h                   \
9105         io.h                    \
9106         libutil.h               \
9107         limits.h                \
9108         locale.h                \
9109         netinet/tcp.h   \
9110         malloc.h                \
9111         memory.h                \
9112         psap.h                  \
9113         pwd.h                   \
9114         process.h               \
9115         resolv.h                \
9116         sgtty.h                 \
9117         shadow.h                \
9118         stddef.h                \
9119         string.h                \
9120         strings.h               \
9121         sysexits.h              \
9122         sys/file.h              \
9123         sys/filio.h             \
9124         sys/errno.h             \
9125         sys/ioctl.h             \
9126         sys/param.h             \
9127         sys/resource.h  \
9128         sys/select.h    \
9129         sys/socket.h    \
9130         sys/stat.h              \
9131         sys/syslog.h    \
9132         sys/time.h              \
9133         sys/types.h             \
9134         sys/ucred.h             \
9135         sys/uio.h               \
9136         syslog.h                \
9137         termios.h               \
9138         unistd.h                \
9139         winsock.h               \
9140         winsock2.h              \
9141
9142 do
9143 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9144 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9145 echo "configure:9146: checking for $ac_hdr" >&5
9146 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9147   echo $ac_n "(cached) $ac_c" 1>&6
9148 else
9149   cat > conftest.$ac_ext <<EOF
9150 #line 9151 "configure"
9151 #include "confdefs.h"
9152 #include <$ac_hdr>
9153 EOF
9154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9155 { (eval echo configure:9156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9157 if test -z "$ac_err"; then
9158   rm -rf conftest*
9159   eval "ac_cv_header_$ac_safe=yes"
9160 else
9161   echo "$ac_err" >&5
9162   echo "configure: failed program was:" >&5
9163   cat conftest.$ac_ext >&5
9164   rm -rf conftest*
9165   eval "ac_cv_header_$ac_safe=no"
9166 fi
9167 rm -f conftest*
9168 fi
9169 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9170   echo "$ac_t""yes" 1>&6
9171     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9172   cat >> confdefs.h <<EOF
9173 #define $ac_tr_hdr 1
9174 EOF
9175  
9176 else
9177   echo "$ac_t""no" 1>&6
9178 fi
9179 done
9180
9181
9182
9183
9184 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9185 echo "configure:9186: checking for sigset in -lV3" >&5
9186 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9187 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9188   echo $ac_n "(cached) $ac_c" 1>&6
9189 else
9190   ac_save_LIBS="$LIBS"
9191 LIBS="-lV3  $LIBS"
9192 cat > conftest.$ac_ext <<EOF
9193 #line 9194 "configure"
9194 #include "confdefs.h"
9195 /* Override any gcc2 internal prototype to avoid an error.  */
9196 /* We use char because int might match the return type of a gcc2
9197     builtin and then its argument prototype would still apply.  */
9198 char sigset();
9199
9200 int main() {
9201 sigset()
9202 ; return 0; }
9203 EOF
9204 if { (eval echo configure:9205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9205   rm -rf conftest*
9206   eval "ac_cv_lib_$ac_lib_var=yes"
9207 else
9208   echo "configure: failed program was:" >&5
9209   cat conftest.$ac_ext >&5
9210   rm -rf conftest*
9211   eval "ac_cv_lib_$ac_lib_var=no"
9212 fi
9213 rm -f conftest*
9214 LIBS="$ac_save_LIBS"
9215
9216 fi
9217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9218   echo "$ac_t""yes" 1>&6
9219     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9220     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9221   cat >> confdefs.h <<EOF
9222 #define $ac_tr_lib 1
9223 EOF
9224
9225   LIBS="-lV3 $LIBS"
9226
9227 else
9228   echo "$ac_t""no" 1>&6
9229 fi
9230
9231
9232 if test "$ac_cv_header_winsock_h" = yes; then
9233 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9234 echo "configure:9235: checking for winsock" >&5
9235 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9236   echo $ac_n "(cached) $ac_c" 1>&6
9237 else
9238   save_LIBS="$LIBS"
9239 for curlib in ws2_32 wsock32; do
9240         LIBS="$LIBS -l$curlib"
9241         cat > conftest.$ac_ext <<EOF
9242 #line 9243 "configure"
9243 #include "confdefs.h"
9244 #include <winsock.h>
9245                         
9246 int main() {
9247
9248                         socket(0,0,0);
9249                         select(0,NULL,NULL,NULL,NULL);
9250                         closesocket(0);
9251                         gethostname(NULL,0);
9252                         
9253 ; return 0; }
9254 EOF
9255 if { (eval echo configure:9256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9256   rm -rf conftest*
9257   ol_cv_winsock=yes
9258 else
9259   echo "configure: failed program was:" >&5
9260   cat conftest.$ac_ext >&5
9261   rm -rf conftest*
9262   ol_cv_winsock=no
9263 fi
9264 rm -f conftest*
9265
9266         if test $ol_cv_winsock = yes; then
9267                 cat >> confdefs.h <<\EOF
9268 #define HAVE_WINSOCK 1
9269 EOF
9270
9271                 ac_cv_func_socket=yes
9272                 ac_cv_func_select=yes
9273                 ac_cv_func_closesocket=yes
9274                 ac_cv_func_gethostname=yes
9275                 if test $curlib = ws2_32; then
9276                         ol_cv_winsock=winsock2
9277                         cat >> confdefs.h <<\EOF
9278 #define HAVE_WINSOCK2 1
9279 EOF
9280
9281                 fi
9282                 break
9283         fi
9284         LIBS="$save_LIBS"
9285 done
9286 fi
9287
9288 echo "$ac_t""$ol_cv_winsock" 1>&6
9289 fi
9290
9291
9292 echo $ac_n "checking for socket""... $ac_c" 1>&6
9293 echo "configure:9294: checking for socket" >&5
9294 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9295   echo $ac_n "(cached) $ac_c" 1>&6
9296 else
9297   cat > conftest.$ac_ext <<EOF
9298 #line 9299 "configure"
9299 #include "confdefs.h"
9300 /* System header to define __stub macros and hopefully few prototypes,
9301     which can conflict with char socket(); below.  */
9302 #include <assert.h>
9303 /* Override any gcc2 internal prototype to avoid an error.  */
9304 /* We use char because int might match the return type of a gcc2
9305     builtin and then its argument prototype would still apply.  */
9306 char socket();
9307 char (*f)();
9308
9309 int main() {
9310
9311 /* The GNU C library defines this for functions which it implements
9312     to always fail with ENOSYS.  Some functions are actually named
9313     something starting with __ and the normal name is an alias.  */
9314 #if defined (__stub_socket) || defined (__stub___socket)
9315 choke me
9316 #else
9317 f = socket;
9318 #endif
9319
9320 ; return 0; }
9321 EOF
9322 if { (eval echo configure:9323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9323   rm -rf conftest*
9324   eval "ac_cv_func_socket=yes"
9325 else
9326   echo "configure: failed program was:" >&5
9327   cat conftest.$ac_ext >&5
9328   rm -rf conftest*
9329   eval "ac_cv_func_socket=no"
9330 fi
9331 rm -f conftest*
9332 fi
9333
9334 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9335   echo "$ac_t""yes" 1>&6
9336   :
9337 else
9338   echo "$ac_t""no" 1>&6
9339         
9340         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9341 echo "configure:9342: checking for main in -lsocket" >&5
9342 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9343 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9344   echo $ac_n "(cached) $ac_c" 1>&6
9345 else
9346   ac_save_LIBS="$LIBS"
9347 LIBS="-lsocket  $LIBS"
9348 cat > conftest.$ac_ext <<EOF
9349 #line 9350 "configure"
9350 #include "confdefs.h"
9351
9352 int main() {
9353 main()
9354 ; return 0; }
9355 EOF
9356 if { (eval echo configure:9357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9357   rm -rf conftest*
9358   eval "ac_cv_lib_$ac_lib_var=yes"
9359 else
9360   echo "configure: failed program was:" >&5
9361   cat conftest.$ac_ext >&5
9362   rm -rf conftest*
9363   eval "ac_cv_lib_$ac_lib_var=no"
9364 fi
9365 rm -f conftest*
9366 LIBS="$ac_save_LIBS"
9367
9368 fi
9369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9370   echo "$ac_t""yes" 1>&6
9371     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9372     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9373   cat >> confdefs.h <<EOF
9374 #define $ac_tr_lib 1
9375 EOF
9376
9377   LIBS="-lsocket $LIBS"
9378
9379 else
9380   echo "$ac_t""no" 1>&6
9381 fi
9382
9383         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9384 echo "configure:9385: checking for main in -lnet" >&5
9385 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9386 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9387   echo $ac_n "(cached) $ac_c" 1>&6
9388 else
9389   ac_save_LIBS="$LIBS"
9390 LIBS="-lnet  $LIBS"
9391 cat > conftest.$ac_ext <<EOF
9392 #line 9393 "configure"
9393 #include "confdefs.h"
9394
9395 int main() {
9396 main()
9397 ; return 0; }
9398 EOF
9399 if { (eval echo configure:9400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9400   rm -rf conftest*
9401   eval "ac_cv_lib_$ac_lib_var=yes"
9402 else
9403   echo "configure: failed program was:" >&5
9404   cat conftest.$ac_ext >&5
9405   rm -rf conftest*
9406   eval "ac_cv_lib_$ac_lib_var=no"
9407 fi
9408 rm -f conftest*
9409 LIBS="$ac_save_LIBS"
9410
9411 fi
9412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9413   echo "$ac_t""yes" 1>&6
9414     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9415     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9416   cat >> confdefs.h <<EOF
9417 #define $ac_tr_lib 1
9418 EOF
9419
9420   LIBS="-lnet $LIBS"
9421
9422 else
9423   echo "$ac_t""no" 1>&6
9424 fi
9425
9426         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9427 echo "configure:9428: checking for main in -lnsl_s" >&5
9428 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9429 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9430   echo $ac_n "(cached) $ac_c" 1>&6
9431 else
9432   ac_save_LIBS="$LIBS"
9433 LIBS="-lnsl_s  $LIBS"
9434 cat > conftest.$ac_ext <<EOF
9435 #line 9436 "configure"
9436 #include "confdefs.h"
9437
9438 int main() {
9439 main()
9440 ; return 0; }
9441 EOF
9442 if { (eval echo configure:9443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9443   rm -rf conftest*
9444   eval "ac_cv_lib_$ac_lib_var=yes"
9445 else
9446   echo "configure: failed program was:" >&5
9447   cat conftest.$ac_ext >&5
9448   rm -rf conftest*
9449   eval "ac_cv_lib_$ac_lib_var=no"
9450 fi
9451 rm -f conftest*
9452 LIBS="$ac_save_LIBS"
9453
9454 fi
9455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9456   echo "$ac_t""yes" 1>&6
9457     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9458     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9459   cat >> confdefs.h <<EOF
9460 #define $ac_tr_lib 1
9461 EOF
9462
9463   LIBS="-lnsl_s $LIBS"
9464
9465 else
9466   echo "$ac_t""no" 1>&6
9467 fi
9468
9469         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9470 echo "configure:9471: checking for main in -lnsl" >&5
9471 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9472 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9473   echo $ac_n "(cached) $ac_c" 1>&6
9474 else
9475   ac_save_LIBS="$LIBS"
9476 LIBS="-lnsl  $LIBS"
9477 cat > conftest.$ac_ext <<EOF
9478 #line 9479 "configure"
9479 #include "confdefs.h"
9480
9481 int main() {
9482 main()
9483 ; return 0; }
9484 EOF
9485 if { (eval echo configure:9486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9486   rm -rf conftest*
9487   eval "ac_cv_lib_$ac_lib_var=yes"
9488 else
9489   echo "configure: failed program was:" >&5
9490   cat conftest.$ac_ext >&5
9491   rm -rf conftest*
9492   eval "ac_cv_lib_$ac_lib_var=no"
9493 fi
9494 rm -f conftest*
9495 LIBS="$ac_save_LIBS"
9496
9497 fi
9498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9499   echo "$ac_t""yes" 1>&6
9500     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9501     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9502   cat >> confdefs.h <<EOF
9503 #define $ac_tr_lib 1
9504 EOF
9505
9506   LIBS="-lnsl $LIBS"
9507
9508 else
9509   echo "$ac_t""no" 1>&6
9510 fi
9511
9512         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9513 echo "configure:9514: checking for socket in -linet" >&5
9514 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9515 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9516   echo $ac_n "(cached) $ac_c" 1>&6
9517 else
9518   ac_save_LIBS="$LIBS"
9519 LIBS="-linet  $LIBS"
9520 cat > conftest.$ac_ext <<EOF
9521 #line 9522 "configure"
9522 #include "confdefs.h"
9523 /* Override any gcc2 internal prototype to avoid an error.  */
9524 /* We use char because int might match the return type of a gcc2
9525     builtin and then its argument prototype would still apply.  */
9526 char socket();
9527
9528 int main() {
9529 socket()
9530 ; return 0; }
9531 EOF
9532 if { (eval echo configure:9533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9533   rm -rf conftest*
9534   eval "ac_cv_lib_$ac_lib_var=yes"
9535 else
9536   echo "configure: failed program was:" >&5
9537   cat conftest.$ac_ext >&5
9538   rm -rf conftest*
9539   eval "ac_cv_lib_$ac_lib_var=no"
9540 fi
9541 rm -f conftest*
9542 LIBS="$ac_save_LIBS"
9543
9544 fi
9545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9546   echo "$ac_t""yes" 1>&6
9547     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9548     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9549   cat >> confdefs.h <<EOF
9550 #define $ac_tr_lib 1
9551 EOF
9552
9553   LIBS="-linet $LIBS"
9554
9555 else
9556   echo "$ac_t""no" 1>&6
9557 fi
9558
9559         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9560 echo "configure:9561: checking for main in -lgen" >&5
9561 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9562 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9563   echo $ac_n "(cached) $ac_c" 1>&6
9564 else
9565   ac_save_LIBS="$LIBS"
9566 LIBS="-lgen  $LIBS"
9567 cat > conftest.$ac_ext <<EOF
9568 #line 9569 "configure"
9569 #include "confdefs.h"
9570
9571 int main() {
9572 main()
9573 ; return 0; }
9574 EOF
9575 if { (eval echo configure:9576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9576   rm -rf conftest*
9577   eval "ac_cv_lib_$ac_lib_var=yes"
9578 else
9579   echo "configure: failed program was:" >&5
9580   cat conftest.$ac_ext >&5
9581   rm -rf conftest*
9582   eval "ac_cv_lib_$ac_lib_var=no"
9583 fi
9584 rm -f conftest*
9585 LIBS="$ac_save_LIBS"
9586
9587 fi
9588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9589   echo "$ac_t""yes" 1>&6
9590     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9591     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9592   cat >> confdefs.h <<EOF
9593 #define $ac_tr_lib 1
9594 EOF
9595
9596   LIBS="-lgen $LIBS"
9597
9598 else
9599   echo "$ac_t""no" 1>&6
9600 fi
9601
9602
9603 fi
9604
9605
9606 echo $ac_n "checking for select""... $ac_c" 1>&6
9607 echo "configure:9608: checking for select" >&5
9608 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9609   echo $ac_n "(cached) $ac_c" 1>&6
9610 else
9611   cat > conftest.$ac_ext <<EOF
9612 #line 9613 "configure"
9613 #include "confdefs.h"
9614 /* System header to define __stub macros and hopefully few prototypes,
9615     which can conflict with char select(); below.  */
9616 #include <assert.h>
9617 /* Override any gcc2 internal prototype to avoid an error.  */
9618 /* We use char because int might match the return type of a gcc2
9619     builtin and then its argument prototype would still apply.  */
9620 char select();
9621 char (*f)();
9622
9623 int main() {
9624
9625 /* The GNU C library defines this for functions which it implements
9626     to always fail with ENOSYS.  Some functions are actually named
9627     something starting with __ and the normal name is an alias.  */
9628 #if defined (__stub_select) || defined (__stub___select)
9629 choke me
9630 #else
9631 f = select;
9632 #endif
9633
9634 ; return 0; }
9635 EOF
9636 if { (eval echo configure:9637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9637   rm -rf conftest*
9638   eval "ac_cv_func_select=yes"
9639 else
9640   echo "configure: failed program was:" >&5
9641   cat conftest.$ac_ext >&5
9642   rm -rf conftest*
9643   eval "ac_cv_func_select=no"
9644 fi
9645 rm -f conftest*
9646 fi
9647
9648 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9649   echo "$ac_t""yes" 1>&6
9650   :
9651 else
9652   echo "$ac_t""no" 1>&6
9653 { echo "configure: error: select() required." 1>&2; exit 1; }
9654 fi
9655
9656
9657 if test "${ac_cv_header_winsock_h}" != yes; then
9658                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9659 echo "configure:9660: checking types of arguments for select()" >&5
9660  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9661   echo $ac_n "(cached) $ac_c" 1>&6
9662 else
9663    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9664   echo $ac_n "(cached) $ac_c" 1>&6
9665 else
9666     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9667   echo $ac_n "(cached) $ac_c" 1>&6
9668 else
9669      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9670      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9671       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9672        cat > conftest.$ac_ext <<EOF
9673 #line 9674 "configure"
9674 #include "confdefs.h"
9675 #ifdef HAVE_SYS_TYPES_H
9676 #include <sys/types.h>
9677 #endif
9678 #ifdef HAVE_SYS_TIME_H
9679 #include <sys/time.h>
9680 #endif
9681 #ifdef HAVE_SYS_SELECT_H
9682 #include <sys/select.h>
9683 #endif
9684 #ifdef HAVE_SYS_SOCKET_H
9685 #include <sys/socket.h>
9686 #endif
9687 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);
9688 int main() {
9689
9690 ; return 0; }
9691 EOF
9692 if { (eval echo configure:9693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9693   rm -rf conftest*
9694           ac_not_found=no ; break 3
9695 else
9696   echo "configure: failed program was:" >&5
9697   cat conftest.$ac_ext >&5
9698   rm -rf conftest*
9699   ac_not_found=yes
9700 fi
9701 rm -f conftest*
9702       done
9703      done
9704     done
9705    
9706 fi
9707   
9708 fi
9709  
9710 fi
9711  if test "$ac_not_found" = yes; then
9712   ac_cv_func_select_arg1=int 
9713   ac_cv_func_select_arg234='int *' 
9714   ac_cv_func_select_arg5='struct timeval *'
9715  fi
9716  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9717  cat >> confdefs.h <<EOF
9718 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9719 EOF
9720
9721  cat >> confdefs.h <<EOF
9722 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9723 EOF
9724
9725  cat >> confdefs.h <<EOF
9726 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9727 EOF
9728
9729
9730 fi
9731
9732
9733 for ac_hdr in regex.h 
9734 do
9735 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9736 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9737 echo "configure:9738: checking for $ac_hdr" >&5
9738 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9739   echo $ac_n "(cached) $ac_c" 1>&6
9740 else
9741   cat > conftest.$ac_ext <<EOF
9742 #line 9743 "configure"
9743 #include "confdefs.h"
9744 #include <$ac_hdr>
9745 EOF
9746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9747 { (eval echo configure:9748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9749 if test -z "$ac_err"; then
9750   rm -rf conftest*
9751   eval "ac_cv_header_$ac_safe=yes"
9752 else
9753   echo "$ac_err" >&5
9754   echo "configure: failed program was:" >&5
9755   cat conftest.$ac_ext >&5
9756   rm -rf conftest*
9757   eval "ac_cv_header_$ac_safe=no"
9758 fi
9759 rm -f conftest*
9760 fi
9761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9762   echo "$ac_t""yes" 1>&6
9763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9764   cat >> confdefs.h <<EOF
9765 #define $ac_tr_hdr 1
9766 EOF
9767  
9768 else
9769   echo "$ac_t""no" 1>&6
9770 fi
9771 done
9772
9773 if test "$ac_cv_header_regex_h" != yes ; then
9774         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9775 fi
9776
9777 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9778 echo "configure:9779: checking for library containing regfree" >&5
9779 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9780   echo $ac_n "(cached) $ac_c" 1>&6
9781 else
9782   ac_func_search_save_LIBS="$LIBS"
9783 ac_cv_search_regfree="no"
9784 cat > conftest.$ac_ext <<EOF
9785 #line 9786 "configure"
9786 #include "confdefs.h"
9787 /* Override any gcc2 internal prototype to avoid an error.  */
9788 /* We use char because int might match the return type of a gcc2
9789     builtin and then its argument prototype would still apply.  */
9790 char regfree();
9791
9792 int main() {
9793 regfree()
9794 ; return 0; }
9795 EOF
9796 if { (eval echo configure:9797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9797   rm -rf conftest*
9798   ac_cv_search_regfree="none required"
9799 else
9800   echo "configure: failed program was:" >&5
9801   cat conftest.$ac_ext >&5
9802 fi
9803 rm -f conftest*
9804 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9805 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9806 cat > conftest.$ac_ext <<EOF
9807 #line 9808 "configure"
9808 #include "confdefs.h"
9809 /* Override any gcc2 internal prototype to avoid an error.  */
9810 /* We use char because int might match the return type of a gcc2
9811     builtin and then its argument prototype would still apply.  */
9812 char regfree();
9813
9814 int main() {
9815 regfree()
9816 ; return 0; }
9817 EOF
9818 if { (eval echo configure:9819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9819   rm -rf conftest*
9820   ac_cv_search_regfree="-l$ac_lib"
9821 break
9822 else
9823   echo "configure: failed program was:" >&5
9824   cat conftest.$ac_ext >&5
9825 fi
9826 rm -f conftest*
9827 done
9828 LIBS="$ac_func_search_save_LIBS"
9829 fi
9830
9831 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9832 if test "$ac_cv_search_regfree" != "no"; then
9833   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9834   :
9835 else :
9836   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9837 fi
9838
9839
9840 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9841 echo "configure:9842: checking for compatible POSIX regex" >&5
9842 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9843   echo $ac_n "(cached) $ac_c" 1>&6
9844 else
9845   
9846         if test "$cross_compiling" = yes; then
9847   ol_cv_c_posix_regex=cross
9848 else
9849   cat > conftest.$ac_ext <<EOF
9850 #line 9851 "configure"
9851 #include "confdefs.h"
9852
9853 #include <sys/types.h>
9854 #include <regex.h>
9855 static char *pattern, *string;
9856 main()
9857 {
9858         int rc;
9859         regex_t re;
9860
9861         pattern = "^A";
9862
9863         if(regcomp(&re, pattern, 0)) {
9864                 return -1;
9865         }
9866         
9867         string = "ALL MATCH";
9868         
9869         rc = regexec(&re, string, 0, (void*)0, 0);
9870
9871         regfree(&re);
9872
9873         return rc;
9874 }
9875 EOF
9876 if { (eval echo configure:9877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9877 then
9878   ol_cv_c_posix_regex=yes
9879 else
9880   echo "configure: failed program was:" >&5
9881   cat conftest.$ac_ext >&5
9882   rm -fr conftest*
9883   ol_cv_c_posix_regex=no
9884 fi
9885 rm -fr conftest*
9886 fi
9887
9888 fi
9889
9890 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9891
9892 if test "$ol_cv_c_posix_regex" = no ; then
9893         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9894 fi
9895
9896
9897 have_uuid=no
9898 for ac_hdr in sys/uuid.h
9899 do
9900 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9901 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9902 echo "configure:9903: checking for $ac_hdr" >&5
9903 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9904   echo $ac_n "(cached) $ac_c" 1>&6
9905 else
9906   cat > conftest.$ac_ext <<EOF
9907 #line 9908 "configure"
9908 #include "confdefs.h"
9909 #include <$ac_hdr>
9910 EOF
9911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9912 { (eval echo configure:9913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9914 if test -z "$ac_err"; then
9915   rm -rf conftest*
9916   eval "ac_cv_header_$ac_safe=yes"
9917 else
9918   echo "$ac_err" >&5
9919   echo "configure: failed program was:" >&5
9920   cat conftest.$ac_ext >&5
9921   rm -rf conftest*
9922   eval "ac_cv_header_$ac_safe=no"
9923 fi
9924 rm -f conftest*
9925 fi
9926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9927   echo "$ac_t""yes" 1>&6
9928     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9929   cat >> confdefs.h <<EOF
9930 #define $ac_tr_hdr 1
9931 EOF
9932  
9933 else
9934   echo "$ac_t""no" 1>&6
9935 fi
9936 done
9937
9938 if test $ac_cv_header_sys_uuid_h = yes ; then
9939         save_LIBS="$LIBS"
9940         
9941 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9942 echo "configure:9943: checking for library containing uuid_to_str" >&5
9943 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9944   echo $ac_n "(cached) $ac_c" 1>&6
9945 else
9946   ac_func_search_save_LIBS="$LIBS"
9947 ac_cv_search_uuid_to_str="no"
9948 cat > conftest.$ac_ext <<EOF
9949 #line 9950 "configure"
9950 #include "confdefs.h"
9951 /* Override any gcc2 internal prototype to avoid an error.  */
9952 /* We use char because int might match the return type of a gcc2
9953     builtin and then its argument prototype would still apply.  */
9954 char uuid_to_str();
9955
9956 int main() {
9957 uuid_to_str()
9958 ; return 0; }
9959 EOF
9960 if { (eval echo configure:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9961   rm -rf conftest*
9962   ac_cv_search_uuid_to_str="none required"
9963 else
9964   echo "configure: failed program was:" >&5
9965   cat conftest.$ac_ext >&5
9966 fi
9967 rm -f conftest*
9968 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9969 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9970 cat > conftest.$ac_ext <<EOF
9971 #line 9972 "configure"
9972 #include "confdefs.h"
9973 /* Override any gcc2 internal prototype to avoid an error.  */
9974 /* We use char because int might match the return type of a gcc2
9975     builtin and then its argument prototype would still apply.  */
9976 char uuid_to_str();
9977
9978 int main() {
9979 uuid_to_str()
9980 ; return 0; }
9981 EOF
9982 if { (eval echo configure:9983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9983   rm -rf conftest*
9984   ac_cv_search_uuid_to_str="-l$ac_lib"
9985 break
9986 else
9987   echo "configure: failed program was:" >&5
9988   cat conftest.$ac_ext >&5
9989 fi
9990 rm -f conftest*
9991 done
9992 LIBS="$ac_func_search_save_LIBS"
9993 fi
9994
9995 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9996 if test "$ac_cv_search_uuid_to_str" != "no"; then
9997   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9998   have_uuid=yes
9999 else :
10000   :
10001 fi
10002         LIBS="$save_LIBS"
10003
10004         if test have_uuid = yes ; then
10005                 cat >> confdefs.h <<\EOF
10006 #define HAVE_UUID_TO_STR 1
10007 EOF
10008
10009
10010                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10011                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10012         fi
10013 fi
10014
10015 if test $have_uuid = no ; then
10016         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10017 echo "configure:10018: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10018         save_LIBS="$LIBS"
10019         LIBS="$LIBS -lrpcrt4"
10020         cat > conftest.$ac_ext <<EOF
10021 #line 10022 "configure"
10022 #include "confdefs.h"
10023
10024                 int __stdcall UuidCreate(void *);
10025                 int __stdcall UuidToStringA(void *,void **);
10026                 
10027 int main() {
10028
10029                 UuidCreate(0);
10030                 UuidToStringA(0,0);
10031                 
10032 ; return 0; }
10033 EOF
10034 if { (eval echo configure:10035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10035   rm -rf conftest*
10036   need_rpcrt=yes
10037 else
10038   echo "configure: failed program was:" >&5
10039   cat conftest.$ac_ext >&5
10040   rm -rf conftest*
10041   need_rpcrt=no
10042 fi
10043 rm -f conftest*
10044         if test $need_rpcrt = yes; then
10045                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10046         fi
10047         LIBS="$save_LIBS"
10048         echo "$ac_t""$need_rpcrt" 1>&6
10049 fi
10050
10051 ol_link_dnssrv=no
10052 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10053 echo "configure:10054: checking for res_query" >&5
10054 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10055   echo $ac_n "(cached) $ac_c" 1>&6
10056 else
10057   cat > conftest.$ac_ext <<EOF
10058 #line 10059 "configure"
10059 #include "confdefs.h"
10060 /* System header to define __stub macros and hopefully few prototypes,
10061     which can conflict with char res_query(); below.  */
10062 #include <assert.h>
10063 /* Override any gcc2 internal prototype to avoid an error.  */
10064 /* We use char because int might match the return type of a gcc2
10065     builtin and then its argument prototype would still apply.  */
10066 char res_query();
10067 char (*f)();
10068
10069 int main() {
10070
10071 /* The GNU C library defines this for functions which it implements
10072     to always fail with ENOSYS.  Some functions are actually named
10073     something starting with __ and the normal name is an alias.  */
10074 #if defined (__stub_res_query) || defined (__stub___res_query)
10075 choke me
10076 #else
10077 f = res_query;
10078 #endif
10079
10080 ; return 0; }
10081 EOF
10082 if { (eval echo configure:10083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10083   rm -rf conftest*
10084   eval "ac_cv_func_res_query=yes"
10085 else
10086   echo "configure: failed program was:" >&5
10087   cat conftest.$ac_ext >&5
10088   rm -rf conftest*
10089   eval "ac_cv_func_res_query=no"
10090 fi
10091 rm -f conftest*
10092 fi
10093
10094 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10095   echo "$ac_t""yes" 1>&6
10096   :
10097 else
10098   echo "$ac_t""no" 1>&6
10099 fi
10100
10101 if test $ac_cv_func_res_query = no ; then 
10102         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10103 echo "configure:10104: checking for __res_query" >&5
10104 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10105   echo $ac_n "(cached) $ac_c" 1>&6
10106 else
10107   cat > conftest.$ac_ext <<EOF
10108 #line 10109 "configure"
10109 #include "confdefs.h"
10110 /* System header to define __stub macros and hopefully few prototypes,
10111     which can conflict with char __res_query(); below.  */
10112 #include <assert.h>
10113 /* Override any gcc2 internal prototype to avoid an error.  */
10114 /* We use char because int might match the return type of a gcc2
10115     builtin and then its argument prototype would still apply.  */
10116 char __res_query();
10117 char (*f)();
10118
10119 int main() {
10120
10121 /* The GNU C library defines this for functions which it implements
10122     to always fail with ENOSYS.  Some functions are actually named
10123     something starting with __ and the normal name is an alias.  */
10124 #if defined (__stub___res_query) || defined (__stub_____res_query)
10125 choke me
10126 #else
10127 f = __res_query;
10128 #endif
10129
10130 ; return 0; }
10131 EOF
10132 if { (eval echo configure:10133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10133   rm -rf conftest*
10134   eval "ac_cv_func___res_query=yes"
10135 else
10136   echo "configure: failed program was:" >&5
10137   cat conftest.$ac_ext >&5
10138   rm -rf conftest*
10139   eval "ac_cv_func___res_query=no"
10140 fi
10141 rm -f conftest*
10142 fi
10143
10144 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10145   echo "$ac_t""yes" 1>&6
10146   :
10147 else
10148   echo "$ac_t""no" 1>&6
10149 fi
10150
10151         ac_cv_func_res_query=$ac_cv_func___res_query
10152 fi
10153
10154 if test $ac_cv_func_res_query = no ; then 
10155         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10156 echo "configure:10157: checking for res_query in -lbind" >&5
10157 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10158 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10159   echo $ac_n "(cached) $ac_c" 1>&6
10160 else
10161   ac_save_LIBS="$LIBS"
10162 LIBS="-lbind  $LIBS"
10163 cat > conftest.$ac_ext <<EOF
10164 #line 10165 "configure"
10165 #include "confdefs.h"
10166 /* Override any gcc2 internal prototype to avoid an error.  */
10167 /* We use char because int might match the return type of a gcc2
10168     builtin and then its argument prototype would still apply.  */
10169 char res_query();
10170
10171 int main() {
10172 res_query()
10173 ; return 0; }
10174 EOF
10175 if { (eval echo configure:10176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10176   rm -rf conftest*
10177   eval "ac_cv_lib_$ac_lib_var=yes"
10178 else
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -rf conftest*
10182   eval "ac_cv_lib_$ac_lib_var=no"
10183 fi
10184 rm -f conftest*
10185 LIBS="$ac_save_LIBS"
10186
10187 fi
10188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10189   echo "$ac_t""yes" 1>&6
10190     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10191     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10192   cat >> confdefs.h <<EOF
10193 #define $ac_tr_lib 1
10194 EOF
10195
10196   LIBS="-lbind $LIBS"
10197
10198 else
10199   echo "$ac_t""no" 1>&6
10200 fi
10201
10202         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10203 fi
10204
10205 if test $ac_cv_func_res_query = no ; then 
10206         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10207 echo "configure:10208: checking for __res_query in -lbind" >&5
10208 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10209 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10210   echo $ac_n "(cached) $ac_c" 1>&6
10211 else
10212   ac_save_LIBS="$LIBS"
10213 LIBS="-lbind  $LIBS"
10214 cat > conftest.$ac_ext <<EOF
10215 #line 10216 "configure"
10216 #include "confdefs.h"
10217 /* Override any gcc2 internal prototype to avoid an error.  */
10218 /* We use char because int might match the return type of a gcc2
10219     builtin and then its argument prototype would still apply.  */
10220 char __res_query();
10221
10222 int main() {
10223 __res_query()
10224 ; return 0; }
10225 EOF
10226 if { (eval echo configure:10227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10227   rm -rf conftest*
10228   eval "ac_cv_lib_$ac_lib_var=yes"
10229 else
10230   echo "configure: failed program was:" >&5
10231   cat conftest.$ac_ext >&5
10232   rm -rf conftest*
10233   eval "ac_cv_lib_$ac_lib_var=no"
10234 fi
10235 rm -f conftest*
10236 LIBS="$ac_save_LIBS"
10237
10238 fi
10239 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10240   echo "$ac_t""yes" 1>&6
10241     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10242     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10243   cat >> confdefs.h <<EOF
10244 #define $ac_tr_lib 1
10245 EOF
10246
10247   LIBS="-lbind $LIBS"
10248
10249 else
10250   echo "$ac_t""no" 1>&6
10251 fi
10252
10253         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10254 fi
10255
10256 if test $ac_cv_func_res_query = no ; then 
10257         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10258 echo "configure:10259: checking for res_query in -lresolv" >&5
10259 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10260 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10261   echo $ac_n "(cached) $ac_c" 1>&6
10262 else
10263   ac_save_LIBS="$LIBS"
10264 LIBS="-lresolv  $LIBS"
10265 cat > conftest.$ac_ext <<EOF
10266 #line 10267 "configure"
10267 #include "confdefs.h"
10268 /* Override any gcc2 internal prototype to avoid an error.  */
10269 /* We use char because int might match the return type of a gcc2
10270     builtin and then its argument prototype would still apply.  */
10271 char res_query();
10272
10273 int main() {
10274 res_query()
10275 ; return 0; }
10276 EOF
10277 if { (eval echo configure:10278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10278   rm -rf conftest*
10279   eval "ac_cv_lib_$ac_lib_var=yes"
10280 else
10281   echo "configure: failed program was:" >&5
10282   cat conftest.$ac_ext >&5
10283   rm -rf conftest*
10284   eval "ac_cv_lib_$ac_lib_var=no"
10285 fi
10286 rm -f conftest*
10287 LIBS="$ac_save_LIBS"
10288
10289 fi
10290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10291   echo "$ac_t""yes" 1>&6
10292     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10293     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10294   cat >> confdefs.h <<EOF
10295 #define $ac_tr_lib 1
10296 EOF
10297
10298   LIBS="-lresolv $LIBS"
10299
10300 else
10301   echo "$ac_t""no" 1>&6
10302 fi
10303
10304         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10305 fi
10306
10307 if test $ac_cv_func_res_query = no ; then 
10308         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10309 echo "configure:10310: checking for __res_query in -lresolv" >&5
10310 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10311 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10312   echo $ac_n "(cached) $ac_c" 1>&6
10313 else
10314   ac_save_LIBS="$LIBS"
10315 LIBS="-lresolv  $LIBS"
10316 cat > conftest.$ac_ext <<EOF
10317 #line 10318 "configure"
10318 #include "confdefs.h"
10319 /* Override any gcc2 internal prototype to avoid an error.  */
10320 /* We use char because int might match the return type of a gcc2
10321     builtin and then its argument prototype would still apply.  */
10322 char __res_query();
10323
10324 int main() {
10325 __res_query()
10326 ; return 0; }
10327 EOF
10328 if { (eval echo configure:10329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10329   rm -rf conftest*
10330   eval "ac_cv_lib_$ac_lib_var=yes"
10331 else
10332   echo "configure: failed program was:" >&5
10333   cat conftest.$ac_ext >&5
10334   rm -rf conftest*
10335   eval "ac_cv_lib_$ac_lib_var=no"
10336 fi
10337 rm -f conftest*
10338 LIBS="$ac_save_LIBS"
10339
10340 fi
10341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10342   echo "$ac_t""yes" 1>&6
10343     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10344     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10345   cat >> confdefs.h <<EOF
10346 #define $ac_tr_lib 1
10347 EOF
10348
10349   LIBS="-lresolv $LIBS"
10350
10351 else
10352   echo "$ac_t""no" 1>&6
10353 fi
10354
10355         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10356 fi
10357
10358 if test "$ac_cv_func_res_query" = yes ; then
10359         cat >> confdefs.h <<\EOF
10360 #define HAVE_RES_QUERY 1
10361 EOF
10362
10363
10364         if test $ol_enable_dnssrv != no ; then
10365                 ol_link_dnssrv=yes
10366         fi
10367 fi
10368
10369 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10370         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10371 fi
10372
10373 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10374 do
10375 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10376 echo "configure:10377: checking for $ac_func" >&5
10377 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10378   echo $ac_n "(cached) $ac_c" 1>&6
10379 else
10380   cat > conftest.$ac_ext <<EOF
10381 #line 10382 "configure"
10382 #include "confdefs.h"
10383 /* System header to define __stub macros and hopefully few prototypes,
10384     which can conflict with char $ac_func(); below.  */
10385 #include <assert.h>
10386 /* Override any gcc2 internal prototype to avoid an error.  */
10387 /* We use char because int might match the return type of a gcc2
10388     builtin and then its argument prototype would still apply.  */
10389 char $ac_func();
10390 char (*f)();
10391
10392 int main() {
10393
10394 /* The GNU C library defines this for functions which it implements
10395     to always fail with ENOSYS.  Some functions are actually named
10396     something starting with __ and the normal name is an alias.  */
10397 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10398 choke me
10399 #else
10400 f = $ac_func;
10401 #endif
10402
10403 ; return 0; }
10404 EOF
10405 if { (eval echo configure:10406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10406   rm -rf conftest*
10407   eval "ac_cv_func_$ac_func=yes"
10408 else
10409   echo "configure: failed program was:" >&5
10410   cat conftest.$ac_ext >&5
10411   rm -rf conftest*
10412   eval "ac_cv_func_$ac_func=no"
10413 fi
10414 rm -f conftest*
10415 fi
10416
10417 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10418   echo "$ac_t""yes" 1>&6
10419     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10420   cat >> confdefs.h <<EOF
10421 #define $ac_tr_func 1
10422 EOF
10423  
10424 else
10425   echo "$ac_t""no" 1>&6
10426 fi
10427 done
10428
10429
10430 ol_link_ipv6=no
10431 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10432         if test $ol_enable_ipv6 = yes ; then
10433                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10434         fi
10435 elif test $ol_enable_ipv6 != no ; then
10436         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10437 echo "configure:10438: checking INET6_ADDRSTRLEN" >&5
10438 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10439   echo $ac_n "(cached) $ac_c" 1>&6
10440 else
10441   
10442                 cat > conftest.$ac_ext <<EOF
10443 #line 10444 "configure"
10444 #include "confdefs.h"
10445
10446 #                       include <netinet/in.h>
10447 #                       ifdef INET6_ADDRSTRLEN
10448                                 __has_inet6_addrstrlen__;
10449 #                       endif
10450                 
10451 EOF
10452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10453   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10454   rm -rf conftest*
10455   ol_cv_inet6_addrstrlen=yes
10456 else
10457   rm -rf conftest*
10458   ol_cv_inet6_addrstrlen=no
10459 fi
10460 rm -f conftest*
10461
10462 fi
10463
10464 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10465
10466
10467         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10468 echo "configure:10469: checking struct sockaddr_storage" >&5
10469 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10470   echo $ac_n "(cached) $ac_c" 1>&6
10471 else
10472   
10473                 cat > conftest.$ac_ext <<EOF
10474 #line 10475 "configure"
10475 #include "confdefs.h"
10476
10477 #include <sys/types.h>
10478 #include <sys/socket.h>
10479
10480 int main() {
10481
10482                         struct sockaddr_storage ss;
10483
10484 ; return 0; }
10485 EOF
10486 if { (eval echo configure:10487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10487   rm -rf conftest*
10488   ol_cv_struct_sockaddr_storage=yes
10489 else
10490   echo "configure: failed program was:" >&5
10491   cat conftest.$ac_ext >&5
10492   rm -rf conftest*
10493   ol_cv_struct_sockaddr_storage=no
10494 fi
10495 rm -f conftest*
10496 fi
10497
10498 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10499
10500         if test $ol_cv_inet6_addrstrlen = yes \
10501                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10502                 ol_link_ipv6=yes
10503         elif test $ol_enable_ipv6 = yes \
10504                         -a $ol_cv_inet6_addrstrlen = no ; then
10505                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10506         elif test $ol_enable_ipv6 = yes \
10507                         -a $ol_cv_struct_sockaddr_storage = no ; then
10508                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10509         fi
10510 fi
10511
10512 if test $ol_enable_local != no ; then
10513         for ac_hdr in sys/un.h 
10514 do
10515 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10516 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10517 echo "configure:10518: checking for $ac_hdr" >&5
10518 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10519   echo $ac_n "(cached) $ac_c" 1>&6
10520 else
10521   cat > conftest.$ac_ext <<EOF
10522 #line 10523 "configure"
10523 #include "confdefs.h"
10524 #include <$ac_hdr>
10525 EOF
10526 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10527 { (eval echo configure:10528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10528 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10529 if test -z "$ac_err"; then
10530   rm -rf conftest*
10531   eval "ac_cv_header_$ac_safe=yes"
10532 else
10533   echo "$ac_err" >&5
10534   echo "configure: failed program was:" >&5
10535   cat conftest.$ac_ext >&5
10536   rm -rf conftest*
10537   eval "ac_cv_header_$ac_safe=no"
10538 fi
10539 rm -f conftest*
10540 fi
10541 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10542   echo "$ac_t""yes" 1>&6
10543     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10544   cat >> confdefs.h <<EOF
10545 #define $ac_tr_hdr 1
10546 EOF
10547  
10548 else
10549   echo "$ac_t""no" 1>&6
10550 fi
10551 done
10552
10553
10554         if test $ol_enable_local = auto ; then
10555                 ol_enable_local=$ac_cv_header_sys_un_h
10556         elif test $ac_cv_header_sys_un_h = no ; then
10557                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10558         fi
10559 fi
10560
10561 ol_link_kbind=no
10562 ol_link_krb5=no
10563 ol_link_krb4=no
10564
10565 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10566         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10567         -o $ol_with_kerberos = k425 ; then
10568
10569         for ac_hdr in krb5.h
10570 do
10571 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10572 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10573 echo "configure:10574: checking for $ac_hdr" >&5
10574 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10575   echo $ac_n "(cached) $ac_c" 1>&6
10576 else
10577   cat > conftest.$ac_ext <<EOF
10578 #line 10579 "configure"
10579 #include "confdefs.h"
10580 #include <$ac_hdr>
10581 EOF
10582 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10583 { (eval echo configure:10584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10584 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10585 if test -z "$ac_err"; then
10586   rm -rf conftest*
10587   eval "ac_cv_header_$ac_safe=yes"
10588 else
10589   echo "$ac_err" >&5
10590   echo "configure: failed program was:" >&5
10591   cat conftest.$ac_ext >&5
10592   rm -rf conftest*
10593   eval "ac_cv_header_$ac_safe=no"
10594 fi
10595 rm -f conftest*
10596 fi
10597 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10598   echo "$ac_t""yes" 1>&6
10599     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10600   cat >> confdefs.h <<EOF
10601 #define $ac_tr_hdr 1
10602 EOF
10603  
10604 else
10605   echo "$ac_t""no" 1>&6
10606 fi
10607 done
10608
10609
10610         if test $ac_cv_header_krb5_h = yes ; then
10611                                 for ac_hdr in heim_err.h
10612 do
10613 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10614 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10615 echo "configure:10616: checking for $ac_hdr" >&5
10616 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10617   echo $ac_n "(cached) $ac_c" 1>&6
10618 else
10619   cat > conftest.$ac_ext <<EOF
10620 #line 10621 "configure"
10621 #include "confdefs.h"
10622 #include <$ac_hdr>
10623 EOF
10624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10625 { (eval echo configure:10626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10627 if test -z "$ac_err"; then
10628   rm -rf conftest*
10629   eval "ac_cv_header_$ac_safe=yes"
10630 else
10631   echo "$ac_err" >&5
10632   echo "configure: failed program was:" >&5
10633   cat conftest.$ac_ext >&5
10634   rm -rf conftest*
10635   eval "ac_cv_header_$ac_safe=no"
10636 fi
10637 rm -f conftest*
10638 fi
10639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10640   echo "$ac_t""yes" 1>&6
10641     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10642   cat >> confdefs.h <<EOF
10643 #define $ac_tr_hdr 1
10644 EOF
10645  
10646 else
10647   echo "$ac_t""no" 1>&6
10648 fi
10649 done
10650
10651                 if test $ac_cv_header_heim_err_h = yes ; then
10652                         krb5_impl=heimdal
10653                 else
10654                         krb5_impl=mit
10655                 fi
10656
10657                 if test $krb5_impl = mit; then
10658                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10659 echo "configure:10660: checking for main in -lk5crypto" >&5
10660 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10661 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10662   echo $ac_n "(cached) $ac_c" 1>&6
10663 else
10664   ac_save_LIBS="$LIBS"
10665 LIBS="-lk5crypto  $LIBS"
10666 cat > conftest.$ac_ext <<EOF
10667 #line 10668 "configure"
10668 #include "confdefs.h"
10669
10670 int main() {
10671 main()
10672 ; return 0; }
10673 EOF
10674 if { (eval echo configure:10675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10675   rm -rf conftest*
10676   eval "ac_cv_lib_$ac_lib_var=yes"
10677 else
10678   echo "configure: failed program was:" >&5
10679   cat conftest.$ac_ext >&5
10680   rm -rf conftest*
10681   eval "ac_cv_lib_$ac_lib_var=no"
10682 fi
10683 rm -f conftest*
10684 LIBS="$ac_save_LIBS"
10685
10686 fi
10687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10688   echo "$ac_t""yes" 1>&6
10689   krb5crypto=k5crypto
10690 else
10691   echo "$ac_t""no" 1>&6
10692 krb5crypto=crypto
10693 fi
10694
10695
10696                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10697 echo "configure:10698: checking for main in -lkrb5" >&5
10698 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10699 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10700   echo $ac_n "(cached) $ac_c" 1>&6
10701 else
10702   ac_save_LIBS="$LIBS"
10703 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10704 cat > conftest.$ac_ext <<EOF
10705 #line 10706 "configure"
10706 #include "confdefs.h"
10707
10708 int main() {
10709 main()
10710 ; return 0; }
10711 EOF
10712 if { (eval echo configure:10713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10713   rm -rf conftest*
10714   eval "ac_cv_lib_$ac_lib_var=yes"
10715 else
10716   echo "configure: failed program was:" >&5
10717   cat conftest.$ac_ext >&5
10718   rm -rf conftest*
10719   eval "ac_cv_lib_$ac_lib_var=no"
10720 fi
10721 rm -f conftest*
10722 LIBS="$ac_save_LIBS"
10723
10724 fi
10725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10726   echo "$ac_t""yes" 1>&6
10727   have_krb5=yes
10728                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10729 else
10730   echo "$ac_t""no" 1>&6
10731 have_krb5=no
10732 fi
10733
10734
10735                 elif test $krb5_impl = heimdal; then
10736                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10737 echo "configure:10738: checking for main in -ldes" >&5
10738 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10739 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10740   echo $ac_n "(cached) $ac_c" 1>&6
10741 else
10742   ac_save_LIBS="$LIBS"
10743 LIBS="-ldes  $LIBS"
10744 cat > conftest.$ac_ext <<EOF
10745 #line 10746 "configure"
10746 #include "confdefs.h"
10747
10748 int main() {
10749 main()
10750 ; return 0; }
10751 EOF
10752 if { (eval echo configure:10753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10753   rm -rf conftest*
10754   eval "ac_cv_lib_$ac_lib_var=yes"
10755 else
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -rf conftest*
10759   eval "ac_cv_lib_$ac_lib_var=no"
10760 fi
10761 rm -f conftest*
10762 LIBS="$ac_save_LIBS"
10763
10764 fi
10765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10766   echo "$ac_t""yes" 1>&6
10767   krb5crypto=des
10768 else
10769   echo "$ac_t""no" 1>&6
10770 krb5crypto=crypto
10771 fi
10772
10773
10774                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10775 echo "configure:10776: checking for main in -lkrb5" >&5
10776 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10777 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10778   echo $ac_n "(cached) $ac_c" 1>&6
10779 else
10780   ac_save_LIBS="$LIBS"
10781 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10782 cat > conftest.$ac_ext <<EOF
10783 #line 10784 "configure"
10784 #include "confdefs.h"
10785
10786 int main() {
10787 main()
10788 ; return 0; }
10789 EOF
10790 if { (eval echo configure:10791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10791   rm -rf conftest*
10792   eval "ac_cv_lib_$ac_lib_var=yes"
10793 else
10794   echo "configure: failed program was:" >&5
10795   cat conftest.$ac_ext >&5
10796   rm -rf conftest*
10797   eval "ac_cv_lib_$ac_lib_var=no"
10798 fi
10799 rm -f conftest*
10800 LIBS="$ac_save_LIBS"
10801
10802 fi
10803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10804   echo "$ac_t""yes" 1>&6
10805   have_krb5=yes
10806                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10807 else
10808   echo "$ac_t""no" 1>&6
10809 have_krb5=no
10810 fi
10811
10812
10813                         cat >> confdefs.h <<\EOF
10814 #define HAVE_HEIMDAL_KERBEROS 1
10815 EOF
10816
10817
10818                 else
10819                         have_krb5=no
10820                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10821                 fi
10822
10823                 if test $have_krb5 = yes ; then
10824                         ol_link_krb5=yes
10825
10826                         cat >> confdefs.h <<\EOF
10827 #define HAVE_KRB5 1
10828 EOF
10829
10830
10831                         if test $ol_with_kerberos = k5only ; then
10832                                 ol_with_kerberos=found
10833                         fi
10834
10835                 elif test $ol_with_kerberos != auto ; then
10836                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10837                 fi
10838
10839         fi
10840 fi
10841
10842 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10843         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10844
10845         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10846 do
10847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10849 echo "configure:10850: checking for $ac_hdr" >&5
10850 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10851   echo $ac_n "(cached) $ac_c" 1>&6
10852 else
10853   cat > conftest.$ac_ext <<EOF
10854 #line 10855 "configure"
10855 #include "confdefs.h"
10856 #include <$ac_hdr>
10857 EOF
10858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10859 { (eval echo configure:10860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10861 if test -z "$ac_err"; then
10862   rm -rf conftest*
10863   eval "ac_cv_header_$ac_safe=yes"
10864 else
10865   echo "$ac_err" >&5
10866   echo "configure: failed program was:" >&5
10867   cat conftest.$ac_ext >&5
10868   rm -rf conftest*
10869   eval "ac_cv_header_$ac_safe=no"
10870 fi
10871 rm -f conftest*
10872 fi
10873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10874   echo "$ac_t""yes" 1>&6
10875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10876   cat >> confdefs.h <<EOF
10877 #define $ac_tr_hdr 1
10878 EOF
10879  
10880 else
10881   echo "$ac_t""no" 1>&6
10882 fi
10883 done
10884
10885
10886         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10887                 if test $krb5_impl = mit; then
10888                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10889 echo "configure:10890: checking for main in -lkrb4" >&5
10890 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10891 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10892   echo $ac_n "(cached) $ac_c" 1>&6
10893 else
10894   ac_save_LIBS="$LIBS"
10895 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10896 cat > conftest.$ac_ext <<EOF
10897 #line 10898 "configure"
10898 #include "confdefs.h"
10899
10900 int main() {
10901 main()
10902 ; return 0; }
10903 EOF
10904 if { (eval echo configure:10905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10905   rm -rf conftest*
10906   eval "ac_cv_lib_$ac_lib_var=yes"
10907 else
10908   echo "configure: failed program was:" >&5
10909   cat conftest.$ac_ext >&5
10910   rm -rf conftest*
10911   eval "ac_cv_lib_$ac_lib_var=no"
10912 fi
10913 rm -f conftest*
10914 LIBS="$ac_save_LIBS"
10915
10916 fi
10917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10918   echo "$ac_t""yes" 1>&6
10919   have_k425=yes
10920                                 KRB4_LIBS="-lkrb4 -ldes425"
10921 else
10922   echo "$ac_t""no" 1>&6
10923 have_k425=no
10924 fi
10925
10926
10927                 elif test $krb5_impl = heimdal; then
10928                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10929 echo "configure:10930: checking for main in -lkrb4" >&5
10930 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10931 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10932   echo $ac_n "(cached) $ac_c" 1>&6
10933 else
10934   ac_save_LIBS="$LIBS"
10935 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10936 cat > conftest.$ac_ext <<EOF
10937 #line 10938 "configure"
10938 #include "confdefs.h"
10939
10940 int main() {
10941 main()
10942 ; return 0; }
10943 EOF
10944 if { (eval echo configure:10945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10945   rm -rf conftest*
10946   eval "ac_cv_lib_$ac_lib_var=yes"
10947 else
10948   echo "configure: failed program was:" >&5
10949   cat conftest.$ac_ext >&5
10950   rm -rf conftest*
10951   eval "ac_cv_lib_$ac_lib_var=no"
10952 fi
10953 rm -f conftest*
10954 LIBS="$ac_save_LIBS"
10955
10956 fi
10957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10958   echo "$ac_t""yes" 1>&6
10959   have_k425=yes
10960                                 KRB4_LIBS="-lkrb4"
10961 else
10962   echo "$ac_t""no" 1>&6
10963 have_k425=no
10964 fi
10965
10966
10967                 else
10968                         have_425=no
10969                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10970                 fi
10971
10972                 if test $have_k425 = yes ; then
10973                         ol_with_kerberos=found
10974                         ol_link_krb4=yes
10975
10976                         cat >> confdefs.h <<\EOF
10977 #define HAVE_KRB425 1
10978 EOF
10979
10980                         cat >> confdefs.h <<\EOF
10981 #define HAVE_KRB4 1
10982 EOF
10983
10984
10985                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10986 echo "configure:10987: checking for des_debug in Kerberos libraries" >&5
10987 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10988   echo $ac_n "(cached) $ac_c" 1>&6
10989 else
10990   
10991                                                                 save_LIBS="$LIBS"
10992                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10993                                 cat > conftest.$ac_ext <<EOF
10994 #line 10995 "configure"
10995 #include "confdefs.h"
10996
10997 #include <kerberosIV/krb.h>
10998 #include <kerberosIV/des.h>
10999 extern int des_debug;
11000
11001 int main() {
11002
11003 des_debug = 1;
11004
11005 ; return 0; }
11006 EOF
11007 if { (eval echo configure:11008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11008   rm -rf conftest*
11009   ol_cv_var_des_debug=yes
11010 else
11011   echo "configure: failed program was:" >&5
11012   cat conftest.$ac_ext >&5
11013   rm -rf conftest*
11014   ol_cv_var_des_debug=no
11015 fi
11016 rm -f conftest*
11017                                                                 LIBS="$save_LIBS"
11018                         
11019 fi
11020
11021 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11022
11023                         if test $ol_cv_var_des_debug = yes ; then
11024                                 cat >> confdefs.h <<\EOF
11025 #define HAVE_DES_DEBUG 1
11026 EOF
11027
11028                         fi
11029
11030                         LIBS="$save_LIBS"
11031                 fi
11032         fi
11033 fi
11034
11035 if test $ol_link_krb5 = yes ; then
11036         ol_with_kerberos=found
11037 fi
11038
11039 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11040         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11041
11042         for ac_hdr in krb.h des.h krb-archaeology.h 
11043 do
11044 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11045 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11046 echo "configure:11047: checking for $ac_hdr" >&5
11047 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11048   echo $ac_n "(cached) $ac_c" 1>&6
11049 else
11050   cat > conftest.$ac_ext <<EOF
11051 #line 11052 "configure"
11052 #include "confdefs.h"
11053 #include <$ac_hdr>
11054 EOF
11055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11056 { (eval echo configure:11057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11057 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11058 if test -z "$ac_err"; then
11059   rm -rf conftest*
11060   eval "ac_cv_header_$ac_safe=yes"
11061 else
11062   echo "$ac_err" >&5
11063   echo "configure: failed program was:" >&5
11064   cat conftest.$ac_ext >&5
11065   rm -rf conftest*
11066   eval "ac_cv_header_$ac_safe=no"
11067 fi
11068 rm -f conftest*
11069 fi
11070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11071   echo "$ac_t""yes" 1>&6
11072     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11073   cat >> confdefs.h <<EOF
11074 #define $ac_tr_hdr 1
11075 EOF
11076  
11077 else
11078   echo "$ac_t""no" 1>&6
11079 fi
11080 done
11081
11082
11083         if test $ac_cv_header_krb_h = yes ; then
11084                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11085 echo "configure:11086: checking for main in -lkrb" >&5
11086 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11087 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11088   echo $ac_n "(cached) $ac_c" 1>&6
11089 else
11090   ac_save_LIBS="$LIBS"
11091 LIBS="-lkrb -ldes $LIBS"
11092 cat > conftest.$ac_ext <<EOF
11093 #line 11094 "configure"
11094 #include "confdefs.h"
11095
11096 int main() {
11097 main()
11098 ; return 0; }
11099 EOF
11100 if { (eval echo configure:11101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11101   rm -rf conftest*
11102   eval "ac_cv_lib_$ac_lib_var=yes"
11103 else
11104   echo "configure: failed program was:" >&5
11105   cat conftest.$ac_ext >&5
11106   rm -rf conftest*
11107   eval "ac_cv_lib_$ac_lib_var=no"
11108 fi
11109 rm -f conftest*
11110 LIBS="$ac_save_LIBS"
11111
11112 fi
11113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11114   echo "$ac_t""yes" 1>&6
11115   have_k4=yes
11116 else
11117   echo "$ac_t""no" 1>&6
11118 have_k4=no
11119 fi
11120
11121
11122                 if test $have_k4 = yes ; then
11123                         ol_with_kerberos=found
11124                         ol_link_krb4=yes
11125
11126                         cat >> confdefs.h <<\EOF
11127 #define HAVE_KRB4 1
11128 EOF
11129
11130
11131                         KRB4_LIBS="-lkrb -ldes"
11132
11133                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11134                                 cat >> confdefs.h <<\EOF
11135 #define HAVE_KTH_KERBEROS 1
11136 EOF
11137
11138                         fi
11139                 fi
11140         fi
11141 fi
11142
11143 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11144         ol_link_kbind=yes
11145
11146 elif test $ol_enable_kbind = yes ; then
11147         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11148 fi
11149
11150 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11151         cat >> confdefs.h <<\EOF
11152 #define HAVE_KERBEROS 1
11153 EOF
11154
11155
11156 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11157         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11158 fi
11159
11160 ol_link_tls=no
11161 if test $ol_with_tls != no ; then
11162         for ac_hdr in openssl/ssl.h ssl.h
11163 do
11164 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11165 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11166 echo "configure:11167: checking for $ac_hdr" >&5
11167 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11168   echo $ac_n "(cached) $ac_c" 1>&6
11169 else
11170   cat > conftest.$ac_ext <<EOF
11171 #line 11172 "configure"
11172 #include "confdefs.h"
11173 #include <$ac_hdr>
11174 EOF
11175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11176 { (eval echo configure:11177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11178 if test -z "$ac_err"; then
11179   rm -rf conftest*
11180   eval "ac_cv_header_$ac_safe=yes"
11181 else
11182   echo "$ac_err" >&5
11183   echo "configure: failed program was:" >&5
11184   cat conftest.$ac_ext >&5
11185   rm -rf conftest*
11186   eval "ac_cv_header_$ac_safe=no"
11187 fi
11188 rm -f conftest*
11189 fi
11190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11191   echo "$ac_t""yes" 1>&6
11192     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11193   cat >> confdefs.h <<EOF
11194 #define $ac_tr_hdr 1
11195 EOF
11196  
11197 else
11198   echo "$ac_t""no" 1>&6
11199 fi
11200 done
11201
11202         
11203         if test $ac_cv_header_openssl_ssl_h = yes \
11204                 -o $ac_cv_header_ssl_h = yes ; then
11205                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11206 echo "configure:11207: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11207 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11208 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11209   echo $ac_n "(cached) $ac_c" 1>&6
11210 else
11211   ac_save_LIBS="$LIBS"
11212 LIBS="-lssl -lcrypto $LIBS"
11213 cat > conftest.$ac_ext <<EOF
11214 #line 11215 "configure"
11215 #include "confdefs.h"
11216 /* Override any gcc2 internal prototype to avoid an error.  */
11217 /* We use char because int might match the return type of a gcc2
11218     builtin and then its argument prototype would still apply.  */
11219 char SSLeay_add_ssl_algorithms();
11220
11221 int main() {
11222 SSLeay_add_ssl_algorithms()
11223 ; return 0; }
11224 EOF
11225 if { (eval echo configure:11226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11226   rm -rf conftest*
11227   eval "ac_cv_lib_$ac_lib_var=yes"
11228 else
11229   echo "configure: failed program was:" >&5
11230   cat conftest.$ac_ext >&5
11231   rm -rf conftest*
11232   eval "ac_cv_lib_$ac_lib_var=no"
11233 fi
11234 rm -f conftest*
11235 LIBS="$ac_save_LIBS"
11236
11237 fi
11238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11239   echo "$ac_t""yes" 1>&6
11240   have_ssleay=yes
11241                         need_rsaref=no
11242 else
11243   echo "$ac_t""no" 1>&6
11244 have_ssleay=no
11245 fi
11246
11247                         
11248                 if test $have_ssleay = no ; then
11249                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11250 echo "configure:11251: checking for SSL_library_init in -lssl" >&5
11251 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11253   echo $ac_n "(cached) $ac_c" 1>&6
11254 else
11255   ac_save_LIBS="$LIBS"
11256 LIBS="-lssl -lcrypto $LIBS"
11257 cat > conftest.$ac_ext <<EOF
11258 #line 11259 "configure"
11259 #include "confdefs.h"
11260 /* Override any gcc2 internal prototype to avoid an error.  */
11261 /* We use char because int might match the return type of a gcc2
11262     builtin and then its argument prototype would still apply.  */
11263 char SSL_library_init();
11264
11265 int main() {
11266 SSL_library_init()
11267 ; return 0; }
11268 EOF
11269 if { (eval echo configure:11270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11270   rm -rf conftest*
11271   eval "ac_cv_lib_$ac_lib_var=yes"
11272 else
11273   echo "configure: failed program was:" >&5
11274   cat conftest.$ac_ext >&5
11275   rm -rf conftest*
11276   eval "ac_cv_lib_$ac_lib_var=no"
11277 fi
11278 rm -f conftest*
11279 LIBS="$ac_save_LIBS"
11280
11281 fi
11282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11283   echo "$ac_t""yes" 1>&6
11284   have_ssleay=yes
11285                                 need_rsaref=no
11286 else
11287   echo "$ac_t""no" 1>&6
11288 have_ssleay=no
11289 fi
11290
11291                 fi
11292
11293                 if test $have_ssleay = no ; then
11294                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11295 echo "configure:11296: checking for ssl3_accept in -lssl" >&5
11296 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11297 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11298   echo $ac_n "(cached) $ac_c" 1>&6
11299 else
11300   ac_save_LIBS="$LIBS"
11301 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11302 cat > conftest.$ac_ext <<EOF
11303 #line 11304 "configure"
11304 #include "confdefs.h"
11305 /* Override any gcc2 internal prototype to avoid an error.  */
11306 /* We use char because int might match the return type of a gcc2
11307     builtin and then its argument prototype would still apply.  */
11308 char ssl3_accept();
11309
11310 int main() {
11311 ssl3_accept()
11312 ; return 0; }
11313 EOF
11314 if { (eval echo configure:11315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11315   rm -rf conftest*
11316   eval "ac_cv_lib_$ac_lib_var=yes"
11317 else
11318   echo "configure: failed program was:" >&5
11319   cat conftest.$ac_ext >&5
11320   rm -rf conftest*
11321   eval "ac_cv_lib_$ac_lib_var=no"
11322 fi
11323 rm -f conftest*
11324 LIBS="$ac_save_LIBS"
11325
11326 fi
11327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11328   echo "$ac_t""yes" 1>&6
11329   have_ssleay=yes
11330                                 need_rsaref=yes
11331 else
11332   echo "$ac_t""no" 1>&6
11333 have_ssleay=no
11334 fi
11335
11336                 fi
11337
11338                 if test $have_ssleay = yes ; then
11339                         ol_with_tls=found
11340                         ol_link_tls=yes
11341
11342                         cat >> confdefs.h <<\EOF
11343 #define HAVE_SSLEAY 1
11344 EOF
11345
11346
11347                         if test $need_rsaref = yes; then
11348                                 cat >> confdefs.h <<\EOF
11349 #define HAVE_RSAREF 1
11350 EOF
11351
11352
11353                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11354                         else
11355                                 TLS_LIBS="-lssl -lcrypto"
11356                         fi
11357                 fi
11358         fi
11359
11360 else
11361         echo "configure: warning: TLS data protection not supported!" 1>&2
11362 fi
11363
11364 WITH_TLS=no
11365 if test $ol_link_tls = yes ; then
11366         cat >> confdefs.h <<\EOF
11367 #define HAVE_TLS 1
11368 EOF
11369
11370         WITH_TLS=yes
11371
11372 elif test $ol_with_tls = auto ; then
11373         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11374         echo "configure: warning: TLS data protection not supported!" 1>&2
11375
11376 elif test $ol_with_tls != no ; then
11377         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11378 fi
11379
11380 if test $ol_enable_lmpasswd != no; then
11381         if test $ol_link_tls != yes ; then
11382                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11383         fi
11384
11385         cat >> confdefs.h <<\EOF
11386 #define SLAPD_LMHASH 1
11387 EOF
11388
11389 fi
11390
11391 ol_link_threads=no
11392
11393 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11394         -o $ol_with_threads = nt ; then
11395
11396         
11397         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11398 echo "configure:11399: checking for _beginthread" >&5
11399 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11400   echo $ac_n "(cached) $ac_c" 1>&6
11401 else
11402   cat > conftest.$ac_ext <<EOF
11403 #line 11404 "configure"
11404 #include "confdefs.h"
11405 /* System header to define __stub macros and hopefully few prototypes,
11406     which can conflict with char _beginthread(); below.  */
11407 #include <assert.h>
11408 /* Override any gcc2 internal prototype to avoid an error.  */
11409 /* We use char because int might match the return type of a gcc2
11410     builtin and then its argument prototype would still apply.  */
11411 char _beginthread();
11412 char (*f)();
11413
11414 int main() {
11415
11416 /* The GNU C library defines this for functions which it implements
11417     to always fail with ENOSYS.  Some functions are actually named
11418     something starting with __ and the normal name is an alias.  */
11419 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11420 choke me
11421 #else
11422 f = _beginthread;
11423 #endif
11424
11425 ; return 0; }
11426 EOF
11427 if { (eval echo configure:11428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11428   rm -rf conftest*
11429   eval "ac_cv_func__beginthread=yes"
11430 else
11431   echo "configure: failed program was:" >&5
11432   cat conftest.$ac_ext >&5
11433   rm -rf conftest*
11434   eval "ac_cv_func__beginthread=no"
11435 fi
11436 rm -f conftest*
11437 fi
11438
11439 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11440   echo "$ac_t""yes" 1>&6
11441   :
11442 else
11443   echo "$ac_t""no" 1>&6
11444 fi
11445
11446
11447         if test $ac_cv_func__beginthread = yes ; then
11448                 cat >> confdefs.h <<\EOF
11449 #define HAVE_NT_THREADS 1
11450 EOF
11451
11452                 ol_cv_nt_threads=yes
11453         fi
11454
11455
11456         if test "$ol_cv_nt_threads" = yes ; then
11457                 ol_link_threads=nt
11458                 ol_with_threads=found
11459                 ol_with_yielding_select=yes
11460
11461                 cat >> confdefs.h <<\EOF
11462 #define HAVE_NT_SERVICE_MANAGER 1
11463 EOF
11464
11465                 cat >> confdefs.h <<\EOF
11466 #define HAVE_NT_EVENT_LOG 1
11467 EOF
11468
11469         fi
11470
11471         if test $ol_with_threads = nt ; then
11472                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11473         fi
11474 fi
11475
11476 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11477         -o $ol_with_threads = posix ; then
11478
11479         for ac_hdr in pthread.h
11480 do
11481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11483 echo "configure:11484: checking for $ac_hdr" >&5
11484 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11485   echo $ac_n "(cached) $ac_c" 1>&6
11486 else
11487   cat > conftest.$ac_ext <<EOF
11488 #line 11489 "configure"
11489 #include "confdefs.h"
11490 #include <$ac_hdr>
11491 EOF
11492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11493 { (eval echo configure:11494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11495 if test -z "$ac_err"; then
11496   rm -rf conftest*
11497   eval "ac_cv_header_$ac_safe=yes"
11498 else
11499   echo "$ac_err" >&5
11500   echo "configure: failed program was:" >&5
11501   cat conftest.$ac_ext >&5
11502   rm -rf conftest*
11503   eval "ac_cv_header_$ac_safe=no"
11504 fi
11505 rm -f conftest*
11506 fi
11507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11508   echo "$ac_t""yes" 1>&6
11509     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11510   cat >> confdefs.h <<EOF
11511 #define $ac_tr_hdr 1
11512 EOF
11513  
11514 else
11515   echo "$ac_t""no" 1>&6
11516 fi
11517 done
11518
11519
11520         if test $ac_cv_header_pthread_h = yes ; then
11521                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11522 echo "configure:11523: checking POSIX thread version" >&5
11523 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11524   echo $ac_n "(cached) $ac_c" 1>&6
11525 else
11526   
11527         cat > conftest.$ac_ext <<EOF
11528 #line 11529 "configure"
11529 #include "confdefs.h"
11530
11531 #               include <pthread.h>
11532         
11533 int main() {
11534
11535                 int i = PTHREAD_CREATE_JOINABLE;
11536         
11537 ; return 0; }
11538 EOF
11539 if { (eval echo configure:11540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11540   rm -rf conftest*
11541   
11542         cat > conftest.$ac_ext <<EOF
11543 #line 11544 "configure"
11544 #include "confdefs.h"
11545 #include <pthread.h>
11546 EOF
11547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11548   egrep "pthread_detach" >/dev/null 2>&1; then
11549   rm -rf conftest*
11550   ol_cv_pthread_version=10
11551 else
11552   rm -rf conftest*
11553   ol_cv_pthread_version=8
11554 fi
11555 rm -f conftest*
11556
11557 else
11558   echo "configure: failed program was:" >&5
11559   cat conftest.$ac_ext >&5
11560   rm -rf conftest*
11561   
11562         cat > conftest.$ac_ext <<EOF
11563 #line 11564 "configure"
11564 #include "confdefs.h"
11565
11566 #               include <pthread.h>
11567 #               ifdef PTHREAD_CREATE_UNDETACHED
11568                 draft7
11569 #               endif
11570         
11571 EOF
11572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11573   egrep "draft7" >/dev/null 2>&1; then
11574   rm -rf conftest*
11575   ol_cv_pthread_version=7
11576 else
11577   rm -rf conftest*
11578   
11579         cat > conftest.$ac_ext <<EOF
11580 #line 11581 "configure"
11581 #include "confdefs.h"
11582 #include <pthread.h>
11583 EOF
11584 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11585   egrep "pthread_attr_init" >/dev/null 2>&1; then
11586   rm -rf conftest*
11587   ol_cv_pthread_version=6
11588 else
11589   rm -rf conftest*
11590   
11591         cat > conftest.$ac_ext <<EOF
11592 #line 11593 "configure"
11593 #include "confdefs.h"
11594
11595 #               include <pthread.h>
11596 #ifdef          PTHREAD_MUTEX_INITIALIZER
11597                 draft5
11598 #endif
11599         
11600 EOF
11601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11602   egrep "draft5" >/dev/null 2>&1; then
11603   rm -rf conftest*
11604   ol_cv_pthread_version=5
11605 else
11606   rm -rf conftest*
11607   ol_cv_pthread_version=4
11608 fi
11609 rm -f conftest*
11610  
11611 fi
11612 rm -f conftest*
11613  
11614 fi
11615 rm -f conftest*
11616  
11617 fi
11618 rm -f conftest*
11619
11620 fi
11621
11622 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11623
11624
11625                 if test $ol_cv_pthread_version != 0 ; then
11626                         cat >> confdefs.h <<EOF
11627 #define HAVE_PTHREADS $ol_cv_pthread_version
11628 EOF
11629
11630                 else
11631                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11632                 fi
11633
11634                 # consider threads found
11635                 ol_with_threads=found
11636
11637                 
11638         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11639 echo "configure:11640: checking for LinuxThreads pthread.h" >&5
11640 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11641   echo $ac_n "(cached) $ac_c" 1>&6
11642 else
11643   cat > conftest.$ac_ext <<EOF
11644 #line 11645 "configure"
11645 #include "confdefs.h"
11646 #include <pthread.h>
11647 EOF
11648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11649   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11650   rm -rf conftest*
11651   ol_cv_header_linux_threads=yes
11652 else
11653   rm -rf conftest*
11654   ol_cv_header_linux_threads=no
11655 fi
11656 rm -f conftest*
11657
11658                 
11659 fi
11660
11661 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11662         if test $ol_cv_header_linux_threads = yes; then
11663                 cat >> confdefs.h <<\EOF
11664 #define HAVE_LINUX_THREADS 1
11665 EOF
11666
11667         fi
11668
11669                 
11670         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11671 echo "configure:11672: checking for GNU Pth pthread.h" >&5
11672 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11673   echo $ac_n "(cached) $ac_c" 1>&6
11674 else
11675   cat > conftest.$ac_ext <<EOF
11676 #line 11677 "configure"
11677 #include "confdefs.h"
11678 #include <pthread.h>
11679 #ifdef _POSIX_THREAD_IS_GNU_PTH
11680         __gnu_pth__;
11681 #endif
11682
11683 EOF
11684 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11685   egrep "__gnu_pth__" >/dev/null 2>&1; then
11686   rm -rf conftest*
11687   ol_cv_header_gnu_pth_pthread_h=yes
11688 else
11689   rm -rf conftest*
11690   ol_cv_header_gnu_pth_pthread_h=no
11691 fi
11692 rm -f conftest*
11693
11694                 
11695 fi
11696
11697 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11698
11699
11700                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11701                         for ac_hdr in sched.h
11702 do
11703 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11704 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11705 echo "configure:11706: checking for $ac_hdr" >&5
11706 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11707   echo $ac_n "(cached) $ac_c" 1>&6
11708 else
11709   cat > conftest.$ac_ext <<EOF
11710 #line 11711 "configure"
11711 #include "confdefs.h"
11712 #include <$ac_hdr>
11713 EOF
11714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11715 { (eval echo configure:11716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11717 if test -z "$ac_err"; then
11718   rm -rf conftest*
11719   eval "ac_cv_header_$ac_safe=yes"
11720 else
11721   echo "$ac_err" >&5
11722   echo "configure: failed program was:" >&5
11723   cat conftest.$ac_ext >&5
11724   rm -rf conftest*
11725   eval "ac_cv_header_$ac_safe=no"
11726 fi
11727 rm -f conftest*
11728 fi
11729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11730   echo "$ac_t""yes" 1>&6
11731     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11732   cat >> confdefs.h <<EOF
11733 #define $ac_tr_hdr 1
11734 EOF
11735  
11736 else
11737   echo "$ac_t""no" 1>&6
11738 fi
11739 done
11740
11741                 fi
11742
11743                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11744                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11745 echo "configure:11746: checking for pthread_create in default libraries" >&5
11746 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11747   echo $ac_n "(cached) $ac_c" 1>&6
11748 else
11749   
11750                 if test "$cross_compiling" = yes; then
11751   cat > conftest.$ac_ext <<EOF
11752 #line 11753 "configure"
11753 #include "confdefs.h"
11754 /* pthread test headers */
11755 #include <pthread.h>
11756 #if HAVE_PTHREADS < 7
11757 #include <errno.h>
11758 #endif
11759 #ifndef NULL
11760 #define NULL (void*)0
11761 #endif
11762
11763 static void *task(p)
11764         void *p;
11765 {
11766         return (void *) (p == NULL);
11767 }
11768
11769 int main() {
11770
11771         /* pthread test function */
11772 #ifndef PTHREAD_CREATE_DETACHED
11773 #define PTHREAD_CREATE_DETACHED 1
11774 #endif
11775         pthread_t t;
11776         int status;
11777         int detach = PTHREAD_CREATE_DETACHED;
11778
11779 #if HAVE_PTHREADS > 4
11780         /* Final pthreads */
11781         pthread_attr_t attr;
11782
11783         status = pthread_attr_init(&attr);
11784         if( status ) return status;
11785
11786 #if HAVE_PTHREADS < 7
11787         status = pthread_attr_setdetachstate(&attr, &detach);
11788         if( status < 0 ) status = errno;
11789 #else
11790         status = pthread_attr_setdetachstate(&attr, detach);
11791 #endif
11792         if( status ) return status;
11793         status = pthread_create( &t, &attr, task, NULL );
11794 #if HAVE_PTHREADS < 7
11795         if( status < 0 ) status = errno;
11796 #endif
11797         if( status ) return status;
11798 #else
11799         /* Draft 4 pthreads */
11800         status = pthread_create( &t, pthread_attr_default, task, NULL );
11801         if( status ) return errno;
11802
11803         /* give thread a chance to complete */
11804         /* it should remain joinable and hence detachable */
11805         sleep( 1 );
11806
11807         status = pthread_detach( &t );
11808         if( status ) return errno;
11809 #endif
11810
11811 #ifdef HAVE_LINUX_THREADS
11812         pthread_kill_other_threads_np();
11813 #endif
11814
11815         return 0;
11816
11817 ; return 0; }
11818 EOF
11819 if { (eval echo configure:11820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11820   rm -rf conftest*
11821   ol_cv_pthread_create=yes
11822 else
11823   echo "configure: failed program was:" >&5
11824   cat conftest.$ac_ext >&5
11825   rm -rf conftest*
11826   ol_cv_pthread_create=no
11827 fi
11828 rm -f conftest*
11829 else
11830   cat > conftest.$ac_ext <<EOF
11831 #line 11832 "configure"
11832 #include "confdefs.h"
11833 /* pthread test headers */
11834 #include <pthread.h>
11835 #if HAVE_PTHREADS < 7
11836 #include <errno.h>
11837 #endif
11838 #ifndef NULL
11839 #define NULL (void*)0
11840 #endif
11841
11842 static void *task(p)
11843         void *p;
11844 {
11845         return (void *) (p == NULL);
11846 }
11847
11848
11849 int main(argc, argv)
11850         int argc;
11851         char **argv;
11852 {
11853
11854         /* pthread test function */
11855 #ifndef PTHREAD_CREATE_DETACHED
11856 #define PTHREAD_CREATE_DETACHED 1
11857 #endif
11858         pthread_t t;
11859         int status;
11860         int detach = PTHREAD_CREATE_DETACHED;
11861
11862 #if HAVE_PTHREADS > 4
11863         /* Final pthreads */
11864         pthread_attr_t attr;
11865
11866         status = pthread_attr_init(&attr);
11867         if( status ) return status;
11868
11869 #if HAVE_PTHREADS < 7
11870         status = pthread_attr_setdetachstate(&attr, &detach);
11871         if( status < 0 ) status = errno;
11872 #else
11873         status = pthread_attr_setdetachstate(&attr, detach);
11874 #endif
11875         if( status ) return status;
11876         status = pthread_create( &t, &attr, task, NULL );
11877 #if HAVE_PTHREADS < 7
11878         if( status < 0 ) status = errno;
11879 #endif
11880         if( status ) return status;
11881 #else
11882         /* Draft 4 pthreads */
11883         status = pthread_create( &t, pthread_attr_default, task, NULL );
11884         if( status ) return errno;
11885
11886         /* give thread a chance to complete */
11887         /* it should remain joinable and hence detachable */
11888         sleep( 1 );
11889
11890         status = pthread_detach( &t );
11891         if( status ) return errno;
11892 #endif
11893
11894 #ifdef HAVE_LINUX_THREADS
11895         pthread_kill_other_threads_np();
11896 #endif
11897
11898         return 0;
11899
11900 }
11901
11902 EOF
11903 if { (eval echo configure:11904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11904 then
11905   ol_cv_pthread_create=yes
11906 else
11907   echo "configure: failed program was:" >&5
11908   cat conftest.$ac_ext >&5
11909   rm -fr conftest*
11910   ol_cv_pthread_create=no
11911 fi
11912 rm -fr conftest*
11913 fi
11914
11915 fi
11916
11917 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11918
11919                 if test $ol_cv_pthread_create != no ; then
11920                         ol_link_threads=posix
11921                         ol_link_pthreads=""
11922                 fi
11923                 
11924                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11925 if test "$ol_link_threads" = no ; then
11926         # try -kthread
11927         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11928 echo "configure:11929: checking for pthread link with -kthread" >&5
11929 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11930   echo $ac_n "(cached) $ac_c" 1>&6
11931 else
11932   
11933                 # save the flags
11934                 ol_LIBS="$LIBS"
11935                 LIBS="-kthread $LIBS"
11936
11937                 if test "$cross_compiling" = yes; then
11938   cat > conftest.$ac_ext <<EOF
11939 #line 11940 "configure"
11940 #include "confdefs.h"
11941 /* pthread test headers */
11942 #include <pthread.h>
11943 #if HAVE_PTHREADS < 7
11944 #include <errno.h>
11945 #endif
11946 #ifndef NULL
11947 #define NULL (void*)0
11948 #endif
11949
11950 static void *task(p)
11951         void *p;
11952 {
11953         return (void *) (p == NULL);
11954 }
11955
11956 int main() {
11957
11958         /* pthread test function */
11959 #ifndef PTHREAD_CREATE_DETACHED
11960 #define PTHREAD_CREATE_DETACHED 1
11961 #endif
11962         pthread_t t;
11963         int status;
11964         int detach = PTHREAD_CREATE_DETACHED;
11965
11966 #if HAVE_PTHREADS > 4
11967         /* Final pthreads */
11968         pthread_attr_t attr;
11969
11970         status = pthread_attr_init(&attr);
11971         if( status ) return status;
11972
11973 #if HAVE_PTHREADS < 7
11974         status = pthread_attr_setdetachstate(&attr, &detach);
11975         if( status < 0 ) status = errno;
11976 #else
11977         status = pthread_attr_setdetachstate(&attr, detach);
11978 #endif
11979         if( status ) return status;
11980         status = pthread_create( &t, &attr, task, NULL );
11981 #if HAVE_PTHREADS < 7
11982         if( status < 0 ) status = errno;
11983 #endif
11984         if( status ) return status;
11985 #else
11986         /* Draft 4 pthreads */
11987         status = pthread_create( &t, pthread_attr_default, task, NULL );
11988         if( status ) return errno;
11989
11990         /* give thread a chance to complete */
11991         /* it should remain joinable and hence detachable */
11992         sleep( 1 );
11993
11994         status = pthread_detach( &t );
11995         if( status ) return errno;
11996 #endif
11997
11998 #ifdef HAVE_LINUX_THREADS
11999         pthread_kill_other_threads_np();
12000 #endif
12001
12002         return 0;
12003
12004 ; return 0; }
12005 EOF
12006 if { (eval echo configure:12007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12007   rm -rf conftest*
12008   ol_cv_pthread_kthread=yes
12009 else
12010   echo "configure: failed program was:" >&5
12011   cat conftest.$ac_ext >&5
12012   rm -rf conftest*
12013   ol_cv_pthread_kthread=no
12014 fi
12015 rm -f conftest*
12016 else
12017   cat > conftest.$ac_ext <<EOF
12018 #line 12019 "configure"
12019 #include "confdefs.h"
12020 /* pthread test headers */
12021 #include <pthread.h>
12022 #if HAVE_PTHREADS < 7
12023 #include <errno.h>
12024 #endif
12025 #ifndef NULL
12026 #define NULL (void*)0
12027 #endif
12028
12029 static void *task(p)
12030         void *p;
12031 {
12032         return (void *) (p == NULL);
12033 }
12034
12035
12036 int main(argc, argv)
12037         int argc;
12038         char **argv;
12039 {
12040
12041         /* pthread test function */
12042 #ifndef PTHREAD_CREATE_DETACHED
12043 #define PTHREAD_CREATE_DETACHED 1
12044 #endif
12045         pthread_t t;
12046         int status;
12047         int detach = PTHREAD_CREATE_DETACHED;
12048
12049 #if HAVE_PTHREADS > 4
12050         /* Final pthreads */
12051         pthread_attr_t attr;
12052
12053         status = pthread_attr_init(&attr);
12054         if( status ) return status;
12055
12056 #if HAVE_PTHREADS < 7
12057         status = pthread_attr_setdetachstate(&attr, &detach);
12058         if( status < 0 ) status = errno;
12059 #else
12060         status = pthread_attr_setdetachstate(&attr, detach);
12061 #endif
12062         if( status ) return status;
12063         status = pthread_create( &t, &attr, task, NULL );
12064 #if HAVE_PTHREADS < 7
12065         if( status < 0 ) status = errno;
12066 #endif
12067         if( status ) return status;
12068 #else
12069         /* Draft 4 pthreads */
12070         status = pthread_create( &t, pthread_attr_default, task, NULL );
12071         if( status ) return errno;
12072
12073         /* give thread a chance to complete */
12074         /* it should remain joinable and hence detachable */
12075         sleep( 1 );
12076
12077         status = pthread_detach( &t );
12078         if( status ) return errno;
12079 #endif
12080
12081 #ifdef HAVE_LINUX_THREADS
12082         pthread_kill_other_threads_np();
12083 #endif
12084
12085         return 0;
12086
12087 }
12088
12089 EOF
12090 if { (eval echo configure:12091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12091 then
12092   ol_cv_pthread_kthread=yes
12093 else
12094   echo "configure: failed program was:" >&5
12095   cat conftest.$ac_ext >&5
12096   rm -fr conftest*
12097   ol_cv_pthread_kthread=no
12098 fi
12099 rm -fr conftest*
12100 fi
12101
12102
12103                 # restore the LIBS
12104                 LIBS="$ol_LIBS"
12105         
12106 fi
12107
12108 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12109
12110         if test $ol_cv_pthread_kthread = yes ; then
12111                 ol_link_pthreads="-kthread"
12112                 ol_link_threads=posix
12113         fi
12114 fi
12115
12116                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12117 if test "$ol_link_threads" = no ; then
12118         # try -pthread
12119         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12120 echo "configure:12121: checking for pthread link with -pthread" >&5
12121 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12122   echo $ac_n "(cached) $ac_c" 1>&6
12123 else
12124   
12125                 # save the flags
12126                 ol_LIBS="$LIBS"
12127                 LIBS="-pthread $LIBS"
12128
12129                 if test "$cross_compiling" = yes; then
12130   cat > conftest.$ac_ext <<EOF
12131 #line 12132 "configure"
12132 #include "confdefs.h"
12133 /* pthread test headers */
12134 #include <pthread.h>
12135 #if HAVE_PTHREADS < 7
12136 #include <errno.h>
12137 #endif
12138 #ifndef NULL
12139 #define NULL (void*)0
12140 #endif
12141
12142 static void *task(p)
12143         void *p;
12144 {
12145         return (void *) (p == NULL);
12146 }
12147
12148 int main() {
12149
12150         /* pthread test function */
12151 #ifndef PTHREAD_CREATE_DETACHED
12152 #define PTHREAD_CREATE_DETACHED 1
12153 #endif
12154         pthread_t t;
12155         int status;
12156         int detach = PTHREAD_CREATE_DETACHED;
12157
12158 #if HAVE_PTHREADS > 4
12159         /* Final pthreads */
12160         pthread_attr_t attr;
12161
12162         status = pthread_attr_init(&attr);
12163         if( status ) return status;
12164
12165 #if HAVE_PTHREADS < 7
12166         status = pthread_attr_setdetachstate(&attr, &detach);
12167         if( status < 0 ) status = errno;
12168 #else
12169         status = pthread_attr_setdetachstate(&attr, detach);
12170 #endif
12171         if( status ) return status;
12172         status = pthread_create( &t, &attr, task, NULL );
12173 #if HAVE_PTHREADS < 7
12174         if( status < 0 ) status = errno;
12175 #endif
12176         if( status ) return status;
12177 #else
12178         /* Draft 4 pthreads */
12179         status = pthread_create( &t, pthread_attr_default, task, NULL );
12180         if( status ) return errno;
12181
12182         /* give thread a chance to complete */
12183         /* it should remain joinable and hence detachable */
12184         sleep( 1 );
12185
12186         status = pthread_detach( &t );
12187         if( status ) return errno;
12188 #endif
12189
12190 #ifdef HAVE_LINUX_THREADS
12191         pthread_kill_other_threads_np();
12192 #endif
12193
12194         return 0;
12195
12196 ; return 0; }
12197 EOF
12198 if { (eval echo configure:12199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12199   rm -rf conftest*
12200   ol_cv_pthread_pthread=yes
12201 else
12202   echo "configure: failed program was:" >&5
12203   cat conftest.$ac_ext >&5
12204   rm -rf conftest*
12205   ol_cv_pthread_pthread=no
12206 fi
12207 rm -f conftest*
12208 else
12209   cat > conftest.$ac_ext <<EOF
12210 #line 12211 "configure"
12211 #include "confdefs.h"
12212 /* pthread test headers */
12213 #include <pthread.h>
12214 #if HAVE_PTHREADS < 7
12215 #include <errno.h>
12216 #endif
12217 #ifndef NULL
12218 #define NULL (void*)0
12219 #endif
12220
12221 static void *task(p)
12222         void *p;
12223 {
12224         return (void *) (p == NULL);
12225 }
12226
12227
12228 int main(argc, argv)
12229         int argc;
12230         char **argv;
12231 {
12232
12233         /* pthread test function */
12234 #ifndef PTHREAD_CREATE_DETACHED
12235 #define PTHREAD_CREATE_DETACHED 1
12236 #endif
12237         pthread_t t;
12238         int status;
12239         int detach = PTHREAD_CREATE_DETACHED;
12240
12241 #if HAVE_PTHREADS > 4
12242         /* Final pthreads */
12243         pthread_attr_t attr;
12244
12245         status = pthread_attr_init(&attr);
12246         if( status ) return status;
12247
12248 #if HAVE_PTHREADS < 7
12249         status = pthread_attr_setdetachstate(&attr, &detach);
12250         if( status < 0 ) status = errno;
12251 #else
12252         status = pthread_attr_setdetachstate(&attr, detach);
12253 #endif
12254         if( status ) return status;
12255         status = pthread_create( &t, &attr, task, NULL );
12256 #if HAVE_PTHREADS < 7
12257         if( status < 0 ) status = errno;
12258 #endif
12259         if( status ) return status;
12260 #else
12261         /* Draft 4 pthreads */
12262         status = pthread_create( &t, pthread_attr_default, task, NULL );
12263         if( status ) return errno;
12264
12265         /* give thread a chance to complete */
12266         /* it should remain joinable and hence detachable */
12267         sleep( 1 );
12268
12269         status = pthread_detach( &t );
12270         if( status ) return errno;
12271 #endif
12272
12273 #ifdef HAVE_LINUX_THREADS
12274         pthread_kill_other_threads_np();
12275 #endif
12276
12277         return 0;
12278
12279 }
12280
12281 EOF
12282 if { (eval echo configure:12283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12283 then
12284   ol_cv_pthread_pthread=yes
12285 else
12286   echo "configure: failed program was:" >&5
12287   cat conftest.$ac_ext >&5
12288   rm -fr conftest*
12289   ol_cv_pthread_pthread=no
12290 fi
12291 rm -fr conftest*
12292 fi
12293
12294
12295                 # restore the LIBS
12296                 LIBS="$ol_LIBS"
12297         
12298 fi
12299
12300 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12301
12302         if test $ol_cv_pthread_pthread = yes ; then
12303                 ol_link_pthreads="-pthread"
12304                 ol_link_threads=posix
12305         fi
12306 fi
12307
12308                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12309 if test "$ol_link_threads" = no ; then
12310         # try -pthreads
12311         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12312 echo "configure:12313: checking for pthread link with -pthreads" >&5
12313 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12314   echo $ac_n "(cached) $ac_c" 1>&6
12315 else
12316   
12317                 # save the flags
12318                 ol_LIBS="$LIBS"
12319                 LIBS="-pthreads $LIBS"
12320
12321                 if test "$cross_compiling" = yes; then
12322   cat > conftest.$ac_ext <<EOF
12323 #line 12324 "configure"
12324 #include "confdefs.h"
12325 /* pthread test headers */
12326 #include <pthread.h>
12327 #if HAVE_PTHREADS < 7
12328 #include <errno.h>
12329 #endif
12330 #ifndef NULL
12331 #define NULL (void*)0
12332 #endif
12333
12334 static void *task(p)
12335         void *p;
12336 {
12337         return (void *) (p == NULL);
12338 }
12339
12340 int main() {
12341
12342         /* pthread test function */
12343 #ifndef PTHREAD_CREATE_DETACHED
12344 #define PTHREAD_CREATE_DETACHED 1
12345 #endif
12346         pthread_t t;
12347         int status;
12348         int detach = PTHREAD_CREATE_DETACHED;
12349
12350 #if HAVE_PTHREADS > 4
12351         /* Final pthreads */
12352         pthread_attr_t attr;
12353
12354         status = pthread_attr_init(&attr);
12355         if( status ) return status;
12356
12357 #if HAVE_PTHREADS < 7
12358         status = pthread_attr_setdetachstate(&attr, &detach);
12359         if( status < 0 ) status = errno;
12360 #else
12361         status = pthread_attr_setdetachstate(&attr, detach);
12362 #endif
12363         if( status ) return status;
12364         status = pthread_create( &t, &attr, task, NULL );
12365 #if HAVE_PTHREADS < 7
12366         if( status < 0 ) status = errno;
12367 #endif
12368         if( status ) return status;
12369 #else
12370         /* Draft 4 pthreads */
12371         status = pthread_create( &t, pthread_attr_default, task, NULL );
12372         if( status ) return errno;
12373
12374         /* give thread a chance to complete */
12375         /* it should remain joinable and hence detachable */
12376         sleep( 1 );
12377
12378         status = pthread_detach( &t );
12379         if( status ) return errno;
12380 #endif
12381
12382 #ifdef HAVE_LINUX_THREADS
12383         pthread_kill_other_threads_np();
12384 #endif
12385
12386         return 0;
12387
12388 ; return 0; }
12389 EOF
12390 if { (eval echo configure:12391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12391   rm -rf conftest*
12392   ol_cv_pthread_pthreads=yes
12393 else
12394   echo "configure: failed program was:" >&5
12395   cat conftest.$ac_ext >&5
12396   rm -rf conftest*
12397   ol_cv_pthread_pthreads=no
12398 fi
12399 rm -f conftest*
12400 else
12401   cat > conftest.$ac_ext <<EOF
12402 #line 12403 "configure"
12403 #include "confdefs.h"
12404 /* pthread test headers */
12405 #include <pthread.h>
12406 #if HAVE_PTHREADS < 7
12407 #include <errno.h>
12408 #endif
12409 #ifndef NULL
12410 #define NULL (void*)0
12411 #endif
12412
12413 static void *task(p)
12414         void *p;
12415 {
12416         return (void *) (p == NULL);
12417 }
12418
12419
12420 int main(argc, argv)
12421         int argc;
12422         char **argv;
12423 {
12424
12425         /* pthread test function */
12426 #ifndef PTHREAD_CREATE_DETACHED
12427 #define PTHREAD_CREATE_DETACHED 1
12428 #endif
12429         pthread_t t;
12430         int status;
12431         int detach = PTHREAD_CREATE_DETACHED;
12432
12433 #if HAVE_PTHREADS > 4
12434         /* Final pthreads */
12435         pthread_attr_t attr;
12436
12437         status = pthread_attr_init(&attr);
12438         if( status ) return status;
12439
12440 #if HAVE_PTHREADS < 7
12441         status = pthread_attr_setdetachstate(&attr, &detach);
12442         if( status < 0 ) status = errno;
12443 #else
12444         status = pthread_attr_setdetachstate(&attr, detach);
12445 #endif
12446         if( status ) return status;
12447         status = pthread_create( &t, &attr, task, NULL );
12448 #if HAVE_PTHREADS < 7
12449         if( status < 0 ) status = errno;
12450 #endif
12451         if( status ) return status;
12452 #else
12453         /* Draft 4 pthreads */
12454         status = pthread_create( &t, pthread_attr_default, task, NULL );
12455         if( status ) return errno;
12456
12457         /* give thread a chance to complete */
12458         /* it should remain joinable and hence detachable */
12459         sleep( 1 );
12460
12461         status = pthread_detach( &t );
12462         if( status ) return errno;
12463 #endif
12464
12465 #ifdef HAVE_LINUX_THREADS
12466         pthread_kill_other_threads_np();
12467 #endif
12468
12469         return 0;
12470
12471 }
12472
12473 EOF
12474 if { (eval echo configure:12475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12475 then
12476   ol_cv_pthread_pthreads=yes
12477 else
12478   echo "configure: failed program was:" >&5
12479   cat conftest.$ac_ext >&5
12480   rm -fr conftest*
12481   ol_cv_pthread_pthreads=no
12482 fi
12483 rm -fr conftest*
12484 fi
12485
12486
12487                 # restore the LIBS
12488                 LIBS="$ol_LIBS"
12489         
12490 fi
12491
12492 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12493
12494         if test $ol_cv_pthread_pthreads = yes ; then
12495                 ol_link_pthreads="-pthreads"
12496                 ol_link_threads=posix
12497         fi
12498 fi
12499
12500                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12501 if test "$ol_link_threads" = no ; then
12502         # try -mthreads
12503         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12504 echo "configure:12505: checking for pthread link with -mthreads" >&5
12505 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12506   echo $ac_n "(cached) $ac_c" 1>&6
12507 else
12508   
12509                 # save the flags
12510                 ol_LIBS="$LIBS"
12511                 LIBS="-mthreads $LIBS"
12512
12513                 if test "$cross_compiling" = yes; then
12514   cat > conftest.$ac_ext <<EOF
12515 #line 12516 "configure"
12516 #include "confdefs.h"
12517 /* pthread test headers */
12518 #include <pthread.h>
12519 #if HAVE_PTHREADS < 7
12520 #include <errno.h>
12521 #endif
12522 #ifndef NULL
12523 #define NULL (void*)0
12524 #endif
12525
12526 static void *task(p)
12527         void *p;
12528 {
12529         return (void *) (p == NULL);
12530 }
12531
12532 int main() {
12533
12534         /* pthread test function */
12535 #ifndef PTHREAD_CREATE_DETACHED
12536 #define PTHREAD_CREATE_DETACHED 1
12537 #endif
12538         pthread_t t;
12539         int status;
12540         int detach = PTHREAD_CREATE_DETACHED;
12541
12542 #if HAVE_PTHREADS > 4
12543         /* Final pthreads */
12544         pthread_attr_t attr;
12545
12546         status = pthread_attr_init(&attr);
12547         if( status ) return status;
12548
12549 #if HAVE_PTHREADS < 7
12550         status = pthread_attr_setdetachstate(&attr, &detach);
12551         if( status < 0 ) status = errno;
12552 #else
12553         status = pthread_attr_setdetachstate(&attr, detach);
12554 #endif
12555         if( status ) return status;
12556         status = pthread_create( &t, &attr, task, NULL );
12557 #if HAVE_PTHREADS < 7
12558         if( status < 0 ) status = errno;
12559 #endif
12560         if( status ) return status;
12561 #else
12562         /* Draft 4 pthreads */
12563         status = pthread_create( &t, pthread_attr_default, task, NULL );
12564         if( status ) return errno;
12565
12566         /* give thread a chance to complete */
12567         /* it should remain joinable and hence detachable */
12568         sleep( 1 );
12569
12570         status = pthread_detach( &t );
12571         if( status ) return errno;
12572 #endif
12573
12574 #ifdef HAVE_LINUX_THREADS
12575         pthread_kill_other_threads_np();
12576 #endif
12577
12578         return 0;
12579
12580 ; return 0; }
12581 EOF
12582 if { (eval echo configure:12583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12583   rm -rf conftest*
12584   ol_cv_pthread_mthreads=yes
12585 else
12586   echo "configure: failed program was:" >&5
12587   cat conftest.$ac_ext >&5
12588   rm -rf conftest*
12589   ol_cv_pthread_mthreads=no
12590 fi
12591 rm -f conftest*
12592 else
12593   cat > conftest.$ac_ext <<EOF
12594 #line 12595 "configure"
12595 #include "confdefs.h"
12596 /* pthread test headers */
12597 #include <pthread.h>
12598 #if HAVE_PTHREADS < 7
12599 #include <errno.h>
12600 #endif
12601 #ifndef NULL
12602 #define NULL (void*)0
12603 #endif
12604
12605 static void *task(p)
12606         void *p;
12607 {
12608         return (void *) (p == NULL);
12609 }
12610
12611
12612 int main(argc, argv)
12613         int argc;
12614         char **argv;
12615 {
12616
12617         /* pthread test function */
12618 #ifndef PTHREAD_CREATE_DETACHED
12619 #define PTHREAD_CREATE_DETACHED 1
12620 #endif
12621         pthread_t t;
12622         int status;
12623         int detach = PTHREAD_CREATE_DETACHED;
12624
12625 #if HAVE_PTHREADS > 4
12626         /* Final pthreads */
12627         pthread_attr_t attr;
12628
12629         status = pthread_attr_init(&attr);
12630         if( status ) return status;
12631
12632 #if HAVE_PTHREADS < 7
12633         status = pthread_attr_setdetachstate(&attr, &detach);
12634         if( status < 0 ) status = errno;
12635 #else
12636         status = pthread_attr_setdetachstate(&attr, detach);
12637 #endif
12638         if( status ) return status;
12639         status = pthread_create( &t, &attr, task, NULL );
12640 #if HAVE_PTHREADS < 7
12641         if( status < 0 ) status = errno;
12642 #endif
12643         if( status ) return status;
12644 #else
12645         /* Draft 4 pthreads */
12646         status = pthread_create( &t, pthread_attr_default, task, NULL );
12647         if( status ) return errno;
12648
12649         /* give thread a chance to complete */
12650         /* it should remain joinable and hence detachable */
12651         sleep( 1 );
12652
12653         status = pthread_detach( &t );
12654         if( status ) return errno;
12655 #endif
12656
12657 #ifdef HAVE_LINUX_THREADS
12658         pthread_kill_other_threads_np();
12659 #endif
12660
12661         return 0;
12662
12663 }
12664
12665 EOF
12666 if { (eval echo configure:12667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12667 then
12668   ol_cv_pthread_mthreads=yes
12669 else
12670   echo "configure: failed program was:" >&5
12671   cat conftest.$ac_ext >&5
12672   rm -fr conftest*
12673   ol_cv_pthread_mthreads=no
12674 fi
12675 rm -fr conftest*
12676 fi
12677
12678
12679                 # restore the LIBS
12680                 LIBS="$ol_LIBS"
12681         
12682 fi
12683
12684 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12685
12686         if test $ol_cv_pthread_mthreads = yes ; then
12687                 ol_link_pthreads="-mthreads"
12688                 ol_link_threads=posix
12689         fi
12690 fi
12691
12692                 # Pthread try link: -thread (ol_cv_pthread_thread)
12693 if test "$ol_link_threads" = no ; then
12694         # try -thread
12695         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12696 echo "configure:12697: checking for pthread link with -thread" >&5
12697 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12698   echo $ac_n "(cached) $ac_c" 1>&6
12699 else
12700   
12701                 # save the flags
12702                 ol_LIBS="$LIBS"
12703                 LIBS="-thread $LIBS"
12704
12705                 if test "$cross_compiling" = yes; then
12706   cat > conftest.$ac_ext <<EOF
12707 #line 12708 "configure"
12708 #include "confdefs.h"
12709 /* pthread test headers */
12710 #include <pthread.h>
12711 #if HAVE_PTHREADS < 7
12712 #include <errno.h>
12713 #endif
12714 #ifndef NULL
12715 #define NULL (void*)0
12716 #endif
12717
12718 static void *task(p)
12719         void *p;
12720 {
12721         return (void *) (p == NULL);
12722 }
12723
12724 int main() {
12725
12726         /* pthread test function */
12727 #ifndef PTHREAD_CREATE_DETACHED
12728 #define PTHREAD_CREATE_DETACHED 1
12729 #endif
12730         pthread_t t;
12731         int status;
12732         int detach = PTHREAD_CREATE_DETACHED;
12733
12734 #if HAVE_PTHREADS > 4
12735         /* Final pthreads */
12736         pthread_attr_t attr;
12737
12738         status = pthread_attr_init(&attr);
12739         if( status ) return status;
12740
12741 #if HAVE_PTHREADS < 7
12742         status = pthread_attr_setdetachstate(&attr, &detach);
12743         if( status < 0 ) status = errno;
12744 #else
12745         status = pthread_attr_setdetachstate(&attr, detach);
12746 #endif
12747         if( status ) return status;
12748         status = pthread_create( &t, &attr, task, NULL );
12749 #if HAVE_PTHREADS < 7
12750         if( status < 0 ) status = errno;
12751 #endif
12752         if( status ) return status;
12753 #else
12754         /* Draft 4 pthreads */
12755         status = pthread_create( &t, pthread_attr_default, task, NULL );
12756         if( status ) return errno;
12757
12758         /* give thread a chance to complete */
12759         /* it should remain joinable and hence detachable */
12760         sleep( 1 );
12761
12762         status = pthread_detach( &t );
12763         if( status ) return errno;
12764 #endif
12765
12766 #ifdef HAVE_LINUX_THREADS
12767         pthread_kill_other_threads_np();
12768 #endif
12769
12770         return 0;
12771
12772 ; return 0; }
12773 EOF
12774 if { (eval echo configure:12775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12775   rm -rf conftest*
12776   ol_cv_pthread_thread=yes
12777 else
12778   echo "configure: failed program was:" >&5
12779   cat conftest.$ac_ext >&5
12780   rm -rf conftest*
12781   ol_cv_pthread_thread=no
12782 fi
12783 rm -f conftest*
12784 else
12785   cat > conftest.$ac_ext <<EOF
12786 #line 12787 "configure"
12787 #include "confdefs.h"
12788 /* pthread test headers */
12789 #include <pthread.h>
12790 #if HAVE_PTHREADS < 7
12791 #include <errno.h>
12792 #endif
12793 #ifndef NULL
12794 #define NULL (void*)0
12795 #endif
12796
12797 static void *task(p)
12798         void *p;
12799 {
12800         return (void *) (p == NULL);
12801 }
12802
12803
12804 int main(argc, argv)
12805         int argc;
12806         char **argv;
12807 {
12808
12809         /* pthread test function */
12810 #ifndef PTHREAD_CREATE_DETACHED
12811 #define PTHREAD_CREATE_DETACHED 1
12812 #endif
12813         pthread_t t;
12814         int status;
12815         int detach = PTHREAD_CREATE_DETACHED;
12816
12817 #if HAVE_PTHREADS > 4
12818         /* Final pthreads */
12819         pthread_attr_t attr;
12820
12821         status = pthread_attr_init(&attr);
12822         if( status ) return status;
12823
12824 #if HAVE_PTHREADS < 7
12825         status = pthread_attr_setdetachstate(&attr, &detach);
12826         if( status < 0 ) status = errno;
12827 #else
12828         status = pthread_attr_setdetachstate(&attr, detach);
12829 #endif
12830         if( status ) return status;
12831         status = pthread_create( &t, &attr, task, NULL );
12832 #if HAVE_PTHREADS < 7
12833         if( status < 0 ) status = errno;
12834 #endif
12835         if( status ) return status;
12836 #else
12837         /* Draft 4 pthreads */
12838         status = pthread_create( &t, pthread_attr_default, task, NULL );
12839         if( status ) return errno;
12840
12841         /* give thread a chance to complete */
12842         /* it should remain joinable and hence detachable */
12843         sleep( 1 );
12844
12845         status = pthread_detach( &t );
12846         if( status ) return errno;
12847 #endif
12848
12849 #ifdef HAVE_LINUX_THREADS
12850         pthread_kill_other_threads_np();
12851 #endif
12852
12853         return 0;
12854
12855 }
12856
12857 EOF
12858 if { (eval echo configure:12859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12859 then
12860   ol_cv_pthread_thread=yes
12861 else
12862   echo "configure: failed program was:" >&5
12863   cat conftest.$ac_ext >&5
12864   rm -fr conftest*
12865   ol_cv_pthread_thread=no
12866 fi
12867 rm -fr conftest*
12868 fi
12869
12870
12871                 # restore the LIBS
12872                 LIBS="$ol_LIBS"
12873         
12874 fi
12875
12876 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12877
12878         if test $ol_cv_pthread_thread = yes ; then
12879                 ol_link_pthreads="-thread"
12880                 ol_link_threads=posix
12881         fi
12882 fi
12883
12884
12885                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12886 if test "$ol_link_threads" = no ; then
12887         # try -lpthread -lmach -lexc -lc_r
12888         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12889 echo "configure:12890: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12890 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12891   echo $ac_n "(cached) $ac_c" 1>&6
12892 else
12893   
12894                 # save the flags
12895                 ol_LIBS="$LIBS"
12896                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12897
12898                 if test "$cross_compiling" = yes; then
12899   cat > conftest.$ac_ext <<EOF
12900 #line 12901 "configure"
12901 #include "confdefs.h"
12902 /* pthread test headers */
12903 #include <pthread.h>
12904 #if HAVE_PTHREADS < 7
12905 #include <errno.h>
12906 #endif
12907 #ifndef NULL
12908 #define NULL (void*)0
12909 #endif
12910
12911 static void *task(p)
12912         void *p;
12913 {
12914         return (void *) (p == NULL);
12915 }
12916
12917 int main() {
12918
12919         /* pthread test function */
12920 #ifndef PTHREAD_CREATE_DETACHED
12921 #define PTHREAD_CREATE_DETACHED 1
12922 #endif
12923         pthread_t t;
12924         int status;
12925         int detach = PTHREAD_CREATE_DETACHED;
12926
12927 #if HAVE_PTHREADS > 4
12928         /* Final pthreads */
12929         pthread_attr_t attr;
12930
12931         status = pthread_attr_init(&attr);
12932         if( status ) return status;
12933
12934 #if HAVE_PTHREADS < 7
12935         status = pthread_attr_setdetachstate(&attr, &detach);
12936         if( status < 0 ) status = errno;
12937 #else
12938         status = pthread_attr_setdetachstate(&attr, detach);
12939 #endif
12940         if( status ) return status;
12941         status = pthread_create( &t, &attr, task, NULL );
12942 #if HAVE_PTHREADS < 7
12943         if( status < 0 ) status = errno;
12944 #endif
12945         if( status ) return status;
12946 #else
12947         /* Draft 4 pthreads */
12948         status = pthread_create( &t, pthread_attr_default, task, NULL );
12949         if( status ) return errno;
12950
12951         /* give thread a chance to complete */
12952         /* it should remain joinable and hence detachable */
12953         sleep( 1 );
12954
12955         status = pthread_detach( &t );
12956         if( status ) return errno;
12957 #endif
12958
12959 #ifdef HAVE_LINUX_THREADS
12960         pthread_kill_other_threads_np();
12961 #endif
12962
12963         return 0;
12964
12965 ; return 0; }
12966 EOF
12967 if { (eval echo configure:12968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12968   rm -rf conftest*
12969   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12970 else
12971   echo "configure: failed program was:" >&5
12972   cat conftest.$ac_ext >&5
12973   rm -rf conftest*
12974   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12975 fi
12976 rm -f conftest*
12977 else
12978   cat > conftest.$ac_ext <<EOF
12979 #line 12980 "configure"
12980 #include "confdefs.h"
12981 /* pthread test headers */
12982 #include <pthread.h>
12983 #if HAVE_PTHREADS < 7
12984 #include <errno.h>
12985 #endif
12986 #ifndef NULL
12987 #define NULL (void*)0
12988 #endif
12989
12990 static void *task(p)
12991         void *p;
12992 {
12993         return (void *) (p == NULL);
12994 }
12995
12996
12997 int main(argc, argv)
12998         int argc;
12999         char **argv;
13000 {
13001
13002         /* pthread test function */
13003 #ifndef PTHREAD_CREATE_DETACHED
13004 #define PTHREAD_CREATE_DETACHED 1
13005 #endif
13006         pthread_t t;
13007         int status;
13008         int detach = PTHREAD_CREATE_DETACHED;
13009
13010 #if HAVE_PTHREADS > 4
13011         /* Final pthreads */
13012         pthread_attr_t attr;
13013
13014         status = pthread_attr_init(&attr);
13015         if( status ) return status;
13016
13017 #if HAVE_PTHREADS < 7
13018         status = pthread_attr_setdetachstate(&attr, &detach);
13019         if( status < 0 ) status = errno;
13020 #else
13021         status = pthread_attr_setdetachstate(&attr, detach);
13022 #endif
13023         if( status ) return status;
13024         status = pthread_create( &t, &attr, task, NULL );
13025 #if HAVE_PTHREADS < 7
13026         if( status < 0 ) status = errno;
13027 #endif
13028         if( status ) return status;
13029 #else
13030         /* Draft 4 pthreads */
13031         status = pthread_create( &t, pthread_attr_default, task, NULL );
13032         if( status ) return errno;
13033
13034         /* give thread a chance to complete */
13035         /* it should remain joinable and hence detachable */
13036         sleep( 1 );
13037
13038         status = pthread_detach( &t );
13039         if( status ) return errno;
13040 #endif
13041
13042 #ifdef HAVE_LINUX_THREADS
13043         pthread_kill_other_threads_np();
13044 #endif
13045
13046         return 0;
13047
13048 }
13049
13050 EOF
13051 if { (eval echo configure:13052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13052 then
13053   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13054 else
13055   echo "configure: failed program was:" >&5
13056   cat conftest.$ac_ext >&5
13057   rm -fr conftest*
13058   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13059 fi
13060 rm -fr conftest*
13061 fi
13062
13063
13064                 # restore the LIBS
13065                 LIBS="$ol_LIBS"
13066         
13067 fi
13068
13069 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13070
13071         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13072                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13073                 ol_link_threads=posix
13074         fi
13075 fi
13076
13077                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13078 if test "$ol_link_threads" = no ; then
13079         # try -lpthread -lmach -lexc
13080         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13081 echo "configure:13082: checking for pthread link with -lpthread -lmach -lexc" >&5
13082 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13083   echo $ac_n "(cached) $ac_c" 1>&6
13084 else
13085   
13086                 # save the flags
13087                 ol_LIBS="$LIBS"
13088                 LIBS="-lpthread -lmach -lexc $LIBS"
13089
13090                 if test "$cross_compiling" = yes; then
13091   cat > conftest.$ac_ext <<EOF
13092 #line 13093 "configure"
13093 #include "confdefs.h"
13094 /* pthread test headers */
13095 #include <pthread.h>
13096 #if HAVE_PTHREADS < 7
13097 #include <errno.h>
13098 #endif
13099 #ifndef NULL
13100 #define NULL (void*)0
13101 #endif
13102
13103 static void *task(p)
13104         void *p;
13105 {
13106         return (void *) (p == NULL);
13107 }
13108
13109 int main() {
13110
13111         /* pthread test function */
13112 #ifndef PTHREAD_CREATE_DETACHED
13113 #define PTHREAD_CREATE_DETACHED 1
13114 #endif
13115         pthread_t t;
13116         int status;
13117         int detach = PTHREAD_CREATE_DETACHED;
13118
13119 #if HAVE_PTHREADS > 4
13120         /* Final pthreads */
13121         pthread_attr_t attr;
13122
13123         status = pthread_attr_init(&attr);
13124         if( status ) return status;
13125
13126 #if HAVE_PTHREADS < 7
13127         status = pthread_attr_setdetachstate(&attr, &detach);
13128         if( status < 0 ) status = errno;
13129 #else
13130         status = pthread_attr_setdetachstate(&attr, detach);
13131 #endif
13132         if( status ) return status;
13133         status = pthread_create( &t, &attr, task, NULL );
13134 #if HAVE_PTHREADS < 7
13135         if( status < 0 ) status = errno;
13136 #endif
13137         if( status ) return status;
13138 #else
13139         /* Draft 4 pthreads */
13140         status = pthread_create( &t, pthread_attr_default, task, NULL );
13141         if( status ) return errno;
13142
13143         /* give thread a chance to complete */
13144         /* it should remain joinable and hence detachable */
13145         sleep( 1 );
13146
13147         status = pthread_detach( &t );
13148         if( status ) return errno;
13149 #endif
13150
13151 #ifdef HAVE_LINUX_THREADS
13152         pthread_kill_other_threads_np();
13153 #endif
13154
13155         return 0;
13156
13157 ; return 0; }
13158 EOF
13159 if { (eval echo configure:13160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13160   rm -rf conftest*
13161   ol_cv_pthread_lpthread_lmach_lexc=yes
13162 else
13163   echo "configure: failed program was:" >&5
13164   cat conftest.$ac_ext >&5
13165   rm -rf conftest*
13166   ol_cv_pthread_lpthread_lmach_lexc=no
13167 fi
13168 rm -f conftest*
13169 else
13170   cat > conftest.$ac_ext <<EOF
13171 #line 13172 "configure"
13172 #include "confdefs.h"
13173 /* pthread test headers */
13174 #include <pthread.h>
13175 #if HAVE_PTHREADS < 7
13176 #include <errno.h>
13177 #endif
13178 #ifndef NULL
13179 #define NULL (void*)0
13180 #endif
13181
13182 static void *task(p)
13183         void *p;
13184 {
13185         return (void *) (p == NULL);
13186 }
13187
13188
13189 int main(argc, argv)
13190         int argc;
13191         char **argv;
13192 {
13193
13194         /* pthread test function */
13195 #ifndef PTHREAD_CREATE_DETACHED
13196 #define PTHREAD_CREATE_DETACHED 1
13197 #endif
13198         pthread_t t;
13199         int status;
13200         int detach = PTHREAD_CREATE_DETACHED;
13201
13202 #if HAVE_PTHREADS > 4
13203         /* Final pthreads */
13204         pthread_attr_t attr;
13205
13206         status = pthread_attr_init(&attr);
13207         if( status ) return status;
13208
13209 #if HAVE_PTHREADS < 7
13210         status = pthread_attr_setdetachstate(&attr, &detach);
13211         if( status < 0 ) status = errno;
13212 #else
13213         status = pthread_attr_setdetachstate(&attr, detach);
13214 #endif
13215         if( status ) return status;
13216         status = pthread_create( &t, &attr, task, NULL );
13217 #if HAVE_PTHREADS < 7
13218         if( status < 0 ) status = errno;
13219 #endif
13220         if( status ) return status;
13221 #else
13222         /* Draft 4 pthreads */
13223         status = pthread_create( &t, pthread_attr_default, task, NULL );
13224         if( status ) return errno;
13225
13226         /* give thread a chance to complete */
13227         /* it should remain joinable and hence detachable */
13228         sleep( 1 );
13229
13230         status = pthread_detach( &t );
13231         if( status ) return errno;
13232 #endif
13233
13234 #ifdef HAVE_LINUX_THREADS
13235         pthread_kill_other_threads_np();
13236 #endif
13237
13238         return 0;
13239
13240 }
13241
13242 EOF
13243 if { (eval echo configure:13244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13244 then
13245   ol_cv_pthread_lpthread_lmach_lexc=yes
13246 else
13247   echo "configure: failed program was:" >&5
13248   cat conftest.$ac_ext >&5
13249   rm -fr conftest*
13250   ol_cv_pthread_lpthread_lmach_lexc=no
13251 fi
13252 rm -fr conftest*
13253 fi
13254
13255
13256                 # restore the LIBS
13257                 LIBS="$ol_LIBS"
13258         
13259 fi
13260
13261 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13262
13263         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13264                 ol_link_pthreads="-lpthread -lmach -lexc"
13265                 ol_link_threads=posix
13266         fi
13267 fi
13268
13269
13270                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13271 if test "$ol_link_threads" = no ; then
13272         # try -lpthread -Wl,-woff,85
13273         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13274 echo "configure:13275: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13275 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13276   echo $ac_n "(cached) $ac_c" 1>&6
13277 else
13278   
13279                 # save the flags
13280                 ol_LIBS="$LIBS"
13281                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13282
13283                 if test "$cross_compiling" = yes; then
13284   cat > conftest.$ac_ext <<EOF
13285 #line 13286 "configure"
13286 #include "confdefs.h"
13287 /* pthread test headers */
13288 #include <pthread.h>
13289 #if HAVE_PTHREADS < 7
13290 #include <errno.h>
13291 #endif
13292 #ifndef NULL
13293 #define NULL (void*)0
13294 #endif
13295
13296 static void *task(p)
13297         void *p;
13298 {
13299         return (void *) (p == NULL);
13300 }
13301
13302 int main() {
13303
13304         /* pthread test function */
13305 #ifndef PTHREAD_CREATE_DETACHED
13306 #define PTHREAD_CREATE_DETACHED 1
13307 #endif
13308         pthread_t t;
13309         int status;
13310         int detach = PTHREAD_CREATE_DETACHED;
13311
13312 #if HAVE_PTHREADS > 4
13313         /* Final pthreads */
13314         pthread_attr_t attr;
13315
13316         status = pthread_attr_init(&attr);
13317         if( status ) return status;
13318
13319 #if HAVE_PTHREADS < 7
13320         status = pthread_attr_setdetachstate(&attr, &detach);
13321         if( status < 0 ) status = errno;
13322 #else
13323         status = pthread_attr_setdetachstate(&attr, detach);
13324 #endif
13325         if( status ) return status;
13326         status = pthread_create( &t, &attr, task, NULL );
13327 #if HAVE_PTHREADS < 7
13328         if( status < 0 ) status = errno;
13329 #endif
13330         if( status ) return status;
13331 #else
13332         /* Draft 4 pthreads */
13333         status = pthread_create( &t, pthread_attr_default, task, NULL );
13334         if( status ) return errno;
13335
13336         /* give thread a chance to complete */
13337         /* it should remain joinable and hence detachable */
13338         sleep( 1 );
13339
13340         status = pthread_detach( &t );
13341         if( status ) return errno;
13342 #endif
13343
13344 #ifdef HAVE_LINUX_THREADS
13345         pthread_kill_other_threads_np();
13346 #endif
13347
13348         return 0;
13349
13350 ; return 0; }
13351 EOF
13352 if { (eval echo configure:13353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13353   rm -rf conftest*
13354   ol_cv_pthread_lib_lpthread_woff=yes
13355 else
13356   echo "configure: failed program was:" >&5
13357   cat conftest.$ac_ext >&5
13358   rm -rf conftest*
13359   ol_cv_pthread_lib_lpthread_woff=no
13360 fi
13361 rm -f conftest*
13362 else
13363   cat > conftest.$ac_ext <<EOF
13364 #line 13365 "configure"
13365 #include "confdefs.h"
13366 /* pthread test headers */
13367 #include <pthread.h>
13368 #if HAVE_PTHREADS < 7
13369 #include <errno.h>
13370 #endif
13371 #ifndef NULL
13372 #define NULL (void*)0
13373 #endif
13374
13375 static void *task(p)
13376         void *p;
13377 {
13378         return (void *) (p == NULL);
13379 }
13380
13381
13382 int main(argc, argv)
13383         int argc;
13384         char **argv;
13385 {
13386
13387         /* pthread test function */
13388 #ifndef PTHREAD_CREATE_DETACHED
13389 #define PTHREAD_CREATE_DETACHED 1
13390 #endif
13391         pthread_t t;
13392         int status;
13393         int detach = PTHREAD_CREATE_DETACHED;
13394
13395 #if HAVE_PTHREADS > 4
13396         /* Final pthreads */
13397         pthread_attr_t attr;
13398
13399         status = pthread_attr_init(&attr);
13400         if( status ) return status;
13401
13402 #if HAVE_PTHREADS < 7
13403         status = pthread_attr_setdetachstate(&attr, &detach);
13404         if( status < 0 ) status = errno;
13405 #else
13406         status = pthread_attr_setdetachstate(&attr, detach);
13407 #endif
13408         if( status ) return status;
13409         status = pthread_create( &t, &attr, task, NULL );
13410 #if HAVE_PTHREADS < 7
13411         if( status < 0 ) status = errno;
13412 #endif
13413         if( status ) return status;
13414 #else
13415         /* Draft 4 pthreads */
13416         status = pthread_create( &t, pthread_attr_default, task, NULL );
13417         if( status ) return errno;
13418
13419         /* give thread a chance to complete */
13420         /* it should remain joinable and hence detachable */
13421         sleep( 1 );
13422
13423         status = pthread_detach( &t );
13424         if( status ) return errno;
13425 #endif
13426
13427 #ifdef HAVE_LINUX_THREADS
13428         pthread_kill_other_threads_np();
13429 #endif
13430
13431         return 0;
13432
13433 }
13434
13435 EOF
13436 if { (eval echo configure:13437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13437 then
13438   ol_cv_pthread_lib_lpthread_woff=yes
13439 else
13440   echo "configure: failed program was:" >&5
13441   cat conftest.$ac_ext >&5
13442   rm -fr conftest*
13443   ol_cv_pthread_lib_lpthread_woff=no
13444 fi
13445 rm -fr conftest*
13446 fi
13447
13448
13449                 # restore the LIBS
13450                 LIBS="$ol_LIBS"
13451         
13452 fi
13453
13454 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13455
13456         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13457                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13458                 ol_link_threads=posix
13459         fi
13460 fi
13461
13462
13463                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13464 if test "$ol_link_threads" = no ; then
13465         # try -lpthread
13466         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13467 echo "configure:13468: checking for pthread link with -lpthread" >&5
13468 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13469   echo $ac_n "(cached) $ac_c" 1>&6
13470 else
13471   
13472                 # save the flags
13473                 ol_LIBS="$LIBS"
13474                 LIBS="-lpthread $LIBS"
13475
13476                 if test "$cross_compiling" = yes; then
13477   cat > conftest.$ac_ext <<EOF
13478 #line 13479 "configure"
13479 #include "confdefs.h"
13480 /* pthread test headers */
13481 #include <pthread.h>
13482 #if HAVE_PTHREADS < 7
13483 #include <errno.h>
13484 #endif
13485 #ifndef NULL
13486 #define NULL (void*)0
13487 #endif
13488
13489 static void *task(p)
13490         void *p;
13491 {
13492         return (void *) (p == NULL);
13493 }
13494
13495 int main() {
13496
13497         /* pthread test function */
13498 #ifndef PTHREAD_CREATE_DETACHED
13499 #define PTHREAD_CREATE_DETACHED 1
13500 #endif
13501         pthread_t t;
13502         int status;
13503         int detach = PTHREAD_CREATE_DETACHED;
13504
13505 #if HAVE_PTHREADS > 4
13506         /* Final pthreads */
13507         pthread_attr_t attr;
13508
13509         status = pthread_attr_init(&attr);
13510         if( status ) return status;
13511
13512 #if HAVE_PTHREADS < 7
13513         status = pthread_attr_setdetachstate(&attr, &detach);
13514         if( status < 0 ) status = errno;
13515 #else
13516         status = pthread_attr_setdetachstate(&attr, detach);
13517 #endif
13518         if( status ) return status;
13519         status = pthread_create( &t, &attr, task, NULL );
13520 #if HAVE_PTHREADS < 7
13521         if( status < 0 ) status = errno;
13522 #endif
13523         if( status ) return status;
13524 #else
13525         /* Draft 4 pthreads */
13526         status = pthread_create( &t, pthread_attr_default, task, NULL );
13527         if( status ) return errno;
13528
13529         /* give thread a chance to complete */
13530         /* it should remain joinable and hence detachable */
13531         sleep( 1 );
13532
13533         status = pthread_detach( &t );
13534         if( status ) return errno;
13535 #endif
13536
13537 #ifdef HAVE_LINUX_THREADS
13538         pthread_kill_other_threads_np();
13539 #endif
13540
13541         return 0;
13542
13543 ; return 0; }
13544 EOF
13545 if { (eval echo configure:13546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13546   rm -rf conftest*
13547   ol_cv_pthread_lpthread=yes
13548 else
13549   echo "configure: failed program was:" >&5
13550   cat conftest.$ac_ext >&5
13551   rm -rf conftest*
13552   ol_cv_pthread_lpthread=no
13553 fi
13554 rm -f conftest*
13555 else
13556   cat > conftest.$ac_ext <<EOF
13557 #line 13558 "configure"
13558 #include "confdefs.h"
13559 /* pthread test headers */
13560 #include <pthread.h>
13561 #if HAVE_PTHREADS < 7
13562 #include <errno.h>
13563 #endif
13564 #ifndef NULL
13565 #define NULL (void*)0
13566 #endif
13567
13568 static void *task(p)
13569         void *p;
13570 {
13571         return (void *) (p == NULL);
13572 }
13573
13574
13575 int main(argc, argv)
13576         int argc;
13577         char **argv;
13578 {
13579
13580         /* pthread test function */
13581 #ifndef PTHREAD_CREATE_DETACHED
13582 #define PTHREAD_CREATE_DETACHED 1
13583 #endif
13584         pthread_t t;
13585         int status;
13586         int detach = PTHREAD_CREATE_DETACHED;
13587
13588 #if HAVE_PTHREADS > 4
13589         /* Final pthreads */
13590         pthread_attr_t attr;
13591
13592         status = pthread_attr_init(&attr);
13593         if( status ) return status;
13594
13595 #if HAVE_PTHREADS < 7
13596         status = pthread_attr_setdetachstate(&attr, &detach);
13597         if( status < 0 ) status = errno;
13598 #else
13599         status = pthread_attr_setdetachstate(&attr, detach);
13600 #endif
13601         if( status ) return status;
13602         status = pthread_create( &t, &attr, task, NULL );
13603 #if HAVE_PTHREADS < 7
13604         if( status < 0 ) status = errno;
13605 #endif
13606         if( status ) return status;
13607 #else
13608         /* Draft 4 pthreads */
13609         status = pthread_create( &t, pthread_attr_default, task, NULL );
13610         if( status ) return errno;
13611
13612         /* give thread a chance to complete */
13613         /* it should remain joinable and hence detachable */
13614         sleep( 1 );
13615
13616         status = pthread_detach( &t );
13617         if( status ) return errno;
13618 #endif
13619
13620 #ifdef HAVE_LINUX_THREADS
13621         pthread_kill_other_threads_np();
13622 #endif
13623
13624         return 0;
13625
13626 }
13627
13628 EOF
13629 if { (eval echo configure:13630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13630 then
13631   ol_cv_pthread_lpthread=yes
13632 else
13633   echo "configure: failed program was:" >&5
13634   cat conftest.$ac_ext >&5
13635   rm -fr conftest*
13636   ol_cv_pthread_lpthread=no
13637 fi
13638 rm -fr conftest*
13639 fi
13640
13641
13642                 # restore the LIBS
13643                 LIBS="$ol_LIBS"
13644         
13645 fi
13646
13647 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13648
13649         if test $ol_cv_pthread_lpthread = yes ; then
13650                 ol_link_pthreads="-lpthread"
13651                 ol_link_threads=posix
13652         fi
13653 fi
13654
13655                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13656 if test "$ol_link_threads" = no ; then
13657         # try -lc_r
13658         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13659 echo "configure:13660: checking for pthread link with -lc_r" >&5
13660 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13661   echo $ac_n "(cached) $ac_c" 1>&6
13662 else
13663   
13664                 # save the flags
13665                 ol_LIBS="$LIBS"
13666                 LIBS="-lc_r $LIBS"
13667
13668                 if test "$cross_compiling" = yes; then
13669   cat > conftest.$ac_ext <<EOF
13670 #line 13671 "configure"
13671 #include "confdefs.h"
13672 /* pthread test headers */
13673 #include <pthread.h>
13674 #if HAVE_PTHREADS < 7
13675 #include <errno.h>
13676 #endif
13677 #ifndef NULL
13678 #define NULL (void*)0
13679 #endif
13680
13681 static void *task(p)
13682         void *p;
13683 {
13684         return (void *) (p == NULL);
13685 }
13686
13687 int main() {
13688
13689         /* pthread test function */
13690 #ifndef PTHREAD_CREATE_DETACHED
13691 #define PTHREAD_CREATE_DETACHED 1
13692 #endif
13693         pthread_t t;
13694         int status;
13695         int detach = PTHREAD_CREATE_DETACHED;
13696
13697 #if HAVE_PTHREADS > 4
13698         /* Final pthreads */
13699         pthread_attr_t attr;
13700
13701         status = pthread_attr_init(&attr);
13702         if( status ) return status;
13703
13704 #if HAVE_PTHREADS < 7
13705         status = pthread_attr_setdetachstate(&attr, &detach);
13706         if( status < 0 ) status = errno;
13707 #else
13708         status = pthread_attr_setdetachstate(&attr, detach);
13709 #endif
13710         if( status ) return status;
13711         status = pthread_create( &t, &attr, task, NULL );
13712 #if HAVE_PTHREADS < 7
13713         if( status < 0 ) status = errno;
13714 #endif
13715         if( status ) return status;
13716 #else
13717         /* Draft 4 pthreads */
13718         status = pthread_create( &t, pthread_attr_default, task, NULL );
13719         if( status ) return errno;
13720
13721         /* give thread a chance to complete */
13722         /* it should remain joinable and hence detachable */
13723         sleep( 1 );
13724
13725         status = pthread_detach( &t );
13726         if( status ) return errno;
13727 #endif
13728
13729 #ifdef HAVE_LINUX_THREADS
13730         pthread_kill_other_threads_np();
13731 #endif
13732
13733         return 0;
13734
13735 ; return 0; }
13736 EOF
13737 if { (eval echo configure:13738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13738   rm -rf conftest*
13739   ol_cv_pthread_lc_r=yes
13740 else
13741   echo "configure: failed program was:" >&5
13742   cat conftest.$ac_ext >&5
13743   rm -rf conftest*
13744   ol_cv_pthread_lc_r=no
13745 fi
13746 rm -f conftest*
13747 else
13748   cat > conftest.$ac_ext <<EOF
13749 #line 13750 "configure"
13750 #include "confdefs.h"
13751 /* pthread test headers */
13752 #include <pthread.h>
13753 #if HAVE_PTHREADS < 7
13754 #include <errno.h>
13755 #endif
13756 #ifndef NULL
13757 #define NULL (void*)0
13758 #endif
13759
13760 static void *task(p)
13761         void *p;
13762 {
13763         return (void *) (p == NULL);
13764 }
13765
13766
13767 int main(argc, argv)
13768         int argc;
13769         char **argv;
13770 {
13771
13772         /* pthread test function */
13773 #ifndef PTHREAD_CREATE_DETACHED
13774 #define PTHREAD_CREATE_DETACHED 1
13775 #endif
13776         pthread_t t;
13777         int status;
13778         int detach = PTHREAD_CREATE_DETACHED;
13779
13780 #if HAVE_PTHREADS > 4
13781         /* Final pthreads */
13782         pthread_attr_t attr;
13783
13784         status = pthread_attr_init(&attr);
13785         if( status ) return status;
13786
13787 #if HAVE_PTHREADS < 7
13788         status = pthread_attr_setdetachstate(&attr, &detach);
13789         if( status < 0 ) status = errno;
13790 #else
13791         status = pthread_attr_setdetachstate(&attr, detach);
13792 #endif
13793         if( status ) return status;
13794         status = pthread_create( &t, &attr, task, NULL );
13795 #if HAVE_PTHREADS < 7
13796         if( status < 0 ) status = errno;
13797 #endif
13798         if( status ) return status;
13799 #else
13800         /* Draft 4 pthreads */
13801         status = pthread_create( &t, pthread_attr_default, task, NULL );
13802         if( status ) return errno;
13803
13804         /* give thread a chance to complete */
13805         /* it should remain joinable and hence detachable */
13806         sleep( 1 );
13807
13808         status = pthread_detach( &t );
13809         if( status ) return errno;
13810 #endif
13811
13812 #ifdef HAVE_LINUX_THREADS
13813         pthread_kill_other_threads_np();
13814 #endif
13815
13816         return 0;
13817
13818 }
13819
13820 EOF
13821 if { (eval echo configure:13822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13822 then
13823   ol_cv_pthread_lc_r=yes
13824 else
13825   echo "configure: failed program was:" >&5
13826   cat conftest.$ac_ext >&5
13827   rm -fr conftest*
13828   ol_cv_pthread_lc_r=no
13829 fi
13830 rm -fr conftest*
13831 fi
13832
13833
13834                 # restore the LIBS
13835                 LIBS="$ol_LIBS"
13836         
13837 fi
13838
13839 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13840
13841         if test $ol_cv_pthread_lc_r = yes ; then
13842                 ol_link_pthreads="-lc_r"
13843                 ol_link_threads=posix
13844         fi
13845 fi
13846
13847
13848                 # Pthread try link: -threads (ol_cv_pthread_threads)
13849 if test "$ol_link_threads" = no ; then
13850         # try -threads
13851         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13852 echo "configure:13853: checking for pthread link with -threads" >&5
13853 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13854   echo $ac_n "(cached) $ac_c" 1>&6
13855 else
13856   
13857                 # save the flags
13858                 ol_LIBS="$LIBS"
13859                 LIBS="-threads $LIBS"
13860
13861                 if test "$cross_compiling" = yes; then
13862   cat > conftest.$ac_ext <<EOF
13863 #line 13864 "configure"
13864 #include "confdefs.h"
13865 /* pthread test headers */
13866 #include <pthread.h>
13867 #if HAVE_PTHREADS < 7
13868 #include <errno.h>
13869 #endif
13870 #ifndef NULL
13871 #define NULL (void*)0
13872 #endif
13873
13874 static void *task(p)
13875         void *p;
13876 {
13877         return (void *) (p == NULL);
13878 }
13879
13880 int main() {
13881
13882         /* pthread test function */
13883 #ifndef PTHREAD_CREATE_DETACHED
13884 #define PTHREAD_CREATE_DETACHED 1
13885 #endif
13886         pthread_t t;
13887         int status;
13888         int detach = PTHREAD_CREATE_DETACHED;
13889
13890 #if HAVE_PTHREADS > 4
13891         /* Final pthreads */
13892         pthread_attr_t attr;
13893
13894         status = pthread_attr_init(&attr);
13895         if( status ) return status;
13896
13897 #if HAVE_PTHREADS < 7
13898         status = pthread_attr_setdetachstate(&attr, &detach);
13899         if( status < 0 ) status = errno;
13900 #else
13901         status = pthread_attr_setdetachstate(&attr, detach);
13902 #endif
13903         if( status ) return status;
13904         status = pthread_create( &t, &attr, task, NULL );
13905 #if HAVE_PTHREADS < 7
13906         if( status < 0 ) status = errno;
13907 #endif
13908         if( status ) return status;
13909 #else
13910         /* Draft 4 pthreads */
13911         status = pthread_create( &t, pthread_attr_default, task, NULL );
13912         if( status ) return errno;
13913
13914         /* give thread a chance to complete */
13915         /* it should remain joinable and hence detachable */
13916         sleep( 1 );
13917
13918         status = pthread_detach( &t );
13919         if( status ) return errno;
13920 #endif
13921
13922 #ifdef HAVE_LINUX_THREADS
13923         pthread_kill_other_threads_np();
13924 #endif
13925
13926         return 0;
13927
13928 ; return 0; }
13929 EOF
13930 if { (eval echo configure:13931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13931   rm -rf conftest*
13932   ol_cv_pthread_threads=yes
13933 else
13934   echo "configure: failed program was:" >&5
13935   cat conftest.$ac_ext >&5
13936   rm -rf conftest*
13937   ol_cv_pthread_threads=no
13938 fi
13939 rm -f conftest*
13940 else
13941   cat > conftest.$ac_ext <<EOF
13942 #line 13943 "configure"
13943 #include "confdefs.h"
13944 /* pthread test headers */
13945 #include <pthread.h>
13946 #if HAVE_PTHREADS < 7
13947 #include <errno.h>
13948 #endif
13949 #ifndef NULL
13950 #define NULL (void*)0
13951 #endif
13952
13953 static void *task(p)
13954         void *p;
13955 {
13956         return (void *) (p == NULL);
13957 }
13958
13959
13960 int main(argc, argv)
13961         int argc;
13962         char **argv;
13963 {
13964
13965         /* pthread test function */
13966 #ifndef PTHREAD_CREATE_DETACHED
13967 #define PTHREAD_CREATE_DETACHED 1
13968 #endif
13969         pthread_t t;
13970         int status;
13971         int detach = PTHREAD_CREATE_DETACHED;
13972
13973 #if HAVE_PTHREADS > 4
13974         /* Final pthreads */
13975         pthread_attr_t attr;
13976
13977         status = pthread_attr_init(&attr);
13978         if( status ) return status;
13979
13980 #if HAVE_PTHREADS < 7
13981         status = pthread_attr_setdetachstate(&attr, &detach);
13982         if( status < 0 ) status = errno;
13983 #else
13984         status = pthread_attr_setdetachstate(&attr, detach);
13985 #endif
13986         if( status ) return status;
13987         status = pthread_create( &t, &attr, task, NULL );
13988 #if HAVE_PTHREADS < 7
13989         if( status < 0 ) status = errno;
13990 #endif
13991         if( status ) return status;
13992 #else
13993         /* Draft 4 pthreads */
13994         status = pthread_create( &t, pthread_attr_default, task, NULL );
13995         if( status ) return errno;
13996
13997         /* give thread a chance to complete */
13998         /* it should remain joinable and hence detachable */
13999         sleep( 1 );
14000
14001         status = pthread_detach( &t );
14002         if( status ) return errno;
14003 #endif
14004
14005 #ifdef HAVE_LINUX_THREADS
14006         pthread_kill_other_threads_np();
14007 #endif
14008
14009         return 0;
14010
14011 }
14012
14013 EOF
14014 if { (eval echo configure:14015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14015 then
14016   ol_cv_pthread_threads=yes
14017 else
14018   echo "configure: failed program was:" >&5
14019   cat conftest.$ac_ext >&5
14020   rm -fr conftest*
14021   ol_cv_pthread_threads=no
14022 fi
14023 rm -fr conftest*
14024 fi
14025
14026
14027                 # restore the LIBS
14028                 LIBS="$ol_LIBS"
14029         
14030 fi
14031
14032 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14033
14034         if test $ol_cv_pthread_threads = yes ; then
14035                 ol_link_pthreads="-threads"
14036                 ol_link_threads=posix
14037         fi
14038 fi
14039
14040
14041                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14042 if test "$ol_link_threads" = no ; then
14043         # try -lpthreads -lmach -lexc -lc_r
14044         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14045 echo "configure:14046: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14046 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14047   echo $ac_n "(cached) $ac_c" 1>&6
14048 else
14049   
14050                 # save the flags
14051                 ol_LIBS="$LIBS"
14052                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14053
14054                 if test "$cross_compiling" = yes; then
14055   cat > conftest.$ac_ext <<EOF
14056 #line 14057 "configure"
14057 #include "confdefs.h"
14058 /* pthread test headers */
14059 #include <pthread.h>
14060 #if HAVE_PTHREADS < 7
14061 #include <errno.h>
14062 #endif
14063 #ifndef NULL
14064 #define NULL (void*)0
14065 #endif
14066
14067 static void *task(p)
14068         void *p;
14069 {
14070         return (void *) (p == NULL);
14071 }
14072
14073 int main() {
14074
14075         /* pthread test function */
14076 #ifndef PTHREAD_CREATE_DETACHED
14077 #define PTHREAD_CREATE_DETACHED 1
14078 #endif
14079         pthread_t t;
14080         int status;
14081         int detach = PTHREAD_CREATE_DETACHED;
14082
14083 #if HAVE_PTHREADS > 4
14084         /* Final pthreads */
14085         pthread_attr_t attr;
14086
14087         status = pthread_attr_init(&attr);
14088         if( status ) return status;
14089
14090 #if HAVE_PTHREADS < 7
14091         status = pthread_attr_setdetachstate(&attr, &detach);
14092         if( status < 0 ) status = errno;
14093 #else
14094         status = pthread_attr_setdetachstate(&attr, detach);
14095 #endif
14096         if( status ) return status;
14097         status = pthread_create( &t, &attr, task, NULL );
14098 #if HAVE_PTHREADS < 7
14099         if( status < 0 ) status = errno;
14100 #endif
14101         if( status ) return status;
14102 #else
14103         /* Draft 4 pthreads */
14104         status = pthread_create( &t, pthread_attr_default, task, NULL );
14105         if( status ) return errno;
14106
14107         /* give thread a chance to complete */
14108         /* it should remain joinable and hence detachable */
14109         sleep( 1 );
14110
14111         status = pthread_detach( &t );
14112         if( status ) return errno;
14113 #endif
14114
14115 #ifdef HAVE_LINUX_THREADS
14116         pthread_kill_other_threads_np();
14117 #endif
14118
14119         return 0;
14120
14121 ; return 0; }
14122 EOF
14123 if { (eval echo configure:14124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14124   rm -rf conftest*
14125   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14126 else
14127   echo "configure: failed program was:" >&5
14128   cat conftest.$ac_ext >&5
14129   rm -rf conftest*
14130   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14131 fi
14132 rm -f conftest*
14133 else
14134   cat > conftest.$ac_ext <<EOF
14135 #line 14136 "configure"
14136 #include "confdefs.h"
14137 /* pthread test headers */
14138 #include <pthread.h>
14139 #if HAVE_PTHREADS < 7
14140 #include <errno.h>
14141 #endif
14142 #ifndef NULL
14143 #define NULL (void*)0
14144 #endif
14145
14146 static void *task(p)
14147         void *p;
14148 {
14149         return (void *) (p == NULL);
14150 }
14151
14152
14153 int main(argc, argv)
14154         int argc;
14155         char **argv;
14156 {
14157
14158         /* pthread test function */
14159 #ifndef PTHREAD_CREATE_DETACHED
14160 #define PTHREAD_CREATE_DETACHED 1
14161 #endif
14162         pthread_t t;
14163         int status;
14164         int detach = PTHREAD_CREATE_DETACHED;
14165
14166 #if HAVE_PTHREADS > 4
14167         /* Final pthreads */
14168         pthread_attr_t attr;
14169
14170         status = pthread_attr_init(&attr);
14171         if( status ) return status;
14172
14173 #if HAVE_PTHREADS < 7
14174         status = pthread_attr_setdetachstate(&attr, &detach);
14175         if( status < 0 ) status = errno;
14176 #else
14177         status = pthread_attr_setdetachstate(&attr, detach);
14178 #endif
14179         if( status ) return status;
14180         status = pthread_create( &t, &attr, task, NULL );
14181 #if HAVE_PTHREADS < 7
14182         if( status < 0 ) status = errno;
14183 #endif
14184         if( status ) return status;
14185 #else
14186         /* Draft 4 pthreads */
14187         status = pthread_create( &t, pthread_attr_default, task, NULL );
14188         if( status ) return errno;
14189
14190         /* give thread a chance to complete */
14191         /* it should remain joinable and hence detachable */
14192         sleep( 1 );
14193
14194         status = pthread_detach( &t );
14195         if( status ) return errno;
14196 #endif
14197
14198 #ifdef HAVE_LINUX_THREADS
14199         pthread_kill_other_threads_np();
14200 #endif
14201
14202         return 0;
14203
14204 }
14205
14206 EOF
14207 if { (eval echo configure:14208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14208 then
14209   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14210 else
14211   echo "configure: failed program was:" >&5
14212   cat conftest.$ac_ext >&5
14213   rm -fr conftest*
14214   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14215 fi
14216 rm -fr conftest*
14217 fi
14218
14219
14220                 # restore the LIBS
14221                 LIBS="$ol_LIBS"
14222         
14223 fi
14224
14225 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14226
14227         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14228                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14229                 ol_link_threads=posix
14230         fi
14231 fi
14232
14233                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14234 if test "$ol_link_threads" = no ; then
14235         # try -lpthreads -lmach -lexc
14236         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14237 echo "configure:14238: checking for pthread link with -lpthreads -lmach -lexc" >&5
14238 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14239   echo $ac_n "(cached) $ac_c" 1>&6
14240 else
14241   
14242                 # save the flags
14243                 ol_LIBS="$LIBS"
14244                 LIBS="-lpthreads -lmach -lexc $LIBS"
14245
14246                 if test "$cross_compiling" = yes; then
14247   cat > conftest.$ac_ext <<EOF
14248 #line 14249 "configure"
14249 #include "confdefs.h"
14250 /* pthread test headers */
14251 #include <pthread.h>
14252 #if HAVE_PTHREADS < 7
14253 #include <errno.h>
14254 #endif
14255 #ifndef NULL
14256 #define NULL (void*)0
14257 #endif
14258
14259 static void *task(p)
14260         void *p;
14261 {
14262         return (void *) (p == NULL);
14263 }
14264
14265 int main() {
14266
14267         /* pthread test function */
14268 #ifndef PTHREAD_CREATE_DETACHED
14269 #define PTHREAD_CREATE_DETACHED 1
14270 #endif
14271         pthread_t t;
14272         int status;
14273         int detach = PTHREAD_CREATE_DETACHED;
14274
14275 #if HAVE_PTHREADS > 4
14276         /* Final pthreads */
14277         pthread_attr_t attr;
14278
14279         status = pthread_attr_init(&attr);
14280         if( status ) return status;
14281
14282 #if HAVE_PTHREADS < 7
14283         status = pthread_attr_setdetachstate(&attr, &detach);
14284         if( status < 0 ) status = errno;
14285 #else
14286         status = pthread_attr_setdetachstate(&attr, detach);
14287 #endif
14288         if( status ) return status;
14289         status = pthread_create( &t, &attr, task, NULL );
14290 #if HAVE_PTHREADS < 7
14291         if( status < 0 ) status = errno;
14292 #endif
14293         if( status ) return status;
14294 #else
14295         /* Draft 4 pthreads */
14296         status = pthread_create( &t, pthread_attr_default, task, NULL );
14297         if( status ) return errno;
14298
14299         /* give thread a chance to complete */
14300         /* it should remain joinable and hence detachable */
14301         sleep( 1 );
14302
14303         status = pthread_detach( &t );
14304         if( status ) return errno;
14305 #endif
14306
14307 #ifdef HAVE_LINUX_THREADS
14308         pthread_kill_other_threads_np();
14309 #endif
14310
14311         return 0;
14312
14313 ; return 0; }
14314 EOF
14315 if { (eval echo configure:14316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14316   rm -rf conftest*
14317   ol_cv_pthread_lpthreads_lmach_lexc=yes
14318 else
14319   echo "configure: failed program was:" >&5
14320   cat conftest.$ac_ext >&5
14321   rm -rf conftest*
14322   ol_cv_pthread_lpthreads_lmach_lexc=no
14323 fi
14324 rm -f conftest*
14325 else
14326   cat > conftest.$ac_ext <<EOF
14327 #line 14328 "configure"
14328 #include "confdefs.h"
14329 /* pthread test headers */
14330 #include <pthread.h>
14331 #if HAVE_PTHREADS < 7
14332 #include <errno.h>
14333 #endif
14334 #ifndef NULL
14335 #define NULL (void*)0
14336 #endif
14337
14338 static void *task(p)
14339         void *p;
14340 {
14341         return (void *) (p == NULL);
14342 }
14343
14344
14345 int main(argc, argv)
14346         int argc;
14347         char **argv;
14348 {
14349
14350         /* pthread test function */
14351 #ifndef PTHREAD_CREATE_DETACHED
14352 #define PTHREAD_CREATE_DETACHED 1
14353 #endif
14354         pthread_t t;
14355         int status;
14356         int detach = PTHREAD_CREATE_DETACHED;
14357
14358 #if HAVE_PTHREADS > 4
14359         /* Final pthreads */
14360         pthread_attr_t attr;
14361
14362         status = pthread_attr_init(&attr);
14363         if( status ) return status;
14364
14365 #if HAVE_PTHREADS < 7
14366         status = pthread_attr_setdetachstate(&attr, &detach);
14367         if( status < 0 ) status = errno;
14368 #else
14369         status = pthread_attr_setdetachstate(&attr, detach);
14370 #endif
14371         if( status ) return status;
14372         status = pthread_create( &t, &attr, task, NULL );
14373 #if HAVE_PTHREADS < 7
14374         if( status < 0 ) status = errno;
14375 #endif
14376         if( status ) return status;
14377 #else
14378         /* Draft 4 pthreads */
14379         status = pthread_create( &t, pthread_attr_default, task, NULL );
14380         if( status ) return errno;
14381
14382         /* give thread a chance to complete */
14383         /* it should remain joinable and hence detachable */
14384         sleep( 1 );
14385
14386         status = pthread_detach( &t );
14387         if( status ) return errno;
14388 #endif
14389
14390 #ifdef HAVE_LINUX_THREADS
14391         pthread_kill_other_threads_np();
14392 #endif
14393
14394         return 0;
14395
14396 }
14397
14398 EOF
14399 if { (eval echo configure:14400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14400 then
14401   ol_cv_pthread_lpthreads_lmach_lexc=yes
14402 else
14403   echo "configure: failed program was:" >&5
14404   cat conftest.$ac_ext >&5
14405   rm -fr conftest*
14406   ol_cv_pthread_lpthreads_lmach_lexc=no
14407 fi
14408 rm -fr conftest*
14409 fi
14410
14411
14412                 # restore the LIBS
14413                 LIBS="$ol_LIBS"
14414         
14415 fi
14416
14417 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14418
14419         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14420                 ol_link_pthreads="-lpthreads -lmach -lexc"
14421                 ol_link_threads=posix
14422         fi
14423 fi
14424
14425                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14426 if test "$ol_link_threads" = no ; then
14427         # try -lpthreads -lexc
14428         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14429 echo "configure:14430: checking for pthread link with -lpthreads -lexc" >&5
14430 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14431   echo $ac_n "(cached) $ac_c" 1>&6
14432 else
14433   
14434                 # save the flags
14435                 ol_LIBS="$LIBS"
14436                 LIBS="-lpthreads -lexc $LIBS"
14437
14438                 if test "$cross_compiling" = yes; then
14439   cat > conftest.$ac_ext <<EOF
14440 #line 14441 "configure"
14441 #include "confdefs.h"
14442 /* pthread test headers */
14443 #include <pthread.h>
14444 #if HAVE_PTHREADS < 7
14445 #include <errno.h>
14446 #endif
14447 #ifndef NULL
14448 #define NULL (void*)0
14449 #endif
14450
14451 static void *task(p)
14452         void *p;
14453 {
14454         return (void *) (p == NULL);
14455 }
14456
14457 int main() {
14458
14459         /* pthread test function */
14460 #ifndef PTHREAD_CREATE_DETACHED
14461 #define PTHREAD_CREATE_DETACHED 1
14462 #endif
14463         pthread_t t;
14464         int status;
14465         int detach = PTHREAD_CREATE_DETACHED;
14466
14467 #if HAVE_PTHREADS > 4
14468         /* Final pthreads */
14469         pthread_attr_t attr;
14470
14471         status = pthread_attr_init(&attr);
14472         if( status ) return status;
14473
14474 #if HAVE_PTHREADS < 7
14475         status = pthread_attr_setdetachstate(&attr, &detach);
14476         if( status < 0 ) status = errno;
14477 #else
14478         status = pthread_attr_setdetachstate(&attr, detach);
14479 #endif
14480         if( status ) return status;
14481         status = pthread_create( &t, &attr, task, NULL );
14482 #if HAVE_PTHREADS < 7
14483         if( status < 0 ) status = errno;
14484 #endif
14485         if( status ) return status;
14486 #else
14487         /* Draft 4 pthreads */
14488         status = pthread_create( &t, pthread_attr_default, task, NULL );
14489         if( status ) return errno;
14490
14491         /* give thread a chance to complete */
14492         /* it should remain joinable and hence detachable */
14493         sleep( 1 );
14494
14495         status = pthread_detach( &t );
14496         if( status ) return errno;
14497 #endif
14498
14499 #ifdef HAVE_LINUX_THREADS
14500         pthread_kill_other_threads_np();
14501 #endif
14502
14503         return 0;
14504
14505 ; return 0; }
14506 EOF
14507 if { (eval echo configure:14508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14508   rm -rf conftest*
14509   ol_cv_pthread_lpthreads_lexc=yes
14510 else
14511   echo "configure: failed program was:" >&5
14512   cat conftest.$ac_ext >&5
14513   rm -rf conftest*
14514   ol_cv_pthread_lpthreads_lexc=no
14515 fi
14516 rm -f conftest*
14517 else
14518   cat > conftest.$ac_ext <<EOF
14519 #line 14520 "configure"
14520 #include "confdefs.h"
14521 /* pthread test headers */
14522 #include <pthread.h>
14523 #if HAVE_PTHREADS < 7
14524 #include <errno.h>
14525 #endif
14526 #ifndef NULL
14527 #define NULL (void*)0
14528 #endif
14529
14530 static void *task(p)
14531         void *p;
14532 {
14533         return (void *) (p == NULL);
14534 }
14535
14536
14537 int main(argc, argv)
14538         int argc;
14539         char **argv;
14540 {
14541
14542         /* pthread test function */
14543 #ifndef PTHREAD_CREATE_DETACHED
14544 #define PTHREAD_CREATE_DETACHED 1
14545 #endif
14546         pthread_t t;
14547         int status;
14548         int detach = PTHREAD_CREATE_DETACHED;
14549
14550 #if HAVE_PTHREADS > 4
14551         /* Final pthreads */
14552         pthread_attr_t attr;
14553
14554         status = pthread_attr_init(&attr);
14555         if( status ) return status;
14556
14557 #if HAVE_PTHREADS < 7
14558         status = pthread_attr_setdetachstate(&attr, &detach);
14559         if( status < 0 ) status = errno;
14560 #else
14561         status = pthread_attr_setdetachstate(&attr, detach);
14562 #endif
14563         if( status ) return status;
14564         status = pthread_create( &t, &attr, task, NULL );
14565 #if HAVE_PTHREADS < 7
14566         if( status < 0 ) status = errno;
14567 #endif
14568         if( status ) return status;
14569 #else
14570         /* Draft 4 pthreads */
14571         status = pthread_create( &t, pthread_attr_default, task, NULL );
14572         if( status ) return errno;
14573
14574         /* give thread a chance to complete */
14575         /* it should remain joinable and hence detachable */
14576         sleep( 1 );
14577
14578         status = pthread_detach( &t );
14579         if( status ) return errno;
14580 #endif
14581
14582 #ifdef HAVE_LINUX_THREADS
14583         pthread_kill_other_threads_np();
14584 #endif
14585
14586         return 0;
14587
14588 }
14589
14590 EOF
14591 if { (eval echo configure:14592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14592 then
14593   ol_cv_pthread_lpthreads_lexc=yes
14594 else
14595   echo "configure: failed program was:" >&5
14596   cat conftest.$ac_ext >&5
14597   rm -fr conftest*
14598   ol_cv_pthread_lpthreads_lexc=no
14599 fi
14600 rm -fr conftest*
14601 fi
14602
14603
14604                 # restore the LIBS
14605                 LIBS="$ol_LIBS"
14606         
14607 fi
14608
14609 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14610
14611         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14612                 ol_link_pthreads="-lpthreads -lexc"
14613                 ol_link_threads=posix
14614         fi
14615 fi
14616
14617
14618                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14619 if test "$ol_link_threads" = no ; then
14620         # try -lpthreads
14621         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14622 echo "configure:14623: checking for pthread link with -lpthreads" >&5
14623 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14624   echo $ac_n "(cached) $ac_c" 1>&6
14625 else
14626   
14627                 # save the flags
14628                 ol_LIBS="$LIBS"
14629                 LIBS="-lpthreads $LIBS"
14630
14631                 if test "$cross_compiling" = yes; then
14632   cat > conftest.$ac_ext <<EOF
14633 #line 14634 "configure"
14634 #include "confdefs.h"
14635 /* pthread test headers */
14636 #include <pthread.h>
14637 #if HAVE_PTHREADS < 7
14638 #include <errno.h>
14639 #endif
14640 #ifndef NULL
14641 #define NULL (void*)0
14642 #endif
14643
14644 static void *task(p)
14645         void *p;
14646 {
14647         return (void *) (p == NULL);
14648 }
14649
14650 int main() {
14651
14652         /* pthread test function */
14653 #ifndef PTHREAD_CREATE_DETACHED
14654 #define PTHREAD_CREATE_DETACHED 1
14655 #endif
14656         pthread_t t;
14657         int status;
14658         int detach = PTHREAD_CREATE_DETACHED;
14659
14660 #if HAVE_PTHREADS > 4
14661         /* Final pthreads */
14662         pthread_attr_t attr;
14663
14664         status = pthread_attr_init(&attr);
14665         if( status ) return status;
14666
14667 #if HAVE_PTHREADS < 7
14668         status = pthread_attr_setdetachstate(&attr, &detach);
14669         if( status < 0 ) status = errno;
14670 #else
14671         status = pthread_attr_setdetachstate(&attr, detach);
14672 #endif
14673         if( status ) return status;
14674         status = pthread_create( &t, &attr, task, NULL );
14675 #if HAVE_PTHREADS < 7
14676         if( status < 0 ) status = errno;
14677 #endif
14678         if( status ) return status;
14679 #else
14680         /* Draft 4 pthreads */
14681         status = pthread_create( &t, pthread_attr_default, task, NULL );
14682         if( status ) return errno;
14683
14684         /* give thread a chance to complete */
14685         /* it should remain joinable and hence detachable */
14686         sleep( 1 );
14687
14688         status = pthread_detach( &t );
14689         if( status ) return errno;
14690 #endif
14691
14692 #ifdef HAVE_LINUX_THREADS
14693         pthread_kill_other_threads_np();
14694 #endif
14695
14696         return 0;
14697
14698 ; return 0; }
14699 EOF
14700 if { (eval echo configure:14701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14701   rm -rf conftest*
14702   ol_cv_pthread_lib_lpthreads=yes
14703 else
14704   echo "configure: failed program was:" >&5
14705   cat conftest.$ac_ext >&5
14706   rm -rf conftest*
14707   ol_cv_pthread_lib_lpthreads=no
14708 fi
14709 rm -f conftest*
14710 else
14711   cat > conftest.$ac_ext <<EOF
14712 #line 14713 "configure"
14713 #include "confdefs.h"
14714 /* pthread test headers */
14715 #include <pthread.h>
14716 #if HAVE_PTHREADS < 7
14717 #include <errno.h>
14718 #endif
14719 #ifndef NULL
14720 #define NULL (void*)0
14721 #endif
14722
14723 static void *task(p)
14724         void *p;
14725 {
14726         return (void *) (p == NULL);
14727 }
14728
14729
14730 int main(argc, argv)
14731         int argc;
14732         char **argv;
14733 {
14734
14735         /* pthread test function */
14736 #ifndef PTHREAD_CREATE_DETACHED
14737 #define PTHREAD_CREATE_DETACHED 1
14738 #endif
14739         pthread_t t;
14740         int status;
14741         int detach = PTHREAD_CREATE_DETACHED;
14742
14743 #if HAVE_PTHREADS > 4
14744         /* Final pthreads */
14745         pthread_attr_t attr;
14746
14747         status = pthread_attr_init(&attr);
14748         if( status ) return status;
14749
14750 #if HAVE_PTHREADS < 7
14751         status = pthread_attr_setdetachstate(&attr, &detach);
14752         if( status < 0 ) status = errno;
14753 #else
14754         status = pthread_attr_setdetachstate(&attr, detach);
14755 #endif
14756         if( status ) return status;
14757         status = pthread_create( &t, &attr, task, NULL );
14758 #if HAVE_PTHREADS < 7
14759         if( status < 0 ) status = errno;
14760 #endif
14761         if( status ) return status;
14762 #else
14763         /* Draft 4 pthreads */
14764         status = pthread_create( &t, pthread_attr_default, task, NULL );
14765         if( status ) return errno;
14766
14767         /* give thread a chance to complete */
14768         /* it should remain joinable and hence detachable */
14769         sleep( 1 );
14770
14771         status = pthread_detach( &t );
14772         if( status ) return errno;
14773 #endif
14774
14775 #ifdef HAVE_LINUX_THREADS
14776         pthread_kill_other_threads_np();
14777 #endif
14778
14779         return 0;
14780
14781 }
14782
14783 EOF
14784 if { (eval echo configure:14785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14785 then
14786   ol_cv_pthread_lib_lpthreads=yes
14787 else
14788   echo "configure: failed program was:" >&5
14789   cat conftest.$ac_ext >&5
14790   rm -fr conftest*
14791   ol_cv_pthread_lib_lpthreads=no
14792 fi
14793 rm -fr conftest*
14794 fi
14795
14796
14797                 # restore the LIBS
14798                 LIBS="$ol_LIBS"
14799         
14800 fi
14801
14802 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14803
14804         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14805                 ol_link_pthreads="-lpthreads"
14806                 ol_link_threads=posix
14807         fi
14808 fi
14809
14810
14811                 if test $ol_link_threads != no ; then
14812                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14813
14814                                                 save_CPPFLAGS="$CPPFLAGS"
14815                         save_LIBS="$LIBS"
14816                         LIBS="$LTHREAD_LIBS $LIBS"
14817
14818                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14819 do
14820 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14821 echo "configure:14822: checking for $ac_func" >&5
14822 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14823   echo $ac_n "(cached) $ac_c" 1>&6
14824 else
14825   cat > conftest.$ac_ext <<EOF
14826 #line 14827 "configure"
14827 #include "confdefs.h"
14828 /* System header to define __stub macros and hopefully few prototypes,
14829     which can conflict with char $ac_func(); below.  */
14830 #include <assert.h>
14831 /* Override any gcc2 internal prototype to avoid an error.  */
14832 /* We use char because int might match the return type of a gcc2
14833     builtin and then its argument prototype would still apply.  */
14834 char $ac_func();
14835 char (*f)();
14836
14837 int main() {
14838
14839 /* The GNU C library defines this for functions which it implements
14840     to always fail with ENOSYS.  Some functions are actually named
14841     something starting with __ and the normal name is an alias.  */
14842 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14843 choke me
14844 #else
14845 f = $ac_func;
14846 #endif
14847
14848 ; return 0; }
14849 EOF
14850 if { (eval echo configure:14851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14851   rm -rf conftest*
14852   eval "ac_cv_func_$ac_func=yes"
14853 else
14854   echo "configure: failed program was:" >&5
14855   cat conftest.$ac_ext >&5
14856   rm -rf conftest*
14857   eval "ac_cv_func_$ac_func=no"
14858 fi
14859 rm -f conftest*
14860 fi
14861
14862 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14863   echo "$ac_t""yes" 1>&6
14864     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14865   cat >> confdefs.h <<EOF
14866 #define $ac_tr_func 1
14867 EOF
14868  
14869 else
14870   echo "$ac_t""no" 1>&6
14871 fi
14872 done
14873
14874
14875                         if test $ac_cv_func_sched_yield = no -a \
14876                                 $ac_cv_func_pthread_yield = no -a \
14877                                 $ac_cv_func_thr_yield = no ; then
14878                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14879 echo "configure:14880: checking for sched_yield in -lrt" >&5
14880 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14881 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14882   echo $ac_n "(cached) $ac_c" 1>&6
14883 else
14884   ac_save_LIBS="$LIBS"
14885 LIBS="-lrt  $LIBS"
14886 cat > conftest.$ac_ext <<EOF
14887 #line 14888 "configure"
14888 #include "confdefs.h"
14889 /* Override any gcc2 internal prototype to avoid an error.  */
14890 /* We use char because int might match the return type of a gcc2
14891     builtin and then its argument prototype would still apply.  */
14892 char sched_yield();
14893
14894 int main() {
14895 sched_yield()
14896 ; return 0; }
14897 EOF
14898 if { (eval echo configure:14899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14899   rm -rf conftest*
14900   eval "ac_cv_lib_$ac_lib_var=yes"
14901 else
14902   echo "configure: failed program was:" >&5
14903   cat conftest.$ac_ext >&5
14904   rm -rf conftest*
14905   eval "ac_cv_lib_$ac_lib_var=no"
14906 fi
14907 rm -f conftest*
14908 LIBS="$ac_save_LIBS"
14909
14910 fi
14911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14912   echo "$ac_t""yes" 1>&6
14913   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14914                                         cat >> confdefs.h <<\EOF
14915 #define HAVE_SCHED_YIELD 1
14916 EOF
14917
14918                                         ac_cv_func_sched_yield=yes
14919 else
14920   echo "$ac_t""no" 1>&6
14921 ac_cv_func_sched_yield=no
14922 fi
14923
14924                         fi
14925                         if test $ac_cv_func_sched_yield = no -a \
14926                                 $ac_cv_func_pthread_yield = no -a \
14927                                 "$ac_cv_func_thr_yield" = no ; then
14928                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14929                         fi
14930
14931                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14932 do
14933 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14934 echo "configure:14935: checking for $ac_func" >&5
14935 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14936   echo $ac_n "(cached) $ac_c" 1>&6
14937 else
14938   cat > conftest.$ac_ext <<EOF
14939 #line 14940 "configure"
14940 #include "confdefs.h"
14941 /* System header to define __stub macros and hopefully few prototypes,
14942     which can conflict with char $ac_func(); below.  */
14943 #include <assert.h>
14944 /* Override any gcc2 internal prototype to avoid an error.  */
14945 /* We use char because int might match the return type of a gcc2
14946     builtin and then its argument prototype would still apply.  */
14947 char $ac_func();
14948 char (*f)();
14949
14950 int main() {
14951
14952 /* The GNU C library defines this for functions which it implements
14953     to always fail with ENOSYS.  Some functions are actually named
14954     something starting with __ and the normal name is an alias.  */
14955 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14956 choke me
14957 #else
14958 f = $ac_func;
14959 #endif
14960
14961 ; return 0; }
14962 EOF
14963 if { (eval echo configure:14964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14964   rm -rf conftest*
14965   eval "ac_cv_func_$ac_func=yes"
14966 else
14967   echo "configure: failed program was:" >&5
14968   cat conftest.$ac_ext >&5
14969   rm -rf conftest*
14970   eval "ac_cv_func_$ac_func=no"
14971 fi
14972 rm -f conftest*
14973 fi
14974
14975 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14976   echo "$ac_t""yes" 1>&6
14977     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14978   cat >> confdefs.h <<EOF
14979 #define $ac_tr_func 1
14980 EOF
14981  
14982 else
14983   echo "$ac_t""no" 1>&6
14984 fi
14985 done
14986
14987
14988                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14989 echo "configure:14990: checking for pthread_detach with <pthread.h>" >&5
14990 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14991   echo $ac_n "(cached) $ac_c" 1>&6
14992 else
14993   
14994                                                                 cat > conftest.$ac_ext <<EOF
14995 #line 14996 "configure"
14996 #include "confdefs.h"
14997
14998 #include <pthread.h>
14999 #ifndef NULL
15000 #define NULL (void*)0
15001 #endif
15002
15003 int main() {
15004 pthread_detach(NULL);
15005 ; return 0; }
15006 EOF
15007 if { (eval echo configure:15008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15008   rm -rf conftest*
15009   ol_cv_func_pthread_detach=yes
15010 else
15011   echo "configure: failed program was:" >&5
15012   cat conftest.$ac_ext >&5
15013   rm -rf conftest*
15014   ol_cv_func_pthread_detach=no
15015 fi
15016 rm -f conftest*
15017                         
15018 fi
15019
15020 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15021
15022                         if test $ol_cv_func_pthread_detach = no ; then
15023                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15024                         fi
15025
15026                         cat >> confdefs.h <<\EOF
15027 #define HAVE_PTHREAD_DETACH 1
15028 EOF
15029
15030
15031                                                 for ac_func in \
15032                                 pthread_setconcurrency \
15033                                 pthread_getconcurrency \
15034                                 thr_setconcurrency \
15035                                 thr_getconcurrency \
15036                         
15037 do
15038 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15039 echo "configure:15040: checking for $ac_func" >&5
15040 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15041   echo $ac_n "(cached) $ac_c" 1>&6
15042 else
15043   cat > conftest.$ac_ext <<EOF
15044 #line 15045 "configure"
15045 #include "confdefs.h"
15046 /* System header to define __stub macros and hopefully few prototypes,
15047     which can conflict with char $ac_func(); below.  */
15048 #include <assert.h>
15049 /* Override any gcc2 internal prototype to avoid an error.  */
15050 /* We use char because int might match the return type of a gcc2
15051     builtin and then its argument prototype would still apply.  */
15052 char $ac_func();
15053 char (*f)();
15054
15055 int main() {
15056
15057 /* The GNU C library defines this for functions which it implements
15058     to always fail with ENOSYS.  Some functions are actually named
15059     something starting with __ and the normal name is an alias.  */
15060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15061 choke me
15062 #else
15063 f = $ac_func;
15064 #endif
15065
15066 ; return 0; }
15067 EOF
15068 if { (eval echo configure:15069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15069   rm -rf conftest*
15070   eval "ac_cv_func_$ac_func=yes"
15071 else
15072   echo "configure: failed program was:" >&5
15073   cat conftest.$ac_ext >&5
15074   rm -rf conftest*
15075   eval "ac_cv_func_$ac_func=no"
15076 fi
15077 rm -f conftest*
15078 fi
15079
15080 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15081   echo "$ac_t""yes" 1>&6
15082     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15083   cat >> confdefs.h <<EOF
15084 #define $ac_tr_func 1
15085 EOF
15086  
15087 else
15088   echo "$ac_t""no" 1>&6
15089 fi
15090 done
15091
15092
15093                         
15094         for ac_func in pthread_kill_other_threads_np
15095 do
15096 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15097 echo "configure:15098: checking for $ac_func" >&5
15098 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15099   echo $ac_n "(cached) $ac_c" 1>&6
15100 else
15101   cat > conftest.$ac_ext <<EOF
15102 #line 15103 "configure"
15103 #include "confdefs.h"
15104 /* System header to define __stub macros and hopefully few prototypes,
15105     which can conflict with char $ac_func(); below.  */
15106 #include <assert.h>
15107 /* Override any gcc2 internal prototype to avoid an error.  */
15108 /* We use char because int might match the return type of a gcc2
15109     builtin and then its argument prototype would still apply.  */
15110 char $ac_func();
15111 char (*f)();
15112
15113 int main() {
15114
15115 /* The GNU C library defines this for functions which it implements
15116     to always fail with ENOSYS.  Some functions are actually named
15117     something starting with __ and the normal name is an alias.  */
15118 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15119 choke me
15120 #else
15121 f = $ac_func;
15122 #endif
15123
15124 ; return 0; }
15125 EOF
15126 if { (eval echo configure:15127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15127   rm -rf conftest*
15128   eval "ac_cv_func_$ac_func=yes"
15129 else
15130   echo "configure: failed program was:" >&5
15131   cat conftest.$ac_ext >&5
15132   rm -rf conftest*
15133   eval "ac_cv_func_$ac_func=no"
15134 fi
15135 rm -f conftest*
15136 fi
15137
15138 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15139   echo "$ac_t""yes" 1>&6
15140     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15141   cat >> confdefs.h <<EOF
15142 #define $ac_tr_func 1
15143 EOF
15144  
15145 else
15146   echo "$ac_t""no" 1>&6
15147 fi
15148 done
15149
15150         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15151 echo "configure:15152: checking for LinuxThreads implementation" >&5
15152 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15153   echo $ac_n "(cached) $ac_c" 1>&6
15154 else
15155   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15156 fi
15157
15158 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15159
15160                         
15161         
15162         
15163         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15164 echo "configure:15165: checking for LinuxThreads consistency" >&5
15165 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15166   echo $ac_n "(cached) $ac_c" 1>&6
15167 else
15168   
15169                 if test $ol_cv_header_linux_threads = yes -a \
15170                         $ol_cv_sys_linux_threads = yes; then
15171                         ol_cv_linux_threads=yes
15172                 elif test $ol_cv_header_linux_threads = no -a \
15173                         $ol_cv_sys_linux_threads = no; then
15174                         ol_cv_linux_threads=no
15175                 else
15176                         ol_cv_linux_threads=error
15177                 fi
15178         
15179 fi
15180
15181 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15182
15183
15184                         if test $ol_cv_linux_threads = error; then
15185                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15186                         fi
15187
15188                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15189 echo "configure:15190: checking if pthread_create() works" >&5
15190 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15191   echo $ac_n "(cached) $ac_c" 1>&6
15192 else
15193   
15194                         if test "$cross_compiling" = yes; then
15195                                 ol_cv_pthread_create_works=yes
15196 else
15197   cat > conftest.$ac_ext <<EOF
15198 #line 15199 "configure"
15199 #include "confdefs.h"
15200 /* pthread test headers */
15201 #include <pthread.h>
15202 #if HAVE_PTHREADS < 7
15203 #include <errno.h>
15204 #endif
15205 #ifndef NULL
15206 #define NULL (void*)0
15207 #endif
15208
15209 static void *task(p)
15210         void *p;
15211 {
15212         return (void *) (p == NULL);
15213 }
15214
15215
15216 int main(argc, argv)
15217         int argc;
15218         char **argv;
15219 {
15220
15221         /* pthread test function */
15222 #ifndef PTHREAD_CREATE_DETACHED
15223 #define PTHREAD_CREATE_DETACHED 1
15224 #endif
15225         pthread_t t;
15226         int status;
15227         int detach = PTHREAD_CREATE_DETACHED;
15228
15229 #if HAVE_PTHREADS > 4
15230         /* Final pthreads */
15231         pthread_attr_t attr;
15232
15233         status = pthread_attr_init(&attr);
15234         if( status ) return status;
15235
15236 #if HAVE_PTHREADS < 7
15237         status = pthread_attr_setdetachstate(&attr, &detach);
15238         if( status < 0 ) status = errno;
15239 #else
15240         status = pthread_attr_setdetachstate(&attr, detach);
15241 #endif
15242         if( status ) return status;
15243         status = pthread_create( &t, &attr, task, NULL );
15244 #if HAVE_PTHREADS < 7
15245         if( status < 0 ) status = errno;
15246 #endif
15247         if( status ) return status;
15248 #else
15249         /* Draft 4 pthreads */
15250         status = pthread_create( &t, pthread_attr_default, task, NULL );
15251         if( status ) return errno;
15252
15253         /* give thread a chance to complete */
15254         /* it should remain joinable and hence detachable */
15255         sleep( 1 );
15256
15257         status = pthread_detach( &t );
15258         if( status ) return errno;
15259 #endif
15260
15261 #ifdef HAVE_LINUX_THREADS
15262         pthread_kill_other_threads_np();
15263 #endif
15264
15265         return 0;
15266
15267 }
15268
15269 EOF
15270 if { (eval echo configure:15271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15271 then
15272   ol_cv_pthread_create_works=yes
15273 else
15274   echo "configure: failed program was:" >&5
15275   cat conftest.$ac_ext >&5
15276   rm -fr conftest*
15277   ol_cv_pthread_create_works=no
15278 fi
15279 rm -fr conftest*
15280 fi
15281
15282 fi
15283
15284 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15285
15286                         if test $ol_cv_pthread_create_works = no ; then
15287                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15288                         fi
15289
15290                                                 if test $ol_with_yielding_select = auto ; then
15291                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15292 echo "configure:15293: checking if select yields when using pthreads" >&5
15293 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15294   echo $ac_n "(cached) $ac_c" 1>&6
15295 else
15296   
15297                                 if test "$cross_compiling" = yes; then
15298   ol_cv_pthread_select_yields=cross
15299 else
15300   cat > conftest.$ac_ext <<EOF
15301 #line 15302 "configure"
15302 #include "confdefs.h"
15303
15304 #include <sys/types.h>
15305 #include <sys/time.h>
15306 #include <unistd.h>
15307 #include <pthread.h>
15308 #ifndef NULL
15309 #define NULL (void*) 0
15310 #endif
15311
15312 static int fildes[2];
15313
15314 static void *task(p)
15315         void *p;
15316 {
15317         int i;
15318         struct timeval tv;
15319
15320         fd_set rfds;
15321
15322         tv.tv_sec=10;
15323         tv.tv_usec=0;
15324
15325         FD_ZERO(&rfds);
15326         FD_SET(fildes[0], &rfds);
15327
15328         /* we're not interested in any fds */
15329         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15330
15331         if(i < 0) {
15332                 perror("select");
15333                 exit(10);
15334         }
15335
15336         exit(0); /* if we exit here, the select blocked the whole process */
15337 }
15338
15339 int main(argc, argv)
15340         int argc;
15341         char **argv;
15342 {
15343         pthread_t t;
15344
15345         /* create a pipe to select */
15346         if(pipe(&fildes[0])) {
15347                 perror("select");
15348                 exit(1);
15349         }
15350
15351 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15352         (void) pthread_setconcurrency(2);
15353 #else
15354 #ifdef HAVE_THR_SETCONCURRENCY
15355         /* Set Solaris LWP concurrency to 2 */
15356         thr_setconcurrency(2);
15357 #endif
15358 #endif
15359
15360 #if HAVE_PTHREADS < 6
15361         pthread_create(&t, pthread_attr_default, task, NULL);
15362 #else
15363         pthread_create(&t, NULL, task, NULL);
15364 #endif
15365
15366         /* make sure task runs first */
15367 #if HAVE_THR_YIELD
15368         thr_yield();
15369 #elif defined( HAVE_SCHED_YIELD )
15370         sched_yield();
15371 #elif defined( HAVE_PTHREAD_YIELD )
15372         pthread_yield();
15373 #endif
15374
15375         exit(2);
15376 }
15377 EOF
15378 if { (eval echo configure:15379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15379 then
15380   ol_cv_pthread_select_yields=no
15381 else
15382   echo "configure: failed program was:" >&5
15383   cat conftest.$ac_ext >&5
15384   rm -fr conftest*
15385   ol_cv_pthread_select_yields=yes
15386 fi
15387 rm -fr conftest*
15388 fi
15389
15390 fi
15391
15392 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15393
15394                                 if test $ol_cv_pthread_select_yields = cross ; then
15395                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15396                                 fi
15397
15398                                 if test $ol_cv_pthread_select_yields = yes ; then
15399                                         ol_with_yielding_select=yes
15400                                 fi
15401                         fi
15402
15403                                                 CPPFLAGS="$save_CPPFLAGS"
15404                         LIBS="$save_LIBS"
15405                 else
15406                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15407                 fi
15408         fi
15409
15410         if test $ol_with_threads = posix ; then
15411                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15412         fi
15413 fi
15414
15415 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15416         -o $ol_with_threads = mach ; then
15417
15418                 for ac_hdr in mach/cthreads.h cthreads.h
15419 do
15420 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15421 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15422 echo "configure:15423: checking for $ac_hdr" >&5
15423 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15424   echo $ac_n "(cached) $ac_c" 1>&6
15425 else
15426   cat > conftest.$ac_ext <<EOF
15427 #line 15428 "configure"
15428 #include "confdefs.h"
15429 #include <$ac_hdr>
15430 EOF
15431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15432 { (eval echo configure:15433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15434 if test -z "$ac_err"; then
15435   rm -rf conftest*
15436   eval "ac_cv_header_$ac_safe=yes"
15437 else
15438   echo "$ac_err" >&5
15439   echo "configure: failed program was:" >&5
15440   cat conftest.$ac_ext >&5
15441   rm -rf conftest*
15442   eval "ac_cv_header_$ac_safe=no"
15443 fi
15444 rm -f conftest*
15445 fi
15446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15447   echo "$ac_t""yes" 1>&6
15448     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15449   cat >> confdefs.h <<EOF
15450 #define $ac_tr_hdr 1
15451 EOF
15452  
15453 else
15454   echo "$ac_t""no" 1>&6
15455 fi
15456 done
15457
15458         if test $ac_cv_header_mach_cthreads_h = yes ; then
15459                 ol_with_threads=found
15460
15461                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15462 echo "configure:15463: checking for cthread_fork" >&5
15463 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15464   echo $ac_n "(cached) $ac_c" 1>&6
15465 else
15466   cat > conftest.$ac_ext <<EOF
15467 #line 15468 "configure"
15468 #include "confdefs.h"
15469 /* System header to define __stub macros and hopefully few prototypes,
15470     which can conflict with char cthread_fork(); below.  */
15471 #include <assert.h>
15472 /* Override any gcc2 internal prototype to avoid an error.  */
15473 /* We use char because int might match the return type of a gcc2
15474     builtin and then its argument prototype would still apply.  */
15475 char cthread_fork();
15476 char (*f)();
15477
15478 int main() {
15479
15480 /* The GNU C library defines this for functions which it implements
15481     to always fail with ENOSYS.  Some functions are actually named
15482     something starting with __ and the normal name is an alias.  */
15483 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15484 choke me
15485 #else
15486 f = cthread_fork;
15487 #endif
15488
15489 ; return 0; }
15490 EOF
15491 if { (eval echo configure:15492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15492   rm -rf conftest*
15493   eval "ac_cv_func_cthread_fork=yes"
15494 else
15495   echo "configure: failed program was:" >&5
15496   cat conftest.$ac_ext >&5
15497   rm -rf conftest*
15498   eval "ac_cv_func_cthread_fork=no"
15499 fi
15500 rm -f conftest*
15501 fi
15502
15503 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15504   echo "$ac_t""yes" 1>&6
15505   ol_link_threads=yes
15506 else
15507   echo "$ac_t""no" 1>&6
15508 fi
15509
15510
15511                 if test $ol_link_threads = no ; then
15512                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15513 echo "configure:15514: checking for cthread_fork with -all_load" >&5
15514 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15515   echo $ac_n "(cached) $ac_c" 1>&6
15516 else
15517   
15518                                                                 save_LIBS="$LIBS"
15519                                 LIBS="-all_load $LIBS"
15520                                 cat > conftest.$ac_ext <<EOF
15521 #line 15522 "configure"
15522 #include "confdefs.h"
15523 #include <mach/cthreads.h>
15524 int main() {
15525
15526                                         cthread_fork((void *)0, (void *)0);
15527                                         
15528 ; return 0; }
15529 EOF
15530 if { (eval echo configure:15531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15531   rm -rf conftest*
15532   ol_cv_cthread_all_load=yes
15533 else
15534   echo "configure: failed program was:" >&5
15535   cat conftest.$ac_ext >&5
15536   rm -rf conftest*
15537   ol_cv_cthread_all_load=no
15538 fi
15539 rm -f conftest*
15540                                                                 LIBS="$save_LIBS"
15541                         
15542 fi
15543
15544 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15545
15546                         if test $ol_cv_cthread_all_load = yes ; then
15547                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15548                                 ol_link_threads=mach
15549                                 ol_with_threads=found
15550                         fi
15551                 fi
15552
15553         elif test $ac_cv_header_cthreads_h = yes ; then
15554                                 
15555                 ol_with_threads=found
15556  
15557                                 save_LIBS="$LIBS"
15558                 LIBS="$LIBS -lthreads"
15559                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15560 echo "configure:15561: checking for cthread_fork" >&5
15561 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15562   echo $ac_n "(cached) $ac_c" 1>&6
15563 else
15564   cat > conftest.$ac_ext <<EOF
15565 #line 15566 "configure"
15566 #include "confdefs.h"
15567 /* System header to define __stub macros and hopefully few prototypes,
15568     which can conflict with char cthread_fork(); below.  */
15569 #include <assert.h>
15570 /* Override any gcc2 internal prototype to avoid an error.  */
15571 /* We use char because int might match the return type of a gcc2
15572     builtin and then its argument prototype would still apply.  */
15573 char cthread_fork();
15574 char (*f)();
15575
15576 int main() {
15577
15578 /* The GNU C library defines this for functions which it implements
15579     to always fail with ENOSYS.  Some functions are actually named
15580     something starting with __ and the normal name is an alias.  */
15581 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15582 choke me
15583 #else
15584 f = cthread_fork;
15585 #endif
15586
15587 ; return 0; }
15588 EOF
15589 if { (eval echo configure:15590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15590   rm -rf conftest*
15591   eval "ac_cv_func_cthread_fork=yes"
15592 else
15593   echo "configure: failed program was:" >&5
15594   cat conftest.$ac_ext >&5
15595   rm -rf conftest*
15596   eval "ac_cv_func_cthread_fork=no"
15597 fi
15598 rm -f conftest*
15599 fi
15600
15601 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15602   echo "$ac_t""yes" 1>&6
15603   ol_link_threads=yes
15604 else
15605   echo "$ac_t""no" 1>&6
15606 fi
15607
15608                 LIBS="$save_LIBS"
15609
15610                 if test $ol_link_threads = yes ; then
15611                         LTHREAD_LIBS="-lthreads"
15612                         ol_link_threads=mach
15613                         ol_with_threads=found
15614                 else
15615                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15616                 fi
15617
15618         elif test $ol_with_threads = mach ; then
15619                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15620         fi
15621
15622         if test $ol_link_threads = mach ; then
15623                 cat >> confdefs.h <<\EOF
15624 #define HAVE_MACH_CTHREADS 1
15625 EOF
15626
15627         elif test $ol_with_threads = found ; then
15628                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15629         fi
15630 fi
15631
15632 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15633         -o $ol_with_threads = pth ; then
15634
15635         for ac_hdr in pth.h
15636 do
15637 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15638 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15639 echo "configure:15640: checking for $ac_hdr" >&5
15640 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15641   echo $ac_n "(cached) $ac_c" 1>&6
15642 else
15643   cat > conftest.$ac_ext <<EOF
15644 #line 15645 "configure"
15645 #include "confdefs.h"
15646 #include <$ac_hdr>
15647 EOF
15648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15649 { (eval echo configure:15650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15651 if test -z "$ac_err"; then
15652   rm -rf conftest*
15653   eval "ac_cv_header_$ac_safe=yes"
15654 else
15655   echo "$ac_err" >&5
15656   echo "configure: failed program was:" >&5
15657   cat conftest.$ac_ext >&5
15658   rm -rf conftest*
15659   eval "ac_cv_header_$ac_safe=no"
15660 fi
15661 rm -f conftest*
15662 fi
15663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15664   echo "$ac_t""yes" 1>&6
15665     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15666   cat >> confdefs.h <<EOF
15667 #define $ac_tr_hdr 1
15668 EOF
15669  
15670 else
15671   echo "$ac_t""no" 1>&6
15672 fi
15673 done
15674
15675
15676         if test $ac_cv_header_pth_h = yes ; then
15677                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15678 echo "configure:15679: checking for pth_version in -lpth" >&5
15679 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15680 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15681   echo $ac_n "(cached) $ac_c" 1>&6
15682 else
15683   ac_save_LIBS="$LIBS"
15684 LIBS="-lpth  $LIBS"
15685 cat > conftest.$ac_ext <<EOF
15686 #line 15687 "configure"
15687 #include "confdefs.h"
15688 /* Override any gcc2 internal prototype to avoid an error.  */
15689 /* We use char because int might match the return type of a gcc2
15690     builtin and then its argument prototype would still apply.  */
15691 char pth_version();
15692
15693 int main() {
15694 pth_version()
15695 ; return 0; }
15696 EOF
15697 if { (eval echo configure:15698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15698   rm -rf conftest*
15699   eval "ac_cv_lib_$ac_lib_var=yes"
15700 else
15701   echo "configure: failed program was:" >&5
15702   cat conftest.$ac_ext >&5
15703   rm -rf conftest*
15704   eval "ac_cv_lib_$ac_lib_var=no"
15705 fi
15706 rm -f conftest*
15707 LIBS="$ac_save_LIBS"
15708
15709 fi
15710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15711   echo "$ac_t""yes" 1>&6
15712   have_pth=yes
15713 else
15714   echo "$ac_t""no" 1>&6
15715 have_pth=no
15716 fi
15717
15718
15719                 if test $have_pth = yes ; then
15720                         cat >> confdefs.h <<\EOF
15721 #define HAVE_GNU_PTH 1
15722 EOF
15723
15724                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15725                         ol_link_threads=pth
15726                         ol_with_threads=found
15727
15728                         if test $ol_with_yielding_select = auto ; then
15729                                 ol_with_yielding_select=yes
15730                         fi
15731                 fi
15732         fi
15733 fi
15734
15735 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15736         -o $ol_with_threads = lwp ; then
15737
15738                 for ac_hdr in thread.h synch.h
15739 do
15740 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15741 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15742 echo "configure:15743: checking for $ac_hdr" >&5
15743 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15744   echo $ac_n "(cached) $ac_c" 1>&6
15745 else
15746   cat > conftest.$ac_ext <<EOF
15747 #line 15748 "configure"
15748 #include "confdefs.h"
15749 #include <$ac_hdr>
15750 EOF
15751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15752 { (eval echo configure:15753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15754 if test -z "$ac_err"; then
15755   rm -rf conftest*
15756   eval "ac_cv_header_$ac_safe=yes"
15757 else
15758   echo "$ac_err" >&5
15759   echo "configure: failed program was:" >&5
15760   cat conftest.$ac_ext >&5
15761   rm -rf conftest*
15762   eval "ac_cv_header_$ac_safe=no"
15763 fi
15764 rm -f conftest*
15765 fi
15766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15767   echo "$ac_t""yes" 1>&6
15768     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15769   cat >> confdefs.h <<EOF
15770 #define $ac_tr_hdr 1
15771 EOF
15772  
15773 else
15774   echo "$ac_t""no" 1>&6
15775 fi
15776 done
15777
15778         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15779                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15780 echo "configure:15781: checking for thr_create in -lthread" >&5
15781 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15782 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15783   echo $ac_n "(cached) $ac_c" 1>&6
15784 else
15785   ac_save_LIBS="$LIBS"
15786 LIBS="-lthread  $LIBS"
15787 cat > conftest.$ac_ext <<EOF
15788 #line 15789 "configure"
15789 #include "confdefs.h"
15790 /* Override any gcc2 internal prototype to avoid an error.  */
15791 /* We use char because int might match the return type of a gcc2
15792     builtin and then its argument prototype would still apply.  */
15793 char thr_create();
15794
15795 int main() {
15796 thr_create()
15797 ; return 0; }
15798 EOF
15799 if { (eval echo configure:15800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15800   rm -rf conftest*
15801   eval "ac_cv_lib_$ac_lib_var=yes"
15802 else
15803   echo "configure: failed program was:" >&5
15804   cat conftest.$ac_ext >&5
15805   rm -rf conftest*
15806   eval "ac_cv_lib_$ac_lib_var=no"
15807 fi
15808 rm -f conftest*
15809 LIBS="$ac_save_LIBS"
15810
15811 fi
15812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15813   echo "$ac_t""yes" 1>&6
15814   have_thr=yes
15815 else
15816   echo "$ac_t""no" 1>&6
15817 have_thr=no
15818 fi
15819
15820
15821                 if test $have_thr = yes ; then
15822                         cat >> confdefs.h <<\EOF
15823 #define HAVE_THR 1
15824 EOF
15825
15826                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15827                         ol_link_threads=thr
15828
15829                         if test $ol_with_yielding_select = auto ; then
15830                                 ol_with_yielding_select=yes
15831                         fi
15832
15833                                                 for ac_func in \
15834                                 thr_setconcurrency \
15835                                 thr_getconcurrency \
15836                         
15837 do
15838 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15839 echo "configure:15840: checking for $ac_func" >&5
15840 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15841   echo $ac_n "(cached) $ac_c" 1>&6
15842 else
15843   cat > conftest.$ac_ext <<EOF
15844 #line 15845 "configure"
15845 #include "confdefs.h"
15846 /* System header to define __stub macros and hopefully few prototypes,
15847     which can conflict with char $ac_func(); below.  */
15848 #include <assert.h>
15849 /* Override any gcc2 internal prototype to avoid an error.  */
15850 /* We use char because int might match the return type of a gcc2
15851     builtin and then its argument prototype would still apply.  */
15852 char $ac_func();
15853 char (*f)();
15854
15855 int main() {
15856
15857 /* The GNU C library defines this for functions which it implements
15858     to always fail with ENOSYS.  Some functions are actually named
15859     something starting with __ and the normal name is an alias.  */
15860 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15861 choke me
15862 #else
15863 f = $ac_func;
15864 #endif
15865
15866 ; return 0; }
15867 EOF
15868 if { (eval echo configure:15869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15869   rm -rf conftest*
15870   eval "ac_cv_func_$ac_func=yes"
15871 else
15872   echo "configure: failed program was:" >&5
15873   cat conftest.$ac_ext >&5
15874   rm -rf conftest*
15875   eval "ac_cv_func_$ac_func=no"
15876 fi
15877 rm -f conftest*
15878 fi
15879
15880 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15881   echo "$ac_t""yes" 1>&6
15882     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15883   cat >> confdefs.h <<EOF
15884 #define $ac_tr_func 1
15885 EOF
15886  
15887 else
15888   echo "$ac_t""no" 1>&6
15889 fi
15890 done
15891
15892                 fi
15893         fi
15894
15895                 for ac_hdr in lwp/lwp.h
15896 do
15897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15899 echo "configure:15900: checking for $ac_hdr" >&5
15900 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15901   echo $ac_n "(cached) $ac_c" 1>&6
15902 else
15903   cat > conftest.$ac_ext <<EOF
15904 #line 15905 "configure"
15905 #include "confdefs.h"
15906 #include <$ac_hdr>
15907 EOF
15908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15909 { (eval echo configure:15910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15911 if test -z "$ac_err"; then
15912   rm -rf conftest*
15913   eval "ac_cv_header_$ac_safe=yes"
15914 else
15915   echo "$ac_err" >&5
15916   echo "configure: failed program was:" >&5
15917   cat conftest.$ac_ext >&5
15918   rm -rf conftest*
15919   eval "ac_cv_header_$ac_safe=no"
15920 fi
15921 rm -f conftest*
15922 fi
15923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15924   echo "$ac_t""yes" 1>&6
15925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15926   cat >> confdefs.h <<EOF
15927 #define $ac_tr_hdr 1
15928 EOF
15929  
15930 else
15931   echo "$ac_t""no" 1>&6
15932 fi
15933 done
15934
15935         if test $ac_cv_header_lwp_lwp_h = yes ; then
15936                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15937 echo "configure:15938: checking for lwp_create in -llwp" >&5
15938 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15939 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15940   echo $ac_n "(cached) $ac_c" 1>&6
15941 else
15942   ac_save_LIBS="$LIBS"
15943 LIBS="-llwp  $LIBS"
15944 cat > conftest.$ac_ext <<EOF
15945 #line 15946 "configure"
15946 #include "confdefs.h"
15947 /* Override any gcc2 internal prototype to avoid an error.  */
15948 /* We use char because int might match the return type of a gcc2
15949     builtin and then its argument prototype would still apply.  */
15950 char lwp_create();
15951
15952 int main() {
15953 lwp_create()
15954 ; return 0; }
15955 EOF
15956 if { (eval echo configure:15957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15957   rm -rf conftest*
15958   eval "ac_cv_lib_$ac_lib_var=yes"
15959 else
15960   echo "configure: failed program was:" >&5
15961   cat conftest.$ac_ext >&5
15962   rm -rf conftest*
15963   eval "ac_cv_lib_$ac_lib_var=no"
15964 fi
15965 rm -f conftest*
15966 LIBS="$ac_save_LIBS"
15967
15968 fi
15969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15970   echo "$ac_t""yes" 1>&6
15971   have_lwp=yes
15972 else
15973   echo "$ac_t""no" 1>&6
15974 have_lwp=no
15975 fi
15976
15977
15978                 if test $have_lwp = yes ; then
15979                         cat >> confdefs.h <<\EOF
15980 #define HAVE_LWP 1
15981 EOF
15982
15983                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15984                         ol_link_threads=lwp
15985
15986                         if test $ol_with_yielding_select = auto ; then
15987                                 ol_with_yielding_select=no
15988                         fi
15989                 fi
15990         fi
15991 fi
15992
15993 if test $ol_with_yielding_select = yes ; then
15994         cat >> confdefs.h <<\EOF
15995 #define HAVE_YIELDING_SELECT 1
15996 EOF
15997
15998 fi
15999
16000 if test $ol_with_threads = manual ; then
16001                 ol_link_threads=yes
16002
16003         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16004
16005         for ac_hdr in pthread.h sched.h
16006 do
16007 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16008 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16009 echo "configure:16010: checking for $ac_hdr" >&5
16010 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16011   echo $ac_n "(cached) $ac_c" 1>&6
16012 else
16013   cat > conftest.$ac_ext <<EOF
16014 #line 16015 "configure"
16015 #include "confdefs.h"
16016 #include <$ac_hdr>
16017 EOF
16018 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16019 { (eval echo configure:16020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16020 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16021 if test -z "$ac_err"; then
16022   rm -rf conftest*
16023   eval "ac_cv_header_$ac_safe=yes"
16024 else
16025   echo "$ac_err" >&5
16026   echo "configure: failed program was:" >&5
16027   cat conftest.$ac_ext >&5
16028   rm -rf conftest*
16029   eval "ac_cv_header_$ac_safe=no"
16030 fi
16031 rm -f conftest*
16032 fi
16033 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16034   echo "$ac_t""yes" 1>&6
16035     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16036   cat >> confdefs.h <<EOF
16037 #define $ac_tr_hdr 1
16038 EOF
16039  
16040 else
16041   echo "$ac_t""no" 1>&6
16042 fi
16043 done
16044
16045         for ac_func in sched_yield pthread_yield
16046 do
16047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16048 echo "configure:16049: checking for $ac_func" >&5
16049 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16050   echo $ac_n "(cached) $ac_c" 1>&6
16051 else
16052   cat > conftest.$ac_ext <<EOF
16053 #line 16054 "configure"
16054 #include "confdefs.h"
16055 /* System header to define __stub macros and hopefully few prototypes,
16056     which can conflict with char $ac_func(); below.  */
16057 #include <assert.h>
16058 /* Override any gcc2 internal prototype to avoid an error.  */
16059 /* We use char because int might match the return type of a gcc2
16060     builtin and then its argument prototype would still apply.  */
16061 char $ac_func();
16062 char (*f)();
16063
16064 int main() {
16065
16066 /* The GNU C library defines this for functions which it implements
16067     to always fail with ENOSYS.  Some functions are actually named
16068     something starting with __ and the normal name is an alias.  */
16069 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16070 choke me
16071 #else
16072 f = $ac_func;
16073 #endif
16074
16075 ; return 0; }
16076 EOF
16077 if { (eval echo configure:16078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16078   rm -rf conftest*
16079   eval "ac_cv_func_$ac_func=yes"
16080 else
16081   echo "configure: failed program was:" >&5
16082   cat conftest.$ac_ext >&5
16083   rm -rf conftest*
16084   eval "ac_cv_func_$ac_func=no"
16085 fi
16086 rm -f conftest*
16087 fi
16088
16089 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16090   echo "$ac_t""yes" 1>&6
16091     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16092   cat >> confdefs.h <<EOF
16093 #define $ac_tr_func 1
16094 EOF
16095  
16096 else
16097   echo "$ac_t""no" 1>&6
16098 fi
16099 done
16100
16101         
16102         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16103 echo "configure:16104: checking for LinuxThreads pthread.h" >&5
16104 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16105   echo $ac_n "(cached) $ac_c" 1>&6
16106 else
16107   cat > conftest.$ac_ext <<EOF
16108 #line 16109 "configure"
16109 #include "confdefs.h"
16110 #include <pthread.h>
16111 EOF
16112 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16113   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16114   rm -rf conftest*
16115   ol_cv_header_linux_threads=yes
16116 else
16117   rm -rf conftest*
16118   ol_cv_header_linux_threads=no
16119 fi
16120 rm -f conftest*
16121
16122                 
16123 fi
16124
16125 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16126         if test $ol_cv_header_linux_threads = yes; then
16127                 cat >> confdefs.h <<\EOF
16128 #define HAVE_LINUX_THREADS 1
16129 EOF
16130
16131         fi
16132
16133
16134         for ac_hdr in mach/cthreads.h
16135 do
16136 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16137 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16138 echo "configure:16139: checking for $ac_hdr" >&5
16139 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16140   echo $ac_n "(cached) $ac_c" 1>&6
16141 else
16142   cat > conftest.$ac_ext <<EOF
16143 #line 16144 "configure"
16144 #include "confdefs.h"
16145 #include <$ac_hdr>
16146 EOF
16147 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16148 { (eval echo configure:16149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16149 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16150 if test -z "$ac_err"; then
16151   rm -rf conftest*
16152   eval "ac_cv_header_$ac_safe=yes"
16153 else
16154   echo "$ac_err" >&5
16155   echo "configure: failed program was:" >&5
16156   cat conftest.$ac_ext >&5
16157   rm -rf conftest*
16158   eval "ac_cv_header_$ac_safe=no"
16159 fi
16160 rm -f conftest*
16161 fi
16162 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16163   echo "$ac_t""yes" 1>&6
16164     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16165   cat >> confdefs.h <<EOF
16166 #define $ac_tr_hdr 1
16167 EOF
16168  
16169 else
16170   echo "$ac_t""no" 1>&6
16171 fi
16172 done
16173
16174         for ac_hdr in lwp/lwp.h
16175 do
16176 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16177 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16178 echo "configure:16179: checking for $ac_hdr" >&5
16179 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16180   echo $ac_n "(cached) $ac_c" 1>&6
16181 else
16182   cat > conftest.$ac_ext <<EOF
16183 #line 16184 "configure"
16184 #include "confdefs.h"
16185 #include <$ac_hdr>
16186 EOF
16187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16188 { (eval echo configure:16189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16190 if test -z "$ac_err"; then
16191   rm -rf conftest*
16192   eval "ac_cv_header_$ac_safe=yes"
16193 else
16194   echo "$ac_err" >&5
16195   echo "configure: failed program was:" >&5
16196   cat conftest.$ac_ext >&5
16197   rm -rf conftest*
16198   eval "ac_cv_header_$ac_safe=no"
16199 fi
16200 rm -f conftest*
16201 fi
16202 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16203   echo "$ac_t""yes" 1>&6
16204     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16205   cat >> confdefs.h <<EOF
16206 #define $ac_tr_hdr 1
16207 EOF
16208  
16209 else
16210   echo "$ac_t""no" 1>&6
16211 fi
16212 done
16213
16214         for ac_hdr in thread.h synch.h
16215 do
16216 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16217 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16218 echo "configure:16219: checking for $ac_hdr" >&5
16219 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16220   echo $ac_n "(cached) $ac_c" 1>&6
16221 else
16222   cat > conftest.$ac_ext <<EOF
16223 #line 16224 "configure"
16224 #include "confdefs.h"
16225 #include <$ac_hdr>
16226 EOF
16227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16228 { (eval echo configure:16229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16230 if test -z "$ac_err"; then
16231   rm -rf conftest*
16232   eval "ac_cv_header_$ac_safe=yes"
16233 else
16234   echo "$ac_err" >&5
16235   echo "configure: failed program was:" >&5
16236   cat conftest.$ac_ext >&5
16237   rm -rf conftest*
16238   eval "ac_cv_header_$ac_safe=no"
16239 fi
16240 rm -f conftest*
16241 fi
16242 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16243   echo "$ac_t""yes" 1>&6
16244     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16245   cat >> confdefs.h <<EOF
16246 #define $ac_tr_hdr 1
16247 EOF
16248  
16249 else
16250   echo "$ac_t""no" 1>&6
16251 fi
16252 done
16253
16254 fi
16255
16256 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16257                         cat >> confdefs.h <<\EOF
16258 #define REENTRANT 1
16259 EOF
16260
16261         cat >> confdefs.h <<\EOF
16262 #define _REENTRANT 1
16263 EOF
16264
16265         cat >> confdefs.h <<\EOF
16266 #define THREAD_SAFE 1
16267 EOF
16268
16269         cat >> confdefs.h <<\EOF
16270 #define _THREAD_SAFE 1
16271 EOF
16272
16273         cat >> confdefs.h <<\EOF
16274 #define THREADSAFE 1
16275 EOF
16276
16277         cat >> confdefs.h <<\EOF
16278 #define _THREADSAFE 1
16279 EOF
16280
16281         cat >> confdefs.h <<\EOF
16282 #define _SGI_MP_SOURCE 1
16283 EOF
16284
16285
16286                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16287 echo "configure:16288: checking for thread specific errno" >&5
16288 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16289   echo $ac_n "(cached) $ac_c" 1>&6
16290 else
16291   
16292                 cat > conftest.$ac_ext <<EOF
16293 #line 16294 "configure"
16294 #include "confdefs.h"
16295 #include <errno.h>
16296 int main() {
16297 errno = 0;
16298 ; return 0; }
16299 EOF
16300 if { (eval echo configure:16301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16301   rm -rf conftest*
16302   ol_cv_errno_thread_specific=yes
16303 else
16304   echo "configure: failed program was:" >&5
16305   cat conftest.$ac_ext >&5
16306   rm -rf conftest*
16307   ol_cv_errno_thread_specific=no
16308 fi
16309 rm -f conftest*
16310         
16311 fi
16312
16313 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16314
16315                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16316 echo "configure:16317: checking for thread specific h_errno" >&5
16317 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16318   echo $ac_n "(cached) $ac_c" 1>&6
16319 else
16320   
16321                 cat > conftest.$ac_ext <<EOF
16322 #line 16323 "configure"
16323 #include "confdefs.h"
16324 #include <netdb.h>
16325 int main() {
16326 h_errno = 0;
16327 ; return 0; }
16328 EOF
16329 if { (eval echo configure:16330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16330   rm -rf conftest*
16331   ol_cv_h_errno_thread_specific=yes
16332 else
16333   echo "configure: failed program was:" >&5
16334   cat conftest.$ac_ext >&5
16335   rm -rf conftest*
16336   ol_cv_h_errno_thread_specific=no
16337 fi
16338 rm -f conftest*
16339         
16340 fi
16341
16342 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16343
16344         if test $ol_cv_errno_thread_specific != yes \
16345                 -o $ol_cv_h_errno_thread_specific != yes ; then
16346                 LIBS="$LTHREAD_LIBS $LIBS"
16347                 LTHREAD_LIBS=""
16348         fi
16349
16350 fi  
16351
16352 if test $ol_link_threads = no ; then
16353         if test $ol_with_threads = yes ; then
16354                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16355         fi
16356
16357         if test $ol_with_threads = auto ; then
16358                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16359                 ol_with_threads=no
16360         fi
16361
16362         cat >> confdefs.h <<\EOF
16363 #define NO_THREADS 1
16364 EOF
16365
16366         LTHREAD_LIBS=""
16367 fi
16368
16369 if test $ol_link_threads != no ; then
16370         cat >> confdefs.h <<\EOF
16371 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16372 EOF
16373
16374 fi
16375
16376 for ac_func in \
16377         ctime_r                 \
16378         gethostbyname_r gethostbyaddr_r \
16379
16380 do
16381 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16382 echo "configure:16383: checking for $ac_func" >&5
16383 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16384   echo $ac_n "(cached) $ac_c" 1>&6
16385 else
16386   cat > conftest.$ac_ext <<EOF
16387 #line 16388 "configure"
16388 #include "confdefs.h"
16389 /* System header to define __stub macros and hopefully few prototypes,
16390     which can conflict with char $ac_func(); below.  */
16391 #include <assert.h>
16392 /* Override any gcc2 internal prototype to avoid an error.  */
16393 /* We use char because int might match the return type of a gcc2
16394     builtin and then its argument prototype would still apply.  */
16395 char $ac_func();
16396 char (*f)();
16397
16398 int main() {
16399
16400 /* The GNU C library defines this for functions which it implements
16401     to always fail with ENOSYS.  Some functions are actually named
16402     something starting with __ and the normal name is an alias.  */
16403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16404 choke me
16405 #else
16406 f = $ac_func;
16407 #endif
16408
16409 ; return 0; }
16410 EOF
16411 if { (eval echo configure:16412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16412   rm -rf conftest*
16413   eval "ac_cv_func_$ac_func=yes"
16414 else
16415   echo "configure: failed program was:" >&5
16416   cat conftest.$ac_ext >&5
16417   rm -rf conftest*
16418   eval "ac_cv_func_$ac_func=no"
16419 fi
16420 rm -f conftest*
16421 fi
16422
16423 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16424   echo "$ac_t""yes" 1>&6
16425     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16426   cat >> confdefs.h <<EOF
16427 #define $ac_tr_func 1
16428 EOF
16429  
16430 else
16431   echo "$ac_t""no" 1>&6
16432 fi
16433 done
16434
16435
16436 if test "$ac_cv_func_ctime_r" = no ; then
16437         ol_cv_func_ctime_r_nargs=0
16438 else
16439         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16440 echo "configure:16441: checking number of arguments of ctime_r" >&5
16441 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16442   echo $ac_n "(cached) $ac_c" 1>&6
16443 else
16444   cat > conftest.$ac_ext <<EOF
16445 #line 16446 "configure"
16446 #include "confdefs.h"
16447 #include <time.h>
16448 int main() {
16449 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16450 ; return 0; }
16451 EOF
16452 if { (eval echo configure:16453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16453   rm -rf conftest*
16454   ol_cv_func_ctime_r_nargs3=yes
16455 else
16456   echo "configure: failed program was:" >&5
16457   cat conftest.$ac_ext >&5
16458   rm -rf conftest*
16459   ol_cv_func_ctime_r_nargs3=no
16460 fi
16461 rm -f conftest*
16462
16463         cat > conftest.$ac_ext <<EOF
16464 #line 16465 "configure"
16465 #include "confdefs.h"
16466 #include <time.h>
16467 int main() {
16468 time_t ti; char *buffer; ctime_r(&ti,buffer);
16469 ; return 0; }
16470 EOF
16471 if { (eval echo configure:16472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16472   rm -rf conftest*
16473   ol_cv_func_ctime_r_nargs2=yes
16474 else
16475   echo "configure: failed program was:" >&5
16476   cat conftest.$ac_ext >&5
16477   rm -rf conftest*
16478   ol_cv_func_ctime_r_nargs2=no
16479 fi
16480 rm -f conftest*
16481
16482         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16483                 $ol_cv_func_ctime_r_nargs2 = no ; then
16484
16485                 ol_cv_func_ctime_r_nargs=3
16486
16487         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16488                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16489
16490                 ol_cv_func_ctime_r_nargs=2
16491
16492         else
16493                 ol_cv_func_ctime_r_nargs=0
16494         fi
16495   
16496 fi
16497
16498 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16499
16500   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16501         cat >> confdefs.h <<EOF
16502 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16503 EOF
16504
16505   fi
16506
16507 fi
16508
16509 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16510         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16511 echo "configure:16512: checking number of arguments of gethostbyname_r" >&5
16512 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16513   echo $ac_n "(cached) $ac_c" 1>&6
16514 else
16515   cat > conftest.$ac_ext <<EOF
16516 #line 16517 "configure"
16517 #include "confdefs.h"
16518 #include <sys/types.h>
16519 #include <sys/socket.h>
16520 #include <netinet/in.h>
16521 #include <netdb.h>
16522 #define BUFSIZE (sizeof(struct hostent)+10)
16523 int main() {
16524 struct hostent hent; char buffer[BUFSIZE];
16525                 int bufsize=BUFSIZE;int h_errno;
16526                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16527                         buffer, bufsize, &h_errno);
16528 ; return 0; }
16529 EOF
16530 if { (eval echo configure:16531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16531   rm -rf conftest*
16532   ol_cv_func_gethostbyname_r_nargs5=yes
16533 else
16534   echo "configure: failed program was:" >&5
16535   cat conftest.$ac_ext >&5
16536   rm -rf conftest*
16537   ol_cv_func_gethostbyname_r_nargs5=no
16538 fi
16539 rm -f conftest*
16540
16541         cat > conftest.$ac_ext <<EOF
16542 #line 16543 "configure"
16543 #include "confdefs.h"
16544 #include <sys/types.h>
16545 #include <sys/socket.h>
16546 #include <netinet/in.h>
16547 #include <netdb.h>
16548 #define BUFSIZE (sizeof(struct hostent)+10)
16549 int main() {
16550 struct hostent hent;struct hostent *rhent;
16551                 char buffer[BUFSIZE];
16552                 int bufsize=BUFSIZE;int h_errno;
16553                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16554                         &rhent, &h_errno);
16555 ; return 0; }
16556 EOF
16557 if { (eval echo configure:16558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16558   rm -rf conftest*
16559   ol_cv_func_gethostbyname_r_nargs6=yes
16560 else
16561   echo "configure: failed program was:" >&5
16562   cat conftest.$ac_ext >&5
16563   rm -rf conftest*
16564   ol_cv_func_gethostbyname_r_nargs6=no
16565 fi
16566 rm -f conftest*
16567
16568         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16569                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16570
16571                 ol_cv_func_gethostbyname_r_nargs=5
16572
16573         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16574                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16575
16576                 ol_cv_func_gethostbyname_r_nargs=6
16577
16578         else
16579                 ol_cv_func_gethostbyname_r_nargs=0
16580         fi
16581   
16582 fi
16583
16584 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16585   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16586         cat >> confdefs.h <<EOF
16587 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16588 EOF
16589
16590   fi
16591
16592 else
16593         ol_cv_func_gethostbyname_r_nargs=0
16594 fi
16595  
16596 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16597         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16598 echo "configure:16599: checking number of arguments of gethostbyaddr_r" >&5
16599 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16600   echo $ac_n "(cached) $ac_c" 1>&6
16601 else
16602   cat > conftest.$ac_ext <<EOF
16603 #line 16604 "configure"
16604 #include "confdefs.h"
16605 #include <sys/types.h>
16606 #include <sys/socket.h>
16607 #include <netinet/in.h>
16608 #include <netdb.h>
16609 #define BUFSIZE (sizeof(struct hostent)+10)
16610 int main() {
16611 struct hostent hent; char buffer[BUFSIZE]; 
16612             struct in_addr add;
16613             size_t alen=sizeof(struct in_addr);
16614             int bufsize=BUFSIZE;int h_errno;
16615                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16616                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16617 ; return 0; }
16618 EOF
16619 if { (eval echo configure:16620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16620   rm -rf conftest*
16621   ol_cv_func_gethostbyaddr_r_nargs7=yes
16622 else
16623   echo "configure: failed program was:" >&5
16624   cat conftest.$ac_ext >&5
16625   rm -rf conftest*
16626   ol_cv_func_gethostbyaddr_r_nargs7=no
16627 fi
16628 rm -f conftest*
16629
16630         cat > conftest.$ac_ext <<EOF
16631 #line 16632 "configure"
16632 #include "confdefs.h"
16633 #include <sys/types.h>
16634 #include <sys/socket.h>
16635 #include <netinet/in.h>
16636 #include <netdb.h>
16637 #define BUFSIZE (sizeof(struct hostent)+10)
16638 int main() {
16639 struct hostent hent;
16640                 struct hostent *rhent; char buffer[BUFSIZE]; 
16641                 struct in_addr add;
16642                 size_t alen=sizeof(struct in_addr);
16643                 int bufsize=BUFSIZE;int h_errno;
16644                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16645                         alen, AF_INET, &hent, buffer, bufsize, 
16646                         &rhent, &h_errno);
16647 ; return 0; }
16648 EOF
16649 if { (eval echo configure:16650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16650   rm -rf conftest*
16651   ol_cv_func_gethostbyaddr_r_nargs8=yes
16652 else
16653   echo "configure: failed program was:" >&5
16654   cat conftest.$ac_ext >&5
16655   rm -rf conftest*
16656   ol_cv_func_gethostbyaddr_r_nargs8=no
16657 fi
16658 rm -f conftest*
16659
16660         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16661                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16662
16663                 ol_cv_func_gethostbyaddr_r_nargs=7
16664
16665         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16666                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16667
16668                 ol_cv_func_gethostbyaddr_r_nargs=8
16669
16670         else
16671                 ol_cv_func_gethostbyaddr_r_nargs=0
16672         fi
16673   
16674 fi
16675
16676 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16677   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16678     cat >> confdefs.h <<EOF
16679 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16680 EOF
16681
16682   fi
16683
16684 else
16685         ol_cv_func_gethostbyaddr_r_nargs=0
16686 fi
16687
16688 ol_link_ldbm=no 
16689
16690 if test $ol_with_ldbm_api = auto \
16691         -o $ol_with_ldbm_api = berkeley \
16692         -o $ol_with_ldbm_api = bcompat ; then
16693
16694         if test $ol_with_ldbm_api = bcompat; then \
16695                 for ac_hdr in db_185.h db.h
16696 do
16697 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16698 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16699 echo "configure:16700: checking for $ac_hdr" >&5
16700 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16701   echo $ac_n "(cached) $ac_c" 1>&6
16702 else
16703   cat > conftest.$ac_ext <<EOF
16704 #line 16705 "configure"
16705 #include "confdefs.h"
16706 #include <$ac_hdr>
16707 EOF
16708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16709 { (eval echo configure:16710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16711 if test -z "$ac_err"; then
16712   rm -rf conftest*
16713   eval "ac_cv_header_$ac_safe=yes"
16714 else
16715   echo "$ac_err" >&5
16716   echo "configure: failed program was:" >&5
16717   cat conftest.$ac_ext >&5
16718   rm -rf conftest*
16719   eval "ac_cv_header_$ac_safe=no"
16720 fi
16721 rm -f conftest*
16722 fi
16723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16724   echo "$ac_t""yes" 1>&6
16725     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16726   cat >> confdefs.h <<EOF
16727 #define $ac_tr_hdr 1
16728 EOF
16729  
16730 else
16731   echo "$ac_t""no" 1>&6
16732 fi
16733 done
16734
16735 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16736         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16737 echo "configure:16738: checking if Berkeley DB header compatibility" >&5
16738 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16739   echo $ac_n "(cached) $ac_c" 1>&6
16740 else
16741   
16742                 cat > conftest.$ac_ext <<EOF
16743 #line 16744 "configure"
16744 #include "confdefs.h"
16745
16746 #if HAVE_DB_185_H
16747 #       include <db_185.h>
16748 #else
16749 #       include <db.h>
16750 #endif
16751
16752  /* this check could be improved */
16753 #ifndef DB_VERSION_MAJOR
16754 #       define DB_VERSION_MAJOR 1
16755 #endif
16756
16757 #if DB_VERSION_MAJOR == 1 
16758         __db_version_1
16759 #endif
16760
16761 EOF
16762 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16763   egrep "__db_version_1" >/dev/null 2>&1; then
16764   rm -rf conftest*
16765   ol_cv_header_db1=yes
16766 else
16767   rm -rf conftest*
16768   ol_cv_header_db1=no
16769 fi
16770 rm -f conftest*
16771
16772 fi
16773
16774 echo "$ac_t""$ol_cv_header_db1" 1>&6
16775
16776         if test $ol_cv_header_db1 = yes ; then
16777                 ol_cv_lib_db=no
16778 if test $ol_cv_lib_db = no ; then
16779         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16780 echo "configure:16781: checking for Berkeley DB link (default)" >&5
16781 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16782   echo $ac_n "(cached) $ac_c" 1>&6
16783 else
16784   
16785         ol_DB_LIB=
16786         ol_LIBS=$LIBS
16787         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16788
16789         cat > conftest.$ac_ext <<EOF
16790 #line 16791 "configure"
16791 #include "confdefs.h"
16792
16793 #ifdef HAVE_DB_185_H
16794 # include <db_185.h>
16795 #else
16796 # include <db.h>
16797 #endif
16798
16799 #ifndef DB_VERSION_MAJOR
16800 # define DB_VERSION_MAJOR 1
16801 #endif
16802
16803 #ifndef NULL
16804 #define NULL ((void*)0)
16805 #endif
16806
16807 int main() {
16808
16809 #if DB_VERSION_MAJOR > 1
16810         {
16811                 char *version;
16812                 int major, minor, patch;
16813
16814                 version = db_version( &major, &minor, &patch );
16815
16816                 if( major != DB_VERSION_MAJOR ||
16817                         minor < DB_VERSION_MINOR )
16818                 {
16819                         printf("Berkeley DB version mismatch\n"
16820                                 "\texpected: %s\n\tgot: %s\n",
16821                                 DB_VERSION_STRING, version);
16822                         return 1;
16823                 }
16824         }
16825 #endif
16826
16827 #if DB_VERSION_MAJOR > 2
16828         db_env_create( NULL, 0 );
16829 #elif DB_VERSION_MAJOR > 1
16830         db_appexit( NULL );
16831 #else
16832         (void) dbopen( NULL, 0, 0, 0, NULL);
16833 #endif
16834
16835 ; return 0; }
16836 EOF
16837 if { (eval echo configure:16838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16838   rm -rf conftest*
16839   ol_cv_db_none=yes
16840 else
16841   echo "configure: failed program was:" >&5
16842   cat conftest.$ac_ext >&5
16843   rm -rf conftest*
16844   ol_cv_db_none=no
16845 fi
16846 rm -f conftest*
16847
16848         LIBS="$ol_LIBS"
16849
16850 fi
16851
16852 echo "$ac_t""$ol_cv_db_none" 1>&6
16853
16854         if test $ol_cv_db_none = yes ; then
16855                 ol_cv_lib_db=yes
16856         fi
16857 fi
16858
16859 if test $ol_cv_lib_db = no ; then
16860         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16861 echo "configure:16862: checking for Berkeley DB link (-ldb42)" >&5
16862 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16863   echo $ac_n "(cached) $ac_c" 1>&6
16864 else
16865   
16866         ol_DB_LIB=-ldb42
16867         ol_LIBS=$LIBS
16868         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16869
16870         cat > conftest.$ac_ext <<EOF
16871 #line 16872 "configure"
16872 #include "confdefs.h"
16873
16874 #ifdef HAVE_DB_185_H
16875 # include <db_185.h>
16876 #else
16877 # include <db.h>
16878 #endif
16879
16880 #ifndef DB_VERSION_MAJOR
16881 # define DB_VERSION_MAJOR 1
16882 #endif
16883
16884 #ifndef NULL
16885 #define NULL ((void*)0)
16886 #endif
16887
16888 int main() {
16889
16890 #if DB_VERSION_MAJOR > 1
16891         {
16892                 char *version;
16893                 int major, minor, patch;
16894
16895                 version = db_version( &major, &minor, &patch );
16896
16897                 if( major != DB_VERSION_MAJOR ||
16898                         minor < DB_VERSION_MINOR )
16899                 {
16900                         printf("Berkeley DB version mismatch\n"
16901                                 "\texpected: %s\n\tgot: %s\n",
16902                                 DB_VERSION_STRING, version);
16903                         return 1;
16904                 }
16905         }
16906 #endif
16907
16908 #if DB_VERSION_MAJOR > 2
16909         db_env_create( NULL, 0 );
16910 #elif DB_VERSION_MAJOR > 1
16911         db_appexit( NULL );
16912 #else
16913         (void) dbopen( NULL, 0, 0, 0, NULL);
16914 #endif
16915
16916 ; return 0; }
16917 EOF
16918 if { (eval echo configure:16919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16919   rm -rf conftest*
16920   ol_cv_db_db42=yes
16921 else
16922   echo "configure: failed program was:" >&5
16923   cat conftest.$ac_ext >&5
16924   rm -rf conftest*
16925   ol_cv_db_db42=no
16926 fi
16927 rm -f conftest*
16928
16929         LIBS="$ol_LIBS"
16930
16931 fi
16932
16933 echo "$ac_t""$ol_cv_db_db42" 1>&6
16934
16935         if test $ol_cv_db_db42 = yes ; then
16936                 ol_cv_lib_db=-ldb42
16937         fi
16938 fi
16939
16940 if test $ol_cv_lib_db = no ; then
16941         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16942 echo "configure:16943: checking for Berkeley DB link (-ldb-42)" >&5
16943 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16944   echo $ac_n "(cached) $ac_c" 1>&6
16945 else
16946   
16947         ol_DB_LIB=-ldb-42
16948         ol_LIBS=$LIBS
16949         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16950
16951         cat > conftest.$ac_ext <<EOF
16952 #line 16953 "configure"
16953 #include "confdefs.h"
16954
16955 #ifdef HAVE_DB_185_H
16956 # include <db_185.h>
16957 #else
16958 # include <db.h>
16959 #endif
16960
16961 #ifndef DB_VERSION_MAJOR
16962 # define DB_VERSION_MAJOR 1
16963 #endif
16964
16965 #ifndef NULL
16966 #define NULL ((void*)0)
16967 #endif
16968
16969 int main() {
16970
16971 #if DB_VERSION_MAJOR > 1
16972         {
16973                 char *version;
16974                 int major, minor, patch;
16975
16976                 version = db_version( &major, &minor, &patch );
16977
16978                 if( major != DB_VERSION_MAJOR ||
16979                         minor < DB_VERSION_MINOR )
16980                 {
16981                         printf("Berkeley DB version mismatch\n"
16982                                 "\texpected: %s\n\tgot: %s\n",
16983                                 DB_VERSION_STRING, version);
16984                         return 1;
16985                 }
16986         }
16987 #endif
16988
16989 #if DB_VERSION_MAJOR > 2
16990         db_env_create( NULL, 0 );
16991 #elif DB_VERSION_MAJOR > 1
16992         db_appexit( NULL );
16993 #else
16994         (void) dbopen( NULL, 0, 0, 0, NULL);
16995 #endif
16996
16997 ; return 0; }
16998 EOF
16999 if { (eval echo configure:17000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17000   rm -rf conftest*
17001   ol_cv_db_db_42=yes
17002 else
17003   echo "configure: failed program was:" >&5
17004   cat conftest.$ac_ext >&5
17005   rm -rf conftest*
17006   ol_cv_db_db_42=no
17007 fi
17008 rm -f conftest*
17009
17010         LIBS="$ol_LIBS"
17011
17012 fi
17013
17014 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17015
17016         if test $ol_cv_db_db_42 = yes ; then
17017                 ol_cv_lib_db=-ldb-42
17018         fi
17019 fi
17020
17021 if test $ol_cv_lib_db = no ; then
17022         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17023 echo "configure:17024: checking for Berkeley DB link (-ldb-4.2)" >&5
17024 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17025   echo $ac_n "(cached) $ac_c" 1>&6
17026 else
17027   
17028         ol_DB_LIB=-ldb-4.2
17029         ol_LIBS=$LIBS
17030         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17031
17032         cat > conftest.$ac_ext <<EOF
17033 #line 17034 "configure"
17034 #include "confdefs.h"
17035
17036 #ifdef HAVE_DB_185_H
17037 # include <db_185.h>
17038 #else
17039 # include <db.h>
17040 #endif
17041
17042 #ifndef DB_VERSION_MAJOR
17043 # define DB_VERSION_MAJOR 1
17044 #endif
17045
17046 #ifndef NULL
17047 #define NULL ((void*)0)
17048 #endif
17049
17050 int main() {
17051
17052 #if DB_VERSION_MAJOR > 1
17053         {
17054                 char *version;
17055                 int major, minor, patch;
17056
17057                 version = db_version( &major, &minor, &patch );
17058
17059                 if( major != DB_VERSION_MAJOR ||
17060                         minor < DB_VERSION_MINOR )
17061                 {
17062                         printf("Berkeley DB version mismatch\n"
17063                                 "\texpected: %s\n\tgot: %s\n",
17064                                 DB_VERSION_STRING, version);
17065                         return 1;
17066                 }
17067         }
17068 #endif
17069
17070 #if DB_VERSION_MAJOR > 2
17071         db_env_create( NULL, 0 );
17072 #elif DB_VERSION_MAJOR > 1
17073         db_appexit( NULL );
17074 #else
17075         (void) dbopen( NULL, 0, 0, 0, NULL);
17076 #endif
17077
17078 ; return 0; }
17079 EOF
17080 if { (eval echo configure:17081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17081   rm -rf conftest*
17082   ol_cv_db_db_4_dot_2=yes
17083 else
17084   echo "configure: failed program was:" >&5
17085   cat conftest.$ac_ext >&5
17086   rm -rf conftest*
17087   ol_cv_db_db_4_dot_2=no
17088 fi
17089 rm -f conftest*
17090
17091         LIBS="$ol_LIBS"
17092
17093 fi
17094
17095 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17096
17097         if test $ol_cv_db_db_4_dot_2 = yes ; then
17098                 ol_cv_lib_db=-ldb-4.2
17099         fi
17100 fi
17101
17102 if test $ol_cv_lib_db = no ; then
17103         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17104 echo "configure:17105: checking for Berkeley DB link (-ldb-4-2)" >&5
17105 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17106   echo $ac_n "(cached) $ac_c" 1>&6
17107 else
17108   
17109         ol_DB_LIB=-ldb-4-2
17110         ol_LIBS=$LIBS
17111         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17112
17113         cat > conftest.$ac_ext <<EOF
17114 #line 17115 "configure"
17115 #include "confdefs.h"
17116
17117 #ifdef HAVE_DB_185_H
17118 # include <db_185.h>
17119 #else
17120 # include <db.h>
17121 #endif
17122
17123 #ifndef DB_VERSION_MAJOR
17124 # define DB_VERSION_MAJOR 1
17125 #endif
17126
17127 #ifndef NULL
17128 #define NULL ((void*)0)
17129 #endif
17130
17131 int main() {
17132
17133 #if DB_VERSION_MAJOR > 1
17134         {
17135                 char *version;
17136                 int major, minor, patch;
17137
17138                 version = db_version( &major, &minor, &patch );
17139
17140                 if( major != DB_VERSION_MAJOR ||
17141                         minor < DB_VERSION_MINOR )
17142                 {
17143                         printf("Berkeley DB version mismatch\n"
17144                                 "\texpected: %s\n\tgot: %s\n",
17145                                 DB_VERSION_STRING, version);
17146                         return 1;
17147                 }
17148         }
17149 #endif
17150
17151 #if DB_VERSION_MAJOR > 2
17152         db_env_create( NULL, 0 );
17153 #elif DB_VERSION_MAJOR > 1
17154         db_appexit( NULL );
17155 #else
17156         (void) dbopen( NULL, 0, 0, 0, NULL);
17157 #endif
17158
17159 ; return 0; }
17160 EOF
17161 if { (eval echo configure:17162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17162   rm -rf conftest*
17163   ol_cv_db_db_4_2=yes
17164 else
17165   echo "configure: failed program was:" >&5
17166   cat conftest.$ac_ext >&5
17167   rm -rf conftest*
17168   ol_cv_db_db_4_2=no
17169 fi
17170 rm -f conftest*
17171
17172         LIBS="$ol_LIBS"
17173
17174 fi
17175
17176 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17177
17178         if test $ol_cv_db_db_4_2 = yes ; then
17179                 ol_cv_lib_db=-ldb-4-2
17180         fi
17181 fi
17182
17183 if test $ol_cv_lib_db = no ; then
17184         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17185 echo "configure:17186: checking for Berkeley DB link (-ldb-4)" >&5
17186 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17187   echo $ac_n "(cached) $ac_c" 1>&6
17188 else
17189   
17190         ol_DB_LIB=-ldb-4
17191         ol_LIBS=$LIBS
17192         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17193
17194         cat > conftest.$ac_ext <<EOF
17195 #line 17196 "configure"
17196 #include "confdefs.h"
17197
17198 #ifdef HAVE_DB_185_H
17199 # include <db_185.h>
17200 #else
17201 # include <db.h>
17202 #endif
17203
17204 #ifndef DB_VERSION_MAJOR
17205 # define DB_VERSION_MAJOR 1
17206 #endif
17207
17208 #ifndef NULL
17209 #define NULL ((void*)0)
17210 #endif
17211
17212 int main() {
17213
17214 #if DB_VERSION_MAJOR > 1
17215         {
17216                 char *version;
17217                 int major, minor, patch;
17218
17219                 version = db_version( &major, &minor, &patch );
17220
17221                 if( major != DB_VERSION_MAJOR ||
17222                         minor < DB_VERSION_MINOR )
17223                 {
17224                         printf("Berkeley DB version mismatch\n"
17225                                 "\texpected: %s\n\tgot: %s\n",
17226                                 DB_VERSION_STRING, version);
17227                         return 1;
17228                 }
17229         }
17230 #endif
17231
17232 #if DB_VERSION_MAJOR > 2
17233         db_env_create( NULL, 0 );
17234 #elif DB_VERSION_MAJOR > 1
17235         db_appexit( NULL );
17236 #else
17237         (void) dbopen( NULL, 0, 0, 0, NULL);
17238 #endif
17239
17240 ; return 0; }
17241 EOF
17242 if { (eval echo configure:17243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17243   rm -rf conftest*
17244   ol_cv_db_db_4=yes
17245 else
17246   echo "configure: failed program was:" >&5
17247   cat conftest.$ac_ext >&5
17248   rm -rf conftest*
17249   ol_cv_db_db_4=no
17250 fi
17251 rm -f conftest*
17252
17253         LIBS="$ol_LIBS"
17254
17255 fi
17256
17257 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17258
17259         if test $ol_cv_db_db_4 = yes ; then
17260                 ol_cv_lib_db=-ldb-4
17261         fi
17262 fi
17263
17264 if test $ol_cv_lib_db = no ; then
17265         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17266 echo "configure:17267: checking for Berkeley DB link (-ldb4)" >&5
17267 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17268   echo $ac_n "(cached) $ac_c" 1>&6
17269 else
17270   
17271         ol_DB_LIB=-ldb4
17272         ol_LIBS=$LIBS
17273         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17274
17275         cat > conftest.$ac_ext <<EOF
17276 #line 17277 "configure"
17277 #include "confdefs.h"
17278
17279 #ifdef HAVE_DB_185_H
17280 # include <db_185.h>
17281 #else
17282 # include <db.h>
17283 #endif
17284
17285 #ifndef DB_VERSION_MAJOR
17286 # define DB_VERSION_MAJOR 1
17287 #endif
17288
17289 #ifndef NULL
17290 #define NULL ((void*)0)
17291 #endif
17292
17293 int main() {
17294
17295 #if DB_VERSION_MAJOR > 1
17296         {
17297                 char *version;
17298                 int major, minor, patch;
17299
17300                 version = db_version( &major, &minor, &patch );
17301
17302                 if( major != DB_VERSION_MAJOR ||
17303                         minor < DB_VERSION_MINOR )
17304                 {
17305                         printf("Berkeley DB version mismatch\n"
17306                                 "\texpected: %s\n\tgot: %s\n",
17307                                 DB_VERSION_STRING, version);
17308                         return 1;
17309                 }
17310         }
17311 #endif
17312
17313 #if DB_VERSION_MAJOR > 2
17314         db_env_create( NULL, 0 );
17315 #elif DB_VERSION_MAJOR > 1
17316         db_appexit( NULL );
17317 #else
17318         (void) dbopen( NULL, 0, 0, 0, NULL);
17319 #endif
17320
17321 ; return 0; }
17322 EOF
17323 if { (eval echo configure:17324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17324   rm -rf conftest*
17325   ol_cv_db_db4=yes
17326 else
17327   echo "configure: failed program was:" >&5
17328   cat conftest.$ac_ext >&5
17329   rm -rf conftest*
17330   ol_cv_db_db4=no
17331 fi
17332 rm -f conftest*
17333
17334         LIBS="$ol_LIBS"
17335
17336 fi
17337
17338 echo "$ac_t""$ol_cv_db_db4" 1>&6
17339
17340         if test $ol_cv_db_db4 = yes ; then
17341                 ol_cv_lib_db=-ldb4
17342         fi
17343 fi
17344
17345 if test $ol_cv_lib_db = no ; then
17346         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17347 echo "configure:17348: checking for Berkeley DB link (-ldb)" >&5
17348 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17349   echo $ac_n "(cached) $ac_c" 1>&6
17350 else
17351   
17352         ol_DB_LIB=-ldb
17353         ol_LIBS=$LIBS
17354         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17355
17356         cat > conftest.$ac_ext <<EOF
17357 #line 17358 "configure"
17358 #include "confdefs.h"
17359
17360 #ifdef HAVE_DB_185_H
17361 # include <db_185.h>
17362 #else
17363 # include <db.h>
17364 #endif
17365
17366 #ifndef DB_VERSION_MAJOR
17367 # define DB_VERSION_MAJOR 1
17368 #endif
17369
17370 #ifndef NULL
17371 #define NULL ((void*)0)
17372 #endif
17373
17374 int main() {
17375
17376 #if DB_VERSION_MAJOR > 1
17377         {
17378                 char *version;
17379                 int major, minor, patch;
17380
17381                 version = db_version( &major, &minor, &patch );
17382
17383                 if( major != DB_VERSION_MAJOR ||
17384                         minor < DB_VERSION_MINOR )
17385                 {
17386                         printf("Berkeley DB version mismatch\n"
17387                                 "\texpected: %s\n\tgot: %s\n",
17388                                 DB_VERSION_STRING, version);
17389                         return 1;
17390                 }
17391         }
17392 #endif
17393
17394 #if DB_VERSION_MAJOR > 2
17395         db_env_create( NULL, 0 );
17396 #elif DB_VERSION_MAJOR > 1
17397         db_appexit( NULL );
17398 #else
17399         (void) dbopen( NULL, 0, 0, 0, NULL);
17400 #endif
17401
17402 ; return 0; }
17403 EOF
17404 if { (eval echo configure:17405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17405   rm -rf conftest*
17406   ol_cv_db_db=yes
17407 else
17408   echo "configure: failed program was:" >&5
17409   cat conftest.$ac_ext >&5
17410   rm -rf conftest*
17411   ol_cv_db_db=no
17412 fi
17413 rm -f conftest*
17414
17415         LIBS="$ol_LIBS"
17416
17417 fi
17418
17419 echo "$ac_t""$ol_cv_db_db" 1>&6
17420
17421         if test $ol_cv_db_db = yes ; then
17422                 ol_cv_lib_db=-ldb
17423         fi
17424 fi
17425
17426 if test $ol_cv_lib_db = no ; then
17427         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17428 echo "configure:17429: checking for Berkeley DB link (-ldb41)" >&5
17429 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17430   echo $ac_n "(cached) $ac_c" 1>&6
17431 else
17432   
17433         ol_DB_LIB=-ldb41
17434         ol_LIBS=$LIBS
17435         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17436
17437         cat > conftest.$ac_ext <<EOF
17438 #line 17439 "configure"
17439 #include "confdefs.h"
17440
17441 #ifdef HAVE_DB_185_H
17442 # include <db_185.h>
17443 #else
17444 # include <db.h>
17445 #endif
17446
17447 #ifndef DB_VERSION_MAJOR
17448 # define DB_VERSION_MAJOR 1
17449 #endif
17450
17451 #ifndef NULL
17452 #define NULL ((void*)0)
17453 #endif
17454
17455 int main() {
17456
17457 #if DB_VERSION_MAJOR > 1
17458         {
17459                 char *version;
17460                 int major, minor, patch;
17461
17462                 version = db_version( &major, &minor, &patch );
17463
17464                 if( major != DB_VERSION_MAJOR ||
17465                         minor < DB_VERSION_MINOR )
17466                 {
17467                         printf("Berkeley DB version mismatch\n"
17468                                 "\texpected: %s\n\tgot: %s\n",
17469                                 DB_VERSION_STRING, version);
17470                         return 1;
17471                 }
17472         }
17473 #endif
17474
17475 #if DB_VERSION_MAJOR > 2
17476         db_env_create( NULL, 0 );
17477 #elif DB_VERSION_MAJOR > 1
17478         db_appexit( NULL );
17479 #else
17480         (void) dbopen( NULL, 0, 0, 0, NULL);
17481 #endif
17482
17483 ; return 0; }
17484 EOF
17485 if { (eval echo configure:17486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17486   rm -rf conftest*
17487   ol_cv_db_db41=yes
17488 else
17489   echo "configure: failed program was:" >&5
17490   cat conftest.$ac_ext >&5
17491   rm -rf conftest*
17492   ol_cv_db_db41=no
17493 fi
17494 rm -f conftest*
17495
17496         LIBS="$ol_LIBS"
17497
17498 fi
17499
17500 echo "$ac_t""$ol_cv_db_db41" 1>&6
17501
17502         if test $ol_cv_db_db41 = yes ; then
17503                 ol_cv_lib_db=-ldb41
17504         fi
17505 fi
17506
17507 if test $ol_cv_lib_db = no ; then
17508         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17509 echo "configure:17510: checking for Berkeley DB link (-ldb-41)" >&5
17510 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17511   echo $ac_n "(cached) $ac_c" 1>&6
17512 else
17513   
17514         ol_DB_LIB=-ldb-41
17515         ol_LIBS=$LIBS
17516         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17517
17518         cat > conftest.$ac_ext <<EOF
17519 #line 17520 "configure"
17520 #include "confdefs.h"
17521
17522 #ifdef HAVE_DB_185_H
17523 # include <db_185.h>
17524 #else
17525 # include <db.h>
17526 #endif
17527
17528 #ifndef DB_VERSION_MAJOR
17529 # define DB_VERSION_MAJOR 1
17530 #endif
17531
17532 #ifndef NULL
17533 #define NULL ((void*)0)
17534 #endif
17535
17536 int main() {
17537
17538 #if DB_VERSION_MAJOR > 1
17539         {
17540                 char *version;
17541                 int major, minor, patch;
17542
17543                 version = db_version( &major, &minor, &patch );
17544
17545                 if( major != DB_VERSION_MAJOR ||
17546                         minor < DB_VERSION_MINOR )
17547                 {
17548                         printf("Berkeley DB version mismatch\n"
17549                                 "\texpected: %s\n\tgot: %s\n",
17550                                 DB_VERSION_STRING, version);
17551                         return 1;
17552                 }
17553         }
17554 #endif
17555
17556 #if DB_VERSION_MAJOR > 2
17557         db_env_create( NULL, 0 );
17558 #elif DB_VERSION_MAJOR > 1
17559         db_appexit( NULL );
17560 #else
17561         (void) dbopen( NULL, 0, 0, 0, NULL);
17562 #endif
17563
17564 ; return 0; }
17565 EOF
17566 if { (eval echo configure:17567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17567   rm -rf conftest*
17568   ol_cv_db_db_41=yes
17569 else
17570   echo "configure: failed program was:" >&5
17571   cat conftest.$ac_ext >&5
17572   rm -rf conftest*
17573   ol_cv_db_db_41=no
17574 fi
17575 rm -f conftest*
17576
17577         LIBS="$ol_LIBS"
17578
17579 fi
17580
17581 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17582
17583         if test $ol_cv_db_db_41 = yes ; then
17584                 ol_cv_lib_db=-ldb-41
17585         fi
17586 fi
17587
17588 if test $ol_cv_lib_db = no ; then
17589         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17590 echo "configure:17591: checking for Berkeley DB link (-ldb-4.1)" >&5
17591 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17592   echo $ac_n "(cached) $ac_c" 1>&6
17593 else
17594   
17595         ol_DB_LIB=-ldb-4.1
17596         ol_LIBS=$LIBS
17597         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17598
17599         cat > conftest.$ac_ext <<EOF
17600 #line 17601 "configure"
17601 #include "confdefs.h"
17602
17603 #ifdef HAVE_DB_185_H
17604 # include <db_185.h>
17605 #else
17606 # include <db.h>
17607 #endif
17608
17609 #ifndef DB_VERSION_MAJOR
17610 # define DB_VERSION_MAJOR 1
17611 #endif
17612
17613 #ifndef NULL
17614 #define NULL ((void*)0)
17615 #endif
17616
17617 int main() {
17618
17619 #if DB_VERSION_MAJOR > 1
17620         {
17621                 char *version;
17622                 int major, minor, patch;
17623
17624                 version = db_version( &major, &minor, &patch );
17625
17626                 if( major != DB_VERSION_MAJOR ||
17627                         minor < DB_VERSION_MINOR )
17628                 {
17629                         printf("Berkeley DB version mismatch\n"
17630                                 "\texpected: %s\n\tgot: %s\n",
17631                                 DB_VERSION_STRING, version);
17632                         return 1;
17633                 }
17634         }
17635 #endif
17636
17637 #if DB_VERSION_MAJOR > 2
17638         db_env_create( NULL, 0 );
17639 #elif DB_VERSION_MAJOR > 1
17640         db_appexit( NULL );
17641 #else
17642         (void) dbopen( NULL, 0, 0, 0, NULL);
17643 #endif
17644
17645 ; return 0; }
17646 EOF
17647 if { (eval echo configure:17648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17648   rm -rf conftest*
17649   ol_cv_db_db_4_dot_1=yes
17650 else
17651   echo "configure: failed program was:" >&5
17652   cat conftest.$ac_ext >&5
17653   rm -rf conftest*
17654   ol_cv_db_db_4_dot_1=no
17655 fi
17656 rm -f conftest*
17657
17658         LIBS="$ol_LIBS"
17659
17660 fi
17661
17662 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17663
17664         if test $ol_cv_db_db_4_dot_1 = yes ; then
17665                 ol_cv_lib_db=-ldb-4.1
17666         fi
17667 fi
17668
17669 if test $ol_cv_lib_db = no ; then
17670         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17671 echo "configure:17672: checking for Berkeley DB link (-ldb-4-1)" >&5
17672 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17673   echo $ac_n "(cached) $ac_c" 1>&6
17674 else
17675   
17676         ol_DB_LIB=-ldb-4-1
17677         ol_LIBS=$LIBS
17678         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17679
17680         cat > conftest.$ac_ext <<EOF
17681 #line 17682 "configure"
17682 #include "confdefs.h"
17683
17684 #ifdef HAVE_DB_185_H
17685 # include <db_185.h>
17686 #else
17687 # include <db.h>
17688 #endif
17689
17690 #ifndef DB_VERSION_MAJOR
17691 # define DB_VERSION_MAJOR 1
17692 #endif
17693
17694 #ifndef NULL
17695 #define NULL ((void*)0)
17696 #endif
17697
17698 int main() {
17699
17700 #if DB_VERSION_MAJOR > 1
17701         {
17702                 char *version;
17703                 int major, minor, patch;
17704
17705                 version = db_version( &major, &minor, &patch );
17706
17707                 if( major != DB_VERSION_MAJOR ||
17708                         minor < DB_VERSION_MINOR )
17709                 {
17710                         printf("Berkeley DB version mismatch\n"
17711                                 "\texpected: %s\n\tgot: %s\n",
17712                                 DB_VERSION_STRING, version);
17713                         return 1;
17714                 }
17715         }
17716 #endif
17717
17718 #if DB_VERSION_MAJOR > 2
17719         db_env_create( NULL, 0 );
17720 #elif DB_VERSION_MAJOR > 1
17721         db_appexit( NULL );
17722 #else
17723         (void) dbopen( NULL, 0, 0, 0, NULL);
17724 #endif
17725
17726 ; return 0; }
17727 EOF
17728 if { (eval echo configure:17729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17729   rm -rf conftest*
17730   ol_cv_db_db_4_1=yes
17731 else
17732   echo "configure: failed program was:" >&5
17733   cat conftest.$ac_ext >&5
17734   rm -rf conftest*
17735   ol_cv_db_db_4_1=no
17736 fi
17737 rm -f conftest*
17738
17739         LIBS="$ol_LIBS"
17740
17741 fi
17742
17743 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17744
17745         if test $ol_cv_db_db_4_1 = yes ; then
17746                 ol_cv_lib_db=-ldb-4-1
17747         fi
17748 fi
17749
17750 if test $ol_cv_lib_db = no ; then
17751         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17752 echo "configure:17753: checking for Berkeley DB link (-ldb3)" >&5
17753 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17754   echo $ac_n "(cached) $ac_c" 1>&6
17755 else
17756   
17757         ol_DB_LIB=-ldb3
17758         ol_LIBS=$LIBS
17759         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17760
17761         cat > conftest.$ac_ext <<EOF
17762 #line 17763 "configure"
17763 #include "confdefs.h"
17764
17765 #ifdef HAVE_DB_185_H
17766 # include <db_185.h>
17767 #else
17768 # include <db.h>
17769 #endif
17770
17771 #ifndef DB_VERSION_MAJOR
17772 # define DB_VERSION_MAJOR 1
17773 #endif
17774
17775 #ifndef NULL
17776 #define NULL ((void*)0)
17777 #endif
17778
17779 int main() {
17780
17781 #if DB_VERSION_MAJOR > 1
17782         {
17783                 char *version;
17784                 int major, minor, patch;
17785
17786                 version = db_version( &major, &minor, &patch );
17787
17788                 if( major != DB_VERSION_MAJOR ||
17789                         minor < DB_VERSION_MINOR )
17790                 {
17791                         printf("Berkeley DB version mismatch\n"
17792                                 "\texpected: %s\n\tgot: %s\n",
17793                                 DB_VERSION_STRING, version);
17794                         return 1;
17795                 }
17796         }
17797 #endif
17798
17799 #if DB_VERSION_MAJOR > 2
17800         db_env_create( NULL, 0 );
17801 #elif DB_VERSION_MAJOR > 1
17802         db_appexit( NULL );
17803 #else
17804         (void) dbopen( NULL, 0, 0, 0, NULL);
17805 #endif
17806
17807 ; return 0; }
17808 EOF
17809 if { (eval echo configure:17810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17810   rm -rf conftest*
17811   ol_cv_db_db3=yes
17812 else
17813   echo "configure: failed program was:" >&5
17814   cat conftest.$ac_ext >&5
17815   rm -rf conftest*
17816   ol_cv_db_db3=no
17817 fi
17818 rm -f conftest*
17819
17820         LIBS="$ol_LIBS"
17821
17822 fi
17823
17824 echo "$ac_t""$ol_cv_db_db3" 1>&6
17825
17826         if test $ol_cv_db_db3 = yes ; then
17827                 ol_cv_lib_db=-ldb3
17828         fi
17829 fi
17830
17831 if test $ol_cv_lib_db = no ; then
17832         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17833 echo "configure:17834: checking for Berkeley DB link (-ldb-3)" >&5
17834 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17835   echo $ac_n "(cached) $ac_c" 1>&6
17836 else
17837   
17838         ol_DB_LIB=-ldb-3
17839         ol_LIBS=$LIBS
17840         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17841
17842         cat > conftest.$ac_ext <<EOF
17843 #line 17844 "configure"
17844 #include "confdefs.h"
17845
17846 #ifdef HAVE_DB_185_H
17847 # include <db_185.h>
17848 #else
17849 # include <db.h>
17850 #endif
17851
17852 #ifndef DB_VERSION_MAJOR
17853 # define DB_VERSION_MAJOR 1
17854 #endif
17855
17856 #ifndef NULL
17857 #define NULL ((void*)0)
17858 #endif
17859
17860 int main() {
17861
17862 #if DB_VERSION_MAJOR > 1
17863         {
17864                 char *version;
17865                 int major, minor, patch;
17866
17867                 version = db_version( &major, &minor, &patch );
17868
17869                 if( major != DB_VERSION_MAJOR ||
17870                         minor < DB_VERSION_MINOR )
17871                 {
17872                         printf("Berkeley DB version mismatch\n"
17873                                 "\texpected: %s\n\tgot: %s\n",
17874                                 DB_VERSION_STRING, version);
17875                         return 1;
17876                 }
17877         }
17878 #endif
17879
17880 #if DB_VERSION_MAJOR > 2
17881         db_env_create( NULL, 0 );
17882 #elif DB_VERSION_MAJOR > 1
17883         db_appexit( NULL );
17884 #else
17885         (void) dbopen( NULL, 0, 0, 0, NULL);
17886 #endif
17887
17888 ; return 0; }
17889 EOF
17890 if { (eval echo configure:17891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17891   rm -rf conftest*
17892   ol_cv_db_db_3=yes
17893 else
17894   echo "configure: failed program was:" >&5
17895   cat conftest.$ac_ext >&5
17896   rm -rf conftest*
17897   ol_cv_db_db_3=no
17898 fi
17899 rm -f conftest*
17900
17901         LIBS="$ol_LIBS"
17902
17903 fi
17904
17905 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17906
17907         if test $ol_cv_db_db_3 = yes ; then
17908                 ol_cv_lib_db=-ldb-3
17909         fi
17910 fi
17911
17912 if test $ol_cv_lib_db = no ; then
17913         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17914 echo "configure:17915: checking for Berkeley DB link (-ldb2)" >&5
17915 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17916   echo $ac_n "(cached) $ac_c" 1>&6
17917 else
17918   
17919         ol_DB_LIB=-ldb2
17920         ol_LIBS=$LIBS
17921         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17922
17923         cat > conftest.$ac_ext <<EOF
17924 #line 17925 "configure"
17925 #include "confdefs.h"
17926
17927 #ifdef HAVE_DB_185_H
17928 # include <db_185.h>
17929 #else
17930 # include <db.h>
17931 #endif
17932
17933 #ifndef DB_VERSION_MAJOR
17934 # define DB_VERSION_MAJOR 1
17935 #endif
17936
17937 #ifndef NULL
17938 #define NULL ((void*)0)
17939 #endif
17940
17941 int main() {
17942
17943 #if DB_VERSION_MAJOR > 1
17944         {
17945                 char *version;
17946                 int major, minor, patch;
17947
17948                 version = db_version( &major, &minor, &patch );
17949
17950                 if( major != DB_VERSION_MAJOR ||
17951                         minor < DB_VERSION_MINOR )
17952                 {
17953                         printf("Berkeley DB version mismatch\n"
17954                                 "\texpected: %s\n\tgot: %s\n",
17955                                 DB_VERSION_STRING, version);
17956                         return 1;
17957                 }
17958         }
17959 #endif
17960
17961 #if DB_VERSION_MAJOR > 2
17962         db_env_create( NULL, 0 );
17963 #elif DB_VERSION_MAJOR > 1
17964         db_appexit( NULL );
17965 #else
17966         (void) dbopen( NULL, 0, 0, 0, NULL);
17967 #endif
17968
17969 ; return 0; }
17970 EOF
17971 if { (eval echo configure:17972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17972   rm -rf conftest*
17973   ol_cv_db_db2=yes
17974 else
17975   echo "configure: failed program was:" >&5
17976   cat conftest.$ac_ext >&5
17977   rm -rf conftest*
17978   ol_cv_db_db2=no
17979 fi
17980 rm -f conftest*
17981
17982         LIBS="$ol_LIBS"
17983
17984 fi
17985
17986 echo "$ac_t""$ol_cv_db_db2" 1>&6
17987
17988         if test $ol_cv_db_db2 = yes ; then
17989                 ol_cv_lib_db=-ldb2
17990         fi
17991 fi
17992
17993 if test $ol_cv_lib_db = no ; then
17994         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17995 echo "configure:17996: checking for Berkeley DB link (-ldb-2)" >&5
17996 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17997   echo $ac_n "(cached) $ac_c" 1>&6
17998 else
17999   
18000         ol_DB_LIB=-ldb-2
18001         ol_LIBS=$LIBS
18002         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18003
18004         cat > conftest.$ac_ext <<EOF
18005 #line 18006 "configure"
18006 #include "confdefs.h"
18007
18008 #ifdef HAVE_DB_185_H
18009 # include <db_185.h>
18010 #else
18011 # include <db.h>
18012 #endif
18013
18014 #ifndef DB_VERSION_MAJOR
18015 # define DB_VERSION_MAJOR 1
18016 #endif
18017
18018 #ifndef NULL
18019 #define NULL ((void*)0)
18020 #endif
18021
18022 int main() {
18023
18024 #if DB_VERSION_MAJOR > 1
18025         {
18026                 char *version;
18027                 int major, minor, patch;
18028
18029                 version = db_version( &major, &minor, &patch );
18030
18031                 if( major != DB_VERSION_MAJOR ||
18032                         minor < DB_VERSION_MINOR )
18033                 {
18034                         printf("Berkeley DB version mismatch\n"
18035                                 "\texpected: %s\n\tgot: %s\n",
18036                                 DB_VERSION_STRING, version);
18037                         return 1;
18038                 }
18039         }
18040 #endif
18041
18042 #if DB_VERSION_MAJOR > 2
18043         db_env_create( NULL, 0 );
18044 #elif DB_VERSION_MAJOR > 1
18045         db_appexit( NULL );
18046 #else
18047         (void) dbopen( NULL, 0, 0, 0, NULL);
18048 #endif
18049
18050 ; return 0; }
18051 EOF
18052 if { (eval echo configure:18053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18053   rm -rf conftest*
18054   ol_cv_db_db_2=yes
18055 else
18056   echo "configure: failed program was:" >&5
18057   cat conftest.$ac_ext >&5
18058   rm -rf conftest*
18059   ol_cv_db_db_2=no
18060 fi
18061 rm -f conftest*
18062
18063         LIBS="$ol_LIBS"
18064
18065 fi
18066
18067 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18068
18069         if test $ol_cv_db_db_2 = yes ; then
18070                 ol_cv_lib_db=-ldb-2
18071         fi
18072 fi
18073
18074 if test $ol_cv_lib_db = no ; then
18075         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18076 echo "configure:18077: checking for Berkeley DB link (-ldb1)" >&5
18077 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18078   echo $ac_n "(cached) $ac_c" 1>&6
18079 else
18080   
18081         ol_DB_LIB=-ldb1
18082         ol_LIBS=$LIBS
18083         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18084
18085         cat > conftest.$ac_ext <<EOF
18086 #line 18087 "configure"
18087 #include "confdefs.h"
18088
18089 #ifdef HAVE_DB_185_H
18090 # include <db_185.h>
18091 #else
18092 # include <db.h>
18093 #endif
18094
18095 #ifndef DB_VERSION_MAJOR
18096 # define DB_VERSION_MAJOR 1
18097 #endif
18098
18099 #ifndef NULL
18100 #define NULL ((void*)0)
18101 #endif
18102
18103 int main() {
18104
18105 #if DB_VERSION_MAJOR > 1
18106         {
18107                 char *version;
18108                 int major, minor, patch;
18109
18110                 version = db_version( &major, &minor, &patch );
18111
18112                 if( major != DB_VERSION_MAJOR ||
18113                         minor < DB_VERSION_MINOR )
18114                 {
18115                         printf("Berkeley DB version mismatch\n"
18116                                 "\texpected: %s\n\tgot: %s\n",
18117                                 DB_VERSION_STRING, version);
18118                         return 1;
18119                 }
18120         }
18121 #endif
18122
18123 #if DB_VERSION_MAJOR > 2
18124         db_env_create( NULL, 0 );
18125 #elif DB_VERSION_MAJOR > 1
18126         db_appexit( NULL );
18127 #else
18128         (void) dbopen( NULL, 0, 0, 0, NULL);
18129 #endif
18130
18131 ; return 0; }
18132 EOF
18133 if { (eval echo configure:18134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18134   rm -rf conftest*
18135   ol_cv_db_db1=yes
18136 else
18137   echo "configure: failed program was:" >&5
18138   cat conftest.$ac_ext >&5
18139   rm -rf conftest*
18140   ol_cv_db_db1=no
18141 fi
18142 rm -f conftest*
18143
18144         LIBS="$ol_LIBS"
18145
18146 fi
18147
18148 echo "$ac_t""$ol_cv_db_db1" 1>&6
18149
18150         if test $ol_cv_db_db1 = yes ; then
18151                 ol_cv_lib_db=-ldb1
18152         fi
18153 fi
18154
18155 if test $ol_cv_lib_db = no ; then
18156         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18157 echo "configure:18158: checking for Berkeley DB link (-ldb-1)" >&5
18158 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18159   echo $ac_n "(cached) $ac_c" 1>&6
18160 else
18161   
18162         ol_DB_LIB=-ldb-1
18163         ol_LIBS=$LIBS
18164         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18165
18166         cat > conftest.$ac_ext <<EOF
18167 #line 18168 "configure"
18168 #include "confdefs.h"
18169
18170 #ifdef HAVE_DB_185_H
18171 # include <db_185.h>
18172 #else
18173 # include <db.h>
18174 #endif
18175
18176 #ifndef DB_VERSION_MAJOR
18177 # define DB_VERSION_MAJOR 1
18178 #endif
18179
18180 #ifndef NULL
18181 #define NULL ((void*)0)
18182 #endif
18183
18184 int main() {
18185
18186 #if DB_VERSION_MAJOR > 1
18187         {
18188                 char *version;
18189                 int major, minor, patch;
18190
18191                 version = db_version( &major, &minor, &patch );
18192
18193                 if( major != DB_VERSION_MAJOR ||
18194                         minor < DB_VERSION_MINOR )
18195                 {
18196                         printf("Berkeley DB version mismatch\n"
18197                                 "\texpected: %s\n\tgot: %s\n",
18198                                 DB_VERSION_STRING, version);
18199                         return 1;
18200                 }
18201         }
18202 #endif
18203
18204 #if DB_VERSION_MAJOR > 2
18205         db_env_create( NULL, 0 );
18206 #elif DB_VERSION_MAJOR > 1
18207         db_appexit( NULL );
18208 #else
18209         (void) dbopen( NULL, 0, 0, 0, NULL);
18210 #endif
18211
18212 ; return 0; }
18213 EOF
18214 if { (eval echo configure:18215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18215   rm -rf conftest*
18216   ol_cv_db_db_1=yes
18217 else
18218   echo "configure: failed program was:" >&5
18219   cat conftest.$ac_ext >&5
18220   rm -rf conftest*
18221   ol_cv_db_db_1=no
18222 fi
18223 rm -f conftest*
18224
18225         LIBS="$ol_LIBS"
18226
18227 fi
18228
18229 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18230
18231         if test $ol_cv_db_db_1 = yes ; then
18232                 ol_cv_lib_db=-ldb-1
18233         fi
18234 fi
18235
18236
18237                 if test "$ol_cv_lib_db" != no ; then
18238                         ol_cv_berkeley_db=yes
18239                 fi
18240         fi
18241 fi
18242
18243         else
18244                 ol_cv_berkeley_db=no
18245 for ac_hdr in db.h
18246 do
18247 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18248 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18249 echo "configure:18250: checking for $ac_hdr" >&5
18250 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18251   echo $ac_n "(cached) $ac_c" 1>&6
18252 else
18253   cat > conftest.$ac_ext <<EOF
18254 #line 18255 "configure"
18255 #include "confdefs.h"
18256 #include <$ac_hdr>
18257 EOF
18258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18259 { (eval echo configure:18260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18261 if test -z "$ac_err"; then
18262   rm -rf conftest*
18263   eval "ac_cv_header_$ac_safe=yes"
18264 else
18265   echo "$ac_err" >&5
18266   echo "configure: failed program was:" >&5
18267   cat conftest.$ac_ext >&5
18268   rm -rf conftest*
18269   eval "ac_cv_header_$ac_safe=no"
18270 fi
18271 rm -f conftest*
18272 fi
18273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18274   echo "$ac_t""yes" 1>&6
18275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18276   cat >> confdefs.h <<EOF
18277 #define $ac_tr_hdr 1
18278 EOF
18279  
18280 else
18281   echo "$ac_t""no" 1>&6
18282 fi
18283 done
18284
18285 if test $ac_cv_header_db_h = yes; then
18286         ol_cv_lib_db=no
18287 if test $ol_cv_lib_db = no ; then
18288         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18289 echo "configure:18290: checking for Berkeley DB link (default)" >&5
18290 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18291   echo $ac_n "(cached) $ac_c" 1>&6
18292 else
18293   
18294         ol_DB_LIB=
18295         ol_LIBS=$LIBS
18296         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18297
18298         cat > conftest.$ac_ext <<EOF
18299 #line 18300 "configure"
18300 #include "confdefs.h"
18301
18302 #ifdef HAVE_DB_185_H
18303 # include <db_185.h>
18304 #else
18305 # include <db.h>
18306 #endif
18307
18308 #ifndef DB_VERSION_MAJOR
18309 # define DB_VERSION_MAJOR 1
18310 #endif
18311
18312 #ifndef NULL
18313 #define NULL ((void*)0)
18314 #endif
18315
18316 int main() {
18317
18318 #if DB_VERSION_MAJOR > 1
18319         {
18320                 char *version;
18321                 int major, minor, patch;
18322
18323                 version = db_version( &major, &minor, &patch );
18324
18325                 if( major != DB_VERSION_MAJOR ||
18326                         minor < DB_VERSION_MINOR )
18327                 {
18328                         printf("Berkeley DB version mismatch\n"
18329                                 "\texpected: %s\n\tgot: %s\n",
18330                                 DB_VERSION_STRING, version);
18331                         return 1;
18332                 }
18333         }
18334 #endif
18335
18336 #if DB_VERSION_MAJOR > 2
18337         db_env_create( NULL, 0 );
18338 #elif DB_VERSION_MAJOR > 1
18339         db_appexit( NULL );
18340 #else
18341         (void) dbopen( NULL, 0, 0, 0, NULL);
18342 #endif
18343
18344 ; return 0; }
18345 EOF
18346 if { (eval echo configure:18347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18347   rm -rf conftest*
18348   ol_cv_db_none=yes
18349 else
18350   echo "configure: failed program was:" >&5
18351   cat conftest.$ac_ext >&5
18352   rm -rf conftest*
18353   ol_cv_db_none=no
18354 fi
18355 rm -f conftest*
18356
18357         LIBS="$ol_LIBS"
18358
18359 fi
18360
18361 echo "$ac_t""$ol_cv_db_none" 1>&6
18362
18363         if test $ol_cv_db_none = yes ; then
18364                 ol_cv_lib_db=yes
18365         fi
18366 fi
18367
18368 if test $ol_cv_lib_db = no ; then
18369         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18370 echo "configure:18371: checking for Berkeley DB link (-ldb42)" >&5
18371 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18372   echo $ac_n "(cached) $ac_c" 1>&6
18373 else
18374   
18375         ol_DB_LIB=-ldb42
18376         ol_LIBS=$LIBS
18377         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18378
18379         cat > conftest.$ac_ext <<EOF
18380 #line 18381 "configure"
18381 #include "confdefs.h"
18382
18383 #ifdef HAVE_DB_185_H
18384 # include <db_185.h>
18385 #else
18386 # include <db.h>
18387 #endif
18388
18389 #ifndef DB_VERSION_MAJOR
18390 # define DB_VERSION_MAJOR 1
18391 #endif
18392
18393 #ifndef NULL
18394 #define NULL ((void*)0)
18395 #endif
18396
18397 int main() {
18398
18399 #if DB_VERSION_MAJOR > 1
18400         {
18401                 char *version;
18402                 int major, minor, patch;
18403
18404                 version = db_version( &major, &minor, &patch );
18405
18406                 if( major != DB_VERSION_MAJOR ||
18407                         minor < DB_VERSION_MINOR )
18408                 {
18409                         printf("Berkeley DB version mismatch\n"
18410                                 "\texpected: %s\n\tgot: %s\n",
18411                                 DB_VERSION_STRING, version);
18412                         return 1;
18413                 }
18414         }
18415 #endif
18416
18417 #if DB_VERSION_MAJOR > 2
18418         db_env_create( NULL, 0 );
18419 #elif DB_VERSION_MAJOR > 1
18420         db_appexit( NULL );
18421 #else
18422         (void) dbopen( NULL, 0, 0, 0, NULL);
18423 #endif
18424
18425 ; return 0; }
18426 EOF
18427 if { (eval echo configure:18428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18428   rm -rf conftest*
18429   ol_cv_db_db42=yes
18430 else
18431   echo "configure: failed program was:" >&5
18432   cat conftest.$ac_ext >&5
18433   rm -rf conftest*
18434   ol_cv_db_db42=no
18435 fi
18436 rm -f conftest*
18437
18438         LIBS="$ol_LIBS"
18439
18440 fi
18441
18442 echo "$ac_t""$ol_cv_db_db42" 1>&6
18443
18444         if test $ol_cv_db_db42 = yes ; then
18445                 ol_cv_lib_db=-ldb42
18446         fi
18447 fi
18448
18449 if test $ol_cv_lib_db = no ; then
18450         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18451 echo "configure:18452: checking for Berkeley DB link (-ldb-42)" >&5
18452 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18453   echo $ac_n "(cached) $ac_c" 1>&6
18454 else
18455   
18456         ol_DB_LIB=-ldb-42
18457         ol_LIBS=$LIBS
18458         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18459
18460         cat > conftest.$ac_ext <<EOF
18461 #line 18462 "configure"
18462 #include "confdefs.h"
18463
18464 #ifdef HAVE_DB_185_H
18465 # include <db_185.h>
18466 #else
18467 # include <db.h>
18468 #endif
18469
18470 #ifndef DB_VERSION_MAJOR
18471 # define DB_VERSION_MAJOR 1
18472 #endif
18473
18474 #ifndef NULL
18475 #define NULL ((void*)0)
18476 #endif
18477
18478 int main() {
18479
18480 #if DB_VERSION_MAJOR > 1
18481         {
18482                 char *version;
18483                 int major, minor, patch;
18484
18485                 version = db_version( &major, &minor, &patch );
18486
18487                 if( major != DB_VERSION_MAJOR ||
18488                         minor < DB_VERSION_MINOR )
18489                 {
18490                         printf("Berkeley DB version mismatch\n"
18491                                 "\texpected: %s\n\tgot: %s\n",
18492                                 DB_VERSION_STRING, version);
18493                         return 1;
18494                 }
18495         }
18496 #endif
18497
18498 #if DB_VERSION_MAJOR > 2
18499         db_env_create( NULL, 0 );
18500 #elif DB_VERSION_MAJOR > 1
18501         db_appexit( NULL );
18502 #else
18503         (void) dbopen( NULL, 0, 0, 0, NULL);
18504 #endif
18505
18506 ; return 0; }
18507 EOF
18508 if { (eval echo configure:18509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18509   rm -rf conftest*
18510   ol_cv_db_db_42=yes
18511 else
18512   echo "configure: failed program was:" >&5
18513   cat conftest.$ac_ext >&5
18514   rm -rf conftest*
18515   ol_cv_db_db_42=no
18516 fi
18517 rm -f conftest*
18518
18519         LIBS="$ol_LIBS"
18520
18521 fi
18522
18523 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18524
18525         if test $ol_cv_db_db_42 = yes ; then
18526                 ol_cv_lib_db=-ldb-42
18527         fi
18528 fi
18529
18530 if test $ol_cv_lib_db = no ; then
18531         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18532 echo "configure:18533: checking for Berkeley DB link (-ldb-4.2)" >&5
18533 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18534   echo $ac_n "(cached) $ac_c" 1>&6
18535 else
18536   
18537         ol_DB_LIB=-ldb-4.2
18538         ol_LIBS=$LIBS
18539         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18540
18541         cat > conftest.$ac_ext <<EOF
18542 #line 18543 "configure"
18543 #include "confdefs.h"
18544
18545 #ifdef HAVE_DB_185_H
18546 # include <db_185.h>
18547 #else
18548 # include <db.h>
18549 #endif
18550
18551 #ifndef DB_VERSION_MAJOR
18552 # define DB_VERSION_MAJOR 1
18553 #endif
18554
18555 #ifndef NULL
18556 #define NULL ((void*)0)
18557 #endif
18558
18559 int main() {
18560
18561 #if DB_VERSION_MAJOR > 1
18562         {
18563                 char *version;
18564                 int major, minor, patch;
18565
18566                 version = db_version( &major, &minor, &patch );
18567
18568                 if( major != DB_VERSION_MAJOR ||
18569                         minor < DB_VERSION_MINOR )
18570                 {
18571                         printf("Berkeley DB version mismatch\n"
18572                                 "\texpected: %s\n\tgot: %s\n",
18573                                 DB_VERSION_STRING, version);
18574                         return 1;
18575                 }
18576         }
18577 #endif
18578
18579 #if DB_VERSION_MAJOR > 2
18580         db_env_create( NULL, 0 );
18581 #elif DB_VERSION_MAJOR > 1
18582         db_appexit( NULL );
18583 #else
18584         (void) dbopen( NULL, 0, 0, 0, NULL);
18585 #endif
18586
18587 ; return 0; }
18588 EOF
18589 if { (eval echo configure:18590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18590   rm -rf conftest*
18591   ol_cv_db_db_4_dot_2=yes
18592 else
18593   echo "configure: failed program was:" >&5
18594   cat conftest.$ac_ext >&5
18595   rm -rf conftest*
18596   ol_cv_db_db_4_dot_2=no
18597 fi
18598 rm -f conftest*
18599
18600         LIBS="$ol_LIBS"
18601
18602 fi
18603
18604 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18605
18606         if test $ol_cv_db_db_4_dot_2 = yes ; then
18607                 ol_cv_lib_db=-ldb-4.2
18608         fi
18609 fi
18610
18611 if test $ol_cv_lib_db = no ; then
18612         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18613 echo "configure:18614: checking for Berkeley DB link (-ldb-4-2)" >&5
18614 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18615   echo $ac_n "(cached) $ac_c" 1>&6
18616 else
18617   
18618         ol_DB_LIB=-ldb-4-2
18619         ol_LIBS=$LIBS
18620         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18621
18622         cat > conftest.$ac_ext <<EOF
18623 #line 18624 "configure"
18624 #include "confdefs.h"
18625
18626 #ifdef HAVE_DB_185_H
18627 # include <db_185.h>
18628 #else
18629 # include <db.h>
18630 #endif
18631
18632 #ifndef DB_VERSION_MAJOR
18633 # define DB_VERSION_MAJOR 1
18634 #endif
18635
18636 #ifndef NULL
18637 #define NULL ((void*)0)
18638 #endif
18639
18640 int main() {
18641
18642 #if DB_VERSION_MAJOR > 1
18643         {
18644                 char *version;
18645                 int major, minor, patch;
18646
18647                 version = db_version( &major, &minor, &patch );
18648
18649                 if( major != DB_VERSION_MAJOR ||
18650                         minor < DB_VERSION_MINOR )
18651                 {
18652                         printf("Berkeley DB version mismatch\n"
18653                                 "\texpected: %s\n\tgot: %s\n",
18654                                 DB_VERSION_STRING, version);
18655                         return 1;
18656                 }
18657         }
18658 #endif
18659
18660 #if DB_VERSION_MAJOR > 2
18661         db_env_create( NULL, 0 );
18662 #elif DB_VERSION_MAJOR > 1
18663         db_appexit( NULL );
18664 #else
18665         (void) dbopen( NULL, 0, 0, 0, NULL);
18666 #endif
18667
18668 ; return 0; }
18669 EOF
18670 if { (eval echo configure:18671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18671   rm -rf conftest*
18672   ol_cv_db_db_4_2=yes
18673 else
18674   echo "configure: failed program was:" >&5
18675   cat conftest.$ac_ext >&5
18676   rm -rf conftest*
18677   ol_cv_db_db_4_2=no
18678 fi
18679 rm -f conftest*
18680
18681         LIBS="$ol_LIBS"
18682
18683 fi
18684
18685 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18686
18687         if test $ol_cv_db_db_4_2 = yes ; then
18688                 ol_cv_lib_db=-ldb-4-2
18689         fi
18690 fi
18691
18692 if test $ol_cv_lib_db = no ; then
18693         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18694 echo "configure:18695: checking for Berkeley DB link (-ldb-4)" >&5
18695 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18696   echo $ac_n "(cached) $ac_c" 1>&6
18697 else
18698   
18699         ol_DB_LIB=-ldb-4
18700         ol_LIBS=$LIBS
18701         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18702
18703         cat > conftest.$ac_ext <<EOF
18704 #line 18705 "configure"
18705 #include "confdefs.h"
18706
18707 #ifdef HAVE_DB_185_H
18708 # include <db_185.h>
18709 #else
18710 # include <db.h>
18711 #endif
18712
18713 #ifndef DB_VERSION_MAJOR
18714 # define DB_VERSION_MAJOR 1
18715 #endif
18716
18717 #ifndef NULL
18718 #define NULL ((void*)0)
18719 #endif
18720
18721 int main() {
18722
18723 #if DB_VERSION_MAJOR > 1
18724         {
18725                 char *version;
18726                 int major, minor, patch;
18727
18728                 version = db_version( &major, &minor, &patch );
18729
18730                 if( major != DB_VERSION_MAJOR ||
18731                         minor < DB_VERSION_MINOR )
18732                 {
18733                         printf("Berkeley DB version mismatch\n"
18734                                 "\texpected: %s\n\tgot: %s\n",
18735                                 DB_VERSION_STRING, version);
18736                         return 1;
18737                 }
18738         }
18739 #endif
18740
18741 #if DB_VERSION_MAJOR > 2
18742         db_env_create( NULL, 0 );
18743 #elif DB_VERSION_MAJOR > 1
18744         db_appexit( NULL );
18745 #else
18746         (void) dbopen( NULL, 0, 0, 0, NULL);
18747 #endif
18748
18749 ; return 0; }
18750 EOF
18751 if { (eval echo configure:18752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18752   rm -rf conftest*
18753   ol_cv_db_db_4=yes
18754 else
18755   echo "configure: failed program was:" >&5
18756   cat conftest.$ac_ext >&5
18757   rm -rf conftest*
18758   ol_cv_db_db_4=no
18759 fi
18760 rm -f conftest*
18761
18762         LIBS="$ol_LIBS"
18763
18764 fi
18765
18766 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18767
18768         if test $ol_cv_db_db_4 = yes ; then
18769                 ol_cv_lib_db=-ldb-4
18770         fi
18771 fi
18772
18773 if test $ol_cv_lib_db = no ; then
18774         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18775 echo "configure:18776: checking for Berkeley DB link (-ldb4)" >&5
18776 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18777   echo $ac_n "(cached) $ac_c" 1>&6
18778 else
18779   
18780         ol_DB_LIB=-ldb4
18781         ol_LIBS=$LIBS
18782         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18783
18784         cat > conftest.$ac_ext <<EOF
18785 #line 18786 "configure"
18786 #include "confdefs.h"
18787
18788 #ifdef HAVE_DB_185_H
18789 # include <db_185.h>
18790 #else
18791 # include <db.h>
18792 #endif
18793
18794 #ifndef DB_VERSION_MAJOR
18795 # define DB_VERSION_MAJOR 1
18796 #endif
18797
18798 #ifndef NULL
18799 #define NULL ((void*)0)
18800 #endif
18801
18802 int main() {
18803
18804 #if DB_VERSION_MAJOR > 1
18805         {
18806                 char *version;
18807                 int major, minor, patch;
18808
18809                 version = db_version( &major, &minor, &patch );
18810
18811                 if( major != DB_VERSION_MAJOR ||
18812                         minor < DB_VERSION_MINOR )
18813                 {
18814                         printf("Berkeley DB version mismatch\n"
18815                                 "\texpected: %s\n\tgot: %s\n",
18816                                 DB_VERSION_STRING, version);
18817                         return 1;
18818                 }
18819         }
18820 #endif
18821
18822 #if DB_VERSION_MAJOR > 2
18823         db_env_create( NULL, 0 );
18824 #elif DB_VERSION_MAJOR > 1
18825         db_appexit( NULL );
18826 #else
18827         (void) dbopen( NULL, 0, 0, 0, NULL);
18828 #endif
18829
18830 ; return 0; }
18831 EOF
18832 if { (eval echo configure:18833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18833   rm -rf conftest*
18834   ol_cv_db_db4=yes
18835 else
18836   echo "configure: failed program was:" >&5
18837   cat conftest.$ac_ext >&5
18838   rm -rf conftest*
18839   ol_cv_db_db4=no
18840 fi
18841 rm -f conftest*
18842
18843         LIBS="$ol_LIBS"
18844
18845 fi
18846
18847 echo "$ac_t""$ol_cv_db_db4" 1>&6
18848
18849         if test $ol_cv_db_db4 = yes ; then
18850                 ol_cv_lib_db=-ldb4
18851         fi
18852 fi
18853
18854 if test $ol_cv_lib_db = no ; then
18855         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18856 echo "configure:18857: checking for Berkeley DB link (-ldb)" >&5
18857 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18858   echo $ac_n "(cached) $ac_c" 1>&6
18859 else
18860   
18861         ol_DB_LIB=-ldb
18862         ol_LIBS=$LIBS
18863         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18864
18865         cat > conftest.$ac_ext <<EOF
18866 #line 18867 "configure"
18867 #include "confdefs.h"
18868
18869 #ifdef HAVE_DB_185_H
18870 # include <db_185.h>
18871 #else
18872 # include <db.h>
18873 #endif
18874
18875 #ifndef DB_VERSION_MAJOR
18876 # define DB_VERSION_MAJOR 1
18877 #endif
18878
18879 #ifndef NULL
18880 #define NULL ((void*)0)
18881 #endif
18882
18883 int main() {
18884
18885 #if DB_VERSION_MAJOR > 1
18886         {
18887                 char *version;
18888                 int major, minor, patch;
18889
18890                 version = db_version( &major, &minor, &patch );
18891
18892                 if( major != DB_VERSION_MAJOR ||
18893                         minor < DB_VERSION_MINOR )
18894                 {
18895                         printf("Berkeley DB version mismatch\n"
18896                                 "\texpected: %s\n\tgot: %s\n",
18897                                 DB_VERSION_STRING, version);
18898                         return 1;
18899                 }
18900         }
18901 #endif
18902
18903 #if DB_VERSION_MAJOR > 2
18904         db_env_create( NULL, 0 );
18905 #elif DB_VERSION_MAJOR > 1
18906         db_appexit( NULL );
18907 #else
18908         (void) dbopen( NULL, 0, 0, 0, NULL);
18909 #endif
18910
18911 ; return 0; }
18912 EOF
18913 if { (eval echo configure:18914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18914   rm -rf conftest*
18915   ol_cv_db_db=yes
18916 else
18917   echo "configure: failed program was:" >&5
18918   cat conftest.$ac_ext >&5
18919   rm -rf conftest*
18920   ol_cv_db_db=no
18921 fi
18922 rm -f conftest*
18923
18924         LIBS="$ol_LIBS"
18925
18926 fi
18927
18928 echo "$ac_t""$ol_cv_db_db" 1>&6
18929
18930         if test $ol_cv_db_db = yes ; then
18931                 ol_cv_lib_db=-ldb
18932         fi
18933 fi
18934
18935 if test $ol_cv_lib_db = no ; then
18936         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18937 echo "configure:18938: checking for Berkeley DB link (-ldb41)" >&5
18938 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18939   echo $ac_n "(cached) $ac_c" 1>&6
18940 else
18941   
18942         ol_DB_LIB=-ldb41
18943         ol_LIBS=$LIBS
18944         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18945
18946         cat > conftest.$ac_ext <<EOF
18947 #line 18948 "configure"
18948 #include "confdefs.h"
18949
18950 #ifdef HAVE_DB_185_H
18951 # include <db_185.h>
18952 #else
18953 # include <db.h>
18954 #endif
18955
18956 #ifndef DB_VERSION_MAJOR
18957 # define DB_VERSION_MAJOR 1
18958 #endif
18959
18960 #ifndef NULL
18961 #define NULL ((void*)0)
18962 #endif
18963
18964 int main() {
18965
18966 #if DB_VERSION_MAJOR > 1
18967         {
18968                 char *version;
18969                 int major, minor, patch;
18970
18971                 version = db_version( &major, &minor, &patch );
18972
18973                 if( major != DB_VERSION_MAJOR ||
18974                         minor < DB_VERSION_MINOR )
18975                 {
18976                         printf("Berkeley DB version mismatch\n"
18977                                 "\texpected: %s\n\tgot: %s\n",
18978                                 DB_VERSION_STRING, version);
18979                         return 1;
18980                 }
18981         }
18982 #endif
18983
18984 #if DB_VERSION_MAJOR > 2
18985         db_env_create( NULL, 0 );
18986 #elif DB_VERSION_MAJOR > 1
18987         db_appexit( NULL );
18988 #else
18989         (void) dbopen( NULL, 0, 0, 0, NULL);
18990 #endif
18991
18992 ; return 0; }
18993 EOF
18994 if { (eval echo configure:18995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18995   rm -rf conftest*
18996   ol_cv_db_db41=yes
18997 else
18998   echo "configure: failed program was:" >&5
18999   cat conftest.$ac_ext >&5
19000   rm -rf conftest*
19001   ol_cv_db_db41=no
19002 fi
19003 rm -f conftest*
19004
19005         LIBS="$ol_LIBS"
19006
19007 fi
19008
19009 echo "$ac_t""$ol_cv_db_db41" 1>&6
19010
19011         if test $ol_cv_db_db41 = yes ; then
19012                 ol_cv_lib_db=-ldb41
19013         fi
19014 fi
19015
19016 if test $ol_cv_lib_db = no ; then
19017         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19018 echo "configure:19019: checking for Berkeley DB link (-ldb-41)" >&5
19019 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19020   echo $ac_n "(cached) $ac_c" 1>&6
19021 else
19022   
19023         ol_DB_LIB=-ldb-41
19024         ol_LIBS=$LIBS
19025         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19026
19027         cat > conftest.$ac_ext <<EOF
19028 #line 19029 "configure"
19029 #include "confdefs.h"
19030
19031 #ifdef HAVE_DB_185_H
19032 # include <db_185.h>
19033 #else
19034 # include <db.h>
19035 #endif
19036
19037 #ifndef DB_VERSION_MAJOR
19038 # define DB_VERSION_MAJOR 1
19039 #endif
19040
19041 #ifndef NULL
19042 #define NULL ((void*)0)
19043 #endif
19044
19045 int main() {
19046
19047 #if DB_VERSION_MAJOR > 1
19048         {
19049                 char *version;
19050                 int major, minor, patch;
19051
19052                 version = db_version( &major, &minor, &patch );
19053
19054                 if( major != DB_VERSION_MAJOR ||
19055                         minor < DB_VERSION_MINOR )
19056                 {
19057                         printf("Berkeley DB version mismatch\n"
19058                                 "\texpected: %s\n\tgot: %s\n",
19059                                 DB_VERSION_STRING, version);
19060                         return 1;
19061                 }
19062         }
19063 #endif
19064
19065 #if DB_VERSION_MAJOR > 2
19066         db_env_create( NULL, 0 );
19067 #elif DB_VERSION_MAJOR > 1
19068         db_appexit( NULL );
19069 #else
19070         (void) dbopen( NULL, 0, 0, 0, NULL);
19071 #endif
19072
19073 ; return 0; }
19074 EOF
19075 if { (eval echo configure:19076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19076   rm -rf conftest*
19077   ol_cv_db_db_41=yes
19078 else
19079   echo "configure: failed program was:" >&5
19080   cat conftest.$ac_ext >&5
19081   rm -rf conftest*
19082   ol_cv_db_db_41=no
19083 fi
19084 rm -f conftest*
19085
19086         LIBS="$ol_LIBS"
19087
19088 fi
19089
19090 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19091
19092         if test $ol_cv_db_db_41 = yes ; then
19093                 ol_cv_lib_db=-ldb-41
19094         fi
19095 fi
19096
19097 if test $ol_cv_lib_db = no ; then
19098         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19099 echo "configure:19100: checking for Berkeley DB link (-ldb-4.1)" >&5
19100 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19101   echo $ac_n "(cached) $ac_c" 1>&6
19102 else
19103   
19104         ol_DB_LIB=-ldb-4.1
19105         ol_LIBS=$LIBS
19106         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19107
19108         cat > conftest.$ac_ext <<EOF
19109 #line 19110 "configure"
19110 #include "confdefs.h"
19111
19112 #ifdef HAVE_DB_185_H
19113 # include <db_185.h>
19114 #else
19115 # include <db.h>
19116 #endif
19117
19118 #ifndef DB_VERSION_MAJOR
19119 # define DB_VERSION_MAJOR 1
19120 #endif
19121
19122 #ifndef NULL
19123 #define NULL ((void*)0)
19124 #endif
19125
19126 int main() {
19127
19128 #if DB_VERSION_MAJOR > 1
19129         {
19130                 char *version;
19131                 int major, minor, patch;
19132
19133                 version = db_version( &major, &minor, &patch );
19134
19135                 if( major != DB_VERSION_MAJOR ||
19136                         minor < DB_VERSION_MINOR )
19137                 {
19138                         printf("Berkeley DB version mismatch\n"
19139                                 "\texpected: %s\n\tgot: %s\n",
19140                                 DB_VERSION_STRING, version);
19141                         return 1;
19142                 }
19143         }
19144 #endif
19145
19146 #if DB_VERSION_MAJOR > 2
19147         db_env_create( NULL, 0 );
19148 #elif DB_VERSION_MAJOR > 1
19149         db_appexit( NULL );
19150 #else
19151         (void) dbopen( NULL, 0, 0, 0, NULL);
19152 #endif
19153
19154 ; return 0; }
19155 EOF
19156 if { (eval echo configure:19157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19157   rm -rf conftest*
19158   ol_cv_db_db_4_dot_1=yes
19159 else
19160   echo "configure: failed program was:" >&5
19161   cat conftest.$ac_ext >&5
19162   rm -rf conftest*
19163   ol_cv_db_db_4_dot_1=no
19164 fi
19165 rm -f conftest*
19166
19167         LIBS="$ol_LIBS"
19168
19169 fi
19170
19171 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19172
19173         if test $ol_cv_db_db_4_dot_1 = yes ; then
19174                 ol_cv_lib_db=-ldb-4.1
19175         fi
19176 fi
19177
19178 if test $ol_cv_lib_db = no ; then
19179         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19180 echo "configure:19181: checking for Berkeley DB link (-ldb-4-1)" >&5
19181 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19182   echo $ac_n "(cached) $ac_c" 1>&6
19183 else
19184   
19185         ol_DB_LIB=-ldb-4-1
19186         ol_LIBS=$LIBS
19187         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19188
19189         cat > conftest.$ac_ext <<EOF
19190 #line 19191 "configure"
19191 #include "confdefs.h"
19192
19193 #ifdef HAVE_DB_185_H
19194 # include <db_185.h>
19195 #else
19196 # include <db.h>
19197 #endif
19198
19199 #ifndef DB_VERSION_MAJOR
19200 # define DB_VERSION_MAJOR 1
19201 #endif
19202
19203 #ifndef NULL
19204 #define NULL ((void*)0)
19205 #endif
19206
19207 int main() {
19208
19209 #if DB_VERSION_MAJOR > 1
19210         {
19211                 char *version;
19212                 int major, minor, patch;
19213
19214                 version = db_version( &major, &minor, &patch );
19215
19216                 if( major != DB_VERSION_MAJOR ||
19217                         minor < DB_VERSION_MINOR )
19218                 {
19219                         printf("Berkeley DB version mismatch\n"
19220                                 "\texpected: %s\n\tgot: %s\n",
19221                                 DB_VERSION_STRING, version);
19222                         return 1;
19223                 }
19224         }
19225 #endif
19226
19227 #if DB_VERSION_MAJOR > 2
19228         db_env_create( NULL, 0 );
19229 #elif DB_VERSION_MAJOR > 1
19230         db_appexit( NULL );
19231 #else
19232         (void) dbopen( NULL, 0, 0, 0, NULL);
19233 #endif
19234
19235 ; return 0; }
19236 EOF
19237 if { (eval echo configure:19238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19238   rm -rf conftest*
19239   ol_cv_db_db_4_1=yes
19240 else
19241   echo "configure: failed program was:" >&5
19242   cat conftest.$ac_ext >&5
19243   rm -rf conftest*
19244   ol_cv_db_db_4_1=no
19245 fi
19246 rm -f conftest*
19247
19248         LIBS="$ol_LIBS"
19249
19250 fi
19251
19252 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19253
19254         if test $ol_cv_db_db_4_1 = yes ; then
19255                 ol_cv_lib_db=-ldb-4-1
19256         fi
19257 fi
19258
19259 if test $ol_cv_lib_db = no ; then
19260         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19261 echo "configure:19262: checking for Berkeley DB link (-ldb3)" >&5
19262 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19263   echo $ac_n "(cached) $ac_c" 1>&6
19264 else
19265   
19266         ol_DB_LIB=-ldb3
19267         ol_LIBS=$LIBS
19268         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19269
19270         cat > conftest.$ac_ext <<EOF
19271 #line 19272 "configure"
19272 #include "confdefs.h"
19273
19274 #ifdef HAVE_DB_185_H
19275 # include <db_185.h>
19276 #else
19277 # include <db.h>
19278 #endif
19279
19280 #ifndef DB_VERSION_MAJOR
19281 # define DB_VERSION_MAJOR 1
19282 #endif
19283
19284 #ifndef NULL
19285 #define NULL ((void*)0)
19286 #endif
19287
19288 int main() {
19289
19290 #if DB_VERSION_MAJOR > 1
19291         {
19292                 char *version;
19293                 int major, minor, patch;
19294
19295                 version = db_version( &major, &minor, &patch );
19296
19297                 if( major != DB_VERSION_MAJOR ||
19298                         minor < DB_VERSION_MINOR )
19299                 {
19300                         printf("Berkeley DB version mismatch\n"
19301                                 "\texpected: %s\n\tgot: %s\n",
19302                                 DB_VERSION_STRING, version);
19303                         return 1;
19304                 }
19305         }
19306 #endif
19307
19308 #if DB_VERSION_MAJOR > 2
19309         db_env_create( NULL, 0 );
19310 #elif DB_VERSION_MAJOR > 1
19311         db_appexit( NULL );
19312 #else
19313         (void) dbopen( NULL, 0, 0, 0, NULL);
19314 #endif
19315
19316 ; return 0; }
19317 EOF
19318 if { (eval echo configure:19319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19319   rm -rf conftest*
19320   ol_cv_db_db3=yes
19321 else
19322   echo "configure: failed program was:" >&5
19323   cat conftest.$ac_ext >&5
19324   rm -rf conftest*
19325   ol_cv_db_db3=no
19326 fi
19327 rm -f conftest*
19328
19329         LIBS="$ol_LIBS"
19330
19331 fi
19332
19333 echo "$ac_t""$ol_cv_db_db3" 1>&6
19334
19335         if test $ol_cv_db_db3 = yes ; then
19336                 ol_cv_lib_db=-ldb3
19337         fi
19338 fi
19339
19340 if test $ol_cv_lib_db = no ; then
19341         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19342 echo "configure:19343: checking for Berkeley DB link (-ldb-3)" >&5
19343 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19344   echo $ac_n "(cached) $ac_c" 1>&6
19345 else
19346   
19347         ol_DB_LIB=-ldb-3
19348         ol_LIBS=$LIBS
19349         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19350
19351         cat > conftest.$ac_ext <<EOF
19352 #line 19353 "configure"
19353 #include "confdefs.h"
19354
19355 #ifdef HAVE_DB_185_H
19356 # include <db_185.h>
19357 #else
19358 # include <db.h>
19359 #endif
19360
19361 #ifndef DB_VERSION_MAJOR
19362 # define DB_VERSION_MAJOR 1
19363 #endif
19364
19365 #ifndef NULL
19366 #define NULL ((void*)0)
19367 #endif
19368
19369 int main() {
19370
19371 #if DB_VERSION_MAJOR > 1
19372         {
19373                 char *version;
19374                 int major, minor, patch;
19375
19376                 version = db_version( &major, &minor, &patch );
19377
19378                 if( major != DB_VERSION_MAJOR ||
19379                         minor < DB_VERSION_MINOR )
19380                 {
19381                         printf("Berkeley DB version mismatch\n"
19382                                 "\texpected: %s\n\tgot: %s\n",
19383                                 DB_VERSION_STRING, version);
19384                         return 1;
19385                 }
19386         }
19387 #endif
19388
19389 #if DB_VERSION_MAJOR > 2
19390         db_env_create( NULL, 0 );
19391 #elif DB_VERSION_MAJOR > 1
19392         db_appexit( NULL );
19393 #else
19394         (void) dbopen( NULL, 0, 0, 0, NULL);
19395 #endif
19396
19397 ; return 0; }
19398 EOF
19399 if { (eval echo configure:19400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19400   rm -rf conftest*
19401   ol_cv_db_db_3=yes
19402 else
19403   echo "configure: failed program was:" >&5
19404   cat conftest.$ac_ext >&5
19405   rm -rf conftest*
19406   ol_cv_db_db_3=no
19407 fi
19408 rm -f conftest*
19409
19410         LIBS="$ol_LIBS"
19411
19412 fi
19413
19414 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19415
19416         if test $ol_cv_db_db_3 = yes ; then
19417                 ol_cv_lib_db=-ldb-3
19418         fi
19419 fi
19420
19421 if test $ol_cv_lib_db = no ; then
19422         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19423 echo "configure:19424: checking for Berkeley DB link (-ldb2)" >&5
19424 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19425   echo $ac_n "(cached) $ac_c" 1>&6
19426 else
19427   
19428         ol_DB_LIB=-ldb2
19429         ol_LIBS=$LIBS
19430         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19431
19432         cat > conftest.$ac_ext <<EOF
19433 #line 19434 "configure"
19434 #include "confdefs.h"
19435
19436 #ifdef HAVE_DB_185_H
19437 # include <db_185.h>
19438 #else
19439 # include <db.h>
19440 #endif
19441
19442 #ifndef DB_VERSION_MAJOR
19443 # define DB_VERSION_MAJOR 1
19444 #endif
19445
19446 #ifndef NULL
19447 #define NULL ((void*)0)
19448 #endif
19449
19450 int main() {
19451
19452 #if DB_VERSION_MAJOR > 1
19453         {
19454                 char *version;
19455                 int major, minor, patch;
19456
19457                 version = db_version( &major, &minor, &patch );
19458
19459                 if( major != DB_VERSION_MAJOR ||
19460                         minor < DB_VERSION_MINOR )
19461                 {
19462                         printf("Berkeley DB version mismatch\n"
19463                                 "\texpected: %s\n\tgot: %s\n",
19464                                 DB_VERSION_STRING, version);
19465                         return 1;
19466                 }
19467         }
19468 #endif
19469
19470 #if DB_VERSION_MAJOR > 2
19471         db_env_create( NULL, 0 );
19472 #elif DB_VERSION_MAJOR > 1
19473         db_appexit( NULL );
19474 #else
19475         (void) dbopen( NULL, 0, 0, 0, NULL);
19476 #endif
19477
19478 ; return 0; }
19479 EOF
19480 if { (eval echo configure:19481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19481   rm -rf conftest*
19482   ol_cv_db_db2=yes
19483 else
19484   echo "configure: failed program was:" >&5
19485   cat conftest.$ac_ext >&5
19486   rm -rf conftest*
19487   ol_cv_db_db2=no
19488 fi
19489 rm -f conftest*
19490
19491         LIBS="$ol_LIBS"
19492
19493 fi
19494
19495 echo "$ac_t""$ol_cv_db_db2" 1>&6
19496
19497         if test $ol_cv_db_db2 = yes ; then
19498                 ol_cv_lib_db=-ldb2
19499         fi
19500 fi
19501
19502 if test $ol_cv_lib_db = no ; then
19503         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19504 echo "configure:19505: checking for Berkeley DB link (-ldb-2)" >&5
19505 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19506   echo $ac_n "(cached) $ac_c" 1>&6
19507 else
19508   
19509         ol_DB_LIB=-ldb-2
19510         ol_LIBS=$LIBS
19511         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19512
19513         cat > conftest.$ac_ext <<EOF
19514 #line 19515 "configure"
19515 #include "confdefs.h"
19516
19517 #ifdef HAVE_DB_185_H
19518 # include <db_185.h>
19519 #else
19520 # include <db.h>
19521 #endif
19522
19523 #ifndef DB_VERSION_MAJOR
19524 # define DB_VERSION_MAJOR 1
19525 #endif
19526
19527 #ifndef NULL
19528 #define NULL ((void*)0)
19529 #endif
19530
19531 int main() {
19532
19533 #if DB_VERSION_MAJOR > 1
19534         {
19535                 char *version;
19536                 int major, minor, patch;
19537
19538                 version = db_version( &major, &minor, &patch );
19539
19540                 if( major != DB_VERSION_MAJOR ||
19541                         minor < DB_VERSION_MINOR )
19542                 {
19543                         printf("Berkeley DB version mismatch\n"
19544                                 "\texpected: %s\n\tgot: %s\n",
19545                                 DB_VERSION_STRING, version);
19546                         return 1;
19547                 }
19548         }
19549 #endif
19550
19551 #if DB_VERSION_MAJOR > 2
19552         db_env_create( NULL, 0 );
19553 #elif DB_VERSION_MAJOR > 1
19554         db_appexit( NULL );
19555 #else
19556         (void) dbopen( NULL, 0, 0, 0, NULL);
19557 #endif
19558
19559 ; return 0; }
19560 EOF
19561 if { (eval echo configure:19562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19562   rm -rf conftest*
19563   ol_cv_db_db_2=yes
19564 else
19565   echo "configure: failed program was:" >&5
19566   cat conftest.$ac_ext >&5
19567   rm -rf conftest*
19568   ol_cv_db_db_2=no
19569 fi
19570 rm -f conftest*
19571
19572         LIBS="$ol_LIBS"
19573
19574 fi
19575
19576 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19577
19578         if test $ol_cv_db_db_2 = yes ; then
19579                 ol_cv_lib_db=-ldb-2
19580         fi
19581 fi
19582
19583 if test $ol_cv_lib_db = no ; then
19584         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19585 echo "configure:19586: checking for Berkeley DB link (-ldb1)" >&5
19586 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19587   echo $ac_n "(cached) $ac_c" 1>&6
19588 else
19589   
19590         ol_DB_LIB=-ldb1
19591         ol_LIBS=$LIBS
19592         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19593
19594         cat > conftest.$ac_ext <<EOF
19595 #line 19596 "configure"
19596 #include "confdefs.h"
19597
19598 #ifdef HAVE_DB_185_H
19599 # include <db_185.h>
19600 #else
19601 # include <db.h>
19602 #endif
19603
19604 #ifndef DB_VERSION_MAJOR
19605 # define DB_VERSION_MAJOR 1
19606 #endif
19607
19608 #ifndef NULL
19609 #define NULL ((void*)0)
19610 #endif
19611
19612 int main() {
19613
19614 #if DB_VERSION_MAJOR > 1
19615         {
19616                 char *version;
19617                 int major, minor, patch;
19618
19619                 version = db_version( &major, &minor, &patch );
19620
19621                 if( major != DB_VERSION_MAJOR ||
19622                         minor < DB_VERSION_MINOR )
19623                 {
19624                         printf("Berkeley DB version mismatch\n"
19625                                 "\texpected: %s\n\tgot: %s\n",
19626                                 DB_VERSION_STRING, version);
19627                         return 1;
19628                 }
19629         }
19630 #endif
19631
19632 #if DB_VERSION_MAJOR > 2
19633         db_env_create( NULL, 0 );
19634 #elif DB_VERSION_MAJOR > 1
19635         db_appexit( NULL );
19636 #else
19637         (void) dbopen( NULL, 0, 0, 0, NULL);
19638 #endif
19639
19640 ; return 0; }
19641 EOF
19642 if { (eval echo configure:19643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19643   rm -rf conftest*
19644   ol_cv_db_db1=yes
19645 else
19646   echo "configure: failed program was:" >&5
19647   cat conftest.$ac_ext >&5
19648   rm -rf conftest*
19649   ol_cv_db_db1=no
19650 fi
19651 rm -f conftest*
19652
19653         LIBS="$ol_LIBS"
19654
19655 fi
19656
19657 echo "$ac_t""$ol_cv_db_db1" 1>&6
19658
19659         if test $ol_cv_db_db1 = yes ; then
19660                 ol_cv_lib_db=-ldb1
19661         fi
19662 fi
19663
19664 if test $ol_cv_lib_db = no ; then
19665         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19666 echo "configure:19667: checking for Berkeley DB link (-ldb-1)" >&5
19667 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19668   echo $ac_n "(cached) $ac_c" 1>&6
19669 else
19670   
19671         ol_DB_LIB=-ldb-1
19672         ol_LIBS=$LIBS
19673         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19674
19675         cat > conftest.$ac_ext <<EOF
19676 #line 19677 "configure"
19677 #include "confdefs.h"
19678
19679 #ifdef HAVE_DB_185_H
19680 # include <db_185.h>
19681 #else
19682 # include <db.h>
19683 #endif
19684
19685 #ifndef DB_VERSION_MAJOR
19686 # define DB_VERSION_MAJOR 1
19687 #endif
19688
19689 #ifndef NULL
19690 #define NULL ((void*)0)
19691 #endif
19692
19693 int main() {
19694
19695 #if DB_VERSION_MAJOR > 1
19696         {
19697                 char *version;
19698                 int major, minor, patch;
19699
19700                 version = db_version( &major, &minor, &patch );
19701
19702                 if( major != DB_VERSION_MAJOR ||
19703                         minor < DB_VERSION_MINOR )
19704                 {
19705                         printf("Berkeley DB version mismatch\n"
19706                                 "\texpected: %s\n\tgot: %s\n",
19707                                 DB_VERSION_STRING, version);
19708                         return 1;
19709                 }
19710         }
19711 #endif
19712
19713 #if DB_VERSION_MAJOR > 2
19714         db_env_create( NULL, 0 );
19715 #elif DB_VERSION_MAJOR > 1
19716         db_appexit( NULL );
19717 #else
19718         (void) dbopen( NULL, 0, 0, 0, NULL);
19719 #endif
19720
19721 ; return 0; }
19722 EOF
19723 if { (eval echo configure:19724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19724   rm -rf conftest*
19725   ol_cv_db_db_1=yes
19726 else
19727   echo "configure: failed program was:" >&5
19728   cat conftest.$ac_ext >&5
19729   rm -rf conftest*
19730   ol_cv_db_db_1=no
19731 fi
19732 rm -f conftest*
19733
19734         LIBS="$ol_LIBS"
19735
19736 fi
19737
19738 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19739
19740         if test $ol_cv_db_db_1 = yes ; then
19741                 ol_cv_lib_db=-ldb-1
19742         fi
19743 fi
19744
19745
19746         if test "$ol_cv_lib_db" != no ; then
19747                 ol_cv_berkeley_db=yes
19748                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19749 echo "configure:19750: checking for Berkeley DB thread support" >&5
19750 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19751   echo $ac_n "(cached) $ac_c" 1>&6
19752 else
19753   
19754         ol_LIBS="$LIBS"
19755         LIBS="$LTHREAD_LIBS $LIBS"
19756         if test $ol_cv_lib_db != yes ; then
19757                 LIBS="$ol_cv_lib_db $LIBS"
19758         fi
19759
19760         if test "$cross_compiling" = yes; then
19761   ol_cv_berkeley_db_thread=cross
19762 else
19763   cat > conftest.$ac_ext <<EOF
19764 #line 19765 "configure"
19765 #include "confdefs.h"
19766
19767 #ifdef HAVE_DB_185_H
19768         choke me;
19769 #else
19770 #include <db.h>
19771 #endif
19772 #ifndef NULL
19773 #define NULL ((void *)0)
19774 #endif
19775 main()
19776 {
19777         int rc;
19778         u_int32_t flags = DB_CREATE |
19779 #ifdef DB_PRIVATE
19780                 DB_PRIVATE |
19781 #endif
19782                 DB_THREAD;
19783
19784 #if DB_VERSION_MAJOR > 2
19785         DB_ENV *env = NULL;
19786
19787         rc = db_env_create( &env, 0 );
19788
19789         flags |= DB_INIT_MPOOL;
19790 #ifdef DB_MPOOL_PRIVATE
19791         flags |= DB_MPOOL_PRIVATE;
19792 #endif
19793
19794         if( rc ) {
19795                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19796                 return rc;
19797         }
19798
19799 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19800         rc = env->open( env, NULL, flags, 0 );
19801 #else
19802         rc = env->open( env, NULL, NULL, flags, 0 );
19803 #endif
19804
19805         if ( rc == 0 ) {
19806                 rc = env->close( env, 0 );
19807         }
19808
19809         if( rc ) {
19810                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19811                 return rc;
19812         }
19813
19814 #else
19815         DB_ENV env;
19816         memset( &env, '\0', sizeof(env) );
19817
19818         rc = db_appinit( NULL, NULL, &env, flags );
19819
19820         if( rc == 0 ) {
19821                 db_appexit( &env );
19822         }
19823
19824         unlink("__db_mpool.share");
19825         unlink("__db_lock.share");
19826 #endif
19827
19828         return rc;
19829 }
19830 EOF
19831 if { (eval echo configure:19832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19832 then
19833   ol_cv_berkeley_db_thread=yes
19834 else
19835   echo "configure: failed program was:" >&5
19836   cat conftest.$ac_ext >&5
19837   rm -fr conftest*
19838   ol_cv_berkeley_db_thread=no
19839 fi
19840 rm -fr conftest*
19841 fi
19842
19843
19844         LIBS="$ol_LIBS"
19845
19846 fi
19847
19848 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19849
19850         if test $ol_cv_berkeley_db_thread != no ; then
19851                 cat >> confdefs.h <<\EOF
19852 #define HAVE_BERKELEY_DB_THREAD 1
19853 EOF
19854
19855         fi
19856
19857         fi
19858 fi
19859
19860         fi
19861
19862         if test $ol_cv_berkeley_db != no ; then
19863                 cat >> confdefs.h <<\EOF
19864 #define HAVE_BERKELEY_DB 1
19865 EOF
19866
19867
19868                 ol_link_ldbm=berkeley
19869                 ol_with_ldbm_api=berkeley
19870
19871                 if test $ol_with_ldbm_type = hash ; then
19872                         cat >> confdefs.h <<\EOF
19873 #define LDBM_USE_DBHASH 1
19874 EOF
19875
19876                 else
19877                         cat >> confdefs.h <<\EOF
19878 #define LDBM_USE_DBBTREE 1
19879 EOF
19880
19881                 fi
19882
19883                                                 if test $ol_cv_lib_db != yes ; then
19884                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19885                 fi
19886         fi
19887 fi
19888
19889 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19890         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19891 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19892         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19893 echo "configure:19894: checking Berkeley DB version for BDB backend" >&5
19894 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19895   echo $ac_n "(cached) $ac_c" 1>&6
19896 else
19897   
19898         cat > conftest.$ac_ext <<EOF
19899 #line 19900 "configure"
19900 #include "confdefs.h"
19901
19902 #include <db.h>
19903
19904  /* this check could be improved */
19905 #ifndef DB_VERSION_MAJOR
19906 #       define DB_VERSION_MAJOR 1
19907 #endif
19908 #ifndef DB_VERSION_MINOR
19909 #       define DB_VERSION_MINOR 0
19910 #endif
19911
19912 /* require 4.2 or later */
19913 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19914         __db_version_compat
19915 #endif
19916         
19917 EOF
19918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19919   egrep "__db_version_compat" >/dev/null 2>&1; then
19920   rm -rf conftest*
19921   ol_cv_bdb_compat=yes
19922 else
19923   rm -rf conftest*
19924   ol_cv_bdb_compat=no
19925 fi
19926 rm -f conftest*
19927
19928 fi
19929
19930 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19931
19932
19933         if test $ol_cv_bdb_compat = yes ; then
19934                 ol_enable_bdb=yes
19935         elif test $ol_enable_bdb = yes ; then
19936                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19937         else
19938                 ol_enable_bdb=no
19939         fi
19940 fi
19941 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19942         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19943 fi
19944
19945 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19946         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19947         ol_with_ldbm_api=none
19948 fi
19949
19950 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19951         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19952 echo "configure:19953: checking for MDBM library" >&5
19953 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19954   echo $ac_n "(cached) $ac_c" 1>&6
19955 else
19956         ol_LIBS="$LIBS"
19957         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19958 echo "configure:19959: checking for mdbm_set_chain" >&5
19959 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19960   echo $ac_n "(cached) $ac_c" 1>&6
19961 else
19962   cat > conftest.$ac_ext <<EOF
19963 #line 19964 "configure"
19964 #include "confdefs.h"
19965 /* System header to define __stub macros and hopefully few prototypes,
19966     which can conflict with char mdbm_set_chain(); below.  */
19967 #include <assert.h>
19968 /* Override any gcc2 internal prototype to avoid an error.  */
19969 /* We use char because int might match the return type of a gcc2
19970     builtin and then its argument prototype would still apply.  */
19971 char mdbm_set_chain();
19972 char (*f)();
19973
19974 int main() {
19975
19976 /* The GNU C library defines this for functions which it implements
19977     to always fail with ENOSYS.  Some functions are actually named
19978     something starting with __ and the normal name is an alias.  */
19979 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19980 choke me
19981 #else
19982 f = mdbm_set_chain;
19983 #endif
19984
19985 ; return 0; }
19986 EOF
19987 if { (eval echo configure:19988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19988   rm -rf conftest*
19989   eval "ac_cv_func_mdbm_set_chain=yes"
19990 else
19991   echo "configure: failed program was:" >&5
19992   cat conftest.$ac_ext >&5
19993   rm -rf conftest*
19994   eval "ac_cv_func_mdbm_set_chain=no"
19995 fi
19996 rm -f conftest*
19997 fi
19998
19999 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20000   echo "$ac_t""yes" 1>&6
20001   ol_cv_lib_mdbm=yes
20002 else
20003   echo "$ac_t""no" 1>&6
20004
20005                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20006 echo "configure:20007: checking for mdbm_set_chain in -lmdbm" >&5
20007 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20008 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20009   echo $ac_n "(cached) $ac_c" 1>&6
20010 else
20011   ac_save_LIBS="$LIBS"
20012 LIBS="-lmdbm  $LIBS"
20013 cat > conftest.$ac_ext <<EOF
20014 #line 20015 "configure"
20015 #include "confdefs.h"
20016 /* Override any gcc2 internal prototype to avoid an error.  */
20017 /* We use char because int might match the return type of a gcc2
20018     builtin and then its argument prototype would still apply.  */
20019 char mdbm_set_chain();
20020
20021 int main() {
20022 mdbm_set_chain()
20023 ; return 0; }
20024 EOF
20025 if { (eval echo configure:20026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20026   rm -rf conftest*
20027   eval "ac_cv_lib_$ac_lib_var=yes"
20028 else
20029   echo "configure: failed program was:" >&5
20030   cat conftest.$ac_ext >&5
20031   rm -rf conftest*
20032   eval "ac_cv_lib_$ac_lib_var=no"
20033 fi
20034 rm -f conftest*
20035 LIBS="$ac_save_LIBS"
20036
20037 fi
20038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20039   echo "$ac_t""yes" 1>&6
20040   ol_cv_lib_mdbm=-lmdbm
20041 else
20042   echo "$ac_t""no" 1>&6
20043 ol_cv_lib_mdbm=no
20044 fi
20045
20046         
20047 fi
20048
20049         LIBS="$ol_LIBS"
20050
20051 fi
20052
20053 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20054
20055
20056  for ac_hdr in mdbm.h
20057 do
20058 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20059 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20060 echo "configure:20061: checking for $ac_hdr" >&5
20061 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20062   echo $ac_n "(cached) $ac_c" 1>&6
20063 else
20064   cat > conftest.$ac_ext <<EOF
20065 #line 20066 "configure"
20066 #include "confdefs.h"
20067 #include <$ac_hdr>
20068 EOF
20069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20070 { (eval echo configure:20071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20072 if test -z "$ac_err"; then
20073   rm -rf conftest*
20074   eval "ac_cv_header_$ac_safe=yes"
20075 else
20076   echo "$ac_err" >&5
20077   echo "configure: failed program was:" >&5
20078   cat conftest.$ac_ext >&5
20079   rm -rf conftest*
20080   eval "ac_cv_header_$ac_safe=no"
20081 fi
20082 rm -f conftest*
20083 fi
20084 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20085   echo "$ac_t""yes" 1>&6
20086     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20087   cat >> confdefs.h <<EOF
20088 #define $ac_tr_hdr 1
20089 EOF
20090  
20091 else
20092   echo "$ac_t""no" 1>&6
20093 fi
20094 done
20095
20096  echo $ac_n "checking for db""... $ac_c" 1>&6
20097 echo "configure:20098: checking for db" >&5
20098 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20099   echo $ac_n "(cached) $ac_c" 1>&6
20100 else
20101   
20102         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20103                 ol_cv_mdbm=no
20104         else
20105                 ol_cv_mdbm=yes
20106         fi
20107
20108 fi
20109
20110 echo "$ac_t""$ol_cv_mdbm" 1>&6
20111  if test $ol_cv_mdbm = yes ; then
20112         cat >> confdefs.h <<\EOF
20113 #define HAVE_MDBM 1
20114 EOF
20115
20116  fi
20117
20118
20119         if test $ol_cv_mdbm = yes ; then
20120                 ol_link_ldbm=mdbm
20121                 ol_with_ldbm_api=mdbm
20122                 if test $ol_cv_lib_mdbm != yes ; then
20123                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20124                 fi
20125         fi
20126 fi
20127
20128 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20129         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20130 echo "configure:20131: checking for GDBM library" >&5
20131 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20132   echo $ac_n "(cached) $ac_c" 1>&6
20133 else
20134         ol_LIBS="$LIBS"
20135         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20136 echo "configure:20137: checking for gdbm_open" >&5
20137 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20138   echo $ac_n "(cached) $ac_c" 1>&6
20139 else
20140   cat > conftest.$ac_ext <<EOF
20141 #line 20142 "configure"
20142 #include "confdefs.h"
20143 /* System header to define __stub macros and hopefully few prototypes,
20144     which can conflict with char gdbm_open(); below.  */
20145 #include <assert.h>
20146 /* Override any gcc2 internal prototype to avoid an error.  */
20147 /* We use char because int might match the return type of a gcc2
20148     builtin and then its argument prototype would still apply.  */
20149 char gdbm_open();
20150 char (*f)();
20151
20152 int main() {
20153
20154 /* The GNU C library defines this for functions which it implements
20155     to always fail with ENOSYS.  Some functions are actually named
20156     something starting with __ and the normal name is an alias.  */
20157 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20158 choke me
20159 #else
20160 f = gdbm_open;
20161 #endif
20162
20163 ; return 0; }
20164 EOF
20165 if { (eval echo configure:20166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20166   rm -rf conftest*
20167   eval "ac_cv_func_gdbm_open=yes"
20168 else
20169   echo "configure: failed program was:" >&5
20170   cat conftest.$ac_ext >&5
20171   rm -rf conftest*
20172   eval "ac_cv_func_gdbm_open=no"
20173 fi
20174 rm -f conftest*
20175 fi
20176
20177 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20178   echo "$ac_t""yes" 1>&6
20179   ol_cv_lib_gdbm=yes
20180 else
20181   echo "$ac_t""no" 1>&6
20182
20183                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20184 echo "configure:20185: checking for gdbm_open in -lgdbm" >&5
20185 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20186 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20187   echo $ac_n "(cached) $ac_c" 1>&6
20188 else
20189   ac_save_LIBS="$LIBS"
20190 LIBS="-lgdbm  $LIBS"
20191 cat > conftest.$ac_ext <<EOF
20192 #line 20193 "configure"
20193 #include "confdefs.h"
20194 /* Override any gcc2 internal prototype to avoid an error.  */
20195 /* We use char because int might match the return type of a gcc2
20196     builtin and then its argument prototype would still apply.  */
20197 char gdbm_open();
20198
20199 int main() {
20200 gdbm_open()
20201 ; return 0; }
20202 EOF
20203 if { (eval echo configure:20204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20204   rm -rf conftest*
20205   eval "ac_cv_lib_$ac_lib_var=yes"
20206 else
20207   echo "configure: failed program was:" >&5
20208   cat conftest.$ac_ext >&5
20209   rm -rf conftest*
20210   eval "ac_cv_lib_$ac_lib_var=no"
20211 fi
20212 rm -f conftest*
20213 LIBS="$ac_save_LIBS"
20214
20215 fi
20216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20217   echo "$ac_t""yes" 1>&6
20218   ol_cv_lib_gdbm=-lgdbm
20219 else
20220   echo "$ac_t""no" 1>&6
20221 ol_cv_lib_gdbm=no
20222 fi
20223
20224         
20225 fi
20226
20227         LIBS="$ol_LIBS"
20228
20229 fi
20230
20231 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20232
20233
20234  for ac_hdr in gdbm.h
20235 do
20236 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20237 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20238 echo "configure:20239: checking for $ac_hdr" >&5
20239 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20240   echo $ac_n "(cached) $ac_c" 1>&6
20241 else
20242   cat > conftest.$ac_ext <<EOF
20243 #line 20244 "configure"
20244 #include "confdefs.h"
20245 #include <$ac_hdr>
20246 EOF
20247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20248 { (eval echo configure:20249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20250 if test -z "$ac_err"; then
20251   rm -rf conftest*
20252   eval "ac_cv_header_$ac_safe=yes"
20253 else
20254   echo "$ac_err" >&5
20255   echo "configure: failed program was:" >&5
20256   cat conftest.$ac_ext >&5
20257   rm -rf conftest*
20258   eval "ac_cv_header_$ac_safe=no"
20259 fi
20260 rm -f conftest*
20261 fi
20262 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20263   echo "$ac_t""yes" 1>&6
20264     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20265   cat >> confdefs.h <<EOF
20266 #define $ac_tr_hdr 1
20267 EOF
20268  
20269 else
20270   echo "$ac_t""no" 1>&6
20271 fi
20272 done
20273
20274  echo $ac_n "checking for db""... $ac_c" 1>&6
20275 echo "configure:20276: checking for db" >&5
20276 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20277   echo $ac_n "(cached) $ac_c" 1>&6
20278 else
20279   
20280         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20281                 ol_cv_gdbm=no
20282         else
20283                 ol_cv_gdbm=yes
20284         fi
20285
20286 fi
20287
20288 echo "$ac_t""$ol_cv_gdbm" 1>&6
20289  if test $ol_cv_gdbm = yes ; then
20290         cat >> confdefs.h <<\EOF
20291 #define HAVE_GDBM 1
20292 EOF
20293
20294  fi
20295
20296
20297         if test $ol_cv_gdbm = yes ; then
20298                 ol_link_ldbm=gdbm
20299                 ol_with_ldbm_api=gdbm
20300
20301                 if test $ol_cv_lib_gdbm != yes ; then
20302                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20303                 fi
20304         fi
20305 fi
20306
20307 if test $ol_with_ldbm_api = ndbm ; then
20308         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20309 echo "configure:20310: checking for NDBM library" >&5
20310 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20311   echo $ac_n "(cached) $ac_c" 1>&6
20312 else
20313         ol_LIBS="$LIBS"
20314         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20315 echo "configure:20316: checking for dbm_open" >&5
20316 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20317   echo $ac_n "(cached) $ac_c" 1>&6
20318 else
20319   cat > conftest.$ac_ext <<EOF
20320 #line 20321 "configure"
20321 #include "confdefs.h"
20322 /* System header to define __stub macros and hopefully few prototypes,
20323     which can conflict with char dbm_open(); below.  */
20324 #include <assert.h>
20325 /* Override any gcc2 internal prototype to avoid an error.  */
20326 /* We use char because int might match the return type of a gcc2
20327     builtin and then its argument prototype would still apply.  */
20328 char dbm_open();
20329 char (*f)();
20330
20331 int main() {
20332
20333 /* The GNU C library defines this for functions which it implements
20334     to always fail with ENOSYS.  Some functions are actually named
20335     something starting with __ and the normal name is an alias.  */
20336 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20337 choke me
20338 #else
20339 f = dbm_open;
20340 #endif
20341
20342 ; return 0; }
20343 EOF
20344 if { (eval echo configure:20345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20345   rm -rf conftest*
20346   eval "ac_cv_func_dbm_open=yes"
20347 else
20348   echo "configure: failed program was:" >&5
20349   cat conftest.$ac_ext >&5
20350   rm -rf conftest*
20351   eval "ac_cv_func_dbm_open=no"
20352 fi
20353 rm -f conftest*
20354 fi
20355
20356 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20357   echo "$ac_t""yes" 1>&6
20358   ol_cv_lib_ndbm=yes
20359 else
20360   echo "$ac_t""no" 1>&6
20361
20362                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20363 echo "configure:20364: checking for dbm_open in -lndbm" >&5
20364 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20365 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20366   echo $ac_n "(cached) $ac_c" 1>&6
20367 else
20368   ac_save_LIBS="$LIBS"
20369 LIBS="-lndbm  $LIBS"
20370 cat > conftest.$ac_ext <<EOF
20371 #line 20372 "configure"
20372 #include "confdefs.h"
20373 /* Override any gcc2 internal prototype to avoid an error.  */
20374 /* We use char because int might match the return type of a gcc2
20375     builtin and then its argument prototype would still apply.  */
20376 char dbm_open();
20377
20378 int main() {
20379 dbm_open()
20380 ; return 0; }
20381 EOF
20382 if { (eval echo configure:20383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20383   rm -rf conftest*
20384   eval "ac_cv_lib_$ac_lib_var=yes"
20385 else
20386   echo "configure: failed program was:" >&5
20387   cat conftest.$ac_ext >&5
20388   rm -rf conftest*
20389   eval "ac_cv_lib_$ac_lib_var=no"
20390 fi
20391 rm -f conftest*
20392 LIBS="$ac_save_LIBS"
20393
20394 fi
20395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20396   echo "$ac_t""yes" 1>&6
20397   ol_cv_lib_ndbm=-lndbm
20398 else
20399   echo "$ac_t""no" 1>&6
20400
20401                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20402 echo "configure:20403: checking for dbm_open in -ldbm" >&5
20403 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20404 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20405   echo $ac_n "(cached) $ac_c" 1>&6
20406 else
20407   ac_save_LIBS="$LIBS"
20408 LIBS="-ldbm  $LIBS"
20409 cat > conftest.$ac_ext <<EOF
20410 #line 20411 "configure"
20411 #include "confdefs.h"
20412 /* Override any gcc2 internal prototype to avoid an error.  */
20413 /* We use char because int might match the return type of a gcc2
20414     builtin and then its argument prototype would still apply.  */
20415 char dbm_open();
20416
20417 int main() {
20418 dbm_open()
20419 ; return 0; }
20420 EOF
20421 if { (eval echo configure:20422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20422   rm -rf conftest*
20423   eval "ac_cv_lib_$ac_lib_var=yes"
20424 else
20425   echo "configure: failed program was:" >&5
20426   cat conftest.$ac_ext >&5
20427   rm -rf conftest*
20428   eval "ac_cv_lib_$ac_lib_var=no"
20429 fi
20430 rm -f conftest*
20431 LIBS="$ac_save_LIBS"
20432
20433 fi
20434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20435   echo "$ac_t""yes" 1>&6
20436   ol_cv_lib_ndbm=-ldbm
20437 else
20438   echo "$ac_t""no" 1>&6
20439 ol_cv_lib_ndbm=no
20440 fi
20441                 
20442 fi
20443
20444         
20445 fi
20446
20447         LIBS="$ol_LIBS"
20448
20449 fi
20450
20451 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20452
20453
20454  for ac_hdr in ndbm.h
20455 do
20456 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20457 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20458 echo "configure:20459: checking for $ac_hdr" >&5
20459 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20460   echo $ac_n "(cached) $ac_c" 1>&6
20461 else
20462   cat > conftest.$ac_ext <<EOF
20463 #line 20464 "configure"
20464 #include "confdefs.h"
20465 #include <$ac_hdr>
20466 EOF
20467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20468 { (eval echo configure:20469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20470 if test -z "$ac_err"; then
20471   rm -rf conftest*
20472   eval "ac_cv_header_$ac_safe=yes"
20473 else
20474   echo "$ac_err" >&5
20475   echo "configure: failed program was:" >&5
20476   cat conftest.$ac_ext >&5
20477   rm -rf conftest*
20478   eval "ac_cv_header_$ac_safe=no"
20479 fi
20480 rm -f conftest*
20481 fi
20482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20483   echo "$ac_t""yes" 1>&6
20484     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20485   cat >> confdefs.h <<EOF
20486 #define $ac_tr_hdr 1
20487 EOF
20488  
20489 else
20490   echo "$ac_t""no" 1>&6
20491 fi
20492 done
20493
20494  echo $ac_n "checking for db""... $ac_c" 1>&6
20495 echo "configure:20496: checking for db" >&5
20496 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20497   echo $ac_n "(cached) $ac_c" 1>&6
20498 else
20499   
20500         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20501                 ol_cv_ndbm=no
20502         else
20503                 ol_cv_ndbm=yes
20504         fi
20505
20506 fi
20507
20508 echo "$ac_t""$ol_cv_ndbm" 1>&6
20509  if test $ol_cv_ndbm = yes ; then
20510         cat >> confdefs.h <<\EOF
20511 #define HAVE_NDBM 1
20512 EOF
20513
20514  fi
20515
20516
20517         if test $ol_cv_ndbm = yes ; then
20518                 ol_link_ldbm=ndbm
20519                 ol_with_ldbm_api=ndbm
20520
20521                 if test $ol_cv_lib_ndbm != yes ; then
20522                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20523                 fi
20524         fi
20525 fi
20526
20527 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20528         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20529         if test $ol_enable_ldbm = yes ; then
20530                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20531         fi
20532
20533         echo "configure: warning: disabling LDBM" 1>&2
20534         ol_enable_ldbm=no
20535 fi
20536
20537
20538 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20539         BUILD_LIBS_DYNAMIC=shared
20540         cat >> confdefs.h <<\EOF
20541 #define LDAP_LIBS_DYNAMIC 1
20542 EOF
20543
20544         LTSTATIC=""
20545 else
20546         BUILD_LIBS_DYNAMIC=static
20547         LTSTATIC="-static"
20548 fi
20549
20550 if test $ol_enable_wrappers != no ; then
20551         for ac_hdr in tcpd.h
20552 do
20553 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20554 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20555 echo "configure:20556: checking for $ac_hdr" >&5
20556 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20557   echo $ac_n "(cached) $ac_c" 1>&6
20558 else
20559   cat > conftest.$ac_ext <<EOF
20560 #line 20561 "configure"
20561 #include "confdefs.h"
20562 #include <$ac_hdr>
20563 EOF
20564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20565 { (eval echo configure:20566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20567 if test -z "$ac_err"; then
20568   rm -rf conftest*
20569   eval "ac_cv_header_$ac_safe=yes"
20570 else
20571   echo "$ac_err" >&5
20572   echo "configure: failed program was:" >&5
20573   cat conftest.$ac_ext >&5
20574   rm -rf conftest*
20575   eval "ac_cv_header_$ac_safe=no"
20576 fi
20577 rm -f conftest*
20578 fi
20579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20580   echo "$ac_t""yes" 1>&6
20581     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20582   cat >> confdefs.h <<EOF
20583 #define $ac_tr_hdr 1
20584 EOF
20585  
20586                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20587 echo "configure:20588: checking for TCP wrappers library" >&5
20588                 save_LIBS="$LIBS"
20589                 LIBS="$LIBS -lwrap"
20590                 cat > conftest.$ac_ext <<EOF
20591 #line 20592 "configure"
20592 #include "confdefs.h"
20593
20594 #include <tcpd.h>
20595 int allow_severity = 0;
20596 int deny_severity  = 0;
20597
20598 struct request_info *req;
20599                 
20600 int main() {
20601
20602 hosts_access(req)
20603                 
20604 ; return 0; }
20605 EOF
20606 if { (eval echo configure:20607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20607   rm -rf conftest*
20608   echo "$ac_t""-lwrap" 1>&6
20609                 have_wrappers=yes
20610                 LIBS="$save_LIBS"
20611 else
20612   echo "configure: failed program was:" >&5
20613   cat conftest.$ac_ext >&5
20614   rm -rf conftest*
20615   
20616                                 LIBS="$LIBS -lnsl"
20617                 cat > conftest.$ac_ext <<EOF
20618 #line 20619 "configure"
20619 #include "confdefs.h"
20620
20621 #include <tcpd.h>
20622 int allow_severity = 0;
20623 int deny_severity  = 0;
20624
20625 struct request_info *req;
20626                 
20627 int main() {
20628
20629 hosts_access(req)
20630                 
20631 ; return 0; }
20632 EOF
20633 if { (eval echo configure:20634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20634   rm -rf conftest*
20635   echo "$ac_t""-lwrap -lnsl" 1>&6
20636                 have_wrappers=yes
20637                 LIBS="$save_LIBS -lnsl"
20638 else
20639   echo "configure: failed program was:" >&5
20640   cat conftest.$ac_ext >&5
20641   rm -rf conftest*
20642   
20643                 echo "$ac_t""no" 1>&6
20644                 have_wrappers=no
20645                 LIBS=$save_LIBS
20646 fi
20647 rm -f conftest*
20648 fi
20649 rm -f conftest*
20650 else
20651   echo "$ac_t""no" 1>&6
20652 have_wrappers=no
20653 fi
20654 done
20655
20656
20657         if test $have_wrappers = yes ; then
20658                 cat >> confdefs.h <<\EOF
20659 #define HAVE_TCPD 1
20660 EOF
20661
20662                 WRAP_LIBS="-lwrap"
20663         elif test $ol_enable_wrappers = yes ; then
20664                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20665         else
20666                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20667                 WRAP_LIBS=""
20668         fi
20669 fi
20670
20671 if test $ol_enable_syslog != no ; then
20672         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20673 echo "configure:20674: checking for openlog" >&5
20674 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20675   echo $ac_n "(cached) $ac_c" 1>&6
20676 else
20677   cat > conftest.$ac_ext <<EOF
20678 #line 20679 "configure"
20679 #include "confdefs.h"
20680 /* System header to define __stub macros and hopefully few prototypes,
20681     which can conflict with char openlog(); below.  */
20682 #include <assert.h>
20683 /* Override any gcc2 internal prototype to avoid an error.  */
20684 /* We use char because int might match the return type of a gcc2
20685     builtin and then its argument prototype would still apply.  */
20686 char openlog();
20687 char (*f)();
20688
20689 int main() {
20690
20691 /* The GNU C library defines this for functions which it implements
20692     to always fail with ENOSYS.  Some functions are actually named
20693     something starting with __ and the normal name is an alias.  */
20694 #if defined (__stub_openlog) || defined (__stub___openlog)
20695 choke me
20696 #else
20697 f = openlog;
20698 #endif
20699
20700 ; return 0; }
20701 EOF
20702 if { (eval echo configure:20703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20703   rm -rf conftest*
20704   eval "ac_cv_func_openlog=yes"
20705 else
20706   echo "configure: failed program was:" >&5
20707   cat conftest.$ac_ext >&5
20708   rm -rf conftest*
20709   eval "ac_cv_func_openlog=no"
20710 fi
20711 rm -f conftest*
20712 fi
20713
20714 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20715   echo "$ac_t""yes" 1>&6
20716   :
20717 else
20718   echo "$ac_t""no" 1>&6
20719 fi
20720
20721         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20722                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20723         fi
20724         ol_enable_syslog=$ac_cv_func_openlog
20725 fi
20726
20727
20728 ol_link_sql=no
20729 if test $ol_enable_sql != no ; then
20730         for ac_hdr in sql.h sqlext.h
20731 do
20732 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20733 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20734 echo "configure:20735: checking for $ac_hdr" >&5
20735 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20736   echo $ac_n "(cached) $ac_c" 1>&6
20737 else
20738   cat > conftest.$ac_ext <<EOF
20739 #line 20740 "configure"
20740 #include "confdefs.h"
20741 #include <$ac_hdr>
20742 EOF
20743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20744 { (eval echo configure:20745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20746 if test -z "$ac_err"; then
20747   rm -rf conftest*
20748   eval "ac_cv_header_$ac_safe=yes"
20749 else
20750   echo "$ac_err" >&5
20751   echo "configure: failed program was:" >&5
20752   cat conftest.$ac_ext >&5
20753   rm -rf conftest*
20754   eval "ac_cv_header_$ac_safe=no"
20755 fi
20756 rm -f conftest*
20757 fi
20758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20759   echo "$ac_t""yes" 1>&6
20760     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20761   cat >> confdefs.h <<EOF
20762 #define $ac_tr_hdr 1
20763 EOF
20764  
20765 else
20766   echo "$ac_t""no" 1>&6
20767 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20768         
20769 fi
20770 done
20771
20772
20773         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20774 echo "configure:20775: checking for SQLDriverConnect in -liodbc" >&5
20775 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20776 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20777   echo $ac_n "(cached) $ac_c" 1>&6
20778 else
20779   ac_save_LIBS="$LIBS"
20780 LIBS="-liodbc  $LIBS"
20781 cat > conftest.$ac_ext <<EOF
20782 #line 20783 "configure"
20783 #include "confdefs.h"
20784 /* Override any gcc2 internal prototype to avoid an error.  */
20785 /* We use char because int might match the return type of a gcc2
20786     builtin and then its argument prototype would still apply.  */
20787 char SQLDriverConnect();
20788
20789 int main() {
20790 SQLDriverConnect()
20791 ; return 0; }
20792 EOF
20793 if { (eval echo configure:20794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20794   rm -rf conftest*
20795   eval "ac_cv_lib_$ac_lib_var=yes"
20796 else
20797   echo "configure: failed program was:" >&5
20798   cat conftest.$ac_ext >&5
20799   rm -rf conftest*
20800   eval "ac_cv_lib_$ac_lib_var=no"
20801 fi
20802 rm -f conftest*
20803 LIBS="$ac_save_LIBS"
20804
20805 fi
20806 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20807   echo "$ac_t""yes" 1>&6
20808   have_iodbc=yes
20809 else
20810   echo "$ac_t""no" 1>&6
20811 have_iodbc=no
20812 fi
20813
20814         if test $have_iodbc = yes ; then
20815                 ol_link_sql="-liodbc"
20816         else
20817                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20818 echo "configure:20819: checking for SQLDriverConnect in -lodbc" >&5
20819 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20820 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20821   echo $ac_n "(cached) $ac_c" 1>&6
20822 else
20823   ac_save_LIBS="$LIBS"
20824 LIBS="-lodbc  $LIBS"
20825 cat > conftest.$ac_ext <<EOF
20826 #line 20827 "configure"
20827 #include "confdefs.h"
20828 /* Override any gcc2 internal prototype to avoid an error.  */
20829 /* We use char because int might match the return type of a gcc2
20830     builtin and then its argument prototype would still apply.  */
20831 char SQLDriverConnect();
20832
20833 int main() {
20834 SQLDriverConnect()
20835 ; return 0; }
20836 EOF
20837 if { (eval echo configure:20838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20838   rm -rf conftest*
20839   eval "ac_cv_lib_$ac_lib_var=yes"
20840 else
20841   echo "configure: failed program was:" >&5
20842   cat conftest.$ac_ext >&5
20843   rm -rf conftest*
20844   eval "ac_cv_lib_$ac_lib_var=no"
20845 fi
20846 rm -f conftest*
20847 LIBS="$ac_save_LIBS"
20848
20849 fi
20850 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20851   echo "$ac_t""yes" 1>&6
20852   have_odbc=yes
20853 else
20854   echo "$ac_t""no" 1>&6
20855 have_odbc=no
20856 fi
20857
20858                 if test $have_odbc = yes ; then
20859                         ol_link_sql="-lodbc"
20860                 fi
20861         fi
20862
20863         if test $ol_link_sql != no ; then
20864                 SLAPD_SQL_LIBS="$ol_link_sql"
20865
20866         elif test $ol_enable_sql != auto ; then
20867                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20868         fi
20869 fi
20870
20871 ol_link_sasl=no
20872 ol_link_spasswd=no
20873 if test $ol_with_cyrus_sasl != no ; then
20874         for ac_hdr in sasl/sasl.h sasl.h
20875 do
20876 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20877 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20878 echo "configure:20879: checking for $ac_hdr" >&5
20879 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20880   echo $ac_n "(cached) $ac_c" 1>&6
20881 else
20882   cat > conftest.$ac_ext <<EOF
20883 #line 20884 "configure"
20884 #include "confdefs.h"
20885 #include <$ac_hdr>
20886 EOF
20887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20888 { (eval echo configure:20889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20890 if test -z "$ac_err"; then
20891   rm -rf conftest*
20892   eval "ac_cv_header_$ac_safe=yes"
20893 else
20894   echo "$ac_err" >&5
20895   echo "configure: failed program was:" >&5
20896   cat conftest.$ac_ext >&5
20897   rm -rf conftest*
20898   eval "ac_cv_header_$ac_safe=no"
20899 fi
20900 rm -f conftest*
20901 fi
20902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20903   echo "$ac_t""yes" 1>&6
20904     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20905   cat >> confdefs.h <<EOF
20906 #define $ac_tr_hdr 1
20907 EOF
20908  
20909 else
20910   echo "$ac_t""no" 1>&6
20911 fi
20912 done
20913
20914
20915         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20916                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20917 echo "configure:20918: checking for sasl_client_init in -lsasl2" >&5
20918 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20919 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20920   echo $ac_n "(cached) $ac_c" 1>&6
20921 else
20922   ac_save_LIBS="$LIBS"
20923 LIBS="-lsasl2  $LIBS"
20924 cat > conftest.$ac_ext <<EOF
20925 #line 20926 "configure"
20926 #include "confdefs.h"
20927 /* Override any gcc2 internal prototype to avoid an error.  */
20928 /* We use char because int might match the return type of a gcc2
20929     builtin and then its argument prototype would still apply.  */
20930 char sasl_client_init();
20931
20932 int main() {
20933 sasl_client_init()
20934 ; return 0; }
20935 EOF
20936 if { (eval echo configure:20937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20937   rm -rf conftest*
20938   eval "ac_cv_lib_$ac_lib_var=yes"
20939 else
20940   echo "configure: failed program was:" >&5
20941   cat conftest.$ac_ext >&5
20942   rm -rf conftest*
20943   eval "ac_cv_lib_$ac_lib_var=no"
20944 fi
20945 rm -f conftest*
20946 LIBS="$ac_save_LIBS"
20947
20948 fi
20949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20950   echo "$ac_t""yes" 1>&6
20951   ol_link_sasl="-lsasl2"
20952 else
20953   echo "$ac_t""no" 1>&6
20954 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20955 echo "configure:20956: checking for sasl_client_init in -lsasl" >&5
20956 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20957 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20958   echo $ac_n "(cached) $ac_c" 1>&6
20959 else
20960   ac_save_LIBS="$LIBS"
20961 LIBS="-lsasl  $LIBS"
20962 cat > conftest.$ac_ext <<EOF
20963 #line 20964 "configure"
20964 #include "confdefs.h"
20965 /* Override any gcc2 internal prototype to avoid an error.  */
20966 /* We use char because int might match the return type of a gcc2
20967     builtin and then its argument prototype would still apply.  */
20968 char sasl_client_init();
20969
20970 int main() {
20971 sasl_client_init()
20972 ; return 0; }
20973 EOF
20974 if { (eval echo configure:20975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20975   rm -rf conftest*
20976   eval "ac_cv_lib_$ac_lib_var=yes"
20977 else
20978   echo "configure: failed program was:" >&5
20979   cat conftest.$ac_ext >&5
20980   rm -rf conftest*
20981   eval "ac_cv_lib_$ac_lib_var=no"
20982 fi
20983 rm -f conftest*
20984 LIBS="$ac_save_LIBS"
20985
20986 fi
20987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20988   echo "$ac_t""yes" 1>&6
20989   ol_link_sasl="-lsasl"
20990 else
20991   echo "$ac_t""no" 1>&6
20992 fi
20993
20994 fi
20995
20996         fi
20997
20998         if test $ol_link_sasl = no ; then
20999                 if test $ol_with_cyrus_sasl != auto ; then
21000                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21001                 else
21002                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21003                         echo "configure: warning: SASL authentication not supported!" 1>&2
21004                         if test $ol_link_tls = no ; then
21005                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21006                         fi
21007                 fi
21008         else
21009                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21010 echo "configure:21011: checking Cyrus SASL library version" >&5
21011 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21012   echo $ac_n "(cached) $ac_c" 1>&6
21013 else
21014   
21015         cat > conftest.$ac_ext <<EOF
21016 #line 21017 "configure"
21017 #include "confdefs.h"
21018
21019 #ifdef HAVE_SASL_SASL_H
21020 #include <sasl/sasl.h>
21021 #else
21022 #include <sasl.h>
21023 #endif
21024
21025 /* Require 2.1.15+ */
21026 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21027         char *__sasl_compat = "2.2+ or better okay (we guess)";
21028 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21029         && SASL_VERSION_STEP >=15
21030         char *__sasl_compat = "2.1.15+ or better okay";
21031 #endif
21032         
21033 EOF
21034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21035   egrep "__sasl_compat" >/dev/null 2>&1; then
21036   rm -rf conftest*
21037   ol_cv_sasl_compat=yes
21038 else
21039   rm -rf conftest*
21040   ol_cv_sasl_compat=no
21041 fi
21042 rm -f conftest*
21043
21044 fi
21045
21046 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21047
21048                 if test $ol_cv_sasl_compat = no ; then
21049                         ol_link_sasl=no
21050                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
21051                 fi
21052
21053                 cat >> confdefs.h <<\EOF
21054 #define HAVE_CYRUS_SASL 1
21055 EOF
21056
21057                 SASL_LIBS="$ol_link_sasl"
21058                 if test $ol_enable_spasswd != no ; then
21059                         ol_link_spasswd=yes
21060                 fi
21061
21062                 ac_save_LIBS="$LIBS"
21063                 LIBS="$LIBS $ol_link_sasl"
21064                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21065 echo "configure:21066: checking for sasl_version" >&5
21066 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21067   echo $ac_n "(cached) $ac_c" 1>&6
21068 else
21069   cat > conftest.$ac_ext <<EOF
21070 #line 21071 "configure"
21071 #include "confdefs.h"
21072 /* System header to define __stub macros and hopefully few prototypes,
21073     which can conflict with char sasl_version(); below.  */
21074 #include <assert.h>
21075 /* Override any gcc2 internal prototype to avoid an error.  */
21076 /* We use char because int might match the return type of a gcc2
21077     builtin and then its argument prototype would still apply.  */
21078 char sasl_version();
21079 char (*f)();
21080
21081 int main() {
21082
21083 /* The GNU C library defines this for functions which it implements
21084     to always fail with ENOSYS.  Some functions are actually named
21085     something starting with __ and the normal name is an alias.  */
21086 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21087 choke me
21088 #else
21089 f = sasl_version;
21090 #endif
21091
21092 ; return 0; }
21093 EOF
21094 if { (eval echo configure:21095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21095   rm -rf conftest*
21096   eval "ac_cv_func_sasl_version=yes"
21097 else
21098   echo "configure: failed program was:" >&5
21099   cat conftest.$ac_ext >&5
21100   rm -rf conftest*
21101   eval "ac_cv_func_sasl_version=no"
21102 fi
21103 rm -f conftest*
21104 fi
21105
21106 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21107   echo "$ac_t""yes" 1>&6
21108   cat >> confdefs.h <<\EOF
21109 #define HAVE_SASL_VERSION 1
21110 EOF
21111
21112 else
21113   echo "$ac_t""no" 1>&6
21114 fi
21115
21116                 LIBS="$ac_save_LIBS"
21117         fi
21118
21119 else
21120         echo "configure: warning: SASL authentication not supported!" 1>&2
21121         if test $ol_link_tls = no ; then
21122                 echo "configure: warning: Strong authentication not supported!" 1>&2
21123         fi
21124 fi
21125
21126 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21127         dev=no
21128         if test -r /dev/urandom ; then
21129                 dev="/dev/urandom";
21130         elif test -r /idev/urandom ; then
21131                 dev="/idev/urandom";
21132         elif test -r /dev/srandom ; then
21133                 dev="/dev/srandom";
21134         elif test -r /dev/random ; then
21135                 dev="/dev/random";
21136         elif test -r /idev/random ; then
21137                 dev="/idev/random";
21138         fi
21139
21140         if test $dev != no ; then
21141                 cat >> confdefs.h <<EOF
21142 #define URANDOM_DEVICE "$dev"
21143 EOF
21144
21145         fi
21146 fi
21147
21148 ol_link_fetch=no
21149 if test $ol_with_fetch != no ; then
21150         ol_LIBS=$LIBS
21151 LIBS="-lfetch -lcom_err $LIBS"
21152 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21153 echo "configure:21154: checking fetch(3) library" >&5
21154 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21155   echo $ac_n "(cached) $ac_c" 1>&6
21156 else
21157   
21158         cat > conftest.$ac_ext <<EOF
21159 #line 21160 "configure"
21160 #include "confdefs.h"
21161
21162 #include <sys/param.h>
21163 #include <stdio.h>
21164 #include <fetch.h>
21165 int main() {
21166 struct url *u = fetchParseURL("file:///"); 
21167 ; return 0; }
21168 EOF
21169 if { (eval echo configure:21170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21170   rm -rf conftest*
21171   ol_cv_lib_fetch=yes
21172 else
21173   echo "configure: failed program was:" >&5
21174   cat conftest.$ac_ext >&5
21175   rm -rf conftest*
21176   ol_cv_lib_fetch=no
21177 fi
21178 rm -f conftest*
21179 fi
21180
21181 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21182 LIBS=$ol_LIBS
21183 if test $ol_cv_lib_fetch != no ; then
21184         ol_link_fetch="-lfetch -lcom_err"
21185         cat >> confdefs.h <<\EOF
21186 #define HAVE_FETCH 1
21187 EOF
21188
21189 fi
21190
21191
21192         if test $ol_cv_lib_fetch != no ; then
21193                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21194                 ol_link_fetch=freebsd
21195
21196         elif test $ol_with_fetch != auto ; then
21197                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21198         fi 
21199 fi
21200
21201 if test $ol_enable_crypt != no ; then
21202         save_LIBS="$LIBS"
21203         LIBS="$TLS_LIBS $LIBS"
21204
21205         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21206 echo "configure:21207: checking for crypt" >&5
21207 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21208   echo $ac_n "(cached) $ac_c" 1>&6
21209 else
21210   cat > conftest.$ac_ext <<EOF
21211 #line 21212 "configure"
21212 #include "confdefs.h"
21213 /* System header to define __stub macros and hopefully few prototypes,
21214     which can conflict with char crypt(); below.  */
21215 #include <assert.h>
21216 /* Override any gcc2 internal prototype to avoid an error.  */
21217 /* We use char because int might match the return type of a gcc2
21218     builtin and then its argument prototype would still apply.  */
21219 char crypt();
21220 char (*f)();
21221
21222 int main() {
21223
21224 /* The GNU C library defines this for functions which it implements
21225     to always fail with ENOSYS.  Some functions are actually named
21226     something starting with __ and the normal name is an alias.  */
21227 #if defined (__stub_crypt) || defined (__stub___crypt)
21228 choke me
21229 #else
21230 f = crypt;
21231 #endif
21232
21233 ; return 0; }
21234 EOF
21235 if { (eval echo configure:21236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21236   rm -rf conftest*
21237   eval "ac_cv_func_crypt=yes"
21238 else
21239   echo "configure: failed program was:" >&5
21240   cat conftest.$ac_ext >&5
21241   rm -rf conftest*
21242   eval "ac_cv_func_crypt=no"
21243 fi
21244 rm -f conftest*
21245 fi
21246
21247 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21248   echo "$ac_t""yes" 1>&6
21249   have_crypt=yes
21250 else
21251   echo "$ac_t""no" 1>&6
21252
21253                 LIBS="$save_LIBS"
21254                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21255 echo "configure:21256: checking for crypt in -lcrypt" >&5
21256 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21257 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21258   echo $ac_n "(cached) $ac_c" 1>&6
21259 else
21260   ac_save_LIBS="$LIBS"
21261 LIBS="-lcrypt  $LIBS"
21262 cat > conftest.$ac_ext <<EOF
21263 #line 21264 "configure"
21264 #include "confdefs.h"
21265 /* Override any gcc2 internal prototype to avoid an error.  */
21266 /* We use char because int might match the return type of a gcc2
21267     builtin and then its argument prototype would still apply.  */
21268 char crypt();
21269
21270 int main() {
21271 crypt()
21272 ; return 0; }
21273 EOF
21274 if { (eval echo configure:21275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21275   rm -rf conftest*
21276   eval "ac_cv_lib_$ac_lib_var=yes"
21277 else
21278   echo "configure: failed program was:" >&5
21279   cat conftest.$ac_ext >&5
21280   rm -rf conftest*
21281   eval "ac_cv_lib_$ac_lib_var=no"
21282 fi
21283 rm -f conftest*
21284 LIBS="$ac_save_LIBS"
21285
21286 fi
21287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21288   echo "$ac_t""yes" 1>&6
21289   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21290                         have_crypt=yes
21291 else
21292   echo "$ac_t""no" 1>&6
21293 have_crypt=no
21294 fi
21295
21296 fi
21297
21298
21299         LIBS="$save_LIBS"
21300
21301         if test $have_crypt = yes ; then
21302                 cat >> confdefs.h <<\EOF
21303 #define HAVE_CRYPT 1
21304 EOF
21305
21306         else
21307                 echo "configure: warning: could not find crypt" 1>&2
21308                 if test $ol_enable_crypt = yes ; then
21309                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21310                 fi
21311
21312                 echo "configure: warning: disabling crypt support" 1>&2
21313                 ol_enable_crypt=no
21314         fi
21315 fi
21316
21317 if test $ol_enable_proctitle != no ; then
21318         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21319 echo "configure:21320: checking for setproctitle" >&5
21320 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21321   echo $ac_n "(cached) $ac_c" 1>&6
21322 else
21323   cat > conftest.$ac_ext <<EOF
21324 #line 21325 "configure"
21325 #include "confdefs.h"
21326 /* System header to define __stub macros and hopefully few prototypes,
21327     which can conflict with char setproctitle(); below.  */
21328 #include <assert.h>
21329 /* Override any gcc2 internal prototype to avoid an error.  */
21330 /* We use char because int might match the return type of a gcc2
21331     builtin and then its argument prototype would still apply.  */
21332 char setproctitle();
21333 char (*f)();
21334
21335 int main() {
21336
21337 /* The GNU C library defines this for functions which it implements
21338     to always fail with ENOSYS.  Some functions are actually named
21339     something starting with __ and the normal name is an alias.  */
21340 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21341 choke me
21342 #else
21343 f = setproctitle;
21344 #endif
21345
21346 ; return 0; }
21347 EOF
21348 if { (eval echo configure:21349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21349   rm -rf conftest*
21350   eval "ac_cv_func_setproctitle=yes"
21351 else
21352   echo "configure: failed program was:" >&5
21353   cat conftest.$ac_ext >&5
21354   rm -rf conftest*
21355   eval "ac_cv_func_setproctitle=no"
21356 fi
21357 rm -f conftest*
21358 fi
21359
21360 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21361   echo "$ac_t""yes" 1>&6
21362   have_setproctitle=yes
21363 else
21364   echo "$ac_t""no" 1>&6
21365
21366                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21367 echo "configure:21368: checking for setproctitle in -lutil" >&5
21368 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21369 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21370   echo $ac_n "(cached) $ac_c" 1>&6
21371 else
21372   ac_save_LIBS="$LIBS"
21373 LIBS="-lutil  $LIBS"
21374 cat > conftest.$ac_ext <<EOF
21375 #line 21376 "configure"
21376 #include "confdefs.h"
21377 /* Override any gcc2 internal prototype to avoid an error.  */
21378 /* We use char because int might match the return type of a gcc2
21379     builtin and then its argument prototype would still apply.  */
21380 char setproctitle();
21381
21382 int main() {
21383 setproctitle()
21384 ; return 0; }
21385 EOF
21386 if { (eval echo configure:21387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21387   rm -rf conftest*
21388   eval "ac_cv_lib_$ac_lib_var=yes"
21389 else
21390   echo "configure: failed program was:" >&5
21391   cat conftest.$ac_ext >&5
21392   rm -rf conftest*
21393   eval "ac_cv_lib_$ac_lib_var=no"
21394 fi
21395 rm -f conftest*
21396 LIBS="$ac_save_LIBS"
21397
21398 fi
21399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21400   echo "$ac_t""yes" 1>&6
21401   have_setproctitle=yes
21402                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21403 else
21404   echo "$ac_t""no" 1>&6
21405 have_setproctitle=no
21406                         LIBOBJS="$LIBOBJS setproctitle.o"
21407                         LIBSRCS="$LIBSRCS setproctitle.c"
21408 fi
21409
21410 fi
21411
21412
21413         if test $have_setproctitle = yes ; then
21414                 cat >> confdefs.h <<\EOF
21415 #define HAVE_SETPROCTITLE 1
21416 EOF
21417
21418         fi
21419 fi
21420
21421 if test $ol_enable_slp != no ; then
21422         for ac_hdr in slp.h 
21423 do
21424 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21425 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21426 echo "configure:21427: checking for $ac_hdr" >&5
21427 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21428   echo $ac_n "(cached) $ac_c" 1>&6
21429 else
21430   cat > conftest.$ac_ext <<EOF
21431 #line 21432 "configure"
21432 #include "confdefs.h"
21433 #include <$ac_hdr>
21434 EOF
21435 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21436 { (eval echo configure:21437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21437 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21438 if test -z "$ac_err"; then
21439   rm -rf conftest*
21440   eval "ac_cv_header_$ac_safe=yes"
21441 else
21442   echo "$ac_err" >&5
21443   echo "configure: failed program was:" >&5
21444   cat conftest.$ac_ext >&5
21445   rm -rf conftest*
21446   eval "ac_cv_header_$ac_safe=no"
21447 fi
21448 rm -f conftest*
21449 fi
21450 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21451   echo "$ac_t""yes" 1>&6
21452     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21453   cat >> confdefs.h <<EOF
21454 #define $ac_tr_hdr 1
21455 EOF
21456  
21457 else
21458   echo "$ac_t""no" 1>&6
21459 fi
21460 done
21461
21462
21463         if test $ac_cv_header_slp_h = yes ; then
21464                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21465 echo "configure:21466: checking for SLPOpen in -lslp" >&5
21466 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21467 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21468   echo $ac_n "(cached) $ac_c" 1>&6
21469 else
21470   ac_save_LIBS="$LIBS"
21471 LIBS="-lslp  $LIBS"
21472 cat > conftest.$ac_ext <<EOF
21473 #line 21474 "configure"
21474 #include "confdefs.h"
21475 /* Override any gcc2 internal prototype to avoid an error.  */
21476 /* We use char because int might match the return type of a gcc2
21477     builtin and then its argument prototype would still apply.  */
21478 char SLPOpen();
21479
21480 int main() {
21481 SLPOpen()
21482 ; return 0; }
21483 EOF
21484 if { (eval echo configure:21485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21485   rm -rf conftest*
21486   eval "ac_cv_lib_$ac_lib_var=yes"
21487 else
21488   echo "configure: failed program was:" >&5
21489   cat conftest.$ac_ext >&5
21490   rm -rf conftest*
21491   eval "ac_cv_lib_$ac_lib_var=no"
21492 fi
21493 rm -f conftest*
21494 LIBS="$ac_save_LIBS"
21495
21496 fi
21497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21498   echo "$ac_t""yes" 1>&6
21499   have_slp=yes
21500 else
21501   echo "$ac_t""no" 1>&6
21502 have_slp=no
21503 fi
21504
21505                 if test $have_slp = yes ; then
21506                         cat >> confdefs.h <<\EOF
21507 #define HAVE_SLP 1
21508 EOF
21509
21510                         SLAPD_SLP_LIBS=-lslp
21511                 fi
21512
21513         elif test $ol_enable_slp = yes ; then
21514                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21515         fi
21516 fi
21517
21518
21519 echo $ac_n "checking long long""... $ac_c" 1>&6
21520 echo "configure:21521: checking long long" >&5
21521 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21522   echo $ac_n "(cached) $ac_c" 1>&6
21523 else
21524   
21525         cat > conftest.$ac_ext <<EOF
21526 #line 21527 "configure"
21527 #include "confdefs.h"
21528
21529 int main() {
21530 long long x;
21531 ; return 0; }
21532 EOF
21533 if { (eval echo configure:21534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21534   rm -rf conftest*
21535   ol_cv_type_long_long=yes
21536 else
21537   echo "configure: failed program was:" >&5
21538   cat conftest.$ac_ext >&5
21539   rm -rf conftest*
21540   ol_cv_type_long_long=no
21541 fi
21542 rm -f conftest*
21543 fi
21544
21545 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21546 if test $ol_cv_type_long_long = yes; then
21547         cat >> confdefs.h <<\EOF
21548 #define HAVE_LONG_LONG 1
21549 EOF
21550
21551 fi
21552
21553 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21554 echo "configure:21555: checking for ANSI C header files" >&5
21555 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21556   echo $ac_n "(cached) $ac_c" 1>&6
21557 else
21558   cat > conftest.$ac_ext <<EOF
21559 #line 21560 "configure"
21560 #include "confdefs.h"
21561 #include <stdlib.h>
21562 #include <stdarg.h>
21563 #include <string.h>
21564 #include <float.h>
21565 EOF
21566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21567 { (eval echo configure:21568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21569 if test -z "$ac_err"; then
21570   rm -rf conftest*
21571   ac_cv_header_stdc=yes
21572 else
21573   echo "$ac_err" >&5
21574   echo "configure: failed program was:" >&5
21575   cat conftest.$ac_ext >&5
21576   rm -rf conftest*
21577   ac_cv_header_stdc=no
21578 fi
21579 rm -f conftest*
21580
21581 if test $ac_cv_header_stdc = yes; then
21582   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21583 cat > conftest.$ac_ext <<EOF
21584 #line 21585 "configure"
21585 #include "confdefs.h"
21586 #include <string.h>
21587 EOF
21588 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21589   egrep "memchr" >/dev/null 2>&1; then
21590   :
21591 else
21592   rm -rf conftest*
21593   ac_cv_header_stdc=no
21594 fi
21595 rm -f conftest*
21596
21597 fi
21598
21599 if test $ac_cv_header_stdc = yes; then
21600   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21601 cat > conftest.$ac_ext <<EOF
21602 #line 21603 "configure"
21603 #include "confdefs.h"
21604 #include <stdlib.h>
21605 EOF
21606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21607   egrep "free" >/dev/null 2>&1; then
21608   :
21609 else
21610   rm -rf conftest*
21611   ac_cv_header_stdc=no
21612 fi
21613 rm -f conftest*
21614
21615 fi
21616
21617 if test $ac_cv_header_stdc = yes; then
21618   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21619 if test "$cross_compiling" = yes; then
21620   :
21621 else
21622   cat > conftest.$ac_ext <<EOF
21623 #line 21624 "configure"
21624 #include "confdefs.h"
21625 #include <ctype.h>
21626 #if ((' ' & 0x0FF) == 0x020)
21627 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21628 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21629 #else
21630 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21631  || ('j' <= (c) && (c) <= 'r') \
21632  || ('s' <= (c) && (c) <= 'z'))
21633 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21634 #endif
21635 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21636 int main () { int i; for (i = 0; i < 256; i++)
21637 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21638 exit (0); }
21639
21640 EOF
21641 if { (eval echo configure:21642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21642 then
21643   :
21644 else
21645   echo "configure: failed program was:" >&5
21646   cat conftest.$ac_ext >&5
21647   rm -fr conftest*
21648   ac_cv_header_stdc=no
21649 fi
21650 rm -fr conftest*
21651 fi
21652
21653 fi
21654 fi
21655
21656 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21657 if test $ac_cv_header_stdc = yes; then
21658   cat >> confdefs.h <<\EOF
21659 #define STDC_HEADERS 1
21660 EOF
21661
21662 fi
21663
21664 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21665 echo "configure:21666: checking for mode_t" >&5
21666 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21667   echo $ac_n "(cached) $ac_c" 1>&6
21668 else
21669   cat > conftest.$ac_ext <<EOF
21670 #line 21671 "configure"
21671 #include "confdefs.h"
21672 #include <sys/types.h>
21673 #if STDC_HEADERS
21674 #include <stdlib.h>
21675 #include <stddef.h>
21676 #endif
21677
21678 EOF
21679 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21680   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21681   rm -rf conftest*
21682   eval "ac_cv_type_mode_t=yes"
21683 else
21684   rm -rf conftest*
21685   eval "ac_cv_type_mode_t=no"
21686 fi
21687 rm -f conftest*
21688
21689 fi
21690 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21691   echo "$ac_t""yes" 1>&6
21692 else
21693   echo "$ac_t""no" 1>&6
21694   cat >> confdefs.h <<EOF
21695 #define mode_t int
21696 EOF
21697
21698 fi
21699
21700 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21701 echo "configure:21702: checking for off_t" >&5
21702 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21703   echo $ac_n "(cached) $ac_c" 1>&6
21704 else
21705   cat > conftest.$ac_ext <<EOF
21706 #line 21707 "configure"
21707 #include "confdefs.h"
21708 #include <sys/types.h>
21709 #if STDC_HEADERS
21710 #include <stdlib.h>
21711 #include <stddef.h>
21712 #endif
21713
21714 EOF
21715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21716   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21717   rm -rf conftest*
21718   eval "ac_cv_type_off_t=yes"
21719 else
21720   rm -rf conftest*
21721   eval "ac_cv_type_off_t=no"
21722 fi
21723 rm -f conftest*
21724
21725 fi
21726 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21727   echo "$ac_t""yes" 1>&6
21728 else
21729   echo "$ac_t""no" 1>&6
21730   cat >> confdefs.h <<EOF
21731 #define off_t long
21732 EOF
21733
21734 fi
21735
21736 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21737 echo "configure:21738: checking for pid_t" >&5
21738 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21739   echo $ac_n "(cached) $ac_c" 1>&6
21740 else
21741   cat > conftest.$ac_ext <<EOF
21742 #line 21743 "configure"
21743 #include "confdefs.h"
21744 #include <sys/types.h>
21745 #if STDC_HEADERS
21746 #include <stdlib.h>
21747 #include <stddef.h>
21748 #endif
21749
21750 EOF
21751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21752   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21753   rm -rf conftest*
21754   eval "ac_cv_type_pid_t=yes"
21755 else
21756   rm -rf conftest*
21757   eval "ac_cv_type_pid_t=no"
21758 fi
21759 rm -f conftest*
21760
21761 fi
21762 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21763   echo "$ac_t""yes" 1>&6
21764 else
21765   echo "$ac_t""no" 1>&6
21766   cat >> confdefs.h <<EOF
21767 #define pid_t int
21768 EOF
21769
21770 fi
21771
21772 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21773 echo "configure:21774: checking for ptrdiff_t" >&5
21774 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21775   echo $ac_n "(cached) $ac_c" 1>&6
21776 else
21777   cat > conftest.$ac_ext <<EOF
21778 #line 21779 "configure"
21779 #include "confdefs.h"
21780 #include <stddef.h>
21781 int main() {
21782 ptrdiff_t p
21783 ; return 0; }
21784 EOF
21785 if { (eval echo configure:21786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21786   rm -rf conftest*
21787   am_cv_type_ptrdiff_t=yes
21788 else
21789   echo "configure: failed program was:" >&5
21790   cat conftest.$ac_ext >&5
21791   rm -rf conftest*
21792   am_cv_type_ptrdiff_t=no
21793 fi
21794 rm -f conftest*
21795 fi
21796
21797 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21798    if test $am_cv_type_ptrdiff_t = yes; then
21799      cat >> confdefs.h <<\EOF
21800 #define HAVE_PTRDIFF_T 1
21801 EOF
21802
21803    fi
21804
21805 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21806 echo "configure:21807: checking return type of signal handlers" >&5
21807 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21808   echo $ac_n "(cached) $ac_c" 1>&6
21809 else
21810   cat > conftest.$ac_ext <<EOF
21811 #line 21812 "configure"
21812 #include "confdefs.h"
21813 #include <sys/types.h>
21814 #include <signal.h>
21815 #ifdef signal
21816 #undef signal
21817 #endif
21818 #ifdef __cplusplus
21819 extern "C" void (*signal (int, void (*)(int)))(int);
21820 #else
21821 void (*signal ()) ();
21822 #endif
21823
21824 int main() {
21825 int i;
21826 ; return 0; }
21827 EOF
21828 if { (eval echo configure:21829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21829   rm -rf conftest*
21830   ac_cv_type_signal=void
21831 else
21832   echo "configure: failed program was:" >&5
21833   cat conftest.$ac_ext >&5
21834   rm -rf conftest*
21835   ac_cv_type_signal=int
21836 fi
21837 rm -f conftest*
21838 fi
21839
21840 echo "$ac_t""$ac_cv_type_signal" 1>&6
21841 cat >> confdefs.h <<EOF
21842 #define RETSIGTYPE $ac_cv_type_signal
21843 EOF
21844
21845
21846 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21847 echo "configure:21848: checking for size_t" >&5
21848 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21849   echo $ac_n "(cached) $ac_c" 1>&6
21850 else
21851   cat > conftest.$ac_ext <<EOF
21852 #line 21853 "configure"
21853 #include "confdefs.h"
21854 #include <sys/types.h>
21855 #if STDC_HEADERS
21856 #include <stdlib.h>
21857 #include <stddef.h>
21858 #endif
21859
21860 EOF
21861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21862   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21863   rm -rf conftest*
21864   eval "ac_cv_type_size_t=yes"
21865 else
21866   rm -rf conftest*
21867   eval "ac_cv_type_size_t=no"
21868 fi
21869 rm -f conftest*
21870
21871 fi
21872 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21873   echo "$ac_t""yes" 1>&6
21874 else
21875   echo "$ac_t""no" 1>&6
21876   cat >> confdefs.h <<EOF
21877 #define size_t unsigned
21878 EOF
21879
21880 fi
21881
21882
21883 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21884 echo "configure:21885: checking for ssize_t" >&5
21885 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21886   echo $ac_n "(cached) $ac_c" 1>&6
21887 else
21888   cat > conftest.$ac_ext <<EOF
21889 #line 21890 "configure"
21890 #include "confdefs.h"
21891 #include <sys/types.h>
21892 #if STDC_HEADERS
21893 #include <stdlib.h>
21894 #include <stddef.h>
21895 #endif
21896
21897 EOF
21898 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21899   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21900   rm -rf conftest*
21901   eval "ac_cv_type_ssize_t=yes"
21902 else
21903   rm -rf conftest*
21904   eval "ac_cv_type_ssize_t=no"
21905 fi
21906 rm -f conftest*
21907
21908 fi
21909 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21910   echo "$ac_t""yes" 1>&6
21911 else
21912   echo "$ac_t""no" 1>&6
21913   cat >> confdefs.h <<EOF
21914 #define ssize_t signed int
21915 EOF
21916
21917 fi
21918
21919 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21920 echo "configure:21921: checking for caddr_t" >&5
21921 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21922   echo $ac_n "(cached) $ac_c" 1>&6
21923 else
21924   cat > conftest.$ac_ext <<EOF
21925 #line 21926 "configure"
21926 #include "confdefs.h"
21927 #include <sys/types.h>
21928 #if STDC_HEADERS
21929 #include <stdlib.h>
21930 #include <stddef.h>
21931 #endif
21932
21933 EOF
21934 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21935   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21936   rm -rf conftest*
21937   eval "ac_cv_type_caddr_t=yes"
21938 else
21939   rm -rf conftest*
21940   eval "ac_cv_type_caddr_t=no"
21941 fi
21942 rm -f conftest*
21943
21944 fi
21945 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21946   echo "$ac_t""yes" 1>&6
21947 else
21948   echo "$ac_t""no" 1>&6
21949   cat >> confdefs.h <<EOF
21950 #define caddr_t char *
21951 EOF
21952
21953 fi
21954
21955
21956 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21957 echo "configure:21958: checking for socklen_t" >&5
21958 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21959   echo $ac_n "(cached) $ac_c" 1>&6
21960 else
21961   cat > conftest.$ac_ext <<EOF
21962 #line 21963 "configure"
21963 #include "confdefs.h"
21964
21965 #ifdef HAVE_SYS_TYPES_H
21966 #include <sys/types.h>
21967 #endif
21968 #ifdef HAVE_SYS_SOCKET_H
21969 #include <sys/socket.h>
21970 #endif
21971
21972 int main() {
21973 socklen_t len;
21974 ; return 0; }
21975 EOF
21976 if { (eval echo configure:21977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21977   rm -rf conftest*
21978   ol_cv_type_socklen_t=yes
21979 else
21980   echo "configure: failed program was:" >&5
21981   cat conftest.$ac_ext >&5
21982   rm -rf conftest*
21983   ol_cv_type_socklen_t=no
21984 fi
21985 rm -f conftest*
21986 fi
21987
21988 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21989   if test $ol_cv_type_socklen_t = no; then
21990     cat >> confdefs.h <<\EOF
21991 #define socklen_t int
21992 EOF
21993
21994   fi
21995  
21996 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21997 echo "configure:21998: checking for member st_blksize in aggregate type struct stat" >&5
21998 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21999   echo $ac_n "(cached) $ac_c" 1>&6
22000 else
22001   cat > conftest.$ac_ext <<EOF
22002 #line 22003 "configure"
22003 #include "confdefs.h"
22004 #include <sys/types.h>
22005 #include <sys/stat.h>
22006 int main() {
22007 struct stat foo; foo.st_blksize;
22008 ; return 0; }
22009 EOF
22010 if { (eval echo configure:22011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22011   rm -rf conftest*
22012   ac_cv_c_struct_member_st_blksize=yes
22013 else
22014   echo "configure: failed program was:" >&5
22015   cat conftest.$ac_ext >&5
22016   rm -rf conftest*
22017   ac_cv_c_struct_member_st_blksize=no
22018 fi
22019 rm -f conftest*
22020 fi
22021
22022 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22023 st_blksize="$ac_cv_c_struct_member_st_blksize"
22024 if test $ac_cv_c_struct_member_st_blksize = yes; then
22025   cat >> confdefs.h <<\EOF
22026 #define HAVE_ST_BLKSIZE 1
22027 EOF
22028
22029 fi
22030
22031 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22032 echo "configure:22033: checking whether time.h and sys/time.h may both be included" >&5
22033 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22034   echo $ac_n "(cached) $ac_c" 1>&6
22035 else
22036   cat > conftest.$ac_ext <<EOF
22037 #line 22038 "configure"
22038 #include "confdefs.h"
22039 #include <sys/types.h>
22040 #include <sys/time.h>
22041 #include <time.h>
22042 int main() {
22043 struct tm *tp;
22044 ; return 0; }
22045 EOF
22046 if { (eval echo configure:22047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22047   rm -rf conftest*
22048   ac_cv_header_time=yes
22049 else
22050   echo "configure: failed program was:" >&5
22051   cat conftest.$ac_ext >&5
22052   rm -rf conftest*
22053   ac_cv_header_time=no
22054 fi
22055 rm -f conftest*
22056 fi
22057
22058 echo "$ac_t""$ac_cv_header_time" 1>&6
22059 if test $ac_cv_header_time = yes; then
22060   cat >> confdefs.h <<\EOF
22061 #define TIME_WITH_SYS_TIME 1
22062 EOF
22063
22064 fi
22065
22066 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22067 echo "configure:22068: checking whether struct tm is in sys/time.h or time.h" >&5
22068 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22069   echo $ac_n "(cached) $ac_c" 1>&6
22070 else
22071   cat > conftest.$ac_ext <<EOF
22072 #line 22073 "configure"
22073 #include "confdefs.h"
22074 #include <sys/types.h>
22075 #include <time.h>
22076 int main() {
22077 struct tm *tp; tp->tm_sec;
22078 ; return 0; }
22079 EOF
22080 if { (eval echo configure:22081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22081   rm -rf conftest*
22082   ac_cv_struct_tm=time.h
22083 else
22084   echo "configure: failed program was:" >&5
22085   cat conftest.$ac_ext >&5
22086   rm -rf conftest*
22087   ac_cv_struct_tm=sys/time.h
22088 fi
22089 rm -f conftest*
22090 fi
22091
22092 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22093 if test $ac_cv_struct_tm = sys/time.h; then
22094   cat >> confdefs.h <<\EOF
22095 #define TM_IN_SYS_TIME 1
22096 EOF
22097
22098 fi
22099
22100 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22101 echo "configure:22102: checking for uid_t in sys/types.h" >&5
22102 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22103   echo $ac_n "(cached) $ac_c" 1>&6
22104 else
22105   cat > conftest.$ac_ext <<EOF
22106 #line 22107 "configure"
22107 #include "confdefs.h"
22108 #include <sys/types.h>
22109 EOF
22110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22111   egrep "uid_t" >/dev/null 2>&1; then
22112   rm -rf conftest*
22113   ac_cv_type_uid_t=yes
22114 else
22115   rm -rf conftest*
22116   ac_cv_type_uid_t=no
22117 fi
22118 rm -f conftest*
22119
22120 fi
22121
22122 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22123 if test $ac_cv_type_uid_t = no; then
22124   cat >> confdefs.h <<\EOF
22125 #define uid_t int
22126 EOF
22127
22128   cat >> confdefs.h <<\EOF
22129 #define gid_t int
22130 EOF
22131
22132 fi
22133
22134 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22135 echo "configure:22136: checking for sig_atomic_t" >&5
22136 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22137   echo $ac_n "(cached) $ac_c" 1>&6
22138 else
22139   cat > conftest.$ac_ext <<EOF
22140 #line 22141 "configure"
22141 #include "confdefs.h"
22142 #include <signal.h>
22143 int main() {
22144 sig_atomic_t atomic;
22145 ; return 0; }
22146 EOF
22147 if { (eval echo configure:22148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22148   rm -rf conftest*
22149   ol_cv_type_sig_atomic_t=yes
22150 else
22151   echo "configure: failed program was:" >&5
22152   cat conftest.$ac_ext >&5
22153   rm -rf conftest*
22154   ol_cv_type_sig_atomic_t=no
22155 fi
22156 rm -f conftest*
22157 fi
22158
22159 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22160   if test $ol_cv_type_sig_atomic_t = no; then
22161     cat >> confdefs.h <<\EOF
22162 #define sig_atomic_t int
22163 EOF
22164
22165   fi
22166  
22167
22168
22169 # test for pw_gecos in struct passwd
22170 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22171 echo "configure:22172: checking struct passwd for pw_gecos" >&5
22172 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22173   echo $ac_n "(cached) $ac_c" 1>&6
22174 else
22175   
22176         cat > conftest.$ac_ext <<EOF
22177 #line 22178 "configure"
22178 #include "confdefs.h"
22179 #include <pwd.h>
22180 int main() {
22181
22182         struct passwd pwd;
22183         pwd.pw_gecos = pwd.pw_name;
22184
22185 ; return 0; }
22186 EOF
22187 if { (eval echo configure:22188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22188   rm -rf conftest*
22189   ol_cv_struct_passwd_pw_gecos=yes
22190 else
22191   echo "configure: failed program was:" >&5
22192   cat conftest.$ac_ext >&5
22193   rm -rf conftest*
22194   ol_cv_struct_passwd_pw_gecos=no
22195 fi
22196 rm -f conftest*
22197 fi
22198
22199 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22200 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22201         cat >> confdefs.h <<\EOF
22202 #define HAVE_PW_GECOS 1
22203 EOF
22204
22205 fi
22206
22207 # test for pw_passwd in struct passwd
22208 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22209 echo "configure:22210: checking struct passwd for pw_passwd" >&5
22210 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22211   echo $ac_n "(cached) $ac_c" 1>&6
22212 else
22213   
22214         cat > conftest.$ac_ext <<EOF
22215 #line 22216 "configure"
22216 #include "confdefs.h"
22217 #include <pwd.h>
22218 int main() {
22219
22220         struct passwd pwd;
22221         pwd.pw_passwd = pwd.pw_name;
22222
22223 ; return 0; }
22224 EOF
22225 if { (eval echo configure:22226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22226   rm -rf conftest*
22227   ol_cv_struct_passwd_pw_passwd=yes
22228 else
22229   echo "configure: failed program was:" >&5
22230   cat conftest.$ac_ext >&5
22231   rm -rf conftest*
22232   ol_cv_struct_passwd_pw_passwd=no
22233 fi
22234 rm -f conftest*
22235 fi
22236
22237 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22238 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22239         cat >> confdefs.h <<\EOF
22240 #define HAVE_PW_PASSWD 1
22241 EOF
22242
22243 fi
22244
22245
22246 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22247 echo "configure:22248: checking if toupper() requires islower()" >&5
22248 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22249   echo $ac_n "(cached) $ac_c" 1>&6
22250 else
22251   
22252         if test "$cross_compiling" = yes; then
22253   ol_cv_c_upper_lower=safe
22254 else
22255   cat > conftest.$ac_ext <<EOF
22256 #line 22257 "configure"
22257 #include "confdefs.h"
22258
22259 #include <ctype.h>
22260 main()
22261 {
22262         if ('C' == toupper('C'))
22263                 exit(0);
22264         else
22265                 exit(1);
22266 }
22267 EOF
22268 if { (eval echo configure:22269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22269 then
22270   ol_cv_c_upper_lower=no
22271 else
22272   echo "configure: failed program was:" >&5
22273   cat conftest.$ac_ext >&5
22274   rm -fr conftest*
22275   ol_cv_c_upper_lower=yes
22276 fi
22277 rm -fr conftest*
22278 fi
22279
22280 fi
22281
22282 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22283 if test $ol_cv_c_upper_lower != no ; then
22284         cat >> confdefs.h <<\EOF
22285 #define C_UPPER_LOWER 1
22286 EOF
22287
22288 fi
22289
22290 echo $ac_n "checking for working const""... $ac_c" 1>&6
22291 echo "configure:22292: checking for working const" >&5
22292 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22293   echo $ac_n "(cached) $ac_c" 1>&6
22294 else
22295   cat > conftest.$ac_ext <<EOF
22296 #line 22297 "configure"
22297 #include "confdefs.h"
22298
22299 int main() {
22300
22301 /* Ultrix mips cc rejects this.  */
22302 typedef int charset[2]; const charset x;
22303 /* SunOS 4.1.1 cc rejects this.  */
22304 char const *const *ccp;
22305 char **p;
22306 /* NEC SVR4.0.2 mips cc rejects this.  */
22307 struct point {int x, y;};
22308 static struct point const zero = {0,0};
22309 /* AIX XL C 1.02.0.0 rejects this.
22310    It does not let you subtract one const X* pointer from another in an arm
22311    of an if-expression whose if-part is not a constant expression */
22312 const char *g = "string";
22313 ccp = &g + (g ? g-g : 0);
22314 /* HPUX 7.0 cc rejects these. */
22315 ++ccp;
22316 p = (char**) ccp;
22317 ccp = (char const *const *) p;
22318 { /* SCO 3.2v4 cc rejects this.  */
22319   char *t;
22320   char const *s = 0 ? (char *) 0 : (char const *) 0;
22321
22322   *t++ = 0;
22323 }
22324 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22325   int x[] = {25, 17};
22326   const int *foo = &x[0];
22327   ++foo;
22328 }
22329 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22330   typedef const int *iptr;
22331   iptr p = 0;
22332   ++p;
22333 }
22334 { /* AIX XL C 1.02.0.0 rejects this saying
22335      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22336   struct s { int j; const int *ap[3]; };
22337   struct s *b; b->j = 5;
22338 }
22339 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22340   const int foo = 10;
22341 }
22342
22343 ; return 0; }
22344 EOF
22345 if { (eval echo configure:22346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22346   rm -rf conftest*
22347   ac_cv_c_const=yes
22348 else
22349   echo "configure: failed program was:" >&5
22350   cat conftest.$ac_ext >&5
22351   rm -rf conftest*
22352   ac_cv_c_const=no
22353 fi
22354 rm -f conftest*
22355 fi
22356
22357 echo "$ac_t""$ac_cv_c_const" 1>&6
22358 if test $ac_cv_c_const = no; then
22359   cat >> confdefs.h <<\EOF
22360 #define const 
22361 EOF
22362
22363 fi
22364
22365 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22366 echo "configure:22367: checking if compiler understands volatile" >&5
22367 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22368   echo $ac_n "(cached) $ac_c" 1>&6
22369 else
22370   cat > conftest.$ac_ext <<EOF
22371 #line 22372 "configure"
22372 #include "confdefs.h"
22373 int x, y, z;
22374 int main() {
22375 volatile int a; int * volatile b = x ? &y : &z;
22376       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22377       *b = 0;
22378 ; return 0; }
22379 EOF
22380 if { (eval echo configure:22381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22381   rm -rf conftest*
22382   ol_cv_c_volatile=yes
22383 else
22384   echo "configure: failed program was:" >&5
22385   cat conftest.$ac_ext >&5
22386   rm -rf conftest*
22387   ol_cv_c_volatile=no
22388 fi
22389 rm -f conftest*
22390 fi
22391
22392 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22393   if test $ol_cv_c_volatile = yes; then
22394     : 
22395   else
22396     cat >> confdefs.h <<\EOF
22397 #define volatile 
22398 EOF
22399
22400   fi
22401  
22402
22403 if test $cross_compiling = yes ; then
22404         cat >> confdefs.h <<\EOF
22405 #define CROSS_COMPILING 1
22406 EOF
22407
22408 else
22409         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22410 echo "configure:22411: checking whether byte ordering is bigendian" >&5
22411 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22412   echo $ac_n "(cached) $ac_c" 1>&6
22413 else
22414   ac_cv_c_bigendian=unknown
22415 # See if sys/param.h defines the BYTE_ORDER macro.
22416 cat > conftest.$ac_ext <<EOF
22417 #line 22418 "configure"
22418 #include "confdefs.h"
22419 #include <sys/types.h>
22420 #include <sys/param.h>
22421 int main() {
22422
22423 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22424  bogus endian macros
22425 #endif
22426 ; return 0; }
22427 EOF
22428 if { (eval echo configure:22429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22429   rm -rf conftest*
22430   # It does; now see whether it defined to BIG_ENDIAN or not.
22431 cat > conftest.$ac_ext <<EOF
22432 #line 22433 "configure"
22433 #include "confdefs.h"
22434 #include <sys/types.h>
22435 #include <sys/param.h>
22436 int main() {
22437
22438 #if BYTE_ORDER != BIG_ENDIAN
22439  not big endian
22440 #endif
22441 ; return 0; }
22442 EOF
22443 if { (eval echo configure:22444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22444   rm -rf conftest*
22445   ac_cv_c_bigendian=yes
22446 else
22447   echo "configure: failed program was:" >&5
22448   cat conftest.$ac_ext >&5
22449   rm -rf conftest*
22450   ac_cv_c_bigendian=no
22451 fi
22452 rm -f conftest*
22453 else
22454   echo "configure: failed program was:" >&5
22455   cat conftest.$ac_ext >&5
22456 fi
22457 rm -f conftest*
22458 if test $ac_cv_c_bigendian = unknown; then
22459 if test "$cross_compiling" = yes; then
22460     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22461 else
22462   cat > conftest.$ac_ext <<EOF
22463 #line 22464 "configure"
22464 #include "confdefs.h"
22465 main () {
22466   /* Are we little or big endian?  From Harbison&Steele.  */
22467   union
22468   {
22469     long l;
22470     char c[sizeof (long)];
22471   } u;
22472   u.l = 1;
22473   exit (u.c[sizeof (long) - 1] == 1);
22474 }
22475 EOF
22476 if { (eval echo configure:22477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22477 then
22478   ac_cv_c_bigendian=no
22479 else
22480   echo "configure: failed program was:" >&5
22481   cat conftest.$ac_ext >&5
22482   rm -fr conftest*
22483   ac_cv_c_bigendian=yes
22484 fi
22485 rm -fr conftest*
22486 fi
22487
22488 fi
22489 fi
22490
22491 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22492 if test $ac_cv_c_bigendian = yes; then
22493   cat >> confdefs.h <<\EOF
22494 #define WORDS_BIGENDIAN 1
22495 EOF
22496
22497 fi
22498
22499 fi
22500
22501 echo $ac_n "checking size of short""... $ac_c" 1>&6
22502 echo "configure:22503: checking size of short" >&5 
22503 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22504   echo $ac_n "(cached) $ac_c" 1>&6
22505 else
22506   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22507   cat > conftest.$ac_ext <<EOF
22508 #line 22509 "configure"
22509 #include "confdefs.h"
22510 #include "confdefs.h" 
22511 #include <sys/types.h> 
22512  
22513
22514 int main() {
22515 switch (0) case 0: case (sizeof (short) == $ac_size):;
22516 ; return 0; }
22517 EOF
22518 if { (eval echo configure:22519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22519   rm -rf conftest*
22520   ac_cv_sizeof_short=$ac_size
22521 else
22522   echo "configure: failed program was:" >&5
22523   cat conftest.$ac_ext >&5
22524 fi
22525 rm -f conftest* 
22526   if test x$ac_cv_sizeof_short != x ; then break; fi 
22527 done 
22528
22529 fi
22530  
22531 if test x$ac_cv_sizeof_short = x ; then 
22532   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22533 fi 
22534 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22535 cat >> confdefs.h <<EOF
22536 #define SIZEOF_SHORT $ac_cv_sizeof_short
22537 EOF
22538  
22539  
22540 echo $ac_n "checking size of int""... $ac_c" 1>&6
22541 echo "configure:22542: checking size of int" >&5 
22542 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22543   echo $ac_n "(cached) $ac_c" 1>&6
22544 else
22545   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22546   cat > conftest.$ac_ext <<EOF
22547 #line 22548 "configure"
22548 #include "confdefs.h"
22549 #include "confdefs.h" 
22550 #include <sys/types.h> 
22551  
22552
22553 int main() {
22554 switch (0) case 0: case (sizeof (int) == $ac_size):;
22555 ; return 0; }
22556 EOF
22557 if { (eval echo configure:22558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22558   rm -rf conftest*
22559   ac_cv_sizeof_int=$ac_size
22560 else
22561   echo "configure: failed program was:" >&5
22562   cat conftest.$ac_ext >&5
22563 fi
22564 rm -f conftest* 
22565   if test x$ac_cv_sizeof_int != x ; then break; fi 
22566 done 
22567
22568 fi
22569  
22570 if test x$ac_cv_sizeof_int = x ; then 
22571   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22572 fi 
22573 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22574 cat >> confdefs.h <<EOF
22575 #define SIZEOF_INT $ac_cv_sizeof_int
22576 EOF
22577  
22578  
22579 echo $ac_n "checking size of long""... $ac_c" 1>&6
22580 echo "configure:22581: checking size of long" >&5 
22581 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22582   echo $ac_n "(cached) $ac_c" 1>&6
22583 else
22584   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22585   cat > conftest.$ac_ext <<EOF
22586 #line 22587 "configure"
22587 #include "confdefs.h"
22588 #include "confdefs.h" 
22589 #include <sys/types.h> 
22590  
22591
22592 int main() {
22593 switch (0) case 0: case (sizeof (long) == $ac_size):;
22594 ; return 0; }
22595 EOF
22596 if { (eval echo configure:22597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22597   rm -rf conftest*
22598   ac_cv_sizeof_long=$ac_size
22599 else
22600   echo "configure: failed program was:" >&5
22601   cat conftest.$ac_ext >&5
22602 fi
22603 rm -f conftest* 
22604   if test x$ac_cv_sizeof_long != x ; then break; fi 
22605 done 
22606
22607 fi
22608  
22609 if test x$ac_cv_sizeof_long = x ; then 
22610   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22611 fi 
22612 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22613 cat >> confdefs.h <<EOF
22614 #define SIZEOF_LONG $ac_cv_sizeof_long
22615 EOF
22616  
22617
22618
22619 if test "$ac_cv_sizeof_int" -lt 4 ; then
22620         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22621
22622         cat >> confdefs.h <<\EOF
22623 #define LBER_INT_T long
22624 EOF
22625
22626 else
22627         cat >> confdefs.h <<\EOF
22628 #define LBER_INT_T int
22629 EOF
22630
22631 fi
22632
22633 cat >> confdefs.h <<\EOF
22634 #define LBER_LEN_T long
22635 EOF
22636
22637 cat >> confdefs.h <<\EOF
22638 #define LBER_SOCKET_T int
22639 EOF
22640
22641 cat >> confdefs.h <<\EOF
22642 #define LBER_TAG_T long
22643 EOF
22644
22645
22646 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22647 echo "configure:22648: checking for 8-bit clean memcmp" >&5
22648 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22649   echo $ac_n "(cached) $ac_c" 1>&6
22650 else
22651   if test "$cross_compiling" = yes; then
22652   ac_cv_func_memcmp_clean=no
22653 else
22654   cat > conftest.$ac_ext <<EOF
22655 #line 22656 "configure"
22656 #include "confdefs.h"
22657
22658 main()
22659 {
22660   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22661   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22662 }
22663
22664 EOF
22665 if { (eval echo configure:22666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22666 then
22667   ac_cv_func_memcmp_clean=yes
22668 else
22669   echo "configure: failed program was:" >&5
22670   cat conftest.$ac_ext >&5
22671   rm -fr conftest*
22672   ac_cv_func_memcmp_clean=no
22673 fi
22674 rm -fr conftest*
22675 fi
22676
22677 fi
22678
22679 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22680 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22681
22682 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22683 echo "configure:22684: checking for strftime" >&5
22684 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22685   echo $ac_n "(cached) $ac_c" 1>&6
22686 else
22687   cat > conftest.$ac_ext <<EOF
22688 #line 22689 "configure"
22689 #include "confdefs.h"
22690 /* System header to define __stub macros and hopefully few prototypes,
22691     which can conflict with char strftime(); below.  */
22692 #include <assert.h>
22693 /* Override any gcc2 internal prototype to avoid an error.  */
22694 /* We use char because int might match the return type of a gcc2
22695     builtin and then its argument prototype would still apply.  */
22696 char strftime();
22697 char (*f)();
22698
22699 int main() {
22700
22701 /* The GNU C library defines this for functions which it implements
22702     to always fail with ENOSYS.  Some functions are actually named
22703     something starting with __ and the normal name is an alias.  */
22704 #if defined (__stub_strftime) || defined (__stub___strftime)
22705 choke me
22706 #else
22707 f = strftime;
22708 #endif
22709
22710 ; return 0; }
22711 EOF
22712 if { (eval echo configure:22713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22713   rm -rf conftest*
22714   eval "ac_cv_func_strftime=yes"
22715 else
22716   echo "configure: failed program was:" >&5
22717   cat conftest.$ac_ext >&5
22718   rm -rf conftest*
22719   eval "ac_cv_func_strftime=no"
22720 fi
22721 rm -f conftest*
22722 fi
22723
22724 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22725   echo "$ac_t""yes" 1>&6
22726   cat >> confdefs.h <<\EOF
22727 #define HAVE_STRFTIME 1
22728 EOF
22729
22730 else
22731   echo "$ac_t""no" 1>&6
22732 # strftime is in -lintl on SCO UNIX.
22733 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22734 echo "configure:22735: checking for strftime in -lintl" >&5
22735 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22736 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22737   echo $ac_n "(cached) $ac_c" 1>&6
22738 else
22739   ac_save_LIBS="$LIBS"
22740 LIBS="-lintl  $LIBS"
22741 cat > conftest.$ac_ext <<EOF
22742 #line 22743 "configure"
22743 #include "confdefs.h"
22744 /* Override any gcc2 internal prototype to avoid an error.  */
22745 /* We use char because int might match the return type of a gcc2
22746     builtin and then its argument prototype would still apply.  */
22747 char strftime();
22748
22749 int main() {
22750 strftime()
22751 ; return 0; }
22752 EOF
22753 if { (eval echo configure:22754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22754   rm -rf conftest*
22755   eval "ac_cv_lib_$ac_lib_var=yes"
22756 else
22757   echo "configure: failed program was:" >&5
22758   cat conftest.$ac_ext >&5
22759   rm -rf conftest*
22760   eval "ac_cv_lib_$ac_lib_var=no"
22761 fi
22762 rm -f conftest*
22763 LIBS="$ac_save_LIBS"
22764
22765 fi
22766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22767   echo "$ac_t""yes" 1>&6
22768   cat >> confdefs.h <<\EOF
22769 #define HAVE_STRFTIME 1
22770 EOF
22771
22772 LIBS="-lintl $LIBS"
22773 else
22774   echo "$ac_t""no" 1>&6
22775 fi
22776
22777 fi
22778
22779
22780 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22781 echo "configure:22782: checking for inet_aton()" >&5
22782 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22783   echo $ac_n "(cached) $ac_c" 1>&6
22784 else
22785   cat > conftest.$ac_ext <<EOF
22786 #line 22787 "configure"
22787 #include "confdefs.h"
22788
22789 #ifdef HAVE_SYS_TYPES_H
22790 #       include <sys/types.h>
22791 #endif
22792 #ifdef HAVE_SYS_SOCKET_H
22793 #       include <sys/socket.h>
22794 #       ifdef HAVE_SYS_SELECT_H
22795 #               include <sys/select.h>
22796 #       endif
22797 #       include <netinet/in.h>
22798 #       ifdef HAVE_ARPA_INET_H
22799 #               include <arpa/inet.h>
22800 #       endif
22801 #endif
22802
22803 int main() {
22804 struct in_addr in;
22805 int rc = inet_aton( "255.255.255.255", &in );
22806 ; return 0; }
22807 EOF
22808 if { (eval echo configure:22809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22809   rm -rf conftest*
22810   ol_cv_func_inet_aton=yes
22811 else
22812   echo "configure: failed program was:" >&5
22813   cat conftest.$ac_ext >&5
22814   rm -rf conftest*
22815   ol_cv_func_inet_aton=no
22816 fi
22817 rm -f conftest*
22818 fi
22819
22820 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22821   if test $ol_cv_func_inet_aton != no; then
22822     cat >> confdefs.h <<\EOF
22823 #define HAVE_INET_ATON 1
22824 EOF
22825
22826   fi
22827  
22828
22829 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22830 echo "configure:22831: checking for _spawnlp" >&5
22831 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22832   echo $ac_n "(cached) $ac_c" 1>&6
22833 else
22834   cat > conftest.$ac_ext <<EOF
22835 #line 22836 "configure"
22836 #include "confdefs.h"
22837 /* System header to define __stub macros and hopefully few prototypes,
22838     which can conflict with char _spawnlp(); below.  */
22839 #include <assert.h>
22840 /* Override any gcc2 internal prototype to avoid an error.  */
22841 /* We use char because int might match the return type of a gcc2
22842     builtin and then its argument prototype would still apply.  */
22843 char _spawnlp();
22844 char (*f)();
22845
22846 int main() {
22847
22848 /* The GNU C library defines this for functions which it implements
22849     to always fail with ENOSYS.  Some functions are actually named
22850     something starting with __ and the normal name is an alias.  */
22851 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22852 choke me
22853 #else
22854 f = _spawnlp;
22855 #endif
22856
22857 ; return 0; }
22858 EOF
22859 if { (eval echo configure:22860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22860   rm -rf conftest*
22861   eval "ac_cv_func__spawnlp=yes"
22862 else
22863   echo "configure: failed program was:" >&5
22864   cat conftest.$ac_ext >&5
22865   rm -rf conftest*
22866   eval "ac_cv_func__spawnlp=no"
22867 fi
22868 rm -f conftest*
22869 fi
22870
22871 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22872   echo "$ac_t""yes" 1>&6
22873   cat >> confdefs.h <<\EOF
22874 #define HAVE_SPAWNLP 1
22875 EOF
22876
22877 else
22878   echo "$ac_t""no" 1>&6
22879 fi
22880
22881
22882 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22883 echo "configure:22884: checking for _snprintf" >&5
22884 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22885   echo $ac_n "(cached) $ac_c" 1>&6
22886 else
22887   cat > conftest.$ac_ext <<EOF
22888 #line 22889 "configure"
22889 #include "confdefs.h"
22890 /* System header to define __stub macros and hopefully few prototypes,
22891     which can conflict with char _snprintf(); below.  */
22892 #include <assert.h>
22893 /* Override any gcc2 internal prototype to avoid an error.  */
22894 /* We use char because int might match the return type of a gcc2
22895     builtin and then its argument prototype would still apply.  */
22896 char _snprintf();
22897 char (*f)();
22898
22899 int main() {
22900
22901 /* The GNU C library defines this for functions which it implements
22902     to always fail with ENOSYS.  Some functions are actually named
22903     something starting with __ and the normal name is an alias.  */
22904 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22905 choke me
22906 #else
22907 f = _snprintf;
22908 #endif
22909
22910 ; return 0; }
22911 EOF
22912 if { (eval echo configure:22913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22913   rm -rf conftest*
22914   eval "ac_cv_func__snprintf=yes"
22915 else
22916   echo "configure: failed program was:" >&5
22917   cat conftest.$ac_ext >&5
22918   rm -rf conftest*
22919   eval "ac_cv_func__snprintf=no"
22920 fi
22921 rm -f conftest*
22922 fi
22923
22924 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22925   echo "$ac_t""yes" 1>&6
22926   ac_cv_func_snprintf=yes
22927         cat >> confdefs.h <<\EOF
22928 #define snprintf _snprintf
22929 EOF
22930
22931
22932 else
22933   echo "$ac_t""no" 1>&6
22934 fi
22935
22936
22937 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22938 echo "configure:22939: checking for _vsnprintf" >&5
22939 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22940   echo $ac_n "(cached) $ac_c" 1>&6
22941 else
22942   cat > conftest.$ac_ext <<EOF
22943 #line 22944 "configure"
22944 #include "confdefs.h"
22945 /* System header to define __stub macros and hopefully few prototypes,
22946     which can conflict with char _vsnprintf(); below.  */
22947 #include <assert.h>
22948 /* Override any gcc2 internal prototype to avoid an error.  */
22949 /* We use char because int might match the return type of a gcc2
22950     builtin and then its argument prototype would still apply.  */
22951 char _vsnprintf();
22952 char (*f)();
22953
22954 int main() {
22955
22956 /* The GNU C library defines this for functions which it implements
22957     to always fail with ENOSYS.  Some functions are actually named
22958     something starting with __ and the normal name is an alias.  */
22959 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22960 choke me
22961 #else
22962 f = _vsnprintf;
22963 #endif
22964
22965 ; return 0; }
22966 EOF
22967 if { (eval echo configure:22968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22968   rm -rf conftest*
22969   eval "ac_cv_func__vsnprintf=yes"
22970 else
22971   echo "configure: failed program was:" >&5
22972   cat conftest.$ac_ext >&5
22973   rm -rf conftest*
22974   eval "ac_cv_func__vsnprintf=no"
22975 fi
22976 rm -f conftest*
22977 fi
22978
22979 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22980   echo "$ac_t""yes" 1>&6
22981   ac_cv_func_vsnprintf=yes
22982         cat >> confdefs.h <<\EOF
22983 #define vsnprintf _vsnprintf
22984 EOF
22985
22986
22987 else
22988   echo "$ac_t""no" 1>&6
22989 fi
22990
22991
22992 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22993 echo "configure:22994: checking for vprintf" >&5
22994 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22995   echo $ac_n "(cached) $ac_c" 1>&6
22996 else
22997   cat > conftest.$ac_ext <<EOF
22998 #line 22999 "configure"
22999 #include "confdefs.h"
23000 /* System header to define __stub macros and hopefully few prototypes,
23001     which can conflict with char vprintf(); below.  */
23002 #include <assert.h>
23003 /* Override any gcc2 internal prototype to avoid an error.  */
23004 /* We use char because int might match the return type of a gcc2
23005     builtin and then its argument prototype would still apply.  */
23006 char vprintf();
23007 char (*f)();
23008
23009 int main() {
23010
23011 /* The GNU C library defines this for functions which it implements
23012     to always fail with ENOSYS.  Some functions are actually named
23013     something starting with __ and the normal name is an alias.  */
23014 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23015 choke me
23016 #else
23017 f = vprintf;
23018 #endif
23019
23020 ; return 0; }
23021 EOF
23022 if { (eval echo configure:23023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23023   rm -rf conftest*
23024   eval "ac_cv_func_vprintf=yes"
23025 else
23026   echo "configure: failed program was:" >&5
23027   cat conftest.$ac_ext >&5
23028   rm -rf conftest*
23029   eval "ac_cv_func_vprintf=no"
23030 fi
23031 rm -f conftest*
23032 fi
23033
23034 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23035   echo "$ac_t""yes" 1>&6
23036   cat >> confdefs.h <<\EOF
23037 #define HAVE_VPRINTF 1
23038 EOF
23039
23040 else
23041   echo "$ac_t""no" 1>&6
23042 fi
23043
23044 if test "$ac_cv_func_vprintf" != yes; then
23045 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23046 echo "configure:23047: checking for _doprnt" >&5
23047 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23048   echo $ac_n "(cached) $ac_c" 1>&6
23049 else
23050   cat > conftest.$ac_ext <<EOF
23051 #line 23052 "configure"
23052 #include "confdefs.h"
23053 /* System header to define __stub macros and hopefully few prototypes,
23054     which can conflict with char _doprnt(); below.  */
23055 #include <assert.h>
23056 /* Override any gcc2 internal prototype to avoid an error.  */
23057 /* We use char because int might match the return type of a gcc2
23058     builtin and then its argument prototype would still apply.  */
23059 char _doprnt();
23060 char (*f)();
23061
23062 int main() {
23063
23064 /* The GNU C library defines this for functions which it implements
23065     to always fail with ENOSYS.  Some functions are actually named
23066     something starting with __ and the normal name is an alias.  */
23067 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23068 choke me
23069 #else
23070 f = _doprnt;
23071 #endif
23072
23073 ; return 0; }
23074 EOF
23075 if { (eval echo configure:23076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23076   rm -rf conftest*
23077   eval "ac_cv_func__doprnt=yes"
23078 else
23079   echo "configure: failed program was:" >&5
23080   cat conftest.$ac_ext >&5
23081   rm -rf conftest*
23082   eval "ac_cv_func__doprnt=no"
23083 fi
23084 rm -f conftest*
23085 fi
23086
23087 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23088   echo "$ac_t""yes" 1>&6
23089   cat >> confdefs.h <<\EOF
23090 #define HAVE_DOPRNT 1
23091 EOF
23092
23093 else
23094   echo "$ac_t""no" 1>&6
23095 fi
23096
23097 fi
23098
23099
23100 if test $ac_cv_func_vprintf = yes ; then
23101                 for ac_func in snprintf vsnprintf
23102 do
23103 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23104 echo "configure:23105: checking for $ac_func" >&5
23105 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23106   echo $ac_n "(cached) $ac_c" 1>&6
23107 else
23108   cat > conftest.$ac_ext <<EOF
23109 #line 23110 "configure"
23110 #include "confdefs.h"
23111 /* System header to define __stub macros and hopefully few prototypes,
23112     which can conflict with char $ac_func(); below.  */
23113 #include <assert.h>
23114 /* Override any gcc2 internal prototype to avoid an error.  */
23115 /* We use char because int might match the return type of a gcc2
23116     builtin and then its argument prototype would still apply.  */
23117 char $ac_func();
23118 char (*f)();
23119
23120 int main() {
23121
23122 /* The GNU C library defines this for functions which it implements
23123     to always fail with ENOSYS.  Some functions are actually named
23124     something starting with __ and the normal name is an alias.  */
23125 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23126 choke me
23127 #else
23128 f = $ac_func;
23129 #endif
23130
23131 ; return 0; }
23132 EOF
23133 if { (eval echo configure:23134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23134   rm -rf conftest*
23135   eval "ac_cv_func_$ac_func=yes"
23136 else
23137   echo "configure: failed program was:" >&5
23138   cat conftest.$ac_ext >&5
23139   rm -rf conftest*
23140   eval "ac_cv_func_$ac_func=no"
23141 fi
23142 rm -f conftest*
23143 fi
23144
23145 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23146   echo "$ac_t""yes" 1>&6
23147     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23148   cat >> confdefs.h <<EOF
23149 #define $ac_tr_func 1
23150 EOF
23151  
23152 else
23153   echo "$ac_t""no" 1>&6
23154 fi
23155 done
23156
23157 fi
23158
23159 for ac_func in \
23160         bcopy                   \
23161         closesocket             \
23162         chroot                  \
23163         endgrent                \
23164         endpwent                \
23165         fcntl                   \
23166         flock                   \
23167         fstat                   \
23168         getdtablesize   \
23169         getgrgid                \
23170         gethostname             \
23171         getpass                 \
23172         getpassphrase   \
23173         getpwuid                \
23174         getpwnam                \
23175         getspnam                \
23176         gettimeofday    \
23177         initgroups              \
23178         lockf                   \
23179         memcpy                  \
23180         memmove                 \
23181         mkstemp                 \
23182         mktemp                  \
23183         pipe                    \
23184         read                    \
23185         recv                    \
23186         recvfrom                \
23187         setpwfile               \
23188         setgid                  \
23189         setegid                 \
23190         setsid                  \
23191         setuid                  \
23192         seteuid                 \
23193         sigaction               \
23194         signal                  \
23195         sigset                  \
23196         strdup                  \
23197         strerror                \
23198         strpbrk                 \
23199         strrchr                 \
23200         strsep                  \
23201         strstr                  \
23202         strtol                  \
23203         strtoul                 \
23204         strtoq                  \
23205         strtouq                 \
23206         strtoll                 \
23207         strspn                  \
23208         sysconf                 \
23209         usleep                  \
23210         waitpid                 \
23211         wait4                   \
23212         write                   \
23213         send                    \
23214         sendmsg                 \
23215         sendto                  \
23216
23217 do
23218 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23219 echo "configure:23220: checking for $ac_func" >&5
23220 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23221   echo $ac_n "(cached) $ac_c" 1>&6
23222 else
23223   cat > conftest.$ac_ext <<EOF
23224 #line 23225 "configure"
23225 #include "confdefs.h"
23226 /* System header to define __stub macros and hopefully few prototypes,
23227     which can conflict with char $ac_func(); below.  */
23228 #include <assert.h>
23229 /* Override any gcc2 internal prototype to avoid an error.  */
23230 /* We use char because int might match the return type of a gcc2
23231     builtin and then its argument prototype would still apply.  */
23232 char $ac_func();
23233 char (*f)();
23234
23235 int main() {
23236
23237 /* The GNU C library defines this for functions which it implements
23238     to always fail with ENOSYS.  Some functions are actually named
23239     something starting with __ and the normal name is an alias.  */
23240 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23241 choke me
23242 #else
23243 f = $ac_func;
23244 #endif
23245
23246 ; return 0; }
23247 EOF
23248 if { (eval echo configure:23249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23249   rm -rf conftest*
23250   eval "ac_cv_func_$ac_func=yes"
23251 else
23252   echo "configure: failed program was:" >&5
23253   cat conftest.$ac_ext >&5
23254   rm -rf conftest*
23255   eval "ac_cv_func_$ac_func=no"
23256 fi
23257 rm -f conftest*
23258 fi
23259
23260 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23261   echo "$ac_t""yes" 1>&6
23262     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23263   cat >> confdefs.h <<EOF
23264 #define $ac_tr_func 1
23265 EOF
23266  
23267 else
23268   echo "$ac_t""no" 1>&6
23269 fi
23270 done
23271
23272
23273 for ac_func in getopt getpeereid
23274 do
23275 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23276 echo "configure:23277: checking for $ac_func" >&5
23277 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23278   echo $ac_n "(cached) $ac_c" 1>&6
23279 else
23280   cat > conftest.$ac_ext <<EOF
23281 #line 23282 "configure"
23282 #include "confdefs.h"
23283 /* System header to define __stub macros and hopefully few prototypes,
23284     which can conflict with char $ac_func(); below.  */
23285 #include <assert.h>
23286 /* Override any gcc2 internal prototype to avoid an error.  */
23287 /* We use char because int might match the return type of a gcc2
23288     builtin and then its argument prototype would still apply.  */
23289 char $ac_func();
23290 char (*f)();
23291
23292 int main() {
23293
23294 /* The GNU C library defines this for functions which it implements
23295     to always fail with ENOSYS.  Some functions are actually named
23296     something starting with __ and the normal name is an alias.  */
23297 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23298 choke me
23299 #else
23300 f = $ac_func;
23301 #endif
23302
23303 ; return 0; }
23304 EOF
23305 if { (eval echo configure:23306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23306   rm -rf conftest*
23307   eval "ac_cv_func_$ac_func=yes"
23308 else
23309   echo "configure: failed program was:" >&5
23310   cat conftest.$ac_ext >&5
23311   rm -rf conftest*
23312   eval "ac_cv_func_$ac_func=no"
23313 fi
23314 rm -f conftest*
23315 fi
23316
23317 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23318   echo "$ac_t""yes" 1>&6
23319     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23320   cat >> confdefs.h <<EOF
23321 #define $ac_tr_func 1
23322 EOF
23323  
23324 else
23325   echo "$ac_t""no" 1>&6
23326 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23327 fi
23328 done
23329
23330
23331
23332 if test "$ac_cv_func_getopt" != yes; then
23333         LIBSRCS="$LIBSRCS getopt.c"
23334 fi
23335 if test "$ac_cv_func_getpeereid" != yes; then
23336         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23337 echo "configure:23338: checking for msg_accrights in msghdr" >&5
23338 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23339   echo $ac_n "(cached) $ac_c" 1>&6
23340 else
23341   cat > conftest.$ac_ext <<EOF
23342 #line 23343 "configure"
23343 #include "confdefs.h"
23344 #include <sys/socket.h>
23345 int main() {
23346 struct msghdr m; m.msg_accrightslen=0
23347 ; return 0; }
23348 EOF
23349 if { (eval echo configure:23350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23350   rm -rf conftest*
23351   ol_cv_msghdr_msg_accrights=yes
23352 else
23353   echo "configure: failed program was:" >&5
23354   cat conftest.$ac_ext >&5
23355   rm -rf conftest*
23356   ol_cv_msghdr_msg_accrights=no
23357 fi
23358 rm -f conftest*
23359         
23360 fi
23361
23362 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23363   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23364         cat >> confdefs.h <<\EOF
23365 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23366 EOF
23367
23368   fi
23369
23370         LIBSRCS="$LIBSRCS getpeereid.c"
23371 fi
23372 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23373         if test "$ac_cv_func_snprintf" != yes; then
23374                 cat >> confdefs.h <<\EOF
23375 #define snprintf ber_pvt_snprintf
23376 EOF
23377
23378         fi
23379         if test "$ac_cv_func_vsnprintf" != yes; then
23380                 cat >> confdefs.h <<\EOF
23381 #define vsnprintf ber_pvt_vsnprintf
23382 EOF
23383
23384         fi
23385 fi
23386
23387 # Check Configuration
23388 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23389 echo "configure:23390: checking declaration of sys_errlist" >&5
23390 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23391   echo $ac_n "(cached) $ac_c" 1>&6
23392 else
23393   
23394         cat > conftest.$ac_ext <<EOF
23395 #line 23396 "configure"
23396 #include "confdefs.h"
23397
23398 #include <stdio.h>
23399 #include <sys/types.h>
23400 #include <errno.h>
23401 #ifdef WINNT
23402 #include <stdlib.h>
23403 #endif 
23404 int main() {
23405 char *c = (char *) *sys_errlist
23406 ; return 0; }
23407 EOF
23408 if { (eval echo configure:23409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23409   rm -rf conftest*
23410   ol_cv_dcl_sys_errlist=yes
23411         ol_cv_have_sys_errlist=yes
23412 else
23413   echo "configure: failed program was:" >&5
23414   cat conftest.$ac_ext >&5
23415   rm -rf conftest*
23416   ol_cv_dcl_sys_errlist=no
23417 fi
23418 rm -f conftest*
23419 fi
23420
23421 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23422 #
23423 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23424 if test $ol_cv_dcl_sys_errlist = no ; then
23425         cat >> confdefs.h <<\EOF
23426 #define DECL_SYS_ERRLIST 1
23427 EOF
23428
23429
23430         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23431 echo "configure:23432: checking existence of sys_errlist" >&5
23432 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23433   echo $ac_n "(cached) $ac_c" 1>&6
23434 else
23435   
23436                 cat > conftest.$ac_ext <<EOF
23437 #line 23438 "configure"
23438 #include "confdefs.h"
23439 #include <errno.h>
23440 int main() {
23441 char *c = (char *) *sys_errlist
23442 ; return 0; }
23443 EOF
23444 if { (eval echo configure:23445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23445   rm -rf conftest*
23446   ol_cv_have_sys_errlist=yes
23447 else
23448   echo "configure: failed program was:" >&5
23449   cat conftest.$ac_ext >&5
23450   rm -rf conftest*
23451   ol_cv_have_sys_errlist=no
23452 fi
23453 rm -f conftest*
23454 fi
23455
23456 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23457 fi
23458 if test $ol_cv_have_sys_errlist = yes ; then
23459         cat >> confdefs.h <<\EOF
23460 #define HAVE_SYS_ERRLIST 1
23461 EOF
23462
23463 fi
23464
23465
23466
23467 if test "$ol_enable_slapi" != no ; then
23468                         for ac_hdr in ltdl.h
23469 do
23470 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23471 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23472 echo "configure:23473: checking for $ac_hdr" >&5
23473 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23474   echo $ac_n "(cached) $ac_c" 1>&6
23475 else
23476   cat > conftest.$ac_ext <<EOF
23477 #line 23478 "configure"
23478 #include "confdefs.h"
23479 #include <$ac_hdr>
23480 EOF
23481 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23482 { (eval echo configure:23483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23483 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23484 if test -z "$ac_err"; then
23485   rm -rf conftest*
23486   eval "ac_cv_header_$ac_safe=yes"
23487 else
23488   echo "$ac_err" >&5
23489   echo "configure: failed program was:" >&5
23490   cat conftest.$ac_ext >&5
23491   rm -rf conftest*
23492   eval "ac_cv_header_$ac_safe=no"
23493 fi
23494 rm -f conftest*
23495 fi
23496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23497   echo "$ac_t""yes" 1>&6
23498     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23499   cat >> confdefs.h <<EOF
23500 #define $ac_tr_hdr 1
23501 EOF
23502  
23503 else
23504   echo "$ac_t""no" 1>&6
23505 fi
23506 done
23507
23508
23509         if test $ac_cv_header_ltdl_h != yes ; then
23510                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23511         fi
23512         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23513 echo "configure:23514: checking for lt_dlinit in -lltdl" >&5
23514 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23515 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23516   echo $ac_n "(cached) $ac_c" 1>&6
23517 else
23518   ac_save_LIBS="$LIBS"
23519 LIBS="-lltdl  $LIBS"
23520 cat > conftest.$ac_ext <<EOF
23521 #line 23522 "configure"
23522 #include "confdefs.h"
23523 /* Override any gcc2 internal prototype to avoid an error.  */
23524 /* We use char because int might match the return type of a gcc2
23525     builtin and then its argument prototype would still apply.  */
23526 char lt_dlinit();
23527
23528 int main() {
23529 lt_dlinit()
23530 ; return 0; }
23531 EOF
23532 if { (eval echo configure:23533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23533   rm -rf conftest*
23534   eval "ac_cv_lib_$ac_lib_var=yes"
23535 else
23536   echo "configure: failed program was:" >&5
23537   cat conftest.$ac_ext >&5
23538   rm -rf conftest*
23539   eval "ac_cv_lib_$ac_lib_var=no"
23540 fi
23541 rm -f conftest*
23542 LIBS="$ac_save_LIBS"
23543
23544 fi
23545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23546   echo "$ac_t""yes" 1>&6
23547   
23548                 SLAPI_LIBS=-lltdl
23549                 LIBSLAPI=libslapi.a
23550                 LIBSLAPITOOLS=../libslapi.a
23551                 cat >> confdefs.h <<\EOF
23552 #define HAVE_LIBLTDL 1
23553 EOF
23554
23555         
23556 else
23557   echo "$ac_t""no" 1>&6
23558 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23559 fi
23560
23561
23562         cat >> confdefs.h <<\EOF
23563 #define LDAP_SLAPI 1
23564 EOF
23565
23566 fi
23567
23568 if test "$ol_enable_debug" != no ; then
23569         cat >> confdefs.h <<\EOF
23570 #define LDAP_DEBUG 1
23571 EOF
23572
23573 fi
23574 if test "$ol_enable_syslog" = yes ; then
23575         cat >> confdefs.h <<\EOF
23576 #define LDAP_SYSLOG 1
23577 EOF
23578
23579 fi
23580 if test "$ol_link_kbind" != no ; then
23581         cat >> confdefs.h <<\EOF
23582 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23583 EOF
23584
23585 fi
23586 if test "$ol_enable_proctitle" != no ; then
23587         cat >> confdefs.h <<\EOF
23588 #define LDAP_PROCTITLE 1
23589 EOF
23590
23591 fi
23592 if test "$ol_enable_referrals" != no ; then
23593         cat >> confdefs.h <<\EOF
23594 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23595 EOF
23596
23597 fi
23598 if test "$ol_enable_local" != no; then
23599         cat >> confdefs.h <<\EOF
23600 #define LDAP_PF_LOCAL 1
23601 EOF
23602
23603 fi
23604 if test "$ol_link_ipv6" != no; then
23605         cat >> confdefs.h <<\EOF
23606 #define LDAP_PF_INET6 1
23607 EOF
23608
23609 fi
23610 if test "$ol_enable_cleartext" != no ; then
23611         cat >> confdefs.h <<\EOF
23612 #define SLAPD_CLEARTEXT 1
23613 EOF
23614
23615 fi
23616 if test "$ol_enable_crypt" != no ; then
23617         cat >> confdefs.h <<\EOF
23618 #define SLAPD_CRYPT 1
23619 EOF
23620
23621 fi
23622 if test "$ol_link_spasswd" != no ; then
23623         cat >> confdefs.h <<\EOF
23624 #define SLAPD_SPASSWD 1
23625 EOF
23626
23627 fi
23628 if test "$ol_enable_multimaster" != no ; then
23629         cat >> confdefs.h <<\EOF
23630 #define SLAPD_MULTIMASTER 1
23631 EOF
23632
23633 fi
23634 if test "$ol_enable_rlookups" != no ; then
23635         cat >> confdefs.h <<\EOF
23636 #define SLAPD_RLOOKUPS 1
23637 EOF
23638
23639 fi
23640 if test "$ol_enable_aci" != no ; then
23641         cat >> confdefs.h <<\EOF
23642 #define SLAPD_ACI_ENABLED 1
23643 EOF
23644
23645 fi
23646
23647 if test "$ol_link_modules" != no ; then
23648         cat >> confdefs.h <<\EOF
23649 #define SLAPD_MODULES 1
23650 EOF
23651
23652         BUILD_SLAPD=yes
23653         SLAPD_MODULES_LDFLAGS="-dlopen self"
23654 fi
23655
23656 cat >> confdefs.h <<\EOF
23657 #define SLAPD_MOD_STATIC 1
23658 EOF
23659
23660 cat >> confdefs.h <<\EOF
23661 #define SLAPD_MOD_DYNAMIC 2
23662 EOF
23663
23664
23665 if test "$ol_enable_bdb" != no ; then
23666         cat >> confdefs.h <<\EOF
23667 #define SLAPD_BDB 1
23668 EOF
23669
23670         BUILD_SLAPD=yes
23671         BUILD_BDB=yes
23672         if test "$ol_with_bdb_module" != static ; then
23673                 cat >> confdefs.h <<\EOF
23674 #define SLAPD_BDB_DYNAMIC 1
23675 EOF
23676
23677                 BUILD_BDB=mod
23678                 BUILD_BDB_DYNAMIC=shared
23679                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23680         else
23681                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23682         fi
23683 fi
23684
23685 if test "$ol_link_dnssrv" != no ; then
23686         cat >> confdefs.h <<\EOF
23687 #define SLAPD_DNSSRV 1
23688 EOF
23689
23690         BUILD_SLAPD=yes
23691         BUILD_DNSSRV=yes
23692         if test "$ol_with_dnssrv_module" != static ; then
23693                 cat >> confdefs.h <<\EOF
23694 #define SLAPD_DNSSRV_DYNAMIC 1
23695 EOF
23696
23697                 BUILD_DNSSRV=mod
23698                 BUILD_DNSSRV_DYNAMIC=shared
23699                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23700         else
23701                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23702         fi
23703 fi
23704
23705 if test "$ol_enable_hdb" != no ; then
23706         cat >> confdefs.h <<\EOF
23707 #define SLAPD_HDB 1
23708 EOF
23709
23710         BUILD_SLAPD=yes
23711         BUILD_HDB=yes
23712         if test "$ol_with_hdb_module" != static ; then
23713                 cat >> confdefs.h <<\EOF
23714 #define SLAPD_HDB_DYNAMIC 1
23715 EOF
23716
23717                 BUILD_HDB=mod
23718                 BUILD_HDB_DYNAMIC=shared
23719                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23720         else
23721                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23722         fi
23723 fi
23724
23725 if test "$ol_enable_ldap" != no ; then
23726         cat >> confdefs.h <<\EOF
23727 #define SLAPD_LDAP 1
23728 EOF
23729
23730         BUILD_SLAPD=yes
23731         BUILD_LDAP=yes
23732         if test "$ol_with_ldap_module" != static ; then
23733                 cat >> confdefs.h <<\EOF
23734 #define SLAPD_LDAP_DYNAMIC 1
23735 EOF
23736
23737                 BUILD_LDAP=mod
23738                 BUILD_LDAP_DYNAMIC=shared
23739                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23740         else
23741                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23742         fi
23743 fi
23744
23745 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23746         cat >> confdefs.h <<\EOF
23747 #define SLAPD_LDBM 1
23748 EOF
23749
23750         BUILD_SLAPD=yes
23751         BUILD_LDBM=yes
23752         if test "$ol_with_ldbm_module" != static ; then
23753                 cat >> confdefs.h <<\EOF
23754 #define SLAPD_LDBM_DYNAMIC 1
23755 EOF
23756
23757                 BUILD_LDBM=mod
23758                 BUILD_LDBM_DYNAMIC=shared
23759                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23760         else
23761                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23762         fi
23763 fi
23764
23765 if test "$ol_enable_meta" != no ; then
23766         if test "$ol_enable_ldap" = no ; then
23767                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23768         fi
23769         if test "$ol_enable_rewrite" = no ; then
23770                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23771         fi
23772         cat >> confdefs.h <<\EOF
23773 #define SLAPD_META 1
23774 EOF
23775
23776         BUILD_SLAPD=yes
23777         BUILD_META=yes
23778         BUILD_REWRITE=yes
23779         if test "$ol_with_meta_module" != static ; then
23780                 cat >> confdefs.h <<\EOF
23781 #define SLAPD_META_DYNAMIC 1
23782 EOF
23783
23784                 BUILD_META=mod
23785                 BUILD_META_DYNAMIC=shared
23786                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23787         else
23788                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23789         fi
23790 fi
23791
23792 if test "$ol_enable_monitor" != no ; then
23793         cat >> confdefs.h <<\EOF
23794 #define SLAPD_MONITOR 1
23795 EOF
23796
23797         BUILD_SLAPD=yes
23798         BUILD_MONITOR=yes
23799         if test "$ol_with_monitor_module" != static ; then
23800                 cat >> confdefs.h <<\EOF
23801 #define SLAPD_MONITOR_DYNAMIC 1
23802 EOF
23803
23804                 BUILD_MONITOR=mod
23805                 BUILD_MONITOR_DYNAMIC=shared
23806                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23807         else
23808                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23809         fi
23810 fi
23811
23812 if test "$ol_enable_null" != no ; then
23813         cat >> confdefs.h <<\EOF
23814 #define SLAPD_NULL 1
23815 EOF
23816
23817         BUILD_SLAPD=yes
23818         BUILD_NULL=yes
23819         if test "$ol_with_null_module" != static ; then
23820                 cat >> confdefs.h <<\EOF
23821 #define SLAPD_NULL_DYNAMIC 1
23822 EOF
23823
23824                 BUILD_NULL=mod
23825                 BUILD_NULL_DYNAMIC=shared
23826                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23827         else
23828                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23829         fi
23830 fi
23831
23832 if test "$ol_enable_passwd" != no ; then
23833         cat >> confdefs.h <<\EOF
23834 #define SLAPD_PASSWD 1
23835 EOF
23836
23837         BUILD_SLAPD=yes
23838         BUILD_PASSWD=yes
23839         if test "$ol_with_passwd_module" != static ; then
23840                 cat >> confdefs.h <<\EOF
23841 #define SLAPD_PASSWD_DYNAMIC 1
23842 EOF
23843
23844                 BUILD_PASSWD=mod
23845                 BUILD_PASSWD_DYNAMIC=shared
23846                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23847         else
23848                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23849         fi
23850 fi
23851
23852 if test "$ol_link_perl" != no ; then
23853         cat >> confdefs.h <<\EOF
23854 #define SLAPD_PERL 1
23855 EOF
23856
23857         BUILD_SLAPD=yes
23858         BUILD_PERL=yes
23859         if test "$ol_with_perl_module" != static ; then
23860                 cat >> confdefs.h <<\EOF
23861 #define SLAPD_PERL_DYNAMIC 1
23862 EOF
23863
23864                 BUILD_PERL=mod
23865                 BUILD_PERL_DYNAMIC=shared
23866                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23867         else
23868                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23869         fi
23870 fi
23871
23872 if test "$ol_enable_relay" != no ; then
23873         cat >> confdefs.h <<\EOF
23874 #define SLAPD_RELAY 1
23875 EOF
23876
23877         BUILD_SLAPD=yes
23878         BUILD_RELAY=yes
23879         if test "$ol_with_relay_module" != static ; then
23880                 cat >> confdefs.h <<\EOF
23881 #define SLAPD_RELAY_DYNAMIC 1
23882 EOF
23883
23884                 BUILD_RELAY=mod
23885                 BUILD_RELAY_DYNAMIC=shared
23886                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
23887         else
23888                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
23889         fi
23890 fi
23891
23892 if test "$ol_enable_shell" != no ; then
23893         if test "$ol_link_thread" != no ; then
23894                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23895         fi
23896         cat >> confdefs.h <<\EOF
23897 #define SLAPD_SHELL 1
23898 EOF
23899
23900         BUILD_SLAPD=yes
23901         BUILD_SHELL=yes
23902         if test "$ol_with_shell_module" != static ; then
23903                 cat >> confdefs.h <<\EOF
23904 #define SLAPD_SHELL_DYNAMIC 1
23905 EOF
23906
23907                 BUILD_SHELL=mod
23908                 BUILD_SHELL_DYNAMIC=shared
23909                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23910         else
23911                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23912         fi
23913 fi
23914
23915 if test "$ol_link_sql" != no ; then
23916         cat >> confdefs.h <<\EOF
23917 #define SLAPD_SQL 1
23918 EOF
23919
23920         BUILD_SLAPD=yes
23921         BUILD_SQL=yes
23922         if test "$ol_with_sql_module" != static; then
23923                 cat >> confdefs.h <<\EOF
23924 #define SLAPD_SQL_DYNAMIC 1
23925 EOF
23926
23927                 BUILD_SQL=mod
23928                 BUILD_SQL_DYNAMIC=shared
23929                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23930         else
23931                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23932         fi
23933 fi
23934
23935 if test "$ol_with_chain" != no ; then
23936         BUILD_CHAIN=$ol_with_chain
23937         if test "$ol_with_chain" = mod ; then
23938                 MFLAG=SLAPD_MOD_DYNAMIC
23939                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
23940         else
23941                 MFLAG=SLAPD_MOD_STATIC
23942         fi
23943         cat >> confdefs.h <<EOF
23944 #define SLAPD_OVER_CHAIN $MFLAG
23945 EOF
23946
23947 fi
23948
23949 if test "$ol_with_denyop" != no ; then
23950         BUILD_DENYOP=$ol_with_denyop
23951         if test "$ol_with_denyop" = mod ; then
23952                 MFLAG=SLAPD_MOD_DYNAMIC
23953                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
23954         else
23955                 MFLAG=SLAPD_MOD_STATIC
23956         fi
23957         cat >> confdefs.h <<EOF
23958 #define SLAPD_OVER_DENYOP $MFLAG
23959 EOF
23960
23961 fi
23962
23963 if test "$ol_with_dyngroup" != no ; then
23964         BUILD_DYNGROUP=$ol_with_dyngroup
23965         if test "$ol_with_dyngroup" = mod ; then
23966                 MFLAG=SLAPD_MOD_DYNAMIC
23967                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23968         else
23969                 MFLAG=SLAPD_MOD_STATIC
23970         fi
23971         cat >> confdefs.h <<EOF
23972 #define SLAPD_OVER_DYNGROUP $MFLAG
23973 EOF
23974
23975 fi
23976
23977 if test "$ol_with_proxycache" != no ; then
23978         BUILD_PROXYCACHE=$ol_with_proxycache
23979         if test "$ol_with_proxycache" = mod ; then
23980                 MFLAG=SLAPD_MOD_DYNAMIC
23981                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23982         else
23983                 MFLAG=SLAPD_MOD_STATIC
23984         fi
23985         cat >> confdefs.h <<EOF
23986 #define SLAPD_OVER_PROXYCACHE $MFLAG
23987 EOF
23988
23989 fi
23990
23991 if test "$ol_with_rwm " != no ; then
23992         BUILD_REWRITE=yes
23993         BUILD_RWM=$ol_with_rwm
23994         if test "$ol_with_rwm" = mod ; then
23995                 MFLAG=SLAPD_MOD_DYNAMIC
23996                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
23997         else
23998                 MFLAG=SLAPD_MOD_STATIC
23999         fi
24000         cat >> confdefs.h <<EOF
24001 #define SLAPD_OVER_RWM $MFLAG
24002 EOF
24003
24004 fi
24005
24006 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
24007         $BUILD_SLAPD = yes ; then
24008         BUILD_SLURPD=yes
24009 fi
24010
24011 if test "$ol_enable_rewrite" != no ; then
24012         cat >> confdefs.h <<\EOF
24013 #define ENABLE_REWRITE 1
24014 EOF
24015
24016         BUILD_REWRITE=yes
24017 fi
24018
24019 if test "$ol_enable_slapi" != no ; then
24020         cat >> confdefs.h <<\EOF
24021 #define ENABLE_SLAPI 1
24022 EOF
24023
24024         BUILD_SLAPI=yes
24025         SLAPD_SLAPI_DEPEND=libslapi.a
24026 fi
24027
24028
24029
24030 if test "$ac_cv_mingw32" = yes ; then
24031         PLAT=NT
24032         SLAPD_MODULES_LDFLAGS=
24033 else
24034         PLAT=UNIX
24035 fi
24036
24037 if test -z "$SLAPD_STATIC_BACKENDS"; then
24038         SLAPD_NO_STATIC='#'
24039 else
24040         SLAPD_NO_STATIC=
24041 fi
24042
24043
24044
24045
24046
24047
24048
24049   
24050   
24051   
24052   
24053   
24054   
24055   
24056   
24057   
24058   
24059   
24060   
24061   
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 # Check whether --with-xxinstall or --without-xxinstall was given.
24121 if test "${with_xxinstall+set}" = set; then
24122   withval="$with_xxinstall"
24123   :
24124 fi
24125
24126
24127
24128 trap '' 1 2 15
24129
24130 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24131
24132 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24133 # Let make expand exec_prefix.
24134 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24135
24136 # Any assignment to VPATH causes Sun make to only execute
24137 # the first set of double-colon rules, so remove it if not needed.
24138 # If there is a colon in the path, we need to keep it.
24139 if test "x$srcdir" = x.; then
24140   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24141 fi
24142
24143 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24144
24145 DEFS=-DHAVE_CONFIG_H
24146
24147 # Without the "./", some shells look in PATH for config.status.
24148 : ${CONFIG_STATUS=./config.status}
24149
24150 echo creating $CONFIG_STATUS
24151 rm -f $CONFIG_STATUS
24152 cat > $CONFIG_STATUS <<EOF
24153 #! /bin/sh
24154 # Generated automatically by configure.
24155 # Run this file to recreate the current configuration.
24156 # This directory was configured as follows,
24157 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24158 #
24159 # $0 $ac_configure_args
24160 #
24161 # Compiler output produced by configure, useful for debugging
24162 # configure, is in ./config.log if it exists.
24163
24164 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24165 for ac_option
24166 do
24167   case "\$ac_option" in
24168   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24169     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24170     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24171   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24172     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24173     exit 0 ;;
24174   -help | --help | --hel | --he | --h)
24175     echo "\$ac_cs_usage"; exit 0 ;;
24176   *) echo "\$ac_cs_usage"; exit 1 ;;
24177   esac
24178 done
24179
24180 ac_given_srcdir=$srcdir
24181 ac_given_INSTALL="$INSTALL"
24182
24183 trap 'rm -fr `echo "\
24184 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24185 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24186 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24187 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24188 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24189 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24190 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24191 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24192 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24193 include/Makefile:build/top.mk:include/Makefile.in \
24194 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24195 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24196 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24197 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24198 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24199 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24200 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24201 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24202 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24203 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24204 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24205 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24206 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24207 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24208 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24209 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24210 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24211 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24212 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24213 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24214 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24215 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24216 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24217 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24218 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24219 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24220 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24221 tests/run \
24222 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24223  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24224 EOF
24225 cat >> $CONFIG_STATUS <<EOF
24226
24227 # Protect against being on the right side of a sed subst in config.status.
24228 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24229  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24230 $ac_vpsub
24231 $extrasub
24232 s%@SHELL@%$SHELL%g
24233 s%@CFLAGS@%$CFLAGS%g
24234 s%@CPPFLAGS@%$CPPFLAGS%g
24235 s%@CXXFLAGS@%$CXXFLAGS%g
24236 s%@FFLAGS@%$FFLAGS%g
24237 s%@DEFS@%$DEFS%g
24238 s%@LDFLAGS@%$LDFLAGS%g
24239 s%@LIBS@%$LIBS%g
24240 s%@exec_prefix@%$exec_prefix%g
24241 s%@prefix@%$prefix%g
24242 s%@program_transform_name@%$program_transform_name%g
24243 s%@bindir@%$bindir%g
24244 s%@sbindir@%$sbindir%g
24245 s%@libexecdir@%$libexecdir%g
24246 s%@datadir@%$datadir%g
24247 s%@sysconfdir@%$sysconfdir%g
24248 s%@sharedstatedir@%$sharedstatedir%g
24249 s%@localstatedir@%$localstatedir%g
24250 s%@libdir@%$libdir%g
24251 s%@includedir@%$includedir%g
24252 s%@oldincludedir@%$oldincludedir%g
24253 s%@infodir@%$infodir%g
24254 s%@mandir@%$mandir%g
24255 s%@host@%$host%g
24256 s%@host_alias@%$host_alias%g
24257 s%@host_cpu@%$host_cpu%g
24258 s%@host_vendor@%$host_vendor%g
24259 s%@host_os@%$host_os%g
24260 s%@target@%$target%g
24261 s%@target_alias@%$target_alias%g
24262 s%@target_cpu@%$target_cpu%g
24263 s%@target_vendor@%$target_vendor%g
24264 s%@target_os@%$target_os%g
24265 s%@build@%$build%g
24266 s%@build_alias@%$build_alias%g
24267 s%@build_cpu@%$build_cpu%g
24268 s%@build_vendor@%$build_vendor%g
24269 s%@build_os@%$build_os%g
24270 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24271 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24272 s%@INSTALL_DATA@%$INSTALL_DATA%g
24273 s%@PACKAGE@%$PACKAGE%g
24274 s%@VERSION@%$VERSION%g
24275 s%@ACLOCAL@%$ACLOCAL%g
24276 s%@AUTOCONF@%$AUTOCONF%g
24277 s%@AUTOMAKE@%$AUTOMAKE%g
24278 s%@AUTOHEADER@%$AUTOHEADER%g
24279 s%@MAKEINFO@%$MAKEINFO%g
24280 s%@install_sh@%$install_sh%g
24281 s%@AMTAR@%$AMTAR%g
24282 s%@AWK@%$AWK%g
24283 s%@AMTARFLAGS@%$AMTARFLAGS%g
24284 s%@SET_MAKE@%$SET_MAKE%g
24285 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24286 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24287 s%@top_builddir@%$top_builddir%g
24288 s%@ldap_subdir@%$ldap_subdir%g
24289 s%@CC@%$CC%g
24290 s%@AR@%$AR%g
24291 s%@LN_S@%$LN_S%g
24292 s%@OBJEXT@%$OBJEXT%g
24293 s%@EXEEXT@%$EXEEXT%g
24294 s%@ECHO@%$ECHO%g
24295 s%@RANLIB@%$RANLIB%g
24296 s%@STRIP@%$STRIP%g
24297 s%@DLLTOOL@%$DLLTOOL%g
24298 s%@AS@%$AS%g
24299 s%@OBJDUMP@%$OBJDUMP%g
24300 s%@CPP@%$CPP%g
24301 s%@LIBTOOL@%$LIBTOOL%g
24302 s%@LN_H@%$LN_H%g
24303 s%@PERLBIN@%$PERLBIN%g
24304 s%@OL_MKDEP@%$OL_MKDEP%g
24305 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24306 s%@LTSTATIC@%$LTSTATIC%g
24307 s%@LIBOBJS@%$LIBOBJS%g
24308 s%@LIBSRCS@%$LIBSRCS%g
24309 s%@PLAT@%$PLAT%g
24310 s%@WITH_TLS@%$WITH_TLS%g
24311 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24312 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24313 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24314 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24315 s%@BUILD_BDB@%$BUILD_BDB%g
24316 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24317 s%@BUILD_HDB@%$BUILD_HDB%g
24318 s%@BUILD_LDAP@%$BUILD_LDAP%g
24319 s%@BUILD_LDBM@%$BUILD_LDBM%g
24320 s%@BUILD_META@%$BUILD_META%g
24321 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24322 s%@BUILD_NULL@%$BUILD_NULL%g
24323 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24324 s%@BUILD_RELAY@%$BUILD_RELAY%g
24325 s%@BUILD_PERL@%$BUILD_PERL%g
24326 s%@BUILD_SHELL@%$BUILD_SHELL%g
24327 s%@BUILD_SQL@%$BUILD_SQL%g
24328 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24329 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24330 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24331 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24332 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24333 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24334 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24335 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24336 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24337 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24338 s%@BUILD_RELAY_DYNAMIC@%$BUILD_RELAY_DYNAMIC%g
24339 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24340 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24341 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
24342 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
24343 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24344 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24345 s%@BUILD_RWM@%$BUILD_RWM%g
24346 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24347 s%@LDAP_LIBS@%$LDAP_LIBS%g
24348 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24349 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24350 s%@LDBM_LIBS@%$LDBM_LIBS%g
24351 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24352 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24353 s%@WRAP_LIBS@%$WRAP_LIBS%g
24354 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24355 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24356 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24357 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24358 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24359 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24360 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24361 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24362 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24363 s%@KRB4_LIBS@%$KRB4_LIBS%g
24364 s%@KRB5_LIBS@%$KRB5_LIBS%g
24365 s%@SASL_LIBS@%$SASL_LIBS%g
24366 s%@TLS_LIBS@%$TLS_LIBS%g
24367 s%@MODULES_LIBS@%$MODULES_LIBS%g
24368 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24369 s%@LIBSLAPI@%$LIBSLAPI%g
24370 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24371 s%@AUTH_LIBS@%$AUTH_LIBS%g
24372 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24373 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24374 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24375 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24376
24377 CEOF
24378 EOF
24379
24380 cat >> $CONFIG_STATUS <<\EOF
24381
24382 # Split the substitutions into bite-sized pieces for seds with
24383 # small command number limits, like on Digital OSF/1 and HP-UX.
24384 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24385 ac_file=1 # Number of current file.
24386 ac_beg=1 # First line for current file.
24387 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24388 ac_more_lines=:
24389 ac_sed_cmds=""
24390 while $ac_more_lines; do
24391   if test $ac_beg -gt 1; then
24392     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24393   else
24394     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24395   fi
24396   if test ! -s conftest.s$ac_file; then
24397     ac_more_lines=false
24398     rm -f conftest.s$ac_file
24399   else
24400     if test -z "$ac_sed_cmds"; then
24401       ac_sed_cmds="sed -f conftest.s$ac_file"
24402     else
24403       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24404     fi
24405     ac_file=`expr $ac_file + 1`
24406     ac_beg=$ac_end
24407     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24408   fi
24409 done
24410 if test -z "$ac_sed_cmds"; then
24411   ac_sed_cmds=cat
24412 fi
24413 EOF
24414
24415 cat >> $CONFIG_STATUS <<EOF
24416
24417 CONFIG_FILES=\${CONFIG_FILES-"\
24418 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24419 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24420 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24421 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24422 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24423 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24424 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24425 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24426 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24427 include/Makefile:build/top.mk:include/Makefile.in \
24428 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24429 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24430 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24431 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24432 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24433 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24434 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24435 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24436 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24437 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24438 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24439 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24440 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24441 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24442 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24443 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24444 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24445 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24446 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24447 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24448 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24449 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24450 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24451 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24452 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24453 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24454 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24455 tests/run \
24456 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24457 "}
24458 EOF
24459 cat >> $CONFIG_STATUS <<\EOF
24460 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24461   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24462   case "$ac_file" in
24463   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24464        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24465   *) ac_file_in="${ac_file}.in" ;;
24466   esac
24467
24468   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24469
24470   # Remove last slash and all that follows it.  Not all systems have dirname.
24471   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24472   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24473     # The file is in a subdirectory.
24474     test ! -d "$ac_dir" && mkdir "$ac_dir"
24475     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24476     # A "../" for each directory in $ac_dir_suffix.
24477     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24478   else
24479     ac_dir_suffix= ac_dots=
24480   fi
24481
24482   case "$ac_given_srcdir" in
24483   .)  srcdir=.
24484       if test -z "$ac_dots"; then top_srcdir=.
24485       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24486   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24487   *) # Relative path.
24488     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24489     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24490   esac
24491
24492   case "$ac_given_INSTALL" in
24493   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24494   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24495   esac
24496
24497   echo creating "$ac_file"
24498   rm -f "$ac_file"
24499   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24500   case "$ac_file" in
24501   *[Mm]akefile*) ac_comsub="1i\\
24502 # $configure_input" ;;
24503   *) ac_comsub= ;;
24504   esac
24505
24506   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24507   sed -e "$ac_comsub
24508 s%@configure_input@%$configure_input%g
24509 s%@srcdir@%$srcdir%g
24510 s%@top_srcdir@%$top_srcdir%g
24511 s%@INSTALL@%$INSTALL%g
24512 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24513 fi; done
24514 rm -f conftest.s*
24515
24516 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24517 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24518 #
24519 # ac_d sets the value in "#define NAME VALUE" lines.
24520 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24521 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24522 ac_dC='\3'
24523 ac_dD='%g'
24524 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24525 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24526 ac_uB='\([      ]\)%\1#\2define\3'
24527 ac_uC=' '
24528 ac_uD='\4%g'
24529 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24530 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24531 ac_eB='$%\1#\2define\3'
24532 ac_eC=' '
24533 ac_eD='%g'
24534
24535 if test "${CONFIG_HEADERS+set}" != set; then
24536 EOF
24537 cat >> $CONFIG_STATUS <<EOF
24538   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24539 EOF
24540 cat >> $CONFIG_STATUS <<\EOF
24541 fi
24542 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24543   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24544   case "$ac_file" in
24545   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24546        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24547   *) ac_file_in="${ac_file}.in" ;;
24548   esac
24549
24550   echo creating $ac_file
24551
24552   rm -f conftest.frag conftest.in conftest.out
24553   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24554   cat $ac_file_inputs > conftest.in
24555
24556 EOF
24557
24558 # Transform confdefs.h into a sed script conftest.vals that substitutes
24559 # the proper values into config.h.in to produce config.h.  And first:
24560 # Protect against being on the right side of a sed subst in config.status.
24561 # Protect against being in an unquoted here document in config.status.
24562 rm -f conftest.vals
24563 cat > conftest.hdr <<\EOF
24564 s/[\\&%]/\\&/g
24565 s%[\\$`]%\\&%g
24566 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24567 s%ac_d%ac_u%gp
24568 s%ac_u%ac_e%gp
24569 EOF
24570 sed -n -f conftest.hdr confdefs.h > conftest.vals
24571 rm -f conftest.hdr
24572
24573 # This sed command replaces #undef with comments.  This is necessary, for
24574 # example, in the case of _POSIX_SOURCE, which is predefined and required
24575 # on some systems where configure will not decide to define it.
24576 cat >> conftest.vals <<\EOF
24577 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24578 EOF
24579
24580 # Break up conftest.vals because some shells have a limit on
24581 # the size of here documents, and old seds have small limits too.
24582
24583 rm -f conftest.tail
24584 while :
24585 do
24586   ac_lines=`grep -c . conftest.vals`
24587   # grep -c gives empty output for an empty file on some AIX systems.
24588   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24589   # Write a limited-size here document to conftest.frag.
24590   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24591   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24592   echo 'CEOF
24593   sed -f conftest.frag conftest.in > conftest.out
24594   rm -f conftest.in
24595   mv conftest.out conftest.in
24596 ' >> $CONFIG_STATUS
24597   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24598   rm -f conftest.vals
24599   mv conftest.tail conftest.vals
24600 done
24601 rm -f conftest.vals
24602
24603 cat >> $CONFIG_STATUS <<\EOF
24604   rm -f conftest.frag conftest.h
24605   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24606   cat conftest.in >> conftest.h
24607   rm -f conftest.in
24608   if cmp -s $ac_file conftest.h 2>/dev/null; then
24609     echo "$ac_file is unchanged"
24610     rm -f conftest.h
24611   else
24612     # Remove last slash and all that follows it.  Not all systems have dirname.
24613       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24614       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24615       # The file is in a subdirectory.
24616       test ! -d "$ac_dir" && mkdir "$ac_dir"
24617     fi
24618     rm -f $ac_file
24619     mv conftest.h $ac_file
24620   fi
24621 fi; done
24622
24623 EOF
24624 cat >> $CONFIG_STATUS <<EOF
24625
24626 EOF
24627 cat >> $CONFIG_STATUS <<\EOF
24628
24629 chmod +x tests/run
24630 date > stamp-h
24631 echo Please run \"make depend\" to build dependencies
24632
24633 exit 0
24634 EOF
24635 chmod +x $CONFIG_STATUS
24636 rm -fr confdefs* $ac_clean_files
24637 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24638